...

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

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

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

View as plain text