...

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

Documentation: google.golang.org/api/baremetalsolution/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 baremetalsolution provides access to the Bare Metal Solution API.
     8  //
     9  // For product documentation, see: https://cloud.google.com/bare-metal
    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/baremetalsolution/v2"
    27  //	...
    28  //	ctx := context.Background()
    29  //	baremetalsolutionService, err := baremetalsolution.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  //	baremetalsolutionService, err := baremetalsolution.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  //	baremetalsolutionService, err := baremetalsolution.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    49  //
    50  // See [google.golang.org/api/option.ClientOption] for details on options.
    51  package baremetalsolution // import "google.golang.org/api/baremetalsolution/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 = "baremetalsolution:v2"
    90  const apiName = "baremetalsolution"
    91  const apiVersion = "v2"
    92  const basePath = "https://baremetalsolution.googleapis.com/"
    93  const basePathTemplate = "https://baremetalsolution.UNIVERSE_DOMAIN/"
    94  const mtlsBasePath = "https://baremetalsolution.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.Instances = NewProjectsLocationsInstancesService(s)
   172  	rs.Networks = NewProjectsLocationsNetworksService(s)
   173  	rs.NfsShares = NewProjectsLocationsNfsSharesService(s)
   174  	rs.Operations = NewProjectsLocationsOperationsService(s)
   175  	rs.OsImages = NewProjectsLocationsOsImagesService(s)
   176  	rs.ProvisioningConfigs = NewProjectsLocationsProvisioningConfigsService(s)
   177  	rs.ProvisioningQuotas = NewProjectsLocationsProvisioningQuotasService(s)
   178  	rs.SshKeys = NewProjectsLocationsSshKeysService(s)
   179  	rs.Volumes = NewProjectsLocationsVolumesService(s)
   180  	return rs
   181  }
   182  
   183  type ProjectsLocationsService struct {
   184  	s *Service
   185  
   186  	Instances *ProjectsLocationsInstancesService
   187  
   188  	Networks *ProjectsLocationsNetworksService
   189  
   190  	NfsShares *ProjectsLocationsNfsSharesService
   191  
   192  	Operations *ProjectsLocationsOperationsService
   193  
   194  	OsImages *ProjectsLocationsOsImagesService
   195  
   196  	ProvisioningConfigs *ProjectsLocationsProvisioningConfigsService
   197  
   198  	ProvisioningQuotas *ProjectsLocationsProvisioningQuotasService
   199  
   200  	SshKeys *ProjectsLocationsSshKeysService
   201  
   202  	Volumes *ProjectsLocationsVolumesService
   203  }
   204  
   205  func NewProjectsLocationsInstancesService(s *Service) *ProjectsLocationsInstancesService {
   206  	rs := &ProjectsLocationsInstancesService{s: s}
   207  	return rs
   208  }
   209  
   210  type ProjectsLocationsInstancesService struct {
   211  	s *Service
   212  }
   213  
   214  func NewProjectsLocationsNetworksService(s *Service) *ProjectsLocationsNetworksService {
   215  	rs := &ProjectsLocationsNetworksService{s: s}
   216  	return rs
   217  }
   218  
   219  type ProjectsLocationsNetworksService struct {
   220  	s *Service
   221  }
   222  
   223  func NewProjectsLocationsNfsSharesService(s *Service) *ProjectsLocationsNfsSharesService {
   224  	rs := &ProjectsLocationsNfsSharesService{s: s}
   225  	return rs
   226  }
   227  
   228  type ProjectsLocationsNfsSharesService struct {
   229  	s *Service
   230  }
   231  
   232  func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
   233  	rs := &ProjectsLocationsOperationsService{s: s}
   234  	return rs
   235  }
   236  
   237  type ProjectsLocationsOperationsService struct {
   238  	s *Service
   239  }
   240  
   241  func NewProjectsLocationsOsImagesService(s *Service) *ProjectsLocationsOsImagesService {
   242  	rs := &ProjectsLocationsOsImagesService{s: s}
   243  	return rs
   244  }
   245  
   246  type ProjectsLocationsOsImagesService struct {
   247  	s *Service
   248  }
   249  
   250  func NewProjectsLocationsProvisioningConfigsService(s *Service) *ProjectsLocationsProvisioningConfigsService {
   251  	rs := &ProjectsLocationsProvisioningConfigsService{s: s}
   252  	return rs
   253  }
   254  
   255  type ProjectsLocationsProvisioningConfigsService struct {
   256  	s *Service
   257  }
   258  
   259  func NewProjectsLocationsProvisioningQuotasService(s *Service) *ProjectsLocationsProvisioningQuotasService {
   260  	rs := &ProjectsLocationsProvisioningQuotasService{s: s}
   261  	return rs
   262  }
   263  
   264  type ProjectsLocationsProvisioningQuotasService struct {
   265  	s *Service
   266  }
   267  
   268  func NewProjectsLocationsSshKeysService(s *Service) *ProjectsLocationsSshKeysService {
   269  	rs := &ProjectsLocationsSshKeysService{s: s}
   270  	return rs
   271  }
   272  
   273  type ProjectsLocationsSshKeysService struct {
   274  	s *Service
   275  }
   276  
   277  func NewProjectsLocationsVolumesService(s *Service) *ProjectsLocationsVolumesService {
   278  	rs := &ProjectsLocationsVolumesService{s: s}
   279  	rs.Luns = NewProjectsLocationsVolumesLunsService(s)
   280  	rs.Snapshots = NewProjectsLocationsVolumesSnapshotsService(s)
   281  	return rs
   282  }
   283  
   284  type ProjectsLocationsVolumesService struct {
   285  	s *Service
   286  
   287  	Luns *ProjectsLocationsVolumesLunsService
   288  
   289  	Snapshots *ProjectsLocationsVolumesSnapshotsService
   290  }
   291  
   292  func NewProjectsLocationsVolumesLunsService(s *Service) *ProjectsLocationsVolumesLunsService {
   293  	rs := &ProjectsLocationsVolumesLunsService{s: s}
   294  	return rs
   295  }
   296  
   297  type ProjectsLocationsVolumesLunsService struct {
   298  	s *Service
   299  }
   300  
   301  func NewProjectsLocationsVolumesSnapshotsService(s *Service) *ProjectsLocationsVolumesSnapshotsService {
   302  	rs := &ProjectsLocationsVolumesSnapshotsService{s: s}
   303  	return rs
   304  }
   305  
   306  type ProjectsLocationsVolumesSnapshotsService struct {
   307  	s *Service
   308  }
   309  
   310  // AllowedClient: Represents an 'access point' for the share.
   311  type AllowedClient struct {
   312  	// AllowDev: Allow dev flag. Which controls whether to allow creation of
   313  	// devices.
   314  	AllowDev bool `json:"allowDev,omitempty"`
   315  	// AllowSuid: Allow the setuid flag.
   316  	AllowSuid bool `json:"allowSuid,omitempty"`
   317  	// AllowedClientsCidr: The subnet of IP addresses permitted to access the
   318  	// share.
   319  	AllowedClientsCidr string `json:"allowedClientsCidr,omitempty"`
   320  	// MountPermissions: Mount permissions.
   321  	//
   322  	// Possible values:
   323  	//   "MOUNT_PERMISSIONS_UNSPECIFIED" - Permissions were not specified.
   324  	//   "READ" - NFS share can be mount with read-only permissions.
   325  	//   "READ_WRITE" - NFS share can be mount with read-write permissions.
   326  	MountPermissions string `json:"mountPermissions,omitempty"`
   327  	// Network: The network the access point sits on.
   328  	Network string `json:"network,omitempty"`
   329  	// NfsPath: Output only. The path to access NFS, in format shareIP:/InstanceID
   330  	// InstanceID is the generated ID instead of customer provided name. example
   331  	// like "10.0.0.0:/g123456789-nfs001"
   332  	NfsPath string `json:"nfsPath,omitempty"`
   333  	// NoRootSquash: Disable root squashing, which is a feature of NFS. Root squash
   334  	// is a special mapping of the remote superuser (root) identity when using
   335  	// identity authentication.
   336  	NoRootSquash bool `json:"noRootSquash,omitempty"`
   337  	// ShareIp: Output only. The IP address of the share on this network. Assigned
   338  	// automatically during provisioning based on the network's services_cidr.
   339  	ShareIp string `json:"shareIp,omitempty"`
   340  	// ForceSendFields is a list of field names (e.g. "AllowDev") to
   341  	// unconditionally include in API requests. By default, fields with empty or
   342  	// default values are omitted from API requests. See
   343  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   344  	// details.
   345  	ForceSendFields []string `json:"-"`
   346  	// NullFields is a list of field names (e.g. "AllowDev") to include in API
   347  	// requests with the JSON null value. By default, fields with empty values are
   348  	// omitted from API requests. See
   349  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   350  	NullFields []string `json:"-"`
   351  }
   352  
   353  func (s *AllowedClient) MarshalJSON() ([]byte, error) {
   354  	type NoMethod AllowedClient
   355  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   356  }
   357  
   358  // DetachLunRequest: Message for detach specific LUN from an Instance.
   359  type DetachLunRequest struct {
   360  	// Lun: Required. Name of the Lun to detach.
   361  	Lun string `json:"lun,omitempty"`
   362  	// SkipReboot: If true, performs lun unmapping without instance reboot.
   363  	SkipReboot bool `json:"skipReboot,omitempty"`
   364  	// ForceSendFields is a list of field names (e.g. "Lun") to unconditionally
   365  	// include in API requests. By default, fields with empty or default values are
   366  	// omitted from API requests. See
   367  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   368  	// details.
   369  	ForceSendFields []string `json:"-"`
   370  	// NullFields is a list of field names (e.g. "Lun") to include in API requests
   371  	// with the JSON null value. By default, fields with empty values are omitted
   372  	// from API requests. See
   373  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   374  	NullFields []string `json:"-"`
   375  }
   376  
   377  func (s *DetachLunRequest) MarshalJSON() ([]byte, error) {
   378  	type NoMethod DetachLunRequest
   379  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   380  }
   381  
   382  // DisableHyperthreadingRequest: Message requesting to perform disable
   383  // hyperthreading operation on a server.
   384  type DisableHyperthreadingRequest struct {
   385  }
   386  
   387  // DisableInteractiveSerialConsoleRequest: Message for disabling the
   388  // interactive serial console on an instance.
   389  type DisableInteractiveSerialConsoleRequest struct {
   390  }
   391  
   392  // DisableInteractiveSerialConsoleResponse: Message for response of
   393  // DisableInteractiveSerialConsole.
   394  type DisableInteractiveSerialConsoleResponse struct {
   395  }
   396  
   397  // Empty: A generic empty message that you can re-use to avoid defining
   398  // duplicated empty messages in your APIs. A typical example is to use it as
   399  // the request or the response type of an API method. For instance: service Foo
   400  // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
   401  type Empty struct {
   402  	// ServerResponse contains the HTTP response code and headers from the server.
   403  	googleapi.ServerResponse `json:"-"`
   404  }
   405  
   406  // EnableHyperthreadingRequest: Message requesting to perform enable
   407  // hyperthreading operation on a server.
   408  type EnableHyperthreadingRequest struct {
   409  }
   410  
   411  // EnableInteractiveSerialConsoleRequest: Message for enabling the interactive
   412  // serial console on an instance.
   413  type EnableInteractiveSerialConsoleRequest struct {
   414  }
   415  
   416  // EnableInteractiveSerialConsoleResponse: Message for response of
   417  // EnableInteractiveSerialConsole.
   418  type EnableInteractiveSerialConsoleResponse struct {
   419  }
   420  
   421  // EvictLunRequest: Request for skip lun cooloff and delete it.
   422  type EvictLunRequest struct {
   423  }
   424  
   425  // EvictVolumeRequest: Request for skip volume cooloff and delete it.
   426  type EvictVolumeRequest struct {
   427  }
   428  
   429  // GoogleCloudBaremetalsolutionV2LogicalInterface: Each logical interface
   430  // represents a logical abstraction of the underlying physical interface (for
   431  // eg. bond, nic) of the instance. Each logical interface can effectively map
   432  // to multiple network-IP pairs and still be mapped to one underlying physical
   433  // interface.
   434  type GoogleCloudBaremetalsolutionV2LogicalInterface struct {
   435  	// InterfaceIndex: The index of the logical interface mapping to the index of
   436  	// the hardware bond or nic on the chosen network template. This field is
   437  	// deprecated.
   438  	InterfaceIndex int64 `json:"interfaceIndex,omitempty"`
   439  	// LogicalNetworkInterfaces: List of logical network interfaces within a
   440  	// logical interface.
   441  	LogicalNetworkInterfaces []*LogicalNetworkInterface `json:"logicalNetworkInterfaces,omitempty"`
   442  	// Name: Interface name. This is of syntax or and forms part of the network
   443  	// template name.
   444  	Name string `json:"name,omitempty"`
   445  	// ForceSendFields is a list of field names (e.g. "InterfaceIndex") to
   446  	// unconditionally include in API requests. By default, fields with empty or
   447  	// default values are omitted from API requests. See
   448  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   449  	// details.
   450  	ForceSendFields []string `json:"-"`
   451  	// NullFields is a list of field names (e.g. "InterfaceIndex") to include in
   452  	// API requests with the JSON null value. By default, fields with empty values
   453  	// are omitted from API requests. See
   454  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   455  	NullFields []string `json:"-"`
   456  }
   457  
   458  func (s *GoogleCloudBaremetalsolutionV2LogicalInterface) MarshalJSON() ([]byte, error) {
   459  	type NoMethod GoogleCloudBaremetalsolutionV2LogicalInterface
   460  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   461  }
   462  
   463  // GoogleCloudBaremetalsolutionV2ServerNetworkTemplateLogicalInterface: Logical
   464  // interface.
   465  type GoogleCloudBaremetalsolutionV2ServerNetworkTemplateLogicalInterface struct {
   466  	// Name: Interface name. This is not a globally unique identifier. Name is
   467  	// unique only inside the ServerNetworkTemplate. This is of syntax or and forms
   468  	// part of the network template name.
   469  	Name string `json:"name,omitempty"`
   470  	// Required: If true, interface must have network connected.
   471  	Required bool `json:"required,omitempty"`
   472  	// Type: Interface type.
   473  	//
   474  	// Possible values:
   475  	//   "INTERFACE_TYPE_UNSPECIFIED" - Unspecified value.
   476  	//   "BOND" - Bond interface type.
   477  	//   "NIC" - NIC interface type.
   478  	Type string `json:"type,omitempty"`
   479  	// ForceSendFields is a list of field names (e.g. "Name") to unconditionally
   480  	// include in API requests. By default, fields with empty or default values are
   481  	// omitted from API requests. See
   482  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   483  	// details.
   484  	ForceSendFields []string `json:"-"`
   485  	// NullFields is a list of field names (e.g. "Name") to include in API requests
   486  	// with the JSON null value. By default, fields with empty values are omitted
   487  	// from API requests. See
   488  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   489  	NullFields []string `json:"-"`
   490  }
   491  
   492  func (s *GoogleCloudBaremetalsolutionV2ServerNetworkTemplateLogicalInterface) MarshalJSON() ([]byte, error) {
   493  	type NoMethod GoogleCloudBaremetalsolutionV2ServerNetworkTemplateLogicalInterface
   494  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   495  }
   496  
   497  // Instance: A server.
   498  type Instance struct {
   499  	// CreateTime: Output only. Create a time stamp.
   500  	CreateTime string `json:"createTime,omitempty"`
   501  	// FirmwareVersion: Output only. The firmware version for the instance.
   502  	FirmwareVersion string `json:"firmwareVersion,omitempty"`
   503  	// HyperthreadingEnabled: True if you enable hyperthreading for the server,
   504  	// otherwise false. The default value is false.
   505  	HyperthreadingEnabled bool `json:"hyperthreadingEnabled,omitempty"`
   506  	// Id: Output only. An identifier for the `Instance`, generated by the backend.
   507  	Id string `json:"id,omitempty"`
   508  	// InteractiveSerialConsoleEnabled: Output only. True if the interactive serial
   509  	// console feature is enabled for the instance, false otherwise. The default
   510  	// value is false.
   511  	InteractiveSerialConsoleEnabled bool `json:"interactiveSerialConsoleEnabled,omitempty"`
   512  	// KmsKeyVersion: Optional. Name of the KMS crypto key version used to encrypt
   513  	// the initial passwords. The key has to have ASYMMETRIC_DECRYPT purpose.
   514  	// Format is
   515  	// `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}/
   516  	// cryptoKeyVersions/{version}`.
   517  	KmsKeyVersion string `json:"kmsKeyVersion,omitempty"`
   518  	// Labels: Labels as key value pairs.
   519  	Labels map[string]string `json:"labels,omitempty"`
   520  	// LogicalInterfaces: List of logical interfaces for the instance. The number
   521  	// of logical interfaces will be the same as number of hardware bond/nic on the
   522  	// chosen network template. For the non-multivlan configurations (for eg,
   523  	// existing servers) that use existing default network template
   524  	// (bondaa-bondaa), both the Instance.networks field and the
   525  	// Instance.logical_interfaces fields will be filled to ensure backward
   526  	// compatibility. For the others, only Instance.logical_interfaces will be
   527  	// filled.
   528  	LogicalInterfaces []*GoogleCloudBaremetalsolutionV2LogicalInterface `json:"logicalInterfaces,omitempty"`
   529  	// LoginInfo: Output only. Text field about info for logging in.
   530  	LoginInfo string `json:"loginInfo,omitempty"`
   531  	// Luns: Immutable. List of LUNs associated with this server.
   532  	Luns []*Lun `json:"luns,omitempty"`
   533  	// MachineType: Immutable. The server type. Available server types
   534  	// (https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations)
   535  	MachineType string `json:"machineType,omitempty"`
   536  	// Name: Immutable. The resource name of this `Instance`. Resource names are
   537  	// schemeless URIs that follow the conventions in
   538  	// https://cloud.google.com/apis/design/resource_names. Format:
   539  	// `projects/{project}/locations/{location}/instances/{instance}`
   540  	Name string `json:"name,omitempty"`
   541  	// NetworkTemplate: Instance network template name. For eg, bondaa-bondaa,
   542  	// bondab-nic, etc. Generally, the template name follows the syntax of "bond"
   543  	// or "nic".
   544  	NetworkTemplate string `json:"networkTemplate,omitempty"`
   545  	// Networks: Output only. List of networks associated with this server.
   546  	Networks []*Network `json:"networks,omitempty"`
   547  	// OsImage: The OS image currently installed on the server.
   548  	OsImage string `json:"osImage,omitempty"`
   549  	// Pod: Immutable. Pod name. Pod is an independent part of infrastructure.
   550  	// Instance can only be connected to the assets (networks, volumes) allocated
   551  	// in the same pod.
   552  	Pod string `json:"pod,omitempty"`
   553  	// SshKeys: Optional. List of SSH Keys used during instance provisioning.
   554  	SshKeys []string `json:"sshKeys,omitempty"`
   555  	// State: Output only. The state of the server.
   556  	//
   557  	// Possible values:
   558  	//   "STATE_UNSPECIFIED" - The server is in an unknown state.
   559  	//   "PROVISIONING" - The server is being provisioned.
   560  	//   "RUNNING" - The server is running.
   561  	//   "DELETED" - The server has been deleted.
   562  	//   "UPDATING" - The server is being updated.
   563  	//   "STARTING" - The server is starting.
   564  	//   "STOPPING" - The server is stopping.
   565  	//   "SHUTDOWN" - The server is shutdown.
   566  	State string `json:"state,omitempty"`
   567  	// UpdateTime: Output only. Update a time stamp.
   568  	UpdateTime string `json:"updateTime,omitempty"`
   569  	// Volumes: Input only. List of Volumes to attach to this Instance on creation.
   570  	// This field won't be populated in Get/List responses.
   571  	Volumes []*Volume `json:"volumes,omitempty"`
   572  	// WorkloadProfile: The workload profile for the instance.
   573  	//
   574  	// Possible values:
   575  	//   "WORKLOAD_PROFILE_UNSPECIFIED" - The workload profile is in an unknown
   576  	// state.
   577  	//   "WORKLOAD_PROFILE_GENERIC" - The workload profile is generic.
   578  	//   "WORKLOAD_PROFILE_HANA" - The workload profile is hana.
   579  	WorkloadProfile string `json:"workloadProfile,omitempty"`
   580  
   581  	// ServerResponse contains the HTTP response code and headers from the server.
   582  	googleapi.ServerResponse `json:"-"`
   583  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
   584  	// unconditionally include in API requests. By default, fields with empty or
   585  	// default values are omitted from API requests. See
   586  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   587  	// details.
   588  	ForceSendFields []string `json:"-"`
   589  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
   590  	// requests with the JSON null value. By default, fields with empty values are
   591  	// omitted from API requests. See
   592  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   593  	NullFields []string `json:"-"`
   594  }
   595  
   596  func (s *Instance) MarshalJSON() ([]byte, error) {
   597  	type NoMethod Instance
   598  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   599  }
   600  
   601  // InstanceConfig: Configuration parameters for a new instance.
   602  type InstanceConfig struct {
   603  	// AccountNetworksEnabled: If true networks can be from different projects of
   604  	// the same vendor account.
   605  	AccountNetworksEnabled bool `json:"accountNetworksEnabled,omitempty"`
   606  	// ClientNetwork: Client network address. Filled if
   607  	// InstanceConfig.multivlan_config is false.
   608  	ClientNetwork *NetworkAddress `json:"clientNetwork,omitempty"`
   609  	// Hyperthreading: Whether the instance should be provisioned with
   610  	// Hyperthreading enabled.
   611  	Hyperthreading bool `json:"hyperthreading,omitempty"`
   612  	// Id: A transient unique identifier to idenfity an instance within an
   613  	// ProvisioningConfig request.
   614  	Id string `json:"id,omitempty"`
   615  	// InstanceType: Instance type. Available types
   616  	// (https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations)
   617  	InstanceType string `json:"instanceType,omitempty"`
   618  	// KmsKeyVersion: Name of the KMS crypto key version used to encrypt the
   619  	// initial passwords. The key has to have ASYMMETRIC_DECRYPT purpose.
   620  	KmsKeyVersion string `json:"kmsKeyVersion,omitempty"`
   621  	// LogicalInterfaces: List of logical interfaces for the instance. The number
   622  	// of logical interfaces will be the same as number of hardware bond/nic on the
   623  	// chosen network template. Filled if InstanceConfig.multivlan_config is true.
   624  	LogicalInterfaces []*GoogleCloudBaremetalsolutionV2LogicalInterface `json:"logicalInterfaces,omitempty"`
   625  	// Name: The name of the instance config.
   626  	Name string `json:"name,omitempty"`
   627  	// NetworkConfig: The type of network configuration on the instance.
   628  	//
   629  	// Possible values:
   630  	//   "NETWORKCONFIG_UNSPECIFIED" - The unspecified network configuration.
   631  	//   "SINGLE_VLAN" - Instance part of single client network and single private
   632  	// network.
   633  	//   "MULTI_VLAN" - Instance part of multiple (or single) client networks and
   634  	// private networks.
   635  	NetworkConfig string `json:"networkConfig,omitempty"`
   636  	// NetworkTemplate: Server network template name. Filled if
   637  	// InstanceConfig.multivlan_config is true.
   638  	NetworkTemplate string `json:"networkTemplate,omitempty"`
   639  	// OsImage: OS image to initialize the instance. Available images
   640  	// (https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations)
   641  	OsImage string `json:"osImage,omitempty"`
   642  	// PrivateNetwork: Private network address, if any. Filled if
   643  	// InstanceConfig.multivlan_config is false.
   644  	PrivateNetwork *NetworkAddress `json:"privateNetwork,omitempty"`
   645  	// SshKeyNames: Optional. List of names of ssh keys used to provision the
   646  	// instance.
   647  	SshKeyNames []string `json:"sshKeyNames,omitempty"`
   648  	// UserNote: User note field, it can be used by customers to add additional
   649  	// information for the BMS Ops team .
   650  	UserNote string `json:"userNote,omitempty"`
   651  	// ForceSendFields is a list of field names (e.g. "AccountNetworksEnabled") to
   652  	// unconditionally include in API requests. By default, fields with empty or
   653  	// default values are omitted from API requests. See
   654  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   655  	// details.
   656  	ForceSendFields []string `json:"-"`
   657  	// NullFields is a list of field names (e.g. "AccountNetworksEnabled") to
   658  	// include in API requests with the JSON null value. By default, fields with
   659  	// empty values are omitted from API requests. See
   660  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   661  	NullFields []string `json:"-"`
   662  }
   663  
   664  func (s *InstanceConfig) MarshalJSON() ([]byte, error) {
   665  	type NoMethod InstanceConfig
   666  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   667  }
   668  
   669  // InstanceQuota: A resource budget.
   670  type InstanceQuota struct {
   671  	// AvailableMachineCount: Number of machines than can be created for the given
   672  	// location and instance_type.
   673  	AvailableMachineCount int64 `json:"availableMachineCount,omitempty"`
   674  	// GcpService: The gcp service of the provisioning quota.
   675  	GcpService string `json:"gcpService,omitempty"`
   676  	// InstanceType: Instance type. Deprecated: use gcp_service.
   677  	InstanceType string `json:"instanceType,omitempty"`
   678  	// Location: Location where the quota applies.
   679  	Location string `json:"location,omitempty"`
   680  	// Name: Output only. The name of the instance quota.
   681  	Name string `json:"name,omitempty"`
   682  	// ForceSendFields is a list of field names (e.g. "AvailableMachineCount") to
   683  	// unconditionally include in API requests. By default, fields with empty or
   684  	// default values are omitted from API requests. See
   685  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   686  	// details.
   687  	ForceSendFields []string `json:"-"`
   688  	// NullFields is a list of field names (e.g. "AvailableMachineCount") to
   689  	// include in API requests with the JSON null value. By default, fields with
   690  	// empty values are omitted from API requests. See
   691  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   692  	NullFields []string `json:"-"`
   693  }
   694  
   695  func (s *InstanceQuota) MarshalJSON() ([]byte, error) {
   696  	type NoMethod InstanceQuota
   697  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   698  }
   699  
   700  // IntakeVlanAttachment: A GCP vlan attachment.
   701  type IntakeVlanAttachment struct {
   702  	// Id: Identifier of the VLAN attachment.
   703  	Id string `json:"id,omitempty"`
   704  	// PairingKey: Attachment pairing key.
   705  	PairingKey string `json:"pairingKey,omitempty"`
   706  	// ForceSendFields is a list of field names (e.g. "Id") to unconditionally
   707  	// include in API requests. By default, fields with empty or default values are
   708  	// omitted from API requests. See
   709  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   710  	// details.
   711  	ForceSendFields []string `json:"-"`
   712  	// NullFields is a list of field names (e.g. "Id") to include in API requests
   713  	// with the JSON null value. By default, fields with empty values are omitted
   714  	// from API requests. See
   715  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   716  	NullFields []string `json:"-"`
   717  }
   718  
   719  func (s *IntakeVlanAttachment) MarshalJSON() ([]byte, error) {
   720  	type NoMethod IntakeVlanAttachment
   721  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   722  }
   723  
   724  // ListInstancesResponse: Response message for the list of servers.
   725  type ListInstancesResponse struct {
   726  	// Instances: The list of servers.
   727  	Instances []*Instance `json:"instances,omitempty"`
   728  	// NextPageToken: A token identifying a page of results from the server.
   729  	NextPageToken string `json:"nextPageToken,omitempty"`
   730  	// Unreachable: Locations that could not be reached.
   731  	Unreachable []string `json:"unreachable,omitempty"`
   732  
   733  	// ServerResponse contains the HTTP response code and headers from the server.
   734  	googleapi.ServerResponse `json:"-"`
   735  	// ForceSendFields is a list of field names (e.g. "Instances") to
   736  	// unconditionally include in API requests. By default, fields with empty or
   737  	// default values are omitted from API requests. See
   738  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   739  	// details.
   740  	ForceSendFields []string `json:"-"`
   741  	// NullFields is a list of field names (e.g. "Instances") to include in API
   742  	// requests with the JSON null value. By default, fields with empty values are
   743  	// omitted from API requests. See
   744  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   745  	NullFields []string `json:"-"`
   746  }
   747  
   748  func (s *ListInstancesResponse) MarshalJSON() ([]byte, error) {
   749  	type NoMethod ListInstancesResponse
   750  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   751  }
   752  
   753  // ListLocationsResponse: The response message for Locations.ListLocations.
   754  type ListLocationsResponse struct {
   755  	// Locations: A list of locations that matches the specified filter in the
   756  	// request.
   757  	Locations []*Location `json:"locations,omitempty"`
   758  	// NextPageToken: The standard List next-page token.
   759  	NextPageToken string `json:"nextPageToken,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. "Locations") 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. "Locations") 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 *ListLocationsResponse) MarshalJSON() ([]byte, error) {
   777  	type NoMethod ListLocationsResponse
   778  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   779  }
   780  
   781  // ListLunsResponse: Response message containing the list of storage volume
   782  // luns.
   783  type ListLunsResponse struct {
   784  	// Luns: The list of luns.
   785  	Luns []*Lun `json:"luns,omitempty"`
   786  	// NextPageToken: A token identifying a page of results from the server.
   787  	NextPageToken string `json:"nextPageToken,omitempty"`
   788  	// Unreachable: Locations that could not be reached.
   789  	Unreachable []string `json:"unreachable,omitempty"`
   790  
   791  	// ServerResponse contains the HTTP response code and headers from the server.
   792  	googleapi.ServerResponse `json:"-"`
   793  	// ForceSendFields is a list of field names (e.g. "Luns") to unconditionally
   794  	// include in API requests. By default, fields with empty or default values are
   795  	// omitted from API requests. See
   796  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   797  	// details.
   798  	ForceSendFields []string `json:"-"`
   799  	// NullFields is a list of field names (e.g. "Luns") to include in API requests
   800  	// with the JSON null value. By default, fields with empty values are omitted
   801  	// from API requests. See
   802  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   803  	NullFields []string `json:"-"`
   804  }
   805  
   806  func (s *ListLunsResponse) MarshalJSON() ([]byte, error) {
   807  	type NoMethod ListLunsResponse
   808  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   809  }
   810  
   811  // ListNetworkUsageResponse: Response with Networks with IPs
   812  type ListNetworkUsageResponse struct {
   813  	// Networks: Networks with IPs.
   814  	Networks []*NetworkUsage `json:"networks,omitempty"`
   815  
   816  	// ServerResponse contains the HTTP response code and headers from the server.
   817  	googleapi.ServerResponse `json:"-"`
   818  	// ForceSendFields is a list of field names (e.g. "Networks") to
   819  	// unconditionally include in API requests. By default, fields with empty or
   820  	// default values are omitted from API requests. See
   821  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   822  	// details.
   823  	ForceSendFields []string `json:"-"`
   824  	// NullFields is a list of field names (e.g. "Networks") to include in API
   825  	// requests with the JSON null value. By default, fields with empty values are
   826  	// omitted from API requests. See
   827  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   828  	NullFields []string `json:"-"`
   829  }
   830  
   831  func (s *ListNetworkUsageResponse) MarshalJSON() ([]byte, error) {
   832  	type NoMethod ListNetworkUsageResponse
   833  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   834  }
   835  
   836  // ListNetworksResponse: Response message containing the list of networks.
   837  type ListNetworksResponse struct {
   838  	// Networks: The list of networks.
   839  	Networks []*Network `json:"networks,omitempty"`
   840  	// NextPageToken: A token identifying a page of results from the server.
   841  	NextPageToken string `json:"nextPageToken,omitempty"`
   842  	// Unreachable: Locations that could not be reached.
   843  	Unreachable []string `json:"unreachable,omitempty"`
   844  
   845  	// ServerResponse contains the HTTP response code and headers from the server.
   846  	googleapi.ServerResponse `json:"-"`
   847  	// ForceSendFields is a list of field names (e.g. "Networks") to
   848  	// unconditionally include in API requests. By default, fields with empty or
   849  	// default values are omitted from API requests. See
   850  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   851  	// details.
   852  	ForceSendFields []string `json:"-"`
   853  	// NullFields is a list of field names (e.g. "Networks") to include in API
   854  	// requests with the JSON null value. By default, fields with empty values are
   855  	// omitted from API requests. See
   856  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   857  	NullFields []string `json:"-"`
   858  }
   859  
   860  func (s *ListNetworksResponse) MarshalJSON() ([]byte, error) {
   861  	type NoMethod ListNetworksResponse
   862  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   863  }
   864  
   865  // ListNfsSharesResponse: Response message containing the list of NFS shares.
   866  type ListNfsSharesResponse struct {
   867  	// NextPageToken: A token identifying a page of results from the server.
   868  	NextPageToken string `json:"nextPageToken,omitempty"`
   869  	// NfsShares: The list of NFS shares.
   870  	NfsShares []*NfsShare `json:"nfsShares,omitempty"`
   871  	// Unreachable: Locations that could not be reached.
   872  	Unreachable []string `json:"unreachable,omitempty"`
   873  
   874  	// ServerResponse contains the HTTP response code and headers from the server.
   875  	googleapi.ServerResponse `json:"-"`
   876  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
   877  	// unconditionally include in API requests. By default, fields with empty or
   878  	// default values are omitted from API requests. See
   879  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   880  	// details.
   881  	ForceSendFields []string `json:"-"`
   882  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
   883  	// requests with the JSON null value. By default, fields with empty values are
   884  	// omitted from API requests. See
   885  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   886  	NullFields []string `json:"-"`
   887  }
   888  
   889  func (s *ListNfsSharesResponse) MarshalJSON() ([]byte, error) {
   890  	type NoMethod ListNfsSharesResponse
   891  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   892  }
   893  
   894  // ListOSImagesResponse: Request for getting all available OS images.
   895  type ListOSImagesResponse struct {
   896  	// NextPageToken: Token to retrieve the next page of results, or empty if there
   897  	// are no more results in the list.
   898  	NextPageToken string `json:"nextPageToken,omitempty"`
   899  	// OsImages: The OS images available.
   900  	OsImages []*OSImage `json:"osImages,omitempty"`
   901  
   902  	// ServerResponse contains the HTTP response code and headers from the server.
   903  	googleapi.ServerResponse `json:"-"`
   904  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
   905  	// unconditionally include in API requests. By default, fields with empty or
   906  	// default values are omitted from API requests. See
   907  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   908  	// details.
   909  	ForceSendFields []string `json:"-"`
   910  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
   911  	// requests with the JSON null value. By default, fields with empty values are
   912  	// omitted from API requests. See
   913  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   914  	NullFields []string `json:"-"`
   915  }
   916  
   917  func (s *ListOSImagesResponse) MarshalJSON() ([]byte, error) {
   918  	type NoMethod ListOSImagesResponse
   919  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   920  }
   921  
   922  // ListProvisioningQuotasResponse: Response message for the list of
   923  // provisioning quotas.
   924  type ListProvisioningQuotasResponse struct {
   925  	// NextPageToken: Token to retrieve the next page of results, or empty if there
   926  	// are no more results in the list.
   927  	NextPageToken string `json:"nextPageToken,omitempty"`
   928  	// ProvisioningQuotas: The provisioning quotas registered in this project.
   929  	ProvisioningQuotas []*ProvisioningQuota `json:"provisioningQuotas,omitempty"`
   930  
   931  	// ServerResponse contains the HTTP response code and headers from the server.
   932  	googleapi.ServerResponse `json:"-"`
   933  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
   934  	// unconditionally include in API requests. By default, fields with empty or
   935  	// default values are omitted from API requests. See
   936  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   937  	// details.
   938  	ForceSendFields []string `json:"-"`
   939  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
   940  	// requests with the JSON null value. By default, fields with empty values are
   941  	// omitted from API requests. See
   942  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   943  	NullFields []string `json:"-"`
   944  }
   945  
   946  func (s *ListProvisioningQuotasResponse) MarshalJSON() ([]byte, error) {
   947  	type NoMethod ListProvisioningQuotasResponse
   948  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   949  }
   950  
   951  // ListSSHKeysResponse: Message for response of ListSSHKeys.
   952  type ListSSHKeysResponse struct {
   953  	// NextPageToken: Token to retrieve the next page of results, or empty if there
   954  	// are no more results in the list.
   955  	NextPageToken string `json:"nextPageToken,omitempty"`
   956  	// SshKeys: The SSH keys registered in the project.
   957  	SshKeys []*SSHKey `json:"sshKeys,omitempty"`
   958  
   959  	// ServerResponse contains the HTTP response code and headers from the server.
   960  	googleapi.ServerResponse `json:"-"`
   961  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
   962  	// unconditionally include in API requests. By default, fields with empty or
   963  	// default values are omitted from API requests. See
   964  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   965  	// details.
   966  	ForceSendFields []string `json:"-"`
   967  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
   968  	// requests with the JSON null value. By default, fields with empty values are
   969  	// omitted from API requests. See
   970  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   971  	NullFields []string `json:"-"`
   972  }
   973  
   974  func (s *ListSSHKeysResponse) MarshalJSON() ([]byte, error) {
   975  	type NoMethod ListSSHKeysResponse
   976  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   977  }
   978  
   979  // ListVolumeSnapshotsResponse: Response message containing the list of volume
   980  // snapshots.
   981  type ListVolumeSnapshotsResponse struct {
   982  	// NextPageToken: A token identifying a page of results from the server.
   983  	NextPageToken string `json:"nextPageToken,omitempty"`
   984  	// Unreachable: Locations that could not be reached.
   985  	Unreachable []string `json:"unreachable,omitempty"`
   986  	// VolumeSnapshots: The list of snapshots.
   987  	VolumeSnapshots []*VolumeSnapshot `json:"volumeSnapshots,omitempty"`
   988  
   989  	// ServerResponse contains the HTTP response code and headers from the server.
   990  	googleapi.ServerResponse `json:"-"`
   991  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
   992  	// unconditionally include in API requests. By default, fields with empty or
   993  	// default values are omitted from API requests. See
   994  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   995  	// details.
   996  	ForceSendFields []string `json:"-"`
   997  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
   998  	// requests with the JSON null value. By default, fields with empty values are
   999  	// omitted from API requests. See
  1000  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1001  	NullFields []string `json:"-"`
  1002  }
  1003  
  1004  func (s *ListVolumeSnapshotsResponse) MarshalJSON() ([]byte, error) {
  1005  	type NoMethod ListVolumeSnapshotsResponse
  1006  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1007  }
  1008  
  1009  // ListVolumesResponse: Response message containing the list of storage
  1010  // volumes.
  1011  type ListVolumesResponse struct {
  1012  	// NextPageToken: A token identifying a page of results from the server.
  1013  	NextPageToken string `json:"nextPageToken,omitempty"`
  1014  	// Unreachable: Locations that could not be reached.
  1015  	Unreachable []string `json:"unreachable,omitempty"`
  1016  	// Volumes: The list of storage volumes.
  1017  	Volumes []*Volume `json:"volumes,omitempty"`
  1018  
  1019  	// ServerResponse contains the HTTP response code and headers from the server.
  1020  	googleapi.ServerResponse `json:"-"`
  1021  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1022  	// unconditionally include in API requests. By default, fields with empty or
  1023  	// default values are omitted from API requests. See
  1024  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1025  	// details.
  1026  	ForceSendFields []string `json:"-"`
  1027  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1028  	// requests with the JSON null value. By default, fields with empty values are
  1029  	// omitted from API requests. See
  1030  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1031  	NullFields []string `json:"-"`
  1032  }
  1033  
  1034  func (s *ListVolumesResponse) MarshalJSON() ([]byte, error) {
  1035  	type NoMethod ListVolumesResponse
  1036  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1037  }
  1038  
  1039  // LoadInstanceAuthInfoResponse: Response for LoadInstanceAuthInfo.
  1040  type LoadInstanceAuthInfoResponse struct {
  1041  	// SshKeys: List of ssh keys.
  1042  	SshKeys []*SSHKey `json:"sshKeys,omitempty"`
  1043  	// UserAccounts: Map of username to the user account info.
  1044  	UserAccounts map[string]UserAccount `json:"userAccounts,omitempty"`
  1045  
  1046  	// ServerResponse contains the HTTP response code and headers from the server.
  1047  	googleapi.ServerResponse `json:"-"`
  1048  	// ForceSendFields is a list of field names (e.g. "SshKeys") to unconditionally
  1049  	// include in API requests. By default, fields with empty or default values are
  1050  	// omitted from API requests. See
  1051  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1052  	// details.
  1053  	ForceSendFields []string `json:"-"`
  1054  	// NullFields is a list of field names (e.g. "SshKeys") to include in API
  1055  	// requests with the JSON null value. By default, fields with empty values are
  1056  	// omitted from API requests. See
  1057  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1058  	NullFields []string `json:"-"`
  1059  }
  1060  
  1061  func (s *LoadInstanceAuthInfoResponse) MarshalJSON() ([]byte, error) {
  1062  	type NoMethod LoadInstanceAuthInfoResponse
  1063  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1064  }
  1065  
  1066  // Location: A resource that represents a Google Cloud location.
  1067  type Location struct {
  1068  	// DisplayName: The friendly name for this location, typically a nearby city
  1069  	// name. For example, "Tokyo".
  1070  	DisplayName string `json:"displayName,omitempty"`
  1071  	// Labels: Cross-service attributes for the location. For example
  1072  	// {"cloud.googleapis.com/region": "us-east1"}
  1073  	Labels map[string]string `json:"labels,omitempty"`
  1074  	// LocationId: The canonical id for this location. For example: "us-east1".
  1075  	LocationId string `json:"locationId,omitempty"`
  1076  	// Metadata: Service-specific metadata. For example the available capacity at
  1077  	// the given location.
  1078  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  1079  	// Name: Resource name for the location, which may vary between
  1080  	// implementations. For example:
  1081  	// "projects/example-project/locations/us-east1"
  1082  	Name string `json:"name,omitempty"`
  1083  
  1084  	// ServerResponse contains the HTTP response code and headers from the server.
  1085  	googleapi.ServerResponse `json:"-"`
  1086  	// ForceSendFields is a list of field names (e.g. "DisplayName") to
  1087  	// unconditionally include in API requests. By default, fields with empty or
  1088  	// default values are omitted from API requests. See
  1089  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1090  	// details.
  1091  	ForceSendFields []string `json:"-"`
  1092  	// NullFields is a list of field names (e.g. "DisplayName") to include in API
  1093  	// requests with the JSON null value. By default, fields with empty values are
  1094  	// omitted from API requests. See
  1095  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1096  	NullFields []string `json:"-"`
  1097  }
  1098  
  1099  func (s *Location) MarshalJSON() ([]byte, error) {
  1100  	type NoMethod Location
  1101  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1102  }
  1103  
  1104  // LogicalNetworkInterface: Each logical network interface is effectively a
  1105  // network and IP pair.
  1106  type LogicalNetworkInterface struct {
  1107  	// DefaultGateway: Whether this interface is the default gateway for the
  1108  	// instance. Only one interface can be the default gateway for the instance.
  1109  	DefaultGateway bool `json:"defaultGateway,omitempty"`
  1110  	// Id: An identifier for the `Network`, generated by the backend.
  1111  	Id string `json:"id,omitempty"`
  1112  	// IpAddress: IP address in the network
  1113  	IpAddress string `json:"ipAddress,omitempty"`
  1114  	// Network: Name of the network
  1115  	Network string `json:"network,omitempty"`
  1116  	// NetworkType: Type of network.
  1117  	//
  1118  	// Possible values:
  1119  	//   "TYPE_UNSPECIFIED" - Unspecified value.
  1120  	//   "CLIENT" - Client network, a network peered to a Google Cloud VPC.
  1121  	//   "PRIVATE" - Private network, a network local to the Bare Metal Solution
  1122  	// environment.
  1123  	NetworkType string `json:"networkType,omitempty"`
  1124  	// ForceSendFields is a list of field names (e.g. "DefaultGateway") to
  1125  	// unconditionally include in API requests. By default, fields with empty or
  1126  	// default values are omitted from API requests. See
  1127  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1128  	// details.
  1129  	ForceSendFields []string `json:"-"`
  1130  	// NullFields is a list of field names (e.g. "DefaultGateway") to include in
  1131  	// API requests with the JSON null value. By default, fields with empty values
  1132  	// are omitted from API requests. See
  1133  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1134  	NullFields []string `json:"-"`
  1135  }
  1136  
  1137  func (s *LogicalNetworkInterface) MarshalJSON() ([]byte, error) {
  1138  	type NoMethod LogicalNetworkInterface
  1139  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1140  }
  1141  
  1142  // Lun: A storage volume logical unit number (LUN).
  1143  type Lun struct {
  1144  	// BootLun: Display if this LUN is a boot LUN.
  1145  	BootLun bool `json:"bootLun,omitempty"`
  1146  	// ExpireTime: Output only. Time after which LUN will be fully deleted. It is
  1147  	// filled only for LUNs in COOL_OFF state.
  1148  	ExpireTime string `json:"expireTime,omitempty"`
  1149  	// Id: An identifier for the LUN, generated by the backend.
  1150  	Id string `json:"id,omitempty"`
  1151  	// Instances: Output only. Instances this Lun is attached to.
  1152  	Instances []string `json:"instances,omitempty"`
  1153  	// MultiprotocolType: The LUN multiprotocol type ensures the characteristics of
  1154  	// the LUN are optimized for each operating system.
  1155  	//
  1156  	// Possible values:
  1157  	//   "MULTIPROTOCOL_TYPE_UNSPECIFIED" - Server has no OS specified.
  1158  	//   "LINUX" - Server with Linux OS.
  1159  	MultiprotocolType string `json:"multiprotocolType,omitempty"`
  1160  	// Name: Output only. The name of the LUN.
  1161  	Name string `json:"name,omitempty"`
  1162  	// Shareable: Display if this LUN can be shared between multiple physical
  1163  	// servers.
  1164  	Shareable bool `json:"shareable,omitempty"`
  1165  	// SizeGb: The size of this LUN, in GiB.
  1166  	SizeGb int64 `json:"sizeGb,omitempty,string"`
  1167  	// State: The state of this storage volume.
  1168  	//
  1169  	// Possible values:
  1170  	//   "STATE_UNSPECIFIED" - The LUN is in an unknown state.
  1171  	//   "CREATING" - The LUN is being created.
  1172  	//   "UPDATING" - The LUN is being updated.
  1173  	//   "READY" - The LUN is ready for use.
  1174  	//   "DELETING" - The LUN has been requested to be deleted.
  1175  	//   "COOL_OFF" - The LUN is in cool off state. It will be deleted after
  1176  	// `expire_time`.
  1177  	State string `json:"state,omitempty"`
  1178  	// StorageType: The storage type for this LUN.
  1179  	//
  1180  	// Possible values:
  1181  	//   "STORAGE_TYPE_UNSPECIFIED" - The storage type for this LUN is unknown.
  1182  	//   "SSD" - This storage type for this LUN is SSD.
  1183  	//   "HDD" - This storage type for this LUN is HDD.
  1184  	StorageType string `json:"storageType,omitempty"`
  1185  	// StorageVolume: Display the storage volume for this LUN.
  1186  	StorageVolume string `json:"storageVolume,omitempty"`
  1187  	// Wwid: The WWID for this LUN.
  1188  	Wwid string `json:"wwid,omitempty"`
  1189  
  1190  	// ServerResponse contains the HTTP response code and headers from the server.
  1191  	googleapi.ServerResponse `json:"-"`
  1192  	// ForceSendFields is a list of field names (e.g. "BootLun") to unconditionally
  1193  	// include in API requests. By default, fields with empty or default values are
  1194  	// omitted from API requests. See
  1195  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1196  	// details.
  1197  	ForceSendFields []string `json:"-"`
  1198  	// NullFields is a list of field names (e.g. "BootLun") to include in API
  1199  	// requests with the JSON null value. By default, fields with empty values are
  1200  	// omitted from API requests. See
  1201  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1202  	NullFields []string `json:"-"`
  1203  }
  1204  
  1205  func (s *Lun) MarshalJSON() ([]byte, error) {
  1206  	type NoMethod Lun
  1207  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1208  }
  1209  
  1210  // LunRange: A LUN(Logical Unit Number) range.
  1211  type LunRange struct {
  1212  	// Quantity: Number of LUNs to create.
  1213  	Quantity int64 `json:"quantity,omitempty"`
  1214  	// SizeGb: The requested size of each LUN, in GB.
  1215  	SizeGb int64 `json:"sizeGb,omitempty"`
  1216  	// ForceSendFields is a list of field names (e.g. "Quantity") to
  1217  	// unconditionally include in API requests. By default, fields with empty or
  1218  	// default values are omitted from API requests. See
  1219  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1220  	// details.
  1221  	ForceSendFields []string `json:"-"`
  1222  	// NullFields is a list of field names (e.g. "Quantity") to include in API
  1223  	// requests with the JSON null value. By default, fields with empty values are
  1224  	// omitted from API requests. See
  1225  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1226  	NullFields []string `json:"-"`
  1227  }
  1228  
  1229  func (s *LunRange) MarshalJSON() ([]byte, error) {
  1230  	type NoMethod LunRange
  1231  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1232  }
  1233  
  1234  // Network: A Network.
  1235  type Network struct {
  1236  	// Cidr: The cidr of the Network.
  1237  	Cidr string `json:"cidr,omitempty"`
  1238  	// GatewayIp: Output only. Gateway ip address.
  1239  	GatewayIp string `json:"gatewayIp,omitempty"`
  1240  	// Id: An identifier for the `Network`, generated by the backend.
  1241  	Id string `json:"id,omitempty"`
  1242  	// IpAddress: IP address configured.
  1243  	IpAddress string `json:"ipAddress,omitempty"`
  1244  	// JumboFramesEnabled: Whether network uses standard frames or jumbo ones.
  1245  	JumboFramesEnabled bool `json:"jumboFramesEnabled,omitempty"`
  1246  	// Labels: Labels as key value pairs.
  1247  	Labels map[string]string `json:"labels,omitempty"`
  1248  	// MacAddress: List of physical interfaces.
  1249  	MacAddress []string `json:"macAddress,omitempty"`
  1250  	// MountPoints: Input only. List of mount points to attach the network to.
  1251  	MountPoints []*NetworkMountPoint `json:"mountPoints,omitempty"`
  1252  	// Name: Output only. The resource name of this `Network`. Resource names are
  1253  	// schemeless URIs that follow the conventions in
  1254  	// https://cloud.google.com/apis/design/resource_names. Format:
  1255  	// `projects/{project}/locations/{location}/networks/{network}`
  1256  	Name string `json:"name,omitempty"`
  1257  	// Pod: Immutable. Pod name. Pod is an independent part of infrastructure.
  1258  	// Network can only be connected to the assets (instances, nfsshares) allocated
  1259  	// in the same pod.
  1260  	Pod string `json:"pod,omitempty"`
  1261  	// Reservations: List of IP address reservations in this network. When updating
  1262  	// this field, an error will be generated if a reservation conflicts with an IP
  1263  	// address already allocated to a physical server.
  1264  	Reservations []*NetworkAddressReservation `json:"reservations,omitempty"`
  1265  	// ServicesCidr: IP range for reserved for services (e.g. NFS).
  1266  	ServicesCidr string `json:"servicesCidr,omitempty"`
  1267  	// State: The Network state.
  1268  	//
  1269  	// Possible values:
  1270  	//   "STATE_UNSPECIFIED" - The Network is in an unknown state.
  1271  	//   "PROVISIONING" - The Network is provisioning.
  1272  	//   "PROVISIONED" - The Network has been provisioned.
  1273  	//   "DEPROVISIONING" - The Network is being deprovisioned.
  1274  	//   "UPDATING" - The Network is being updated.
  1275  	State string `json:"state,omitempty"`
  1276  	// Type: The type of this network.
  1277  	//
  1278  	// Possible values:
  1279  	//   "TYPE_UNSPECIFIED" - Unspecified value.
  1280  	//   "CLIENT" - Client network, a network peered to a Google Cloud VPC.
  1281  	//   "PRIVATE" - Private network, a network local to the Bare Metal Solution
  1282  	// environment.
  1283  	Type string `json:"type,omitempty"`
  1284  	// VlanId: The vlan id of the Network.
  1285  	VlanId string `json:"vlanId,omitempty"`
  1286  	// Vrf: The Vrf for the Network. Use this only if a new Vrf needs to be
  1287  	// created.
  1288  	Vrf *VRF `json:"vrf,omitempty"`
  1289  	// VrfAttachment: Optional. The name of a pre-existing Vrf that the network
  1290  	// should be attached to. Format is `vrfs/{vrf}`.
  1291  	VrfAttachment string `json:"vrfAttachment,omitempty"`
  1292  
  1293  	// ServerResponse contains the HTTP response code and headers from the server.
  1294  	googleapi.ServerResponse `json:"-"`
  1295  	// ForceSendFields is a list of field names (e.g. "Cidr") to unconditionally
  1296  	// include in API requests. By default, fields with empty or default values are
  1297  	// omitted from API requests. See
  1298  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1299  	// details.
  1300  	ForceSendFields []string `json:"-"`
  1301  	// NullFields is a list of field names (e.g. "Cidr") to include in API requests
  1302  	// with the JSON null value. By default, fields with empty values are omitted
  1303  	// from API requests. See
  1304  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1305  	NullFields []string `json:"-"`
  1306  }
  1307  
  1308  func (s *Network) MarshalJSON() ([]byte, error) {
  1309  	type NoMethod Network
  1310  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1311  }
  1312  
  1313  // NetworkAddress: A network.
  1314  type NetworkAddress struct {
  1315  	// Address: IPv4 address to be assigned to the server.
  1316  	Address string `json:"address,omitempty"`
  1317  	// ExistingNetworkId: Name of the existing network to use.
  1318  	ExistingNetworkId string `json:"existingNetworkId,omitempty"`
  1319  	// NetworkId: Id of the network to use, within the same ProvisioningConfig
  1320  	// request.
  1321  	NetworkId string `json:"networkId,omitempty"`
  1322  	// ForceSendFields is a list of field names (e.g. "Address") to unconditionally
  1323  	// include in API requests. By default, fields with empty or default values are
  1324  	// omitted from API requests. See
  1325  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1326  	// details.
  1327  	ForceSendFields []string `json:"-"`
  1328  	// NullFields is a list of field names (e.g. "Address") to include in API
  1329  	// requests with the JSON null value. By default, fields with empty values are
  1330  	// omitted from API requests. See
  1331  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1332  	NullFields []string `json:"-"`
  1333  }
  1334  
  1335  func (s *NetworkAddress) MarshalJSON() ([]byte, error) {
  1336  	type NoMethod NetworkAddress
  1337  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1338  }
  1339  
  1340  // NetworkAddressReservation: A reservation of one or more addresses in a
  1341  // network.
  1342  type NetworkAddressReservation struct {
  1343  	// EndAddress: The last address of this reservation block, inclusive. I.e., for
  1344  	// cases when reservations are only single addresses, end_address and
  1345  	// start_address will be the same. Must be specified as a single IPv4 address,
  1346  	// e.g. 10.1.2.2.
  1347  	EndAddress string `json:"endAddress,omitempty"`
  1348  	// Note: A note about this reservation, intended for human consumption.
  1349  	Note string `json:"note,omitempty"`
  1350  	// StartAddress: The first address of this reservation block. Must be specified
  1351  	// as a single IPv4 address, e.g. 10.1.2.2.
  1352  	StartAddress string `json:"startAddress,omitempty"`
  1353  	// ForceSendFields is a list of field names (e.g. "EndAddress") to
  1354  	// unconditionally include in API requests. By default, fields with empty or
  1355  	// default values are omitted from API requests. See
  1356  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1357  	// details.
  1358  	ForceSendFields []string `json:"-"`
  1359  	// NullFields is a list of field names (e.g. "EndAddress") to include in API
  1360  	// requests with the JSON null value. By default, fields with empty values are
  1361  	// omitted from API requests. See
  1362  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1363  	NullFields []string `json:"-"`
  1364  }
  1365  
  1366  func (s *NetworkAddressReservation) MarshalJSON() ([]byte, error) {
  1367  	type NoMethod NetworkAddressReservation
  1368  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1369  }
  1370  
  1371  // NetworkConfig: Configuration parameters for a new network.
  1372  type NetworkConfig struct {
  1373  	// Bandwidth: Interconnect bandwidth. Set only when type is CLIENT.
  1374  	//
  1375  	// Possible values:
  1376  	//   "BANDWIDTH_UNSPECIFIED" - Unspecified value.
  1377  	//   "BW_1_GBPS" - 1 Gbps.
  1378  	//   "BW_2_GBPS" - 2 Gbps.
  1379  	//   "BW_5_GBPS" - 5 Gbps.
  1380  	//   "BW_10_GBPS" - 10 Gbps.
  1381  	Bandwidth string `json:"bandwidth,omitempty"`
  1382  	// Cidr: CIDR range of the network.
  1383  	Cidr string `json:"cidr,omitempty"`
  1384  	// GcpService: The GCP service of the network. Available gcp_service are in
  1385  	// https://cloud.google.com/bare-metal/docs/bms-planning.
  1386  	GcpService string `json:"gcpService,omitempty"`
  1387  	// Id: A transient unique identifier to identify a volume within an
  1388  	// ProvisioningConfig request.
  1389  	Id string `json:"id,omitempty"`
  1390  	// JumboFramesEnabled: The JumboFramesEnabled option for customer to set.
  1391  	JumboFramesEnabled bool `json:"jumboFramesEnabled,omitempty"`
  1392  	// Name: Output only. The name of the network config.
  1393  	Name string `json:"name,omitempty"`
  1394  	// ServiceCidr: Service CIDR, if any.
  1395  	//
  1396  	// Possible values:
  1397  	//   "SERVICE_CIDR_UNSPECIFIED" - Unspecified value.
  1398  	//   "DISABLED" - Services are disabled for the given network.
  1399  	//   "HIGH_26" - Use the highest /26 block of the network to host services.
  1400  	//   "HIGH_27" - Use the highest /27 block of the network to host services.
  1401  	//   "HIGH_28" - Use the highest /28 block of the network to host services.
  1402  	ServiceCidr string `json:"serviceCidr,omitempty"`
  1403  	// Type: The type of this network, either Client or Private.
  1404  	//
  1405  	// Possible values:
  1406  	//   "TYPE_UNSPECIFIED" - Unspecified value.
  1407  	//   "CLIENT" - Client network, that is a network peered to a GCP VPC.
  1408  	//   "PRIVATE" - Private network, that is a network local to the BMS POD.
  1409  	Type string `json:"type,omitempty"`
  1410  	// UserNote: User note field, it can be used by customers to add additional
  1411  	// information for the BMS Ops team .
  1412  	UserNote string `json:"userNote,omitempty"`
  1413  	// VlanAttachments: List of VLAN attachments. As of now there are always 2
  1414  	// attachments, but it is going to change in the future (multi vlan).
  1415  	VlanAttachments []*IntakeVlanAttachment `json:"vlanAttachments,omitempty"`
  1416  	// VlanSameProject: Whether the VLAN attachment pair is located in the same
  1417  	// project.
  1418  	VlanSameProject bool `json:"vlanSameProject,omitempty"`
  1419  	// ForceSendFields is a list of field names (e.g. "Bandwidth") to
  1420  	// unconditionally include in API requests. By default, fields with empty or
  1421  	// default values are omitted from API requests. See
  1422  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1423  	// details.
  1424  	ForceSendFields []string `json:"-"`
  1425  	// NullFields is a list of field names (e.g. "Bandwidth") to include in API
  1426  	// requests with the JSON null value. By default, fields with empty values are
  1427  	// omitted from API requests. See
  1428  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1429  	NullFields []string `json:"-"`
  1430  }
  1431  
  1432  func (s *NetworkConfig) MarshalJSON() ([]byte, error) {
  1433  	type NoMethod NetworkConfig
  1434  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1435  }
  1436  
  1437  // NetworkMountPoint: Mount point for a network.
  1438  type NetworkMountPoint struct {
  1439  	// DefaultGateway: Network should be a default gateway.
  1440  	DefaultGateway bool `json:"defaultGateway,omitempty"`
  1441  	// Instance: Instance to attach network to.
  1442  	Instance string `json:"instance,omitempty"`
  1443  	// IpAddress: Ip address of the server.
  1444  	IpAddress string `json:"ipAddress,omitempty"`
  1445  	// LogicalInterface: Logical interface to detach from.
  1446  	LogicalInterface string `json:"logicalInterface,omitempty"`
  1447  	// ForceSendFields is a list of field names (e.g. "DefaultGateway") to
  1448  	// unconditionally include in API requests. By default, fields with empty or
  1449  	// default values are omitted from API requests. See
  1450  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1451  	// details.
  1452  	ForceSendFields []string `json:"-"`
  1453  	// NullFields is a list of field names (e.g. "DefaultGateway") to include in
  1454  	// API requests with the JSON null value. By default, fields with empty values
  1455  	// are omitted from API requests. See
  1456  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1457  	NullFields []string `json:"-"`
  1458  }
  1459  
  1460  func (s *NetworkMountPoint) MarshalJSON() ([]byte, error) {
  1461  	type NoMethod NetworkMountPoint
  1462  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1463  }
  1464  
  1465  // NetworkUsage: Network with all used IP addresses.
  1466  type NetworkUsage struct {
  1467  	// Network: Network.
  1468  	Network *Network `json:"network,omitempty"`
  1469  	// UsedIps: All used IP addresses in this network.
  1470  	UsedIps []string `json:"usedIps,omitempty"`
  1471  	// ForceSendFields is a list of field names (e.g. "Network") to unconditionally
  1472  	// include in API requests. By default, fields with empty or default values are
  1473  	// omitted from API requests. See
  1474  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1475  	// details.
  1476  	ForceSendFields []string `json:"-"`
  1477  	// NullFields is a list of field names (e.g. "Network") to include in API
  1478  	// requests with the JSON null value. By default, fields with empty values are
  1479  	// omitted from API requests. See
  1480  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1481  	NullFields []string `json:"-"`
  1482  }
  1483  
  1484  func (s *NetworkUsage) MarshalJSON() ([]byte, error) {
  1485  	type NoMethod NetworkUsage
  1486  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1487  }
  1488  
  1489  // NfsExport: A NFS export entry.
  1490  type NfsExport struct {
  1491  	// AllowDev: Allow dev flag in NfsShare AllowedClientsRequest.
  1492  	AllowDev bool `json:"allowDev,omitempty"`
  1493  	// AllowSuid: Allow the setuid flag.
  1494  	AllowSuid bool `json:"allowSuid,omitempty"`
  1495  	// Cidr: A CIDR range.
  1496  	Cidr string `json:"cidr,omitempty"`
  1497  	// MachineId: Either a single machine, identified by an ID, or a
  1498  	// comma-separated list of machine IDs.
  1499  	MachineId string `json:"machineId,omitempty"`
  1500  	// NetworkId: Network to use to publish the export.
  1501  	NetworkId string `json:"networkId,omitempty"`
  1502  	// NoRootSquash: Disable root squashing, which is a feature of NFS. Root squash
  1503  	// is a special mapping of the remote superuser (root) identity when using
  1504  	// identity authentication.
  1505  	NoRootSquash bool `json:"noRootSquash,omitempty"`
  1506  	// Permissions: Export permissions.
  1507  	//
  1508  	// Possible values:
  1509  	//   "PERMISSIONS_UNSPECIFIED" - Unspecified value.
  1510  	//   "READ_ONLY" - Read-only permission.
  1511  	//   "READ_WRITE" - Read-write permission.
  1512  	Permissions string `json:"permissions,omitempty"`
  1513  	// ForceSendFields is a list of field names (e.g. "AllowDev") to
  1514  	// unconditionally include in API requests. By default, fields with empty or
  1515  	// default values are omitted from API requests. See
  1516  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1517  	// details.
  1518  	ForceSendFields []string `json:"-"`
  1519  	// NullFields is a list of field names (e.g. "AllowDev") to include in API
  1520  	// requests with the JSON null value. By default, fields with empty values are
  1521  	// omitted from API requests. See
  1522  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1523  	NullFields []string `json:"-"`
  1524  }
  1525  
  1526  func (s *NfsExport) MarshalJSON() ([]byte, error) {
  1527  	type NoMethod NfsExport
  1528  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1529  }
  1530  
  1531  // NfsShare: An NFS share.
  1532  type NfsShare struct {
  1533  	// AllowedClients: List of allowed access points.
  1534  	AllowedClients []*AllowedClient `json:"allowedClients,omitempty"`
  1535  	// Id: Output only. An identifier for the NFS share, generated by the backend.
  1536  	// This is the same value as nfs_share_id and will replace it in the future.
  1537  	Id string `json:"id,omitempty"`
  1538  	// Labels: Labels as key value pairs.
  1539  	Labels map[string]string `json:"labels,omitempty"`
  1540  	// Name: Immutable. The name of the NFS share.
  1541  	Name string `json:"name,omitempty"`
  1542  	// NfsShareId: Output only. An identifier for the NFS share, generated by the
  1543  	// backend. This field will be deprecated in the future, use `id` instead.
  1544  	NfsShareId string `json:"nfsShareId,omitempty"`
  1545  	// Pod: Immutable. Pod name. Pod is an independent part of infrastructure.
  1546  	// NFSShare can only be connected to the assets (networks, instances) allocated
  1547  	// in the same pod.
  1548  	Pod string `json:"pod,omitempty"`
  1549  	// RequestedSizeGib: The requested size, in GiB.
  1550  	RequestedSizeGib int64 `json:"requestedSizeGib,omitempty,string"`
  1551  	// State: Output only. The state of the NFS share.
  1552  	//
  1553  	// Possible values:
  1554  	//   "STATE_UNSPECIFIED" - The share is in an unknown state.
  1555  	//   "PROVISIONED" - The share has been provisioned.
  1556  	//   "CREATING" - The NFS Share is being created.
  1557  	//   "UPDATING" - The NFS Share is being updated.
  1558  	//   "DELETING" - The NFS Share has been requested to be deleted.
  1559  	State string `json:"state,omitempty"`
  1560  	// StorageType: Immutable. The storage type of the underlying volume.
  1561  	//
  1562  	// Possible values:
  1563  	//   "STORAGE_TYPE_UNSPECIFIED" - The storage type for this volume is unknown.
  1564  	//   "SSD" - The storage type for this volume is SSD.
  1565  	//   "HDD" - This storage type for this volume is HDD.
  1566  	StorageType string `json:"storageType,omitempty"`
  1567  	// Volume: Output only. The underlying volume of the share. Created
  1568  	// automatically during provisioning.
  1569  	Volume string `json:"volume,omitempty"`
  1570  
  1571  	// ServerResponse contains the HTTP response code and headers from the server.
  1572  	googleapi.ServerResponse `json:"-"`
  1573  	// ForceSendFields is a list of field names (e.g. "AllowedClients") to
  1574  	// unconditionally include in API requests. By default, fields with empty or
  1575  	// default values are omitted from API requests. See
  1576  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1577  	// details.
  1578  	ForceSendFields []string `json:"-"`
  1579  	// NullFields is a list of field names (e.g. "AllowedClients") to include in
  1580  	// API requests with the JSON null value. By default, fields with empty values
  1581  	// are omitted from API requests. See
  1582  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1583  	NullFields []string `json:"-"`
  1584  }
  1585  
  1586  func (s *NfsShare) MarshalJSON() ([]byte, error) {
  1587  	type NoMethod NfsShare
  1588  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1589  }
  1590  
  1591  // OSImage: Operation System image.
  1592  type OSImage struct {
  1593  	// ApplicableInstanceTypes: Instance types this image is applicable to.
  1594  	// Available types
  1595  	// (https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations)
  1596  	ApplicableInstanceTypes []string `json:"applicableInstanceTypes,omitempty"`
  1597  	// Code: OS Image code.
  1598  	Code string `json:"code,omitempty"`
  1599  	// Description: OS Image description.
  1600  	Description string `json:"description,omitempty"`
  1601  	// Name: Output only. OS Image's unique name.
  1602  	Name string `json:"name,omitempty"`
  1603  	// SupportedNetworkTemplates: Network templates that can be used with this OS
  1604  	// Image.
  1605  	SupportedNetworkTemplates []string `json:"supportedNetworkTemplates,omitempty"`
  1606  
  1607  	// ServerResponse contains the HTTP response code and headers from the server.
  1608  	googleapi.ServerResponse `json:"-"`
  1609  	// ForceSendFields is a list of field names (e.g. "ApplicableInstanceTypes") to
  1610  	// unconditionally include in API requests. By default, fields with empty or
  1611  	// default values are omitted from API requests. See
  1612  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1613  	// details.
  1614  	ForceSendFields []string `json:"-"`
  1615  	// NullFields is a list of field names (e.g. "ApplicableInstanceTypes") to
  1616  	// include in API requests with the JSON null value. By default, fields with
  1617  	// empty values are omitted from API requests. See
  1618  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1619  	NullFields []string `json:"-"`
  1620  }
  1621  
  1622  func (s *OSImage) MarshalJSON() ([]byte, error) {
  1623  	type NoMethod OSImage
  1624  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1625  }
  1626  
  1627  // Operation: This resource represents a long-running operation that is the
  1628  // result of a network API call.
  1629  type Operation struct {
  1630  	// Done: If the value is `false`, it means the operation is still in progress.
  1631  	// If `true`, the operation is completed, and either `error` or `response` is
  1632  	// available.
  1633  	Done bool `json:"done,omitempty"`
  1634  	// Error: The error result of the operation in case of failure or cancellation.
  1635  	Error *Status `json:"error,omitempty"`
  1636  	// Metadata: Service-specific metadata associated with the operation. It
  1637  	// typically contains progress information and common metadata such as create
  1638  	// time. Some services might not provide such metadata. Any method that returns
  1639  	// a long-running operation should document the metadata type, if any.
  1640  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  1641  	// Name: The server-assigned name, which is only unique within the same service
  1642  	// that originally returns it. If you use the default HTTP mapping, the `name`
  1643  	// should be a resource name ending with `operations/{unique_id}`.
  1644  	Name string `json:"name,omitempty"`
  1645  	// Response: The normal, successful response of the operation. If the original
  1646  	// method returns no data on success, such as `Delete`, the response is
  1647  	// `google.protobuf.Empty`. If the original method is standard
  1648  	// `Get`/`Create`/`Update`, the response should be the resource. For other
  1649  	// methods, the response should have the type `XxxResponse`, where `Xxx` is the
  1650  	// original method name. For example, if the original method name is
  1651  	// `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
  1652  	Response googleapi.RawMessage `json:"response,omitempty"`
  1653  
  1654  	// ServerResponse contains the HTTP response code and headers from the server.
  1655  	googleapi.ServerResponse `json:"-"`
  1656  	// ForceSendFields is a list of field names (e.g. "Done") to unconditionally
  1657  	// include in API requests. By default, fields with empty or default values are
  1658  	// omitted from API requests. See
  1659  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1660  	// details.
  1661  	ForceSendFields []string `json:"-"`
  1662  	// NullFields is a list of field names (e.g. "Done") to include in API requests
  1663  	// with the JSON null value. By default, fields with empty values are omitted
  1664  	// from API requests. See
  1665  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1666  	NullFields []string `json:"-"`
  1667  }
  1668  
  1669  func (s *Operation) MarshalJSON() ([]byte, error) {
  1670  	type NoMethod Operation
  1671  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1672  }
  1673  
  1674  // ProvisioningConfig: A provisioning configuration.
  1675  type ProvisioningConfig struct {
  1676  	// CloudConsoleUri: Output only. URI to Cloud Console UI view of this
  1677  	// provisioning config.
  1678  	CloudConsoleUri string `json:"cloudConsoleUri,omitempty"`
  1679  	// CustomId: Optional. The user-defined identifier of the provisioning config.
  1680  	CustomId string `json:"customId,omitempty"`
  1681  	// Email: Email provided to send a confirmation with provisioning config to.
  1682  	// Deprecated in favour of email field in request messages.
  1683  	Email string `json:"email,omitempty"`
  1684  	// HandoverServiceAccount: A service account to enable customers to access
  1685  	// instance credentials upon handover.
  1686  	HandoverServiceAccount string `json:"handoverServiceAccount,omitempty"`
  1687  	// Instances: Instances to be created.
  1688  	Instances []*InstanceConfig `json:"instances,omitempty"`
  1689  	// Location: Optional. Location name of this ProvisioningConfig. It is optional
  1690  	// only for Intake UI transition period.
  1691  	Location string `json:"location,omitempty"`
  1692  	// Name: Output only. The system-generated name of the provisioning config.
  1693  	// This follows the UUID format.
  1694  	Name string `json:"name,omitempty"`
  1695  	// Networks: Networks to be created.
  1696  	Networks []*NetworkConfig `json:"networks,omitempty"`
  1697  	// Pod: Optional. Pod name. Pod is an independent part of infrastructure.
  1698  	// Instance can be connected to the assets (networks, volumes, nfsshares)
  1699  	// allocated in the same pod only.
  1700  	Pod string `json:"pod,omitempty"`
  1701  	// State: Output only. State of ProvisioningConfig.
  1702  	//
  1703  	// Possible values:
  1704  	//   "STATE_UNSPECIFIED" - State wasn't specified.
  1705  	//   "DRAFT" - ProvisioningConfig is a draft and can be freely modified.
  1706  	//   "SUBMITTED" - ProvisioningConfig was already submitted and cannot be
  1707  	// modified.
  1708  	//   "PROVISIONING" - ProvisioningConfig was in the provisioning state.
  1709  	// Initially this state comes from the work order table in big query when SNOW
  1710  	// is used. Later this field can be set by the work order API.
  1711  	//   "PROVISIONED" - ProvisioningConfig was provisioned, meaning the resources
  1712  	// exist.
  1713  	//   "VALIDATED" - ProvisioningConfig was validated. A validation tool will be
  1714  	// run to set this state.
  1715  	//   "CANCELLED" - ProvisioningConfig was canceled.
  1716  	//   "FAILED" - The request is submitted for provisioning, with error return.
  1717  	State string `json:"state,omitempty"`
  1718  	// StatusMessage: Optional status messages associated with the FAILED state.
  1719  	StatusMessage string `json:"statusMessage,omitempty"`
  1720  	// TicketId: A generated ticket id to track provisioning request.
  1721  	TicketId string `json:"ticketId,omitempty"`
  1722  	// UpdateTime: Output only. Last update timestamp.
  1723  	UpdateTime string `json:"updateTime,omitempty"`
  1724  	// Volumes: Volumes to be created.
  1725  	Volumes []*VolumeConfig `json:"volumes,omitempty"`
  1726  	// VpcScEnabled: If true, VPC SC is enabled for the cluster.
  1727  	VpcScEnabled bool `json:"vpcScEnabled,omitempty"`
  1728  
  1729  	// ServerResponse contains the HTTP response code and headers from the server.
  1730  	googleapi.ServerResponse `json:"-"`
  1731  	// ForceSendFields is a list of field names (e.g. "CloudConsoleUri") to
  1732  	// unconditionally include in API requests. By default, fields with empty or
  1733  	// default values are omitted from API requests. See
  1734  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1735  	// details.
  1736  	ForceSendFields []string `json:"-"`
  1737  	// NullFields is a list of field names (e.g. "CloudConsoleUri") to include in
  1738  	// API requests with the JSON null value. By default, fields with empty values
  1739  	// are omitted from API requests. See
  1740  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1741  	NullFields []string `json:"-"`
  1742  }
  1743  
  1744  func (s *ProvisioningConfig) MarshalJSON() ([]byte, error) {
  1745  	type NoMethod ProvisioningConfig
  1746  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1747  }
  1748  
  1749  // ProvisioningQuota: A provisioning quota for a given project.
  1750  type ProvisioningQuota struct {
  1751  	// AssetType: The asset type of this provisioning quota.
  1752  	//
  1753  	// Possible values:
  1754  	//   "ASSET_TYPE_UNSPECIFIED" - The unspecified type.
  1755  	//   "ASSET_TYPE_SERVER" - The server asset type.
  1756  	//   "ASSET_TYPE_STORAGE" - The storage asset type.
  1757  	//   "ASSET_TYPE_NETWORK" - The network asset type.
  1758  	AssetType string `json:"assetType,omitempty"`
  1759  	// AvailableCount: The available count of the provisioning quota.
  1760  	AvailableCount int64 `json:"availableCount,omitempty"`
  1761  	// GcpService: The gcp service of the provisioning quota.
  1762  	GcpService string `json:"gcpService,omitempty"`
  1763  	// InstanceQuota: Instance quota.
  1764  	InstanceQuota *InstanceQuota `json:"instanceQuota,omitempty"`
  1765  	// Location: The specific location of the provisioining quota.
  1766  	Location string `json:"location,omitempty"`
  1767  	// Name: Output only. The name of the provisioning quota.
  1768  	Name string `json:"name,omitempty"`
  1769  	// NetworkBandwidth: Network bandwidth, Gbps
  1770  	NetworkBandwidth int64 `json:"networkBandwidth,omitempty,string"`
  1771  	// ServerCount: Server count.
  1772  	ServerCount int64 `json:"serverCount,omitempty,string"`
  1773  	// StorageGib: Storage size (GB).
  1774  	StorageGib int64 `json:"storageGib,omitempty,string"`
  1775  	// ForceSendFields is a list of field names (e.g. "AssetType") to
  1776  	// unconditionally include in API requests. By default, fields with empty or
  1777  	// default values are omitted from API requests. See
  1778  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1779  	// details.
  1780  	ForceSendFields []string `json:"-"`
  1781  	// NullFields is a list of field names (e.g. "AssetType") to include in API
  1782  	// requests with the JSON null value. By default, fields with empty values are
  1783  	// omitted from API requests. See
  1784  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1785  	NullFields []string `json:"-"`
  1786  }
  1787  
  1788  func (s *ProvisioningQuota) MarshalJSON() ([]byte, error) {
  1789  	type NoMethod ProvisioningQuota
  1790  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1791  }
  1792  
  1793  // QosPolicy: QOS policy parameters.
  1794  type QosPolicy struct {
  1795  	// BandwidthGbps: The bandwidth permitted by the QOS policy, in gbps.
  1796  	BandwidthGbps float64 `json:"bandwidthGbps,omitempty"`
  1797  	// ForceSendFields is a list of field names (e.g. "BandwidthGbps") to
  1798  	// unconditionally include in API requests. By default, fields with empty or
  1799  	// default values are omitted from API requests. See
  1800  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1801  	// details.
  1802  	ForceSendFields []string `json:"-"`
  1803  	// NullFields is a list of field names (e.g. "BandwidthGbps") to include in API
  1804  	// requests with the JSON null value. By default, fields with empty values are
  1805  	// omitted from API requests. See
  1806  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1807  	NullFields []string `json:"-"`
  1808  }
  1809  
  1810  func (s *QosPolicy) MarshalJSON() ([]byte, error) {
  1811  	type NoMethod QosPolicy
  1812  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1813  }
  1814  
  1815  func (s *QosPolicy) UnmarshalJSON(data []byte) error {
  1816  	type NoMethod QosPolicy
  1817  	var s1 struct {
  1818  		BandwidthGbps gensupport.JSONFloat64 `json:"bandwidthGbps"`
  1819  		*NoMethod
  1820  	}
  1821  	s1.NoMethod = (*NoMethod)(s)
  1822  	if err := json.Unmarshal(data, &s1); err != nil {
  1823  		return err
  1824  	}
  1825  	s.BandwidthGbps = float64(s1.BandwidthGbps)
  1826  	return nil
  1827  }
  1828  
  1829  // ReimageInstanceRequest: Message requesting to perform reimage operation on a
  1830  // server.
  1831  type ReimageInstanceRequest struct {
  1832  	// KmsKeyVersion: Optional. Name of the KMS crypto key version used to encrypt
  1833  	// the initial passwords. The key has to have ASYMMETRIC_DECRYPT purpose.
  1834  	// Format is
  1835  	// `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}/
  1836  	// cryptoKeyVersions/{version}`.
  1837  	KmsKeyVersion string `json:"kmsKeyVersion,omitempty"`
  1838  	// OsImage: Required. The OS image code of the image which will be used in the
  1839  	// reimage operation.
  1840  	OsImage string `json:"osImage,omitempty"`
  1841  	// SshKeys: Optional. List of SSH Keys used during reimaging an instance.
  1842  	SshKeys []string `json:"sshKeys,omitempty"`
  1843  	// ForceSendFields is a list of field names (e.g. "KmsKeyVersion") to
  1844  	// unconditionally include in API requests. By default, fields with empty or
  1845  	// default values are omitted from API requests. See
  1846  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1847  	// details.
  1848  	ForceSendFields []string `json:"-"`
  1849  	// NullFields is a list of field names (e.g. "KmsKeyVersion") to include in API
  1850  	// requests with the JSON null value. By default, fields with empty values are
  1851  	// omitted from API requests. See
  1852  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1853  	NullFields []string `json:"-"`
  1854  }
  1855  
  1856  func (s *ReimageInstanceRequest) MarshalJSON() ([]byte, error) {
  1857  	type NoMethod ReimageInstanceRequest
  1858  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1859  }
  1860  
  1861  // RenameInstanceRequest: Message requesting rename of a server.
  1862  type RenameInstanceRequest struct {
  1863  	// NewInstanceId: Required. The new `id` of the instance.
  1864  	NewInstanceId string `json:"newInstanceId,omitempty"`
  1865  	// ForceSendFields is a list of field names (e.g. "NewInstanceId") to
  1866  	// unconditionally include in API requests. By default, fields with empty or
  1867  	// default values are omitted from API requests. See
  1868  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1869  	// details.
  1870  	ForceSendFields []string `json:"-"`
  1871  	// NullFields is a list of field names (e.g. "NewInstanceId") to include in API
  1872  	// requests with the JSON null value. By default, fields with empty values are
  1873  	// omitted from API requests. See
  1874  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1875  	NullFields []string `json:"-"`
  1876  }
  1877  
  1878  func (s *RenameInstanceRequest) MarshalJSON() ([]byte, error) {
  1879  	type NoMethod RenameInstanceRequest
  1880  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1881  }
  1882  
  1883  // RenameNetworkRequest: Message requesting rename of a server.
  1884  type RenameNetworkRequest struct {
  1885  	// NewNetworkId: Required. The new `id` of the network.
  1886  	NewNetworkId string `json:"newNetworkId,omitempty"`
  1887  	// ForceSendFields is a list of field names (e.g. "NewNetworkId") to
  1888  	// unconditionally include in API requests. By default, fields with empty or
  1889  	// default values are omitted from API requests. See
  1890  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1891  	// details.
  1892  	ForceSendFields []string `json:"-"`
  1893  	// NullFields is a list of field names (e.g. "NewNetworkId") to include in API
  1894  	// requests with the JSON null value. By default, fields with empty values are
  1895  	// omitted from API requests. See
  1896  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1897  	NullFields []string `json:"-"`
  1898  }
  1899  
  1900  func (s *RenameNetworkRequest) MarshalJSON() ([]byte, error) {
  1901  	type NoMethod RenameNetworkRequest
  1902  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1903  }
  1904  
  1905  // RenameNfsShareRequest: Message requesting rename of a server.
  1906  type RenameNfsShareRequest struct {
  1907  	// NewNfsshareId: Required. The new `id` of the nfsshare.
  1908  	NewNfsshareId string `json:"newNfsshareId,omitempty"`
  1909  	// ForceSendFields is a list of field names (e.g. "NewNfsshareId") to
  1910  	// unconditionally include in API requests. By default, fields with empty or
  1911  	// default values are omitted from API requests. See
  1912  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1913  	// details.
  1914  	ForceSendFields []string `json:"-"`
  1915  	// NullFields is a list of field names (e.g. "NewNfsshareId") to include in API
  1916  	// requests with the JSON null value. By default, fields with empty values are
  1917  	// omitted from API requests. See
  1918  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1919  	NullFields []string `json:"-"`
  1920  }
  1921  
  1922  func (s *RenameNfsShareRequest) MarshalJSON() ([]byte, error) {
  1923  	type NoMethod RenameNfsShareRequest
  1924  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1925  }
  1926  
  1927  // RenameVolumeRequest: Message requesting rename of a server.
  1928  type RenameVolumeRequest struct {
  1929  	// NewVolumeId: Required. The new `id` of the volume.
  1930  	NewVolumeId string `json:"newVolumeId,omitempty"`
  1931  	// ForceSendFields is a list of field names (e.g. "NewVolumeId") to
  1932  	// unconditionally include in API requests. By default, fields with empty or
  1933  	// default values are omitted from API requests. See
  1934  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1935  	// details.
  1936  	ForceSendFields []string `json:"-"`
  1937  	// NullFields is a list of field names (e.g. "NewVolumeId") to include in API
  1938  	// requests with the JSON null value. By default, fields with empty values are
  1939  	// omitted from API requests. See
  1940  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1941  	NullFields []string `json:"-"`
  1942  }
  1943  
  1944  func (s *RenameVolumeRequest) MarshalJSON() ([]byte, error) {
  1945  	type NoMethod RenameVolumeRequest
  1946  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1947  }
  1948  
  1949  // ResetInstanceRequest: Message requesting to reset a server.
  1950  type ResetInstanceRequest struct {
  1951  }
  1952  
  1953  // ResetInstanceResponse: Response message from resetting a server.
  1954  type ResetInstanceResponse struct {
  1955  }
  1956  
  1957  // ResizeVolumeRequest: Request for emergency resize Volume.
  1958  type ResizeVolumeRequest struct {
  1959  	// SizeGib: New Volume size, in GiB.
  1960  	SizeGib int64 `json:"sizeGib,omitempty,string"`
  1961  	// ForceSendFields is a list of field names (e.g. "SizeGib") to unconditionally
  1962  	// include in API requests. By default, fields with empty or default values are
  1963  	// omitted from API requests. See
  1964  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1965  	// details.
  1966  	ForceSendFields []string `json:"-"`
  1967  	// NullFields is a list of field names (e.g. "SizeGib") to include in API
  1968  	// requests with the JSON null value. By default, fields with empty values are
  1969  	// omitted from API requests. See
  1970  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1971  	NullFields []string `json:"-"`
  1972  }
  1973  
  1974  func (s *ResizeVolumeRequest) MarshalJSON() ([]byte, error) {
  1975  	type NoMethod ResizeVolumeRequest
  1976  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1977  }
  1978  
  1979  // RestoreVolumeSnapshotRequest: Message for restoring a volume snapshot.
  1980  type RestoreVolumeSnapshotRequest struct {
  1981  }
  1982  
  1983  // SSHKey: An SSH key, used for authorizing with the interactive serial console
  1984  // feature.
  1985  type SSHKey struct {
  1986  	// Name: Output only. The name of this SSH key. Currently, the only valid value
  1987  	// for the location is "global".
  1988  	Name string `json:"name,omitempty"`
  1989  	// PublicKey: The public SSH key. This must be in OpenSSH .authorized_keys
  1990  	// format.
  1991  	PublicKey string `json:"publicKey,omitempty"`
  1992  
  1993  	// ServerResponse contains the HTTP response code and headers from the server.
  1994  	googleapi.ServerResponse `json:"-"`
  1995  	// ForceSendFields is a list of field names (e.g. "Name") to unconditionally
  1996  	// include in API requests. By default, fields with empty or default values are
  1997  	// omitted from API requests. See
  1998  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1999  	// details.
  2000  	ForceSendFields []string `json:"-"`
  2001  	// NullFields is a list of field names (e.g. "Name") to include in API requests
  2002  	// with the JSON null value. By default, fields with empty values are omitted
  2003  	// from API requests. See
  2004  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2005  	NullFields []string `json:"-"`
  2006  }
  2007  
  2008  func (s *SSHKey) MarshalJSON() ([]byte, error) {
  2009  	type NoMethod SSHKey
  2010  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2011  }
  2012  
  2013  // ServerNetworkTemplate: Network template.
  2014  type ServerNetworkTemplate struct {
  2015  	// ApplicableInstanceTypes: Instance types this template is applicable to.
  2016  	ApplicableInstanceTypes []string `json:"applicableInstanceTypes,omitempty"`
  2017  	// LogicalInterfaces: Logical interfaces.
  2018  	LogicalInterfaces []*GoogleCloudBaremetalsolutionV2ServerNetworkTemplateLogicalInterface `json:"logicalInterfaces,omitempty"`
  2019  	// Name: Output only. Template's unique name. The full resource name follows
  2020  	// the pattern:
  2021  	// `projects/{project}/locations/{location}/serverNetworkTemplate/{server_networ
  2022  	// k_template}` Generally, the {server_network_template} follows the syntax of
  2023  	// "bond" or "nic".
  2024  	Name string `json:"name,omitempty"`
  2025  	// ForceSendFields is a list of field names (e.g. "ApplicableInstanceTypes") to
  2026  	// unconditionally include in API requests. By default, fields with empty or
  2027  	// default values are omitted from API requests. See
  2028  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2029  	// details.
  2030  	ForceSendFields []string `json:"-"`
  2031  	// NullFields is a list of field names (e.g. "ApplicableInstanceTypes") to
  2032  	// include in API requests with the JSON null value. By default, fields with
  2033  	// empty values are omitted from API requests. See
  2034  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2035  	NullFields []string `json:"-"`
  2036  }
  2037  
  2038  func (s *ServerNetworkTemplate) MarshalJSON() ([]byte, error) {
  2039  	type NoMethod ServerNetworkTemplate
  2040  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2041  }
  2042  
  2043  // SnapshotReservationDetail: Details about snapshot space reservation and
  2044  // usage on the storage volume.
  2045  type SnapshotReservationDetail struct {
  2046  	// ReservedSpaceGib: The space on this storage volume reserved for snapshots,
  2047  	// shown in GiB.
  2048  	ReservedSpaceGib int64 `json:"reservedSpaceGib,omitempty,string"`
  2049  	// ReservedSpacePercent: Percent of the total Volume size reserved for snapshot
  2050  	// copies. Enabling snapshots requires reserving 20% or more of the storage
  2051  	// volume space for snapshots. Maximum reserved space for snapshots is 40%.
  2052  	// Setting this field will effectively set snapshot_enabled to true.
  2053  	ReservedSpacePercent int64 `json:"reservedSpacePercent,omitempty"`
  2054  	// ReservedSpaceRemainingGib: The amount, in GiB, of available space in this
  2055  	// storage volume's reserved snapshot space.
  2056  	ReservedSpaceRemainingGib int64 `json:"reservedSpaceRemainingGib,omitempty,string"`
  2057  	// ReservedSpaceUsedPercent: The percent of snapshot space on this storage
  2058  	// volume actually being used by the snapshot copies. This value might be
  2059  	// higher than 100% if the snapshot copies have overflowed into the data
  2060  	// portion of the storage volume.
  2061  	ReservedSpaceUsedPercent int64 `json:"reservedSpaceUsedPercent,omitempty"`
  2062  	// ForceSendFields is a list of field names (e.g. "ReservedSpaceGib") to
  2063  	// unconditionally include in API requests. By default, fields with empty or
  2064  	// default values are omitted from API requests. See
  2065  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2066  	// details.
  2067  	ForceSendFields []string `json:"-"`
  2068  	// NullFields is a list of field names (e.g. "ReservedSpaceGib") to include in
  2069  	// API requests with the JSON null value. By default, fields with empty values
  2070  	// are omitted from API requests. See
  2071  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2072  	NullFields []string `json:"-"`
  2073  }
  2074  
  2075  func (s *SnapshotReservationDetail) MarshalJSON() ([]byte, error) {
  2076  	type NoMethod SnapshotReservationDetail
  2077  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2078  }
  2079  
  2080  // StartInstanceRequest: Message requesting to start a server.
  2081  type StartInstanceRequest struct {
  2082  }
  2083  
  2084  // StartInstanceResponse: Response message from starting a server.
  2085  type StartInstanceResponse struct {
  2086  }
  2087  
  2088  // Status: The `Status` type defines a logical error model that is suitable for
  2089  // different programming environments, including REST APIs and RPC APIs. It is
  2090  // used by gRPC (https://github.com/grpc). Each `Status` message contains three
  2091  // pieces of data: error code, error message, and error details. You can find
  2092  // out more about this error model and how to work with it in the API Design
  2093  // Guide (https://cloud.google.com/apis/design/errors).
  2094  type Status struct {
  2095  	// Code: The status code, which should be an enum value of google.rpc.Code.
  2096  	Code int64 `json:"code,omitempty"`
  2097  	// Details: A list of messages that carry the error details. There is a common
  2098  	// set of message types for APIs to use.
  2099  	Details []googleapi.RawMessage `json:"details,omitempty"`
  2100  	// Message: A developer-facing error message, which should be in English. Any
  2101  	// user-facing error message should be localized and sent in the
  2102  	// google.rpc.Status.details field, or localized by the client.
  2103  	Message string `json:"message,omitempty"`
  2104  	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
  2105  	// include in API requests. By default, fields with empty or default values are
  2106  	// omitted from API requests. See
  2107  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2108  	// details.
  2109  	ForceSendFields []string `json:"-"`
  2110  	// NullFields is a list of field names (e.g. "Code") to include in API requests
  2111  	// with the JSON null value. By default, fields with empty values are omitted
  2112  	// from API requests. See
  2113  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2114  	NullFields []string `json:"-"`
  2115  }
  2116  
  2117  func (s *Status) MarshalJSON() ([]byte, error) {
  2118  	type NoMethod Status
  2119  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2120  }
  2121  
  2122  // StopInstanceRequest: Message requesting to stop a server.
  2123  type StopInstanceRequest struct {
  2124  }
  2125  
  2126  // StopInstanceResponse: Response message from stopping a server.
  2127  type StopInstanceResponse struct {
  2128  }
  2129  
  2130  // SubmitProvisioningConfigRequest: Request for SubmitProvisioningConfig.
  2131  type SubmitProvisioningConfigRequest struct {
  2132  	// Email: Optional. Email provided to send a confirmation with provisioning
  2133  	// config to.
  2134  	Email string `json:"email,omitempty"`
  2135  	// ProvisioningConfig: Required. The ProvisioningConfig to create.
  2136  	ProvisioningConfig *ProvisioningConfig `json:"provisioningConfig,omitempty"`
  2137  	// ForceSendFields is a list of field names (e.g. "Email") to unconditionally
  2138  	// include in API requests. By default, fields with empty or default values are
  2139  	// omitted from API requests. See
  2140  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2141  	// details.
  2142  	ForceSendFields []string `json:"-"`
  2143  	// NullFields is a list of field names (e.g. "Email") to include in API
  2144  	// requests with the JSON null value. By default, fields with empty values are
  2145  	// omitted from API requests. See
  2146  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2147  	NullFields []string `json:"-"`
  2148  }
  2149  
  2150  func (s *SubmitProvisioningConfigRequest) MarshalJSON() ([]byte, error) {
  2151  	type NoMethod SubmitProvisioningConfigRequest
  2152  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2153  }
  2154  
  2155  // SubmitProvisioningConfigResponse: Response for SubmitProvisioningConfig.
  2156  type SubmitProvisioningConfigResponse struct {
  2157  	// ProvisioningConfig: The submitted provisioning config.
  2158  	ProvisioningConfig *ProvisioningConfig `json:"provisioningConfig,omitempty"`
  2159  
  2160  	// ServerResponse contains the HTTP response code and headers from the server.
  2161  	googleapi.ServerResponse `json:"-"`
  2162  	// ForceSendFields is a list of field names (e.g. "ProvisioningConfig") to
  2163  	// unconditionally include in API requests. By default, fields with empty or
  2164  	// default values are omitted from API requests. See
  2165  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2166  	// details.
  2167  	ForceSendFields []string `json:"-"`
  2168  	// NullFields is a list of field names (e.g. "ProvisioningConfig") to include
  2169  	// in API requests with the JSON null value. By default, fields with empty
  2170  	// values are omitted from API requests. See
  2171  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2172  	NullFields []string `json:"-"`
  2173  }
  2174  
  2175  func (s *SubmitProvisioningConfigResponse) MarshalJSON() ([]byte, error) {
  2176  	type NoMethod SubmitProvisioningConfigResponse
  2177  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2178  }
  2179  
  2180  // UserAccount: User account provisioned for the customer.
  2181  type UserAccount struct {
  2182  	// EncryptedPassword: Encrypted initial password value.
  2183  	EncryptedPassword string `json:"encryptedPassword,omitempty"`
  2184  	// KmsKeyVersion: KMS CryptoKey Version used to encrypt the password.
  2185  	KmsKeyVersion string `json:"kmsKeyVersion,omitempty"`
  2186  	// ForceSendFields is a list of field names (e.g. "EncryptedPassword") to
  2187  	// unconditionally include in API requests. By default, fields with empty or
  2188  	// default values are omitted from API requests. See
  2189  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2190  	// details.
  2191  	ForceSendFields []string `json:"-"`
  2192  	// NullFields is a list of field names (e.g. "EncryptedPassword") to include in
  2193  	// API requests with the JSON null value. By default, fields with empty values
  2194  	// are omitted from API requests. See
  2195  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2196  	NullFields []string `json:"-"`
  2197  }
  2198  
  2199  func (s *UserAccount) MarshalJSON() ([]byte, error) {
  2200  	type NoMethod UserAccount
  2201  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2202  }
  2203  
  2204  // VRF: A network VRF.
  2205  type VRF struct {
  2206  	// Name: The name of the VRF.
  2207  	Name string `json:"name,omitempty"`
  2208  	// QosPolicy: The QOS policy applied to this VRF. The value is only meaningful
  2209  	// when all the vlan attachments have the same QoS. This field should not be
  2210  	// used for new integrations, use vlan attachment level qos instead. The field
  2211  	// is left for backward-compatibility.
  2212  	QosPolicy *QosPolicy `json:"qosPolicy,omitempty"`
  2213  	// State: The possible state of VRF.
  2214  	//
  2215  	// Possible values:
  2216  	//   "STATE_UNSPECIFIED" - The unspecified state.
  2217  	//   "PROVISIONING" - The vrf is provisioning.
  2218  	//   "PROVISIONED" - The vrf is provisioned.
  2219  	State string `json:"state,omitempty"`
  2220  	// VlanAttachments: The list of VLAN attachments for the VRF.
  2221  	VlanAttachments []*VlanAttachment `json:"vlanAttachments,omitempty"`
  2222  	// ForceSendFields is a list of field names (e.g. "Name") to unconditionally
  2223  	// include in API requests. By default, fields with empty or default values are
  2224  	// omitted from API requests. See
  2225  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2226  	// details.
  2227  	ForceSendFields []string `json:"-"`
  2228  	// NullFields is a list of field names (e.g. "Name") to include in API requests
  2229  	// with the JSON null value. By default, fields with empty values are omitted
  2230  	// from API requests. See
  2231  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2232  	NullFields []string `json:"-"`
  2233  }
  2234  
  2235  func (s *VRF) MarshalJSON() ([]byte, error) {
  2236  	type NoMethod VRF
  2237  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2238  }
  2239  
  2240  // VlanAttachment: VLAN attachment details.
  2241  type VlanAttachment struct {
  2242  	// Id: Immutable. The identifier of the attachment within vrf.
  2243  	Id string `json:"id,omitempty"`
  2244  	// InterconnectAttachment: Optional. The name of the vlan attachment within
  2245  	// vrf. This is of the form
  2246  	// projects/{project_number}/regions/{region}/interconnectAttachments/{interconn
  2247  	// ect_attachment}
  2248  	InterconnectAttachment string `json:"interconnectAttachment,omitempty"`
  2249  	// PairingKey: Input only. Pairing key.
  2250  	PairingKey string `json:"pairingKey,omitempty"`
  2251  	// PeerIp: The peer IP of the attachment.
  2252  	PeerIp string `json:"peerIp,omitempty"`
  2253  	// PeerVlanId: The peer vlan ID of the attachment.
  2254  	PeerVlanId int64 `json:"peerVlanId,omitempty,string"`
  2255  	// QosPolicy: The QOS policy applied to this VLAN attachment. This value should
  2256  	// be preferred to using qos at vrf level.
  2257  	QosPolicy *QosPolicy `json:"qosPolicy,omitempty"`
  2258  	// RouterIp: The router IP of the attachment.
  2259  	RouterIp string `json:"routerIp,omitempty"`
  2260  	// ForceSendFields is a list of field names (e.g. "Id") to unconditionally
  2261  	// include in API requests. By default, fields with empty or default values are
  2262  	// omitted from API requests. See
  2263  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2264  	// details.
  2265  	ForceSendFields []string `json:"-"`
  2266  	// NullFields is a list of field names (e.g. "Id") to include in API requests
  2267  	// with the JSON null value. By default, fields with empty values are omitted
  2268  	// from API requests. See
  2269  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2270  	NullFields []string `json:"-"`
  2271  }
  2272  
  2273  func (s *VlanAttachment) MarshalJSON() ([]byte, error) {
  2274  	type NoMethod VlanAttachment
  2275  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2276  }
  2277  
  2278  // Volume: A storage volume.
  2279  type Volume struct {
  2280  	// Attached: Output only. Is the Volume attached at at least one instance. This
  2281  	// field is a lightweight counterpart of `instances` field. It is filled in
  2282  	// List responses as well.
  2283  	Attached bool `json:"attached,omitempty"`
  2284  	// AutoGrownSizeGib: The size, in GiB, that this storage volume has expanded as
  2285  	// a result of an auto grow policy. In the absence of auto-grow, the value is
  2286  	// 0.
  2287  	AutoGrownSizeGib int64 `json:"autoGrownSizeGib,omitempty,string"`
  2288  	// BootVolume: Output only. Whether this volume is a boot volume. A boot volume
  2289  	// is one which contains a boot LUN.
  2290  	BootVolume bool `json:"bootVolume,omitempty"`
  2291  	// CurrentSizeGib: The current size of this storage volume, in GiB, including
  2292  	// space reserved for snapshots. This size might be different than the
  2293  	// requested size if the storage volume has been configured with auto grow or
  2294  	// auto shrink.
  2295  	CurrentSizeGib int64 `json:"currentSizeGib,omitempty,string"`
  2296  	// EmergencySizeGib: Additional emergency size that was requested for this
  2297  	// Volume, in GiB. current_size_gib includes this value.
  2298  	EmergencySizeGib int64 `json:"emergencySizeGib,omitempty,string"`
  2299  	// ExpireTime: Output only. Time after which volume will be fully deleted. It
  2300  	// is filled only for volumes in COOLOFF state.
  2301  	ExpireTime string `json:"expireTime,omitempty"`
  2302  	// Id: An identifier for the `Volume`, generated by the backend.
  2303  	Id string `json:"id,omitempty"`
  2304  	// Instances: Output only. Instances this Volume is attached to. This field is
  2305  	// set only in Get requests.
  2306  	Instances []string `json:"instances,omitempty"`
  2307  	// Labels: Labels as key value pairs.
  2308  	Labels map[string]string `json:"labels,omitempty"`
  2309  	// MaxSizeGib: Maximum size volume can be expanded to in case of evergency, in
  2310  	// GiB.
  2311  	MaxSizeGib int64 `json:"maxSizeGib,omitempty,string"`
  2312  	// Name: Output only. The resource name of this `Volume`. Resource names are
  2313  	// schemeless URIs that follow the conventions in
  2314  	// https://cloud.google.com/apis/design/resource_names. Format:
  2315  	// `projects/{project}/locations/{location}/volumes/{volume}`
  2316  	Name string `json:"name,omitempty"`
  2317  	// Notes: Input only. User-specified notes for new Volume. Used to provision
  2318  	// Volumes that require manual intervention.
  2319  	Notes string `json:"notes,omitempty"`
  2320  	// OriginallyRequestedSizeGib: Originally requested size, in GiB.
  2321  	OriginallyRequestedSizeGib int64 `json:"originallyRequestedSizeGib,omitempty,string"`
  2322  	// PerformanceTier: Immutable. Performance tier of the Volume. Default is
  2323  	// SHARED.
  2324  	//
  2325  	// Possible values:
  2326  	//   "VOLUME_PERFORMANCE_TIER_UNSPECIFIED" - Value is not specified.
  2327  	//   "VOLUME_PERFORMANCE_TIER_SHARED" - Regular volumes, shared aggregates.
  2328  	//   "VOLUME_PERFORMANCE_TIER_ASSIGNED" - Assigned aggregates.
  2329  	//   "VOLUME_PERFORMANCE_TIER_HT" - High throughput aggregates.
  2330  	//   "VOLUME_PERFORMANCE_TIER_QOS2_PERFORMANCE" - QoS 2.0 high performance
  2331  	// storage.
  2332  	PerformanceTier string `json:"performanceTier,omitempty"`
  2333  	// Pod: Immutable. Pod name. Pod is an independent part of infrastructure.
  2334  	// Volume can only be connected to the instances allocated in the same pod.
  2335  	Pod string `json:"pod,omitempty"`
  2336  	// Protocol: Output only. Storage protocol for the Volume.
  2337  	//
  2338  	// Possible values:
  2339  	//   "PROTOCOL_UNSPECIFIED" - Value is not specified.
  2340  	//   "FIBRE_CHANNEL" - Fibre Channel protocol.
  2341  	//   "NFS" - NFS protocol means Volume is a NFS Share volume. Such volumes
  2342  	// cannot be manipulated via Volumes API.
  2343  	Protocol string `json:"protocol,omitempty"`
  2344  	// RemainingSpaceGib: The space remaining in the storage volume for new LUNs,
  2345  	// in GiB, excluding space reserved for snapshots.
  2346  	RemainingSpaceGib int64 `json:"remainingSpaceGib,omitempty,string"`
  2347  	// RequestedSizeGib: The requested size of this storage volume, in GiB.
  2348  	RequestedSizeGib int64 `json:"requestedSizeGib,omitempty,string"`
  2349  	// SnapshotAutoDeleteBehavior: The behavior to use when snapshot reserved space
  2350  	// is full.
  2351  	//
  2352  	// Possible values:
  2353  	//   "SNAPSHOT_AUTO_DELETE_BEHAVIOR_UNSPECIFIED" - The unspecified behavior.
  2354  	//   "DISABLED" - Don't delete any snapshots. This disables new snapshot
  2355  	// creation, as long as the snapshot reserved space is full.
  2356  	//   "OLDEST_FIRST" - Delete the oldest snapshots first.
  2357  	//   "NEWEST_FIRST" - Delete the newest snapshots first.
  2358  	SnapshotAutoDeleteBehavior string `json:"snapshotAutoDeleteBehavior,omitempty"`
  2359  	// SnapshotEnabled: Whether snapshots are enabled.
  2360  	SnapshotEnabled bool `json:"snapshotEnabled,omitempty"`
  2361  	// SnapshotReservationDetail: Details about snapshot space reservation and
  2362  	// usage on the storage volume.
  2363  	SnapshotReservationDetail *SnapshotReservationDetail `json:"snapshotReservationDetail,omitempty"`
  2364  	// State: The state of this storage volume.
  2365  	//
  2366  	// Possible values:
  2367  	//   "STATE_UNSPECIFIED" - The storage volume is in an unknown state.
  2368  	//   "CREATING" - The storage volume is being created.
  2369  	//   "READY" - The storage volume is ready for use.
  2370  	//   "DELETING" - The storage volume has been requested to be deleted.
  2371  	//   "UPDATING" - The storage volume is being updated.
  2372  	//   "COOL_OFF" - The storage volume is in cool off state. It will be deleted
  2373  	// after `expire_time`.
  2374  	State string `json:"state,omitempty"`
  2375  	// StorageType: The storage type for this volume.
  2376  	//
  2377  	// Possible values:
  2378  	//   "STORAGE_TYPE_UNSPECIFIED" - The storage type for this volume is unknown.
  2379  	//   "SSD" - The storage type for this volume is SSD.
  2380  	//   "HDD" - This storage type for this volume is HDD.
  2381  	StorageType string `json:"storageType,omitempty"`
  2382  	// WorkloadProfile: The workload profile for the volume.
  2383  	//
  2384  	// Possible values:
  2385  	//   "WORKLOAD_PROFILE_UNSPECIFIED" - The workload profile is in an unknown
  2386  	// state.
  2387  	//   "GENERIC" - The workload profile is generic.
  2388  	//   "HANA" - The workload profile is hana.
  2389  	WorkloadProfile string `json:"workloadProfile,omitempty"`
  2390  
  2391  	// ServerResponse contains the HTTP response code and headers from the server.
  2392  	googleapi.ServerResponse `json:"-"`
  2393  	// ForceSendFields is a list of field names (e.g. "Attached") to
  2394  	// unconditionally include in API requests. By default, fields with empty or
  2395  	// default values are omitted from API requests. See
  2396  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2397  	// details.
  2398  	ForceSendFields []string `json:"-"`
  2399  	// NullFields is a list of field names (e.g. "Attached") to include in API
  2400  	// requests with the JSON null value. By default, fields with empty values are
  2401  	// omitted from API requests. See
  2402  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2403  	NullFields []string `json:"-"`
  2404  }
  2405  
  2406  func (s *Volume) MarshalJSON() ([]byte, error) {
  2407  	type NoMethod Volume
  2408  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2409  }
  2410  
  2411  // VolumeConfig: Configuration parameters for a new volume.
  2412  type VolumeConfig struct {
  2413  	// GcpService: The GCP service of the storage volume. Available gcp_service are
  2414  	// in https://cloud.google.com/bare-metal/docs/bms-planning.
  2415  	GcpService string `json:"gcpService,omitempty"`
  2416  	// Id: A transient unique identifier to identify a volume within an
  2417  	// ProvisioningConfig request.
  2418  	Id string `json:"id,omitempty"`
  2419  	// LunRanges: LUN ranges to be configured. Set only when protocol is
  2420  	// PROTOCOL_FC.
  2421  	LunRanges []*LunRange `json:"lunRanges,omitempty"`
  2422  	// MachineIds: Machine ids connected to this volume. Set only when protocol is
  2423  	// PROTOCOL_FC.
  2424  	MachineIds []string `json:"machineIds,omitempty"`
  2425  	// Name: Output only. The name of the volume config.
  2426  	Name string `json:"name,omitempty"`
  2427  	// NfsExports: NFS exports. Set only when protocol is PROTOCOL_NFS.
  2428  	NfsExports []*NfsExport `json:"nfsExports,omitempty"`
  2429  	// PerformanceTier: Performance tier of the Volume. Default is SHARED.
  2430  	//
  2431  	// Possible values:
  2432  	//   "VOLUME_PERFORMANCE_TIER_UNSPECIFIED" - Value is not specified.
  2433  	//   "VOLUME_PERFORMANCE_TIER_SHARED" - Regular volumes, shared aggregates.
  2434  	//   "VOLUME_PERFORMANCE_TIER_ASSIGNED" - Assigned aggregates.
  2435  	//   "VOLUME_PERFORMANCE_TIER_HT" - High throughput aggregates.
  2436  	//   "VOLUME_PERFORMANCE_TIER_QOS2_PERFORMANCE" - QoS 2.0 high performance
  2437  	// storage.
  2438  	PerformanceTier string `json:"performanceTier,omitempty"`
  2439  	// Protocol: Volume protocol.
  2440  	//
  2441  	// Possible values:
  2442  	//   "PROTOCOL_UNSPECIFIED" - Unspecified value.
  2443  	//   "PROTOCOL_FC" - Fibre channel.
  2444  	//   "PROTOCOL_NFS" - Network file system.
  2445  	Protocol string `json:"protocol,omitempty"`
  2446  	// SizeGb: The requested size of this volume, in GB.
  2447  	SizeGb int64 `json:"sizeGb,omitempty"`
  2448  	// SnapshotsEnabled: Whether snapshots should be enabled.
  2449  	SnapshotsEnabled bool `json:"snapshotsEnabled,omitempty"`
  2450  	// Type: The type of this Volume.
  2451  	//
  2452  	// Possible values:
  2453  	//   "TYPE_UNSPECIFIED" - The unspecified type.
  2454  	//   "FLASH" - This Volume is on flash.
  2455  	//   "DISK" - This Volume is on disk.
  2456  	Type string `json:"type,omitempty"`
  2457  	// UserNote: User note field, it can be used by customers to add additional
  2458  	// information for the BMS Ops team .
  2459  	UserNote string `json:"userNote,omitempty"`
  2460  	// ForceSendFields is a list of field names (e.g. "GcpService") to
  2461  	// unconditionally include in API requests. By default, fields with empty or
  2462  	// default values are omitted from API requests. See
  2463  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2464  	// details.
  2465  	ForceSendFields []string `json:"-"`
  2466  	// NullFields is a list of field names (e.g. "GcpService") to include in API
  2467  	// requests with the JSON null value. By default, fields with empty values are
  2468  	// omitted from API requests. See
  2469  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2470  	NullFields []string `json:"-"`
  2471  }
  2472  
  2473  func (s *VolumeConfig) MarshalJSON() ([]byte, error) {
  2474  	type NoMethod VolumeConfig
  2475  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2476  }
  2477  
  2478  // VolumeSnapshot: A snapshot of a volume. Only boot volumes can have
  2479  // snapshots.
  2480  type VolumeSnapshot struct {
  2481  	// CreateTime: Output only. The creation time of the snapshot.
  2482  	CreateTime string `json:"createTime,omitempty"`
  2483  	// Description: The description of the snapshot.
  2484  	Description string `json:"description,omitempty"`
  2485  	// Id: Output only. An identifier for the snapshot, generated by the backend.
  2486  	Id string `json:"id,omitempty"`
  2487  	// Name: The name of the snapshot.
  2488  	Name string `json:"name,omitempty"`
  2489  	// StorageVolume: Output only. The name of the volume which this snapshot
  2490  	// belongs to.
  2491  	StorageVolume string `json:"storageVolume,omitempty"`
  2492  	// Type: Output only. The type of the snapshot which indicates whether it was
  2493  	// scheduled or manual/ad-hoc.
  2494  	//
  2495  	// Possible values:
  2496  	//   "SNAPSHOT_TYPE_UNSPECIFIED" - Type is not specified.
  2497  	//   "AD_HOC" - Snapshot was taken manually by user.
  2498  	//   "SCHEDULED" - Snapshot was taken automatically as a part of a snapshot
  2499  	// schedule.
  2500  	Type string `json:"type,omitempty"`
  2501  
  2502  	// ServerResponse contains the HTTP response code and headers from the server.
  2503  	googleapi.ServerResponse `json:"-"`
  2504  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  2505  	// unconditionally include in API requests. By default, fields with empty or
  2506  	// default values are omitted from API requests. See
  2507  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2508  	// details.
  2509  	ForceSendFields []string `json:"-"`
  2510  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  2511  	// requests with the JSON null value. By default, fields with empty values are
  2512  	// omitted from API requests. See
  2513  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2514  	NullFields []string `json:"-"`
  2515  }
  2516  
  2517  func (s *VolumeSnapshot) MarshalJSON() ([]byte, error) {
  2518  	type NoMethod VolumeSnapshot
  2519  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2520  }
  2521  
  2522  type ProjectsLocationsGetCall struct {
  2523  	s            *Service
  2524  	name         string
  2525  	urlParams_   gensupport.URLParams
  2526  	ifNoneMatch_ string
  2527  	ctx_         context.Context
  2528  	header_      http.Header
  2529  }
  2530  
  2531  // Get: Gets information about a location.
  2532  //
  2533  // - name: Resource name for the location.
  2534  func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
  2535  	c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2536  	c.name = name
  2537  	return c
  2538  }
  2539  
  2540  // Fields allows partial responses to be retrieved. See
  2541  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2542  // details.
  2543  func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
  2544  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2545  	return c
  2546  }
  2547  
  2548  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2549  // object's ETag matches the given value. This is useful for getting updates
  2550  // only after the object has changed since the last request.
  2551  func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
  2552  	c.ifNoneMatch_ = entityTag
  2553  	return c
  2554  }
  2555  
  2556  // Context sets the context to be used in this call's Do method.
  2557  func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
  2558  	c.ctx_ = ctx
  2559  	return c
  2560  }
  2561  
  2562  // Header returns a http.Header that can be modified by the caller to add
  2563  // headers to the request.
  2564  func (c *ProjectsLocationsGetCall) Header() http.Header {
  2565  	if c.header_ == nil {
  2566  		c.header_ = make(http.Header)
  2567  	}
  2568  	return c.header_
  2569  }
  2570  
  2571  func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
  2572  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2573  	if c.ifNoneMatch_ != "" {
  2574  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2575  	}
  2576  	var body io.Reader = nil
  2577  	c.urlParams_.Set("alt", alt)
  2578  	c.urlParams_.Set("prettyPrint", "false")
  2579  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  2580  	urls += "?" + c.urlParams_.Encode()
  2581  	req, err := http.NewRequest("GET", urls, body)
  2582  	if err != nil {
  2583  		return nil, err
  2584  	}
  2585  	req.Header = reqHeaders
  2586  	googleapi.Expand(req.URL, map[string]string{
  2587  		"name": c.name,
  2588  	})
  2589  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2590  }
  2591  
  2592  // Do executes the "baremetalsolution.projects.locations.get" call.
  2593  // Any non-2xx status code is an error. Response headers are in either
  2594  // *Location.ServerResponse.Header or (if a response was returned at all) in
  2595  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2596  // whether the returned error was because http.StatusNotModified was returned.
  2597  func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
  2598  	gensupport.SetOptions(c.urlParams_, opts...)
  2599  	res, err := c.doRequest("json")
  2600  	if res != nil && res.StatusCode == http.StatusNotModified {
  2601  		if res.Body != nil {
  2602  			res.Body.Close()
  2603  		}
  2604  		return nil, gensupport.WrapError(&googleapi.Error{
  2605  			Code:   res.StatusCode,
  2606  			Header: res.Header,
  2607  		})
  2608  	}
  2609  	if err != nil {
  2610  		return nil, err
  2611  	}
  2612  	defer googleapi.CloseBody(res)
  2613  	if err := googleapi.CheckResponse(res); err != nil {
  2614  		return nil, gensupport.WrapError(err)
  2615  	}
  2616  	ret := &Location{
  2617  		ServerResponse: googleapi.ServerResponse{
  2618  			Header:         res.Header,
  2619  			HTTPStatusCode: res.StatusCode,
  2620  		},
  2621  	}
  2622  	target := &ret
  2623  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2624  		return nil, err
  2625  	}
  2626  	return ret, nil
  2627  }
  2628  
  2629  type ProjectsLocationsListCall struct {
  2630  	s            *Service
  2631  	name         string
  2632  	urlParams_   gensupport.URLParams
  2633  	ifNoneMatch_ string
  2634  	ctx_         context.Context
  2635  	header_      http.Header
  2636  }
  2637  
  2638  // List: Lists information about the supported locations for this service.
  2639  //
  2640  // - name: The resource that owns the locations collection, if applicable.
  2641  func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
  2642  	c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2643  	c.name = name
  2644  	return c
  2645  }
  2646  
  2647  // Filter sets the optional parameter "filter": A filter to narrow down results
  2648  // to a preferred subset. The filtering language accepts strings like
  2649  // "displayName=tokyo", and is documented in more detail in AIP-160
  2650  // (https://google.aip.dev/160).
  2651  func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
  2652  	c.urlParams_.Set("filter", filter)
  2653  	return c
  2654  }
  2655  
  2656  // PageSize sets the optional parameter "pageSize": The maximum number of
  2657  // results to return. If not set, the service selects a default.
  2658  func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
  2659  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2660  	return c
  2661  }
  2662  
  2663  // PageToken sets the optional parameter "pageToken": A page token received
  2664  // from the `next_page_token` field in the response. Send that page token to
  2665  // receive the subsequent page.
  2666  func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
  2667  	c.urlParams_.Set("pageToken", pageToken)
  2668  	return c
  2669  }
  2670  
  2671  // Fields allows partial responses to be retrieved. See
  2672  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2673  // details.
  2674  func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
  2675  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2676  	return c
  2677  }
  2678  
  2679  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2680  // object's ETag matches the given value. This is useful for getting updates
  2681  // only after the object has changed since the last request.
  2682  func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
  2683  	c.ifNoneMatch_ = entityTag
  2684  	return c
  2685  }
  2686  
  2687  // Context sets the context to be used in this call's Do method.
  2688  func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
  2689  	c.ctx_ = ctx
  2690  	return c
  2691  }
  2692  
  2693  // Header returns a http.Header that can be modified by the caller to add
  2694  // headers to the request.
  2695  func (c *ProjectsLocationsListCall) Header() http.Header {
  2696  	if c.header_ == nil {
  2697  		c.header_ = make(http.Header)
  2698  	}
  2699  	return c.header_
  2700  }
  2701  
  2702  func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
  2703  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2704  	if c.ifNoneMatch_ != "" {
  2705  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2706  	}
  2707  	var body io.Reader = nil
  2708  	c.urlParams_.Set("alt", alt)
  2709  	c.urlParams_.Set("prettyPrint", "false")
  2710  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/locations")
  2711  	urls += "?" + c.urlParams_.Encode()
  2712  	req, err := http.NewRequest("GET", urls, body)
  2713  	if err != nil {
  2714  		return nil, err
  2715  	}
  2716  	req.Header = reqHeaders
  2717  	googleapi.Expand(req.URL, map[string]string{
  2718  		"name": c.name,
  2719  	})
  2720  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2721  }
  2722  
  2723  // Do executes the "baremetalsolution.projects.locations.list" call.
  2724  // Any non-2xx status code is an error. Response headers are in either
  2725  // *ListLocationsResponse.ServerResponse.Header or (if a response was returned
  2726  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2727  // check whether the returned error was because http.StatusNotModified was
  2728  // returned.
  2729  func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
  2730  	gensupport.SetOptions(c.urlParams_, opts...)
  2731  	res, err := c.doRequest("json")
  2732  	if res != nil && res.StatusCode == http.StatusNotModified {
  2733  		if res.Body != nil {
  2734  			res.Body.Close()
  2735  		}
  2736  		return nil, gensupport.WrapError(&googleapi.Error{
  2737  			Code:   res.StatusCode,
  2738  			Header: res.Header,
  2739  		})
  2740  	}
  2741  	if err != nil {
  2742  		return nil, err
  2743  	}
  2744  	defer googleapi.CloseBody(res)
  2745  	if err := googleapi.CheckResponse(res); err != nil {
  2746  		return nil, gensupport.WrapError(err)
  2747  	}
  2748  	ret := &ListLocationsResponse{
  2749  		ServerResponse: googleapi.ServerResponse{
  2750  			Header:         res.Header,
  2751  			HTTPStatusCode: res.StatusCode,
  2752  		},
  2753  	}
  2754  	target := &ret
  2755  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2756  		return nil, err
  2757  	}
  2758  	return ret, nil
  2759  }
  2760  
  2761  // Pages invokes f for each page of results.
  2762  // A non-nil error returned from f will halt the iteration.
  2763  // The provided context supersedes any context provided to the Context method.
  2764  func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
  2765  	c.ctx_ = ctx
  2766  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  2767  	for {
  2768  		x, err := c.Do()
  2769  		if err != nil {
  2770  			return err
  2771  		}
  2772  		if err := f(x); err != nil {
  2773  			return err
  2774  		}
  2775  		if x.NextPageToken == "" {
  2776  			return nil
  2777  		}
  2778  		c.PageToken(x.NextPageToken)
  2779  	}
  2780  }
  2781  
  2782  type ProjectsLocationsInstancesDetachLunCall struct {
  2783  	s                *Service
  2784  	instance         string
  2785  	detachlunrequest *DetachLunRequest
  2786  	urlParams_       gensupport.URLParams
  2787  	ctx_             context.Context
  2788  	header_          http.Header
  2789  }
  2790  
  2791  // DetachLun: Detach LUN from Instance.
  2792  //
  2793  // - instance: Name of the instance.
  2794  func (r *ProjectsLocationsInstancesService) DetachLun(instance string, detachlunrequest *DetachLunRequest) *ProjectsLocationsInstancesDetachLunCall {
  2795  	c := &ProjectsLocationsInstancesDetachLunCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2796  	c.instance = instance
  2797  	c.detachlunrequest = detachlunrequest
  2798  	return c
  2799  }
  2800  
  2801  // Fields allows partial responses to be retrieved. See
  2802  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2803  // details.
  2804  func (c *ProjectsLocationsInstancesDetachLunCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesDetachLunCall {
  2805  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2806  	return c
  2807  }
  2808  
  2809  // Context sets the context to be used in this call's Do method.
  2810  func (c *ProjectsLocationsInstancesDetachLunCall) Context(ctx context.Context) *ProjectsLocationsInstancesDetachLunCall {
  2811  	c.ctx_ = ctx
  2812  	return c
  2813  }
  2814  
  2815  // Header returns a http.Header that can be modified by the caller to add
  2816  // headers to the request.
  2817  func (c *ProjectsLocationsInstancesDetachLunCall) Header() http.Header {
  2818  	if c.header_ == nil {
  2819  		c.header_ = make(http.Header)
  2820  	}
  2821  	return c.header_
  2822  }
  2823  
  2824  func (c *ProjectsLocationsInstancesDetachLunCall) doRequest(alt string) (*http.Response, error) {
  2825  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2826  	var body io.Reader = nil
  2827  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.detachlunrequest)
  2828  	if err != nil {
  2829  		return nil, err
  2830  	}
  2831  	c.urlParams_.Set("alt", alt)
  2832  	c.urlParams_.Set("prettyPrint", "false")
  2833  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+instance}:detachLun")
  2834  	urls += "?" + c.urlParams_.Encode()
  2835  	req, err := http.NewRequest("POST", urls, body)
  2836  	if err != nil {
  2837  		return nil, err
  2838  	}
  2839  	req.Header = reqHeaders
  2840  	googleapi.Expand(req.URL, map[string]string{
  2841  		"instance": c.instance,
  2842  	})
  2843  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2844  }
  2845  
  2846  // Do executes the "baremetalsolution.projects.locations.instances.detachLun" call.
  2847  // Any non-2xx status code is an error. Response headers are in either
  2848  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  2849  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2850  // whether the returned error was because http.StatusNotModified was returned.
  2851  func (c *ProjectsLocationsInstancesDetachLunCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2852  	gensupport.SetOptions(c.urlParams_, opts...)
  2853  	res, err := c.doRequest("json")
  2854  	if res != nil && res.StatusCode == http.StatusNotModified {
  2855  		if res.Body != nil {
  2856  			res.Body.Close()
  2857  		}
  2858  		return nil, gensupport.WrapError(&googleapi.Error{
  2859  			Code:   res.StatusCode,
  2860  			Header: res.Header,
  2861  		})
  2862  	}
  2863  	if err != nil {
  2864  		return nil, err
  2865  	}
  2866  	defer googleapi.CloseBody(res)
  2867  	if err := googleapi.CheckResponse(res); err != nil {
  2868  		return nil, gensupport.WrapError(err)
  2869  	}
  2870  	ret := &Operation{
  2871  		ServerResponse: googleapi.ServerResponse{
  2872  			Header:         res.Header,
  2873  			HTTPStatusCode: res.StatusCode,
  2874  		},
  2875  	}
  2876  	target := &ret
  2877  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2878  		return nil, err
  2879  	}
  2880  	return ret, nil
  2881  }
  2882  
  2883  type ProjectsLocationsInstancesDisableHyperthreadingCall struct {
  2884  	s                            *Service
  2885  	name                         string
  2886  	disablehyperthreadingrequest *DisableHyperthreadingRequest
  2887  	urlParams_                   gensupport.URLParams
  2888  	ctx_                         context.Context
  2889  	header_                      http.Header
  2890  }
  2891  
  2892  // DisableHyperthreading: Perform disable hyperthreading operation on a single
  2893  // server.
  2894  //
  2895  //   - name: The `name` field is used to identify the instance. Format:
  2896  //     projects/{project}/locations/{location}/instances/{instance}.
  2897  func (r *ProjectsLocationsInstancesService) DisableHyperthreading(name string, disablehyperthreadingrequest *DisableHyperthreadingRequest) *ProjectsLocationsInstancesDisableHyperthreadingCall {
  2898  	c := &ProjectsLocationsInstancesDisableHyperthreadingCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2899  	c.name = name
  2900  	c.disablehyperthreadingrequest = disablehyperthreadingrequest
  2901  	return c
  2902  }
  2903  
  2904  // Fields allows partial responses to be retrieved. See
  2905  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2906  // details.
  2907  func (c *ProjectsLocationsInstancesDisableHyperthreadingCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesDisableHyperthreadingCall {
  2908  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2909  	return c
  2910  }
  2911  
  2912  // Context sets the context to be used in this call's Do method.
  2913  func (c *ProjectsLocationsInstancesDisableHyperthreadingCall) Context(ctx context.Context) *ProjectsLocationsInstancesDisableHyperthreadingCall {
  2914  	c.ctx_ = ctx
  2915  	return c
  2916  }
  2917  
  2918  // Header returns a http.Header that can be modified by the caller to add
  2919  // headers to the request.
  2920  func (c *ProjectsLocationsInstancesDisableHyperthreadingCall) Header() http.Header {
  2921  	if c.header_ == nil {
  2922  		c.header_ = make(http.Header)
  2923  	}
  2924  	return c.header_
  2925  }
  2926  
  2927  func (c *ProjectsLocationsInstancesDisableHyperthreadingCall) doRequest(alt string) (*http.Response, error) {
  2928  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2929  	var body io.Reader = nil
  2930  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.disablehyperthreadingrequest)
  2931  	if err != nil {
  2932  		return nil, err
  2933  	}
  2934  	c.urlParams_.Set("alt", alt)
  2935  	c.urlParams_.Set("prettyPrint", "false")
  2936  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:disableHyperthreading")
  2937  	urls += "?" + c.urlParams_.Encode()
  2938  	req, err := http.NewRequest("POST", urls, body)
  2939  	if err != nil {
  2940  		return nil, err
  2941  	}
  2942  	req.Header = reqHeaders
  2943  	googleapi.Expand(req.URL, map[string]string{
  2944  		"name": c.name,
  2945  	})
  2946  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2947  }
  2948  
  2949  // Do executes the "baremetalsolution.projects.locations.instances.disableHyperthreading" call.
  2950  // Any non-2xx status code is an error. Response headers are in either
  2951  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  2952  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2953  // whether the returned error was because http.StatusNotModified was returned.
  2954  func (c *ProjectsLocationsInstancesDisableHyperthreadingCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2955  	gensupport.SetOptions(c.urlParams_, opts...)
  2956  	res, err := c.doRequest("json")
  2957  	if res != nil && res.StatusCode == http.StatusNotModified {
  2958  		if res.Body != nil {
  2959  			res.Body.Close()
  2960  		}
  2961  		return nil, gensupport.WrapError(&googleapi.Error{
  2962  			Code:   res.StatusCode,
  2963  			Header: res.Header,
  2964  		})
  2965  	}
  2966  	if err != nil {
  2967  		return nil, err
  2968  	}
  2969  	defer googleapi.CloseBody(res)
  2970  	if err := googleapi.CheckResponse(res); err != nil {
  2971  		return nil, gensupport.WrapError(err)
  2972  	}
  2973  	ret := &Operation{
  2974  		ServerResponse: googleapi.ServerResponse{
  2975  			Header:         res.Header,
  2976  			HTTPStatusCode: res.StatusCode,
  2977  		},
  2978  	}
  2979  	target := &ret
  2980  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2981  		return nil, err
  2982  	}
  2983  	return ret, nil
  2984  }
  2985  
  2986  type ProjectsLocationsInstancesDisableInteractiveSerialConsoleCall struct {
  2987  	s                                      *Service
  2988  	name                                   string
  2989  	disableinteractiveserialconsolerequest *DisableInteractiveSerialConsoleRequest
  2990  	urlParams_                             gensupport.URLParams
  2991  	ctx_                                   context.Context
  2992  	header_                                http.Header
  2993  }
  2994  
  2995  // DisableInteractiveSerialConsole: Disable the interactive serial console
  2996  // feature on an instance.
  2997  //
  2998  // - name: Name of the resource.
  2999  func (r *ProjectsLocationsInstancesService) DisableInteractiveSerialConsole(name string, disableinteractiveserialconsolerequest *DisableInteractiveSerialConsoleRequest) *ProjectsLocationsInstancesDisableInteractiveSerialConsoleCall {
  3000  	c := &ProjectsLocationsInstancesDisableInteractiveSerialConsoleCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3001  	c.name = name
  3002  	c.disableinteractiveserialconsolerequest = disableinteractiveserialconsolerequest
  3003  	return c
  3004  }
  3005  
  3006  // Fields allows partial responses to be retrieved. See
  3007  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3008  // details.
  3009  func (c *ProjectsLocationsInstancesDisableInteractiveSerialConsoleCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesDisableInteractiveSerialConsoleCall {
  3010  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3011  	return c
  3012  }
  3013  
  3014  // Context sets the context to be used in this call's Do method.
  3015  func (c *ProjectsLocationsInstancesDisableInteractiveSerialConsoleCall) Context(ctx context.Context) *ProjectsLocationsInstancesDisableInteractiveSerialConsoleCall {
  3016  	c.ctx_ = ctx
  3017  	return c
  3018  }
  3019  
  3020  // Header returns a http.Header that can be modified by the caller to add
  3021  // headers to the request.
  3022  func (c *ProjectsLocationsInstancesDisableInteractiveSerialConsoleCall) Header() http.Header {
  3023  	if c.header_ == nil {
  3024  		c.header_ = make(http.Header)
  3025  	}
  3026  	return c.header_
  3027  }
  3028  
  3029  func (c *ProjectsLocationsInstancesDisableInteractiveSerialConsoleCall) doRequest(alt string) (*http.Response, error) {
  3030  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3031  	var body io.Reader = nil
  3032  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.disableinteractiveserialconsolerequest)
  3033  	if err != nil {
  3034  		return nil, err
  3035  	}
  3036  	c.urlParams_.Set("alt", alt)
  3037  	c.urlParams_.Set("prettyPrint", "false")
  3038  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:disableInteractiveSerialConsole")
  3039  	urls += "?" + c.urlParams_.Encode()
  3040  	req, err := http.NewRequest("POST", urls, body)
  3041  	if err != nil {
  3042  		return nil, err
  3043  	}
  3044  	req.Header = reqHeaders
  3045  	googleapi.Expand(req.URL, map[string]string{
  3046  		"name": c.name,
  3047  	})
  3048  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3049  }
  3050  
  3051  // Do executes the "baremetalsolution.projects.locations.instances.disableInteractiveSerialConsole" call.
  3052  // Any non-2xx status code is an error. Response headers are in either
  3053  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3054  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3055  // whether the returned error was because http.StatusNotModified was returned.
  3056  func (c *ProjectsLocationsInstancesDisableInteractiveSerialConsoleCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3057  	gensupport.SetOptions(c.urlParams_, opts...)
  3058  	res, err := c.doRequest("json")
  3059  	if res != nil && res.StatusCode == http.StatusNotModified {
  3060  		if res.Body != nil {
  3061  			res.Body.Close()
  3062  		}
  3063  		return nil, gensupport.WrapError(&googleapi.Error{
  3064  			Code:   res.StatusCode,
  3065  			Header: res.Header,
  3066  		})
  3067  	}
  3068  	if err != nil {
  3069  		return nil, err
  3070  	}
  3071  	defer googleapi.CloseBody(res)
  3072  	if err := googleapi.CheckResponse(res); err != nil {
  3073  		return nil, gensupport.WrapError(err)
  3074  	}
  3075  	ret := &Operation{
  3076  		ServerResponse: googleapi.ServerResponse{
  3077  			Header:         res.Header,
  3078  			HTTPStatusCode: res.StatusCode,
  3079  		},
  3080  	}
  3081  	target := &ret
  3082  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3083  		return nil, err
  3084  	}
  3085  	return ret, nil
  3086  }
  3087  
  3088  type ProjectsLocationsInstancesEnableHyperthreadingCall struct {
  3089  	s                           *Service
  3090  	name                        string
  3091  	enablehyperthreadingrequest *EnableHyperthreadingRequest
  3092  	urlParams_                  gensupport.URLParams
  3093  	ctx_                        context.Context
  3094  	header_                     http.Header
  3095  }
  3096  
  3097  // EnableHyperthreading: Perform enable hyperthreading operation on a single
  3098  // server.
  3099  //
  3100  //   - name: The `name` field is used to identify the instance. Format:
  3101  //     projects/{project}/locations/{location}/instances/{instance}.
  3102  func (r *ProjectsLocationsInstancesService) EnableHyperthreading(name string, enablehyperthreadingrequest *EnableHyperthreadingRequest) *ProjectsLocationsInstancesEnableHyperthreadingCall {
  3103  	c := &ProjectsLocationsInstancesEnableHyperthreadingCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3104  	c.name = name
  3105  	c.enablehyperthreadingrequest = enablehyperthreadingrequest
  3106  	return c
  3107  }
  3108  
  3109  // Fields allows partial responses to be retrieved. See
  3110  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3111  // details.
  3112  func (c *ProjectsLocationsInstancesEnableHyperthreadingCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesEnableHyperthreadingCall {
  3113  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3114  	return c
  3115  }
  3116  
  3117  // Context sets the context to be used in this call's Do method.
  3118  func (c *ProjectsLocationsInstancesEnableHyperthreadingCall) Context(ctx context.Context) *ProjectsLocationsInstancesEnableHyperthreadingCall {
  3119  	c.ctx_ = ctx
  3120  	return c
  3121  }
  3122  
  3123  // Header returns a http.Header that can be modified by the caller to add
  3124  // headers to the request.
  3125  func (c *ProjectsLocationsInstancesEnableHyperthreadingCall) Header() http.Header {
  3126  	if c.header_ == nil {
  3127  		c.header_ = make(http.Header)
  3128  	}
  3129  	return c.header_
  3130  }
  3131  
  3132  func (c *ProjectsLocationsInstancesEnableHyperthreadingCall) doRequest(alt string) (*http.Response, error) {
  3133  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3134  	var body io.Reader = nil
  3135  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.enablehyperthreadingrequest)
  3136  	if err != nil {
  3137  		return nil, err
  3138  	}
  3139  	c.urlParams_.Set("alt", alt)
  3140  	c.urlParams_.Set("prettyPrint", "false")
  3141  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:enableHyperthreading")
  3142  	urls += "?" + c.urlParams_.Encode()
  3143  	req, err := http.NewRequest("POST", urls, body)
  3144  	if err != nil {
  3145  		return nil, err
  3146  	}
  3147  	req.Header = reqHeaders
  3148  	googleapi.Expand(req.URL, map[string]string{
  3149  		"name": c.name,
  3150  	})
  3151  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3152  }
  3153  
  3154  // Do executes the "baremetalsolution.projects.locations.instances.enableHyperthreading" call.
  3155  // Any non-2xx status code is an error. Response headers are in either
  3156  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3157  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3158  // whether the returned error was because http.StatusNotModified was returned.
  3159  func (c *ProjectsLocationsInstancesEnableHyperthreadingCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3160  	gensupport.SetOptions(c.urlParams_, opts...)
  3161  	res, err := c.doRequest("json")
  3162  	if res != nil && res.StatusCode == http.StatusNotModified {
  3163  		if res.Body != nil {
  3164  			res.Body.Close()
  3165  		}
  3166  		return nil, gensupport.WrapError(&googleapi.Error{
  3167  			Code:   res.StatusCode,
  3168  			Header: res.Header,
  3169  		})
  3170  	}
  3171  	if err != nil {
  3172  		return nil, err
  3173  	}
  3174  	defer googleapi.CloseBody(res)
  3175  	if err := googleapi.CheckResponse(res); err != nil {
  3176  		return nil, gensupport.WrapError(err)
  3177  	}
  3178  	ret := &Operation{
  3179  		ServerResponse: googleapi.ServerResponse{
  3180  			Header:         res.Header,
  3181  			HTTPStatusCode: res.StatusCode,
  3182  		},
  3183  	}
  3184  	target := &ret
  3185  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3186  		return nil, err
  3187  	}
  3188  	return ret, nil
  3189  }
  3190  
  3191  type ProjectsLocationsInstancesEnableInteractiveSerialConsoleCall struct {
  3192  	s                                     *Service
  3193  	name                                  string
  3194  	enableinteractiveserialconsolerequest *EnableInteractiveSerialConsoleRequest
  3195  	urlParams_                            gensupport.URLParams
  3196  	ctx_                                  context.Context
  3197  	header_                               http.Header
  3198  }
  3199  
  3200  // EnableInteractiveSerialConsole: Enable the interactive serial console
  3201  // feature on an instance.
  3202  //
  3203  // - name: Name of the resource.
  3204  func (r *ProjectsLocationsInstancesService) EnableInteractiveSerialConsole(name string, enableinteractiveserialconsolerequest *EnableInteractiveSerialConsoleRequest) *ProjectsLocationsInstancesEnableInteractiveSerialConsoleCall {
  3205  	c := &ProjectsLocationsInstancesEnableInteractiveSerialConsoleCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3206  	c.name = name
  3207  	c.enableinteractiveserialconsolerequest = enableinteractiveserialconsolerequest
  3208  	return c
  3209  }
  3210  
  3211  // Fields allows partial responses to be retrieved. See
  3212  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3213  // details.
  3214  func (c *ProjectsLocationsInstancesEnableInteractiveSerialConsoleCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesEnableInteractiveSerialConsoleCall {
  3215  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3216  	return c
  3217  }
  3218  
  3219  // Context sets the context to be used in this call's Do method.
  3220  func (c *ProjectsLocationsInstancesEnableInteractiveSerialConsoleCall) Context(ctx context.Context) *ProjectsLocationsInstancesEnableInteractiveSerialConsoleCall {
  3221  	c.ctx_ = ctx
  3222  	return c
  3223  }
  3224  
  3225  // Header returns a http.Header that can be modified by the caller to add
  3226  // headers to the request.
  3227  func (c *ProjectsLocationsInstancesEnableInteractiveSerialConsoleCall) Header() http.Header {
  3228  	if c.header_ == nil {
  3229  		c.header_ = make(http.Header)
  3230  	}
  3231  	return c.header_
  3232  }
  3233  
  3234  func (c *ProjectsLocationsInstancesEnableInteractiveSerialConsoleCall) doRequest(alt string) (*http.Response, error) {
  3235  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3236  	var body io.Reader = nil
  3237  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.enableinteractiveserialconsolerequest)
  3238  	if err != nil {
  3239  		return nil, err
  3240  	}
  3241  	c.urlParams_.Set("alt", alt)
  3242  	c.urlParams_.Set("prettyPrint", "false")
  3243  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:enableInteractiveSerialConsole")
  3244  	urls += "?" + c.urlParams_.Encode()
  3245  	req, err := http.NewRequest("POST", urls, body)
  3246  	if err != nil {
  3247  		return nil, err
  3248  	}
  3249  	req.Header = reqHeaders
  3250  	googleapi.Expand(req.URL, map[string]string{
  3251  		"name": c.name,
  3252  	})
  3253  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3254  }
  3255  
  3256  // Do executes the "baremetalsolution.projects.locations.instances.enableInteractiveSerialConsole" call.
  3257  // Any non-2xx status code is an error. Response headers are in either
  3258  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3259  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3260  // whether the returned error was because http.StatusNotModified was returned.
  3261  func (c *ProjectsLocationsInstancesEnableInteractiveSerialConsoleCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3262  	gensupport.SetOptions(c.urlParams_, opts...)
  3263  	res, err := c.doRequest("json")
  3264  	if res != nil && res.StatusCode == http.StatusNotModified {
  3265  		if res.Body != nil {
  3266  			res.Body.Close()
  3267  		}
  3268  		return nil, gensupport.WrapError(&googleapi.Error{
  3269  			Code:   res.StatusCode,
  3270  			Header: res.Header,
  3271  		})
  3272  	}
  3273  	if err != nil {
  3274  		return nil, err
  3275  	}
  3276  	defer googleapi.CloseBody(res)
  3277  	if err := googleapi.CheckResponse(res); err != nil {
  3278  		return nil, gensupport.WrapError(err)
  3279  	}
  3280  	ret := &Operation{
  3281  		ServerResponse: googleapi.ServerResponse{
  3282  			Header:         res.Header,
  3283  			HTTPStatusCode: res.StatusCode,
  3284  		},
  3285  	}
  3286  	target := &ret
  3287  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3288  		return nil, err
  3289  	}
  3290  	return ret, nil
  3291  }
  3292  
  3293  type ProjectsLocationsInstancesGetCall struct {
  3294  	s            *Service
  3295  	name         string
  3296  	urlParams_   gensupport.URLParams
  3297  	ifNoneMatch_ string
  3298  	ctx_         context.Context
  3299  	header_      http.Header
  3300  }
  3301  
  3302  // Get: Get details about a single server.
  3303  //
  3304  // - name: Name of the resource.
  3305  func (r *ProjectsLocationsInstancesService) Get(name string) *ProjectsLocationsInstancesGetCall {
  3306  	c := &ProjectsLocationsInstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3307  	c.name = name
  3308  	return c
  3309  }
  3310  
  3311  // Fields allows partial responses to be retrieved. See
  3312  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3313  // details.
  3314  func (c *ProjectsLocationsInstancesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesGetCall {
  3315  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3316  	return c
  3317  }
  3318  
  3319  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3320  // object's ETag matches the given value. This is useful for getting updates
  3321  // only after the object has changed since the last request.
  3322  func (c *ProjectsLocationsInstancesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesGetCall {
  3323  	c.ifNoneMatch_ = entityTag
  3324  	return c
  3325  }
  3326  
  3327  // Context sets the context to be used in this call's Do method.
  3328  func (c *ProjectsLocationsInstancesGetCall) Context(ctx context.Context) *ProjectsLocationsInstancesGetCall {
  3329  	c.ctx_ = ctx
  3330  	return c
  3331  }
  3332  
  3333  // Header returns a http.Header that can be modified by the caller to add
  3334  // headers to the request.
  3335  func (c *ProjectsLocationsInstancesGetCall) Header() http.Header {
  3336  	if c.header_ == nil {
  3337  		c.header_ = make(http.Header)
  3338  	}
  3339  	return c.header_
  3340  }
  3341  
  3342  func (c *ProjectsLocationsInstancesGetCall) doRequest(alt string) (*http.Response, error) {
  3343  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3344  	if c.ifNoneMatch_ != "" {
  3345  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3346  	}
  3347  	var body io.Reader = nil
  3348  	c.urlParams_.Set("alt", alt)
  3349  	c.urlParams_.Set("prettyPrint", "false")
  3350  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  3351  	urls += "?" + c.urlParams_.Encode()
  3352  	req, err := http.NewRequest("GET", urls, body)
  3353  	if err != nil {
  3354  		return nil, err
  3355  	}
  3356  	req.Header = reqHeaders
  3357  	googleapi.Expand(req.URL, map[string]string{
  3358  		"name": c.name,
  3359  	})
  3360  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3361  }
  3362  
  3363  // Do executes the "baremetalsolution.projects.locations.instances.get" call.
  3364  // Any non-2xx status code is an error. Response headers are in either
  3365  // *Instance.ServerResponse.Header or (if a response was returned at all) in
  3366  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3367  // whether the returned error was because http.StatusNotModified was returned.
  3368  func (c *ProjectsLocationsInstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, error) {
  3369  	gensupport.SetOptions(c.urlParams_, opts...)
  3370  	res, err := c.doRequest("json")
  3371  	if res != nil && res.StatusCode == http.StatusNotModified {
  3372  		if res.Body != nil {
  3373  			res.Body.Close()
  3374  		}
  3375  		return nil, gensupport.WrapError(&googleapi.Error{
  3376  			Code:   res.StatusCode,
  3377  			Header: res.Header,
  3378  		})
  3379  	}
  3380  	if err != nil {
  3381  		return nil, err
  3382  	}
  3383  	defer googleapi.CloseBody(res)
  3384  	if err := googleapi.CheckResponse(res); err != nil {
  3385  		return nil, gensupport.WrapError(err)
  3386  	}
  3387  	ret := &Instance{
  3388  		ServerResponse: googleapi.ServerResponse{
  3389  			Header:         res.Header,
  3390  			HTTPStatusCode: res.StatusCode,
  3391  		},
  3392  	}
  3393  	target := &ret
  3394  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3395  		return nil, err
  3396  	}
  3397  	return ret, nil
  3398  }
  3399  
  3400  type ProjectsLocationsInstancesListCall struct {
  3401  	s            *Service
  3402  	parent       string
  3403  	urlParams_   gensupport.URLParams
  3404  	ifNoneMatch_ string
  3405  	ctx_         context.Context
  3406  	header_      http.Header
  3407  }
  3408  
  3409  // List: List servers in a given project and location.
  3410  //
  3411  // - parent: Parent value for ListInstancesRequest.
  3412  func (r *ProjectsLocationsInstancesService) List(parent string) *ProjectsLocationsInstancesListCall {
  3413  	c := &ProjectsLocationsInstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3414  	c.parent = parent
  3415  	return c
  3416  }
  3417  
  3418  // Filter sets the optional parameter "filter": List filter.
  3419  func (c *ProjectsLocationsInstancesListCall) Filter(filter string) *ProjectsLocationsInstancesListCall {
  3420  	c.urlParams_.Set("filter", filter)
  3421  	return c
  3422  }
  3423  
  3424  // PageSize sets the optional parameter "pageSize": Requested page size. Server
  3425  // may return fewer items than requested. If unspecified, the server will pick
  3426  // an appropriate default.
  3427  func (c *ProjectsLocationsInstancesListCall) PageSize(pageSize int64) *ProjectsLocationsInstancesListCall {
  3428  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3429  	return c
  3430  }
  3431  
  3432  // PageToken sets the optional parameter "pageToken": A token identifying a
  3433  // page of results from the server.
  3434  func (c *ProjectsLocationsInstancesListCall) PageToken(pageToken string) *ProjectsLocationsInstancesListCall {
  3435  	c.urlParams_.Set("pageToken", pageToken)
  3436  	return c
  3437  }
  3438  
  3439  // Fields allows partial responses to be retrieved. See
  3440  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3441  // details.
  3442  func (c *ProjectsLocationsInstancesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesListCall {
  3443  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3444  	return c
  3445  }
  3446  
  3447  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3448  // object's ETag matches the given value. This is useful for getting updates
  3449  // only after the object has changed since the last request.
  3450  func (c *ProjectsLocationsInstancesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesListCall {
  3451  	c.ifNoneMatch_ = entityTag
  3452  	return c
  3453  }
  3454  
  3455  // Context sets the context to be used in this call's Do method.
  3456  func (c *ProjectsLocationsInstancesListCall) Context(ctx context.Context) *ProjectsLocationsInstancesListCall {
  3457  	c.ctx_ = ctx
  3458  	return c
  3459  }
  3460  
  3461  // Header returns a http.Header that can be modified by the caller to add
  3462  // headers to the request.
  3463  func (c *ProjectsLocationsInstancesListCall) Header() http.Header {
  3464  	if c.header_ == nil {
  3465  		c.header_ = make(http.Header)
  3466  	}
  3467  	return c.header_
  3468  }
  3469  
  3470  func (c *ProjectsLocationsInstancesListCall) doRequest(alt string) (*http.Response, error) {
  3471  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3472  	if c.ifNoneMatch_ != "" {
  3473  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3474  	}
  3475  	var body io.Reader = nil
  3476  	c.urlParams_.Set("alt", alt)
  3477  	c.urlParams_.Set("prettyPrint", "false")
  3478  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/instances")
  3479  	urls += "?" + c.urlParams_.Encode()
  3480  	req, err := http.NewRequest("GET", urls, body)
  3481  	if err != nil {
  3482  		return nil, err
  3483  	}
  3484  	req.Header = reqHeaders
  3485  	googleapi.Expand(req.URL, map[string]string{
  3486  		"parent": c.parent,
  3487  	})
  3488  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3489  }
  3490  
  3491  // Do executes the "baremetalsolution.projects.locations.instances.list" call.
  3492  // Any non-2xx status code is an error. Response headers are in either
  3493  // *ListInstancesResponse.ServerResponse.Header or (if a response was returned
  3494  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3495  // check whether the returned error was because http.StatusNotModified was
  3496  // returned.
  3497  func (c *ProjectsLocationsInstancesListCall) Do(opts ...googleapi.CallOption) (*ListInstancesResponse, error) {
  3498  	gensupport.SetOptions(c.urlParams_, opts...)
  3499  	res, err := c.doRequest("json")
  3500  	if res != nil && res.StatusCode == http.StatusNotModified {
  3501  		if res.Body != nil {
  3502  			res.Body.Close()
  3503  		}
  3504  		return nil, gensupport.WrapError(&googleapi.Error{
  3505  			Code:   res.StatusCode,
  3506  			Header: res.Header,
  3507  		})
  3508  	}
  3509  	if err != nil {
  3510  		return nil, err
  3511  	}
  3512  	defer googleapi.CloseBody(res)
  3513  	if err := googleapi.CheckResponse(res); err != nil {
  3514  		return nil, gensupport.WrapError(err)
  3515  	}
  3516  	ret := &ListInstancesResponse{
  3517  		ServerResponse: googleapi.ServerResponse{
  3518  			Header:         res.Header,
  3519  			HTTPStatusCode: res.StatusCode,
  3520  		},
  3521  	}
  3522  	target := &ret
  3523  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3524  		return nil, err
  3525  	}
  3526  	return ret, nil
  3527  }
  3528  
  3529  // Pages invokes f for each page of results.
  3530  // A non-nil error returned from f will halt the iteration.
  3531  // The provided context supersedes any context provided to the Context method.
  3532  func (c *ProjectsLocationsInstancesListCall) Pages(ctx context.Context, f func(*ListInstancesResponse) error) error {
  3533  	c.ctx_ = ctx
  3534  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3535  	for {
  3536  		x, err := c.Do()
  3537  		if err != nil {
  3538  			return err
  3539  		}
  3540  		if err := f(x); err != nil {
  3541  			return err
  3542  		}
  3543  		if x.NextPageToken == "" {
  3544  			return nil
  3545  		}
  3546  		c.PageToken(x.NextPageToken)
  3547  	}
  3548  }
  3549  
  3550  type ProjectsLocationsInstancesLoadAuthInfoCall struct {
  3551  	s            *Service
  3552  	name         string
  3553  	urlParams_   gensupport.URLParams
  3554  	ifNoneMatch_ string
  3555  	ctx_         context.Context
  3556  	header_      http.Header
  3557  }
  3558  
  3559  // LoadAuthInfo: Load auth info for a server.
  3560  //
  3561  // - name: Name of the server.
  3562  func (r *ProjectsLocationsInstancesService) LoadAuthInfo(name string) *ProjectsLocationsInstancesLoadAuthInfoCall {
  3563  	c := &ProjectsLocationsInstancesLoadAuthInfoCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3564  	c.name = name
  3565  	return c
  3566  }
  3567  
  3568  // Fields allows partial responses to be retrieved. See
  3569  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3570  // details.
  3571  func (c *ProjectsLocationsInstancesLoadAuthInfoCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesLoadAuthInfoCall {
  3572  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3573  	return c
  3574  }
  3575  
  3576  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3577  // object's ETag matches the given value. This is useful for getting updates
  3578  // only after the object has changed since the last request.
  3579  func (c *ProjectsLocationsInstancesLoadAuthInfoCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesLoadAuthInfoCall {
  3580  	c.ifNoneMatch_ = entityTag
  3581  	return c
  3582  }
  3583  
  3584  // Context sets the context to be used in this call's Do method.
  3585  func (c *ProjectsLocationsInstancesLoadAuthInfoCall) Context(ctx context.Context) *ProjectsLocationsInstancesLoadAuthInfoCall {
  3586  	c.ctx_ = ctx
  3587  	return c
  3588  }
  3589  
  3590  // Header returns a http.Header that can be modified by the caller to add
  3591  // headers to the request.
  3592  func (c *ProjectsLocationsInstancesLoadAuthInfoCall) Header() http.Header {
  3593  	if c.header_ == nil {
  3594  		c.header_ = make(http.Header)
  3595  	}
  3596  	return c.header_
  3597  }
  3598  
  3599  func (c *ProjectsLocationsInstancesLoadAuthInfoCall) doRequest(alt string) (*http.Response, error) {
  3600  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3601  	if c.ifNoneMatch_ != "" {
  3602  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3603  	}
  3604  	var body io.Reader = nil
  3605  	c.urlParams_.Set("alt", alt)
  3606  	c.urlParams_.Set("prettyPrint", "false")
  3607  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:loadAuthInfo")
  3608  	urls += "?" + c.urlParams_.Encode()
  3609  	req, err := http.NewRequest("GET", urls, body)
  3610  	if err != nil {
  3611  		return nil, err
  3612  	}
  3613  	req.Header = reqHeaders
  3614  	googleapi.Expand(req.URL, map[string]string{
  3615  		"name": c.name,
  3616  	})
  3617  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3618  }
  3619  
  3620  // Do executes the "baremetalsolution.projects.locations.instances.loadAuthInfo" call.
  3621  // Any non-2xx status code is an error. Response headers are in either
  3622  // *LoadInstanceAuthInfoResponse.ServerResponse.Header or (if a response was
  3623  // returned at all) in error.(*googleapi.Error).Header. Use
  3624  // googleapi.IsNotModified to check whether the returned error was because
  3625  // http.StatusNotModified was returned.
  3626  func (c *ProjectsLocationsInstancesLoadAuthInfoCall) Do(opts ...googleapi.CallOption) (*LoadInstanceAuthInfoResponse, error) {
  3627  	gensupport.SetOptions(c.urlParams_, opts...)
  3628  	res, err := c.doRequest("json")
  3629  	if res != nil && res.StatusCode == http.StatusNotModified {
  3630  		if res.Body != nil {
  3631  			res.Body.Close()
  3632  		}
  3633  		return nil, gensupport.WrapError(&googleapi.Error{
  3634  			Code:   res.StatusCode,
  3635  			Header: res.Header,
  3636  		})
  3637  	}
  3638  	if err != nil {
  3639  		return nil, err
  3640  	}
  3641  	defer googleapi.CloseBody(res)
  3642  	if err := googleapi.CheckResponse(res); err != nil {
  3643  		return nil, gensupport.WrapError(err)
  3644  	}
  3645  	ret := &LoadInstanceAuthInfoResponse{
  3646  		ServerResponse: googleapi.ServerResponse{
  3647  			Header:         res.Header,
  3648  			HTTPStatusCode: res.StatusCode,
  3649  		},
  3650  	}
  3651  	target := &ret
  3652  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3653  		return nil, err
  3654  	}
  3655  	return ret, nil
  3656  }
  3657  
  3658  type ProjectsLocationsInstancesPatchCall struct {
  3659  	s          *Service
  3660  	name       string
  3661  	instance   *Instance
  3662  	urlParams_ gensupport.URLParams
  3663  	ctx_       context.Context
  3664  	header_    http.Header
  3665  }
  3666  
  3667  // Patch: Update details of a single server.
  3668  //
  3669  //   - name: Immutable. The resource name of this `Instance`. Resource names are
  3670  //     schemeless URIs that follow the conventions in
  3671  //     https://cloud.google.com/apis/design/resource_names. Format:
  3672  //     `projects/{project}/locations/{location}/instances/{instance}`.
  3673  func (r *ProjectsLocationsInstancesService) Patch(name string, instance *Instance) *ProjectsLocationsInstancesPatchCall {
  3674  	c := &ProjectsLocationsInstancesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3675  	c.name = name
  3676  	c.instance = instance
  3677  	return c
  3678  }
  3679  
  3680  // UpdateMask sets the optional parameter "updateMask": The list of fields to
  3681  // update. The currently supported fields are: `labels`
  3682  // `hyperthreading_enabled` `os_image` `ssh_keys` `kms_key_version`
  3683  func (c *ProjectsLocationsInstancesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsInstancesPatchCall {
  3684  	c.urlParams_.Set("updateMask", updateMask)
  3685  	return c
  3686  }
  3687  
  3688  // Fields allows partial responses to be retrieved. See
  3689  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3690  // details.
  3691  func (c *ProjectsLocationsInstancesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesPatchCall {
  3692  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3693  	return c
  3694  }
  3695  
  3696  // Context sets the context to be used in this call's Do method.
  3697  func (c *ProjectsLocationsInstancesPatchCall) Context(ctx context.Context) *ProjectsLocationsInstancesPatchCall {
  3698  	c.ctx_ = ctx
  3699  	return c
  3700  }
  3701  
  3702  // Header returns a http.Header that can be modified by the caller to add
  3703  // headers to the request.
  3704  func (c *ProjectsLocationsInstancesPatchCall) Header() http.Header {
  3705  	if c.header_ == nil {
  3706  		c.header_ = make(http.Header)
  3707  	}
  3708  	return c.header_
  3709  }
  3710  
  3711  func (c *ProjectsLocationsInstancesPatchCall) doRequest(alt string) (*http.Response, error) {
  3712  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3713  	var body io.Reader = nil
  3714  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instance)
  3715  	if err != nil {
  3716  		return nil, err
  3717  	}
  3718  	c.urlParams_.Set("alt", alt)
  3719  	c.urlParams_.Set("prettyPrint", "false")
  3720  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  3721  	urls += "?" + c.urlParams_.Encode()
  3722  	req, err := http.NewRequest("PATCH", urls, body)
  3723  	if err != nil {
  3724  		return nil, err
  3725  	}
  3726  	req.Header = reqHeaders
  3727  	googleapi.Expand(req.URL, map[string]string{
  3728  		"name": c.name,
  3729  	})
  3730  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3731  }
  3732  
  3733  // Do executes the "baremetalsolution.projects.locations.instances.patch" call.
  3734  // Any non-2xx status code is an error. Response headers are in either
  3735  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3736  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3737  // whether the returned error was because http.StatusNotModified was returned.
  3738  func (c *ProjectsLocationsInstancesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3739  	gensupport.SetOptions(c.urlParams_, opts...)
  3740  	res, err := c.doRequest("json")
  3741  	if res != nil && res.StatusCode == http.StatusNotModified {
  3742  		if res.Body != nil {
  3743  			res.Body.Close()
  3744  		}
  3745  		return nil, gensupport.WrapError(&googleapi.Error{
  3746  			Code:   res.StatusCode,
  3747  			Header: res.Header,
  3748  		})
  3749  	}
  3750  	if err != nil {
  3751  		return nil, err
  3752  	}
  3753  	defer googleapi.CloseBody(res)
  3754  	if err := googleapi.CheckResponse(res); err != nil {
  3755  		return nil, gensupport.WrapError(err)
  3756  	}
  3757  	ret := &Operation{
  3758  		ServerResponse: googleapi.ServerResponse{
  3759  			Header:         res.Header,
  3760  			HTTPStatusCode: res.StatusCode,
  3761  		},
  3762  	}
  3763  	target := &ret
  3764  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3765  		return nil, err
  3766  	}
  3767  	return ret, nil
  3768  }
  3769  
  3770  type ProjectsLocationsInstancesReimageCall struct {
  3771  	s                      *Service
  3772  	name                   string
  3773  	reimageinstancerequest *ReimageInstanceRequest
  3774  	urlParams_             gensupport.URLParams
  3775  	ctx_                   context.Context
  3776  	header_                http.Header
  3777  }
  3778  
  3779  // Reimage: Perform reimage operation on a single server.
  3780  //
  3781  //   - name: The `name` field is used to identify the instance. Format:
  3782  //     projects/{project}/locations/{location}/instances/{instance}.
  3783  func (r *ProjectsLocationsInstancesService) Reimage(name string, reimageinstancerequest *ReimageInstanceRequest) *ProjectsLocationsInstancesReimageCall {
  3784  	c := &ProjectsLocationsInstancesReimageCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3785  	c.name = name
  3786  	c.reimageinstancerequest = reimageinstancerequest
  3787  	return c
  3788  }
  3789  
  3790  // Fields allows partial responses to be retrieved. See
  3791  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3792  // details.
  3793  func (c *ProjectsLocationsInstancesReimageCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesReimageCall {
  3794  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3795  	return c
  3796  }
  3797  
  3798  // Context sets the context to be used in this call's Do method.
  3799  func (c *ProjectsLocationsInstancesReimageCall) Context(ctx context.Context) *ProjectsLocationsInstancesReimageCall {
  3800  	c.ctx_ = ctx
  3801  	return c
  3802  }
  3803  
  3804  // Header returns a http.Header that can be modified by the caller to add
  3805  // headers to the request.
  3806  func (c *ProjectsLocationsInstancesReimageCall) Header() http.Header {
  3807  	if c.header_ == nil {
  3808  		c.header_ = make(http.Header)
  3809  	}
  3810  	return c.header_
  3811  }
  3812  
  3813  func (c *ProjectsLocationsInstancesReimageCall) doRequest(alt string) (*http.Response, error) {
  3814  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3815  	var body io.Reader = nil
  3816  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.reimageinstancerequest)
  3817  	if err != nil {
  3818  		return nil, err
  3819  	}
  3820  	c.urlParams_.Set("alt", alt)
  3821  	c.urlParams_.Set("prettyPrint", "false")
  3822  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:reimage")
  3823  	urls += "?" + c.urlParams_.Encode()
  3824  	req, err := http.NewRequest("POST", urls, body)
  3825  	if err != nil {
  3826  		return nil, err
  3827  	}
  3828  	req.Header = reqHeaders
  3829  	googleapi.Expand(req.URL, map[string]string{
  3830  		"name": c.name,
  3831  	})
  3832  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3833  }
  3834  
  3835  // Do executes the "baremetalsolution.projects.locations.instances.reimage" call.
  3836  // Any non-2xx status code is an error. Response headers are in either
  3837  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3838  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3839  // whether the returned error was because http.StatusNotModified was returned.
  3840  func (c *ProjectsLocationsInstancesReimageCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3841  	gensupport.SetOptions(c.urlParams_, opts...)
  3842  	res, err := c.doRequest("json")
  3843  	if res != nil && res.StatusCode == http.StatusNotModified {
  3844  		if res.Body != nil {
  3845  			res.Body.Close()
  3846  		}
  3847  		return nil, gensupport.WrapError(&googleapi.Error{
  3848  			Code:   res.StatusCode,
  3849  			Header: res.Header,
  3850  		})
  3851  	}
  3852  	if err != nil {
  3853  		return nil, err
  3854  	}
  3855  	defer googleapi.CloseBody(res)
  3856  	if err := googleapi.CheckResponse(res); err != nil {
  3857  		return nil, gensupport.WrapError(err)
  3858  	}
  3859  	ret := &Operation{
  3860  		ServerResponse: googleapi.ServerResponse{
  3861  			Header:         res.Header,
  3862  			HTTPStatusCode: res.StatusCode,
  3863  		},
  3864  	}
  3865  	target := &ret
  3866  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3867  		return nil, err
  3868  	}
  3869  	return ret, nil
  3870  }
  3871  
  3872  type ProjectsLocationsInstancesRenameCall struct {
  3873  	s                     *Service
  3874  	name                  string
  3875  	renameinstancerequest *RenameInstanceRequest
  3876  	urlParams_            gensupport.URLParams
  3877  	ctx_                  context.Context
  3878  	header_               http.Header
  3879  }
  3880  
  3881  // Rename: RenameInstance sets a new name for an instance. Use with caution,
  3882  // previous names become immediately invalidated.
  3883  //
  3884  //   - name: The `name` field is used to identify the instance. Format:
  3885  //     projects/{project}/locations/{location}/instances/{instance}.
  3886  func (r *ProjectsLocationsInstancesService) Rename(name string, renameinstancerequest *RenameInstanceRequest) *ProjectsLocationsInstancesRenameCall {
  3887  	c := &ProjectsLocationsInstancesRenameCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3888  	c.name = name
  3889  	c.renameinstancerequest = renameinstancerequest
  3890  	return c
  3891  }
  3892  
  3893  // Fields allows partial responses to be retrieved. See
  3894  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3895  // details.
  3896  func (c *ProjectsLocationsInstancesRenameCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesRenameCall {
  3897  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3898  	return c
  3899  }
  3900  
  3901  // Context sets the context to be used in this call's Do method.
  3902  func (c *ProjectsLocationsInstancesRenameCall) Context(ctx context.Context) *ProjectsLocationsInstancesRenameCall {
  3903  	c.ctx_ = ctx
  3904  	return c
  3905  }
  3906  
  3907  // Header returns a http.Header that can be modified by the caller to add
  3908  // headers to the request.
  3909  func (c *ProjectsLocationsInstancesRenameCall) Header() http.Header {
  3910  	if c.header_ == nil {
  3911  		c.header_ = make(http.Header)
  3912  	}
  3913  	return c.header_
  3914  }
  3915  
  3916  func (c *ProjectsLocationsInstancesRenameCall) doRequest(alt string) (*http.Response, error) {
  3917  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3918  	var body io.Reader = nil
  3919  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.renameinstancerequest)
  3920  	if err != nil {
  3921  		return nil, err
  3922  	}
  3923  	c.urlParams_.Set("alt", alt)
  3924  	c.urlParams_.Set("prettyPrint", "false")
  3925  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:rename")
  3926  	urls += "?" + c.urlParams_.Encode()
  3927  	req, err := http.NewRequest("POST", urls, body)
  3928  	if err != nil {
  3929  		return nil, err
  3930  	}
  3931  	req.Header = reqHeaders
  3932  	googleapi.Expand(req.URL, map[string]string{
  3933  		"name": c.name,
  3934  	})
  3935  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3936  }
  3937  
  3938  // Do executes the "baremetalsolution.projects.locations.instances.rename" call.
  3939  // Any non-2xx status code is an error. Response headers are in either
  3940  // *Instance.ServerResponse.Header or (if a response was returned at all) in
  3941  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3942  // whether the returned error was because http.StatusNotModified was returned.
  3943  func (c *ProjectsLocationsInstancesRenameCall) Do(opts ...googleapi.CallOption) (*Instance, error) {
  3944  	gensupport.SetOptions(c.urlParams_, opts...)
  3945  	res, err := c.doRequest("json")
  3946  	if res != nil && res.StatusCode == http.StatusNotModified {
  3947  		if res.Body != nil {
  3948  			res.Body.Close()
  3949  		}
  3950  		return nil, gensupport.WrapError(&googleapi.Error{
  3951  			Code:   res.StatusCode,
  3952  			Header: res.Header,
  3953  		})
  3954  	}
  3955  	if err != nil {
  3956  		return nil, err
  3957  	}
  3958  	defer googleapi.CloseBody(res)
  3959  	if err := googleapi.CheckResponse(res); err != nil {
  3960  		return nil, gensupport.WrapError(err)
  3961  	}
  3962  	ret := &Instance{
  3963  		ServerResponse: googleapi.ServerResponse{
  3964  			Header:         res.Header,
  3965  			HTTPStatusCode: res.StatusCode,
  3966  		},
  3967  	}
  3968  	target := &ret
  3969  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3970  		return nil, err
  3971  	}
  3972  	return ret, nil
  3973  }
  3974  
  3975  type ProjectsLocationsInstancesResetCall struct {
  3976  	s                    *Service
  3977  	name                 string
  3978  	resetinstancerequest *ResetInstanceRequest
  3979  	urlParams_           gensupport.URLParams
  3980  	ctx_                 context.Context
  3981  	header_              http.Header
  3982  }
  3983  
  3984  // Reset: Perform an ungraceful, hard reset on a server. Equivalent to shutting
  3985  // the power off and then turning it back on.
  3986  //
  3987  // - name: Name of the resource.
  3988  func (r *ProjectsLocationsInstancesService) Reset(name string, resetinstancerequest *ResetInstanceRequest) *ProjectsLocationsInstancesResetCall {
  3989  	c := &ProjectsLocationsInstancesResetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3990  	c.name = name
  3991  	c.resetinstancerequest = resetinstancerequest
  3992  	return c
  3993  }
  3994  
  3995  // Fields allows partial responses to be retrieved. See
  3996  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3997  // details.
  3998  func (c *ProjectsLocationsInstancesResetCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesResetCall {
  3999  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4000  	return c
  4001  }
  4002  
  4003  // Context sets the context to be used in this call's Do method.
  4004  func (c *ProjectsLocationsInstancesResetCall) Context(ctx context.Context) *ProjectsLocationsInstancesResetCall {
  4005  	c.ctx_ = ctx
  4006  	return c
  4007  }
  4008  
  4009  // Header returns a http.Header that can be modified by the caller to add
  4010  // headers to the request.
  4011  func (c *ProjectsLocationsInstancesResetCall) Header() http.Header {
  4012  	if c.header_ == nil {
  4013  		c.header_ = make(http.Header)
  4014  	}
  4015  	return c.header_
  4016  }
  4017  
  4018  func (c *ProjectsLocationsInstancesResetCall) doRequest(alt string) (*http.Response, error) {
  4019  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4020  	var body io.Reader = nil
  4021  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.resetinstancerequest)
  4022  	if err != nil {
  4023  		return nil, err
  4024  	}
  4025  	c.urlParams_.Set("alt", alt)
  4026  	c.urlParams_.Set("prettyPrint", "false")
  4027  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:reset")
  4028  	urls += "?" + c.urlParams_.Encode()
  4029  	req, err := http.NewRequest("POST", urls, body)
  4030  	if err != nil {
  4031  		return nil, err
  4032  	}
  4033  	req.Header = reqHeaders
  4034  	googleapi.Expand(req.URL, map[string]string{
  4035  		"name": c.name,
  4036  	})
  4037  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4038  }
  4039  
  4040  // Do executes the "baremetalsolution.projects.locations.instances.reset" call.
  4041  // Any non-2xx status code is an error. Response headers are in either
  4042  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4043  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4044  // whether the returned error was because http.StatusNotModified was returned.
  4045  func (c *ProjectsLocationsInstancesResetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4046  	gensupport.SetOptions(c.urlParams_, opts...)
  4047  	res, err := c.doRequest("json")
  4048  	if res != nil && res.StatusCode == http.StatusNotModified {
  4049  		if res.Body != nil {
  4050  			res.Body.Close()
  4051  		}
  4052  		return nil, gensupport.WrapError(&googleapi.Error{
  4053  			Code:   res.StatusCode,
  4054  			Header: res.Header,
  4055  		})
  4056  	}
  4057  	if err != nil {
  4058  		return nil, err
  4059  	}
  4060  	defer googleapi.CloseBody(res)
  4061  	if err := googleapi.CheckResponse(res); err != nil {
  4062  		return nil, gensupport.WrapError(err)
  4063  	}
  4064  	ret := &Operation{
  4065  		ServerResponse: googleapi.ServerResponse{
  4066  			Header:         res.Header,
  4067  			HTTPStatusCode: res.StatusCode,
  4068  		},
  4069  	}
  4070  	target := &ret
  4071  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4072  		return nil, err
  4073  	}
  4074  	return ret, nil
  4075  }
  4076  
  4077  type ProjectsLocationsInstancesStartCall struct {
  4078  	s                    *Service
  4079  	name                 string
  4080  	startinstancerequest *StartInstanceRequest
  4081  	urlParams_           gensupport.URLParams
  4082  	ctx_                 context.Context
  4083  	header_              http.Header
  4084  }
  4085  
  4086  // Start: Starts a server that was shutdown.
  4087  //
  4088  // - name: Name of the resource.
  4089  func (r *ProjectsLocationsInstancesService) Start(name string, startinstancerequest *StartInstanceRequest) *ProjectsLocationsInstancesStartCall {
  4090  	c := &ProjectsLocationsInstancesStartCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4091  	c.name = name
  4092  	c.startinstancerequest = startinstancerequest
  4093  	return c
  4094  }
  4095  
  4096  // Fields allows partial responses to be retrieved. See
  4097  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4098  // details.
  4099  func (c *ProjectsLocationsInstancesStartCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesStartCall {
  4100  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4101  	return c
  4102  }
  4103  
  4104  // Context sets the context to be used in this call's Do method.
  4105  func (c *ProjectsLocationsInstancesStartCall) Context(ctx context.Context) *ProjectsLocationsInstancesStartCall {
  4106  	c.ctx_ = ctx
  4107  	return c
  4108  }
  4109  
  4110  // Header returns a http.Header that can be modified by the caller to add
  4111  // headers to the request.
  4112  func (c *ProjectsLocationsInstancesStartCall) Header() http.Header {
  4113  	if c.header_ == nil {
  4114  		c.header_ = make(http.Header)
  4115  	}
  4116  	return c.header_
  4117  }
  4118  
  4119  func (c *ProjectsLocationsInstancesStartCall) doRequest(alt string) (*http.Response, error) {
  4120  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4121  	var body io.Reader = nil
  4122  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.startinstancerequest)
  4123  	if err != nil {
  4124  		return nil, err
  4125  	}
  4126  	c.urlParams_.Set("alt", alt)
  4127  	c.urlParams_.Set("prettyPrint", "false")
  4128  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:start")
  4129  	urls += "?" + c.urlParams_.Encode()
  4130  	req, err := http.NewRequest("POST", urls, body)
  4131  	if err != nil {
  4132  		return nil, err
  4133  	}
  4134  	req.Header = reqHeaders
  4135  	googleapi.Expand(req.URL, map[string]string{
  4136  		"name": c.name,
  4137  	})
  4138  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4139  }
  4140  
  4141  // Do executes the "baremetalsolution.projects.locations.instances.start" call.
  4142  // Any non-2xx status code is an error. Response headers are in either
  4143  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4144  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4145  // whether the returned error was because http.StatusNotModified was returned.
  4146  func (c *ProjectsLocationsInstancesStartCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4147  	gensupport.SetOptions(c.urlParams_, opts...)
  4148  	res, err := c.doRequest("json")
  4149  	if res != nil && res.StatusCode == http.StatusNotModified {
  4150  		if res.Body != nil {
  4151  			res.Body.Close()
  4152  		}
  4153  		return nil, gensupport.WrapError(&googleapi.Error{
  4154  			Code:   res.StatusCode,
  4155  			Header: res.Header,
  4156  		})
  4157  	}
  4158  	if err != nil {
  4159  		return nil, err
  4160  	}
  4161  	defer googleapi.CloseBody(res)
  4162  	if err := googleapi.CheckResponse(res); err != nil {
  4163  		return nil, gensupport.WrapError(err)
  4164  	}
  4165  	ret := &Operation{
  4166  		ServerResponse: googleapi.ServerResponse{
  4167  			Header:         res.Header,
  4168  			HTTPStatusCode: res.StatusCode,
  4169  		},
  4170  	}
  4171  	target := &ret
  4172  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4173  		return nil, err
  4174  	}
  4175  	return ret, nil
  4176  }
  4177  
  4178  type ProjectsLocationsInstancesStopCall struct {
  4179  	s                   *Service
  4180  	name                string
  4181  	stopinstancerequest *StopInstanceRequest
  4182  	urlParams_          gensupport.URLParams
  4183  	ctx_                context.Context
  4184  	header_             http.Header
  4185  }
  4186  
  4187  // Stop: Stop a running server.
  4188  //
  4189  // - name: Name of the resource.
  4190  func (r *ProjectsLocationsInstancesService) Stop(name string, stopinstancerequest *StopInstanceRequest) *ProjectsLocationsInstancesStopCall {
  4191  	c := &ProjectsLocationsInstancesStopCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4192  	c.name = name
  4193  	c.stopinstancerequest = stopinstancerequest
  4194  	return c
  4195  }
  4196  
  4197  // Fields allows partial responses to be retrieved. See
  4198  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4199  // details.
  4200  func (c *ProjectsLocationsInstancesStopCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesStopCall {
  4201  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4202  	return c
  4203  }
  4204  
  4205  // Context sets the context to be used in this call's Do method.
  4206  func (c *ProjectsLocationsInstancesStopCall) Context(ctx context.Context) *ProjectsLocationsInstancesStopCall {
  4207  	c.ctx_ = ctx
  4208  	return c
  4209  }
  4210  
  4211  // Header returns a http.Header that can be modified by the caller to add
  4212  // headers to the request.
  4213  func (c *ProjectsLocationsInstancesStopCall) Header() http.Header {
  4214  	if c.header_ == nil {
  4215  		c.header_ = make(http.Header)
  4216  	}
  4217  	return c.header_
  4218  }
  4219  
  4220  func (c *ProjectsLocationsInstancesStopCall) doRequest(alt string) (*http.Response, error) {
  4221  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4222  	var body io.Reader = nil
  4223  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.stopinstancerequest)
  4224  	if err != nil {
  4225  		return nil, err
  4226  	}
  4227  	c.urlParams_.Set("alt", alt)
  4228  	c.urlParams_.Set("prettyPrint", "false")
  4229  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:stop")
  4230  	urls += "?" + c.urlParams_.Encode()
  4231  	req, err := http.NewRequest("POST", urls, body)
  4232  	if err != nil {
  4233  		return nil, err
  4234  	}
  4235  	req.Header = reqHeaders
  4236  	googleapi.Expand(req.URL, map[string]string{
  4237  		"name": c.name,
  4238  	})
  4239  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4240  }
  4241  
  4242  // Do executes the "baremetalsolution.projects.locations.instances.stop" call.
  4243  // Any non-2xx status code is an error. Response headers are in either
  4244  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4245  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4246  // whether the returned error was because http.StatusNotModified was returned.
  4247  func (c *ProjectsLocationsInstancesStopCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4248  	gensupport.SetOptions(c.urlParams_, opts...)
  4249  	res, err := c.doRequest("json")
  4250  	if res != nil && res.StatusCode == http.StatusNotModified {
  4251  		if res.Body != nil {
  4252  			res.Body.Close()
  4253  		}
  4254  		return nil, gensupport.WrapError(&googleapi.Error{
  4255  			Code:   res.StatusCode,
  4256  			Header: res.Header,
  4257  		})
  4258  	}
  4259  	if err != nil {
  4260  		return nil, err
  4261  	}
  4262  	defer googleapi.CloseBody(res)
  4263  	if err := googleapi.CheckResponse(res); err != nil {
  4264  		return nil, gensupport.WrapError(err)
  4265  	}
  4266  	ret := &Operation{
  4267  		ServerResponse: googleapi.ServerResponse{
  4268  			Header:         res.Header,
  4269  			HTTPStatusCode: res.StatusCode,
  4270  		},
  4271  	}
  4272  	target := &ret
  4273  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4274  		return nil, err
  4275  	}
  4276  	return ret, nil
  4277  }
  4278  
  4279  type ProjectsLocationsNetworksGetCall struct {
  4280  	s            *Service
  4281  	name         string
  4282  	urlParams_   gensupport.URLParams
  4283  	ifNoneMatch_ string
  4284  	ctx_         context.Context
  4285  	header_      http.Header
  4286  }
  4287  
  4288  // Get: Get details of a single network.
  4289  //
  4290  // - name: Name of the resource.
  4291  func (r *ProjectsLocationsNetworksService) Get(name string) *ProjectsLocationsNetworksGetCall {
  4292  	c := &ProjectsLocationsNetworksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4293  	c.name = name
  4294  	return c
  4295  }
  4296  
  4297  // Fields allows partial responses to be retrieved. See
  4298  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4299  // details.
  4300  func (c *ProjectsLocationsNetworksGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetworksGetCall {
  4301  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4302  	return c
  4303  }
  4304  
  4305  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4306  // object's ETag matches the given value. This is useful for getting updates
  4307  // only after the object has changed since the last request.
  4308  func (c *ProjectsLocationsNetworksGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNetworksGetCall {
  4309  	c.ifNoneMatch_ = entityTag
  4310  	return c
  4311  }
  4312  
  4313  // Context sets the context to be used in this call's Do method.
  4314  func (c *ProjectsLocationsNetworksGetCall) Context(ctx context.Context) *ProjectsLocationsNetworksGetCall {
  4315  	c.ctx_ = ctx
  4316  	return c
  4317  }
  4318  
  4319  // Header returns a http.Header that can be modified by the caller to add
  4320  // headers to the request.
  4321  func (c *ProjectsLocationsNetworksGetCall) Header() http.Header {
  4322  	if c.header_ == nil {
  4323  		c.header_ = make(http.Header)
  4324  	}
  4325  	return c.header_
  4326  }
  4327  
  4328  func (c *ProjectsLocationsNetworksGetCall) doRequest(alt string) (*http.Response, error) {
  4329  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4330  	if c.ifNoneMatch_ != "" {
  4331  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4332  	}
  4333  	var body io.Reader = nil
  4334  	c.urlParams_.Set("alt", alt)
  4335  	c.urlParams_.Set("prettyPrint", "false")
  4336  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  4337  	urls += "?" + c.urlParams_.Encode()
  4338  	req, err := http.NewRequest("GET", urls, body)
  4339  	if err != nil {
  4340  		return nil, err
  4341  	}
  4342  	req.Header = reqHeaders
  4343  	googleapi.Expand(req.URL, map[string]string{
  4344  		"name": c.name,
  4345  	})
  4346  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4347  }
  4348  
  4349  // Do executes the "baremetalsolution.projects.locations.networks.get" call.
  4350  // Any non-2xx status code is an error. Response headers are in either
  4351  // *Network.ServerResponse.Header or (if a response was returned at all) in
  4352  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4353  // whether the returned error was because http.StatusNotModified was returned.
  4354  func (c *ProjectsLocationsNetworksGetCall) Do(opts ...googleapi.CallOption) (*Network, error) {
  4355  	gensupport.SetOptions(c.urlParams_, opts...)
  4356  	res, err := c.doRequest("json")
  4357  	if res != nil && res.StatusCode == http.StatusNotModified {
  4358  		if res.Body != nil {
  4359  			res.Body.Close()
  4360  		}
  4361  		return nil, gensupport.WrapError(&googleapi.Error{
  4362  			Code:   res.StatusCode,
  4363  			Header: res.Header,
  4364  		})
  4365  	}
  4366  	if err != nil {
  4367  		return nil, err
  4368  	}
  4369  	defer googleapi.CloseBody(res)
  4370  	if err := googleapi.CheckResponse(res); err != nil {
  4371  		return nil, gensupport.WrapError(err)
  4372  	}
  4373  	ret := &Network{
  4374  		ServerResponse: googleapi.ServerResponse{
  4375  			Header:         res.Header,
  4376  			HTTPStatusCode: res.StatusCode,
  4377  		},
  4378  	}
  4379  	target := &ret
  4380  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4381  		return nil, err
  4382  	}
  4383  	return ret, nil
  4384  }
  4385  
  4386  type ProjectsLocationsNetworksListCall struct {
  4387  	s            *Service
  4388  	parent       string
  4389  	urlParams_   gensupport.URLParams
  4390  	ifNoneMatch_ string
  4391  	ctx_         context.Context
  4392  	header_      http.Header
  4393  }
  4394  
  4395  // List: List network in a given project and location.
  4396  //
  4397  // - parent: Parent value for ListNetworksRequest.
  4398  func (r *ProjectsLocationsNetworksService) List(parent string) *ProjectsLocationsNetworksListCall {
  4399  	c := &ProjectsLocationsNetworksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4400  	c.parent = parent
  4401  	return c
  4402  }
  4403  
  4404  // Filter sets the optional parameter "filter": List filter.
  4405  func (c *ProjectsLocationsNetworksListCall) Filter(filter string) *ProjectsLocationsNetworksListCall {
  4406  	c.urlParams_.Set("filter", filter)
  4407  	return c
  4408  }
  4409  
  4410  // PageSize sets the optional parameter "pageSize": Requested page size. The
  4411  // server might return fewer items than requested. If unspecified, server will
  4412  // pick an appropriate default.
  4413  func (c *ProjectsLocationsNetworksListCall) PageSize(pageSize int64) *ProjectsLocationsNetworksListCall {
  4414  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4415  	return c
  4416  }
  4417  
  4418  // PageToken sets the optional parameter "pageToken": A token identifying a
  4419  // page of results from the server.
  4420  func (c *ProjectsLocationsNetworksListCall) PageToken(pageToken string) *ProjectsLocationsNetworksListCall {
  4421  	c.urlParams_.Set("pageToken", pageToken)
  4422  	return c
  4423  }
  4424  
  4425  // Fields allows partial responses to be retrieved. See
  4426  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4427  // details.
  4428  func (c *ProjectsLocationsNetworksListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetworksListCall {
  4429  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4430  	return c
  4431  }
  4432  
  4433  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4434  // object's ETag matches the given value. This is useful for getting updates
  4435  // only after the object has changed since the last request.
  4436  func (c *ProjectsLocationsNetworksListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNetworksListCall {
  4437  	c.ifNoneMatch_ = entityTag
  4438  	return c
  4439  }
  4440  
  4441  // Context sets the context to be used in this call's Do method.
  4442  func (c *ProjectsLocationsNetworksListCall) Context(ctx context.Context) *ProjectsLocationsNetworksListCall {
  4443  	c.ctx_ = ctx
  4444  	return c
  4445  }
  4446  
  4447  // Header returns a http.Header that can be modified by the caller to add
  4448  // headers to the request.
  4449  func (c *ProjectsLocationsNetworksListCall) Header() http.Header {
  4450  	if c.header_ == nil {
  4451  		c.header_ = make(http.Header)
  4452  	}
  4453  	return c.header_
  4454  }
  4455  
  4456  func (c *ProjectsLocationsNetworksListCall) doRequest(alt string) (*http.Response, error) {
  4457  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4458  	if c.ifNoneMatch_ != "" {
  4459  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4460  	}
  4461  	var body io.Reader = nil
  4462  	c.urlParams_.Set("alt", alt)
  4463  	c.urlParams_.Set("prettyPrint", "false")
  4464  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/networks")
  4465  	urls += "?" + c.urlParams_.Encode()
  4466  	req, err := http.NewRequest("GET", urls, body)
  4467  	if err != nil {
  4468  		return nil, err
  4469  	}
  4470  	req.Header = reqHeaders
  4471  	googleapi.Expand(req.URL, map[string]string{
  4472  		"parent": c.parent,
  4473  	})
  4474  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4475  }
  4476  
  4477  // Do executes the "baremetalsolution.projects.locations.networks.list" call.
  4478  // Any non-2xx status code is an error. Response headers are in either
  4479  // *ListNetworksResponse.ServerResponse.Header or (if a response was returned
  4480  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4481  // check whether the returned error was because http.StatusNotModified was
  4482  // returned.
  4483  func (c *ProjectsLocationsNetworksListCall) Do(opts ...googleapi.CallOption) (*ListNetworksResponse, error) {
  4484  	gensupport.SetOptions(c.urlParams_, opts...)
  4485  	res, err := c.doRequest("json")
  4486  	if res != nil && res.StatusCode == http.StatusNotModified {
  4487  		if res.Body != nil {
  4488  			res.Body.Close()
  4489  		}
  4490  		return nil, gensupport.WrapError(&googleapi.Error{
  4491  			Code:   res.StatusCode,
  4492  			Header: res.Header,
  4493  		})
  4494  	}
  4495  	if err != nil {
  4496  		return nil, err
  4497  	}
  4498  	defer googleapi.CloseBody(res)
  4499  	if err := googleapi.CheckResponse(res); err != nil {
  4500  		return nil, gensupport.WrapError(err)
  4501  	}
  4502  	ret := &ListNetworksResponse{
  4503  		ServerResponse: googleapi.ServerResponse{
  4504  			Header:         res.Header,
  4505  			HTTPStatusCode: res.StatusCode,
  4506  		},
  4507  	}
  4508  	target := &ret
  4509  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4510  		return nil, err
  4511  	}
  4512  	return ret, nil
  4513  }
  4514  
  4515  // Pages invokes f for each page of results.
  4516  // A non-nil error returned from f will halt the iteration.
  4517  // The provided context supersedes any context provided to the Context method.
  4518  func (c *ProjectsLocationsNetworksListCall) Pages(ctx context.Context, f func(*ListNetworksResponse) error) error {
  4519  	c.ctx_ = ctx
  4520  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4521  	for {
  4522  		x, err := c.Do()
  4523  		if err != nil {
  4524  			return err
  4525  		}
  4526  		if err := f(x); err != nil {
  4527  			return err
  4528  		}
  4529  		if x.NextPageToken == "" {
  4530  			return nil
  4531  		}
  4532  		c.PageToken(x.NextPageToken)
  4533  	}
  4534  }
  4535  
  4536  type ProjectsLocationsNetworksListNetworkUsageCall struct {
  4537  	s            *Service
  4538  	location     string
  4539  	urlParams_   gensupport.URLParams
  4540  	ifNoneMatch_ string
  4541  	ctx_         context.Context
  4542  	header_      http.Header
  4543  }
  4544  
  4545  // ListNetworkUsage: List all Networks (and used IPs for each Network) in the
  4546  // vendor account associated with the specified project.
  4547  //
  4548  // - location: Parent value (project and location).
  4549  func (r *ProjectsLocationsNetworksService) ListNetworkUsage(location string) *ProjectsLocationsNetworksListNetworkUsageCall {
  4550  	c := &ProjectsLocationsNetworksListNetworkUsageCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4551  	c.location = location
  4552  	return c
  4553  }
  4554  
  4555  // Fields allows partial responses to be retrieved. See
  4556  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4557  // details.
  4558  func (c *ProjectsLocationsNetworksListNetworkUsageCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetworksListNetworkUsageCall {
  4559  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4560  	return c
  4561  }
  4562  
  4563  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4564  // object's ETag matches the given value. This is useful for getting updates
  4565  // only after the object has changed since the last request.
  4566  func (c *ProjectsLocationsNetworksListNetworkUsageCall) IfNoneMatch(entityTag string) *ProjectsLocationsNetworksListNetworkUsageCall {
  4567  	c.ifNoneMatch_ = entityTag
  4568  	return c
  4569  }
  4570  
  4571  // Context sets the context to be used in this call's Do method.
  4572  func (c *ProjectsLocationsNetworksListNetworkUsageCall) Context(ctx context.Context) *ProjectsLocationsNetworksListNetworkUsageCall {
  4573  	c.ctx_ = ctx
  4574  	return c
  4575  }
  4576  
  4577  // Header returns a http.Header that can be modified by the caller to add
  4578  // headers to the request.
  4579  func (c *ProjectsLocationsNetworksListNetworkUsageCall) Header() http.Header {
  4580  	if c.header_ == nil {
  4581  		c.header_ = make(http.Header)
  4582  	}
  4583  	return c.header_
  4584  }
  4585  
  4586  func (c *ProjectsLocationsNetworksListNetworkUsageCall) doRequest(alt string) (*http.Response, error) {
  4587  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4588  	if c.ifNoneMatch_ != "" {
  4589  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4590  	}
  4591  	var body io.Reader = nil
  4592  	c.urlParams_.Set("alt", alt)
  4593  	c.urlParams_.Set("prettyPrint", "false")
  4594  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+location}/networks:listNetworkUsage")
  4595  	urls += "?" + c.urlParams_.Encode()
  4596  	req, err := http.NewRequest("GET", urls, body)
  4597  	if err != nil {
  4598  		return nil, err
  4599  	}
  4600  	req.Header = reqHeaders
  4601  	googleapi.Expand(req.URL, map[string]string{
  4602  		"location": c.location,
  4603  	})
  4604  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4605  }
  4606  
  4607  // Do executes the "baremetalsolution.projects.locations.networks.listNetworkUsage" call.
  4608  // Any non-2xx status code is an error. Response headers are in either
  4609  // *ListNetworkUsageResponse.ServerResponse.Header or (if a response was
  4610  // returned at all) in error.(*googleapi.Error).Header. Use
  4611  // googleapi.IsNotModified to check whether the returned error was because
  4612  // http.StatusNotModified was returned.
  4613  func (c *ProjectsLocationsNetworksListNetworkUsageCall) Do(opts ...googleapi.CallOption) (*ListNetworkUsageResponse, error) {
  4614  	gensupport.SetOptions(c.urlParams_, opts...)
  4615  	res, err := c.doRequest("json")
  4616  	if res != nil && res.StatusCode == http.StatusNotModified {
  4617  		if res.Body != nil {
  4618  			res.Body.Close()
  4619  		}
  4620  		return nil, gensupport.WrapError(&googleapi.Error{
  4621  			Code:   res.StatusCode,
  4622  			Header: res.Header,
  4623  		})
  4624  	}
  4625  	if err != nil {
  4626  		return nil, err
  4627  	}
  4628  	defer googleapi.CloseBody(res)
  4629  	if err := googleapi.CheckResponse(res); err != nil {
  4630  		return nil, gensupport.WrapError(err)
  4631  	}
  4632  	ret := &ListNetworkUsageResponse{
  4633  		ServerResponse: googleapi.ServerResponse{
  4634  			Header:         res.Header,
  4635  			HTTPStatusCode: res.StatusCode,
  4636  		},
  4637  	}
  4638  	target := &ret
  4639  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4640  		return nil, err
  4641  	}
  4642  	return ret, nil
  4643  }
  4644  
  4645  type ProjectsLocationsNetworksPatchCall struct {
  4646  	s          *Service
  4647  	name       string
  4648  	network    *Network
  4649  	urlParams_ gensupport.URLParams
  4650  	ctx_       context.Context
  4651  	header_    http.Header
  4652  }
  4653  
  4654  // Patch: Update details of a single network.
  4655  //
  4656  //   - name: Output only. The resource name of this `Network`. Resource names are
  4657  //     schemeless URIs that follow the conventions in
  4658  //     https://cloud.google.com/apis/design/resource_names. Format:
  4659  //     `projects/{project}/locations/{location}/networks/{network}`.
  4660  func (r *ProjectsLocationsNetworksService) Patch(name string, network *Network) *ProjectsLocationsNetworksPatchCall {
  4661  	c := &ProjectsLocationsNetworksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4662  	c.name = name
  4663  	c.network = network
  4664  	return c
  4665  }
  4666  
  4667  // UpdateMask sets the optional parameter "updateMask": The list of fields to
  4668  // update. The only currently supported fields are: `labels`, `reservations`,
  4669  // `vrf.vlan_attachments`
  4670  func (c *ProjectsLocationsNetworksPatchCall) UpdateMask(updateMask string) *ProjectsLocationsNetworksPatchCall {
  4671  	c.urlParams_.Set("updateMask", updateMask)
  4672  	return c
  4673  }
  4674  
  4675  // Fields allows partial responses to be retrieved. See
  4676  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4677  // details.
  4678  func (c *ProjectsLocationsNetworksPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetworksPatchCall {
  4679  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4680  	return c
  4681  }
  4682  
  4683  // Context sets the context to be used in this call's Do method.
  4684  func (c *ProjectsLocationsNetworksPatchCall) Context(ctx context.Context) *ProjectsLocationsNetworksPatchCall {
  4685  	c.ctx_ = ctx
  4686  	return c
  4687  }
  4688  
  4689  // Header returns a http.Header that can be modified by the caller to add
  4690  // headers to the request.
  4691  func (c *ProjectsLocationsNetworksPatchCall) Header() http.Header {
  4692  	if c.header_ == nil {
  4693  		c.header_ = make(http.Header)
  4694  	}
  4695  	return c.header_
  4696  }
  4697  
  4698  func (c *ProjectsLocationsNetworksPatchCall) doRequest(alt string) (*http.Response, error) {
  4699  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4700  	var body io.Reader = nil
  4701  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.network)
  4702  	if err != nil {
  4703  		return nil, err
  4704  	}
  4705  	c.urlParams_.Set("alt", alt)
  4706  	c.urlParams_.Set("prettyPrint", "false")
  4707  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  4708  	urls += "?" + c.urlParams_.Encode()
  4709  	req, err := http.NewRequest("PATCH", urls, body)
  4710  	if err != nil {
  4711  		return nil, err
  4712  	}
  4713  	req.Header = reqHeaders
  4714  	googleapi.Expand(req.URL, map[string]string{
  4715  		"name": c.name,
  4716  	})
  4717  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4718  }
  4719  
  4720  // Do executes the "baremetalsolution.projects.locations.networks.patch" call.
  4721  // Any non-2xx status code is an error. Response headers are in either
  4722  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4723  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4724  // whether the returned error was because http.StatusNotModified was returned.
  4725  func (c *ProjectsLocationsNetworksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4726  	gensupport.SetOptions(c.urlParams_, opts...)
  4727  	res, err := c.doRequest("json")
  4728  	if res != nil && res.StatusCode == http.StatusNotModified {
  4729  		if res.Body != nil {
  4730  			res.Body.Close()
  4731  		}
  4732  		return nil, gensupport.WrapError(&googleapi.Error{
  4733  			Code:   res.StatusCode,
  4734  			Header: res.Header,
  4735  		})
  4736  	}
  4737  	if err != nil {
  4738  		return nil, err
  4739  	}
  4740  	defer googleapi.CloseBody(res)
  4741  	if err := googleapi.CheckResponse(res); err != nil {
  4742  		return nil, gensupport.WrapError(err)
  4743  	}
  4744  	ret := &Operation{
  4745  		ServerResponse: googleapi.ServerResponse{
  4746  			Header:         res.Header,
  4747  			HTTPStatusCode: res.StatusCode,
  4748  		},
  4749  	}
  4750  	target := &ret
  4751  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4752  		return nil, err
  4753  	}
  4754  	return ret, nil
  4755  }
  4756  
  4757  type ProjectsLocationsNetworksRenameCall struct {
  4758  	s                    *Service
  4759  	name                 string
  4760  	renamenetworkrequest *RenameNetworkRequest
  4761  	urlParams_           gensupport.URLParams
  4762  	ctx_                 context.Context
  4763  	header_              http.Header
  4764  }
  4765  
  4766  // Rename: RenameNetwork sets a new name for a network. Use with caution,
  4767  // previous names become immediately invalidated.
  4768  //
  4769  //   - name: The `name` field is used to identify the network. Format:
  4770  //     projects/{project}/locations/{location}/networks/{network}.
  4771  func (r *ProjectsLocationsNetworksService) Rename(name string, renamenetworkrequest *RenameNetworkRequest) *ProjectsLocationsNetworksRenameCall {
  4772  	c := &ProjectsLocationsNetworksRenameCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4773  	c.name = name
  4774  	c.renamenetworkrequest = renamenetworkrequest
  4775  	return c
  4776  }
  4777  
  4778  // Fields allows partial responses to be retrieved. See
  4779  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4780  // details.
  4781  func (c *ProjectsLocationsNetworksRenameCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetworksRenameCall {
  4782  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4783  	return c
  4784  }
  4785  
  4786  // Context sets the context to be used in this call's Do method.
  4787  func (c *ProjectsLocationsNetworksRenameCall) Context(ctx context.Context) *ProjectsLocationsNetworksRenameCall {
  4788  	c.ctx_ = ctx
  4789  	return c
  4790  }
  4791  
  4792  // Header returns a http.Header that can be modified by the caller to add
  4793  // headers to the request.
  4794  func (c *ProjectsLocationsNetworksRenameCall) Header() http.Header {
  4795  	if c.header_ == nil {
  4796  		c.header_ = make(http.Header)
  4797  	}
  4798  	return c.header_
  4799  }
  4800  
  4801  func (c *ProjectsLocationsNetworksRenameCall) doRequest(alt string) (*http.Response, error) {
  4802  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4803  	var body io.Reader = nil
  4804  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.renamenetworkrequest)
  4805  	if err != nil {
  4806  		return nil, err
  4807  	}
  4808  	c.urlParams_.Set("alt", alt)
  4809  	c.urlParams_.Set("prettyPrint", "false")
  4810  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:rename")
  4811  	urls += "?" + c.urlParams_.Encode()
  4812  	req, err := http.NewRequest("POST", urls, body)
  4813  	if err != nil {
  4814  		return nil, err
  4815  	}
  4816  	req.Header = reqHeaders
  4817  	googleapi.Expand(req.URL, map[string]string{
  4818  		"name": c.name,
  4819  	})
  4820  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4821  }
  4822  
  4823  // Do executes the "baremetalsolution.projects.locations.networks.rename" call.
  4824  // Any non-2xx status code is an error. Response headers are in either
  4825  // *Network.ServerResponse.Header or (if a response was returned at all) in
  4826  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4827  // whether the returned error was because http.StatusNotModified was returned.
  4828  func (c *ProjectsLocationsNetworksRenameCall) Do(opts ...googleapi.CallOption) (*Network, error) {
  4829  	gensupport.SetOptions(c.urlParams_, opts...)
  4830  	res, err := c.doRequest("json")
  4831  	if res != nil && res.StatusCode == http.StatusNotModified {
  4832  		if res.Body != nil {
  4833  			res.Body.Close()
  4834  		}
  4835  		return nil, gensupport.WrapError(&googleapi.Error{
  4836  			Code:   res.StatusCode,
  4837  			Header: res.Header,
  4838  		})
  4839  	}
  4840  	if err != nil {
  4841  		return nil, err
  4842  	}
  4843  	defer googleapi.CloseBody(res)
  4844  	if err := googleapi.CheckResponse(res); err != nil {
  4845  		return nil, gensupport.WrapError(err)
  4846  	}
  4847  	ret := &Network{
  4848  		ServerResponse: googleapi.ServerResponse{
  4849  			Header:         res.Header,
  4850  			HTTPStatusCode: res.StatusCode,
  4851  		},
  4852  	}
  4853  	target := &ret
  4854  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4855  		return nil, err
  4856  	}
  4857  	return ret, nil
  4858  }
  4859  
  4860  type ProjectsLocationsNfsSharesCreateCall struct {
  4861  	s          *Service
  4862  	parent     string
  4863  	nfsshare   *NfsShare
  4864  	urlParams_ gensupport.URLParams
  4865  	ctx_       context.Context
  4866  	header_    http.Header
  4867  }
  4868  
  4869  // Create: Create an NFS share.
  4870  //
  4871  // - parent: The parent project and location.
  4872  func (r *ProjectsLocationsNfsSharesService) Create(parent string, nfsshare *NfsShare) *ProjectsLocationsNfsSharesCreateCall {
  4873  	c := &ProjectsLocationsNfsSharesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4874  	c.parent = parent
  4875  	c.nfsshare = nfsshare
  4876  	return c
  4877  }
  4878  
  4879  // Fields allows partial responses to be retrieved. See
  4880  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4881  // details.
  4882  func (c *ProjectsLocationsNfsSharesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsNfsSharesCreateCall {
  4883  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4884  	return c
  4885  }
  4886  
  4887  // Context sets the context to be used in this call's Do method.
  4888  func (c *ProjectsLocationsNfsSharesCreateCall) Context(ctx context.Context) *ProjectsLocationsNfsSharesCreateCall {
  4889  	c.ctx_ = ctx
  4890  	return c
  4891  }
  4892  
  4893  // Header returns a http.Header that can be modified by the caller to add
  4894  // headers to the request.
  4895  func (c *ProjectsLocationsNfsSharesCreateCall) Header() http.Header {
  4896  	if c.header_ == nil {
  4897  		c.header_ = make(http.Header)
  4898  	}
  4899  	return c.header_
  4900  }
  4901  
  4902  func (c *ProjectsLocationsNfsSharesCreateCall) doRequest(alt string) (*http.Response, error) {
  4903  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4904  	var body io.Reader = nil
  4905  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.nfsshare)
  4906  	if err != nil {
  4907  		return nil, err
  4908  	}
  4909  	c.urlParams_.Set("alt", alt)
  4910  	c.urlParams_.Set("prettyPrint", "false")
  4911  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/nfsShares")
  4912  	urls += "?" + c.urlParams_.Encode()
  4913  	req, err := http.NewRequest("POST", urls, body)
  4914  	if err != nil {
  4915  		return nil, err
  4916  	}
  4917  	req.Header = reqHeaders
  4918  	googleapi.Expand(req.URL, map[string]string{
  4919  		"parent": c.parent,
  4920  	})
  4921  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4922  }
  4923  
  4924  // Do executes the "baremetalsolution.projects.locations.nfsShares.create" call.
  4925  // Any non-2xx status code is an error. Response headers are in either
  4926  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4927  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4928  // whether the returned error was because http.StatusNotModified was returned.
  4929  func (c *ProjectsLocationsNfsSharesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4930  	gensupport.SetOptions(c.urlParams_, opts...)
  4931  	res, err := c.doRequest("json")
  4932  	if res != nil && res.StatusCode == http.StatusNotModified {
  4933  		if res.Body != nil {
  4934  			res.Body.Close()
  4935  		}
  4936  		return nil, gensupport.WrapError(&googleapi.Error{
  4937  			Code:   res.StatusCode,
  4938  			Header: res.Header,
  4939  		})
  4940  	}
  4941  	if err != nil {
  4942  		return nil, err
  4943  	}
  4944  	defer googleapi.CloseBody(res)
  4945  	if err := googleapi.CheckResponse(res); err != nil {
  4946  		return nil, gensupport.WrapError(err)
  4947  	}
  4948  	ret := &Operation{
  4949  		ServerResponse: googleapi.ServerResponse{
  4950  			Header:         res.Header,
  4951  			HTTPStatusCode: res.StatusCode,
  4952  		},
  4953  	}
  4954  	target := &ret
  4955  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4956  		return nil, err
  4957  	}
  4958  	return ret, nil
  4959  }
  4960  
  4961  type ProjectsLocationsNfsSharesDeleteCall struct {
  4962  	s          *Service
  4963  	name       string
  4964  	urlParams_ gensupport.URLParams
  4965  	ctx_       context.Context
  4966  	header_    http.Header
  4967  }
  4968  
  4969  // Delete: Delete an NFS share. The underlying volume is automatically deleted.
  4970  //
  4971  // - name: The name of the NFS share to delete.
  4972  func (r *ProjectsLocationsNfsSharesService) Delete(name string) *ProjectsLocationsNfsSharesDeleteCall {
  4973  	c := &ProjectsLocationsNfsSharesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4974  	c.name = name
  4975  	return c
  4976  }
  4977  
  4978  // Fields allows partial responses to be retrieved. See
  4979  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4980  // details.
  4981  func (c *ProjectsLocationsNfsSharesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsNfsSharesDeleteCall {
  4982  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4983  	return c
  4984  }
  4985  
  4986  // Context sets the context to be used in this call's Do method.
  4987  func (c *ProjectsLocationsNfsSharesDeleteCall) Context(ctx context.Context) *ProjectsLocationsNfsSharesDeleteCall {
  4988  	c.ctx_ = ctx
  4989  	return c
  4990  }
  4991  
  4992  // Header returns a http.Header that can be modified by the caller to add
  4993  // headers to the request.
  4994  func (c *ProjectsLocationsNfsSharesDeleteCall) Header() http.Header {
  4995  	if c.header_ == nil {
  4996  		c.header_ = make(http.Header)
  4997  	}
  4998  	return c.header_
  4999  }
  5000  
  5001  func (c *ProjectsLocationsNfsSharesDeleteCall) doRequest(alt string) (*http.Response, error) {
  5002  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5003  	var body io.Reader = nil
  5004  	c.urlParams_.Set("alt", alt)
  5005  	c.urlParams_.Set("prettyPrint", "false")
  5006  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  5007  	urls += "?" + c.urlParams_.Encode()
  5008  	req, err := http.NewRequest("DELETE", urls, body)
  5009  	if err != nil {
  5010  		return nil, err
  5011  	}
  5012  	req.Header = reqHeaders
  5013  	googleapi.Expand(req.URL, map[string]string{
  5014  		"name": c.name,
  5015  	})
  5016  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5017  }
  5018  
  5019  // Do executes the "baremetalsolution.projects.locations.nfsShares.delete" call.
  5020  // Any non-2xx status code is an error. Response headers are in either
  5021  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  5022  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5023  // whether the returned error was because http.StatusNotModified was returned.
  5024  func (c *ProjectsLocationsNfsSharesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5025  	gensupport.SetOptions(c.urlParams_, opts...)
  5026  	res, err := c.doRequest("json")
  5027  	if res != nil && res.StatusCode == http.StatusNotModified {
  5028  		if res.Body != nil {
  5029  			res.Body.Close()
  5030  		}
  5031  		return nil, gensupport.WrapError(&googleapi.Error{
  5032  			Code:   res.StatusCode,
  5033  			Header: res.Header,
  5034  		})
  5035  	}
  5036  	if err != nil {
  5037  		return nil, err
  5038  	}
  5039  	defer googleapi.CloseBody(res)
  5040  	if err := googleapi.CheckResponse(res); err != nil {
  5041  		return nil, gensupport.WrapError(err)
  5042  	}
  5043  	ret := &Operation{
  5044  		ServerResponse: googleapi.ServerResponse{
  5045  			Header:         res.Header,
  5046  			HTTPStatusCode: res.StatusCode,
  5047  		},
  5048  	}
  5049  	target := &ret
  5050  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5051  		return nil, err
  5052  	}
  5053  	return ret, nil
  5054  }
  5055  
  5056  type ProjectsLocationsNfsSharesGetCall struct {
  5057  	s            *Service
  5058  	name         string
  5059  	urlParams_   gensupport.URLParams
  5060  	ifNoneMatch_ string
  5061  	ctx_         context.Context
  5062  	header_      http.Header
  5063  }
  5064  
  5065  // Get: Get details of a single NFS share.
  5066  //
  5067  // - name: Name of the resource.
  5068  func (r *ProjectsLocationsNfsSharesService) Get(name string) *ProjectsLocationsNfsSharesGetCall {
  5069  	c := &ProjectsLocationsNfsSharesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5070  	c.name = name
  5071  	return c
  5072  }
  5073  
  5074  // Fields allows partial responses to be retrieved. See
  5075  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5076  // details.
  5077  func (c *ProjectsLocationsNfsSharesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNfsSharesGetCall {
  5078  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5079  	return c
  5080  }
  5081  
  5082  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5083  // object's ETag matches the given value. This is useful for getting updates
  5084  // only after the object has changed since the last request.
  5085  func (c *ProjectsLocationsNfsSharesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNfsSharesGetCall {
  5086  	c.ifNoneMatch_ = entityTag
  5087  	return c
  5088  }
  5089  
  5090  // Context sets the context to be used in this call's Do method.
  5091  func (c *ProjectsLocationsNfsSharesGetCall) Context(ctx context.Context) *ProjectsLocationsNfsSharesGetCall {
  5092  	c.ctx_ = ctx
  5093  	return c
  5094  }
  5095  
  5096  // Header returns a http.Header that can be modified by the caller to add
  5097  // headers to the request.
  5098  func (c *ProjectsLocationsNfsSharesGetCall) Header() http.Header {
  5099  	if c.header_ == nil {
  5100  		c.header_ = make(http.Header)
  5101  	}
  5102  	return c.header_
  5103  }
  5104  
  5105  func (c *ProjectsLocationsNfsSharesGetCall) doRequest(alt string) (*http.Response, error) {
  5106  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5107  	if c.ifNoneMatch_ != "" {
  5108  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5109  	}
  5110  	var body io.Reader = nil
  5111  	c.urlParams_.Set("alt", alt)
  5112  	c.urlParams_.Set("prettyPrint", "false")
  5113  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  5114  	urls += "?" + c.urlParams_.Encode()
  5115  	req, err := http.NewRequest("GET", urls, body)
  5116  	if err != nil {
  5117  		return nil, err
  5118  	}
  5119  	req.Header = reqHeaders
  5120  	googleapi.Expand(req.URL, map[string]string{
  5121  		"name": c.name,
  5122  	})
  5123  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5124  }
  5125  
  5126  // Do executes the "baremetalsolution.projects.locations.nfsShares.get" call.
  5127  // Any non-2xx status code is an error. Response headers are in either
  5128  // *NfsShare.ServerResponse.Header or (if a response was returned at all) in
  5129  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5130  // whether the returned error was because http.StatusNotModified was returned.
  5131  func (c *ProjectsLocationsNfsSharesGetCall) Do(opts ...googleapi.CallOption) (*NfsShare, error) {
  5132  	gensupport.SetOptions(c.urlParams_, opts...)
  5133  	res, err := c.doRequest("json")
  5134  	if res != nil && res.StatusCode == http.StatusNotModified {
  5135  		if res.Body != nil {
  5136  			res.Body.Close()
  5137  		}
  5138  		return nil, gensupport.WrapError(&googleapi.Error{
  5139  			Code:   res.StatusCode,
  5140  			Header: res.Header,
  5141  		})
  5142  	}
  5143  	if err != nil {
  5144  		return nil, err
  5145  	}
  5146  	defer googleapi.CloseBody(res)
  5147  	if err := googleapi.CheckResponse(res); err != nil {
  5148  		return nil, gensupport.WrapError(err)
  5149  	}
  5150  	ret := &NfsShare{
  5151  		ServerResponse: googleapi.ServerResponse{
  5152  			Header:         res.Header,
  5153  			HTTPStatusCode: res.StatusCode,
  5154  		},
  5155  	}
  5156  	target := &ret
  5157  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5158  		return nil, err
  5159  	}
  5160  	return ret, nil
  5161  }
  5162  
  5163  type ProjectsLocationsNfsSharesListCall struct {
  5164  	s            *Service
  5165  	parent       string
  5166  	urlParams_   gensupport.URLParams
  5167  	ifNoneMatch_ string
  5168  	ctx_         context.Context
  5169  	header_      http.Header
  5170  }
  5171  
  5172  // List: List NFS shares.
  5173  //
  5174  // - parent: Parent value for ListNfsSharesRequest.
  5175  func (r *ProjectsLocationsNfsSharesService) List(parent string) *ProjectsLocationsNfsSharesListCall {
  5176  	c := &ProjectsLocationsNfsSharesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5177  	c.parent = parent
  5178  	return c
  5179  }
  5180  
  5181  // Filter sets the optional parameter "filter": List filter.
  5182  func (c *ProjectsLocationsNfsSharesListCall) Filter(filter string) *ProjectsLocationsNfsSharesListCall {
  5183  	c.urlParams_.Set("filter", filter)
  5184  	return c
  5185  }
  5186  
  5187  // PageSize sets the optional parameter "pageSize": Requested page size. The
  5188  // server might return fewer items than requested. If unspecified, server will
  5189  // pick an appropriate default.
  5190  func (c *ProjectsLocationsNfsSharesListCall) PageSize(pageSize int64) *ProjectsLocationsNfsSharesListCall {
  5191  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5192  	return c
  5193  }
  5194  
  5195  // PageToken sets the optional parameter "pageToken": A token identifying a
  5196  // page of results from the server.
  5197  func (c *ProjectsLocationsNfsSharesListCall) PageToken(pageToken string) *ProjectsLocationsNfsSharesListCall {
  5198  	c.urlParams_.Set("pageToken", pageToken)
  5199  	return c
  5200  }
  5201  
  5202  // Fields allows partial responses to be retrieved. See
  5203  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5204  // details.
  5205  func (c *ProjectsLocationsNfsSharesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNfsSharesListCall {
  5206  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5207  	return c
  5208  }
  5209  
  5210  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5211  // object's ETag matches the given value. This is useful for getting updates
  5212  // only after the object has changed since the last request.
  5213  func (c *ProjectsLocationsNfsSharesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNfsSharesListCall {
  5214  	c.ifNoneMatch_ = entityTag
  5215  	return c
  5216  }
  5217  
  5218  // Context sets the context to be used in this call's Do method.
  5219  func (c *ProjectsLocationsNfsSharesListCall) Context(ctx context.Context) *ProjectsLocationsNfsSharesListCall {
  5220  	c.ctx_ = ctx
  5221  	return c
  5222  }
  5223  
  5224  // Header returns a http.Header that can be modified by the caller to add
  5225  // headers to the request.
  5226  func (c *ProjectsLocationsNfsSharesListCall) Header() http.Header {
  5227  	if c.header_ == nil {
  5228  		c.header_ = make(http.Header)
  5229  	}
  5230  	return c.header_
  5231  }
  5232  
  5233  func (c *ProjectsLocationsNfsSharesListCall) doRequest(alt string) (*http.Response, error) {
  5234  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5235  	if c.ifNoneMatch_ != "" {
  5236  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5237  	}
  5238  	var body io.Reader = nil
  5239  	c.urlParams_.Set("alt", alt)
  5240  	c.urlParams_.Set("prettyPrint", "false")
  5241  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/nfsShares")
  5242  	urls += "?" + c.urlParams_.Encode()
  5243  	req, err := http.NewRequest("GET", urls, body)
  5244  	if err != nil {
  5245  		return nil, err
  5246  	}
  5247  	req.Header = reqHeaders
  5248  	googleapi.Expand(req.URL, map[string]string{
  5249  		"parent": c.parent,
  5250  	})
  5251  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5252  }
  5253  
  5254  // Do executes the "baremetalsolution.projects.locations.nfsShares.list" call.
  5255  // Any non-2xx status code is an error. Response headers are in either
  5256  // *ListNfsSharesResponse.ServerResponse.Header or (if a response was returned
  5257  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5258  // check whether the returned error was because http.StatusNotModified was
  5259  // returned.
  5260  func (c *ProjectsLocationsNfsSharesListCall) Do(opts ...googleapi.CallOption) (*ListNfsSharesResponse, error) {
  5261  	gensupport.SetOptions(c.urlParams_, opts...)
  5262  	res, err := c.doRequest("json")
  5263  	if res != nil && res.StatusCode == http.StatusNotModified {
  5264  		if res.Body != nil {
  5265  			res.Body.Close()
  5266  		}
  5267  		return nil, gensupport.WrapError(&googleapi.Error{
  5268  			Code:   res.StatusCode,
  5269  			Header: res.Header,
  5270  		})
  5271  	}
  5272  	if err != nil {
  5273  		return nil, err
  5274  	}
  5275  	defer googleapi.CloseBody(res)
  5276  	if err := googleapi.CheckResponse(res); err != nil {
  5277  		return nil, gensupport.WrapError(err)
  5278  	}
  5279  	ret := &ListNfsSharesResponse{
  5280  		ServerResponse: googleapi.ServerResponse{
  5281  			Header:         res.Header,
  5282  			HTTPStatusCode: res.StatusCode,
  5283  		},
  5284  	}
  5285  	target := &ret
  5286  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5287  		return nil, err
  5288  	}
  5289  	return ret, nil
  5290  }
  5291  
  5292  // Pages invokes f for each page of results.
  5293  // A non-nil error returned from f will halt the iteration.
  5294  // The provided context supersedes any context provided to the Context method.
  5295  func (c *ProjectsLocationsNfsSharesListCall) Pages(ctx context.Context, f func(*ListNfsSharesResponse) error) error {
  5296  	c.ctx_ = ctx
  5297  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  5298  	for {
  5299  		x, err := c.Do()
  5300  		if err != nil {
  5301  			return err
  5302  		}
  5303  		if err := f(x); err != nil {
  5304  			return err
  5305  		}
  5306  		if x.NextPageToken == "" {
  5307  			return nil
  5308  		}
  5309  		c.PageToken(x.NextPageToken)
  5310  	}
  5311  }
  5312  
  5313  type ProjectsLocationsNfsSharesPatchCall struct {
  5314  	s          *Service
  5315  	name       string
  5316  	nfsshare   *NfsShare
  5317  	urlParams_ gensupport.URLParams
  5318  	ctx_       context.Context
  5319  	header_    http.Header
  5320  }
  5321  
  5322  // Patch: Update details of a single NFS share.
  5323  //
  5324  // - name: Immutable. The name of the NFS share.
  5325  func (r *ProjectsLocationsNfsSharesService) Patch(name string, nfsshare *NfsShare) *ProjectsLocationsNfsSharesPatchCall {
  5326  	c := &ProjectsLocationsNfsSharesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5327  	c.name = name
  5328  	c.nfsshare = nfsshare
  5329  	return c
  5330  }
  5331  
  5332  // UpdateMask sets the optional parameter "updateMask": The list of fields to
  5333  // update. The only currently supported fields are: `labels` `allowed_clients`
  5334  func (c *ProjectsLocationsNfsSharesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsNfsSharesPatchCall {
  5335  	c.urlParams_.Set("updateMask", updateMask)
  5336  	return c
  5337  }
  5338  
  5339  // Fields allows partial responses to be retrieved. See
  5340  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5341  // details.
  5342  func (c *ProjectsLocationsNfsSharesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsNfsSharesPatchCall {
  5343  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5344  	return c
  5345  }
  5346  
  5347  // Context sets the context to be used in this call's Do method.
  5348  func (c *ProjectsLocationsNfsSharesPatchCall) Context(ctx context.Context) *ProjectsLocationsNfsSharesPatchCall {
  5349  	c.ctx_ = ctx
  5350  	return c
  5351  }
  5352  
  5353  // Header returns a http.Header that can be modified by the caller to add
  5354  // headers to the request.
  5355  func (c *ProjectsLocationsNfsSharesPatchCall) Header() http.Header {
  5356  	if c.header_ == nil {
  5357  		c.header_ = make(http.Header)
  5358  	}
  5359  	return c.header_
  5360  }
  5361  
  5362  func (c *ProjectsLocationsNfsSharesPatchCall) doRequest(alt string) (*http.Response, error) {
  5363  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5364  	var body io.Reader = nil
  5365  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.nfsshare)
  5366  	if err != nil {
  5367  		return nil, err
  5368  	}
  5369  	c.urlParams_.Set("alt", alt)
  5370  	c.urlParams_.Set("prettyPrint", "false")
  5371  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  5372  	urls += "?" + c.urlParams_.Encode()
  5373  	req, err := http.NewRequest("PATCH", urls, body)
  5374  	if err != nil {
  5375  		return nil, err
  5376  	}
  5377  	req.Header = reqHeaders
  5378  	googleapi.Expand(req.URL, map[string]string{
  5379  		"name": c.name,
  5380  	})
  5381  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5382  }
  5383  
  5384  // Do executes the "baremetalsolution.projects.locations.nfsShares.patch" call.
  5385  // Any non-2xx status code is an error. Response headers are in either
  5386  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  5387  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5388  // whether the returned error was because http.StatusNotModified was returned.
  5389  func (c *ProjectsLocationsNfsSharesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5390  	gensupport.SetOptions(c.urlParams_, opts...)
  5391  	res, err := c.doRequest("json")
  5392  	if res != nil && res.StatusCode == http.StatusNotModified {
  5393  		if res.Body != nil {
  5394  			res.Body.Close()
  5395  		}
  5396  		return nil, gensupport.WrapError(&googleapi.Error{
  5397  			Code:   res.StatusCode,
  5398  			Header: res.Header,
  5399  		})
  5400  	}
  5401  	if err != nil {
  5402  		return nil, err
  5403  	}
  5404  	defer googleapi.CloseBody(res)
  5405  	if err := googleapi.CheckResponse(res); err != nil {
  5406  		return nil, gensupport.WrapError(err)
  5407  	}
  5408  	ret := &Operation{
  5409  		ServerResponse: googleapi.ServerResponse{
  5410  			Header:         res.Header,
  5411  			HTTPStatusCode: res.StatusCode,
  5412  		},
  5413  	}
  5414  	target := &ret
  5415  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5416  		return nil, err
  5417  	}
  5418  	return ret, nil
  5419  }
  5420  
  5421  type ProjectsLocationsNfsSharesRenameCall struct {
  5422  	s                     *Service
  5423  	name                  string
  5424  	renamenfssharerequest *RenameNfsShareRequest
  5425  	urlParams_            gensupport.URLParams
  5426  	ctx_                  context.Context
  5427  	header_               http.Header
  5428  }
  5429  
  5430  // Rename: RenameNfsShare sets a new name for an nfsshare. Use with caution,
  5431  // previous names become immediately invalidated.
  5432  //
  5433  //   - name: The `name` field is used to identify the nfsshare. Format:
  5434  //     projects/{project}/locations/{location}/nfsshares/{nfsshare}.
  5435  func (r *ProjectsLocationsNfsSharesService) Rename(name string, renamenfssharerequest *RenameNfsShareRequest) *ProjectsLocationsNfsSharesRenameCall {
  5436  	c := &ProjectsLocationsNfsSharesRenameCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5437  	c.name = name
  5438  	c.renamenfssharerequest = renamenfssharerequest
  5439  	return c
  5440  }
  5441  
  5442  // Fields allows partial responses to be retrieved. See
  5443  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5444  // details.
  5445  func (c *ProjectsLocationsNfsSharesRenameCall) Fields(s ...googleapi.Field) *ProjectsLocationsNfsSharesRenameCall {
  5446  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5447  	return c
  5448  }
  5449  
  5450  // Context sets the context to be used in this call's Do method.
  5451  func (c *ProjectsLocationsNfsSharesRenameCall) Context(ctx context.Context) *ProjectsLocationsNfsSharesRenameCall {
  5452  	c.ctx_ = ctx
  5453  	return c
  5454  }
  5455  
  5456  // Header returns a http.Header that can be modified by the caller to add
  5457  // headers to the request.
  5458  func (c *ProjectsLocationsNfsSharesRenameCall) Header() http.Header {
  5459  	if c.header_ == nil {
  5460  		c.header_ = make(http.Header)
  5461  	}
  5462  	return c.header_
  5463  }
  5464  
  5465  func (c *ProjectsLocationsNfsSharesRenameCall) doRequest(alt string) (*http.Response, error) {
  5466  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5467  	var body io.Reader = nil
  5468  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.renamenfssharerequest)
  5469  	if err != nil {
  5470  		return nil, err
  5471  	}
  5472  	c.urlParams_.Set("alt", alt)
  5473  	c.urlParams_.Set("prettyPrint", "false")
  5474  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:rename")
  5475  	urls += "?" + c.urlParams_.Encode()
  5476  	req, err := http.NewRequest("POST", urls, body)
  5477  	if err != nil {
  5478  		return nil, err
  5479  	}
  5480  	req.Header = reqHeaders
  5481  	googleapi.Expand(req.URL, map[string]string{
  5482  		"name": c.name,
  5483  	})
  5484  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5485  }
  5486  
  5487  // Do executes the "baremetalsolution.projects.locations.nfsShares.rename" call.
  5488  // Any non-2xx status code is an error. Response headers are in either
  5489  // *NfsShare.ServerResponse.Header or (if a response was returned at all) in
  5490  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5491  // whether the returned error was because http.StatusNotModified was returned.
  5492  func (c *ProjectsLocationsNfsSharesRenameCall) Do(opts ...googleapi.CallOption) (*NfsShare, error) {
  5493  	gensupport.SetOptions(c.urlParams_, opts...)
  5494  	res, err := c.doRequest("json")
  5495  	if res != nil && res.StatusCode == http.StatusNotModified {
  5496  		if res.Body != nil {
  5497  			res.Body.Close()
  5498  		}
  5499  		return nil, gensupport.WrapError(&googleapi.Error{
  5500  			Code:   res.StatusCode,
  5501  			Header: res.Header,
  5502  		})
  5503  	}
  5504  	if err != nil {
  5505  		return nil, err
  5506  	}
  5507  	defer googleapi.CloseBody(res)
  5508  	if err := googleapi.CheckResponse(res); err != nil {
  5509  		return nil, gensupport.WrapError(err)
  5510  	}
  5511  	ret := &NfsShare{
  5512  		ServerResponse: googleapi.ServerResponse{
  5513  			Header:         res.Header,
  5514  			HTTPStatusCode: res.StatusCode,
  5515  		},
  5516  	}
  5517  	target := &ret
  5518  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5519  		return nil, err
  5520  	}
  5521  	return ret, nil
  5522  }
  5523  
  5524  type ProjectsLocationsOperationsGetCall struct {
  5525  	s            *Service
  5526  	name         string
  5527  	urlParams_   gensupport.URLParams
  5528  	ifNoneMatch_ string
  5529  	ctx_         context.Context
  5530  	header_      http.Header
  5531  }
  5532  
  5533  // Get: Get details about an operation.
  5534  //
  5535  // - name: The name of the operation resource.
  5536  func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
  5537  	c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5538  	c.name = name
  5539  	return c
  5540  }
  5541  
  5542  // Fields allows partial responses to be retrieved. See
  5543  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5544  // details.
  5545  func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
  5546  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5547  	return c
  5548  }
  5549  
  5550  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5551  // object's ETag matches the given value. This is useful for getting updates
  5552  // only after the object has changed since the last request.
  5553  func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
  5554  	c.ifNoneMatch_ = entityTag
  5555  	return c
  5556  }
  5557  
  5558  // Context sets the context to be used in this call's Do method.
  5559  func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
  5560  	c.ctx_ = ctx
  5561  	return c
  5562  }
  5563  
  5564  // Header returns a http.Header that can be modified by the caller to add
  5565  // headers to the request.
  5566  func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
  5567  	if c.header_ == nil {
  5568  		c.header_ = make(http.Header)
  5569  	}
  5570  	return c.header_
  5571  }
  5572  
  5573  func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  5574  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5575  	if c.ifNoneMatch_ != "" {
  5576  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5577  	}
  5578  	var body io.Reader = nil
  5579  	c.urlParams_.Set("alt", alt)
  5580  	c.urlParams_.Set("prettyPrint", "false")
  5581  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  5582  	urls += "?" + c.urlParams_.Encode()
  5583  	req, err := http.NewRequest("GET", urls, body)
  5584  	if err != nil {
  5585  		return nil, err
  5586  	}
  5587  	req.Header = reqHeaders
  5588  	googleapi.Expand(req.URL, map[string]string{
  5589  		"name": c.name,
  5590  	})
  5591  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5592  }
  5593  
  5594  // Do executes the "baremetalsolution.projects.locations.operations.get" call.
  5595  // Any non-2xx status code is an error. Response headers are in either
  5596  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  5597  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5598  // whether the returned error was because http.StatusNotModified was returned.
  5599  func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5600  	gensupport.SetOptions(c.urlParams_, opts...)
  5601  	res, err := c.doRequest("json")
  5602  	if res != nil && res.StatusCode == http.StatusNotModified {
  5603  		if res.Body != nil {
  5604  			res.Body.Close()
  5605  		}
  5606  		return nil, gensupport.WrapError(&googleapi.Error{
  5607  			Code:   res.StatusCode,
  5608  			Header: res.Header,
  5609  		})
  5610  	}
  5611  	if err != nil {
  5612  		return nil, err
  5613  	}
  5614  	defer googleapi.CloseBody(res)
  5615  	if err := googleapi.CheckResponse(res); err != nil {
  5616  		return nil, gensupport.WrapError(err)
  5617  	}
  5618  	ret := &Operation{
  5619  		ServerResponse: googleapi.ServerResponse{
  5620  			Header:         res.Header,
  5621  			HTTPStatusCode: res.StatusCode,
  5622  		},
  5623  	}
  5624  	target := &ret
  5625  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5626  		return nil, err
  5627  	}
  5628  	return ret, nil
  5629  }
  5630  
  5631  type ProjectsLocationsOsImagesGetCall struct {
  5632  	s            *Service
  5633  	name         string
  5634  	urlParams_   gensupport.URLParams
  5635  	ifNoneMatch_ string
  5636  	ctx_         context.Context
  5637  	header_      http.Header
  5638  }
  5639  
  5640  // Get: Get details of a single OS image.
  5641  //
  5642  // - name: Name of the OS image.
  5643  func (r *ProjectsLocationsOsImagesService) Get(name string) *ProjectsLocationsOsImagesGetCall {
  5644  	c := &ProjectsLocationsOsImagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5645  	c.name = name
  5646  	return c
  5647  }
  5648  
  5649  // Fields allows partial responses to be retrieved. See
  5650  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5651  // details.
  5652  func (c *ProjectsLocationsOsImagesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOsImagesGetCall {
  5653  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5654  	return c
  5655  }
  5656  
  5657  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5658  // object's ETag matches the given value. This is useful for getting updates
  5659  // only after the object has changed since the last request.
  5660  func (c *ProjectsLocationsOsImagesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOsImagesGetCall {
  5661  	c.ifNoneMatch_ = entityTag
  5662  	return c
  5663  }
  5664  
  5665  // Context sets the context to be used in this call's Do method.
  5666  func (c *ProjectsLocationsOsImagesGetCall) Context(ctx context.Context) *ProjectsLocationsOsImagesGetCall {
  5667  	c.ctx_ = ctx
  5668  	return c
  5669  }
  5670  
  5671  // Header returns a http.Header that can be modified by the caller to add
  5672  // headers to the request.
  5673  func (c *ProjectsLocationsOsImagesGetCall) Header() http.Header {
  5674  	if c.header_ == nil {
  5675  		c.header_ = make(http.Header)
  5676  	}
  5677  	return c.header_
  5678  }
  5679  
  5680  func (c *ProjectsLocationsOsImagesGetCall) doRequest(alt string) (*http.Response, error) {
  5681  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5682  	if c.ifNoneMatch_ != "" {
  5683  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5684  	}
  5685  	var body io.Reader = nil
  5686  	c.urlParams_.Set("alt", alt)
  5687  	c.urlParams_.Set("prettyPrint", "false")
  5688  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  5689  	urls += "?" + c.urlParams_.Encode()
  5690  	req, err := http.NewRequest("GET", urls, body)
  5691  	if err != nil {
  5692  		return nil, err
  5693  	}
  5694  	req.Header = reqHeaders
  5695  	googleapi.Expand(req.URL, map[string]string{
  5696  		"name": c.name,
  5697  	})
  5698  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5699  }
  5700  
  5701  // Do executes the "baremetalsolution.projects.locations.osImages.get" call.
  5702  // Any non-2xx status code is an error. Response headers are in either
  5703  // *OSImage.ServerResponse.Header or (if a response was returned at all) in
  5704  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5705  // whether the returned error was because http.StatusNotModified was returned.
  5706  func (c *ProjectsLocationsOsImagesGetCall) Do(opts ...googleapi.CallOption) (*OSImage, error) {
  5707  	gensupport.SetOptions(c.urlParams_, opts...)
  5708  	res, err := c.doRequest("json")
  5709  	if res != nil && res.StatusCode == http.StatusNotModified {
  5710  		if res.Body != nil {
  5711  			res.Body.Close()
  5712  		}
  5713  		return nil, gensupport.WrapError(&googleapi.Error{
  5714  			Code:   res.StatusCode,
  5715  			Header: res.Header,
  5716  		})
  5717  	}
  5718  	if err != nil {
  5719  		return nil, err
  5720  	}
  5721  	defer googleapi.CloseBody(res)
  5722  	if err := googleapi.CheckResponse(res); err != nil {
  5723  		return nil, gensupport.WrapError(err)
  5724  	}
  5725  	ret := &OSImage{
  5726  		ServerResponse: googleapi.ServerResponse{
  5727  			Header:         res.Header,
  5728  			HTTPStatusCode: res.StatusCode,
  5729  		},
  5730  	}
  5731  	target := &ret
  5732  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5733  		return nil, err
  5734  	}
  5735  	return ret, nil
  5736  }
  5737  
  5738  type ProjectsLocationsOsImagesListCall struct {
  5739  	s            *Service
  5740  	parent       string
  5741  	urlParams_   gensupport.URLParams
  5742  	ifNoneMatch_ string
  5743  	ctx_         context.Context
  5744  	header_      http.Header
  5745  }
  5746  
  5747  // List: Retrieves the list of OS images which are currently approved.
  5748  //
  5749  // - parent: Parent value for ListOSImagesRequest.
  5750  func (r *ProjectsLocationsOsImagesService) List(parent string) *ProjectsLocationsOsImagesListCall {
  5751  	c := &ProjectsLocationsOsImagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5752  	c.parent = parent
  5753  	return c
  5754  }
  5755  
  5756  // PageSize sets the optional parameter "pageSize": Requested page size. The
  5757  // server might return fewer items than requested. If unspecified, server will
  5758  // pick an appropriate default. Notice that page_size field is not supported
  5759  // and won't be respected in the API request for now, will be updated when
  5760  // pagination is supported.
  5761  func (c *ProjectsLocationsOsImagesListCall) PageSize(pageSize int64) *ProjectsLocationsOsImagesListCall {
  5762  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5763  	return c
  5764  }
  5765  
  5766  // PageToken sets the optional parameter "pageToken": A token identifying a
  5767  // page of results from the server.
  5768  func (c *ProjectsLocationsOsImagesListCall) PageToken(pageToken string) *ProjectsLocationsOsImagesListCall {
  5769  	c.urlParams_.Set("pageToken", pageToken)
  5770  	return c
  5771  }
  5772  
  5773  // Fields allows partial responses to be retrieved. See
  5774  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5775  // details.
  5776  func (c *ProjectsLocationsOsImagesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOsImagesListCall {
  5777  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5778  	return c
  5779  }
  5780  
  5781  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5782  // object's ETag matches the given value. This is useful for getting updates
  5783  // only after the object has changed since the last request.
  5784  func (c *ProjectsLocationsOsImagesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOsImagesListCall {
  5785  	c.ifNoneMatch_ = entityTag
  5786  	return c
  5787  }
  5788  
  5789  // Context sets the context to be used in this call's Do method.
  5790  func (c *ProjectsLocationsOsImagesListCall) Context(ctx context.Context) *ProjectsLocationsOsImagesListCall {
  5791  	c.ctx_ = ctx
  5792  	return c
  5793  }
  5794  
  5795  // Header returns a http.Header that can be modified by the caller to add
  5796  // headers to the request.
  5797  func (c *ProjectsLocationsOsImagesListCall) Header() http.Header {
  5798  	if c.header_ == nil {
  5799  		c.header_ = make(http.Header)
  5800  	}
  5801  	return c.header_
  5802  }
  5803  
  5804  func (c *ProjectsLocationsOsImagesListCall) doRequest(alt string) (*http.Response, error) {
  5805  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5806  	if c.ifNoneMatch_ != "" {
  5807  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5808  	}
  5809  	var body io.Reader = nil
  5810  	c.urlParams_.Set("alt", alt)
  5811  	c.urlParams_.Set("prettyPrint", "false")
  5812  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/osImages")
  5813  	urls += "?" + c.urlParams_.Encode()
  5814  	req, err := http.NewRequest("GET", urls, body)
  5815  	if err != nil {
  5816  		return nil, err
  5817  	}
  5818  	req.Header = reqHeaders
  5819  	googleapi.Expand(req.URL, map[string]string{
  5820  		"parent": c.parent,
  5821  	})
  5822  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5823  }
  5824  
  5825  // Do executes the "baremetalsolution.projects.locations.osImages.list" call.
  5826  // Any non-2xx status code is an error. Response headers are in either
  5827  // *ListOSImagesResponse.ServerResponse.Header or (if a response was returned
  5828  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5829  // check whether the returned error was because http.StatusNotModified was
  5830  // returned.
  5831  func (c *ProjectsLocationsOsImagesListCall) Do(opts ...googleapi.CallOption) (*ListOSImagesResponse, error) {
  5832  	gensupport.SetOptions(c.urlParams_, opts...)
  5833  	res, err := c.doRequest("json")
  5834  	if res != nil && res.StatusCode == http.StatusNotModified {
  5835  		if res.Body != nil {
  5836  			res.Body.Close()
  5837  		}
  5838  		return nil, gensupport.WrapError(&googleapi.Error{
  5839  			Code:   res.StatusCode,
  5840  			Header: res.Header,
  5841  		})
  5842  	}
  5843  	if err != nil {
  5844  		return nil, err
  5845  	}
  5846  	defer googleapi.CloseBody(res)
  5847  	if err := googleapi.CheckResponse(res); err != nil {
  5848  		return nil, gensupport.WrapError(err)
  5849  	}
  5850  	ret := &ListOSImagesResponse{
  5851  		ServerResponse: googleapi.ServerResponse{
  5852  			Header:         res.Header,
  5853  			HTTPStatusCode: res.StatusCode,
  5854  		},
  5855  	}
  5856  	target := &ret
  5857  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5858  		return nil, err
  5859  	}
  5860  	return ret, nil
  5861  }
  5862  
  5863  // Pages invokes f for each page of results.
  5864  // A non-nil error returned from f will halt the iteration.
  5865  // The provided context supersedes any context provided to the Context method.
  5866  func (c *ProjectsLocationsOsImagesListCall) Pages(ctx context.Context, f func(*ListOSImagesResponse) error) error {
  5867  	c.ctx_ = ctx
  5868  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  5869  	for {
  5870  		x, err := c.Do()
  5871  		if err != nil {
  5872  			return err
  5873  		}
  5874  		if err := f(x); err != nil {
  5875  			return err
  5876  		}
  5877  		if x.NextPageToken == "" {
  5878  			return nil
  5879  		}
  5880  		c.PageToken(x.NextPageToken)
  5881  	}
  5882  }
  5883  
  5884  type ProjectsLocationsProvisioningConfigsCreateCall struct {
  5885  	s                  *Service
  5886  	parent             string
  5887  	provisioningconfig *ProvisioningConfig
  5888  	urlParams_         gensupport.URLParams
  5889  	ctx_               context.Context
  5890  	header_            http.Header
  5891  }
  5892  
  5893  // Create: Create new ProvisioningConfig.
  5894  //
  5895  // - parent: The parent project and location containing the ProvisioningConfig.
  5896  func (r *ProjectsLocationsProvisioningConfigsService) Create(parent string, provisioningconfig *ProvisioningConfig) *ProjectsLocationsProvisioningConfigsCreateCall {
  5897  	c := &ProjectsLocationsProvisioningConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5898  	c.parent = parent
  5899  	c.provisioningconfig = provisioningconfig
  5900  	return c
  5901  }
  5902  
  5903  // Email sets the optional parameter "email": Email provided to send a
  5904  // confirmation with provisioning config to.
  5905  func (c *ProjectsLocationsProvisioningConfigsCreateCall) Email(email string) *ProjectsLocationsProvisioningConfigsCreateCall {
  5906  	c.urlParams_.Set("email", email)
  5907  	return c
  5908  }
  5909  
  5910  // Fields allows partial responses to be retrieved. See
  5911  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5912  // details.
  5913  func (c *ProjectsLocationsProvisioningConfigsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsProvisioningConfigsCreateCall {
  5914  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5915  	return c
  5916  }
  5917  
  5918  // Context sets the context to be used in this call's Do method.
  5919  func (c *ProjectsLocationsProvisioningConfigsCreateCall) Context(ctx context.Context) *ProjectsLocationsProvisioningConfigsCreateCall {
  5920  	c.ctx_ = ctx
  5921  	return c
  5922  }
  5923  
  5924  // Header returns a http.Header that can be modified by the caller to add
  5925  // headers to the request.
  5926  func (c *ProjectsLocationsProvisioningConfigsCreateCall) Header() http.Header {
  5927  	if c.header_ == nil {
  5928  		c.header_ = make(http.Header)
  5929  	}
  5930  	return c.header_
  5931  }
  5932  
  5933  func (c *ProjectsLocationsProvisioningConfigsCreateCall) doRequest(alt string) (*http.Response, error) {
  5934  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5935  	var body io.Reader = nil
  5936  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.provisioningconfig)
  5937  	if err != nil {
  5938  		return nil, err
  5939  	}
  5940  	c.urlParams_.Set("alt", alt)
  5941  	c.urlParams_.Set("prettyPrint", "false")
  5942  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/provisioningConfigs")
  5943  	urls += "?" + c.urlParams_.Encode()
  5944  	req, err := http.NewRequest("POST", urls, body)
  5945  	if err != nil {
  5946  		return nil, err
  5947  	}
  5948  	req.Header = reqHeaders
  5949  	googleapi.Expand(req.URL, map[string]string{
  5950  		"parent": c.parent,
  5951  	})
  5952  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5953  }
  5954  
  5955  // Do executes the "baremetalsolution.projects.locations.provisioningConfigs.create" call.
  5956  // Any non-2xx status code is an error. Response headers are in either
  5957  // *ProvisioningConfig.ServerResponse.Header or (if a response was returned at
  5958  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5959  // check whether the returned error was because http.StatusNotModified was
  5960  // returned.
  5961  func (c *ProjectsLocationsProvisioningConfigsCreateCall) Do(opts ...googleapi.CallOption) (*ProvisioningConfig, error) {
  5962  	gensupport.SetOptions(c.urlParams_, opts...)
  5963  	res, err := c.doRequest("json")
  5964  	if res != nil && res.StatusCode == http.StatusNotModified {
  5965  		if res.Body != nil {
  5966  			res.Body.Close()
  5967  		}
  5968  		return nil, gensupport.WrapError(&googleapi.Error{
  5969  			Code:   res.StatusCode,
  5970  			Header: res.Header,
  5971  		})
  5972  	}
  5973  	if err != nil {
  5974  		return nil, err
  5975  	}
  5976  	defer googleapi.CloseBody(res)
  5977  	if err := googleapi.CheckResponse(res); err != nil {
  5978  		return nil, gensupport.WrapError(err)
  5979  	}
  5980  	ret := &ProvisioningConfig{
  5981  		ServerResponse: googleapi.ServerResponse{
  5982  			Header:         res.Header,
  5983  			HTTPStatusCode: res.StatusCode,
  5984  		},
  5985  	}
  5986  	target := &ret
  5987  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5988  		return nil, err
  5989  	}
  5990  	return ret, nil
  5991  }
  5992  
  5993  type ProjectsLocationsProvisioningConfigsGetCall struct {
  5994  	s            *Service
  5995  	name         string
  5996  	urlParams_   gensupport.URLParams
  5997  	ifNoneMatch_ string
  5998  	ctx_         context.Context
  5999  	header_      http.Header
  6000  }
  6001  
  6002  // Get: Get ProvisioningConfig by name.
  6003  //
  6004  // - name: Name of the ProvisioningConfig.
  6005  func (r *ProjectsLocationsProvisioningConfigsService) Get(name string) *ProjectsLocationsProvisioningConfigsGetCall {
  6006  	c := &ProjectsLocationsProvisioningConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6007  	c.name = name
  6008  	return c
  6009  }
  6010  
  6011  // Fields allows partial responses to be retrieved. See
  6012  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6013  // details.
  6014  func (c *ProjectsLocationsProvisioningConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsProvisioningConfigsGetCall {
  6015  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6016  	return c
  6017  }
  6018  
  6019  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6020  // object's ETag matches the given value. This is useful for getting updates
  6021  // only after the object has changed since the last request.
  6022  func (c *ProjectsLocationsProvisioningConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsProvisioningConfigsGetCall {
  6023  	c.ifNoneMatch_ = entityTag
  6024  	return c
  6025  }
  6026  
  6027  // Context sets the context to be used in this call's Do method.
  6028  func (c *ProjectsLocationsProvisioningConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsProvisioningConfigsGetCall {
  6029  	c.ctx_ = ctx
  6030  	return c
  6031  }
  6032  
  6033  // Header returns a http.Header that can be modified by the caller to add
  6034  // headers to the request.
  6035  func (c *ProjectsLocationsProvisioningConfigsGetCall) Header() http.Header {
  6036  	if c.header_ == nil {
  6037  		c.header_ = make(http.Header)
  6038  	}
  6039  	return c.header_
  6040  }
  6041  
  6042  func (c *ProjectsLocationsProvisioningConfigsGetCall) doRequest(alt string) (*http.Response, error) {
  6043  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6044  	if c.ifNoneMatch_ != "" {
  6045  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6046  	}
  6047  	var body io.Reader = nil
  6048  	c.urlParams_.Set("alt", alt)
  6049  	c.urlParams_.Set("prettyPrint", "false")
  6050  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  6051  	urls += "?" + c.urlParams_.Encode()
  6052  	req, err := http.NewRequest("GET", urls, body)
  6053  	if err != nil {
  6054  		return nil, err
  6055  	}
  6056  	req.Header = reqHeaders
  6057  	googleapi.Expand(req.URL, map[string]string{
  6058  		"name": c.name,
  6059  	})
  6060  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6061  }
  6062  
  6063  // Do executes the "baremetalsolution.projects.locations.provisioningConfigs.get" call.
  6064  // Any non-2xx status code is an error. Response headers are in either
  6065  // *ProvisioningConfig.ServerResponse.Header or (if a response was returned at
  6066  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6067  // check whether the returned error was because http.StatusNotModified was
  6068  // returned.
  6069  func (c *ProjectsLocationsProvisioningConfigsGetCall) Do(opts ...googleapi.CallOption) (*ProvisioningConfig, error) {
  6070  	gensupport.SetOptions(c.urlParams_, opts...)
  6071  	res, err := c.doRequest("json")
  6072  	if res != nil && res.StatusCode == http.StatusNotModified {
  6073  		if res.Body != nil {
  6074  			res.Body.Close()
  6075  		}
  6076  		return nil, gensupport.WrapError(&googleapi.Error{
  6077  			Code:   res.StatusCode,
  6078  			Header: res.Header,
  6079  		})
  6080  	}
  6081  	if err != nil {
  6082  		return nil, err
  6083  	}
  6084  	defer googleapi.CloseBody(res)
  6085  	if err := googleapi.CheckResponse(res); err != nil {
  6086  		return nil, gensupport.WrapError(err)
  6087  	}
  6088  	ret := &ProvisioningConfig{
  6089  		ServerResponse: googleapi.ServerResponse{
  6090  			Header:         res.Header,
  6091  			HTTPStatusCode: res.StatusCode,
  6092  		},
  6093  	}
  6094  	target := &ret
  6095  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6096  		return nil, err
  6097  	}
  6098  	return ret, nil
  6099  }
  6100  
  6101  type ProjectsLocationsProvisioningConfigsPatchCall struct {
  6102  	s                  *Service
  6103  	name               string
  6104  	provisioningconfig *ProvisioningConfig
  6105  	urlParams_         gensupport.URLParams
  6106  	ctx_               context.Context
  6107  	header_            http.Header
  6108  }
  6109  
  6110  // Patch: Update existing ProvisioningConfig.
  6111  //
  6112  //   - name: Output only. The system-generated name of the provisioning config.
  6113  //     This follows the UUID format.
  6114  func (r *ProjectsLocationsProvisioningConfigsService) Patch(name string, provisioningconfig *ProvisioningConfig) *ProjectsLocationsProvisioningConfigsPatchCall {
  6115  	c := &ProjectsLocationsProvisioningConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6116  	c.name = name
  6117  	c.provisioningconfig = provisioningconfig
  6118  	return c
  6119  }
  6120  
  6121  // Email sets the optional parameter "email": Email provided to send a
  6122  // confirmation with provisioning config to.
  6123  func (c *ProjectsLocationsProvisioningConfigsPatchCall) Email(email string) *ProjectsLocationsProvisioningConfigsPatchCall {
  6124  	c.urlParams_.Set("email", email)
  6125  	return c
  6126  }
  6127  
  6128  // UpdateMask sets the optional parameter "updateMask": Required. The list of
  6129  // fields to update.
  6130  func (c *ProjectsLocationsProvisioningConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsProvisioningConfigsPatchCall {
  6131  	c.urlParams_.Set("updateMask", updateMask)
  6132  	return c
  6133  }
  6134  
  6135  // Fields allows partial responses to be retrieved. See
  6136  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6137  // details.
  6138  func (c *ProjectsLocationsProvisioningConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsProvisioningConfigsPatchCall {
  6139  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6140  	return c
  6141  }
  6142  
  6143  // Context sets the context to be used in this call's Do method.
  6144  func (c *ProjectsLocationsProvisioningConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsProvisioningConfigsPatchCall {
  6145  	c.ctx_ = ctx
  6146  	return c
  6147  }
  6148  
  6149  // Header returns a http.Header that can be modified by the caller to add
  6150  // headers to the request.
  6151  func (c *ProjectsLocationsProvisioningConfigsPatchCall) Header() http.Header {
  6152  	if c.header_ == nil {
  6153  		c.header_ = make(http.Header)
  6154  	}
  6155  	return c.header_
  6156  }
  6157  
  6158  func (c *ProjectsLocationsProvisioningConfigsPatchCall) doRequest(alt string) (*http.Response, error) {
  6159  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6160  	var body io.Reader = nil
  6161  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.provisioningconfig)
  6162  	if err != nil {
  6163  		return nil, err
  6164  	}
  6165  	c.urlParams_.Set("alt", alt)
  6166  	c.urlParams_.Set("prettyPrint", "false")
  6167  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  6168  	urls += "?" + c.urlParams_.Encode()
  6169  	req, err := http.NewRequest("PATCH", urls, body)
  6170  	if err != nil {
  6171  		return nil, err
  6172  	}
  6173  	req.Header = reqHeaders
  6174  	googleapi.Expand(req.URL, map[string]string{
  6175  		"name": c.name,
  6176  	})
  6177  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6178  }
  6179  
  6180  // Do executes the "baremetalsolution.projects.locations.provisioningConfigs.patch" call.
  6181  // Any non-2xx status code is an error. Response headers are in either
  6182  // *ProvisioningConfig.ServerResponse.Header or (if a response was returned at
  6183  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6184  // check whether the returned error was because http.StatusNotModified was
  6185  // returned.
  6186  func (c *ProjectsLocationsProvisioningConfigsPatchCall) Do(opts ...googleapi.CallOption) (*ProvisioningConfig, error) {
  6187  	gensupport.SetOptions(c.urlParams_, opts...)
  6188  	res, err := c.doRequest("json")
  6189  	if res != nil && res.StatusCode == http.StatusNotModified {
  6190  		if res.Body != nil {
  6191  			res.Body.Close()
  6192  		}
  6193  		return nil, gensupport.WrapError(&googleapi.Error{
  6194  			Code:   res.StatusCode,
  6195  			Header: res.Header,
  6196  		})
  6197  	}
  6198  	if err != nil {
  6199  		return nil, err
  6200  	}
  6201  	defer googleapi.CloseBody(res)
  6202  	if err := googleapi.CheckResponse(res); err != nil {
  6203  		return nil, gensupport.WrapError(err)
  6204  	}
  6205  	ret := &ProvisioningConfig{
  6206  		ServerResponse: googleapi.ServerResponse{
  6207  			Header:         res.Header,
  6208  			HTTPStatusCode: res.StatusCode,
  6209  		},
  6210  	}
  6211  	target := &ret
  6212  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6213  		return nil, err
  6214  	}
  6215  	return ret, nil
  6216  }
  6217  
  6218  type ProjectsLocationsProvisioningConfigsSubmitCall struct {
  6219  	s                               *Service
  6220  	parent                          string
  6221  	submitprovisioningconfigrequest *SubmitProvisioningConfigRequest
  6222  	urlParams_                      gensupport.URLParams
  6223  	ctx_                            context.Context
  6224  	header_                         http.Header
  6225  }
  6226  
  6227  // Submit: Submit a provisiong configuration for a given project.
  6228  //
  6229  // - parent: The parent project and location containing the ProvisioningConfig.
  6230  func (r *ProjectsLocationsProvisioningConfigsService) Submit(parent string, submitprovisioningconfigrequest *SubmitProvisioningConfigRequest) *ProjectsLocationsProvisioningConfigsSubmitCall {
  6231  	c := &ProjectsLocationsProvisioningConfigsSubmitCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6232  	c.parent = parent
  6233  	c.submitprovisioningconfigrequest = submitprovisioningconfigrequest
  6234  	return c
  6235  }
  6236  
  6237  // Fields allows partial responses to be retrieved. See
  6238  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6239  // details.
  6240  func (c *ProjectsLocationsProvisioningConfigsSubmitCall) Fields(s ...googleapi.Field) *ProjectsLocationsProvisioningConfigsSubmitCall {
  6241  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6242  	return c
  6243  }
  6244  
  6245  // Context sets the context to be used in this call's Do method.
  6246  func (c *ProjectsLocationsProvisioningConfigsSubmitCall) Context(ctx context.Context) *ProjectsLocationsProvisioningConfigsSubmitCall {
  6247  	c.ctx_ = ctx
  6248  	return c
  6249  }
  6250  
  6251  // Header returns a http.Header that can be modified by the caller to add
  6252  // headers to the request.
  6253  func (c *ProjectsLocationsProvisioningConfigsSubmitCall) Header() http.Header {
  6254  	if c.header_ == nil {
  6255  		c.header_ = make(http.Header)
  6256  	}
  6257  	return c.header_
  6258  }
  6259  
  6260  func (c *ProjectsLocationsProvisioningConfigsSubmitCall) doRequest(alt string) (*http.Response, error) {
  6261  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6262  	var body io.Reader = nil
  6263  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.submitprovisioningconfigrequest)
  6264  	if err != nil {
  6265  		return nil, err
  6266  	}
  6267  	c.urlParams_.Set("alt", alt)
  6268  	c.urlParams_.Set("prettyPrint", "false")
  6269  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/provisioningConfigs:submit")
  6270  	urls += "?" + c.urlParams_.Encode()
  6271  	req, err := http.NewRequest("POST", urls, body)
  6272  	if err != nil {
  6273  		return nil, err
  6274  	}
  6275  	req.Header = reqHeaders
  6276  	googleapi.Expand(req.URL, map[string]string{
  6277  		"parent": c.parent,
  6278  	})
  6279  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6280  }
  6281  
  6282  // Do executes the "baremetalsolution.projects.locations.provisioningConfigs.submit" call.
  6283  // Any non-2xx status code is an error. Response headers are in either
  6284  // *SubmitProvisioningConfigResponse.ServerResponse.Header or (if a response
  6285  // was returned at all) in error.(*googleapi.Error).Header. Use
  6286  // googleapi.IsNotModified to check whether the returned error was because
  6287  // http.StatusNotModified was returned.
  6288  func (c *ProjectsLocationsProvisioningConfigsSubmitCall) Do(opts ...googleapi.CallOption) (*SubmitProvisioningConfigResponse, error) {
  6289  	gensupport.SetOptions(c.urlParams_, opts...)
  6290  	res, err := c.doRequest("json")
  6291  	if res != nil && res.StatusCode == http.StatusNotModified {
  6292  		if res.Body != nil {
  6293  			res.Body.Close()
  6294  		}
  6295  		return nil, gensupport.WrapError(&googleapi.Error{
  6296  			Code:   res.StatusCode,
  6297  			Header: res.Header,
  6298  		})
  6299  	}
  6300  	if err != nil {
  6301  		return nil, err
  6302  	}
  6303  	defer googleapi.CloseBody(res)
  6304  	if err := googleapi.CheckResponse(res); err != nil {
  6305  		return nil, gensupport.WrapError(err)
  6306  	}
  6307  	ret := &SubmitProvisioningConfigResponse{
  6308  		ServerResponse: googleapi.ServerResponse{
  6309  			Header:         res.Header,
  6310  			HTTPStatusCode: res.StatusCode,
  6311  		},
  6312  	}
  6313  	target := &ret
  6314  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6315  		return nil, err
  6316  	}
  6317  	return ret, nil
  6318  }
  6319  
  6320  type ProjectsLocationsProvisioningQuotasListCall struct {
  6321  	s            *Service
  6322  	parent       string
  6323  	urlParams_   gensupport.URLParams
  6324  	ifNoneMatch_ string
  6325  	ctx_         context.Context
  6326  	header_      http.Header
  6327  }
  6328  
  6329  // List: List the budget details to provision resources on a given project.
  6330  //
  6331  // - parent: Parent value for ListProvisioningQuotasRequest.
  6332  func (r *ProjectsLocationsProvisioningQuotasService) List(parent string) *ProjectsLocationsProvisioningQuotasListCall {
  6333  	c := &ProjectsLocationsProvisioningQuotasListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6334  	c.parent = parent
  6335  	return c
  6336  }
  6337  
  6338  // PageSize sets the optional parameter "pageSize": Requested page size. The
  6339  // server might return fewer items than requested. If unspecified, server will
  6340  // pick an appropriate default. Notice that page_size field is not supported
  6341  // and won't be respected in the API request for now, will be updated when
  6342  // pagination is supported.
  6343  func (c *ProjectsLocationsProvisioningQuotasListCall) PageSize(pageSize int64) *ProjectsLocationsProvisioningQuotasListCall {
  6344  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6345  	return c
  6346  }
  6347  
  6348  // PageToken sets the optional parameter "pageToken": A token identifying a
  6349  // page of results from the server.
  6350  func (c *ProjectsLocationsProvisioningQuotasListCall) PageToken(pageToken string) *ProjectsLocationsProvisioningQuotasListCall {
  6351  	c.urlParams_.Set("pageToken", pageToken)
  6352  	return c
  6353  }
  6354  
  6355  // Fields allows partial responses to be retrieved. See
  6356  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6357  // details.
  6358  func (c *ProjectsLocationsProvisioningQuotasListCall) Fields(s ...googleapi.Field) *ProjectsLocationsProvisioningQuotasListCall {
  6359  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6360  	return c
  6361  }
  6362  
  6363  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6364  // object's ETag matches the given value. This is useful for getting updates
  6365  // only after the object has changed since the last request.
  6366  func (c *ProjectsLocationsProvisioningQuotasListCall) IfNoneMatch(entityTag string) *ProjectsLocationsProvisioningQuotasListCall {
  6367  	c.ifNoneMatch_ = entityTag
  6368  	return c
  6369  }
  6370  
  6371  // Context sets the context to be used in this call's Do method.
  6372  func (c *ProjectsLocationsProvisioningQuotasListCall) Context(ctx context.Context) *ProjectsLocationsProvisioningQuotasListCall {
  6373  	c.ctx_ = ctx
  6374  	return c
  6375  }
  6376  
  6377  // Header returns a http.Header that can be modified by the caller to add
  6378  // headers to the request.
  6379  func (c *ProjectsLocationsProvisioningQuotasListCall) Header() http.Header {
  6380  	if c.header_ == nil {
  6381  		c.header_ = make(http.Header)
  6382  	}
  6383  	return c.header_
  6384  }
  6385  
  6386  func (c *ProjectsLocationsProvisioningQuotasListCall) doRequest(alt string) (*http.Response, error) {
  6387  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6388  	if c.ifNoneMatch_ != "" {
  6389  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6390  	}
  6391  	var body io.Reader = nil
  6392  	c.urlParams_.Set("alt", alt)
  6393  	c.urlParams_.Set("prettyPrint", "false")
  6394  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/provisioningQuotas")
  6395  	urls += "?" + c.urlParams_.Encode()
  6396  	req, err := http.NewRequest("GET", urls, body)
  6397  	if err != nil {
  6398  		return nil, err
  6399  	}
  6400  	req.Header = reqHeaders
  6401  	googleapi.Expand(req.URL, map[string]string{
  6402  		"parent": c.parent,
  6403  	})
  6404  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6405  }
  6406  
  6407  // Do executes the "baremetalsolution.projects.locations.provisioningQuotas.list" call.
  6408  // Any non-2xx status code is an error. Response headers are in either
  6409  // *ListProvisioningQuotasResponse.ServerResponse.Header or (if a response was
  6410  // returned at all) in error.(*googleapi.Error).Header. Use
  6411  // googleapi.IsNotModified to check whether the returned error was because
  6412  // http.StatusNotModified was returned.
  6413  func (c *ProjectsLocationsProvisioningQuotasListCall) Do(opts ...googleapi.CallOption) (*ListProvisioningQuotasResponse, error) {
  6414  	gensupport.SetOptions(c.urlParams_, opts...)
  6415  	res, err := c.doRequest("json")
  6416  	if res != nil && res.StatusCode == http.StatusNotModified {
  6417  		if res.Body != nil {
  6418  			res.Body.Close()
  6419  		}
  6420  		return nil, gensupport.WrapError(&googleapi.Error{
  6421  			Code:   res.StatusCode,
  6422  			Header: res.Header,
  6423  		})
  6424  	}
  6425  	if err != nil {
  6426  		return nil, err
  6427  	}
  6428  	defer googleapi.CloseBody(res)
  6429  	if err := googleapi.CheckResponse(res); err != nil {
  6430  		return nil, gensupport.WrapError(err)
  6431  	}
  6432  	ret := &ListProvisioningQuotasResponse{
  6433  		ServerResponse: googleapi.ServerResponse{
  6434  			Header:         res.Header,
  6435  			HTTPStatusCode: res.StatusCode,
  6436  		},
  6437  	}
  6438  	target := &ret
  6439  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6440  		return nil, err
  6441  	}
  6442  	return ret, nil
  6443  }
  6444  
  6445  // Pages invokes f for each page of results.
  6446  // A non-nil error returned from f will halt the iteration.
  6447  // The provided context supersedes any context provided to the Context method.
  6448  func (c *ProjectsLocationsProvisioningQuotasListCall) Pages(ctx context.Context, f func(*ListProvisioningQuotasResponse) error) error {
  6449  	c.ctx_ = ctx
  6450  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  6451  	for {
  6452  		x, err := c.Do()
  6453  		if err != nil {
  6454  			return err
  6455  		}
  6456  		if err := f(x); err != nil {
  6457  			return err
  6458  		}
  6459  		if x.NextPageToken == "" {
  6460  			return nil
  6461  		}
  6462  		c.PageToken(x.NextPageToken)
  6463  	}
  6464  }
  6465  
  6466  type ProjectsLocationsSshKeysCreateCall struct {
  6467  	s          *Service
  6468  	parent     string
  6469  	sshkey     *SSHKey
  6470  	urlParams_ gensupport.URLParams
  6471  	ctx_       context.Context
  6472  	header_    http.Header
  6473  }
  6474  
  6475  // Create: Register a public SSH key in the specified project for use with the
  6476  // interactive serial console feature.
  6477  //
  6478  // - parent: The parent containing the SSH keys.
  6479  func (r *ProjectsLocationsSshKeysService) Create(parent string, sshkey *SSHKey) *ProjectsLocationsSshKeysCreateCall {
  6480  	c := &ProjectsLocationsSshKeysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6481  	c.parent = parent
  6482  	c.sshkey = sshkey
  6483  	return c
  6484  }
  6485  
  6486  // SshKeyId sets the optional parameter "sshKeyId": Required. The ID to use for
  6487  // the key, which will become the final component of the key's resource name.
  6488  // This value must match the regex: [a-zA-Z0-9@.\-_]{1,64}
  6489  func (c *ProjectsLocationsSshKeysCreateCall) SshKeyId(sshKeyId string) *ProjectsLocationsSshKeysCreateCall {
  6490  	c.urlParams_.Set("sshKeyId", sshKeyId)
  6491  	return c
  6492  }
  6493  
  6494  // Fields allows partial responses to be retrieved. See
  6495  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6496  // details.
  6497  func (c *ProjectsLocationsSshKeysCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsSshKeysCreateCall {
  6498  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6499  	return c
  6500  }
  6501  
  6502  // Context sets the context to be used in this call's Do method.
  6503  func (c *ProjectsLocationsSshKeysCreateCall) Context(ctx context.Context) *ProjectsLocationsSshKeysCreateCall {
  6504  	c.ctx_ = ctx
  6505  	return c
  6506  }
  6507  
  6508  // Header returns a http.Header that can be modified by the caller to add
  6509  // headers to the request.
  6510  func (c *ProjectsLocationsSshKeysCreateCall) Header() http.Header {
  6511  	if c.header_ == nil {
  6512  		c.header_ = make(http.Header)
  6513  	}
  6514  	return c.header_
  6515  }
  6516  
  6517  func (c *ProjectsLocationsSshKeysCreateCall) doRequest(alt string) (*http.Response, error) {
  6518  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6519  	var body io.Reader = nil
  6520  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.sshkey)
  6521  	if err != nil {
  6522  		return nil, err
  6523  	}
  6524  	c.urlParams_.Set("alt", alt)
  6525  	c.urlParams_.Set("prettyPrint", "false")
  6526  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sshKeys")
  6527  	urls += "?" + c.urlParams_.Encode()
  6528  	req, err := http.NewRequest("POST", urls, body)
  6529  	if err != nil {
  6530  		return nil, err
  6531  	}
  6532  	req.Header = reqHeaders
  6533  	googleapi.Expand(req.URL, map[string]string{
  6534  		"parent": c.parent,
  6535  	})
  6536  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6537  }
  6538  
  6539  // Do executes the "baremetalsolution.projects.locations.sshKeys.create" call.
  6540  // Any non-2xx status code is an error. Response headers are in either
  6541  // *SSHKey.ServerResponse.Header or (if a response was returned at all) in
  6542  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6543  // whether the returned error was because http.StatusNotModified was returned.
  6544  func (c *ProjectsLocationsSshKeysCreateCall) Do(opts ...googleapi.CallOption) (*SSHKey, error) {
  6545  	gensupport.SetOptions(c.urlParams_, opts...)
  6546  	res, err := c.doRequest("json")
  6547  	if res != nil && res.StatusCode == http.StatusNotModified {
  6548  		if res.Body != nil {
  6549  			res.Body.Close()
  6550  		}
  6551  		return nil, gensupport.WrapError(&googleapi.Error{
  6552  			Code:   res.StatusCode,
  6553  			Header: res.Header,
  6554  		})
  6555  	}
  6556  	if err != nil {
  6557  		return nil, err
  6558  	}
  6559  	defer googleapi.CloseBody(res)
  6560  	if err := googleapi.CheckResponse(res); err != nil {
  6561  		return nil, gensupport.WrapError(err)
  6562  	}
  6563  	ret := &SSHKey{
  6564  		ServerResponse: googleapi.ServerResponse{
  6565  			Header:         res.Header,
  6566  			HTTPStatusCode: res.StatusCode,
  6567  		},
  6568  	}
  6569  	target := &ret
  6570  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6571  		return nil, err
  6572  	}
  6573  	return ret, nil
  6574  }
  6575  
  6576  type ProjectsLocationsSshKeysDeleteCall struct {
  6577  	s          *Service
  6578  	name       string
  6579  	urlParams_ gensupport.URLParams
  6580  	ctx_       context.Context
  6581  	header_    http.Header
  6582  }
  6583  
  6584  // Delete: Deletes a public SSH key registered in the specified project.
  6585  //
  6586  //   - name: The name of the SSH key to delete. Currently, the only valid value
  6587  //     for the location is "global".
  6588  func (r *ProjectsLocationsSshKeysService) Delete(name string) *ProjectsLocationsSshKeysDeleteCall {
  6589  	c := &ProjectsLocationsSshKeysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6590  	c.name = name
  6591  	return c
  6592  }
  6593  
  6594  // Fields allows partial responses to be retrieved. See
  6595  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6596  // details.
  6597  func (c *ProjectsLocationsSshKeysDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsSshKeysDeleteCall {
  6598  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6599  	return c
  6600  }
  6601  
  6602  // Context sets the context to be used in this call's Do method.
  6603  func (c *ProjectsLocationsSshKeysDeleteCall) Context(ctx context.Context) *ProjectsLocationsSshKeysDeleteCall {
  6604  	c.ctx_ = ctx
  6605  	return c
  6606  }
  6607  
  6608  // Header returns a http.Header that can be modified by the caller to add
  6609  // headers to the request.
  6610  func (c *ProjectsLocationsSshKeysDeleteCall) Header() http.Header {
  6611  	if c.header_ == nil {
  6612  		c.header_ = make(http.Header)
  6613  	}
  6614  	return c.header_
  6615  }
  6616  
  6617  func (c *ProjectsLocationsSshKeysDeleteCall) doRequest(alt string) (*http.Response, error) {
  6618  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6619  	var body io.Reader = nil
  6620  	c.urlParams_.Set("alt", alt)
  6621  	c.urlParams_.Set("prettyPrint", "false")
  6622  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  6623  	urls += "?" + c.urlParams_.Encode()
  6624  	req, err := http.NewRequest("DELETE", urls, body)
  6625  	if err != nil {
  6626  		return nil, err
  6627  	}
  6628  	req.Header = reqHeaders
  6629  	googleapi.Expand(req.URL, map[string]string{
  6630  		"name": c.name,
  6631  	})
  6632  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6633  }
  6634  
  6635  // Do executes the "baremetalsolution.projects.locations.sshKeys.delete" call.
  6636  // Any non-2xx status code is an error. Response headers are in either
  6637  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  6638  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6639  // whether the returned error was because http.StatusNotModified was returned.
  6640  func (c *ProjectsLocationsSshKeysDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  6641  	gensupport.SetOptions(c.urlParams_, opts...)
  6642  	res, err := c.doRequest("json")
  6643  	if res != nil && res.StatusCode == http.StatusNotModified {
  6644  		if res.Body != nil {
  6645  			res.Body.Close()
  6646  		}
  6647  		return nil, gensupport.WrapError(&googleapi.Error{
  6648  			Code:   res.StatusCode,
  6649  			Header: res.Header,
  6650  		})
  6651  	}
  6652  	if err != nil {
  6653  		return nil, err
  6654  	}
  6655  	defer googleapi.CloseBody(res)
  6656  	if err := googleapi.CheckResponse(res); err != nil {
  6657  		return nil, gensupport.WrapError(err)
  6658  	}
  6659  	ret := &Empty{
  6660  		ServerResponse: googleapi.ServerResponse{
  6661  			Header:         res.Header,
  6662  			HTTPStatusCode: res.StatusCode,
  6663  		},
  6664  	}
  6665  	target := &ret
  6666  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6667  		return nil, err
  6668  	}
  6669  	return ret, nil
  6670  }
  6671  
  6672  type ProjectsLocationsSshKeysListCall struct {
  6673  	s            *Service
  6674  	parent       string
  6675  	urlParams_   gensupport.URLParams
  6676  	ifNoneMatch_ string
  6677  	ctx_         context.Context
  6678  	header_      http.Header
  6679  }
  6680  
  6681  // List: Lists the public SSH keys registered for the specified project. These
  6682  // SSH keys are used only for the interactive serial console feature.
  6683  //
  6684  //   - parent: The parent containing the SSH keys. Currently, the only valid
  6685  //     value for the location is "global".
  6686  func (r *ProjectsLocationsSshKeysService) List(parent string) *ProjectsLocationsSshKeysListCall {
  6687  	c := &ProjectsLocationsSshKeysListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6688  	c.parent = parent
  6689  	return c
  6690  }
  6691  
  6692  // PageSize sets the optional parameter "pageSize": The maximum number of items
  6693  // to return.
  6694  func (c *ProjectsLocationsSshKeysListCall) PageSize(pageSize int64) *ProjectsLocationsSshKeysListCall {
  6695  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6696  	return c
  6697  }
  6698  
  6699  // PageToken sets the optional parameter "pageToken": The next_page_token value
  6700  // returned from a previous List request, if any.
  6701  func (c *ProjectsLocationsSshKeysListCall) PageToken(pageToken string) *ProjectsLocationsSshKeysListCall {
  6702  	c.urlParams_.Set("pageToken", pageToken)
  6703  	return c
  6704  }
  6705  
  6706  // Fields allows partial responses to be retrieved. See
  6707  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6708  // details.
  6709  func (c *ProjectsLocationsSshKeysListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSshKeysListCall {
  6710  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6711  	return c
  6712  }
  6713  
  6714  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6715  // object's ETag matches the given value. This is useful for getting updates
  6716  // only after the object has changed since the last request.
  6717  func (c *ProjectsLocationsSshKeysListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSshKeysListCall {
  6718  	c.ifNoneMatch_ = entityTag
  6719  	return c
  6720  }
  6721  
  6722  // Context sets the context to be used in this call's Do method.
  6723  func (c *ProjectsLocationsSshKeysListCall) Context(ctx context.Context) *ProjectsLocationsSshKeysListCall {
  6724  	c.ctx_ = ctx
  6725  	return c
  6726  }
  6727  
  6728  // Header returns a http.Header that can be modified by the caller to add
  6729  // headers to the request.
  6730  func (c *ProjectsLocationsSshKeysListCall) Header() http.Header {
  6731  	if c.header_ == nil {
  6732  		c.header_ = make(http.Header)
  6733  	}
  6734  	return c.header_
  6735  }
  6736  
  6737  func (c *ProjectsLocationsSshKeysListCall) doRequest(alt string) (*http.Response, error) {
  6738  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6739  	if c.ifNoneMatch_ != "" {
  6740  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6741  	}
  6742  	var body io.Reader = nil
  6743  	c.urlParams_.Set("alt", alt)
  6744  	c.urlParams_.Set("prettyPrint", "false")
  6745  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sshKeys")
  6746  	urls += "?" + c.urlParams_.Encode()
  6747  	req, err := http.NewRequest("GET", urls, body)
  6748  	if err != nil {
  6749  		return nil, err
  6750  	}
  6751  	req.Header = reqHeaders
  6752  	googleapi.Expand(req.URL, map[string]string{
  6753  		"parent": c.parent,
  6754  	})
  6755  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6756  }
  6757  
  6758  // Do executes the "baremetalsolution.projects.locations.sshKeys.list" call.
  6759  // Any non-2xx status code is an error. Response headers are in either
  6760  // *ListSSHKeysResponse.ServerResponse.Header or (if a response was returned at
  6761  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6762  // check whether the returned error was because http.StatusNotModified was
  6763  // returned.
  6764  func (c *ProjectsLocationsSshKeysListCall) Do(opts ...googleapi.CallOption) (*ListSSHKeysResponse, error) {
  6765  	gensupport.SetOptions(c.urlParams_, opts...)
  6766  	res, err := c.doRequest("json")
  6767  	if res != nil && res.StatusCode == http.StatusNotModified {
  6768  		if res.Body != nil {
  6769  			res.Body.Close()
  6770  		}
  6771  		return nil, gensupport.WrapError(&googleapi.Error{
  6772  			Code:   res.StatusCode,
  6773  			Header: res.Header,
  6774  		})
  6775  	}
  6776  	if err != nil {
  6777  		return nil, err
  6778  	}
  6779  	defer googleapi.CloseBody(res)
  6780  	if err := googleapi.CheckResponse(res); err != nil {
  6781  		return nil, gensupport.WrapError(err)
  6782  	}
  6783  	ret := &ListSSHKeysResponse{
  6784  		ServerResponse: googleapi.ServerResponse{
  6785  			Header:         res.Header,
  6786  			HTTPStatusCode: res.StatusCode,
  6787  		},
  6788  	}
  6789  	target := &ret
  6790  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6791  		return nil, err
  6792  	}
  6793  	return ret, nil
  6794  }
  6795  
  6796  // Pages invokes f for each page of results.
  6797  // A non-nil error returned from f will halt the iteration.
  6798  // The provided context supersedes any context provided to the Context method.
  6799  func (c *ProjectsLocationsSshKeysListCall) Pages(ctx context.Context, f func(*ListSSHKeysResponse) error) error {
  6800  	c.ctx_ = ctx
  6801  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  6802  	for {
  6803  		x, err := c.Do()
  6804  		if err != nil {
  6805  			return err
  6806  		}
  6807  		if err := f(x); err != nil {
  6808  			return err
  6809  		}
  6810  		if x.NextPageToken == "" {
  6811  			return nil
  6812  		}
  6813  		c.PageToken(x.NextPageToken)
  6814  	}
  6815  }
  6816  
  6817  type ProjectsLocationsVolumesEvictCall struct {
  6818  	s                  *Service
  6819  	name               string
  6820  	evictvolumerequest *EvictVolumeRequest
  6821  	urlParams_         gensupport.URLParams
  6822  	ctx_               context.Context
  6823  	header_            http.Header
  6824  }
  6825  
  6826  // Evict: Skips volume's cooloff and deletes it now. Volume must be in cooloff
  6827  // state.
  6828  //
  6829  // - name: The name of the Volume.
  6830  func (r *ProjectsLocationsVolumesService) Evict(name string, evictvolumerequest *EvictVolumeRequest) *ProjectsLocationsVolumesEvictCall {
  6831  	c := &ProjectsLocationsVolumesEvictCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6832  	c.name = name
  6833  	c.evictvolumerequest = evictvolumerequest
  6834  	return c
  6835  }
  6836  
  6837  // Fields allows partial responses to be retrieved. See
  6838  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6839  // details.
  6840  func (c *ProjectsLocationsVolumesEvictCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesEvictCall {
  6841  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6842  	return c
  6843  }
  6844  
  6845  // Context sets the context to be used in this call's Do method.
  6846  func (c *ProjectsLocationsVolumesEvictCall) Context(ctx context.Context) *ProjectsLocationsVolumesEvictCall {
  6847  	c.ctx_ = ctx
  6848  	return c
  6849  }
  6850  
  6851  // Header returns a http.Header that can be modified by the caller to add
  6852  // headers to the request.
  6853  func (c *ProjectsLocationsVolumesEvictCall) Header() http.Header {
  6854  	if c.header_ == nil {
  6855  		c.header_ = make(http.Header)
  6856  	}
  6857  	return c.header_
  6858  }
  6859  
  6860  func (c *ProjectsLocationsVolumesEvictCall) doRequest(alt string) (*http.Response, error) {
  6861  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6862  	var body io.Reader = nil
  6863  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.evictvolumerequest)
  6864  	if err != nil {
  6865  		return nil, err
  6866  	}
  6867  	c.urlParams_.Set("alt", alt)
  6868  	c.urlParams_.Set("prettyPrint", "false")
  6869  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:evict")
  6870  	urls += "?" + c.urlParams_.Encode()
  6871  	req, err := http.NewRequest("POST", urls, body)
  6872  	if err != nil {
  6873  		return nil, err
  6874  	}
  6875  	req.Header = reqHeaders
  6876  	googleapi.Expand(req.URL, map[string]string{
  6877  		"name": c.name,
  6878  	})
  6879  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6880  }
  6881  
  6882  // Do executes the "baremetalsolution.projects.locations.volumes.evict" call.
  6883  // Any non-2xx status code is an error. Response headers are in either
  6884  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  6885  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6886  // whether the returned error was because http.StatusNotModified was returned.
  6887  func (c *ProjectsLocationsVolumesEvictCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  6888  	gensupport.SetOptions(c.urlParams_, opts...)
  6889  	res, err := c.doRequest("json")
  6890  	if res != nil && res.StatusCode == http.StatusNotModified {
  6891  		if res.Body != nil {
  6892  			res.Body.Close()
  6893  		}
  6894  		return nil, gensupport.WrapError(&googleapi.Error{
  6895  			Code:   res.StatusCode,
  6896  			Header: res.Header,
  6897  		})
  6898  	}
  6899  	if err != nil {
  6900  		return nil, err
  6901  	}
  6902  	defer googleapi.CloseBody(res)
  6903  	if err := googleapi.CheckResponse(res); err != nil {
  6904  		return nil, gensupport.WrapError(err)
  6905  	}
  6906  	ret := &Operation{
  6907  		ServerResponse: googleapi.ServerResponse{
  6908  			Header:         res.Header,
  6909  			HTTPStatusCode: res.StatusCode,
  6910  		},
  6911  	}
  6912  	target := &ret
  6913  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6914  		return nil, err
  6915  	}
  6916  	return ret, nil
  6917  }
  6918  
  6919  type ProjectsLocationsVolumesGetCall struct {
  6920  	s            *Service
  6921  	name         string
  6922  	urlParams_   gensupport.URLParams
  6923  	ifNoneMatch_ string
  6924  	ctx_         context.Context
  6925  	header_      http.Header
  6926  }
  6927  
  6928  // Get: Get details of a single storage volume.
  6929  //
  6930  // - name: Name of the resource.
  6931  func (r *ProjectsLocationsVolumesService) Get(name string) *ProjectsLocationsVolumesGetCall {
  6932  	c := &ProjectsLocationsVolumesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6933  	c.name = name
  6934  	return c
  6935  }
  6936  
  6937  // Fields allows partial responses to be retrieved. See
  6938  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6939  // details.
  6940  func (c *ProjectsLocationsVolumesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesGetCall {
  6941  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6942  	return c
  6943  }
  6944  
  6945  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6946  // object's ETag matches the given value. This is useful for getting updates
  6947  // only after the object has changed since the last request.
  6948  func (c *ProjectsLocationsVolumesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsVolumesGetCall {
  6949  	c.ifNoneMatch_ = entityTag
  6950  	return c
  6951  }
  6952  
  6953  // Context sets the context to be used in this call's Do method.
  6954  func (c *ProjectsLocationsVolumesGetCall) Context(ctx context.Context) *ProjectsLocationsVolumesGetCall {
  6955  	c.ctx_ = ctx
  6956  	return c
  6957  }
  6958  
  6959  // Header returns a http.Header that can be modified by the caller to add
  6960  // headers to the request.
  6961  func (c *ProjectsLocationsVolumesGetCall) Header() http.Header {
  6962  	if c.header_ == nil {
  6963  		c.header_ = make(http.Header)
  6964  	}
  6965  	return c.header_
  6966  }
  6967  
  6968  func (c *ProjectsLocationsVolumesGetCall) doRequest(alt string) (*http.Response, error) {
  6969  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6970  	if c.ifNoneMatch_ != "" {
  6971  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6972  	}
  6973  	var body io.Reader = nil
  6974  	c.urlParams_.Set("alt", alt)
  6975  	c.urlParams_.Set("prettyPrint", "false")
  6976  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  6977  	urls += "?" + c.urlParams_.Encode()
  6978  	req, err := http.NewRequest("GET", urls, body)
  6979  	if err != nil {
  6980  		return nil, err
  6981  	}
  6982  	req.Header = reqHeaders
  6983  	googleapi.Expand(req.URL, map[string]string{
  6984  		"name": c.name,
  6985  	})
  6986  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6987  }
  6988  
  6989  // Do executes the "baremetalsolution.projects.locations.volumes.get" call.
  6990  // Any non-2xx status code is an error. Response headers are in either
  6991  // *Volume.ServerResponse.Header or (if a response was returned at all) in
  6992  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6993  // whether the returned error was because http.StatusNotModified was returned.
  6994  func (c *ProjectsLocationsVolumesGetCall) Do(opts ...googleapi.CallOption) (*Volume, error) {
  6995  	gensupport.SetOptions(c.urlParams_, opts...)
  6996  	res, err := c.doRequest("json")
  6997  	if res != nil && res.StatusCode == http.StatusNotModified {
  6998  		if res.Body != nil {
  6999  			res.Body.Close()
  7000  		}
  7001  		return nil, gensupport.WrapError(&googleapi.Error{
  7002  			Code:   res.StatusCode,
  7003  			Header: res.Header,
  7004  		})
  7005  	}
  7006  	if err != nil {
  7007  		return nil, err
  7008  	}
  7009  	defer googleapi.CloseBody(res)
  7010  	if err := googleapi.CheckResponse(res); err != nil {
  7011  		return nil, gensupport.WrapError(err)
  7012  	}
  7013  	ret := &Volume{
  7014  		ServerResponse: googleapi.ServerResponse{
  7015  			Header:         res.Header,
  7016  			HTTPStatusCode: res.StatusCode,
  7017  		},
  7018  	}
  7019  	target := &ret
  7020  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7021  		return nil, err
  7022  	}
  7023  	return ret, nil
  7024  }
  7025  
  7026  type ProjectsLocationsVolumesListCall struct {
  7027  	s            *Service
  7028  	parent       string
  7029  	urlParams_   gensupport.URLParams
  7030  	ifNoneMatch_ string
  7031  	ctx_         context.Context
  7032  	header_      http.Header
  7033  }
  7034  
  7035  // List: List storage volumes in a given project and location.
  7036  //
  7037  // - parent: Parent value for ListVolumesRequest.
  7038  func (r *ProjectsLocationsVolumesService) List(parent string) *ProjectsLocationsVolumesListCall {
  7039  	c := &ProjectsLocationsVolumesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7040  	c.parent = parent
  7041  	return c
  7042  }
  7043  
  7044  // Filter sets the optional parameter "filter": List filter.
  7045  func (c *ProjectsLocationsVolumesListCall) Filter(filter string) *ProjectsLocationsVolumesListCall {
  7046  	c.urlParams_.Set("filter", filter)
  7047  	return c
  7048  }
  7049  
  7050  // PageSize sets the optional parameter "pageSize": Requested page size. The
  7051  // server might return fewer items than requested. If unspecified, server will
  7052  // pick an appropriate default.
  7053  func (c *ProjectsLocationsVolumesListCall) PageSize(pageSize int64) *ProjectsLocationsVolumesListCall {
  7054  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  7055  	return c
  7056  }
  7057  
  7058  // PageToken sets the optional parameter "pageToken": A token identifying a
  7059  // page of results from the server.
  7060  func (c *ProjectsLocationsVolumesListCall) PageToken(pageToken string) *ProjectsLocationsVolumesListCall {
  7061  	c.urlParams_.Set("pageToken", pageToken)
  7062  	return c
  7063  }
  7064  
  7065  // Fields allows partial responses to be retrieved. See
  7066  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7067  // details.
  7068  func (c *ProjectsLocationsVolumesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesListCall {
  7069  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7070  	return c
  7071  }
  7072  
  7073  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7074  // object's ETag matches the given value. This is useful for getting updates
  7075  // only after the object has changed since the last request.
  7076  func (c *ProjectsLocationsVolumesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsVolumesListCall {
  7077  	c.ifNoneMatch_ = entityTag
  7078  	return c
  7079  }
  7080  
  7081  // Context sets the context to be used in this call's Do method.
  7082  func (c *ProjectsLocationsVolumesListCall) Context(ctx context.Context) *ProjectsLocationsVolumesListCall {
  7083  	c.ctx_ = ctx
  7084  	return c
  7085  }
  7086  
  7087  // Header returns a http.Header that can be modified by the caller to add
  7088  // headers to the request.
  7089  func (c *ProjectsLocationsVolumesListCall) Header() http.Header {
  7090  	if c.header_ == nil {
  7091  		c.header_ = make(http.Header)
  7092  	}
  7093  	return c.header_
  7094  }
  7095  
  7096  func (c *ProjectsLocationsVolumesListCall) doRequest(alt string) (*http.Response, error) {
  7097  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7098  	if c.ifNoneMatch_ != "" {
  7099  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7100  	}
  7101  	var body io.Reader = nil
  7102  	c.urlParams_.Set("alt", alt)
  7103  	c.urlParams_.Set("prettyPrint", "false")
  7104  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/volumes")
  7105  	urls += "?" + c.urlParams_.Encode()
  7106  	req, err := http.NewRequest("GET", urls, body)
  7107  	if err != nil {
  7108  		return nil, err
  7109  	}
  7110  	req.Header = reqHeaders
  7111  	googleapi.Expand(req.URL, map[string]string{
  7112  		"parent": c.parent,
  7113  	})
  7114  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7115  }
  7116  
  7117  // Do executes the "baremetalsolution.projects.locations.volumes.list" call.
  7118  // Any non-2xx status code is an error. Response headers are in either
  7119  // *ListVolumesResponse.ServerResponse.Header or (if a response was returned at
  7120  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  7121  // check whether the returned error was because http.StatusNotModified was
  7122  // returned.
  7123  func (c *ProjectsLocationsVolumesListCall) Do(opts ...googleapi.CallOption) (*ListVolumesResponse, error) {
  7124  	gensupport.SetOptions(c.urlParams_, opts...)
  7125  	res, err := c.doRequest("json")
  7126  	if res != nil && res.StatusCode == http.StatusNotModified {
  7127  		if res.Body != nil {
  7128  			res.Body.Close()
  7129  		}
  7130  		return nil, gensupport.WrapError(&googleapi.Error{
  7131  			Code:   res.StatusCode,
  7132  			Header: res.Header,
  7133  		})
  7134  	}
  7135  	if err != nil {
  7136  		return nil, err
  7137  	}
  7138  	defer googleapi.CloseBody(res)
  7139  	if err := googleapi.CheckResponse(res); err != nil {
  7140  		return nil, gensupport.WrapError(err)
  7141  	}
  7142  	ret := &ListVolumesResponse{
  7143  		ServerResponse: googleapi.ServerResponse{
  7144  			Header:         res.Header,
  7145  			HTTPStatusCode: res.StatusCode,
  7146  		},
  7147  	}
  7148  	target := &ret
  7149  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7150  		return nil, err
  7151  	}
  7152  	return ret, nil
  7153  }
  7154  
  7155  // Pages invokes f for each page of results.
  7156  // A non-nil error returned from f will halt the iteration.
  7157  // The provided context supersedes any context provided to the Context method.
  7158  func (c *ProjectsLocationsVolumesListCall) Pages(ctx context.Context, f func(*ListVolumesResponse) error) error {
  7159  	c.ctx_ = ctx
  7160  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  7161  	for {
  7162  		x, err := c.Do()
  7163  		if err != nil {
  7164  			return err
  7165  		}
  7166  		if err := f(x); err != nil {
  7167  			return err
  7168  		}
  7169  		if x.NextPageToken == "" {
  7170  			return nil
  7171  		}
  7172  		c.PageToken(x.NextPageToken)
  7173  	}
  7174  }
  7175  
  7176  type ProjectsLocationsVolumesPatchCall struct {
  7177  	s          *Service
  7178  	name       string
  7179  	volume     *Volume
  7180  	urlParams_ gensupport.URLParams
  7181  	ctx_       context.Context
  7182  	header_    http.Header
  7183  }
  7184  
  7185  // Patch: Update details of a single storage volume.
  7186  //
  7187  //   - name: Output only. The resource name of this `Volume`. Resource names are
  7188  //     schemeless URIs that follow the conventions in
  7189  //     https://cloud.google.com/apis/design/resource_names. Format:
  7190  //     `projects/{project}/locations/{location}/volumes/{volume}`.
  7191  func (r *ProjectsLocationsVolumesService) Patch(name string, volume *Volume) *ProjectsLocationsVolumesPatchCall {
  7192  	c := &ProjectsLocationsVolumesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7193  	c.name = name
  7194  	c.volume = volume
  7195  	return c
  7196  }
  7197  
  7198  // UpdateMask sets the optional parameter "updateMask": The list of fields to
  7199  // update. The only currently supported fields are: 'labels'
  7200  func (c *ProjectsLocationsVolumesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsVolumesPatchCall {
  7201  	c.urlParams_.Set("updateMask", updateMask)
  7202  	return c
  7203  }
  7204  
  7205  // Fields allows partial responses to be retrieved. See
  7206  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7207  // details.
  7208  func (c *ProjectsLocationsVolumesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesPatchCall {
  7209  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7210  	return c
  7211  }
  7212  
  7213  // Context sets the context to be used in this call's Do method.
  7214  func (c *ProjectsLocationsVolumesPatchCall) Context(ctx context.Context) *ProjectsLocationsVolumesPatchCall {
  7215  	c.ctx_ = ctx
  7216  	return c
  7217  }
  7218  
  7219  // Header returns a http.Header that can be modified by the caller to add
  7220  // headers to the request.
  7221  func (c *ProjectsLocationsVolumesPatchCall) Header() http.Header {
  7222  	if c.header_ == nil {
  7223  		c.header_ = make(http.Header)
  7224  	}
  7225  	return c.header_
  7226  }
  7227  
  7228  func (c *ProjectsLocationsVolumesPatchCall) doRequest(alt string) (*http.Response, error) {
  7229  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7230  	var body io.Reader = nil
  7231  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.volume)
  7232  	if err != nil {
  7233  		return nil, err
  7234  	}
  7235  	c.urlParams_.Set("alt", alt)
  7236  	c.urlParams_.Set("prettyPrint", "false")
  7237  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  7238  	urls += "?" + c.urlParams_.Encode()
  7239  	req, err := http.NewRequest("PATCH", urls, body)
  7240  	if err != nil {
  7241  		return nil, err
  7242  	}
  7243  	req.Header = reqHeaders
  7244  	googleapi.Expand(req.URL, map[string]string{
  7245  		"name": c.name,
  7246  	})
  7247  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7248  }
  7249  
  7250  // Do executes the "baremetalsolution.projects.locations.volumes.patch" call.
  7251  // Any non-2xx status code is an error. Response headers are in either
  7252  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  7253  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7254  // whether the returned error was because http.StatusNotModified was returned.
  7255  func (c *ProjectsLocationsVolumesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7256  	gensupport.SetOptions(c.urlParams_, opts...)
  7257  	res, err := c.doRequest("json")
  7258  	if res != nil && res.StatusCode == http.StatusNotModified {
  7259  		if res.Body != nil {
  7260  			res.Body.Close()
  7261  		}
  7262  		return nil, gensupport.WrapError(&googleapi.Error{
  7263  			Code:   res.StatusCode,
  7264  			Header: res.Header,
  7265  		})
  7266  	}
  7267  	if err != nil {
  7268  		return nil, err
  7269  	}
  7270  	defer googleapi.CloseBody(res)
  7271  	if err := googleapi.CheckResponse(res); err != nil {
  7272  		return nil, gensupport.WrapError(err)
  7273  	}
  7274  	ret := &Operation{
  7275  		ServerResponse: googleapi.ServerResponse{
  7276  			Header:         res.Header,
  7277  			HTTPStatusCode: res.StatusCode,
  7278  		},
  7279  	}
  7280  	target := &ret
  7281  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7282  		return nil, err
  7283  	}
  7284  	return ret, nil
  7285  }
  7286  
  7287  type ProjectsLocationsVolumesRenameCall struct {
  7288  	s                   *Service
  7289  	name                string
  7290  	renamevolumerequest *RenameVolumeRequest
  7291  	urlParams_          gensupport.URLParams
  7292  	ctx_                context.Context
  7293  	header_             http.Header
  7294  }
  7295  
  7296  // Rename: RenameVolume sets a new name for a volume. Use with caution,
  7297  // previous names become immediately invalidated.
  7298  //
  7299  //   - name: The `name` field is used to identify the volume. Format:
  7300  //     projects/{project}/locations/{location}/volumes/{volume}.
  7301  func (r *ProjectsLocationsVolumesService) Rename(name string, renamevolumerequest *RenameVolumeRequest) *ProjectsLocationsVolumesRenameCall {
  7302  	c := &ProjectsLocationsVolumesRenameCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7303  	c.name = name
  7304  	c.renamevolumerequest = renamevolumerequest
  7305  	return c
  7306  }
  7307  
  7308  // Fields allows partial responses to be retrieved. See
  7309  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7310  // details.
  7311  func (c *ProjectsLocationsVolumesRenameCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesRenameCall {
  7312  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7313  	return c
  7314  }
  7315  
  7316  // Context sets the context to be used in this call's Do method.
  7317  func (c *ProjectsLocationsVolumesRenameCall) Context(ctx context.Context) *ProjectsLocationsVolumesRenameCall {
  7318  	c.ctx_ = ctx
  7319  	return c
  7320  }
  7321  
  7322  // Header returns a http.Header that can be modified by the caller to add
  7323  // headers to the request.
  7324  func (c *ProjectsLocationsVolumesRenameCall) Header() http.Header {
  7325  	if c.header_ == nil {
  7326  		c.header_ = make(http.Header)
  7327  	}
  7328  	return c.header_
  7329  }
  7330  
  7331  func (c *ProjectsLocationsVolumesRenameCall) doRequest(alt string) (*http.Response, error) {
  7332  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7333  	var body io.Reader = nil
  7334  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.renamevolumerequest)
  7335  	if err != nil {
  7336  		return nil, err
  7337  	}
  7338  	c.urlParams_.Set("alt", alt)
  7339  	c.urlParams_.Set("prettyPrint", "false")
  7340  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:rename")
  7341  	urls += "?" + c.urlParams_.Encode()
  7342  	req, err := http.NewRequest("POST", urls, body)
  7343  	if err != nil {
  7344  		return nil, err
  7345  	}
  7346  	req.Header = reqHeaders
  7347  	googleapi.Expand(req.URL, map[string]string{
  7348  		"name": c.name,
  7349  	})
  7350  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7351  }
  7352  
  7353  // Do executes the "baremetalsolution.projects.locations.volumes.rename" call.
  7354  // Any non-2xx status code is an error. Response headers are in either
  7355  // *Volume.ServerResponse.Header or (if a response was returned at all) in
  7356  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7357  // whether the returned error was because http.StatusNotModified was returned.
  7358  func (c *ProjectsLocationsVolumesRenameCall) Do(opts ...googleapi.CallOption) (*Volume, error) {
  7359  	gensupport.SetOptions(c.urlParams_, opts...)
  7360  	res, err := c.doRequest("json")
  7361  	if res != nil && res.StatusCode == http.StatusNotModified {
  7362  		if res.Body != nil {
  7363  			res.Body.Close()
  7364  		}
  7365  		return nil, gensupport.WrapError(&googleapi.Error{
  7366  			Code:   res.StatusCode,
  7367  			Header: res.Header,
  7368  		})
  7369  	}
  7370  	if err != nil {
  7371  		return nil, err
  7372  	}
  7373  	defer googleapi.CloseBody(res)
  7374  	if err := googleapi.CheckResponse(res); err != nil {
  7375  		return nil, gensupport.WrapError(err)
  7376  	}
  7377  	ret := &Volume{
  7378  		ServerResponse: googleapi.ServerResponse{
  7379  			Header:         res.Header,
  7380  			HTTPStatusCode: res.StatusCode,
  7381  		},
  7382  	}
  7383  	target := &ret
  7384  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7385  		return nil, err
  7386  	}
  7387  	return ret, nil
  7388  }
  7389  
  7390  type ProjectsLocationsVolumesResizeCall struct {
  7391  	s                   *Service
  7392  	volume              string
  7393  	resizevolumerequest *ResizeVolumeRequest
  7394  	urlParams_          gensupport.URLParams
  7395  	ctx_                context.Context
  7396  	header_             http.Header
  7397  }
  7398  
  7399  // Resize: Emergency Volume resize.
  7400  //
  7401  // - volume: Volume to resize.
  7402  func (r *ProjectsLocationsVolumesService) Resize(volume string, resizevolumerequest *ResizeVolumeRequest) *ProjectsLocationsVolumesResizeCall {
  7403  	c := &ProjectsLocationsVolumesResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7404  	c.volume = volume
  7405  	c.resizevolumerequest = resizevolumerequest
  7406  	return c
  7407  }
  7408  
  7409  // Fields allows partial responses to be retrieved. See
  7410  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7411  // details.
  7412  func (c *ProjectsLocationsVolumesResizeCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesResizeCall {
  7413  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7414  	return c
  7415  }
  7416  
  7417  // Context sets the context to be used in this call's Do method.
  7418  func (c *ProjectsLocationsVolumesResizeCall) Context(ctx context.Context) *ProjectsLocationsVolumesResizeCall {
  7419  	c.ctx_ = ctx
  7420  	return c
  7421  }
  7422  
  7423  // Header returns a http.Header that can be modified by the caller to add
  7424  // headers to the request.
  7425  func (c *ProjectsLocationsVolumesResizeCall) Header() http.Header {
  7426  	if c.header_ == nil {
  7427  		c.header_ = make(http.Header)
  7428  	}
  7429  	return c.header_
  7430  }
  7431  
  7432  func (c *ProjectsLocationsVolumesResizeCall) doRequest(alt string) (*http.Response, error) {
  7433  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7434  	var body io.Reader = nil
  7435  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.resizevolumerequest)
  7436  	if err != nil {
  7437  		return nil, err
  7438  	}
  7439  	c.urlParams_.Set("alt", alt)
  7440  	c.urlParams_.Set("prettyPrint", "false")
  7441  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+volume}:resize")
  7442  	urls += "?" + c.urlParams_.Encode()
  7443  	req, err := http.NewRequest("POST", urls, body)
  7444  	if err != nil {
  7445  		return nil, err
  7446  	}
  7447  	req.Header = reqHeaders
  7448  	googleapi.Expand(req.URL, map[string]string{
  7449  		"volume": c.volume,
  7450  	})
  7451  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7452  }
  7453  
  7454  // Do executes the "baremetalsolution.projects.locations.volumes.resize" call.
  7455  // Any non-2xx status code is an error. Response headers are in either
  7456  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  7457  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7458  // whether the returned error was because http.StatusNotModified was returned.
  7459  func (c *ProjectsLocationsVolumesResizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7460  	gensupport.SetOptions(c.urlParams_, opts...)
  7461  	res, err := c.doRequest("json")
  7462  	if res != nil && res.StatusCode == http.StatusNotModified {
  7463  		if res.Body != nil {
  7464  			res.Body.Close()
  7465  		}
  7466  		return nil, gensupport.WrapError(&googleapi.Error{
  7467  			Code:   res.StatusCode,
  7468  			Header: res.Header,
  7469  		})
  7470  	}
  7471  	if err != nil {
  7472  		return nil, err
  7473  	}
  7474  	defer googleapi.CloseBody(res)
  7475  	if err := googleapi.CheckResponse(res); err != nil {
  7476  		return nil, gensupport.WrapError(err)
  7477  	}
  7478  	ret := &Operation{
  7479  		ServerResponse: googleapi.ServerResponse{
  7480  			Header:         res.Header,
  7481  			HTTPStatusCode: res.StatusCode,
  7482  		},
  7483  	}
  7484  	target := &ret
  7485  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7486  		return nil, err
  7487  	}
  7488  	return ret, nil
  7489  }
  7490  
  7491  type ProjectsLocationsVolumesLunsEvictCall struct {
  7492  	s               *Service
  7493  	name            string
  7494  	evictlunrequest *EvictLunRequest
  7495  	urlParams_      gensupport.URLParams
  7496  	ctx_            context.Context
  7497  	header_         http.Header
  7498  }
  7499  
  7500  // Evict: Skips lun's cooloff and deletes it now. Lun must be in cooloff state.
  7501  //
  7502  // - name: The name of the lun.
  7503  func (r *ProjectsLocationsVolumesLunsService) Evict(name string, evictlunrequest *EvictLunRequest) *ProjectsLocationsVolumesLunsEvictCall {
  7504  	c := &ProjectsLocationsVolumesLunsEvictCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7505  	c.name = name
  7506  	c.evictlunrequest = evictlunrequest
  7507  	return c
  7508  }
  7509  
  7510  // Fields allows partial responses to be retrieved. See
  7511  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7512  // details.
  7513  func (c *ProjectsLocationsVolumesLunsEvictCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesLunsEvictCall {
  7514  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7515  	return c
  7516  }
  7517  
  7518  // Context sets the context to be used in this call's Do method.
  7519  func (c *ProjectsLocationsVolumesLunsEvictCall) Context(ctx context.Context) *ProjectsLocationsVolumesLunsEvictCall {
  7520  	c.ctx_ = ctx
  7521  	return c
  7522  }
  7523  
  7524  // Header returns a http.Header that can be modified by the caller to add
  7525  // headers to the request.
  7526  func (c *ProjectsLocationsVolumesLunsEvictCall) Header() http.Header {
  7527  	if c.header_ == nil {
  7528  		c.header_ = make(http.Header)
  7529  	}
  7530  	return c.header_
  7531  }
  7532  
  7533  func (c *ProjectsLocationsVolumesLunsEvictCall) doRequest(alt string) (*http.Response, error) {
  7534  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7535  	var body io.Reader = nil
  7536  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.evictlunrequest)
  7537  	if err != nil {
  7538  		return nil, err
  7539  	}
  7540  	c.urlParams_.Set("alt", alt)
  7541  	c.urlParams_.Set("prettyPrint", "false")
  7542  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:evict")
  7543  	urls += "?" + c.urlParams_.Encode()
  7544  	req, err := http.NewRequest("POST", urls, body)
  7545  	if err != nil {
  7546  		return nil, err
  7547  	}
  7548  	req.Header = reqHeaders
  7549  	googleapi.Expand(req.URL, map[string]string{
  7550  		"name": c.name,
  7551  	})
  7552  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7553  }
  7554  
  7555  // Do executes the "baremetalsolution.projects.locations.volumes.luns.evict" call.
  7556  // Any non-2xx status code is an error. Response headers are in either
  7557  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  7558  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7559  // whether the returned error was because http.StatusNotModified was returned.
  7560  func (c *ProjectsLocationsVolumesLunsEvictCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7561  	gensupport.SetOptions(c.urlParams_, opts...)
  7562  	res, err := c.doRequest("json")
  7563  	if res != nil && res.StatusCode == http.StatusNotModified {
  7564  		if res.Body != nil {
  7565  			res.Body.Close()
  7566  		}
  7567  		return nil, gensupport.WrapError(&googleapi.Error{
  7568  			Code:   res.StatusCode,
  7569  			Header: res.Header,
  7570  		})
  7571  	}
  7572  	if err != nil {
  7573  		return nil, err
  7574  	}
  7575  	defer googleapi.CloseBody(res)
  7576  	if err := googleapi.CheckResponse(res); err != nil {
  7577  		return nil, gensupport.WrapError(err)
  7578  	}
  7579  	ret := &Operation{
  7580  		ServerResponse: googleapi.ServerResponse{
  7581  			Header:         res.Header,
  7582  			HTTPStatusCode: res.StatusCode,
  7583  		},
  7584  	}
  7585  	target := &ret
  7586  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7587  		return nil, err
  7588  	}
  7589  	return ret, nil
  7590  }
  7591  
  7592  type ProjectsLocationsVolumesLunsGetCall struct {
  7593  	s            *Service
  7594  	name         string
  7595  	urlParams_   gensupport.URLParams
  7596  	ifNoneMatch_ string
  7597  	ctx_         context.Context
  7598  	header_      http.Header
  7599  }
  7600  
  7601  // Get: Get details of a single storage logical unit number(LUN).
  7602  //
  7603  // - name: Name of the resource.
  7604  func (r *ProjectsLocationsVolumesLunsService) Get(name string) *ProjectsLocationsVolumesLunsGetCall {
  7605  	c := &ProjectsLocationsVolumesLunsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7606  	c.name = name
  7607  	return c
  7608  }
  7609  
  7610  // Fields allows partial responses to be retrieved. See
  7611  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7612  // details.
  7613  func (c *ProjectsLocationsVolumesLunsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesLunsGetCall {
  7614  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7615  	return c
  7616  }
  7617  
  7618  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7619  // object's ETag matches the given value. This is useful for getting updates
  7620  // only after the object has changed since the last request.
  7621  func (c *ProjectsLocationsVolumesLunsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsVolumesLunsGetCall {
  7622  	c.ifNoneMatch_ = entityTag
  7623  	return c
  7624  }
  7625  
  7626  // Context sets the context to be used in this call's Do method.
  7627  func (c *ProjectsLocationsVolumesLunsGetCall) Context(ctx context.Context) *ProjectsLocationsVolumesLunsGetCall {
  7628  	c.ctx_ = ctx
  7629  	return c
  7630  }
  7631  
  7632  // Header returns a http.Header that can be modified by the caller to add
  7633  // headers to the request.
  7634  func (c *ProjectsLocationsVolumesLunsGetCall) Header() http.Header {
  7635  	if c.header_ == nil {
  7636  		c.header_ = make(http.Header)
  7637  	}
  7638  	return c.header_
  7639  }
  7640  
  7641  func (c *ProjectsLocationsVolumesLunsGetCall) doRequest(alt string) (*http.Response, error) {
  7642  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7643  	if c.ifNoneMatch_ != "" {
  7644  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7645  	}
  7646  	var body io.Reader = nil
  7647  	c.urlParams_.Set("alt", alt)
  7648  	c.urlParams_.Set("prettyPrint", "false")
  7649  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  7650  	urls += "?" + c.urlParams_.Encode()
  7651  	req, err := http.NewRequest("GET", urls, body)
  7652  	if err != nil {
  7653  		return nil, err
  7654  	}
  7655  	req.Header = reqHeaders
  7656  	googleapi.Expand(req.URL, map[string]string{
  7657  		"name": c.name,
  7658  	})
  7659  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7660  }
  7661  
  7662  // Do executes the "baremetalsolution.projects.locations.volumes.luns.get" call.
  7663  // Any non-2xx status code is an error. Response headers are in either
  7664  // *Lun.ServerResponse.Header or (if a response was returned at all) in
  7665  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7666  // whether the returned error was because http.StatusNotModified was returned.
  7667  func (c *ProjectsLocationsVolumesLunsGetCall) Do(opts ...googleapi.CallOption) (*Lun, error) {
  7668  	gensupport.SetOptions(c.urlParams_, opts...)
  7669  	res, err := c.doRequest("json")
  7670  	if res != nil && res.StatusCode == http.StatusNotModified {
  7671  		if res.Body != nil {
  7672  			res.Body.Close()
  7673  		}
  7674  		return nil, gensupport.WrapError(&googleapi.Error{
  7675  			Code:   res.StatusCode,
  7676  			Header: res.Header,
  7677  		})
  7678  	}
  7679  	if err != nil {
  7680  		return nil, err
  7681  	}
  7682  	defer googleapi.CloseBody(res)
  7683  	if err := googleapi.CheckResponse(res); err != nil {
  7684  		return nil, gensupport.WrapError(err)
  7685  	}
  7686  	ret := &Lun{
  7687  		ServerResponse: googleapi.ServerResponse{
  7688  			Header:         res.Header,
  7689  			HTTPStatusCode: res.StatusCode,
  7690  		},
  7691  	}
  7692  	target := &ret
  7693  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7694  		return nil, err
  7695  	}
  7696  	return ret, nil
  7697  }
  7698  
  7699  type ProjectsLocationsVolumesLunsListCall struct {
  7700  	s            *Service
  7701  	parent       string
  7702  	urlParams_   gensupport.URLParams
  7703  	ifNoneMatch_ string
  7704  	ctx_         context.Context
  7705  	header_      http.Header
  7706  }
  7707  
  7708  // List: List storage volume luns for given storage volume.
  7709  //
  7710  // - parent: Parent value for ListLunsRequest.
  7711  func (r *ProjectsLocationsVolumesLunsService) List(parent string) *ProjectsLocationsVolumesLunsListCall {
  7712  	c := &ProjectsLocationsVolumesLunsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7713  	c.parent = parent
  7714  	return c
  7715  }
  7716  
  7717  // PageSize sets the optional parameter "pageSize": Requested page size. The
  7718  // server might return fewer items than requested. If unspecified, server will
  7719  // pick an appropriate default.
  7720  func (c *ProjectsLocationsVolumesLunsListCall) PageSize(pageSize int64) *ProjectsLocationsVolumesLunsListCall {
  7721  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  7722  	return c
  7723  }
  7724  
  7725  // PageToken sets the optional parameter "pageToken": A token identifying a
  7726  // page of results from the server.
  7727  func (c *ProjectsLocationsVolumesLunsListCall) PageToken(pageToken string) *ProjectsLocationsVolumesLunsListCall {
  7728  	c.urlParams_.Set("pageToken", pageToken)
  7729  	return c
  7730  }
  7731  
  7732  // Fields allows partial responses to be retrieved. See
  7733  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7734  // details.
  7735  func (c *ProjectsLocationsVolumesLunsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesLunsListCall {
  7736  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7737  	return c
  7738  }
  7739  
  7740  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7741  // object's ETag matches the given value. This is useful for getting updates
  7742  // only after the object has changed since the last request.
  7743  func (c *ProjectsLocationsVolumesLunsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsVolumesLunsListCall {
  7744  	c.ifNoneMatch_ = entityTag
  7745  	return c
  7746  }
  7747  
  7748  // Context sets the context to be used in this call's Do method.
  7749  func (c *ProjectsLocationsVolumesLunsListCall) Context(ctx context.Context) *ProjectsLocationsVolumesLunsListCall {
  7750  	c.ctx_ = ctx
  7751  	return c
  7752  }
  7753  
  7754  // Header returns a http.Header that can be modified by the caller to add
  7755  // headers to the request.
  7756  func (c *ProjectsLocationsVolumesLunsListCall) Header() http.Header {
  7757  	if c.header_ == nil {
  7758  		c.header_ = make(http.Header)
  7759  	}
  7760  	return c.header_
  7761  }
  7762  
  7763  func (c *ProjectsLocationsVolumesLunsListCall) doRequest(alt string) (*http.Response, error) {
  7764  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7765  	if c.ifNoneMatch_ != "" {
  7766  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7767  	}
  7768  	var body io.Reader = nil
  7769  	c.urlParams_.Set("alt", alt)
  7770  	c.urlParams_.Set("prettyPrint", "false")
  7771  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/luns")
  7772  	urls += "?" + c.urlParams_.Encode()
  7773  	req, err := http.NewRequest("GET", urls, body)
  7774  	if err != nil {
  7775  		return nil, err
  7776  	}
  7777  	req.Header = reqHeaders
  7778  	googleapi.Expand(req.URL, map[string]string{
  7779  		"parent": c.parent,
  7780  	})
  7781  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7782  }
  7783  
  7784  // Do executes the "baremetalsolution.projects.locations.volumes.luns.list" call.
  7785  // Any non-2xx status code is an error. Response headers are in either
  7786  // *ListLunsResponse.ServerResponse.Header or (if a response was returned at
  7787  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  7788  // check whether the returned error was because http.StatusNotModified was
  7789  // returned.
  7790  func (c *ProjectsLocationsVolumesLunsListCall) Do(opts ...googleapi.CallOption) (*ListLunsResponse, error) {
  7791  	gensupport.SetOptions(c.urlParams_, opts...)
  7792  	res, err := c.doRequest("json")
  7793  	if res != nil && res.StatusCode == http.StatusNotModified {
  7794  		if res.Body != nil {
  7795  			res.Body.Close()
  7796  		}
  7797  		return nil, gensupport.WrapError(&googleapi.Error{
  7798  			Code:   res.StatusCode,
  7799  			Header: res.Header,
  7800  		})
  7801  	}
  7802  	if err != nil {
  7803  		return nil, err
  7804  	}
  7805  	defer googleapi.CloseBody(res)
  7806  	if err := googleapi.CheckResponse(res); err != nil {
  7807  		return nil, gensupport.WrapError(err)
  7808  	}
  7809  	ret := &ListLunsResponse{
  7810  		ServerResponse: googleapi.ServerResponse{
  7811  			Header:         res.Header,
  7812  			HTTPStatusCode: res.StatusCode,
  7813  		},
  7814  	}
  7815  	target := &ret
  7816  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7817  		return nil, err
  7818  	}
  7819  	return ret, nil
  7820  }
  7821  
  7822  // Pages invokes f for each page of results.
  7823  // A non-nil error returned from f will halt the iteration.
  7824  // The provided context supersedes any context provided to the Context method.
  7825  func (c *ProjectsLocationsVolumesLunsListCall) Pages(ctx context.Context, f func(*ListLunsResponse) error) error {
  7826  	c.ctx_ = ctx
  7827  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  7828  	for {
  7829  		x, err := c.Do()
  7830  		if err != nil {
  7831  			return err
  7832  		}
  7833  		if err := f(x); err != nil {
  7834  			return err
  7835  		}
  7836  		if x.NextPageToken == "" {
  7837  			return nil
  7838  		}
  7839  		c.PageToken(x.NextPageToken)
  7840  	}
  7841  }
  7842  
  7843  type ProjectsLocationsVolumesSnapshotsCreateCall struct {
  7844  	s              *Service
  7845  	parent         string
  7846  	volumesnapshot *VolumeSnapshot
  7847  	urlParams_     gensupport.URLParams
  7848  	ctx_           context.Context
  7849  	header_        http.Header
  7850  }
  7851  
  7852  // Create: Takes a snapshot of a boot volume. Returns INVALID_ARGUMENT if
  7853  // called for a non-boot volume.
  7854  //
  7855  // - parent: The volume to snapshot.
  7856  func (r *ProjectsLocationsVolumesSnapshotsService) Create(parent string, volumesnapshot *VolumeSnapshot) *ProjectsLocationsVolumesSnapshotsCreateCall {
  7857  	c := &ProjectsLocationsVolumesSnapshotsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7858  	c.parent = parent
  7859  	c.volumesnapshot = volumesnapshot
  7860  	return c
  7861  }
  7862  
  7863  // Fields allows partial responses to be retrieved. See
  7864  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7865  // details.
  7866  func (c *ProjectsLocationsVolumesSnapshotsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesSnapshotsCreateCall {
  7867  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7868  	return c
  7869  }
  7870  
  7871  // Context sets the context to be used in this call's Do method.
  7872  func (c *ProjectsLocationsVolumesSnapshotsCreateCall) Context(ctx context.Context) *ProjectsLocationsVolumesSnapshotsCreateCall {
  7873  	c.ctx_ = ctx
  7874  	return c
  7875  }
  7876  
  7877  // Header returns a http.Header that can be modified by the caller to add
  7878  // headers to the request.
  7879  func (c *ProjectsLocationsVolumesSnapshotsCreateCall) Header() http.Header {
  7880  	if c.header_ == nil {
  7881  		c.header_ = make(http.Header)
  7882  	}
  7883  	return c.header_
  7884  }
  7885  
  7886  func (c *ProjectsLocationsVolumesSnapshotsCreateCall) doRequest(alt string) (*http.Response, error) {
  7887  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7888  	var body io.Reader = nil
  7889  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.volumesnapshot)
  7890  	if err != nil {
  7891  		return nil, err
  7892  	}
  7893  	c.urlParams_.Set("alt", alt)
  7894  	c.urlParams_.Set("prettyPrint", "false")
  7895  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/snapshots")
  7896  	urls += "?" + c.urlParams_.Encode()
  7897  	req, err := http.NewRequest("POST", urls, body)
  7898  	if err != nil {
  7899  		return nil, err
  7900  	}
  7901  	req.Header = reqHeaders
  7902  	googleapi.Expand(req.URL, map[string]string{
  7903  		"parent": c.parent,
  7904  	})
  7905  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7906  }
  7907  
  7908  // Do executes the "baremetalsolution.projects.locations.volumes.snapshots.create" call.
  7909  // Any non-2xx status code is an error. Response headers are in either
  7910  // *VolumeSnapshot.ServerResponse.Header or (if a response was returned at all)
  7911  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7912  // whether the returned error was because http.StatusNotModified was returned.
  7913  func (c *ProjectsLocationsVolumesSnapshotsCreateCall) Do(opts ...googleapi.CallOption) (*VolumeSnapshot, error) {
  7914  	gensupport.SetOptions(c.urlParams_, opts...)
  7915  	res, err := c.doRequest("json")
  7916  	if res != nil && res.StatusCode == http.StatusNotModified {
  7917  		if res.Body != nil {
  7918  			res.Body.Close()
  7919  		}
  7920  		return nil, gensupport.WrapError(&googleapi.Error{
  7921  			Code:   res.StatusCode,
  7922  			Header: res.Header,
  7923  		})
  7924  	}
  7925  	if err != nil {
  7926  		return nil, err
  7927  	}
  7928  	defer googleapi.CloseBody(res)
  7929  	if err := googleapi.CheckResponse(res); err != nil {
  7930  		return nil, gensupport.WrapError(err)
  7931  	}
  7932  	ret := &VolumeSnapshot{
  7933  		ServerResponse: googleapi.ServerResponse{
  7934  			Header:         res.Header,
  7935  			HTTPStatusCode: res.StatusCode,
  7936  		},
  7937  	}
  7938  	target := &ret
  7939  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7940  		return nil, err
  7941  	}
  7942  	return ret, nil
  7943  }
  7944  
  7945  type ProjectsLocationsVolumesSnapshotsDeleteCall struct {
  7946  	s          *Service
  7947  	name       string
  7948  	urlParams_ gensupport.URLParams
  7949  	ctx_       context.Context
  7950  	header_    http.Header
  7951  }
  7952  
  7953  // Delete: Deletes a volume snapshot. Returns INVALID_ARGUMENT if called for a
  7954  // non-boot volume.
  7955  //
  7956  // - name: The name of the snapshot to delete.
  7957  func (r *ProjectsLocationsVolumesSnapshotsService) Delete(name string) *ProjectsLocationsVolumesSnapshotsDeleteCall {
  7958  	c := &ProjectsLocationsVolumesSnapshotsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7959  	c.name = name
  7960  	return c
  7961  }
  7962  
  7963  // Fields allows partial responses to be retrieved. See
  7964  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7965  // details.
  7966  func (c *ProjectsLocationsVolumesSnapshotsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesSnapshotsDeleteCall {
  7967  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7968  	return c
  7969  }
  7970  
  7971  // Context sets the context to be used in this call's Do method.
  7972  func (c *ProjectsLocationsVolumesSnapshotsDeleteCall) Context(ctx context.Context) *ProjectsLocationsVolumesSnapshotsDeleteCall {
  7973  	c.ctx_ = ctx
  7974  	return c
  7975  }
  7976  
  7977  // Header returns a http.Header that can be modified by the caller to add
  7978  // headers to the request.
  7979  func (c *ProjectsLocationsVolumesSnapshotsDeleteCall) Header() http.Header {
  7980  	if c.header_ == nil {
  7981  		c.header_ = make(http.Header)
  7982  	}
  7983  	return c.header_
  7984  }
  7985  
  7986  func (c *ProjectsLocationsVolumesSnapshotsDeleteCall) doRequest(alt string) (*http.Response, error) {
  7987  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7988  	var body io.Reader = nil
  7989  	c.urlParams_.Set("alt", alt)
  7990  	c.urlParams_.Set("prettyPrint", "false")
  7991  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  7992  	urls += "?" + c.urlParams_.Encode()
  7993  	req, err := http.NewRequest("DELETE", urls, body)
  7994  	if err != nil {
  7995  		return nil, err
  7996  	}
  7997  	req.Header = reqHeaders
  7998  	googleapi.Expand(req.URL, map[string]string{
  7999  		"name": c.name,
  8000  	})
  8001  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8002  }
  8003  
  8004  // Do executes the "baremetalsolution.projects.locations.volumes.snapshots.delete" call.
  8005  // Any non-2xx status code is an error. Response headers are in either
  8006  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  8007  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8008  // whether the returned error was because http.StatusNotModified was returned.
  8009  func (c *ProjectsLocationsVolumesSnapshotsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  8010  	gensupport.SetOptions(c.urlParams_, opts...)
  8011  	res, err := c.doRequest("json")
  8012  	if res != nil && res.StatusCode == http.StatusNotModified {
  8013  		if res.Body != nil {
  8014  			res.Body.Close()
  8015  		}
  8016  		return nil, gensupport.WrapError(&googleapi.Error{
  8017  			Code:   res.StatusCode,
  8018  			Header: res.Header,
  8019  		})
  8020  	}
  8021  	if err != nil {
  8022  		return nil, err
  8023  	}
  8024  	defer googleapi.CloseBody(res)
  8025  	if err := googleapi.CheckResponse(res); err != nil {
  8026  		return nil, gensupport.WrapError(err)
  8027  	}
  8028  	ret := &Empty{
  8029  		ServerResponse: googleapi.ServerResponse{
  8030  			Header:         res.Header,
  8031  			HTTPStatusCode: res.StatusCode,
  8032  		},
  8033  	}
  8034  	target := &ret
  8035  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8036  		return nil, err
  8037  	}
  8038  	return ret, nil
  8039  }
  8040  
  8041  type ProjectsLocationsVolumesSnapshotsGetCall struct {
  8042  	s            *Service
  8043  	name         string
  8044  	urlParams_   gensupport.URLParams
  8045  	ifNoneMatch_ string
  8046  	ctx_         context.Context
  8047  	header_      http.Header
  8048  }
  8049  
  8050  // Get: Returns the specified snapshot resource. Returns INVALID_ARGUMENT if
  8051  // called for a non-boot volume.
  8052  //
  8053  // - name: The name of the snapshot.
  8054  func (r *ProjectsLocationsVolumesSnapshotsService) Get(name string) *ProjectsLocationsVolumesSnapshotsGetCall {
  8055  	c := &ProjectsLocationsVolumesSnapshotsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8056  	c.name = name
  8057  	return c
  8058  }
  8059  
  8060  // Fields allows partial responses to be retrieved. See
  8061  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8062  // details.
  8063  func (c *ProjectsLocationsVolumesSnapshotsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesSnapshotsGetCall {
  8064  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8065  	return c
  8066  }
  8067  
  8068  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8069  // object's ETag matches the given value. This is useful for getting updates
  8070  // only after the object has changed since the last request.
  8071  func (c *ProjectsLocationsVolumesSnapshotsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsVolumesSnapshotsGetCall {
  8072  	c.ifNoneMatch_ = entityTag
  8073  	return c
  8074  }
  8075  
  8076  // Context sets the context to be used in this call's Do method.
  8077  func (c *ProjectsLocationsVolumesSnapshotsGetCall) Context(ctx context.Context) *ProjectsLocationsVolumesSnapshotsGetCall {
  8078  	c.ctx_ = ctx
  8079  	return c
  8080  }
  8081  
  8082  // Header returns a http.Header that can be modified by the caller to add
  8083  // headers to the request.
  8084  func (c *ProjectsLocationsVolumesSnapshotsGetCall) Header() http.Header {
  8085  	if c.header_ == nil {
  8086  		c.header_ = make(http.Header)
  8087  	}
  8088  	return c.header_
  8089  }
  8090  
  8091  func (c *ProjectsLocationsVolumesSnapshotsGetCall) doRequest(alt string) (*http.Response, error) {
  8092  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8093  	if c.ifNoneMatch_ != "" {
  8094  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8095  	}
  8096  	var body io.Reader = nil
  8097  	c.urlParams_.Set("alt", alt)
  8098  	c.urlParams_.Set("prettyPrint", "false")
  8099  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
  8100  	urls += "?" + c.urlParams_.Encode()
  8101  	req, err := http.NewRequest("GET", urls, body)
  8102  	if err != nil {
  8103  		return nil, err
  8104  	}
  8105  	req.Header = reqHeaders
  8106  	googleapi.Expand(req.URL, map[string]string{
  8107  		"name": c.name,
  8108  	})
  8109  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8110  }
  8111  
  8112  // Do executes the "baremetalsolution.projects.locations.volumes.snapshots.get" call.
  8113  // Any non-2xx status code is an error. Response headers are in either
  8114  // *VolumeSnapshot.ServerResponse.Header or (if a response was returned at all)
  8115  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8116  // whether the returned error was because http.StatusNotModified was returned.
  8117  func (c *ProjectsLocationsVolumesSnapshotsGetCall) Do(opts ...googleapi.CallOption) (*VolumeSnapshot, error) {
  8118  	gensupport.SetOptions(c.urlParams_, opts...)
  8119  	res, err := c.doRequest("json")
  8120  	if res != nil && res.StatusCode == http.StatusNotModified {
  8121  		if res.Body != nil {
  8122  			res.Body.Close()
  8123  		}
  8124  		return nil, gensupport.WrapError(&googleapi.Error{
  8125  			Code:   res.StatusCode,
  8126  			Header: res.Header,
  8127  		})
  8128  	}
  8129  	if err != nil {
  8130  		return nil, err
  8131  	}
  8132  	defer googleapi.CloseBody(res)
  8133  	if err := googleapi.CheckResponse(res); err != nil {
  8134  		return nil, gensupport.WrapError(err)
  8135  	}
  8136  	ret := &VolumeSnapshot{
  8137  		ServerResponse: googleapi.ServerResponse{
  8138  			Header:         res.Header,
  8139  			HTTPStatusCode: res.StatusCode,
  8140  		},
  8141  	}
  8142  	target := &ret
  8143  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8144  		return nil, err
  8145  	}
  8146  	return ret, nil
  8147  }
  8148  
  8149  type ProjectsLocationsVolumesSnapshotsListCall struct {
  8150  	s            *Service
  8151  	parent       string
  8152  	urlParams_   gensupport.URLParams
  8153  	ifNoneMatch_ string
  8154  	ctx_         context.Context
  8155  	header_      http.Header
  8156  }
  8157  
  8158  // List: Retrieves the list of snapshots for the specified volume. Returns a
  8159  // response with an empty list of snapshots if called for a non-boot volume.
  8160  //
  8161  // - parent: Parent value for ListVolumesRequest.
  8162  func (r *ProjectsLocationsVolumesSnapshotsService) List(parent string) *ProjectsLocationsVolumesSnapshotsListCall {
  8163  	c := &ProjectsLocationsVolumesSnapshotsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8164  	c.parent = parent
  8165  	return c
  8166  }
  8167  
  8168  // PageSize sets the optional parameter "pageSize": Requested page size. The
  8169  // server might return fewer items than requested. If unspecified, server will
  8170  // pick an appropriate default.
  8171  func (c *ProjectsLocationsVolumesSnapshotsListCall) PageSize(pageSize int64) *ProjectsLocationsVolumesSnapshotsListCall {
  8172  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  8173  	return c
  8174  }
  8175  
  8176  // PageToken sets the optional parameter "pageToken": A token identifying a
  8177  // page of results from the server.
  8178  func (c *ProjectsLocationsVolumesSnapshotsListCall) PageToken(pageToken string) *ProjectsLocationsVolumesSnapshotsListCall {
  8179  	c.urlParams_.Set("pageToken", pageToken)
  8180  	return c
  8181  }
  8182  
  8183  // Fields allows partial responses to be retrieved. See
  8184  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8185  // details.
  8186  func (c *ProjectsLocationsVolumesSnapshotsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesSnapshotsListCall {
  8187  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8188  	return c
  8189  }
  8190  
  8191  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8192  // object's ETag matches the given value. This is useful for getting updates
  8193  // only after the object has changed since the last request.
  8194  func (c *ProjectsLocationsVolumesSnapshotsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsVolumesSnapshotsListCall {
  8195  	c.ifNoneMatch_ = entityTag
  8196  	return c
  8197  }
  8198  
  8199  // Context sets the context to be used in this call's Do method.
  8200  func (c *ProjectsLocationsVolumesSnapshotsListCall) Context(ctx context.Context) *ProjectsLocationsVolumesSnapshotsListCall {
  8201  	c.ctx_ = ctx
  8202  	return c
  8203  }
  8204  
  8205  // Header returns a http.Header that can be modified by the caller to add
  8206  // headers to the request.
  8207  func (c *ProjectsLocationsVolumesSnapshotsListCall) Header() http.Header {
  8208  	if c.header_ == nil {
  8209  		c.header_ = make(http.Header)
  8210  	}
  8211  	return c.header_
  8212  }
  8213  
  8214  func (c *ProjectsLocationsVolumesSnapshotsListCall) doRequest(alt string) (*http.Response, error) {
  8215  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8216  	if c.ifNoneMatch_ != "" {
  8217  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8218  	}
  8219  	var body io.Reader = nil
  8220  	c.urlParams_.Set("alt", alt)
  8221  	c.urlParams_.Set("prettyPrint", "false")
  8222  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/snapshots")
  8223  	urls += "?" + c.urlParams_.Encode()
  8224  	req, err := http.NewRequest("GET", urls, body)
  8225  	if err != nil {
  8226  		return nil, err
  8227  	}
  8228  	req.Header = reqHeaders
  8229  	googleapi.Expand(req.URL, map[string]string{
  8230  		"parent": c.parent,
  8231  	})
  8232  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8233  }
  8234  
  8235  // Do executes the "baremetalsolution.projects.locations.volumes.snapshots.list" call.
  8236  // Any non-2xx status code is an error. Response headers are in either
  8237  // *ListVolumeSnapshotsResponse.ServerResponse.Header or (if a response was
  8238  // returned at all) in error.(*googleapi.Error).Header. Use
  8239  // googleapi.IsNotModified to check whether the returned error was because
  8240  // http.StatusNotModified was returned.
  8241  func (c *ProjectsLocationsVolumesSnapshotsListCall) Do(opts ...googleapi.CallOption) (*ListVolumeSnapshotsResponse, error) {
  8242  	gensupport.SetOptions(c.urlParams_, opts...)
  8243  	res, err := c.doRequest("json")
  8244  	if res != nil && res.StatusCode == http.StatusNotModified {
  8245  		if res.Body != nil {
  8246  			res.Body.Close()
  8247  		}
  8248  		return nil, gensupport.WrapError(&googleapi.Error{
  8249  			Code:   res.StatusCode,
  8250  			Header: res.Header,
  8251  		})
  8252  	}
  8253  	if err != nil {
  8254  		return nil, err
  8255  	}
  8256  	defer googleapi.CloseBody(res)
  8257  	if err := googleapi.CheckResponse(res); err != nil {
  8258  		return nil, gensupport.WrapError(err)
  8259  	}
  8260  	ret := &ListVolumeSnapshotsResponse{
  8261  		ServerResponse: googleapi.ServerResponse{
  8262  			Header:         res.Header,
  8263  			HTTPStatusCode: res.StatusCode,
  8264  		},
  8265  	}
  8266  	target := &ret
  8267  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8268  		return nil, err
  8269  	}
  8270  	return ret, nil
  8271  }
  8272  
  8273  // Pages invokes f for each page of results.
  8274  // A non-nil error returned from f will halt the iteration.
  8275  // The provided context supersedes any context provided to the Context method.
  8276  func (c *ProjectsLocationsVolumesSnapshotsListCall) Pages(ctx context.Context, f func(*ListVolumeSnapshotsResponse) error) error {
  8277  	c.ctx_ = ctx
  8278  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  8279  	for {
  8280  		x, err := c.Do()
  8281  		if err != nil {
  8282  			return err
  8283  		}
  8284  		if err := f(x); err != nil {
  8285  			return err
  8286  		}
  8287  		if x.NextPageToken == "" {
  8288  			return nil
  8289  		}
  8290  		c.PageToken(x.NextPageToken)
  8291  	}
  8292  }
  8293  
  8294  type ProjectsLocationsVolumesSnapshotsRestoreVolumeSnapshotCall struct {
  8295  	s                            *Service
  8296  	volumeSnapshot               string
  8297  	restorevolumesnapshotrequest *RestoreVolumeSnapshotRequest
  8298  	urlParams_                   gensupport.URLParams
  8299  	ctx_                         context.Context
  8300  	header_                      http.Header
  8301  }
  8302  
  8303  // RestoreVolumeSnapshot: Uses the specified snapshot to restore its parent
  8304  // volume. Returns INVALID_ARGUMENT if called for a non-boot volume.
  8305  //
  8306  //   - volumeSnapshot: Name of the snapshot which will be used to restore its
  8307  //     parent volume.
  8308  func (r *ProjectsLocationsVolumesSnapshotsService) RestoreVolumeSnapshot(volumeSnapshot string, restorevolumesnapshotrequest *RestoreVolumeSnapshotRequest) *ProjectsLocationsVolumesSnapshotsRestoreVolumeSnapshotCall {
  8309  	c := &ProjectsLocationsVolumesSnapshotsRestoreVolumeSnapshotCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8310  	c.volumeSnapshot = volumeSnapshot
  8311  	c.restorevolumesnapshotrequest = restorevolumesnapshotrequest
  8312  	return c
  8313  }
  8314  
  8315  // Fields allows partial responses to be retrieved. See
  8316  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8317  // details.
  8318  func (c *ProjectsLocationsVolumesSnapshotsRestoreVolumeSnapshotCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesSnapshotsRestoreVolumeSnapshotCall {
  8319  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8320  	return c
  8321  }
  8322  
  8323  // Context sets the context to be used in this call's Do method.
  8324  func (c *ProjectsLocationsVolumesSnapshotsRestoreVolumeSnapshotCall) Context(ctx context.Context) *ProjectsLocationsVolumesSnapshotsRestoreVolumeSnapshotCall {
  8325  	c.ctx_ = ctx
  8326  	return c
  8327  }
  8328  
  8329  // Header returns a http.Header that can be modified by the caller to add
  8330  // headers to the request.
  8331  func (c *ProjectsLocationsVolumesSnapshotsRestoreVolumeSnapshotCall) Header() http.Header {
  8332  	if c.header_ == nil {
  8333  		c.header_ = make(http.Header)
  8334  	}
  8335  	return c.header_
  8336  }
  8337  
  8338  func (c *ProjectsLocationsVolumesSnapshotsRestoreVolumeSnapshotCall) doRequest(alt string) (*http.Response, error) {
  8339  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8340  	var body io.Reader = nil
  8341  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.restorevolumesnapshotrequest)
  8342  	if err != nil {
  8343  		return nil, err
  8344  	}
  8345  	c.urlParams_.Set("alt", alt)
  8346  	c.urlParams_.Set("prettyPrint", "false")
  8347  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+volumeSnapshot}:restoreVolumeSnapshot")
  8348  	urls += "?" + c.urlParams_.Encode()
  8349  	req, err := http.NewRequest("POST", urls, body)
  8350  	if err != nil {
  8351  		return nil, err
  8352  	}
  8353  	req.Header = reqHeaders
  8354  	googleapi.Expand(req.URL, map[string]string{
  8355  		"volumeSnapshot": c.volumeSnapshot,
  8356  	})
  8357  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8358  }
  8359  
  8360  // Do executes the "baremetalsolution.projects.locations.volumes.snapshots.restoreVolumeSnapshot" call.
  8361  // Any non-2xx status code is an error. Response headers are in either
  8362  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  8363  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8364  // whether the returned error was because http.StatusNotModified was returned.
  8365  func (c *ProjectsLocationsVolumesSnapshotsRestoreVolumeSnapshotCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  8366  	gensupport.SetOptions(c.urlParams_, opts...)
  8367  	res, err := c.doRequest("json")
  8368  	if res != nil && res.StatusCode == http.StatusNotModified {
  8369  		if res.Body != nil {
  8370  			res.Body.Close()
  8371  		}
  8372  		return nil, gensupport.WrapError(&googleapi.Error{
  8373  			Code:   res.StatusCode,
  8374  			Header: res.Header,
  8375  		})
  8376  	}
  8377  	if err != nil {
  8378  		return nil, err
  8379  	}
  8380  	defer googleapi.CloseBody(res)
  8381  	if err := googleapi.CheckResponse(res); err != nil {
  8382  		return nil, gensupport.WrapError(err)
  8383  	}
  8384  	ret := &Operation{
  8385  		ServerResponse: googleapi.ServerResponse{
  8386  			Header:         res.Header,
  8387  			HTTPStatusCode: res.StatusCode,
  8388  		},
  8389  	}
  8390  	target := &ret
  8391  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8392  		return nil, err
  8393  	}
  8394  	return ret, nil
  8395  }
  8396  

View as plain text