...

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

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

     1  // Copyright 2024 Google LLC.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // Code generated file. DO NOT EDIT.
     6  
     7  // Package memcache provides access to the Cloud Memorystore for Memcached API.
     8  //
     9  // For product documentation, see: https://cloud.google.com/memorystore/
    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/memcache/v1"
    27  //	...
    28  //	ctx := context.Background()
    29  //	memcacheService, err := memcache.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  //	memcacheService, err := memcache.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  //	memcacheService, err := memcache.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    49  //
    50  // See [google.golang.org/api/option.ClientOption] for details on options.
    51  package memcache // import "google.golang.org/api/memcache/v1"
    52  
    53  import (
    54  	"bytes"
    55  	"context"
    56  	"encoding/json"
    57  	"errors"
    58  	"fmt"
    59  	"io"
    60  	"net/http"
    61  	"net/url"
    62  	"strconv"
    63  	"strings"
    64  
    65  	googleapi "google.golang.org/api/googleapi"
    66  	internal "google.golang.org/api/internal"
    67  	gensupport "google.golang.org/api/internal/gensupport"
    68  	option "google.golang.org/api/option"
    69  	internaloption "google.golang.org/api/option/internaloption"
    70  	htransport "google.golang.org/api/transport/http"
    71  )
    72  
    73  // Always reference these packages, just in case the auto-generated code
    74  // below doesn't.
    75  var _ = bytes.NewBuffer
    76  var _ = strconv.Itoa
    77  var _ = fmt.Sprintf
    78  var _ = json.NewDecoder
    79  var _ = io.Copy
    80  var _ = url.Parse
    81  var _ = gensupport.MarshalJSON
    82  var _ = googleapi.Version
    83  var _ = errors.New
    84  var _ = strings.Replace
    85  var _ = context.Canceled
    86  var _ = internaloption.WithDefaultEndpoint
    87  var _ = internal.Version
    88  
    89  const apiId = "memcache:v1"
    90  const apiName = "memcache"
    91  const apiVersion = "v1"
    92  const basePath = "https://memcache.googleapis.com/"
    93  const basePathTemplate = "https://memcache.UNIVERSE_DOMAIN/"
    94  const mtlsBasePath = "https://memcache.mtls.googleapis.com/"
    95  
    96  // OAuth2 scopes used by this API.
    97  const (
    98  	// See, edit, configure, and delete your Google Cloud data and see the email
    99  	// address for your Google Account.
   100  	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
   101  )
   102  
   103  // NewService creates a new Service.
   104  func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
   105  	scopesOption := internaloption.WithDefaultScopes(
   106  		"https://www.googleapis.com/auth/cloud-platform",
   107  	)
   108  	// NOTE: prepend, so we don't override user-specified scopes.
   109  	opts = append([]option.ClientOption{scopesOption}, opts...)
   110  	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
   111  	opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
   112  	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
   113  	opts = append(opts, internaloption.EnableNewAuthLibrary())
   114  	client, endpoint, err := htransport.NewClient(ctx, opts...)
   115  	if err != nil {
   116  		return nil, err
   117  	}
   118  	s, err := New(client)
   119  	if err != nil {
   120  		return nil, err
   121  	}
   122  	if endpoint != "" {
   123  		s.BasePath = endpoint
   124  	}
   125  	return s, nil
   126  }
   127  
   128  // New creates a new Service. It uses the provided http.Client for requests.
   129  //
   130  // Deprecated: please use NewService instead.
   131  // To provide a custom HTTP client, use option.WithHTTPClient.
   132  // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
   133  func New(client *http.Client) (*Service, error) {
   134  	if client == nil {
   135  		return nil, errors.New("client is nil")
   136  	}
   137  	s := &Service{client: client, BasePath: basePath}
   138  	s.Projects = NewProjectsService(s)
   139  	return s, nil
   140  }
   141  
   142  type Service struct {
   143  	client    *http.Client
   144  	BasePath  string // API endpoint base URL
   145  	UserAgent string // optional additional User-Agent fragment
   146  
   147  	Projects *ProjectsService
   148  }
   149  
   150  func (s *Service) userAgent() string {
   151  	if s.UserAgent == "" {
   152  		return googleapi.UserAgent
   153  	}
   154  	return googleapi.UserAgent + " " + s.UserAgent
   155  }
   156  
   157  func NewProjectsService(s *Service) *ProjectsService {
   158  	rs := &ProjectsService{s: s}
   159  	rs.Locations = NewProjectsLocationsService(s)
   160  	return rs
   161  }
   162  
   163  type ProjectsService struct {
   164  	s *Service
   165  
   166  	Locations *ProjectsLocationsService
   167  }
   168  
   169  func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
   170  	rs := &ProjectsLocationsService{s: s}
   171  	rs.Instances = NewProjectsLocationsInstancesService(s)
   172  	rs.Operations = NewProjectsLocationsOperationsService(s)
   173  	return rs
   174  }
   175  
   176  type ProjectsLocationsService struct {
   177  	s *Service
   178  
   179  	Instances *ProjectsLocationsInstancesService
   180  
   181  	Operations *ProjectsLocationsOperationsService
   182  }
   183  
   184  func NewProjectsLocationsInstancesService(s *Service) *ProjectsLocationsInstancesService {
   185  	rs := &ProjectsLocationsInstancesService{s: s}
   186  	return rs
   187  }
   188  
   189  type ProjectsLocationsInstancesService struct {
   190  	s *Service
   191  }
   192  
   193  func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
   194  	rs := &ProjectsLocationsOperationsService{s: s}
   195  	return rs
   196  }
   197  
   198  type ProjectsLocationsOperationsService struct {
   199  	s *Service
   200  }
   201  
   202  // ApplyParametersRequest: Request for ApplyParameters.
   203  type ApplyParametersRequest struct {
   204  	// ApplyAll: Whether to apply instance-level parameter group to all nodes. If
   205  	// set to true, users are restricted from specifying individual nodes, and
   206  	// `ApplyParameters` updates all nodes within the instance.
   207  	ApplyAll bool `json:"applyAll,omitempty"`
   208  	// NodeIds: Nodes to which the instance-level parameter group is applied.
   209  	NodeIds []string `json:"nodeIds,omitempty"`
   210  	// ForceSendFields is a list of field names (e.g. "ApplyAll") to
   211  	// unconditionally include in API requests. By default, fields with empty or
   212  	// default values are omitted from API requests. See
   213  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   214  	// details.
   215  	ForceSendFields []string `json:"-"`
   216  	// NullFields is a list of field names (e.g. "ApplyAll") to include in API
   217  	// requests with the JSON null value. By default, fields with empty values are
   218  	// omitted from API requests. See
   219  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   220  	NullFields []string `json:"-"`
   221  }
   222  
   223  func (s *ApplyParametersRequest) MarshalJSON() ([]byte, error) {
   224  	type NoMethod ApplyParametersRequest
   225  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   226  }
   227  
   228  // CancelOperationRequest: The request message for Operations.CancelOperation.
   229  type CancelOperationRequest struct {
   230  }
   231  
   232  // DailyCycle: Time window specified for daily operations.
   233  type DailyCycle struct {
   234  	// Duration: Output only. Duration of the time window, set by service producer.
   235  	Duration string `json:"duration,omitempty"`
   236  	// StartTime: Time within the day to start the operations.
   237  	StartTime *TimeOfDay `json:"startTime,omitempty"`
   238  	// ForceSendFields is a list of field names (e.g. "Duration") to
   239  	// unconditionally include in API requests. By default, fields with empty or
   240  	// default values are omitted from API requests. See
   241  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   242  	// details.
   243  	ForceSendFields []string `json:"-"`
   244  	// NullFields is a list of field names (e.g. "Duration") to include in API
   245  	// requests with the JSON null value. By default, fields with empty values are
   246  	// omitted from API requests. See
   247  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   248  	NullFields []string `json:"-"`
   249  }
   250  
   251  func (s *DailyCycle) MarshalJSON() ([]byte, error) {
   252  	type NoMethod DailyCycle
   253  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   254  }
   255  
   256  // Date: Represents a whole or partial calendar date, such as a birthday. The
   257  // time of day and time zone are either specified elsewhere or are
   258  // insignificant. The date is relative to the Gregorian Calendar. This can
   259  // represent one of the following: * A full date, with non-zero year, month,
   260  // and day values. * A month and day, with a zero year (for example, an
   261  // anniversary). * A year on its own, with a zero month and a zero day. * A
   262  // year and month, with a zero day (for example, a credit card expiration
   263  // date). Related types: * google.type.TimeOfDay * google.type.DateTime *
   264  // google.protobuf.Timestamp
   265  type Date struct {
   266  	// Day: Day of a month. Must be from 1 to 31 and valid for the year and month,
   267  	// or 0 to specify a year by itself or a year and month where the day isn't
   268  	// significant.
   269  	Day int64 `json:"day,omitempty"`
   270  	// Month: Month of a year. Must be from 1 to 12, or 0 to specify a year without
   271  	// a month and day.
   272  	Month int64 `json:"month,omitempty"`
   273  	// Year: Year of the date. Must be from 1 to 9999, or 0 to specify a date
   274  	// without a year.
   275  	Year int64 `json:"year,omitempty"`
   276  	// ForceSendFields is a list of field names (e.g. "Day") to unconditionally
   277  	// include in API requests. By default, fields with empty or default values are
   278  	// omitted from API requests. See
   279  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   280  	// details.
   281  	ForceSendFields []string `json:"-"`
   282  	// NullFields is a list of field names (e.g. "Day") to include in API requests
   283  	// with the JSON null value. By default, fields with empty values are omitted
   284  	// from API requests. See
   285  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   286  	NullFields []string `json:"-"`
   287  }
   288  
   289  func (s *Date) MarshalJSON() ([]byte, error) {
   290  	type NoMethod Date
   291  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   292  }
   293  
   294  // DenyMaintenancePeriod: DenyMaintenancePeriod definition. Maintenance is
   295  // forbidden within the deny period. The start_date must be less than the
   296  // end_date.
   297  type DenyMaintenancePeriod struct {
   298  	// EndDate: Deny period end date. This can be: * A full date, with non-zero
   299  	// year, month and day values. * A month and day value, with a zero year.
   300  	// Allows recurring deny periods each year. Date matching this period will have
   301  	// to be before the end.
   302  	EndDate *Date `json:"endDate,omitempty"`
   303  	// StartDate: Deny period start date. This can be: * A full date, with non-zero
   304  	// year, month and day values. * A month and day value, with a zero year.
   305  	// Allows recurring deny periods each year. Date matching this period will have
   306  	// to be the same or after the start.
   307  	StartDate *Date `json:"startDate,omitempty"`
   308  	// Time: Time in UTC when the Blackout period starts on start_date and ends on
   309  	// end_date. This can be: * Full time. * All zeros for 00:00:00 UTC
   310  	Time *TimeOfDay `json:"time,omitempty"`
   311  	// ForceSendFields is a list of field names (e.g. "EndDate") to unconditionally
   312  	// include in API requests. By default, fields with empty or default values are
   313  	// omitted from API requests. See
   314  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   315  	// details.
   316  	ForceSendFields []string `json:"-"`
   317  	// NullFields is a list of field names (e.g. "EndDate") to include in API
   318  	// requests with the JSON null value. By default, fields with empty values are
   319  	// omitted from API requests. See
   320  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   321  	NullFields []string `json:"-"`
   322  }
   323  
   324  func (s *DenyMaintenancePeriod) MarshalJSON() ([]byte, error) {
   325  	type NoMethod DenyMaintenancePeriod
   326  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   327  }
   328  
   329  // Empty: A generic empty message that you can re-use to avoid defining
   330  // duplicated empty messages in your APIs. A typical example is to use it as
   331  // the request or the response type of an API method. For instance: service Foo
   332  // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
   333  type Empty struct {
   334  	// ServerResponse contains the HTTP response code and headers from the server.
   335  	googleapi.ServerResponse `json:"-"`
   336  }
   337  
   338  // GoogleCloudMemcacheV1LocationMetadata: Metadata for the given
   339  // google.cloud.location.Location.
   340  type GoogleCloudMemcacheV1LocationMetadata struct {
   341  	// AvailableZones: Output only. The set of available zones in the location. The
   342  	// map is keyed by the lowercase ID of each zone, as defined by GCE. These keys
   343  	// can be specified in the `zones` field when creating a Memcached instance.
   344  	AvailableZones map[string]GoogleCloudMemcacheV1ZoneMetadata `json:"availableZones,omitempty"`
   345  	// ForceSendFields is a list of field names (e.g. "AvailableZones") to
   346  	// unconditionally include in API requests. By default, fields with empty or
   347  	// default values are omitted from API requests. See
   348  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   349  	// details.
   350  	ForceSendFields []string `json:"-"`
   351  	// NullFields is a list of field names (e.g. "AvailableZones") to include in
   352  	// API requests with the JSON null value. By default, fields with empty values
   353  	// are omitted from API requests. See
   354  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   355  	NullFields []string `json:"-"`
   356  }
   357  
   358  func (s *GoogleCloudMemcacheV1LocationMetadata) MarshalJSON() ([]byte, error) {
   359  	type NoMethod GoogleCloudMemcacheV1LocationMetadata
   360  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   361  }
   362  
   363  // GoogleCloudMemcacheV1MaintenancePolicy: Maintenance policy per instance.
   364  type GoogleCloudMemcacheV1MaintenancePolicy struct {
   365  	// CreateTime: Output only. The time when the policy was created.
   366  	CreateTime string `json:"createTime,omitempty"`
   367  	// Description: Description of what this policy is for. Create/Update methods
   368  	// return INVALID_ARGUMENT if the length is greater than 512.
   369  	Description string `json:"description,omitempty"`
   370  	// UpdateTime: Output only. The time when the policy was updated.
   371  	UpdateTime string `json:"updateTime,omitempty"`
   372  	// WeeklyMaintenanceWindow: Required. Maintenance window that is applied to
   373  	// resources covered by this policy. Minimum 1. For the current version, the
   374  	// maximum number of weekly_maintenance_windows is expected to be one.
   375  	WeeklyMaintenanceWindow []*WeeklyMaintenanceWindow `json:"weeklyMaintenanceWindow,omitempty"`
   376  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
   377  	// unconditionally include in API requests. By default, fields with empty or
   378  	// default values are omitted from API requests. See
   379  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   380  	// details.
   381  	ForceSendFields []string `json:"-"`
   382  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
   383  	// requests with the JSON null value. By default, fields with empty values are
   384  	// omitted from API requests. See
   385  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   386  	NullFields []string `json:"-"`
   387  }
   388  
   389  func (s *GoogleCloudMemcacheV1MaintenancePolicy) MarshalJSON() ([]byte, error) {
   390  	type NoMethod GoogleCloudMemcacheV1MaintenancePolicy
   391  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   392  }
   393  
   394  // GoogleCloudMemcacheV1OperationMetadata: Represents the metadata of a
   395  // long-running operation.
   396  type GoogleCloudMemcacheV1OperationMetadata struct {
   397  	// ApiVersion: Output only. API version used to start the operation.
   398  	ApiVersion string `json:"apiVersion,omitempty"`
   399  	// CancelRequested: Output only. Identifies whether the user has requested
   400  	// cancellation of the operation. Operations that have successfully been
   401  	// cancelled have Operation.error value with a google.rpc.Status.code of 1,
   402  	// corresponding to `Code.CANCELLED`.
   403  	CancelRequested bool `json:"cancelRequested,omitempty"`
   404  	// CreateTime: Output only. Time when the operation was created.
   405  	CreateTime string `json:"createTime,omitempty"`
   406  	// EndTime: Output only. Time when the operation finished running.
   407  	EndTime string `json:"endTime,omitempty"`
   408  	// StatusDetail: Output only. Human-readable status of the operation, if any.
   409  	StatusDetail string `json:"statusDetail,omitempty"`
   410  	// Target: Output only. Server-defined resource path for the target of the
   411  	// operation.
   412  	Target string `json:"target,omitempty"`
   413  	// Verb: Output only. Name of the verb executed by the operation.
   414  	Verb string `json:"verb,omitempty"`
   415  	// ForceSendFields is a list of field names (e.g. "ApiVersion") to
   416  	// unconditionally include in API requests. By default, fields with empty or
   417  	// default values are omitted from API requests. See
   418  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   419  	// details.
   420  	ForceSendFields []string `json:"-"`
   421  	// NullFields is a list of field names (e.g. "ApiVersion") to include in API
   422  	// requests with the JSON null value. By default, fields with empty values are
   423  	// omitted from API requests. See
   424  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   425  	NullFields []string `json:"-"`
   426  }
   427  
   428  func (s *GoogleCloudMemcacheV1OperationMetadata) MarshalJSON() ([]byte, error) {
   429  	type NoMethod GoogleCloudMemcacheV1OperationMetadata
   430  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   431  }
   432  
   433  // GoogleCloudMemcacheV1UpgradeInstanceRequest: Request for UpgradeInstance.
   434  type GoogleCloudMemcacheV1UpgradeInstanceRequest struct {
   435  	// MemcacheVersion: Required. Specifies the target version of memcached engine
   436  	// to upgrade to.
   437  	//
   438  	// Possible values:
   439  	//   "MEMCACHE_VERSION_UNSPECIFIED" - Memcache version is not specified by
   440  	// customer
   441  	//   "MEMCACHE_1_5" - Memcached 1.5 version.
   442  	//   "MEMCACHE_1_6_15" - Memcached 1.6.15 version.
   443  	MemcacheVersion string `json:"memcacheVersion,omitempty"`
   444  	// ForceSendFields is a list of field names (e.g. "MemcacheVersion") to
   445  	// unconditionally include in API requests. By default, fields with empty or
   446  	// default values are omitted from API requests. See
   447  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   448  	// details.
   449  	ForceSendFields []string `json:"-"`
   450  	// NullFields is a list of field names (e.g. "MemcacheVersion") to include in
   451  	// API requests with the JSON null value. By default, fields with empty values
   452  	// are omitted from API requests. See
   453  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   454  	NullFields []string `json:"-"`
   455  }
   456  
   457  func (s *GoogleCloudMemcacheV1UpgradeInstanceRequest) MarshalJSON() ([]byte, error) {
   458  	type NoMethod GoogleCloudMemcacheV1UpgradeInstanceRequest
   459  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   460  }
   461  
   462  type GoogleCloudMemcacheV1ZoneMetadata struct {
   463  }
   464  
   465  // GoogleCloudSaasacceleratorManagementProvidersV1Instance: Instance represents
   466  // the interface for SLM services to actuate the state of control plane
   467  // resources. Example Instance in JSON, where consumer-project-number=123456,
   468  // producer-project-id=cloud-sql: ```json Instance: { "name":
   469  // "projects/123456/locations/us-east1/instances/prod-instance", "create_time":
   470  // { "seconds": 1526406431, }, "labels": { "env": "prod", "foo": "bar" },
   471  // "state": READY, "software_versions": { "software_update":
   472  // "cloud-sql-09-28-2018", }, "maintenance_policy_names": { "UpdatePolicy":
   473  // "projects/123456/locations/us-east1/maintenancePolicies/prod-update-policy",
   474  // } "tenant_project_id": "cloud-sql-test-tenant", "producer_metadata": {
   475  // "cloud-sql-tier": "basic", "cloud-sql-instance-size": "1G", },
   476  // "provisioned_resources": [ { "resource-type": "compute-instance",
   477  // "resource-url":
   478  // "https://www.googleapis.com/compute/v1/projects/cloud-sql/zones/us-east1-b/in
   479  // stances/vm-1", } ], "maintenance_schedules": { "csa_rollout": {
   480  // "start_time": { "seconds": 1526406431, }, "end_time": { "seconds":
   481  // 1535406431, }, }, "ncsa_rollout": { "start_time": { "seconds": 1526406431,
   482  // }, "end_time": { "seconds": 1535406431, }, } }, "consumer_defined_name":
   483  // "my-sql-instance1", } ``` LINT.IfChange
   484  type GoogleCloudSaasacceleratorManagementProvidersV1Instance struct {
   485  	// ConsumerDefinedName: consumer_defined_name is the name of the instance set
   486  	// by the service consumers. Generally this is different from the `name` field
   487  	// which reperesents the system-assigned id of the instance which the service
   488  	// consumers do not recognize. This is a required field for tenants onboarding
   489  	// to Maintenance Window notifications
   490  	// (go/slm-rollout-maintenance-policies#prerequisites).
   491  	ConsumerDefinedName string `json:"consumerDefinedName,omitempty"`
   492  	// CreateTime: Output only. Timestamp when the resource was created.
   493  	CreateTime string `json:"createTime,omitempty"`
   494  	// InstanceType: Optional. The instance_type of this instance of format:
   495  	// projects/{project_number}/locations/{location_id}/instanceTypes/{instance_typ
   496  	// e_id}. Instance Type represents a high-level tier or SKU of the service that
   497  	// this instance belong to. When enabled(eg: Maintenance Rollout), Rollout uses
   498  	// 'instance_type' along with 'software_versions' to determine whether instance
   499  	// needs an update or not.
   500  	InstanceType string `json:"instanceType,omitempty"`
   501  	// Labels: Optional. Resource labels to represent user provided metadata. Each
   502  	// label is a key-value pair, where both the key and the value are arbitrary
   503  	// strings provided by the user.
   504  	Labels map[string]string `json:"labels,omitempty"`
   505  	// MaintenancePolicyNames: Optional. The MaintenancePolicies that have been
   506  	// attached to the instance. The key must be of the type name of the oneof
   507  	// policy name defined in MaintenancePolicy, and the referenced policy must
   508  	// define the same policy type. For details, please refer to go/mr-user-guide.
   509  	// Should not be set if maintenance_settings.maintenance_policies is set.
   510  	MaintenancePolicyNames map[string]string `json:"maintenancePolicyNames,omitempty"`
   511  	// MaintenanceSchedules: The MaintenanceSchedule contains the scheduling
   512  	// information of published maintenance schedule with same key as
   513  	// software_versions.
   514  	MaintenanceSchedules map[string]GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSchedule `json:"maintenanceSchedules,omitempty"`
   515  	// MaintenanceSettings: Optional. The MaintenanceSettings associated with
   516  	// instance.
   517  	MaintenanceSettings *GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSettings `json:"maintenanceSettings,omitempty"`
   518  	// Name: Unique name of the resource. It uses the form:
   519  	// `projects/{project_number}/locations/{location_id}/instances/{instance_id}`
   520  	// Note: This name is passed, stored and logged across the rollout system. So
   521  	// use of consumer project_id or any other consumer PII in the name is strongly
   522  	// discouraged for wipeout (go/wipeout) compliance. See
   523  	// go/elysium/project_ids#storage-guidance for more details.
   524  	Name string `json:"name,omitempty"`
   525  	// NotificationParameters: Optional. notification_parameter are information
   526  	// that service producers may like to include that is not relevant to Rollout.
   527  	// This parameter will only be passed to Gamma and Cloud Logging for
   528  	// notification/logging purpose.
   529  	NotificationParameters map[string]GoogleCloudSaasacceleratorManagementProvidersV1NotificationParameter `json:"notificationParameters,omitempty"`
   530  	// ProducerMetadata: Output only. Custom string attributes used primarily to
   531  	// expose producer-specific information in monitoring dashboards. See
   532  	// go/get-instance-metadata.
   533  	ProducerMetadata map[string]string `json:"producerMetadata,omitempty"`
   534  	// ProvisionedResources: Output only. The list of data plane resources
   535  	// provisioned for this instance, e.g. compute VMs. See
   536  	// go/get-instance-metadata.
   537  	ProvisionedResources []*GoogleCloudSaasacceleratorManagementProvidersV1ProvisionedResource `json:"provisionedResources,omitempty"`
   538  	// SlmInstanceTemplate: Link to the SLM instance template. Only populated when
   539  	// updating SLM instances via SSA's Actuation service adaptor. Service
   540  	// producers with custom control plane (e.g. Cloud SQL) doesn't need to
   541  	// populate this field. Instead they should use software_versions.
   542  	SlmInstanceTemplate string `json:"slmInstanceTemplate,omitempty"`
   543  	// SloMetadata: Output only. SLO metadata for instance classification in the
   544  	// Standardized dataplane SLO platform. See go/cloud-ssa-standard-slo for
   545  	// feature description.
   546  	SloMetadata *GoogleCloudSaasacceleratorManagementProvidersV1SloMetadata `json:"sloMetadata,omitempty"`
   547  	// SoftwareVersions: Software versions that are used to deploy this instance.
   548  	// This can be mutated by rollout services.
   549  	SoftwareVersions map[string]string `json:"softwareVersions,omitempty"`
   550  	// State: Output only. Current lifecycle state of the resource (e.g. if it's
   551  	// being created or ready to use).
   552  	//
   553  	// Possible values:
   554  	//   "STATE_UNSPECIFIED" - Unspecified state.
   555  	//   "CREATING" - Instance is being created.
   556  	//   "READY" - Instance has been created and is ready to use.
   557  	//   "UPDATING" - Instance is being updated.
   558  	//   "REPAIRING" - Instance is unheathy and under repair.
   559  	//   "DELETING" - Instance is being deleted.
   560  	//   "ERROR" - Instance encountered an error and is in indeterministic state.
   561  	State string `json:"state,omitempty"`
   562  	// TenantProjectId: Output only. ID of the associated GCP tenant project. See
   563  	// go/get-instance-metadata.
   564  	TenantProjectId string `json:"tenantProjectId,omitempty"`
   565  	// UpdateTime: Output only. Timestamp when the resource was last modified.
   566  	UpdateTime string `json:"updateTime,omitempty"`
   567  	// ForceSendFields is a list of field names (e.g. "ConsumerDefinedName") to
   568  	// unconditionally include in API requests. By default, fields with empty or
   569  	// default values are omitted from API requests. See
   570  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   571  	// details.
   572  	ForceSendFields []string `json:"-"`
   573  	// NullFields is a list of field names (e.g. "ConsumerDefinedName") to include
   574  	// in API requests with the JSON null value. By default, fields with empty
   575  	// values are omitted from API requests. See
   576  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   577  	NullFields []string `json:"-"`
   578  }
   579  
   580  func (s *GoogleCloudSaasacceleratorManagementProvidersV1Instance) MarshalJSON() ([]byte, error) {
   581  	type NoMethod GoogleCloudSaasacceleratorManagementProvidersV1Instance
   582  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   583  }
   584  
   585  // GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSchedule:
   586  // Maintenance schedule which is exposed to customer and potentially end user,
   587  // indicating published upcoming future maintenance schedule
   588  type GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSchedule struct {
   589  	// CanReschedule: This field is deprecated, and will be always set to true
   590  	// since reschedule can happen multiple times now. This field should not be
   591  	// removed until all service producers remove this for their customers.
   592  	CanReschedule bool `json:"canReschedule,omitempty"`
   593  	// EndTime: The scheduled end time for the maintenance.
   594  	EndTime string `json:"endTime,omitempty"`
   595  	// RolloutManagementPolicy: The rollout management policy this maintenance
   596  	// schedule is associated with. When doing reschedule update request, the
   597  	// reschedule should be against this given policy.
   598  	RolloutManagementPolicy string `json:"rolloutManagementPolicy,omitempty"`
   599  	// ScheduleDeadlineTime: schedule_deadline_time is the time deadline any
   600  	// schedule start time cannot go beyond, including reschedule. It's normally
   601  	// the initial schedule start time plus maintenance window length (1 day or 1
   602  	// week). Maintenance cannot be scheduled to start beyond this deadline.
   603  	ScheduleDeadlineTime string `json:"scheduleDeadlineTime,omitempty"`
   604  	// StartTime: The scheduled start time for the maintenance.
   605  	StartTime string `json:"startTime,omitempty"`
   606  	// ForceSendFields is a list of field names (e.g. "CanReschedule") to
   607  	// unconditionally include in API requests. By default, fields with empty or
   608  	// default values are omitted from API requests. See
   609  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   610  	// details.
   611  	ForceSendFields []string `json:"-"`
   612  	// NullFields is a list of field names (e.g. "CanReschedule") to include in API
   613  	// requests with the JSON null value. By default, fields with empty values are
   614  	// omitted from API requests. See
   615  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   616  	NullFields []string `json:"-"`
   617  }
   618  
   619  func (s *GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSchedule) MarshalJSON() ([]byte, error) {
   620  	type NoMethod GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSchedule
   621  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   622  }
   623  
   624  // GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSettings:
   625  // Maintenance settings associated with instance. Allows service producers and
   626  // end users to assign settings that controls maintenance on this instance.
   627  type GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSettings struct {
   628  	// Exclude: Optional. Exclude instance from maintenance. When true, rollout
   629  	// service will not attempt maintenance on the instance. Rollout service will
   630  	// include the instance in reported rollout progress as not attempted.
   631  	Exclude bool `json:"exclude,omitempty"`
   632  	// IsRollback: Optional. If the update call is triggered from rollback, set the
   633  	// value as true.
   634  	IsRollback bool `json:"isRollback,omitempty"`
   635  	// MaintenancePolicies: Optional. The MaintenancePolicies that have been
   636  	// attached to the instance. The key must be of the type name of the oneof
   637  	// policy name defined in MaintenancePolicy, and the embedded policy must
   638  	// define the same policy type. For details, please refer to go/mr-user-guide.
   639  	// Should not be set if maintenance_policy_names is set. If only the name is
   640  	// needed, then only populate MaintenancePolicy.name.
   641  	MaintenancePolicies map[string]MaintenancePolicy `json:"maintenancePolicies,omitempty"`
   642  	// ForceSendFields is a list of field names (e.g. "Exclude") to unconditionally
   643  	// include in API requests. By default, fields with empty or default values are
   644  	// omitted from API requests. See
   645  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   646  	// details.
   647  	ForceSendFields []string `json:"-"`
   648  	// NullFields is a list of field names (e.g. "Exclude") to include in API
   649  	// requests with the JSON null value. By default, fields with empty values are
   650  	// omitted from API requests. See
   651  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   652  	NullFields []string `json:"-"`
   653  }
   654  
   655  func (s *GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSettings) MarshalJSON() ([]byte, error) {
   656  	type NoMethod GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSettings
   657  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   658  }
   659  
   660  // GoogleCloudSaasacceleratorManagementProvidersV1NodeSloMetadata: Node
   661  // information for custom per-node SLO implementations. SSA does not support
   662  // per-node SLO, but producers can populate per-node information in SloMetadata
   663  // for custom precomputations. SSA Eligibility Exporter will emit per-node
   664  // metric based on this information.
   665  type GoogleCloudSaasacceleratorManagementProvidersV1NodeSloMetadata struct {
   666  	// Location: The location of the node, if different from instance location.
   667  	Location string `json:"location,omitempty"`
   668  	// NodeId: The id of the node. This should be equal to
   669  	// SaasInstanceNode.node_id.
   670  	NodeId string `json:"nodeId,omitempty"`
   671  	// PerSliEligibility: If present, this will override eligibility for the node
   672  	// coming from instance or exclusions for specified SLIs.
   673  	PerSliEligibility *GoogleCloudSaasacceleratorManagementProvidersV1PerSliSloEligibility `json:"perSliEligibility,omitempty"`
   674  	// ForceSendFields is a list of field names (e.g. "Location") to
   675  	// unconditionally include in API requests. By default, fields with empty or
   676  	// default values are omitted from API requests. See
   677  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   678  	// details.
   679  	ForceSendFields []string `json:"-"`
   680  	// NullFields is a list of field names (e.g. "Location") to include in API
   681  	// requests with the JSON null value. By default, fields with empty values are
   682  	// omitted from API requests. See
   683  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   684  	NullFields []string `json:"-"`
   685  }
   686  
   687  func (s *GoogleCloudSaasacceleratorManagementProvidersV1NodeSloMetadata) MarshalJSON() ([]byte, error) {
   688  	type NoMethod GoogleCloudSaasacceleratorManagementProvidersV1NodeSloMetadata
   689  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   690  }
   691  
   692  // GoogleCloudSaasacceleratorManagementProvidersV1NotificationParameter:
   693  // Contains notification related data.
   694  type GoogleCloudSaasacceleratorManagementProvidersV1NotificationParameter struct {
   695  	// Values: Optional. Array of string values. e.g. instance's replica
   696  	// information.
   697  	Values []string `json:"values,omitempty"`
   698  	// ForceSendFields is a list of field names (e.g. "Values") to unconditionally
   699  	// include in API requests. By default, fields with empty or default values are
   700  	// omitted from API requests. See
   701  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   702  	// details.
   703  	ForceSendFields []string `json:"-"`
   704  	// NullFields is a list of field names (e.g. "Values") to include in API
   705  	// requests with the JSON null value. By default, fields with empty values are
   706  	// omitted from API requests. See
   707  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   708  	NullFields []string `json:"-"`
   709  }
   710  
   711  func (s *GoogleCloudSaasacceleratorManagementProvidersV1NotificationParameter) MarshalJSON() ([]byte, error) {
   712  	type NoMethod GoogleCloudSaasacceleratorManagementProvidersV1NotificationParameter
   713  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   714  }
   715  
   716  // GoogleCloudSaasacceleratorManagementProvidersV1PerSliSloEligibility:
   717  // PerSliSloEligibility is a mapping from an SLI name to eligibility.
   718  type GoogleCloudSaasacceleratorManagementProvidersV1PerSliSloEligibility struct {
   719  	// Eligibilities: An entry in the eligibilities map specifies an eligibility
   720  	// for a particular SLI for the given instance. The SLI key in the name must be
   721  	// a valid SLI name specified in the Eligibility Exporter binary flags
   722  	// otherwise an error will be emitted by Eligibility Exporter and the oncaller
   723  	// will be alerted. If an SLI has been defined in the binary flags but the
   724  	// eligibilities map does not contain it, the corresponding SLI time series
   725  	// will not be emitted by the Eligibility Exporter. This ensures a smooth
   726  	// rollout and compatibility between the data produced by different versions of
   727  	// the Eligibility Exporters. If eligibilities map contains a key for an SLI
   728  	// which has not been declared in the binary flags, there will be an error
   729  	// message emitted in the Eligibility Exporter log and the metric for the SLI
   730  	// in question will not be emitted.
   731  	Eligibilities map[string]GoogleCloudSaasacceleratorManagementProvidersV1SloEligibility `json:"eligibilities,omitempty"`
   732  	// ForceSendFields is a list of field names (e.g. "Eligibilities") to
   733  	// unconditionally include in API requests. By default, fields with empty or
   734  	// default values are 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. "Eligibilities") 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 *GoogleCloudSaasacceleratorManagementProvidersV1PerSliSloEligibility) MarshalJSON() ([]byte, error) {
   746  	type NoMethod GoogleCloudSaasacceleratorManagementProvidersV1PerSliSloEligibility
   747  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   748  }
   749  
   750  // GoogleCloudSaasacceleratorManagementProvidersV1ProvisionedResource:
   751  // Describes provisioned dataplane resources.
   752  type GoogleCloudSaasacceleratorManagementProvidersV1ProvisionedResource struct {
   753  	// ResourceType: Type of the resource. This can be either a GCP resource or a
   754  	// custom one (e.g. another cloud provider's VM). For GCP compute resources use
   755  	// singular form of the names listed in GCP compute API documentation
   756  	// (https://cloud.google.com/compute/docs/reference/rest/v1/), prefixed with
   757  	// 'compute-', for example: 'compute-instance', 'compute-disk',
   758  	// 'compute-autoscaler'.
   759  	ResourceType string `json:"resourceType,omitempty"`
   760  	// ResourceUrl: URL identifying the resource, e.g.
   761  	// "https://www.googleapis.com/compute/v1/projects/...)".
   762  	ResourceUrl string `json:"resourceUrl,omitempty"`
   763  	// ForceSendFields is a list of field names (e.g. "ResourceType") to
   764  	// unconditionally include in API requests. By default, fields with empty or
   765  	// default values are omitted from API requests. See
   766  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   767  	// details.
   768  	ForceSendFields []string `json:"-"`
   769  	// NullFields is a list of field names (e.g. "ResourceType") to include in API
   770  	// requests with the JSON null value. By default, fields with empty values are
   771  	// omitted from API requests. See
   772  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   773  	NullFields []string `json:"-"`
   774  }
   775  
   776  func (s *GoogleCloudSaasacceleratorManagementProvidersV1ProvisionedResource) MarshalJSON() ([]byte, error) {
   777  	type NoMethod GoogleCloudSaasacceleratorManagementProvidersV1ProvisionedResource
   778  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   779  }
   780  
   781  // GoogleCloudSaasacceleratorManagementProvidersV1SloEligibility:
   782  // SloEligibility is a tuple containing eligibility value: true if an instance
   783  // is eligible for SLO calculation or false if it should be excluded from all
   784  // SLO-related calculations along with a user-defined reason.
   785  type GoogleCloudSaasacceleratorManagementProvidersV1SloEligibility struct {
   786  	// Eligible: Whether an instance is eligible or ineligible.
   787  	Eligible bool `json:"eligible,omitempty"`
   788  	// Reason: User-defined reason for the current value of instance eligibility.
   789  	// Usually, this can be directly mapped to the internal state. An empty reason
   790  	// is allowed.
   791  	Reason string `json:"reason,omitempty"`
   792  	// ForceSendFields is a list of field names (e.g. "Eligible") to
   793  	// unconditionally include in API requests. By default, fields with empty or
   794  	// default values are omitted from API requests. See
   795  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   796  	// details.
   797  	ForceSendFields []string `json:"-"`
   798  	// NullFields is a list of field names (e.g. "Eligible") to include in API
   799  	// requests with the JSON null value. By default, fields with empty values are
   800  	// omitted from API requests. See
   801  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   802  	NullFields []string `json:"-"`
   803  }
   804  
   805  func (s *GoogleCloudSaasacceleratorManagementProvidersV1SloEligibility) MarshalJSON() ([]byte, error) {
   806  	type NoMethod GoogleCloudSaasacceleratorManagementProvidersV1SloEligibility
   807  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   808  }
   809  
   810  // GoogleCloudSaasacceleratorManagementProvidersV1SloMetadata: SloMetadata
   811  // contains resources required for proper SLO classification of the instance.
   812  type GoogleCloudSaasacceleratorManagementProvidersV1SloMetadata struct {
   813  	// Nodes: Optional. List of nodes. Some producers need to use per-node metadata
   814  	// to calculate SLO. This field allows such producers to publish per-node SLO
   815  	// meta data, which will be consumed by SSA Eligibility Exporter and published
   816  	// in the form of per node metric to Monarch.
   817  	Nodes []*GoogleCloudSaasacceleratorManagementProvidersV1NodeSloMetadata `json:"nodes,omitempty"`
   818  	// PerSliEligibility: Optional. Multiple per-instance SLI eligibilities which
   819  	// apply for individual SLIs.
   820  	PerSliEligibility *GoogleCloudSaasacceleratorManagementProvidersV1PerSliSloEligibility `json:"perSliEligibility,omitempty"`
   821  	// Tier: Name of the SLO tier the Instance belongs to. This name will be
   822  	// expected to match the tiers specified in the service SLO configuration.
   823  	// Field is mandatory and must not be empty.
   824  	Tier string `json:"tier,omitempty"`
   825  	// ForceSendFields is a list of field names (e.g. "Nodes") to unconditionally
   826  	// include in API requests. By default, fields with empty or default values are
   827  	// omitted from API requests. See
   828  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   829  	// details.
   830  	ForceSendFields []string `json:"-"`
   831  	// NullFields is a list of field names (e.g. "Nodes") to include in API
   832  	// requests with the JSON null value. By default, fields with empty values are
   833  	// omitted from API requests. See
   834  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   835  	NullFields []string `json:"-"`
   836  }
   837  
   838  func (s *GoogleCloudSaasacceleratorManagementProvidersV1SloMetadata) MarshalJSON() ([]byte, error) {
   839  	type NoMethod GoogleCloudSaasacceleratorManagementProvidersV1SloMetadata
   840  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   841  }
   842  
   843  // Instance: A Memorystore for Memcached instance
   844  type Instance struct {
   845  	// AuthorizedNetwork: The full name of the Google Compute Engine network
   846  	// (/compute/docs/networks-and-firewalls#networks) to which the instance is
   847  	// connected. If left unspecified, the `default` network will be used.
   848  	AuthorizedNetwork string `json:"authorizedNetwork,omitempty"`
   849  	// CreateTime: Output only. The time the instance was created.
   850  	CreateTime string `json:"createTime,omitempty"`
   851  	// DiscoveryEndpoint: Output only. Endpoint for the Discovery API.
   852  	DiscoveryEndpoint string `json:"discoveryEndpoint,omitempty"`
   853  	// DisplayName: User provided name for the instance, which is only used for
   854  	// display purposes. Cannot be more than 80 characters.
   855  	DisplayName string `json:"displayName,omitempty"`
   856  	// InstanceMessages: List of messages that describe the current state of the
   857  	// Memcached instance.
   858  	InstanceMessages []*InstanceMessage `json:"instanceMessages,omitempty"`
   859  	// Labels: Resource labels to represent user-provided metadata. Refer to cloud
   860  	// documentation on labels for more details.
   861  	// https://cloud.google.com/compute/docs/labeling-resources
   862  	Labels map[string]string `json:"labels,omitempty"`
   863  	// MaintenancePolicy: The maintenance policy for the instance. If not provided,
   864  	// the maintenance event will be performed based on Memorystore internal
   865  	// rollout schedule.
   866  	MaintenancePolicy *GoogleCloudMemcacheV1MaintenancePolicy `json:"maintenancePolicy,omitempty"`
   867  	// MaintenanceSchedule: Output only. Published maintenance schedule.
   868  	MaintenanceSchedule *MaintenanceSchedule `json:"maintenanceSchedule,omitempty"`
   869  	// MemcacheFullVersion: Output only. The full version of memcached server
   870  	// running on this instance. System automatically determines the full memcached
   871  	// version for an instance based on the input MemcacheVersion. The full version
   872  	// format will be "memcached-1.5.16".
   873  	MemcacheFullVersion string `json:"memcacheFullVersion,omitempty"`
   874  	// MemcacheNodes: Output only. List of Memcached nodes. Refer to Node message
   875  	// for more details.
   876  	MemcacheNodes []*Node `json:"memcacheNodes,omitempty"`
   877  	// MemcacheVersion: The major version of Memcached software. If not provided,
   878  	// latest supported version will be used. Currently the latest supported major
   879  	// version is `MEMCACHE_1_5`. The minor version will be automatically
   880  	// determined by our system based on the latest supported minor version.
   881  	//
   882  	// Possible values:
   883  	//   "MEMCACHE_VERSION_UNSPECIFIED" - Memcache version is not specified by
   884  	// customer
   885  	//   "MEMCACHE_1_5" - Memcached 1.5 version.
   886  	//   "MEMCACHE_1_6_15" - Memcached 1.6.15 version.
   887  	MemcacheVersion string `json:"memcacheVersion,omitempty"`
   888  	// Name: Required. Unique name of the resource in this scope including project
   889  	// and location using the form:
   890  	// `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
   891  	// Note: Memcached instances are managed and addressed at the regional level so
   892  	// `location_id` here refers to a Google Cloud region; however, users may
   893  	// choose which zones Memcached nodes should be provisioned in within an
   894  	// instance. Refer to zones field for more details.
   895  	Name string `json:"name,omitempty"`
   896  	// NodeConfig: Required. Configuration for Memcached nodes.
   897  	NodeConfig *NodeConfig `json:"nodeConfig,omitempty"`
   898  	// NodeCount: Required. Number of nodes in the Memcached instance.
   899  	NodeCount int64 `json:"nodeCount,omitempty"`
   900  	// Parameters: User defined parameters to apply to the memcached process on
   901  	// each node.
   902  	Parameters *MemcacheParameters `json:"parameters,omitempty"`
   903  	// ReservedIpRangeId: Optional. Contains the id of allocated IP address ranges
   904  	// associated with the private service access connection for example,
   905  	// "test-default" associated with IP range 10.0.0.0/29.
   906  	ReservedIpRangeId []string `json:"reservedIpRangeId,omitempty"`
   907  	// State: Output only. The state of this Memcached instance.
   908  	//
   909  	// Possible values:
   910  	//   "STATE_UNSPECIFIED" - State not set.
   911  	//   "CREATING" - Memcached instance is being created.
   912  	//   "READY" - Memcached instance has been created and ready to be used.
   913  	//   "UPDATING" - Memcached instance is updating configuration such as
   914  	// maintenance policy and schedule.
   915  	//   "DELETING" - Memcached instance is being deleted.
   916  	//   "PERFORMING_MAINTENANCE" - Memcached instance is going through
   917  	// maintenance, e.g. data plane rollout.
   918  	//   "MEMCACHE_VERSION_UPGRADING" - Memcached instance is undergoing memcached
   919  	// engine version upgrade.
   920  	State string `json:"state,omitempty"`
   921  	// UpdateTime: Output only. The time the instance was updated.
   922  	UpdateTime string `json:"updateTime,omitempty"`
   923  	// Zones: Zones in which Memcached nodes should be provisioned. Memcached nodes
   924  	// will be equally distributed across these zones. If not provided, the service
   925  	// will by default create nodes in all zones in the region for the instance.
   926  	Zones []string `json:"zones,omitempty"`
   927  
   928  	// ServerResponse contains the HTTP response code and headers from the server.
   929  	googleapi.ServerResponse `json:"-"`
   930  	// ForceSendFields is a list of field names (e.g. "AuthorizedNetwork") to
   931  	// unconditionally include in API requests. By default, fields with empty or
   932  	// default values are omitted from API requests. See
   933  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   934  	// details.
   935  	ForceSendFields []string `json:"-"`
   936  	// NullFields is a list of field names (e.g. "AuthorizedNetwork") to include in
   937  	// API requests with the JSON null value. By default, fields with empty values
   938  	// are omitted from API requests. See
   939  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   940  	NullFields []string `json:"-"`
   941  }
   942  
   943  func (s *Instance) MarshalJSON() ([]byte, error) {
   944  	type NoMethod Instance
   945  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   946  }
   947  
   948  type InstanceMessage struct {
   949  	// Code: A code that correspond to one type of user-facing message.
   950  	//
   951  	// Possible values:
   952  	//   "CODE_UNSPECIFIED" - Message Code not set.
   953  	//   "ZONE_DISTRIBUTION_UNBALANCED" - Memcached nodes are distributed unevenly.
   954  	Code string `json:"code,omitempty"`
   955  	// Message: Message on memcached instance which will be exposed to users.
   956  	Message string `json:"message,omitempty"`
   957  	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
   958  	// include in API requests. By default, fields with empty or default values are
   959  	// omitted from API requests. See
   960  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   961  	// details.
   962  	ForceSendFields []string `json:"-"`
   963  	// NullFields is a list of field names (e.g. "Code") to include in API requests
   964  	// with the JSON null value. By default, fields with empty values are omitted
   965  	// from API requests. See
   966  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   967  	NullFields []string `json:"-"`
   968  }
   969  
   970  func (s *InstanceMessage) MarshalJSON() ([]byte, error) {
   971  	type NoMethod InstanceMessage
   972  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   973  }
   974  
   975  // ListInstancesResponse: Response for ListInstances.
   976  type ListInstancesResponse struct {
   977  	// Instances: A list of Memcached instances in the project in the specified
   978  	// location, or across all locations. If the `location_id` in the parent field
   979  	// of the request is "-", all regions available to the project are queried, and
   980  	// the results aggregated.
   981  	Instances []*Instance `json:"instances,omitempty"`
   982  	// NextPageToken: Token to retrieve the next page of results, or empty if there
   983  	// are no more results in the list.
   984  	NextPageToken string `json:"nextPageToken,omitempty"`
   985  	// Unreachable: Locations that could not be reached.
   986  	Unreachable []string `json:"unreachable,omitempty"`
   987  
   988  	// ServerResponse contains the HTTP response code and headers from the server.
   989  	googleapi.ServerResponse `json:"-"`
   990  	// ForceSendFields is a list of field names (e.g. "Instances") to
   991  	// unconditionally include in API requests. By default, fields with empty or
   992  	// default values are omitted from API requests. See
   993  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   994  	// details.
   995  	ForceSendFields []string `json:"-"`
   996  	// NullFields is a list of field names (e.g. "Instances") to include in API
   997  	// requests with the JSON null value. By default, fields with empty values are
   998  	// omitted from API requests. See
   999  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1000  	NullFields []string `json:"-"`
  1001  }
  1002  
  1003  func (s *ListInstancesResponse) MarshalJSON() ([]byte, error) {
  1004  	type NoMethod ListInstancesResponse
  1005  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1006  }
  1007  
  1008  // ListLocationsResponse: The response message for Locations.ListLocations.
  1009  type ListLocationsResponse struct {
  1010  	// Locations: A list of locations that matches the specified filter in the
  1011  	// request.
  1012  	Locations []*Location `json:"locations,omitempty"`
  1013  	// NextPageToken: The standard List next-page token.
  1014  	NextPageToken string `json:"nextPageToken,omitempty"`
  1015  
  1016  	// ServerResponse contains the HTTP response code and headers from the server.
  1017  	googleapi.ServerResponse `json:"-"`
  1018  	// ForceSendFields is a list of field names (e.g. "Locations") to
  1019  	// unconditionally include in API requests. By default, fields with empty or
  1020  	// default values are omitted from API requests. See
  1021  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1022  	// details.
  1023  	ForceSendFields []string `json:"-"`
  1024  	// NullFields is a list of field names (e.g. "Locations") to include in API
  1025  	// requests with the JSON null value. By default, fields with empty values are
  1026  	// omitted from API requests. See
  1027  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1028  	NullFields []string `json:"-"`
  1029  }
  1030  
  1031  func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
  1032  	type NoMethod ListLocationsResponse
  1033  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1034  }
  1035  
  1036  // ListOperationsResponse: The response message for Operations.ListOperations.
  1037  type ListOperationsResponse struct {
  1038  	// NextPageToken: The standard List next-page token.
  1039  	NextPageToken string `json:"nextPageToken,omitempty"`
  1040  	// Operations: A list of operations that matches the specified filter in the
  1041  	// request.
  1042  	Operations []*Operation `json:"operations,omitempty"`
  1043  
  1044  	// ServerResponse contains the HTTP response code and headers from the server.
  1045  	googleapi.ServerResponse `json:"-"`
  1046  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1047  	// unconditionally include in API requests. By default, fields with empty or
  1048  	// default values are omitted from API requests. See
  1049  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1050  	// details.
  1051  	ForceSendFields []string `json:"-"`
  1052  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1053  	// requests with the JSON null value. By default, fields with empty values are
  1054  	// omitted from API requests. See
  1055  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1056  	NullFields []string `json:"-"`
  1057  }
  1058  
  1059  func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
  1060  	type NoMethod ListOperationsResponse
  1061  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1062  }
  1063  
  1064  // Location: A resource that represents a Google Cloud location.
  1065  type Location struct {
  1066  	// DisplayName: The friendly name for this location, typically a nearby city
  1067  	// name. For example, "Tokyo".
  1068  	DisplayName string `json:"displayName,omitempty"`
  1069  	// Labels: Cross-service attributes for the location. For example
  1070  	// {"cloud.googleapis.com/region": "us-east1"}
  1071  	Labels map[string]string `json:"labels,omitempty"`
  1072  	// LocationId: The canonical id for this location. For example: "us-east1".
  1073  	LocationId string `json:"locationId,omitempty"`
  1074  	// Metadata: Service-specific metadata. For example the available capacity at
  1075  	// the given location.
  1076  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  1077  	// Name: Resource name for the location, which may vary between
  1078  	// implementations. For example:
  1079  	// "projects/example-project/locations/us-east1"
  1080  	Name string `json:"name,omitempty"`
  1081  
  1082  	// ServerResponse contains the HTTP response code and headers from the server.
  1083  	googleapi.ServerResponse `json:"-"`
  1084  	// ForceSendFields is a list of field names (e.g. "DisplayName") to
  1085  	// unconditionally include in API requests. By default, fields with empty or
  1086  	// default values are omitted from API requests. See
  1087  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1088  	// details.
  1089  	ForceSendFields []string `json:"-"`
  1090  	// NullFields is a list of field names (e.g. "DisplayName") to include in API
  1091  	// requests with the JSON null value. By default, fields with empty values are
  1092  	// omitted from API requests. See
  1093  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1094  	NullFields []string `json:"-"`
  1095  }
  1096  
  1097  func (s *Location) MarshalJSON() ([]byte, error) {
  1098  	type NoMethod Location
  1099  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1100  }
  1101  
  1102  // LocationMetadata: Metadata for the given google.cloud.location.Location.
  1103  type LocationMetadata struct {
  1104  	// AvailableZones: Output only. The set of available zones in the location. The
  1105  	// map is keyed by the lowercase ID of each zone, as defined by GCE. These keys
  1106  	// can be specified in the `zones` field when creating a Memcached instance.
  1107  	AvailableZones map[string]ZoneMetadata `json:"availableZones,omitempty"`
  1108  	// ForceSendFields is a list of field names (e.g. "AvailableZones") to
  1109  	// unconditionally include in API requests. By default, fields with empty or
  1110  	// default values are omitted from API requests. See
  1111  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1112  	// details.
  1113  	ForceSendFields []string `json:"-"`
  1114  	// NullFields is a list of field names (e.g. "AvailableZones") to include in
  1115  	// API requests with the JSON null value. By default, fields with empty values
  1116  	// are omitted from API requests. See
  1117  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1118  	NullFields []string `json:"-"`
  1119  }
  1120  
  1121  func (s *LocationMetadata) MarshalJSON() ([]byte, error) {
  1122  	type NoMethod LocationMetadata
  1123  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1124  }
  1125  
  1126  // MaintenancePolicy: Defines policies to service maintenance events.
  1127  type MaintenancePolicy struct {
  1128  	// CreateTime: Output only. The time when the resource was created.
  1129  	CreateTime string `json:"createTime,omitempty"`
  1130  	// Description: Optional. Description of what this policy is for. Create/Update
  1131  	// methods return INVALID_ARGUMENT if the length is greater than 512.
  1132  	Description string `json:"description,omitempty"`
  1133  	// Labels: Optional. Resource labels to represent user provided metadata. Each
  1134  	// label is a key-value pair, where both the key and the value are arbitrary
  1135  	// strings provided by the user.
  1136  	Labels map[string]string `json:"labels,omitempty"`
  1137  	// Name: Required. MaintenancePolicy name using the form:
  1138  	// `projects/{project_id}/locations/{location_id}/maintenancePolicies/{maintenan
  1139  	// ce_policy_id}` where {project_id} refers to a GCP consumer project ID,
  1140  	// {location_id} refers to a GCP region/zone, {maintenance_policy_id} must be
  1141  	// 1-63 characters long and match the regular expression
  1142  	// `[a-z0-9]([-a-z0-9]*[a-z0-9])?`.
  1143  	Name string `json:"name,omitempty"`
  1144  	// State: Optional. The state of the policy.
  1145  	//
  1146  	// Possible values:
  1147  	//   "STATE_UNSPECIFIED" - Unspecified state.
  1148  	//   "READY" - Resource is ready to be used.
  1149  	//   "DELETING" - Resource is being deleted. It can no longer be attached to
  1150  	// instances.
  1151  	State string `json:"state,omitempty"`
  1152  	// UpdatePolicy: Maintenance policy applicable to instance update.
  1153  	UpdatePolicy *UpdatePolicy `json:"updatePolicy,omitempty"`
  1154  	// UpdateTime: Output only. The time when the resource was updated.
  1155  	UpdateTime string `json:"updateTime,omitempty"`
  1156  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  1157  	// unconditionally include in API requests. By default, fields with empty or
  1158  	// default values are omitted from API requests. See
  1159  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1160  	// details.
  1161  	ForceSendFields []string `json:"-"`
  1162  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  1163  	// requests with the JSON null value. By default, fields with empty values are
  1164  	// omitted from API requests. See
  1165  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1166  	NullFields []string `json:"-"`
  1167  }
  1168  
  1169  func (s *MaintenancePolicy) MarshalJSON() ([]byte, error) {
  1170  	type NoMethod MaintenancePolicy
  1171  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1172  }
  1173  
  1174  // MaintenanceSchedule: Upcoming maintenance schedule.
  1175  type MaintenanceSchedule struct {
  1176  	// EndTime: Output only. The end time of any upcoming scheduled maintenance for
  1177  	// this instance.
  1178  	EndTime string `json:"endTime,omitempty"`
  1179  	// ScheduleDeadlineTime: Output only. The deadline that the maintenance
  1180  	// schedule start time can not go beyond, including reschedule.
  1181  	ScheduleDeadlineTime string `json:"scheduleDeadlineTime,omitempty"`
  1182  	// StartTime: Output only. The start time of any upcoming scheduled maintenance
  1183  	// for this instance.
  1184  	StartTime string `json:"startTime,omitempty"`
  1185  	// ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally
  1186  	// include in API requests. By default, fields with empty or default values are
  1187  	// omitted from API requests. See
  1188  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1189  	// details.
  1190  	ForceSendFields []string `json:"-"`
  1191  	// NullFields is a list of field names (e.g. "EndTime") to include in API
  1192  	// requests with the JSON null value. By default, fields with empty values are
  1193  	// omitted from API requests. See
  1194  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1195  	NullFields []string `json:"-"`
  1196  }
  1197  
  1198  func (s *MaintenanceSchedule) MarshalJSON() ([]byte, error) {
  1199  	type NoMethod MaintenanceSchedule
  1200  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1201  }
  1202  
  1203  // MaintenanceWindow: MaintenanceWindow definition.
  1204  type MaintenanceWindow struct {
  1205  	// DailyCycle: Daily cycle.
  1206  	DailyCycle *DailyCycle `json:"dailyCycle,omitempty"`
  1207  	// WeeklyCycle: Weekly cycle.
  1208  	WeeklyCycle *WeeklyCycle `json:"weeklyCycle,omitempty"`
  1209  	// ForceSendFields is a list of field names (e.g. "DailyCycle") to
  1210  	// unconditionally include in API requests. By default, fields with empty or
  1211  	// default values are omitted from API requests. See
  1212  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1213  	// details.
  1214  	ForceSendFields []string `json:"-"`
  1215  	// NullFields is a list of field names (e.g. "DailyCycle") to include in API
  1216  	// requests with the JSON null value. By default, fields with empty values are
  1217  	// omitted from API requests. See
  1218  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1219  	NullFields []string `json:"-"`
  1220  }
  1221  
  1222  func (s *MaintenanceWindow) MarshalJSON() ([]byte, error) {
  1223  	type NoMethod MaintenanceWindow
  1224  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1225  }
  1226  
  1227  type MemcacheParameters struct {
  1228  	// Id: Output only. The unique ID associated with this set of parameters. Users
  1229  	// can use this id to determine if the parameters associated with the instance
  1230  	// differ from the parameters associated with the nodes. A discrepancy between
  1231  	// parameter ids can inform users that they may need to take action to apply
  1232  	// parameters on nodes.
  1233  	Id string `json:"id,omitempty"`
  1234  	// Params: User defined set of parameters to use in the memcached process.
  1235  	Params map[string]string `json:"params,omitempty"`
  1236  	// ForceSendFields is a list of field names (e.g. "Id") to unconditionally
  1237  	// include in API requests. By default, fields with empty or default values are
  1238  	// omitted from API requests. See
  1239  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1240  	// details.
  1241  	ForceSendFields []string `json:"-"`
  1242  	// NullFields is a list of field names (e.g. "Id") to include in API requests
  1243  	// with the JSON null value. By default, fields with empty values are omitted
  1244  	// from API requests. See
  1245  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1246  	NullFields []string `json:"-"`
  1247  }
  1248  
  1249  func (s *MemcacheParameters) MarshalJSON() ([]byte, error) {
  1250  	type NoMethod MemcacheParameters
  1251  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1252  }
  1253  
  1254  type Node struct {
  1255  	// Host: Output only. Hostname or IP address of the Memcached node used by the
  1256  	// clients to connect to the Memcached server on this node.
  1257  	Host string `json:"host,omitempty"`
  1258  	// MemcacheFullVersion: Output only. The full version of memcached server
  1259  	// running on this node. e.g. - memcached-1.5.16
  1260  	MemcacheFullVersion string `json:"memcacheFullVersion,omitempty"`
  1261  	// MemcacheVersion: Output only. Major version of memcached server running on
  1262  	// this node, e.g. MEMCACHE_1_5
  1263  	//
  1264  	// Possible values:
  1265  	//   "MEMCACHE_VERSION_UNSPECIFIED" - Memcache version is not specified by
  1266  	// customer
  1267  	//   "MEMCACHE_1_5" - Memcached 1.5 version.
  1268  	//   "MEMCACHE_1_6_15" - Memcached 1.6.15 version.
  1269  	MemcacheVersion string `json:"memcacheVersion,omitempty"`
  1270  	// NodeId: Output only. Identifier of the Memcached node. The node id does not
  1271  	// include project or location like the Memcached instance name.
  1272  	NodeId string `json:"nodeId,omitempty"`
  1273  	// Parameters: User defined parameters currently applied to the node.
  1274  	Parameters *MemcacheParameters `json:"parameters,omitempty"`
  1275  	// Port: Output only. The port number of the Memcached server on this node.
  1276  	Port int64 `json:"port,omitempty"`
  1277  	// State: Output only. Current state of the Memcached node.
  1278  	//
  1279  	// Possible values:
  1280  	//   "STATE_UNSPECIFIED" - Node state is not set.
  1281  	//   "CREATING" - Node is being created.
  1282  	//   "READY" - Node has been created and ready to be used.
  1283  	//   "DELETING" - Node is being deleted.
  1284  	//   "UPDATING" - Node is being updated.
  1285  	State string `json:"state,omitempty"`
  1286  	// Zone: Output only. Location (GCP Zone) for the Memcached node.
  1287  	Zone string `json:"zone,omitempty"`
  1288  	// ForceSendFields is a list of field names (e.g. "Host") to unconditionally
  1289  	// include in API requests. By default, fields with empty or default values are
  1290  	// omitted from API requests. See
  1291  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1292  	// details.
  1293  	ForceSendFields []string `json:"-"`
  1294  	// NullFields is a list of field names (e.g. "Host") to include in API requests
  1295  	// with the JSON null value. By default, fields with empty values are omitted
  1296  	// from API requests. See
  1297  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1298  	NullFields []string `json:"-"`
  1299  }
  1300  
  1301  func (s *Node) MarshalJSON() ([]byte, error) {
  1302  	type NoMethod Node
  1303  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1304  }
  1305  
  1306  // NodeConfig: Configuration for a Memcached Node.
  1307  type NodeConfig struct {
  1308  	// CpuCount: Required. Number of cpus per Memcached node.
  1309  	CpuCount int64 `json:"cpuCount,omitempty"`
  1310  	// MemorySizeMb: Required. Memory size in MiB for each Memcached node.
  1311  	MemorySizeMb int64 `json:"memorySizeMb,omitempty"`
  1312  	// ForceSendFields is a list of field names (e.g. "CpuCount") to
  1313  	// unconditionally include in API requests. By default, fields with empty or
  1314  	// default values are omitted from API requests. See
  1315  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1316  	// details.
  1317  	ForceSendFields []string `json:"-"`
  1318  	// NullFields is a list of field names (e.g. "CpuCount") to include in API
  1319  	// requests with the JSON null value. By default, fields with empty values are
  1320  	// omitted from API requests. See
  1321  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1322  	NullFields []string `json:"-"`
  1323  }
  1324  
  1325  func (s *NodeConfig) MarshalJSON() ([]byte, error) {
  1326  	type NoMethod NodeConfig
  1327  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1328  }
  1329  
  1330  // Operation: This resource represents a long-running operation that is the
  1331  // result of a network API call.
  1332  type Operation struct {
  1333  	// Done: If the value is `false`, it means the operation is still in progress.
  1334  	// If `true`, the operation is completed, and either `error` or `response` is
  1335  	// available.
  1336  	Done bool `json:"done,omitempty"`
  1337  	// Error: The error result of the operation in case of failure or cancellation.
  1338  	Error *Status `json:"error,omitempty"`
  1339  	// Metadata: Service-specific metadata associated with the operation. It
  1340  	// typically contains progress information and common metadata such as create
  1341  	// time. Some services might not provide such metadata. Any method that returns
  1342  	// a long-running operation should document the metadata type, if any.
  1343  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  1344  	// Name: The server-assigned name, which is only unique within the same service
  1345  	// that originally returns it. If you use the default HTTP mapping, the `name`
  1346  	// should be a resource name ending with `operations/{unique_id}`.
  1347  	Name string `json:"name,omitempty"`
  1348  	// Response: The normal, successful response of the operation. If the original
  1349  	// method returns no data on success, such as `Delete`, the response is
  1350  	// `google.protobuf.Empty`. If the original method is standard
  1351  	// `Get`/`Create`/`Update`, the response should be the resource. For other
  1352  	// methods, the response should have the type `XxxResponse`, where `Xxx` is the
  1353  	// original method name. For example, if the original method name is
  1354  	// `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
  1355  	Response googleapi.RawMessage `json:"response,omitempty"`
  1356  
  1357  	// ServerResponse contains the HTTP response code and headers from the server.
  1358  	googleapi.ServerResponse `json:"-"`
  1359  	// ForceSendFields is a list of field names (e.g. "Done") to unconditionally
  1360  	// include in API requests. By default, fields with empty or default values are
  1361  	// omitted from API requests. See
  1362  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1363  	// details.
  1364  	ForceSendFields []string `json:"-"`
  1365  	// NullFields is a list of field names (e.g. "Done") to include in API requests
  1366  	// with the JSON null value. By default, fields with empty values are omitted
  1367  	// from API requests. See
  1368  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1369  	NullFields []string `json:"-"`
  1370  }
  1371  
  1372  func (s *Operation) MarshalJSON() ([]byte, error) {
  1373  	type NoMethod Operation
  1374  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1375  }
  1376  
  1377  // OperationMetadata: Represents the metadata of a long-running operation.
  1378  type OperationMetadata struct {
  1379  	// ApiVersion: Output only. API version used to start the operation.
  1380  	ApiVersion string `json:"apiVersion,omitempty"`
  1381  	// CancelRequested: Output only. Identifies whether the user has requested
  1382  	// cancellation of the operation. Operations that have successfully been
  1383  	// cancelled have Operation.error value with a google.rpc.Status.code of 1,
  1384  	// corresponding to `Code.CANCELLED`.
  1385  	CancelRequested bool `json:"cancelRequested,omitempty"`
  1386  	// CreateTime: Output only. Time when the operation was created.
  1387  	CreateTime string `json:"createTime,omitempty"`
  1388  	// EndTime: Output only. Time when the operation finished running.
  1389  	EndTime string `json:"endTime,omitempty"`
  1390  	// StatusDetail: Output only. Human-readable status of the operation, if any.
  1391  	StatusDetail string `json:"statusDetail,omitempty"`
  1392  	// Target: Output only. Server-defined resource path for the target of the
  1393  	// operation.
  1394  	Target string `json:"target,omitempty"`
  1395  	// Verb: Output only. Name of the verb executed by the operation.
  1396  	Verb string `json:"verb,omitempty"`
  1397  	// ForceSendFields is a list of field names (e.g. "ApiVersion") to
  1398  	// unconditionally include in API requests. By default, fields with empty or
  1399  	// default values are omitted from API requests. See
  1400  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1401  	// details.
  1402  	ForceSendFields []string `json:"-"`
  1403  	// NullFields is a list of field names (e.g. "ApiVersion") to include in API
  1404  	// requests with the JSON null value. By default, fields with empty values are
  1405  	// omitted from API requests. See
  1406  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1407  	NullFields []string `json:"-"`
  1408  }
  1409  
  1410  func (s *OperationMetadata) MarshalJSON() ([]byte, error) {
  1411  	type NoMethod OperationMetadata
  1412  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1413  }
  1414  
  1415  // RescheduleMaintenanceRequest: Request for RescheduleMaintenance.
  1416  type RescheduleMaintenanceRequest struct {
  1417  	// RescheduleType: Required. If reschedule type is SPECIFIC_TIME, must set up
  1418  	// schedule_time as well.
  1419  	//
  1420  	// Possible values:
  1421  	//   "RESCHEDULE_TYPE_UNSPECIFIED" - Not set.
  1422  	//   "IMMEDIATE" - If the user wants to schedule the maintenance to happen now.
  1423  	//   "NEXT_AVAILABLE_WINDOW" - If the user wants to use the existing
  1424  	// maintenance policy to find the next available window.
  1425  	//   "SPECIFIC_TIME" - If the user wants to reschedule the maintenance to a
  1426  	// specific time.
  1427  	RescheduleType string `json:"rescheduleType,omitempty"`
  1428  	// ScheduleTime: Timestamp when the maintenance shall be rescheduled to if
  1429  	// reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for example
  1430  	// `2012-11-15T16:19:00.094Z`.
  1431  	ScheduleTime string `json:"scheduleTime,omitempty"`
  1432  	// ForceSendFields is a list of field names (e.g. "RescheduleType") to
  1433  	// unconditionally include in API requests. By default, fields with empty or
  1434  	// default values are omitted from API requests. See
  1435  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1436  	// details.
  1437  	ForceSendFields []string `json:"-"`
  1438  	// NullFields is a list of field names (e.g. "RescheduleType") to include in
  1439  	// API requests with the JSON null value. By default, fields with empty values
  1440  	// are omitted from API requests. See
  1441  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1442  	NullFields []string `json:"-"`
  1443  }
  1444  
  1445  func (s *RescheduleMaintenanceRequest) MarshalJSON() ([]byte, error) {
  1446  	type NoMethod RescheduleMaintenanceRequest
  1447  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1448  }
  1449  
  1450  // Schedule: Configure the schedule.
  1451  type Schedule struct {
  1452  	// Day: Allows to define schedule that runs specified day of the week.
  1453  	//
  1454  	// Possible values:
  1455  	//   "DAY_OF_WEEK_UNSPECIFIED" - The day of the week is unspecified.
  1456  	//   "MONDAY" - Monday
  1457  	//   "TUESDAY" - Tuesday
  1458  	//   "WEDNESDAY" - Wednesday
  1459  	//   "THURSDAY" - Thursday
  1460  	//   "FRIDAY" - Friday
  1461  	//   "SATURDAY" - Saturday
  1462  	//   "SUNDAY" - Sunday
  1463  	Day string `json:"day,omitempty"`
  1464  	// Duration: Output only. Duration of the time window, set by service producer.
  1465  	Duration string `json:"duration,omitempty"`
  1466  	// StartTime: Time within the window to start the operations.
  1467  	StartTime *TimeOfDay `json:"startTime,omitempty"`
  1468  	// ForceSendFields is a list of field names (e.g. "Day") to unconditionally
  1469  	// include in API requests. By default, fields with empty or default values are
  1470  	// omitted from API requests. See
  1471  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1472  	// details.
  1473  	ForceSendFields []string `json:"-"`
  1474  	// NullFields is a list of field names (e.g. "Day") to include in API requests
  1475  	// with the JSON null value. By default, fields with empty values are omitted
  1476  	// from API requests. See
  1477  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1478  	NullFields []string `json:"-"`
  1479  }
  1480  
  1481  func (s *Schedule) MarshalJSON() ([]byte, error) {
  1482  	type NoMethod Schedule
  1483  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1484  }
  1485  
  1486  // Status: The `Status` type defines a logical error model that is suitable for
  1487  // different programming environments, including REST APIs and RPC APIs. It is
  1488  // used by gRPC (https://github.com/grpc). Each `Status` message contains three
  1489  // pieces of data: error code, error message, and error details. You can find
  1490  // out more about this error model and how to work with it in the API Design
  1491  // Guide (https://cloud.google.com/apis/design/errors).
  1492  type Status struct {
  1493  	// Code: The status code, which should be an enum value of google.rpc.Code.
  1494  	Code int64 `json:"code,omitempty"`
  1495  	// Details: A list of messages that carry the error details. There is a common
  1496  	// set of message types for APIs to use.
  1497  	Details []googleapi.RawMessage `json:"details,omitempty"`
  1498  	// Message: A developer-facing error message, which should be in English. Any
  1499  	// user-facing error message should be localized and sent in the
  1500  	// google.rpc.Status.details field, or localized by the client.
  1501  	Message string `json:"message,omitempty"`
  1502  	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
  1503  	// include in API requests. By default, fields with empty or default values are
  1504  	// omitted from API requests. See
  1505  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1506  	// details.
  1507  	ForceSendFields []string `json:"-"`
  1508  	// NullFields is a list of field names (e.g. "Code") to include in API requests
  1509  	// with the JSON null value. By default, fields with empty values are omitted
  1510  	// from API requests. See
  1511  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1512  	NullFields []string `json:"-"`
  1513  }
  1514  
  1515  func (s *Status) MarshalJSON() ([]byte, error) {
  1516  	type NoMethod Status
  1517  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1518  }
  1519  
  1520  // TimeOfDay: Represents a time of day. The date and time zone are either not
  1521  // significant or are specified elsewhere. An API may choose to allow leap
  1522  // seconds. Related types are google.type.Date and `google.protobuf.Timestamp`.
  1523  type TimeOfDay struct {
  1524  	// Hours: Hours of day in 24 hour format. Should be from 0 to 23. An API may
  1525  	// choose to allow the value "24:00:00" for scenarios like business closing
  1526  	// time.
  1527  	Hours int64 `json:"hours,omitempty"`
  1528  	// Minutes: Minutes of hour of day. Must be from 0 to 59.
  1529  	Minutes int64 `json:"minutes,omitempty"`
  1530  	// Nanos: Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
  1531  	Nanos int64 `json:"nanos,omitempty"`
  1532  	// Seconds: Seconds of minutes of the time. Must normally be from 0 to 59. An
  1533  	// API may allow the value 60 if it allows leap-seconds.
  1534  	Seconds int64 `json:"seconds,omitempty"`
  1535  	// ForceSendFields is a list of field names (e.g. "Hours") to unconditionally
  1536  	// include in API requests. By default, fields with empty or default values are
  1537  	// omitted from API requests. See
  1538  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1539  	// details.
  1540  	ForceSendFields []string `json:"-"`
  1541  	// NullFields is a list of field names (e.g. "Hours") to include in API
  1542  	// requests with the JSON null value. By default, fields with empty values are
  1543  	// omitted from API requests. See
  1544  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1545  	NullFields []string `json:"-"`
  1546  }
  1547  
  1548  func (s *TimeOfDay) MarshalJSON() ([]byte, error) {
  1549  	type NoMethod TimeOfDay
  1550  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1551  }
  1552  
  1553  // UpdateParametersRequest: Request for UpdateParameters.
  1554  type UpdateParametersRequest struct {
  1555  	// Parameters: The parameters to apply to the instance.
  1556  	Parameters *MemcacheParameters `json:"parameters,omitempty"`
  1557  	// UpdateMask: Required. Mask of fields to update.
  1558  	UpdateMask string `json:"updateMask,omitempty"`
  1559  	// ForceSendFields is a list of field names (e.g. "Parameters") to
  1560  	// unconditionally include in API requests. By default, fields with empty or
  1561  	// default values are omitted from API requests. See
  1562  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1563  	// details.
  1564  	ForceSendFields []string `json:"-"`
  1565  	// NullFields is a list of field names (e.g. "Parameters") to include in API
  1566  	// requests with the JSON null value. By default, fields with empty values are
  1567  	// omitted from API requests. See
  1568  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1569  	NullFields []string `json:"-"`
  1570  }
  1571  
  1572  func (s *UpdateParametersRequest) MarshalJSON() ([]byte, error) {
  1573  	type NoMethod UpdateParametersRequest
  1574  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1575  }
  1576  
  1577  // UpdatePolicy: Maintenance policy applicable to instance updates.
  1578  type UpdatePolicy struct {
  1579  	// Channel: Optional. Relative scheduling channel applied to resource.
  1580  	//
  1581  	// Possible values:
  1582  	//   "UPDATE_CHANNEL_UNSPECIFIED" - Unspecified channel.
  1583  	//   "EARLIER" - Early channel within a customer project.
  1584  	//   "LATER" - Later channel within a customer project.
  1585  	//   "WEEK1" - ! ! The follow channels can ONLY be used if you adopt the new MW
  1586  	// system! ! ! NOTE: all WEEK channels are assumed to be under a weekly window.
  1587  	// ! There is currently no dedicated channel definitions for Daily windows. !
  1588  	// If you use Daily window, the system will assume a 1d (24Hours) advanced !
  1589  	// notification period b/w EARLY and LATER. ! We may consider support more
  1590  	// flexible daily channel specifications in ! the future. WEEK1 == EARLIER with
  1591  	// minimum 7d advanced notification. {7d, 14d} The system will treat them
  1592  	// equally and will use WEEK1 whenever it can. New customers are encouraged to
  1593  	// use this channel annotation.
  1594  	//   "WEEK2" - WEEK2 == LATER with minimum 14d advanced notification {14d,
  1595  	// 21d}.
  1596  	//   "WEEK5" - WEEK5 == 40d support. minimum 35d advanced notification {35d,
  1597  	// 42d}.
  1598  	Channel string `json:"channel,omitempty"`
  1599  	// DenyMaintenancePeriods: Deny Maintenance Period that is applied to resource
  1600  	// to indicate when maintenance is forbidden. The protocol supports
  1601  	// zero-to-many such periods, but the current SLM Rollout implementation only
  1602  	// supports zero-to-one.
  1603  	DenyMaintenancePeriods []*DenyMaintenancePeriod `json:"denyMaintenancePeriods,omitempty"`
  1604  	// Window: Optional. Maintenance window that is applied to resources covered by
  1605  	// this policy.
  1606  	Window *MaintenanceWindow `json:"window,omitempty"`
  1607  	// ForceSendFields is a list of field names (e.g. "Channel") to unconditionally
  1608  	// include in API requests. By default, fields with empty or default values are
  1609  	// omitted from API requests. See
  1610  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1611  	// details.
  1612  	ForceSendFields []string `json:"-"`
  1613  	// NullFields is a list of field names (e.g. "Channel") to include in API
  1614  	// requests with the JSON null value. By default, fields with empty values are
  1615  	// omitted from API requests. See
  1616  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1617  	NullFields []string `json:"-"`
  1618  }
  1619  
  1620  func (s *UpdatePolicy) MarshalJSON() ([]byte, error) {
  1621  	type NoMethod UpdatePolicy
  1622  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1623  }
  1624  
  1625  // WeeklyCycle: Time window specified for weekly operations.
  1626  type WeeklyCycle struct {
  1627  	// Schedule: User can specify multiple windows in a week. Minimum of 1 window.
  1628  	Schedule []*Schedule `json:"schedule,omitempty"`
  1629  	// ForceSendFields is a list of field names (e.g. "Schedule") to
  1630  	// unconditionally include in API requests. By default, fields with empty or
  1631  	// default values are omitted from API requests. See
  1632  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1633  	// details.
  1634  	ForceSendFields []string `json:"-"`
  1635  	// NullFields is a list of field names (e.g. "Schedule") to include in API
  1636  	// requests with the JSON null value. By default, fields with empty values are
  1637  	// omitted from API requests. See
  1638  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1639  	NullFields []string `json:"-"`
  1640  }
  1641  
  1642  func (s *WeeklyCycle) MarshalJSON() ([]byte, error) {
  1643  	type NoMethod WeeklyCycle
  1644  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1645  }
  1646  
  1647  // WeeklyMaintenanceWindow: Time window specified for weekly operations.
  1648  type WeeklyMaintenanceWindow struct {
  1649  	// Day: Required. Allows to define schedule that runs specified day of the
  1650  	// week.
  1651  	//
  1652  	// Possible values:
  1653  	//   "DAY_OF_WEEK_UNSPECIFIED" - The day of the week is unspecified.
  1654  	//   "MONDAY" - Monday
  1655  	//   "TUESDAY" - Tuesday
  1656  	//   "WEDNESDAY" - Wednesday
  1657  	//   "THURSDAY" - Thursday
  1658  	//   "FRIDAY" - Friday
  1659  	//   "SATURDAY" - Saturday
  1660  	//   "SUNDAY" - Sunday
  1661  	Day string `json:"day,omitempty"`
  1662  	// Duration: Required. Duration of the time window.
  1663  	Duration string `json:"duration,omitempty"`
  1664  	// StartTime: Required. Start time of the window in UTC.
  1665  	StartTime *TimeOfDay `json:"startTime,omitempty"`
  1666  	// ForceSendFields is a list of field names (e.g. "Day") to unconditionally
  1667  	// include in API requests. By default, fields with empty or default values are
  1668  	// omitted from API requests. See
  1669  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1670  	// details.
  1671  	ForceSendFields []string `json:"-"`
  1672  	// NullFields is a list of field names (e.g. "Day") to include in API requests
  1673  	// with the JSON null value. By default, fields with empty values are omitted
  1674  	// from API requests. See
  1675  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1676  	NullFields []string `json:"-"`
  1677  }
  1678  
  1679  func (s *WeeklyMaintenanceWindow) MarshalJSON() ([]byte, error) {
  1680  	type NoMethod WeeklyMaintenanceWindow
  1681  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1682  }
  1683  
  1684  type ZoneMetadata struct {
  1685  }
  1686  
  1687  type ProjectsLocationsGetCall struct {
  1688  	s            *Service
  1689  	name         string
  1690  	urlParams_   gensupport.URLParams
  1691  	ifNoneMatch_ string
  1692  	ctx_         context.Context
  1693  	header_      http.Header
  1694  }
  1695  
  1696  // Get: Gets information about a location.
  1697  //
  1698  // - name: Resource name for the location.
  1699  func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
  1700  	c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1701  	c.name = name
  1702  	return c
  1703  }
  1704  
  1705  // Fields allows partial responses to be retrieved. See
  1706  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1707  // details.
  1708  func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
  1709  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1710  	return c
  1711  }
  1712  
  1713  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1714  // object's ETag matches the given value. This is useful for getting updates
  1715  // only after the object has changed since the last request.
  1716  func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
  1717  	c.ifNoneMatch_ = entityTag
  1718  	return c
  1719  }
  1720  
  1721  // Context sets the context to be used in this call's Do method.
  1722  func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
  1723  	c.ctx_ = ctx
  1724  	return c
  1725  }
  1726  
  1727  // Header returns a http.Header that can be modified by the caller to add
  1728  // headers to the request.
  1729  func (c *ProjectsLocationsGetCall) Header() http.Header {
  1730  	if c.header_ == nil {
  1731  		c.header_ = make(http.Header)
  1732  	}
  1733  	return c.header_
  1734  }
  1735  
  1736  func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
  1737  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1738  	if c.ifNoneMatch_ != "" {
  1739  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1740  	}
  1741  	var body io.Reader = nil
  1742  	c.urlParams_.Set("alt", alt)
  1743  	c.urlParams_.Set("prettyPrint", "false")
  1744  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  1745  	urls += "?" + c.urlParams_.Encode()
  1746  	req, err := http.NewRequest("GET", urls, body)
  1747  	if err != nil {
  1748  		return nil, err
  1749  	}
  1750  	req.Header = reqHeaders
  1751  	googleapi.Expand(req.URL, map[string]string{
  1752  		"name": c.name,
  1753  	})
  1754  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1755  }
  1756  
  1757  // Do executes the "memcache.projects.locations.get" call.
  1758  // Any non-2xx status code is an error. Response headers are in either
  1759  // *Location.ServerResponse.Header or (if a response was returned at all) in
  1760  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1761  // whether the returned error was because http.StatusNotModified was returned.
  1762  func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
  1763  	gensupport.SetOptions(c.urlParams_, opts...)
  1764  	res, err := c.doRequest("json")
  1765  	if res != nil && res.StatusCode == http.StatusNotModified {
  1766  		if res.Body != nil {
  1767  			res.Body.Close()
  1768  		}
  1769  		return nil, gensupport.WrapError(&googleapi.Error{
  1770  			Code:   res.StatusCode,
  1771  			Header: res.Header,
  1772  		})
  1773  	}
  1774  	if err != nil {
  1775  		return nil, err
  1776  	}
  1777  	defer googleapi.CloseBody(res)
  1778  	if err := googleapi.CheckResponse(res); err != nil {
  1779  		return nil, gensupport.WrapError(err)
  1780  	}
  1781  	ret := &Location{
  1782  		ServerResponse: googleapi.ServerResponse{
  1783  			Header:         res.Header,
  1784  			HTTPStatusCode: res.StatusCode,
  1785  		},
  1786  	}
  1787  	target := &ret
  1788  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1789  		return nil, err
  1790  	}
  1791  	return ret, nil
  1792  }
  1793  
  1794  type ProjectsLocationsListCall struct {
  1795  	s            *Service
  1796  	name         string
  1797  	urlParams_   gensupport.URLParams
  1798  	ifNoneMatch_ string
  1799  	ctx_         context.Context
  1800  	header_      http.Header
  1801  }
  1802  
  1803  // List: Lists information about the supported locations for this service.
  1804  //
  1805  // - name: The resource that owns the locations collection, if applicable.
  1806  func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
  1807  	c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1808  	c.name = name
  1809  	return c
  1810  }
  1811  
  1812  // Filter sets the optional parameter "filter": A filter to narrow down results
  1813  // to a preferred subset. The filtering language accepts strings like
  1814  // "displayName=tokyo", and is documented in more detail in AIP-160
  1815  // (https://google.aip.dev/160).
  1816  func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
  1817  	c.urlParams_.Set("filter", filter)
  1818  	return c
  1819  }
  1820  
  1821  // PageSize sets the optional parameter "pageSize": The maximum number of
  1822  // results to return. If not set, the service selects a default.
  1823  func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
  1824  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  1825  	return c
  1826  }
  1827  
  1828  // PageToken sets the optional parameter "pageToken": A page token received
  1829  // from the `next_page_token` field in the response. Send that page token to
  1830  // receive the subsequent page.
  1831  func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
  1832  	c.urlParams_.Set("pageToken", pageToken)
  1833  	return c
  1834  }
  1835  
  1836  // Fields allows partial responses to be retrieved. See
  1837  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1838  // details.
  1839  func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
  1840  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1841  	return c
  1842  }
  1843  
  1844  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1845  // object's ETag matches the given value. This is useful for getting updates
  1846  // only after the object has changed since the last request.
  1847  func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
  1848  	c.ifNoneMatch_ = entityTag
  1849  	return c
  1850  }
  1851  
  1852  // Context sets the context to be used in this call's Do method.
  1853  func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
  1854  	c.ctx_ = ctx
  1855  	return c
  1856  }
  1857  
  1858  // Header returns a http.Header that can be modified by the caller to add
  1859  // headers to the request.
  1860  func (c *ProjectsLocationsListCall) Header() http.Header {
  1861  	if c.header_ == nil {
  1862  		c.header_ = make(http.Header)
  1863  	}
  1864  	return c.header_
  1865  }
  1866  
  1867  func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
  1868  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1869  	if c.ifNoneMatch_ != "" {
  1870  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1871  	}
  1872  	var body io.Reader = nil
  1873  	c.urlParams_.Set("alt", alt)
  1874  	c.urlParams_.Set("prettyPrint", "false")
  1875  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations")
  1876  	urls += "?" + c.urlParams_.Encode()
  1877  	req, err := http.NewRequest("GET", urls, body)
  1878  	if err != nil {
  1879  		return nil, err
  1880  	}
  1881  	req.Header = reqHeaders
  1882  	googleapi.Expand(req.URL, map[string]string{
  1883  		"name": c.name,
  1884  	})
  1885  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1886  }
  1887  
  1888  // Do executes the "memcache.projects.locations.list" call.
  1889  // Any non-2xx status code is an error. Response headers are in either
  1890  // *ListLocationsResponse.ServerResponse.Header or (if a response was returned
  1891  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  1892  // check whether the returned error was because http.StatusNotModified was
  1893  // returned.
  1894  func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
  1895  	gensupport.SetOptions(c.urlParams_, opts...)
  1896  	res, err := c.doRequest("json")
  1897  	if res != nil && res.StatusCode == http.StatusNotModified {
  1898  		if res.Body != nil {
  1899  			res.Body.Close()
  1900  		}
  1901  		return nil, gensupport.WrapError(&googleapi.Error{
  1902  			Code:   res.StatusCode,
  1903  			Header: res.Header,
  1904  		})
  1905  	}
  1906  	if err != nil {
  1907  		return nil, err
  1908  	}
  1909  	defer googleapi.CloseBody(res)
  1910  	if err := googleapi.CheckResponse(res); err != nil {
  1911  		return nil, gensupport.WrapError(err)
  1912  	}
  1913  	ret := &ListLocationsResponse{
  1914  		ServerResponse: googleapi.ServerResponse{
  1915  			Header:         res.Header,
  1916  			HTTPStatusCode: res.StatusCode,
  1917  		},
  1918  	}
  1919  	target := &ret
  1920  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1921  		return nil, err
  1922  	}
  1923  	return ret, nil
  1924  }
  1925  
  1926  // Pages invokes f for each page of results.
  1927  // A non-nil error returned from f will halt the iteration.
  1928  // The provided context supersedes any context provided to the Context method.
  1929  func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
  1930  	c.ctx_ = ctx
  1931  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  1932  	for {
  1933  		x, err := c.Do()
  1934  		if err != nil {
  1935  			return err
  1936  		}
  1937  		if err := f(x); err != nil {
  1938  			return err
  1939  		}
  1940  		if x.NextPageToken == "" {
  1941  			return nil
  1942  		}
  1943  		c.PageToken(x.NextPageToken)
  1944  	}
  1945  }
  1946  
  1947  type ProjectsLocationsInstancesApplyParametersCall struct {
  1948  	s                      *Service
  1949  	name                   string
  1950  	applyparametersrequest *ApplyParametersRequest
  1951  	urlParams_             gensupport.URLParams
  1952  	ctx_                   context.Context
  1953  	header_                http.Header
  1954  }
  1955  
  1956  // ApplyParameters: `ApplyParameters` restarts the set of specified nodes in
  1957  // order to update them to the current set of parameters for the Memcached
  1958  // Instance.
  1959  //
  1960  //   - name: Resource name of the Memcached instance for which parameter group
  1961  //     updates should be applied.
  1962  func (r *ProjectsLocationsInstancesService) ApplyParameters(name string, applyparametersrequest *ApplyParametersRequest) *ProjectsLocationsInstancesApplyParametersCall {
  1963  	c := &ProjectsLocationsInstancesApplyParametersCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1964  	c.name = name
  1965  	c.applyparametersrequest = applyparametersrequest
  1966  	return c
  1967  }
  1968  
  1969  // Fields allows partial responses to be retrieved. See
  1970  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1971  // details.
  1972  func (c *ProjectsLocationsInstancesApplyParametersCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesApplyParametersCall {
  1973  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1974  	return c
  1975  }
  1976  
  1977  // Context sets the context to be used in this call's Do method.
  1978  func (c *ProjectsLocationsInstancesApplyParametersCall) Context(ctx context.Context) *ProjectsLocationsInstancesApplyParametersCall {
  1979  	c.ctx_ = ctx
  1980  	return c
  1981  }
  1982  
  1983  // Header returns a http.Header that can be modified by the caller to add
  1984  // headers to the request.
  1985  func (c *ProjectsLocationsInstancesApplyParametersCall) Header() http.Header {
  1986  	if c.header_ == nil {
  1987  		c.header_ = make(http.Header)
  1988  	}
  1989  	return c.header_
  1990  }
  1991  
  1992  func (c *ProjectsLocationsInstancesApplyParametersCall) doRequest(alt string) (*http.Response, error) {
  1993  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  1994  	var body io.Reader = nil
  1995  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.applyparametersrequest)
  1996  	if err != nil {
  1997  		return nil, err
  1998  	}
  1999  	c.urlParams_.Set("alt", alt)
  2000  	c.urlParams_.Set("prettyPrint", "false")
  2001  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:applyParameters")
  2002  	urls += "?" + c.urlParams_.Encode()
  2003  	req, err := http.NewRequest("POST", urls, body)
  2004  	if err != nil {
  2005  		return nil, err
  2006  	}
  2007  	req.Header = reqHeaders
  2008  	googleapi.Expand(req.URL, map[string]string{
  2009  		"name": c.name,
  2010  	})
  2011  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2012  }
  2013  
  2014  // Do executes the "memcache.projects.locations.instances.applyParameters" call.
  2015  // Any non-2xx status code is an error. Response headers are in either
  2016  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  2017  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2018  // whether the returned error was because http.StatusNotModified was returned.
  2019  func (c *ProjectsLocationsInstancesApplyParametersCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2020  	gensupport.SetOptions(c.urlParams_, opts...)
  2021  	res, err := c.doRequest("json")
  2022  	if res != nil && res.StatusCode == http.StatusNotModified {
  2023  		if res.Body != nil {
  2024  			res.Body.Close()
  2025  		}
  2026  		return nil, gensupport.WrapError(&googleapi.Error{
  2027  			Code:   res.StatusCode,
  2028  			Header: res.Header,
  2029  		})
  2030  	}
  2031  	if err != nil {
  2032  		return nil, err
  2033  	}
  2034  	defer googleapi.CloseBody(res)
  2035  	if err := googleapi.CheckResponse(res); err != nil {
  2036  		return nil, gensupport.WrapError(err)
  2037  	}
  2038  	ret := &Operation{
  2039  		ServerResponse: googleapi.ServerResponse{
  2040  			Header:         res.Header,
  2041  			HTTPStatusCode: res.StatusCode,
  2042  		},
  2043  	}
  2044  	target := &ret
  2045  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2046  		return nil, err
  2047  	}
  2048  	return ret, nil
  2049  }
  2050  
  2051  type ProjectsLocationsInstancesCreateCall struct {
  2052  	s          *Service
  2053  	parent     string
  2054  	instance   *Instance
  2055  	urlParams_ gensupport.URLParams
  2056  	ctx_       context.Context
  2057  	header_    http.Header
  2058  }
  2059  
  2060  // Create: Creates a new Instance in a given location.
  2061  //
  2062  //   - parent: The resource name of the instance location using the form:
  2063  //     `projects/{project_id}/locations/{location_id}` where `location_id` refers
  2064  //     to a GCP region.
  2065  func (r *ProjectsLocationsInstancesService) Create(parent string, instance *Instance) *ProjectsLocationsInstancesCreateCall {
  2066  	c := &ProjectsLocationsInstancesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2067  	c.parent = parent
  2068  	c.instance = instance
  2069  	return c
  2070  }
  2071  
  2072  // InstanceId sets the optional parameter "instanceId": Required. The logical
  2073  // name of the Memcached instance in the user project with the following
  2074  // restrictions: * Must contain only lowercase letters, numbers, and hyphens. *
  2075  // Must start with a letter. * Must be between 1-40 characters. * Must end with
  2076  // a number or a letter. * Must be unique within the user project / location.
  2077  // If any of the above are not met, the API raises an invalid argument error.
  2078  func (c *ProjectsLocationsInstancesCreateCall) InstanceId(instanceId string) *ProjectsLocationsInstancesCreateCall {
  2079  	c.urlParams_.Set("instanceId", instanceId)
  2080  	return c
  2081  }
  2082  
  2083  // Fields allows partial responses to be retrieved. See
  2084  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2085  // details.
  2086  func (c *ProjectsLocationsInstancesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesCreateCall {
  2087  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2088  	return c
  2089  }
  2090  
  2091  // Context sets the context to be used in this call's Do method.
  2092  func (c *ProjectsLocationsInstancesCreateCall) Context(ctx context.Context) *ProjectsLocationsInstancesCreateCall {
  2093  	c.ctx_ = ctx
  2094  	return c
  2095  }
  2096  
  2097  // Header returns a http.Header that can be modified by the caller to add
  2098  // headers to the request.
  2099  func (c *ProjectsLocationsInstancesCreateCall) Header() http.Header {
  2100  	if c.header_ == nil {
  2101  		c.header_ = make(http.Header)
  2102  	}
  2103  	return c.header_
  2104  }
  2105  
  2106  func (c *ProjectsLocationsInstancesCreateCall) doRequest(alt string) (*http.Response, error) {
  2107  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2108  	var body io.Reader = nil
  2109  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instance)
  2110  	if err != nil {
  2111  		return nil, err
  2112  	}
  2113  	c.urlParams_.Set("alt", alt)
  2114  	c.urlParams_.Set("prettyPrint", "false")
  2115  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/instances")
  2116  	urls += "?" + c.urlParams_.Encode()
  2117  	req, err := http.NewRequest("POST", urls, body)
  2118  	if err != nil {
  2119  		return nil, err
  2120  	}
  2121  	req.Header = reqHeaders
  2122  	googleapi.Expand(req.URL, map[string]string{
  2123  		"parent": c.parent,
  2124  	})
  2125  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2126  }
  2127  
  2128  // Do executes the "memcache.projects.locations.instances.create" call.
  2129  // Any non-2xx status code is an error. Response headers are in either
  2130  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  2131  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2132  // whether the returned error was because http.StatusNotModified was returned.
  2133  func (c *ProjectsLocationsInstancesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2134  	gensupport.SetOptions(c.urlParams_, opts...)
  2135  	res, err := c.doRequest("json")
  2136  	if res != nil && res.StatusCode == http.StatusNotModified {
  2137  		if res.Body != nil {
  2138  			res.Body.Close()
  2139  		}
  2140  		return nil, gensupport.WrapError(&googleapi.Error{
  2141  			Code:   res.StatusCode,
  2142  			Header: res.Header,
  2143  		})
  2144  	}
  2145  	if err != nil {
  2146  		return nil, err
  2147  	}
  2148  	defer googleapi.CloseBody(res)
  2149  	if err := googleapi.CheckResponse(res); err != nil {
  2150  		return nil, gensupport.WrapError(err)
  2151  	}
  2152  	ret := &Operation{
  2153  		ServerResponse: googleapi.ServerResponse{
  2154  			Header:         res.Header,
  2155  			HTTPStatusCode: res.StatusCode,
  2156  		},
  2157  	}
  2158  	target := &ret
  2159  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2160  		return nil, err
  2161  	}
  2162  	return ret, nil
  2163  }
  2164  
  2165  type ProjectsLocationsInstancesDeleteCall struct {
  2166  	s          *Service
  2167  	name       string
  2168  	urlParams_ gensupport.URLParams
  2169  	ctx_       context.Context
  2170  	header_    http.Header
  2171  }
  2172  
  2173  // Delete: Deletes a single Instance.
  2174  //
  2175  //   - name: Memcached instance resource name in the format:
  2176  //     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
  2177  //     where `location_id` refers to a GCP region.
  2178  func (r *ProjectsLocationsInstancesService) Delete(name string) *ProjectsLocationsInstancesDeleteCall {
  2179  	c := &ProjectsLocationsInstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2180  	c.name = name
  2181  	return c
  2182  }
  2183  
  2184  // Fields allows partial responses to be retrieved. See
  2185  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2186  // details.
  2187  func (c *ProjectsLocationsInstancesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesDeleteCall {
  2188  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2189  	return c
  2190  }
  2191  
  2192  // Context sets the context to be used in this call's Do method.
  2193  func (c *ProjectsLocationsInstancesDeleteCall) Context(ctx context.Context) *ProjectsLocationsInstancesDeleteCall {
  2194  	c.ctx_ = ctx
  2195  	return c
  2196  }
  2197  
  2198  // Header returns a http.Header that can be modified by the caller to add
  2199  // headers to the request.
  2200  func (c *ProjectsLocationsInstancesDeleteCall) Header() http.Header {
  2201  	if c.header_ == nil {
  2202  		c.header_ = make(http.Header)
  2203  	}
  2204  	return c.header_
  2205  }
  2206  
  2207  func (c *ProjectsLocationsInstancesDeleteCall) doRequest(alt string) (*http.Response, error) {
  2208  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2209  	var body io.Reader = nil
  2210  	c.urlParams_.Set("alt", alt)
  2211  	c.urlParams_.Set("prettyPrint", "false")
  2212  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  2213  	urls += "?" + c.urlParams_.Encode()
  2214  	req, err := http.NewRequest("DELETE", urls, body)
  2215  	if err != nil {
  2216  		return nil, err
  2217  	}
  2218  	req.Header = reqHeaders
  2219  	googleapi.Expand(req.URL, map[string]string{
  2220  		"name": c.name,
  2221  	})
  2222  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2223  }
  2224  
  2225  // Do executes the "memcache.projects.locations.instances.delete" call.
  2226  // Any non-2xx status code is an error. Response headers are in either
  2227  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  2228  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2229  // whether the returned error was because http.StatusNotModified was returned.
  2230  func (c *ProjectsLocationsInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2231  	gensupport.SetOptions(c.urlParams_, opts...)
  2232  	res, err := c.doRequest("json")
  2233  	if res != nil && res.StatusCode == http.StatusNotModified {
  2234  		if res.Body != nil {
  2235  			res.Body.Close()
  2236  		}
  2237  		return nil, gensupport.WrapError(&googleapi.Error{
  2238  			Code:   res.StatusCode,
  2239  			Header: res.Header,
  2240  		})
  2241  	}
  2242  	if err != nil {
  2243  		return nil, err
  2244  	}
  2245  	defer googleapi.CloseBody(res)
  2246  	if err := googleapi.CheckResponse(res); err != nil {
  2247  		return nil, gensupport.WrapError(err)
  2248  	}
  2249  	ret := &Operation{
  2250  		ServerResponse: googleapi.ServerResponse{
  2251  			Header:         res.Header,
  2252  			HTTPStatusCode: res.StatusCode,
  2253  		},
  2254  	}
  2255  	target := &ret
  2256  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2257  		return nil, err
  2258  	}
  2259  	return ret, nil
  2260  }
  2261  
  2262  type ProjectsLocationsInstancesGetCall struct {
  2263  	s            *Service
  2264  	name         string
  2265  	urlParams_   gensupport.URLParams
  2266  	ifNoneMatch_ string
  2267  	ctx_         context.Context
  2268  	header_      http.Header
  2269  }
  2270  
  2271  // Get: Gets details of a single Instance.
  2272  //
  2273  //   - name: Memcached instance resource name in the format:
  2274  //     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
  2275  //     where `location_id` refers to a GCP region.
  2276  func (r *ProjectsLocationsInstancesService) Get(name string) *ProjectsLocationsInstancesGetCall {
  2277  	c := &ProjectsLocationsInstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2278  	c.name = name
  2279  	return c
  2280  }
  2281  
  2282  // Fields allows partial responses to be retrieved. See
  2283  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2284  // details.
  2285  func (c *ProjectsLocationsInstancesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesGetCall {
  2286  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2287  	return c
  2288  }
  2289  
  2290  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2291  // object's ETag matches the given value. This is useful for getting updates
  2292  // only after the object has changed since the last request.
  2293  func (c *ProjectsLocationsInstancesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesGetCall {
  2294  	c.ifNoneMatch_ = entityTag
  2295  	return c
  2296  }
  2297  
  2298  // Context sets the context to be used in this call's Do method.
  2299  func (c *ProjectsLocationsInstancesGetCall) Context(ctx context.Context) *ProjectsLocationsInstancesGetCall {
  2300  	c.ctx_ = ctx
  2301  	return c
  2302  }
  2303  
  2304  // Header returns a http.Header that can be modified by the caller to add
  2305  // headers to the request.
  2306  func (c *ProjectsLocationsInstancesGetCall) Header() http.Header {
  2307  	if c.header_ == nil {
  2308  		c.header_ = make(http.Header)
  2309  	}
  2310  	return c.header_
  2311  }
  2312  
  2313  func (c *ProjectsLocationsInstancesGetCall) doRequest(alt string) (*http.Response, error) {
  2314  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2315  	if c.ifNoneMatch_ != "" {
  2316  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2317  	}
  2318  	var body io.Reader = nil
  2319  	c.urlParams_.Set("alt", alt)
  2320  	c.urlParams_.Set("prettyPrint", "false")
  2321  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  2322  	urls += "?" + c.urlParams_.Encode()
  2323  	req, err := http.NewRequest("GET", urls, body)
  2324  	if err != nil {
  2325  		return nil, err
  2326  	}
  2327  	req.Header = reqHeaders
  2328  	googleapi.Expand(req.URL, map[string]string{
  2329  		"name": c.name,
  2330  	})
  2331  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2332  }
  2333  
  2334  // Do executes the "memcache.projects.locations.instances.get" call.
  2335  // Any non-2xx status code is an error. Response headers are in either
  2336  // *Instance.ServerResponse.Header or (if a response was returned at all) in
  2337  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2338  // whether the returned error was because http.StatusNotModified was returned.
  2339  func (c *ProjectsLocationsInstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, error) {
  2340  	gensupport.SetOptions(c.urlParams_, opts...)
  2341  	res, err := c.doRequest("json")
  2342  	if res != nil && res.StatusCode == http.StatusNotModified {
  2343  		if res.Body != nil {
  2344  			res.Body.Close()
  2345  		}
  2346  		return nil, gensupport.WrapError(&googleapi.Error{
  2347  			Code:   res.StatusCode,
  2348  			Header: res.Header,
  2349  		})
  2350  	}
  2351  	if err != nil {
  2352  		return nil, err
  2353  	}
  2354  	defer googleapi.CloseBody(res)
  2355  	if err := googleapi.CheckResponse(res); err != nil {
  2356  		return nil, gensupport.WrapError(err)
  2357  	}
  2358  	ret := &Instance{
  2359  		ServerResponse: googleapi.ServerResponse{
  2360  			Header:         res.Header,
  2361  			HTTPStatusCode: res.StatusCode,
  2362  		},
  2363  	}
  2364  	target := &ret
  2365  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2366  		return nil, err
  2367  	}
  2368  	return ret, nil
  2369  }
  2370  
  2371  type ProjectsLocationsInstancesListCall struct {
  2372  	s            *Service
  2373  	parent       string
  2374  	urlParams_   gensupport.URLParams
  2375  	ifNoneMatch_ string
  2376  	ctx_         context.Context
  2377  	header_      http.Header
  2378  }
  2379  
  2380  // List: Lists Instances in a given location.
  2381  //
  2382  //   - parent: The resource name of the instance location using the form:
  2383  //     `projects/{project_id}/locations/{location_id}` where `location_id` refers
  2384  //     to a GCP region.
  2385  func (r *ProjectsLocationsInstancesService) List(parent string) *ProjectsLocationsInstancesListCall {
  2386  	c := &ProjectsLocationsInstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2387  	c.parent = parent
  2388  	return c
  2389  }
  2390  
  2391  // Filter sets the optional parameter "filter": List filter. For example,
  2392  // exclude all Memcached instances with name as my-instance by specifying
  2393  // "name != my-instance".
  2394  func (c *ProjectsLocationsInstancesListCall) Filter(filter string) *ProjectsLocationsInstancesListCall {
  2395  	c.urlParams_.Set("filter", filter)
  2396  	return c
  2397  }
  2398  
  2399  // OrderBy sets the optional parameter "orderBy": Sort results. Supported
  2400  // values are "name", "name desc" or "" (unsorted).
  2401  func (c *ProjectsLocationsInstancesListCall) OrderBy(orderBy string) *ProjectsLocationsInstancesListCall {
  2402  	c.urlParams_.Set("orderBy", orderBy)
  2403  	return c
  2404  }
  2405  
  2406  // PageSize sets the optional parameter "pageSize": The maximum number of items
  2407  // to return. If not specified, a default value of 1000 will be used by the
  2408  // service. Regardless of the `page_size` value, the response may include a
  2409  // partial list and a caller should only rely on response's `next_page_token`
  2410  // to determine if there are more instances left to be queried.
  2411  func (c *ProjectsLocationsInstancesListCall) PageSize(pageSize int64) *ProjectsLocationsInstancesListCall {
  2412  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2413  	return c
  2414  }
  2415  
  2416  // PageToken sets the optional parameter "pageToken": The `next_page_token`
  2417  // value returned from a previous List request, if any.
  2418  func (c *ProjectsLocationsInstancesListCall) PageToken(pageToken string) *ProjectsLocationsInstancesListCall {
  2419  	c.urlParams_.Set("pageToken", pageToken)
  2420  	return c
  2421  }
  2422  
  2423  // Fields allows partial responses to be retrieved. See
  2424  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2425  // details.
  2426  func (c *ProjectsLocationsInstancesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesListCall {
  2427  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2428  	return c
  2429  }
  2430  
  2431  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2432  // object's ETag matches the given value. This is useful for getting updates
  2433  // only after the object has changed since the last request.
  2434  func (c *ProjectsLocationsInstancesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesListCall {
  2435  	c.ifNoneMatch_ = entityTag
  2436  	return c
  2437  }
  2438  
  2439  // Context sets the context to be used in this call's Do method.
  2440  func (c *ProjectsLocationsInstancesListCall) Context(ctx context.Context) *ProjectsLocationsInstancesListCall {
  2441  	c.ctx_ = ctx
  2442  	return c
  2443  }
  2444  
  2445  // Header returns a http.Header that can be modified by the caller to add
  2446  // headers to the request.
  2447  func (c *ProjectsLocationsInstancesListCall) Header() http.Header {
  2448  	if c.header_ == nil {
  2449  		c.header_ = make(http.Header)
  2450  	}
  2451  	return c.header_
  2452  }
  2453  
  2454  func (c *ProjectsLocationsInstancesListCall) doRequest(alt string) (*http.Response, error) {
  2455  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2456  	if c.ifNoneMatch_ != "" {
  2457  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2458  	}
  2459  	var body io.Reader = nil
  2460  	c.urlParams_.Set("alt", alt)
  2461  	c.urlParams_.Set("prettyPrint", "false")
  2462  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/instances")
  2463  	urls += "?" + c.urlParams_.Encode()
  2464  	req, err := http.NewRequest("GET", urls, body)
  2465  	if err != nil {
  2466  		return nil, err
  2467  	}
  2468  	req.Header = reqHeaders
  2469  	googleapi.Expand(req.URL, map[string]string{
  2470  		"parent": c.parent,
  2471  	})
  2472  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2473  }
  2474  
  2475  // Do executes the "memcache.projects.locations.instances.list" call.
  2476  // Any non-2xx status code is an error. Response headers are in either
  2477  // *ListInstancesResponse.ServerResponse.Header or (if a response was returned
  2478  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2479  // check whether the returned error was because http.StatusNotModified was
  2480  // returned.
  2481  func (c *ProjectsLocationsInstancesListCall) Do(opts ...googleapi.CallOption) (*ListInstancesResponse, error) {
  2482  	gensupport.SetOptions(c.urlParams_, opts...)
  2483  	res, err := c.doRequest("json")
  2484  	if res != nil && res.StatusCode == http.StatusNotModified {
  2485  		if res.Body != nil {
  2486  			res.Body.Close()
  2487  		}
  2488  		return nil, gensupport.WrapError(&googleapi.Error{
  2489  			Code:   res.StatusCode,
  2490  			Header: res.Header,
  2491  		})
  2492  	}
  2493  	if err != nil {
  2494  		return nil, err
  2495  	}
  2496  	defer googleapi.CloseBody(res)
  2497  	if err := googleapi.CheckResponse(res); err != nil {
  2498  		return nil, gensupport.WrapError(err)
  2499  	}
  2500  	ret := &ListInstancesResponse{
  2501  		ServerResponse: googleapi.ServerResponse{
  2502  			Header:         res.Header,
  2503  			HTTPStatusCode: res.StatusCode,
  2504  		},
  2505  	}
  2506  	target := &ret
  2507  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2508  		return nil, err
  2509  	}
  2510  	return ret, nil
  2511  }
  2512  
  2513  // Pages invokes f for each page of results.
  2514  // A non-nil error returned from f will halt the iteration.
  2515  // The provided context supersedes any context provided to the Context method.
  2516  func (c *ProjectsLocationsInstancesListCall) Pages(ctx context.Context, f func(*ListInstancesResponse) error) error {
  2517  	c.ctx_ = ctx
  2518  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  2519  	for {
  2520  		x, err := c.Do()
  2521  		if err != nil {
  2522  			return err
  2523  		}
  2524  		if err := f(x); err != nil {
  2525  			return err
  2526  		}
  2527  		if x.NextPageToken == "" {
  2528  			return nil
  2529  		}
  2530  		c.PageToken(x.NextPageToken)
  2531  	}
  2532  }
  2533  
  2534  type ProjectsLocationsInstancesPatchCall struct {
  2535  	s          *Service
  2536  	name       string
  2537  	instance   *Instance
  2538  	urlParams_ gensupport.URLParams
  2539  	ctx_       context.Context
  2540  	header_    http.Header
  2541  }
  2542  
  2543  // Patch: Updates an existing Instance in a given project and location.
  2544  //
  2545  //   - name: Unique name of the resource in this scope including project and
  2546  //     location using the form:
  2547  //     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
  2548  //     Note: Memcached instances are managed and addressed at the regional level
  2549  //     so `location_id` here refers to a Google Cloud region; however, users may
  2550  //     choose which zones Memcached nodes should be provisioned in within an
  2551  //     instance. Refer to zones field for more details.
  2552  func (r *ProjectsLocationsInstancesService) Patch(name string, instance *Instance) *ProjectsLocationsInstancesPatchCall {
  2553  	c := &ProjectsLocationsInstancesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2554  	c.name = name
  2555  	c.instance = instance
  2556  	return c
  2557  }
  2558  
  2559  // UpdateMask sets the optional parameter "updateMask": Required. Mask of
  2560  // fields to update. * `displayName`
  2561  func (c *ProjectsLocationsInstancesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsInstancesPatchCall {
  2562  	c.urlParams_.Set("updateMask", updateMask)
  2563  	return c
  2564  }
  2565  
  2566  // Fields allows partial responses to be retrieved. See
  2567  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2568  // details.
  2569  func (c *ProjectsLocationsInstancesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesPatchCall {
  2570  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2571  	return c
  2572  }
  2573  
  2574  // Context sets the context to be used in this call's Do method.
  2575  func (c *ProjectsLocationsInstancesPatchCall) Context(ctx context.Context) *ProjectsLocationsInstancesPatchCall {
  2576  	c.ctx_ = ctx
  2577  	return c
  2578  }
  2579  
  2580  // Header returns a http.Header that can be modified by the caller to add
  2581  // headers to the request.
  2582  func (c *ProjectsLocationsInstancesPatchCall) Header() http.Header {
  2583  	if c.header_ == nil {
  2584  		c.header_ = make(http.Header)
  2585  	}
  2586  	return c.header_
  2587  }
  2588  
  2589  func (c *ProjectsLocationsInstancesPatchCall) doRequest(alt string) (*http.Response, error) {
  2590  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2591  	var body io.Reader = nil
  2592  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instance)
  2593  	if err != nil {
  2594  		return nil, err
  2595  	}
  2596  	c.urlParams_.Set("alt", alt)
  2597  	c.urlParams_.Set("prettyPrint", "false")
  2598  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  2599  	urls += "?" + c.urlParams_.Encode()
  2600  	req, err := http.NewRequest("PATCH", urls, body)
  2601  	if err != nil {
  2602  		return nil, err
  2603  	}
  2604  	req.Header = reqHeaders
  2605  	googleapi.Expand(req.URL, map[string]string{
  2606  		"name": c.name,
  2607  	})
  2608  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2609  }
  2610  
  2611  // Do executes the "memcache.projects.locations.instances.patch" call.
  2612  // Any non-2xx status code is an error. Response headers are in either
  2613  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  2614  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2615  // whether the returned error was because http.StatusNotModified was returned.
  2616  func (c *ProjectsLocationsInstancesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2617  	gensupport.SetOptions(c.urlParams_, opts...)
  2618  	res, err := c.doRequest("json")
  2619  	if res != nil && res.StatusCode == http.StatusNotModified {
  2620  		if res.Body != nil {
  2621  			res.Body.Close()
  2622  		}
  2623  		return nil, gensupport.WrapError(&googleapi.Error{
  2624  			Code:   res.StatusCode,
  2625  			Header: res.Header,
  2626  		})
  2627  	}
  2628  	if err != nil {
  2629  		return nil, err
  2630  	}
  2631  	defer googleapi.CloseBody(res)
  2632  	if err := googleapi.CheckResponse(res); err != nil {
  2633  		return nil, gensupport.WrapError(err)
  2634  	}
  2635  	ret := &Operation{
  2636  		ServerResponse: googleapi.ServerResponse{
  2637  			Header:         res.Header,
  2638  			HTTPStatusCode: res.StatusCode,
  2639  		},
  2640  	}
  2641  	target := &ret
  2642  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2643  		return nil, err
  2644  	}
  2645  	return ret, nil
  2646  }
  2647  
  2648  type ProjectsLocationsInstancesRescheduleMaintenanceCall struct {
  2649  	s                            *Service
  2650  	instance                     string
  2651  	reschedulemaintenancerequest *RescheduleMaintenanceRequest
  2652  	urlParams_                   gensupport.URLParams
  2653  	ctx_                         context.Context
  2654  	header_                      http.Header
  2655  }
  2656  
  2657  // RescheduleMaintenance: Reschedules upcoming maintenance event.
  2658  //
  2659  //   - instance: Memcache instance resource name using the form:
  2660  //     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
  2661  //     where `location_id` refers to a GCP region.
  2662  func (r *ProjectsLocationsInstancesService) RescheduleMaintenance(instance string, reschedulemaintenancerequest *RescheduleMaintenanceRequest) *ProjectsLocationsInstancesRescheduleMaintenanceCall {
  2663  	c := &ProjectsLocationsInstancesRescheduleMaintenanceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2664  	c.instance = instance
  2665  	c.reschedulemaintenancerequest = reschedulemaintenancerequest
  2666  	return c
  2667  }
  2668  
  2669  // Fields allows partial responses to be retrieved. See
  2670  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2671  // details.
  2672  func (c *ProjectsLocationsInstancesRescheduleMaintenanceCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesRescheduleMaintenanceCall {
  2673  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2674  	return c
  2675  }
  2676  
  2677  // Context sets the context to be used in this call's Do method.
  2678  func (c *ProjectsLocationsInstancesRescheduleMaintenanceCall) Context(ctx context.Context) *ProjectsLocationsInstancesRescheduleMaintenanceCall {
  2679  	c.ctx_ = ctx
  2680  	return c
  2681  }
  2682  
  2683  // Header returns a http.Header that can be modified by the caller to add
  2684  // headers to the request.
  2685  func (c *ProjectsLocationsInstancesRescheduleMaintenanceCall) Header() http.Header {
  2686  	if c.header_ == nil {
  2687  		c.header_ = make(http.Header)
  2688  	}
  2689  	return c.header_
  2690  }
  2691  
  2692  func (c *ProjectsLocationsInstancesRescheduleMaintenanceCall) doRequest(alt string) (*http.Response, error) {
  2693  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2694  	var body io.Reader = nil
  2695  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.reschedulemaintenancerequest)
  2696  	if err != nil {
  2697  		return nil, err
  2698  	}
  2699  	c.urlParams_.Set("alt", alt)
  2700  	c.urlParams_.Set("prettyPrint", "false")
  2701  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+instance}:rescheduleMaintenance")
  2702  	urls += "?" + c.urlParams_.Encode()
  2703  	req, err := http.NewRequest("POST", urls, body)
  2704  	if err != nil {
  2705  		return nil, err
  2706  	}
  2707  	req.Header = reqHeaders
  2708  	googleapi.Expand(req.URL, map[string]string{
  2709  		"instance": c.instance,
  2710  	})
  2711  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2712  }
  2713  
  2714  // Do executes the "memcache.projects.locations.instances.rescheduleMaintenance" call.
  2715  // Any non-2xx status code is an error. Response headers are in either
  2716  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  2717  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2718  // whether the returned error was because http.StatusNotModified was returned.
  2719  func (c *ProjectsLocationsInstancesRescheduleMaintenanceCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2720  	gensupport.SetOptions(c.urlParams_, opts...)
  2721  	res, err := c.doRequest("json")
  2722  	if res != nil && res.StatusCode == http.StatusNotModified {
  2723  		if res.Body != nil {
  2724  			res.Body.Close()
  2725  		}
  2726  		return nil, gensupport.WrapError(&googleapi.Error{
  2727  			Code:   res.StatusCode,
  2728  			Header: res.Header,
  2729  		})
  2730  	}
  2731  	if err != nil {
  2732  		return nil, err
  2733  	}
  2734  	defer googleapi.CloseBody(res)
  2735  	if err := googleapi.CheckResponse(res); err != nil {
  2736  		return nil, gensupport.WrapError(err)
  2737  	}
  2738  	ret := &Operation{
  2739  		ServerResponse: googleapi.ServerResponse{
  2740  			Header:         res.Header,
  2741  			HTTPStatusCode: res.StatusCode,
  2742  		},
  2743  	}
  2744  	target := &ret
  2745  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2746  		return nil, err
  2747  	}
  2748  	return ret, nil
  2749  }
  2750  
  2751  type ProjectsLocationsInstancesUpdateParametersCall struct {
  2752  	s                       *Service
  2753  	name                    string
  2754  	updateparametersrequest *UpdateParametersRequest
  2755  	urlParams_              gensupport.URLParams
  2756  	ctx_                    context.Context
  2757  	header_                 http.Header
  2758  }
  2759  
  2760  // UpdateParameters: Updates the defined Memcached parameters for an existing
  2761  // instance. This method only stages the parameters, it must be followed by
  2762  // `ApplyParameters` to apply the parameters to nodes of the Memcached
  2763  // instance.
  2764  //
  2765  //   - name: Resource name of the Memcached instance for which the parameters
  2766  //     should be updated.
  2767  func (r *ProjectsLocationsInstancesService) UpdateParameters(name string, updateparametersrequest *UpdateParametersRequest) *ProjectsLocationsInstancesUpdateParametersCall {
  2768  	c := &ProjectsLocationsInstancesUpdateParametersCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2769  	c.name = name
  2770  	c.updateparametersrequest = updateparametersrequest
  2771  	return c
  2772  }
  2773  
  2774  // Fields allows partial responses to be retrieved. See
  2775  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2776  // details.
  2777  func (c *ProjectsLocationsInstancesUpdateParametersCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesUpdateParametersCall {
  2778  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2779  	return c
  2780  }
  2781  
  2782  // Context sets the context to be used in this call's Do method.
  2783  func (c *ProjectsLocationsInstancesUpdateParametersCall) Context(ctx context.Context) *ProjectsLocationsInstancesUpdateParametersCall {
  2784  	c.ctx_ = ctx
  2785  	return c
  2786  }
  2787  
  2788  // Header returns a http.Header that can be modified by the caller to add
  2789  // headers to the request.
  2790  func (c *ProjectsLocationsInstancesUpdateParametersCall) Header() http.Header {
  2791  	if c.header_ == nil {
  2792  		c.header_ = make(http.Header)
  2793  	}
  2794  	return c.header_
  2795  }
  2796  
  2797  func (c *ProjectsLocationsInstancesUpdateParametersCall) doRequest(alt string) (*http.Response, error) {
  2798  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2799  	var body io.Reader = nil
  2800  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.updateparametersrequest)
  2801  	if err != nil {
  2802  		return nil, err
  2803  	}
  2804  	c.urlParams_.Set("alt", alt)
  2805  	c.urlParams_.Set("prettyPrint", "false")
  2806  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:updateParameters")
  2807  	urls += "?" + c.urlParams_.Encode()
  2808  	req, err := http.NewRequest("PATCH", urls, body)
  2809  	if err != nil {
  2810  		return nil, err
  2811  	}
  2812  	req.Header = reqHeaders
  2813  	googleapi.Expand(req.URL, map[string]string{
  2814  		"name": c.name,
  2815  	})
  2816  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2817  }
  2818  
  2819  // Do executes the "memcache.projects.locations.instances.updateParameters" call.
  2820  // Any non-2xx status code is an error. Response headers are in either
  2821  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  2822  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2823  // whether the returned error was because http.StatusNotModified was returned.
  2824  func (c *ProjectsLocationsInstancesUpdateParametersCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2825  	gensupport.SetOptions(c.urlParams_, opts...)
  2826  	res, err := c.doRequest("json")
  2827  	if res != nil && res.StatusCode == http.StatusNotModified {
  2828  		if res.Body != nil {
  2829  			res.Body.Close()
  2830  		}
  2831  		return nil, gensupport.WrapError(&googleapi.Error{
  2832  			Code:   res.StatusCode,
  2833  			Header: res.Header,
  2834  		})
  2835  	}
  2836  	if err != nil {
  2837  		return nil, err
  2838  	}
  2839  	defer googleapi.CloseBody(res)
  2840  	if err := googleapi.CheckResponse(res); err != nil {
  2841  		return nil, gensupport.WrapError(err)
  2842  	}
  2843  	ret := &Operation{
  2844  		ServerResponse: googleapi.ServerResponse{
  2845  			Header:         res.Header,
  2846  			HTTPStatusCode: res.StatusCode,
  2847  		},
  2848  	}
  2849  	target := &ret
  2850  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2851  		return nil, err
  2852  	}
  2853  	return ret, nil
  2854  }
  2855  
  2856  type ProjectsLocationsInstancesUpgradeCall struct {
  2857  	s                                           *Service
  2858  	name                                        string
  2859  	googlecloudmemcachev1upgradeinstancerequest *GoogleCloudMemcacheV1UpgradeInstanceRequest
  2860  	urlParams_                                  gensupport.URLParams
  2861  	ctx_                                        context.Context
  2862  	header_                                     http.Header
  2863  }
  2864  
  2865  // Upgrade: Upgrades the Memcache instance to a newer memcached engine version
  2866  // specified in the request.
  2867  //
  2868  //   - name: Memcache instance resource name using the form:
  2869  //     `projects/{project}/locations/{location}/instances/{instance}` where
  2870  //     `location_id` refers to a GCP region.
  2871  func (r *ProjectsLocationsInstancesService) Upgrade(name string, googlecloudmemcachev1upgradeinstancerequest *GoogleCloudMemcacheV1UpgradeInstanceRequest) *ProjectsLocationsInstancesUpgradeCall {
  2872  	c := &ProjectsLocationsInstancesUpgradeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2873  	c.name = name
  2874  	c.googlecloudmemcachev1upgradeinstancerequest = googlecloudmemcachev1upgradeinstancerequest
  2875  	return c
  2876  }
  2877  
  2878  // Fields allows partial responses to be retrieved. See
  2879  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2880  // details.
  2881  func (c *ProjectsLocationsInstancesUpgradeCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesUpgradeCall {
  2882  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2883  	return c
  2884  }
  2885  
  2886  // Context sets the context to be used in this call's Do method.
  2887  func (c *ProjectsLocationsInstancesUpgradeCall) Context(ctx context.Context) *ProjectsLocationsInstancesUpgradeCall {
  2888  	c.ctx_ = ctx
  2889  	return c
  2890  }
  2891  
  2892  // Header returns a http.Header that can be modified by the caller to add
  2893  // headers to the request.
  2894  func (c *ProjectsLocationsInstancesUpgradeCall) Header() http.Header {
  2895  	if c.header_ == nil {
  2896  		c.header_ = make(http.Header)
  2897  	}
  2898  	return c.header_
  2899  }
  2900  
  2901  func (c *ProjectsLocationsInstancesUpgradeCall) doRequest(alt string) (*http.Response, error) {
  2902  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2903  	var body io.Reader = nil
  2904  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmemcachev1upgradeinstancerequest)
  2905  	if err != nil {
  2906  		return nil, err
  2907  	}
  2908  	c.urlParams_.Set("alt", alt)
  2909  	c.urlParams_.Set("prettyPrint", "false")
  2910  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:upgrade")
  2911  	urls += "?" + c.urlParams_.Encode()
  2912  	req, err := http.NewRequest("POST", urls, body)
  2913  	if err != nil {
  2914  		return nil, err
  2915  	}
  2916  	req.Header = reqHeaders
  2917  	googleapi.Expand(req.URL, map[string]string{
  2918  		"name": c.name,
  2919  	})
  2920  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2921  }
  2922  
  2923  // Do executes the "memcache.projects.locations.instances.upgrade" call.
  2924  // Any non-2xx status code is an error. Response headers are in either
  2925  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  2926  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2927  // whether the returned error was because http.StatusNotModified was returned.
  2928  func (c *ProjectsLocationsInstancesUpgradeCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2929  	gensupport.SetOptions(c.urlParams_, opts...)
  2930  	res, err := c.doRequest("json")
  2931  	if res != nil && res.StatusCode == http.StatusNotModified {
  2932  		if res.Body != nil {
  2933  			res.Body.Close()
  2934  		}
  2935  		return nil, gensupport.WrapError(&googleapi.Error{
  2936  			Code:   res.StatusCode,
  2937  			Header: res.Header,
  2938  		})
  2939  	}
  2940  	if err != nil {
  2941  		return nil, err
  2942  	}
  2943  	defer googleapi.CloseBody(res)
  2944  	if err := googleapi.CheckResponse(res); err != nil {
  2945  		return nil, gensupport.WrapError(err)
  2946  	}
  2947  	ret := &Operation{
  2948  		ServerResponse: googleapi.ServerResponse{
  2949  			Header:         res.Header,
  2950  			HTTPStatusCode: res.StatusCode,
  2951  		},
  2952  	}
  2953  	target := &ret
  2954  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2955  		return nil, err
  2956  	}
  2957  	return ret, nil
  2958  }
  2959  
  2960  type ProjectsLocationsOperationsCancelCall struct {
  2961  	s                      *Service
  2962  	name                   string
  2963  	canceloperationrequest *CancelOperationRequest
  2964  	urlParams_             gensupport.URLParams
  2965  	ctx_                   context.Context
  2966  	header_                http.Header
  2967  }
  2968  
  2969  // Cancel: Starts asynchronous cancellation on a long-running operation. The
  2970  // server makes a best effort to cancel the operation, but success is not
  2971  // guaranteed. If the server doesn't support this method, it returns
  2972  // `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or
  2973  // other methods to check whether the cancellation succeeded or whether the
  2974  // operation completed despite cancellation. On successful cancellation, the
  2975  // operation is not deleted; instead, it becomes an operation with an
  2976  // Operation.error value with a google.rpc.Status.code of 1, corresponding to
  2977  // `Code.CANCELLED`.
  2978  //
  2979  // - name: The name of the operation resource to be cancelled.
  2980  func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall {
  2981  	c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2982  	c.name = name
  2983  	c.canceloperationrequest = canceloperationrequest
  2984  	return c
  2985  }
  2986  
  2987  // Fields allows partial responses to be retrieved. See
  2988  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2989  // details.
  2990  func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
  2991  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2992  	return c
  2993  }
  2994  
  2995  // Context sets the context to be used in this call's Do method.
  2996  func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
  2997  	c.ctx_ = ctx
  2998  	return c
  2999  }
  3000  
  3001  // Header returns a http.Header that can be modified by the caller to add
  3002  // headers to the request.
  3003  func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
  3004  	if c.header_ == nil {
  3005  		c.header_ = make(http.Header)
  3006  	}
  3007  	return c.header_
  3008  }
  3009  
  3010  func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
  3011  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3012  	var body io.Reader = nil
  3013  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
  3014  	if err != nil {
  3015  		return nil, err
  3016  	}
  3017  	c.urlParams_.Set("alt", alt)
  3018  	c.urlParams_.Set("prettyPrint", "false")
  3019  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
  3020  	urls += "?" + c.urlParams_.Encode()
  3021  	req, err := http.NewRequest("POST", urls, body)
  3022  	if err != nil {
  3023  		return nil, err
  3024  	}
  3025  	req.Header = reqHeaders
  3026  	googleapi.Expand(req.URL, map[string]string{
  3027  		"name": c.name,
  3028  	})
  3029  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3030  }
  3031  
  3032  // Do executes the "memcache.projects.locations.operations.cancel" call.
  3033  // Any non-2xx status code is an error. Response headers are in either
  3034  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  3035  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3036  // whether the returned error was because http.StatusNotModified was returned.
  3037  func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  3038  	gensupport.SetOptions(c.urlParams_, opts...)
  3039  	res, err := c.doRequest("json")
  3040  	if res != nil && res.StatusCode == http.StatusNotModified {
  3041  		if res.Body != nil {
  3042  			res.Body.Close()
  3043  		}
  3044  		return nil, gensupport.WrapError(&googleapi.Error{
  3045  			Code:   res.StatusCode,
  3046  			Header: res.Header,
  3047  		})
  3048  	}
  3049  	if err != nil {
  3050  		return nil, err
  3051  	}
  3052  	defer googleapi.CloseBody(res)
  3053  	if err := googleapi.CheckResponse(res); err != nil {
  3054  		return nil, gensupport.WrapError(err)
  3055  	}
  3056  	ret := &Empty{
  3057  		ServerResponse: googleapi.ServerResponse{
  3058  			Header:         res.Header,
  3059  			HTTPStatusCode: res.StatusCode,
  3060  		},
  3061  	}
  3062  	target := &ret
  3063  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3064  		return nil, err
  3065  	}
  3066  	return ret, nil
  3067  }
  3068  
  3069  type ProjectsLocationsOperationsDeleteCall struct {
  3070  	s          *Service
  3071  	name       string
  3072  	urlParams_ gensupport.URLParams
  3073  	ctx_       context.Context
  3074  	header_    http.Header
  3075  }
  3076  
  3077  // Delete: Deletes a long-running operation. This method indicates that the
  3078  // client is no longer interested in the operation result. It does not cancel
  3079  // the operation. If the server doesn't support this method, it returns
  3080  // `google.rpc.Code.UNIMPLEMENTED`.
  3081  //
  3082  // - name: The name of the operation resource to be deleted.
  3083  func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall {
  3084  	c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3085  	c.name = name
  3086  	return c
  3087  }
  3088  
  3089  // Fields allows partial responses to be retrieved. See
  3090  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3091  // details.
  3092  func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall {
  3093  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3094  	return c
  3095  }
  3096  
  3097  // Context sets the context to be used in this call's Do method.
  3098  func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall {
  3099  	c.ctx_ = ctx
  3100  	return c
  3101  }
  3102  
  3103  // Header returns a http.Header that can be modified by the caller to add
  3104  // headers to the request.
  3105  func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header {
  3106  	if c.header_ == nil {
  3107  		c.header_ = make(http.Header)
  3108  	}
  3109  	return c.header_
  3110  }
  3111  
  3112  func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
  3113  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3114  	var body io.Reader = nil
  3115  	c.urlParams_.Set("alt", alt)
  3116  	c.urlParams_.Set("prettyPrint", "false")
  3117  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3118  	urls += "?" + c.urlParams_.Encode()
  3119  	req, err := http.NewRequest("DELETE", urls, body)
  3120  	if err != nil {
  3121  		return nil, err
  3122  	}
  3123  	req.Header = reqHeaders
  3124  	googleapi.Expand(req.URL, map[string]string{
  3125  		"name": c.name,
  3126  	})
  3127  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3128  }
  3129  
  3130  // Do executes the "memcache.projects.locations.operations.delete" call.
  3131  // Any non-2xx status code is an error. Response headers are in either
  3132  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  3133  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3134  // whether the returned error was because http.StatusNotModified was returned.
  3135  func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  3136  	gensupport.SetOptions(c.urlParams_, opts...)
  3137  	res, err := c.doRequest("json")
  3138  	if res != nil && res.StatusCode == http.StatusNotModified {
  3139  		if res.Body != nil {
  3140  			res.Body.Close()
  3141  		}
  3142  		return nil, gensupport.WrapError(&googleapi.Error{
  3143  			Code:   res.StatusCode,
  3144  			Header: res.Header,
  3145  		})
  3146  	}
  3147  	if err != nil {
  3148  		return nil, err
  3149  	}
  3150  	defer googleapi.CloseBody(res)
  3151  	if err := googleapi.CheckResponse(res); err != nil {
  3152  		return nil, gensupport.WrapError(err)
  3153  	}
  3154  	ret := &Empty{
  3155  		ServerResponse: googleapi.ServerResponse{
  3156  			Header:         res.Header,
  3157  			HTTPStatusCode: res.StatusCode,
  3158  		},
  3159  	}
  3160  	target := &ret
  3161  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3162  		return nil, err
  3163  	}
  3164  	return ret, nil
  3165  }
  3166  
  3167  type ProjectsLocationsOperationsGetCall struct {
  3168  	s            *Service
  3169  	name         string
  3170  	urlParams_   gensupport.URLParams
  3171  	ifNoneMatch_ string
  3172  	ctx_         context.Context
  3173  	header_      http.Header
  3174  }
  3175  
  3176  // Get: Gets the latest state of a long-running operation. Clients can use this
  3177  // method to poll the operation result at intervals as recommended by the API
  3178  // service.
  3179  //
  3180  // - name: The name of the operation resource.
  3181  func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
  3182  	c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3183  	c.name = name
  3184  	return c
  3185  }
  3186  
  3187  // Fields allows partial responses to be retrieved. See
  3188  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3189  // details.
  3190  func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
  3191  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3192  	return c
  3193  }
  3194  
  3195  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3196  // object's ETag matches the given value. This is useful for getting updates
  3197  // only after the object has changed since the last request.
  3198  func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
  3199  	c.ifNoneMatch_ = entityTag
  3200  	return c
  3201  }
  3202  
  3203  // Context sets the context to be used in this call's Do method.
  3204  func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
  3205  	c.ctx_ = ctx
  3206  	return c
  3207  }
  3208  
  3209  // Header returns a http.Header that can be modified by the caller to add
  3210  // headers to the request.
  3211  func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
  3212  	if c.header_ == nil {
  3213  		c.header_ = make(http.Header)
  3214  	}
  3215  	return c.header_
  3216  }
  3217  
  3218  func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  3219  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3220  	if c.ifNoneMatch_ != "" {
  3221  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3222  	}
  3223  	var body io.Reader = nil
  3224  	c.urlParams_.Set("alt", alt)
  3225  	c.urlParams_.Set("prettyPrint", "false")
  3226  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3227  	urls += "?" + c.urlParams_.Encode()
  3228  	req, err := http.NewRequest("GET", urls, body)
  3229  	if err != nil {
  3230  		return nil, err
  3231  	}
  3232  	req.Header = reqHeaders
  3233  	googleapi.Expand(req.URL, map[string]string{
  3234  		"name": c.name,
  3235  	})
  3236  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3237  }
  3238  
  3239  // Do executes the "memcache.projects.locations.operations.get" call.
  3240  // Any non-2xx status code is an error. Response headers are in either
  3241  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3242  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3243  // whether the returned error was because http.StatusNotModified was returned.
  3244  func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3245  	gensupport.SetOptions(c.urlParams_, opts...)
  3246  	res, err := c.doRequest("json")
  3247  	if res != nil && res.StatusCode == http.StatusNotModified {
  3248  		if res.Body != nil {
  3249  			res.Body.Close()
  3250  		}
  3251  		return nil, gensupport.WrapError(&googleapi.Error{
  3252  			Code:   res.StatusCode,
  3253  			Header: res.Header,
  3254  		})
  3255  	}
  3256  	if err != nil {
  3257  		return nil, err
  3258  	}
  3259  	defer googleapi.CloseBody(res)
  3260  	if err := googleapi.CheckResponse(res); err != nil {
  3261  		return nil, gensupport.WrapError(err)
  3262  	}
  3263  	ret := &Operation{
  3264  		ServerResponse: googleapi.ServerResponse{
  3265  			Header:         res.Header,
  3266  			HTTPStatusCode: res.StatusCode,
  3267  		},
  3268  	}
  3269  	target := &ret
  3270  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3271  		return nil, err
  3272  	}
  3273  	return ret, nil
  3274  }
  3275  
  3276  type ProjectsLocationsOperationsListCall struct {
  3277  	s            *Service
  3278  	name         string
  3279  	urlParams_   gensupport.URLParams
  3280  	ifNoneMatch_ string
  3281  	ctx_         context.Context
  3282  	header_      http.Header
  3283  }
  3284  
  3285  // List: Lists operations that match the specified filter in the request. If
  3286  // the server doesn't support this method, it returns `UNIMPLEMENTED`.
  3287  //
  3288  // - name: The name of the operation's parent resource.
  3289  func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
  3290  	c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3291  	c.name = name
  3292  	return c
  3293  }
  3294  
  3295  // Filter sets the optional parameter "filter": The standard list filter.
  3296  func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
  3297  	c.urlParams_.Set("filter", filter)
  3298  	return c
  3299  }
  3300  
  3301  // PageSize sets the optional parameter "pageSize": The standard list page
  3302  // size.
  3303  func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
  3304  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3305  	return c
  3306  }
  3307  
  3308  // PageToken sets the optional parameter "pageToken": The standard list page
  3309  // token.
  3310  func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
  3311  	c.urlParams_.Set("pageToken", pageToken)
  3312  	return c
  3313  }
  3314  
  3315  // Fields allows partial responses to be retrieved. See
  3316  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3317  // details.
  3318  func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
  3319  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3320  	return c
  3321  }
  3322  
  3323  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3324  // object's ETag matches the given value. This is useful for getting updates
  3325  // only after the object has changed since the last request.
  3326  func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
  3327  	c.ifNoneMatch_ = entityTag
  3328  	return c
  3329  }
  3330  
  3331  // Context sets the context to be used in this call's Do method.
  3332  func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
  3333  	c.ctx_ = ctx
  3334  	return c
  3335  }
  3336  
  3337  // Header returns a http.Header that can be modified by the caller to add
  3338  // headers to the request.
  3339  func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
  3340  	if c.header_ == nil {
  3341  		c.header_ = make(http.Header)
  3342  	}
  3343  	return c.header_
  3344  }
  3345  
  3346  func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
  3347  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3348  	if c.ifNoneMatch_ != "" {
  3349  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3350  	}
  3351  	var body io.Reader = nil
  3352  	c.urlParams_.Set("alt", alt)
  3353  	c.urlParams_.Set("prettyPrint", "false")
  3354  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations")
  3355  	urls += "?" + c.urlParams_.Encode()
  3356  	req, err := http.NewRequest("GET", urls, body)
  3357  	if err != nil {
  3358  		return nil, err
  3359  	}
  3360  	req.Header = reqHeaders
  3361  	googleapi.Expand(req.URL, map[string]string{
  3362  		"name": c.name,
  3363  	})
  3364  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3365  }
  3366  
  3367  // Do executes the "memcache.projects.locations.operations.list" call.
  3368  // Any non-2xx status code is an error. Response headers are in either
  3369  // *ListOperationsResponse.ServerResponse.Header or (if a response was returned
  3370  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3371  // check whether the returned error was because http.StatusNotModified was
  3372  // returned.
  3373  func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
  3374  	gensupport.SetOptions(c.urlParams_, opts...)
  3375  	res, err := c.doRequest("json")
  3376  	if res != nil && res.StatusCode == http.StatusNotModified {
  3377  		if res.Body != nil {
  3378  			res.Body.Close()
  3379  		}
  3380  		return nil, gensupport.WrapError(&googleapi.Error{
  3381  			Code:   res.StatusCode,
  3382  			Header: res.Header,
  3383  		})
  3384  	}
  3385  	if err != nil {
  3386  		return nil, err
  3387  	}
  3388  	defer googleapi.CloseBody(res)
  3389  	if err := googleapi.CheckResponse(res); err != nil {
  3390  		return nil, gensupport.WrapError(err)
  3391  	}
  3392  	ret := &ListOperationsResponse{
  3393  		ServerResponse: googleapi.ServerResponse{
  3394  			Header:         res.Header,
  3395  			HTTPStatusCode: res.StatusCode,
  3396  		},
  3397  	}
  3398  	target := &ret
  3399  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3400  		return nil, err
  3401  	}
  3402  	return ret, nil
  3403  }
  3404  
  3405  // Pages invokes f for each page of results.
  3406  // A non-nil error returned from f will halt the iteration.
  3407  // The provided context supersedes any context provided to the Context method.
  3408  func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
  3409  	c.ctx_ = ctx
  3410  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3411  	for {
  3412  		x, err := c.Do()
  3413  		if err != nil {
  3414  			return err
  3415  		}
  3416  		if err := f(x); err != nil {
  3417  			return err
  3418  		}
  3419  		if x.NextPageToken == "" {
  3420  			return nil
  3421  		}
  3422  		c.PageToken(x.NextPageToken)
  3423  	}
  3424  }
  3425  

View as plain text