...

Source file src/google.golang.org/api/tpu/v2/tpu-gen.go

Documentation: google.golang.org/api/tpu/v2

     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 tpu provides access to the Cloud TPU API.
     8  //
     9  // For product documentation, see: https://cloud.google.com/tpu/
    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/tpu/v2"
    27  //	...
    28  //	ctx := context.Background()
    29  //	tpuService, err := tpu.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  //	tpuService, err := tpu.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  //	tpuService, err := tpu.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    49  //
    50  // See [google.golang.org/api/option.ClientOption] for details on options.
    51  package tpu // import "google.golang.org/api/tpu/v2"
    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 = "tpu:v2"
    90  const apiName = "tpu"
    91  const apiVersion = "v2"
    92  const basePath = "https://tpu.googleapis.com/"
    93  const basePathTemplate = "https://tpu.UNIVERSE_DOMAIN/"
    94  const mtlsBasePath = "https://tpu.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.AcceleratorTypes = NewProjectsLocationsAcceleratorTypesService(s)
   172  	rs.Nodes = NewProjectsLocationsNodesService(s)
   173  	rs.Operations = NewProjectsLocationsOperationsService(s)
   174  	rs.QueuedResources = NewProjectsLocationsQueuedResourcesService(s)
   175  	rs.RuntimeVersions = NewProjectsLocationsRuntimeVersionsService(s)
   176  	return rs
   177  }
   178  
   179  type ProjectsLocationsService struct {
   180  	s *Service
   181  
   182  	AcceleratorTypes *ProjectsLocationsAcceleratorTypesService
   183  
   184  	Nodes *ProjectsLocationsNodesService
   185  
   186  	Operations *ProjectsLocationsOperationsService
   187  
   188  	QueuedResources *ProjectsLocationsQueuedResourcesService
   189  
   190  	RuntimeVersions *ProjectsLocationsRuntimeVersionsService
   191  }
   192  
   193  func NewProjectsLocationsAcceleratorTypesService(s *Service) *ProjectsLocationsAcceleratorTypesService {
   194  	rs := &ProjectsLocationsAcceleratorTypesService{s: s}
   195  	return rs
   196  }
   197  
   198  type ProjectsLocationsAcceleratorTypesService struct {
   199  	s *Service
   200  }
   201  
   202  func NewProjectsLocationsNodesService(s *Service) *ProjectsLocationsNodesService {
   203  	rs := &ProjectsLocationsNodesService{s: s}
   204  	return rs
   205  }
   206  
   207  type ProjectsLocationsNodesService struct {
   208  	s *Service
   209  }
   210  
   211  func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
   212  	rs := &ProjectsLocationsOperationsService{s: s}
   213  	return rs
   214  }
   215  
   216  type ProjectsLocationsOperationsService struct {
   217  	s *Service
   218  }
   219  
   220  func NewProjectsLocationsQueuedResourcesService(s *Service) *ProjectsLocationsQueuedResourcesService {
   221  	rs := &ProjectsLocationsQueuedResourcesService{s: s}
   222  	return rs
   223  }
   224  
   225  type ProjectsLocationsQueuedResourcesService struct {
   226  	s *Service
   227  }
   228  
   229  func NewProjectsLocationsRuntimeVersionsService(s *Service) *ProjectsLocationsRuntimeVersionsService {
   230  	rs := &ProjectsLocationsRuntimeVersionsService{s: s}
   231  	return rs
   232  }
   233  
   234  type ProjectsLocationsRuntimeVersionsService struct {
   235  	s *Service
   236  }
   237  
   238  // AcceleratorConfig: A TPU accelerator configuration.
   239  type AcceleratorConfig struct {
   240  	// Topology: Required. Topology of TPU in chips.
   241  	Topology string `json:"topology,omitempty"`
   242  	// Type: Required. Type of TPU.
   243  	//
   244  	// Possible values:
   245  	//   "TYPE_UNSPECIFIED" - Unspecified version.
   246  	//   "V2" - TPU v2.
   247  	//   "V3" - TPU v3.
   248  	//   "V4" - TPU v4.
   249  	//   "V5P" - TPU v5p
   250  	Type string `json:"type,omitempty"`
   251  	// ForceSendFields is a list of field names (e.g. "Topology") to
   252  	// unconditionally include in API requests. By default, fields with empty or
   253  	// default values are omitted from API requests. See
   254  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   255  	// details.
   256  	ForceSendFields []string `json:"-"`
   257  	// NullFields is a list of field names (e.g. "Topology") to include in API
   258  	// requests with the JSON null value. By default, fields with empty values are
   259  	// omitted from API requests. See
   260  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   261  	NullFields []string `json:"-"`
   262  }
   263  
   264  func (s *AcceleratorConfig) MarshalJSON() ([]byte, error) {
   265  	type NoMethod AcceleratorConfig
   266  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   267  }
   268  
   269  // AcceleratorType: A accelerator type that a Node can be configured with.
   270  type AcceleratorType struct {
   271  	// AcceleratorConfigs: The accelerator config.
   272  	AcceleratorConfigs []*AcceleratorConfig `json:"acceleratorConfigs,omitempty"`
   273  	// Name: The resource name.
   274  	Name string `json:"name,omitempty"`
   275  	// Type: The accelerator type.
   276  	Type string `json:"type,omitempty"`
   277  
   278  	// ServerResponse contains the HTTP response code and headers from the server.
   279  	googleapi.ServerResponse `json:"-"`
   280  	// ForceSendFields is a list of field names (e.g. "AcceleratorConfigs") to
   281  	// unconditionally include in API requests. By default, fields with empty or
   282  	// default values are omitted from API requests. See
   283  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   284  	// details.
   285  	ForceSendFields []string `json:"-"`
   286  	// NullFields is a list of field names (e.g. "AcceleratorConfigs") to include
   287  	// in API requests with the JSON null value. By default, fields with empty
   288  	// values are omitted from API requests. See
   289  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   290  	NullFields []string `json:"-"`
   291  }
   292  
   293  func (s *AcceleratorType) MarshalJSON() ([]byte, error) {
   294  	type NoMethod AcceleratorType
   295  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   296  }
   297  
   298  // AcceptedData: Further data for the accepted state.
   299  type AcceptedData struct {
   300  }
   301  
   302  // AccessConfig: An access config attached to the TPU worker.
   303  type AccessConfig struct {
   304  	// ExternalIp: Output only. An external IP address associated with the TPU
   305  	// worker.
   306  	ExternalIp string `json:"externalIp,omitempty"`
   307  	// ForceSendFields is a list of field names (e.g. "ExternalIp") to
   308  	// unconditionally include in API requests. By default, fields with empty or
   309  	// default values are omitted from API requests. See
   310  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   311  	// details.
   312  	ForceSendFields []string `json:"-"`
   313  	// NullFields is a list of field names (e.g. "ExternalIp") to include in API
   314  	// requests with the JSON null value. By default, fields with empty values are
   315  	// omitted from API requests. See
   316  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   317  	NullFields []string `json:"-"`
   318  }
   319  
   320  func (s *AccessConfig) MarshalJSON() ([]byte, error) {
   321  	type NoMethod AccessConfig
   322  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   323  }
   324  
   325  // ActiveData: Further data for the active state.
   326  type ActiveData struct {
   327  }
   328  
   329  // AttachedDisk: A node-attached disk resource. Next ID: 8;
   330  type AttachedDisk struct {
   331  	// Mode: The mode in which to attach this disk. If not specified, the default
   332  	// is READ_WRITE mode. Only applicable to data_disks.
   333  	//
   334  	// Possible values:
   335  	//   "DISK_MODE_UNSPECIFIED" - The disk mode is not known/set.
   336  	//   "READ_WRITE" - Attaches the disk in read-write mode. Only one TPU node can
   337  	// attach a disk in read-write mode at a time.
   338  	//   "READ_ONLY" - Attaches the disk in read-only mode. Multiple TPU nodes can
   339  	// attach a disk in read-only mode at a time.
   340  	Mode string `json:"mode,omitempty"`
   341  	// SourceDisk: Specifies the full path to an existing disk. For example:
   342  	// "projects/my-project/zones/us-central1-c/disks/my-disk".
   343  	SourceDisk string `json:"sourceDisk,omitempty"`
   344  	// ForceSendFields is a list of field names (e.g. "Mode") to unconditionally
   345  	// include in API requests. By default, fields with empty or default values are
   346  	// omitted from API requests. See
   347  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   348  	// details.
   349  	ForceSendFields []string `json:"-"`
   350  	// NullFields is a list of field names (e.g. "Mode") to include in API requests
   351  	// with the JSON null value. By default, fields with empty values are omitted
   352  	// from API requests. See
   353  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   354  	NullFields []string `json:"-"`
   355  }
   356  
   357  func (s *AttachedDisk) MarshalJSON() ([]byte, error) {
   358  	type NoMethod AttachedDisk
   359  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   360  }
   361  
   362  // CreatingData: Further data for the creating state.
   363  type CreatingData struct {
   364  }
   365  
   366  // DeletingData: Further data for the deleting state.
   367  type DeletingData struct {
   368  }
   369  
   370  // Empty: A generic empty message that you can re-use to avoid defining
   371  // duplicated empty messages in your APIs. A typical example is to use it as
   372  // the request or the response type of an API method. For instance: service Foo
   373  // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
   374  type Empty struct {
   375  	// ServerResponse contains the HTTP response code and headers from the server.
   376  	googleapi.ServerResponse `json:"-"`
   377  }
   378  
   379  // FailedData: Further data for the failed state.
   380  type FailedData struct {
   381  	// Error: Output only. The error that caused the queued resource to enter the
   382  	// FAILED state.
   383  	Error *Status `json:"error,omitempty"`
   384  	// ForceSendFields is a list of field names (e.g. "Error") to unconditionally
   385  	// include in API requests. By default, fields with empty or default values are
   386  	// omitted from API requests. See
   387  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   388  	// details.
   389  	ForceSendFields []string `json:"-"`
   390  	// NullFields is a list of field names (e.g. "Error") to include in API
   391  	// requests with the JSON null value. By default, fields with empty values are
   392  	// omitted from API requests. See
   393  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   394  	NullFields []string `json:"-"`
   395  }
   396  
   397  func (s *FailedData) MarshalJSON() ([]byte, error) {
   398  	type NoMethod FailedData
   399  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   400  }
   401  
   402  // GenerateServiceIdentityRequest: Request for GenerateServiceIdentity.
   403  type GenerateServiceIdentityRequest struct {
   404  }
   405  
   406  // GenerateServiceIdentityResponse: Response for GenerateServiceIdentity.
   407  type GenerateServiceIdentityResponse struct {
   408  	// Identity: ServiceIdentity that was created or retrieved.
   409  	Identity *ServiceIdentity `json:"identity,omitempty"`
   410  
   411  	// ServerResponse contains the HTTP response code and headers from the server.
   412  	googleapi.ServerResponse `json:"-"`
   413  	// ForceSendFields is a list of field names (e.g. "Identity") to
   414  	// unconditionally include in API requests. By default, fields with empty or
   415  	// default values are omitted from API requests. See
   416  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   417  	// details.
   418  	ForceSendFields []string `json:"-"`
   419  	// NullFields is a list of field names (e.g. "Identity") to include in API
   420  	// requests with the JSON null value. By default, fields with empty values are
   421  	// omitted from API requests. See
   422  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   423  	NullFields []string `json:"-"`
   424  }
   425  
   426  func (s *GenerateServiceIdentityResponse) MarshalJSON() ([]byte, error) {
   427  	type NoMethod GenerateServiceIdentityResponse
   428  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   429  }
   430  
   431  // GetGuestAttributesRequest: Request for GetGuestAttributes.
   432  type GetGuestAttributesRequest struct {
   433  	// QueryPath: The guest attributes path to be queried.
   434  	QueryPath string `json:"queryPath,omitempty"`
   435  	// WorkerIds: The 0-based worker ID. If it is empty, all workers'
   436  	// GuestAttributes will be returned.
   437  	WorkerIds []string `json:"workerIds,omitempty"`
   438  	// ForceSendFields is a list of field names (e.g. "QueryPath") to
   439  	// unconditionally include in API requests. By default, fields with empty or
   440  	// default values are omitted from API requests. See
   441  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   442  	// details.
   443  	ForceSendFields []string `json:"-"`
   444  	// NullFields is a list of field names (e.g. "QueryPath") to include in API
   445  	// requests with the JSON null value. By default, fields with empty values are
   446  	// omitted from API requests. See
   447  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   448  	NullFields []string `json:"-"`
   449  }
   450  
   451  func (s *GetGuestAttributesRequest) MarshalJSON() ([]byte, error) {
   452  	type NoMethod GetGuestAttributesRequest
   453  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   454  }
   455  
   456  // GetGuestAttributesResponse: Response for GetGuestAttributes.
   457  type GetGuestAttributesResponse struct {
   458  	// GuestAttributes: The guest attributes for the TPU workers.
   459  	GuestAttributes []*GuestAttributes `json:"guestAttributes,omitempty"`
   460  
   461  	// ServerResponse contains the HTTP response code and headers from the server.
   462  	googleapi.ServerResponse `json:"-"`
   463  	// ForceSendFields is a list of field names (e.g. "GuestAttributes") 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. "GuestAttributes") to include in
   470  	// API requests with the JSON null value. By default, fields with empty values
   471  	// 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 *GetGuestAttributesResponse) MarshalJSON() ([]byte, error) {
   477  	type NoMethod GetGuestAttributesResponse
   478  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   479  }
   480  
   481  // Guaranteed: Guaranteed tier definition.
   482  type Guaranteed struct {
   483  	// MinDuration: Optional. Defines the minimum duration of the guarantee. If
   484  	// specified, the requested resources will only be provisioned if they can be
   485  	// allocated for at least the given duration.
   486  	MinDuration string `json:"minDuration,omitempty"`
   487  	// ForceSendFields is a list of field names (e.g. "MinDuration") to
   488  	// unconditionally include in API requests. By default, fields with empty or
   489  	// default values are omitted from API requests. See
   490  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   491  	// details.
   492  	ForceSendFields []string `json:"-"`
   493  	// NullFields is a list of field names (e.g. "MinDuration") to include in API
   494  	// requests with the JSON null value. By default, fields with empty values are
   495  	// omitted from API requests. See
   496  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   497  	NullFields []string `json:"-"`
   498  }
   499  
   500  func (s *Guaranteed) MarshalJSON() ([]byte, error) {
   501  	type NoMethod Guaranteed
   502  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   503  }
   504  
   505  // GuestAttributes: A guest attributes.
   506  type GuestAttributes struct {
   507  	// QueryPath: The path to be queried. This can be the default namespace ('/')
   508  	// or a nested namespace ('/\/') or a specified key ('/\/\')
   509  	QueryPath string `json:"queryPath,omitempty"`
   510  	// QueryValue: The value of the requested queried path.
   511  	QueryValue *GuestAttributesValue `json:"queryValue,omitempty"`
   512  	// ForceSendFields is a list of field names (e.g. "QueryPath") to
   513  	// unconditionally include in API requests. By default, fields with empty or
   514  	// default values are omitted from API requests. See
   515  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   516  	// details.
   517  	ForceSendFields []string `json:"-"`
   518  	// NullFields is a list of field names (e.g. "QueryPath") to include in API
   519  	// requests with the JSON null value. By default, fields with empty values are
   520  	// omitted from API requests. See
   521  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   522  	NullFields []string `json:"-"`
   523  }
   524  
   525  func (s *GuestAttributes) MarshalJSON() ([]byte, error) {
   526  	type NoMethod GuestAttributes
   527  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   528  }
   529  
   530  // GuestAttributesEntry: A guest attributes namespace/key/value entry.
   531  type GuestAttributesEntry struct {
   532  	// Key: Key for the guest attribute entry.
   533  	Key string `json:"key,omitempty"`
   534  	// Namespace: Namespace for the guest attribute entry.
   535  	Namespace string `json:"namespace,omitempty"`
   536  	// Value: Value for the guest attribute entry.
   537  	Value string `json:"value,omitempty"`
   538  	// ForceSendFields is a list of field names (e.g. "Key") to unconditionally
   539  	// include in API requests. By default, fields with empty or default values are
   540  	// omitted from API requests. See
   541  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   542  	// details.
   543  	ForceSendFields []string `json:"-"`
   544  	// NullFields is a list of field names (e.g. "Key") to include in API requests
   545  	// with the JSON null value. By default, fields with empty values are omitted
   546  	// from API requests. See
   547  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   548  	NullFields []string `json:"-"`
   549  }
   550  
   551  func (s *GuestAttributesEntry) MarshalJSON() ([]byte, error) {
   552  	type NoMethod GuestAttributesEntry
   553  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   554  }
   555  
   556  // GuestAttributesValue: Array of guest attribute namespace/key/value tuples.
   557  type GuestAttributesValue struct {
   558  	// Items: The list of guest attributes entries.
   559  	Items []*GuestAttributesEntry `json:"items,omitempty"`
   560  	// ForceSendFields is a list of field names (e.g. "Items") to unconditionally
   561  	// include in API requests. By default, fields with empty or default values are
   562  	// 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. "Items") 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 *GuestAttributesValue) MarshalJSON() ([]byte, error) {
   574  	type NoMethod GuestAttributesValue
   575  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   576  }
   577  
   578  // Interval: Represents a time interval, encoded as a Timestamp start
   579  // (inclusive) and a Timestamp end (exclusive). The start must be less than or
   580  // equal to the end. When the start equals the end, the interval is empty
   581  // (matches no time). When both start and end are unspecified, the interval
   582  // matches any time.
   583  type Interval struct {
   584  	// EndTime: Optional. Exclusive end of the interval. If specified, a Timestamp
   585  	// matching this interval will have to be before the end.
   586  	EndTime string `json:"endTime,omitempty"`
   587  	// StartTime: Optional. Inclusive start of the interval. If specified, a
   588  	// Timestamp matching this interval will have to be the same or after the
   589  	// start.
   590  	StartTime string `json:"startTime,omitempty"`
   591  	// ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally
   592  	// include in API requests. By default, fields with empty or default values are
   593  	// omitted from API requests. See
   594  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   595  	// details.
   596  	ForceSendFields []string `json:"-"`
   597  	// NullFields is a list of field names (e.g. "EndTime") to include in API
   598  	// requests with the JSON null value. By default, fields with empty values are
   599  	// omitted from API requests. See
   600  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   601  	NullFields []string `json:"-"`
   602  }
   603  
   604  func (s *Interval) MarshalJSON() ([]byte, error) {
   605  	type NoMethod Interval
   606  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   607  }
   608  
   609  // ListAcceleratorTypesResponse: Response for ListAcceleratorTypes.
   610  type ListAcceleratorTypesResponse struct {
   611  	// AcceleratorTypes: The listed nodes.
   612  	AcceleratorTypes []*AcceleratorType `json:"acceleratorTypes,omitempty"`
   613  	// NextPageToken: The next page token or empty if none.
   614  	NextPageToken string `json:"nextPageToken,omitempty"`
   615  	// Unreachable: Locations that could not be reached.
   616  	Unreachable []string `json:"unreachable,omitempty"`
   617  
   618  	// ServerResponse contains the HTTP response code and headers from the server.
   619  	googleapi.ServerResponse `json:"-"`
   620  	// ForceSendFields is a list of field names (e.g. "AcceleratorTypes") to
   621  	// unconditionally include in API requests. By default, fields with empty or
   622  	// default values are omitted from API requests. See
   623  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   624  	// details.
   625  	ForceSendFields []string `json:"-"`
   626  	// NullFields is a list of field names (e.g. "AcceleratorTypes") to include in
   627  	// API requests with the JSON null value. By default, fields with empty values
   628  	// are omitted from API requests. See
   629  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   630  	NullFields []string `json:"-"`
   631  }
   632  
   633  func (s *ListAcceleratorTypesResponse) MarshalJSON() ([]byte, error) {
   634  	type NoMethod ListAcceleratorTypesResponse
   635  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   636  }
   637  
   638  // ListLocationsResponse: The response message for Locations.ListLocations.
   639  type ListLocationsResponse struct {
   640  	// Locations: A list of locations that matches the specified filter in the
   641  	// request.
   642  	Locations []*Location `json:"locations,omitempty"`
   643  	// NextPageToken: The standard List next-page token.
   644  	NextPageToken string `json:"nextPageToken,omitempty"`
   645  
   646  	// ServerResponse contains the HTTP response code and headers from the server.
   647  	googleapi.ServerResponse `json:"-"`
   648  	// ForceSendFields is a list of field names (e.g. "Locations") to
   649  	// unconditionally include in API requests. By default, fields with empty or
   650  	// default values are omitted from API requests. See
   651  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   652  	// details.
   653  	ForceSendFields []string `json:"-"`
   654  	// NullFields is a list of field names (e.g. "Locations") to include in API
   655  	// requests with the JSON null value. By default, fields with empty values are
   656  	// omitted from API requests. See
   657  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   658  	NullFields []string `json:"-"`
   659  }
   660  
   661  func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
   662  	type NoMethod ListLocationsResponse
   663  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   664  }
   665  
   666  // ListNodesResponse: Response for ListNodes.
   667  type ListNodesResponse struct {
   668  	// NextPageToken: The next page token or empty if none.
   669  	NextPageToken string `json:"nextPageToken,omitempty"`
   670  	// Nodes: The listed nodes.
   671  	Nodes []*Node `json:"nodes,omitempty"`
   672  	// Unreachable: Locations that could not be reached.
   673  	Unreachable []string `json:"unreachable,omitempty"`
   674  
   675  	// ServerResponse contains the HTTP response code and headers from the server.
   676  	googleapi.ServerResponse `json:"-"`
   677  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
   678  	// unconditionally include in API requests. By default, fields with empty or
   679  	// default values are omitted from API requests. See
   680  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   681  	// details.
   682  	ForceSendFields []string `json:"-"`
   683  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
   684  	// requests with the JSON null value. By default, fields with empty values are
   685  	// omitted from API requests. See
   686  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   687  	NullFields []string `json:"-"`
   688  }
   689  
   690  func (s *ListNodesResponse) MarshalJSON() ([]byte, error) {
   691  	type NoMethod ListNodesResponse
   692  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   693  }
   694  
   695  // ListOperationsResponse: The response message for Operations.ListOperations.
   696  type ListOperationsResponse struct {
   697  	// NextPageToken: The standard List next-page token.
   698  	NextPageToken string `json:"nextPageToken,omitempty"`
   699  	// Operations: A list of operations that matches the specified filter in the
   700  	// request.
   701  	Operations []*Operation `json:"operations,omitempty"`
   702  
   703  	// ServerResponse contains the HTTP response code and headers from the server.
   704  	googleapi.ServerResponse `json:"-"`
   705  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
   706  	// unconditionally include in API requests. By default, fields with empty or
   707  	// default values are omitted from API requests. See
   708  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   709  	// details.
   710  	ForceSendFields []string `json:"-"`
   711  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
   712  	// requests with the JSON null value. By default, fields with empty values are
   713  	// omitted from API requests. See
   714  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   715  	NullFields []string `json:"-"`
   716  }
   717  
   718  func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
   719  	type NoMethod ListOperationsResponse
   720  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   721  }
   722  
   723  // ListQueuedResourcesResponse: Response for ListQueuedResources.
   724  type ListQueuedResourcesResponse struct {
   725  	// NextPageToken: The next page token or empty if none.
   726  	NextPageToken string `json:"nextPageToken,omitempty"`
   727  	// QueuedResources: The listed queued resources.
   728  	QueuedResources []*QueuedResource `json:"queuedResources,omitempty"`
   729  	// Unreachable: Locations that could not be reached.
   730  	Unreachable []string `json:"unreachable,omitempty"`
   731  
   732  	// ServerResponse contains the HTTP response code and headers from the server.
   733  	googleapi.ServerResponse `json:"-"`
   734  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
   735  	// unconditionally include in API requests. By default, fields with empty or
   736  	// default values are omitted from API requests. See
   737  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   738  	// details.
   739  	ForceSendFields []string `json:"-"`
   740  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
   741  	// requests with the JSON null value. By default, fields with empty values are
   742  	// omitted from API requests. See
   743  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   744  	NullFields []string `json:"-"`
   745  }
   746  
   747  func (s *ListQueuedResourcesResponse) MarshalJSON() ([]byte, error) {
   748  	type NoMethod ListQueuedResourcesResponse
   749  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   750  }
   751  
   752  // ListRuntimeVersionsResponse: Response for ListRuntimeVersions.
   753  type ListRuntimeVersionsResponse struct {
   754  	// NextPageToken: The next page token or empty if none.
   755  	NextPageToken string `json:"nextPageToken,omitempty"`
   756  	// RuntimeVersions: The listed nodes.
   757  	RuntimeVersions []*RuntimeVersion `json:"runtimeVersions,omitempty"`
   758  	// Unreachable: Locations that could not be reached.
   759  	Unreachable []string `json:"unreachable,omitempty"`
   760  
   761  	// ServerResponse contains the HTTP response code and headers from the server.
   762  	googleapi.ServerResponse `json:"-"`
   763  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
   764  	// unconditionally include in API requests. By default, fields with empty or
   765  	// default values are omitted from API requests. See
   766  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   767  	// details.
   768  	ForceSendFields []string `json:"-"`
   769  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
   770  	// requests with the JSON null value. By default, fields with empty values are
   771  	// omitted from API requests. See
   772  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   773  	NullFields []string `json:"-"`
   774  }
   775  
   776  func (s *ListRuntimeVersionsResponse) MarshalJSON() ([]byte, error) {
   777  	type NoMethod ListRuntimeVersionsResponse
   778  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   779  }
   780  
   781  // Location: A resource that represents a Google Cloud location.
   782  type Location struct {
   783  	// DisplayName: The friendly name for this location, typically a nearby city
   784  	// name. For example, "Tokyo".
   785  	DisplayName string `json:"displayName,omitempty"`
   786  	// Labels: Cross-service attributes for the location. For example
   787  	// {"cloud.googleapis.com/region": "us-east1"}
   788  	Labels map[string]string `json:"labels,omitempty"`
   789  	// LocationId: The canonical id for this location. For example: "us-east1".
   790  	LocationId string `json:"locationId,omitempty"`
   791  	// Metadata: Service-specific metadata. For example the available capacity at
   792  	// the given location.
   793  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
   794  	// Name: Resource name for the location, which may vary between
   795  	// implementations. For example:
   796  	// "projects/example-project/locations/us-east1"
   797  	Name string `json:"name,omitempty"`
   798  
   799  	// ServerResponse contains the HTTP response code and headers from the server.
   800  	googleapi.ServerResponse `json:"-"`
   801  	// ForceSendFields is a list of field names (e.g. "DisplayName") to
   802  	// unconditionally include in API requests. By default, fields with empty or
   803  	// default values are omitted from API requests. See
   804  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   805  	// details.
   806  	ForceSendFields []string `json:"-"`
   807  	// NullFields is a list of field names (e.g. "DisplayName") to include in API
   808  	// requests with the JSON null value. By default, fields with empty values are
   809  	// omitted from API requests. See
   810  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   811  	NullFields []string `json:"-"`
   812  }
   813  
   814  func (s *Location) MarshalJSON() ([]byte, error) {
   815  	type NoMethod Location
   816  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   817  }
   818  
   819  // MultisliceParams: Parameters to specify for multislice QueuedResource
   820  // requests. This message must be populated in case of multislice requests
   821  // instead of node_id.
   822  type MultisliceParams struct {
   823  	// NodeCount: Required. Number of nodes with this spec. The system will attempt
   824  	// to provison "node_count" nodes as part of the request. This needs to be > 1.
   825  	NodeCount int64 `json:"nodeCount,omitempty"`
   826  	// NodeIdPrefix: Optional. Prefix of node_ids in case of multislice request.
   827  	// Should follow the `^[A-Za-z0-9_.~+%-]+$` regex format. If node_count = 3 and
   828  	// node_id_prefix = "np", node ids of nodes created will be "np-0", "np-1",
   829  	// "np-2". If this field is not provided we use queued_resource_id as the
   830  	// node_id_prefix.
   831  	NodeIdPrefix string `json:"nodeIdPrefix,omitempty"`
   832  	// ForceSendFields is a list of field names (e.g. "NodeCount") to
   833  	// unconditionally include in API requests. By default, fields with empty or
   834  	// default values are omitted from API requests. See
   835  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   836  	// details.
   837  	ForceSendFields []string `json:"-"`
   838  	// NullFields is a list of field names (e.g. "NodeCount") to include in API
   839  	// requests with the JSON null value. By default, fields with empty values are
   840  	// omitted from API requests. See
   841  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   842  	NullFields []string `json:"-"`
   843  }
   844  
   845  func (s *MultisliceParams) MarshalJSON() ([]byte, error) {
   846  	type NoMethod MultisliceParams
   847  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   848  }
   849  
   850  // NetworkConfig: Network related configurations.
   851  type NetworkConfig struct {
   852  	// CanIpForward: Allows the TPU node to send and receive packets with
   853  	// non-matching destination or source IPs. This is required if you plan to use
   854  	// the TPU workers to forward routes.
   855  	CanIpForward bool `json:"canIpForward,omitempty"`
   856  	// EnableExternalIps: Indicates that external IP addresses would be associated
   857  	// with the TPU workers. If set to false, the specified subnetwork or network
   858  	// should have Private Google Access enabled.
   859  	EnableExternalIps bool `json:"enableExternalIps,omitempty"`
   860  	// Network: The name of the network for the TPU node. It must be a preexisting
   861  	// Google Compute Engine network. If none is provided, "default" will be used.
   862  	Network string `json:"network,omitempty"`
   863  	// QueueCount: Optional. Specifies networking queue count for TPU VM instance's
   864  	// network interface.
   865  	QueueCount int64 `json:"queueCount,omitempty"`
   866  	// Subnetwork: The name of the subnetwork for the TPU node. It must be a
   867  	// preexisting Google Compute Engine subnetwork. If none is provided, "default"
   868  	// will be used.
   869  	Subnetwork string `json:"subnetwork,omitempty"`
   870  	// ForceSendFields is a list of field names (e.g. "CanIpForward") to
   871  	// unconditionally include in API requests. By default, fields with empty or
   872  	// default values are omitted from API requests. See
   873  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   874  	// details.
   875  	ForceSendFields []string `json:"-"`
   876  	// NullFields is a list of field names (e.g. "CanIpForward") to include in API
   877  	// requests with the JSON null value. By default, fields with empty values are
   878  	// omitted from API requests. See
   879  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   880  	NullFields []string `json:"-"`
   881  }
   882  
   883  func (s *NetworkConfig) MarshalJSON() ([]byte, error) {
   884  	type NoMethod NetworkConfig
   885  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   886  }
   887  
   888  // NetworkEndpoint: A network endpoint over which a TPU worker can be reached.
   889  type NetworkEndpoint struct {
   890  	// AccessConfig: The access config for the TPU worker.
   891  	AccessConfig *AccessConfig `json:"accessConfig,omitempty"`
   892  	// IpAddress: The internal IP address of this network endpoint.
   893  	IpAddress string `json:"ipAddress,omitempty"`
   894  	// Port: The port of this network endpoint.
   895  	Port int64 `json:"port,omitempty"`
   896  	// ForceSendFields is a list of field names (e.g. "AccessConfig") to
   897  	// unconditionally include in API requests. By default, fields with empty or
   898  	// default values are omitted from API requests. See
   899  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   900  	// details.
   901  	ForceSendFields []string `json:"-"`
   902  	// NullFields is a list of field names (e.g. "AccessConfig") to include in API
   903  	// requests with the JSON null value. By default, fields with empty values are
   904  	// omitted from API requests. See
   905  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   906  	NullFields []string `json:"-"`
   907  }
   908  
   909  func (s *NetworkEndpoint) MarshalJSON() ([]byte, error) {
   910  	type NoMethod NetworkEndpoint
   911  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   912  }
   913  
   914  // Node: A TPU instance.
   915  type Node struct {
   916  	// AcceleratorConfig: The AccleratorConfig for the TPU Node.
   917  	AcceleratorConfig *AcceleratorConfig `json:"acceleratorConfig,omitempty"`
   918  	// AcceleratorType: Optional. The type of hardware accelerators associated with
   919  	// this node.
   920  	AcceleratorType string `json:"acceleratorType,omitempty"`
   921  	// ApiVersion: Output only. The API version that created this Node.
   922  	//
   923  	// Possible values:
   924  	//   "API_VERSION_UNSPECIFIED" - API version is unknown.
   925  	//   "V1_ALPHA1" - TPU API V1Alpha1 version.
   926  	//   "V1" - TPU API V1 version.
   927  	//   "V2_ALPHA1" - TPU API V2Alpha1 version.
   928  	//   "V2" - TPU API V2 version.
   929  	ApiVersion string `json:"apiVersion,omitempty"`
   930  	// CidrBlock: The CIDR block that the TPU node will use when selecting an IP
   931  	// address. This CIDR block must be a /29 block; the Compute Engine networks
   932  	// API forbids a smaller block, and using a larger block would be wasteful (a
   933  	// node can only consume one IP address). Errors will occur if the CIDR block
   934  	// has already been used for a currently existing TPU node, the CIDR block
   935  	// conflicts with any subnetworks in the user's provided network, or the
   936  	// provided network is peered with another network that is using that CIDR
   937  	// block.
   938  	CidrBlock string `json:"cidrBlock,omitempty"`
   939  	// CreateTime: Output only. The time when the node was created.
   940  	CreateTime string `json:"createTime,omitempty"`
   941  	// DataDisks: The additional data disks for the Node.
   942  	DataDisks []*AttachedDisk `json:"dataDisks,omitempty"`
   943  	// Description: The user-supplied description of the TPU. Maximum of 512
   944  	// characters.
   945  	Description string `json:"description,omitempty"`
   946  	// Health: The health status of the TPU node.
   947  	//
   948  	// Possible values:
   949  	//   "HEALTH_UNSPECIFIED" - Health status is unknown: not initialized or failed
   950  	// to retrieve.
   951  	//   "HEALTHY" - The resource is healthy.
   952  	//   "TIMEOUT" - The resource is unresponsive.
   953  	//   "UNHEALTHY_TENSORFLOW" - The in-guest ML stack is unhealthy.
   954  	//   "UNHEALTHY_MAINTENANCE" - The node is under maintenance/priority boost
   955  	// caused rescheduling and will resume running once rescheduled.
   956  	Health string `json:"health,omitempty"`
   957  	// HealthDescription: Output only. If this field is populated, it contains a
   958  	// description of why the TPU Node is unhealthy.
   959  	HealthDescription string `json:"healthDescription,omitempty"`
   960  	// Id: Output only. The unique identifier for the TPU Node.
   961  	Id int64 `json:"id,omitempty,string"`
   962  	// Labels: Resource labels to represent user-provided metadata.
   963  	Labels map[string]string `json:"labels,omitempty"`
   964  	// Metadata: Custom metadata to apply to the TPU Node. Can set startup-script
   965  	// and shutdown-script
   966  	Metadata map[string]string `json:"metadata,omitempty"`
   967  	// MultisliceNode: Output only. Whether the Node belongs to a Multislice group.
   968  	MultisliceNode bool `json:"multisliceNode,omitempty"`
   969  	// Name: Output only. Immutable. The name of the TPU.
   970  	Name string `json:"name,omitempty"`
   971  	// NetworkConfig: Network configurations for the TPU node.
   972  	NetworkConfig *NetworkConfig `json:"networkConfig,omitempty"`
   973  	// NetworkEndpoints: Output only. The network endpoints where TPU workers can
   974  	// be accessed and sent work. It is recommended that runtime clients of the
   975  	// node reach out to the 0th entry in this map first.
   976  	NetworkEndpoints []*NetworkEndpoint `json:"networkEndpoints,omitempty"`
   977  	// QueuedResource: Output only. The qualified name of the QueuedResource that
   978  	// requested this Node.
   979  	QueuedResource string `json:"queuedResource,omitempty"`
   980  	// RuntimeVersion: Required. The runtime version running in the Node.
   981  	RuntimeVersion string `json:"runtimeVersion,omitempty"`
   982  	// SchedulingConfig: The scheduling options for this node.
   983  	SchedulingConfig *SchedulingConfig `json:"schedulingConfig,omitempty"`
   984  	// ServiceAccount: The Google Cloud Platform Service Account to be used by the
   985  	// TPU node VMs. If None is specified, the default compute service account will
   986  	// be used.
   987  	ServiceAccount *ServiceAccount `json:"serviceAccount,omitempty"`
   988  	// ShieldedInstanceConfig: Shielded Instance options.
   989  	ShieldedInstanceConfig *ShieldedInstanceConfig `json:"shieldedInstanceConfig,omitempty"`
   990  	// State: Output only. The current state for the TPU Node.
   991  	//
   992  	// Possible values:
   993  	//   "STATE_UNSPECIFIED" - TPU node state is not known/set.
   994  	//   "CREATING" - TPU node is being created.
   995  	//   "READY" - TPU node has been created.
   996  	//   "RESTARTING" - TPU node is restarting.
   997  	//   "REIMAGING" - TPU node is undergoing reimaging.
   998  	//   "DELETING" - TPU node is being deleted.
   999  	//   "REPAIRING" - TPU node is being repaired and may be unusable. Details can
  1000  	// be found in the 'help_description' field.
  1001  	//   "STOPPED" - TPU node is stopped.
  1002  	//   "STOPPING" - TPU node is currently stopping.
  1003  	//   "STARTING" - TPU node is currently starting.
  1004  	//   "PREEMPTED" - TPU node has been preempted. Only applies to Preemptible TPU
  1005  	// Nodes.
  1006  	//   "TERMINATED" - TPU node has been terminated due to maintenance or has
  1007  	// reached the end of its life cycle (for preemptible nodes).
  1008  	//   "HIDING" - TPU node is currently hiding.
  1009  	//   "HIDDEN" - TPU node has been hidden.
  1010  	//   "UNHIDING" - TPU node is currently unhiding.
  1011  	State string `json:"state,omitempty"`
  1012  	// Symptoms: Output only. The Symptoms that have occurred to the TPU Node.
  1013  	Symptoms []*Symptom `json:"symptoms,omitempty"`
  1014  	// Tags: Tags to apply to the TPU Node. Tags are used to identify valid sources
  1015  	// or targets for network firewalls.
  1016  	Tags []string `json:"tags,omitempty"`
  1017  
  1018  	// ServerResponse contains the HTTP response code and headers from the server.
  1019  	googleapi.ServerResponse `json:"-"`
  1020  	// ForceSendFields is a list of field names (e.g. "AcceleratorConfig") to
  1021  	// unconditionally include in API requests. By default, fields with empty or
  1022  	// default values are omitted from API requests. See
  1023  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1024  	// details.
  1025  	ForceSendFields []string `json:"-"`
  1026  	// NullFields is a list of field names (e.g. "AcceleratorConfig") to include in
  1027  	// API requests with the JSON null value. By default, fields with empty values
  1028  	// are omitted from API requests. See
  1029  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1030  	NullFields []string `json:"-"`
  1031  }
  1032  
  1033  func (s *Node) MarshalJSON() ([]byte, error) {
  1034  	type NoMethod Node
  1035  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1036  }
  1037  
  1038  // NodeSpec: Details of the TPU node(s) being requested. Users can request
  1039  // either a single node or multiple nodes. NodeSpec provides the specification
  1040  // for node(s) to be created.
  1041  type NodeSpec struct {
  1042  	// MultisliceParams: Optional. Fields to specify in case of multislice request.
  1043  	MultisliceParams *MultisliceParams `json:"multisliceParams,omitempty"`
  1044  	// Node: Required. The node.
  1045  	Node *Node `json:"node,omitempty"`
  1046  	// NodeId: Optional. The unqualified resource name. Should follow the
  1047  	// `^[A-Za-z0-9_.~+%-]+$` regex format. This is only specified when requesting
  1048  	// a single node. In case of multislice requests, multislice_params must be
  1049  	// populated instead.
  1050  	NodeId string `json:"nodeId,omitempty"`
  1051  	// Parent: Required. The parent resource name.
  1052  	Parent string `json:"parent,omitempty"`
  1053  	// ForceSendFields is a list of field names (e.g. "MultisliceParams") to
  1054  	// unconditionally include in API requests. By default, fields with empty or
  1055  	// default values are omitted from API requests. See
  1056  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1057  	// details.
  1058  	ForceSendFields []string `json:"-"`
  1059  	// NullFields is a list of field names (e.g. "MultisliceParams") to include in
  1060  	// API requests with the JSON null value. By default, fields with empty values
  1061  	// are omitted from API requests. See
  1062  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1063  	NullFields []string `json:"-"`
  1064  }
  1065  
  1066  func (s *NodeSpec) MarshalJSON() ([]byte, error) {
  1067  	type NoMethod NodeSpec
  1068  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1069  }
  1070  
  1071  // Operation: This resource represents a long-running operation that is the
  1072  // result of a network API call.
  1073  type Operation struct {
  1074  	// Done: If the value is `false`, it means the operation is still in progress.
  1075  	// If `true`, the operation is completed, and either `error` or `response` is
  1076  	// available.
  1077  	Done bool `json:"done,omitempty"`
  1078  	// Error: The error result of the operation in case of failure or cancellation.
  1079  	Error *Status `json:"error,omitempty"`
  1080  	// Metadata: Service-specific metadata associated with the operation. It
  1081  	// typically contains progress information and common metadata such as create
  1082  	// time. Some services might not provide such metadata. Any method that returns
  1083  	// a long-running operation should document the metadata type, if any.
  1084  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  1085  	// Name: The server-assigned name, which is only unique within the same service
  1086  	// that originally returns it. If you use the default HTTP mapping, the `name`
  1087  	// should be a resource name ending with `operations/{unique_id}`.
  1088  	Name string `json:"name,omitempty"`
  1089  	// Response: The normal, successful response of the operation. If the original
  1090  	// method returns no data on success, such as `Delete`, the response is
  1091  	// `google.protobuf.Empty`. If the original method is standard
  1092  	// `Get`/`Create`/`Update`, the response should be the resource. For other
  1093  	// methods, the response should have the type `XxxResponse`, where `Xxx` is the
  1094  	// original method name. For example, if the original method name is
  1095  	// `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
  1096  	Response googleapi.RawMessage `json:"response,omitempty"`
  1097  
  1098  	// ServerResponse contains the HTTP response code and headers from the server.
  1099  	googleapi.ServerResponse `json:"-"`
  1100  	// ForceSendFields is a list of field names (e.g. "Done") to unconditionally
  1101  	// include in API requests. By default, fields with empty or default values are
  1102  	// omitted from API requests. See
  1103  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1104  	// details.
  1105  	ForceSendFields []string `json:"-"`
  1106  	// NullFields is a list of field names (e.g. "Done") to include in API requests
  1107  	// with the JSON null value. By default, fields with empty values are omitted
  1108  	// from API requests. See
  1109  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1110  	NullFields []string `json:"-"`
  1111  }
  1112  
  1113  func (s *Operation) MarshalJSON() ([]byte, error) {
  1114  	type NoMethod Operation
  1115  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1116  }
  1117  
  1118  // OperationMetadata: Metadata describing an Operation
  1119  type OperationMetadata struct {
  1120  	// ApiVersion: API version.
  1121  	ApiVersion string `json:"apiVersion,omitempty"`
  1122  	// CancelRequested: Specifies if cancellation was requested for the operation.
  1123  	CancelRequested bool `json:"cancelRequested,omitempty"`
  1124  	// CreateTime: The time the operation was created.
  1125  	CreateTime string `json:"createTime,omitempty"`
  1126  	// EndTime: The time the operation finished running.
  1127  	EndTime string `json:"endTime,omitempty"`
  1128  	// StatusDetail: Human-readable status of the operation, if any.
  1129  	StatusDetail string `json:"statusDetail,omitempty"`
  1130  	// Target: Target of the operation - for example
  1131  	// projects/project-1/connectivityTests/test-1
  1132  	Target string `json:"target,omitempty"`
  1133  	// Verb: Name of the verb executed by the operation.
  1134  	Verb string `json:"verb,omitempty"`
  1135  	// ForceSendFields is a list of field names (e.g. "ApiVersion") to
  1136  	// unconditionally include in API requests. By default, fields with empty or
  1137  	// default values are omitted from API requests. See
  1138  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1139  	// details.
  1140  	ForceSendFields []string `json:"-"`
  1141  	// NullFields is a list of field names (e.g. "ApiVersion") to include in API
  1142  	// requests with the JSON null value. By default, fields with empty values are
  1143  	// omitted from API requests. See
  1144  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1145  	NullFields []string `json:"-"`
  1146  }
  1147  
  1148  func (s *OperationMetadata) MarshalJSON() ([]byte, error) {
  1149  	type NoMethod OperationMetadata
  1150  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1151  }
  1152  
  1153  // ProvisioningData: Further data for the provisioning state.
  1154  type ProvisioningData struct {
  1155  }
  1156  
  1157  // QueuedResource: A QueuedResource represents a request for resources that
  1158  // will be placed in a queue and fulfilled when the necessary resources are
  1159  // available.
  1160  type QueuedResource struct {
  1161  	// CreateTime: Output only. The time when the QueuedResource was created.
  1162  	CreateTime string `json:"createTime,omitempty"`
  1163  	// Guaranteed: Optional. The Guaranteed tier
  1164  	Guaranteed *Guaranteed `json:"guaranteed,omitempty"`
  1165  	// Name: Output only. Immutable. The name of the QueuedResource.
  1166  	Name string `json:"name,omitempty"`
  1167  	// QueueingPolicy: Optional. The queueing policy of the QueuedRequest.
  1168  	QueueingPolicy *QueueingPolicy `json:"queueingPolicy,omitempty"`
  1169  	// ReservationName: Optional. Name of the reservation in which the resource
  1170  	// should be provisioned. Format:
  1171  	// projects/{project}/locations/{zone}/reservations/{reservation}
  1172  	ReservationName string `json:"reservationName,omitempty"`
  1173  	// Spot: Optional. The Spot tier.
  1174  	Spot *Spot `json:"spot,omitempty"`
  1175  	// State: Output only. State of the QueuedResource request.
  1176  	State *QueuedResourceState `json:"state,omitempty"`
  1177  	// Tpu: Optional. Defines a TPU resource.
  1178  	Tpu *Tpu `json:"tpu,omitempty"`
  1179  
  1180  	// ServerResponse contains the HTTP response code and headers from the server.
  1181  	googleapi.ServerResponse `json:"-"`
  1182  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  1183  	// unconditionally include in API requests. By default, fields with empty or
  1184  	// default values are omitted from API requests. See
  1185  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1186  	// details.
  1187  	ForceSendFields []string `json:"-"`
  1188  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  1189  	// requests with the JSON null value. By default, fields with empty values are
  1190  	// omitted from API requests. See
  1191  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1192  	NullFields []string `json:"-"`
  1193  }
  1194  
  1195  func (s *QueuedResource) MarshalJSON() ([]byte, error) {
  1196  	type NoMethod QueuedResource
  1197  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1198  }
  1199  
  1200  // QueuedResourceState: QueuedResourceState defines the details of the
  1201  // QueuedResource request.
  1202  type QueuedResourceState struct {
  1203  	// AcceptedData: Output only. Further data for the accepted state.
  1204  	AcceptedData *AcceptedData `json:"acceptedData,omitempty"`
  1205  	// ActiveData: Output only. Further data for the active state.
  1206  	ActiveData *ActiveData `json:"activeData,omitempty"`
  1207  	// CreatingData: Output only. Further data for the creating state.
  1208  	CreatingData *CreatingData `json:"creatingData,omitempty"`
  1209  	// DeletingData: Output only. Further data for the deleting state.
  1210  	DeletingData *DeletingData `json:"deletingData,omitempty"`
  1211  	// FailedData: Output only. Further data for the failed state.
  1212  	FailedData *FailedData `json:"failedData,omitempty"`
  1213  	// ProvisioningData: Output only. Further data for the provisioning state.
  1214  	ProvisioningData *ProvisioningData `json:"provisioningData,omitempty"`
  1215  	// State: Output only. State of the QueuedResource request.
  1216  	//
  1217  	// Possible values:
  1218  	//   "STATE_UNSPECIFIED" - State of the QueuedResource request is not
  1219  	// known/set.
  1220  	//   "CREATING" - The QueuedResource request has been received. We're still
  1221  	// working on determining if we will be able to honor this request.
  1222  	//   "ACCEPTED" - The QueuedResource request has passed initial
  1223  	// validation/admission control and has been persisted in the queue.
  1224  	//   "PROVISIONING" - The QueuedResource request has been selected. The
  1225  	// associated resources are currently being provisioned (or very soon will
  1226  	// begin provisioning).
  1227  	//   "FAILED" - The request could not be completed. This may be due to some
  1228  	// late-discovered problem with the request itself, or due to unavailability of
  1229  	// resources within the constraints of the request (e.g., the 'valid until'
  1230  	// start timing constraint expired).
  1231  	//   "DELETING" - The QueuedResource is being deleted.
  1232  	//   "ACTIVE" - The resources specified in the QueuedResource request have been
  1233  	// provisioned and are ready for use by the end-user/consumer.
  1234  	//   "SUSPENDING" - The resources specified in the QueuedResource request are
  1235  	// being deleted. This may have been initiated by the user, or the Cloud TPU
  1236  	// service. Inspect the state data for more details.
  1237  	//   "SUSPENDED" - The resources specified in the QueuedResource request have
  1238  	// been deleted.
  1239  	//   "WAITING_FOR_RESOURCES" - The QueuedResource request has passed initial
  1240  	// validation and has been persisted in the queue. It will remain in this state
  1241  	// until there are sufficient free resources to begin provisioning your
  1242  	// request. Wait times will vary significantly depending on demand levels. When
  1243  	// demand is high, not all requests can be immediately provisioned. If you need
  1244  	// more reliable obtainability of TPUs consider purchasing a reservation. To
  1245  	// put a limit on how long you are willing to wait, use [timing
  1246  	// constraints](https://cloud.google.com/tpu/docs/queued-resources#request_a_que
  1247  	// ued_resource_before_a_specified_time).
  1248  	State string `json:"state,omitempty"`
  1249  	// StateInitiator: Output only. The initiator of the QueuedResources's current
  1250  	// state. Used to indicate whether the SUSPENDING/SUSPENDED state was initiated
  1251  	// by the user or the service.
  1252  	//
  1253  	// Possible values:
  1254  	//   "STATE_INITIATOR_UNSPECIFIED" - The state initiator is unspecified.
  1255  	//   "USER" - The current QueuedResource state was initiated by the user.
  1256  	//   "SERVICE" - The current QueuedResource state was initiated by the service.
  1257  	StateInitiator string `json:"stateInitiator,omitempty"`
  1258  	// SuspendedData: Output only. Further data for the suspended state.
  1259  	SuspendedData *SuspendedData `json:"suspendedData,omitempty"`
  1260  	// SuspendingData: Output only. Further data for the suspending state.
  1261  	SuspendingData *SuspendingData `json:"suspendingData,omitempty"`
  1262  	// ForceSendFields is a list of field names (e.g. "AcceptedData") to
  1263  	// unconditionally include in API requests. By default, fields with empty or
  1264  	// default values are omitted from API requests. See
  1265  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1266  	// details.
  1267  	ForceSendFields []string `json:"-"`
  1268  	// NullFields is a list of field names (e.g. "AcceptedData") to include in API
  1269  	// requests with the JSON null value. By default, fields with empty values are
  1270  	// omitted from API requests. See
  1271  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1272  	NullFields []string `json:"-"`
  1273  }
  1274  
  1275  func (s *QueuedResourceState) MarshalJSON() ([]byte, error) {
  1276  	type NoMethod QueuedResourceState
  1277  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1278  }
  1279  
  1280  // QueueingPolicy: Defines the policy of the QueuedRequest.
  1281  type QueueingPolicy struct {
  1282  	// ValidAfterDuration: Optional. A relative time after which resources may be
  1283  	// created.
  1284  	ValidAfterDuration string `json:"validAfterDuration,omitempty"`
  1285  	// ValidAfterTime: Optional. An absolute time after which resources may be
  1286  	// created.
  1287  	ValidAfterTime string `json:"validAfterTime,omitempty"`
  1288  	// ValidInterval: Optional. An absolute time interval within which resources
  1289  	// may be created.
  1290  	ValidInterval *Interval `json:"validInterval,omitempty"`
  1291  	// ValidUntilDuration: Optional. A relative time after which resources should
  1292  	// not be created. If the request cannot be fulfilled by this time the request
  1293  	// will be failed.
  1294  	ValidUntilDuration string `json:"validUntilDuration,omitempty"`
  1295  	// ValidUntilTime: Optional. An absolute time after which resources should not
  1296  	// be created. If the request cannot be fulfilled by this time the request will
  1297  	// be failed.
  1298  	ValidUntilTime string `json:"validUntilTime,omitempty"`
  1299  	// ForceSendFields is a list of field names (e.g. "ValidAfterDuration") to
  1300  	// unconditionally include in API requests. By default, fields with empty or
  1301  	// default values are omitted from API requests. See
  1302  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1303  	// details.
  1304  	ForceSendFields []string `json:"-"`
  1305  	// NullFields is a list of field names (e.g. "ValidAfterDuration") to include
  1306  	// in API requests with the JSON null value. By default, fields with empty
  1307  	// values are omitted from API requests. See
  1308  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1309  	NullFields []string `json:"-"`
  1310  }
  1311  
  1312  func (s *QueueingPolicy) MarshalJSON() ([]byte, error) {
  1313  	type NoMethod QueueingPolicy
  1314  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1315  }
  1316  
  1317  // ResetQueuedResourceRequest: Request for ResetQueuedResource.
  1318  type ResetQueuedResourceRequest struct {
  1319  }
  1320  
  1321  // RuntimeVersion: A runtime version that a Node can be configured with.
  1322  type RuntimeVersion struct {
  1323  	// Name: The resource name.
  1324  	Name string `json:"name,omitempty"`
  1325  	// Version: The runtime version.
  1326  	Version string `json:"version,omitempty"`
  1327  
  1328  	// ServerResponse contains the HTTP response code and headers from the server.
  1329  	googleapi.ServerResponse `json:"-"`
  1330  	// ForceSendFields is a list of field names (e.g. "Name") to unconditionally
  1331  	// include in API requests. By default, fields with empty or default values are
  1332  	// omitted from API requests. See
  1333  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1334  	// details.
  1335  	ForceSendFields []string `json:"-"`
  1336  	// NullFields is a list of field names (e.g. "Name") to include in API requests
  1337  	// with the JSON null value. By default, fields with empty values are omitted
  1338  	// from API requests. See
  1339  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1340  	NullFields []string `json:"-"`
  1341  }
  1342  
  1343  func (s *RuntimeVersion) MarshalJSON() ([]byte, error) {
  1344  	type NoMethod RuntimeVersion
  1345  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1346  }
  1347  
  1348  // SchedulingConfig: Sets the scheduling options for this node.
  1349  type SchedulingConfig struct {
  1350  	// Preemptible: Defines whether the node is preemptible.
  1351  	Preemptible bool `json:"preemptible,omitempty"`
  1352  	// Reserved: Whether the node is created under a reservation.
  1353  	Reserved bool `json:"reserved,omitempty"`
  1354  	// Spot: Optional. Defines whether the node is Spot VM.
  1355  	Spot bool `json:"spot,omitempty"`
  1356  	// ForceSendFields is a list of field names (e.g. "Preemptible") to
  1357  	// unconditionally include in API requests. By default, fields with empty or
  1358  	// default values are omitted from API requests. See
  1359  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1360  	// details.
  1361  	ForceSendFields []string `json:"-"`
  1362  	// NullFields is a list of field names (e.g. "Preemptible") to include in API
  1363  	// requests with the JSON null value. By default, fields with empty values are
  1364  	// omitted from API requests. See
  1365  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1366  	NullFields []string `json:"-"`
  1367  }
  1368  
  1369  func (s *SchedulingConfig) MarshalJSON() ([]byte, error) {
  1370  	type NoMethod SchedulingConfig
  1371  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1372  }
  1373  
  1374  // ServiceAccount: A service account.
  1375  type ServiceAccount struct {
  1376  	// Email: Email address of the service account. If empty, default Compute
  1377  	// service account will be used.
  1378  	Email string `json:"email,omitempty"`
  1379  	// Scope: The list of scopes to be made available for this service account. If
  1380  	// empty, access to all Cloud APIs will be allowed.
  1381  	Scope []string `json:"scope,omitempty"`
  1382  	// ForceSendFields is a list of field names (e.g. "Email") to unconditionally
  1383  	// include in API requests. By default, fields with empty or default values are
  1384  	// omitted from API requests. See
  1385  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1386  	// details.
  1387  	ForceSendFields []string `json:"-"`
  1388  	// NullFields is a list of field names (e.g. "Email") to include in API
  1389  	// requests with the JSON null value. By default, fields with empty values are
  1390  	// omitted from API requests. See
  1391  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1392  	NullFields []string `json:"-"`
  1393  }
  1394  
  1395  func (s *ServiceAccount) MarshalJSON() ([]byte, error) {
  1396  	type NoMethod ServiceAccount
  1397  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1398  }
  1399  
  1400  // ServiceIdentity: The per-product per-project service identity for Cloud TPU
  1401  // service.
  1402  type ServiceIdentity struct {
  1403  	// Email: The email address of the service identity.
  1404  	Email string `json:"email,omitempty"`
  1405  	// ForceSendFields is a list of field names (e.g. "Email") to unconditionally
  1406  	// include in API requests. By default, fields with empty or default values are
  1407  	// omitted from API requests. See
  1408  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1409  	// details.
  1410  	ForceSendFields []string `json:"-"`
  1411  	// NullFields is a list of field names (e.g. "Email") to include in API
  1412  	// requests with the JSON null value. By default, fields with empty values are
  1413  	// omitted from API requests. See
  1414  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1415  	NullFields []string `json:"-"`
  1416  }
  1417  
  1418  func (s *ServiceIdentity) MarshalJSON() ([]byte, error) {
  1419  	type NoMethod ServiceIdentity
  1420  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1421  }
  1422  
  1423  // ShieldedInstanceConfig: A set of Shielded Instance options.
  1424  type ShieldedInstanceConfig struct {
  1425  	// EnableSecureBoot: Defines whether the instance has Secure Boot enabled.
  1426  	EnableSecureBoot bool `json:"enableSecureBoot,omitempty"`
  1427  	// ForceSendFields is a list of field names (e.g. "EnableSecureBoot") to
  1428  	// unconditionally include in API requests. By default, fields with empty or
  1429  	// default values are omitted from API requests. See
  1430  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1431  	// details.
  1432  	ForceSendFields []string `json:"-"`
  1433  	// NullFields is a list of field names (e.g. "EnableSecureBoot") to include in
  1434  	// API requests with the JSON null value. By default, fields with empty values
  1435  	// are omitted from API requests. See
  1436  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1437  	NullFields []string `json:"-"`
  1438  }
  1439  
  1440  func (s *ShieldedInstanceConfig) MarshalJSON() ([]byte, error) {
  1441  	type NoMethod ShieldedInstanceConfig
  1442  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1443  }
  1444  
  1445  // Spot: Spot tier definition.
  1446  type Spot struct {
  1447  }
  1448  
  1449  // StartNodeRequest: Request for StartNode.
  1450  type StartNodeRequest struct {
  1451  }
  1452  
  1453  // Status: The `Status` type defines a logical error model that is suitable for
  1454  // different programming environments, including REST APIs and RPC APIs. It is
  1455  // used by gRPC (https://github.com/grpc). Each `Status` message contains three
  1456  // pieces of data: error code, error message, and error details. You can find
  1457  // out more about this error model and how to work with it in the API Design
  1458  // Guide (https://cloud.google.com/apis/design/errors).
  1459  type Status struct {
  1460  	// Code: The status code, which should be an enum value of google.rpc.Code.
  1461  	Code int64 `json:"code,omitempty"`
  1462  	// Details: A list of messages that carry the error details. There is a common
  1463  	// set of message types for APIs to use.
  1464  	Details []googleapi.RawMessage `json:"details,omitempty"`
  1465  	// Message: A developer-facing error message, which should be in English. Any
  1466  	// user-facing error message should be localized and sent in the
  1467  	// google.rpc.Status.details field, or localized by the client.
  1468  	Message string `json:"message,omitempty"`
  1469  	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
  1470  	// include in API requests. By default, fields with empty or default values are
  1471  	// omitted from API requests. See
  1472  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1473  	// details.
  1474  	ForceSendFields []string `json:"-"`
  1475  	// NullFields is a list of field names (e.g. "Code") to include in API requests
  1476  	// with the JSON null value. By default, fields with empty values are omitted
  1477  	// from API requests. See
  1478  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1479  	NullFields []string `json:"-"`
  1480  }
  1481  
  1482  func (s *Status) MarshalJSON() ([]byte, error) {
  1483  	type NoMethod Status
  1484  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1485  }
  1486  
  1487  // StopNodeRequest: Request for StopNode.
  1488  type StopNodeRequest struct {
  1489  }
  1490  
  1491  // SuspendedData: Further data for the suspended state.
  1492  type SuspendedData struct {
  1493  }
  1494  
  1495  // SuspendingData: Further data for the suspending state.
  1496  type SuspendingData struct {
  1497  }
  1498  
  1499  // Symptom: A Symptom instance.
  1500  type Symptom struct {
  1501  	// CreateTime: Timestamp when the Symptom is created.
  1502  	CreateTime string `json:"createTime,omitempty"`
  1503  	// Details: Detailed information of the current Symptom.
  1504  	Details string `json:"details,omitempty"`
  1505  	// SymptomType: Type of the Symptom.
  1506  	//
  1507  	// Possible values:
  1508  	//   "SYMPTOM_TYPE_UNSPECIFIED" - Unspecified symptom.
  1509  	//   "LOW_MEMORY" - TPU VM memory is low.
  1510  	//   "OUT_OF_MEMORY" - TPU runtime is out of memory.
  1511  	//   "EXECUTE_TIMED_OUT" - TPU runtime execution has timed out.
  1512  	//   "MESH_BUILD_FAIL" - TPU runtime fails to construct a mesh that recognizes
  1513  	// each TPU device's neighbors.
  1514  	//   "HBM_OUT_OF_MEMORY" - TPU HBM is out of memory.
  1515  	//   "PROJECT_ABUSE" - Abusive behaviors have been identified on the current
  1516  	// project.
  1517  	SymptomType string `json:"symptomType,omitempty"`
  1518  	// WorkerId: A string used to uniquely distinguish a worker within a TPU node.
  1519  	WorkerId string `json:"workerId,omitempty"`
  1520  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  1521  	// unconditionally include in API requests. By default, fields with empty or
  1522  	// default values are omitted from API requests. See
  1523  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1524  	// details.
  1525  	ForceSendFields []string `json:"-"`
  1526  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  1527  	// requests with the JSON null value. By default, fields with empty values are
  1528  	// omitted from API requests. See
  1529  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1530  	NullFields []string `json:"-"`
  1531  }
  1532  
  1533  func (s *Symptom) MarshalJSON() ([]byte, error) {
  1534  	type NoMethod Symptom
  1535  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1536  }
  1537  
  1538  // Tpu: Details of the TPU resource(s) being requested.
  1539  type Tpu struct {
  1540  	// NodeSpec: Optional. The TPU node(s) being requested.
  1541  	NodeSpec []*NodeSpec `json:"nodeSpec,omitempty"`
  1542  	// ForceSendFields is a list of field names (e.g. "NodeSpec") to
  1543  	// unconditionally include in API requests. By default, fields with empty or
  1544  	// default values are omitted from API requests. See
  1545  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1546  	// details.
  1547  	ForceSendFields []string `json:"-"`
  1548  	// NullFields is a list of field names (e.g. "NodeSpec") to include in API
  1549  	// requests with the JSON null value. By default, fields with empty values are
  1550  	// omitted from API requests. See
  1551  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1552  	NullFields []string `json:"-"`
  1553  }
  1554  
  1555  func (s *Tpu) MarshalJSON() ([]byte, error) {
  1556  	type NoMethod Tpu
  1557  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1558  }
  1559  
  1560  type ProjectsLocationsGenerateServiceIdentityCall struct {
  1561  	s                              *Service
  1562  	parent                         string
  1563  	generateserviceidentityrequest *GenerateServiceIdentityRequest
  1564  	urlParams_                     gensupport.URLParams
  1565  	ctx_                           context.Context
  1566  	header_                        http.Header
  1567  }
  1568  
  1569  // GenerateServiceIdentity: Generates the Cloud TPU service identity for the
  1570  // project.
  1571  //
  1572  // - parent: The parent resource name.
  1573  func (r *ProjectsLocationsService) GenerateServiceIdentity(parent string, generateserviceidentityrequest *GenerateServiceIdentityRequest) *ProjectsLocationsGenerateServiceIdentityCall {
  1574  	c := &ProjectsLocationsGenerateServiceIdentityCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1575  	c.parent = parent
  1576  	c.generateserviceidentityrequest = generateserviceidentityrequest
  1577  	return c
  1578  }
  1579  
  1580  // Fields allows partial responses to be retrieved. See
  1581  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1582  // details.
  1583  func (c *ProjectsLocationsGenerateServiceIdentityCall) Fields(s ...googleapi.Field) *ProjectsLocationsGenerateServiceIdentityCall {
  1584  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1585  	return c
  1586  }
  1587  
  1588  // Context sets the context to be used in this call's Do method.
  1589  func (c *ProjectsLocationsGenerateServiceIdentityCall) Context(ctx context.Context) *ProjectsLocationsGenerateServiceIdentityCall {
  1590  	c.ctx_ = ctx
  1591  	return c
  1592  }
  1593  
  1594  // Header returns a http.Header that can be modified by the caller to add
  1595  // headers to the request.
  1596  func (c *ProjectsLocationsGenerateServiceIdentityCall) Header() http.Header {
  1597  	if c.header_ == nil {
  1598  		c.header_ = make(http.Header)
  1599  	}
  1600  	return c.header_
  1601  }
  1602  
  1603  func (c *ProjectsLocationsGenerateServiceIdentityCall) doRequest(alt string) (*http.Response, error) {
  1604  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  1605  	var body io.Reader = nil
  1606  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.generateserviceidentityrequest)
  1607  	if err != nil {
  1608  		return nil, err
  1609  	}
  1610  	c.urlParams_.Set("alt", alt)
  1611  	c.urlParams_.Set("prettyPrint", "false")
  1612  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}:generateServiceIdentity")
  1613  	urls += "?" + c.urlParams_.Encode()
  1614  	req, err := http.NewRequest("POST", urls, body)
  1615  	if err != nil {
  1616  		return nil, err
  1617  	}
  1618  	req.Header = reqHeaders
  1619  	googleapi.Expand(req.URL, map[string]string{
  1620  		"parent": c.parent,
  1621  	})
  1622  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1623  }
  1624  
  1625  // Do executes the "tpu.projects.locations.generateServiceIdentity" call.
  1626  // Any non-2xx status code is an error. Response headers are in either
  1627  // *GenerateServiceIdentityResponse.ServerResponse.Header or (if a response was
  1628  // returned at all) in error.(*googleapi.Error).Header. Use
  1629  // googleapi.IsNotModified to check whether the returned error was because
  1630  // http.StatusNotModified was returned.
  1631  func (c *ProjectsLocationsGenerateServiceIdentityCall) Do(opts ...googleapi.CallOption) (*GenerateServiceIdentityResponse, error) {
  1632  	gensupport.SetOptions(c.urlParams_, opts...)
  1633  	res, err := c.doRequest("json")
  1634  	if res != nil && res.StatusCode == http.StatusNotModified {
  1635  		if res.Body != nil {
  1636  			res.Body.Close()
  1637  		}
  1638  		return nil, gensupport.WrapError(&googleapi.Error{
  1639  			Code:   res.StatusCode,
  1640  			Header: res.Header,
  1641  		})
  1642  	}
  1643  	if err != nil {
  1644  		return nil, err
  1645  	}
  1646  	defer googleapi.CloseBody(res)
  1647  	if err := googleapi.CheckResponse(res); err != nil {
  1648  		return nil, gensupport.WrapError(err)
  1649  	}
  1650  	ret := &GenerateServiceIdentityResponse{
  1651  		ServerResponse: googleapi.ServerResponse{
  1652  			Header:         res.Header,
  1653  			HTTPStatusCode: res.StatusCode,
  1654  		},
  1655  	}
  1656  	target := &ret
  1657  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1658  		return nil, err
  1659  	}
  1660  	return ret, nil
  1661  }
  1662  
  1663  type ProjectsLocationsGetCall struct {
  1664  	s            *Service
  1665  	name         string
  1666  	urlParams_   gensupport.URLParams
  1667  	ifNoneMatch_ string
  1668  	ctx_         context.Context
  1669  	header_      http.Header
  1670  }
  1671  
  1672  // Get: Gets information about a location.
  1673  //
  1674  // - name: Resource name for the location.
  1675  func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
  1676  	c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1677  	c.name = name
  1678  	return c
  1679  }
  1680  
  1681  // Fields allows partial responses to be retrieved. See
  1682  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1683  // details.
  1684  func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
  1685  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1686  	return c
  1687  }
  1688  
  1689  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1690  // object's ETag matches the given value. This is useful for getting updates
  1691  // only after the object has changed since the last request.
  1692  func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
  1693  	c.ifNoneMatch_ = entityTag
  1694  	return c
  1695  }
  1696  
  1697  // Context sets the context to be used in this call's Do method.
  1698  func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
  1699  	c.ctx_ = ctx
  1700  	return c
  1701  }
  1702  
  1703  // Header returns a http.Header that can be modified by the caller to add
  1704  // headers to the request.
  1705  func (c *ProjectsLocationsGetCall) Header() http.Header {
  1706  	if c.header_ == nil {
  1707  		c.header_ = make(http.Header)
  1708  	}
  1709  	return c.header_
  1710  }
  1711  
  1712  func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
  1713  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1714  	if c.ifNoneMatch_ != "" {
  1715  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1716  	}
  1717  	var body io.Reader = nil
  1718  	c.urlParams_.Set("alt", alt)
  1719  	c.urlParams_.Set("prettyPrint", "false")
  1720  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  1721  	urls += "?" + c.urlParams_.Encode()
  1722  	req, err := http.NewRequest("GET", urls, body)
  1723  	if err != nil {
  1724  		return nil, err
  1725  	}
  1726  	req.Header = reqHeaders
  1727  	googleapi.Expand(req.URL, map[string]string{
  1728  		"name": c.name,
  1729  	})
  1730  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1731  }
  1732  
  1733  // Do executes the "tpu.projects.locations.get" call.
  1734  // Any non-2xx status code is an error. Response headers are in either
  1735  // *Location.ServerResponse.Header or (if a response was returned at all) in
  1736  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1737  // whether the returned error was because http.StatusNotModified was returned.
  1738  func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, 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 := &Location{
  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 ProjectsLocationsListCall struct {
  1771  	s            *Service
  1772  	name         string
  1773  	urlParams_   gensupport.URLParams
  1774  	ifNoneMatch_ string
  1775  	ctx_         context.Context
  1776  	header_      http.Header
  1777  }
  1778  
  1779  // List: Lists information about the supported locations for this service.
  1780  //
  1781  // - name: The resource that owns the locations collection, if applicable.
  1782  func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
  1783  	c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1784  	c.name = name
  1785  	return c
  1786  }
  1787  
  1788  // Filter sets the optional parameter "filter": A filter to narrow down results
  1789  // to a preferred subset. The filtering language accepts strings like
  1790  // "displayName=tokyo", and is documented in more detail in AIP-160
  1791  // (https://google.aip.dev/160).
  1792  func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
  1793  	c.urlParams_.Set("filter", filter)
  1794  	return c
  1795  }
  1796  
  1797  // PageSize sets the optional parameter "pageSize": The maximum number of
  1798  // results to return. If not set, the service selects a default.
  1799  func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
  1800  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  1801  	return c
  1802  }
  1803  
  1804  // PageToken sets the optional parameter "pageToken": A page token received
  1805  // from the `next_page_token` field in the response. Send that page token to
  1806  // receive the subsequent page.
  1807  func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
  1808  	c.urlParams_.Set("pageToken", pageToken)
  1809  	return c
  1810  }
  1811  
  1812  // Fields allows partial responses to be retrieved. See
  1813  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1814  // details.
  1815  func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
  1816  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1817  	return c
  1818  }
  1819  
  1820  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1821  // object's ETag matches the given value. This is useful for getting updates
  1822  // only after the object has changed since the last request.
  1823  func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
  1824  	c.ifNoneMatch_ = entityTag
  1825  	return c
  1826  }
  1827  
  1828  // Context sets the context to be used in this call's Do method.
  1829  func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
  1830  	c.ctx_ = ctx
  1831  	return c
  1832  }
  1833  
  1834  // Header returns a http.Header that can be modified by the caller to add
  1835  // headers to the request.
  1836  func (c *ProjectsLocationsListCall) Header() http.Header {
  1837  	if c.header_ == nil {
  1838  		c.header_ = make(http.Header)
  1839  	}
  1840  	return c.header_
  1841  }
  1842  
  1843  func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
  1844  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1845  	if c.ifNoneMatch_ != "" {
  1846  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1847  	}
  1848  	var body io.Reader = nil
  1849  	c.urlParams_.Set("alt", alt)
  1850  	c.urlParams_.Set("prettyPrint", "false")
  1851  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/locations")
  1852  	urls += "?" + c.urlParams_.Encode()
  1853  	req, err := http.NewRequest("GET", urls, body)
  1854  	if err != nil {
  1855  		return nil, err
  1856  	}
  1857  	req.Header = reqHeaders
  1858  	googleapi.Expand(req.URL, map[string]string{
  1859  		"name": c.name,
  1860  	})
  1861  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1862  }
  1863  
  1864  // Do executes the "tpu.projects.locations.list" call.
  1865  // Any non-2xx status code is an error. Response headers are in either
  1866  // *ListLocationsResponse.ServerResponse.Header or (if a response was returned
  1867  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  1868  // check whether the returned error was because http.StatusNotModified was
  1869  // returned.
  1870  func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
  1871  	gensupport.SetOptions(c.urlParams_, opts...)
  1872  	res, err := c.doRequest("json")
  1873  	if res != nil && res.StatusCode == http.StatusNotModified {
  1874  		if res.Body != nil {
  1875  			res.Body.Close()
  1876  		}
  1877  		return nil, gensupport.WrapError(&googleapi.Error{
  1878  			Code:   res.StatusCode,
  1879  			Header: res.Header,
  1880  		})
  1881  	}
  1882  	if err != nil {
  1883  		return nil, err
  1884  	}
  1885  	defer googleapi.CloseBody(res)
  1886  	if err := googleapi.CheckResponse(res); err != nil {
  1887  		return nil, gensupport.WrapError(err)
  1888  	}
  1889  	ret := &ListLocationsResponse{
  1890  		ServerResponse: googleapi.ServerResponse{
  1891  			Header:         res.Header,
  1892  			HTTPStatusCode: res.StatusCode,
  1893  		},
  1894  	}
  1895  	target := &ret
  1896  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1897  		return nil, err
  1898  	}
  1899  	return ret, nil
  1900  }
  1901  
  1902  // Pages invokes f for each page of results.
  1903  // A non-nil error returned from f will halt the iteration.
  1904  // The provided context supersedes any context provided to the Context method.
  1905  func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
  1906  	c.ctx_ = ctx
  1907  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  1908  	for {
  1909  		x, err := c.Do()
  1910  		if err != nil {
  1911  			return err
  1912  		}
  1913  		if err := f(x); err != nil {
  1914  			return err
  1915  		}
  1916  		if x.NextPageToken == "" {
  1917  			return nil
  1918  		}
  1919  		c.PageToken(x.NextPageToken)
  1920  	}
  1921  }
  1922  
  1923  type ProjectsLocationsAcceleratorTypesGetCall struct {
  1924  	s            *Service
  1925  	name         string
  1926  	urlParams_   gensupport.URLParams
  1927  	ifNoneMatch_ string
  1928  	ctx_         context.Context
  1929  	header_      http.Header
  1930  }
  1931  
  1932  // Get: Gets AcceleratorType.
  1933  //
  1934  // - name: The resource name.
  1935  func (r *ProjectsLocationsAcceleratorTypesService) Get(name string) *ProjectsLocationsAcceleratorTypesGetCall {
  1936  	c := &ProjectsLocationsAcceleratorTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1937  	c.name = name
  1938  	return c
  1939  }
  1940  
  1941  // Fields allows partial responses to be retrieved. See
  1942  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1943  // details.
  1944  func (c *ProjectsLocationsAcceleratorTypesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAcceleratorTypesGetCall {
  1945  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1946  	return c
  1947  }
  1948  
  1949  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1950  // object's ETag matches the given value. This is useful for getting updates
  1951  // only after the object has changed since the last request.
  1952  func (c *ProjectsLocationsAcceleratorTypesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAcceleratorTypesGetCall {
  1953  	c.ifNoneMatch_ = entityTag
  1954  	return c
  1955  }
  1956  
  1957  // Context sets the context to be used in this call's Do method.
  1958  func (c *ProjectsLocationsAcceleratorTypesGetCall) Context(ctx context.Context) *ProjectsLocationsAcceleratorTypesGetCall {
  1959  	c.ctx_ = ctx
  1960  	return c
  1961  }
  1962  
  1963  // Header returns a http.Header that can be modified by the caller to add
  1964  // headers to the request.
  1965  func (c *ProjectsLocationsAcceleratorTypesGetCall) Header() http.Header {
  1966  	if c.header_ == nil {
  1967  		c.header_ = make(http.Header)
  1968  	}
  1969  	return c.header_
  1970  }
  1971  
  1972  func (c *ProjectsLocationsAcceleratorTypesGetCall) doRequest(alt string) (*http.Response, error) {
  1973  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1974  	if c.ifNoneMatch_ != "" {
  1975  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1976  	}
  1977  	var body io.Reader = nil
  1978  	c.urlParams_.Set("alt", alt)
  1979  	c.urlParams_.Set("prettyPrint", "false")
  1980  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  1981  	urls += "?" + c.urlParams_.Encode()
  1982  	req, err := http.NewRequest("GET", urls, body)
  1983  	if err != nil {
  1984  		return nil, err
  1985  	}
  1986  	req.Header = reqHeaders
  1987  	googleapi.Expand(req.URL, map[string]string{
  1988  		"name": c.name,
  1989  	})
  1990  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1991  }
  1992  
  1993  // Do executes the "tpu.projects.locations.acceleratorTypes.get" call.
  1994  // Any non-2xx status code is an error. Response headers are in either
  1995  // *AcceleratorType.ServerResponse.Header or (if a response was returned at
  1996  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  1997  // check whether the returned error was because http.StatusNotModified was
  1998  // returned.
  1999  func (c *ProjectsLocationsAcceleratorTypesGetCall) Do(opts ...googleapi.CallOption) (*AcceleratorType, error) {
  2000  	gensupport.SetOptions(c.urlParams_, opts...)
  2001  	res, err := c.doRequest("json")
  2002  	if res != nil && res.StatusCode == http.StatusNotModified {
  2003  		if res.Body != nil {
  2004  			res.Body.Close()
  2005  		}
  2006  		return nil, gensupport.WrapError(&googleapi.Error{
  2007  			Code:   res.StatusCode,
  2008  			Header: res.Header,
  2009  		})
  2010  	}
  2011  	if err != nil {
  2012  		return nil, err
  2013  	}
  2014  	defer googleapi.CloseBody(res)
  2015  	if err := googleapi.CheckResponse(res); err != nil {
  2016  		return nil, gensupport.WrapError(err)
  2017  	}
  2018  	ret := &AcceleratorType{
  2019  		ServerResponse: googleapi.ServerResponse{
  2020  			Header:         res.Header,
  2021  			HTTPStatusCode: res.StatusCode,
  2022  		},
  2023  	}
  2024  	target := &ret
  2025  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2026  		return nil, err
  2027  	}
  2028  	return ret, nil
  2029  }
  2030  
  2031  type ProjectsLocationsAcceleratorTypesListCall struct {
  2032  	s            *Service
  2033  	parent       string
  2034  	urlParams_   gensupport.URLParams
  2035  	ifNoneMatch_ string
  2036  	ctx_         context.Context
  2037  	header_      http.Header
  2038  }
  2039  
  2040  // List: Lists accelerator types supported by this API.
  2041  //
  2042  // - parent: The parent resource name.
  2043  func (r *ProjectsLocationsAcceleratorTypesService) List(parent string) *ProjectsLocationsAcceleratorTypesListCall {
  2044  	c := &ProjectsLocationsAcceleratorTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2045  	c.parent = parent
  2046  	return c
  2047  }
  2048  
  2049  // Filter sets the optional parameter "filter": List filter.
  2050  func (c *ProjectsLocationsAcceleratorTypesListCall) Filter(filter string) *ProjectsLocationsAcceleratorTypesListCall {
  2051  	c.urlParams_.Set("filter", filter)
  2052  	return c
  2053  }
  2054  
  2055  // OrderBy sets the optional parameter "orderBy": Sort results.
  2056  func (c *ProjectsLocationsAcceleratorTypesListCall) OrderBy(orderBy string) *ProjectsLocationsAcceleratorTypesListCall {
  2057  	c.urlParams_.Set("orderBy", orderBy)
  2058  	return c
  2059  }
  2060  
  2061  // PageSize sets the optional parameter "pageSize": The maximum number of items
  2062  // to return.
  2063  func (c *ProjectsLocationsAcceleratorTypesListCall) PageSize(pageSize int64) *ProjectsLocationsAcceleratorTypesListCall {
  2064  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2065  	return c
  2066  }
  2067  
  2068  // PageToken sets the optional parameter "pageToken": The next_page_token value
  2069  // returned from a previous List request, if any.
  2070  func (c *ProjectsLocationsAcceleratorTypesListCall) PageToken(pageToken string) *ProjectsLocationsAcceleratorTypesListCall {
  2071  	c.urlParams_.Set("pageToken", pageToken)
  2072  	return c
  2073  }
  2074  
  2075  // Fields allows partial responses to be retrieved. See
  2076  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2077  // details.
  2078  func (c *ProjectsLocationsAcceleratorTypesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAcceleratorTypesListCall {
  2079  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2080  	return c
  2081  }
  2082  
  2083  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2084  // object's ETag matches the given value. This is useful for getting updates
  2085  // only after the object has changed since the last request.
  2086  func (c *ProjectsLocationsAcceleratorTypesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAcceleratorTypesListCall {
  2087  	c.ifNoneMatch_ = entityTag
  2088  	return c
  2089  }
  2090  
  2091  // Context sets the context to be used in this call's Do method.
  2092  func (c *ProjectsLocationsAcceleratorTypesListCall) Context(ctx context.Context) *ProjectsLocationsAcceleratorTypesListCall {
  2093  	c.ctx_ = ctx
  2094  	return c
  2095  }
  2096  
  2097  // Header returns a http.Header that can be modified by the caller to add
  2098  // headers to the request.
  2099  func (c *ProjectsLocationsAcceleratorTypesListCall) Header() http.Header {
  2100  	if c.header_ == nil {
  2101  		c.header_ = make(http.Header)
  2102  	}
  2103  	return c.header_
  2104  }
  2105  
  2106  func (c *ProjectsLocationsAcceleratorTypesListCall) doRequest(alt string) (*http.Response, error) {
  2107  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2108  	if c.ifNoneMatch_ != "" {
  2109  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2110  	}
  2111  	var body io.Reader = nil
  2112  	c.urlParams_.Set("alt", alt)
  2113  	c.urlParams_.Set("prettyPrint", "false")
  2114  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/acceleratorTypes")
  2115  	urls += "?" + c.urlParams_.Encode()
  2116  	req, err := http.NewRequest("GET", urls, body)
  2117  	if err != nil {
  2118  		return nil, err
  2119  	}
  2120  	req.Header = reqHeaders
  2121  	googleapi.Expand(req.URL, map[string]string{
  2122  		"parent": c.parent,
  2123  	})
  2124  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2125  }
  2126  
  2127  // Do executes the "tpu.projects.locations.acceleratorTypes.list" call.
  2128  // Any non-2xx status code is an error. Response headers are in either
  2129  // *ListAcceleratorTypesResponse.ServerResponse.Header or (if a response was
  2130  // returned at all) in error.(*googleapi.Error).Header. Use
  2131  // googleapi.IsNotModified to check whether the returned error was because
  2132  // http.StatusNotModified was returned.
  2133  func (c *ProjectsLocationsAcceleratorTypesListCall) Do(opts ...googleapi.CallOption) (*ListAcceleratorTypesResponse, error) {
  2134  	gensupport.SetOptions(c.urlParams_, opts...)
  2135  	res, err := c.doRequest("json")
  2136  	if res != nil && res.StatusCode == http.StatusNotModified {
  2137  		if res.Body != nil {
  2138  			res.Body.Close()
  2139  		}
  2140  		return nil, gensupport.WrapError(&googleapi.Error{
  2141  			Code:   res.StatusCode,
  2142  			Header: res.Header,
  2143  		})
  2144  	}
  2145  	if err != nil {
  2146  		return nil, err
  2147  	}
  2148  	defer googleapi.CloseBody(res)
  2149  	if err := googleapi.CheckResponse(res); err != nil {
  2150  		return nil, gensupport.WrapError(err)
  2151  	}
  2152  	ret := &ListAcceleratorTypesResponse{
  2153  		ServerResponse: googleapi.ServerResponse{
  2154  			Header:         res.Header,
  2155  			HTTPStatusCode: res.StatusCode,
  2156  		},
  2157  	}
  2158  	target := &ret
  2159  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2160  		return nil, err
  2161  	}
  2162  	return ret, nil
  2163  }
  2164  
  2165  // Pages invokes f for each page of results.
  2166  // A non-nil error returned from f will halt the iteration.
  2167  // The provided context supersedes any context provided to the Context method.
  2168  func (c *ProjectsLocationsAcceleratorTypesListCall) Pages(ctx context.Context, f func(*ListAcceleratorTypesResponse) error) error {
  2169  	c.ctx_ = ctx
  2170  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  2171  	for {
  2172  		x, err := c.Do()
  2173  		if err != nil {
  2174  			return err
  2175  		}
  2176  		if err := f(x); err != nil {
  2177  			return err
  2178  		}
  2179  		if x.NextPageToken == "" {
  2180  			return nil
  2181  		}
  2182  		c.PageToken(x.NextPageToken)
  2183  	}
  2184  }
  2185  
  2186  type ProjectsLocationsNodesCreateCall struct {
  2187  	s          *Service
  2188  	parent     string
  2189  	node       *Node
  2190  	urlParams_ gensupport.URLParams
  2191  	ctx_       context.Context
  2192  	header_    http.Header
  2193  }
  2194  
  2195  // Create: Creates a node.
  2196  //
  2197  // - parent: The parent resource name.
  2198  func (r *ProjectsLocationsNodesService) Create(parent string, node *Node) *ProjectsLocationsNodesCreateCall {
  2199  	c := &ProjectsLocationsNodesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2200  	c.parent = parent
  2201  	c.node = node
  2202  	return c
  2203  }
  2204  
  2205  // NodeId sets the optional parameter "nodeId": The unqualified resource name.
  2206  func (c *ProjectsLocationsNodesCreateCall) NodeId(nodeId string) *ProjectsLocationsNodesCreateCall {
  2207  	c.urlParams_.Set("nodeId", nodeId)
  2208  	return c
  2209  }
  2210  
  2211  // Fields allows partial responses to be retrieved. See
  2212  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2213  // details.
  2214  func (c *ProjectsLocationsNodesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsNodesCreateCall {
  2215  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2216  	return c
  2217  }
  2218  
  2219  // Context sets the context to be used in this call's Do method.
  2220  func (c *ProjectsLocationsNodesCreateCall) Context(ctx context.Context) *ProjectsLocationsNodesCreateCall {
  2221  	c.ctx_ = ctx
  2222  	return c
  2223  }
  2224  
  2225  // Header returns a http.Header that can be modified by the caller to add
  2226  // headers to the request.
  2227  func (c *ProjectsLocationsNodesCreateCall) Header() http.Header {
  2228  	if c.header_ == nil {
  2229  		c.header_ = make(http.Header)
  2230  	}
  2231  	return c.header_
  2232  }
  2233  
  2234  func (c *ProjectsLocationsNodesCreateCall) doRequest(alt string) (*http.Response, error) {
  2235  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2236  	var body io.Reader = nil
  2237  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.node)
  2238  	if err != nil {
  2239  		return nil, err
  2240  	}
  2241  	c.urlParams_.Set("alt", alt)
  2242  	c.urlParams_.Set("prettyPrint", "false")
  2243  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/nodes")
  2244  	urls += "?" + c.urlParams_.Encode()
  2245  	req, err := http.NewRequest("POST", urls, body)
  2246  	if err != nil {
  2247  		return nil, err
  2248  	}
  2249  	req.Header = reqHeaders
  2250  	googleapi.Expand(req.URL, map[string]string{
  2251  		"parent": c.parent,
  2252  	})
  2253  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2254  }
  2255  
  2256  // Do executes the "tpu.projects.locations.nodes.create" call.
  2257  // Any non-2xx status code is an error. Response headers are in either
  2258  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  2259  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2260  // whether the returned error was because http.StatusNotModified was returned.
  2261  func (c *ProjectsLocationsNodesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2262  	gensupport.SetOptions(c.urlParams_, opts...)
  2263  	res, err := c.doRequest("json")
  2264  	if res != nil && res.StatusCode == http.StatusNotModified {
  2265  		if res.Body != nil {
  2266  			res.Body.Close()
  2267  		}
  2268  		return nil, gensupport.WrapError(&googleapi.Error{
  2269  			Code:   res.StatusCode,
  2270  			Header: res.Header,
  2271  		})
  2272  	}
  2273  	if err != nil {
  2274  		return nil, err
  2275  	}
  2276  	defer googleapi.CloseBody(res)
  2277  	if err := googleapi.CheckResponse(res); err != nil {
  2278  		return nil, gensupport.WrapError(err)
  2279  	}
  2280  	ret := &Operation{
  2281  		ServerResponse: googleapi.ServerResponse{
  2282  			Header:         res.Header,
  2283  			HTTPStatusCode: res.StatusCode,
  2284  		},
  2285  	}
  2286  	target := &ret
  2287  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2288  		return nil, err
  2289  	}
  2290  	return ret, nil
  2291  }
  2292  
  2293  type ProjectsLocationsNodesDeleteCall struct {
  2294  	s          *Service
  2295  	name       string
  2296  	urlParams_ gensupport.URLParams
  2297  	ctx_       context.Context
  2298  	header_    http.Header
  2299  }
  2300  
  2301  // Delete: Deletes a node.
  2302  //
  2303  // - name: The resource name.
  2304  func (r *ProjectsLocationsNodesService) Delete(name string) *ProjectsLocationsNodesDeleteCall {
  2305  	c := &ProjectsLocationsNodesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2306  	c.name = name
  2307  	return c
  2308  }
  2309  
  2310  // Fields allows partial responses to be retrieved. See
  2311  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2312  // details.
  2313  func (c *ProjectsLocationsNodesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsNodesDeleteCall {
  2314  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2315  	return c
  2316  }
  2317  
  2318  // Context sets the context to be used in this call's Do method.
  2319  func (c *ProjectsLocationsNodesDeleteCall) Context(ctx context.Context) *ProjectsLocationsNodesDeleteCall {
  2320  	c.ctx_ = ctx
  2321  	return c
  2322  }
  2323  
  2324  // Header returns a http.Header that can be modified by the caller to add
  2325  // headers to the request.
  2326  func (c *ProjectsLocationsNodesDeleteCall) Header() http.Header {
  2327  	if c.header_ == nil {
  2328  		c.header_ = make(http.Header)
  2329  	}
  2330  	return c.header_
  2331  }
  2332  
  2333  func (c *ProjectsLocationsNodesDeleteCall) doRequest(alt string) (*http.Response, error) {
  2334  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2335  	var body io.Reader = nil
  2336  	c.urlParams_.Set("alt", alt)
  2337  	c.urlParams_.Set("prettyPrint", "false")
  2338  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  2339  	urls += "?" + c.urlParams_.Encode()
  2340  	req, err := http.NewRequest("DELETE", urls, body)
  2341  	if err != nil {
  2342  		return nil, err
  2343  	}
  2344  	req.Header = reqHeaders
  2345  	googleapi.Expand(req.URL, map[string]string{
  2346  		"name": c.name,
  2347  	})
  2348  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2349  }
  2350  
  2351  // Do executes the "tpu.projects.locations.nodes.delete" call.
  2352  // Any non-2xx status code is an error. Response headers are in either
  2353  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  2354  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2355  // whether the returned error was because http.StatusNotModified was returned.
  2356  func (c *ProjectsLocationsNodesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2357  	gensupport.SetOptions(c.urlParams_, opts...)
  2358  	res, err := c.doRequest("json")
  2359  	if res != nil && res.StatusCode == http.StatusNotModified {
  2360  		if res.Body != nil {
  2361  			res.Body.Close()
  2362  		}
  2363  		return nil, gensupport.WrapError(&googleapi.Error{
  2364  			Code:   res.StatusCode,
  2365  			Header: res.Header,
  2366  		})
  2367  	}
  2368  	if err != nil {
  2369  		return nil, err
  2370  	}
  2371  	defer googleapi.CloseBody(res)
  2372  	if err := googleapi.CheckResponse(res); err != nil {
  2373  		return nil, gensupport.WrapError(err)
  2374  	}
  2375  	ret := &Operation{
  2376  		ServerResponse: googleapi.ServerResponse{
  2377  			Header:         res.Header,
  2378  			HTTPStatusCode: res.StatusCode,
  2379  		},
  2380  	}
  2381  	target := &ret
  2382  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2383  		return nil, err
  2384  	}
  2385  	return ret, nil
  2386  }
  2387  
  2388  type ProjectsLocationsNodesGetCall struct {
  2389  	s            *Service
  2390  	name         string
  2391  	urlParams_   gensupport.URLParams
  2392  	ifNoneMatch_ string
  2393  	ctx_         context.Context
  2394  	header_      http.Header
  2395  }
  2396  
  2397  // Get: Gets the details of a node.
  2398  //
  2399  // - name: The resource name.
  2400  func (r *ProjectsLocationsNodesService) Get(name string) *ProjectsLocationsNodesGetCall {
  2401  	c := &ProjectsLocationsNodesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2402  	c.name = name
  2403  	return c
  2404  }
  2405  
  2406  // Fields allows partial responses to be retrieved. See
  2407  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2408  // details.
  2409  func (c *ProjectsLocationsNodesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNodesGetCall {
  2410  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2411  	return c
  2412  }
  2413  
  2414  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2415  // object's ETag matches the given value. This is useful for getting updates
  2416  // only after the object has changed since the last request.
  2417  func (c *ProjectsLocationsNodesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNodesGetCall {
  2418  	c.ifNoneMatch_ = entityTag
  2419  	return c
  2420  }
  2421  
  2422  // Context sets the context to be used in this call's Do method.
  2423  func (c *ProjectsLocationsNodesGetCall) Context(ctx context.Context) *ProjectsLocationsNodesGetCall {
  2424  	c.ctx_ = ctx
  2425  	return c
  2426  }
  2427  
  2428  // Header returns a http.Header that can be modified by the caller to add
  2429  // headers to the request.
  2430  func (c *ProjectsLocationsNodesGetCall) Header() http.Header {
  2431  	if c.header_ == nil {
  2432  		c.header_ = make(http.Header)
  2433  	}
  2434  	return c.header_
  2435  }
  2436  
  2437  func (c *ProjectsLocationsNodesGetCall) doRequest(alt string) (*http.Response, error) {
  2438  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2439  	if c.ifNoneMatch_ != "" {
  2440  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2441  	}
  2442  	var body io.Reader = nil
  2443  	c.urlParams_.Set("alt", alt)
  2444  	c.urlParams_.Set("prettyPrint", "false")
  2445  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  2446  	urls += "?" + c.urlParams_.Encode()
  2447  	req, err := http.NewRequest("GET", urls, body)
  2448  	if err != nil {
  2449  		return nil, err
  2450  	}
  2451  	req.Header = reqHeaders
  2452  	googleapi.Expand(req.URL, map[string]string{
  2453  		"name": c.name,
  2454  	})
  2455  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2456  }
  2457  
  2458  // Do executes the "tpu.projects.locations.nodes.get" call.
  2459  // Any non-2xx status code is an error. Response headers are in either
  2460  // *Node.ServerResponse.Header or (if a response was returned at all) in
  2461  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2462  // whether the returned error was because http.StatusNotModified was returned.
  2463  func (c *ProjectsLocationsNodesGetCall) Do(opts ...googleapi.CallOption) (*Node, error) {
  2464  	gensupport.SetOptions(c.urlParams_, opts...)
  2465  	res, err := c.doRequest("json")
  2466  	if res != nil && res.StatusCode == http.StatusNotModified {
  2467  		if res.Body != nil {
  2468  			res.Body.Close()
  2469  		}
  2470  		return nil, gensupport.WrapError(&googleapi.Error{
  2471  			Code:   res.StatusCode,
  2472  			Header: res.Header,
  2473  		})
  2474  	}
  2475  	if err != nil {
  2476  		return nil, err
  2477  	}
  2478  	defer googleapi.CloseBody(res)
  2479  	if err := googleapi.CheckResponse(res); err != nil {
  2480  		return nil, gensupport.WrapError(err)
  2481  	}
  2482  	ret := &Node{
  2483  		ServerResponse: googleapi.ServerResponse{
  2484  			Header:         res.Header,
  2485  			HTTPStatusCode: res.StatusCode,
  2486  		},
  2487  	}
  2488  	target := &ret
  2489  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2490  		return nil, err
  2491  	}
  2492  	return ret, nil
  2493  }
  2494  
  2495  type ProjectsLocationsNodesGetGuestAttributesCall struct {
  2496  	s                         *Service
  2497  	name                      string
  2498  	getguestattributesrequest *GetGuestAttributesRequest
  2499  	urlParams_                gensupport.URLParams
  2500  	ctx_                      context.Context
  2501  	header_                   http.Header
  2502  }
  2503  
  2504  // GetGuestAttributes: Retrieves the guest attributes for the node.
  2505  //
  2506  // - name: The resource name.
  2507  func (r *ProjectsLocationsNodesService) GetGuestAttributes(name string, getguestattributesrequest *GetGuestAttributesRequest) *ProjectsLocationsNodesGetGuestAttributesCall {
  2508  	c := &ProjectsLocationsNodesGetGuestAttributesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2509  	c.name = name
  2510  	c.getguestattributesrequest = getguestattributesrequest
  2511  	return c
  2512  }
  2513  
  2514  // Fields allows partial responses to be retrieved. See
  2515  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2516  // details.
  2517  func (c *ProjectsLocationsNodesGetGuestAttributesCall) Fields(s ...googleapi.Field) *ProjectsLocationsNodesGetGuestAttributesCall {
  2518  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2519  	return c
  2520  }
  2521  
  2522  // Context sets the context to be used in this call's Do method.
  2523  func (c *ProjectsLocationsNodesGetGuestAttributesCall) Context(ctx context.Context) *ProjectsLocationsNodesGetGuestAttributesCall {
  2524  	c.ctx_ = ctx
  2525  	return c
  2526  }
  2527  
  2528  // Header returns a http.Header that can be modified by the caller to add
  2529  // headers to the request.
  2530  func (c *ProjectsLocationsNodesGetGuestAttributesCall) Header() http.Header {
  2531  	if c.header_ == nil {
  2532  		c.header_ = make(http.Header)
  2533  	}
  2534  	return c.header_
  2535  }
  2536  
  2537  func (c *ProjectsLocationsNodesGetGuestAttributesCall) doRequest(alt string) (*http.Response, error) {
  2538  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2539  	var body io.Reader = nil
  2540  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.getguestattributesrequest)
  2541  	if err != nil {
  2542  		return nil, err
  2543  	}
  2544  	c.urlParams_.Set("alt", alt)
  2545  	c.urlParams_.Set("prettyPrint", "false")
  2546  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:getGuestAttributes")
  2547  	urls += "?" + c.urlParams_.Encode()
  2548  	req, err := http.NewRequest("POST", urls, body)
  2549  	if err != nil {
  2550  		return nil, err
  2551  	}
  2552  	req.Header = reqHeaders
  2553  	googleapi.Expand(req.URL, map[string]string{
  2554  		"name": c.name,
  2555  	})
  2556  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2557  }
  2558  
  2559  // Do executes the "tpu.projects.locations.nodes.getGuestAttributes" call.
  2560  // Any non-2xx status code is an error. Response headers are in either
  2561  // *GetGuestAttributesResponse.ServerResponse.Header or (if a response was
  2562  // returned at all) in error.(*googleapi.Error).Header. Use
  2563  // googleapi.IsNotModified to check whether the returned error was because
  2564  // http.StatusNotModified was returned.
  2565  func (c *ProjectsLocationsNodesGetGuestAttributesCall) Do(opts ...googleapi.CallOption) (*GetGuestAttributesResponse, error) {
  2566  	gensupport.SetOptions(c.urlParams_, opts...)
  2567  	res, err := c.doRequest("json")
  2568  	if res != nil && res.StatusCode == http.StatusNotModified {
  2569  		if res.Body != nil {
  2570  			res.Body.Close()
  2571  		}
  2572  		return nil, gensupport.WrapError(&googleapi.Error{
  2573  			Code:   res.StatusCode,
  2574  			Header: res.Header,
  2575  		})
  2576  	}
  2577  	if err != nil {
  2578  		return nil, err
  2579  	}
  2580  	defer googleapi.CloseBody(res)
  2581  	if err := googleapi.CheckResponse(res); err != nil {
  2582  		return nil, gensupport.WrapError(err)
  2583  	}
  2584  	ret := &GetGuestAttributesResponse{
  2585  		ServerResponse: googleapi.ServerResponse{
  2586  			Header:         res.Header,
  2587  			HTTPStatusCode: res.StatusCode,
  2588  		},
  2589  	}
  2590  	target := &ret
  2591  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2592  		return nil, err
  2593  	}
  2594  	return ret, nil
  2595  }
  2596  
  2597  type ProjectsLocationsNodesListCall struct {
  2598  	s            *Service
  2599  	parent       string
  2600  	urlParams_   gensupport.URLParams
  2601  	ifNoneMatch_ string
  2602  	ctx_         context.Context
  2603  	header_      http.Header
  2604  }
  2605  
  2606  // List: Lists nodes.
  2607  //
  2608  // - parent: The parent resource name.
  2609  func (r *ProjectsLocationsNodesService) List(parent string) *ProjectsLocationsNodesListCall {
  2610  	c := &ProjectsLocationsNodesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2611  	c.parent = parent
  2612  	return c
  2613  }
  2614  
  2615  // PageSize sets the optional parameter "pageSize": The maximum number of items
  2616  // to return.
  2617  func (c *ProjectsLocationsNodesListCall) PageSize(pageSize int64) *ProjectsLocationsNodesListCall {
  2618  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2619  	return c
  2620  }
  2621  
  2622  // PageToken sets the optional parameter "pageToken": The next_page_token value
  2623  // returned from a previous List request, if any.
  2624  func (c *ProjectsLocationsNodesListCall) PageToken(pageToken string) *ProjectsLocationsNodesListCall {
  2625  	c.urlParams_.Set("pageToken", pageToken)
  2626  	return c
  2627  }
  2628  
  2629  // Fields allows partial responses to be retrieved. See
  2630  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2631  // details.
  2632  func (c *ProjectsLocationsNodesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNodesListCall {
  2633  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2634  	return c
  2635  }
  2636  
  2637  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2638  // object's ETag matches the given value. This is useful for getting updates
  2639  // only after the object has changed since the last request.
  2640  func (c *ProjectsLocationsNodesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNodesListCall {
  2641  	c.ifNoneMatch_ = entityTag
  2642  	return c
  2643  }
  2644  
  2645  // Context sets the context to be used in this call's Do method.
  2646  func (c *ProjectsLocationsNodesListCall) Context(ctx context.Context) *ProjectsLocationsNodesListCall {
  2647  	c.ctx_ = ctx
  2648  	return c
  2649  }
  2650  
  2651  // Header returns a http.Header that can be modified by the caller to add
  2652  // headers to the request.
  2653  func (c *ProjectsLocationsNodesListCall) Header() http.Header {
  2654  	if c.header_ == nil {
  2655  		c.header_ = make(http.Header)
  2656  	}
  2657  	return c.header_
  2658  }
  2659  
  2660  func (c *ProjectsLocationsNodesListCall) doRequest(alt string) (*http.Response, error) {
  2661  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2662  	if c.ifNoneMatch_ != "" {
  2663  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2664  	}
  2665  	var body io.Reader = nil
  2666  	c.urlParams_.Set("alt", alt)
  2667  	c.urlParams_.Set("prettyPrint", "false")
  2668  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/nodes")
  2669  	urls += "?" + c.urlParams_.Encode()
  2670  	req, err := http.NewRequest("GET", urls, body)
  2671  	if err != nil {
  2672  		return nil, err
  2673  	}
  2674  	req.Header = reqHeaders
  2675  	googleapi.Expand(req.URL, map[string]string{
  2676  		"parent": c.parent,
  2677  	})
  2678  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2679  }
  2680  
  2681  // Do executes the "tpu.projects.locations.nodes.list" call.
  2682  // Any non-2xx status code is an error. Response headers are in either
  2683  // *ListNodesResponse.ServerResponse.Header or (if a response was returned at
  2684  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2685  // check whether the returned error was because http.StatusNotModified was
  2686  // returned.
  2687  func (c *ProjectsLocationsNodesListCall) Do(opts ...googleapi.CallOption) (*ListNodesResponse, error) {
  2688  	gensupport.SetOptions(c.urlParams_, opts...)
  2689  	res, err := c.doRequest("json")
  2690  	if res != nil && res.StatusCode == http.StatusNotModified {
  2691  		if res.Body != nil {
  2692  			res.Body.Close()
  2693  		}
  2694  		return nil, gensupport.WrapError(&googleapi.Error{
  2695  			Code:   res.StatusCode,
  2696  			Header: res.Header,
  2697  		})
  2698  	}
  2699  	if err != nil {
  2700  		return nil, err
  2701  	}
  2702  	defer googleapi.CloseBody(res)
  2703  	if err := googleapi.CheckResponse(res); err != nil {
  2704  		return nil, gensupport.WrapError(err)
  2705  	}
  2706  	ret := &ListNodesResponse{
  2707  		ServerResponse: googleapi.ServerResponse{
  2708  			Header:         res.Header,
  2709  			HTTPStatusCode: res.StatusCode,
  2710  		},
  2711  	}
  2712  	target := &ret
  2713  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2714  		return nil, err
  2715  	}
  2716  	return ret, nil
  2717  }
  2718  
  2719  // Pages invokes f for each page of results.
  2720  // A non-nil error returned from f will halt the iteration.
  2721  // The provided context supersedes any context provided to the Context method.
  2722  func (c *ProjectsLocationsNodesListCall) Pages(ctx context.Context, f func(*ListNodesResponse) error) error {
  2723  	c.ctx_ = ctx
  2724  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  2725  	for {
  2726  		x, err := c.Do()
  2727  		if err != nil {
  2728  			return err
  2729  		}
  2730  		if err := f(x); err != nil {
  2731  			return err
  2732  		}
  2733  		if x.NextPageToken == "" {
  2734  			return nil
  2735  		}
  2736  		c.PageToken(x.NextPageToken)
  2737  	}
  2738  }
  2739  
  2740  type ProjectsLocationsNodesPatchCall struct {
  2741  	s          *Service
  2742  	name       string
  2743  	node       *Node
  2744  	urlParams_ gensupport.URLParams
  2745  	ctx_       context.Context
  2746  	header_    http.Header
  2747  }
  2748  
  2749  // Patch: Updates the configurations of a node.
  2750  //
  2751  // - name: Output only. Immutable. The name of the TPU.
  2752  func (r *ProjectsLocationsNodesService) Patch(name string, node *Node) *ProjectsLocationsNodesPatchCall {
  2753  	c := &ProjectsLocationsNodesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2754  	c.name = name
  2755  	c.node = node
  2756  	return c
  2757  }
  2758  
  2759  // UpdateMask sets the optional parameter "updateMask": Required. Mask of
  2760  // fields from Node to update. Supported fields: [description, tags, labels,
  2761  // metadata, network_config.enable_external_ips].
  2762  func (c *ProjectsLocationsNodesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsNodesPatchCall {
  2763  	c.urlParams_.Set("updateMask", updateMask)
  2764  	return c
  2765  }
  2766  
  2767  // Fields allows partial responses to be retrieved. See
  2768  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2769  // details.
  2770  func (c *ProjectsLocationsNodesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsNodesPatchCall {
  2771  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2772  	return c
  2773  }
  2774  
  2775  // Context sets the context to be used in this call's Do method.
  2776  func (c *ProjectsLocationsNodesPatchCall) Context(ctx context.Context) *ProjectsLocationsNodesPatchCall {
  2777  	c.ctx_ = ctx
  2778  	return c
  2779  }
  2780  
  2781  // Header returns a http.Header that can be modified by the caller to add
  2782  // headers to the request.
  2783  func (c *ProjectsLocationsNodesPatchCall) Header() http.Header {
  2784  	if c.header_ == nil {
  2785  		c.header_ = make(http.Header)
  2786  	}
  2787  	return c.header_
  2788  }
  2789  
  2790  func (c *ProjectsLocationsNodesPatchCall) doRequest(alt string) (*http.Response, error) {
  2791  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2792  	var body io.Reader = nil
  2793  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.node)
  2794  	if err != nil {
  2795  		return nil, err
  2796  	}
  2797  	c.urlParams_.Set("alt", alt)
  2798  	c.urlParams_.Set("prettyPrint", "false")
  2799  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  2800  	urls += "?" + c.urlParams_.Encode()
  2801  	req, err := http.NewRequest("PATCH", urls, body)
  2802  	if err != nil {
  2803  		return nil, err
  2804  	}
  2805  	req.Header = reqHeaders
  2806  	googleapi.Expand(req.URL, map[string]string{
  2807  		"name": c.name,
  2808  	})
  2809  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2810  }
  2811  
  2812  // Do executes the "tpu.projects.locations.nodes.patch" call.
  2813  // Any non-2xx status code is an error. Response headers are in either
  2814  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  2815  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2816  // whether the returned error was because http.StatusNotModified was returned.
  2817  func (c *ProjectsLocationsNodesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2818  	gensupport.SetOptions(c.urlParams_, opts...)
  2819  	res, err := c.doRequest("json")
  2820  	if res != nil && res.StatusCode == http.StatusNotModified {
  2821  		if res.Body != nil {
  2822  			res.Body.Close()
  2823  		}
  2824  		return nil, gensupport.WrapError(&googleapi.Error{
  2825  			Code:   res.StatusCode,
  2826  			Header: res.Header,
  2827  		})
  2828  	}
  2829  	if err != nil {
  2830  		return nil, err
  2831  	}
  2832  	defer googleapi.CloseBody(res)
  2833  	if err := googleapi.CheckResponse(res); err != nil {
  2834  		return nil, gensupport.WrapError(err)
  2835  	}
  2836  	ret := &Operation{
  2837  		ServerResponse: googleapi.ServerResponse{
  2838  			Header:         res.Header,
  2839  			HTTPStatusCode: res.StatusCode,
  2840  		},
  2841  	}
  2842  	target := &ret
  2843  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2844  		return nil, err
  2845  	}
  2846  	return ret, nil
  2847  }
  2848  
  2849  type ProjectsLocationsNodesStartCall struct {
  2850  	s                *Service
  2851  	name             string
  2852  	startnoderequest *StartNodeRequest
  2853  	urlParams_       gensupport.URLParams
  2854  	ctx_             context.Context
  2855  	header_          http.Header
  2856  }
  2857  
  2858  // Start: Starts a node.
  2859  //
  2860  // - name: The resource name.
  2861  func (r *ProjectsLocationsNodesService) Start(name string, startnoderequest *StartNodeRequest) *ProjectsLocationsNodesStartCall {
  2862  	c := &ProjectsLocationsNodesStartCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2863  	c.name = name
  2864  	c.startnoderequest = startnoderequest
  2865  	return c
  2866  }
  2867  
  2868  // Fields allows partial responses to be retrieved. See
  2869  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2870  // details.
  2871  func (c *ProjectsLocationsNodesStartCall) Fields(s ...googleapi.Field) *ProjectsLocationsNodesStartCall {
  2872  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2873  	return c
  2874  }
  2875  
  2876  // Context sets the context to be used in this call's Do method.
  2877  func (c *ProjectsLocationsNodesStartCall) Context(ctx context.Context) *ProjectsLocationsNodesStartCall {
  2878  	c.ctx_ = ctx
  2879  	return c
  2880  }
  2881  
  2882  // Header returns a http.Header that can be modified by the caller to add
  2883  // headers to the request.
  2884  func (c *ProjectsLocationsNodesStartCall) Header() http.Header {
  2885  	if c.header_ == nil {
  2886  		c.header_ = make(http.Header)
  2887  	}
  2888  	return c.header_
  2889  }
  2890  
  2891  func (c *ProjectsLocationsNodesStartCall) doRequest(alt string) (*http.Response, error) {
  2892  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2893  	var body io.Reader = nil
  2894  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.startnoderequest)
  2895  	if err != nil {
  2896  		return nil, err
  2897  	}
  2898  	c.urlParams_.Set("alt", alt)
  2899  	c.urlParams_.Set("prettyPrint", "false")
  2900  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:start")
  2901  	urls += "?" + c.urlParams_.Encode()
  2902  	req, err := http.NewRequest("POST", urls, body)
  2903  	if err != nil {
  2904  		return nil, err
  2905  	}
  2906  	req.Header = reqHeaders
  2907  	googleapi.Expand(req.URL, map[string]string{
  2908  		"name": c.name,
  2909  	})
  2910  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2911  }
  2912  
  2913  // Do executes the "tpu.projects.locations.nodes.start" call.
  2914  // Any non-2xx status code is an error. Response headers are in either
  2915  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  2916  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2917  // whether the returned error was because http.StatusNotModified was returned.
  2918  func (c *ProjectsLocationsNodesStartCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2919  	gensupport.SetOptions(c.urlParams_, opts...)
  2920  	res, err := c.doRequest("json")
  2921  	if res != nil && res.StatusCode == http.StatusNotModified {
  2922  		if res.Body != nil {
  2923  			res.Body.Close()
  2924  		}
  2925  		return nil, gensupport.WrapError(&googleapi.Error{
  2926  			Code:   res.StatusCode,
  2927  			Header: res.Header,
  2928  		})
  2929  	}
  2930  	if err != nil {
  2931  		return nil, err
  2932  	}
  2933  	defer googleapi.CloseBody(res)
  2934  	if err := googleapi.CheckResponse(res); err != nil {
  2935  		return nil, gensupport.WrapError(err)
  2936  	}
  2937  	ret := &Operation{
  2938  		ServerResponse: googleapi.ServerResponse{
  2939  			Header:         res.Header,
  2940  			HTTPStatusCode: res.StatusCode,
  2941  		},
  2942  	}
  2943  	target := &ret
  2944  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2945  		return nil, err
  2946  	}
  2947  	return ret, nil
  2948  }
  2949  
  2950  type ProjectsLocationsNodesStopCall struct {
  2951  	s               *Service
  2952  	name            string
  2953  	stopnoderequest *StopNodeRequest
  2954  	urlParams_      gensupport.URLParams
  2955  	ctx_            context.Context
  2956  	header_         http.Header
  2957  }
  2958  
  2959  // Stop: Stops a node. This operation is only available with single TPU nodes.
  2960  //
  2961  // - name: The resource name.
  2962  func (r *ProjectsLocationsNodesService) Stop(name string, stopnoderequest *StopNodeRequest) *ProjectsLocationsNodesStopCall {
  2963  	c := &ProjectsLocationsNodesStopCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2964  	c.name = name
  2965  	c.stopnoderequest = stopnoderequest
  2966  	return c
  2967  }
  2968  
  2969  // Fields allows partial responses to be retrieved. See
  2970  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2971  // details.
  2972  func (c *ProjectsLocationsNodesStopCall) Fields(s ...googleapi.Field) *ProjectsLocationsNodesStopCall {
  2973  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2974  	return c
  2975  }
  2976  
  2977  // Context sets the context to be used in this call's Do method.
  2978  func (c *ProjectsLocationsNodesStopCall) Context(ctx context.Context) *ProjectsLocationsNodesStopCall {
  2979  	c.ctx_ = ctx
  2980  	return c
  2981  }
  2982  
  2983  // Header returns a http.Header that can be modified by the caller to add
  2984  // headers to the request.
  2985  func (c *ProjectsLocationsNodesStopCall) Header() http.Header {
  2986  	if c.header_ == nil {
  2987  		c.header_ = make(http.Header)
  2988  	}
  2989  	return c.header_
  2990  }
  2991  
  2992  func (c *ProjectsLocationsNodesStopCall) doRequest(alt string) (*http.Response, error) {
  2993  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2994  	var body io.Reader = nil
  2995  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.stopnoderequest)
  2996  	if err != nil {
  2997  		return nil, err
  2998  	}
  2999  	c.urlParams_.Set("alt", alt)
  3000  	c.urlParams_.Set("prettyPrint", "false")
  3001  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:stop")
  3002  	urls += "?" + c.urlParams_.Encode()
  3003  	req, err := http.NewRequest("POST", urls, body)
  3004  	if err != nil {
  3005  		return nil, err
  3006  	}
  3007  	req.Header = reqHeaders
  3008  	googleapi.Expand(req.URL, map[string]string{
  3009  		"name": c.name,
  3010  	})
  3011  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3012  }
  3013  
  3014  // Do executes the "tpu.projects.locations.nodes.stop" call.
  3015  // Any non-2xx status code is an error. Response headers are in either
  3016  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3017  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3018  // whether the returned error was because http.StatusNotModified was returned.
  3019  func (c *ProjectsLocationsNodesStopCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3020  	gensupport.SetOptions(c.urlParams_, opts...)
  3021  	res, err := c.doRequest("json")
  3022  	if res != nil && res.StatusCode == http.StatusNotModified {
  3023  		if res.Body != nil {
  3024  			res.Body.Close()
  3025  		}
  3026  		return nil, gensupport.WrapError(&googleapi.Error{
  3027  			Code:   res.StatusCode,
  3028  			Header: res.Header,
  3029  		})
  3030  	}
  3031  	if err != nil {
  3032  		return nil, err
  3033  	}
  3034  	defer googleapi.CloseBody(res)
  3035  	if err := googleapi.CheckResponse(res); err != nil {
  3036  		return nil, gensupport.WrapError(err)
  3037  	}
  3038  	ret := &Operation{
  3039  		ServerResponse: googleapi.ServerResponse{
  3040  			Header:         res.Header,
  3041  			HTTPStatusCode: res.StatusCode,
  3042  		},
  3043  	}
  3044  	target := &ret
  3045  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3046  		return nil, err
  3047  	}
  3048  	return ret, nil
  3049  }
  3050  
  3051  type ProjectsLocationsOperationsCancelCall struct {
  3052  	s          *Service
  3053  	name       string
  3054  	urlParams_ gensupport.URLParams
  3055  	ctx_       context.Context
  3056  	header_    http.Header
  3057  }
  3058  
  3059  // Cancel: Starts asynchronous cancellation on a long-running operation. The
  3060  // server makes a best effort to cancel the operation, but success is not
  3061  // guaranteed. If the server doesn't support this method, it returns
  3062  // `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or
  3063  // other methods to check whether the cancellation succeeded or whether the
  3064  // operation completed despite cancellation. On successful cancellation, the
  3065  // operation is not deleted; instead, it becomes an operation with an
  3066  // Operation.error value with a google.rpc.Status.code of 1, corresponding to
  3067  // `Code.CANCELLED`.
  3068  //
  3069  // - name: The name of the operation resource to be cancelled.
  3070  func (r *ProjectsLocationsOperationsService) Cancel(name string) *ProjectsLocationsOperationsCancelCall {
  3071  	c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3072  	c.name = name
  3073  	return c
  3074  }
  3075  
  3076  // Fields allows partial responses to be retrieved. See
  3077  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3078  // details.
  3079  func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
  3080  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3081  	return c
  3082  }
  3083  
  3084  // Context sets the context to be used in this call's Do method.
  3085  func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
  3086  	c.ctx_ = ctx
  3087  	return c
  3088  }
  3089  
  3090  // Header returns a http.Header that can be modified by the caller to add
  3091  // headers to the request.
  3092  func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
  3093  	if c.header_ == nil {
  3094  		c.header_ = make(http.Header)
  3095  	}
  3096  	return c.header_
  3097  }
  3098  
  3099  func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
  3100  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3101  	var body io.Reader = nil
  3102  	c.urlParams_.Set("alt", alt)
  3103  	c.urlParams_.Set("prettyPrint", "false")
  3104  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:cancel")
  3105  	urls += "?" + c.urlParams_.Encode()
  3106  	req, err := http.NewRequest("POST", urls, body)
  3107  	if err != nil {
  3108  		return nil, err
  3109  	}
  3110  	req.Header = reqHeaders
  3111  	googleapi.Expand(req.URL, map[string]string{
  3112  		"name": c.name,
  3113  	})
  3114  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3115  }
  3116  
  3117  // Do executes the "tpu.projects.locations.operations.cancel" call.
  3118  // Any non-2xx status code is an error. Response headers are in either
  3119  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  3120  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3121  // whether the returned error was because http.StatusNotModified was returned.
  3122  func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  3123  	gensupport.SetOptions(c.urlParams_, opts...)
  3124  	res, err := c.doRequest("json")
  3125  	if res != nil && res.StatusCode == http.StatusNotModified {
  3126  		if res.Body != nil {
  3127  			res.Body.Close()
  3128  		}
  3129  		return nil, gensupport.WrapError(&googleapi.Error{
  3130  			Code:   res.StatusCode,
  3131  			Header: res.Header,
  3132  		})
  3133  	}
  3134  	if err != nil {
  3135  		return nil, err
  3136  	}
  3137  	defer googleapi.CloseBody(res)
  3138  	if err := googleapi.CheckResponse(res); err != nil {
  3139  		return nil, gensupport.WrapError(err)
  3140  	}
  3141  	ret := &Empty{
  3142  		ServerResponse: googleapi.ServerResponse{
  3143  			Header:         res.Header,
  3144  			HTTPStatusCode: res.StatusCode,
  3145  		},
  3146  	}
  3147  	target := &ret
  3148  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3149  		return nil, err
  3150  	}
  3151  	return ret, nil
  3152  }
  3153  
  3154  type ProjectsLocationsOperationsDeleteCall struct {
  3155  	s          *Service
  3156  	name       string
  3157  	urlParams_ gensupport.URLParams
  3158  	ctx_       context.Context
  3159  	header_    http.Header
  3160  }
  3161  
  3162  // Delete: Deletes a long-running operation. This method indicates that the
  3163  // client is no longer interested in the operation result. It does not cancel
  3164  // the operation. If the server doesn't support this method, it returns
  3165  // `google.rpc.Code.UNIMPLEMENTED`.
  3166  //
  3167  // - name: The name of the operation resource to be deleted.
  3168  func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall {
  3169  	c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3170  	c.name = name
  3171  	return c
  3172  }
  3173  
  3174  // Fields allows partial responses to be retrieved. See
  3175  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3176  // details.
  3177  func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall {
  3178  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3179  	return c
  3180  }
  3181  
  3182  // Context sets the context to be used in this call's Do method.
  3183  func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall {
  3184  	c.ctx_ = ctx
  3185  	return c
  3186  }
  3187  
  3188  // Header returns a http.Header that can be modified by the caller to add
  3189  // headers to the request.
  3190  func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header {
  3191  	if c.header_ == nil {
  3192  		c.header_ = make(http.Header)
  3193  	}
  3194  	return c.header_
  3195  }
  3196  
  3197  func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
  3198  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3199  	var body io.Reader = nil
  3200  	c.urlParams_.Set("alt", alt)
  3201  	c.urlParams_.Set("prettyPrint", "false")
  3202  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  3203  	urls += "?" + c.urlParams_.Encode()
  3204  	req, err := http.NewRequest("DELETE", urls, body)
  3205  	if err != nil {
  3206  		return nil, err
  3207  	}
  3208  	req.Header = reqHeaders
  3209  	googleapi.Expand(req.URL, map[string]string{
  3210  		"name": c.name,
  3211  	})
  3212  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3213  }
  3214  
  3215  // Do executes the "tpu.projects.locations.operations.delete" call.
  3216  // Any non-2xx status code is an error. Response headers are in either
  3217  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  3218  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3219  // whether the returned error was because http.StatusNotModified was returned.
  3220  func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  3221  	gensupport.SetOptions(c.urlParams_, opts...)
  3222  	res, err := c.doRequest("json")
  3223  	if res != nil && res.StatusCode == http.StatusNotModified {
  3224  		if res.Body != nil {
  3225  			res.Body.Close()
  3226  		}
  3227  		return nil, gensupport.WrapError(&googleapi.Error{
  3228  			Code:   res.StatusCode,
  3229  			Header: res.Header,
  3230  		})
  3231  	}
  3232  	if err != nil {
  3233  		return nil, err
  3234  	}
  3235  	defer googleapi.CloseBody(res)
  3236  	if err := googleapi.CheckResponse(res); err != nil {
  3237  		return nil, gensupport.WrapError(err)
  3238  	}
  3239  	ret := &Empty{
  3240  		ServerResponse: googleapi.ServerResponse{
  3241  			Header:         res.Header,
  3242  			HTTPStatusCode: res.StatusCode,
  3243  		},
  3244  	}
  3245  	target := &ret
  3246  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3247  		return nil, err
  3248  	}
  3249  	return ret, nil
  3250  }
  3251  
  3252  type ProjectsLocationsOperationsGetCall struct {
  3253  	s            *Service
  3254  	name         string
  3255  	urlParams_   gensupport.URLParams
  3256  	ifNoneMatch_ string
  3257  	ctx_         context.Context
  3258  	header_      http.Header
  3259  }
  3260  
  3261  // Get: Gets the latest state of a long-running operation. Clients can use this
  3262  // method to poll the operation result at intervals as recommended by the API
  3263  // service.
  3264  //
  3265  // - name: The name of the operation resource.
  3266  func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
  3267  	c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3268  	c.name = name
  3269  	return c
  3270  }
  3271  
  3272  // Fields allows partial responses to be retrieved. See
  3273  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3274  // details.
  3275  func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
  3276  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3277  	return c
  3278  }
  3279  
  3280  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3281  // object's ETag matches the given value. This is useful for getting updates
  3282  // only after the object has changed since the last request.
  3283  func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
  3284  	c.ifNoneMatch_ = entityTag
  3285  	return c
  3286  }
  3287  
  3288  // Context sets the context to be used in this call's Do method.
  3289  func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
  3290  	c.ctx_ = ctx
  3291  	return c
  3292  }
  3293  
  3294  // Header returns a http.Header that can be modified by the caller to add
  3295  // headers to the request.
  3296  func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
  3297  	if c.header_ == nil {
  3298  		c.header_ = make(http.Header)
  3299  	}
  3300  	return c.header_
  3301  }
  3302  
  3303  func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  3304  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3305  	if c.ifNoneMatch_ != "" {
  3306  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3307  	}
  3308  	var body io.Reader = nil
  3309  	c.urlParams_.Set("alt", alt)
  3310  	c.urlParams_.Set("prettyPrint", "false")
  3311  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  3312  	urls += "?" + c.urlParams_.Encode()
  3313  	req, err := http.NewRequest("GET", urls, body)
  3314  	if err != nil {
  3315  		return nil, err
  3316  	}
  3317  	req.Header = reqHeaders
  3318  	googleapi.Expand(req.URL, map[string]string{
  3319  		"name": c.name,
  3320  	})
  3321  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3322  }
  3323  
  3324  // Do executes the "tpu.projects.locations.operations.get" call.
  3325  // Any non-2xx status code is an error. Response headers are in either
  3326  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3327  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3328  // whether the returned error was because http.StatusNotModified was returned.
  3329  func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3330  	gensupport.SetOptions(c.urlParams_, opts...)
  3331  	res, err := c.doRequest("json")
  3332  	if res != nil && res.StatusCode == http.StatusNotModified {
  3333  		if res.Body != nil {
  3334  			res.Body.Close()
  3335  		}
  3336  		return nil, gensupport.WrapError(&googleapi.Error{
  3337  			Code:   res.StatusCode,
  3338  			Header: res.Header,
  3339  		})
  3340  	}
  3341  	if err != nil {
  3342  		return nil, err
  3343  	}
  3344  	defer googleapi.CloseBody(res)
  3345  	if err := googleapi.CheckResponse(res); err != nil {
  3346  		return nil, gensupport.WrapError(err)
  3347  	}
  3348  	ret := &Operation{
  3349  		ServerResponse: googleapi.ServerResponse{
  3350  			Header:         res.Header,
  3351  			HTTPStatusCode: res.StatusCode,
  3352  		},
  3353  	}
  3354  	target := &ret
  3355  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3356  		return nil, err
  3357  	}
  3358  	return ret, nil
  3359  }
  3360  
  3361  type ProjectsLocationsOperationsListCall struct {
  3362  	s            *Service
  3363  	name         string
  3364  	urlParams_   gensupport.URLParams
  3365  	ifNoneMatch_ string
  3366  	ctx_         context.Context
  3367  	header_      http.Header
  3368  }
  3369  
  3370  // List: Lists operations that match the specified filter in the request. If
  3371  // the server doesn't support this method, it returns `UNIMPLEMENTED`.
  3372  //
  3373  // - name: The name of the operation's parent resource.
  3374  func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
  3375  	c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3376  	c.name = name
  3377  	return c
  3378  }
  3379  
  3380  // Filter sets the optional parameter "filter": The standard list filter.
  3381  func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
  3382  	c.urlParams_.Set("filter", filter)
  3383  	return c
  3384  }
  3385  
  3386  // PageSize sets the optional parameter "pageSize": The standard list page
  3387  // size.
  3388  func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
  3389  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3390  	return c
  3391  }
  3392  
  3393  // PageToken sets the optional parameter "pageToken": The standard list page
  3394  // token.
  3395  func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
  3396  	c.urlParams_.Set("pageToken", pageToken)
  3397  	return c
  3398  }
  3399  
  3400  // Fields allows partial responses to be retrieved. See
  3401  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3402  // details.
  3403  func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
  3404  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3405  	return c
  3406  }
  3407  
  3408  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3409  // object's ETag matches the given value. This is useful for getting updates
  3410  // only after the object has changed since the last request.
  3411  func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
  3412  	c.ifNoneMatch_ = entityTag
  3413  	return c
  3414  }
  3415  
  3416  // Context sets the context to be used in this call's Do method.
  3417  func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
  3418  	c.ctx_ = ctx
  3419  	return c
  3420  }
  3421  
  3422  // Header returns a http.Header that can be modified by the caller to add
  3423  // headers to the request.
  3424  func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
  3425  	if c.header_ == nil {
  3426  		c.header_ = make(http.Header)
  3427  	}
  3428  	return c.header_
  3429  }
  3430  
  3431  func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
  3432  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3433  	if c.ifNoneMatch_ != "" {
  3434  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3435  	}
  3436  	var body io.Reader = nil
  3437  	c.urlParams_.Set("alt", alt)
  3438  	c.urlParams_.Set("prettyPrint", "false")
  3439  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/operations")
  3440  	urls += "?" + c.urlParams_.Encode()
  3441  	req, err := http.NewRequest("GET", urls, body)
  3442  	if err != nil {
  3443  		return nil, err
  3444  	}
  3445  	req.Header = reqHeaders
  3446  	googleapi.Expand(req.URL, map[string]string{
  3447  		"name": c.name,
  3448  	})
  3449  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3450  }
  3451  
  3452  // Do executes the "tpu.projects.locations.operations.list" call.
  3453  // Any non-2xx status code is an error. Response headers are in either
  3454  // *ListOperationsResponse.ServerResponse.Header or (if a response was returned
  3455  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3456  // check whether the returned error was because http.StatusNotModified was
  3457  // returned.
  3458  func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
  3459  	gensupport.SetOptions(c.urlParams_, opts...)
  3460  	res, err := c.doRequest("json")
  3461  	if res != nil && res.StatusCode == http.StatusNotModified {
  3462  		if res.Body != nil {
  3463  			res.Body.Close()
  3464  		}
  3465  		return nil, gensupport.WrapError(&googleapi.Error{
  3466  			Code:   res.StatusCode,
  3467  			Header: res.Header,
  3468  		})
  3469  	}
  3470  	if err != nil {
  3471  		return nil, err
  3472  	}
  3473  	defer googleapi.CloseBody(res)
  3474  	if err := googleapi.CheckResponse(res); err != nil {
  3475  		return nil, gensupport.WrapError(err)
  3476  	}
  3477  	ret := &ListOperationsResponse{
  3478  		ServerResponse: googleapi.ServerResponse{
  3479  			Header:         res.Header,
  3480  			HTTPStatusCode: res.StatusCode,
  3481  		},
  3482  	}
  3483  	target := &ret
  3484  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3485  		return nil, err
  3486  	}
  3487  	return ret, nil
  3488  }
  3489  
  3490  // Pages invokes f for each page of results.
  3491  // A non-nil error returned from f will halt the iteration.
  3492  // The provided context supersedes any context provided to the Context method.
  3493  func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
  3494  	c.ctx_ = ctx
  3495  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3496  	for {
  3497  		x, err := c.Do()
  3498  		if err != nil {
  3499  			return err
  3500  		}
  3501  		if err := f(x); err != nil {
  3502  			return err
  3503  		}
  3504  		if x.NextPageToken == "" {
  3505  			return nil
  3506  		}
  3507  		c.PageToken(x.NextPageToken)
  3508  	}
  3509  }
  3510  
  3511  type ProjectsLocationsQueuedResourcesCreateCall struct {
  3512  	s              *Service
  3513  	parent         string
  3514  	queuedresource *QueuedResource
  3515  	urlParams_     gensupport.URLParams
  3516  	ctx_           context.Context
  3517  	header_        http.Header
  3518  }
  3519  
  3520  // Create: Creates a QueuedResource TPU instance.
  3521  //
  3522  // - parent: The parent resource name.
  3523  func (r *ProjectsLocationsQueuedResourcesService) Create(parent string, queuedresource *QueuedResource) *ProjectsLocationsQueuedResourcesCreateCall {
  3524  	c := &ProjectsLocationsQueuedResourcesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3525  	c.parent = parent
  3526  	c.queuedresource = queuedresource
  3527  	return c
  3528  }
  3529  
  3530  // QueuedResourceId sets the optional parameter "queuedResourceId": The
  3531  // unqualified resource name. Should follow the `^[A-Za-z0-9_.~+%-]+$` regex
  3532  // format.
  3533  func (c *ProjectsLocationsQueuedResourcesCreateCall) QueuedResourceId(queuedResourceId string) *ProjectsLocationsQueuedResourcesCreateCall {
  3534  	c.urlParams_.Set("queuedResourceId", queuedResourceId)
  3535  	return c
  3536  }
  3537  
  3538  // RequestId sets the optional parameter "requestId": Idempotent request UUID.
  3539  func (c *ProjectsLocationsQueuedResourcesCreateCall) RequestId(requestId string) *ProjectsLocationsQueuedResourcesCreateCall {
  3540  	c.urlParams_.Set("requestId", requestId)
  3541  	return c
  3542  }
  3543  
  3544  // Fields allows partial responses to be retrieved. See
  3545  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3546  // details.
  3547  func (c *ProjectsLocationsQueuedResourcesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsQueuedResourcesCreateCall {
  3548  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3549  	return c
  3550  }
  3551  
  3552  // Context sets the context to be used in this call's Do method.
  3553  func (c *ProjectsLocationsQueuedResourcesCreateCall) Context(ctx context.Context) *ProjectsLocationsQueuedResourcesCreateCall {
  3554  	c.ctx_ = ctx
  3555  	return c
  3556  }
  3557  
  3558  // Header returns a http.Header that can be modified by the caller to add
  3559  // headers to the request.
  3560  func (c *ProjectsLocationsQueuedResourcesCreateCall) Header() http.Header {
  3561  	if c.header_ == nil {
  3562  		c.header_ = make(http.Header)
  3563  	}
  3564  	return c.header_
  3565  }
  3566  
  3567  func (c *ProjectsLocationsQueuedResourcesCreateCall) doRequest(alt string) (*http.Response, error) {
  3568  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3569  	var body io.Reader = nil
  3570  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.queuedresource)
  3571  	if err != nil {
  3572  		return nil, err
  3573  	}
  3574  	c.urlParams_.Set("alt", alt)
  3575  	c.urlParams_.Set("prettyPrint", "false")
  3576  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/queuedResources")
  3577  	urls += "?" + c.urlParams_.Encode()
  3578  	req, err := http.NewRequest("POST", urls, body)
  3579  	if err != nil {
  3580  		return nil, err
  3581  	}
  3582  	req.Header = reqHeaders
  3583  	googleapi.Expand(req.URL, map[string]string{
  3584  		"parent": c.parent,
  3585  	})
  3586  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3587  }
  3588  
  3589  // Do executes the "tpu.projects.locations.queuedResources.create" call.
  3590  // Any non-2xx status code is an error. Response headers are in either
  3591  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3592  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3593  // whether the returned error was because http.StatusNotModified was returned.
  3594  func (c *ProjectsLocationsQueuedResourcesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3595  	gensupport.SetOptions(c.urlParams_, opts...)
  3596  	res, err := c.doRequest("json")
  3597  	if res != nil && res.StatusCode == http.StatusNotModified {
  3598  		if res.Body != nil {
  3599  			res.Body.Close()
  3600  		}
  3601  		return nil, gensupport.WrapError(&googleapi.Error{
  3602  			Code:   res.StatusCode,
  3603  			Header: res.Header,
  3604  		})
  3605  	}
  3606  	if err != nil {
  3607  		return nil, err
  3608  	}
  3609  	defer googleapi.CloseBody(res)
  3610  	if err := googleapi.CheckResponse(res); err != nil {
  3611  		return nil, gensupport.WrapError(err)
  3612  	}
  3613  	ret := &Operation{
  3614  		ServerResponse: googleapi.ServerResponse{
  3615  			Header:         res.Header,
  3616  			HTTPStatusCode: res.StatusCode,
  3617  		},
  3618  	}
  3619  	target := &ret
  3620  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3621  		return nil, err
  3622  	}
  3623  	return ret, nil
  3624  }
  3625  
  3626  type ProjectsLocationsQueuedResourcesDeleteCall struct {
  3627  	s          *Service
  3628  	name       string
  3629  	urlParams_ gensupport.URLParams
  3630  	ctx_       context.Context
  3631  	header_    http.Header
  3632  }
  3633  
  3634  // Delete: Deletes a QueuedResource TPU instance.
  3635  //
  3636  // - name: The resource name.
  3637  func (r *ProjectsLocationsQueuedResourcesService) Delete(name string) *ProjectsLocationsQueuedResourcesDeleteCall {
  3638  	c := &ProjectsLocationsQueuedResourcesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3639  	c.name = name
  3640  	return c
  3641  }
  3642  
  3643  // Force sets the optional parameter "force": If set to true, all running nodes
  3644  // belonging to this queued resource will be deleted first and then the queued
  3645  // resource will be deleted. Otherwise (i.e. force=false), the queued resource
  3646  // will only be deleted if its nodes have already been deleted or the queued
  3647  // resource is in the ACCEPTED, FAILED, or SUSPENDED state.
  3648  func (c *ProjectsLocationsQueuedResourcesDeleteCall) Force(force bool) *ProjectsLocationsQueuedResourcesDeleteCall {
  3649  	c.urlParams_.Set("force", fmt.Sprint(force))
  3650  	return c
  3651  }
  3652  
  3653  // RequestId sets the optional parameter "requestId": Idempotent request UUID.
  3654  func (c *ProjectsLocationsQueuedResourcesDeleteCall) RequestId(requestId string) *ProjectsLocationsQueuedResourcesDeleteCall {
  3655  	c.urlParams_.Set("requestId", requestId)
  3656  	return c
  3657  }
  3658  
  3659  // Fields allows partial responses to be retrieved. See
  3660  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3661  // details.
  3662  func (c *ProjectsLocationsQueuedResourcesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsQueuedResourcesDeleteCall {
  3663  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3664  	return c
  3665  }
  3666  
  3667  // Context sets the context to be used in this call's Do method.
  3668  func (c *ProjectsLocationsQueuedResourcesDeleteCall) Context(ctx context.Context) *ProjectsLocationsQueuedResourcesDeleteCall {
  3669  	c.ctx_ = ctx
  3670  	return c
  3671  }
  3672  
  3673  // Header returns a http.Header that can be modified by the caller to add
  3674  // headers to the request.
  3675  func (c *ProjectsLocationsQueuedResourcesDeleteCall) Header() http.Header {
  3676  	if c.header_ == nil {
  3677  		c.header_ = make(http.Header)
  3678  	}
  3679  	return c.header_
  3680  }
  3681  
  3682  func (c *ProjectsLocationsQueuedResourcesDeleteCall) doRequest(alt string) (*http.Response, error) {
  3683  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3684  	var body io.Reader = nil
  3685  	c.urlParams_.Set("alt", alt)
  3686  	c.urlParams_.Set("prettyPrint", "false")
  3687  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  3688  	urls += "?" + c.urlParams_.Encode()
  3689  	req, err := http.NewRequest("DELETE", urls, body)
  3690  	if err != nil {
  3691  		return nil, err
  3692  	}
  3693  	req.Header = reqHeaders
  3694  	googleapi.Expand(req.URL, map[string]string{
  3695  		"name": c.name,
  3696  	})
  3697  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3698  }
  3699  
  3700  // Do executes the "tpu.projects.locations.queuedResources.delete" call.
  3701  // Any non-2xx status code is an error. Response headers are in either
  3702  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3703  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3704  // whether the returned error was because http.StatusNotModified was returned.
  3705  func (c *ProjectsLocationsQueuedResourcesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3706  	gensupport.SetOptions(c.urlParams_, opts...)
  3707  	res, err := c.doRequest("json")
  3708  	if res != nil && res.StatusCode == http.StatusNotModified {
  3709  		if res.Body != nil {
  3710  			res.Body.Close()
  3711  		}
  3712  		return nil, gensupport.WrapError(&googleapi.Error{
  3713  			Code:   res.StatusCode,
  3714  			Header: res.Header,
  3715  		})
  3716  	}
  3717  	if err != nil {
  3718  		return nil, err
  3719  	}
  3720  	defer googleapi.CloseBody(res)
  3721  	if err := googleapi.CheckResponse(res); err != nil {
  3722  		return nil, gensupport.WrapError(err)
  3723  	}
  3724  	ret := &Operation{
  3725  		ServerResponse: googleapi.ServerResponse{
  3726  			Header:         res.Header,
  3727  			HTTPStatusCode: res.StatusCode,
  3728  		},
  3729  	}
  3730  	target := &ret
  3731  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3732  		return nil, err
  3733  	}
  3734  	return ret, nil
  3735  }
  3736  
  3737  type ProjectsLocationsQueuedResourcesGetCall struct {
  3738  	s            *Service
  3739  	name         string
  3740  	urlParams_   gensupport.URLParams
  3741  	ifNoneMatch_ string
  3742  	ctx_         context.Context
  3743  	header_      http.Header
  3744  }
  3745  
  3746  // Get: Gets details of a queued resource.
  3747  //
  3748  // - name: The resource name.
  3749  func (r *ProjectsLocationsQueuedResourcesService) Get(name string) *ProjectsLocationsQueuedResourcesGetCall {
  3750  	c := &ProjectsLocationsQueuedResourcesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3751  	c.name = name
  3752  	return c
  3753  }
  3754  
  3755  // Fields allows partial responses to be retrieved. See
  3756  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3757  // details.
  3758  func (c *ProjectsLocationsQueuedResourcesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsQueuedResourcesGetCall {
  3759  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3760  	return c
  3761  }
  3762  
  3763  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3764  // object's ETag matches the given value. This is useful for getting updates
  3765  // only after the object has changed since the last request.
  3766  func (c *ProjectsLocationsQueuedResourcesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsQueuedResourcesGetCall {
  3767  	c.ifNoneMatch_ = entityTag
  3768  	return c
  3769  }
  3770  
  3771  // Context sets the context to be used in this call's Do method.
  3772  func (c *ProjectsLocationsQueuedResourcesGetCall) Context(ctx context.Context) *ProjectsLocationsQueuedResourcesGetCall {
  3773  	c.ctx_ = ctx
  3774  	return c
  3775  }
  3776  
  3777  // Header returns a http.Header that can be modified by the caller to add
  3778  // headers to the request.
  3779  func (c *ProjectsLocationsQueuedResourcesGetCall) Header() http.Header {
  3780  	if c.header_ == nil {
  3781  		c.header_ = make(http.Header)
  3782  	}
  3783  	return c.header_
  3784  }
  3785  
  3786  func (c *ProjectsLocationsQueuedResourcesGetCall) doRequest(alt string) (*http.Response, error) {
  3787  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3788  	if c.ifNoneMatch_ != "" {
  3789  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3790  	}
  3791  	var body io.Reader = nil
  3792  	c.urlParams_.Set("alt", alt)
  3793  	c.urlParams_.Set("prettyPrint", "false")
  3794  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  3795  	urls += "?" + c.urlParams_.Encode()
  3796  	req, err := http.NewRequest("GET", urls, body)
  3797  	if err != nil {
  3798  		return nil, err
  3799  	}
  3800  	req.Header = reqHeaders
  3801  	googleapi.Expand(req.URL, map[string]string{
  3802  		"name": c.name,
  3803  	})
  3804  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3805  }
  3806  
  3807  // Do executes the "tpu.projects.locations.queuedResources.get" call.
  3808  // Any non-2xx status code is an error. Response headers are in either
  3809  // *QueuedResource.ServerResponse.Header or (if a response was returned at all)
  3810  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3811  // whether the returned error was because http.StatusNotModified was returned.
  3812  func (c *ProjectsLocationsQueuedResourcesGetCall) Do(opts ...googleapi.CallOption) (*QueuedResource, error) {
  3813  	gensupport.SetOptions(c.urlParams_, opts...)
  3814  	res, err := c.doRequest("json")
  3815  	if res != nil && res.StatusCode == http.StatusNotModified {
  3816  		if res.Body != nil {
  3817  			res.Body.Close()
  3818  		}
  3819  		return nil, gensupport.WrapError(&googleapi.Error{
  3820  			Code:   res.StatusCode,
  3821  			Header: res.Header,
  3822  		})
  3823  	}
  3824  	if err != nil {
  3825  		return nil, err
  3826  	}
  3827  	defer googleapi.CloseBody(res)
  3828  	if err := googleapi.CheckResponse(res); err != nil {
  3829  		return nil, gensupport.WrapError(err)
  3830  	}
  3831  	ret := &QueuedResource{
  3832  		ServerResponse: googleapi.ServerResponse{
  3833  			Header:         res.Header,
  3834  			HTTPStatusCode: res.StatusCode,
  3835  		},
  3836  	}
  3837  	target := &ret
  3838  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3839  		return nil, err
  3840  	}
  3841  	return ret, nil
  3842  }
  3843  
  3844  type ProjectsLocationsQueuedResourcesListCall struct {
  3845  	s            *Service
  3846  	parent       string
  3847  	urlParams_   gensupport.URLParams
  3848  	ifNoneMatch_ string
  3849  	ctx_         context.Context
  3850  	header_      http.Header
  3851  }
  3852  
  3853  // List: Lists queued resources.
  3854  //
  3855  // - parent: The parent resource name.
  3856  func (r *ProjectsLocationsQueuedResourcesService) List(parent string) *ProjectsLocationsQueuedResourcesListCall {
  3857  	c := &ProjectsLocationsQueuedResourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3858  	c.parent = parent
  3859  	return c
  3860  }
  3861  
  3862  // PageSize sets the optional parameter "pageSize": The maximum number of items
  3863  // to return.
  3864  func (c *ProjectsLocationsQueuedResourcesListCall) PageSize(pageSize int64) *ProjectsLocationsQueuedResourcesListCall {
  3865  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3866  	return c
  3867  }
  3868  
  3869  // PageToken sets the optional parameter "pageToken": The next_page_token value
  3870  // returned from a previous List request, if any.
  3871  func (c *ProjectsLocationsQueuedResourcesListCall) PageToken(pageToken string) *ProjectsLocationsQueuedResourcesListCall {
  3872  	c.urlParams_.Set("pageToken", pageToken)
  3873  	return c
  3874  }
  3875  
  3876  // Fields allows partial responses to be retrieved. See
  3877  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3878  // details.
  3879  func (c *ProjectsLocationsQueuedResourcesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsQueuedResourcesListCall {
  3880  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3881  	return c
  3882  }
  3883  
  3884  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3885  // object's ETag matches the given value. This is useful for getting updates
  3886  // only after the object has changed since the last request.
  3887  func (c *ProjectsLocationsQueuedResourcesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsQueuedResourcesListCall {
  3888  	c.ifNoneMatch_ = entityTag
  3889  	return c
  3890  }
  3891  
  3892  // Context sets the context to be used in this call's Do method.
  3893  func (c *ProjectsLocationsQueuedResourcesListCall) Context(ctx context.Context) *ProjectsLocationsQueuedResourcesListCall {
  3894  	c.ctx_ = ctx
  3895  	return c
  3896  }
  3897  
  3898  // Header returns a http.Header that can be modified by the caller to add
  3899  // headers to the request.
  3900  func (c *ProjectsLocationsQueuedResourcesListCall) Header() http.Header {
  3901  	if c.header_ == nil {
  3902  		c.header_ = make(http.Header)
  3903  	}
  3904  	return c.header_
  3905  }
  3906  
  3907  func (c *ProjectsLocationsQueuedResourcesListCall) doRequest(alt string) (*http.Response, error) {
  3908  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3909  	if c.ifNoneMatch_ != "" {
  3910  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3911  	}
  3912  	var body io.Reader = nil
  3913  	c.urlParams_.Set("alt", alt)
  3914  	c.urlParams_.Set("prettyPrint", "false")
  3915  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/queuedResources")
  3916  	urls += "?" + c.urlParams_.Encode()
  3917  	req, err := http.NewRequest("GET", urls, body)
  3918  	if err != nil {
  3919  		return nil, err
  3920  	}
  3921  	req.Header = reqHeaders
  3922  	googleapi.Expand(req.URL, map[string]string{
  3923  		"parent": c.parent,
  3924  	})
  3925  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3926  }
  3927  
  3928  // Do executes the "tpu.projects.locations.queuedResources.list" call.
  3929  // Any non-2xx status code is an error. Response headers are in either
  3930  // *ListQueuedResourcesResponse.ServerResponse.Header or (if a response was
  3931  // returned at all) in error.(*googleapi.Error).Header. Use
  3932  // googleapi.IsNotModified to check whether the returned error was because
  3933  // http.StatusNotModified was returned.
  3934  func (c *ProjectsLocationsQueuedResourcesListCall) Do(opts ...googleapi.CallOption) (*ListQueuedResourcesResponse, error) {
  3935  	gensupport.SetOptions(c.urlParams_, opts...)
  3936  	res, err := c.doRequest("json")
  3937  	if res != nil && res.StatusCode == http.StatusNotModified {
  3938  		if res.Body != nil {
  3939  			res.Body.Close()
  3940  		}
  3941  		return nil, gensupport.WrapError(&googleapi.Error{
  3942  			Code:   res.StatusCode,
  3943  			Header: res.Header,
  3944  		})
  3945  	}
  3946  	if err != nil {
  3947  		return nil, err
  3948  	}
  3949  	defer googleapi.CloseBody(res)
  3950  	if err := googleapi.CheckResponse(res); err != nil {
  3951  		return nil, gensupport.WrapError(err)
  3952  	}
  3953  	ret := &ListQueuedResourcesResponse{
  3954  		ServerResponse: googleapi.ServerResponse{
  3955  			Header:         res.Header,
  3956  			HTTPStatusCode: res.StatusCode,
  3957  		},
  3958  	}
  3959  	target := &ret
  3960  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3961  		return nil, err
  3962  	}
  3963  	return ret, nil
  3964  }
  3965  
  3966  // Pages invokes f for each page of results.
  3967  // A non-nil error returned from f will halt the iteration.
  3968  // The provided context supersedes any context provided to the Context method.
  3969  func (c *ProjectsLocationsQueuedResourcesListCall) Pages(ctx context.Context, f func(*ListQueuedResourcesResponse) error) error {
  3970  	c.ctx_ = ctx
  3971  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3972  	for {
  3973  		x, err := c.Do()
  3974  		if err != nil {
  3975  			return err
  3976  		}
  3977  		if err := f(x); err != nil {
  3978  			return err
  3979  		}
  3980  		if x.NextPageToken == "" {
  3981  			return nil
  3982  		}
  3983  		c.PageToken(x.NextPageToken)
  3984  	}
  3985  }
  3986  
  3987  type ProjectsLocationsQueuedResourcesResetCall struct {
  3988  	s                          *Service
  3989  	name                       string
  3990  	resetqueuedresourcerequest *ResetQueuedResourceRequest
  3991  	urlParams_                 gensupport.URLParams
  3992  	ctx_                       context.Context
  3993  	header_                    http.Header
  3994  }
  3995  
  3996  // Reset: Resets a QueuedResource TPU instance
  3997  //
  3998  // - name: The name of the queued resource.
  3999  func (r *ProjectsLocationsQueuedResourcesService) Reset(name string, resetqueuedresourcerequest *ResetQueuedResourceRequest) *ProjectsLocationsQueuedResourcesResetCall {
  4000  	c := &ProjectsLocationsQueuedResourcesResetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4001  	c.name = name
  4002  	c.resetqueuedresourcerequest = resetqueuedresourcerequest
  4003  	return c
  4004  }
  4005  
  4006  // Fields allows partial responses to be retrieved. See
  4007  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4008  // details.
  4009  func (c *ProjectsLocationsQueuedResourcesResetCall) Fields(s ...googleapi.Field) *ProjectsLocationsQueuedResourcesResetCall {
  4010  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4011  	return c
  4012  }
  4013  
  4014  // Context sets the context to be used in this call's Do method.
  4015  func (c *ProjectsLocationsQueuedResourcesResetCall) Context(ctx context.Context) *ProjectsLocationsQueuedResourcesResetCall {
  4016  	c.ctx_ = ctx
  4017  	return c
  4018  }
  4019  
  4020  // Header returns a http.Header that can be modified by the caller to add
  4021  // headers to the request.
  4022  func (c *ProjectsLocationsQueuedResourcesResetCall) Header() http.Header {
  4023  	if c.header_ == nil {
  4024  		c.header_ = make(http.Header)
  4025  	}
  4026  	return c.header_
  4027  }
  4028  
  4029  func (c *ProjectsLocationsQueuedResourcesResetCall) doRequest(alt string) (*http.Response, error) {
  4030  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4031  	var body io.Reader = nil
  4032  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.resetqueuedresourcerequest)
  4033  	if err != nil {
  4034  		return nil, err
  4035  	}
  4036  	c.urlParams_.Set("alt", alt)
  4037  	c.urlParams_.Set("prettyPrint", "false")
  4038  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:reset")
  4039  	urls += "?" + c.urlParams_.Encode()
  4040  	req, err := http.NewRequest("POST", urls, body)
  4041  	if err != nil {
  4042  		return nil, err
  4043  	}
  4044  	req.Header = reqHeaders
  4045  	googleapi.Expand(req.URL, map[string]string{
  4046  		"name": c.name,
  4047  	})
  4048  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4049  }
  4050  
  4051  // Do executes the "tpu.projects.locations.queuedResources.reset" call.
  4052  // Any non-2xx status code is an error. Response headers are in either
  4053  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4054  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4055  // whether the returned error was because http.StatusNotModified was returned.
  4056  func (c *ProjectsLocationsQueuedResourcesResetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4057  	gensupport.SetOptions(c.urlParams_, opts...)
  4058  	res, err := c.doRequest("json")
  4059  	if res != nil && res.StatusCode == http.StatusNotModified {
  4060  		if res.Body != nil {
  4061  			res.Body.Close()
  4062  		}
  4063  		return nil, gensupport.WrapError(&googleapi.Error{
  4064  			Code:   res.StatusCode,
  4065  			Header: res.Header,
  4066  		})
  4067  	}
  4068  	if err != nil {
  4069  		return nil, err
  4070  	}
  4071  	defer googleapi.CloseBody(res)
  4072  	if err := googleapi.CheckResponse(res); err != nil {
  4073  		return nil, gensupport.WrapError(err)
  4074  	}
  4075  	ret := &Operation{
  4076  		ServerResponse: googleapi.ServerResponse{
  4077  			Header:         res.Header,
  4078  			HTTPStatusCode: res.StatusCode,
  4079  		},
  4080  	}
  4081  	target := &ret
  4082  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4083  		return nil, err
  4084  	}
  4085  	return ret, nil
  4086  }
  4087  
  4088  type ProjectsLocationsRuntimeVersionsGetCall struct {
  4089  	s            *Service
  4090  	name         string
  4091  	urlParams_   gensupport.URLParams
  4092  	ifNoneMatch_ string
  4093  	ctx_         context.Context
  4094  	header_      http.Header
  4095  }
  4096  
  4097  // Get: Gets a runtime version.
  4098  //
  4099  // - name: The resource name.
  4100  func (r *ProjectsLocationsRuntimeVersionsService) Get(name string) *ProjectsLocationsRuntimeVersionsGetCall {
  4101  	c := &ProjectsLocationsRuntimeVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4102  	c.name = name
  4103  	return c
  4104  }
  4105  
  4106  // Fields allows partial responses to be retrieved. See
  4107  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4108  // details.
  4109  func (c *ProjectsLocationsRuntimeVersionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRuntimeVersionsGetCall {
  4110  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4111  	return c
  4112  }
  4113  
  4114  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4115  // object's ETag matches the given value. This is useful for getting updates
  4116  // only after the object has changed since the last request.
  4117  func (c *ProjectsLocationsRuntimeVersionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRuntimeVersionsGetCall {
  4118  	c.ifNoneMatch_ = entityTag
  4119  	return c
  4120  }
  4121  
  4122  // Context sets the context to be used in this call's Do method.
  4123  func (c *ProjectsLocationsRuntimeVersionsGetCall) Context(ctx context.Context) *ProjectsLocationsRuntimeVersionsGetCall {
  4124  	c.ctx_ = ctx
  4125  	return c
  4126  }
  4127  
  4128  // Header returns a http.Header that can be modified by the caller to add
  4129  // headers to the request.
  4130  func (c *ProjectsLocationsRuntimeVersionsGetCall) Header() http.Header {
  4131  	if c.header_ == nil {
  4132  		c.header_ = make(http.Header)
  4133  	}
  4134  	return c.header_
  4135  }
  4136  
  4137  func (c *ProjectsLocationsRuntimeVersionsGetCall) doRequest(alt string) (*http.Response, error) {
  4138  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4139  	if c.ifNoneMatch_ != "" {
  4140  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4141  	}
  4142  	var body io.Reader = nil
  4143  	c.urlParams_.Set("alt", alt)
  4144  	c.urlParams_.Set("prettyPrint", "false")
  4145  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  4146  	urls += "?" + c.urlParams_.Encode()
  4147  	req, err := http.NewRequest("GET", urls, body)
  4148  	if err != nil {
  4149  		return nil, err
  4150  	}
  4151  	req.Header = reqHeaders
  4152  	googleapi.Expand(req.URL, map[string]string{
  4153  		"name": c.name,
  4154  	})
  4155  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4156  }
  4157  
  4158  // Do executes the "tpu.projects.locations.runtimeVersions.get" call.
  4159  // Any non-2xx status code is an error. Response headers are in either
  4160  // *RuntimeVersion.ServerResponse.Header or (if a response was returned at all)
  4161  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4162  // whether the returned error was because http.StatusNotModified was returned.
  4163  func (c *ProjectsLocationsRuntimeVersionsGetCall) Do(opts ...googleapi.CallOption) (*RuntimeVersion, error) {
  4164  	gensupport.SetOptions(c.urlParams_, opts...)
  4165  	res, err := c.doRequest("json")
  4166  	if res != nil && res.StatusCode == http.StatusNotModified {
  4167  		if res.Body != nil {
  4168  			res.Body.Close()
  4169  		}
  4170  		return nil, gensupport.WrapError(&googleapi.Error{
  4171  			Code:   res.StatusCode,
  4172  			Header: res.Header,
  4173  		})
  4174  	}
  4175  	if err != nil {
  4176  		return nil, err
  4177  	}
  4178  	defer googleapi.CloseBody(res)
  4179  	if err := googleapi.CheckResponse(res); err != nil {
  4180  		return nil, gensupport.WrapError(err)
  4181  	}
  4182  	ret := &RuntimeVersion{
  4183  		ServerResponse: googleapi.ServerResponse{
  4184  			Header:         res.Header,
  4185  			HTTPStatusCode: res.StatusCode,
  4186  		},
  4187  	}
  4188  	target := &ret
  4189  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4190  		return nil, err
  4191  	}
  4192  	return ret, nil
  4193  }
  4194  
  4195  type ProjectsLocationsRuntimeVersionsListCall struct {
  4196  	s            *Service
  4197  	parent       string
  4198  	urlParams_   gensupport.URLParams
  4199  	ifNoneMatch_ string
  4200  	ctx_         context.Context
  4201  	header_      http.Header
  4202  }
  4203  
  4204  // List: Lists runtime versions supported by this API.
  4205  //
  4206  // - parent: The parent resource name.
  4207  func (r *ProjectsLocationsRuntimeVersionsService) List(parent string) *ProjectsLocationsRuntimeVersionsListCall {
  4208  	c := &ProjectsLocationsRuntimeVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4209  	c.parent = parent
  4210  	return c
  4211  }
  4212  
  4213  // Filter sets the optional parameter "filter": List filter.
  4214  func (c *ProjectsLocationsRuntimeVersionsListCall) Filter(filter string) *ProjectsLocationsRuntimeVersionsListCall {
  4215  	c.urlParams_.Set("filter", filter)
  4216  	return c
  4217  }
  4218  
  4219  // OrderBy sets the optional parameter "orderBy": Sort results.
  4220  func (c *ProjectsLocationsRuntimeVersionsListCall) OrderBy(orderBy string) *ProjectsLocationsRuntimeVersionsListCall {
  4221  	c.urlParams_.Set("orderBy", orderBy)
  4222  	return c
  4223  }
  4224  
  4225  // PageSize sets the optional parameter "pageSize": The maximum number of items
  4226  // to return.
  4227  func (c *ProjectsLocationsRuntimeVersionsListCall) PageSize(pageSize int64) *ProjectsLocationsRuntimeVersionsListCall {
  4228  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4229  	return c
  4230  }
  4231  
  4232  // PageToken sets the optional parameter "pageToken": The next_page_token value
  4233  // returned from a previous List request, if any.
  4234  func (c *ProjectsLocationsRuntimeVersionsListCall) PageToken(pageToken string) *ProjectsLocationsRuntimeVersionsListCall {
  4235  	c.urlParams_.Set("pageToken", pageToken)
  4236  	return c
  4237  }
  4238  
  4239  // Fields allows partial responses to be retrieved. See
  4240  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4241  // details.
  4242  func (c *ProjectsLocationsRuntimeVersionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRuntimeVersionsListCall {
  4243  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4244  	return c
  4245  }
  4246  
  4247  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4248  // object's ETag matches the given value. This is useful for getting updates
  4249  // only after the object has changed since the last request.
  4250  func (c *ProjectsLocationsRuntimeVersionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRuntimeVersionsListCall {
  4251  	c.ifNoneMatch_ = entityTag
  4252  	return c
  4253  }
  4254  
  4255  // Context sets the context to be used in this call's Do method.
  4256  func (c *ProjectsLocationsRuntimeVersionsListCall) Context(ctx context.Context) *ProjectsLocationsRuntimeVersionsListCall {
  4257  	c.ctx_ = ctx
  4258  	return c
  4259  }
  4260  
  4261  // Header returns a http.Header that can be modified by the caller to add
  4262  // headers to the request.
  4263  func (c *ProjectsLocationsRuntimeVersionsListCall) Header() http.Header {
  4264  	if c.header_ == nil {
  4265  		c.header_ = make(http.Header)
  4266  	}
  4267  	return c.header_
  4268  }
  4269  
  4270  func (c *ProjectsLocationsRuntimeVersionsListCall) doRequest(alt string) (*http.Response, error) {
  4271  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4272  	if c.ifNoneMatch_ != "" {
  4273  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4274  	}
  4275  	var body io.Reader = nil
  4276  	c.urlParams_.Set("alt", alt)
  4277  	c.urlParams_.Set("prettyPrint", "false")
  4278  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/runtimeVersions")
  4279  	urls += "?" + c.urlParams_.Encode()
  4280  	req, err := http.NewRequest("GET", urls, body)
  4281  	if err != nil {
  4282  		return nil, err
  4283  	}
  4284  	req.Header = reqHeaders
  4285  	googleapi.Expand(req.URL, map[string]string{
  4286  		"parent": c.parent,
  4287  	})
  4288  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4289  }
  4290  
  4291  // Do executes the "tpu.projects.locations.runtimeVersions.list" call.
  4292  // Any non-2xx status code is an error. Response headers are in either
  4293  // *ListRuntimeVersionsResponse.ServerResponse.Header or (if a response was
  4294  // returned at all) in error.(*googleapi.Error).Header. Use
  4295  // googleapi.IsNotModified to check whether the returned error was because
  4296  // http.StatusNotModified was returned.
  4297  func (c *ProjectsLocationsRuntimeVersionsListCall) Do(opts ...googleapi.CallOption) (*ListRuntimeVersionsResponse, error) {
  4298  	gensupport.SetOptions(c.urlParams_, opts...)
  4299  	res, err := c.doRequest("json")
  4300  	if res != nil && res.StatusCode == http.StatusNotModified {
  4301  		if res.Body != nil {
  4302  			res.Body.Close()
  4303  		}
  4304  		return nil, gensupport.WrapError(&googleapi.Error{
  4305  			Code:   res.StatusCode,
  4306  			Header: res.Header,
  4307  		})
  4308  	}
  4309  	if err != nil {
  4310  		return nil, err
  4311  	}
  4312  	defer googleapi.CloseBody(res)
  4313  	if err := googleapi.CheckResponse(res); err != nil {
  4314  		return nil, gensupport.WrapError(err)
  4315  	}
  4316  	ret := &ListRuntimeVersionsResponse{
  4317  		ServerResponse: googleapi.ServerResponse{
  4318  			Header:         res.Header,
  4319  			HTTPStatusCode: res.StatusCode,
  4320  		},
  4321  	}
  4322  	target := &ret
  4323  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4324  		return nil, err
  4325  	}
  4326  	return ret, nil
  4327  }
  4328  
  4329  // Pages invokes f for each page of results.
  4330  // A non-nil error returned from f will halt the iteration.
  4331  // The provided context supersedes any context provided to the Context method.
  4332  func (c *ProjectsLocationsRuntimeVersionsListCall) Pages(ctx context.Context, f func(*ListRuntimeVersionsResponse) error) error {
  4333  	c.ctx_ = ctx
  4334  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4335  	for {
  4336  		x, err := c.Do()
  4337  		if err != nil {
  4338  			return err
  4339  		}
  4340  		if err := f(x); err != nil {
  4341  			return err
  4342  		}
  4343  		if x.NextPageToken == "" {
  4344  			return nil
  4345  		}
  4346  		c.PageToken(x.NextPageToken)
  4347  	}
  4348  }
  4349  

View as plain text