...

Source file src/google.golang.org/api/blockchainnodeengine/v1/blockchainnodeengine-gen.go

Documentation: google.golang.org/api/blockchainnodeengine/v1

     1  // Copyright 2024 Google LLC.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // Code generated file. DO NOT EDIT.
     6  
     7  // Package blockchainnodeengine provides access to the Blockchain Node Engine API.
     8  //
     9  // For product documentation, see: https://cloud.google.com/blockchain-node-engine
    10  //
    11  // # Library status
    12  //
    13  // These client libraries are officially supported by Google. However, this
    14  // library is considered complete and is in maintenance mode. This means
    15  // that we will address critical bugs and security issues but will not add
    16  // any new features.
    17  //
    18  // When possible, we recommend using our newer
    19  // [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)
    20  // that are still actively being worked and iterated on.
    21  //
    22  // # Creating a client
    23  //
    24  // Usage example:
    25  //
    26  //	import "google.golang.org/api/blockchainnodeengine/v1"
    27  //	...
    28  //	ctx := context.Background()
    29  //	blockchainnodeengineService, err := blockchainnodeengine.NewService(ctx)
    30  //
    31  // In this example, Google Application Default Credentials are used for
    32  // authentication. For information on how to create and obtain Application
    33  // Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
    34  //
    35  // # Other authentication options
    36  //
    37  // To use an API key for authentication (note: some APIs do not support API
    38  // keys), use [google.golang.org/api/option.WithAPIKey]:
    39  //
    40  //	blockchainnodeengineService, err := blockchainnodeengine.NewService(ctx, option.WithAPIKey("AIza..."))
    41  //
    42  // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth
    43  // flow, use [google.golang.org/api/option.WithTokenSource]:
    44  //
    45  //	config := &oauth2.Config{...}
    46  //	// ...
    47  //	token, err := config.Exchange(ctx, ...)
    48  //	blockchainnodeengineService, err := blockchainnodeengine.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    49  //
    50  // See [google.golang.org/api/option.ClientOption] for details on options.
    51  package blockchainnodeengine // import "google.golang.org/api/blockchainnodeengine/v1"
    52  
    53  import (
    54  	"bytes"
    55  	"context"
    56  	"encoding/json"
    57  	"errors"
    58  	"fmt"
    59  	"io"
    60  	"net/http"
    61  	"net/url"
    62  	"strconv"
    63  	"strings"
    64  
    65  	googleapi "google.golang.org/api/googleapi"
    66  	internal "google.golang.org/api/internal"
    67  	gensupport "google.golang.org/api/internal/gensupport"
    68  	option "google.golang.org/api/option"
    69  	internaloption "google.golang.org/api/option/internaloption"
    70  	htransport "google.golang.org/api/transport/http"
    71  )
    72  
    73  // Always reference these packages, just in case the auto-generated code
    74  // below doesn't.
    75  var _ = bytes.NewBuffer
    76  var _ = strconv.Itoa
    77  var _ = fmt.Sprintf
    78  var _ = json.NewDecoder
    79  var _ = io.Copy
    80  var _ = url.Parse
    81  var _ = gensupport.MarshalJSON
    82  var _ = googleapi.Version
    83  var _ = errors.New
    84  var _ = strings.Replace
    85  var _ = context.Canceled
    86  var _ = internaloption.WithDefaultEndpoint
    87  var _ = internal.Version
    88  
    89  const apiId = "blockchainnodeengine:v1"
    90  const apiName = "blockchainnodeengine"
    91  const apiVersion = "v1"
    92  const basePath = "https://blockchainnodeengine.googleapis.com/"
    93  const basePathTemplate = "https://blockchainnodeengine.UNIVERSE_DOMAIN/"
    94  const mtlsBasePath = "https://blockchainnodeengine.mtls.googleapis.com/"
    95  
    96  // OAuth2 scopes used by this API.
    97  const (
    98  	// See, edit, configure, and delete your Google Cloud data and see the email
    99  	// address for your Google Account.
   100  	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
   101  )
   102  
   103  // NewService creates a new Service.
   104  func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
   105  	scopesOption := internaloption.WithDefaultScopes(
   106  		"https://www.googleapis.com/auth/cloud-platform",
   107  	)
   108  	// NOTE: prepend, so we don't override user-specified scopes.
   109  	opts = append([]option.ClientOption{scopesOption}, opts...)
   110  	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
   111  	opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
   112  	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
   113  	opts = append(opts, internaloption.EnableNewAuthLibrary())
   114  	client, endpoint, err := htransport.NewClient(ctx, opts...)
   115  	if err != nil {
   116  		return nil, err
   117  	}
   118  	s, err := New(client)
   119  	if err != nil {
   120  		return nil, err
   121  	}
   122  	if endpoint != "" {
   123  		s.BasePath = endpoint
   124  	}
   125  	return s, nil
   126  }
   127  
   128  // New creates a new Service. It uses the provided http.Client for requests.
   129  //
   130  // Deprecated: please use NewService instead.
   131  // To provide a custom HTTP client, use option.WithHTTPClient.
   132  // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
   133  func New(client *http.Client) (*Service, error) {
   134  	if client == nil {
   135  		return nil, errors.New("client is nil")
   136  	}
   137  	s := &Service{client: client, BasePath: basePath}
   138  	s.Projects = NewProjectsService(s)
   139  	return s, nil
   140  }
   141  
   142  type Service struct {
   143  	client    *http.Client
   144  	BasePath  string // API endpoint base URL
   145  	UserAgent string // optional additional User-Agent fragment
   146  
   147  	Projects *ProjectsService
   148  }
   149  
   150  func (s *Service) userAgent() string {
   151  	if s.UserAgent == "" {
   152  		return googleapi.UserAgent
   153  	}
   154  	return googleapi.UserAgent + " " + s.UserAgent
   155  }
   156  
   157  func NewProjectsService(s *Service) *ProjectsService {
   158  	rs := &ProjectsService{s: s}
   159  	rs.Locations = NewProjectsLocationsService(s)
   160  	return rs
   161  }
   162  
   163  type ProjectsService struct {
   164  	s *Service
   165  
   166  	Locations *ProjectsLocationsService
   167  }
   168  
   169  func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
   170  	rs := &ProjectsLocationsService{s: s}
   171  	rs.BlockchainNodes = NewProjectsLocationsBlockchainNodesService(s)
   172  	rs.Operations = NewProjectsLocationsOperationsService(s)
   173  	return rs
   174  }
   175  
   176  type ProjectsLocationsService struct {
   177  	s *Service
   178  
   179  	BlockchainNodes *ProjectsLocationsBlockchainNodesService
   180  
   181  	Operations *ProjectsLocationsOperationsService
   182  }
   183  
   184  func NewProjectsLocationsBlockchainNodesService(s *Service) *ProjectsLocationsBlockchainNodesService {
   185  	rs := &ProjectsLocationsBlockchainNodesService{s: s}
   186  	return rs
   187  }
   188  
   189  type ProjectsLocationsBlockchainNodesService struct {
   190  	s *Service
   191  }
   192  
   193  func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
   194  	rs := &ProjectsLocationsOperationsService{s: s}
   195  	return rs
   196  }
   197  
   198  type ProjectsLocationsOperationsService struct {
   199  	s *Service
   200  }
   201  
   202  // BlockchainNode: A representation of a blockchain node.
   203  type BlockchainNode struct {
   204  	// BlockchainType: Immutable. The blockchain type of the node.
   205  	//
   206  	// Possible values:
   207  	//   "BLOCKCHAIN_TYPE_UNSPECIFIED" - Blockchain type has not been specified,
   208  	// but should be.
   209  	//   "ETHEREUM" - The blockchain type is Ethereum.
   210  	BlockchainType string `json:"blockchainType,omitempty"`
   211  	// ConnectionInfo: Output only. The connection information used to interact
   212  	// with a blockchain node.
   213  	ConnectionInfo *ConnectionInfo `json:"connectionInfo,omitempty"`
   214  	// CreateTime: Output only. The timestamp at which the blockchain node was
   215  	// first created.
   216  	CreateTime string `json:"createTime,omitempty"`
   217  	// EthereumDetails: Ethereum-specific blockchain node details.
   218  	EthereumDetails *EthereumDetails `json:"ethereumDetails,omitempty"`
   219  	// Labels: User-provided key-value pairs.
   220  	Labels map[string]string `json:"labels,omitempty"`
   221  	// Name: Output only. The fully qualified name of the blockchain node. e.g.
   222  	// `projects/my-project/locations/us-central1/blockchainNodes/my-node`.
   223  	Name string `json:"name,omitempty"`
   224  	// PrivateServiceConnectEnabled: Optional. When true, the node is only
   225  	// accessible via Private Service Connect; no public endpoints are exposed.
   226  	// Otherwise, the node is only accessible via public endpoints. Warning:
   227  	// Private Service Connect enabled nodes may require a manual migration effort
   228  	// to remain compatible with future versions of the product. If this feature is
   229  	// enabled, you will be notified of these changes along with any required
   230  	// action to avoid disruption. See
   231  	// https://cloud.google.com/vpc/docs/private-service-connect.
   232  	PrivateServiceConnectEnabled bool `json:"privateServiceConnectEnabled,omitempty"`
   233  	// State: Output only. A status representing the state of the node.
   234  	//
   235  	// Possible values:
   236  	//   "STATE_UNSPECIFIED" - The state has not been specified.
   237  	//   "CREATING" - The node has been requested and is in the process of being
   238  	// created.
   239  	//   "DELETING" - The existing node is undergoing deletion, but is not yet
   240  	// finished.
   241  	//   "RUNNING" - The node is running and ready for use.
   242  	//   "ERROR" - The node is in an unexpected or errored state.
   243  	//   "UPDATING" - The node is currently being updated.
   244  	//   "REPAIRING" - The node is currently being repaired.
   245  	//   "RECONCILING" - The node is currently being reconciled.
   246  	//   "SYNCING" - The node is syncing, which is the process by which it obtains
   247  	// the latest block and current global state.
   248  	State string `json:"state,omitempty"`
   249  	// UpdateTime: Output only. The timestamp at which the blockchain node was last
   250  	// updated.
   251  	UpdateTime string `json:"updateTime,omitempty"`
   252  
   253  	// ServerResponse contains the HTTP response code and headers from the server.
   254  	googleapi.ServerResponse `json:"-"`
   255  	// ForceSendFields is a list of field names (e.g. "BlockchainType") to
   256  	// unconditionally include in API requests. By default, fields with empty or
   257  	// default values are omitted from API requests. See
   258  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   259  	// details.
   260  	ForceSendFields []string `json:"-"`
   261  	// NullFields is a list of field names (e.g. "BlockchainType") to include in
   262  	// API requests with the JSON null value. By default, fields with empty values
   263  	// are omitted from API requests. See
   264  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   265  	NullFields []string `json:"-"`
   266  }
   267  
   268  func (s *BlockchainNode) MarshalJSON() ([]byte, error) {
   269  	type NoMethod BlockchainNode
   270  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   271  }
   272  
   273  // CancelOperationRequest: The request message for Operations.CancelOperation.
   274  type CancelOperationRequest struct {
   275  }
   276  
   277  // ConnectionInfo: The connection information through which to interact with a
   278  // blockchain node.
   279  type ConnectionInfo struct {
   280  	// EndpointInfo: Output only. The endpoint information through which to
   281  	// interact with a blockchain node.
   282  	EndpointInfo *EndpointInfo `json:"endpointInfo,omitempty"`
   283  	// ServiceAttachment: Output only. A service attachment that exposes a node,
   284  	// and has the following format:
   285  	// projects/{project}/regions/{region}/serviceAttachments/{service_attachment_na
   286  	// me}
   287  	ServiceAttachment string `json:"serviceAttachment,omitempty"`
   288  	// ForceSendFields is a list of field names (e.g. "EndpointInfo") to
   289  	// unconditionally include in API requests. By default, fields with empty or
   290  	// default values are omitted from API requests. See
   291  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   292  	// details.
   293  	ForceSendFields []string `json:"-"`
   294  	// NullFields is a list of field names (e.g. "EndpointInfo") to include in API
   295  	// requests with the JSON null value. By default, fields with empty values are
   296  	// omitted from API requests. See
   297  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   298  	NullFields []string `json:"-"`
   299  }
   300  
   301  func (s *ConnectionInfo) MarshalJSON() ([]byte, error) {
   302  	type NoMethod ConnectionInfo
   303  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   304  }
   305  
   306  // EndpointInfo: Contains endpoint information through which to interact with a
   307  // blockchain node.
   308  type EndpointInfo struct {
   309  	// JsonRpcApiEndpoint: Output only. The assigned URL for the node JSON-RPC API
   310  	// endpoint.
   311  	JsonRpcApiEndpoint string `json:"jsonRpcApiEndpoint,omitempty"`
   312  	// WebsocketsApiEndpoint: Output only. The assigned URL for the node WebSockets
   313  	// API endpoint.
   314  	WebsocketsApiEndpoint string `json:"websocketsApiEndpoint,omitempty"`
   315  	// ForceSendFields is a list of field names (e.g. "JsonRpcApiEndpoint") to
   316  	// unconditionally include in API requests. By default, fields with empty or
   317  	// default values are omitted from API requests. See
   318  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   319  	// details.
   320  	ForceSendFields []string `json:"-"`
   321  	// NullFields is a list of field names (e.g. "JsonRpcApiEndpoint") to include
   322  	// in API requests with the JSON null value. By default, fields with empty
   323  	// values are omitted from API requests. See
   324  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   325  	NullFields []string `json:"-"`
   326  }
   327  
   328  func (s *EndpointInfo) MarshalJSON() ([]byte, error) {
   329  	type NoMethod EndpointInfo
   330  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   331  }
   332  
   333  // EthereumDetails: Ethereum-specific blockchain node details.
   334  type EthereumDetails struct {
   335  	// AdditionalEndpoints: Output only. Ethereum-specific endpoint information.
   336  	AdditionalEndpoints *EthereumEndpoints `json:"additionalEndpoints,omitempty"`
   337  	// ApiEnableAdmin: Immutable. Enables JSON-RPC access to functions in the
   338  	// `admin` namespace. Defaults to `false`.
   339  	ApiEnableAdmin bool `json:"apiEnableAdmin,omitempty"`
   340  	// ApiEnableDebug: Immutable. Enables JSON-RPC access to functions in the
   341  	// `debug` namespace. Defaults to `false`.
   342  	ApiEnableDebug bool `json:"apiEnableDebug,omitempty"`
   343  	// ConsensusClient: Immutable. The consensus client.
   344  	//
   345  	// Possible values:
   346  	//   "CONSENSUS_CLIENT_UNSPECIFIED" - Consensus client has not been specified,
   347  	// but should be.
   348  	//   "LIGHTHOUSE" - Consensus client implementation written in Rust, maintained
   349  	// by Sigma Prime. See [Lighthouse - Sigma
   350  	// Prime](https://lighthouse.sigmaprime.io/) for details.
   351  	//   "ERIGON_EMBEDDED_CONSENSUS_LAYER" - Erigon's embedded consensus client
   352  	// embedded in the execution client. Note this option is not currently
   353  	// available when creating new blockchain nodes. See [Erigon on
   354  	// GitHub](https://github.com/ledgerwatch/erigon#embedded-consensus-layer) for
   355  	// details.
   356  	ConsensusClient string `json:"consensusClient,omitempty"`
   357  	// ExecutionClient: Immutable. The execution client
   358  	//
   359  	// Possible values:
   360  	//   "EXECUTION_CLIENT_UNSPECIFIED" - Execution client has not been specified,
   361  	// but should be.
   362  	//   "GETH" - Official Go implementation of the Ethereum protocol. See
   363  	// [go-ethereum](https://geth.ethereum.org/) for details.
   364  	//   "ERIGON" - An implementation of Ethereum (execution client), on the
   365  	// efficiency frontier, written in Go. See [Erigon on
   366  	// GitHub](https://github.com/ledgerwatch/erigon) for details.
   367  	ExecutionClient string `json:"executionClient,omitempty"`
   368  	// GethDetails: Details for the Geth execution client.
   369  	GethDetails *GethDetails `json:"gethDetails,omitempty"`
   370  	// Network: Immutable. The Ethereum environment being accessed.
   371  	//
   372  	// Possible values:
   373  	//   "NETWORK_UNSPECIFIED" - The network has not been specified, but should be.
   374  	//   "MAINNET" - The Ethereum Mainnet.
   375  	//   "TESTNET_GOERLI_PRATER" - Deprecated: The Ethereum Testnet based on Goerli
   376  	// protocol. Please use another test network.
   377  	//   "TESTNET_SEPOLIA" - The Ethereum Testnet based on Sepolia/Bepolia
   378  	// protocol. See https://github.com/eth-clients/sepolia.
   379  	//   "TESTNET_HOLESKY" - The Ethereum Testnet based on Holesky specification.
   380  	// See https://github.com/eth-clients/holesky.
   381  	Network string `json:"network,omitempty"`
   382  	// NodeType: Immutable. The type of Ethereum node.
   383  	//
   384  	// Possible values:
   385  	//   "NODE_TYPE_UNSPECIFIED" - Node type has not been specified, but should be.
   386  	//   "LIGHT" - An Ethereum node that only downloads Ethereum block headers.
   387  	//   "FULL" - Keeps a complete copy of the blockchain data, and contributes to
   388  	// the network by receiving, validating, and forwarding transactions.
   389  	//   "ARCHIVE" - Holds the same data as full node as well as all of the
   390  	// blockchain's history state data dating back to the Genesis Block.
   391  	NodeType string `json:"nodeType,omitempty"`
   392  	// ValidatorConfig: Configuration for validator-related parameters on the
   393  	// beacon client, and for any GCP-managed validator client.
   394  	ValidatorConfig *ValidatorConfig `json:"validatorConfig,omitempty"`
   395  	// ForceSendFields is a list of field names (e.g. "AdditionalEndpoints") to
   396  	// unconditionally include in API requests. By default, fields with empty or
   397  	// default values are omitted from API requests. See
   398  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   399  	// details.
   400  	ForceSendFields []string `json:"-"`
   401  	// NullFields is a list of field names (e.g. "AdditionalEndpoints") to include
   402  	// in API requests with the JSON null value. By default, fields with empty
   403  	// values are omitted from API requests. See
   404  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   405  	NullFields []string `json:"-"`
   406  }
   407  
   408  func (s *EthereumDetails) MarshalJSON() ([]byte, error) {
   409  	type NoMethod EthereumDetails
   410  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   411  }
   412  
   413  // EthereumEndpoints: Contains endpoint information specific to Ethereum nodes.
   414  type EthereumEndpoints struct {
   415  	// BeaconApiEndpoint: Output only. The assigned URL for the node's Beacon API
   416  	// endpoint.
   417  	BeaconApiEndpoint string `json:"beaconApiEndpoint,omitempty"`
   418  	// BeaconPrometheusMetricsApiEndpoint: Output only. The assigned URL for the
   419  	// node's Beacon Prometheus metrics endpoint. See Prometheus Metrics
   420  	// (https://lighthouse-book.sigmaprime.io/advanced_metrics.html) for more
   421  	// details.
   422  	BeaconPrometheusMetricsApiEndpoint string `json:"beaconPrometheusMetricsApiEndpoint,omitempty"`
   423  	// ExecutionClientPrometheusMetricsApiEndpoint: Output only. The assigned URL
   424  	// for the node's execution client's Prometheus metrics endpoint.
   425  	ExecutionClientPrometheusMetricsApiEndpoint string `json:"executionClientPrometheusMetricsApiEndpoint,omitempty"`
   426  	// ForceSendFields is a list of field names (e.g. "BeaconApiEndpoint") to
   427  	// unconditionally include in API requests. By default, fields with empty or
   428  	// default values are omitted from API requests. See
   429  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   430  	// details.
   431  	ForceSendFields []string `json:"-"`
   432  	// NullFields is a list of field names (e.g. "BeaconApiEndpoint") to include in
   433  	// API requests with the JSON null value. By default, fields with empty values
   434  	// are omitted from API requests. See
   435  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   436  	NullFields []string `json:"-"`
   437  }
   438  
   439  func (s *EthereumEndpoints) MarshalJSON() ([]byte, error) {
   440  	type NoMethod EthereumEndpoints
   441  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   442  }
   443  
   444  // GethDetails: Options for the Geth execution client. See Command-line Options
   445  // (https://geth.ethereum.org/docs/fundamentals/command-line-options) for more
   446  // details.
   447  type GethDetails struct {
   448  	// GarbageCollectionMode: Immutable. Blockchain garbage collection mode.
   449  	//
   450  	// Possible values:
   451  	//   "GARBAGE_COLLECTION_MODE_UNSPECIFIED" - The garbage collection has not
   452  	// been specified.
   453  	//   "FULL" - Configures Geth's garbage collection so that older data not
   454  	// needed for a full node is deleted. This is the default mode when creating a
   455  	// full node.
   456  	//   "ARCHIVE" - Configures Geth's garbage collection so that old data is never
   457  	// deleted. This is the default mode when creating an archive node. This value
   458  	// can also be chosen when creating a full node in order to create a
   459  	// partial/recent archive node. See [Sync
   460  	// modes](https://geth.ethereum.org/docs/fundamentals/sync-modes) for more
   461  	// details.
   462  	GarbageCollectionMode string `json:"garbageCollectionMode,omitempty"`
   463  	// ForceSendFields is a list of field names (e.g. "GarbageCollectionMode") to
   464  	// unconditionally include in API requests. By default, fields with empty or
   465  	// default values are omitted from API requests. See
   466  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   467  	// details.
   468  	ForceSendFields []string `json:"-"`
   469  	// NullFields is a list of field names (e.g. "GarbageCollectionMode") to
   470  	// include in API requests with the JSON null value. By default, fields with
   471  	// empty values are omitted from API requests. See
   472  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   473  	NullFields []string `json:"-"`
   474  }
   475  
   476  func (s *GethDetails) MarshalJSON() ([]byte, error) {
   477  	type NoMethod GethDetails
   478  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   479  }
   480  
   481  // GoogleProtobufEmpty: A generic empty message that you can re-use to avoid
   482  // defining duplicated empty messages in your APIs. A typical example is to use
   483  // it as the request or the response type of an API method. For instance:
   484  // service Foo { rpc Bar(google.protobuf.Empty) returns
   485  // (google.protobuf.Empty); }
   486  type GoogleProtobufEmpty struct {
   487  	// ServerResponse contains the HTTP response code and headers from the server.
   488  	googleapi.ServerResponse `json:"-"`
   489  }
   490  
   491  // ListBlockchainNodesResponse: Message for response to listing blockchain
   492  // nodes.
   493  type ListBlockchainNodesResponse struct {
   494  	// BlockchainNodes: The list of nodes
   495  	BlockchainNodes []*BlockchainNode `json:"blockchainNodes,omitempty"`
   496  	// NextPageToken: A token identifying a page of results the server should
   497  	// return.
   498  	NextPageToken string `json:"nextPageToken,omitempty"`
   499  	// Unreachable: Locations that could not be reached.
   500  	Unreachable []string `json:"unreachable,omitempty"`
   501  
   502  	// ServerResponse contains the HTTP response code and headers from the server.
   503  	googleapi.ServerResponse `json:"-"`
   504  	// ForceSendFields is a list of field names (e.g. "BlockchainNodes") to
   505  	// unconditionally include in API requests. By default, fields with empty or
   506  	// default values are omitted from API requests. See
   507  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   508  	// details.
   509  	ForceSendFields []string `json:"-"`
   510  	// NullFields is a list of field names (e.g. "BlockchainNodes") to include in
   511  	// API requests with the JSON null value. By default, fields with empty values
   512  	// are omitted from API requests. See
   513  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   514  	NullFields []string `json:"-"`
   515  }
   516  
   517  func (s *ListBlockchainNodesResponse) MarshalJSON() ([]byte, error) {
   518  	type NoMethod ListBlockchainNodesResponse
   519  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   520  }
   521  
   522  // ListLocationsResponse: The response message for Locations.ListLocations.
   523  type ListLocationsResponse struct {
   524  	// Locations: A list of locations that matches the specified filter in the
   525  	// request.
   526  	Locations []*Location `json:"locations,omitempty"`
   527  	// NextPageToken: The standard List next-page token.
   528  	NextPageToken string `json:"nextPageToken,omitempty"`
   529  
   530  	// ServerResponse contains the HTTP response code and headers from the server.
   531  	googleapi.ServerResponse `json:"-"`
   532  	// ForceSendFields is a list of field names (e.g. "Locations") to
   533  	// unconditionally include in API requests. By default, fields with empty or
   534  	// default values are omitted from API requests. See
   535  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   536  	// details.
   537  	ForceSendFields []string `json:"-"`
   538  	// NullFields is a list of field names (e.g. "Locations") to include in API
   539  	// requests with the JSON null value. By default, fields with empty values are
   540  	// omitted from API requests. See
   541  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   542  	NullFields []string `json:"-"`
   543  }
   544  
   545  func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
   546  	type NoMethod ListLocationsResponse
   547  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   548  }
   549  
   550  // ListOperationsResponse: The response message for Operations.ListOperations.
   551  type ListOperationsResponse struct {
   552  	// NextPageToken: The standard List next-page token.
   553  	NextPageToken string `json:"nextPageToken,omitempty"`
   554  	// Operations: A list of operations that matches the specified filter in the
   555  	// request.
   556  	Operations []*Operation `json:"operations,omitempty"`
   557  
   558  	// ServerResponse contains the HTTP response code and headers from the server.
   559  	googleapi.ServerResponse `json:"-"`
   560  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
   561  	// unconditionally include in API requests. By default, fields with empty or
   562  	// default values are omitted from API requests. See
   563  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   564  	// details.
   565  	ForceSendFields []string `json:"-"`
   566  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
   567  	// requests with the JSON null value. By default, fields with empty values are
   568  	// omitted from API requests. See
   569  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   570  	NullFields []string `json:"-"`
   571  }
   572  
   573  func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
   574  	type NoMethod ListOperationsResponse
   575  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   576  }
   577  
   578  // Location: A resource that represents a Google Cloud location.
   579  type Location struct {
   580  	// DisplayName: The friendly name for this location, typically a nearby city
   581  	// name. For example, "Tokyo".
   582  	DisplayName string `json:"displayName,omitempty"`
   583  	// Labels: Cross-service attributes for the location. For example
   584  	// {"cloud.googleapis.com/region": "us-east1"}
   585  	Labels map[string]string `json:"labels,omitempty"`
   586  	// LocationId: The canonical id for this location. For example: "us-east1".
   587  	LocationId string `json:"locationId,omitempty"`
   588  	// Metadata: Service-specific metadata. For example the available capacity at
   589  	// the given location.
   590  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
   591  	// Name: Resource name for the location, which may vary between
   592  	// implementations. For example:
   593  	// "projects/example-project/locations/us-east1"
   594  	Name string `json:"name,omitempty"`
   595  
   596  	// ServerResponse contains the HTTP response code and headers from the server.
   597  	googleapi.ServerResponse `json:"-"`
   598  	// ForceSendFields is a list of field names (e.g. "DisplayName") to
   599  	// unconditionally include in API requests. By default, fields with empty or
   600  	// default values are omitted from API requests. See
   601  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   602  	// details.
   603  	ForceSendFields []string `json:"-"`
   604  	// NullFields is a list of field names (e.g. "DisplayName") to include in API
   605  	// requests with the JSON null value. By default, fields with empty values are
   606  	// omitted from API requests. See
   607  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   608  	NullFields []string `json:"-"`
   609  }
   610  
   611  func (s *Location) MarshalJSON() ([]byte, error) {
   612  	type NoMethod Location
   613  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   614  }
   615  
   616  // Operation: This resource represents a long-running operation that is the
   617  // result of a network API call.
   618  type Operation struct {
   619  	// Done: If the value is `false`, it means the operation is still in progress.
   620  	// If `true`, the operation is completed, and either `error` or `response` is
   621  	// available.
   622  	Done bool `json:"done,omitempty"`
   623  	// Error: The error result of the operation in case of failure or cancellation.
   624  	Error *Status `json:"error,omitempty"`
   625  	// Metadata: Service-specific metadata associated with the operation. It
   626  	// typically contains progress information and common metadata such as create
   627  	// time. Some services might not provide such metadata. Any method that returns
   628  	// a long-running operation should document the metadata type, if any.
   629  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
   630  	// Name: The server-assigned name, which is only unique within the same service
   631  	// that originally returns it. If you use the default HTTP mapping, the `name`
   632  	// should be a resource name ending with `operations/{unique_id}`.
   633  	Name string `json:"name,omitempty"`
   634  	// Response: The normal, successful response of the operation. If the original
   635  	// method returns no data on success, such as `Delete`, the response is
   636  	// `google.protobuf.Empty`. If the original method is standard
   637  	// `Get`/`Create`/`Update`, the response should be the resource. For other
   638  	// methods, the response should have the type `XxxResponse`, where `Xxx` is the
   639  	// original method name. For example, if the original method name is
   640  	// `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
   641  	Response googleapi.RawMessage `json:"response,omitempty"`
   642  
   643  	// ServerResponse contains the HTTP response code and headers from the server.
   644  	googleapi.ServerResponse `json:"-"`
   645  	// ForceSendFields is a list of field names (e.g. "Done") to unconditionally
   646  	// include in API requests. By default, fields with empty or default values are
   647  	// omitted from API requests. See
   648  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   649  	// details.
   650  	ForceSendFields []string `json:"-"`
   651  	// NullFields is a list of field names (e.g. "Done") to include in API requests
   652  	// with the JSON null value. By default, fields with empty values are omitted
   653  	// from API requests. See
   654  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   655  	NullFields []string `json:"-"`
   656  }
   657  
   658  func (s *Operation) MarshalJSON() ([]byte, error) {
   659  	type NoMethod Operation
   660  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   661  }
   662  
   663  // OperationMetadata: Represents the metadata of the long-running operation.
   664  type OperationMetadata struct {
   665  	// ApiVersion: Output only. API version used to start the operation.
   666  	ApiVersion string `json:"apiVersion,omitempty"`
   667  	// CreateTime: Output only. The time the operation was created.
   668  	CreateTime string `json:"createTime,omitempty"`
   669  	// EndTime: Output only. The time the operation finished running.
   670  	EndTime string `json:"endTime,omitempty"`
   671  	// RequestedCancellation: Output only. Identifies whether the user has
   672  	// requested cancellation of the operation. Operations that have been cancelled
   673  	// successfully have `Operation.error` value with a `google.rpc.Status.code` of
   674  	// `1`, corresponding to `Code.CANCELLED`.
   675  	RequestedCancellation bool `json:"requestedCancellation,omitempty"`
   676  	// StatusMessage: Output only. Human-readable status of the operation, if any.
   677  	StatusMessage string `json:"statusMessage,omitempty"`
   678  	// Target: Output only. Server-defined resource path for the target of the
   679  	// operation.
   680  	Target string `json:"target,omitempty"`
   681  	// Verb: Output only. Name of the verb executed by the operation.
   682  	Verb string `json:"verb,omitempty"`
   683  	// ForceSendFields is a list of field names (e.g. "ApiVersion") to
   684  	// unconditionally include in API requests. By default, fields with empty or
   685  	// default values are omitted from API requests. See
   686  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   687  	// details.
   688  	ForceSendFields []string `json:"-"`
   689  	// NullFields is a list of field names (e.g. "ApiVersion") to include in API
   690  	// requests with the JSON null value. By default, fields with empty values are
   691  	// omitted from API requests. See
   692  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   693  	NullFields []string `json:"-"`
   694  }
   695  
   696  func (s *OperationMetadata) MarshalJSON() ([]byte, error) {
   697  	type NoMethod OperationMetadata
   698  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   699  }
   700  
   701  // Status: The `Status` type defines a logical error model that is suitable for
   702  // different programming environments, including REST APIs and RPC APIs. It is
   703  // used by gRPC (https://github.com/grpc). Each `Status` message contains three
   704  // pieces of data: error code, error message, and error details. You can find
   705  // out more about this error model and how to work with it in the API Design
   706  // Guide (https://cloud.google.com/apis/design/errors).
   707  type Status struct {
   708  	// Code: The status code, which should be an enum value of google.rpc.Code.
   709  	Code int64 `json:"code,omitempty"`
   710  	// Details: A list of messages that carry the error details. There is a common
   711  	// set of message types for APIs to use.
   712  	Details []googleapi.RawMessage `json:"details,omitempty"`
   713  	// Message: A developer-facing error message, which should be in English. Any
   714  	// user-facing error message should be localized and sent in the
   715  	// google.rpc.Status.details field, or localized by the client.
   716  	Message string `json:"message,omitempty"`
   717  	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
   718  	// include in API requests. By default, fields with empty or default values are
   719  	// omitted from API requests. See
   720  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   721  	// details.
   722  	ForceSendFields []string `json:"-"`
   723  	// NullFields is a list of field names (e.g. "Code") to include in API requests
   724  	// with the JSON null value. By default, fields with empty values are omitted
   725  	// from API requests. See
   726  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   727  	NullFields []string `json:"-"`
   728  }
   729  
   730  func (s *Status) MarshalJSON() ([]byte, error) {
   731  	type NoMethod Status
   732  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   733  }
   734  
   735  // ValidatorConfig: Configuration for validator-related parameters on the
   736  // beacon client, and for any GCP-managed validator client.
   737  type ValidatorConfig struct {
   738  	// BeaconFeeRecipient: An Ethereum address which the beacon client will send
   739  	// fee rewards to if no recipient is configured in the validator client. See
   740  	// https://lighthouse-book.sigmaprime.io/suggested-fee-recipient.html or
   741  	// https://docs.prylabs.network/docs/execution-node/fee-recipient for examples
   742  	// of how this is used. Note that while this is often described as "suggested",
   743  	// as we run the execution node we can trust the execution node, and therefore
   744  	// this is considered enforced.
   745  	BeaconFeeRecipient string `json:"beaconFeeRecipient,omitempty"`
   746  	// ManagedValidatorClient: Immutable. When true, deploys a GCP-managed
   747  	// validator client alongside the beacon client.
   748  	ManagedValidatorClient bool `json:"managedValidatorClient,omitempty"`
   749  	// MevRelayUrls: URLs for MEV-relay services to use for block building. When
   750  	// set, a GCP-managed MEV-boost service is configured on the beacon client.
   751  	MevRelayUrls []string `json:"mevRelayUrls,omitempty"`
   752  	// ForceSendFields is a list of field names (e.g. "BeaconFeeRecipient") to
   753  	// unconditionally include in API requests. By default, fields with empty or
   754  	// default values are omitted from API requests. See
   755  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   756  	// details.
   757  	ForceSendFields []string `json:"-"`
   758  	// NullFields is a list of field names (e.g. "BeaconFeeRecipient") to include
   759  	// in API requests with the JSON null value. By default, fields with empty
   760  	// values are omitted from API requests. See
   761  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   762  	NullFields []string `json:"-"`
   763  }
   764  
   765  func (s *ValidatorConfig) MarshalJSON() ([]byte, error) {
   766  	type NoMethod ValidatorConfig
   767  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   768  }
   769  
   770  type ProjectsLocationsGetCall struct {
   771  	s            *Service
   772  	name         string
   773  	urlParams_   gensupport.URLParams
   774  	ifNoneMatch_ string
   775  	ctx_         context.Context
   776  	header_      http.Header
   777  }
   778  
   779  // Get: Gets information about a location.
   780  //
   781  // - name: Resource name for the location.
   782  func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
   783  	c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
   784  	c.name = name
   785  	return c
   786  }
   787  
   788  // Fields allows partial responses to be retrieved. See
   789  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
   790  // details.
   791  func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
   792  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
   793  	return c
   794  }
   795  
   796  // IfNoneMatch sets an optional parameter which makes the operation fail if the
   797  // object's ETag matches the given value. This is useful for getting updates
   798  // only after the object has changed since the last request.
   799  func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
   800  	c.ifNoneMatch_ = entityTag
   801  	return c
   802  }
   803  
   804  // Context sets the context to be used in this call's Do method.
   805  func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
   806  	c.ctx_ = ctx
   807  	return c
   808  }
   809  
   810  // Header returns a http.Header that can be modified by the caller to add
   811  // headers to the request.
   812  func (c *ProjectsLocationsGetCall) Header() http.Header {
   813  	if c.header_ == nil {
   814  		c.header_ = make(http.Header)
   815  	}
   816  	return c.header_
   817  }
   818  
   819  func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
   820  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
   821  	if c.ifNoneMatch_ != "" {
   822  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
   823  	}
   824  	var body io.Reader = nil
   825  	c.urlParams_.Set("alt", alt)
   826  	c.urlParams_.Set("prettyPrint", "false")
   827  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
   828  	urls += "?" + c.urlParams_.Encode()
   829  	req, err := http.NewRequest("GET", urls, body)
   830  	if err != nil {
   831  		return nil, err
   832  	}
   833  	req.Header = reqHeaders
   834  	googleapi.Expand(req.URL, map[string]string{
   835  		"name": c.name,
   836  	})
   837  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
   838  }
   839  
   840  // Do executes the "blockchainnodeengine.projects.locations.get" call.
   841  // Any non-2xx status code is an error. Response headers are in either
   842  // *Location.ServerResponse.Header or (if a response was returned at all) in
   843  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
   844  // whether the returned error was because http.StatusNotModified was returned.
   845  func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
   846  	gensupport.SetOptions(c.urlParams_, opts...)
   847  	res, err := c.doRequest("json")
   848  	if res != nil && res.StatusCode == http.StatusNotModified {
   849  		if res.Body != nil {
   850  			res.Body.Close()
   851  		}
   852  		return nil, gensupport.WrapError(&googleapi.Error{
   853  			Code:   res.StatusCode,
   854  			Header: res.Header,
   855  		})
   856  	}
   857  	if err != nil {
   858  		return nil, err
   859  	}
   860  	defer googleapi.CloseBody(res)
   861  	if err := googleapi.CheckResponse(res); err != nil {
   862  		return nil, gensupport.WrapError(err)
   863  	}
   864  	ret := &Location{
   865  		ServerResponse: googleapi.ServerResponse{
   866  			Header:         res.Header,
   867  			HTTPStatusCode: res.StatusCode,
   868  		},
   869  	}
   870  	target := &ret
   871  	if err := gensupport.DecodeResponse(target, res); err != nil {
   872  		return nil, err
   873  	}
   874  	return ret, nil
   875  }
   876  
   877  type ProjectsLocationsListCall struct {
   878  	s            *Service
   879  	name         string
   880  	urlParams_   gensupport.URLParams
   881  	ifNoneMatch_ string
   882  	ctx_         context.Context
   883  	header_      http.Header
   884  }
   885  
   886  // List: Lists information about the supported locations for this service.
   887  //
   888  // - name: The resource that owns the locations collection, if applicable.
   889  func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
   890  	c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
   891  	c.name = name
   892  	return c
   893  }
   894  
   895  // Filter sets the optional parameter "filter": A filter to narrow down results
   896  // to a preferred subset. The filtering language accepts strings like
   897  // "displayName=tokyo", and is documented in more detail in AIP-160
   898  // (https://google.aip.dev/160).
   899  func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
   900  	c.urlParams_.Set("filter", filter)
   901  	return c
   902  }
   903  
   904  // PageSize sets the optional parameter "pageSize": The maximum number of
   905  // results to return. If not set, the service selects a default.
   906  func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
   907  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
   908  	return c
   909  }
   910  
   911  // PageToken sets the optional parameter "pageToken": A page token received
   912  // from the `next_page_token` field in the response. Send that page token to
   913  // receive the subsequent page.
   914  func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
   915  	c.urlParams_.Set("pageToken", pageToken)
   916  	return c
   917  }
   918  
   919  // Fields allows partial responses to be retrieved. See
   920  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
   921  // details.
   922  func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
   923  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
   924  	return c
   925  }
   926  
   927  // IfNoneMatch sets an optional parameter which makes the operation fail if the
   928  // object's ETag matches the given value. This is useful for getting updates
   929  // only after the object has changed since the last request.
   930  func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
   931  	c.ifNoneMatch_ = entityTag
   932  	return c
   933  }
   934  
   935  // Context sets the context to be used in this call's Do method.
   936  func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
   937  	c.ctx_ = ctx
   938  	return c
   939  }
   940  
   941  // Header returns a http.Header that can be modified by the caller to add
   942  // headers to the request.
   943  func (c *ProjectsLocationsListCall) Header() http.Header {
   944  	if c.header_ == nil {
   945  		c.header_ = make(http.Header)
   946  	}
   947  	return c.header_
   948  }
   949  
   950  func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
   951  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
   952  	if c.ifNoneMatch_ != "" {
   953  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
   954  	}
   955  	var body io.Reader = nil
   956  	c.urlParams_.Set("alt", alt)
   957  	c.urlParams_.Set("prettyPrint", "false")
   958  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations")
   959  	urls += "?" + c.urlParams_.Encode()
   960  	req, err := http.NewRequest("GET", urls, body)
   961  	if err != nil {
   962  		return nil, err
   963  	}
   964  	req.Header = reqHeaders
   965  	googleapi.Expand(req.URL, map[string]string{
   966  		"name": c.name,
   967  	})
   968  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
   969  }
   970  
   971  // Do executes the "blockchainnodeengine.projects.locations.list" call.
   972  // Any non-2xx status code is an error. Response headers are in either
   973  // *ListLocationsResponse.ServerResponse.Header or (if a response was returned
   974  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
   975  // check whether the returned error was because http.StatusNotModified was
   976  // returned.
   977  func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
   978  	gensupport.SetOptions(c.urlParams_, opts...)
   979  	res, err := c.doRequest("json")
   980  	if res != nil && res.StatusCode == http.StatusNotModified {
   981  		if res.Body != nil {
   982  			res.Body.Close()
   983  		}
   984  		return nil, gensupport.WrapError(&googleapi.Error{
   985  			Code:   res.StatusCode,
   986  			Header: res.Header,
   987  		})
   988  	}
   989  	if err != nil {
   990  		return nil, err
   991  	}
   992  	defer googleapi.CloseBody(res)
   993  	if err := googleapi.CheckResponse(res); err != nil {
   994  		return nil, gensupport.WrapError(err)
   995  	}
   996  	ret := &ListLocationsResponse{
   997  		ServerResponse: googleapi.ServerResponse{
   998  			Header:         res.Header,
   999  			HTTPStatusCode: res.StatusCode,
  1000  		},
  1001  	}
  1002  	target := &ret
  1003  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1004  		return nil, err
  1005  	}
  1006  	return ret, nil
  1007  }
  1008  
  1009  // Pages invokes f for each page of results.
  1010  // A non-nil error returned from f will halt the iteration.
  1011  // The provided context supersedes any context provided to the Context method.
  1012  func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
  1013  	c.ctx_ = ctx
  1014  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  1015  	for {
  1016  		x, err := c.Do()
  1017  		if err != nil {
  1018  			return err
  1019  		}
  1020  		if err := f(x); err != nil {
  1021  			return err
  1022  		}
  1023  		if x.NextPageToken == "" {
  1024  			return nil
  1025  		}
  1026  		c.PageToken(x.NextPageToken)
  1027  	}
  1028  }
  1029  
  1030  type ProjectsLocationsBlockchainNodesCreateCall struct {
  1031  	s              *Service
  1032  	parent         string
  1033  	blockchainnode *BlockchainNode
  1034  	urlParams_     gensupport.URLParams
  1035  	ctx_           context.Context
  1036  	header_        http.Header
  1037  }
  1038  
  1039  // Create: Creates a new blockchain node in a given project and location.
  1040  //
  1041  // - parent: Value for parent.
  1042  func (r *ProjectsLocationsBlockchainNodesService) Create(parent string, blockchainnode *BlockchainNode) *ProjectsLocationsBlockchainNodesCreateCall {
  1043  	c := &ProjectsLocationsBlockchainNodesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1044  	c.parent = parent
  1045  	c.blockchainnode = blockchainnode
  1046  	return c
  1047  }
  1048  
  1049  // BlockchainNodeId sets the optional parameter "blockchainNodeId": Required.
  1050  // ID of the requesting object.
  1051  func (c *ProjectsLocationsBlockchainNodesCreateCall) BlockchainNodeId(blockchainNodeId string) *ProjectsLocationsBlockchainNodesCreateCall {
  1052  	c.urlParams_.Set("blockchainNodeId", blockchainNodeId)
  1053  	return c
  1054  }
  1055  
  1056  // RequestId sets the optional parameter "requestId": An optional request ID to
  1057  // identify requests. Specify a unique request ID so that if you must retry
  1058  // your request, the server will know to ignore the request if it has already
  1059  // been completed. The server will guarantee that for at least 60 minutes since
  1060  // the first request. For example, consider a situation where you make an
  1061  // initial request and the request times out. If you make the request again
  1062  // with the same request ID, the server can check if original operation with
  1063  // the same request ID was received, and if so, will ignore the second request.
  1064  // This prevents clients from accidentally creating duplicate commitments. The
  1065  // request ID must be a valid UUID with the exception that zero UUID is not
  1066  // supported (00000000-0000-0000-0000-000000000000).
  1067  func (c *ProjectsLocationsBlockchainNodesCreateCall) RequestId(requestId string) *ProjectsLocationsBlockchainNodesCreateCall {
  1068  	c.urlParams_.Set("requestId", requestId)
  1069  	return c
  1070  }
  1071  
  1072  // Fields allows partial responses to be retrieved. See
  1073  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1074  // details.
  1075  func (c *ProjectsLocationsBlockchainNodesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsBlockchainNodesCreateCall {
  1076  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1077  	return c
  1078  }
  1079  
  1080  // Context sets the context to be used in this call's Do method.
  1081  func (c *ProjectsLocationsBlockchainNodesCreateCall) Context(ctx context.Context) *ProjectsLocationsBlockchainNodesCreateCall {
  1082  	c.ctx_ = ctx
  1083  	return c
  1084  }
  1085  
  1086  // Header returns a http.Header that can be modified by the caller to add
  1087  // headers to the request.
  1088  func (c *ProjectsLocationsBlockchainNodesCreateCall) Header() http.Header {
  1089  	if c.header_ == nil {
  1090  		c.header_ = make(http.Header)
  1091  	}
  1092  	return c.header_
  1093  }
  1094  
  1095  func (c *ProjectsLocationsBlockchainNodesCreateCall) doRequest(alt string) (*http.Response, error) {
  1096  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  1097  	var body io.Reader = nil
  1098  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.blockchainnode)
  1099  	if err != nil {
  1100  		return nil, err
  1101  	}
  1102  	c.urlParams_.Set("alt", alt)
  1103  	c.urlParams_.Set("prettyPrint", "false")
  1104  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/blockchainNodes")
  1105  	urls += "?" + c.urlParams_.Encode()
  1106  	req, err := http.NewRequest("POST", urls, body)
  1107  	if err != nil {
  1108  		return nil, err
  1109  	}
  1110  	req.Header = reqHeaders
  1111  	googleapi.Expand(req.URL, map[string]string{
  1112  		"parent": c.parent,
  1113  	})
  1114  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1115  }
  1116  
  1117  // Do executes the "blockchainnodeengine.projects.locations.blockchainNodes.create" call.
  1118  // Any non-2xx status code is an error. Response headers are in either
  1119  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  1120  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1121  // whether the returned error was because http.StatusNotModified was returned.
  1122  func (c *ProjectsLocationsBlockchainNodesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  1123  	gensupport.SetOptions(c.urlParams_, opts...)
  1124  	res, err := c.doRequest("json")
  1125  	if res != nil && res.StatusCode == http.StatusNotModified {
  1126  		if res.Body != nil {
  1127  			res.Body.Close()
  1128  		}
  1129  		return nil, gensupport.WrapError(&googleapi.Error{
  1130  			Code:   res.StatusCode,
  1131  			Header: res.Header,
  1132  		})
  1133  	}
  1134  	if err != nil {
  1135  		return nil, err
  1136  	}
  1137  	defer googleapi.CloseBody(res)
  1138  	if err := googleapi.CheckResponse(res); err != nil {
  1139  		return nil, gensupport.WrapError(err)
  1140  	}
  1141  	ret := &Operation{
  1142  		ServerResponse: googleapi.ServerResponse{
  1143  			Header:         res.Header,
  1144  			HTTPStatusCode: res.StatusCode,
  1145  		},
  1146  	}
  1147  	target := &ret
  1148  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1149  		return nil, err
  1150  	}
  1151  	return ret, nil
  1152  }
  1153  
  1154  type ProjectsLocationsBlockchainNodesDeleteCall struct {
  1155  	s          *Service
  1156  	name       string
  1157  	urlParams_ gensupport.URLParams
  1158  	ctx_       context.Context
  1159  	header_    http.Header
  1160  }
  1161  
  1162  // Delete: Deletes a single blockchain node.
  1163  //
  1164  //   - name: The fully qualified name of the blockchain node to delete. e.g.
  1165  //     `projects/my-project/locations/us-central1/blockchainNodes/my-node`.
  1166  func (r *ProjectsLocationsBlockchainNodesService) Delete(name string) *ProjectsLocationsBlockchainNodesDeleteCall {
  1167  	c := &ProjectsLocationsBlockchainNodesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1168  	c.name = name
  1169  	return c
  1170  }
  1171  
  1172  // RequestId sets the optional parameter "requestId": An optional request ID to
  1173  // identify requests. Specify a unique request ID so that if you must retry
  1174  // your request, the server will know to ignore the request if it has already
  1175  // been completed. The server will guarantee that for at least 60 minutes after
  1176  // the first request. For example, consider a situation where you make an
  1177  // initial request and the request times out. If you make the request again
  1178  // with the same request ID, the server can check if original operation with
  1179  // the same request ID was received, and if so, will ignore the second request.
  1180  // This prevents clients from accidentally creating duplicate commitments. The
  1181  // request ID must be a valid UUID with the exception that zero UUID is not
  1182  // supported (00000000-0000-0000-0000-000000000000).
  1183  func (c *ProjectsLocationsBlockchainNodesDeleteCall) RequestId(requestId string) *ProjectsLocationsBlockchainNodesDeleteCall {
  1184  	c.urlParams_.Set("requestId", requestId)
  1185  	return c
  1186  }
  1187  
  1188  // Fields allows partial responses to be retrieved. See
  1189  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1190  // details.
  1191  func (c *ProjectsLocationsBlockchainNodesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsBlockchainNodesDeleteCall {
  1192  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1193  	return c
  1194  }
  1195  
  1196  // Context sets the context to be used in this call's Do method.
  1197  func (c *ProjectsLocationsBlockchainNodesDeleteCall) Context(ctx context.Context) *ProjectsLocationsBlockchainNodesDeleteCall {
  1198  	c.ctx_ = ctx
  1199  	return c
  1200  }
  1201  
  1202  // Header returns a http.Header that can be modified by the caller to add
  1203  // headers to the request.
  1204  func (c *ProjectsLocationsBlockchainNodesDeleteCall) Header() http.Header {
  1205  	if c.header_ == nil {
  1206  		c.header_ = make(http.Header)
  1207  	}
  1208  	return c.header_
  1209  }
  1210  
  1211  func (c *ProjectsLocationsBlockchainNodesDeleteCall) doRequest(alt string) (*http.Response, error) {
  1212  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1213  	var body io.Reader = nil
  1214  	c.urlParams_.Set("alt", alt)
  1215  	c.urlParams_.Set("prettyPrint", "false")
  1216  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  1217  	urls += "?" + c.urlParams_.Encode()
  1218  	req, err := http.NewRequest("DELETE", urls, body)
  1219  	if err != nil {
  1220  		return nil, err
  1221  	}
  1222  	req.Header = reqHeaders
  1223  	googleapi.Expand(req.URL, map[string]string{
  1224  		"name": c.name,
  1225  	})
  1226  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1227  }
  1228  
  1229  // Do executes the "blockchainnodeengine.projects.locations.blockchainNodes.delete" call.
  1230  // Any non-2xx status code is an error. Response headers are in either
  1231  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  1232  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1233  // whether the returned error was because http.StatusNotModified was returned.
  1234  func (c *ProjectsLocationsBlockchainNodesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  1235  	gensupport.SetOptions(c.urlParams_, opts...)
  1236  	res, err := c.doRequest("json")
  1237  	if res != nil && res.StatusCode == http.StatusNotModified {
  1238  		if res.Body != nil {
  1239  			res.Body.Close()
  1240  		}
  1241  		return nil, gensupport.WrapError(&googleapi.Error{
  1242  			Code:   res.StatusCode,
  1243  			Header: res.Header,
  1244  		})
  1245  	}
  1246  	if err != nil {
  1247  		return nil, err
  1248  	}
  1249  	defer googleapi.CloseBody(res)
  1250  	if err := googleapi.CheckResponse(res); err != nil {
  1251  		return nil, gensupport.WrapError(err)
  1252  	}
  1253  	ret := &Operation{
  1254  		ServerResponse: googleapi.ServerResponse{
  1255  			Header:         res.Header,
  1256  			HTTPStatusCode: res.StatusCode,
  1257  		},
  1258  	}
  1259  	target := &ret
  1260  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1261  		return nil, err
  1262  	}
  1263  	return ret, nil
  1264  }
  1265  
  1266  type ProjectsLocationsBlockchainNodesGetCall struct {
  1267  	s            *Service
  1268  	name         string
  1269  	urlParams_   gensupport.URLParams
  1270  	ifNoneMatch_ string
  1271  	ctx_         context.Context
  1272  	header_      http.Header
  1273  }
  1274  
  1275  // Get: Gets details of a single blockchain node.
  1276  //
  1277  //   - name: The fully qualified name of the blockchain node to fetch. e.g.
  1278  //     `projects/my-project/locations/us-central1/blockchainNodes/my-node`.
  1279  func (r *ProjectsLocationsBlockchainNodesService) Get(name string) *ProjectsLocationsBlockchainNodesGetCall {
  1280  	c := &ProjectsLocationsBlockchainNodesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1281  	c.name = name
  1282  	return c
  1283  }
  1284  
  1285  // Fields allows partial responses to be retrieved. See
  1286  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1287  // details.
  1288  func (c *ProjectsLocationsBlockchainNodesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsBlockchainNodesGetCall {
  1289  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1290  	return c
  1291  }
  1292  
  1293  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1294  // object's ETag matches the given value. This is useful for getting updates
  1295  // only after the object has changed since the last request.
  1296  func (c *ProjectsLocationsBlockchainNodesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsBlockchainNodesGetCall {
  1297  	c.ifNoneMatch_ = entityTag
  1298  	return c
  1299  }
  1300  
  1301  // Context sets the context to be used in this call's Do method.
  1302  func (c *ProjectsLocationsBlockchainNodesGetCall) Context(ctx context.Context) *ProjectsLocationsBlockchainNodesGetCall {
  1303  	c.ctx_ = ctx
  1304  	return c
  1305  }
  1306  
  1307  // Header returns a http.Header that can be modified by the caller to add
  1308  // headers to the request.
  1309  func (c *ProjectsLocationsBlockchainNodesGetCall) Header() http.Header {
  1310  	if c.header_ == nil {
  1311  		c.header_ = make(http.Header)
  1312  	}
  1313  	return c.header_
  1314  }
  1315  
  1316  func (c *ProjectsLocationsBlockchainNodesGetCall) doRequest(alt string) (*http.Response, error) {
  1317  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1318  	if c.ifNoneMatch_ != "" {
  1319  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1320  	}
  1321  	var body io.Reader = nil
  1322  	c.urlParams_.Set("alt", alt)
  1323  	c.urlParams_.Set("prettyPrint", "false")
  1324  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  1325  	urls += "?" + c.urlParams_.Encode()
  1326  	req, err := http.NewRequest("GET", urls, body)
  1327  	if err != nil {
  1328  		return nil, err
  1329  	}
  1330  	req.Header = reqHeaders
  1331  	googleapi.Expand(req.URL, map[string]string{
  1332  		"name": c.name,
  1333  	})
  1334  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1335  }
  1336  
  1337  // Do executes the "blockchainnodeengine.projects.locations.blockchainNodes.get" call.
  1338  // Any non-2xx status code is an error. Response headers are in either
  1339  // *BlockchainNode.ServerResponse.Header or (if a response was returned at all)
  1340  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1341  // whether the returned error was because http.StatusNotModified was returned.
  1342  func (c *ProjectsLocationsBlockchainNodesGetCall) Do(opts ...googleapi.CallOption) (*BlockchainNode, error) {
  1343  	gensupport.SetOptions(c.urlParams_, opts...)
  1344  	res, err := c.doRequest("json")
  1345  	if res != nil && res.StatusCode == http.StatusNotModified {
  1346  		if res.Body != nil {
  1347  			res.Body.Close()
  1348  		}
  1349  		return nil, gensupport.WrapError(&googleapi.Error{
  1350  			Code:   res.StatusCode,
  1351  			Header: res.Header,
  1352  		})
  1353  	}
  1354  	if err != nil {
  1355  		return nil, err
  1356  	}
  1357  	defer googleapi.CloseBody(res)
  1358  	if err := googleapi.CheckResponse(res); err != nil {
  1359  		return nil, gensupport.WrapError(err)
  1360  	}
  1361  	ret := &BlockchainNode{
  1362  		ServerResponse: googleapi.ServerResponse{
  1363  			Header:         res.Header,
  1364  			HTTPStatusCode: res.StatusCode,
  1365  		},
  1366  	}
  1367  	target := &ret
  1368  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1369  		return nil, err
  1370  	}
  1371  	return ret, nil
  1372  }
  1373  
  1374  type ProjectsLocationsBlockchainNodesListCall struct {
  1375  	s            *Service
  1376  	parent       string
  1377  	urlParams_   gensupport.URLParams
  1378  	ifNoneMatch_ string
  1379  	ctx_         context.Context
  1380  	header_      http.Header
  1381  }
  1382  
  1383  // List: Lists blockchain nodes in a given project and location.
  1384  //
  1385  // - parent: Parent value for `ListNodesRequest`.
  1386  func (r *ProjectsLocationsBlockchainNodesService) List(parent string) *ProjectsLocationsBlockchainNodesListCall {
  1387  	c := &ProjectsLocationsBlockchainNodesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1388  	c.parent = parent
  1389  	return c
  1390  }
  1391  
  1392  // Filter sets the optional parameter "filter": Filtering results.
  1393  func (c *ProjectsLocationsBlockchainNodesListCall) Filter(filter string) *ProjectsLocationsBlockchainNodesListCall {
  1394  	c.urlParams_.Set("filter", filter)
  1395  	return c
  1396  }
  1397  
  1398  // OrderBy sets the optional parameter "orderBy": Hint for how to order the
  1399  // results.
  1400  func (c *ProjectsLocationsBlockchainNodesListCall) OrderBy(orderBy string) *ProjectsLocationsBlockchainNodesListCall {
  1401  	c.urlParams_.Set("orderBy", orderBy)
  1402  	return c
  1403  }
  1404  
  1405  // PageSize sets the optional parameter "pageSize": Requested page size. Server
  1406  // may return fewer items than requested. If unspecified, server will pick an
  1407  // appropriate default.
  1408  func (c *ProjectsLocationsBlockchainNodesListCall) PageSize(pageSize int64) *ProjectsLocationsBlockchainNodesListCall {
  1409  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  1410  	return c
  1411  }
  1412  
  1413  // PageToken sets the optional parameter "pageToken": A token identifying a
  1414  // page of results the server should return.
  1415  func (c *ProjectsLocationsBlockchainNodesListCall) PageToken(pageToken string) *ProjectsLocationsBlockchainNodesListCall {
  1416  	c.urlParams_.Set("pageToken", pageToken)
  1417  	return c
  1418  }
  1419  
  1420  // Fields allows partial responses to be retrieved. See
  1421  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1422  // details.
  1423  func (c *ProjectsLocationsBlockchainNodesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBlockchainNodesListCall {
  1424  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1425  	return c
  1426  }
  1427  
  1428  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1429  // object's ETag matches the given value. This is useful for getting updates
  1430  // only after the object has changed since the last request.
  1431  func (c *ProjectsLocationsBlockchainNodesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBlockchainNodesListCall {
  1432  	c.ifNoneMatch_ = entityTag
  1433  	return c
  1434  }
  1435  
  1436  // Context sets the context to be used in this call's Do method.
  1437  func (c *ProjectsLocationsBlockchainNodesListCall) Context(ctx context.Context) *ProjectsLocationsBlockchainNodesListCall {
  1438  	c.ctx_ = ctx
  1439  	return c
  1440  }
  1441  
  1442  // Header returns a http.Header that can be modified by the caller to add
  1443  // headers to the request.
  1444  func (c *ProjectsLocationsBlockchainNodesListCall) Header() http.Header {
  1445  	if c.header_ == nil {
  1446  		c.header_ = make(http.Header)
  1447  	}
  1448  	return c.header_
  1449  }
  1450  
  1451  func (c *ProjectsLocationsBlockchainNodesListCall) doRequest(alt string) (*http.Response, error) {
  1452  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1453  	if c.ifNoneMatch_ != "" {
  1454  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1455  	}
  1456  	var body io.Reader = nil
  1457  	c.urlParams_.Set("alt", alt)
  1458  	c.urlParams_.Set("prettyPrint", "false")
  1459  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/blockchainNodes")
  1460  	urls += "?" + c.urlParams_.Encode()
  1461  	req, err := http.NewRequest("GET", urls, body)
  1462  	if err != nil {
  1463  		return nil, err
  1464  	}
  1465  	req.Header = reqHeaders
  1466  	googleapi.Expand(req.URL, map[string]string{
  1467  		"parent": c.parent,
  1468  	})
  1469  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1470  }
  1471  
  1472  // Do executes the "blockchainnodeengine.projects.locations.blockchainNodes.list" call.
  1473  // Any non-2xx status code is an error. Response headers are in either
  1474  // *ListBlockchainNodesResponse.ServerResponse.Header or (if a response was
  1475  // returned at all) in error.(*googleapi.Error).Header. Use
  1476  // googleapi.IsNotModified to check whether the returned error was because
  1477  // http.StatusNotModified was returned.
  1478  func (c *ProjectsLocationsBlockchainNodesListCall) Do(opts ...googleapi.CallOption) (*ListBlockchainNodesResponse, error) {
  1479  	gensupport.SetOptions(c.urlParams_, opts...)
  1480  	res, err := c.doRequest("json")
  1481  	if res != nil && res.StatusCode == http.StatusNotModified {
  1482  		if res.Body != nil {
  1483  			res.Body.Close()
  1484  		}
  1485  		return nil, gensupport.WrapError(&googleapi.Error{
  1486  			Code:   res.StatusCode,
  1487  			Header: res.Header,
  1488  		})
  1489  	}
  1490  	if err != nil {
  1491  		return nil, err
  1492  	}
  1493  	defer googleapi.CloseBody(res)
  1494  	if err := googleapi.CheckResponse(res); err != nil {
  1495  		return nil, gensupport.WrapError(err)
  1496  	}
  1497  	ret := &ListBlockchainNodesResponse{
  1498  		ServerResponse: googleapi.ServerResponse{
  1499  			Header:         res.Header,
  1500  			HTTPStatusCode: res.StatusCode,
  1501  		},
  1502  	}
  1503  	target := &ret
  1504  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1505  		return nil, err
  1506  	}
  1507  	return ret, nil
  1508  }
  1509  
  1510  // Pages invokes f for each page of results.
  1511  // A non-nil error returned from f will halt the iteration.
  1512  // The provided context supersedes any context provided to the Context method.
  1513  func (c *ProjectsLocationsBlockchainNodesListCall) Pages(ctx context.Context, f func(*ListBlockchainNodesResponse) error) error {
  1514  	c.ctx_ = ctx
  1515  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  1516  	for {
  1517  		x, err := c.Do()
  1518  		if err != nil {
  1519  			return err
  1520  		}
  1521  		if err := f(x); err != nil {
  1522  			return err
  1523  		}
  1524  		if x.NextPageToken == "" {
  1525  			return nil
  1526  		}
  1527  		c.PageToken(x.NextPageToken)
  1528  	}
  1529  }
  1530  
  1531  type ProjectsLocationsBlockchainNodesPatchCall struct {
  1532  	s              *Service
  1533  	name           string
  1534  	blockchainnode *BlockchainNode
  1535  	urlParams_     gensupport.URLParams
  1536  	ctx_           context.Context
  1537  	header_        http.Header
  1538  }
  1539  
  1540  // Patch: Updates the parameters of a single blockchain node.
  1541  //
  1542  //   - name: Output only. The fully qualified name of the blockchain node. e.g.
  1543  //     `projects/my-project/locations/us-central1/blockchainNodes/my-node`.
  1544  func (r *ProjectsLocationsBlockchainNodesService) Patch(name string, blockchainnode *BlockchainNode) *ProjectsLocationsBlockchainNodesPatchCall {
  1545  	c := &ProjectsLocationsBlockchainNodesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1546  	c.name = name
  1547  	c.blockchainnode = blockchainnode
  1548  	return c
  1549  }
  1550  
  1551  // RequestId sets the optional parameter "requestId": An optional request ID to
  1552  // identify requests. Specify a unique request ID so that if you must retry
  1553  // your request, the server will know to ignore the request if it has already
  1554  // been completed. The server will guarantee that for at least 60 minutes since
  1555  // the first request. For example, consider a situation where you make an
  1556  // initial request and the request times out. If you make the request again
  1557  // with the same request ID, the server can check if original operation with
  1558  // the same request ID was received, and if so, will ignore the second request.
  1559  // This prevents clients from accidentally creating duplicate commitments. The
  1560  // request ID must be a valid UUID with the exception that zero UUID is not
  1561  // supported (00000000-0000-0000-0000-000000000000).
  1562  func (c *ProjectsLocationsBlockchainNodesPatchCall) RequestId(requestId string) *ProjectsLocationsBlockchainNodesPatchCall {
  1563  	c.urlParams_.Set("requestId", requestId)
  1564  	return c
  1565  }
  1566  
  1567  // UpdateMask sets the optional parameter "updateMask": Required. Field mask is
  1568  // used to specify the fields to be overwritten in the Blockchain node resource
  1569  // by the update. The fields specified in the `update_mask` are relative to the
  1570  // resource, not the full request. A field will be overwritten if it is in the
  1571  // mask. If the user does not provide a mask then all fields will be
  1572  // overwritten.
  1573  func (c *ProjectsLocationsBlockchainNodesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsBlockchainNodesPatchCall {
  1574  	c.urlParams_.Set("updateMask", updateMask)
  1575  	return c
  1576  }
  1577  
  1578  // Fields allows partial responses to be retrieved. See
  1579  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1580  // details.
  1581  func (c *ProjectsLocationsBlockchainNodesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsBlockchainNodesPatchCall {
  1582  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1583  	return c
  1584  }
  1585  
  1586  // Context sets the context to be used in this call's Do method.
  1587  func (c *ProjectsLocationsBlockchainNodesPatchCall) Context(ctx context.Context) *ProjectsLocationsBlockchainNodesPatchCall {
  1588  	c.ctx_ = ctx
  1589  	return c
  1590  }
  1591  
  1592  // Header returns a http.Header that can be modified by the caller to add
  1593  // headers to the request.
  1594  func (c *ProjectsLocationsBlockchainNodesPatchCall) Header() http.Header {
  1595  	if c.header_ == nil {
  1596  		c.header_ = make(http.Header)
  1597  	}
  1598  	return c.header_
  1599  }
  1600  
  1601  func (c *ProjectsLocationsBlockchainNodesPatchCall) doRequest(alt string) (*http.Response, error) {
  1602  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  1603  	var body io.Reader = nil
  1604  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.blockchainnode)
  1605  	if err != nil {
  1606  		return nil, err
  1607  	}
  1608  	c.urlParams_.Set("alt", alt)
  1609  	c.urlParams_.Set("prettyPrint", "false")
  1610  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  1611  	urls += "?" + c.urlParams_.Encode()
  1612  	req, err := http.NewRequest("PATCH", urls, body)
  1613  	if err != nil {
  1614  		return nil, err
  1615  	}
  1616  	req.Header = reqHeaders
  1617  	googleapi.Expand(req.URL, map[string]string{
  1618  		"name": c.name,
  1619  	})
  1620  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1621  }
  1622  
  1623  // Do executes the "blockchainnodeengine.projects.locations.blockchainNodes.patch" call.
  1624  // Any non-2xx status code is an error. Response headers are in either
  1625  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  1626  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1627  // whether the returned error was because http.StatusNotModified was returned.
  1628  func (c *ProjectsLocationsBlockchainNodesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  1629  	gensupport.SetOptions(c.urlParams_, opts...)
  1630  	res, err := c.doRequest("json")
  1631  	if res != nil && res.StatusCode == http.StatusNotModified {
  1632  		if res.Body != nil {
  1633  			res.Body.Close()
  1634  		}
  1635  		return nil, gensupport.WrapError(&googleapi.Error{
  1636  			Code:   res.StatusCode,
  1637  			Header: res.Header,
  1638  		})
  1639  	}
  1640  	if err != nil {
  1641  		return nil, err
  1642  	}
  1643  	defer googleapi.CloseBody(res)
  1644  	if err := googleapi.CheckResponse(res); err != nil {
  1645  		return nil, gensupport.WrapError(err)
  1646  	}
  1647  	ret := &Operation{
  1648  		ServerResponse: googleapi.ServerResponse{
  1649  			Header:         res.Header,
  1650  			HTTPStatusCode: res.StatusCode,
  1651  		},
  1652  	}
  1653  	target := &ret
  1654  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1655  		return nil, err
  1656  	}
  1657  	return ret, nil
  1658  }
  1659  
  1660  type ProjectsLocationsOperationsCancelCall struct {
  1661  	s                      *Service
  1662  	name                   string
  1663  	canceloperationrequest *CancelOperationRequest
  1664  	urlParams_             gensupport.URLParams
  1665  	ctx_                   context.Context
  1666  	header_                http.Header
  1667  }
  1668  
  1669  // Cancel: Starts asynchronous cancellation on a long-running operation. The
  1670  // server makes a best effort to cancel the operation, but success is not
  1671  // guaranteed. If the server doesn't support this method, it returns
  1672  // `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or
  1673  // other methods to check whether the cancellation succeeded or whether the
  1674  // operation completed despite cancellation. On successful cancellation, the
  1675  // operation is not deleted; instead, it becomes an operation with an
  1676  // Operation.error value with a google.rpc.Status.code of 1, corresponding to
  1677  // `Code.CANCELLED`.
  1678  //
  1679  // - name: The name of the operation resource to be cancelled.
  1680  func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall {
  1681  	c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1682  	c.name = name
  1683  	c.canceloperationrequest = canceloperationrequest
  1684  	return c
  1685  }
  1686  
  1687  // Fields allows partial responses to be retrieved. See
  1688  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1689  // details.
  1690  func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
  1691  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1692  	return c
  1693  }
  1694  
  1695  // Context sets the context to be used in this call's Do method.
  1696  func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
  1697  	c.ctx_ = ctx
  1698  	return c
  1699  }
  1700  
  1701  // Header returns a http.Header that can be modified by the caller to add
  1702  // headers to the request.
  1703  func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
  1704  	if c.header_ == nil {
  1705  		c.header_ = make(http.Header)
  1706  	}
  1707  	return c.header_
  1708  }
  1709  
  1710  func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
  1711  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  1712  	var body io.Reader = nil
  1713  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
  1714  	if err != nil {
  1715  		return nil, err
  1716  	}
  1717  	c.urlParams_.Set("alt", alt)
  1718  	c.urlParams_.Set("prettyPrint", "false")
  1719  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
  1720  	urls += "?" + c.urlParams_.Encode()
  1721  	req, err := http.NewRequest("POST", urls, body)
  1722  	if err != nil {
  1723  		return nil, err
  1724  	}
  1725  	req.Header = reqHeaders
  1726  	googleapi.Expand(req.URL, map[string]string{
  1727  		"name": c.name,
  1728  	})
  1729  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1730  }
  1731  
  1732  // Do executes the "blockchainnodeengine.projects.locations.operations.cancel" call.
  1733  // Any non-2xx status code is an error. Response headers are in either
  1734  // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at
  1735  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  1736  // check whether the returned error was because http.StatusNotModified was
  1737  // returned.
  1738  func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
  1739  	gensupport.SetOptions(c.urlParams_, opts...)
  1740  	res, err := c.doRequest("json")
  1741  	if res != nil && res.StatusCode == http.StatusNotModified {
  1742  		if res.Body != nil {
  1743  			res.Body.Close()
  1744  		}
  1745  		return nil, gensupport.WrapError(&googleapi.Error{
  1746  			Code:   res.StatusCode,
  1747  			Header: res.Header,
  1748  		})
  1749  	}
  1750  	if err != nil {
  1751  		return nil, err
  1752  	}
  1753  	defer googleapi.CloseBody(res)
  1754  	if err := googleapi.CheckResponse(res); err != nil {
  1755  		return nil, gensupport.WrapError(err)
  1756  	}
  1757  	ret := &GoogleProtobufEmpty{
  1758  		ServerResponse: googleapi.ServerResponse{
  1759  			Header:         res.Header,
  1760  			HTTPStatusCode: res.StatusCode,
  1761  		},
  1762  	}
  1763  	target := &ret
  1764  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1765  		return nil, err
  1766  	}
  1767  	return ret, nil
  1768  }
  1769  
  1770  type ProjectsLocationsOperationsDeleteCall struct {
  1771  	s          *Service
  1772  	name       string
  1773  	urlParams_ gensupport.URLParams
  1774  	ctx_       context.Context
  1775  	header_    http.Header
  1776  }
  1777  
  1778  // Delete: Deletes a long-running operation. This method indicates that the
  1779  // client is no longer interested in the operation result. It does not cancel
  1780  // the operation. If the server doesn't support this method, it returns
  1781  // `google.rpc.Code.UNIMPLEMENTED`.
  1782  //
  1783  // - name: The name of the operation resource to be deleted.
  1784  func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall {
  1785  	c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1786  	c.name = name
  1787  	return c
  1788  }
  1789  
  1790  // Fields allows partial responses to be retrieved. See
  1791  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1792  // details.
  1793  func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall {
  1794  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1795  	return c
  1796  }
  1797  
  1798  // Context sets the context to be used in this call's Do method.
  1799  func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall {
  1800  	c.ctx_ = ctx
  1801  	return c
  1802  }
  1803  
  1804  // Header returns a http.Header that can be modified by the caller to add
  1805  // headers to the request.
  1806  func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header {
  1807  	if c.header_ == nil {
  1808  		c.header_ = make(http.Header)
  1809  	}
  1810  	return c.header_
  1811  }
  1812  
  1813  func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
  1814  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1815  	var body io.Reader = nil
  1816  	c.urlParams_.Set("alt", alt)
  1817  	c.urlParams_.Set("prettyPrint", "false")
  1818  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  1819  	urls += "?" + c.urlParams_.Encode()
  1820  	req, err := http.NewRequest("DELETE", urls, body)
  1821  	if err != nil {
  1822  		return nil, err
  1823  	}
  1824  	req.Header = reqHeaders
  1825  	googleapi.Expand(req.URL, map[string]string{
  1826  		"name": c.name,
  1827  	})
  1828  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1829  }
  1830  
  1831  // Do executes the "blockchainnodeengine.projects.locations.operations.delete" call.
  1832  // Any non-2xx status code is an error. Response headers are in either
  1833  // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at
  1834  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  1835  // check whether the returned error was because http.StatusNotModified was
  1836  // returned.
  1837  func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
  1838  	gensupport.SetOptions(c.urlParams_, opts...)
  1839  	res, err := c.doRequest("json")
  1840  	if res != nil && res.StatusCode == http.StatusNotModified {
  1841  		if res.Body != nil {
  1842  			res.Body.Close()
  1843  		}
  1844  		return nil, gensupport.WrapError(&googleapi.Error{
  1845  			Code:   res.StatusCode,
  1846  			Header: res.Header,
  1847  		})
  1848  	}
  1849  	if err != nil {
  1850  		return nil, err
  1851  	}
  1852  	defer googleapi.CloseBody(res)
  1853  	if err := googleapi.CheckResponse(res); err != nil {
  1854  		return nil, gensupport.WrapError(err)
  1855  	}
  1856  	ret := &GoogleProtobufEmpty{
  1857  		ServerResponse: googleapi.ServerResponse{
  1858  			Header:         res.Header,
  1859  			HTTPStatusCode: res.StatusCode,
  1860  		},
  1861  	}
  1862  	target := &ret
  1863  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1864  		return nil, err
  1865  	}
  1866  	return ret, nil
  1867  }
  1868  
  1869  type ProjectsLocationsOperationsGetCall struct {
  1870  	s            *Service
  1871  	name         string
  1872  	urlParams_   gensupport.URLParams
  1873  	ifNoneMatch_ string
  1874  	ctx_         context.Context
  1875  	header_      http.Header
  1876  }
  1877  
  1878  // Get: Gets the latest state of a long-running operation. Clients can use this
  1879  // method to poll the operation result at intervals as recommended by the API
  1880  // service.
  1881  //
  1882  // - name: The name of the operation resource.
  1883  func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
  1884  	c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1885  	c.name = name
  1886  	return c
  1887  }
  1888  
  1889  // Fields allows partial responses to be retrieved. See
  1890  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1891  // details.
  1892  func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
  1893  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1894  	return c
  1895  }
  1896  
  1897  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1898  // object's ETag matches the given value. This is useful for getting updates
  1899  // only after the object has changed since the last request.
  1900  func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
  1901  	c.ifNoneMatch_ = entityTag
  1902  	return c
  1903  }
  1904  
  1905  // Context sets the context to be used in this call's Do method.
  1906  func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
  1907  	c.ctx_ = ctx
  1908  	return c
  1909  }
  1910  
  1911  // Header returns a http.Header that can be modified by the caller to add
  1912  // headers to the request.
  1913  func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
  1914  	if c.header_ == nil {
  1915  		c.header_ = make(http.Header)
  1916  	}
  1917  	return c.header_
  1918  }
  1919  
  1920  func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  1921  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1922  	if c.ifNoneMatch_ != "" {
  1923  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1924  	}
  1925  	var body io.Reader = nil
  1926  	c.urlParams_.Set("alt", alt)
  1927  	c.urlParams_.Set("prettyPrint", "false")
  1928  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  1929  	urls += "?" + c.urlParams_.Encode()
  1930  	req, err := http.NewRequest("GET", urls, body)
  1931  	if err != nil {
  1932  		return nil, err
  1933  	}
  1934  	req.Header = reqHeaders
  1935  	googleapi.Expand(req.URL, map[string]string{
  1936  		"name": c.name,
  1937  	})
  1938  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1939  }
  1940  
  1941  // Do executes the "blockchainnodeengine.projects.locations.operations.get" call.
  1942  // Any non-2xx status code is an error. Response headers are in either
  1943  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  1944  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1945  // whether the returned error was because http.StatusNotModified was returned.
  1946  func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  1947  	gensupport.SetOptions(c.urlParams_, opts...)
  1948  	res, err := c.doRequest("json")
  1949  	if res != nil && res.StatusCode == http.StatusNotModified {
  1950  		if res.Body != nil {
  1951  			res.Body.Close()
  1952  		}
  1953  		return nil, gensupport.WrapError(&googleapi.Error{
  1954  			Code:   res.StatusCode,
  1955  			Header: res.Header,
  1956  		})
  1957  	}
  1958  	if err != nil {
  1959  		return nil, err
  1960  	}
  1961  	defer googleapi.CloseBody(res)
  1962  	if err := googleapi.CheckResponse(res); err != nil {
  1963  		return nil, gensupport.WrapError(err)
  1964  	}
  1965  	ret := &Operation{
  1966  		ServerResponse: googleapi.ServerResponse{
  1967  			Header:         res.Header,
  1968  			HTTPStatusCode: res.StatusCode,
  1969  		},
  1970  	}
  1971  	target := &ret
  1972  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1973  		return nil, err
  1974  	}
  1975  	return ret, nil
  1976  }
  1977  
  1978  type ProjectsLocationsOperationsListCall struct {
  1979  	s            *Service
  1980  	name         string
  1981  	urlParams_   gensupport.URLParams
  1982  	ifNoneMatch_ string
  1983  	ctx_         context.Context
  1984  	header_      http.Header
  1985  }
  1986  
  1987  // List: Lists operations that match the specified filter in the request. If
  1988  // the server doesn't support this method, it returns `UNIMPLEMENTED`.
  1989  //
  1990  // - name: The name of the operation's parent resource.
  1991  func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
  1992  	c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1993  	c.name = name
  1994  	return c
  1995  }
  1996  
  1997  // Filter sets the optional parameter "filter": The standard list filter.
  1998  func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
  1999  	c.urlParams_.Set("filter", filter)
  2000  	return c
  2001  }
  2002  
  2003  // PageSize sets the optional parameter "pageSize": The standard list page
  2004  // size.
  2005  func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
  2006  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2007  	return c
  2008  }
  2009  
  2010  // PageToken sets the optional parameter "pageToken": The standard list page
  2011  // token.
  2012  func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
  2013  	c.urlParams_.Set("pageToken", pageToken)
  2014  	return c
  2015  }
  2016  
  2017  // Fields allows partial responses to be retrieved. See
  2018  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2019  // details.
  2020  func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
  2021  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2022  	return c
  2023  }
  2024  
  2025  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2026  // object's ETag matches the given value. This is useful for getting updates
  2027  // only after the object has changed since the last request.
  2028  func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
  2029  	c.ifNoneMatch_ = entityTag
  2030  	return c
  2031  }
  2032  
  2033  // Context sets the context to be used in this call's Do method.
  2034  func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
  2035  	c.ctx_ = ctx
  2036  	return c
  2037  }
  2038  
  2039  // Header returns a http.Header that can be modified by the caller to add
  2040  // headers to the request.
  2041  func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
  2042  	if c.header_ == nil {
  2043  		c.header_ = make(http.Header)
  2044  	}
  2045  	return c.header_
  2046  }
  2047  
  2048  func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
  2049  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2050  	if c.ifNoneMatch_ != "" {
  2051  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2052  	}
  2053  	var body io.Reader = nil
  2054  	c.urlParams_.Set("alt", alt)
  2055  	c.urlParams_.Set("prettyPrint", "false")
  2056  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations")
  2057  	urls += "?" + c.urlParams_.Encode()
  2058  	req, err := http.NewRequest("GET", urls, body)
  2059  	if err != nil {
  2060  		return nil, err
  2061  	}
  2062  	req.Header = reqHeaders
  2063  	googleapi.Expand(req.URL, map[string]string{
  2064  		"name": c.name,
  2065  	})
  2066  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2067  }
  2068  
  2069  // Do executes the "blockchainnodeengine.projects.locations.operations.list" call.
  2070  // Any non-2xx status code is an error. Response headers are in either
  2071  // *ListOperationsResponse.ServerResponse.Header or (if a response was returned
  2072  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2073  // check whether the returned error was because http.StatusNotModified was
  2074  // returned.
  2075  func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
  2076  	gensupport.SetOptions(c.urlParams_, opts...)
  2077  	res, err := c.doRequest("json")
  2078  	if res != nil && res.StatusCode == http.StatusNotModified {
  2079  		if res.Body != nil {
  2080  			res.Body.Close()
  2081  		}
  2082  		return nil, gensupport.WrapError(&googleapi.Error{
  2083  			Code:   res.StatusCode,
  2084  			Header: res.Header,
  2085  		})
  2086  	}
  2087  	if err != nil {
  2088  		return nil, err
  2089  	}
  2090  	defer googleapi.CloseBody(res)
  2091  	if err := googleapi.CheckResponse(res); err != nil {
  2092  		return nil, gensupport.WrapError(err)
  2093  	}
  2094  	ret := &ListOperationsResponse{
  2095  		ServerResponse: googleapi.ServerResponse{
  2096  			Header:         res.Header,
  2097  			HTTPStatusCode: res.StatusCode,
  2098  		},
  2099  	}
  2100  	target := &ret
  2101  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2102  		return nil, err
  2103  	}
  2104  	return ret, nil
  2105  }
  2106  
  2107  // Pages invokes f for each page of results.
  2108  // A non-nil error returned from f will halt the iteration.
  2109  // The provided context supersedes any context provided to the Context method.
  2110  func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
  2111  	c.ctx_ = ctx
  2112  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  2113  	for {
  2114  		x, err := c.Do()
  2115  		if err != nil {
  2116  			return err
  2117  		}
  2118  		if err := f(x); err != nil {
  2119  			return err
  2120  		}
  2121  		if x.NextPageToken == "" {
  2122  			return nil
  2123  		}
  2124  		c.PageToken(x.NextPageToken)
  2125  	}
  2126  }
  2127  

View as plain text