...

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

Documentation: google.golang.org/api/file/v1beta1

     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 file provides access to the Cloud Filestore API.
     8  //
     9  // For product documentation, see: https://cloud.google.com/filestore/
    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/file/v1beta1"
    27  //	...
    28  //	ctx := context.Background()
    29  //	fileService, err := file.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  //	fileService, err := file.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  //	fileService, err := file.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    49  //
    50  // See [google.golang.org/api/option.ClientOption] for details on options.
    51  package file // import "google.golang.org/api/file/v1beta1"
    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 = "file:v1beta1"
    90  const apiName = "file"
    91  const apiVersion = "v1beta1"
    92  const basePath = "https://file.googleapis.com/"
    93  const basePathTemplate = "https://file.UNIVERSE_DOMAIN/"
    94  const mtlsBasePath = "https://file.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.Backups = NewProjectsLocationsBackupsService(s)
   172  	rs.Instances = NewProjectsLocationsInstancesService(s)
   173  	rs.Operations = NewProjectsLocationsOperationsService(s)
   174  	return rs
   175  }
   176  
   177  type ProjectsLocationsService struct {
   178  	s *Service
   179  
   180  	Backups *ProjectsLocationsBackupsService
   181  
   182  	Instances *ProjectsLocationsInstancesService
   183  
   184  	Operations *ProjectsLocationsOperationsService
   185  }
   186  
   187  func NewProjectsLocationsBackupsService(s *Service) *ProjectsLocationsBackupsService {
   188  	rs := &ProjectsLocationsBackupsService{s: s}
   189  	return rs
   190  }
   191  
   192  type ProjectsLocationsBackupsService struct {
   193  	s *Service
   194  }
   195  
   196  func NewProjectsLocationsInstancesService(s *Service) *ProjectsLocationsInstancesService {
   197  	rs := &ProjectsLocationsInstancesService{s: s}
   198  	rs.Shares = NewProjectsLocationsInstancesSharesService(s)
   199  	rs.Snapshots = NewProjectsLocationsInstancesSnapshotsService(s)
   200  	return rs
   201  }
   202  
   203  type ProjectsLocationsInstancesService struct {
   204  	s *Service
   205  
   206  	Shares *ProjectsLocationsInstancesSharesService
   207  
   208  	Snapshots *ProjectsLocationsInstancesSnapshotsService
   209  }
   210  
   211  func NewProjectsLocationsInstancesSharesService(s *Service) *ProjectsLocationsInstancesSharesService {
   212  	rs := &ProjectsLocationsInstancesSharesService{s: s}
   213  	return rs
   214  }
   215  
   216  type ProjectsLocationsInstancesSharesService struct {
   217  	s *Service
   218  }
   219  
   220  func NewProjectsLocationsInstancesSnapshotsService(s *Service) *ProjectsLocationsInstancesSnapshotsService {
   221  	rs := &ProjectsLocationsInstancesSnapshotsService{s: s}
   222  	return rs
   223  }
   224  
   225  type ProjectsLocationsInstancesSnapshotsService struct {
   226  	s *Service
   227  }
   228  
   229  func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
   230  	rs := &ProjectsLocationsOperationsService{s: s}
   231  	return rs
   232  }
   233  
   234  type ProjectsLocationsOperationsService struct {
   235  	s *Service
   236  }
   237  
   238  // Backup: A Filestore backup.
   239  type Backup struct {
   240  	// CapacityGb: Output only. Capacity of the source file share when the backup
   241  	// was created.
   242  	CapacityGb int64 `json:"capacityGb,omitempty,string"`
   243  	// CreateTime: Output only. The time when the backup was created.
   244  	CreateTime string `json:"createTime,omitempty"`
   245  	// Description: A description of the backup with 2048 characters or less.
   246  	// Requests with longer descriptions will be rejected.
   247  	Description string `json:"description,omitempty"`
   248  	// DownloadBytes: Output only. Amount of bytes that will be downloaded if the
   249  	// backup is restored
   250  	DownloadBytes int64 `json:"downloadBytes,omitempty,string"`
   251  	// KmsKeyName: Immutable. KMS key name used for data encryption.
   252  	KmsKeyName string `json:"kmsKeyName,omitempty"`
   253  	// Labels: Resource labels to represent user provided metadata.
   254  	Labels map[string]string `json:"labels,omitempty"`
   255  	// Name: Output only. The resource name of the backup, in the format
   256  	// `projects/{project_id}/locations/{location_id}/backups/{backup_id}`.
   257  	Name string `json:"name,omitempty"`
   258  	// SatisfiesPzi: Output only. Reserved for future use.
   259  	SatisfiesPzi bool `json:"satisfiesPzi,omitempty"`
   260  	// SatisfiesPzs: Output only. Reserved for future use.
   261  	SatisfiesPzs bool `json:"satisfiesPzs,omitempty"`
   262  	// SourceFileShare: Name of the file share in the source Filestore instance
   263  	// that the backup is created from.
   264  	SourceFileShare string `json:"sourceFileShare,omitempty"`
   265  	// SourceInstance: The resource name of the source Filestore instance, in the
   266  	// format
   267  	// `projects/{project_id}/locations/{location_id}/instances/{instance_id}`,
   268  	// used to create this backup.
   269  	SourceInstance string `json:"sourceInstance,omitempty"`
   270  	// SourceInstanceTier: Output only. The service tier of the source Filestore
   271  	// instance that this backup is created from.
   272  	//
   273  	// Possible values:
   274  	//   "TIER_UNSPECIFIED" - Not set.
   275  	//   "STANDARD" - STANDARD tier. BASIC_HDD is the preferred term for this tier.
   276  	//   "PREMIUM" - PREMIUM tier. BASIC_SSD is the preferred term for this tier.
   277  	//   "BASIC_HDD" - BASIC instances offer a maximum capacity of 63.9 TB.
   278  	// BASIC_HDD is an alias for STANDARD Tier, offering economical performance
   279  	// backed by HDD.
   280  	//   "BASIC_SSD" - BASIC instances offer a maximum capacity of 63.9 TB.
   281  	// BASIC_SSD is an alias for PREMIUM Tier, and offers improved performance
   282  	// backed by SSD.
   283  	//   "HIGH_SCALE_SSD" - HIGH_SCALE instances offer expanded capacity and
   284  	// performance scaling capabilities.
   285  	//   "ENTERPRISE" - ENTERPRISE instances offer the features and availability
   286  	// needed for mission-critical workloads.
   287  	//   "ZONAL" - ZONAL instances offer expanded capacity and performance scaling
   288  	// capabilities.
   289  	//   "REGIONAL" - REGIONAL instances offer the features and availability needed
   290  	// for mission-critical workloads.
   291  	SourceInstanceTier string `json:"sourceInstanceTier,omitempty"`
   292  	// State: Output only. The backup state.
   293  	//
   294  	// Possible values:
   295  	//   "STATE_UNSPECIFIED" - State not set.
   296  	//   "CREATING" - Backup is being created.
   297  	//   "FINALIZING" - Backup has been taken and the operation is being finalized.
   298  	// At this point, changes to the file share will not be reflected in the
   299  	// backup.
   300  	//   "READY" - Backup is available for use.
   301  	//   "DELETING" - Backup is being deleted.
   302  	//   "INVALID" - Backup is not valid and cannot be used for creating new
   303  	// instances or restoring existing instances.
   304  	State string `json:"state,omitempty"`
   305  	// StorageBytes: Output only. The size of the storage used by the backup. As
   306  	// backups share storage, this number is expected to change with backup
   307  	// creation/deletion.
   308  	StorageBytes int64 `json:"storageBytes,omitempty,string"`
   309  
   310  	// ServerResponse contains the HTTP response code and headers from the server.
   311  	googleapi.ServerResponse `json:"-"`
   312  	// ForceSendFields is a list of field names (e.g. "CapacityGb") to
   313  	// unconditionally include in API requests. By default, fields with empty or
   314  	// default values are omitted from API requests. See
   315  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   316  	// details.
   317  	ForceSendFields []string `json:"-"`
   318  	// NullFields is a list of field names (e.g. "CapacityGb") to include in API
   319  	// requests with the JSON null value. By default, fields with empty values are
   320  	// omitted from API requests. See
   321  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   322  	NullFields []string `json:"-"`
   323  }
   324  
   325  func (s *Backup) MarshalJSON() ([]byte, error) {
   326  	type NoMethod Backup
   327  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   328  }
   329  
   330  // CancelOperationRequest: The request message for Operations.CancelOperation.
   331  type CancelOperationRequest struct {
   332  }
   333  
   334  // DailyCycle: Time window specified for daily operations.
   335  type DailyCycle struct {
   336  	// Duration: Output only. Duration of the time window, set by service producer.
   337  	Duration string `json:"duration,omitempty"`
   338  	// StartTime: Time within the day to start the operations.
   339  	StartTime *TimeOfDay `json:"startTime,omitempty"`
   340  	// ForceSendFields is a list of field names (e.g. "Duration") 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. "Duration") 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 *DailyCycle) MarshalJSON() ([]byte, error) {
   354  	type NoMethod DailyCycle
   355  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   356  }
   357  
   358  // Date: Represents a whole or partial calendar date, such as a birthday. The
   359  // time of day and time zone are either specified elsewhere or are
   360  // insignificant. The date is relative to the Gregorian Calendar. This can
   361  // represent one of the following: * A full date, with non-zero year, month,
   362  // and day values. * A month and day, with a zero year (for example, an
   363  // anniversary). * A year on its own, with a zero month and a zero day. * A
   364  // year and month, with a zero day (for example, a credit card expiration
   365  // date). Related types: * google.type.TimeOfDay * google.type.DateTime *
   366  // google.protobuf.Timestamp
   367  type Date struct {
   368  	// Day: Day of a month. Must be from 1 to 31 and valid for the year and month,
   369  	// or 0 to specify a year by itself or a year and month where the day isn't
   370  	// significant.
   371  	Day int64 `json:"day,omitempty"`
   372  	// Month: Month of a year. Must be from 1 to 12, or 0 to specify a year without
   373  	// a month and day.
   374  	Month int64 `json:"month,omitempty"`
   375  	// Year: Year of the date. Must be from 1 to 9999, or 0 to specify a date
   376  	// without a year.
   377  	Year int64 `json:"year,omitempty"`
   378  	// ForceSendFields is a list of field names (e.g. "Day") to unconditionally
   379  	// include in API requests. By default, fields with empty or default values are
   380  	// omitted from API requests. See
   381  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   382  	// details.
   383  	ForceSendFields []string `json:"-"`
   384  	// NullFields is a list of field names (e.g. "Day") to include in API requests
   385  	// with the JSON null value. By default, fields with empty values are omitted
   386  	// from API requests. See
   387  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   388  	NullFields []string `json:"-"`
   389  }
   390  
   391  func (s *Date) MarshalJSON() ([]byte, error) {
   392  	type NoMethod Date
   393  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   394  }
   395  
   396  // DenyMaintenancePeriod: DenyMaintenancePeriod definition. Maintenance is
   397  // forbidden within the deny period. The start_date must be less than the
   398  // end_date.
   399  type DenyMaintenancePeriod struct {
   400  	// EndDate: Deny period end date. This can be: * A full date, with non-zero
   401  	// year, month and day values. * A month and day value, with a zero year.
   402  	// Allows recurring deny periods each year. Date matching this period will have
   403  	// to be before the end.
   404  	EndDate *Date `json:"endDate,omitempty"`
   405  	// StartDate: Deny period start date. This can be: * A full date, with non-zero
   406  	// year, month and day values. * A month and day value, with a zero year.
   407  	// Allows recurring deny periods each year. Date matching this period will have
   408  	// to be the same or after the start.
   409  	StartDate *Date `json:"startDate,omitempty"`
   410  	// Time: Time in UTC when the Blackout period starts on start_date and ends on
   411  	// end_date. This can be: * Full time. * All zeros for 00:00:00 UTC
   412  	Time *TimeOfDay `json:"time,omitempty"`
   413  	// ForceSendFields is a list of field names (e.g. "EndDate") to unconditionally
   414  	// include in API requests. By default, fields with empty or default values are
   415  	// omitted from API requests. See
   416  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   417  	// details.
   418  	ForceSendFields []string `json:"-"`
   419  	// NullFields is a list of field names (e.g. "EndDate") to include in API
   420  	// requests with the JSON null value. By default, fields with empty values are
   421  	// omitted from API requests. See
   422  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   423  	NullFields []string `json:"-"`
   424  }
   425  
   426  func (s *DenyMaintenancePeriod) MarshalJSON() ([]byte, error) {
   427  	type NoMethod DenyMaintenancePeriod
   428  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   429  }
   430  
   431  // DirectoryServicesConfig: Directory Services configuration for Kerberos-based
   432  // authentication.
   433  type DirectoryServicesConfig struct {
   434  	// ManagedActiveDirectory: Configuration for Managed Service for Microsoft
   435  	// Active Directory.
   436  	ManagedActiveDirectory *ManagedActiveDirectoryConfig `json:"managedActiveDirectory,omitempty"`
   437  	// ForceSendFields is a list of field names (e.g. "ManagedActiveDirectory") to
   438  	// unconditionally include in API requests. By default, fields with empty or
   439  	// default values are omitted from API requests. See
   440  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   441  	// details.
   442  	ForceSendFields []string `json:"-"`
   443  	// NullFields is a list of field names (e.g. "ManagedActiveDirectory") to
   444  	// include in API requests with the JSON null value. By default, fields with
   445  	// empty values are omitted from API requests. See
   446  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   447  	NullFields []string `json:"-"`
   448  }
   449  
   450  func (s *DirectoryServicesConfig) MarshalJSON() ([]byte, error) {
   451  	type NoMethod DirectoryServicesConfig
   452  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   453  }
   454  
   455  // Empty: A generic empty message that you can re-use to avoid defining
   456  // duplicated empty messages in your APIs. A typical example is to use it as
   457  // the request or the response type of an API method. For instance: service Foo
   458  // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
   459  type Empty struct {
   460  	// ServerResponse contains the HTTP response code and headers from the server.
   461  	googleapi.ServerResponse `json:"-"`
   462  }
   463  
   464  // FileShareConfig: File share configuration for the instance.
   465  type FileShareConfig struct {
   466  	// CapacityGb: File share capacity in gigabytes (GB). Filestore defines 1 GB as
   467  	// 1024^3 bytes.
   468  	CapacityGb int64 `json:"capacityGb,omitempty,string"`
   469  	// Name: Required. The name of the file share. Must use 1-16 characters for the
   470  	// basic service tier and 1-63 characters for all other service tiers. Must use
   471  	// lowercase letters, numbers, or underscores `[a-z0-9_]`. Must start with a
   472  	// letter. Immutable.
   473  	Name string `json:"name,omitempty"`
   474  	// NfsExportOptions: Nfs Export Options. There is a limit of 10 export options
   475  	// per file share.
   476  	NfsExportOptions []*NfsExportOptions `json:"nfsExportOptions,omitempty"`
   477  	// SourceBackup: The resource name of the backup, in the format
   478  	// `projects/{project_id}/locations/{location_id}/backups/{backup_id}`, that
   479  	// this file share has been restored from.
   480  	SourceBackup string `json:"sourceBackup,omitempty"`
   481  	// ForceSendFields is a list of field names (e.g. "CapacityGb") to
   482  	// unconditionally include in API requests. By default, fields with empty or
   483  	// default values are omitted from API requests. See
   484  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   485  	// details.
   486  	ForceSendFields []string `json:"-"`
   487  	// NullFields is a list of field names (e.g. "CapacityGb") to include in API
   488  	// requests with the JSON null value. By default, fields with empty values are
   489  	// omitted from API requests. See
   490  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   491  	NullFields []string `json:"-"`
   492  }
   493  
   494  func (s *FileShareConfig) MarshalJSON() ([]byte, error) {
   495  	type NoMethod FileShareConfig
   496  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   497  }
   498  
   499  // GoogleCloudSaasacceleratorManagementProvidersV1Instance: Instance represents
   500  // the interface for SLM services to actuate the state of control plane
   501  // resources. Example Instance in JSON, where consumer-project-number=123456,
   502  // producer-project-id=cloud-sql: ```json Instance: { "name":
   503  // "projects/123456/locations/us-east1/instances/prod-instance", "create_time":
   504  // { "seconds": 1526406431, }, "labels": { "env": "prod", "foo": "bar" },
   505  // "state": READY, "software_versions": { "software_update":
   506  // "cloud-sql-09-28-2018", }, "maintenance_policy_names": { "UpdatePolicy":
   507  // "projects/123456/locations/us-east1/maintenancePolicies/prod-update-policy",
   508  // } "tenant_project_id": "cloud-sql-test-tenant", "producer_metadata": {
   509  // "cloud-sql-tier": "basic", "cloud-sql-instance-size": "1G", },
   510  // "provisioned_resources": [ { "resource-type": "compute-instance",
   511  // "resource-url":
   512  // "https://www.googleapis.com/compute/v1/projects/cloud-sql/zones/us-east1-b/in
   513  // stances/vm-1", } ], "maintenance_schedules": { "csa_rollout": {
   514  // "start_time": { "seconds": 1526406431, }, "end_time": { "seconds":
   515  // 1535406431, }, }, "ncsa_rollout": { "start_time": { "seconds": 1526406431,
   516  // }, "end_time": { "seconds": 1535406431, }, } }, "consumer_defined_name":
   517  // "my-sql-instance1", } ``` LINT.IfChange
   518  type GoogleCloudSaasacceleratorManagementProvidersV1Instance struct {
   519  	// ConsumerDefinedName: consumer_defined_name is the name of the instance set
   520  	// by the service consumers. Generally this is different from the `name` field
   521  	// which reperesents the system-assigned id of the instance which the service
   522  	// consumers do not recognize. This is a required field for tenants onboarding
   523  	// to Maintenance Window notifications
   524  	// (go/slm-rollout-maintenance-policies#prerequisites).
   525  	ConsumerDefinedName string `json:"consumerDefinedName,omitempty"`
   526  	// CreateTime: Output only. Timestamp when the resource was created.
   527  	CreateTime string `json:"createTime,omitempty"`
   528  	// InstanceType: Optional. The instance_type of this instance of format:
   529  	// projects/{project_number}/locations/{location_id}/instanceTypes/{instance_typ
   530  	// e_id}. Instance Type represents a high-level tier or SKU of the service that
   531  	// this instance belong to. When enabled(eg: Maintenance Rollout), Rollout uses
   532  	// 'instance_type' along with 'software_versions' to determine whether instance
   533  	// needs an update or not.
   534  	InstanceType string `json:"instanceType,omitempty"`
   535  	// Labels: Optional. Resource labels to represent user provided metadata. Each
   536  	// label is a key-value pair, where both the key and the value are arbitrary
   537  	// strings provided by the user.
   538  	Labels map[string]string `json:"labels,omitempty"`
   539  	// MaintenancePolicyNames: Optional. The MaintenancePolicies that have been
   540  	// attached to the instance. The key must be of the type name of the oneof
   541  	// policy name defined in MaintenancePolicy, and the referenced policy must
   542  	// define the same policy type. For details, please refer to go/mr-user-guide.
   543  	// Should not be set if maintenance_settings.maintenance_policies is set.
   544  	MaintenancePolicyNames map[string]string `json:"maintenancePolicyNames,omitempty"`
   545  	// MaintenanceSchedules: The MaintenanceSchedule contains the scheduling
   546  	// information of published maintenance schedule with same key as
   547  	// software_versions.
   548  	MaintenanceSchedules map[string]GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSchedule `json:"maintenanceSchedules,omitempty"`
   549  	// MaintenanceSettings: Optional. The MaintenanceSettings associated with
   550  	// instance.
   551  	MaintenanceSettings *GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSettings `json:"maintenanceSettings,omitempty"`
   552  	// Name: Unique name of the resource. It uses the form:
   553  	// `projects/{project_number}/locations/{location_id}/instances/{instance_id}`
   554  	// Note: This name is passed, stored and logged across the rollout system. So
   555  	// use of consumer project_id or any other consumer PII in the name is strongly
   556  	// discouraged for wipeout (go/wipeout) compliance. See
   557  	// go/elysium/project_ids#storage-guidance for more details.
   558  	Name string `json:"name,omitempty"`
   559  	// NotificationParameters: Optional. notification_parameter are information
   560  	// that service producers may like to include that is not relevant to Rollout.
   561  	// This parameter will only be passed to Gamma and Cloud Logging for
   562  	// notification/logging purpose.
   563  	NotificationParameters map[string]GoogleCloudSaasacceleratorManagementProvidersV1NotificationParameter `json:"notificationParameters,omitempty"`
   564  	// ProducerMetadata: Output only. Custom string attributes used primarily to
   565  	// expose producer-specific information in monitoring dashboards. See
   566  	// go/get-instance-metadata.
   567  	ProducerMetadata map[string]string `json:"producerMetadata,omitempty"`
   568  	// ProvisionedResources: Output only. The list of data plane resources
   569  	// provisioned for this instance, e.g. compute VMs. See
   570  	// go/get-instance-metadata.
   571  	ProvisionedResources []*GoogleCloudSaasacceleratorManagementProvidersV1ProvisionedResource `json:"provisionedResources,omitempty"`
   572  	// SlmInstanceTemplate: Link to the SLM instance template. Only populated when
   573  	// updating SLM instances via SSA's Actuation service adaptor. Service
   574  	// producers with custom control plane (e.g. Cloud SQL) doesn't need to
   575  	// populate this field. Instead they should use software_versions.
   576  	SlmInstanceTemplate string `json:"slmInstanceTemplate,omitempty"`
   577  	// SloMetadata: Output only. SLO metadata for instance classification in the
   578  	// Standardized dataplane SLO platform. See go/cloud-ssa-standard-slo for
   579  	// feature description.
   580  	SloMetadata *GoogleCloudSaasacceleratorManagementProvidersV1SloMetadata `json:"sloMetadata,omitempty"`
   581  	// SoftwareVersions: Software versions that are used to deploy this instance.
   582  	// This can be mutated by rollout services.
   583  	SoftwareVersions map[string]string `json:"softwareVersions,omitempty"`
   584  	// State: Output only. Current lifecycle state of the resource (e.g. if it's
   585  	// being created or ready to use).
   586  	//
   587  	// Possible values:
   588  	//   "STATE_UNSPECIFIED" - Unspecified state.
   589  	//   "CREATING" - Instance is being created.
   590  	//   "READY" - Instance has been created and is ready to use.
   591  	//   "UPDATING" - Instance is being updated.
   592  	//   "REPAIRING" - Instance is unheathy and under repair.
   593  	//   "DELETING" - Instance is being deleted.
   594  	//   "ERROR" - Instance encountered an error and is in indeterministic state.
   595  	State string `json:"state,omitempty"`
   596  	// TenantProjectId: Output only. ID of the associated GCP tenant project. See
   597  	// go/get-instance-metadata.
   598  	TenantProjectId string `json:"tenantProjectId,omitempty"`
   599  	// UpdateTime: Output only. Timestamp when the resource was last modified.
   600  	UpdateTime string `json:"updateTime,omitempty"`
   601  	// ForceSendFields is a list of field names (e.g. "ConsumerDefinedName") to
   602  	// unconditionally include in API requests. By default, fields with empty or
   603  	// default values are omitted from API requests. See
   604  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   605  	// details.
   606  	ForceSendFields []string `json:"-"`
   607  	// NullFields is a list of field names (e.g. "ConsumerDefinedName") to include
   608  	// in API requests with the JSON null value. By default, fields with empty
   609  	// values are omitted from API requests. See
   610  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   611  	NullFields []string `json:"-"`
   612  }
   613  
   614  func (s *GoogleCloudSaasacceleratorManagementProvidersV1Instance) MarshalJSON() ([]byte, error) {
   615  	type NoMethod GoogleCloudSaasacceleratorManagementProvidersV1Instance
   616  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   617  }
   618  
   619  // GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSchedule:
   620  // Maintenance schedule which is exposed to customer and potentially end user,
   621  // indicating published upcoming future maintenance schedule
   622  type GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSchedule struct {
   623  	// CanReschedule: This field is deprecated, and will be always set to true
   624  	// since reschedule can happen multiple times now. This field should not be
   625  	// removed until all service producers remove this for their customers.
   626  	CanReschedule bool `json:"canReschedule,omitempty"`
   627  	// EndTime: The scheduled end time for the maintenance.
   628  	EndTime string `json:"endTime,omitempty"`
   629  	// RolloutManagementPolicy: The rollout management policy this maintenance
   630  	// schedule is associated with. When doing reschedule update request, the
   631  	// reschedule should be against this given policy.
   632  	RolloutManagementPolicy string `json:"rolloutManagementPolicy,omitempty"`
   633  	// ScheduleDeadlineTime: schedule_deadline_time is the time deadline any
   634  	// schedule start time cannot go beyond, including reschedule. It's normally
   635  	// the initial schedule start time plus maintenance window length (1 day or 1
   636  	// week). Maintenance cannot be scheduled to start beyond this deadline.
   637  	ScheduleDeadlineTime string `json:"scheduleDeadlineTime,omitempty"`
   638  	// StartTime: The scheduled start time for the maintenance.
   639  	StartTime string `json:"startTime,omitempty"`
   640  	// ForceSendFields is a list of field names (e.g. "CanReschedule") to
   641  	// unconditionally include in API requests. By default, fields with empty or
   642  	// default values are omitted from API requests. See
   643  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   644  	// details.
   645  	ForceSendFields []string `json:"-"`
   646  	// NullFields is a list of field names (e.g. "CanReschedule") to include in API
   647  	// requests with the JSON null value. By default, fields with empty values are
   648  	// omitted from API requests. See
   649  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   650  	NullFields []string `json:"-"`
   651  }
   652  
   653  func (s *GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSchedule) MarshalJSON() ([]byte, error) {
   654  	type NoMethod GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSchedule
   655  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   656  }
   657  
   658  // GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSettings:
   659  // Maintenance settings associated with instance. Allows service producers and
   660  // end users to assign settings that controls maintenance on this instance.
   661  type GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSettings struct {
   662  	// Exclude: Optional. Exclude instance from maintenance. When true, rollout
   663  	// service will not attempt maintenance on the instance. Rollout service will
   664  	// include the instance in reported rollout progress as not attempted.
   665  	Exclude bool `json:"exclude,omitempty"`
   666  	// IsRollback: Optional. If the update call is triggered from rollback, set the
   667  	// value as true.
   668  	IsRollback bool `json:"isRollback,omitempty"`
   669  	// MaintenancePolicies: Optional. The MaintenancePolicies that have been
   670  	// attached to the instance. The key must be of the type name of the oneof
   671  	// policy name defined in MaintenancePolicy, and the embedded policy must
   672  	// define the same policy type. For details, please refer to go/mr-user-guide.
   673  	// Should not be set if maintenance_policy_names is set. If only the name is
   674  	// needed, then only populate MaintenancePolicy.name.
   675  	MaintenancePolicies map[string]MaintenancePolicy `json:"maintenancePolicies,omitempty"`
   676  	// ForceSendFields is a list of field names (e.g. "Exclude") to unconditionally
   677  	// include in API requests. By default, fields with empty or default values are
   678  	// omitted from API requests. See
   679  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   680  	// details.
   681  	ForceSendFields []string `json:"-"`
   682  	// NullFields is a list of field names (e.g. "Exclude") to include in API
   683  	// requests with the JSON null value. By default, fields with empty values are
   684  	// omitted from API requests. See
   685  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   686  	NullFields []string `json:"-"`
   687  }
   688  
   689  func (s *GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSettings) MarshalJSON() ([]byte, error) {
   690  	type NoMethod GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSettings
   691  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   692  }
   693  
   694  // GoogleCloudSaasacceleratorManagementProvidersV1NodeSloMetadata: Node
   695  // information for custom per-node SLO implementations. SSA does not support
   696  // per-node SLO, but producers can populate per-node information in SloMetadata
   697  // for custom precomputations. SSA Eligibility Exporter will emit per-node
   698  // metric based on this information.
   699  type GoogleCloudSaasacceleratorManagementProvidersV1NodeSloMetadata struct {
   700  	// Location: The location of the node, if different from instance location.
   701  	Location string `json:"location,omitempty"`
   702  	// NodeId: The id of the node. This should be equal to
   703  	// SaasInstanceNode.node_id.
   704  	NodeId string `json:"nodeId,omitempty"`
   705  	// PerSliEligibility: If present, this will override eligibility for the node
   706  	// coming from instance or exclusions for specified SLIs.
   707  	PerSliEligibility *GoogleCloudSaasacceleratorManagementProvidersV1PerSliSloEligibility `json:"perSliEligibility,omitempty"`
   708  	// ForceSendFields is a list of field names (e.g. "Location") to
   709  	// unconditionally include in API requests. By default, fields with empty or
   710  	// default values are omitted from API requests. See
   711  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   712  	// details.
   713  	ForceSendFields []string `json:"-"`
   714  	// NullFields is a list of field names (e.g. "Location") to include in API
   715  	// requests with the JSON null value. By default, fields with empty values are
   716  	// omitted from API requests. See
   717  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   718  	NullFields []string `json:"-"`
   719  }
   720  
   721  func (s *GoogleCloudSaasacceleratorManagementProvidersV1NodeSloMetadata) MarshalJSON() ([]byte, error) {
   722  	type NoMethod GoogleCloudSaasacceleratorManagementProvidersV1NodeSloMetadata
   723  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   724  }
   725  
   726  // GoogleCloudSaasacceleratorManagementProvidersV1NotificationParameter:
   727  // Contains notification related data.
   728  type GoogleCloudSaasacceleratorManagementProvidersV1NotificationParameter struct {
   729  	// Values: Optional. Array of string values. e.g. instance's replica
   730  	// information.
   731  	Values []string `json:"values,omitempty"`
   732  	// ForceSendFields is a list of field names (e.g. "Values") to unconditionally
   733  	// include in API requests. By default, fields with empty or default values are
   734  	// omitted from API requests. See
   735  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   736  	// details.
   737  	ForceSendFields []string `json:"-"`
   738  	// NullFields is a list of field names (e.g. "Values") to include in API
   739  	// requests with the JSON null value. By default, fields with empty values are
   740  	// omitted from API requests. See
   741  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   742  	NullFields []string `json:"-"`
   743  }
   744  
   745  func (s *GoogleCloudSaasacceleratorManagementProvidersV1NotificationParameter) MarshalJSON() ([]byte, error) {
   746  	type NoMethod GoogleCloudSaasacceleratorManagementProvidersV1NotificationParameter
   747  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   748  }
   749  
   750  // GoogleCloudSaasacceleratorManagementProvidersV1PerSliSloEligibility:
   751  // PerSliSloEligibility is a mapping from an SLI name to eligibility.
   752  type GoogleCloudSaasacceleratorManagementProvidersV1PerSliSloEligibility struct {
   753  	// Eligibilities: An entry in the eligibilities map specifies an eligibility
   754  	// for a particular SLI for the given instance. The SLI key in the name must be
   755  	// a valid SLI name specified in the Eligibility Exporter binary flags
   756  	// otherwise an error will be emitted by Eligibility Exporter and the oncaller
   757  	// will be alerted. If an SLI has been defined in the binary flags but the
   758  	// eligibilities map does not contain it, the corresponding SLI time series
   759  	// will not be emitted by the Eligibility Exporter. This ensures a smooth
   760  	// rollout and compatibility between the data produced by different versions of
   761  	// the Eligibility Exporters. If eligibilities map contains a key for an SLI
   762  	// which has not been declared in the binary flags, there will be an error
   763  	// message emitted in the Eligibility Exporter log and the metric for the SLI
   764  	// in question will not be emitted.
   765  	Eligibilities map[string]GoogleCloudSaasacceleratorManagementProvidersV1SloEligibility `json:"eligibilities,omitempty"`
   766  	// ForceSendFields is a list of field names (e.g. "Eligibilities") to
   767  	// unconditionally include in API requests. By default, fields with empty or
   768  	// default values are omitted from API requests. See
   769  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   770  	// details.
   771  	ForceSendFields []string `json:"-"`
   772  	// NullFields is a list of field names (e.g. "Eligibilities") to include in API
   773  	// requests with the JSON null value. By default, fields with empty values are
   774  	// omitted from API requests. See
   775  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   776  	NullFields []string `json:"-"`
   777  }
   778  
   779  func (s *GoogleCloudSaasacceleratorManagementProvidersV1PerSliSloEligibility) MarshalJSON() ([]byte, error) {
   780  	type NoMethod GoogleCloudSaasacceleratorManagementProvidersV1PerSliSloEligibility
   781  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   782  }
   783  
   784  // GoogleCloudSaasacceleratorManagementProvidersV1ProvisionedResource:
   785  // Describes provisioned dataplane resources.
   786  type GoogleCloudSaasacceleratorManagementProvidersV1ProvisionedResource struct {
   787  	// ResourceType: Type of the resource. This can be either a GCP resource or a
   788  	// custom one (e.g. another cloud provider's VM). For GCP compute resources use
   789  	// singular form of the names listed in GCP compute API documentation
   790  	// (https://cloud.google.com/compute/docs/reference/rest/v1/), prefixed with
   791  	// 'compute-', for example: 'compute-instance', 'compute-disk',
   792  	// 'compute-autoscaler'.
   793  	ResourceType string `json:"resourceType,omitempty"`
   794  	// ResourceUrl: URL identifying the resource, e.g.
   795  	// "https://www.googleapis.com/compute/v1/projects/...)".
   796  	ResourceUrl string `json:"resourceUrl,omitempty"`
   797  	// ForceSendFields is a list of field names (e.g. "ResourceType") to
   798  	// unconditionally include in API requests. By default, fields with empty or
   799  	// default values are omitted from API requests. See
   800  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   801  	// details.
   802  	ForceSendFields []string `json:"-"`
   803  	// NullFields is a list of field names (e.g. "ResourceType") to include in API
   804  	// requests with the JSON null value. By default, fields with empty values are
   805  	// omitted from API requests. See
   806  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   807  	NullFields []string `json:"-"`
   808  }
   809  
   810  func (s *GoogleCloudSaasacceleratorManagementProvidersV1ProvisionedResource) MarshalJSON() ([]byte, error) {
   811  	type NoMethod GoogleCloudSaasacceleratorManagementProvidersV1ProvisionedResource
   812  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   813  }
   814  
   815  // GoogleCloudSaasacceleratorManagementProvidersV1SloEligibility:
   816  // SloEligibility is a tuple containing eligibility value: true if an instance
   817  // is eligible for SLO calculation or false if it should be excluded from all
   818  // SLO-related calculations along with a user-defined reason.
   819  type GoogleCloudSaasacceleratorManagementProvidersV1SloEligibility struct {
   820  	// Eligible: Whether an instance is eligible or ineligible.
   821  	Eligible bool `json:"eligible,omitempty"`
   822  	// Reason: User-defined reason for the current value of instance eligibility.
   823  	// Usually, this can be directly mapped to the internal state. An empty reason
   824  	// is allowed.
   825  	Reason string `json:"reason,omitempty"`
   826  	// ForceSendFields is a list of field names (e.g. "Eligible") to
   827  	// unconditionally include in API requests. By default, fields with empty or
   828  	// default values are omitted from API requests. See
   829  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   830  	// details.
   831  	ForceSendFields []string `json:"-"`
   832  	// NullFields is a list of field names (e.g. "Eligible") to include in API
   833  	// requests with the JSON null value. By default, fields with empty values are
   834  	// omitted from API requests. See
   835  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   836  	NullFields []string `json:"-"`
   837  }
   838  
   839  func (s *GoogleCloudSaasacceleratorManagementProvidersV1SloEligibility) MarshalJSON() ([]byte, error) {
   840  	type NoMethod GoogleCloudSaasacceleratorManagementProvidersV1SloEligibility
   841  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   842  }
   843  
   844  // GoogleCloudSaasacceleratorManagementProvidersV1SloMetadata: SloMetadata
   845  // contains resources required for proper SLO classification of the instance.
   846  type GoogleCloudSaasacceleratorManagementProvidersV1SloMetadata struct {
   847  	// Nodes: Optional. List of nodes. Some producers need to use per-node metadata
   848  	// to calculate SLO. This field allows such producers to publish per-node SLO
   849  	// meta data, which will be consumed by SSA Eligibility Exporter and published
   850  	// in the form of per node metric to Monarch.
   851  	Nodes []*GoogleCloudSaasacceleratorManagementProvidersV1NodeSloMetadata `json:"nodes,omitempty"`
   852  	// PerSliEligibility: Optional. Multiple per-instance SLI eligibilities which
   853  	// apply for individual SLIs.
   854  	PerSliEligibility *GoogleCloudSaasacceleratorManagementProvidersV1PerSliSloEligibility `json:"perSliEligibility,omitempty"`
   855  	// Tier: Name of the SLO tier the Instance belongs to. This name will be
   856  	// expected to match the tiers specified in the service SLO configuration.
   857  	// Field is mandatory and must not be empty.
   858  	Tier string `json:"tier,omitempty"`
   859  	// ForceSendFields is a list of field names (e.g. "Nodes") to unconditionally
   860  	// include in API requests. By default, fields with empty or default values are
   861  	// omitted from API requests. See
   862  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   863  	// details.
   864  	ForceSendFields []string `json:"-"`
   865  	// NullFields is a list of field names (e.g. "Nodes") to include in API
   866  	// requests with the JSON null value. By default, fields with empty values are
   867  	// omitted from API requests. See
   868  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   869  	NullFields []string `json:"-"`
   870  }
   871  
   872  func (s *GoogleCloudSaasacceleratorManagementProvidersV1SloMetadata) MarshalJSON() ([]byte, error) {
   873  	type NoMethod GoogleCloudSaasacceleratorManagementProvidersV1SloMetadata
   874  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   875  }
   876  
   877  // Instance: A Filestore instance.
   878  type Instance struct {
   879  	// CapacityGb: The storage capacity of the instance in gigabytes (GB = 1024^3
   880  	// bytes). This capacity can be increased up to `max_capacity_gb` GB in
   881  	// multipliers of `capacity_step_size_gb` GB.
   882  	CapacityGb int64 `json:"capacityGb,omitempty,string"`
   883  	// CapacityStepSizeGb: Output only. The increase/decrease capacity step size.
   884  	CapacityStepSizeGb int64 `json:"capacityStepSizeGb,omitempty,string"`
   885  	// CreateTime: Output only. The time when the instance was created.
   886  	CreateTime string `json:"createTime,omitempty"`
   887  	// Description: The description of the instance (2048 characters or less).
   888  	Description string `json:"description,omitempty"`
   889  	// DirectoryServices: Optional. Directory Services configuration for
   890  	// Kerberos-based authentication. Should only be set if protocol is "NFS_V4_1".
   891  	DirectoryServices *DirectoryServicesConfig `json:"directoryServices,omitempty"`
   892  	// Etag: Server-specified ETag for the instance resource to prevent
   893  	// simultaneous updates from overwriting each other.
   894  	Etag string `json:"etag,omitempty"`
   895  	// FileShares: File system shares on the instance. For this version, only a
   896  	// single file share is supported.
   897  	FileShares []*FileShareConfig `json:"fileShares,omitempty"`
   898  	// KmsKeyName: KMS key name used for data encryption.
   899  	KmsKeyName string `json:"kmsKeyName,omitempty"`
   900  	// Labels: Resource labels to represent user provided metadata.
   901  	Labels map[string]string `json:"labels,omitempty"`
   902  	// MaxCapacityGb: Output only. The max capacity of the instance.
   903  	MaxCapacityGb int64 `json:"maxCapacityGb,omitempty,string"`
   904  	// MaxShareCount: The max number of shares allowed.
   905  	MaxShareCount int64 `json:"maxShareCount,omitempty,string"`
   906  	// MultiShareEnabled: Indicates whether this instance uses a multi-share
   907  	// configuration with which it can have more than one file-share or none at
   908  	// all. File-shares are added, updated and removed through the separate
   909  	// file-share APIs.
   910  	MultiShareEnabled bool `json:"multiShareEnabled,omitempty"`
   911  	// Name: Output only. The resource name of the instance, in the format
   912  	// `projects/{project_id}/locations/{location_id}/instances/{instance_id}`.
   913  	Name string `json:"name,omitempty"`
   914  	// Networks: VPC networks to which the instance is connected. For this version,
   915  	// only a single network is supported.
   916  	Networks []*NetworkConfig `json:"networks,omitempty"`
   917  	// Protocol: Immutable. The protocol indicates the access protocol for all
   918  	// shares in the instance. This field is immutable and it cannot be changed
   919  	// after the instance has been created. Default value: `NFS_V3`.
   920  	//
   921  	// Possible values:
   922  	//   "FILE_PROTOCOL_UNSPECIFIED" - FILE_PROTOCOL_UNSPECIFIED serves a "not set"
   923  	// default value when a FileProtocol is a separate field in a message.
   924  	//   "NFS_V3" - NFS 3.0.
   925  	//   "NFS_V4_1" - NFS 4.1.
   926  	Protocol string `json:"protocol,omitempty"`
   927  	// SatisfiesPzi: Output only. Reserved for future use.
   928  	SatisfiesPzi bool `json:"satisfiesPzi,omitempty"`
   929  	// SatisfiesPzs: Output only. Reserved for future use.
   930  	SatisfiesPzs bool `json:"satisfiesPzs,omitempty"`
   931  	// State: Output only. The instance state.
   932  	//
   933  	// Possible values:
   934  	//   "STATE_UNSPECIFIED" - State not set.
   935  	//   "CREATING" - The instance is being created.
   936  	//   "READY" - The instance is available for use.
   937  	//   "REPAIRING" - Work is being done on the instance. You can get further
   938  	// details from the `statusMessage` field of the `Instance` resource.
   939  	//   "DELETING" - The instance is shutting down.
   940  	//   "ERROR" - The instance is experiencing an issue and might be unusable. You
   941  	// can get further details from the `statusMessage` field of the `Instance`
   942  	// resource.
   943  	//   "RESTORING" - The instance is restoring a snapshot or backup to an
   944  	// existing file share and may be unusable during this time.
   945  	//   "SUSPENDED" - The instance is suspended. You can get further details from
   946  	// the `suspension_reasons` field of the `Instance` resource.
   947  	//   "REVERTING" - The instance is reverting to a snapshot.
   948  	//   "SUSPENDING" - The instance is in the process of becoming suspended.
   949  	//   "RESUMING" - The instance is in the process of becoming active.
   950  	//   "PROMOTING" - The replica instance is being promoted.
   951  	State string `json:"state,omitempty"`
   952  	// StatusMessage: Output only. Additional information about the instance state,
   953  	// if available.
   954  	StatusMessage string `json:"statusMessage,omitempty"`
   955  	// SuspensionReasons: Output only. Field indicates all the reasons the instance
   956  	// is in "SUSPENDED" state.
   957  	//
   958  	// Possible values:
   959  	//   "SUSPENSION_REASON_UNSPECIFIED" - Not set.
   960  	//   "KMS_KEY_ISSUE" - The KMS key used by the instance is either revoked or
   961  	// denied access to.
   962  	SuspensionReasons []string `json:"suspensionReasons,omitempty"`
   963  	// Tier: The service tier of the instance.
   964  	//
   965  	// Possible values:
   966  	//   "TIER_UNSPECIFIED" - Not set.
   967  	//   "STANDARD" - STANDARD tier. BASIC_HDD is the preferred term for this tier.
   968  	//   "PREMIUM" - PREMIUM tier. BASIC_SSD is the preferred term for this tier.
   969  	//   "BASIC_HDD" - BASIC instances offer a maximum capacity of 63.9 TB.
   970  	// BASIC_HDD is an alias for STANDARD Tier, offering economical performance
   971  	// backed by HDD.
   972  	//   "BASIC_SSD" - BASIC instances offer a maximum capacity of 63.9 TB.
   973  	// BASIC_SSD is an alias for PREMIUM Tier, and offers improved performance
   974  	// backed by SSD.
   975  	//   "HIGH_SCALE_SSD" - HIGH_SCALE instances offer expanded capacity and
   976  	// performance scaling capabilities.
   977  	//   "ENTERPRISE" - ENTERPRISE instances offer the features and availability
   978  	// needed for mission-critical workloads.
   979  	//   "ZONAL" - ZONAL instances offer expanded capacity and performance scaling
   980  	// capabilities.
   981  	//   "REGIONAL" - REGIONAL instances offer the features and availability needed
   982  	// for mission-critical workloads.
   983  	Tier string `json:"tier,omitempty"`
   984  
   985  	// ServerResponse contains the HTTP response code and headers from the server.
   986  	googleapi.ServerResponse `json:"-"`
   987  	// ForceSendFields is a list of field names (e.g. "CapacityGb") to
   988  	// unconditionally include in API requests. By default, fields with empty or
   989  	// default values are omitted from API requests. See
   990  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   991  	// details.
   992  	ForceSendFields []string `json:"-"`
   993  	// NullFields is a list of field names (e.g. "CapacityGb") to include in API
   994  	// requests with the JSON null value. By default, fields with empty values are
   995  	// omitted from API requests. See
   996  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   997  	NullFields []string `json:"-"`
   998  }
   999  
  1000  func (s *Instance) MarshalJSON() ([]byte, error) {
  1001  	type NoMethod Instance
  1002  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1003  }
  1004  
  1005  // ListBackupsResponse: ListBackupsResponse is the result of
  1006  // ListBackupsRequest.
  1007  type ListBackupsResponse struct {
  1008  	// Backups: A list of backups in the project for the specified location. If the
  1009  	// `{location}` value in the request is "-", the response contains a list of
  1010  	// backups from all locations. If any location is unreachable, the response
  1011  	// will only return backups in reachable locations and the "unreachable" field
  1012  	// will be populated with a list of unreachable locations.
  1013  	Backups []*Backup `json:"backups,omitempty"`
  1014  	// NextPageToken: The token you can use to retrieve the next page of results.
  1015  	// Not returned if there are no more results in the list.
  1016  	NextPageToken string `json:"nextPageToken,omitempty"`
  1017  	// Unreachable: Locations that could not be reached.
  1018  	Unreachable []string `json:"unreachable,omitempty"`
  1019  
  1020  	// ServerResponse contains the HTTP response code and headers from the server.
  1021  	googleapi.ServerResponse `json:"-"`
  1022  	// ForceSendFields is a list of field names (e.g. "Backups") to unconditionally
  1023  	// include in API requests. By default, fields with empty or default values are
  1024  	// omitted from API requests. See
  1025  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1026  	// details.
  1027  	ForceSendFields []string `json:"-"`
  1028  	// NullFields is a list of field names (e.g. "Backups") to include in API
  1029  	// requests with the JSON null value. By default, fields with empty values are
  1030  	// omitted from API requests. See
  1031  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1032  	NullFields []string `json:"-"`
  1033  }
  1034  
  1035  func (s *ListBackupsResponse) MarshalJSON() ([]byte, error) {
  1036  	type NoMethod ListBackupsResponse
  1037  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1038  }
  1039  
  1040  // ListInstancesResponse: ListInstancesResponse is the result of
  1041  // ListInstancesRequest.
  1042  type ListInstancesResponse struct {
  1043  	// Instances: A list of instances in the project for the specified location. If
  1044  	// the `{location}` value in the request is "-", the response contains a list
  1045  	// of instances from all locations. If any location is unreachable, the
  1046  	// response will only return instances in reachable locations and the
  1047  	// "unreachable" field will be populated with a list of unreachable locations.
  1048  	Instances []*Instance `json:"instances,omitempty"`
  1049  	// NextPageToken: The token you can use to retrieve the next page of results.
  1050  	// Not returned if there are no more results in the list.
  1051  	NextPageToken string `json:"nextPageToken,omitempty"`
  1052  	// Unreachable: Locations that could not be reached.
  1053  	Unreachable []string `json:"unreachable,omitempty"`
  1054  
  1055  	// ServerResponse contains the HTTP response code and headers from the server.
  1056  	googleapi.ServerResponse `json:"-"`
  1057  	// ForceSendFields is a list of field names (e.g. "Instances") to
  1058  	// unconditionally include in API requests. By default, fields with empty or
  1059  	// default values are omitted from API requests. See
  1060  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1061  	// details.
  1062  	ForceSendFields []string `json:"-"`
  1063  	// NullFields is a list of field names (e.g. "Instances") to include in API
  1064  	// requests with the JSON null value. By default, fields with empty values are
  1065  	// omitted from API requests. See
  1066  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1067  	NullFields []string `json:"-"`
  1068  }
  1069  
  1070  func (s *ListInstancesResponse) MarshalJSON() ([]byte, error) {
  1071  	type NoMethod ListInstancesResponse
  1072  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1073  }
  1074  
  1075  // ListLocationsResponse: The response message for Locations.ListLocations.
  1076  type ListLocationsResponse struct {
  1077  	// Locations: A list of locations that matches the specified filter in the
  1078  	// request.
  1079  	Locations []*Location `json:"locations,omitempty"`
  1080  	// NextPageToken: The standard List next-page token.
  1081  	NextPageToken string `json:"nextPageToken,omitempty"`
  1082  
  1083  	// ServerResponse contains the HTTP response code and headers from the server.
  1084  	googleapi.ServerResponse `json:"-"`
  1085  	// ForceSendFields is a list of field names (e.g. "Locations") to
  1086  	// unconditionally include in API requests. By default, fields with empty or
  1087  	// default values are omitted from API requests. See
  1088  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1089  	// details.
  1090  	ForceSendFields []string `json:"-"`
  1091  	// NullFields is a list of field names (e.g. "Locations") to include in API
  1092  	// requests with the JSON null value. By default, fields with empty values are
  1093  	// omitted from API requests. See
  1094  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1095  	NullFields []string `json:"-"`
  1096  }
  1097  
  1098  func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
  1099  	type NoMethod ListLocationsResponse
  1100  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1101  }
  1102  
  1103  // ListOperationsResponse: The response message for Operations.ListOperations.
  1104  type ListOperationsResponse struct {
  1105  	// NextPageToken: The standard List next-page token.
  1106  	NextPageToken string `json:"nextPageToken,omitempty"`
  1107  	// Operations: A list of operations that matches the specified filter in the
  1108  	// request.
  1109  	Operations []*Operation `json:"operations,omitempty"`
  1110  
  1111  	// ServerResponse contains the HTTP response code and headers from the server.
  1112  	googleapi.ServerResponse `json:"-"`
  1113  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1114  	// unconditionally include in API requests. By default, fields with empty or
  1115  	// default values are omitted from API requests. See
  1116  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1117  	// details.
  1118  	ForceSendFields []string `json:"-"`
  1119  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1120  	// requests with the JSON null value. By default, fields with empty values are
  1121  	// omitted from API requests. See
  1122  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1123  	NullFields []string `json:"-"`
  1124  }
  1125  
  1126  func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
  1127  	type NoMethod ListOperationsResponse
  1128  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1129  }
  1130  
  1131  // ListSharesResponse: ListSharesResponse is the result of ListSharesRequest.
  1132  type ListSharesResponse struct {
  1133  	// NextPageToken: The token you can use to retrieve the next page of results.
  1134  	// Not returned if there are no more results in the list.
  1135  	NextPageToken string `json:"nextPageToken,omitempty"`
  1136  	// Shares: A list of shares in the project for the specified instance.
  1137  	Shares []*Share `json:"shares,omitempty"`
  1138  	// Unreachable: Locations that could not be reached.
  1139  	Unreachable []string `json:"unreachable,omitempty"`
  1140  
  1141  	// ServerResponse contains the HTTP response code and headers from the server.
  1142  	googleapi.ServerResponse `json:"-"`
  1143  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1144  	// unconditionally include in API requests. By default, fields with empty or
  1145  	// default values are omitted from API requests. See
  1146  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1147  	// details.
  1148  	ForceSendFields []string `json:"-"`
  1149  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1150  	// requests with the JSON null value. By default, fields with empty values are
  1151  	// omitted from API requests. See
  1152  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1153  	NullFields []string `json:"-"`
  1154  }
  1155  
  1156  func (s *ListSharesResponse) MarshalJSON() ([]byte, error) {
  1157  	type NoMethod ListSharesResponse
  1158  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1159  }
  1160  
  1161  // ListSnapshotsResponse: ListSnapshotsResponse is the result of
  1162  // ListSnapshotsRequest.
  1163  type ListSnapshotsResponse struct {
  1164  	// NextPageToken: The token you can use to retrieve the next page of results.
  1165  	// Not returned if there are no more results in the list.
  1166  	NextPageToken string `json:"nextPageToken,omitempty"`
  1167  	// Snapshots: A list of snapshots in the project for the specified instance.
  1168  	Snapshots []*Snapshot `json:"snapshots,omitempty"`
  1169  
  1170  	// ServerResponse contains the HTTP response code and headers from the server.
  1171  	googleapi.ServerResponse `json:"-"`
  1172  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1173  	// unconditionally include in API requests. By default, fields with empty or
  1174  	// default values are omitted from API requests. See
  1175  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1176  	// details.
  1177  	ForceSendFields []string `json:"-"`
  1178  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1179  	// requests with the JSON null value. By default, fields with empty values are
  1180  	// omitted from API requests. See
  1181  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1182  	NullFields []string `json:"-"`
  1183  }
  1184  
  1185  func (s *ListSnapshotsResponse) MarshalJSON() ([]byte, error) {
  1186  	type NoMethod ListSnapshotsResponse
  1187  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1188  }
  1189  
  1190  // Location: A resource that represents a Google Cloud location.
  1191  type Location struct {
  1192  	// DisplayName: The friendly name for this location, typically a nearby city
  1193  	// name. For example, "Tokyo".
  1194  	DisplayName string `json:"displayName,omitempty"`
  1195  	// Labels: Cross-service attributes for the location. For example
  1196  	// {"cloud.googleapis.com/region": "us-east1"}
  1197  	Labels map[string]string `json:"labels,omitempty"`
  1198  	// LocationId: The canonical id for this location. For example: "us-east1".
  1199  	LocationId string `json:"locationId,omitempty"`
  1200  	// Metadata: Service-specific metadata. For example the available capacity at
  1201  	// the given location.
  1202  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  1203  	// Name: Resource name for the location, which may vary between
  1204  	// implementations. For example:
  1205  	// "projects/example-project/locations/us-east1"
  1206  	Name string `json:"name,omitempty"`
  1207  
  1208  	// ServerResponse contains the HTTP response code and headers from the server.
  1209  	googleapi.ServerResponse `json:"-"`
  1210  	// ForceSendFields is a list of field names (e.g. "DisplayName") to
  1211  	// unconditionally include in API requests. By default, fields with empty or
  1212  	// default values are omitted from API requests. See
  1213  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1214  	// details.
  1215  	ForceSendFields []string `json:"-"`
  1216  	// NullFields is a list of field names (e.g. "DisplayName") to include in API
  1217  	// requests with the JSON null value. By default, fields with empty values are
  1218  	// omitted from API requests. See
  1219  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1220  	NullFields []string `json:"-"`
  1221  }
  1222  
  1223  func (s *Location) MarshalJSON() ([]byte, error) {
  1224  	type NoMethod Location
  1225  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1226  }
  1227  
  1228  // MaintenancePolicy: Defines policies to service maintenance events.
  1229  type MaintenancePolicy struct {
  1230  	// CreateTime: Output only. The time when the resource was created.
  1231  	CreateTime string `json:"createTime,omitempty"`
  1232  	// Description: Optional. Description of what this policy is for. Create/Update
  1233  	// methods return INVALID_ARGUMENT if the length is greater than 512.
  1234  	Description string `json:"description,omitempty"`
  1235  	// Labels: Optional. Resource labels to represent user provided metadata. Each
  1236  	// label is a key-value pair, where both the key and the value are arbitrary
  1237  	// strings provided by the user.
  1238  	Labels map[string]string `json:"labels,omitempty"`
  1239  	// Name: Required. MaintenancePolicy name using the form:
  1240  	// `projects/{project_id}/locations/{location_id}/maintenancePolicies/{maintenan
  1241  	// ce_policy_id}` where {project_id} refers to a GCP consumer project ID,
  1242  	// {location_id} refers to a GCP region/zone, {maintenance_policy_id} must be
  1243  	// 1-63 characters long and match the regular expression
  1244  	// `[a-z0-9]([-a-z0-9]*[a-z0-9])?`.
  1245  	Name string `json:"name,omitempty"`
  1246  	// State: Optional. The state of the policy.
  1247  	//
  1248  	// Possible values:
  1249  	//   "STATE_UNSPECIFIED" - Unspecified state.
  1250  	//   "READY" - Resource is ready to be used.
  1251  	//   "DELETING" - Resource is being deleted. It can no longer be attached to
  1252  	// instances.
  1253  	State string `json:"state,omitempty"`
  1254  	// UpdatePolicy: Maintenance policy applicable to instance update.
  1255  	UpdatePolicy *UpdatePolicy `json:"updatePolicy,omitempty"`
  1256  	// UpdateTime: Output only. The time when the resource was updated.
  1257  	UpdateTime string `json:"updateTime,omitempty"`
  1258  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  1259  	// unconditionally include in API requests. By default, fields with empty or
  1260  	// default values are omitted from API requests. See
  1261  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1262  	// details.
  1263  	ForceSendFields []string `json:"-"`
  1264  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  1265  	// requests with the JSON null value. By default, fields with empty values are
  1266  	// omitted from API requests. See
  1267  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1268  	NullFields []string `json:"-"`
  1269  }
  1270  
  1271  func (s *MaintenancePolicy) MarshalJSON() ([]byte, error) {
  1272  	type NoMethod MaintenancePolicy
  1273  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1274  }
  1275  
  1276  // MaintenanceWindow: MaintenanceWindow definition.
  1277  type MaintenanceWindow struct {
  1278  	// DailyCycle: Daily cycle.
  1279  	DailyCycle *DailyCycle `json:"dailyCycle,omitempty"`
  1280  	// WeeklyCycle: Weekly cycle.
  1281  	WeeklyCycle *WeeklyCycle `json:"weeklyCycle,omitempty"`
  1282  	// ForceSendFields is a list of field names (e.g. "DailyCycle") to
  1283  	// unconditionally include in API requests. By default, fields with empty or
  1284  	// default values are omitted from API requests. See
  1285  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1286  	// details.
  1287  	ForceSendFields []string `json:"-"`
  1288  	// NullFields is a list of field names (e.g. "DailyCycle") to include in API
  1289  	// requests with the JSON null value. By default, fields with empty values are
  1290  	// omitted from API requests. See
  1291  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1292  	NullFields []string `json:"-"`
  1293  }
  1294  
  1295  func (s *MaintenanceWindow) MarshalJSON() ([]byte, error) {
  1296  	type NoMethod MaintenanceWindow
  1297  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1298  }
  1299  
  1300  // ManagedActiveDirectoryConfig: ManagedActiveDirectoryConfig contains all the
  1301  // parameters for connecting to Managed Active Directory.
  1302  type ManagedActiveDirectoryConfig struct {
  1303  	// Computer: Required. The computer name is used as a prefix to the mount
  1304  	// remote target. Example: if the computer is `my-computer`, the mount command
  1305  	// will look like: `$mount -o vers=4.1,sec=krb5 my-computer.filestore.: `.
  1306  	Computer string `json:"computer,omitempty"`
  1307  	// Domain: Required. The domain resource name, in the format
  1308  	// `projects/{project_id}/locations/global/domains/{domain}`.
  1309  	Domain string `json:"domain,omitempty"`
  1310  	// ForceSendFields is a list of field names (e.g. "Computer") to
  1311  	// unconditionally include in API requests. By default, fields with empty or
  1312  	// default values are omitted from API requests. See
  1313  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1314  	// details.
  1315  	ForceSendFields []string `json:"-"`
  1316  	// NullFields is a list of field names (e.g. "Computer") to include in API
  1317  	// requests with the JSON null value. By default, fields with empty values are
  1318  	// omitted from API requests. See
  1319  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1320  	NullFields []string `json:"-"`
  1321  }
  1322  
  1323  func (s *ManagedActiveDirectoryConfig) MarshalJSON() ([]byte, error) {
  1324  	type NoMethod ManagedActiveDirectoryConfig
  1325  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1326  }
  1327  
  1328  // NetworkConfig: Network configuration for the instance.
  1329  type NetworkConfig struct {
  1330  	// ConnectMode: The network connect mode of the Filestore instance. If not
  1331  	// provided, the connect mode defaults to DIRECT_PEERING.
  1332  	//
  1333  	// Possible values:
  1334  	//   "CONNECT_MODE_UNSPECIFIED" - ConnectMode not set.
  1335  	//   "DIRECT_PEERING" - Connect via direct peering to the Filestore service.
  1336  	//   "PRIVATE_SERVICE_ACCESS" - Connect to your Filestore instance using
  1337  	// Private Service Access. Private services access provides an IP address range
  1338  	// for multiple Google Cloud services, including Filestore.
  1339  	ConnectMode string `json:"connectMode,omitempty"`
  1340  	// IpAddresses: Output only. IPv4 addresses in the format
  1341  	// `{octet1}.{octet2}.{octet3}.{octet4}` or IPv6 addresses in the format
  1342  	// `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`.
  1343  	IpAddresses []string `json:"ipAddresses,omitempty"`
  1344  	// Modes: Internet protocol versions for which the instance has IP addresses
  1345  	// assigned. For this version, only MODE_IPV4 is supported.
  1346  	//
  1347  	// Possible values:
  1348  	//   "ADDRESS_MODE_UNSPECIFIED" - Internet protocol not set.
  1349  	//   "MODE_IPV4" - Use the IPv4 internet protocol.
  1350  	Modes []string `json:"modes,omitempty"`
  1351  	// Network: The name of the Google Compute Engine VPC network
  1352  	// (https://cloud.google.com/vpc/docs/vpc) to which the instance is connected.
  1353  	Network string `json:"network,omitempty"`
  1354  	// ReservedIpRange: Optional, reserved_ip_range can have one of the following
  1355  	// two types of values. * CIDR range value when using DIRECT_PEERING connect
  1356  	// mode. * Allocated IP address range
  1357  	// (https://cloud.google.com/compute/docs/ip-addresses/reserve-static-internal-ip-address)
  1358  	// when using PRIVATE_SERVICE_ACCESS connect mode. When the name of an
  1359  	// allocated IP address range is specified, it must be one of the ranges
  1360  	// associated with the private service access connection. When specified as a
  1361  	// direct CIDR value, it must be a /29 CIDR block for Basic tier, a /24 CIDR
  1362  	// block for High Scale tier, or a /26 CIDR block for Enterprise tier in one of
  1363  	// the internal IP address ranges
  1364  	// (https://www.arin.net/reference/research/statistics/address_filters/) that
  1365  	// identifies the range of IP addresses reserved for this instance. For
  1366  	// example, 10.0.0.0/29, 192.168.0.0/24, or 192.168.0.0/26, respectively. The
  1367  	// range you specify can't overlap with either existing subnets or assigned IP
  1368  	// address ranges for other Filestore instances in the selected VPC network.
  1369  	ReservedIpRange string `json:"reservedIpRange,omitempty"`
  1370  	// ForceSendFields is a list of field names (e.g. "ConnectMode") to
  1371  	// unconditionally include in API requests. By default, fields with empty or
  1372  	// default values are omitted from API requests. See
  1373  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1374  	// details.
  1375  	ForceSendFields []string `json:"-"`
  1376  	// NullFields is a list of field names (e.g. "ConnectMode") to include in API
  1377  	// requests with the JSON null value. By default, fields with empty values are
  1378  	// omitted from API requests. See
  1379  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1380  	NullFields []string `json:"-"`
  1381  }
  1382  
  1383  func (s *NetworkConfig) MarshalJSON() ([]byte, error) {
  1384  	type NoMethod NetworkConfig
  1385  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1386  }
  1387  
  1388  // NfsExportOptions: NFS export options specifications.
  1389  type NfsExportOptions struct {
  1390  	// AccessMode: Either READ_ONLY, for allowing only read requests on the
  1391  	// exported directory, or READ_WRITE, for allowing both read and write
  1392  	// requests. The default is READ_WRITE.
  1393  	//
  1394  	// Possible values:
  1395  	//   "ACCESS_MODE_UNSPECIFIED" - AccessMode not set.
  1396  	//   "READ_ONLY" - The client can only read the file share.
  1397  	//   "READ_WRITE" - The client can read and write the file share (default).
  1398  	AccessMode string `json:"accessMode,omitempty"`
  1399  	// AnonGid: An integer representing the anonymous group id with a default value
  1400  	// of 65534. Anon_gid may only be set with squash_mode of ROOT_SQUASH. An error
  1401  	// will be returned if this field is specified for other squash_mode settings.
  1402  	AnonGid int64 `json:"anonGid,omitempty,string"`
  1403  	// AnonUid: An integer representing the anonymous user id with a default value
  1404  	// of 65534. Anon_uid may only be set with squash_mode of ROOT_SQUASH. An error
  1405  	// will be returned if this field is specified for other squash_mode settings.
  1406  	AnonUid int64 `json:"anonUid,omitempty,string"`
  1407  	// IpRanges: List of either an IPv4 addresses in the format
  1408  	// `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format
  1409  	// `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the file
  1410  	// share. Overlapping IP ranges are not allowed, both within and across
  1411  	// NfsExportOptions. An error will be returned. The limit is 64 IP
  1412  	// ranges/addresses for each FileShareConfig among all NfsExportOptions.
  1413  	IpRanges []string `json:"ipRanges,omitempty"`
  1414  	// SecurityFlavors: The security flavors allowed for mount operations. The
  1415  	// default is AUTH_SYS.
  1416  	//
  1417  	// Possible values:
  1418  	//   "SECURITY_FLAVOR_UNSPECIFIED" - SecurityFlavor not set.
  1419  	//   "AUTH_SYS" - The user's UNIX user-id and group-ids are transferred "in the
  1420  	// clear" (not encrypted) on the network, unauthenticated by the NFS server
  1421  	// (default).
  1422  	//   "KRB5" - End-user authentication through Kerberos V5.
  1423  	//   "KRB5I" - krb5 plus integrity protection (data packets are tamper proof).
  1424  	//   "KRB5P" - krb5i plus privacy protection (data packets are tamper proof and
  1425  	// encrypted).
  1426  	SecurityFlavors []string `json:"securityFlavors,omitempty"`
  1427  	// SquashMode: Either NO_ROOT_SQUASH, for allowing root access on the exported
  1428  	// directory, or ROOT_SQUASH, for not allowing root access. The default is
  1429  	// NO_ROOT_SQUASH.
  1430  	//
  1431  	// Possible values:
  1432  	//   "SQUASH_MODE_UNSPECIFIED" - SquashMode not set.
  1433  	//   "NO_ROOT_SQUASH" - The Root user has root access to the file share
  1434  	// (default).
  1435  	//   "ROOT_SQUASH" - The Root user has squashed access to the anonymous
  1436  	// uid/gid.
  1437  	SquashMode string `json:"squashMode,omitempty"`
  1438  	// ForceSendFields is a list of field names (e.g. "AccessMode") to
  1439  	// unconditionally include in API requests. By default, fields with empty or
  1440  	// default values are omitted from API requests. See
  1441  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1442  	// details.
  1443  	ForceSendFields []string `json:"-"`
  1444  	// NullFields is a list of field names (e.g. "AccessMode") to include in API
  1445  	// requests with the JSON null value. By default, fields with empty values are
  1446  	// omitted from API requests. See
  1447  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1448  	NullFields []string `json:"-"`
  1449  }
  1450  
  1451  func (s *NfsExportOptions) MarshalJSON() ([]byte, error) {
  1452  	type NoMethod NfsExportOptions
  1453  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1454  }
  1455  
  1456  // Operation: This resource represents a long-running operation that is the
  1457  // result of a network API call.
  1458  type Operation struct {
  1459  	// Done: If the value is `false`, it means the operation is still in progress.
  1460  	// If `true`, the operation is completed, and either `error` or `response` is
  1461  	// available.
  1462  	Done bool `json:"done,omitempty"`
  1463  	// Error: The error result of the operation in case of failure or cancellation.
  1464  	Error *Status `json:"error,omitempty"`
  1465  	// Metadata: Service-specific metadata associated with the operation. It
  1466  	// typically contains progress information and common metadata such as create
  1467  	// time. Some services might not provide such metadata. Any method that returns
  1468  	// a long-running operation should document the metadata type, if any.
  1469  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  1470  	// Name: The server-assigned name, which is only unique within the same service
  1471  	// that originally returns it. If you use the default HTTP mapping, the `name`
  1472  	// should be a resource name ending with `operations/{unique_id}`.
  1473  	Name string `json:"name,omitempty"`
  1474  	// Response: The normal, successful response of the operation. If the original
  1475  	// method returns no data on success, such as `Delete`, the response is
  1476  	// `google.protobuf.Empty`. If the original method is standard
  1477  	// `Get`/`Create`/`Update`, the response should be the resource. For other
  1478  	// methods, the response should have the type `XxxResponse`, where `Xxx` is the
  1479  	// original method name. For example, if the original method name is
  1480  	// `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
  1481  	Response googleapi.RawMessage `json:"response,omitempty"`
  1482  
  1483  	// ServerResponse contains the HTTP response code and headers from the server.
  1484  	googleapi.ServerResponse `json:"-"`
  1485  	// ForceSendFields is a list of field names (e.g. "Done") to unconditionally
  1486  	// include in API requests. By default, fields with empty or default values are
  1487  	// omitted from API requests. See
  1488  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1489  	// details.
  1490  	ForceSendFields []string `json:"-"`
  1491  	// NullFields is a list of field names (e.g. "Done") to include in API requests
  1492  	// with the JSON null value. By default, fields with empty values are omitted
  1493  	// from API requests. See
  1494  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1495  	NullFields []string `json:"-"`
  1496  }
  1497  
  1498  func (s *Operation) MarshalJSON() ([]byte, error) {
  1499  	type NoMethod Operation
  1500  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1501  }
  1502  
  1503  // OperationMetadata: Represents the metadata of the long-running operation.
  1504  type OperationMetadata struct {
  1505  	// ApiVersion: Output only. API version used to start the operation.
  1506  	ApiVersion string `json:"apiVersion,omitempty"`
  1507  	// CancelRequested: Output only. Identifies whether the user has requested
  1508  	// cancellation of the operation. Operations that have been cancelled
  1509  	// successfully have Operation.error value with a google.rpc.Status.code of 1,
  1510  	// corresponding to `Code.CANCELLED`.
  1511  	CancelRequested bool `json:"cancelRequested,omitempty"`
  1512  	// CreateTime: Output only. The time the operation was created.
  1513  	CreateTime string `json:"createTime,omitempty"`
  1514  	// EndTime: Output only. The time the operation finished running.
  1515  	EndTime string `json:"endTime,omitempty"`
  1516  	// StatusDetail: Output only. Human-readable status of the operation, if any.
  1517  	StatusDetail string `json:"statusDetail,omitempty"`
  1518  	// Target: Output only. Server-defined resource path for the target of the
  1519  	// operation.
  1520  	Target string `json:"target,omitempty"`
  1521  	// Verb: Output only. Name of the verb executed by the operation.
  1522  	Verb string `json:"verb,omitempty"`
  1523  	// ForceSendFields is a list of field names (e.g. "ApiVersion") to
  1524  	// unconditionally include in API requests. By default, fields with empty or
  1525  	// default values are omitted from API requests. See
  1526  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1527  	// details.
  1528  	ForceSendFields []string `json:"-"`
  1529  	// NullFields is a list of field names (e.g. "ApiVersion") to include in API
  1530  	// requests with the JSON null value. By default, fields with empty values are
  1531  	// omitted from API requests. See
  1532  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1533  	NullFields []string `json:"-"`
  1534  }
  1535  
  1536  func (s *OperationMetadata) MarshalJSON() ([]byte, error) {
  1537  	type NoMethod OperationMetadata
  1538  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1539  }
  1540  
  1541  // PromoteReplicaRequest: PromoteReplicaRequest promotes a Filestore standby
  1542  // instance (replica).
  1543  type PromoteReplicaRequest struct {
  1544  }
  1545  
  1546  // RestoreInstanceRequest: RestoreInstanceRequest restores an existing
  1547  // instance's file share from a backup.
  1548  type RestoreInstanceRequest struct {
  1549  	// FileShare: Required. Name of the file share in the Filestore instance that
  1550  	// the backup is being restored to.
  1551  	FileShare string `json:"fileShare,omitempty"`
  1552  	// SourceBackup: The resource name of the backup, in the format
  1553  	// `projects/{project_id}/locations/{location_id}/backups/{backup_id}`.
  1554  	SourceBackup string `json:"sourceBackup,omitempty"`
  1555  	// SourceSnapshot: The resource name of the snapshot, in the format
  1556  	// `projects/{project_id}/locations/{location_id}/snapshots/{snapshot_id}`.
  1557  	SourceSnapshot string `json:"sourceSnapshot,omitempty"`
  1558  	// ForceSendFields is a list of field names (e.g. "FileShare") to
  1559  	// unconditionally include in API requests. By default, fields with empty or
  1560  	// default values are omitted from API requests. See
  1561  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1562  	// details.
  1563  	ForceSendFields []string `json:"-"`
  1564  	// NullFields is a list of field names (e.g. "FileShare") to include in API
  1565  	// requests with the JSON null value. By default, fields with empty values are
  1566  	// omitted from API requests. See
  1567  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1568  	NullFields []string `json:"-"`
  1569  }
  1570  
  1571  func (s *RestoreInstanceRequest) MarshalJSON() ([]byte, error) {
  1572  	type NoMethod RestoreInstanceRequest
  1573  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1574  }
  1575  
  1576  // RevertInstanceRequest: RevertInstanceRequest reverts the given instance's
  1577  // file share to the specified snapshot.
  1578  type RevertInstanceRequest struct {
  1579  	// TargetSnapshotId: Required. The snapshot resource ID, in the format
  1580  	// 'my-snapshot', where the specified ID is the {snapshot_id} of the fully
  1581  	// qualified name like
  1582  	// `projects/{project_id}/locations/{location_id}/instances/{instance_id}/snapsh
  1583  	// ots/{snapshot_id}`
  1584  	TargetSnapshotId string `json:"targetSnapshotId,omitempty"`
  1585  	// ForceSendFields is a list of field names (e.g. "TargetSnapshotId") to
  1586  	// unconditionally include in API requests. By default, fields with empty or
  1587  	// default values are omitted from API requests. See
  1588  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1589  	// details.
  1590  	ForceSendFields []string `json:"-"`
  1591  	// NullFields is a list of field names (e.g. "TargetSnapshotId") to include in
  1592  	// API requests with the JSON null value. By default, fields with empty values
  1593  	// are omitted from API requests. See
  1594  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1595  	NullFields []string `json:"-"`
  1596  }
  1597  
  1598  func (s *RevertInstanceRequest) MarshalJSON() ([]byte, error) {
  1599  	type NoMethod RevertInstanceRequest
  1600  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1601  }
  1602  
  1603  // Schedule: Configure the schedule.
  1604  type Schedule struct {
  1605  	// Day: Allows to define schedule that runs specified day of the week.
  1606  	//
  1607  	// Possible values:
  1608  	//   "DAY_OF_WEEK_UNSPECIFIED" - The day of the week is unspecified.
  1609  	//   "MONDAY" - Monday
  1610  	//   "TUESDAY" - Tuesday
  1611  	//   "WEDNESDAY" - Wednesday
  1612  	//   "THURSDAY" - Thursday
  1613  	//   "FRIDAY" - Friday
  1614  	//   "SATURDAY" - Saturday
  1615  	//   "SUNDAY" - Sunday
  1616  	Day string `json:"day,omitempty"`
  1617  	// Duration: Output only. Duration of the time window, set by service producer.
  1618  	Duration string `json:"duration,omitempty"`
  1619  	// StartTime: Time within the window to start the operations.
  1620  	StartTime *TimeOfDay `json:"startTime,omitempty"`
  1621  	// ForceSendFields is a list of field names (e.g. "Day") to unconditionally
  1622  	// include in API requests. By default, fields with empty or default values are
  1623  	// omitted from API requests. See
  1624  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1625  	// details.
  1626  	ForceSendFields []string `json:"-"`
  1627  	// NullFields is a list of field names (e.g. "Day") to include in API requests
  1628  	// with the JSON null value. By default, fields with empty values are omitted
  1629  	// from API requests. See
  1630  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1631  	NullFields []string `json:"-"`
  1632  }
  1633  
  1634  func (s *Schedule) MarshalJSON() ([]byte, error) {
  1635  	type NoMethod Schedule
  1636  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1637  }
  1638  
  1639  // Share: A Filestore share.
  1640  type Share struct {
  1641  	// Backup: Immutable. Full name of the Cloud Filestore Backup resource that
  1642  	// this Share is restored from, in the format of
  1643  	// projects/{project_id}/locations/{location_id}/backups/{backup_id}. Empty, if
  1644  	// the Share is created from scratch and not restored from a backup.
  1645  	Backup string `json:"backup,omitempty"`
  1646  	// CapacityGb: File share capacity in gigabytes (GB). Filestore defines 1 GB as
  1647  	// 1024^3 bytes. Must be greater than 0.
  1648  	CapacityGb int64 `json:"capacityGb,omitempty,string"`
  1649  	// CreateTime: Output only. The time when the share was created.
  1650  	CreateTime string `json:"createTime,omitempty"`
  1651  	// Description: A description of the share with 2048 characters or less.
  1652  	// Requests with longer descriptions will be rejected.
  1653  	Description string `json:"description,omitempty"`
  1654  	// Labels: Resource labels to represent user provided metadata.
  1655  	Labels map[string]string `json:"labels,omitempty"`
  1656  	// MountName: The mount name of the share. Must be 63 characters or less and
  1657  	// consist of uppercase or lowercase letters, numbers, and underscores.
  1658  	MountName string `json:"mountName,omitempty"`
  1659  	// Name: Output only. The resource name of the share, in the format
  1660  	// `projects/{project_id}/locations/{location_id}/instances/{instance_id}/shares
  1661  	// /{share_id}`.
  1662  	Name string `json:"name,omitempty"`
  1663  	// NfsExportOptions: Nfs Export Options. There is a limit of 10 export options
  1664  	// per file share.
  1665  	NfsExportOptions []*NfsExportOptions `json:"nfsExportOptions,omitempty"`
  1666  	// State: Output only. The share state.
  1667  	//
  1668  	// Possible values:
  1669  	//   "STATE_UNSPECIFIED" - State not set.
  1670  	//   "CREATING" - Share is being created.
  1671  	//   "READY" - Share is ready for use.
  1672  	//   "DELETING" - Share is being deleted.
  1673  	State string `json:"state,omitempty"`
  1674  
  1675  	// ServerResponse contains the HTTP response code and headers from the server.
  1676  	googleapi.ServerResponse `json:"-"`
  1677  	// ForceSendFields is a list of field names (e.g. "Backup") to unconditionally
  1678  	// include in API requests. By default, fields with empty or default values are
  1679  	// omitted from API requests. See
  1680  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1681  	// details.
  1682  	ForceSendFields []string `json:"-"`
  1683  	// NullFields is a list of field names (e.g. "Backup") to include in API
  1684  	// requests with the JSON null value. By default, fields with empty values are
  1685  	// omitted from API requests. See
  1686  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1687  	NullFields []string `json:"-"`
  1688  }
  1689  
  1690  func (s *Share) MarshalJSON() ([]byte, error) {
  1691  	type NoMethod Share
  1692  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1693  }
  1694  
  1695  // Snapshot: A Filestore snapshot.
  1696  type Snapshot struct {
  1697  	// CreateTime: Output only. The time when the snapshot was created.
  1698  	CreateTime string `json:"createTime,omitempty"`
  1699  	// Description: A description of the snapshot with 2048 characters or less.
  1700  	// Requests with longer descriptions will be rejected.
  1701  	Description string `json:"description,omitempty"`
  1702  	// FilesystemUsedBytes: Output only. The amount of bytes needed to allocate a
  1703  	// full copy of the snapshot content
  1704  	FilesystemUsedBytes int64 `json:"filesystemUsedBytes,omitempty,string"`
  1705  	// Labels: Resource labels to represent user provided metadata.
  1706  	Labels map[string]string `json:"labels,omitempty"`
  1707  	// Name: Output only. The resource name of the snapshot, in the format
  1708  	// `projects/{project_id}/locations/{location_id}/instances/{instance_id}/snapsh
  1709  	// ots/{snapshot_id}`.
  1710  	Name string `json:"name,omitempty"`
  1711  	// State: Output only. The snapshot state.
  1712  	//
  1713  	// Possible values:
  1714  	//   "STATE_UNSPECIFIED" - State not set.
  1715  	//   "CREATING" - Snapshot is being created.
  1716  	//   "READY" - Snapshot is available for use.
  1717  	//   "DELETING" - Snapshot is being deleted.
  1718  	State string `json:"state,omitempty"`
  1719  
  1720  	// ServerResponse contains the HTTP response code and headers from the server.
  1721  	googleapi.ServerResponse `json:"-"`
  1722  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  1723  	// unconditionally include in API requests. By default, fields with empty or
  1724  	// default values are omitted from API requests. See
  1725  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1726  	// details.
  1727  	ForceSendFields []string `json:"-"`
  1728  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  1729  	// requests with the JSON null value. By default, fields with empty values are
  1730  	// omitted from API requests. See
  1731  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1732  	NullFields []string `json:"-"`
  1733  }
  1734  
  1735  func (s *Snapshot) MarshalJSON() ([]byte, error) {
  1736  	type NoMethod Snapshot
  1737  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1738  }
  1739  
  1740  // Status: The `Status` type defines a logical error model that is suitable for
  1741  // different programming environments, including REST APIs and RPC APIs. It is
  1742  // used by gRPC (https://github.com/grpc). Each `Status` message contains three
  1743  // pieces of data: error code, error message, and error details. You can find
  1744  // out more about this error model and how to work with it in the API Design
  1745  // Guide (https://cloud.google.com/apis/design/errors).
  1746  type Status struct {
  1747  	// Code: The status code, which should be an enum value of google.rpc.Code.
  1748  	Code int64 `json:"code,omitempty"`
  1749  	// Details: A list of messages that carry the error details. There is a common
  1750  	// set of message types for APIs to use.
  1751  	Details []googleapi.RawMessage `json:"details,omitempty"`
  1752  	// Message: A developer-facing error message, which should be in English. Any
  1753  	// user-facing error message should be localized and sent in the
  1754  	// google.rpc.Status.details field, or localized by the client.
  1755  	Message string `json:"message,omitempty"`
  1756  	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
  1757  	// include in API requests. By default, fields with empty or default values are
  1758  	// omitted from API requests. See
  1759  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1760  	// details.
  1761  	ForceSendFields []string `json:"-"`
  1762  	// NullFields is a list of field names (e.g. "Code") to include in API requests
  1763  	// with the JSON null value. By default, fields with empty values are omitted
  1764  	// from API requests. See
  1765  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1766  	NullFields []string `json:"-"`
  1767  }
  1768  
  1769  func (s *Status) MarshalJSON() ([]byte, error) {
  1770  	type NoMethod Status
  1771  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1772  }
  1773  
  1774  // TimeOfDay: Represents a time of day. The date and time zone are either not
  1775  // significant or are specified elsewhere. An API may choose to allow leap
  1776  // seconds. Related types are google.type.Date and `google.protobuf.Timestamp`.
  1777  type TimeOfDay struct {
  1778  	// Hours: Hours of day in 24 hour format. Should be from 0 to 23. An API may
  1779  	// choose to allow the value "24:00:00" for scenarios like business closing
  1780  	// time.
  1781  	Hours int64 `json:"hours,omitempty"`
  1782  	// Minutes: Minutes of hour of day. Must be from 0 to 59.
  1783  	Minutes int64 `json:"minutes,omitempty"`
  1784  	// Nanos: Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
  1785  	Nanos int64 `json:"nanos,omitempty"`
  1786  	// Seconds: Seconds of minutes of the time. Must normally be from 0 to 59. An
  1787  	// API may allow the value 60 if it allows leap-seconds.
  1788  	Seconds int64 `json:"seconds,omitempty"`
  1789  	// ForceSendFields is a list of field names (e.g. "Hours") to unconditionally
  1790  	// include in API requests. By default, fields with empty or default values are
  1791  	// omitted from API requests. See
  1792  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1793  	// details.
  1794  	ForceSendFields []string `json:"-"`
  1795  	// NullFields is a list of field names (e.g. "Hours") to include in API
  1796  	// requests with the JSON null value. By default, fields with empty values are
  1797  	// omitted from API requests. See
  1798  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1799  	NullFields []string `json:"-"`
  1800  }
  1801  
  1802  func (s *TimeOfDay) MarshalJSON() ([]byte, error) {
  1803  	type NoMethod TimeOfDay
  1804  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1805  }
  1806  
  1807  // UpdatePolicy: Maintenance policy applicable to instance updates.
  1808  type UpdatePolicy struct {
  1809  	// Channel: Optional. Relative scheduling channel applied to resource.
  1810  	//
  1811  	// Possible values:
  1812  	//   "UPDATE_CHANNEL_UNSPECIFIED" - Unspecified channel.
  1813  	//   "EARLIER" - Early channel within a customer project.
  1814  	//   "LATER" - Later channel within a customer project.
  1815  	//   "WEEK1" - ! ! The follow channels can ONLY be used if you adopt the new MW
  1816  	// system! ! ! NOTE: all WEEK channels are assumed to be under a weekly window.
  1817  	// ! There is currently no dedicated channel definitions for Daily windows. !
  1818  	// If you use Daily window, the system will assume a 1d (24Hours) advanced !
  1819  	// notification period b/w EARLY and LATER. ! We may consider support more
  1820  	// flexible daily channel specifications in ! the future. WEEK1 == EARLIER with
  1821  	// minimum 7d advanced notification. {7d, 14d} The system will treat them
  1822  	// equally and will use WEEK1 whenever it can. New customers are encouraged to
  1823  	// use this channel annotation.
  1824  	//   "WEEK2" - WEEK2 == LATER with minimum 14d advanced notification {14d,
  1825  	// 21d}.
  1826  	//   "WEEK5" - WEEK5 == 40d support. minimum 35d advanced notification {35d,
  1827  	// 42d}.
  1828  	Channel string `json:"channel,omitempty"`
  1829  	// DenyMaintenancePeriods: Deny Maintenance Period that is applied to resource
  1830  	// to indicate when maintenance is forbidden. The protocol supports
  1831  	// zero-to-many such periods, but the current SLM Rollout implementation only
  1832  	// supports zero-to-one.
  1833  	DenyMaintenancePeriods []*DenyMaintenancePeriod `json:"denyMaintenancePeriods,omitempty"`
  1834  	// Window: Optional. Maintenance window that is applied to resources covered by
  1835  	// this policy.
  1836  	Window *MaintenanceWindow `json:"window,omitempty"`
  1837  	// ForceSendFields is a list of field names (e.g. "Channel") to unconditionally
  1838  	// include in API requests. By default, fields with empty or default values are
  1839  	// omitted from API requests. See
  1840  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1841  	// details.
  1842  	ForceSendFields []string `json:"-"`
  1843  	// NullFields is a list of field names (e.g. "Channel") to include in API
  1844  	// requests with the JSON null value. By default, fields with empty values are
  1845  	// omitted from API requests. See
  1846  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1847  	NullFields []string `json:"-"`
  1848  }
  1849  
  1850  func (s *UpdatePolicy) MarshalJSON() ([]byte, error) {
  1851  	type NoMethod UpdatePolicy
  1852  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1853  }
  1854  
  1855  // WeeklyCycle: Time window specified for weekly operations.
  1856  type WeeklyCycle struct {
  1857  	// Schedule: User can specify multiple windows in a week. Minimum of 1 window.
  1858  	Schedule []*Schedule `json:"schedule,omitempty"`
  1859  	// ForceSendFields is a list of field names (e.g. "Schedule") to
  1860  	// unconditionally include in API requests. By default, fields with empty or
  1861  	// default values are omitted from API requests. See
  1862  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1863  	// details.
  1864  	ForceSendFields []string `json:"-"`
  1865  	// NullFields is a list of field names (e.g. "Schedule") to include in API
  1866  	// requests with the JSON null value. By default, fields with empty values are
  1867  	// omitted from API requests. See
  1868  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1869  	NullFields []string `json:"-"`
  1870  }
  1871  
  1872  func (s *WeeklyCycle) MarshalJSON() ([]byte, error) {
  1873  	type NoMethod WeeklyCycle
  1874  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1875  }
  1876  
  1877  type ProjectsLocationsGetCall struct {
  1878  	s            *Service
  1879  	name         string
  1880  	urlParams_   gensupport.URLParams
  1881  	ifNoneMatch_ string
  1882  	ctx_         context.Context
  1883  	header_      http.Header
  1884  }
  1885  
  1886  // Get: Gets information about a location.
  1887  //
  1888  // - name: Resource name for the location.
  1889  func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
  1890  	c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1891  	c.name = name
  1892  	return c
  1893  }
  1894  
  1895  // Fields allows partial responses to be retrieved. See
  1896  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1897  // details.
  1898  func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
  1899  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1900  	return c
  1901  }
  1902  
  1903  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1904  // object's ETag matches the given value. This is useful for getting updates
  1905  // only after the object has changed since the last request.
  1906  func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
  1907  	c.ifNoneMatch_ = entityTag
  1908  	return c
  1909  }
  1910  
  1911  // Context sets the context to be used in this call's Do method.
  1912  func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
  1913  	c.ctx_ = ctx
  1914  	return c
  1915  }
  1916  
  1917  // Header returns a http.Header that can be modified by the caller to add
  1918  // headers to the request.
  1919  func (c *ProjectsLocationsGetCall) Header() http.Header {
  1920  	if c.header_ == nil {
  1921  		c.header_ = make(http.Header)
  1922  	}
  1923  	return c.header_
  1924  }
  1925  
  1926  func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
  1927  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1928  	if c.ifNoneMatch_ != "" {
  1929  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1930  	}
  1931  	var body io.Reader = nil
  1932  	c.urlParams_.Set("alt", alt)
  1933  	c.urlParams_.Set("prettyPrint", "false")
  1934  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  1935  	urls += "?" + c.urlParams_.Encode()
  1936  	req, err := http.NewRequest("GET", urls, body)
  1937  	if err != nil {
  1938  		return nil, err
  1939  	}
  1940  	req.Header = reqHeaders
  1941  	googleapi.Expand(req.URL, map[string]string{
  1942  		"name": c.name,
  1943  	})
  1944  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1945  }
  1946  
  1947  // Do executes the "file.projects.locations.get" call.
  1948  // Any non-2xx status code is an error. Response headers are in either
  1949  // *Location.ServerResponse.Header or (if a response was returned at all) in
  1950  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1951  // whether the returned error was because http.StatusNotModified was returned.
  1952  func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
  1953  	gensupport.SetOptions(c.urlParams_, opts...)
  1954  	res, err := c.doRequest("json")
  1955  	if res != nil && res.StatusCode == http.StatusNotModified {
  1956  		if res.Body != nil {
  1957  			res.Body.Close()
  1958  		}
  1959  		return nil, gensupport.WrapError(&googleapi.Error{
  1960  			Code:   res.StatusCode,
  1961  			Header: res.Header,
  1962  		})
  1963  	}
  1964  	if err != nil {
  1965  		return nil, err
  1966  	}
  1967  	defer googleapi.CloseBody(res)
  1968  	if err := googleapi.CheckResponse(res); err != nil {
  1969  		return nil, gensupport.WrapError(err)
  1970  	}
  1971  	ret := &Location{
  1972  		ServerResponse: googleapi.ServerResponse{
  1973  			Header:         res.Header,
  1974  			HTTPStatusCode: res.StatusCode,
  1975  		},
  1976  	}
  1977  	target := &ret
  1978  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1979  		return nil, err
  1980  	}
  1981  	return ret, nil
  1982  }
  1983  
  1984  type ProjectsLocationsListCall struct {
  1985  	s            *Service
  1986  	name         string
  1987  	urlParams_   gensupport.URLParams
  1988  	ifNoneMatch_ string
  1989  	ctx_         context.Context
  1990  	header_      http.Header
  1991  }
  1992  
  1993  // List: Lists information about the supported locations for this service.
  1994  //
  1995  // - name: The resource that owns the locations collection, if applicable.
  1996  func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
  1997  	c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1998  	c.name = name
  1999  	return c
  2000  }
  2001  
  2002  // Filter sets the optional parameter "filter": A filter to narrow down results
  2003  // to a preferred subset. The filtering language accepts strings like
  2004  // "displayName=tokyo", and is documented in more detail in AIP-160
  2005  // (https://google.aip.dev/160).
  2006  func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
  2007  	c.urlParams_.Set("filter", filter)
  2008  	return c
  2009  }
  2010  
  2011  // IncludeUnrevealedLocations sets the optional parameter
  2012  // "includeUnrevealedLocations": If true, the returned list will include
  2013  // locations which are not yet revealed.
  2014  func (c *ProjectsLocationsListCall) IncludeUnrevealedLocations(includeUnrevealedLocations bool) *ProjectsLocationsListCall {
  2015  	c.urlParams_.Set("includeUnrevealedLocations", fmt.Sprint(includeUnrevealedLocations))
  2016  	return c
  2017  }
  2018  
  2019  // PageSize sets the optional parameter "pageSize": The maximum number of
  2020  // results to return. If not set, the service selects a default.
  2021  func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
  2022  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2023  	return c
  2024  }
  2025  
  2026  // PageToken sets the optional parameter "pageToken": A page token received
  2027  // from the `next_page_token` field in the response. Send that page token to
  2028  // receive the subsequent page.
  2029  func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
  2030  	c.urlParams_.Set("pageToken", pageToken)
  2031  	return c
  2032  }
  2033  
  2034  // Fields allows partial responses to be retrieved. See
  2035  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2036  // details.
  2037  func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
  2038  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2039  	return c
  2040  }
  2041  
  2042  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2043  // object's ETag matches the given value. This is useful for getting updates
  2044  // only after the object has changed since the last request.
  2045  func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
  2046  	c.ifNoneMatch_ = entityTag
  2047  	return c
  2048  }
  2049  
  2050  // Context sets the context to be used in this call's Do method.
  2051  func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
  2052  	c.ctx_ = ctx
  2053  	return c
  2054  }
  2055  
  2056  // Header returns a http.Header that can be modified by the caller to add
  2057  // headers to the request.
  2058  func (c *ProjectsLocationsListCall) Header() http.Header {
  2059  	if c.header_ == nil {
  2060  		c.header_ = make(http.Header)
  2061  	}
  2062  	return c.header_
  2063  }
  2064  
  2065  func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
  2066  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2067  	if c.ifNoneMatch_ != "" {
  2068  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2069  	}
  2070  	var body io.Reader = nil
  2071  	c.urlParams_.Set("alt", alt)
  2072  	c.urlParams_.Set("prettyPrint", "false")
  2073  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/locations")
  2074  	urls += "?" + c.urlParams_.Encode()
  2075  	req, err := http.NewRequest("GET", urls, body)
  2076  	if err != nil {
  2077  		return nil, err
  2078  	}
  2079  	req.Header = reqHeaders
  2080  	googleapi.Expand(req.URL, map[string]string{
  2081  		"name": c.name,
  2082  	})
  2083  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2084  }
  2085  
  2086  // Do executes the "file.projects.locations.list" call.
  2087  // Any non-2xx status code is an error. Response headers are in either
  2088  // *ListLocationsResponse.ServerResponse.Header or (if a response was returned
  2089  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2090  // check whether the returned error was because http.StatusNotModified was
  2091  // returned.
  2092  func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
  2093  	gensupport.SetOptions(c.urlParams_, opts...)
  2094  	res, err := c.doRequest("json")
  2095  	if res != nil && res.StatusCode == http.StatusNotModified {
  2096  		if res.Body != nil {
  2097  			res.Body.Close()
  2098  		}
  2099  		return nil, gensupport.WrapError(&googleapi.Error{
  2100  			Code:   res.StatusCode,
  2101  			Header: res.Header,
  2102  		})
  2103  	}
  2104  	if err != nil {
  2105  		return nil, err
  2106  	}
  2107  	defer googleapi.CloseBody(res)
  2108  	if err := googleapi.CheckResponse(res); err != nil {
  2109  		return nil, gensupport.WrapError(err)
  2110  	}
  2111  	ret := &ListLocationsResponse{
  2112  		ServerResponse: googleapi.ServerResponse{
  2113  			Header:         res.Header,
  2114  			HTTPStatusCode: res.StatusCode,
  2115  		},
  2116  	}
  2117  	target := &ret
  2118  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2119  		return nil, err
  2120  	}
  2121  	return ret, nil
  2122  }
  2123  
  2124  // Pages invokes f for each page of results.
  2125  // A non-nil error returned from f will halt the iteration.
  2126  // The provided context supersedes any context provided to the Context method.
  2127  func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
  2128  	c.ctx_ = ctx
  2129  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  2130  	for {
  2131  		x, err := c.Do()
  2132  		if err != nil {
  2133  			return err
  2134  		}
  2135  		if err := f(x); err != nil {
  2136  			return err
  2137  		}
  2138  		if x.NextPageToken == "" {
  2139  			return nil
  2140  		}
  2141  		c.PageToken(x.NextPageToken)
  2142  	}
  2143  }
  2144  
  2145  type ProjectsLocationsBackupsCreateCall struct {
  2146  	s          *Service
  2147  	parent     string
  2148  	backup     *Backup
  2149  	urlParams_ gensupport.URLParams
  2150  	ctx_       context.Context
  2151  	header_    http.Header
  2152  }
  2153  
  2154  // Create: Creates a backup.
  2155  //
  2156  //   - parent: The backup's project and location, in the format
  2157  //     `projects/{project_id}/locations/{location}`. In Filestore, backup
  2158  //     locations map to Google Cloud regions, for example **us-west1**.
  2159  func (r *ProjectsLocationsBackupsService) Create(parent string, backup *Backup) *ProjectsLocationsBackupsCreateCall {
  2160  	c := &ProjectsLocationsBackupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2161  	c.parent = parent
  2162  	c.backup = backup
  2163  	return c
  2164  }
  2165  
  2166  // BackupId sets the optional parameter "backupId": Required. The ID to use for
  2167  // the backup. The ID must be unique within the specified project and location.
  2168  // This value must start with a lowercase letter followed by up to 62 lowercase
  2169  // letters, numbers, or hyphens, and cannot end with a hyphen.
  2170  func (c *ProjectsLocationsBackupsCreateCall) BackupId(backupId string) *ProjectsLocationsBackupsCreateCall {
  2171  	c.urlParams_.Set("backupId", backupId)
  2172  	return c
  2173  }
  2174  
  2175  // Fields allows partial responses to be retrieved. See
  2176  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2177  // details.
  2178  func (c *ProjectsLocationsBackupsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupsCreateCall {
  2179  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2180  	return c
  2181  }
  2182  
  2183  // Context sets the context to be used in this call's Do method.
  2184  func (c *ProjectsLocationsBackupsCreateCall) Context(ctx context.Context) *ProjectsLocationsBackupsCreateCall {
  2185  	c.ctx_ = ctx
  2186  	return c
  2187  }
  2188  
  2189  // Header returns a http.Header that can be modified by the caller to add
  2190  // headers to the request.
  2191  func (c *ProjectsLocationsBackupsCreateCall) Header() http.Header {
  2192  	if c.header_ == nil {
  2193  		c.header_ = make(http.Header)
  2194  	}
  2195  	return c.header_
  2196  }
  2197  
  2198  func (c *ProjectsLocationsBackupsCreateCall) doRequest(alt string) (*http.Response, error) {
  2199  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2200  	var body io.Reader = nil
  2201  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.backup)
  2202  	if err != nil {
  2203  		return nil, err
  2204  	}
  2205  	c.urlParams_.Set("alt", alt)
  2206  	c.urlParams_.Set("prettyPrint", "false")
  2207  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/backups")
  2208  	urls += "?" + c.urlParams_.Encode()
  2209  	req, err := http.NewRequest("POST", urls, body)
  2210  	if err != nil {
  2211  		return nil, err
  2212  	}
  2213  	req.Header = reqHeaders
  2214  	googleapi.Expand(req.URL, map[string]string{
  2215  		"parent": c.parent,
  2216  	})
  2217  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2218  }
  2219  
  2220  // Do executes the "file.projects.locations.backups.create" call.
  2221  // Any non-2xx status code is an error. Response headers are in either
  2222  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  2223  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2224  // whether the returned error was because http.StatusNotModified was returned.
  2225  func (c *ProjectsLocationsBackupsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2226  	gensupport.SetOptions(c.urlParams_, opts...)
  2227  	res, err := c.doRequest("json")
  2228  	if res != nil && res.StatusCode == http.StatusNotModified {
  2229  		if res.Body != nil {
  2230  			res.Body.Close()
  2231  		}
  2232  		return nil, gensupport.WrapError(&googleapi.Error{
  2233  			Code:   res.StatusCode,
  2234  			Header: res.Header,
  2235  		})
  2236  	}
  2237  	if err != nil {
  2238  		return nil, err
  2239  	}
  2240  	defer googleapi.CloseBody(res)
  2241  	if err := googleapi.CheckResponse(res); err != nil {
  2242  		return nil, gensupport.WrapError(err)
  2243  	}
  2244  	ret := &Operation{
  2245  		ServerResponse: googleapi.ServerResponse{
  2246  			Header:         res.Header,
  2247  			HTTPStatusCode: res.StatusCode,
  2248  		},
  2249  	}
  2250  	target := &ret
  2251  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2252  		return nil, err
  2253  	}
  2254  	return ret, nil
  2255  }
  2256  
  2257  type ProjectsLocationsBackupsDeleteCall struct {
  2258  	s          *Service
  2259  	name       string
  2260  	urlParams_ gensupport.URLParams
  2261  	ctx_       context.Context
  2262  	header_    http.Header
  2263  }
  2264  
  2265  // Delete: Deletes a backup.
  2266  //
  2267  //   - name: The backup resource name, in the format
  2268  //     `projects/{project_id}/locations/{location}/backups/{backup_id}`.
  2269  func (r *ProjectsLocationsBackupsService) Delete(name string) *ProjectsLocationsBackupsDeleteCall {
  2270  	c := &ProjectsLocationsBackupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2271  	c.name = name
  2272  	return c
  2273  }
  2274  
  2275  // Fields allows partial responses to be retrieved. See
  2276  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2277  // details.
  2278  func (c *ProjectsLocationsBackupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupsDeleteCall {
  2279  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2280  	return c
  2281  }
  2282  
  2283  // Context sets the context to be used in this call's Do method.
  2284  func (c *ProjectsLocationsBackupsDeleteCall) Context(ctx context.Context) *ProjectsLocationsBackupsDeleteCall {
  2285  	c.ctx_ = ctx
  2286  	return c
  2287  }
  2288  
  2289  // Header returns a http.Header that can be modified by the caller to add
  2290  // headers to the request.
  2291  func (c *ProjectsLocationsBackupsDeleteCall) Header() http.Header {
  2292  	if c.header_ == nil {
  2293  		c.header_ = make(http.Header)
  2294  	}
  2295  	return c.header_
  2296  }
  2297  
  2298  func (c *ProjectsLocationsBackupsDeleteCall) doRequest(alt string) (*http.Response, error) {
  2299  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2300  	var body io.Reader = nil
  2301  	c.urlParams_.Set("alt", alt)
  2302  	c.urlParams_.Set("prettyPrint", "false")
  2303  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  2304  	urls += "?" + c.urlParams_.Encode()
  2305  	req, err := http.NewRequest("DELETE", urls, body)
  2306  	if err != nil {
  2307  		return nil, err
  2308  	}
  2309  	req.Header = reqHeaders
  2310  	googleapi.Expand(req.URL, map[string]string{
  2311  		"name": c.name,
  2312  	})
  2313  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2314  }
  2315  
  2316  // Do executes the "file.projects.locations.backups.delete" call.
  2317  // Any non-2xx status code is an error. Response headers are in either
  2318  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  2319  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2320  // whether the returned error was because http.StatusNotModified was returned.
  2321  func (c *ProjectsLocationsBackupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2322  	gensupport.SetOptions(c.urlParams_, opts...)
  2323  	res, err := c.doRequest("json")
  2324  	if res != nil && res.StatusCode == http.StatusNotModified {
  2325  		if res.Body != nil {
  2326  			res.Body.Close()
  2327  		}
  2328  		return nil, gensupport.WrapError(&googleapi.Error{
  2329  			Code:   res.StatusCode,
  2330  			Header: res.Header,
  2331  		})
  2332  	}
  2333  	if err != nil {
  2334  		return nil, err
  2335  	}
  2336  	defer googleapi.CloseBody(res)
  2337  	if err := googleapi.CheckResponse(res); err != nil {
  2338  		return nil, gensupport.WrapError(err)
  2339  	}
  2340  	ret := &Operation{
  2341  		ServerResponse: googleapi.ServerResponse{
  2342  			Header:         res.Header,
  2343  			HTTPStatusCode: res.StatusCode,
  2344  		},
  2345  	}
  2346  	target := &ret
  2347  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2348  		return nil, err
  2349  	}
  2350  	return ret, nil
  2351  }
  2352  
  2353  type ProjectsLocationsBackupsGetCall struct {
  2354  	s            *Service
  2355  	name         string
  2356  	urlParams_   gensupport.URLParams
  2357  	ifNoneMatch_ string
  2358  	ctx_         context.Context
  2359  	header_      http.Header
  2360  }
  2361  
  2362  // Get: Gets the details of a specific backup.
  2363  //
  2364  //   - name: The backup resource name, in the format
  2365  //     `projects/{project_id}/locations/{location}/backups/{backup_id}`.
  2366  func (r *ProjectsLocationsBackupsService) Get(name string) *ProjectsLocationsBackupsGetCall {
  2367  	c := &ProjectsLocationsBackupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2368  	c.name = name
  2369  	return c
  2370  }
  2371  
  2372  // Fields allows partial responses to be retrieved. See
  2373  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2374  // details.
  2375  func (c *ProjectsLocationsBackupsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupsGetCall {
  2376  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2377  	return c
  2378  }
  2379  
  2380  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2381  // object's ETag matches the given value. This is useful for getting updates
  2382  // only after the object has changed since the last request.
  2383  func (c *ProjectsLocationsBackupsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsBackupsGetCall {
  2384  	c.ifNoneMatch_ = entityTag
  2385  	return c
  2386  }
  2387  
  2388  // Context sets the context to be used in this call's Do method.
  2389  func (c *ProjectsLocationsBackupsGetCall) Context(ctx context.Context) *ProjectsLocationsBackupsGetCall {
  2390  	c.ctx_ = ctx
  2391  	return c
  2392  }
  2393  
  2394  // Header returns a http.Header that can be modified by the caller to add
  2395  // headers to the request.
  2396  func (c *ProjectsLocationsBackupsGetCall) Header() http.Header {
  2397  	if c.header_ == nil {
  2398  		c.header_ = make(http.Header)
  2399  	}
  2400  	return c.header_
  2401  }
  2402  
  2403  func (c *ProjectsLocationsBackupsGetCall) doRequest(alt string) (*http.Response, error) {
  2404  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2405  	if c.ifNoneMatch_ != "" {
  2406  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2407  	}
  2408  	var body io.Reader = nil
  2409  	c.urlParams_.Set("alt", alt)
  2410  	c.urlParams_.Set("prettyPrint", "false")
  2411  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  2412  	urls += "?" + c.urlParams_.Encode()
  2413  	req, err := http.NewRequest("GET", urls, body)
  2414  	if err != nil {
  2415  		return nil, err
  2416  	}
  2417  	req.Header = reqHeaders
  2418  	googleapi.Expand(req.URL, map[string]string{
  2419  		"name": c.name,
  2420  	})
  2421  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2422  }
  2423  
  2424  // Do executes the "file.projects.locations.backups.get" call.
  2425  // Any non-2xx status code is an error. Response headers are in either
  2426  // *Backup.ServerResponse.Header or (if a response was returned at all) in
  2427  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2428  // whether the returned error was because http.StatusNotModified was returned.
  2429  func (c *ProjectsLocationsBackupsGetCall) Do(opts ...googleapi.CallOption) (*Backup, error) {
  2430  	gensupport.SetOptions(c.urlParams_, opts...)
  2431  	res, err := c.doRequest("json")
  2432  	if res != nil && res.StatusCode == http.StatusNotModified {
  2433  		if res.Body != nil {
  2434  			res.Body.Close()
  2435  		}
  2436  		return nil, gensupport.WrapError(&googleapi.Error{
  2437  			Code:   res.StatusCode,
  2438  			Header: res.Header,
  2439  		})
  2440  	}
  2441  	if err != nil {
  2442  		return nil, err
  2443  	}
  2444  	defer googleapi.CloseBody(res)
  2445  	if err := googleapi.CheckResponse(res); err != nil {
  2446  		return nil, gensupport.WrapError(err)
  2447  	}
  2448  	ret := &Backup{
  2449  		ServerResponse: googleapi.ServerResponse{
  2450  			Header:         res.Header,
  2451  			HTTPStatusCode: res.StatusCode,
  2452  		},
  2453  	}
  2454  	target := &ret
  2455  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2456  		return nil, err
  2457  	}
  2458  	return ret, nil
  2459  }
  2460  
  2461  type ProjectsLocationsBackupsListCall struct {
  2462  	s            *Service
  2463  	parent       string
  2464  	urlParams_   gensupport.URLParams
  2465  	ifNoneMatch_ string
  2466  	ctx_         context.Context
  2467  	header_      http.Header
  2468  }
  2469  
  2470  // List: Lists all backups in a project for either a specified location or for
  2471  // all locations.
  2472  //
  2473  //   - parent: The project and location for which to retrieve backup information,
  2474  //     in the format `projects/{project_id}/locations/{location}`. In Filestore,
  2475  //     backup locations map to Google Cloud regions, for example **us-west1**. To
  2476  //     retrieve backup information for all locations, use "-" for the
  2477  //     `{location}` value.
  2478  func (r *ProjectsLocationsBackupsService) List(parent string) *ProjectsLocationsBackupsListCall {
  2479  	c := &ProjectsLocationsBackupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2480  	c.parent = parent
  2481  	return c
  2482  }
  2483  
  2484  // Filter sets the optional parameter "filter": List filter.
  2485  func (c *ProjectsLocationsBackupsListCall) Filter(filter string) *ProjectsLocationsBackupsListCall {
  2486  	c.urlParams_.Set("filter", filter)
  2487  	return c
  2488  }
  2489  
  2490  // OrderBy sets the optional parameter "orderBy": Sort results. Supported
  2491  // values are "name", "name desc" or "" (unsorted).
  2492  func (c *ProjectsLocationsBackupsListCall) OrderBy(orderBy string) *ProjectsLocationsBackupsListCall {
  2493  	c.urlParams_.Set("orderBy", orderBy)
  2494  	return c
  2495  }
  2496  
  2497  // PageSize sets the optional parameter "pageSize": The maximum number of items
  2498  // to return.
  2499  func (c *ProjectsLocationsBackupsListCall) PageSize(pageSize int64) *ProjectsLocationsBackupsListCall {
  2500  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2501  	return c
  2502  }
  2503  
  2504  // PageToken sets the optional parameter "pageToken": The next_page_token value
  2505  // to use if there are additional results to retrieve for this list request.
  2506  func (c *ProjectsLocationsBackupsListCall) PageToken(pageToken string) *ProjectsLocationsBackupsListCall {
  2507  	c.urlParams_.Set("pageToken", pageToken)
  2508  	return c
  2509  }
  2510  
  2511  // Fields allows partial responses to be retrieved. See
  2512  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2513  // details.
  2514  func (c *ProjectsLocationsBackupsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupsListCall {
  2515  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2516  	return c
  2517  }
  2518  
  2519  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2520  // object's ETag matches the given value. This is useful for getting updates
  2521  // only after the object has changed since the last request.
  2522  func (c *ProjectsLocationsBackupsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBackupsListCall {
  2523  	c.ifNoneMatch_ = entityTag
  2524  	return c
  2525  }
  2526  
  2527  // Context sets the context to be used in this call's Do method.
  2528  func (c *ProjectsLocationsBackupsListCall) Context(ctx context.Context) *ProjectsLocationsBackupsListCall {
  2529  	c.ctx_ = ctx
  2530  	return c
  2531  }
  2532  
  2533  // Header returns a http.Header that can be modified by the caller to add
  2534  // headers to the request.
  2535  func (c *ProjectsLocationsBackupsListCall) Header() http.Header {
  2536  	if c.header_ == nil {
  2537  		c.header_ = make(http.Header)
  2538  	}
  2539  	return c.header_
  2540  }
  2541  
  2542  func (c *ProjectsLocationsBackupsListCall) doRequest(alt string) (*http.Response, error) {
  2543  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2544  	if c.ifNoneMatch_ != "" {
  2545  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2546  	}
  2547  	var body io.Reader = nil
  2548  	c.urlParams_.Set("alt", alt)
  2549  	c.urlParams_.Set("prettyPrint", "false")
  2550  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/backups")
  2551  	urls += "?" + c.urlParams_.Encode()
  2552  	req, err := http.NewRequest("GET", urls, body)
  2553  	if err != nil {
  2554  		return nil, err
  2555  	}
  2556  	req.Header = reqHeaders
  2557  	googleapi.Expand(req.URL, map[string]string{
  2558  		"parent": c.parent,
  2559  	})
  2560  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2561  }
  2562  
  2563  // Do executes the "file.projects.locations.backups.list" call.
  2564  // Any non-2xx status code is an error. Response headers are in either
  2565  // *ListBackupsResponse.ServerResponse.Header or (if a response was returned at
  2566  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2567  // check whether the returned error was because http.StatusNotModified was
  2568  // returned.
  2569  func (c *ProjectsLocationsBackupsListCall) Do(opts ...googleapi.CallOption) (*ListBackupsResponse, error) {
  2570  	gensupport.SetOptions(c.urlParams_, opts...)
  2571  	res, err := c.doRequest("json")
  2572  	if res != nil && res.StatusCode == http.StatusNotModified {
  2573  		if res.Body != nil {
  2574  			res.Body.Close()
  2575  		}
  2576  		return nil, gensupport.WrapError(&googleapi.Error{
  2577  			Code:   res.StatusCode,
  2578  			Header: res.Header,
  2579  		})
  2580  	}
  2581  	if err != nil {
  2582  		return nil, err
  2583  	}
  2584  	defer googleapi.CloseBody(res)
  2585  	if err := googleapi.CheckResponse(res); err != nil {
  2586  		return nil, gensupport.WrapError(err)
  2587  	}
  2588  	ret := &ListBackupsResponse{
  2589  		ServerResponse: googleapi.ServerResponse{
  2590  			Header:         res.Header,
  2591  			HTTPStatusCode: res.StatusCode,
  2592  		},
  2593  	}
  2594  	target := &ret
  2595  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2596  		return nil, err
  2597  	}
  2598  	return ret, nil
  2599  }
  2600  
  2601  // Pages invokes f for each page of results.
  2602  // A non-nil error returned from f will halt the iteration.
  2603  // The provided context supersedes any context provided to the Context method.
  2604  func (c *ProjectsLocationsBackupsListCall) Pages(ctx context.Context, f func(*ListBackupsResponse) error) error {
  2605  	c.ctx_ = ctx
  2606  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  2607  	for {
  2608  		x, err := c.Do()
  2609  		if err != nil {
  2610  			return err
  2611  		}
  2612  		if err := f(x); err != nil {
  2613  			return err
  2614  		}
  2615  		if x.NextPageToken == "" {
  2616  			return nil
  2617  		}
  2618  		c.PageToken(x.NextPageToken)
  2619  	}
  2620  }
  2621  
  2622  type ProjectsLocationsBackupsPatchCall struct {
  2623  	s          *Service
  2624  	name       string
  2625  	backup     *Backup
  2626  	urlParams_ gensupport.URLParams
  2627  	ctx_       context.Context
  2628  	header_    http.Header
  2629  }
  2630  
  2631  // Patch: Updates the settings of a specific backup.
  2632  //
  2633  //   - name: Output only. The resource name of the backup, in the format
  2634  //     `projects/{project_id}/locations/{location_id}/backups/{backup_id}`.
  2635  func (r *ProjectsLocationsBackupsService) Patch(name string, backup *Backup) *ProjectsLocationsBackupsPatchCall {
  2636  	c := &ProjectsLocationsBackupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2637  	c.name = name
  2638  	c.backup = backup
  2639  	return c
  2640  }
  2641  
  2642  // UpdateMask sets the optional parameter "updateMask": Required. Mask of
  2643  // fields to update. At least one path must be supplied in this field.
  2644  func (c *ProjectsLocationsBackupsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsBackupsPatchCall {
  2645  	c.urlParams_.Set("updateMask", updateMask)
  2646  	return c
  2647  }
  2648  
  2649  // Fields allows partial responses to be retrieved. See
  2650  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2651  // details.
  2652  func (c *ProjectsLocationsBackupsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupsPatchCall {
  2653  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2654  	return c
  2655  }
  2656  
  2657  // Context sets the context to be used in this call's Do method.
  2658  func (c *ProjectsLocationsBackupsPatchCall) Context(ctx context.Context) *ProjectsLocationsBackupsPatchCall {
  2659  	c.ctx_ = ctx
  2660  	return c
  2661  }
  2662  
  2663  // Header returns a http.Header that can be modified by the caller to add
  2664  // headers to the request.
  2665  func (c *ProjectsLocationsBackupsPatchCall) Header() http.Header {
  2666  	if c.header_ == nil {
  2667  		c.header_ = make(http.Header)
  2668  	}
  2669  	return c.header_
  2670  }
  2671  
  2672  func (c *ProjectsLocationsBackupsPatchCall) doRequest(alt string) (*http.Response, error) {
  2673  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2674  	var body io.Reader = nil
  2675  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.backup)
  2676  	if err != nil {
  2677  		return nil, err
  2678  	}
  2679  	c.urlParams_.Set("alt", alt)
  2680  	c.urlParams_.Set("prettyPrint", "false")
  2681  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  2682  	urls += "?" + c.urlParams_.Encode()
  2683  	req, err := http.NewRequest("PATCH", urls, body)
  2684  	if err != nil {
  2685  		return nil, err
  2686  	}
  2687  	req.Header = reqHeaders
  2688  	googleapi.Expand(req.URL, map[string]string{
  2689  		"name": c.name,
  2690  	})
  2691  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2692  }
  2693  
  2694  // Do executes the "file.projects.locations.backups.patch" call.
  2695  // Any non-2xx status code is an error. Response headers are in either
  2696  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  2697  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2698  // whether the returned error was because http.StatusNotModified was returned.
  2699  func (c *ProjectsLocationsBackupsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2700  	gensupport.SetOptions(c.urlParams_, opts...)
  2701  	res, err := c.doRequest("json")
  2702  	if res != nil && res.StatusCode == http.StatusNotModified {
  2703  		if res.Body != nil {
  2704  			res.Body.Close()
  2705  		}
  2706  		return nil, gensupport.WrapError(&googleapi.Error{
  2707  			Code:   res.StatusCode,
  2708  			Header: res.Header,
  2709  		})
  2710  	}
  2711  	if err != nil {
  2712  		return nil, err
  2713  	}
  2714  	defer googleapi.CloseBody(res)
  2715  	if err := googleapi.CheckResponse(res); err != nil {
  2716  		return nil, gensupport.WrapError(err)
  2717  	}
  2718  	ret := &Operation{
  2719  		ServerResponse: googleapi.ServerResponse{
  2720  			Header:         res.Header,
  2721  			HTTPStatusCode: res.StatusCode,
  2722  		},
  2723  	}
  2724  	target := &ret
  2725  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2726  		return nil, err
  2727  	}
  2728  	return ret, nil
  2729  }
  2730  
  2731  type ProjectsLocationsInstancesCreateCall struct {
  2732  	s          *Service
  2733  	parent     string
  2734  	instance   *Instance
  2735  	urlParams_ gensupport.URLParams
  2736  	ctx_       context.Context
  2737  	header_    http.Header
  2738  }
  2739  
  2740  // Create: Creates an instance. When creating from a backup, the capacity of
  2741  // the new instance needs to be equal to or larger than the capacity of the
  2742  // backup (and also equal to or larger than the minimum capacity of the tier).
  2743  //
  2744  //   - parent: The instance's project and location, in the format
  2745  //     `projects/{project_id}/locations/{location}`. In Filestore, locations map
  2746  //     to Google Cloud zones, for example **us-west1-b**.
  2747  func (r *ProjectsLocationsInstancesService) Create(parent string, instance *Instance) *ProjectsLocationsInstancesCreateCall {
  2748  	c := &ProjectsLocationsInstancesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2749  	c.parent = parent
  2750  	c.instance = instance
  2751  	return c
  2752  }
  2753  
  2754  // InstanceId sets the optional parameter "instanceId": Required. The ID of the
  2755  // instance to create. The ID must be unique within the specified project and
  2756  // location. This value must start with a lowercase letter followed by up to 62
  2757  // lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
  2758  func (c *ProjectsLocationsInstancesCreateCall) InstanceId(instanceId string) *ProjectsLocationsInstancesCreateCall {
  2759  	c.urlParams_.Set("instanceId", instanceId)
  2760  	return c
  2761  }
  2762  
  2763  // Fields allows partial responses to be retrieved. See
  2764  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2765  // details.
  2766  func (c *ProjectsLocationsInstancesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesCreateCall {
  2767  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2768  	return c
  2769  }
  2770  
  2771  // Context sets the context to be used in this call's Do method.
  2772  func (c *ProjectsLocationsInstancesCreateCall) Context(ctx context.Context) *ProjectsLocationsInstancesCreateCall {
  2773  	c.ctx_ = ctx
  2774  	return c
  2775  }
  2776  
  2777  // Header returns a http.Header that can be modified by the caller to add
  2778  // headers to the request.
  2779  func (c *ProjectsLocationsInstancesCreateCall) Header() http.Header {
  2780  	if c.header_ == nil {
  2781  		c.header_ = make(http.Header)
  2782  	}
  2783  	return c.header_
  2784  }
  2785  
  2786  func (c *ProjectsLocationsInstancesCreateCall) doRequest(alt string) (*http.Response, error) {
  2787  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2788  	var body io.Reader = nil
  2789  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instance)
  2790  	if err != nil {
  2791  		return nil, err
  2792  	}
  2793  	c.urlParams_.Set("alt", alt)
  2794  	c.urlParams_.Set("prettyPrint", "false")
  2795  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/instances")
  2796  	urls += "?" + c.urlParams_.Encode()
  2797  	req, err := http.NewRequest("POST", urls, body)
  2798  	if err != nil {
  2799  		return nil, err
  2800  	}
  2801  	req.Header = reqHeaders
  2802  	googleapi.Expand(req.URL, map[string]string{
  2803  		"parent": c.parent,
  2804  	})
  2805  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2806  }
  2807  
  2808  // Do executes the "file.projects.locations.instances.create" call.
  2809  // Any non-2xx status code is an error. Response headers are in either
  2810  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  2811  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2812  // whether the returned error was because http.StatusNotModified was returned.
  2813  func (c *ProjectsLocationsInstancesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2814  	gensupport.SetOptions(c.urlParams_, opts...)
  2815  	res, err := c.doRequest("json")
  2816  	if res != nil && res.StatusCode == http.StatusNotModified {
  2817  		if res.Body != nil {
  2818  			res.Body.Close()
  2819  		}
  2820  		return nil, gensupport.WrapError(&googleapi.Error{
  2821  			Code:   res.StatusCode,
  2822  			Header: res.Header,
  2823  		})
  2824  	}
  2825  	if err != nil {
  2826  		return nil, err
  2827  	}
  2828  	defer googleapi.CloseBody(res)
  2829  	if err := googleapi.CheckResponse(res); err != nil {
  2830  		return nil, gensupport.WrapError(err)
  2831  	}
  2832  	ret := &Operation{
  2833  		ServerResponse: googleapi.ServerResponse{
  2834  			Header:         res.Header,
  2835  			HTTPStatusCode: res.StatusCode,
  2836  		},
  2837  	}
  2838  	target := &ret
  2839  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2840  		return nil, err
  2841  	}
  2842  	return ret, nil
  2843  }
  2844  
  2845  type ProjectsLocationsInstancesDeleteCall struct {
  2846  	s          *Service
  2847  	name       string
  2848  	urlParams_ gensupport.URLParams
  2849  	ctx_       context.Context
  2850  	header_    http.Header
  2851  }
  2852  
  2853  // Delete: Deletes an instance.
  2854  //
  2855  //   - name: The instance resource name, in the format
  2856  //     `projects/{project_id}/locations/{location}/instances/{instance_id}`.
  2857  func (r *ProjectsLocationsInstancesService) Delete(name string) *ProjectsLocationsInstancesDeleteCall {
  2858  	c := &ProjectsLocationsInstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2859  	c.name = name
  2860  	return c
  2861  }
  2862  
  2863  // Force sets the optional parameter "force": If set to true, any snapshots of
  2864  // the instance will also be deleted. (Otherwise, the request will only work if
  2865  // the instance has no snapshots.)
  2866  func (c *ProjectsLocationsInstancesDeleteCall) Force(force bool) *ProjectsLocationsInstancesDeleteCall {
  2867  	c.urlParams_.Set("force", fmt.Sprint(force))
  2868  	return c
  2869  }
  2870  
  2871  // Fields allows partial responses to be retrieved. See
  2872  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2873  // details.
  2874  func (c *ProjectsLocationsInstancesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesDeleteCall {
  2875  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2876  	return c
  2877  }
  2878  
  2879  // Context sets the context to be used in this call's Do method.
  2880  func (c *ProjectsLocationsInstancesDeleteCall) Context(ctx context.Context) *ProjectsLocationsInstancesDeleteCall {
  2881  	c.ctx_ = ctx
  2882  	return c
  2883  }
  2884  
  2885  // Header returns a http.Header that can be modified by the caller to add
  2886  // headers to the request.
  2887  func (c *ProjectsLocationsInstancesDeleteCall) Header() http.Header {
  2888  	if c.header_ == nil {
  2889  		c.header_ = make(http.Header)
  2890  	}
  2891  	return c.header_
  2892  }
  2893  
  2894  func (c *ProjectsLocationsInstancesDeleteCall) doRequest(alt string) (*http.Response, error) {
  2895  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2896  	var body io.Reader = nil
  2897  	c.urlParams_.Set("alt", alt)
  2898  	c.urlParams_.Set("prettyPrint", "false")
  2899  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  2900  	urls += "?" + c.urlParams_.Encode()
  2901  	req, err := http.NewRequest("DELETE", urls, body)
  2902  	if err != nil {
  2903  		return nil, err
  2904  	}
  2905  	req.Header = reqHeaders
  2906  	googleapi.Expand(req.URL, map[string]string{
  2907  		"name": c.name,
  2908  	})
  2909  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2910  }
  2911  
  2912  // Do executes the "file.projects.locations.instances.delete" call.
  2913  // Any non-2xx status code is an error. Response headers are in either
  2914  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  2915  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2916  // whether the returned error was because http.StatusNotModified was returned.
  2917  func (c *ProjectsLocationsInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2918  	gensupport.SetOptions(c.urlParams_, opts...)
  2919  	res, err := c.doRequest("json")
  2920  	if res != nil && res.StatusCode == http.StatusNotModified {
  2921  		if res.Body != nil {
  2922  			res.Body.Close()
  2923  		}
  2924  		return nil, gensupport.WrapError(&googleapi.Error{
  2925  			Code:   res.StatusCode,
  2926  			Header: res.Header,
  2927  		})
  2928  	}
  2929  	if err != nil {
  2930  		return nil, err
  2931  	}
  2932  	defer googleapi.CloseBody(res)
  2933  	if err := googleapi.CheckResponse(res); err != nil {
  2934  		return nil, gensupport.WrapError(err)
  2935  	}
  2936  	ret := &Operation{
  2937  		ServerResponse: googleapi.ServerResponse{
  2938  			Header:         res.Header,
  2939  			HTTPStatusCode: res.StatusCode,
  2940  		},
  2941  	}
  2942  	target := &ret
  2943  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2944  		return nil, err
  2945  	}
  2946  	return ret, nil
  2947  }
  2948  
  2949  type ProjectsLocationsInstancesGetCall struct {
  2950  	s            *Service
  2951  	name         string
  2952  	urlParams_   gensupport.URLParams
  2953  	ifNoneMatch_ string
  2954  	ctx_         context.Context
  2955  	header_      http.Header
  2956  }
  2957  
  2958  // Get: Gets the details of a specific instance.
  2959  //
  2960  //   - name: The instance resource name, in the format
  2961  //     `projects/{project_id}/locations/{location}/instances/{instance_id}`.
  2962  func (r *ProjectsLocationsInstancesService) Get(name string) *ProjectsLocationsInstancesGetCall {
  2963  	c := &ProjectsLocationsInstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2964  	c.name = name
  2965  	return c
  2966  }
  2967  
  2968  // Fields allows partial responses to be retrieved. See
  2969  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2970  // details.
  2971  func (c *ProjectsLocationsInstancesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesGetCall {
  2972  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2973  	return c
  2974  }
  2975  
  2976  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2977  // object's ETag matches the given value. This is useful for getting updates
  2978  // only after the object has changed since the last request.
  2979  func (c *ProjectsLocationsInstancesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesGetCall {
  2980  	c.ifNoneMatch_ = entityTag
  2981  	return c
  2982  }
  2983  
  2984  // Context sets the context to be used in this call's Do method.
  2985  func (c *ProjectsLocationsInstancesGetCall) Context(ctx context.Context) *ProjectsLocationsInstancesGetCall {
  2986  	c.ctx_ = ctx
  2987  	return c
  2988  }
  2989  
  2990  // Header returns a http.Header that can be modified by the caller to add
  2991  // headers to the request.
  2992  func (c *ProjectsLocationsInstancesGetCall) Header() http.Header {
  2993  	if c.header_ == nil {
  2994  		c.header_ = make(http.Header)
  2995  	}
  2996  	return c.header_
  2997  }
  2998  
  2999  func (c *ProjectsLocationsInstancesGetCall) doRequest(alt string) (*http.Response, error) {
  3000  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3001  	if c.ifNoneMatch_ != "" {
  3002  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3003  	}
  3004  	var body io.Reader = nil
  3005  	c.urlParams_.Set("alt", alt)
  3006  	c.urlParams_.Set("prettyPrint", "false")
  3007  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  3008  	urls += "?" + c.urlParams_.Encode()
  3009  	req, err := http.NewRequest("GET", urls, body)
  3010  	if err != nil {
  3011  		return nil, err
  3012  	}
  3013  	req.Header = reqHeaders
  3014  	googleapi.Expand(req.URL, map[string]string{
  3015  		"name": c.name,
  3016  	})
  3017  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3018  }
  3019  
  3020  // Do executes the "file.projects.locations.instances.get" call.
  3021  // Any non-2xx status code is an error. Response headers are in either
  3022  // *Instance.ServerResponse.Header or (if a response was returned at all) in
  3023  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3024  // whether the returned error was because http.StatusNotModified was returned.
  3025  func (c *ProjectsLocationsInstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, error) {
  3026  	gensupport.SetOptions(c.urlParams_, opts...)
  3027  	res, err := c.doRequest("json")
  3028  	if res != nil && res.StatusCode == http.StatusNotModified {
  3029  		if res.Body != nil {
  3030  			res.Body.Close()
  3031  		}
  3032  		return nil, gensupport.WrapError(&googleapi.Error{
  3033  			Code:   res.StatusCode,
  3034  			Header: res.Header,
  3035  		})
  3036  	}
  3037  	if err != nil {
  3038  		return nil, err
  3039  	}
  3040  	defer googleapi.CloseBody(res)
  3041  	if err := googleapi.CheckResponse(res); err != nil {
  3042  		return nil, gensupport.WrapError(err)
  3043  	}
  3044  	ret := &Instance{
  3045  		ServerResponse: googleapi.ServerResponse{
  3046  			Header:         res.Header,
  3047  			HTTPStatusCode: res.StatusCode,
  3048  		},
  3049  	}
  3050  	target := &ret
  3051  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3052  		return nil, err
  3053  	}
  3054  	return ret, nil
  3055  }
  3056  
  3057  type ProjectsLocationsInstancesListCall struct {
  3058  	s            *Service
  3059  	parent       string
  3060  	urlParams_   gensupport.URLParams
  3061  	ifNoneMatch_ string
  3062  	ctx_         context.Context
  3063  	header_      http.Header
  3064  }
  3065  
  3066  // List: Lists all instances in a project for either a specified location or
  3067  // for all locations.
  3068  //
  3069  //   - parent: The project and location for which to retrieve instance
  3070  //     information, in the format `projects/{project_id}/locations/{location}`.
  3071  //     In Cloud Filestore, locations map to Google Cloud zones, for example
  3072  //     **us-west1-b**. To retrieve instance information for all locations, use
  3073  //     "-" for the `{location}` value.
  3074  func (r *ProjectsLocationsInstancesService) List(parent string) *ProjectsLocationsInstancesListCall {
  3075  	c := &ProjectsLocationsInstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3076  	c.parent = parent
  3077  	return c
  3078  }
  3079  
  3080  // Filter sets the optional parameter "filter": List filter.
  3081  func (c *ProjectsLocationsInstancesListCall) Filter(filter string) *ProjectsLocationsInstancesListCall {
  3082  	c.urlParams_.Set("filter", filter)
  3083  	return c
  3084  }
  3085  
  3086  // OrderBy sets the optional parameter "orderBy": Sort results. Supported
  3087  // values are "name", "name desc" or "" (unsorted).
  3088  func (c *ProjectsLocationsInstancesListCall) OrderBy(orderBy string) *ProjectsLocationsInstancesListCall {
  3089  	c.urlParams_.Set("orderBy", orderBy)
  3090  	return c
  3091  }
  3092  
  3093  // PageSize sets the optional parameter "pageSize": The maximum number of items
  3094  // to return.
  3095  func (c *ProjectsLocationsInstancesListCall) PageSize(pageSize int64) *ProjectsLocationsInstancesListCall {
  3096  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3097  	return c
  3098  }
  3099  
  3100  // PageToken sets the optional parameter "pageToken": The next_page_token value
  3101  // to use if there are additional results to retrieve for this list request.
  3102  func (c *ProjectsLocationsInstancesListCall) PageToken(pageToken string) *ProjectsLocationsInstancesListCall {
  3103  	c.urlParams_.Set("pageToken", pageToken)
  3104  	return c
  3105  }
  3106  
  3107  // Fields allows partial responses to be retrieved. See
  3108  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3109  // details.
  3110  func (c *ProjectsLocationsInstancesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesListCall {
  3111  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3112  	return c
  3113  }
  3114  
  3115  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3116  // object's ETag matches the given value. This is useful for getting updates
  3117  // only after the object has changed since the last request.
  3118  func (c *ProjectsLocationsInstancesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesListCall {
  3119  	c.ifNoneMatch_ = entityTag
  3120  	return c
  3121  }
  3122  
  3123  // Context sets the context to be used in this call's Do method.
  3124  func (c *ProjectsLocationsInstancesListCall) Context(ctx context.Context) *ProjectsLocationsInstancesListCall {
  3125  	c.ctx_ = ctx
  3126  	return c
  3127  }
  3128  
  3129  // Header returns a http.Header that can be modified by the caller to add
  3130  // headers to the request.
  3131  func (c *ProjectsLocationsInstancesListCall) Header() http.Header {
  3132  	if c.header_ == nil {
  3133  		c.header_ = make(http.Header)
  3134  	}
  3135  	return c.header_
  3136  }
  3137  
  3138  func (c *ProjectsLocationsInstancesListCall) doRequest(alt string) (*http.Response, error) {
  3139  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3140  	if c.ifNoneMatch_ != "" {
  3141  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3142  	}
  3143  	var body io.Reader = nil
  3144  	c.urlParams_.Set("alt", alt)
  3145  	c.urlParams_.Set("prettyPrint", "false")
  3146  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/instances")
  3147  	urls += "?" + c.urlParams_.Encode()
  3148  	req, err := http.NewRequest("GET", urls, body)
  3149  	if err != nil {
  3150  		return nil, err
  3151  	}
  3152  	req.Header = reqHeaders
  3153  	googleapi.Expand(req.URL, map[string]string{
  3154  		"parent": c.parent,
  3155  	})
  3156  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3157  }
  3158  
  3159  // Do executes the "file.projects.locations.instances.list" call.
  3160  // Any non-2xx status code is an error. Response headers are in either
  3161  // *ListInstancesResponse.ServerResponse.Header or (if a response was returned
  3162  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3163  // check whether the returned error was because http.StatusNotModified was
  3164  // returned.
  3165  func (c *ProjectsLocationsInstancesListCall) Do(opts ...googleapi.CallOption) (*ListInstancesResponse, error) {
  3166  	gensupport.SetOptions(c.urlParams_, opts...)
  3167  	res, err := c.doRequest("json")
  3168  	if res != nil && res.StatusCode == http.StatusNotModified {
  3169  		if res.Body != nil {
  3170  			res.Body.Close()
  3171  		}
  3172  		return nil, gensupport.WrapError(&googleapi.Error{
  3173  			Code:   res.StatusCode,
  3174  			Header: res.Header,
  3175  		})
  3176  	}
  3177  	if err != nil {
  3178  		return nil, err
  3179  	}
  3180  	defer googleapi.CloseBody(res)
  3181  	if err := googleapi.CheckResponse(res); err != nil {
  3182  		return nil, gensupport.WrapError(err)
  3183  	}
  3184  	ret := &ListInstancesResponse{
  3185  		ServerResponse: googleapi.ServerResponse{
  3186  			Header:         res.Header,
  3187  			HTTPStatusCode: res.StatusCode,
  3188  		},
  3189  	}
  3190  	target := &ret
  3191  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3192  		return nil, err
  3193  	}
  3194  	return ret, nil
  3195  }
  3196  
  3197  // Pages invokes f for each page of results.
  3198  // A non-nil error returned from f will halt the iteration.
  3199  // The provided context supersedes any context provided to the Context method.
  3200  func (c *ProjectsLocationsInstancesListCall) Pages(ctx context.Context, f func(*ListInstancesResponse) error) error {
  3201  	c.ctx_ = ctx
  3202  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3203  	for {
  3204  		x, err := c.Do()
  3205  		if err != nil {
  3206  			return err
  3207  		}
  3208  		if err := f(x); err != nil {
  3209  			return err
  3210  		}
  3211  		if x.NextPageToken == "" {
  3212  			return nil
  3213  		}
  3214  		c.PageToken(x.NextPageToken)
  3215  	}
  3216  }
  3217  
  3218  type ProjectsLocationsInstancesPatchCall struct {
  3219  	s          *Service
  3220  	name       string
  3221  	instance   *Instance
  3222  	urlParams_ gensupport.URLParams
  3223  	ctx_       context.Context
  3224  	header_    http.Header
  3225  }
  3226  
  3227  // Patch: Updates the settings of a specific instance.
  3228  //
  3229  //   - name: Output only. The resource name of the instance, in the format
  3230  //     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`.
  3231  func (r *ProjectsLocationsInstancesService) Patch(name string, instance *Instance) *ProjectsLocationsInstancesPatchCall {
  3232  	c := &ProjectsLocationsInstancesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3233  	c.name = name
  3234  	c.instance = instance
  3235  	return c
  3236  }
  3237  
  3238  // UpdateMask sets the optional parameter "updateMask": Required. Mask of
  3239  // fields to update. At least one path must be supplied in this field. The
  3240  // elements of the repeated paths field may only include these fields: *
  3241  // "description" * "directory_services" * "file_shares" * "labels"
  3242  func (c *ProjectsLocationsInstancesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsInstancesPatchCall {
  3243  	c.urlParams_.Set("updateMask", updateMask)
  3244  	return c
  3245  }
  3246  
  3247  // Fields allows partial responses to be retrieved. See
  3248  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3249  // details.
  3250  func (c *ProjectsLocationsInstancesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesPatchCall {
  3251  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3252  	return c
  3253  }
  3254  
  3255  // Context sets the context to be used in this call's Do method.
  3256  func (c *ProjectsLocationsInstancesPatchCall) Context(ctx context.Context) *ProjectsLocationsInstancesPatchCall {
  3257  	c.ctx_ = ctx
  3258  	return c
  3259  }
  3260  
  3261  // Header returns a http.Header that can be modified by the caller to add
  3262  // headers to the request.
  3263  func (c *ProjectsLocationsInstancesPatchCall) Header() http.Header {
  3264  	if c.header_ == nil {
  3265  		c.header_ = make(http.Header)
  3266  	}
  3267  	return c.header_
  3268  }
  3269  
  3270  func (c *ProjectsLocationsInstancesPatchCall) doRequest(alt string) (*http.Response, error) {
  3271  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3272  	var body io.Reader = nil
  3273  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instance)
  3274  	if err != nil {
  3275  		return nil, err
  3276  	}
  3277  	c.urlParams_.Set("alt", alt)
  3278  	c.urlParams_.Set("prettyPrint", "false")
  3279  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  3280  	urls += "?" + c.urlParams_.Encode()
  3281  	req, err := http.NewRequest("PATCH", urls, body)
  3282  	if err != nil {
  3283  		return nil, err
  3284  	}
  3285  	req.Header = reqHeaders
  3286  	googleapi.Expand(req.URL, map[string]string{
  3287  		"name": c.name,
  3288  	})
  3289  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3290  }
  3291  
  3292  // Do executes the "file.projects.locations.instances.patch" call.
  3293  // Any non-2xx status code is an error. Response headers are in either
  3294  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3295  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3296  // whether the returned error was because http.StatusNotModified was returned.
  3297  func (c *ProjectsLocationsInstancesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3298  	gensupport.SetOptions(c.urlParams_, opts...)
  3299  	res, err := c.doRequest("json")
  3300  	if res != nil && res.StatusCode == http.StatusNotModified {
  3301  		if res.Body != nil {
  3302  			res.Body.Close()
  3303  		}
  3304  		return nil, gensupport.WrapError(&googleapi.Error{
  3305  			Code:   res.StatusCode,
  3306  			Header: res.Header,
  3307  		})
  3308  	}
  3309  	if err != nil {
  3310  		return nil, err
  3311  	}
  3312  	defer googleapi.CloseBody(res)
  3313  	if err := googleapi.CheckResponse(res); err != nil {
  3314  		return nil, gensupport.WrapError(err)
  3315  	}
  3316  	ret := &Operation{
  3317  		ServerResponse: googleapi.ServerResponse{
  3318  			Header:         res.Header,
  3319  			HTTPStatusCode: res.StatusCode,
  3320  		},
  3321  	}
  3322  	target := &ret
  3323  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3324  		return nil, err
  3325  	}
  3326  	return ret, nil
  3327  }
  3328  
  3329  type ProjectsLocationsInstancesPromoteReplicaCall struct {
  3330  	s                     *Service
  3331  	name                  string
  3332  	promotereplicarequest *PromoteReplicaRequest
  3333  	urlParams_            gensupport.URLParams
  3334  	ctx_                  context.Context
  3335  	header_               http.Header
  3336  }
  3337  
  3338  // PromoteReplica: Promote an standby instance (replica).
  3339  //
  3340  //   - name: The resource name of the instance, in the format
  3341  //     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`.
  3342  func (r *ProjectsLocationsInstancesService) PromoteReplica(name string, promotereplicarequest *PromoteReplicaRequest) *ProjectsLocationsInstancesPromoteReplicaCall {
  3343  	c := &ProjectsLocationsInstancesPromoteReplicaCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3344  	c.name = name
  3345  	c.promotereplicarequest = promotereplicarequest
  3346  	return c
  3347  }
  3348  
  3349  // Fields allows partial responses to be retrieved. See
  3350  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3351  // details.
  3352  func (c *ProjectsLocationsInstancesPromoteReplicaCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesPromoteReplicaCall {
  3353  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3354  	return c
  3355  }
  3356  
  3357  // Context sets the context to be used in this call's Do method.
  3358  func (c *ProjectsLocationsInstancesPromoteReplicaCall) Context(ctx context.Context) *ProjectsLocationsInstancesPromoteReplicaCall {
  3359  	c.ctx_ = ctx
  3360  	return c
  3361  }
  3362  
  3363  // Header returns a http.Header that can be modified by the caller to add
  3364  // headers to the request.
  3365  func (c *ProjectsLocationsInstancesPromoteReplicaCall) Header() http.Header {
  3366  	if c.header_ == nil {
  3367  		c.header_ = make(http.Header)
  3368  	}
  3369  	return c.header_
  3370  }
  3371  
  3372  func (c *ProjectsLocationsInstancesPromoteReplicaCall) doRequest(alt string) (*http.Response, error) {
  3373  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3374  	var body io.Reader = nil
  3375  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.promotereplicarequest)
  3376  	if err != nil {
  3377  		return nil, err
  3378  	}
  3379  	c.urlParams_.Set("alt", alt)
  3380  	c.urlParams_.Set("prettyPrint", "false")
  3381  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:promoteReplica")
  3382  	urls += "?" + c.urlParams_.Encode()
  3383  	req, err := http.NewRequest("POST", urls, body)
  3384  	if err != nil {
  3385  		return nil, err
  3386  	}
  3387  	req.Header = reqHeaders
  3388  	googleapi.Expand(req.URL, map[string]string{
  3389  		"name": c.name,
  3390  	})
  3391  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3392  }
  3393  
  3394  // Do executes the "file.projects.locations.instances.promoteReplica" call.
  3395  // Any non-2xx status code is an error. Response headers are in either
  3396  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3397  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3398  // whether the returned error was because http.StatusNotModified was returned.
  3399  func (c *ProjectsLocationsInstancesPromoteReplicaCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3400  	gensupport.SetOptions(c.urlParams_, opts...)
  3401  	res, err := c.doRequest("json")
  3402  	if res != nil && res.StatusCode == http.StatusNotModified {
  3403  		if res.Body != nil {
  3404  			res.Body.Close()
  3405  		}
  3406  		return nil, gensupport.WrapError(&googleapi.Error{
  3407  			Code:   res.StatusCode,
  3408  			Header: res.Header,
  3409  		})
  3410  	}
  3411  	if err != nil {
  3412  		return nil, err
  3413  	}
  3414  	defer googleapi.CloseBody(res)
  3415  	if err := googleapi.CheckResponse(res); err != nil {
  3416  		return nil, gensupport.WrapError(err)
  3417  	}
  3418  	ret := &Operation{
  3419  		ServerResponse: googleapi.ServerResponse{
  3420  			Header:         res.Header,
  3421  			HTTPStatusCode: res.StatusCode,
  3422  		},
  3423  	}
  3424  	target := &ret
  3425  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3426  		return nil, err
  3427  	}
  3428  	return ret, nil
  3429  }
  3430  
  3431  type ProjectsLocationsInstancesRestoreCall struct {
  3432  	s                      *Service
  3433  	name                   string
  3434  	restoreinstancerequest *RestoreInstanceRequest
  3435  	urlParams_             gensupport.URLParams
  3436  	ctx_                   context.Context
  3437  	header_                http.Header
  3438  }
  3439  
  3440  // Restore: Restores an existing instance's file share from a backup. The
  3441  // capacity of the instance needs to be equal to or larger than the capacity of
  3442  // the backup (and also equal to or larger than the minimum capacity of the
  3443  // tier).
  3444  //
  3445  //   - name: The resource name of the instance, in the format
  3446  //     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`.
  3447  func (r *ProjectsLocationsInstancesService) Restore(name string, restoreinstancerequest *RestoreInstanceRequest) *ProjectsLocationsInstancesRestoreCall {
  3448  	c := &ProjectsLocationsInstancesRestoreCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3449  	c.name = name
  3450  	c.restoreinstancerequest = restoreinstancerequest
  3451  	return c
  3452  }
  3453  
  3454  // Fields allows partial responses to be retrieved. See
  3455  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3456  // details.
  3457  func (c *ProjectsLocationsInstancesRestoreCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesRestoreCall {
  3458  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3459  	return c
  3460  }
  3461  
  3462  // Context sets the context to be used in this call's Do method.
  3463  func (c *ProjectsLocationsInstancesRestoreCall) Context(ctx context.Context) *ProjectsLocationsInstancesRestoreCall {
  3464  	c.ctx_ = ctx
  3465  	return c
  3466  }
  3467  
  3468  // Header returns a http.Header that can be modified by the caller to add
  3469  // headers to the request.
  3470  func (c *ProjectsLocationsInstancesRestoreCall) Header() http.Header {
  3471  	if c.header_ == nil {
  3472  		c.header_ = make(http.Header)
  3473  	}
  3474  	return c.header_
  3475  }
  3476  
  3477  func (c *ProjectsLocationsInstancesRestoreCall) doRequest(alt string) (*http.Response, error) {
  3478  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3479  	var body io.Reader = nil
  3480  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.restoreinstancerequest)
  3481  	if err != nil {
  3482  		return nil, err
  3483  	}
  3484  	c.urlParams_.Set("alt", alt)
  3485  	c.urlParams_.Set("prettyPrint", "false")
  3486  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:restore")
  3487  	urls += "?" + c.urlParams_.Encode()
  3488  	req, err := http.NewRequest("POST", urls, body)
  3489  	if err != nil {
  3490  		return nil, err
  3491  	}
  3492  	req.Header = reqHeaders
  3493  	googleapi.Expand(req.URL, map[string]string{
  3494  		"name": c.name,
  3495  	})
  3496  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3497  }
  3498  
  3499  // Do executes the "file.projects.locations.instances.restore" call.
  3500  // Any non-2xx status code is an error. Response headers are in either
  3501  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3502  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3503  // whether the returned error was because http.StatusNotModified was returned.
  3504  func (c *ProjectsLocationsInstancesRestoreCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3505  	gensupport.SetOptions(c.urlParams_, opts...)
  3506  	res, err := c.doRequest("json")
  3507  	if res != nil && res.StatusCode == http.StatusNotModified {
  3508  		if res.Body != nil {
  3509  			res.Body.Close()
  3510  		}
  3511  		return nil, gensupport.WrapError(&googleapi.Error{
  3512  			Code:   res.StatusCode,
  3513  			Header: res.Header,
  3514  		})
  3515  	}
  3516  	if err != nil {
  3517  		return nil, err
  3518  	}
  3519  	defer googleapi.CloseBody(res)
  3520  	if err := googleapi.CheckResponse(res); err != nil {
  3521  		return nil, gensupport.WrapError(err)
  3522  	}
  3523  	ret := &Operation{
  3524  		ServerResponse: googleapi.ServerResponse{
  3525  			Header:         res.Header,
  3526  			HTTPStatusCode: res.StatusCode,
  3527  		},
  3528  	}
  3529  	target := &ret
  3530  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3531  		return nil, err
  3532  	}
  3533  	return ret, nil
  3534  }
  3535  
  3536  type ProjectsLocationsInstancesRevertCall struct {
  3537  	s                     *Service
  3538  	name                  string
  3539  	revertinstancerequest *RevertInstanceRequest
  3540  	urlParams_            gensupport.URLParams
  3541  	ctx_                  context.Context
  3542  	header_               http.Header
  3543  }
  3544  
  3545  // Revert: Revert an existing instance's file system to a specified snapshot.
  3546  //
  3547  //   - name: The resource name of the instance, in the format
  3548  //     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`.
  3549  func (r *ProjectsLocationsInstancesService) Revert(name string, revertinstancerequest *RevertInstanceRequest) *ProjectsLocationsInstancesRevertCall {
  3550  	c := &ProjectsLocationsInstancesRevertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3551  	c.name = name
  3552  	c.revertinstancerequest = revertinstancerequest
  3553  	return c
  3554  }
  3555  
  3556  // Fields allows partial responses to be retrieved. See
  3557  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3558  // details.
  3559  func (c *ProjectsLocationsInstancesRevertCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesRevertCall {
  3560  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3561  	return c
  3562  }
  3563  
  3564  // Context sets the context to be used in this call's Do method.
  3565  func (c *ProjectsLocationsInstancesRevertCall) Context(ctx context.Context) *ProjectsLocationsInstancesRevertCall {
  3566  	c.ctx_ = ctx
  3567  	return c
  3568  }
  3569  
  3570  // Header returns a http.Header that can be modified by the caller to add
  3571  // headers to the request.
  3572  func (c *ProjectsLocationsInstancesRevertCall) Header() http.Header {
  3573  	if c.header_ == nil {
  3574  		c.header_ = make(http.Header)
  3575  	}
  3576  	return c.header_
  3577  }
  3578  
  3579  func (c *ProjectsLocationsInstancesRevertCall) doRequest(alt string) (*http.Response, error) {
  3580  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3581  	var body io.Reader = nil
  3582  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.revertinstancerequest)
  3583  	if err != nil {
  3584  		return nil, err
  3585  	}
  3586  	c.urlParams_.Set("alt", alt)
  3587  	c.urlParams_.Set("prettyPrint", "false")
  3588  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:revert")
  3589  	urls += "?" + c.urlParams_.Encode()
  3590  	req, err := http.NewRequest("POST", urls, body)
  3591  	if err != nil {
  3592  		return nil, err
  3593  	}
  3594  	req.Header = reqHeaders
  3595  	googleapi.Expand(req.URL, map[string]string{
  3596  		"name": c.name,
  3597  	})
  3598  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3599  }
  3600  
  3601  // Do executes the "file.projects.locations.instances.revert" call.
  3602  // Any non-2xx status code is an error. Response headers are in either
  3603  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3604  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3605  // whether the returned error was because http.StatusNotModified was returned.
  3606  func (c *ProjectsLocationsInstancesRevertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3607  	gensupport.SetOptions(c.urlParams_, opts...)
  3608  	res, err := c.doRequest("json")
  3609  	if res != nil && res.StatusCode == http.StatusNotModified {
  3610  		if res.Body != nil {
  3611  			res.Body.Close()
  3612  		}
  3613  		return nil, gensupport.WrapError(&googleapi.Error{
  3614  			Code:   res.StatusCode,
  3615  			Header: res.Header,
  3616  		})
  3617  	}
  3618  	if err != nil {
  3619  		return nil, err
  3620  	}
  3621  	defer googleapi.CloseBody(res)
  3622  	if err := googleapi.CheckResponse(res); err != nil {
  3623  		return nil, gensupport.WrapError(err)
  3624  	}
  3625  	ret := &Operation{
  3626  		ServerResponse: googleapi.ServerResponse{
  3627  			Header:         res.Header,
  3628  			HTTPStatusCode: res.StatusCode,
  3629  		},
  3630  	}
  3631  	target := &ret
  3632  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3633  		return nil, err
  3634  	}
  3635  	return ret, nil
  3636  }
  3637  
  3638  type ProjectsLocationsInstancesSharesCreateCall struct {
  3639  	s          *Service
  3640  	parent     string
  3641  	share      *Share
  3642  	urlParams_ gensupport.URLParams
  3643  	ctx_       context.Context
  3644  	header_    http.Header
  3645  }
  3646  
  3647  // Create: Creates a share.
  3648  //
  3649  //   - parent: The Filestore Instance to create the share for, in the format
  3650  //     `projects/{project_id}/locations/{location}/instances/{instance_id}`.
  3651  func (r *ProjectsLocationsInstancesSharesService) Create(parent string, share *Share) *ProjectsLocationsInstancesSharesCreateCall {
  3652  	c := &ProjectsLocationsInstancesSharesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3653  	c.parent = parent
  3654  	c.share = share
  3655  	return c
  3656  }
  3657  
  3658  // ShareId sets the optional parameter "shareId": Required. The ID to use for
  3659  // the share. The ID must be unique within the specified instance. This value
  3660  // must start with a lowercase letter followed by up to 62 lowercase letters,
  3661  // numbers, or hyphens, and cannot end with a hyphen.
  3662  func (c *ProjectsLocationsInstancesSharesCreateCall) ShareId(shareId string) *ProjectsLocationsInstancesSharesCreateCall {
  3663  	c.urlParams_.Set("shareId", shareId)
  3664  	return c
  3665  }
  3666  
  3667  // Fields allows partial responses to be retrieved. See
  3668  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3669  // details.
  3670  func (c *ProjectsLocationsInstancesSharesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesSharesCreateCall {
  3671  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3672  	return c
  3673  }
  3674  
  3675  // Context sets the context to be used in this call's Do method.
  3676  func (c *ProjectsLocationsInstancesSharesCreateCall) Context(ctx context.Context) *ProjectsLocationsInstancesSharesCreateCall {
  3677  	c.ctx_ = ctx
  3678  	return c
  3679  }
  3680  
  3681  // Header returns a http.Header that can be modified by the caller to add
  3682  // headers to the request.
  3683  func (c *ProjectsLocationsInstancesSharesCreateCall) Header() http.Header {
  3684  	if c.header_ == nil {
  3685  		c.header_ = make(http.Header)
  3686  	}
  3687  	return c.header_
  3688  }
  3689  
  3690  func (c *ProjectsLocationsInstancesSharesCreateCall) doRequest(alt string) (*http.Response, error) {
  3691  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3692  	var body io.Reader = nil
  3693  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.share)
  3694  	if err != nil {
  3695  		return nil, err
  3696  	}
  3697  	c.urlParams_.Set("alt", alt)
  3698  	c.urlParams_.Set("prettyPrint", "false")
  3699  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/shares")
  3700  	urls += "?" + c.urlParams_.Encode()
  3701  	req, err := http.NewRequest("POST", urls, body)
  3702  	if err != nil {
  3703  		return nil, err
  3704  	}
  3705  	req.Header = reqHeaders
  3706  	googleapi.Expand(req.URL, map[string]string{
  3707  		"parent": c.parent,
  3708  	})
  3709  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3710  }
  3711  
  3712  // Do executes the "file.projects.locations.instances.shares.create" call.
  3713  // Any non-2xx status code is an error. Response headers are in either
  3714  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3715  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3716  // whether the returned error was because http.StatusNotModified was returned.
  3717  func (c *ProjectsLocationsInstancesSharesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3718  	gensupport.SetOptions(c.urlParams_, opts...)
  3719  	res, err := c.doRequest("json")
  3720  	if res != nil && res.StatusCode == http.StatusNotModified {
  3721  		if res.Body != nil {
  3722  			res.Body.Close()
  3723  		}
  3724  		return nil, gensupport.WrapError(&googleapi.Error{
  3725  			Code:   res.StatusCode,
  3726  			Header: res.Header,
  3727  		})
  3728  	}
  3729  	if err != nil {
  3730  		return nil, err
  3731  	}
  3732  	defer googleapi.CloseBody(res)
  3733  	if err := googleapi.CheckResponse(res); err != nil {
  3734  		return nil, gensupport.WrapError(err)
  3735  	}
  3736  	ret := &Operation{
  3737  		ServerResponse: googleapi.ServerResponse{
  3738  			Header:         res.Header,
  3739  			HTTPStatusCode: res.StatusCode,
  3740  		},
  3741  	}
  3742  	target := &ret
  3743  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3744  		return nil, err
  3745  	}
  3746  	return ret, nil
  3747  }
  3748  
  3749  type ProjectsLocationsInstancesSharesDeleteCall struct {
  3750  	s          *Service
  3751  	name       string
  3752  	urlParams_ gensupport.URLParams
  3753  	ctx_       context.Context
  3754  	header_    http.Header
  3755  }
  3756  
  3757  // Delete: Deletes a share.
  3758  //
  3759  //   - name: The share resource name, in the format
  3760  //     `projects/{project_id}/locations/{location}/instances/{instance_id}/share/{
  3761  //     share_id}`.
  3762  func (r *ProjectsLocationsInstancesSharesService) Delete(name string) *ProjectsLocationsInstancesSharesDeleteCall {
  3763  	c := &ProjectsLocationsInstancesSharesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3764  	c.name = name
  3765  	return c
  3766  }
  3767  
  3768  // Fields allows partial responses to be retrieved. See
  3769  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3770  // details.
  3771  func (c *ProjectsLocationsInstancesSharesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesSharesDeleteCall {
  3772  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3773  	return c
  3774  }
  3775  
  3776  // Context sets the context to be used in this call's Do method.
  3777  func (c *ProjectsLocationsInstancesSharesDeleteCall) Context(ctx context.Context) *ProjectsLocationsInstancesSharesDeleteCall {
  3778  	c.ctx_ = ctx
  3779  	return c
  3780  }
  3781  
  3782  // Header returns a http.Header that can be modified by the caller to add
  3783  // headers to the request.
  3784  func (c *ProjectsLocationsInstancesSharesDeleteCall) Header() http.Header {
  3785  	if c.header_ == nil {
  3786  		c.header_ = make(http.Header)
  3787  	}
  3788  	return c.header_
  3789  }
  3790  
  3791  func (c *ProjectsLocationsInstancesSharesDeleteCall) doRequest(alt string) (*http.Response, error) {
  3792  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3793  	var body io.Reader = nil
  3794  	c.urlParams_.Set("alt", alt)
  3795  	c.urlParams_.Set("prettyPrint", "false")
  3796  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  3797  	urls += "?" + c.urlParams_.Encode()
  3798  	req, err := http.NewRequest("DELETE", urls, body)
  3799  	if err != nil {
  3800  		return nil, err
  3801  	}
  3802  	req.Header = reqHeaders
  3803  	googleapi.Expand(req.URL, map[string]string{
  3804  		"name": c.name,
  3805  	})
  3806  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3807  }
  3808  
  3809  // Do executes the "file.projects.locations.instances.shares.delete" call.
  3810  // Any non-2xx status code is an error. Response headers are in either
  3811  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3812  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3813  // whether the returned error was because http.StatusNotModified was returned.
  3814  func (c *ProjectsLocationsInstancesSharesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3815  	gensupport.SetOptions(c.urlParams_, opts...)
  3816  	res, err := c.doRequest("json")
  3817  	if res != nil && res.StatusCode == http.StatusNotModified {
  3818  		if res.Body != nil {
  3819  			res.Body.Close()
  3820  		}
  3821  		return nil, gensupport.WrapError(&googleapi.Error{
  3822  			Code:   res.StatusCode,
  3823  			Header: res.Header,
  3824  		})
  3825  	}
  3826  	if err != nil {
  3827  		return nil, err
  3828  	}
  3829  	defer googleapi.CloseBody(res)
  3830  	if err := googleapi.CheckResponse(res); err != nil {
  3831  		return nil, gensupport.WrapError(err)
  3832  	}
  3833  	ret := &Operation{
  3834  		ServerResponse: googleapi.ServerResponse{
  3835  			Header:         res.Header,
  3836  			HTTPStatusCode: res.StatusCode,
  3837  		},
  3838  	}
  3839  	target := &ret
  3840  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3841  		return nil, err
  3842  	}
  3843  	return ret, nil
  3844  }
  3845  
  3846  type ProjectsLocationsInstancesSharesGetCall struct {
  3847  	s            *Service
  3848  	name         string
  3849  	urlParams_   gensupport.URLParams
  3850  	ifNoneMatch_ string
  3851  	ctx_         context.Context
  3852  	header_      http.Header
  3853  }
  3854  
  3855  // Get: Gets the details of a specific share.
  3856  //
  3857  //   - name: The share resource name, in the format
  3858  //     `projects/{project_id}/locations/{location}/instances/{instance_id}/shares/
  3859  //     {share_id}`.
  3860  func (r *ProjectsLocationsInstancesSharesService) Get(name string) *ProjectsLocationsInstancesSharesGetCall {
  3861  	c := &ProjectsLocationsInstancesSharesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3862  	c.name = name
  3863  	return c
  3864  }
  3865  
  3866  // Fields allows partial responses to be retrieved. See
  3867  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3868  // details.
  3869  func (c *ProjectsLocationsInstancesSharesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesSharesGetCall {
  3870  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3871  	return c
  3872  }
  3873  
  3874  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3875  // object's ETag matches the given value. This is useful for getting updates
  3876  // only after the object has changed since the last request.
  3877  func (c *ProjectsLocationsInstancesSharesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesSharesGetCall {
  3878  	c.ifNoneMatch_ = entityTag
  3879  	return c
  3880  }
  3881  
  3882  // Context sets the context to be used in this call's Do method.
  3883  func (c *ProjectsLocationsInstancesSharesGetCall) Context(ctx context.Context) *ProjectsLocationsInstancesSharesGetCall {
  3884  	c.ctx_ = ctx
  3885  	return c
  3886  }
  3887  
  3888  // Header returns a http.Header that can be modified by the caller to add
  3889  // headers to the request.
  3890  func (c *ProjectsLocationsInstancesSharesGetCall) Header() http.Header {
  3891  	if c.header_ == nil {
  3892  		c.header_ = make(http.Header)
  3893  	}
  3894  	return c.header_
  3895  }
  3896  
  3897  func (c *ProjectsLocationsInstancesSharesGetCall) doRequest(alt string) (*http.Response, error) {
  3898  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3899  	if c.ifNoneMatch_ != "" {
  3900  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3901  	}
  3902  	var body io.Reader = nil
  3903  	c.urlParams_.Set("alt", alt)
  3904  	c.urlParams_.Set("prettyPrint", "false")
  3905  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  3906  	urls += "?" + c.urlParams_.Encode()
  3907  	req, err := http.NewRequest("GET", urls, body)
  3908  	if err != nil {
  3909  		return nil, err
  3910  	}
  3911  	req.Header = reqHeaders
  3912  	googleapi.Expand(req.URL, map[string]string{
  3913  		"name": c.name,
  3914  	})
  3915  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3916  }
  3917  
  3918  // Do executes the "file.projects.locations.instances.shares.get" call.
  3919  // Any non-2xx status code is an error. Response headers are in either
  3920  // *Share.ServerResponse.Header or (if a response was returned at all) in
  3921  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3922  // whether the returned error was because http.StatusNotModified was returned.
  3923  func (c *ProjectsLocationsInstancesSharesGetCall) Do(opts ...googleapi.CallOption) (*Share, error) {
  3924  	gensupport.SetOptions(c.urlParams_, opts...)
  3925  	res, err := c.doRequest("json")
  3926  	if res != nil && res.StatusCode == http.StatusNotModified {
  3927  		if res.Body != nil {
  3928  			res.Body.Close()
  3929  		}
  3930  		return nil, gensupport.WrapError(&googleapi.Error{
  3931  			Code:   res.StatusCode,
  3932  			Header: res.Header,
  3933  		})
  3934  	}
  3935  	if err != nil {
  3936  		return nil, err
  3937  	}
  3938  	defer googleapi.CloseBody(res)
  3939  	if err := googleapi.CheckResponse(res); err != nil {
  3940  		return nil, gensupport.WrapError(err)
  3941  	}
  3942  	ret := &Share{
  3943  		ServerResponse: googleapi.ServerResponse{
  3944  			Header:         res.Header,
  3945  			HTTPStatusCode: res.StatusCode,
  3946  		},
  3947  	}
  3948  	target := &ret
  3949  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3950  		return nil, err
  3951  	}
  3952  	return ret, nil
  3953  }
  3954  
  3955  type ProjectsLocationsInstancesSharesListCall struct {
  3956  	s            *Service
  3957  	parent       string
  3958  	urlParams_   gensupport.URLParams
  3959  	ifNoneMatch_ string
  3960  	ctx_         context.Context
  3961  	header_      http.Header
  3962  }
  3963  
  3964  // List: Lists all shares for a specified instance.
  3965  //
  3966  //   - parent: The instance for which to retrieve share information, in the
  3967  //     format
  3968  //     `projects/{project_id}/locations/{location}/instances/{instance_id}`.
  3969  func (r *ProjectsLocationsInstancesSharesService) List(parent string) *ProjectsLocationsInstancesSharesListCall {
  3970  	c := &ProjectsLocationsInstancesSharesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3971  	c.parent = parent
  3972  	return c
  3973  }
  3974  
  3975  // Filter sets the optional parameter "filter": List filter.
  3976  func (c *ProjectsLocationsInstancesSharesListCall) Filter(filter string) *ProjectsLocationsInstancesSharesListCall {
  3977  	c.urlParams_.Set("filter", filter)
  3978  	return c
  3979  }
  3980  
  3981  // OrderBy sets the optional parameter "orderBy": Sort results. Supported
  3982  // values are "name", "name desc" or "" (unsorted).
  3983  func (c *ProjectsLocationsInstancesSharesListCall) OrderBy(orderBy string) *ProjectsLocationsInstancesSharesListCall {
  3984  	c.urlParams_.Set("orderBy", orderBy)
  3985  	return c
  3986  }
  3987  
  3988  // PageSize sets the optional parameter "pageSize": The maximum number of items
  3989  // to return.
  3990  func (c *ProjectsLocationsInstancesSharesListCall) PageSize(pageSize int64) *ProjectsLocationsInstancesSharesListCall {
  3991  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3992  	return c
  3993  }
  3994  
  3995  // PageToken sets the optional parameter "pageToken": The next_page_token value
  3996  // to use if there are additional results to retrieve for this list request.
  3997  func (c *ProjectsLocationsInstancesSharesListCall) PageToken(pageToken string) *ProjectsLocationsInstancesSharesListCall {
  3998  	c.urlParams_.Set("pageToken", pageToken)
  3999  	return c
  4000  }
  4001  
  4002  // Fields allows partial responses to be retrieved. See
  4003  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4004  // details.
  4005  func (c *ProjectsLocationsInstancesSharesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesSharesListCall {
  4006  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4007  	return c
  4008  }
  4009  
  4010  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4011  // object's ETag matches the given value. This is useful for getting updates
  4012  // only after the object has changed since the last request.
  4013  func (c *ProjectsLocationsInstancesSharesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesSharesListCall {
  4014  	c.ifNoneMatch_ = entityTag
  4015  	return c
  4016  }
  4017  
  4018  // Context sets the context to be used in this call's Do method.
  4019  func (c *ProjectsLocationsInstancesSharesListCall) Context(ctx context.Context) *ProjectsLocationsInstancesSharesListCall {
  4020  	c.ctx_ = ctx
  4021  	return c
  4022  }
  4023  
  4024  // Header returns a http.Header that can be modified by the caller to add
  4025  // headers to the request.
  4026  func (c *ProjectsLocationsInstancesSharesListCall) Header() http.Header {
  4027  	if c.header_ == nil {
  4028  		c.header_ = make(http.Header)
  4029  	}
  4030  	return c.header_
  4031  }
  4032  
  4033  func (c *ProjectsLocationsInstancesSharesListCall) doRequest(alt string) (*http.Response, error) {
  4034  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4035  	if c.ifNoneMatch_ != "" {
  4036  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4037  	}
  4038  	var body io.Reader = nil
  4039  	c.urlParams_.Set("alt", alt)
  4040  	c.urlParams_.Set("prettyPrint", "false")
  4041  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/shares")
  4042  	urls += "?" + c.urlParams_.Encode()
  4043  	req, err := http.NewRequest("GET", urls, body)
  4044  	if err != nil {
  4045  		return nil, err
  4046  	}
  4047  	req.Header = reqHeaders
  4048  	googleapi.Expand(req.URL, map[string]string{
  4049  		"parent": c.parent,
  4050  	})
  4051  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4052  }
  4053  
  4054  // Do executes the "file.projects.locations.instances.shares.list" call.
  4055  // Any non-2xx status code is an error. Response headers are in either
  4056  // *ListSharesResponse.ServerResponse.Header or (if a response was returned at
  4057  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4058  // check whether the returned error was because http.StatusNotModified was
  4059  // returned.
  4060  func (c *ProjectsLocationsInstancesSharesListCall) Do(opts ...googleapi.CallOption) (*ListSharesResponse, error) {
  4061  	gensupport.SetOptions(c.urlParams_, opts...)
  4062  	res, err := c.doRequest("json")
  4063  	if res != nil && res.StatusCode == http.StatusNotModified {
  4064  		if res.Body != nil {
  4065  			res.Body.Close()
  4066  		}
  4067  		return nil, gensupport.WrapError(&googleapi.Error{
  4068  			Code:   res.StatusCode,
  4069  			Header: res.Header,
  4070  		})
  4071  	}
  4072  	if err != nil {
  4073  		return nil, err
  4074  	}
  4075  	defer googleapi.CloseBody(res)
  4076  	if err := googleapi.CheckResponse(res); err != nil {
  4077  		return nil, gensupport.WrapError(err)
  4078  	}
  4079  	ret := &ListSharesResponse{
  4080  		ServerResponse: googleapi.ServerResponse{
  4081  			Header:         res.Header,
  4082  			HTTPStatusCode: res.StatusCode,
  4083  		},
  4084  	}
  4085  	target := &ret
  4086  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4087  		return nil, err
  4088  	}
  4089  	return ret, nil
  4090  }
  4091  
  4092  // Pages invokes f for each page of results.
  4093  // A non-nil error returned from f will halt the iteration.
  4094  // The provided context supersedes any context provided to the Context method.
  4095  func (c *ProjectsLocationsInstancesSharesListCall) Pages(ctx context.Context, f func(*ListSharesResponse) error) error {
  4096  	c.ctx_ = ctx
  4097  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4098  	for {
  4099  		x, err := c.Do()
  4100  		if err != nil {
  4101  			return err
  4102  		}
  4103  		if err := f(x); err != nil {
  4104  			return err
  4105  		}
  4106  		if x.NextPageToken == "" {
  4107  			return nil
  4108  		}
  4109  		c.PageToken(x.NextPageToken)
  4110  	}
  4111  }
  4112  
  4113  type ProjectsLocationsInstancesSharesPatchCall struct {
  4114  	s          *Service
  4115  	name       string
  4116  	share      *Share
  4117  	urlParams_ gensupport.URLParams
  4118  	ctx_       context.Context
  4119  	header_    http.Header
  4120  }
  4121  
  4122  // Patch: Updates the settings of a specific share.
  4123  //
  4124  //   - name: Output only. The resource name of the share, in the format
  4125  //     `projects/{project_id}/locations/{location_id}/instances/{instance_id}/shar
  4126  //     es/{share_id}`.
  4127  func (r *ProjectsLocationsInstancesSharesService) Patch(name string, share *Share) *ProjectsLocationsInstancesSharesPatchCall {
  4128  	c := &ProjectsLocationsInstancesSharesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4129  	c.name = name
  4130  	c.share = share
  4131  	return c
  4132  }
  4133  
  4134  // UpdateMask sets the optional parameter "updateMask": Required. Mask of
  4135  // fields to update. At least one path must be supplied in this field. The
  4136  // elements of the repeated paths field may only include these fields: *
  4137  // "description" * "capacity_gb" * "labels" * "nfs_export_options"
  4138  func (c *ProjectsLocationsInstancesSharesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsInstancesSharesPatchCall {
  4139  	c.urlParams_.Set("updateMask", updateMask)
  4140  	return c
  4141  }
  4142  
  4143  // Fields allows partial responses to be retrieved. See
  4144  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4145  // details.
  4146  func (c *ProjectsLocationsInstancesSharesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesSharesPatchCall {
  4147  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4148  	return c
  4149  }
  4150  
  4151  // Context sets the context to be used in this call's Do method.
  4152  func (c *ProjectsLocationsInstancesSharesPatchCall) Context(ctx context.Context) *ProjectsLocationsInstancesSharesPatchCall {
  4153  	c.ctx_ = ctx
  4154  	return c
  4155  }
  4156  
  4157  // Header returns a http.Header that can be modified by the caller to add
  4158  // headers to the request.
  4159  func (c *ProjectsLocationsInstancesSharesPatchCall) Header() http.Header {
  4160  	if c.header_ == nil {
  4161  		c.header_ = make(http.Header)
  4162  	}
  4163  	return c.header_
  4164  }
  4165  
  4166  func (c *ProjectsLocationsInstancesSharesPatchCall) doRequest(alt string) (*http.Response, error) {
  4167  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4168  	var body io.Reader = nil
  4169  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.share)
  4170  	if err != nil {
  4171  		return nil, err
  4172  	}
  4173  	c.urlParams_.Set("alt", alt)
  4174  	c.urlParams_.Set("prettyPrint", "false")
  4175  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  4176  	urls += "?" + c.urlParams_.Encode()
  4177  	req, err := http.NewRequest("PATCH", urls, body)
  4178  	if err != nil {
  4179  		return nil, err
  4180  	}
  4181  	req.Header = reqHeaders
  4182  	googleapi.Expand(req.URL, map[string]string{
  4183  		"name": c.name,
  4184  	})
  4185  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4186  }
  4187  
  4188  // Do executes the "file.projects.locations.instances.shares.patch" call.
  4189  // Any non-2xx status code is an error. Response headers are in either
  4190  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4191  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4192  // whether the returned error was because http.StatusNotModified was returned.
  4193  func (c *ProjectsLocationsInstancesSharesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4194  	gensupport.SetOptions(c.urlParams_, opts...)
  4195  	res, err := c.doRequest("json")
  4196  	if res != nil && res.StatusCode == http.StatusNotModified {
  4197  		if res.Body != nil {
  4198  			res.Body.Close()
  4199  		}
  4200  		return nil, gensupport.WrapError(&googleapi.Error{
  4201  			Code:   res.StatusCode,
  4202  			Header: res.Header,
  4203  		})
  4204  	}
  4205  	if err != nil {
  4206  		return nil, err
  4207  	}
  4208  	defer googleapi.CloseBody(res)
  4209  	if err := googleapi.CheckResponse(res); err != nil {
  4210  		return nil, gensupport.WrapError(err)
  4211  	}
  4212  	ret := &Operation{
  4213  		ServerResponse: googleapi.ServerResponse{
  4214  			Header:         res.Header,
  4215  			HTTPStatusCode: res.StatusCode,
  4216  		},
  4217  	}
  4218  	target := &ret
  4219  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4220  		return nil, err
  4221  	}
  4222  	return ret, nil
  4223  }
  4224  
  4225  type ProjectsLocationsInstancesSnapshotsCreateCall struct {
  4226  	s          *Service
  4227  	parent     string
  4228  	snapshot   *Snapshot
  4229  	urlParams_ gensupport.URLParams
  4230  	ctx_       context.Context
  4231  	header_    http.Header
  4232  }
  4233  
  4234  // Create: Creates a snapshot.
  4235  //
  4236  //   - parent: The Filestore Instance to create the snapshots of, in the format
  4237  //     `projects/{project_id}/locations/{location}/instances/{instance_id}`.
  4238  func (r *ProjectsLocationsInstancesSnapshotsService) Create(parent string, snapshot *Snapshot) *ProjectsLocationsInstancesSnapshotsCreateCall {
  4239  	c := &ProjectsLocationsInstancesSnapshotsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4240  	c.parent = parent
  4241  	c.snapshot = snapshot
  4242  	return c
  4243  }
  4244  
  4245  // SnapshotId sets the optional parameter "snapshotId": Required. The ID to use
  4246  // for the snapshot. The ID must be unique within the specified instance. This
  4247  // value must start with a lowercase letter followed by up to 62 lowercase
  4248  // letters, numbers, or hyphens, and cannot end with a hyphen.
  4249  func (c *ProjectsLocationsInstancesSnapshotsCreateCall) SnapshotId(snapshotId string) *ProjectsLocationsInstancesSnapshotsCreateCall {
  4250  	c.urlParams_.Set("snapshotId", snapshotId)
  4251  	return c
  4252  }
  4253  
  4254  // Fields allows partial responses to be retrieved. See
  4255  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4256  // details.
  4257  func (c *ProjectsLocationsInstancesSnapshotsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesSnapshotsCreateCall {
  4258  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4259  	return c
  4260  }
  4261  
  4262  // Context sets the context to be used in this call's Do method.
  4263  func (c *ProjectsLocationsInstancesSnapshotsCreateCall) Context(ctx context.Context) *ProjectsLocationsInstancesSnapshotsCreateCall {
  4264  	c.ctx_ = ctx
  4265  	return c
  4266  }
  4267  
  4268  // Header returns a http.Header that can be modified by the caller to add
  4269  // headers to the request.
  4270  func (c *ProjectsLocationsInstancesSnapshotsCreateCall) Header() http.Header {
  4271  	if c.header_ == nil {
  4272  		c.header_ = make(http.Header)
  4273  	}
  4274  	return c.header_
  4275  }
  4276  
  4277  func (c *ProjectsLocationsInstancesSnapshotsCreateCall) doRequest(alt string) (*http.Response, error) {
  4278  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4279  	var body io.Reader = nil
  4280  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.snapshot)
  4281  	if err != nil {
  4282  		return nil, err
  4283  	}
  4284  	c.urlParams_.Set("alt", alt)
  4285  	c.urlParams_.Set("prettyPrint", "false")
  4286  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/snapshots")
  4287  	urls += "?" + c.urlParams_.Encode()
  4288  	req, err := http.NewRequest("POST", urls, body)
  4289  	if err != nil {
  4290  		return nil, err
  4291  	}
  4292  	req.Header = reqHeaders
  4293  	googleapi.Expand(req.URL, map[string]string{
  4294  		"parent": c.parent,
  4295  	})
  4296  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4297  }
  4298  
  4299  // Do executes the "file.projects.locations.instances.snapshots.create" call.
  4300  // Any non-2xx status code is an error. Response headers are in either
  4301  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4302  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4303  // whether the returned error was because http.StatusNotModified was returned.
  4304  func (c *ProjectsLocationsInstancesSnapshotsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4305  	gensupport.SetOptions(c.urlParams_, opts...)
  4306  	res, err := c.doRequest("json")
  4307  	if res != nil && res.StatusCode == http.StatusNotModified {
  4308  		if res.Body != nil {
  4309  			res.Body.Close()
  4310  		}
  4311  		return nil, gensupport.WrapError(&googleapi.Error{
  4312  			Code:   res.StatusCode,
  4313  			Header: res.Header,
  4314  		})
  4315  	}
  4316  	if err != nil {
  4317  		return nil, err
  4318  	}
  4319  	defer googleapi.CloseBody(res)
  4320  	if err := googleapi.CheckResponse(res); err != nil {
  4321  		return nil, gensupport.WrapError(err)
  4322  	}
  4323  	ret := &Operation{
  4324  		ServerResponse: googleapi.ServerResponse{
  4325  			Header:         res.Header,
  4326  			HTTPStatusCode: res.StatusCode,
  4327  		},
  4328  	}
  4329  	target := &ret
  4330  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4331  		return nil, err
  4332  	}
  4333  	return ret, nil
  4334  }
  4335  
  4336  type ProjectsLocationsInstancesSnapshotsDeleteCall struct {
  4337  	s          *Service
  4338  	name       string
  4339  	urlParams_ gensupport.URLParams
  4340  	ctx_       context.Context
  4341  	header_    http.Header
  4342  }
  4343  
  4344  // Delete: Deletes a snapshot.
  4345  //
  4346  //   - name: The snapshot resource name, in the format
  4347  //     `projects/{project_id}/locations/{location}/instances/{instance_id}/snapsho
  4348  //     ts/{snapshot_id}`.
  4349  func (r *ProjectsLocationsInstancesSnapshotsService) Delete(name string) *ProjectsLocationsInstancesSnapshotsDeleteCall {
  4350  	c := &ProjectsLocationsInstancesSnapshotsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4351  	c.name = name
  4352  	return c
  4353  }
  4354  
  4355  // Fields allows partial responses to be retrieved. See
  4356  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4357  // details.
  4358  func (c *ProjectsLocationsInstancesSnapshotsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesSnapshotsDeleteCall {
  4359  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4360  	return c
  4361  }
  4362  
  4363  // Context sets the context to be used in this call's Do method.
  4364  func (c *ProjectsLocationsInstancesSnapshotsDeleteCall) Context(ctx context.Context) *ProjectsLocationsInstancesSnapshotsDeleteCall {
  4365  	c.ctx_ = ctx
  4366  	return c
  4367  }
  4368  
  4369  // Header returns a http.Header that can be modified by the caller to add
  4370  // headers to the request.
  4371  func (c *ProjectsLocationsInstancesSnapshotsDeleteCall) Header() http.Header {
  4372  	if c.header_ == nil {
  4373  		c.header_ = make(http.Header)
  4374  	}
  4375  	return c.header_
  4376  }
  4377  
  4378  func (c *ProjectsLocationsInstancesSnapshotsDeleteCall) doRequest(alt string) (*http.Response, error) {
  4379  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4380  	var body io.Reader = nil
  4381  	c.urlParams_.Set("alt", alt)
  4382  	c.urlParams_.Set("prettyPrint", "false")
  4383  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  4384  	urls += "?" + c.urlParams_.Encode()
  4385  	req, err := http.NewRequest("DELETE", urls, body)
  4386  	if err != nil {
  4387  		return nil, err
  4388  	}
  4389  	req.Header = reqHeaders
  4390  	googleapi.Expand(req.URL, map[string]string{
  4391  		"name": c.name,
  4392  	})
  4393  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4394  }
  4395  
  4396  // Do executes the "file.projects.locations.instances.snapshots.delete" call.
  4397  // Any non-2xx status code is an error. Response headers are in either
  4398  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4399  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4400  // whether the returned error was because http.StatusNotModified was returned.
  4401  func (c *ProjectsLocationsInstancesSnapshotsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4402  	gensupport.SetOptions(c.urlParams_, opts...)
  4403  	res, err := c.doRequest("json")
  4404  	if res != nil && res.StatusCode == http.StatusNotModified {
  4405  		if res.Body != nil {
  4406  			res.Body.Close()
  4407  		}
  4408  		return nil, gensupport.WrapError(&googleapi.Error{
  4409  			Code:   res.StatusCode,
  4410  			Header: res.Header,
  4411  		})
  4412  	}
  4413  	if err != nil {
  4414  		return nil, err
  4415  	}
  4416  	defer googleapi.CloseBody(res)
  4417  	if err := googleapi.CheckResponse(res); err != nil {
  4418  		return nil, gensupport.WrapError(err)
  4419  	}
  4420  	ret := &Operation{
  4421  		ServerResponse: googleapi.ServerResponse{
  4422  			Header:         res.Header,
  4423  			HTTPStatusCode: res.StatusCode,
  4424  		},
  4425  	}
  4426  	target := &ret
  4427  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4428  		return nil, err
  4429  	}
  4430  	return ret, nil
  4431  }
  4432  
  4433  type ProjectsLocationsInstancesSnapshotsGetCall struct {
  4434  	s            *Service
  4435  	name         string
  4436  	urlParams_   gensupport.URLParams
  4437  	ifNoneMatch_ string
  4438  	ctx_         context.Context
  4439  	header_      http.Header
  4440  }
  4441  
  4442  // Get: Gets the details of a specific snapshot.
  4443  //
  4444  //   - name: The snapshot resource name, in the format
  4445  //     `projects/{project_id}/locations/{location}/instances/{instance_id}/snapsho
  4446  //     ts/{snapshot_id}`.
  4447  func (r *ProjectsLocationsInstancesSnapshotsService) Get(name string) *ProjectsLocationsInstancesSnapshotsGetCall {
  4448  	c := &ProjectsLocationsInstancesSnapshotsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4449  	c.name = name
  4450  	return c
  4451  }
  4452  
  4453  // Fields allows partial responses to be retrieved. See
  4454  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4455  // details.
  4456  func (c *ProjectsLocationsInstancesSnapshotsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesSnapshotsGetCall {
  4457  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4458  	return c
  4459  }
  4460  
  4461  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4462  // object's ETag matches the given value. This is useful for getting updates
  4463  // only after the object has changed since the last request.
  4464  func (c *ProjectsLocationsInstancesSnapshotsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesSnapshotsGetCall {
  4465  	c.ifNoneMatch_ = entityTag
  4466  	return c
  4467  }
  4468  
  4469  // Context sets the context to be used in this call's Do method.
  4470  func (c *ProjectsLocationsInstancesSnapshotsGetCall) Context(ctx context.Context) *ProjectsLocationsInstancesSnapshotsGetCall {
  4471  	c.ctx_ = ctx
  4472  	return c
  4473  }
  4474  
  4475  // Header returns a http.Header that can be modified by the caller to add
  4476  // headers to the request.
  4477  func (c *ProjectsLocationsInstancesSnapshotsGetCall) Header() http.Header {
  4478  	if c.header_ == nil {
  4479  		c.header_ = make(http.Header)
  4480  	}
  4481  	return c.header_
  4482  }
  4483  
  4484  func (c *ProjectsLocationsInstancesSnapshotsGetCall) doRequest(alt string) (*http.Response, error) {
  4485  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4486  	if c.ifNoneMatch_ != "" {
  4487  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4488  	}
  4489  	var body io.Reader = nil
  4490  	c.urlParams_.Set("alt", alt)
  4491  	c.urlParams_.Set("prettyPrint", "false")
  4492  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  4493  	urls += "?" + c.urlParams_.Encode()
  4494  	req, err := http.NewRequest("GET", urls, body)
  4495  	if err != nil {
  4496  		return nil, err
  4497  	}
  4498  	req.Header = reqHeaders
  4499  	googleapi.Expand(req.URL, map[string]string{
  4500  		"name": c.name,
  4501  	})
  4502  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4503  }
  4504  
  4505  // Do executes the "file.projects.locations.instances.snapshots.get" call.
  4506  // Any non-2xx status code is an error. Response headers are in either
  4507  // *Snapshot.ServerResponse.Header or (if a response was returned at all) in
  4508  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4509  // whether the returned error was because http.StatusNotModified was returned.
  4510  func (c *ProjectsLocationsInstancesSnapshotsGetCall) Do(opts ...googleapi.CallOption) (*Snapshot, error) {
  4511  	gensupport.SetOptions(c.urlParams_, opts...)
  4512  	res, err := c.doRequest("json")
  4513  	if res != nil && res.StatusCode == http.StatusNotModified {
  4514  		if res.Body != nil {
  4515  			res.Body.Close()
  4516  		}
  4517  		return nil, gensupport.WrapError(&googleapi.Error{
  4518  			Code:   res.StatusCode,
  4519  			Header: res.Header,
  4520  		})
  4521  	}
  4522  	if err != nil {
  4523  		return nil, err
  4524  	}
  4525  	defer googleapi.CloseBody(res)
  4526  	if err := googleapi.CheckResponse(res); err != nil {
  4527  		return nil, gensupport.WrapError(err)
  4528  	}
  4529  	ret := &Snapshot{
  4530  		ServerResponse: googleapi.ServerResponse{
  4531  			Header:         res.Header,
  4532  			HTTPStatusCode: res.StatusCode,
  4533  		},
  4534  	}
  4535  	target := &ret
  4536  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4537  		return nil, err
  4538  	}
  4539  	return ret, nil
  4540  }
  4541  
  4542  type ProjectsLocationsInstancesSnapshotsListCall struct {
  4543  	s            *Service
  4544  	parent       string
  4545  	urlParams_   gensupport.URLParams
  4546  	ifNoneMatch_ string
  4547  	ctx_         context.Context
  4548  	header_      http.Header
  4549  }
  4550  
  4551  // List: Lists all snapshots in a project for either a specified location or
  4552  // for all locations.
  4553  //
  4554  //   - parent: The instance for which to retrieve snapshot information, in the
  4555  //     format
  4556  //     `projects/{project_id}/locations/{location}/instances/{instance_id}`.
  4557  func (r *ProjectsLocationsInstancesSnapshotsService) List(parent string) *ProjectsLocationsInstancesSnapshotsListCall {
  4558  	c := &ProjectsLocationsInstancesSnapshotsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4559  	c.parent = parent
  4560  	return c
  4561  }
  4562  
  4563  // Filter sets the optional parameter "filter": List filter.
  4564  func (c *ProjectsLocationsInstancesSnapshotsListCall) Filter(filter string) *ProjectsLocationsInstancesSnapshotsListCall {
  4565  	c.urlParams_.Set("filter", filter)
  4566  	return c
  4567  }
  4568  
  4569  // OrderBy sets the optional parameter "orderBy": Sort results. Supported
  4570  // values are "name", "name desc" or "" (unsorted).
  4571  func (c *ProjectsLocationsInstancesSnapshotsListCall) OrderBy(orderBy string) *ProjectsLocationsInstancesSnapshotsListCall {
  4572  	c.urlParams_.Set("orderBy", orderBy)
  4573  	return c
  4574  }
  4575  
  4576  // PageSize sets the optional parameter "pageSize": The maximum number of items
  4577  // to return.
  4578  func (c *ProjectsLocationsInstancesSnapshotsListCall) PageSize(pageSize int64) *ProjectsLocationsInstancesSnapshotsListCall {
  4579  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4580  	return c
  4581  }
  4582  
  4583  // PageToken sets the optional parameter "pageToken": The next_page_token value
  4584  // to use if there are additional results to retrieve for this list request.
  4585  func (c *ProjectsLocationsInstancesSnapshotsListCall) PageToken(pageToken string) *ProjectsLocationsInstancesSnapshotsListCall {
  4586  	c.urlParams_.Set("pageToken", pageToken)
  4587  	return c
  4588  }
  4589  
  4590  // Fields allows partial responses to be retrieved. See
  4591  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4592  // details.
  4593  func (c *ProjectsLocationsInstancesSnapshotsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesSnapshotsListCall {
  4594  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4595  	return c
  4596  }
  4597  
  4598  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4599  // object's ETag matches the given value. This is useful for getting updates
  4600  // only after the object has changed since the last request.
  4601  func (c *ProjectsLocationsInstancesSnapshotsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesSnapshotsListCall {
  4602  	c.ifNoneMatch_ = entityTag
  4603  	return c
  4604  }
  4605  
  4606  // Context sets the context to be used in this call's Do method.
  4607  func (c *ProjectsLocationsInstancesSnapshotsListCall) Context(ctx context.Context) *ProjectsLocationsInstancesSnapshotsListCall {
  4608  	c.ctx_ = ctx
  4609  	return c
  4610  }
  4611  
  4612  // Header returns a http.Header that can be modified by the caller to add
  4613  // headers to the request.
  4614  func (c *ProjectsLocationsInstancesSnapshotsListCall) Header() http.Header {
  4615  	if c.header_ == nil {
  4616  		c.header_ = make(http.Header)
  4617  	}
  4618  	return c.header_
  4619  }
  4620  
  4621  func (c *ProjectsLocationsInstancesSnapshotsListCall) doRequest(alt string) (*http.Response, error) {
  4622  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4623  	if c.ifNoneMatch_ != "" {
  4624  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4625  	}
  4626  	var body io.Reader = nil
  4627  	c.urlParams_.Set("alt", alt)
  4628  	c.urlParams_.Set("prettyPrint", "false")
  4629  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/snapshots")
  4630  	urls += "?" + c.urlParams_.Encode()
  4631  	req, err := http.NewRequest("GET", urls, body)
  4632  	if err != nil {
  4633  		return nil, err
  4634  	}
  4635  	req.Header = reqHeaders
  4636  	googleapi.Expand(req.URL, map[string]string{
  4637  		"parent": c.parent,
  4638  	})
  4639  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4640  }
  4641  
  4642  // Do executes the "file.projects.locations.instances.snapshots.list" call.
  4643  // Any non-2xx status code is an error. Response headers are in either
  4644  // *ListSnapshotsResponse.ServerResponse.Header or (if a response was returned
  4645  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4646  // check whether the returned error was because http.StatusNotModified was
  4647  // returned.
  4648  func (c *ProjectsLocationsInstancesSnapshotsListCall) Do(opts ...googleapi.CallOption) (*ListSnapshotsResponse, error) {
  4649  	gensupport.SetOptions(c.urlParams_, opts...)
  4650  	res, err := c.doRequest("json")
  4651  	if res != nil && res.StatusCode == http.StatusNotModified {
  4652  		if res.Body != nil {
  4653  			res.Body.Close()
  4654  		}
  4655  		return nil, gensupport.WrapError(&googleapi.Error{
  4656  			Code:   res.StatusCode,
  4657  			Header: res.Header,
  4658  		})
  4659  	}
  4660  	if err != nil {
  4661  		return nil, err
  4662  	}
  4663  	defer googleapi.CloseBody(res)
  4664  	if err := googleapi.CheckResponse(res); err != nil {
  4665  		return nil, gensupport.WrapError(err)
  4666  	}
  4667  	ret := &ListSnapshotsResponse{
  4668  		ServerResponse: googleapi.ServerResponse{
  4669  			Header:         res.Header,
  4670  			HTTPStatusCode: res.StatusCode,
  4671  		},
  4672  	}
  4673  	target := &ret
  4674  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4675  		return nil, err
  4676  	}
  4677  	return ret, nil
  4678  }
  4679  
  4680  // Pages invokes f for each page of results.
  4681  // A non-nil error returned from f will halt the iteration.
  4682  // The provided context supersedes any context provided to the Context method.
  4683  func (c *ProjectsLocationsInstancesSnapshotsListCall) Pages(ctx context.Context, f func(*ListSnapshotsResponse) error) error {
  4684  	c.ctx_ = ctx
  4685  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4686  	for {
  4687  		x, err := c.Do()
  4688  		if err != nil {
  4689  			return err
  4690  		}
  4691  		if err := f(x); err != nil {
  4692  			return err
  4693  		}
  4694  		if x.NextPageToken == "" {
  4695  			return nil
  4696  		}
  4697  		c.PageToken(x.NextPageToken)
  4698  	}
  4699  }
  4700  
  4701  type ProjectsLocationsInstancesSnapshotsPatchCall struct {
  4702  	s          *Service
  4703  	name       string
  4704  	snapshot   *Snapshot
  4705  	urlParams_ gensupport.URLParams
  4706  	ctx_       context.Context
  4707  	header_    http.Header
  4708  }
  4709  
  4710  // Patch: Updates the settings of a specific snapshot.
  4711  //
  4712  //   - name: Output only. The resource name of the snapshot, in the format
  4713  //     `projects/{project_id}/locations/{location_id}/instances/{instance_id}/snap
  4714  //     shots/{snapshot_id}`.
  4715  func (r *ProjectsLocationsInstancesSnapshotsService) Patch(name string, snapshot *Snapshot) *ProjectsLocationsInstancesSnapshotsPatchCall {
  4716  	c := &ProjectsLocationsInstancesSnapshotsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4717  	c.name = name
  4718  	c.snapshot = snapshot
  4719  	return c
  4720  }
  4721  
  4722  // UpdateMask sets the optional parameter "updateMask": Required. Mask of
  4723  // fields to update. At least one path must be supplied in this field.
  4724  func (c *ProjectsLocationsInstancesSnapshotsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsInstancesSnapshotsPatchCall {
  4725  	c.urlParams_.Set("updateMask", updateMask)
  4726  	return c
  4727  }
  4728  
  4729  // Fields allows partial responses to be retrieved. See
  4730  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4731  // details.
  4732  func (c *ProjectsLocationsInstancesSnapshotsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesSnapshotsPatchCall {
  4733  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4734  	return c
  4735  }
  4736  
  4737  // Context sets the context to be used in this call's Do method.
  4738  func (c *ProjectsLocationsInstancesSnapshotsPatchCall) Context(ctx context.Context) *ProjectsLocationsInstancesSnapshotsPatchCall {
  4739  	c.ctx_ = ctx
  4740  	return c
  4741  }
  4742  
  4743  // Header returns a http.Header that can be modified by the caller to add
  4744  // headers to the request.
  4745  func (c *ProjectsLocationsInstancesSnapshotsPatchCall) Header() http.Header {
  4746  	if c.header_ == nil {
  4747  		c.header_ = make(http.Header)
  4748  	}
  4749  	return c.header_
  4750  }
  4751  
  4752  func (c *ProjectsLocationsInstancesSnapshotsPatchCall) doRequest(alt string) (*http.Response, error) {
  4753  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4754  	var body io.Reader = nil
  4755  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.snapshot)
  4756  	if err != nil {
  4757  		return nil, err
  4758  	}
  4759  	c.urlParams_.Set("alt", alt)
  4760  	c.urlParams_.Set("prettyPrint", "false")
  4761  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  4762  	urls += "?" + c.urlParams_.Encode()
  4763  	req, err := http.NewRequest("PATCH", urls, body)
  4764  	if err != nil {
  4765  		return nil, err
  4766  	}
  4767  	req.Header = reqHeaders
  4768  	googleapi.Expand(req.URL, map[string]string{
  4769  		"name": c.name,
  4770  	})
  4771  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4772  }
  4773  
  4774  // Do executes the "file.projects.locations.instances.snapshots.patch" call.
  4775  // Any non-2xx status code is an error. Response headers are in either
  4776  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4777  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4778  // whether the returned error was because http.StatusNotModified was returned.
  4779  func (c *ProjectsLocationsInstancesSnapshotsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4780  	gensupport.SetOptions(c.urlParams_, opts...)
  4781  	res, err := c.doRequest("json")
  4782  	if res != nil && res.StatusCode == http.StatusNotModified {
  4783  		if res.Body != nil {
  4784  			res.Body.Close()
  4785  		}
  4786  		return nil, gensupport.WrapError(&googleapi.Error{
  4787  			Code:   res.StatusCode,
  4788  			Header: res.Header,
  4789  		})
  4790  	}
  4791  	if err != nil {
  4792  		return nil, err
  4793  	}
  4794  	defer googleapi.CloseBody(res)
  4795  	if err := googleapi.CheckResponse(res); err != nil {
  4796  		return nil, gensupport.WrapError(err)
  4797  	}
  4798  	ret := &Operation{
  4799  		ServerResponse: googleapi.ServerResponse{
  4800  			Header:         res.Header,
  4801  			HTTPStatusCode: res.StatusCode,
  4802  		},
  4803  	}
  4804  	target := &ret
  4805  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4806  		return nil, err
  4807  	}
  4808  	return ret, nil
  4809  }
  4810  
  4811  type ProjectsLocationsOperationsCancelCall struct {
  4812  	s                      *Service
  4813  	name                   string
  4814  	canceloperationrequest *CancelOperationRequest
  4815  	urlParams_             gensupport.URLParams
  4816  	ctx_                   context.Context
  4817  	header_                http.Header
  4818  }
  4819  
  4820  // Cancel: Starts asynchronous cancellation on a long-running operation. The
  4821  // server makes a best effort to cancel the operation, but success is not
  4822  // guaranteed. If the server doesn't support this method, it returns
  4823  // `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or
  4824  // other methods to check whether the cancellation succeeded or whether the
  4825  // operation completed despite cancellation. On successful cancellation, the
  4826  // operation is not deleted; instead, it becomes an operation with an
  4827  // Operation.error value with a google.rpc.Status.code of 1, corresponding to
  4828  // `Code.CANCELLED`.
  4829  //
  4830  // - name: The name of the operation resource to be cancelled.
  4831  func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall {
  4832  	c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4833  	c.name = name
  4834  	c.canceloperationrequest = canceloperationrequest
  4835  	return c
  4836  }
  4837  
  4838  // Fields allows partial responses to be retrieved. See
  4839  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4840  // details.
  4841  func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
  4842  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4843  	return c
  4844  }
  4845  
  4846  // Context sets the context to be used in this call's Do method.
  4847  func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
  4848  	c.ctx_ = ctx
  4849  	return c
  4850  }
  4851  
  4852  // Header returns a http.Header that can be modified by the caller to add
  4853  // headers to the request.
  4854  func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
  4855  	if c.header_ == nil {
  4856  		c.header_ = make(http.Header)
  4857  	}
  4858  	return c.header_
  4859  }
  4860  
  4861  func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
  4862  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4863  	var body io.Reader = nil
  4864  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
  4865  	if err != nil {
  4866  		return nil, err
  4867  	}
  4868  	c.urlParams_.Set("alt", alt)
  4869  	c.urlParams_.Set("prettyPrint", "false")
  4870  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:cancel")
  4871  	urls += "?" + c.urlParams_.Encode()
  4872  	req, err := http.NewRequest("POST", urls, body)
  4873  	if err != nil {
  4874  		return nil, err
  4875  	}
  4876  	req.Header = reqHeaders
  4877  	googleapi.Expand(req.URL, map[string]string{
  4878  		"name": c.name,
  4879  	})
  4880  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4881  }
  4882  
  4883  // Do executes the "file.projects.locations.operations.cancel" call.
  4884  // Any non-2xx status code is an error. Response headers are in either
  4885  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  4886  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4887  // whether the returned error was because http.StatusNotModified was returned.
  4888  func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  4889  	gensupport.SetOptions(c.urlParams_, opts...)
  4890  	res, err := c.doRequest("json")
  4891  	if res != nil && res.StatusCode == http.StatusNotModified {
  4892  		if res.Body != nil {
  4893  			res.Body.Close()
  4894  		}
  4895  		return nil, gensupport.WrapError(&googleapi.Error{
  4896  			Code:   res.StatusCode,
  4897  			Header: res.Header,
  4898  		})
  4899  	}
  4900  	if err != nil {
  4901  		return nil, err
  4902  	}
  4903  	defer googleapi.CloseBody(res)
  4904  	if err := googleapi.CheckResponse(res); err != nil {
  4905  		return nil, gensupport.WrapError(err)
  4906  	}
  4907  	ret := &Empty{
  4908  		ServerResponse: googleapi.ServerResponse{
  4909  			Header:         res.Header,
  4910  			HTTPStatusCode: res.StatusCode,
  4911  		},
  4912  	}
  4913  	target := &ret
  4914  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4915  		return nil, err
  4916  	}
  4917  	return ret, nil
  4918  }
  4919  
  4920  type ProjectsLocationsOperationsDeleteCall struct {
  4921  	s          *Service
  4922  	name       string
  4923  	urlParams_ gensupport.URLParams
  4924  	ctx_       context.Context
  4925  	header_    http.Header
  4926  }
  4927  
  4928  // Delete: Deletes a long-running operation. This method indicates that the
  4929  // client is no longer interested in the operation result. It does not cancel
  4930  // the operation. If the server doesn't support this method, it returns
  4931  // `google.rpc.Code.UNIMPLEMENTED`.
  4932  //
  4933  // - name: The name of the operation resource to be deleted.
  4934  func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall {
  4935  	c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4936  	c.name = name
  4937  	return c
  4938  }
  4939  
  4940  // Fields allows partial responses to be retrieved. See
  4941  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4942  // details.
  4943  func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall {
  4944  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4945  	return c
  4946  }
  4947  
  4948  // Context sets the context to be used in this call's Do method.
  4949  func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall {
  4950  	c.ctx_ = ctx
  4951  	return c
  4952  }
  4953  
  4954  // Header returns a http.Header that can be modified by the caller to add
  4955  // headers to the request.
  4956  func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header {
  4957  	if c.header_ == nil {
  4958  		c.header_ = make(http.Header)
  4959  	}
  4960  	return c.header_
  4961  }
  4962  
  4963  func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
  4964  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4965  	var body io.Reader = nil
  4966  	c.urlParams_.Set("alt", alt)
  4967  	c.urlParams_.Set("prettyPrint", "false")
  4968  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  4969  	urls += "?" + c.urlParams_.Encode()
  4970  	req, err := http.NewRequest("DELETE", urls, body)
  4971  	if err != nil {
  4972  		return nil, err
  4973  	}
  4974  	req.Header = reqHeaders
  4975  	googleapi.Expand(req.URL, map[string]string{
  4976  		"name": c.name,
  4977  	})
  4978  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4979  }
  4980  
  4981  // Do executes the "file.projects.locations.operations.delete" call.
  4982  // Any non-2xx status code is an error. Response headers are in either
  4983  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  4984  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4985  // whether the returned error was because http.StatusNotModified was returned.
  4986  func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  4987  	gensupport.SetOptions(c.urlParams_, opts...)
  4988  	res, err := c.doRequest("json")
  4989  	if res != nil && res.StatusCode == http.StatusNotModified {
  4990  		if res.Body != nil {
  4991  			res.Body.Close()
  4992  		}
  4993  		return nil, gensupport.WrapError(&googleapi.Error{
  4994  			Code:   res.StatusCode,
  4995  			Header: res.Header,
  4996  		})
  4997  	}
  4998  	if err != nil {
  4999  		return nil, err
  5000  	}
  5001  	defer googleapi.CloseBody(res)
  5002  	if err := googleapi.CheckResponse(res); err != nil {
  5003  		return nil, gensupport.WrapError(err)
  5004  	}
  5005  	ret := &Empty{
  5006  		ServerResponse: googleapi.ServerResponse{
  5007  			Header:         res.Header,
  5008  			HTTPStatusCode: res.StatusCode,
  5009  		},
  5010  	}
  5011  	target := &ret
  5012  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5013  		return nil, err
  5014  	}
  5015  	return ret, nil
  5016  }
  5017  
  5018  type ProjectsLocationsOperationsGetCall struct {
  5019  	s            *Service
  5020  	name         string
  5021  	urlParams_   gensupport.URLParams
  5022  	ifNoneMatch_ string
  5023  	ctx_         context.Context
  5024  	header_      http.Header
  5025  }
  5026  
  5027  // Get: Gets the latest state of a long-running operation. Clients can use this
  5028  // method to poll the operation result at intervals as recommended by the API
  5029  // service.
  5030  //
  5031  // - name: The name of the operation resource.
  5032  func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
  5033  	c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5034  	c.name = name
  5035  	return c
  5036  }
  5037  
  5038  // Fields allows partial responses to be retrieved. See
  5039  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5040  // details.
  5041  func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
  5042  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5043  	return c
  5044  }
  5045  
  5046  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5047  // object's ETag matches the given value. This is useful for getting updates
  5048  // only after the object has changed since the last request.
  5049  func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
  5050  	c.ifNoneMatch_ = entityTag
  5051  	return c
  5052  }
  5053  
  5054  // Context sets the context to be used in this call's Do method.
  5055  func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
  5056  	c.ctx_ = ctx
  5057  	return c
  5058  }
  5059  
  5060  // Header returns a http.Header that can be modified by the caller to add
  5061  // headers to the request.
  5062  func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
  5063  	if c.header_ == nil {
  5064  		c.header_ = make(http.Header)
  5065  	}
  5066  	return c.header_
  5067  }
  5068  
  5069  func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  5070  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5071  	if c.ifNoneMatch_ != "" {
  5072  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5073  	}
  5074  	var body io.Reader = nil
  5075  	c.urlParams_.Set("alt", alt)
  5076  	c.urlParams_.Set("prettyPrint", "false")
  5077  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  5078  	urls += "?" + c.urlParams_.Encode()
  5079  	req, err := http.NewRequest("GET", urls, body)
  5080  	if err != nil {
  5081  		return nil, err
  5082  	}
  5083  	req.Header = reqHeaders
  5084  	googleapi.Expand(req.URL, map[string]string{
  5085  		"name": c.name,
  5086  	})
  5087  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5088  }
  5089  
  5090  // Do executes the "file.projects.locations.operations.get" call.
  5091  // Any non-2xx status code is an error. Response headers are in either
  5092  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  5093  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5094  // whether the returned error was because http.StatusNotModified was returned.
  5095  func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5096  	gensupport.SetOptions(c.urlParams_, opts...)
  5097  	res, err := c.doRequest("json")
  5098  	if res != nil && res.StatusCode == http.StatusNotModified {
  5099  		if res.Body != nil {
  5100  			res.Body.Close()
  5101  		}
  5102  		return nil, gensupport.WrapError(&googleapi.Error{
  5103  			Code:   res.StatusCode,
  5104  			Header: res.Header,
  5105  		})
  5106  	}
  5107  	if err != nil {
  5108  		return nil, err
  5109  	}
  5110  	defer googleapi.CloseBody(res)
  5111  	if err := googleapi.CheckResponse(res); err != nil {
  5112  		return nil, gensupport.WrapError(err)
  5113  	}
  5114  	ret := &Operation{
  5115  		ServerResponse: googleapi.ServerResponse{
  5116  			Header:         res.Header,
  5117  			HTTPStatusCode: res.StatusCode,
  5118  		},
  5119  	}
  5120  	target := &ret
  5121  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5122  		return nil, err
  5123  	}
  5124  	return ret, nil
  5125  }
  5126  
  5127  type ProjectsLocationsOperationsListCall struct {
  5128  	s            *Service
  5129  	name         string
  5130  	urlParams_   gensupport.URLParams
  5131  	ifNoneMatch_ string
  5132  	ctx_         context.Context
  5133  	header_      http.Header
  5134  }
  5135  
  5136  // List: Lists operations that match the specified filter in the request. If
  5137  // the server doesn't support this method, it returns `UNIMPLEMENTED`.
  5138  //
  5139  // - name: The name of the operation's parent resource.
  5140  func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
  5141  	c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5142  	c.name = name
  5143  	return c
  5144  }
  5145  
  5146  // Filter sets the optional parameter "filter": The standard list filter.
  5147  func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
  5148  	c.urlParams_.Set("filter", filter)
  5149  	return c
  5150  }
  5151  
  5152  // PageSize sets the optional parameter "pageSize": The standard list page
  5153  // size.
  5154  func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
  5155  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5156  	return c
  5157  }
  5158  
  5159  // PageToken sets the optional parameter "pageToken": The standard list page
  5160  // token.
  5161  func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
  5162  	c.urlParams_.Set("pageToken", pageToken)
  5163  	return c
  5164  }
  5165  
  5166  // Fields allows partial responses to be retrieved. See
  5167  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5168  // details.
  5169  func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
  5170  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5171  	return c
  5172  }
  5173  
  5174  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5175  // object's ETag matches the given value. This is useful for getting updates
  5176  // only after the object has changed since the last request.
  5177  func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
  5178  	c.ifNoneMatch_ = entityTag
  5179  	return c
  5180  }
  5181  
  5182  // Context sets the context to be used in this call's Do method.
  5183  func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
  5184  	c.ctx_ = ctx
  5185  	return c
  5186  }
  5187  
  5188  // Header returns a http.Header that can be modified by the caller to add
  5189  // headers to the request.
  5190  func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
  5191  	if c.header_ == nil {
  5192  		c.header_ = make(http.Header)
  5193  	}
  5194  	return c.header_
  5195  }
  5196  
  5197  func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
  5198  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5199  	if c.ifNoneMatch_ != "" {
  5200  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5201  	}
  5202  	var body io.Reader = nil
  5203  	c.urlParams_.Set("alt", alt)
  5204  	c.urlParams_.Set("prettyPrint", "false")
  5205  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/operations")
  5206  	urls += "?" + c.urlParams_.Encode()
  5207  	req, err := http.NewRequest("GET", urls, body)
  5208  	if err != nil {
  5209  		return nil, err
  5210  	}
  5211  	req.Header = reqHeaders
  5212  	googleapi.Expand(req.URL, map[string]string{
  5213  		"name": c.name,
  5214  	})
  5215  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5216  }
  5217  
  5218  // Do executes the "file.projects.locations.operations.list" call.
  5219  // Any non-2xx status code is an error. Response headers are in either
  5220  // *ListOperationsResponse.ServerResponse.Header or (if a response was returned
  5221  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5222  // check whether the returned error was because http.StatusNotModified was
  5223  // returned.
  5224  func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
  5225  	gensupport.SetOptions(c.urlParams_, opts...)
  5226  	res, err := c.doRequest("json")
  5227  	if res != nil && res.StatusCode == http.StatusNotModified {
  5228  		if res.Body != nil {
  5229  			res.Body.Close()
  5230  		}
  5231  		return nil, gensupport.WrapError(&googleapi.Error{
  5232  			Code:   res.StatusCode,
  5233  			Header: res.Header,
  5234  		})
  5235  	}
  5236  	if err != nil {
  5237  		return nil, err
  5238  	}
  5239  	defer googleapi.CloseBody(res)
  5240  	if err := googleapi.CheckResponse(res); err != nil {
  5241  		return nil, gensupport.WrapError(err)
  5242  	}
  5243  	ret := &ListOperationsResponse{
  5244  		ServerResponse: googleapi.ServerResponse{
  5245  			Header:         res.Header,
  5246  			HTTPStatusCode: res.StatusCode,
  5247  		},
  5248  	}
  5249  	target := &ret
  5250  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5251  		return nil, err
  5252  	}
  5253  	return ret, nil
  5254  }
  5255  
  5256  // Pages invokes f for each page of results.
  5257  // A non-nil error returned from f will halt the iteration.
  5258  // The provided context supersedes any context provided to the Context method.
  5259  func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
  5260  	c.ctx_ = ctx
  5261  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  5262  	for {
  5263  		x, err := c.Do()
  5264  		if err != nil {
  5265  			return err
  5266  		}
  5267  		if err := f(x); err != nil {
  5268  			return err
  5269  		}
  5270  		if x.NextPageToken == "" {
  5271  			return nil
  5272  		}
  5273  		c.PageToken(x.NextPageToken)
  5274  	}
  5275  }
  5276  

View as plain text