...

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

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

     1  // Copyright 2024 Google LLC.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // Code generated file. DO NOT EDIT.
     6  
     7  // Package redis provides access to the Google Cloud Memorystore for Redis API.
     8  //
     9  // This package is DEPRECATED. Use package cloud.google.com/go/redis/apiv1 instead.
    10  //
    11  // For product documentation, see: https://cloud.google.com/memorystore/docs/redis/
    12  //
    13  // # Library status
    14  //
    15  // These client libraries are officially supported by Google. However, this
    16  // library is considered complete and is in maintenance mode. This means
    17  // that we will address critical bugs and security issues but will not add
    18  // any new features.
    19  //
    20  // When possible, we recommend using our newer
    21  // [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)
    22  // that are still actively being worked and iterated on.
    23  //
    24  // # Creating a client
    25  //
    26  // Usage example:
    27  //
    28  //	import "google.golang.org/api/redis/v1beta1"
    29  //	...
    30  //	ctx := context.Background()
    31  //	redisService, err := redis.NewService(ctx)
    32  //
    33  // In this example, Google Application Default Credentials are used for
    34  // authentication. For information on how to create and obtain Application
    35  // Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
    36  //
    37  // # Other authentication options
    38  //
    39  // To use an API key for authentication (note: some APIs do not support API
    40  // keys), use [google.golang.org/api/option.WithAPIKey]:
    41  //
    42  //	redisService, err := redis.NewService(ctx, option.WithAPIKey("AIza..."))
    43  //
    44  // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth
    45  // flow, use [google.golang.org/api/option.WithTokenSource]:
    46  //
    47  //	config := &oauth2.Config{...}
    48  //	// ...
    49  //	token, err := config.Exchange(ctx, ...)
    50  //	redisService, err := redis.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    51  //
    52  // See [google.golang.org/api/option.ClientOption] for details on options.
    53  package redis // import "google.golang.org/api/redis/v1beta1"
    54  
    55  import (
    56  	"bytes"
    57  	"context"
    58  	"encoding/json"
    59  	"errors"
    60  	"fmt"
    61  	"io"
    62  	"net/http"
    63  	"net/url"
    64  	"strconv"
    65  	"strings"
    66  
    67  	googleapi "google.golang.org/api/googleapi"
    68  	internal "google.golang.org/api/internal"
    69  	gensupport "google.golang.org/api/internal/gensupport"
    70  	option "google.golang.org/api/option"
    71  	internaloption "google.golang.org/api/option/internaloption"
    72  	htransport "google.golang.org/api/transport/http"
    73  )
    74  
    75  // Always reference these packages, just in case the auto-generated code
    76  // below doesn't.
    77  var _ = bytes.NewBuffer
    78  var _ = strconv.Itoa
    79  var _ = fmt.Sprintf
    80  var _ = json.NewDecoder
    81  var _ = io.Copy
    82  var _ = url.Parse
    83  var _ = gensupport.MarshalJSON
    84  var _ = googleapi.Version
    85  var _ = errors.New
    86  var _ = strings.Replace
    87  var _ = context.Canceled
    88  var _ = internaloption.WithDefaultEndpoint
    89  var _ = internal.Version
    90  
    91  const apiId = "redis:v1beta1"
    92  const apiName = "redis"
    93  const apiVersion = "v1beta1"
    94  const basePath = "https://redis.googleapis.com/"
    95  const basePathTemplate = "https://redis.UNIVERSE_DOMAIN/"
    96  const mtlsBasePath = "https://redis.mtls.googleapis.com/"
    97  
    98  // OAuth2 scopes used by this API.
    99  const (
   100  	// See, edit, configure, and delete your Google Cloud data and see the email
   101  	// address for your Google Account.
   102  	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
   103  )
   104  
   105  // NewService creates a new Service.
   106  func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
   107  	scopesOption := internaloption.WithDefaultScopes(
   108  		"https://www.googleapis.com/auth/cloud-platform",
   109  	)
   110  	// NOTE: prepend, so we don't override user-specified scopes.
   111  	opts = append([]option.ClientOption{scopesOption}, opts...)
   112  	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
   113  	opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
   114  	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
   115  	opts = append(opts, internaloption.EnableNewAuthLibrary())
   116  	client, endpoint, err := htransport.NewClient(ctx, opts...)
   117  	if err != nil {
   118  		return nil, err
   119  	}
   120  	s, err := New(client)
   121  	if err != nil {
   122  		return nil, err
   123  	}
   124  	if endpoint != "" {
   125  		s.BasePath = endpoint
   126  	}
   127  	return s, nil
   128  }
   129  
   130  // New creates a new Service. It uses the provided http.Client for requests.
   131  //
   132  // Deprecated: please use NewService instead.
   133  // To provide a custom HTTP client, use option.WithHTTPClient.
   134  // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
   135  func New(client *http.Client) (*Service, error) {
   136  	if client == nil {
   137  		return nil, errors.New("client is nil")
   138  	}
   139  	s := &Service{client: client, BasePath: basePath}
   140  	s.Projects = NewProjectsService(s)
   141  	return s, nil
   142  }
   143  
   144  type Service struct {
   145  	client    *http.Client
   146  	BasePath  string // API endpoint base URL
   147  	UserAgent string // optional additional User-Agent fragment
   148  
   149  	Projects *ProjectsService
   150  }
   151  
   152  func (s *Service) userAgent() string {
   153  	if s.UserAgent == "" {
   154  		return googleapi.UserAgent
   155  	}
   156  	return googleapi.UserAgent + " " + s.UserAgent
   157  }
   158  
   159  func NewProjectsService(s *Service) *ProjectsService {
   160  	rs := &ProjectsService{s: s}
   161  	rs.Locations = NewProjectsLocationsService(s)
   162  	return rs
   163  }
   164  
   165  type ProjectsService struct {
   166  	s *Service
   167  
   168  	Locations *ProjectsLocationsService
   169  }
   170  
   171  func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
   172  	rs := &ProjectsLocationsService{s: s}
   173  	rs.Clusters = NewProjectsLocationsClustersService(s)
   174  	rs.Instances = NewProjectsLocationsInstancesService(s)
   175  	rs.Operations = NewProjectsLocationsOperationsService(s)
   176  	return rs
   177  }
   178  
   179  type ProjectsLocationsService struct {
   180  	s *Service
   181  
   182  	Clusters *ProjectsLocationsClustersService
   183  
   184  	Instances *ProjectsLocationsInstancesService
   185  
   186  	Operations *ProjectsLocationsOperationsService
   187  }
   188  
   189  func NewProjectsLocationsClustersService(s *Service) *ProjectsLocationsClustersService {
   190  	rs := &ProjectsLocationsClustersService{s: s}
   191  	return rs
   192  }
   193  
   194  type ProjectsLocationsClustersService struct {
   195  	s *Service
   196  }
   197  
   198  func NewProjectsLocationsInstancesService(s *Service) *ProjectsLocationsInstancesService {
   199  	rs := &ProjectsLocationsInstancesService{s: s}
   200  	return rs
   201  }
   202  
   203  type ProjectsLocationsInstancesService struct {
   204  	s *Service
   205  }
   206  
   207  func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
   208  	rs := &ProjectsLocationsOperationsService{s: s}
   209  	return rs
   210  }
   211  
   212  type ProjectsLocationsOperationsService struct {
   213  	s *Service
   214  }
   215  
   216  // AOFConfig: Configuration of the AOF based persistence.
   217  type AOFConfig struct {
   218  	// AppendFsync: Optional. fsync configuration.
   219  	//
   220  	// Possible values:
   221  	//   "APPEND_FSYNC_UNSPECIFIED" - Not set. Default: EVERYSEC
   222  	//   "NO" - Never fsync. Normally Linux will flush data every 30 seconds with
   223  	// this configuration, but it's up to the kernel's exact tuning.
   224  	//   "EVERYSEC" - fsync every second. Fast enough, and you may lose 1 second of
   225  	// data if there is a disaster
   226  	//   "ALWAYS" - fsync every time new commands are appended to the AOF. It has
   227  	// the best data loss protection at the cost of performance
   228  	AppendFsync string `json:"appendFsync,omitempty"`
   229  	// ForceSendFields is a list of field names (e.g. "AppendFsync") to
   230  	// unconditionally include in API requests. By default, fields with empty or
   231  	// default values are omitted from API requests. See
   232  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   233  	// details.
   234  	ForceSendFields []string `json:"-"`
   235  	// NullFields is a list of field names (e.g. "AppendFsync") to include in API
   236  	// requests with the JSON null value. By default, fields with empty values are
   237  	// omitted from API requests. See
   238  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   239  	NullFields []string `json:"-"`
   240  }
   241  
   242  func (s *AOFConfig) MarshalJSON() ([]byte, error) {
   243  	type NoMethod AOFConfig
   244  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   245  }
   246  
   247  // AvailabilityConfiguration: Configuration for availability of database
   248  // instance
   249  type AvailabilityConfiguration struct {
   250  	// AvailabilityType: Availability type. Potential values: * `ZONAL`: The
   251  	// instance serves data from only one zone. Outages in that zone affect data
   252  	// accessibility. * `REGIONAL`: The instance can serve data from more than one
   253  	// zone in a region (it is highly available).
   254  	//
   255  	// Possible values:
   256  	//   "AVAILABILITY_TYPE_UNSPECIFIED"
   257  	//   "ZONAL" - Zonal available instance.
   258  	//   "REGIONAL" - Regional available instance.
   259  	//   "MULTI_REGIONAL" - Multi regional instance
   260  	//   "AVAILABILITY_TYPE_OTHER" - For rest of the other category
   261  	AvailabilityType string `json:"availabilityType,omitempty"`
   262  	// CrossRegionReplicaConfigured: Checks for resources that are configured to
   263  	// have redundancy, and ongoing replication across regions
   264  	CrossRegionReplicaConfigured bool `json:"crossRegionReplicaConfigured,omitempty"`
   265  	ExternalReplicaConfigured    bool `json:"externalReplicaConfigured,omitempty"`
   266  	PromotableReplicaConfigured  bool `json:"promotableReplicaConfigured,omitempty"`
   267  	// ForceSendFields is a list of field names (e.g. "AvailabilityType") to
   268  	// unconditionally include in API requests. By default, fields with empty or
   269  	// default values are omitted from API requests. See
   270  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   271  	// details.
   272  	ForceSendFields []string `json:"-"`
   273  	// NullFields is a list of field names (e.g. "AvailabilityType") to include in
   274  	// API requests with the JSON null value. By default, fields with empty values
   275  	// are omitted from API requests. See
   276  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   277  	NullFields []string `json:"-"`
   278  }
   279  
   280  func (s *AvailabilityConfiguration) MarshalJSON() ([]byte, error) {
   281  	type NoMethod AvailabilityConfiguration
   282  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   283  }
   284  
   285  // BackupConfiguration: Configuration for automatic backups
   286  type BackupConfiguration struct {
   287  	// AutomatedBackupEnabled: Whether customer visible automated backups are
   288  	// enabled on the instance.
   289  	AutomatedBackupEnabled bool `json:"automatedBackupEnabled,omitempty"`
   290  	// BackupRetentionSettings: Backup retention settings.
   291  	BackupRetentionSettings *RetentionSettings `json:"backupRetentionSettings,omitempty"`
   292  	// PointInTimeRecoveryEnabled: Whether point-in-time recovery is enabled. This
   293  	// is optional field, if the database service does not have this feature or
   294  	// metadata is not available in control plane, this can be omitted.
   295  	PointInTimeRecoveryEnabled bool `json:"pointInTimeRecoveryEnabled,omitempty"`
   296  	// ForceSendFields is a list of field names (e.g. "AutomatedBackupEnabled") to
   297  	// unconditionally include in API requests. By default, fields with empty or
   298  	// default values are omitted from API requests. See
   299  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   300  	// details.
   301  	ForceSendFields []string `json:"-"`
   302  	// NullFields is a list of field names (e.g. "AutomatedBackupEnabled") to
   303  	// include in API requests with the JSON null value. By default, fields with
   304  	// empty values are omitted from API requests. See
   305  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   306  	NullFields []string `json:"-"`
   307  }
   308  
   309  func (s *BackupConfiguration) MarshalJSON() ([]byte, error) {
   310  	type NoMethod BackupConfiguration
   311  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   312  }
   313  
   314  // BackupRun: A backup run.
   315  type BackupRun struct {
   316  	// EndTime: The time the backup operation completed. REQUIRED
   317  	EndTime string `json:"endTime,omitempty"`
   318  	// Error: Information about why the backup operation failed. This is only
   319  	// present if the run has the FAILED status. OPTIONAL
   320  	Error *OperationError `json:"error,omitempty"`
   321  	// StartTime: The time the backup operation started. REQUIRED
   322  	StartTime string `json:"startTime,omitempty"`
   323  	// Status: The status of this run. REQUIRED
   324  	//
   325  	// Possible values:
   326  	//   "STATUS_UNSPECIFIED"
   327  	//   "SUCCESSFUL" - The backup was successful.
   328  	//   "FAILED" - The backup was unsuccessful.
   329  	Status string `json:"status,omitempty"`
   330  	// ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally
   331  	// include in API requests. By default, fields with empty or default values are
   332  	// omitted from API requests. See
   333  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   334  	// details.
   335  	ForceSendFields []string `json:"-"`
   336  	// NullFields is a list of field names (e.g. "EndTime") to include in API
   337  	// requests with the JSON null value. By default, fields with empty values are
   338  	// omitted from API requests. See
   339  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   340  	NullFields []string `json:"-"`
   341  }
   342  
   343  func (s *BackupRun) MarshalJSON() ([]byte, error) {
   344  	type NoMethod BackupRun
   345  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   346  }
   347  
   348  type CertChain struct {
   349  	// Certificates: The certificates that form the CA chain, from leaf to root
   350  	// order.
   351  	Certificates []string `json:"certificates,omitempty"`
   352  	// ForceSendFields is a list of field names (e.g. "Certificates") to
   353  	// unconditionally include in API requests. By default, fields with empty or
   354  	// default values are omitted from API requests. See
   355  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   356  	// details.
   357  	ForceSendFields []string `json:"-"`
   358  	// NullFields is a list of field names (e.g. "Certificates") to include in API
   359  	// requests with the JSON null value. By default, fields with empty values are
   360  	// omitted from API requests. See
   361  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   362  	NullFields []string `json:"-"`
   363  }
   364  
   365  func (s *CertChain) MarshalJSON() ([]byte, error) {
   366  	type NoMethod CertChain
   367  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   368  }
   369  
   370  // CertificateAuthority: Redis cluster certificate authority
   371  type CertificateAuthority struct {
   372  	ManagedServerCa *ManagedCertificateAuthority `json:"managedServerCa,omitempty"`
   373  	// Name: Identifier. Unique name of the resource in this scope including
   374  	// project, location and cluster using the form:
   375  	// `projects/{project}/locations/{location}/clusters/{cluster}/certificateAuthor
   376  	// ity`
   377  	Name string `json:"name,omitempty"`
   378  
   379  	// ServerResponse contains the HTTP response code and headers from the server.
   380  	googleapi.ServerResponse `json:"-"`
   381  	// ForceSendFields is a list of field names (e.g. "ManagedServerCa") to
   382  	// unconditionally include in API requests. By default, fields with empty or
   383  	// default values are omitted from API requests. See
   384  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   385  	// details.
   386  	ForceSendFields []string `json:"-"`
   387  	// NullFields is a list of field names (e.g. "ManagedServerCa") to include in
   388  	// API requests with the JSON null value. By default, fields with empty values
   389  	// are omitted from API requests. See
   390  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   391  	NullFields []string `json:"-"`
   392  }
   393  
   394  func (s *CertificateAuthority) MarshalJSON() ([]byte, error) {
   395  	type NoMethod CertificateAuthority
   396  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   397  }
   398  
   399  // Cluster: A cluster instance.
   400  type Cluster struct {
   401  	// AuthorizationMode: Optional. The authorization mode of the Redis cluster. If
   402  	// not provided, auth feature is disabled for the cluster.
   403  	//
   404  	// Possible values:
   405  	//   "AUTH_MODE_UNSPECIFIED" - Not set.
   406  	//   "AUTH_MODE_IAM_AUTH" - IAM basic authorization mode
   407  	//   "AUTH_MODE_DISABLED" - Authorization disabled mode
   408  	AuthorizationMode string `json:"authorizationMode,omitempty"`
   409  	// CreateTime: Output only. The timestamp associated with the cluster creation
   410  	// request.
   411  	CreateTime string `json:"createTime,omitempty"`
   412  	// DeletionProtectionEnabled: Optional. The delete operation will fail when the
   413  	// value is set to true.
   414  	DeletionProtectionEnabled bool `json:"deletionProtectionEnabled,omitempty"`
   415  	// DiscoveryEndpoints: Output only. Endpoints created on each given network,
   416  	// for Redis clients to connect to the cluster. Currently only one discovery
   417  	// endpoint is supported.
   418  	DiscoveryEndpoints []*DiscoveryEndpoint `json:"discoveryEndpoints,omitempty"`
   419  	// Name: Required. Unique name of the resource in this scope including project
   420  	// and location using the form:
   421  	// `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
   422  	Name string `json:"name,omitempty"`
   423  	// NodeType: Optional. The type of a redis node in the cluster. NodeType
   424  	// determines the underlying machine-type of a redis node.
   425  	//
   426  	// Possible values:
   427  	//   "NODE_TYPE_UNSPECIFIED"
   428  	//   "REDIS_SHARED_CORE_NANO" - Redis shared core nano node_type.
   429  	//   "REDIS_HIGHMEM_MEDIUM" - Redis highmem medium node_type.
   430  	//   "REDIS_HIGHMEM_XLARGE" - Redis highmem xlarge node_type.
   431  	//   "REDIS_STANDARD_SMALL" - Redis standard small node_type.
   432  	NodeType string `json:"nodeType,omitempty"`
   433  	// PersistenceConfig: Optional. Persistence config (RDB, AOF) for the cluster.
   434  	PersistenceConfig *ClusterPersistenceConfig `json:"persistenceConfig,omitempty"`
   435  	// PreciseSizeGb: Output only. Precise value of redis memory size in GB for the
   436  	// entire cluster.
   437  	PreciseSizeGb float64 `json:"preciseSizeGb,omitempty"`
   438  	// PscConfigs: Required. Each PscConfig configures the consumer network where
   439  	// IPs will be designated to the cluster for client access through Private
   440  	// Service Connect Automation. Currently, only one PscConfig is supported.
   441  	PscConfigs []*PscConfig `json:"pscConfigs,omitempty"`
   442  	// PscConnections: Output only. PSC connections for discovery of the cluster
   443  	// topology and accessing the cluster.
   444  	PscConnections []*PscConnection `json:"pscConnections,omitempty"`
   445  	// RedisConfigs: Optional. Key/Value pairs of customer overrides for mutable
   446  	// Redis Configs
   447  	RedisConfigs map[string]string `json:"redisConfigs,omitempty"`
   448  	// ReplicaCount: Optional. The number of replica nodes per shard.
   449  	ReplicaCount int64 `json:"replicaCount,omitempty"`
   450  	// ShardCount: Required. Number of shards for the Redis cluster.
   451  	ShardCount int64 `json:"shardCount,omitempty"`
   452  	// SizeGb: Output only. Redis memory size in GB for the entire cluster rounded
   453  	// up to the next integer.
   454  	SizeGb int64 `json:"sizeGb,omitempty"`
   455  	// State: Output only. The current state of this cluster. Can be CREATING,
   456  	// READY, UPDATING, DELETING and SUSPENDED
   457  	//
   458  	// Possible values:
   459  	//   "STATE_UNSPECIFIED" - Not set.
   460  	//   "CREATING" - Redis cluster is being created.
   461  	//   "ACTIVE" - Redis cluster has been created and is fully usable.
   462  	//   "UPDATING" - Redis cluster configuration is being updated.
   463  	//   "DELETING" - Redis cluster is being deleted.
   464  	State string `json:"state,omitempty"`
   465  	// StateInfo: Output only. Additional information about the current state of
   466  	// the cluster.
   467  	StateInfo *StateInfo `json:"stateInfo,omitempty"`
   468  	// TransitEncryptionMode: Optional. The in-transit encryption for the Redis
   469  	// cluster. If not provided, encryption is disabled for the cluster.
   470  	//
   471  	// Possible values:
   472  	//   "TRANSIT_ENCRYPTION_MODE_UNSPECIFIED" - In-transit encryption not set.
   473  	//   "TRANSIT_ENCRYPTION_MODE_DISABLED" - In-transit encryption disabled.
   474  	//   "TRANSIT_ENCRYPTION_MODE_SERVER_AUTHENTICATION" - Use server managed
   475  	// encryption for in-transit encryption.
   476  	TransitEncryptionMode string `json:"transitEncryptionMode,omitempty"`
   477  	// Uid: Output only. System assigned, unique identifier for the cluster.
   478  	Uid string `json:"uid,omitempty"`
   479  
   480  	// ServerResponse contains the HTTP response code and headers from the server.
   481  	googleapi.ServerResponse `json:"-"`
   482  	// ForceSendFields is a list of field names (e.g. "AuthorizationMode") to
   483  	// unconditionally include in API requests. By default, fields with empty or
   484  	// default values are omitted from API requests. See
   485  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   486  	// details.
   487  	ForceSendFields []string `json:"-"`
   488  	// NullFields is a list of field names (e.g. "AuthorizationMode") to include in
   489  	// API requests with the JSON null value. By default, fields with empty values
   490  	// are omitted from API requests. See
   491  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   492  	NullFields []string `json:"-"`
   493  }
   494  
   495  func (s *Cluster) MarshalJSON() ([]byte, error) {
   496  	type NoMethod Cluster
   497  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   498  }
   499  
   500  func (s *Cluster) UnmarshalJSON(data []byte) error {
   501  	type NoMethod Cluster
   502  	var s1 struct {
   503  		PreciseSizeGb gensupport.JSONFloat64 `json:"preciseSizeGb"`
   504  		*NoMethod
   505  	}
   506  	s1.NoMethod = (*NoMethod)(s)
   507  	if err := json.Unmarshal(data, &s1); err != nil {
   508  		return err
   509  	}
   510  	s.PreciseSizeGb = float64(s1.PreciseSizeGb)
   511  	return nil
   512  }
   513  
   514  // ClusterPersistenceConfig: Configuration of the persistence functionality.
   515  type ClusterPersistenceConfig struct {
   516  	// AofConfig: Optional. AOF configuration. This field will be ignored if mode
   517  	// is not AOF.
   518  	AofConfig *AOFConfig `json:"aofConfig,omitempty"`
   519  	// Mode: Optional. The mode of persistence.
   520  	//
   521  	// Possible values:
   522  	//   "PERSISTENCE_MODE_UNSPECIFIED" - Not set.
   523  	//   "DISABLED" - Persistence is disabled, and any snapshot data is deleted.
   524  	//   "RDB" - RDB based persistence is enabled.
   525  	//   "AOF" - AOF based persistence is enabled.
   526  	Mode string `json:"mode,omitempty"`
   527  	// RdbConfig: Optional. RDB configuration. This field will be ignored if mode
   528  	// is not RDB.
   529  	RdbConfig *RDBConfig `json:"rdbConfig,omitempty"`
   530  	// ForceSendFields is a list of field names (e.g. "AofConfig") to
   531  	// unconditionally include in API requests. By default, fields with empty or
   532  	// default values are omitted from API requests. See
   533  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   534  	// details.
   535  	ForceSendFields []string `json:"-"`
   536  	// NullFields is a list of field names (e.g. "AofConfig") to include in API
   537  	// requests with the JSON null value. By default, fields with empty values are
   538  	// omitted from API requests. See
   539  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   540  	NullFields []string `json:"-"`
   541  }
   542  
   543  func (s *ClusterPersistenceConfig) MarshalJSON() ([]byte, error) {
   544  	type NoMethod ClusterPersistenceConfig
   545  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   546  }
   547  
   548  // Compliance: Contains compliance information about a security standard
   549  // indicating unmet recommendations.
   550  type Compliance struct {
   551  	// Standard: Industry-wide compliance standards or benchmarks, such as CIS,
   552  	// PCI, and OWASP.
   553  	Standard string `json:"standard,omitempty"`
   554  	// Version: Version of the standard or benchmark, for example, 1.1
   555  	Version string `json:"version,omitempty"`
   556  	// ForceSendFields is a list of field names (e.g. "Standard") to
   557  	// unconditionally include in API requests. By default, fields with empty or
   558  	// default values are omitted from API requests. See
   559  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   560  	// details.
   561  	ForceSendFields []string `json:"-"`
   562  	// NullFields is a list of field names (e.g. "Standard") to include in API
   563  	// requests with the JSON null value. By default, fields with empty values are
   564  	// omitted from API requests. See
   565  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   566  	NullFields []string `json:"-"`
   567  }
   568  
   569  func (s *Compliance) MarshalJSON() ([]byte, error) {
   570  	type NoMethod Compliance
   571  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   572  }
   573  
   574  // CustomMetadataData: Any custom metadata associated with the resource. i.e. A
   575  // spanner instance can have multiple databases with its own unique metadata.
   576  // Information for these individual databases can be captured in custom
   577  // metadata data
   578  type CustomMetadataData struct {
   579  	DatabaseMetadata []*DatabaseMetadata `json:"databaseMetadata,omitempty"`
   580  	// ForceSendFields is a list of field names (e.g. "DatabaseMetadata") to
   581  	// unconditionally include in API requests. By default, fields with empty or
   582  	// default values are omitted from API requests. See
   583  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   584  	// details.
   585  	ForceSendFields []string `json:"-"`
   586  	// NullFields is a list of field names (e.g. "DatabaseMetadata") to include in
   587  	// API requests with the JSON null value. By default, fields with empty values
   588  	// are omitted from API requests. See
   589  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   590  	NullFields []string `json:"-"`
   591  }
   592  
   593  func (s *CustomMetadataData) MarshalJSON() ([]byte, error) {
   594  	type NoMethod CustomMetadataData
   595  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   596  }
   597  
   598  // DatabaseMetadata: Metadata for individual databases created in an instance.
   599  // i.e. spanner instance can have multiple databases with unique configuration
   600  // settings.
   601  type DatabaseMetadata struct {
   602  	// BackupConfiguration: Backup configuration for this database
   603  	BackupConfiguration *BackupConfiguration `json:"backupConfiguration,omitempty"`
   604  	// BackupRun: Information about the last backup attempt for this database
   605  	BackupRun  *BackupRun          `json:"backupRun,omitempty"`
   606  	Product    *Product            `json:"product,omitempty"`
   607  	ResourceId *DatabaseResourceId `json:"resourceId,omitempty"`
   608  	// ResourceName: Required. Database name. Resource name to follow CAIS
   609  	// resource_name format as noted here go/condor-common-datamodel
   610  	ResourceName string `json:"resourceName,omitempty"`
   611  	// ForceSendFields is a list of field names (e.g. "BackupConfiguration") to
   612  	// unconditionally include in API requests. By default, fields with empty or
   613  	// default values are omitted from API requests. See
   614  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   615  	// details.
   616  	ForceSendFields []string `json:"-"`
   617  	// NullFields is a list of field names (e.g. "BackupConfiguration") to include
   618  	// in API requests with the JSON null value. By default, fields with empty
   619  	// values are omitted from API requests. See
   620  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   621  	NullFields []string `json:"-"`
   622  }
   623  
   624  func (s *DatabaseMetadata) MarshalJSON() ([]byte, error) {
   625  	type NoMethod DatabaseMetadata
   626  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   627  }
   628  
   629  // DatabaseResourceFeed: DatabaseResourceFeed is the top level proto to be used
   630  // to ingest different database resource level events into Condor platform.
   631  type DatabaseResourceFeed struct {
   632  	// FeedTimestamp: Required. Timestamp when feed is generated.
   633  	FeedTimestamp string `json:"feedTimestamp,omitempty"`
   634  	// FeedType: Required. Type feed to be ingested into condor
   635  	//
   636  	// Possible values:
   637  	//   "FEEDTYPE_UNSPECIFIED"
   638  	//   "RESOURCE_METADATA" - Database resource metadata feed from control plane
   639  	//   "OBSERVABILITY_DATA" - Database resource monitoring data
   640  	//   "SECURITY_FINDING_DATA" - Database resource security health signal data
   641  	//   "RECOMMENDATION_SIGNAL_DATA" - Database resource recommendation signal
   642  	// data
   643  	FeedType string `json:"feedType,omitempty"`
   644  	// RecommendationSignalData: More feed data would be added in subsequent CLs
   645  	RecommendationSignalData *DatabaseResourceRecommendationSignalData `json:"recommendationSignalData,omitempty"`
   646  	ResourceHealthSignalData *DatabaseResourceHealthSignalData         `json:"resourceHealthSignalData,omitempty"`
   647  	// ResourceId: Primary key associated with the Resource. resource_id is
   648  	// available in individual feed level as well.
   649  	ResourceId       *DatabaseResourceId       `json:"resourceId,omitempty"`
   650  	ResourceMetadata *DatabaseResourceMetadata `json:"resourceMetadata,omitempty"`
   651  	// ForceSendFields is a list of field names (e.g. "FeedTimestamp") to
   652  	// unconditionally include in API requests. By default, fields with empty or
   653  	// default values are omitted from API requests. See
   654  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   655  	// details.
   656  	ForceSendFields []string `json:"-"`
   657  	// NullFields is a list of field names (e.g. "FeedTimestamp") to include in API
   658  	// requests with the JSON null value. By default, fields with empty values are
   659  	// omitted from API requests. See
   660  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   661  	NullFields []string `json:"-"`
   662  }
   663  
   664  func (s *DatabaseResourceFeed) MarshalJSON() ([]byte, error) {
   665  	type NoMethod DatabaseResourceFeed
   666  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   667  }
   668  
   669  // DatabaseResourceHealthSignalData: Common model for database resource health
   670  // signal data.
   671  type DatabaseResourceHealthSignalData struct {
   672  	// AdditionalMetadata: Any other additional metadata
   673  	AdditionalMetadata googleapi.RawMessage `json:"additionalMetadata,omitempty"`
   674  	// Compliance: Industry standards associated with this signal; if this signal
   675  	// is an issue, that could be a violation of the associated industry
   676  	// standard(s). For example, AUTO_BACKUP_DISABLED signal is associated with CIS
   677  	// GCP 1.1, CIS GCP 1.2, CIS GCP 1.3, NIST 800-53 and ISO-27001 compliance
   678  	// standards. If a database resource does not have automated backup enable, it
   679  	// will violate these following industry standards.
   680  	Compliance []*Compliance `json:"compliance,omitempty"`
   681  	// Description: Description associated with signal
   682  	Description string `json:"description,omitempty"`
   683  	// EventTime: Required. The last time at which the event described by this
   684  	// signal took place
   685  	EventTime string `json:"eventTime,omitempty"`
   686  	// ExternalUri: The external-uri of the signal, using which more information
   687  	// about this signal can be obtained. In GCP, this will take user to SCC page
   688  	// to get more details about signals.
   689  	ExternalUri string `json:"externalUri,omitempty"`
   690  	// Name: Required. The name of the signal, ex: PUBLIC_SQL_INSTANCE,
   691  	// SQL_LOG_ERROR_VERBOSITY etc.
   692  	Name string `json:"name,omitempty"`
   693  	// Provider: Cloud provider name. Ex: GCP/AWS/Azure/OnPrem/SelfManaged
   694  	//
   695  	// Possible values:
   696  	//   "PROVIDER_UNSPECIFIED"
   697  	//   "GCP" - Google cloud platform provider
   698  	//   "AWS" - Amazon web service
   699  	//   "AZURE" - Azure web service
   700  	//   "ONPREM" - On-prem database resources.
   701  	//   "SELFMANAGED" - Self-managed database provider. These are resources on a
   702  	// cloud platform, e.g., database resource installed in a GCE VM, but not a
   703  	// managed database service.
   704  	//   "PROVIDER_OTHER" - For the rest of the other categories. Other refers to
   705  	// the rest of other database service providers, this could be smaller cloud
   706  	// provider. This needs to be provided when the provider is known, but it is
   707  	// not present in the existing set of enum values.
   708  	Provider string `json:"provider,omitempty"`
   709  	// ResourceContainer: Closest parent container of this resource. In GCP,
   710  	// 'container' refers to a Cloud Resource Manager project. It must be resource
   711  	// name of a Cloud Resource Manager project with the format of "provider//",
   712  	// such as "projects/123". For GCP provided resources, number should be project
   713  	// number.
   714  	ResourceContainer string `json:"resourceContainer,omitempty"`
   715  	// ResourceName: Required. Database resource name associated with the signal.
   716  	// Resource name to follow CAIS resource_name format as noted here
   717  	// go/condor-common-datamodel
   718  	ResourceName string `json:"resourceName,omitempty"`
   719  	// SignalClass: Required. The class of the signal, such as if it's a THREAT or
   720  	// VULNERABILITY.
   721  	//
   722  	// Possible values:
   723  	//   "CLASS_UNSPECIFIED" - Unspecified signal class.
   724  	//   "THREAT" - Describes unwanted or malicious activity.
   725  	//   "VULNERABILITY" - Describes a potential weakness in software that
   726  	// increases risk to Confidentiality & Integrity & Availability.
   727  	//   "MISCONFIGURATION" - Describes a potential weakness in cloud
   728  	// resource/asset configuration that increases risk.
   729  	//   "OBSERVATION" - Describes a security observation that is for informational
   730  	// purposes.
   731  	//   "ERROR" - Describes an error that prevents some SCC functionality.
   732  	SignalClass string `json:"signalClass,omitempty"`
   733  	// SignalId: Required. Unique identifier for the signal. This is an unique id
   734  	// which would be mainatined by partner to identify a signal.
   735  	SignalId string `json:"signalId,omitempty"`
   736  	// SignalType: Required. Type of signal, for example,
   737  	// `AVAILABLE_IN_MULTIPLE_ZONES`, `LOGGING_MOST_ERRORS`, etc.
   738  	//
   739  	// Possible values:
   740  	//   "SIGNAL_TYPE_UNSPECIFIED" - Unspecified.
   741  	//   "SIGNAL_TYPE_NOT_PROTECTED_BY_AUTOMATIC_FAILOVER" - Represents if a
   742  	// resource is protected by automatic failover. Checks for resources that are
   743  	// configured to have redundancy within a region that enables automatic
   744  	// failover.
   745  	//   "SIGNAL_TYPE_GROUP_NOT_REPLICATING_ACROSS_REGIONS" - Represents if a group
   746  	// is replicating across regions. Checks for resources that are configured to
   747  	// have redundancy, and ongoing replication, across regions.
   748  	//   "SIGNAL_TYPE_NOT_AVAILABLE_IN_MULTIPLE_ZONES" - Represents if the resource
   749  	// is available in multiple zones or not.
   750  	//   "SIGNAL_TYPE_NOT_AVAILABLE_IN_MULTIPLE_REGIONS" - Represents if a resource
   751  	// is available in multiple regions.
   752  	//   "SIGNAL_TYPE_NO_PROMOTABLE_REPLICA" - Represents if a resource has a
   753  	// promotable replica.
   754  	//   "SIGNAL_TYPE_NO_AUTOMATED_BACKUP_POLICY" - Represents if a resource has an
   755  	// automated backup policy.
   756  	//   "SIGNAL_TYPE_SHORT_BACKUP_RETENTION" - Represents if a resources has a
   757  	// short backup retention period.
   758  	//   "SIGNAL_TYPE_LAST_BACKUP_FAILED" - Represents if the last backup of a
   759  	// resource failed.
   760  	//   "SIGNAL_TYPE_LAST_BACKUP_OLD" - Represents if the last backup of a
   761  	// resource is older than some threshold value.
   762  	//   "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_2_0" - Represents if a resource
   763  	// violates CIS GCP Foundation 2.0.
   764  	//   "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_3" - Represents if a resource
   765  	// violates CIS GCP Foundation 1.3.
   766  	//   "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_2" - Represents if a resource
   767  	// violates CIS GCP Foundation 1.2.
   768  	//   "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_1" - Represents if a resource
   769  	// violates CIS GCP Foundation 1.1.
   770  	//   "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_0" - Represents if a resource
   771  	// violates CIS GCP Foundation 1.0.
   772  	//   "SIGNAL_TYPE_VIOLATES_NIST_800_53" - Represents if a resource violates
   773  	// NIST 800-53.
   774  	//   "SIGNAL_TYPE_VIOLATES_ISO_27001" - Represents if a resource violates
   775  	// ISO-27001.
   776  	//   "SIGNAL_TYPE_VIOLATES_PCI_DSS_V3_2_1" - Represents if a resource violates
   777  	// PCI-DSS v3.2.1.
   778  	//   "SIGNAL_TYPE_LOGS_NOT_OPTIMIZED_FOR_TROUBLESHOOTING" - Represents if
   779  	// log_checkpoints database flag for a Cloud SQL for PostgreSQL instance is not
   780  	// set to on.
   781  	//   "SIGNAL_TYPE_QUERY_DURATIONS_NOT_LOGGED" - Represents if the log_duration
   782  	// database flag for a Cloud SQL for PostgreSQL instance is not set to on.
   783  	//   "SIGNAL_TYPE_VERBOSE_ERROR_LOGGING" - Represents if the
   784  	// log_error_verbosity database flag for a Cloud SQL for PostgreSQL instance is
   785  	// not set to default or stricter (default or terse).
   786  	//   "SIGNAL_TYPE_QUERY_LOCK_WAITS_NOT_LOGGED" - Represents if the
   787  	// log_lock_waits database flag for a Cloud SQL for PostgreSQL instance is not
   788  	// set to on.
   789  	//   "SIGNAL_TYPE_LOGGING_MOST_ERRORS" - Represents if the
   790  	// log_min_error_statement database flag for a Cloud SQL for PostgreSQL
   791  	// instance is not set appropriately.
   792  	//   "SIGNAL_TYPE_LOGGING_ONLY_CRITICAL_ERRORS" - Represents if the
   793  	// log_min_error_statement database flag for a Cloud SQL for PostgreSQL
   794  	// instance does not have an appropriate severity level.
   795  	//   "SIGNAL_TYPE_MINIMAL_ERROR_LOGGING" - Represents if the log_min_messages
   796  	// database flag for a Cloud SQL for PostgreSQL instance is not set to warning
   797  	// or another recommended value.
   798  	//   "SIGNAL_TYPE_QUERY_STATISTICS_LOGGED" - Represents if the databaseFlags
   799  	// property of instance metadata for the log_executor_status field is set to
   800  	// on.
   801  	//   "SIGNAL_TYPE_EXCESSIVE_LOGGING_OF_CLIENT_HOSTNAME" - Represents if the
   802  	// log_hostname database flag for a Cloud SQL for PostgreSQL instance is not
   803  	// set to off.
   804  	//   "SIGNAL_TYPE_EXCESSIVE_LOGGING_OF_PARSER_STATISTICS" - Represents if the
   805  	// log_parser_stats database flag for a Cloud SQL for PostgreSQL instance is
   806  	// not set to off.
   807  	//   "SIGNAL_TYPE_EXCESSIVE_LOGGING_OF_PLANNER_STATISTICS" - Represents if the
   808  	// log_planner_stats database flag for a Cloud SQL for PostgreSQL instance is
   809  	// not set to off.
   810  	//   "SIGNAL_TYPE_NOT_LOGGING_ONLY_DDL_STATEMENTS" - Represents if the
   811  	// log_statement database flag for a Cloud SQL for PostgreSQL instance is not
   812  	// set to DDL (all data definition statements).
   813  	//   "SIGNAL_TYPE_LOGGING_QUERY_STATISTICS" - Represents if the
   814  	// log_statement_stats database flag for a Cloud SQL for PostgreSQL instance is
   815  	// not set to off.
   816  	//   "SIGNAL_TYPE_NOT_LOGGING_TEMPORARY_FILES" - Represents if the
   817  	// log_temp_files database flag for a Cloud SQL for PostgreSQL instance is not
   818  	// set to "0". (NOTE: 0 = ON)
   819  	//   "SIGNAL_TYPE_CONNECTION_MAX_NOT_CONFIGURED" - Represents if the user
   820  	// connections database flag for a Cloud SQL for SQL Server instance is
   821  	// configured.
   822  	//   "SIGNAL_TYPE_USER_OPTIONS_CONFIGURED" - Represents if the user options
   823  	// database flag for Cloud SQL SQL Server instance is configured or not.
   824  	//   "SIGNAL_TYPE_EXPOSED_TO_PUBLIC_ACCESS" - Represents if a resource is
   825  	// exposed to public access.
   826  	//   "SIGNAL_TYPE_UNENCRYPTED_CONNECTIONS" - Represents if a resources requires
   827  	// all incoming connections to use SSL or not.
   828  	//   "SIGNAL_TYPE_NO_ROOT_PASSWORD" - Represents if a Cloud SQL database has a
   829  	// password configured for the root account or not.
   830  	//   "SIGNAL_TYPE_WEAK_ROOT_PASSWORD" - Represents if a Cloud SQL database has
   831  	// a weak password configured for the root account.
   832  	//   "SIGNAL_TYPE_ENCRYPTION_KEY_NOT_CUSTOMER_MANAGED" - Represents if a SQL
   833  	// database instance is not encrypted with customer-managed encryption keys
   834  	// (CMEK).
   835  	//   "SIGNAL_TYPE_SERVER_AUTHENTICATION_NOT_REQUIRED" - Represents if The
   836  	// contained database authentication database flag for a Cloud SQL for SQL
   837  	// Server instance is not set to off.
   838  	//   "SIGNAL_TYPE_EXPOSED_BY_OWNERSHIP_CHAINING" - Represents if the
   839  	// cross_db_ownership_chaining database flag for a Cloud SQL for SQL Server
   840  	// instance is not set to off.
   841  	//   "SIGNAL_TYPE_EXPOSED_TO_EXTERNAL_SCRIPTS" - Represents if he external
   842  	// scripts enabled database flag for a Cloud SQL for SQL Server instance is not
   843  	// set to off.
   844  	//   "SIGNAL_TYPE_EXPOSED_TO_LOCAL_DATA_LOADS" - Represents if the local_infile
   845  	// database flag for a Cloud SQL for MySQL instance is not set to off.
   846  	//   "SIGNAL_TYPE_CONNECTION_ATTEMPTS_NOT_LOGGED" - Represents if the
   847  	// log_connections database flag for a Cloud SQL for PostgreSQL instance is not
   848  	// set to on.
   849  	//   "SIGNAL_TYPE_DISCONNECTIONS_NOT_LOGGED" - Represents if the
   850  	// log_disconnections database flag for a Cloud SQL for PostgreSQL instance is
   851  	// not set to on.
   852  	//   "SIGNAL_TYPE_LOGGING_EXCESSIVE_STATEMENT_INFO" - Represents if the
   853  	// log_min_duration_statement database flag for a Cloud SQL for PostgreSQL
   854  	// instance is not set to -1.
   855  	//   "SIGNAL_TYPE_EXPOSED_TO_REMOTE_ACCESS" - Represents if the remote access
   856  	// database flag for a Cloud SQL for SQL Server instance is not set to off.
   857  	//   "SIGNAL_TYPE_DATABASE_NAMES_EXPOSED" - Represents if the
   858  	// skip_show_database database flag for a Cloud SQL for MySQL instance is not
   859  	// set to on.
   860  	//   "SIGNAL_TYPE_SENSITIVE_TRACE_INFO_NOT_MASKED" - Represents if the 3625
   861  	// (trace flag) database flag for a Cloud SQL for SQL Server instance is not
   862  	// set to on.
   863  	//   "SIGNAL_TYPE_PUBLIC_IP_ENABLED" - Represents if public IP is enabled.
   864  	//   "SIGNAL_TYPE_IDLE" - Represents Idle instance helps to reduce costs.
   865  	//   "SIGNAL_TYPE_OVERPROVISIONED" - Represents instances that are
   866  	// unnecessarily large for given workload.
   867  	//   "SIGNAL_TYPE_HIGH_NUMBER_OF_OPEN_TABLES" - Represents high number of
   868  	// concurrently opened tables.
   869  	//   "SIGNAL_TYPE_HIGH_NUMBER_OF_TABLES" - Represents high table count close to
   870  	// SLA limit.
   871  	//   "SIGNAL_TYPE_HIGH_TRANSACTION_ID_UTILIZATION" - Represents high number of
   872  	// unvacuumed transactions
   873  	//   "SIGNAL_TYPE_UNDERPROVISIONED" - Represents need for more CPU and/or
   874  	// memory
   875  	//   "SIGNAL_TYPE_OUT_OF_DISK" - Represents out of disk.
   876  	//   "SIGNAL_TYPE_SERVER_CERTIFICATE_NEAR_EXPIRY" - Represents server
   877  	// certificate is near expiry.
   878  	//   "SIGNAL_TYPE_DATABASE_AUDITING_DISABLED" - Represents database auditing is
   879  	// disabled.
   880  	//   "SIGNAL_TYPE_RESTRICT_AUTHORIZED_NETWORKS" - Represents not restricted to
   881  	// authorized networks.
   882  	//   "SIGNAL_TYPE_VIOLATE_POLICY_RESTRICT_PUBLIC_IP" - Represents violate org
   883  	// policy restrict public ip.
   884  	//   "SIGNAL_TYPE_QUOTA_LIMIT" - Cluster nearing quota limit
   885  	//   "SIGNAL_TYPE_NO_PASSWORD_POLICY" - No password policy set on resources
   886  	//   "SIGNAL_TYPE_CONNECTIONS_PERFORMANCE_IMPACT" - Performance impact of
   887  	// connections settings
   888  	//   "SIGNAL_TYPE_TMP_TABLES_PERFORMANCE_IMPACT" - Performance impact of
   889  	// temporary tables settings
   890  	//   "SIGNAL_TYPE_TRANS_LOGS_PERFORMANCE_IMPACT" - Performance impact of
   891  	// transaction logs settings
   892  	//   "SIGNAL_TYPE_HIGH_JOINS_WITHOUT_INDEXES" - Performance impact of high
   893  	// joins without indexes
   894  	SignalType string `json:"signalType,omitempty"`
   895  	// Possible values:
   896  	//   "STATE_UNSPECIFIED" - Unspecified state.
   897  	//   "ACTIVE" - The signal requires attention and has not been addressed yet.
   898  	//   "RESOLVED" - The signal has been fixed, triaged as a non-issue or
   899  	// otherwise addressed and is no longer active.
   900  	//   "MUTED" - The signal has been muted.
   901  	State string `json:"state,omitempty"`
   902  	// ForceSendFields is a list of field names (e.g. "AdditionalMetadata") to
   903  	// unconditionally include in API requests. By default, fields with empty or
   904  	// default values are omitted from API requests. See
   905  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   906  	// details.
   907  	ForceSendFields []string `json:"-"`
   908  	// NullFields is a list of field names (e.g. "AdditionalMetadata") to include
   909  	// in API requests with the JSON null value. By default, fields with empty
   910  	// values are omitted from API requests. See
   911  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   912  	NullFields []string `json:"-"`
   913  }
   914  
   915  func (s *DatabaseResourceHealthSignalData) MarshalJSON() ([]byte, error) {
   916  	type NoMethod DatabaseResourceHealthSignalData
   917  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   918  }
   919  
   920  // DatabaseResourceId: DatabaseResourceId will serve as primary key for any
   921  // resource ingestion event.
   922  type DatabaseResourceId struct {
   923  	// Provider: Required. Cloud provider name. Ex:
   924  	// GCP/AWS/Azure/OnPrem/SelfManaged
   925  	//
   926  	// Possible values:
   927  	//   "PROVIDER_UNSPECIFIED"
   928  	//   "GCP" - Google cloud platform provider
   929  	//   "AWS" - Amazon web service
   930  	//   "AZURE" - Azure web service
   931  	//   "ONPREM" - On-prem database resources.
   932  	//   "SELFMANAGED" - Self-managed database provider. These are resources on a
   933  	// cloud platform, e.g., database resource installed in a GCE VM, but not a
   934  	// managed database service.
   935  	//   "PROVIDER_OTHER" - For the rest of the other categories. Other refers to
   936  	// the rest of other database service providers, this could be smaller cloud
   937  	// provider. This needs to be provided when the provider is known, but it is
   938  	// not present in the existing set of enum values.
   939  	Provider string `json:"provider,omitempty"`
   940  	// ProviderDescription: Optional. Needs to be used only when the provider is
   941  	// PROVIDER_OTHER.
   942  	ProviderDescription string `json:"providerDescription,omitempty"`
   943  	// ResourceType: Required. The type of resource this ID is identifying. Ex
   944  	// redis.googleapis.com/Instance, redis.googleapis.com/Cluster,
   945  	// alloydb.googleapis.com/Cluster, alloydb.googleapis.com/Instance,
   946  	// spanner.googleapis.com/Instance REQUIRED Please refer
   947  	// go/condor-common-datamodel
   948  	ResourceType string `json:"resourceType,omitempty"`
   949  	// UniqueId: Required. A service-local token that distinguishes this resource
   950  	// from other resources within the same service.
   951  	UniqueId string `json:"uniqueId,omitempty"`
   952  	// ForceSendFields is a list of field names (e.g. "Provider") to
   953  	// unconditionally include in API requests. By default, fields with empty or
   954  	// default values are omitted from API requests. See
   955  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   956  	// details.
   957  	ForceSendFields []string `json:"-"`
   958  	// NullFields is a list of field names (e.g. "Provider") to include in API
   959  	// requests with the JSON null value. By default, fields with empty values are
   960  	// omitted from API requests. See
   961  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   962  	NullFields []string `json:"-"`
   963  }
   964  
   965  func (s *DatabaseResourceId) MarshalJSON() ([]byte, error) {
   966  	type NoMethod DatabaseResourceId
   967  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   968  }
   969  
   970  // DatabaseResourceMetadata: Common model for database resource instance
   971  // metadata.
   972  type DatabaseResourceMetadata struct {
   973  	// AvailabilityConfiguration: Availability configuration for this instance
   974  	AvailabilityConfiguration *AvailabilityConfiguration `json:"availabilityConfiguration,omitempty"`
   975  	// BackupConfiguration: Backup configuration for this instance
   976  	BackupConfiguration *BackupConfiguration `json:"backupConfiguration,omitempty"`
   977  	// BackupRun: Latest backup run information for this instance
   978  	BackupRun *BackupRun `json:"backupRun,omitempty"`
   979  	// CreationTime: The creation time of the resource, i.e. the time when resource
   980  	// is created and recorded in partner service.
   981  	CreationTime string `json:"creationTime,omitempty"`
   982  	// CurrentState: Current state of the instance.
   983  	//
   984  	// Possible values:
   985  	//   "STATE_UNSPECIFIED"
   986  	//   "HEALTHY" - The instance is running.
   987  	//   "UNHEALTHY" - Instance being created, updated, deleted or under
   988  	// maintenance
   989  	//   "SUSPENDED" - When instance is suspended
   990  	//   "DELETED" - Instance is deleted.
   991  	//   "STATE_OTHER" - For rest of the other category
   992  	CurrentState string `json:"currentState,omitempty"`
   993  	// CustomMetadata: Any custom metadata associated with the resource
   994  	CustomMetadata *CustomMetadataData `json:"customMetadata,omitempty"`
   995  	// Entitlements: Entitlements associated with the resource
   996  	Entitlements []*Entitlement `json:"entitlements,omitempty"`
   997  	// ExpectedState: The state that the instance is expected to be in. For
   998  	// example, an instance state can transition to UNHEALTHY due to wrong patch
   999  	// update, while the expected state will remain at the HEALTHY.
  1000  	//
  1001  	// Possible values:
  1002  	//   "STATE_UNSPECIFIED"
  1003  	//   "HEALTHY" - The instance is running.
  1004  	//   "UNHEALTHY" - Instance being created, updated, deleted or under
  1005  	// maintenance
  1006  	//   "SUSPENDED" - When instance is suspended
  1007  	//   "DELETED" - Instance is deleted.
  1008  	//   "STATE_OTHER" - For rest of the other category
  1009  	ExpectedState string `json:"expectedState,omitempty"`
  1010  	// Id: Required. Unique identifier for a Database resource
  1011  	Id *DatabaseResourceId `json:"id,omitempty"`
  1012  	// InstanceType: The type of the instance. Specified at creation time.
  1013  	//
  1014  	// Possible values:
  1015  	//   "INSTANCE_TYPE_UNSPECIFIED"
  1016  	//   "SUB_RESOURCE_TYPE_UNSPECIFIED" - For rest of the other categories.
  1017  	//   "PRIMARY" - A regular primary database instance.
  1018  	//   "SECONDARY" - A cluster or an instance acting as a secondary.
  1019  	//   "READ_REPLICA" - An instance acting as a read-replica.
  1020  	//   "OTHER" - For rest of the other categories.
  1021  	//   "SUB_RESOURCE_TYPE_PRIMARY" - A regular primary database instance.
  1022  	//   "SUB_RESOURCE_TYPE_SECONDARY" - A cluster or an instance acting as a
  1023  	// secondary.
  1024  	//   "SUB_RESOURCE_TYPE_READ_REPLICA" - An instance acting as a read-replica.
  1025  	//   "SUB_RESOURCE_TYPE_OTHER" - For rest of the other categories.
  1026  	InstanceType string `json:"instanceType,omitempty"`
  1027  	// Location: The resource location. REQUIRED
  1028  	Location string `json:"location,omitempty"`
  1029  	// PrimaryResourceId: Identifier for this resource's immediate parent/primary
  1030  	// resource if the current resource is a replica or derived form of another
  1031  	// Database resource. Else it would be NULL. REQUIRED if the immediate parent
  1032  	// exists when first time resource is getting ingested, otherwise optional.
  1033  	PrimaryResourceId *DatabaseResourceId `json:"primaryResourceId,omitempty"`
  1034  	// Product: The product this resource represents.
  1035  	Product *Product `json:"product,omitempty"`
  1036  	// ResourceContainer: Closest parent Cloud Resource Manager container of this
  1037  	// resource. It must be resource name of a Cloud Resource Manager project with
  1038  	// the format of "/", such as "projects/123". For GCP provided resources,
  1039  	// number should be project number.
  1040  	ResourceContainer string `json:"resourceContainer,omitempty"`
  1041  	// ResourceName: Required. Different from DatabaseResourceId.unique_id, a
  1042  	// resource name can be reused over time. That is, after a resource named "ABC"
  1043  	// is deleted, the name "ABC" can be used to to create a new resource within
  1044  	// the same source. Resource name to follow CAIS resource_name format as noted
  1045  	// here go/condor-common-datamodel
  1046  	ResourceName string `json:"resourceName,omitempty"`
  1047  	// UpdationTime: The time at which the resource was updated and recorded at
  1048  	// partner service.
  1049  	UpdationTime string `json:"updationTime,omitempty"`
  1050  	// UserLabelSet: User-provided labels associated with the resource
  1051  	UserLabelSet *UserLabels `json:"userLabelSet,omitempty"`
  1052  	// UserLabels: User-provided labels, represented as a dictionary where each
  1053  	// label is a single key value pair.
  1054  	UserLabels map[string]string `json:"userLabels,omitempty"`
  1055  	// ForceSendFields is a list of field names (e.g. "AvailabilityConfiguration")
  1056  	// to unconditionally include in API requests. By default, fields with empty or
  1057  	// default values are omitted from API requests. See
  1058  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1059  	// details.
  1060  	ForceSendFields []string `json:"-"`
  1061  	// NullFields is a list of field names (e.g. "AvailabilityConfiguration") to
  1062  	// include in API requests with the JSON null value. By default, fields with
  1063  	// empty values are omitted from API requests. See
  1064  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1065  	NullFields []string `json:"-"`
  1066  }
  1067  
  1068  func (s *DatabaseResourceMetadata) MarshalJSON() ([]byte, error) {
  1069  	type NoMethod DatabaseResourceMetadata
  1070  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1071  }
  1072  
  1073  // DatabaseResourceRecommendationSignalData: Common model for database resource
  1074  // recommendation signal data.
  1075  type DatabaseResourceRecommendationSignalData struct {
  1076  	// AdditionalMetadata: Optional. Any other additional metadata specific to
  1077  	// recommendation
  1078  	AdditionalMetadata googleapi.RawMessage `json:"additionalMetadata,omitempty"`
  1079  	// LastRefreshTime: Required. last time recommendationw as refreshed
  1080  	LastRefreshTime string `json:"lastRefreshTime,omitempty"`
  1081  	// RecommendationState: Required. Recommendation state
  1082  	//
  1083  	// Possible values:
  1084  	//   "UNSPECIFIED"
  1085  	//   "ACTIVE" - Recommendation is active and can be applied. ACTIVE
  1086  	// recommendations can be marked as CLAIMED, SUCCEEDED, or FAILED.
  1087  	//   "CLAIMED" - Recommendation is in claimed state. Recommendations content is
  1088  	// immutable and cannot be updated by Google. CLAIMED recommendations can be
  1089  	// marked as CLAIMED, SUCCEEDED, or FAILED.
  1090  	//   "SUCCEEDED" - Recommendation is in succeeded state. Recommendations
  1091  	// content is immutable and cannot be updated by Google. SUCCEEDED
  1092  	// recommendations can be marked as SUCCEEDED, or FAILED.
  1093  	//   "FAILED" - Recommendation is in failed state. Recommendations content is
  1094  	// immutable and cannot be updated by Google. FAILED recommendations can be
  1095  	// marked as SUCCEEDED, or FAILED.
  1096  	//   "DISMISSED" - Recommendation is in dismissed state. Recommendation content
  1097  	// can be updated by Google. DISMISSED recommendations can be marked as ACTIVE.
  1098  	RecommendationState string `json:"recommendationState,omitempty"`
  1099  	// Recommender: Required. Name of recommendation. Examples:
  1100  	// organizations/1234/locations/us-central1/recommenders/google.cloudsql.instanc
  1101  	// e.PerformanceRecommender/recommendations/9876
  1102  	Recommender string `json:"recommender,omitempty"`
  1103  	// RecommenderId: Required. ID of recommender. Examples:
  1104  	// "google.cloudsql.instance.PerformanceRecommender"
  1105  	RecommenderId string `json:"recommenderId,omitempty"`
  1106  	// RecommenderSubtype: Required. Contains an identifier for a subtype of
  1107  	// recommendations produced for the same recommender. Subtype is a function of
  1108  	// content and impact, meaning a new subtype might be added when significant
  1109  	// changes to `content` or `primary_impact.category` are introduced. See the
  1110  	// Recommenders section to see a list of subtypes for a given Recommender.
  1111  	// Examples: For recommender =
  1112  	// "google.cloudsql.instance.PerformanceRecommender", recommender_subtype can
  1113  	// be
  1114  	// "MYSQL_HIGH_NUMBER_OF_OPEN_TABLES_BEST_PRACTICE"/"POSTGRES_HIGH_TRANSACTION_I
  1115  	// D_UTILIZATION_BEST_PRACTICE"
  1116  	RecommenderSubtype string `json:"recommenderSubtype,omitempty"`
  1117  	// ResourceName: Required. Database resource name associated with the signal.
  1118  	// Resource name to follow CAIS resource_name format as noted here
  1119  	// go/condor-common-datamodel
  1120  	ResourceName string `json:"resourceName,omitempty"`
  1121  	// SignalType: Required. Type of signal, for example, `SIGNAL_TYPE_IDLE`,
  1122  	// `SIGNAL_TYPE_HIGH_NUMBER_OF_TABLES`, etc.
  1123  	//
  1124  	// Possible values:
  1125  	//   "SIGNAL_TYPE_UNSPECIFIED" - Unspecified.
  1126  	//   "SIGNAL_TYPE_NOT_PROTECTED_BY_AUTOMATIC_FAILOVER" - Represents if a
  1127  	// resource is protected by automatic failover. Checks for resources that are
  1128  	// configured to have redundancy within a region that enables automatic
  1129  	// failover.
  1130  	//   "SIGNAL_TYPE_GROUP_NOT_REPLICATING_ACROSS_REGIONS" - Represents if a group
  1131  	// is replicating across regions. Checks for resources that are configured to
  1132  	// have redundancy, and ongoing replication, across regions.
  1133  	//   "SIGNAL_TYPE_NOT_AVAILABLE_IN_MULTIPLE_ZONES" - Represents if the resource
  1134  	// is available in multiple zones or not.
  1135  	//   "SIGNAL_TYPE_NOT_AVAILABLE_IN_MULTIPLE_REGIONS" - Represents if a resource
  1136  	// is available in multiple regions.
  1137  	//   "SIGNAL_TYPE_NO_PROMOTABLE_REPLICA" - Represents if a resource has a
  1138  	// promotable replica.
  1139  	//   "SIGNAL_TYPE_NO_AUTOMATED_BACKUP_POLICY" - Represents if a resource has an
  1140  	// automated backup policy.
  1141  	//   "SIGNAL_TYPE_SHORT_BACKUP_RETENTION" - Represents if a resources has a
  1142  	// short backup retention period.
  1143  	//   "SIGNAL_TYPE_LAST_BACKUP_FAILED" - Represents if the last backup of a
  1144  	// resource failed.
  1145  	//   "SIGNAL_TYPE_LAST_BACKUP_OLD" - Represents if the last backup of a
  1146  	// resource is older than some threshold value.
  1147  	//   "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_2_0" - Represents if a resource
  1148  	// violates CIS GCP Foundation 2.0.
  1149  	//   "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_3" - Represents if a resource
  1150  	// violates CIS GCP Foundation 1.3.
  1151  	//   "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_2" - Represents if a resource
  1152  	// violates CIS GCP Foundation 1.2.
  1153  	//   "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_1" - Represents if a resource
  1154  	// violates CIS GCP Foundation 1.1.
  1155  	//   "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_0" - Represents if a resource
  1156  	// violates CIS GCP Foundation 1.0.
  1157  	//   "SIGNAL_TYPE_VIOLATES_NIST_800_53" - Represents if a resource violates
  1158  	// NIST 800-53.
  1159  	//   "SIGNAL_TYPE_VIOLATES_ISO_27001" - Represents if a resource violates
  1160  	// ISO-27001.
  1161  	//   "SIGNAL_TYPE_VIOLATES_PCI_DSS_V3_2_1" - Represents if a resource violates
  1162  	// PCI-DSS v3.2.1.
  1163  	//   "SIGNAL_TYPE_LOGS_NOT_OPTIMIZED_FOR_TROUBLESHOOTING" - Represents if
  1164  	// log_checkpoints database flag for a Cloud SQL for PostgreSQL instance is not
  1165  	// set to on.
  1166  	//   "SIGNAL_TYPE_QUERY_DURATIONS_NOT_LOGGED" - Represents if the log_duration
  1167  	// database flag for a Cloud SQL for PostgreSQL instance is not set to on.
  1168  	//   "SIGNAL_TYPE_VERBOSE_ERROR_LOGGING" - Represents if the
  1169  	// log_error_verbosity database flag for a Cloud SQL for PostgreSQL instance is
  1170  	// not set to default or stricter (default or terse).
  1171  	//   "SIGNAL_TYPE_QUERY_LOCK_WAITS_NOT_LOGGED" - Represents if the
  1172  	// log_lock_waits database flag for a Cloud SQL for PostgreSQL instance is not
  1173  	// set to on.
  1174  	//   "SIGNAL_TYPE_LOGGING_MOST_ERRORS" - Represents if the
  1175  	// log_min_error_statement database flag for a Cloud SQL for PostgreSQL
  1176  	// instance is not set appropriately.
  1177  	//   "SIGNAL_TYPE_LOGGING_ONLY_CRITICAL_ERRORS" - Represents if the
  1178  	// log_min_error_statement database flag for a Cloud SQL for PostgreSQL
  1179  	// instance does not have an appropriate severity level.
  1180  	//   "SIGNAL_TYPE_MINIMAL_ERROR_LOGGING" - Represents if the log_min_messages
  1181  	// database flag for a Cloud SQL for PostgreSQL instance is not set to warning
  1182  	// or another recommended value.
  1183  	//   "SIGNAL_TYPE_QUERY_STATISTICS_LOGGED" - Represents if the databaseFlags
  1184  	// property of instance metadata for the log_executor_status field is set to
  1185  	// on.
  1186  	//   "SIGNAL_TYPE_EXCESSIVE_LOGGING_OF_CLIENT_HOSTNAME" - Represents if the
  1187  	// log_hostname database flag for a Cloud SQL for PostgreSQL instance is not
  1188  	// set to off.
  1189  	//   "SIGNAL_TYPE_EXCESSIVE_LOGGING_OF_PARSER_STATISTICS" - Represents if the
  1190  	// log_parser_stats database flag for a Cloud SQL for PostgreSQL instance is
  1191  	// not set to off.
  1192  	//   "SIGNAL_TYPE_EXCESSIVE_LOGGING_OF_PLANNER_STATISTICS" - Represents if the
  1193  	// log_planner_stats database flag for a Cloud SQL for PostgreSQL instance is
  1194  	// not set to off.
  1195  	//   "SIGNAL_TYPE_NOT_LOGGING_ONLY_DDL_STATEMENTS" - Represents if the
  1196  	// log_statement database flag for a Cloud SQL for PostgreSQL instance is not
  1197  	// set to DDL (all data definition statements).
  1198  	//   "SIGNAL_TYPE_LOGGING_QUERY_STATISTICS" - Represents if the
  1199  	// log_statement_stats database flag for a Cloud SQL for PostgreSQL instance is
  1200  	// not set to off.
  1201  	//   "SIGNAL_TYPE_NOT_LOGGING_TEMPORARY_FILES" - Represents if the
  1202  	// log_temp_files database flag for a Cloud SQL for PostgreSQL instance is not
  1203  	// set to "0". (NOTE: 0 = ON)
  1204  	//   "SIGNAL_TYPE_CONNECTION_MAX_NOT_CONFIGURED" - Represents if the user
  1205  	// connections database flag for a Cloud SQL for SQL Server instance is
  1206  	// configured.
  1207  	//   "SIGNAL_TYPE_USER_OPTIONS_CONFIGURED" - Represents if the user options
  1208  	// database flag for Cloud SQL SQL Server instance is configured or not.
  1209  	//   "SIGNAL_TYPE_EXPOSED_TO_PUBLIC_ACCESS" - Represents if a resource is
  1210  	// exposed to public access.
  1211  	//   "SIGNAL_TYPE_UNENCRYPTED_CONNECTIONS" - Represents if a resources requires
  1212  	// all incoming connections to use SSL or not.
  1213  	//   "SIGNAL_TYPE_NO_ROOT_PASSWORD" - Represents if a Cloud SQL database has a
  1214  	// password configured for the root account or not.
  1215  	//   "SIGNAL_TYPE_WEAK_ROOT_PASSWORD" - Represents if a Cloud SQL database has
  1216  	// a weak password configured for the root account.
  1217  	//   "SIGNAL_TYPE_ENCRYPTION_KEY_NOT_CUSTOMER_MANAGED" - Represents if a SQL
  1218  	// database instance is not encrypted with customer-managed encryption keys
  1219  	// (CMEK).
  1220  	//   "SIGNAL_TYPE_SERVER_AUTHENTICATION_NOT_REQUIRED" - Represents if The
  1221  	// contained database authentication database flag for a Cloud SQL for SQL
  1222  	// Server instance is not set to off.
  1223  	//   "SIGNAL_TYPE_EXPOSED_BY_OWNERSHIP_CHAINING" - Represents if the
  1224  	// cross_db_ownership_chaining database flag for a Cloud SQL for SQL Server
  1225  	// instance is not set to off.
  1226  	//   "SIGNAL_TYPE_EXPOSED_TO_EXTERNAL_SCRIPTS" - Represents if he external
  1227  	// scripts enabled database flag for a Cloud SQL for SQL Server instance is not
  1228  	// set to off.
  1229  	//   "SIGNAL_TYPE_EXPOSED_TO_LOCAL_DATA_LOADS" - Represents if the local_infile
  1230  	// database flag for a Cloud SQL for MySQL instance is not set to off.
  1231  	//   "SIGNAL_TYPE_CONNECTION_ATTEMPTS_NOT_LOGGED" - Represents if the
  1232  	// log_connections database flag for a Cloud SQL for PostgreSQL instance is not
  1233  	// set to on.
  1234  	//   "SIGNAL_TYPE_DISCONNECTIONS_NOT_LOGGED" - Represents if the
  1235  	// log_disconnections database flag for a Cloud SQL for PostgreSQL instance is
  1236  	// not set to on.
  1237  	//   "SIGNAL_TYPE_LOGGING_EXCESSIVE_STATEMENT_INFO" - Represents if the
  1238  	// log_min_duration_statement database flag for a Cloud SQL for PostgreSQL
  1239  	// instance is not set to -1.
  1240  	//   "SIGNAL_TYPE_EXPOSED_TO_REMOTE_ACCESS" - Represents if the remote access
  1241  	// database flag for a Cloud SQL for SQL Server instance is not set to off.
  1242  	//   "SIGNAL_TYPE_DATABASE_NAMES_EXPOSED" - Represents if the
  1243  	// skip_show_database database flag for a Cloud SQL for MySQL instance is not
  1244  	// set to on.
  1245  	//   "SIGNAL_TYPE_SENSITIVE_TRACE_INFO_NOT_MASKED" - Represents if the 3625
  1246  	// (trace flag) database flag for a Cloud SQL for SQL Server instance is not
  1247  	// set to on.
  1248  	//   "SIGNAL_TYPE_PUBLIC_IP_ENABLED" - Represents if public IP is enabled.
  1249  	//   "SIGNAL_TYPE_IDLE" - Represents Idle instance helps to reduce costs.
  1250  	//   "SIGNAL_TYPE_OVERPROVISIONED" - Represents instances that are
  1251  	// unnecessarily large for given workload.
  1252  	//   "SIGNAL_TYPE_HIGH_NUMBER_OF_OPEN_TABLES" - Represents high number of
  1253  	// concurrently opened tables.
  1254  	//   "SIGNAL_TYPE_HIGH_NUMBER_OF_TABLES" - Represents high table count close to
  1255  	// SLA limit.
  1256  	//   "SIGNAL_TYPE_HIGH_TRANSACTION_ID_UTILIZATION" - Represents high number of
  1257  	// unvacuumed transactions
  1258  	//   "SIGNAL_TYPE_UNDERPROVISIONED" - Represents need for more CPU and/or
  1259  	// memory
  1260  	//   "SIGNAL_TYPE_OUT_OF_DISK" - Represents out of disk.
  1261  	//   "SIGNAL_TYPE_SERVER_CERTIFICATE_NEAR_EXPIRY" - Represents server
  1262  	// certificate is near expiry.
  1263  	//   "SIGNAL_TYPE_DATABASE_AUDITING_DISABLED" - Represents database auditing is
  1264  	// disabled.
  1265  	//   "SIGNAL_TYPE_RESTRICT_AUTHORIZED_NETWORKS" - Represents not restricted to
  1266  	// authorized networks.
  1267  	//   "SIGNAL_TYPE_VIOLATE_POLICY_RESTRICT_PUBLIC_IP" - Represents violate org
  1268  	// policy restrict public ip.
  1269  	//   "SIGNAL_TYPE_QUOTA_LIMIT" - Cluster nearing quota limit
  1270  	//   "SIGNAL_TYPE_NO_PASSWORD_POLICY" - No password policy set on resources
  1271  	//   "SIGNAL_TYPE_CONNECTIONS_PERFORMANCE_IMPACT" - Performance impact of
  1272  	// connections settings
  1273  	//   "SIGNAL_TYPE_TMP_TABLES_PERFORMANCE_IMPACT" - Performance impact of
  1274  	// temporary tables settings
  1275  	//   "SIGNAL_TYPE_TRANS_LOGS_PERFORMANCE_IMPACT" - Performance impact of
  1276  	// transaction logs settings
  1277  	//   "SIGNAL_TYPE_HIGH_JOINS_WITHOUT_INDEXES" - Performance impact of high
  1278  	// joins without indexes
  1279  	SignalType string `json:"signalType,omitempty"`
  1280  	// ForceSendFields is a list of field names (e.g. "AdditionalMetadata") to
  1281  	// unconditionally include in API requests. By default, fields with empty or
  1282  	// default values are omitted from API requests. See
  1283  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1284  	// details.
  1285  	ForceSendFields []string `json:"-"`
  1286  	// NullFields is a list of field names (e.g. "AdditionalMetadata") to include
  1287  	// in API requests with the JSON null value. By default, fields with empty
  1288  	// values are omitted from API requests. See
  1289  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1290  	NullFields []string `json:"-"`
  1291  }
  1292  
  1293  func (s *DatabaseResourceRecommendationSignalData) MarshalJSON() ([]byte, error) {
  1294  	type NoMethod DatabaseResourceRecommendationSignalData
  1295  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1296  }
  1297  
  1298  // DiscoveryEndpoint: Endpoints on each network, for Redis clients to connect
  1299  // to the cluster.
  1300  type DiscoveryEndpoint struct {
  1301  	// Address: Output only. Address of the exposed Redis endpoint used by clients
  1302  	// to connect to the service. The address could be either IP or hostname.
  1303  	Address string `json:"address,omitempty"`
  1304  	// Port: Output only. The port number of the exposed Redis endpoint.
  1305  	Port int64 `json:"port,omitempty"`
  1306  	// PscConfig: Output only. Customer configuration for where the endpoint is
  1307  	// created and accessed from.
  1308  	PscConfig *PscConfig `json:"pscConfig,omitempty"`
  1309  	// ForceSendFields is a list of field names (e.g. "Address") to unconditionally
  1310  	// include in API requests. By default, fields with empty or default values are
  1311  	// omitted from API requests. See
  1312  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1313  	// details.
  1314  	ForceSendFields []string `json:"-"`
  1315  	// NullFields is a list of field names (e.g. "Address") to include in API
  1316  	// requests with the JSON null value. By default, fields with empty values are
  1317  	// omitted from API requests. See
  1318  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1319  	NullFields []string `json:"-"`
  1320  }
  1321  
  1322  func (s *DiscoveryEndpoint) MarshalJSON() ([]byte, error) {
  1323  	type NoMethod DiscoveryEndpoint
  1324  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1325  }
  1326  
  1327  // Empty: A generic empty message that you can re-use to avoid defining
  1328  // duplicated empty messages in your APIs. A typical example is to use it as
  1329  // the request or the response type of an API method. For instance: service Foo
  1330  // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
  1331  type Empty struct {
  1332  	// ServerResponse contains the HTTP response code and headers from the server.
  1333  	googleapi.ServerResponse `json:"-"`
  1334  }
  1335  
  1336  // Entitlement: Proto representing the access that a user has to a specific
  1337  // feature/service. NextId: 3.
  1338  type Entitlement struct {
  1339  	// EntitlementState: The current state of user's accessibility to a
  1340  	// feature/benefit.
  1341  	//
  1342  	// Possible values:
  1343  	//   "ENTITLEMENT_STATE_UNSPECIFIED"
  1344  	//   "ENTITLED" - User is entitled to a feature/benefit, but whether it has
  1345  	// been successfully provisioned is decided by provisioning state.
  1346  	//   "REVOKED" - User is entitled to a feature/benefit, but it was requested to
  1347  	// be revoked. Whether the revoke has been successful is decided by
  1348  	// provisioning state.
  1349  	EntitlementState string `json:"entitlementState,omitempty"`
  1350  	// Type: An enum that represents the type of this entitlement.
  1351  	//
  1352  	// Possible values:
  1353  	//   "ENTITLEMENT_TYPE_UNSPECIFIED"
  1354  	//   "GEMINI" - The root entitlement representing Gemini package ownership.
  1355  	Type string `json:"type,omitempty"`
  1356  	// ForceSendFields is a list of field names (e.g. "EntitlementState") to
  1357  	// unconditionally include in API requests. By default, fields with empty or
  1358  	// default values are omitted from API requests. See
  1359  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1360  	// details.
  1361  	ForceSendFields []string `json:"-"`
  1362  	// NullFields is a list of field names (e.g. "EntitlementState") to include in
  1363  	// API requests with the JSON null value. By default, fields with empty values
  1364  	// are omitted from API requests. See
  1365  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1366  	NullFields []string `json:"-"`
  1367  }
  1368  
  1369  func (s *Entitlement) MarshalJSON() ([]byte, error) {
  1370  	type NoMethod Entitlement
  1371  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1372  }
  1373  
  1374  // ExportInstanceRequest: Request for Export.
  1375  type ExportInstanceRequest struct {
  1376  	// OutputConfig: Required. Specify data to be exported.
  1377  	OutputConfig *OutputConfig `json:"outputConfig,omitempty"`
  1378  	// ForceSendFields is a list of field names (e.g. "OutputConfig") to
  1379  	// unconditionally include in API requests. By default, fields with empty or
  1380  	// default values are omitted from API requests. See
  1381  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1382  	// details.
  1383  	ForceSendFields []string `json:"-"`
  1384  	// NullFields is a list of field names (e.g. "OutputConfig") to include in API
  1385  	// requests with the JSON null value. By default, fields with empty values are
  1386  	// omitted from API requests. See
  1387  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1388  	NullFields []string `json:"-"`
  1389  }
  1390  
  1391  func (s *ExportInstanceRequest) MarshalJSON() ([]byte, error) {
  1392  	type NoMethod ExportInstanceRequest
  1393  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1394  }
  1395  
  1396  // FailoverInstanceRequest: Request for Failover.
  1397  type FailoverInstanceRequest struct {
  1398  	// DataProtectionMode: Optional. Available data protection modes that the user
  1399  	// can choose. If it's unspecified, data protection mode will be
  1400  	// LIMITED_DATA_LOSS by default.
  1401  	//
  1402  	// Possible values:
  1403  	//   "DATA_PROTECTION_MODE_UNSPECIFIED" - Defaults to LIMITED_DATA_LOSS if a
  1404  	// data protection mode is not specified.
  1405  	//   "LIMITED_DATA_LOSS" - Instance failover will be protected with data loss
  1406  	// control. More specifically, the failover will only be performed if the
  1407  	// current replication offset diff between primary and replica is under a
  1408  	// certain threshold.
  1409  	//   "FORCE_DATA_LOSS" - Instance failover will be performed without data loss
  1410  	// control.
  1411  	DataProtectionMode string `json:"dataProtectionMode,omitempty"`
  1412  	// ForceSendFields is a list of field names (e.g. "DataProtectionMode") to
  1413  	// unconditionally include in API requests. By default, fields with empty or
  1414  	// default values are omitted from API requests. See
  1415  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1416  	// details.
  1417  	ForceSendFields []string `json:"-"`
  1418  	// NullFields is a list of field names (e.g. "DataProtectionMode") to include
  1419  	// in API requests with the JSON null value. By default, fields with empty
  1420  	// values are omitted from API requests. See
  1421  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1422  	NullFields []string `json:"-"`
  1423  }
  1424  
  1425  func (s *FailoverInstanceRequest) MarshalJSON() ([]byte, error) {
  1426  	type NoMethod FailoverInstanceRequest
  1427  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1428  }
  1429  
  1430  // GcsDestination: The Cloud Storage location for the output content
  1431  type GcsDestination struct {
  1432  	// Uri: Required. Data destination URI (e.g. 'gs://my_bucket/my_object').
  1433  	// Existing files will be overwritten.
  1434  	Uri string `json:"uri,omitempty"`
  1435  	// ForceSendFields is a list of field names (e.g. "Uri") to unconditionally
  1436  	// include in API requests. By default, fields with empty or default values are
  1437  	// omitted from API requests. See
  1438  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1439  	// details.
  1440  	ForceSendFields []string `json:"-"`
  1441  	// NullFields is a list of field names (e.g. "Uri") to include in API requests
  1442  	// with the JSON null value. By default, fields with empty values are omitted
  1443  	// from API requests. See
  1444  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1445  	NullFields []string `json:"-"`
  1446  }
  1447  
  1448  func (s *GcsDestination) MarshalJSON() ([]byte, error) {
  1449  	type NoMethod GcsDestination
  1450  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1451  }
  1452  
  1453  // GcsSource: The Cloud Storage location for the input content
  1454  type GcsSource struct {
  1455  	// Uri: Required. Source data URI. (e.g. 'gs://my_bucket/my_object').
  1456  	Uri string `json:"uri,omitempty"`
  1457  	// ForceSendFields is a list of field names (e.g. "Uri") to unconditionally
  1458  	// include in API requests. By default, fields with empty or default values are
  1459  	// omitted from API requests. See
  1460  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1461  	// details.
  1462  	ForceSendFields []string `json:"-"`
  1463  	// NullFields is a list of field names (e.g. "Uri") to include in API requests
  1464  	// with the JSON null value. By default, fields with empty values are omitted
  1465  	// from API requests. See
  1466  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1467  	NullFields []string `json:"-"`
  1468  }
  1469  
  1470  func (s *GcsSource) MarshalJSON() ([]byte, error) {
  1471  	type NoMethod GcsSource
  1472  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1473  }
  1474  
  1475  // GoogleCloudCommonOperationMetadata: Represents the metadata of the
  1476  // long-running operation.
  1477  type GoogleCloudCommonOperationMetadata struct {
  1478  	// ApiVersion: Output only. API version used to start the operation.
  1479  	ApiVersion string `json:"apiVersion,omitempty"`
  1480  	// CancelRequested: Output only. Identifies whether the user has requested
  1481  	// cancellation of the operation. Operations that have been cancelled
  1482  	// successfully have Operation.error value with a google.rpc.Status.code of 1,
  1483  	// corresponding to `Code.CANCELLED`.
  1484  	CancelRequested bool `json:"cancelRequested,omitempty"`
  1485  	// CreateTime: Output only. The time the operation was created.
  1486  	CreateTime string `json:"createTime,omitempty"`
  1487  	// EndTime: Output only. The time the operation finished running.
  1488  	EndTime string `json:"endTime,omitempty"`
  1489  	// StatusDetail: Output only. Human-readable status of the operation, if any.
  1490  	StatusDetail string `json:"statusDetail,omitempty"`
  1491  	// Target: Output only. Server-defined resource path for the target of the
  1492  	// operation.
  1493  	Target string `json:"target,omitempty"`
  1494  	// Verb: Output only. Name of the verb executed by the operation.
  1495  	Verb string `json:"verb,omitempty"`
  1496  	// ForceSendFields is a list of field names (e.g. "ApiVersion") to
  1497  	// unconditionally include in API requests. By default, fields with empty or
  1498  	// default values are omitted from API requests. See
  1499  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1500  	// details.
  1501  	ForceSendFields []string `json:"-"`
  1502  	// NullFields is a list of field names (e.g. "ApiVersion") to include in API
  1503  	// requests with the JSON null value. By default, fields with empty values are
  1504  	// omitted from API requests. See
  1505  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1506  	NullFields []string `json:"-"`
  1507  }
  1508  
  1509  func (s *GoogleCloudCommonOperationMetadata) MarshalJSON() ([]byte, error) {
  1510  	type NoMethod GoogleCloudCommonOperationMetadata
  1511  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1512  }
  1513  
  1514  // GoogleCloudRedisV1beta1LocationMetadata: This location metadata represents
  1515  // additional configuration options for a given location where a Redis instance
  1516  // may be created. All fields are output only. It is returned as content of the
  1517  // `google.cloud.location.Location.metadata` field.
  1518  type GoogleCloudRedisV1beta1LocationMetadata struct {
  1519  	// AvailableZones: Output only. The set of available zones in the location. The
  1520  	// map is keyed by the lowercase ID of each zone, as defined by GCE. These keys
  1521  	// can be specified in `location_id` or `alternative_location_id` fields when
  1522  	// creating a Redis instance.
  1523  	AvailableZones map[string]GoogleCloudRedisV1beta1ZoneMetadata `json:"availableZones,omitempty"`
  1524  	// ForceSendFields is a list of field names (e.g. "AvailableZones") to
  1525  	// unconditionally include in API requests. By default, fields with empty or
  1526  	// default values are omitted from API requests. See
  1527  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1528  	// details.
  1529  	ForceSendFields []string `json:"-"`
  1530  	// NullFields is a list of field names (e.g. "AvailableZones") to include in
  1531  	// API requests with the JSON null value. By default, fields with empty values
  1532  	// are omitted from API requests. See
  1533  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1534  	NullFields []string `json:"-"`
  1535  }
  1536  
  1537  func (s *GoogleCloudRedisV1beta1LocationMetadata) MarshalJSON() ([]byte, error) {
  1538  	type NoMethod GoogleCloudRedisV1beta1LocationMetadata
  1539  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1540  }
  1541  
  1542  // GoogleCloudRedisV1beta1ZoneMetadata: Defines specific information for a
  1543  // particular zone. Currently empty and reserved for future use only.
  1544  type GoogleCloudRedisV1beta1ZoneMetadata struct {
  1545  }
  1546  
  1547  // ImportInstanceRequest: Request for Import.
  1548  type ImportInstanceRequest struct {
  1549  	// InputConfig: Required. Specify data to be imported.
  1550  	InputConfig *InputConfig `json:"inputConfig,omitempty"`
  1551  	// ForceSendFields is a list of field names (e.g. "InputConfig") to
  1552  	// unconditionally include in API requests. By default, fields with empty or
  1553  	// default values are omitted from API requests. See
  1554  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1555  	// details.
  1556  	ForceSendFields []string `json:"-"`
  1557  	// NullFields is a list of field names (e.g. "InputConfig") to include in API
  1558  	// requests with the JSON null value. By default, fields with empty values are
  1559  	// omitted from API requests. See
  1560  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1561  	NullFields []string `json:"-"`
  1562  }
  1563  
  1564  func (s *ImportInstanceRequest) MarshalJSON() ([]byte, error) {
  1565  	type NoMethod ImportInstanceRequest
  1566  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1567  }
  1568  
  1569  // InputConfig: The input content
  1570  type InputConfig struct {
  1571  	// GcsSource: Google Cloud Storage location where input content is located.
  1572  	GcsSource *GcsSource `json:"gcsSource,omitempty"`
  1573  	// ForceSendFields is a list of field names (e.g. "GcsSource") to
  1574  	// unconditionally include in API requests. By default, fields with empty or
  1575  	// default values are omitted from API requests. See
  1576  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1577  	// details.
  1578  	ForceSendFields []string `json:"-"`
  1579  	// NullFields is a list of field names (e.g. "GcsSource") to include in API
  1580  	// requests with the JSON null value. By default, fields with empty values are
  1581  	// omitted from API requests. See
  1582  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1583  	NullFields []string `json:"-"`
  1584  }
  1585  
  1586  func (s *InputConfig) MarshalJSON() ([]byte, error) {
  1587  	type NoMethod InputConfig
  1588  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1589  }
  1590  
  1591  // Instance: A Memorystore for Redis instance.
  1592  type Instance struct {
  1593  	// AlternativeLocationId: Optional. If specified, at least one node will be
  1594  	// provisioned in this zone in addition to the zone specified in location_id.
  1595  	// Only applicable to standard tier. If provided, it must be a different zone
  1596  	// from the one provided in [location_id]. Additional nodes beyond the first 2
  1597  	// will be placed in zones selected by the service.
  1598  	AlternativeLocationId string `json:"alternativeLocationId,omitempty"`
  1599  	// AuthEnabled: Optional. Indicates whether OSS Redis AUTH is enabled for the
  1600  	// instance. If set to "true" AUTH is enabled on the instance. Default value is
  1601  	// "false" meaning AUTH is disabled.
  1602  	AuthEnabled bool `json:"authEnabled,omitempty"`
  1603  	// AuthorizedNetwork: Optional. The full name of the Google Compute Engine
  1604  	// network (https://cloud.google.com/vpc/docs/vpc) to which the instance is
  1605  	// connected. If left unspecified, the `default` network will be used.
  1606  	AuthorizedNetwork string `json:"authorizedNetwork,omitempty"`
  1607  	// AvailableMaintenanceVersions: Optional. The available maintenance versions
  1608  	// that an instance could update to.
  1609  	AvailableMaintenanceVersions []string `json:"availableMaintenanceVersions,omitempty"`
  1610  	// ConnectMode: Optional. The network connect mode of the Redis instance. If
  1611  	// not provided, the connect mode defaults to DIRECT_PEERING.
  1612  	//
  1613  	// Possible values:
  1614  	//   "CONNECT_MODE_UNSPECIFIED" - Not set.
  1615  	//   "DIRECT_PEERING" - Connect via direct peering to the Memorystore for Redis
  1616  	// hosted service.
  1617  	//   "PRIVATE_SERVICE_ACCESS" - Connect your Memorystore for Redis instance
  1618  	// using Private Service Access. Private services access provides an IP address
  1619  	// range for multiple Google Cloud services, including Memorystore.
  1620  	ConnectMode string `json:"connectMode,omitempty"`
  1621  	// CreateTime: Output only. The time the instance was created.
  1622  	CreateTime string `json:"createTime,omitempty"`
  1623  	// CurrentLocationId: Output only. The current zone where the Redis primary
  1624  	// node is located. In basic tier, this will always be the same as
  1625  	// [location_id]. In standard tier, this can be the zone of any node in the
  1626  	// instance.
  1627  	CurrentLocationId string `json:"currentLocationId,omitempty"`
  1628  	// CustomerManagedKey: Optional. The KMS key reference that the customer
  1629  	// provides when trying to create the instance.
  1630  	CustomerManagedKey string `json:"customerManagedKey,omitempty"`
  1631  	// DisplayName: An arbitrary and optional user-provided name for the instance.
  1632  	DisplayName string `json:"displayName,omitempty"`
  1633  	// Host: Output only. Hostname or IP address of the exposed Redis endpoint used
  1634  	// by clients to connect to the service.
  1635  	Host string `json:"host,omitempty"`
  1636  	// Labels: Resource labels to represent user provided metadata
  1637  	Labels map[string]string `json:"labels,omitempty"`
  1638  	// LocationId: Optional. The zone where the instance will be provisioned. If
  1639  	// not provided, the service will choose a zone from the specified region for
  1640  	// the instance. For standard tier, additional nodes will be added across
  1641  	// multiple zones for protection against zonal failures. If specified, at least
  1642  	// one node will be provisioned in this zone.
  1643  	LocationId string `json:"locationId,omitempty"`
  1644  	// MaintenancePolicy: Optional. The maintenance policy for the instance. If not
  1645  	// provided, maintenance events can be performed at any time.
  1646  	MaintenancePolicy *MaintenancePolicy `json:"maintenancePolicy,omitempty"`
  1647  	// MaintenanceSchedule: Output only. Date and time of upcoming maintenance
  1648  	// events which have been scheduled.
  1649  	MaintenanceSchedule *MaintenanceSchedule `json:"maintenanceSchedule,omitempty"`
  1650  	// MaintenanceVersion: Optional. The self service update maintenance version.
  1651  	// The version is date based such as "20210712_00_00".
  1652  	MaintenanceVersion string `json:"maintenanceVersion,omitempty"`
  1653  	// MemorySizeGb: Required. Redis memory size in GiB.
  1654  	MemorySizeGb int64 `json:"memorySizeGb,omitempty"`
  1655  	// Name: Required. Unique name of the resource in this scope including project
  1656  	// and location using the form:
  1657  	// `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
  1658  	// Note: Redis instances are managed and addressed at regional level so
  1659  	// location_id here refers to a GCP region; however, users may choose which
  1660  	// specific zone (or collection of zones for cross-zone instances) an instance
  1661  	// should be provisioned in. Refer to location_id and alternative_location_id
  1662  	// fields for more details.
  1663  	Name string `json:"name,omitempty"`
  1664  	// Nodes: Output only. Info per node.
  1665  	Nodes []*NodeInfo `json:"nodes,omitempty"`
  1666  	// PersistenceConfig: Optional. Persistence configuration parameters
  1667  	PersistenceConfig *PersistenceConfig `json:"persistenceConfig,omitempty"`
  1668  	// PersistenceIamIdentity: Output only. Cloud IAM identity used by import /
  1669  	// export operations to transfer data to/from Cloud Storage. Format is
  1670  	// "serviceAccount:". The value may change over time for a given instance so
  1671  	// should be checked before each import/export operation.
  1672  	PersistenceIamIdentity string `json:"persistenceIamIdentity,omitempty"`
  1673  	// Port: Output only. The port number of the exposed Redis endpoint.
  1674  	Port int64 `json:"port,omitempty"`
  1675  	// ReadEndpoint: Output only. Hostname or IP address of the exposed readonly
  1676  	// Redis endpoint. Standard tier only. Targets all healthy replica nodes in
  1677  	// instance. Replication is asynchronous and replica nodes will exhibit some
  1678  	// lag behind the primary. Write requests must target 'host'.
  1679  	ReadEndpoint string `json:"readEndpoint,omitempty"`
  1680  	// ReadEndpointPort: Output only. The port number of the exposed readonly redis
  1681  	// endpoint. Standard tier only. Write requests should target 'port'.
  1682  	ReadEndpointPort int64 `json:"readEndpointPort,omitempty"`
  1683  	// ReadReplicasMode: Optional. Read replicas mode for the instance. Defaults to
  1684  	// READ_REPLICAS_DISABLED.
  1685  	//
  1686  	// Possible values:
  1687  	//   "READ_REPLICAS_MODE_UNSPECIFIED" - If not set, Memorystore Redis backend
  1688  	// will default to READ_REPLICAS_DISABLED.
  1689  	//   "READ_REPLICAS_DISABLED" - If disabled, read endpoint will not be provided
  1690  	// and the instance cannot scale up or down the number of replicas.
  1691  	//   "READ_REPLICAS_ENABLED" - If enabled, read endpoint will be provided and
  1692  	// the instance can scale up and down the number of replicas. Not valid for
  1693  	// basic tier.
  1694  	ReadReplicasMode string `json:"readReplicasMode,omitempty"`
  1695  	// RedisConfigs: Optional. Redis configuration parameters, according to
  1696  	// http://redis.io/topics/config. Currently, the only supported parameters are:
  1697  	// Redis version 3.2 and newer: * maxmemory-policy * notify-keyspace-events
  1698  	// Redis version 4.0 and newer: * activedefrag * lfu-decay-time *
  1699  	// lfu-log-factor * maxmemory-gb Redis version 5.0 and newer: *
  1700  	// stream-node-max-bytes * stream-node-max-entries
  1701  	RedisConfigs map[string]string `json:"redisConfigs,omitempty"`
  1702  	// RedisVersion: Optional. The version of Redis software. If not provided,
  1703  	// latest supported version will be used. Currently, the supported values are:
  1704  	// * `REDIS_3_2` for Redis 3.2 compatibility * `REDIS_4_0` for Redis 4.0
  1705  	// compatibility (default) * `REDIS_5_0` for Redis 5.0 compatibility *
  1706  	// `REDIS_6_X` for Redis 6.x compatibility * `REDIS_7_0` for Redis 7.0
  1707  	// compatibility
  1708  	RedisVersion string `json:"redisVersion,omitempty"`
  1709  	// ReplicaCount: Optional. The number of replica nodes. The valid range for the
  1710  	// Standard Tier with read replicas enabled is [1-5] and defaults to 2. If read
  1711  	// replicas are not enabled for a Standard Tier instance, the only valid value
  1712  	// is 1 and the default is 1. The valid value for basic tier is 0 and the
  1713  	// default is also 0.
  1714  	ReplicaCount int64 `json:"replicaCount,omitempty"`
  1715  	// ReservedIpRange: Optional. For DIRECT_PEERING mode, the CIDR range of
  1716  	// internal addresses that are reserved for this instance. Range must be unique
  1717  	// and non-overlapping with existing subnets in an authorized network. For
  1718  	// PRIVATE_SERVICE_ACCESS mode, the name of one allocated IP address ranges
  1719  	// associated with this private service access connection. If not provided, the
  1720  	// service will choose an unused /29 block, for example, 10.0.0.0/29 or
  1721  	// 192.168.0.0/29. For READ_REPLICAS_ENABLED the default block size is /28.
  1722  	ReservedIpRange string `json:"reservedIpRange,omitempty"`
  1723  	// SatisfiesPzi: Optional. Output only. Reserved for future use.
  1724  	SatisfiesPzi bool `json:"satisfiesPzi,omitempty"`
  1725  	// SatisfiesPzs: Optional. Output only. Reserved for future use.
  1726  	SatisfiesPzs bool `json:"satisfiesPzs,omitempty"`
  1727  	// SecondaryIpRange: Optional. Additional IP range for node placement. Required
  1728  	// when enabling read replicas on an existing instance. For DIRECT_PEERING mode
  1729  	// value must be a CIDR range of size /28, or "auto". For
  1730  	// PRIVATE_SERVICE_ACCESS mode value must be the name of an allocated address
  1731  	// range associated with the private service access connection, or "auto".
  1732  	SecondaryIpRange string `json:"secondaryIpRange,omitempty"`
  1733  	// ServerCaCerts: Output only. List of server CA certificates for the instance.
  1734  	ServerCaCerts []*TlsCertificate `json:"serverCaCerts,omitempty"`
  1735  	// State: Output only. The current state of this instance.
  1736  	//
  1737  	// Possible values:
  1738  	//   "STATE_UNSPECIFIED" - Not set.
  1739  	//   "CREATING" - Redis instance is being created.
  1740  	//   "READY" - Redis instance has been created and is fully usable.
  1741  	//   "UPDATING" - Redis instance configuration is being updated. Certain kinds
  1742  	// of updates may cause the instance to become unusable while the update is in
  1743  	// progress.
  1744  	//   "DELETING" - Redis instance is being deleted.
  1745  	//   "REPAIRING" - Redis instance is being repaired and may be unusable.
  1746  	//   "MAINTENANCE" - Maintenance is being performed on this Redis instance.
  1747  	//   "IMPORTING" - Redis instance is importing data (availability may be
  1748  	// affected).
  1749  	//   "FAILING_OVER" - Redis instance is failing over (availability may be
  1750  	// affected).
  1751  	State string `json:"state,omitempty"`
  1752  	// StatusMessage: Output only. Additional information about the current status
  1753  	// of this instance, if available.
  1754  	StatusMessage string `json:"statusMessage,omitempty"`
  1755  	// SuspensionReasons: Optional. reasons that causes instance in "SUSPENDED"
  1756  	// state.
  1757  	//
  1758  	// Possible values:
  1759  	//   "SUSPENSION_REASON_UNSPECIFIED" - Not set.
  1760  	//   "CUSTOMER_MANAGED_KEY_ISSUE" - Something wrong with the CMEK key provided
  1761  	// by customer.
  1762  	SuspensionReasons []string `json:"suspensionReasons,omitempty"`
  1763  	// Tier: Required. The service tier of the instance.
  1764  	//
  1765  	// Possible values:
  1766  	//   "TIER_UNSPECIFIED" - Not set.
  1767  	//   "BASIC" - BASIC tier: standalone instance
  1768  	//   "STANDARD_HA" - STANDARD_HA tier: highly available primary/replica
  1769  	// instances
  1770  	Tier string `json:"tier,omitempty"`
  1771  	// TransitEncryptionMode: Optional. The TLS mode of the Redis instance. If not
  1772  	// provided, TLS is disabled for the instance.
  1773  	//
  1774  	// Possible values:
  1775  	//   "TRANSIT_ENCRYPTION_MODE_UNSPECIFIED" - Not set.
  1776  	//   "SERVER_AUTHENTICATION" - Client to Server traffic encryption enabled with
  1777  	// server authentication.
  1778  	//   "DISABLED" - TLS is disabled for the instance.
  1779  	TransitEncryptionMode string `json:"transitEncryptionMode,omitempty"`
  1780  
  1781  	// ServerResponse contains the HTTP response code and headers from the server.
  1782  	googleapi.ServerResponse `json:"-"`
  1783  	// ForceSendFields is a list of field names (e.g. "AlternativeLocationId") to
  1784  	// unconditionally include in API requests. By default, fields with empty or
  1785  	// default values are omitted from API requests. See
  1786  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1787  	// details.
  1788  	ForceSendFields []string `json:"-"`
  1789  	// NullFields is a list of field names (e.g. "AlternativeLocationId") to
  1790  	// include in API requests with the JSON null value. By default, fields with
  1791  	// empty values are omitted from API requests. See
  1792  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1793  	NullFields []string `json:"-"`
  1794  }
  1795  
  1796  func (s *Instance) MarshalJSON() ([]byte, error) {
  1797  	type NoMethod Instance
  1798  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1799  }
  1800  
  1801  // InstanceAuthString: Instance AUTH string details.
  1802  type InstanceAuthString struct {
  1803  	// AuthString: AUTH string set on the instance.
  1804  	AuthString string `json:"authString,omitempty"`
  1805  
  1806  	// ServerResponse contains the HTTP response code and headers from the server.
  1807  	googleapi.ServerResponse `json:"-"`
  1808  	// ForceSendFields is a list of field names (e.g. "AuthString") to
  1809  	// unconditionally include in API requests. By default, fields with empty or
  1810  	// default values are omitted from API requests. See
  1811  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1812  	// details.
  1813  	ForceSendFields []string `json:"-"`
  1814  	// NullFields is a list of field names (e.g. "AuthString") to include in API
  1815  	// requests with the JSON null value. By default, fields with empty values are
  1816  	// omitted from API requests. See
  1817  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1818  	NullFields []string `json:"-"`
  1819  }
  1820  
  1821  func (s *InstanceAuthString) MarshalJSON() ([]byte, error) {
  1822  	type NoMethod InstanceAuthString
  1823  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1824  }
  1825  
  1826  // ListClustersResponse: Response for ListClusters.
  1827  type ListClustersResponse struct {
  1828  	// Clusters: A list of Redis clusters in the project in the specified location,
  1829  	// or across all locations. If the `location_id` in the parent field of the
  1830  	// request is "-", all regions available to the project are queried, and the
  1831  	// results aggregated. If in such an aggregated query a location is
  1832  	// unavailable, a placeholder Redis entry is included in the response with the
  1833  	// `name` field set to a value of the form
  1834  	// `projects/{project_id}/locations/{location_id}/clusters/`- and the `status`
  1835  	// field set to ERROR and `status_message` field set to "location not available
  1836  	// for ListClusters".
  1837  	Clusters []*Cluster `json:"clusters,omitempty"`
  1838  	// NextPageToken: Token to retrieve the next page of results, or empty if there
  1839  	// are no more results in the list.
  1840  	NextPageToken string `json:"nextPageToken,omitempty"`
  1841  	// Unreachable: Locations that could not be reached.
  1842  	Unreachable []string `json:"unreachable,omitempty"`
  1843  
  1844  	// ServerResponse contains the HTTP response code and headers from the server.
  1845  	googleapi.ServerResponse `json:"-"`
  1846  	// ForceSendFields is a list of field names (e.g. "Clusters") to
  1847  	// unconditionally include in API requests. By default, fields with empty or
  1848  	// default values are omitted from API requests. See
  1849  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1850  	// details.
  1851  	ForceSendFields []string `json:"-"`
  1852  	// NullFields is a list of field names (e.g. "Clusters") to include in API
  1853  	// requests with the JSON null value. By default, fields with empty values are
  1854  	// omitted from API requests. See
  1855  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1856  	NullFields []string `json:"-"`
  1857  }
  1858  
  1859  func (s *ListClustersResponse) MarshalJSON() ([]byte, error) {
  1860  	type NoMethod ListClustersResponse
  1861  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1862  }
  1863  
  1864  // ListInstancesResponse: Response for ListInstances.
  1865  type ListInstancesResponse struct {
  1866  	// Instances: A list of Redis instances in the project in the specified
  1867  	// location, or across all locations. If the `location_id` in the parent field
  1868  	// of the request is "-", all regions available to the project are queried, and
  1869  	// the results aggregated. If in such an aggregated query a location is
  1870  	// unavailable, a placeholder Redis entry is included in the response with the
  1871  	// `name` field set to a value of the form
  1872  	// `projects/{project_id}/locations/{location_id}/instances/`- and the `status`
  1873  	// field set to ERROR and `status_message` field set to "location not available
  1874  	// for ListInstances".
  1875  	Instances []*Instance `json:"instances,omitempty"`
  1876  	// NextPageToken: Token to retrieve the next page of results, or empty if there
  1877  	// are no more results in the list.
  1878  	NextPageToken string `json:"nextPageToken,omitempty"`
  1879  	// Unreachable: Locations that could not be reached.
  1880  	Unreachable []string `json:"unreachable,omitempty"`
  1881  
  1882  	// ServerResponse contains the HTTP response code and headers from the server.
  1883  	googleapi.ServerResponse `json:"-"`
  1884  	// ForceSendFields is a list of field names (e.g. "Instances") to
  1885  	// unconditionally include in API requests. By default, fields with empty or
  1886  	// default values are omitted from API requests. See
  1887  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1888  	// details.
  1889  	ForceSendFields []string `json:"-"`
  1890  	// NullFields is a list of field names (e.g. "Instances") to include in API
  1891  	// requests with the JSON null value. By default, fields with empty values are
  1892  	// omitted from API requests. See
  1893  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1894  	NullFields []string `json:"-"`
  1895  }
  1896  
  1897  func (s *ListInstancesResponse) MarshalJSON() ([]byte, error) {
  1898  	type NoMethod ListInstancesResponse
  1899  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1900  }
  1901  
  1902  // ListLocationsResponse: The response message for Locations.ListLocations.
  1903  type ListLocationsResponse struct {
  1904  	// Locations: A list of locations that matches the specified filter in the
  1905  	// request.
  1906  	Locations []*Location `json:"locations,omitempty"`
  1907  	// NextPageToken: The standard List next-page token.
  1908  	NextPageToken string `json:"nextPageToken,omitempty"`
  1909  
  1910  	// ServerResponse contains the HTTP response code and headers from the server.
  1911  	googleapi.ServerResponse `json:"-"`
  1912  	// ForceSendFields is a list of field names (e.g. "Locations") to
  1913  	// unconditionally include in API requests. By default, fields with empty or
  1914  	// default values are omitted from API requests. See
  1915  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1916  	// details.
  1917  	ForceSendFields []string `json:"-"`
  1918  	// NullFields is a list of field names (e.g. "Locations") to include in API
  1919  	// requests with the JSON null value. By default, fields with empty values are
  1920  	// omitted from API requests. See
  1921  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1922  	NullFields []string `json:"-"`
  1923  }
  1924  
  1925  func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
  1926  	type NoMethod ListLocationsResponse
  1927  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1928  }
  1929  
  1930  // ListOperationsResponse: The response message for Operations.ListOperations.
  1931  type ListOperationsResponse struct {
  1932  	// NextPageToken: The standard List next-page token.
  1933  	NextPageToken string `json:"nextPageToken,omitempty"`
  1934  	// Operations: A list of operations that matches the specified filter in the
  1935  	// request.
  1936  	Operations []*Operation `json:"operations,omitempty"`
  1937  
  1938  	// ServerResponse contains the HTTP response code and headers from the server.
  1939  	googleapi.ServerResponse `json:"-"`
  1940  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1941  	// unconditionally include in API requests. By default, fields with empty or
  1942  	// default values are omitted from API requests. See
  1943  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1944  	// details.
  1945  	ForceSendFields []string `json:"-"`
  1946  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1947  	// requests with the JSON null value. By default, fields with empty values are
  1948  	// omitted from API requests. See
  1949  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1950  	NullFields []string `json:"-"`
  1951  }
  1952  
  1953  func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
  1954  	type NoMethod ListOperationsResponse
  1955  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1956  }
  1957  
  1958  // Location: A resource that represents a Google Cloud location.
  1959  type Location struct {
  1960  	// DisplayName: The friendly name for this location, typically a nearby city
  1961  	// name. For example, "Tokyo".
  1962  	DisplayName string `json:"displayName,omitempty"`
  1963  	// Labels: Cross-service attributes for the location. For example
  1964  	// {"cloud.googleapis.com/region": "us-east1"}
  1965  	Labels map[string]string `json:"labels,omitempty"`
  1966  	// LocationId: Resource ID for the region. For example: "us-east1".
  1967  	LocationId string `json:"locationId,omitempty"`
  1968  	// Metadata: Output only. The set of available zones in the location. The map
  1969  	// is keyed by the lowercase ID of each zone, as defined by Compute Engine.
  1970  	// These keys can be specified in `location_id` or `alternative_location_id`
  1971  	// fields when creating a Redis instance.
  1972  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  1973  	// Name: Full resource name for the region. For example:
  1974  	// "projects/example-project/locations/us-east1".
  1975  	Name string `json:"name,omitempty"`
  1976  
  1977  	// ServerResponse contains the HTTP response code and headers from the server.
  1978  	googleapi.ServerResponse `json:"-"`
  1979  	// ForceSendFields is a list of field names (e.g. "DisplayName") to
  1980  	// unconditionally include in API requests. By default, fields with empty or
  1981  	// default values are omitted from API requests. See
  1982  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1983  	// details.
  1984  	ForceSendFields []string `json:"-"`
  1985  	// NullFields is a list of field names (e.g. "DisplayName") to include in API
  1986  	// requests with the JSON null value. By default, fields with empty values are
  1987  	// omitted from API requests. See
  1988  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1989  	NullFields []string `json:"-"`
  1990  }
  1991  
  1992  func (s *Location) MarshalJSON() ([]byte, error) {
  1993  	type NoMethod Location
  1994  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1995  }
  1996  
  1997  // MaintenancePolicy: Maintenance policy for an instance.
  1998  type MaintenancePolicy struct {
  1999  	// CreateTime: Output only. The time when the policy was created.
  2000  	CreateTime string `json:"createTime,omitempty"`
  2001  	// Description: Optional. Description of what this policy is for. Create/Update
  2002  	// methods return INVALID_ARGUMENT if the length is greater than 512.
  2003  	Description string `json:"description,omitempty"`
  2004  	// UpdateTime: Output only. The time when the policy was last updated.
  2005  	UpdateTime string `json:"updateTime,omitempty"`
  2006  	// WeeklyMaintenanceWindow: Optional. Maintenance window that is applied to
  2007  	// resources covered by this policy. Minimum 1. For the current version, the
  2008  	// maximum number of weekly_window is expected to be one.
  2009  	WeeklyMaintenanceWindow []*WeeklyMaintenanceWindow `json:"weeklyMaintenanceWindow,omitempty"`
  2010  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  2011  	// unconditionally include in API requests. By default, fields with empty or
  2012  	// default values are omitted from API requests. See
  2013  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2014  	// details.
  2015  	ForceSendFields []string `json:"-"`
  2016  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  2017  	// requests with the JSON null value. By default, fields with empty values are
  2018  	// omitted from API requests. See
  2019  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2020  	NullFields []string `json:"-"`
  2021  }
  2022  
  2023  func (s *MaintenancePolicy) MarshalJSON() ([]byte, error) {
  2024  	type NoMethod MaintenancePolicy
  2025  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2026  }
  2027  
  2028  // MaintenanceSchedule: Upcoming maintenance schedule. If no maintenance is
  2029  // scheduled, fields are not populated.
  2030  type MaintenanceSchedule struct {
  2031  	// CanReschedule: If the scheduled maintenance can be rescheduled, default is
  2032  	// true.
  2033  	CanReschedule bool `json:"canReschedule,omitempty"`
  2034  	// EndTime: Output only. The end time of any upcoming scheduled maintenance for
  2035  	// this instance.
  2036  	EndTime string `json:"endTime,omitempty"`
  2037  	// ScheduleDeadlineTime: Output only. The deadline that the maintenance
  2038  	// schedule start time can not go beyond, including reschedule.
  2039  	ScheduleDeadlineTime string `json:"scheduleDeadlineTime,omitempty"`
  2040  	// StartTime: Output only. The start time of any upcoming scheduled maintenance
  2041  	// for this instance.
  2042  	StartTime string `json:"startTime,omitempty"`
  2043  	// ForceSendFields is a list of field names (e.g. "CanReschedule") to
  2044  	// unconditionally include in API requests. By default, fields with empty or
  2045  	// default values are omitted from API requests. See
  2046  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2047  	// details.
  2048  	ForceSendFields []string `json:"-"`
  2049  	// NullFields is a list of field names (e.g. "CanReschedule") to include in API
  2050  	// requests with the JSON null value. By default, fields with empty values are
  2051  	// omitted from API requests. See
  2052  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2053  	NullFields []string `json:"-"`
  2054  }
  2055  
  2056  func (s *MaintenanceSchedule) MarshalJSON() ([]byte, error) {
  2057  	type NoMethod MaintenanceSchedule
  2058  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2059  }
  2060  
  2061  type ManagedCertificateAuthority struct {
  2062  	// CaCerts: The PEM encoded CA certificate chains for redis managed server
  2063  	// authentication
  2064  	CaCerts []*CertChain `json:"caCerts,omitempty"`
  2065  	// ForceSendFields is a list of field names (e.g. "CaCerts") to unconditionally
  2066  	// include in API requests. By default, fields with empty or default values are
  2067  	// omitted from API requests. See
  2068  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2069  	// details.
  2070  	ForceSendFields []string `json:"-"`
  2071  	// NullFields is a list of field names (e.g. "CaCerts") to include in API
  2072  	// requests with the JSON null value. By default, fields with empty values are
  2073  	// omitted from API requests. See
  2074  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2075  	NullFields []string `json:"-"`
  2076  }
  2077  
  2078  func (s *ManagedCertificateAuthority) MarshalJSON() ([]byte, error) {
  2079  	type NoMethod ManagedCertificateAuthority
  2080  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2081  }
  2082  
  2083  // NodeInfo: Node specific properties.
  2084  type NodeInfo struct {
  2085  	// Id: Output only. Node identifying string. e.g. 'node-0', 'node-1'
  2086  	Id string `json:"id,omitempty"`
  2087  	// Zone: Output only. Location of the node.
  2088  	Zone string `json:"zone,omitempty"`
  2089  	// ForceSendFields is a list of field names (e.g. "Id") to unconditionally
  2090  	// include in API requests. By default, fields with empty or default values are
  2091  	// omitted from API requests. See
  2092  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2093  	// details.
  2094  	ForceSendFields []string `json:"-"`
  2095  	// NullFields is a list of field names (e.g. "Id") to include in API requests
  2096  	// with the JSON null value. By default, fields with empty values are omitted
  2097  	// from API requests. See
  2098  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2099  	NullFields []string `json:"-"`
  2100  }
  2101  
  2102  func (s *NodeInfo) MarshalJSON() ([]byte, error) {
  2103  	type NoMethod NodeInfo
  2104  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2105  }
  2106  
  2107  // Operation: This resource represents a long-running operation that is the
  2108  // result of a network API call.
  2109  type Operation struct {
  2110  	// Done: If the value is `false`, it means the operation is still in progress.
  2111  	// If `true`, the operation is completed, and either `error` or `response` is
  2112  	// available.
  2113  	Done bool `json:"done,omitempty"`
  2114  	// Error: The error result of the operation in case of failure or cancellation.
  2115  	Error *Status `json:"error,omitempty"`
  2116  	// Metadata: { `createTime`: The time the operation was created. `endTime`: The
  2117  	// time the operation finished running. `target`: Server-defined resource path
  2118  	// for the target of the operation. `verb`: Name of the verb executed by the
  2119  	// operation. `statusDetail`: Human-readable status of the operation, if any.
  2120  	// `cancelRequested`: Identifies whether the user has requested cancellation of
  2121  	// the operation. Operations that have successfully been cancelled have
  2122  	// Operation.error value with a google.rpc.Status.code of 1, corresponding to
  2123  	// `Code.CANCELLED`. `apiVersion`: API version used to start the operation. }
  2124  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  2125  	// Name: The server-assigned name, which is only unique within the same service
  2126  	// that originally returns it. If you use the default HTTP mapping, the `name`
  2127  	// should be a resource name ending with `operations/{unique_id}`.
  2128  	Name string `json:"name,omitempty"`
  2129  	// Response: The normal, successful response of the operation. If the original
  2130  	// method returns no data on success, such as `Delete`, the response is
  2131  	// `google.protobuf.Empty`. If the original method is standard
  2132  	// `Get`/`Create`/`Update`, the response should be the resource. For other
  2133  	// methods, the response should have the type `XxxResponse`, where `Xxx` is the
  2134  	// original method name. For example, if the original method name is
  2135  	// `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
  2136  	Response googleapi.RawMessage `json:"response,omitempty"`
  2137  
  2138  	// ServerResponse contains the HTTP response code and headers from the server.
  2139  	googleapi.ServerResponse `json:"-"`
  2140  	// ForceSendFields is a list of field names (e.g. "Done") to unconditionally
  2141  	// include in API requests. By default, fields with empty or default values are
  2142  	// omitted from API requests. See
  2143  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2144  	// details.
  2145  	ForceSendFields []string `json:"-"`
  2146  	// NullFields is a list of field names (e.g. "Done") to include in API requests
  2147  	// with the JSON null value. By default, fields with empty values are omitted
  2148  	// from API requests. See
  2149  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2150  	NullFields []string `json:"-"`
  2151  }
  2152  
  2153  func (s *Operation) MarshalJSON() ([]byte, error) {
  2154  	type NoMethod Operation
  2155  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2156  }
  2157  
  2158  // OperationError: An error that occurred during a backup creation operation.
  2159  type OperationError struct {
  2160  	// Code: Identifies the specific error that occurred. REQUIRED
  2161  	Code string `json:"code,omitempty"`
  2162  	// Possible values:
  2163  	//   "OPERATION_ERROR_TYPE_UNSPECIFIED" - UNSPECIFIED means product type is not
  2164  	// known or available.
  2165  	//   "KMS_KEY_ERROR" - key destroyed, expired, not found, unreachable or
  2166  	// permission denied.
  2167  	//   "DATABASE_ERROR" - Database is not accessible
  2168  	//   "STOCKOUT_ERROR" - The zone or region does not have sufficient resources
  2169  	// to handle the request at the moment
  2170  	//   "CANCELLATION_ERROR" - User initiated cancellation
  2171  	//   "SQLSERVER_ERROR" - SQL server specific error
  2172  	//   "INTERNAL_ERROR" - Any other internal error.
  2173  	ErrorType string `json:"errorType,omitempty"`
  2174  	// Message: Additional information about the error encountered. REQUIRED
  2175  	Message string `json:"message,omitempty"`
  2176  	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
  2177  	// include in API requests. By default, fields with empty or default values are
  2178  	// omitted from API requests. See
  2179  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2180  	// details.
  2181  	ForceSendFields []string `json:"-"`
  2182  	// NullFields is a list of field names (e.g. "Code") to include in API requests
  2183  	// with the JSON null value. By default, fields with empty values are omitted
  2184  	// from API requests. See
  2185  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2186  	NullFields []string `json:"-"`
  2187  }
  2188  
  2189  func (s *OperationError) MarshalJSON() ([]byte, error) {
  2190  	type NoMethod OperationError
  2191  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2192  }
  2193  
  2194  // OperationMetadata: Pre-defined metadata fields.
  2195  type OperationMetadata struct {
  2196  	// ApiVersion: Output only. API version used to start the operation.
  2197  	ApiVersion string `json:"apiVersion,omitempty"`
  2198  	// CreateTime: Output only. The time the operation was created.
  2199  	CreateTime string `json:"createTime,omitempty"`
  2200  	// EndTime: Output only. The time the operation finished running.
  2201  	EndTime string `json:"endTime,omitempty"`
  2202  	// RequestedCancellation: Output only. Identifies whether the user has
  2203  	// requested cancellation of the operation. Operations that have successfully
  2204  	// been cancelled have Operation.error value with a google.rpc.Status.code of
  2205  	// 1, corresponding to `Code.CANCELLED`.
  2206  	RequestedCancellation bool `json:"requestedCancellation,omitempty"`
  2207  	// StatusMessage: Output only. Human-readable status of the operation, if any.
  2208  	StatusMessage string `json:"statusMessage,omitempty"`
  2209  	// Target: Output only. Server-defined resource path for the target of the
  2210  	// operation.
  2211  	Target string `json:"target,omitempty"`
  2212  	// Verb: Output only. Name of the verb executed by the operation.
  2213  	Verb string `json:"verb,omitempty"`
  2214  	// ForceSendFields is a list of field names (e.g. "ApiVersion") to
  2215  	// unconditionally include in API requests. By default, fields with empty or
  2216  	// default values are omitted from API requests. See
  2217  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2218  	// details.
  2219  	ForceSendFields []string `json:"-"`
  2220  	// NullFields is a list of field names (e.g. "ApiVersion") to include in API
  2221  	// requests with the JSON null value. By default, fields with empty values are
  2222  	// omitted from API requests. See
  2223  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2224  	NullFields []string `json:"-"`
  2225  }
  2226  
  2227  func (s *OperationMetadata) MarshalJSON() ([]byte, error) {
  2228  	type NoMethod OperationMetadata
  2229  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2230  }
  2231  
  2232  // OutputConfig: The output content
  2233  type OutputConfig struct {
  2234  	// GcsDestination: Google Cloud Storage destination for output content.
  2235  	GcsDestination *GcsDestination `json:"gcsDestination,omitempty"`
  2236  	// ForceSendFields is a list of field names (e.g. "GcsDestination") to
  2237  	// unconditionally include in API requests. By default, fields with empty or
  2238  	// default values are omitted from API requests. See
  2239  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2240  	// details.
  2241  	ForceSendFields []string `json:"-"`
  2242  	// NullFields is a list of field names (e.g. "GcsDestination") to include in
  2243  	// API requests with the JSON null value. By default, fields with empty values
  2244  	// are omitted from API requests. See
  2245  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2246  	NullFields []string `json:"-"`
  2247  }
  2248  
  2249  func (s *OutputConfig) MarshalJSON() ([]byte, error) {
  2250  	type NoMethod OutputConfig
  2251  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2252  }
  2253  
  2254  // PersistenceConfig: Configuration of the persistence functionality.
  2255  type PersistenceConfig struct {
  2256  	// PersistenceMode: Optional. Controls whether Persistence features are
  2257  	// enabled. If not provided, the existing value will be used.
  2258  	//
  2259  	// Possible values:
  2260  	//   "PERSISTENCE_MODE_UNSPECIFIED" - Not set.
  2261  	//   "DISABLED" - Persistence is disabled for the instance, and any existing
  2262  	// snapshots are deleted.
  2263  	//   "RDB" - RDB based Persistence is enabled.
  2264  	PersistenceMode string `json:"persistenceMode,omitempty"`
  2265  	// RdbNextSnapshotTime: Output only. The next time that a snapshot attempt is
  2266  	// scheduled to occur.
  2267  	RdbNextSnapshotTime string `json:"rdbNextSnapshotTime,omitempty"`
  2268  	// RdbSnapshotPeriod: Optional. Period between RDB snapshots. Snapshots will be
  2269  	// attempted every period starting from the provided snapshot start time. For
  2270  	// example, a start time of 01/01/2033 06:45 and SIX_HOURS snapshot period will
  2271  	// do nothing until 01/01/2033, and then trigger snapshots every day at 06:45,
  2272  	// 12:45, 18:45, and 00:45 the next day, and so on. If not provided,
  2273  	// TWENTY_FOUR_HOURS will be used as default.
  2274  	//
  2275  	// Possible values:
  2276  	//   "SNAPSHOT_PERIOD_UNSPECIFIED" - Not set.
  2277  	//   "ONE_HOUR" - Snapshot every 1 hour.
  2278  	//   "SIX_HOURS" - Snapshot every 6 hours.
  2279  	//   "TWELVE_HOURS" - Snapshot every 12 hours.
  2280  	//   "TWENTY_FOUR_HOURS" - Snapshot every 24 hours.
  2281  	RdbSnapshotPeriod string `json:"rdbSnapshotPeriod,omitempty"`
  2282  	// RdbSnapshotStartTime: Optional. Date and time that the first snapshot
  2283  	// was/will be attempted, and to which future snapshots will be aligned. If not
  2284  	// provided, the current time will be used.
  2285  	RdbSnapshotStartTime string `json:"rdbSnapshotStartTime,omitempty"`
  2286  	// ForceSendFields is a list of field names (e.g. "PersistenceMode") to
  2287  	// unconditionally include in API requests. By default, fields with empty or
  2288  	// default values are omitted from API requests. See
  2289  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2290  	// details.
  2291  	ForceSendFields []string `json:"-"`
  2292  	// NullFields is a list of field names (e.g. "PersistenceMode") to include in
  2293  	// API requests with the JSON null value. By default, fields with empty values
  2294  	// are omitted from API requests. See
  2295  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2296  	NullFields []string `json:"-"`
  2297  }
  2298  
  2299  func (s *PersistenceConfig) MarshalJSON() ([]byte, error) {
  2300  	type NoMethod PersistenceConfig
  2301  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2302  }
  2303  
  2304  // Product: Product specification for Condor resources.
  2305  type Product struct {
  2306  	// Engine: The specific engine that the underlying database is running.
  2307  	//
  2308  	// Possible values:
  2309  	//   "ENGINE_UNSPECIFIED" - UNSPECIFIED means engine type is not known or
  2310  	// available.
  2311  	//   "ENGINE_MYSQL" - MySQL binary running as an engine in the database
  2312  	// instance.
  2313  	//   "MYSQL" - MySQL binary running as engine in database instance.
  2314  	//   "ENGINE_POSTGRES" - Postgres binary running as engine in database
  2315  	// instance.
  2316  	//   "POSTGRES" - Postgres binary running as engine in database instance.
  2317  	//   "ENGINE_SQL_SERVER" - SQLServer binary running as engine in database
  2318  	// instance.
  2319  	//   "SQL_SERVER" - SQLServer binary running as engine in database instance.
  2320  	//   "ENGINE_NATIVE" - Native database binary running as engine in instance.
  2321  	//   "NATIVE" - Native database binary running as engine in instance.
  2322  	//   "ENGINE_CLOUD_SPANNER_WITH_POSTGRES_DIALECT" - Cloud Spanner with
  2323  	// PostgreSQL dialect.
  2324  	//   "ENGINE_CLOUD_SPANNER_WITH_GOOGLESQL_DIALECT" - Cloud Spanner with Google
  2325  	// SQL dialect.
  2326  	//   "ENGINE_MEMORYSTORE_FOR_REDIS" - Memorystore with Redis dialect.
  2327  	//   "ENGINE_MEMORYSTORE_FOR_REDIS_CLUSTER" - Memorystore with Redis cluster
  2328  	// dialect.
  2329  	//   "ENGINE_OTHER" - Other refers to rest of other database engine. This is to
  2330  	// be when engine is known, but it is not present in this enum.
  2331  	Engine string `json:"engine,omitempty"`
  2332  	// Type: Type of specific database product. It could be CloudSQL, AlloyDB etc..
  2333  	//
  2334  	// Possible values:
  2335  	//   "PRODUCT_TYPE_UNSPECIFIED" - UNSPECIFIED means product type is not known
  2336  	// or available.
  2337  	//   "PRODUCT_TYPE_CLOUD_SQL" - Cloud SQL product area in GCP
  2338  	//   "CLOUD_SQL" - Cloud SQL product area in GCP
  2339  	//   "PRODUCT_TYPE_ALLOYDB" - AlloyDB product area in GCP
  2340  	//   "ALLOYDB" - AlloyDB product area in GCP
  2341  	//   "PRODUCT_TYPE_SPANNER" - Spanner product area in GCP
  2342  	//   "PRODUCT_TYPE_ON_PREM" - On premises database product.
  2343  	//   "ON_PREM" - On premises database product.
  2344  	//   "PRODUCT_TYPE_MEMORYSTORE" - Memorystore product area in GCP
  2345  	//   "PRODUCT_TYPE_BIGTABLE" - Bigtable product area in GCP
  2346  	//   "PRODUCT_TYPE_OTHER" - Other refers to rest of other product type. This is
  2347  	// to be when product type is known, but it is not present in this enum.
  2348  	Type string `json:"type,omitempty"`
  2349  	// Version: Version of the underlying database engine. Example values: For
  2350  	// MySQL, it could be "8.0", "5.7" etc.. For Postgres, it could be "14", "15"
  2351  	// etc..
  2352  	Version string `json:"version,omitempty"`
  2353  	// ForceSendFields is a list of field names (e.g. "Engine") to unconditionally
  2354  	// include in API requests. By default, fields with empty or default values are
  2355  	// omitted from API requests. See
  2356  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2357  	// details.
  2358  	ForceSendFields []string `json:"-"`
  2359  	// NullFields is a list of field names (e.g. "Engine") to include in API
  2360  	// requests with the JSON null value. By default, fields with empty values are
  2361  	// omitted from API requests. See
  2362  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2363  	NullFields []string `json:"-"`
  2364  }
  2365  
  2366  func (s *Product) MarshalJSON() ([]byte, error) {
  2367  	type NoMethod Product
  2368  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2369  }
  2370  
  2371  type PscConfig struct {
  2372  	// Network: Required. The network where the IP address of the discovery
  2373  	// endpoint will be reserved, in the form of
  2374  	// projects/{network_project}/global/networks/{network_id}.
  2375  	Network string `json:"network,omitempty"`
  2376  	// ForceSendFields is a list of field names (e.g. "Network") to unconditionally
  2377  	// include in API requests. By default, fields with empty or default values are
  2378  	// omitted from API requests. See
  2379  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2380  	// details.
  2381  	ForceSendFields []string `json:"-"`
  2382  	// NullFields is a list of field names (e.g. "Network") to include in API
  2383  	// requests with the JSON null value. By default, fields with empty values are
  2384  	// omitted from API requests. See
  2385  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2386  	NullFields []string `json:"-"`
  2387  }
  2388  
  2389  func (s *PscConfig) MarshalJSON() ([]byte, error) {
  2390  	type NoMethod PscConfig
  2391  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2392  }
  2393  
  2394  // PscConnection: Details of consumer resources in a PSC connection.
  2395  type PscConnection struct {
  2396  	// Address: Output only. The IP allocated on the consumer network for the PSC
  2397  	// forwarding rule.
  2398  	Address string `json:"address,omitempty"`
  2399  	// ForwardingRule: Output only. The URI of the consumer side forwarding rule.
  2400  	// Example:
  2401  	// projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}.
  2402  	ForwardingRule string `json:"forwardingRule,omitempty"`
  2403  	// Network: The consumer network where the IP address resides, in the form of
  2404  	// projects/{project_id}/global/networks/{network_id}.
  2405  	Network string `json:"network,omitempty"`
  2406  	// ProjectId: Output only. The consumer project_id where the forwarding rule is
  2407  	// created from.
  2408  	ProjectId string `json:"projectId,omitempty"`
  2409  	// PscConnectionId: Output only. The PSC connection id of the forwarding rule
  2410  	// connected to the service attachment.
  2411  	PscConnectionId string `json:"pscConnectionId,omitempty"`
  2412  	// ForceSendFields is a list of field names (e.g. "Address") to unconditionally
  2413  	// include in API requests. By default, fields with empty or default values are
  2414  	// omitted from API requests. See
  2415  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2416  	// details.
  2417  	ForceSendFields []string `json:"-"`
  2418  	// NullFields is a list of field names (e.g. "Address") to include in API
  2419  	// requests with the JSON null value. By default, fields with empty values are
  2420  	// omitted from API requests. See
  2421  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2422  	NullFields []string `json:"-"`
  2423  }
  2424  
  2425  func (s *PscConnection) MarshalJSON() ([]byte, error) {
  2426  	type NoMethod PscConnection
  2427  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2428  }
  2429  
  2430  // RDBConfig: Configuration of the RDB based persistence.
  2431  type RDBConfig struct {
  2432  	// RdbSnapshotPeriod: Optional. Period between RDB snapshots.
  2433  	//
  2434  	// Possible values:
  2435  	//   "SNAPSHOT_PERIOD_UNSPECIFIED" - Not set.
  2436  	//   "ONE_HOUR" - One hour.
  2437  	//   "SIX_HOURS" - Six hours.
  2438  	//   "TWELVE_HOURS" - Twelve hours.
  2439  	//   "TWENTY_FOUR_HOURS" - Twenty four hours.
  2440  	RdbSnapshotPeriod string `json:"rdbSnapshotPeriod,omitempty"`
  2441  	// RdbSnapshotStartTime: Optional. The time that the first snapshot was/will be
  2442  	// attempted, and to which future snapshots will be aligned. If not provided,
  2443  	// the current time will be used.
  2444  	RdbSnapshotStartTime string `json:"rdbSnapshotStartTime,omitempty"`
  2445  	// ForceSendFields is a list of field names (e.g. "RdbSnapshotPeriod") to
  2446  	// unconditionally include in API requests. By default, fields with empty or
  2447  	// default values are omitted from API requests. See
  2448  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2449  	// details.
  2450  	ForceSendFields []string `json:"-"`
  2451  	// NullFields is a list of field names (e.g. "RdbSnapshotPeriod") to include in
  2452  	// API requests with the JSON null value. By default, fields with empty values
  2453  	// are omitted from API requests. See
  2454  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2455  	NullFields []string `json:"-"`
  2456  }
  2457  
  2458  func (s *RDBConfig) MarshalJSON() ([]byte, error) {
  2459  	type NoMethod RDBConfig
  2460  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2461  }
  2462  
  2463  // ReconciliationOperationMetadata: Operation metadata returned by the CLH
  2464  // during resource state reconciliation.
  2465  type ReconciliationOperationMetadata struct {
  2466  	// DeleteResource: DEPRECATED. Use exclusive_action instead.
  2467  	DeleteResource bool `json:"deleteResource,omitempty"`
  2468  	// ExclusiveAction: Excluisive action returned by the CLH.
  2469  	//
  2470  	// Possible values:
  2471  	//   "UNKNOWN_REPAIR_ACTION" - Unknown repair action.
  2472  	//   "DELETE" - The resource has to be deleted. When using this bit, the CLH
  2473  	// should fail the operation. DEPRECATED. Instead use DELETE_RESOURCE
  2474  	// OperationSignal in SideChannel.
  2475  	//   "RETRY" - This resource could not be repaired but the repair should be
  2476  	// tried again at a later time. This can happen if there is a dependency that
  2477  	// needs to be resolved first- e.g. if a parent resource must be repaired
  2478  	// before a child resource.
  2479  	ExclusiveAction string `json:"exclusiveAction,omitempty"`
  2480  	// ForceSendFields is a list of field names (e.g. "DeleteResource") to
  2481  	// unconditionally include in API requests. By default, fields with empty or
  2482  	// default values are omitted from API requests. See
  2483  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2484  	// details.
  2485  	ForceSendFields []string `json:"-"`
  2486  	// NullFields is a list of field names (e.g. "DeleteResource") to include in
  2487  	// API requests with the JSON null value. By default, fields with empty values
  2488  	// are omitted from API requests. See
  2489  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2490  	NullFields []string `json:"-"`
  2491  }
  2492  
  2493  func (s *ReconciliationOperationMetadata) MarshalJSON() ([]byte, error) {
  2494  	type NoMethod ReconciliationOperationMetadata
  2495  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2496  }
  2497  
  2498  // RescheduleMaintenanceRequest: Request for RescheduleMaintenance.
  2499  type RescheduleMaintenanceRequest struct {
  2500  	// RescheduleType: Required. If reschedule type is SPECIFIC_TIME, must set up
  2501  	// schedule_time as well.
  2502  	//
  2503  	// Possible values:
  2504  	//   "RESCHEDULE_TYPE_UNSPECIFIED" - Not set.
  2505  	//   "IMMEDIATE" - If the user wants to schedule the maintenance to happen now.
  2506  	//   "NEXT_AVAILABLE_WINDOW" - If the user wants to use the existing
  2507  	// maintenance policy to find the next available window.
  2508  	//   "SPECIFIC_TIME" - If the user wants to reschedule the maintenance to a
  2509  	// specific time.
  2510  	RescheduleType string `json:"rescheduleType,omitempty"`
  2511  	// ScheduleTime: Optional. Timestamp when the maintenance shall be rescheduled
  2512  	// to if reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for example
  2513  	// `2012-11-15T16:19:00.094Z`.
  2514  	ScheduleTime string `json:"scheduleTime,omitempty"`
  2515  	// ForceSendFields is a list of field names (e.g. "RescheduleType") to
  2516  	// unconditionally include in API requests. By default, fields with empty or
  2517  	// default values are omitted from API requests. See
  2518  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2519  	// details.
  2520  	ForceSendFields []string `json:"-"`
  2521  	// NullFields is a list of field names (e.g. "RescheduleType") to include in
  2522  	// API requests with the JSON null value. By default, fields with empty values
  2523  	// are omitted from API requests. See
  2524  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2525  	NullFields []string `json:"-"`
  2526  }
  2527  
  2528  func (s *RescheduleMaintenanceRequest) MarshalJSON() ([]byte, error) {
  2529  	type NoMethod RescheduleMaintenanceRequest
  2530  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2531  }
  2532  
  2533  type RetentionSettings struct {
  2534  	QuantityBasedRetention int64 `json:"quantityBasedRetention,omitempty"`
  2535  	// RetentionUnit: The unit that 'retained_backups' represents.
  2536  	//
  2537  	// Possible values:
  2538  	//   "RETENTION_UNIT_UNSPECIFIED" - Backup retention unit is unspecified, will
  2539  	// be treated as COUNT.
  2540  	//   "COUNT" - Retention will be by count, eg. "retain the most recent 7
  2541  	// backups".
  2542  	//   "TIME" - Retention will be by Time, eg. "retain the last 7 days backups".
  2543  	//   "RETENTION_UNIT_OTHER" - For rest of the other category
  2544  	RetentionUnit      string `json:"retentionUnit,omitempty"`
  2545  	TimeBasedRetention string `json:"timeBasedRetention,omitempty"`
  2546  	// ForceSendFields is a list of field names (e.g. "QuantityBasedRetention") to
  2547  	// unconditionally include in API requests. By default, fields with empty or
  2548  	// default values are omitted from API requests. See
  2549  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2550  	// details.
  2551  	ForceSendFields []string `json:"-"`
  2552  	// NullFields is a list of field names (e.g. "QuantityBasedRetention") to
  2553  	// include in API requests with the JSON null value. By default, fields with
  2554  	// empty values are omitted from API requests. See
  2555  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2556  	NullFields []string `json:"-"`
  2557  }
  2558  
  2559  func (s *RetentionSettings) MarshalJSON() ([]byte, error) {
  2560  	type NoMethod RetentionSettings
  2561  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2562  }
  2563  
  2564  // StateInfo: Represents additional information about the state of the cluster.
  2565  type StateInfo struct {
  2566  	// UpdateInfo: Describes ongoing update on the cluster when cluster state is
  2567  	// UPDATING.
  2568  	UpdateInfo *UpdateInfo `json:"updateInfo,omitempty"`
  2569  	// ForceSendFields is a list of field names (e.g. "UpdateInfo") to
  2570  	// unconditionally include in API requests. By default, fields with empty or
  2571  	// default values are omitted from API requests. See
  2572  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2573  	// details.
  2574  	ForceSendFields []string `json:"-"`
  2575  	// NullFields is a list of field names (e.g. "UpdateInfo") to include in API
  2576  	// requests with the JSON null value. By default, fields with empty values are
  2577  	// omitted from API requests. See
  2578  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2579  	NullFields []string `json:"-"`
  2580  }
  2581  
  2582  func (s *StateInfo) MarshalJSON() ([]byte, error) {
  2583  	type NoMethod StateInfo
  2584  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2585  }
  2586  
  2587  // Status: The `Status` type defines a logical error model that is suitable for
  2588  // different programming environments, including REST APIs and RPC APIs. It is
  2589  // used by gRPC (https://github.com/grpc). Each `Status` message contains three
  2590  // pieces of data: error code, error message, and error details. You can find
  2591  // out more about this error model and how to work with it in the API Design
  2592  // Guide (https://cloud.google.com/apis/design/errors).
  2593  type Status struct {
  2594  	// Code: The status code, which should be an enum value of google.rpc.Code.
  2595  	Code int64 `json:"code,omitempty"`
  2596  	// Details: A list of messages that carry the error details. There is a common
  2597  	// set of message types for APIs to use.
  2598  	Details []googleapi.RawMessage `json:"details,omitempty"`
  2599  	// Message: A developer-facing error message, which should be in English. Any
  2600  	// user-facing error message should be localized and sent in the
  2601  	// google.rpc.Status.details field, or localized by the client.
  2602  	Message string `json:"message,omitempty"`
  2603  	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
  2604  	// include in API requests. By default, fields with empty or default values are
  2605  	// omitted from API requests. See
  2606  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2607  	// details.
  2608  	ForceSendFields []string `json:"-"`
  2609  	// NullFields is a list of field names (e.g. "Code") to include in API requests
  2610  	// with the JSON null value. By default, fields with empty values are omitted
  2611  	// from API requests. See
  2612  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2613  	NullFields []string `json:"-"`
  2614  }
  2615  
  2616  func (s *Status) MarshalJSON() ([]byte, error) {
  2617  	type NoMethod Status
  2618  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2619  }
  2620  
  2621  // TimeOfDay: Represents a time of day. The date and time zone are either not
  2622  // significant or are specified elsewhere. An API may choose to allow leap
  2623  // seconds. Related types are google.type.Date and `google.protobuf.Timestamp`.
  2624  type TimeOfDay struct {
  2625  	// Hours: Hours of day in 24 hour format. Should be from 0 to 23. An API may
  2626  	// choose to allow the value "24:00:00" for scenarios like business closing
  2627  	// time.
  2628  	Hours int64 `json:"hours,omitempty"`
  2629  	// Minutes: Minutes of hour of day. Must be from 0 to 59.
  2630  	Minutes int64 `json:"minutes,omitempty"`
  2631  	// Nanos: Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
  2632  	Nanos int64 `json:"nanos,omitempty"`
  2633  	// Seconds: Seconds of minutes of the time. Must normally be from 0 to 59. An
  2634  	// API may allow the value 60 if it allows leap-seconds.
  2635  	Seconds int64 `json:"seconds,omitempty"`
  2636  	// ForceSendFields is a list of field names (e.g. "Hours") to unconditionally
  2637  	// include in API requests. By default, fields with empty or default values are
  2638  	// omitted from API requests. See
  2639  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2640  	// details.
  2641  	ForceSendFields []string `json:"-"`
  2642  	// NullFields is a list of field names (e.g. "Hours") to include in API
  2643  	// requests with the JSON null value. By default, fields with empty values are
  2644  	// omitted from API requests. See
  2645  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2646  	NullFields []string `json:"-"`
  2647  }
  2648  
  2649  func (s *TimeOfDay) MarshalJSON() ([]byte, error) {
  2650  	type NoMethod TimeOfDay
  2651  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2652  }
  2653  
  2654  // TlsCertificate: TlsCertificate Resource
  2655  type TlsCertificate struct {
  2656  	// Cert: PEM representation.
  2657  	Cert string `json:"cert,omitempty"`
  2658  	// CreateTime: Output only. The time when the certificate was created in RFC
  2659  	// 3339 (https://tools.ietf.org/html/rfc3339) format, for example
  2660  	// `2020-05-18T00:00:00.094Z`.
  2661  	CreateTime string `json:"createTime,omitempty"`
  2662  	// ExpireTime: Output only. The time when the certificate expires in RFC 3339
  2663  	// (https://tools.ietf.org/html/rfc3339) format, for example
  2664  	// `2020-05-18T00:00:00.094Z`.
  2665  	ExpireTime string `json:"expireTime,omitempty"`
  2666  	// SerialNumber: Serial number, as extracted from the certificate.
  2667  	SerialNumber string `json:"serialNumber,omitempty"`
  2668  	// Sha1Fingerprint: Sha1 Fingerprint of the certificate.
  2669  	Sha1Fingerprint string `json:"sha1Fingerprint,omitempty"`
  2670  	// ForceSendFields is a list of field names (e.g. "Cert") to unconditionally
  2671  	// include in API requests. By default, fields with empty or default values are
  2672  	// omitted from API requests. See
  2673  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2674  	// details.
  2675  	ForceSendFields []string `json:"-"`
  2676  	// NullFields is a list of field names (e.g. "Cert") to include in API requests
  2677  	// with the JSON null value. By default, fields with empty values are omitted
  2678  	// from API requests. See
  2679  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2680  	NullFields []string `json:"-"`
  2681  }
  2682  
  2683  func (s *TlsCertificate) MarshalJSON() ([]byte, error) {
  2684  	type NoMethod TlsCertificate
  2685  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2686  }
  2687  
  2688  // UpdateInfo: Represents information about an updating cluster.
  2689  type UpdateInfo struct {
  2690  	// TargetReplicaCount: Target number of replica nodes per shard.
  2691  	TargetReplicaCount int64 `json:"targetReplicaCount,omitempty"`
  2692  	// TargetShardCount: Target number of shards for redis cluster
  2693  	TargetShardCount int64 `json:"targetShardCount,omitempty"`
  2694  	// ForceSendFields is a list of field names (e.g. "TargetReplicaCount") to
  2695  	// unconditionally include in API requests. By default, fields with empty or
  2696  	// default values are omitted from API requests. See
  2697  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2698  	// details.
  2699  	ForceSendFields []string `json:"-"`
  2700  	// NullFields is a list of field names (e.g. "TargetReplicaCount") to include
  2701  	// in API requests with the JSON null value. By default, fields with empty
  2702  	// values are omitted from API requests. See
  2703  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2704  	NullFields []string `json:"-"`
  2705  }
  2706  
  2707  func (s *UpdateInfo) MarshalJSON() ([]byte, error) {
  2708  	type NoMethod UpdateInfo
  2709  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2710  }
  2711  
  2712  // UpgradeInstanceRequest: Request for UpgradeInstance.
  2713  type UpgradeInstanceRequest struct {
  2714  	// RedisVersion: Required. Specifies the target version of Redis software to
  2715  	// upgrade to.
  2716  	RedisVersion string `json:"redisVersion,omitempty"`
  2717  	// ForceSendFields is a list of field names (e.g. "RedisVersion") to
  2718  	// unconditionally include in API requests. By default, fields with empty or
  2719  	// default values are omitted from API requests. See
  2720  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2721  	// details.
  2722  	ForceSendFields []string `json:"-"`
  2723  	// NullFields is a list of field names (e.g. "RedisVersion") to include in API
  2724  	// requests with the JSON null value. By default, fields with empty values are
  2725  	// omitted from API requests. See
  2726  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2727  	NullFields []string `json:"-"`
  2728  }
  2729  
  2730  func (s *UpgradeInstanceRequest) MarshalJSON() ([]byte, error) {
  2731  	type NoMethod UpgradeInstanceRequest
  2732  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2733  }
  2734  
  2735  // UserLabels: Message type for storing user labels. User labels are used to
  2736  // tag App Engine resources, allowing users to search for resources matching a
  2737  // set of labels and to aggregate usage data by labels.
  2738  type UserLabels struct {
  2739  	Labels map[string]string `json:"labels,omitempty"`
  2740  	// ForceSendFields is a list of field names (e.g. "Labels") to unconditionally
  2741  	// include in API requests. By default, fields with empty or default values are
  2742  	// omitted from API requests. See
  2743  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2744  	// details.
  2745  	ForceSendFields []string `json:"-"`
  2746  	// NullFields is a list of field names (e.g. "Labels") to include in API
  2747  	// requests with the JSON null value. By default, fields with empty values are
  2748  	// omitted from API requests. See
  2749  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2750  	NullFields []string `json:"-"`
  2751  }
  2752  
  2753  func (s *UserLabels) MarshalJSON() ([]byte, error) {
  2754  	type NoMethod UserLabels
  2755  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2756  }
  2757  
  2758  // WeeklyMaintenanceWindow: Time window in which disruptive maintenance updates
  2759  // occur. Non-disruptive updates can occur inside or outside this window.
  2760  type WeeklyMaintenanceWindow struct {
  2761  	// Day: Required. The day of week that maintenance updates occur.
  2762  	//
  2763  	// Possible values:
  2764  	//   "DAY_OF_WEEK_UNSPECIFIED" - The day of the week is unspecified.
  2765  	//   "MONDAY" - Monday
  2766  	//   "TUESDAY" - Tuesday
  2767  	//   "WEDNESDAY" - Wednesday
  2768  	//   "THURSDAY" - Thursday
  2769  	//   "FRIDAY" - Friday
  2770  	//   "SATURDAY" - Saturday
  2771  	//   "SUNDAY" - Sunday
  2772  	Day string `json:"day,omitempty"`
  2773  	// Duration: Output only. Duration of the maintenance window. The current
  2774  	// window is fixed at 1 hour.
  2775  	Duration string `json:"duration,omitempty"`
  2776  	// StartTime: Required. Start time of the window in UTC time.
  2777  	StartTime *TimeOfDay `json:"startTime,omitempty"`
  2778  	// ForceSendFields is a list of field names (e.g. "Day") to unconditionally
  2779  	// include in API requests. By default, fields with empty or default values are
  2780  	// omitted from API requests. See
  2781  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2782  	// details.
  2783  	ForceSendFields []string `json:"-"`
  2784  	// NullFields is a list of field names (e.g. "Day") to include in API requests
  2785  	// with the JSON null value. By default, fields with empty values are omitted
  2786  	// from API requests. See
  2787  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2788  	NullFields []string `json:"-"`
  2789  }
  2790  
  2791  func (s *WeeklyMaintenanceWindow) MarshalJSON() ([]byte, error) {
  2792  	type NoMethod WeeklyMaintenanceWindow
  2793  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2794  }
  2795  
  2796  type ProjectsLocationsGetCall struct {
  2797  	s            *Service
  2798  	name         string
  2799  	urlParams_   gensupport.URLParams
  2800  	ifNoneMatch_ string
  2801  	ctx_         context.Context
  2802  	header_      http.Header
  2803  }
  2804  
  2805  // Get: Gets information about a location.
  2806  //
  2807  // - name: Resource name for the location.
  2808  func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
  2809  	c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2810  	c.name = name
  2811  	return c
  2812  }
  2813  
  2814  // Fields allows partial responses to be retrieved. See
  2815  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2816  // details.
  2817  func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
  2818  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2819  	return c
  2820  }
  2821  
  2822  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2823  // object's ETag matches the given value. This is useful for getting updates
  2824  // only after the object has changed since the last request.
  2825  func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
  2826  	c.ifNoneMatch_ = entityTag
  2827  	return c
  2828  }
  2829  
  2830  // Context sets the context to be used in this call's Do method.
  2831  func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
  2832  	c.ctx_ = ctx
  2833  	return c
  2834  }
  2835  
  2836  // Header returns a http.Header that can be modified by the caller to add
  2837  // headers to the request.
  2838  func (c *ProjectsLocationsGetCall) Header() http.Header {
  2839  	if c.header_ == nil {
  2840  		c.header_ = make(http.Header)
  2841  	}
  2842  	return c.header_
  2843  }
  2844  
  2845  func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
  2846  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2847  	if c.ifNoneMatch_ != "" {
  2848  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2849  	}
  2850  	var body io.Reader = nil
  2851  	c.urlParams_.Set("alt", alt)
  2852  	c.urlParams_.Set("prettyPrint", "false")
  2853  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  2854  	urls += "?" + c.urlParams_.Encode()
  2855  	req, err := http.NewRequest("GET", urls, body)
  2856  	if err != nil {
  2857  		return nil, err
  2858  	}
  2859  	req.Header = reqHeaders
  2860  	googleapi.Expand(req.URL, map[string]string{
  2861  		"name": c.name,
  2862  	})
  2863  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2864  }
  2865  
  2866  // Do executes the "redis.projects.locations.get" call.
  2867  // Any non-2xx status code is an error. Response headers are in either
  2868  // *Location.ServerResponse.Header or (if a response was returned at all) in
  2869  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2870  // whether the returned error was because http.StatusNotModified was returned.
  2871  func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
  2872  	gensupport.SetOptions(c.urlParams_, opts...)
  2873  	res, err := c.doRequest("json")
  2874  	if res != nil && res.StatusCode == http.StatusNotModified {
  2875  		if res.Body != nil {
  2876  			res.Body.Close()
  2877  		}
  2878  		return nil, gensupport.WrapError(&googleapi.Error{
  2879  			Code:   res.StatusCode,
  2880  			Header: res.Header,
  2881  		})
  2882  	}
  2883  	if err != nil {
  2884  		return nil, err
  2885  	}
  2886  	defer googleapi.CloseBody(res)
  2887  	if err := googleapi.CheckResponse(res); err != nil {
  2888  		return nil, gensupport.WrapError(err)
  2889  	}
  2890  	ret := &Location{
  2891  		ServerResponse: googleapi.ServerResponse{
  2892  			Header:         res.Header,
  2893  			HTTPStatusCode: res.StatusCode,
  2894  		},
  2895  	}
  2896  	target := &ret
  2897  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2898  		return nil, err
  2899  	}
  2900  	return ret, nil
  2901  }
  2902  
  2903  type ProjectsLocationsListCall struct {
  2904  	s            *Service
  2905  	name         string
  2906  	urlParams_   gensupport.URLParams
  2907  	ifNoneMatch_ string
  2908  	ctx_         context.Context
  2909  	header_      http.Header
  2910  }
  2911  
  2912  // List: Lists information about the supported locations for this service.
  2913  //
  2914  // - name: The resource that owns the locations collection, if applicable.
  2915  func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
  2916  	c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2917  	c.name = name
  2918  	return c
  2919  }
  2920  
  2921  // Filter sets the optional parameter "filter": A filter to narrow down results
  2922  // to a preferred subset. The filtering language accepts strings like
  2923  // "displayName=tokyo", and is documented in more detail in AIP-160
  2924  // (https://google.aip.dev/160).
  2925  func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
  2926  	c.urlParams_.Set("filter", filter)
  2927  	return c
  2928  }
  2929  
  2930  // PageSize sets the optional parameter "pageSize": The maximum number of
  2931  // results to return. If not set, the service selects a default.
  2932  func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
  2933  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2934  	return c
  2935  }
  2936  
  2937  // PageToken sets the optional parameter "pageToken": A page token received
  2938  // from the `next_page_token` field in the response. Send that page token to
  2939  // receive the subsequent page.
  2940  func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
  2941  	c.urlParams_.Set("pageToken", pageToken)
  2942  	return c
  2943  }
  2944  
  2945  // Fields allows partial responses to be retrieved. See
  2946  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2947  // details.
  2948  func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
  2949  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2950  	return c
  2951  }
  2952  
  2953  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2954  // object's ETag matches the given value. This is useful for getting updates
  2955  // only after the object has changed since the last request.
  2956  func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
  2957  	c.ifNoneMatch_ = entityTag
  2958  	return c
  2959  }
  2960  
  2961  // Context sets the context to be used in this call's Do method.
  2962  func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
  2963  	c.ctx_ = ctx
  2964  	return c
  2965  }
  2966  
  2967  // Header returns a http.Header that can be modified by the caller to add
  2968  // headers to the request.
  2969  func (c *ProjectsLocationsListCall) Header() http.Header {
  2970  	if c.header_ == nil {
  2971  		c.header_ = make(http.Header)
  2972  	}
  2973  	return c.header_
  2974  }
  2975  
  2976  func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
  2977  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2978  	if c.ifNoneMatch_ != "" {
  2979  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2980  	}
  2981  	var body io.Reader = nil
  2982  	c.urlParams_.Set("alt", alt)
  2983  	c.urlParams_.Set("prettyPrint", "false")
  2984  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/locations")
  2985  	urls += "?" + c.urlParams_.Encode()
  2986  	req, err := http.NewRequest("GET", urls, body)
  2987  	if err != nil {
  2988  		return nil, err
  2989  	}
  2990  	req.Header = reqHeaders
  2991  	googleapi.Expand(req.URL, map[string]string{
  2992  		"name": c.name,
  2993  	})
  2994  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2995  }
  2996  
  2997  // Do executes the "redis.projects.locations.list" call.
  2998  // Any non-2xx status code is an error. Response headers are in either
  2999  // *ListLocationsResponse.ServerResponse.Header or (if a response was returned
  3000  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3001  // check whether the returned error was because http.StatusNotModified was
  3002  // returned.
  3003  func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
  3004  	gensupport.SetOptions(c.urlParams_, opts...)
  3005  	res, err := c.doRequest("json")
  3006  	if res != nil && res.StatusCode == http.StatusNotModified {
  3007  		if res.Body != nil {
  3008  			res.Body.Close()
  3009  		}
  3010  		return nil, gensupport.WrapError(&googleapi.Error{
  3011  			Code:   res.StatusCode,
  3012  			Header: res.Header,
  3013  		})
  3014  	}
  3015  	if err != nil {
  3016  		return nil, err
  3017  	}
  3018  	defer googleapi.CloseBody(res)
  3019  	if err := googleapi.CheckResponse(res); err != nil {
  3020  		return nil, gensupport.WrapError(err)
  3021  	}
  3022  	ret := &ListLocationsResponse{
  3023  		ServerResponse: googleapi.ServerResponse{
  3024  			Header:         res.Header,
  3025  			HTTPStatusCode: res.StatusCode,
  3026  		},
  3027  	}
  3028  	target := &ret
  3029  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3030  		return nil, err
  3031  	}
  3032  	return ret, nil
  3033  }
  3034  
  3035  // Pages invokes f for each page of results.
  3036  // A non-nil error returned from f will halt the iteration.
  3037  // The provided context supersedes any context provided to the Context method.
  3038  func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
  3039  	c.ctx_ = ctx
  3040  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3041  	for {
  3042  		x, err := c.Do()
  3043  		if err != nil {
  3044  			return err
  3045  		}
  3046  		if err := f(x); err != nil {
  3047  			return err
  3048  		}
  3049  		if x.NextPageToken == "" {
  3050  			return nil
  3051  		}
  3052  		c.PageToken(x.NextPageToken)
  3053  	}
  3054  }
  3055  
  3056  type ProjectsLocationsClustersCreateCall struct {
  3057  	s          *Service
  3058  	parent     string
  3059  	cluster    *Cluster
  3060  	urlParams_ gensupport.URLParams
  3061  	ctx_       context.Context
  3062  	header_    http.Header
  3063  }
  3064  
  3065  // Create: Creates a Redis cluster based on the specified properties. The
  3066  // creation is executed asynchronously and callers may check the returned
  3067  // operation to track its progress. Once the operation is completed the Redis
  3068  // cluster will be fully functional. The completed longrunning.Operation will
  3069  // contain the new cluster object in the response field. The returned operation
  3070  // is automatically deleted after a few hours, so there is no need to call
  3071  // DeleteOperation.
  3072  //
  3073  //   - parent: The resource name of the cluster location using the form:
  3074  //     `projects/{project_id}/locations/{location_id}` where `location_id` refers
  3075  //     to a GCP region.
  3076  func (r *ProjectsLocationsClustersService) Create(parent string, cluster *Cluster) *ProjectsLocationsClustersCreateCall {
  3077  	c := &ProjectsLocationsClustersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3078  	c.parent = parent
  3079  	c.cluster = cluster
  3080  	return c
  3081  }
  3082  
  3083  // ClusterId sets the optional parameter "clusterId": Required. The logical
  3084  // name of the Redis cluster in the customer project with the following
  3085  // restrictions: * Must contain only lowercase letters, numbers, and hyphens. *
  3086  // Must start with a letter. * Must be between 1-63 characters. * Must end with
  3087  // a number or a letter. * Must be unique within the customer project /
  3088  // location
  3089  func (c *ProjectsLocationsClustersCreateCall) ClusterId(clusterId string) *ProjectsLocationsClustersCreateCall {
  3090  	c.urlParams_.Set("clusterId", clusterId)
  3091  	return c
  3092  }
  3093  
  3094  // RequestId sets the optional parameter "requestId": Idempotent request UUID.
  3095  func (c *ProjectsLocationsClustersCreateCall) RequestId(requestId string) *ProjectsLocationsClustersCreateCall {
  3096  	c.urlParams_.Set("requestId", requestId)
  3097  	return c
  3098  }
  3099  
  3100  // Fields allows partial responses to be retrieved. See
  3101  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3102  // details.
  3103  func (c *ProjectsLocationsClustersCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersCreateCall {
  3104  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3105  	return c
  3106  }
  3107  
  3108  // Context sets the context to be used in this call's Do method.
  3109  func (c *ProjectsLocationsClustersCreateCall) Context(ctx context.Context) *ProjectsLocationsClustersCreateCall {
  3110  	c.ctx_ = ctx
  3111  	return c
  3112  }
  3113  
  3114  // Header returns a http.Header that can be modified by the caller to add
  3115  // headers to the request.
  3116  func (c *ProjectsLocationsClustersCreateCall) Header() http.Header {
  3117  	if c.header_ == nil {
  3118  		c.header_ = make(http.Header)
  3119  	}
  3120  	return c.header_
  3121  }
  3122  
  3123  func (c *ProjectsLocationsClustersCreateCall) doRequest(alt string) (*http.Response, error) {
  3124  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3125  	var body io.Reader = nil
  3126  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.cluster)
  3127  	if err != nil {
  3128  		return nil, err
  3129  	}
  3130  	c.urlParams_.Set("alt", alt)
  3131  	c.urlParams_.Set("prettyPrint", "false")
  3132  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/clusters")
  3133  	urls += "?" + c.urlParams_.Encode()
  3134  	req, err := http.NewRequest("POST", urls, body)
  3135  	if err != nil {
  3136  		return nil, err
  3137  	}
  3138  	req.Header = reqHeaders
  3139  	googleapi.Expand(req.URL, map[string]string{
  3140  		"parent": c.parent,
  3141  	})
  3142  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3143  }
  3144  
  3145  // Do executes the "redis.projects.locations.clusters.create" call.
  3146  // Any non-2xx status code is an error. Response headers are in either
  3147  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3148  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3149  // whether the returned error was because http.StatusNotModified was returned.
  3150  func (c *ProjectsLocationsClustersCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3151  	gensupport.SetOptions(c.urlParams_, opts...)
  3152  	res, err := c.doRequest("json")
  3153  	if res != nil && res.StatusCode == http.StatusNotModified {
  3154  		if res.Body != nil {
  3155  			res.Body.Close()
  3156  		}
  3157  		return nil, gensupport.WrapError(&googleapi.Error{
  3158  			Code:   res.StatusCode,
  3159  			Header: res.Header,
  3160  		})
  3161  	}
  3162  	if err != nil {
  3163  		return nil, err
  3164  	}
  3165  	defer googleapi.CloseBody(res)
  3166  	if err := googleapi.CheckResponse(res); err != nil {
  3167  		return nil, gensupport.WrapError(err)
  3168  	}
  3169  	ret := &Operation{
  3170  		ServerResponse: googleapi.ServerResponse{
  3171  			Header:         res.Header,
  3172  			HTTPStatusCode: res.StatusCode,
  3173  		},
  3174  	}
  3175  	target := &ret
  3176  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3177  		return nil, err
  3178  	}
  3179  	return ret, nil
  3180  }
  3181  
  3182  type ProjectsLocationsClustersDeleteCall struct {
  3183  	s          *Service
  3184  	name       string
  3185  	urlParams_ gensupport.URLParams
  3186  	ctx_       context.Context
  3187  	header_    http.Header
  3188  }
  3189  
  3190  // Delete: Deletes a specific Redis cluster. Cluster stops serving and data is
  3191  // deleted.
  3192  //
  3193  //   - name: Redis cluster resource name using the form:
  3194  //     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
  3195  //     where `location_id` refers to a GCP region.
  3196  func (r *ProjectsLocationsClustersService) Delete(name string) *ProjectsLocationsClustersDeleteCall {
  3197  	c := &ProjectsLocationsClustersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3198  	c.name = name
  3199  	return c
  3200  }
  3201  
  3202  // RequestId sets the optional parameter "requestId": Idempotent request UUID.
  3203  func (c *ProjectsLocationsClustersDeleteCall) RequestId(requestId string) *ProjectsLocationsClustersDeleteCall {
  3204  	c.urlParams_.Set("requestId", requestId)
  3205  	return c
  3206  }
  3207  
  3208  // Fields allows partial responses to be retrieved. See
  3209  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3210  // details.
  3211  func (c *ProjectsLocationsClustersDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersDeleteCall {
  3212  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3213  	return c
  3214  }
  3215  
  3216  // Context sets the context to be used in this call's Do method.
  3217  func (c *ProjectsLocationsClustersDeleteCall) Context(ctx context.Context) *ProjectsLocationsClustersDeleteCall {
  3218  	c.ctx_ = ctx
  3219  	return c
  3220  }
  3221  
  3222  // Header returns a http.Header that can be modified by the caller to add
  3223  // headers to the request.
  3224  func (c *ProjectsLocationsClustersDeleteCall) Header() http.Header {
  3225  	if c.header_ == nil {
  3226  		c.header_ = make(http.Header)
  3227  	}
  3228  	return c.header_
  3229  }
  3230  
  3231  func (c *ProjectsLocationsClustersDeleteCall) doRequest(alt string) (*http.Response, error) {
  3232  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3233  	var body io.Reader = nil
  3234  	c.urlParams_.Set("alt", alt)
  3235  	c.urlParams_.Set("prettyPrint", "false")
  3236  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  3237  	urls += "?" + c.urlParams_.Encode()
  3238  	req, err := http.NewRequest("DELETE", urls, body)
  3239  	if err != nil {
  3240  		return nil, err
  3241  	}
  3242  	req.Header = reqHeaders
  3243  	googleapi.Expand(req.URL, map[string]string{
  3244  		"name": c.name,
  3245  	})
  3246  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3247  }
  3248  
  3249  // Do executes the "redis.projects.locations.clusters.delete" call.
  3250  // Any non-2xx status code is an error. Response headers are in either
  3251  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3252  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3253  // whether the returned error was because http.StatusNotModified was returned.
  3254  func (c *ProjectsLocationsClustersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3255  	gensupport.SetOptions(c.urlParams_, opts...)
  3256  	res, err := c.doRequest("json")
  3257  	if res != nil && res.StatusCode == http.StatusNotModified {
  3258  		if res.Body != nil {
  3259  			res.Body.Close()
  3260  		}
  3261  		return nil, gensupport.WrapError(&googleapi.Error{
  3262  			Code:   res.StatusCode,
  3263  			Header: res.Header,
  3264  		})
  3265  	}
  3266  	if err != nil {
  3267  		return nil, err
  3268  	}
  3269  	defer googleapi.CloseBody(res)
  3270  	if err := googleapi.CheckResponse(res); err != nil {
  3271  		return nil, gensupport.WrapError(err)
  3272  	}
  3273  	ret := &Operation{
  3274  		ServerResponse: googleapi.ServerResponse{
  3275  			Header:         res.Header,
  3276  			HTTPStatusCode: res.StatusCode,
  3277  		},
  3278  	}
  3279  	target := &ret
  3280  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3281  		return nil, err
  3282  	}
  3283  	return ret, nil
  3284  }
  3285  
  3286  type ProjectsLocationsClustersGetCall struct {
  3287  	s            *Service
  3288  	name         string
  3289  	urlParams_   gensupport.URLParams
  3290  	ifNoneMatch_ string
  3291  	ctx_         context.Context
  3292  	header_      http.Header
  3293  }
  3294  
  3295  // Get: Gets the details of a specific Redis cluster.
  3296  //
  3297  //   - name: Redis cluster resource name using the form:
  3298  //     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
  3299  //     where `location_id` refers to a GCP region.
  3300  func (r *ProjectsLocationsClustersService) Get(name string) *ProjectsLocationsClustersGetCall {
  3301  	c := &ProjectsLocationsClustersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3302  	c.name = name
  3303  	return c
  3304  }
  3305  
  3306  // Fields allows partial responses to be retrieved. See
  3307  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3308  // details.
  3309  func (c *ProjectsLocationsClustersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersGetCall {
  3310  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3311  	return c
  3312  }
  3313  
  3314  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3315  // object's ETag matches the given value. This is useful for getting updates
  3316  // only after the object has changed since the last request.
  3317  func (c *ProjectsLocationsClustersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersGetCall {
  3318  	c.ifNoneMatch_ = entityTag
  3319  	return c
  3320  }
  3321  
  3322  // Context sets the context to be used in this call's Do method.
  3323  func (c *ProjectsLocationsClustersGetCall) Context(ctx context.Context) *ProjectsLocationsClustersGetCall {
  3324  	c.ctx_ = ctx
  3325  	return c
  3326  }
  3327  
  3328  // Header returns a http.Header that can be modified by the caller to add
  3329  // headers to the request.
  3330  func (c *ProjectsLocationsClustersGetCall) Header() http.Header {
  3331  	if c.header_ == nil {
  3332  		c.header_ = make(http.Header)
  3333  	}
  3334  	return c.header_
  3335  }
  3336  
  3337  func (c *ProjectsLocationsClustersGetCall) doRequest(alt string) (*http.Response, error) {
  3338  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3339  	if c.ifNoneMatch_ != "" {
  3340  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3341  	}
  3342  	var body io.Reader = nil
  3343  	c.urlParams_.Set("alt", alt)
  3344  	c.urlParams_.Set("prettyPrint", "false")
  3345  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  3346  	urls += "?" + c.urlParams_.Encode()
  3347  	req, err := http.NewRequest("GET", urls, body)
  3348  	if err != nil {
  3349  		return nil, err
  3350  	}
  3351  	req.Header = reqHeaders
  3352  	googleapi.Expand(req.URL, map[string]string{
  3353  		"name": c.name,
  3354  	})
  3355  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3356  }
  3357  
  3358  // Do executes the "redis.projects.locations.clusters.get" call.
  3359  // Any non-2xx status code is an error. Response headers are in either
  3360  // *Cluster.ServerResponse.Header or (if a response was returned at all) in
  3361  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3362  // whether the returned error was because http.StatusNotModified was returned.
  3363  func (c *ProjectsLocationsClustersGetCall) Do(opts ...googleapi.CallOption) (*Cluster, error) {
  3364  	gensupport.SetOptions(c.urlParams_, opts...)
  3365  	res, err := c.doRequest("json")
  3366  	if res != nil && res.StatusCode == http.StatusNotModified {
  3367  		if res.Body != nil {
  3368  			res.Body.Close()
  3369  		}
  3370  		return nil, gensupport.WrapError(&googleapi.Error{
  3371  			Code:   res.StatusCode,
  3372  			Header: res.Header,
  3373  		})
  3374  	}
  3375  	if err != nil {
  3376  		return nil, err
  3377  	}
  3378  	defer googleapi.CloseBody(res)
  3379  	if err := googleapi.CheckResponse(res); err != nil {
  3380  		return nil, gensupport.WrapError(err)
  3381  	}
  3382  	ret := &Cluster{
  3383  		ServerResponse: googleapi.ServerResponse{
  3384  			Header:         res.Header,
  3385  			HTTPStatusCode: res.StatusCode,
  3386  		},
  3387  	}
  3388  	target := &ret
  3389  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3390  		return nil, err
  3391  	}
  3392  	return ret, nil
  3393  }
  3394  
  3395  type ProjectsLocationsClustersGetCertificateAuthorityCall struct {
  3396  	s            *Service
  3397  	name         string
  3398  	urlParams_   gensupport.URLParams
  3399  	ifNoneMatch_ string
  3400  	ctx_         context.Context
  3401  	header_      http.Header
  3402  }
  3403  
  3404  // GetCertificateAuthority: Gets the details of certificate authority
  3405  // information for Redis cluster.
  3406  //
  3407  //   - name: Redis cluster certificate authority resource name using the form:
  3408  //     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}/certif
  3409  //     icateAuthority` where `location_id` refers to a GCP region.
  3410  func (r *ProjectsLocationsClustersService) GetCertificateAuthority(name string) *ProjectsLocationsClustersGetCertificateAuthorityCall {
  3411  	c := &ProjectsLocationsClustersGetCertificateAuthorityCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3412  	c.name = name
  3413  	return c
  3414  }
  3415  
  3416  // Fields allows partial responses to be retrieved. See
  3417  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3418  // details.
  3419  func (c *ProjectsLocationsClustersGetCertificateAuthorityCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersGetCertificateAuthorityCall {
  3420  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3421  	return c
  3422  }
  3423  
  3424  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3425  // object's ETag matches the given value. This is useful for getting updates
  3426  // only after the object has changed since the last request.
  3427  func (c *ProjectsLocationsClustersGetCertificateAuthorityCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersGetCertificateAuthorityCall {
  3428  	c.ifNoneMatch_ = entityTag
  3429  	return c
  3430  }
  3431  
  3432  // Context sets the context to be used in this call's Do method.
  3433  func (c *ProjectsLocationsClustersGetCertificateAuthorityCall) Context(ctx context.Context) *ProjectsLocationsClustersGetCertificateAuthorityCall {
  3434  	c.ctx_ = ctx
  3435  	return c
  3436  }
  3437  
  3438  // Header returns a http.Header that can be modified by the caller to add
  3439  // headers to the request.
  3440  func (c *ProjectsLocationsClustersGetCertificateAuthorityCall) Header() http.Header {
  3441  	if c.header_ == nil {
  3442  		c.header_ = make(http.Header)
  3443  	}
  3444  	return c.header_
  3445  }
  3446  
  3447  func (c *ProjectsLocationsClustersGetCertificateAuthorityCall) doRequest(alt string) (*http.Response, error) {
  3448  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3449  	if c.ifNoneMatch_ != "" {
  3450  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3451  	}
  3452  	var body io.Reader = nil
  3453  	c.urlParams_.Set("alt", alt)
  3454  	c.urlParams_.Set("prettyPrint", "false")
  3455  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  3456  	urls += "?" + c.urlParams_.Encode()
  3457  	req, err := http.NewRequest("GET", urls, body)
  3458  	if err != nil {
  3459  		return nil, err
  3460  	}
  3461  	req.Header = reqHeaders
  3462  	googleapi.Expand(req.URL, map[string]string{
  3463  		"name": c.name,
  3464  	})
  3465  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3466  }
  3467  
  3468  // Do executes the "redis.projects.locations.clusters.getCertificateAuthority" call.
  3469  // Any non-2xx status code is an error. Response headers are in either
  3470  // *CertificateAuthority.ServerResponse.Header or (if a response was returned
  3471  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3472  // check whether the returned error was because http.StatusNotModified was
  3473  // returned.
  3474  func (c *ProjectsLocationsClustersGetCertificateAuthorityCall) Do(opts ...googleapi.CallOption) (*CertificateAuthority, error) {
  3475  	gensupport.SetOptions(c.urlParams_, opts...)
  3476  	res, err := c.doRequest("json")
  3477  	if res != nil && res.StatusCode == http.StatusNotModified {
  3478  		if res.Body != nil {
  3479  			res.Body.Close()
  3480  		}
  3481  		return nil, gensupport.WrapError(&googleapi.Error{
  3482  			Code:   res.StatusCode,
  3483  			Header: res.Header,
  3484  		})
  3485  	}
  3486  	if err != nil {
  3487  		return nil, err
  3488  	}
  3489  	defer googleapi.CloseBody(res)
  3490  	if err := googleapi.CheckResponse(res); err != nil {
  3491  		return nil, gensupport.WrapError(err)
  3492  	}
  3493  	ret := &CertificateAuthority{
  3494  		ServerResponse: googleapi.ServerResponse{
  3495  			Header:         res.Header,
  3496  			HTTPStatusCode: res.StatusCode,
  3497  		},
  3498  	}
  3499  	target := &ret
  3500  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3501  		return nil, err
  3502  	}
  3503  	return ret, nil
  3504  }
  3505  
  3506  type ProjectsLocationsClustersListCall struct {
  3507  	s            *Service
  3508  	parent       string
  3509  	urlParams_   gensupport.URLParams
  3510  	ifNoneMatch_ string
  3511  	ctx_         context.Context
  3512  	header_      http.Header
  3513  }
  3514  
  3515  // List: Lists all Redis clusters owned by a project in either the specified
  3516  // location (region) or all locations. The location should have the following
  3517  // format: * `projects/{project_id}/locations/{location_id}` If `location_id`
  3518  // is specified as `-` (wildcard), then all regions available to the project
  3519  // are queried, and the results are aggregated.
  3520  //
  3521  //   - parent: The resource name of the cluster location using the form:
  3522  //     `projects/{project_id}/locations/{location_id}` where `location_id` refers
  3523  //     to a GCP region.
  3524  func (r *ProjectsLocationsClustersService) List(parent string) *ProjectsLocationsClustersListCall {
  3525  	c := &ProjectsLocationsClustersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3526  	c.parent = parent
  3527  	return c
  3528  }
  3529  
  3530  // PageSize sets the optional parameter "pageSize": The maximum number of items
  3531  // to return. If not specified, a default value of 1000 will be used by the
  3532  // service. Regardless of the page_size value, the response may include a
  3533  // partial list and a caller should only rely on response's `next_page_token`
  3534  // to determine if there are more clusters left to be queried.
  3535  func (c *ProjectsLocationsClustersListCall) PageSize(pageSize int64) *ProjectsLocationsClustersListCall {
  3536  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3537  	return c
  3538  }
  3539  
  3540  // PageToken sets the optional parameter "pageToken": The `next_page_token`
  3541  // value returned from a previous ListClusters request, if any.
  3542  func (c *ProjectsLocationsClustersListCall) PageToken(pageToken string) *ProjectsLocationsClustersListCall {
  3543  	c.urlParams_.Set("pageToken", pageToken)
  3544  	return c
  3545  }
  3546  
  3547  // Fields allows partial responses to be retrieved. See
  3548  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3549  // details.
  3550  func (c *ProjectsLocationsClustersListCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersListCall {
  3551  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3552  	return c
  3553  }
  3554  
  3555  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3556  // object's ETag matches the given value. This is useful for getting updates
  3557  // only after the object has changed since the last request.
  3558  func (c *ProjectsLocationsClustersListCall) IfNoneMatch(entityTag string) *ProjectsLocationsClustersListCall {
  3559  	c.ifNoneMatch_ = entityTag
  3560  	return c
  3561  }
  3562  
  3563  // Context sets the context to be used in this call's Do method.
  3564  func (c *ProjectsLocationsClustersListCall) Context(ctx context.Context) *ProjectsLocationsClustersListCall {
  3565  	c.ctx_ = ctx
  3566  	return c
  3567  }
  3568  
  3569  // Header returns a http.Header that can be modified by the caller to add
  3570  // headers to the request.
  3571  func (c *ProjectsLocationsClustersListCall) Header() http.Header {
  3572  	if c.header_ == nil {
  3573  		c.header_ = make(http.Header)
  3574  	}
  3575  	return c.header_
  3576  }
  3577  
  3578  func (c *ProjectsLocationsClustersListCall) doRequest(alt string) (*http.Response, error) {
  3579  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3580  	if c.ifNoneMatch_ != "" {
  3581  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3582  	}
  3583  	var body io.Reader = nil
  3584  	c.urlParams_.Set("alt", alt)
  3585  	c.urlParams_.Set("prettyPrint", "false")
  3586  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/clusters")
  3587  	urls += "?" + c.urlParams_.Encode()
  3588  	req, err := http.NewRequest("GET", urls, body)
  3589  	if err != nil {
  3590  		return nil, err
  3591  	}
  3592  	req.Header = reqHeaders
  3593  	googleapi.Expand(req.URL, map[string]string{
  3594  		"parent": c.parent,
  3595  	})
  3596  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3597  }
  3598  
  3599  // Do executes the "redis.projects.locations.clusters.list" call.
  3600  // Any non-2xx status code is an error. Response headers are in either
  3601  // *ListClustersResponse.ServerResponse.Header or (if a response was returned
  3602  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3603  // check whether the returned error was because http.StatusNotModified was
  3604  // returned.
  3605  func (c *ProjectsLocationsClustersListCall) Do(opts ...googleapi.CallOption) (*ListClustersResponse, error) {
  3606  	gensupport.SetOptions(c.urlParams_, opts...)
  3607  	res, err := c.doRequest("json")
  3608  	if res != nil && res.StatusCode == http.StatusNotModified {
  3609  		if res.Body != nil {
  3610  			res.Body.Close()
  3611  		}
  3612  		return nil, gensupport.WrapError(&googleapi.Error{
  3613  			Code:   res.StatusCode,
  3614  			Header: res.Header,
  3615  		})
  3616  	}
  3617  	if err != nil {
  3618  		return nil, err
  3619  	}
  3620  	defer googleapi.CloseBody(res)
  3621  	if err := googleapi.CheckResponse(res); err != nil {
  3622  		return nil, gensupport.WrapError(err)
  3623  	}
  3624  	ret := &ListClustersResponse{
  3625  		ServerResponse: googleapi.ServerResponse{
  3626  			Header:         res.Header,
  3627  			HTTPStatusCode: res.StatusCode,
  3628  		},
  3629  	}
  3630  	target := &ret
  3631  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3632  		return nil, err
  3633  	}
  3634  	return ret, nil
  3635  }
  3636  
  3637  // Pages invokes f for each page of results.
  3638  // A non-nil error returned from f will halt the iteration.
  3639  // The provided context supersedes any context provided to the Context method.
  3640  func (c *ProjectsLocationsClustersListCall) Pages(ctx context.Context, f func(*ListClustersResponse) error) error {
  3641  	c.ctx_ = ctx
  3642  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3643  	for {
  3644  		x, err := c.Do()
  3645  		if err != nil {
  3646  			return err
  3647  		}
  3648  		if err := f(x); err != nil {
  3649  			return err
  3650  		}
  3651  		if x.NextPageToken == "" {
  3652  			return nil
  3653  		}
  3654  		c.PageToken(x.NextPageToken)
  3655  	}
  3656  }
  3657  
  3658  type ProjectsLocationsClustersPatchCall struct {
  3659  	s          *Service
  3660  	name       string
  3661  	cluster    *Cluster
  3662  	urlParams_ gensupport.URLParams
  3663  	ctx_       context.Context
  3664  	header_    http.Header
  3665  }
  3666  
  3667  // Patch: Updates the metadata and configuration of a specific Redis cluster.
  3668  // Completed longrunning.Operation will contain the new cluster object in the
  3669  // response field. The returned operation is automatically deleted after a few
  3670  // hours, so there is no need to call DeleteOperation.
  3671  //
  3672  //   - name: Unique name of the resource in this scope including project and
  3673  //     location using the form:
  3674  //     `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`.
  3675  func (r *ProjectsLocationsClustersService) Patch(name string, cluster *Cluster) *ProjectsLocationsClustersPatchCall {
  3676  	c := &ProjectsLocationsClustersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3677  	c.name = name
  3678  	c.cluster = cluster
  3679  	return c
  3680  }
  3681  
  3682  // RequestId sets the optional parameter "requestId": Idempotent request UUID.
  3683  func (c *ProjectsLocationsClustersPatchCall) RequestId(requestId string) *ProjectsLocationsClustersPatchCall {
  3684  	c.urlParams_.Set("requestId", requestId)
  3685  	return c
  3686  }
  3687  
  3688  // UpdateMask sets the optional parameter "updateMask": Required. Mask of
  3689  // fields to update. At least one path must be supplied in this field. The
  3690  // elements of the repeated paths field may only include these fields from
  3691  // Cluster: * `size_gb` * `replica_count`
  3692  func (c *ProjectsLocationsClustersPatchCall) UpdateMask(updateMask string) *ProjectsLocationsClustersPatchCall {
  3693  	c.urlParams_.Set("updateMask", updateMask)
  3694  	return c
  3695  }
  3696  
  3697  // Fields allows partial responses to be retrieved. See
  3698  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3699  // details.
  3700  func (c *ProjectsLocationsClustersPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersPatchCall {
  3701  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3702  	return c
  3703  }
  3704  
  3705  // Context sets the context to be used in this call's Do method.
  3706  func (c *ProjectsLocationsClustersPatchCall) Context(ctx context.Context) *ProjectsLocationsClustersPatchCall {
  3707  	c.ctx_ = ctx
  3708  	return c
  3709  }
  3710  
  3711  // Header returns a http.Header that can be modified by the caller to add
  3712  // headers to the request.
  3713  func (c *ProjectsLocationsClustersPatchCall) Header() http.Header {
  3714  	if c.header_ == nil {
  3715  		c.header_ = make(http.Header)
  3716  	}
  3717  	return c.header_
  3718  }
  3719  
  3720  func (c *ProjectsLocationsClustersPatchCall) doRequest(alt string) (*http.Response, error) {
  3721  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3722  	var body io.Reader = nil
  3723  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.cluster)
  3724  	if err != nil {
  3725  		return nil, err
  3726  	}
  3727  	c.urlParams_.Set("alt", alt)
  3728  	c.urlParams_.Set("prettyPrint", "false")
  3729  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  3730  	urls += "?" + c.urlParams_.Encode()
  3731  	req, err := http.NewRequest("PATCH", urls, body)
  3732  	if err != nil {
  3733  		return nil, err
  3734  	}
  3735  	req.Header = reqHeaders
  3736  	googleapi.Expand(req.URL, map[string]string{
  3737  		"name": c.name,
  3738  	})
  3739  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3740  }
  3741  
  3742  // Do executes the "redis.projects.locations.clusters.patch" call.
  3743  // Any non-2xx status code is an error. Response headers are in either
  3744  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3745  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3746  // whether the returned error was because http.StatusNotModified was returned.
  3747  func (c *ProjectsLocationsClustersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3748  	gensupport.SetOptions(c.urlParams_, opts...)
  3749  	res, err := c.doRequest("json")
  3750  	if res != nil && res.StatusCode == http.StatusNotModified {
  3751  		if res.Body != nil {
  3752  			res.Body.Close()
  3753  		}
  3754  		return nil, gensupport.WrapError(&googleapi.Error{
  3755  			Code:   res.StatusCode,
  3756  			Header: res.Header,
  3757  		})
  3758  	}
  3759  	if err != nil {
  3760  		return nil, err
  3761  	}
  3762  	defer googleapi.CloseBody(res)
  3763  	if err := googleapi.CheckResponse(res); err != nil {
  3764  		return nil, gensupport.WrapError(err)
  3765  	}
  3766  	ret := &Operation{
  3767  		ServerResponse: googleapi.ServerResponse{
  3768  			Header:         res.Header,
  3769  			HTTPStatusCode: res.StatusCode,
  3770  		},
  3771  	}
  3772  	target := &ret
  3773  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3774  		return nil, err
  3775  	}
  3776  	return ret, nil
  3777  }
  3778  
  3779  type ProjectsLocationsInstancesCreateCall struct {
  3780  	s          *Service
  3781  	parent     string
  3782  	instance   *Instance
  3783  	urlParams_ gensupport.URLParams
  3784  	ctx_       context.Context
  3785  	header_    http.Header
  3786  }
  3787  
  3788  // Create: Creates a Redis instance based on the specified tier and memory
  3789  // size. By default, the instance is accessible from the project's default
  3790  // network (https://cloud.google.com/vpc/docs/vpc). The creation is executed
  3791  // asynchronously and callers may check the returned operation to track its
  3792  // progress. Once the operation is completed the Redis instance will be fully
  3793  // functional. The completed longrunning.Operation will contain the new
  3794  // instance object in the response field. The returned operation is
  3795  // automatically deleted after a few hours, so there is no need to call
  3796  // DeleteOperation.
  3797  //
  3798  //   - parent: The resource name of the instance location using the form:
  3799  //     `projects/{project_id}/locations/{location_id}` where `location_id` refers
  3800  //     to a GCP region.
  3801  func (r *ProjectsLocationsInstancesService) Create(parent string, instance *Instance) *ProjectsLocationsInstancesCreateCall {
  3802  	c := &ProjectsLocationsInstancesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3803  	c.parent = parent
  3804  	c.instance = instance
  3805  	return c
  3806  }
  3807  
  3808  // InstanceId sets the optional parameter "instanceId": Required. The logical
  3809  // name of the Redis instance in the customer project with the following
  3810  // restrictions: * Must contain only lowercase letters, numbers, and hyphens. *
  3811  // Must start with a letter. * Must be between 1-40 characters. * Must end with
  3812  // a number or a letter. * Must be unique within the customer project /
  3813  // location
  3814  func (c *ProjectsLocationsInstancesCreateCall) InstanceId(instanceId string) *ProjectsLocationsInstancesCreateCall {
  3815  	c.urlParams_.Set("instanceId", instanceId)
  3816  	return c
  3817  }
  3818  
  3819  // Fields allows partial responses to be retrieved. See
  3820  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3821  // details.
  3822  func (c *ProjectsLocationsInstancesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesCreateCall {
  3823  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3824  	return c
  3825  }
  3826  
  3827  // Context sets the context to be used in this call's Do method.
  3828  func (c *ProjectsLocationsInstancesCreateCall) Context(ctx context.Context) *ProjectsLocationsInstancesCreateCall {
  3829  	c.ctx_ = ctx
  3830  	return c
  3831  }
  3832  
  3833  // Header returns a http.Header that can be modified by the caller to add
  3834  // headers to the request.
  3835  func (c *ProjectsLocationsInstancesCreateCall) Header() http.Header {
  3836  	if c.header_ == nil {
  3837  		c.header_ = make(http.Header)
  3838  	}
  3839  	return c.header_
  3840  }
  3841  
  3842  func (c *ProjectsLocationsInstancesCreateCall) doRequest(alt string) (*http.Response, error) {
  3843  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3844  	var body io.Reader = nil
  3845  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instance)
  3846  	if err != nil {
  3847  		return nil, err
  3848  	}
  3849  	c.urlParams_.Set("alt", alt)
  3850  	c.urlParams_.Set("prettyPrint", "false")
  3851  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/instances")
  3852  	urls += "?" + c.urlParams_.Encode()
  3853  	req, err := http.NewRequest("POST", urls, body)
  3854  	if err != nil {
  3855  		return nil, err
  3856  	}
  3857  	req.Header = reqHeaders
  3858  	googleapi.Expand(req.URL, map[string]string{
  3859  		"parent": c.parent,
  3860  	})
  3861  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3862  }
  3863  
  3864  // Do executes the "redis.projects.locations.instances.create" call.
  3865  // Any non-2xx status code is an error. Response headers are in either
  3866  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3867  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3868  // whether the returned error was because http.StatusNotModified was returned.
  3869  func (c *ProjectsLocationsInstancesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3870  	gensupport.SetOptions(c.urlParams_, opts...)
  3871  	res, err := c.doRequest("json")
  3872  	if res != nil && res.StatusCode == http.StatusNotModified {
  3873  		if res.Body != nil {
  3874  			res.Body.Close()
  3875  		}
  3876  		return nil, gensupport.WrapError(&googleapi.Error{
  3877  			Code:   res.StatusCode,
  3878  			Header: res.Header,
  3879  		})
  3880  	}
  3881  	if err != nil {
  3882  		return nil, err
  3883  	}
  3884  	defer googleapi.CloseBody(res)
  3885  	if err := googleapi.CheckResponse(res); err != nil {
  3886  		return nil, gensupport.WrapError(err)
  3887  	}
  3888  	ret := &Operation{
  3889  		ServerResponse: googleapi.ServerResponse{
  3890  			Header:         res.Header,
  3891  			HTTPStatusCode: res.StatusCode,
  3892  		},
  3893  	}
  3894  	target := &ret
  3895  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3896  		return nil, err
  3897  	}
  3898  	return ret, nil
  3899  }
  3900  
  3901  type ProjectsLocationsInstancesDeleteCall struct {
  3902  	s          *Service
  3903  	name       string
  3904  	urlParams_ gensupport.URLParams
  3905  	ctx_       context.Context
  3906  	header_    http.Header
  3907  }
  3908  
  3909  // Delete: Deletes a specific Redis instance. Instance stops serving and data
  3910  // is deleted.
  3911  //
  3912  //   - name: Redis instance resource name using the form:
  3913  //     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
  3914  //     where `location_id` refers to a GCP region.
  3915  func (r *ProjectsLocationsInstancesService) Delete(name string) *ProjectsLocationsInstancesDeleteCall {
  3916  	c := &ProjectsLocationsInstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3917  	c.name = name
  3918  	return c
  3919  }
  3920  
  3921  // Fields allows partial responses to be retrieved. See
  3922  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3923  // details.
  3924  func (c *ProjectsLocationsInstancesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesDeleteCall {
  3925  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3926  	return c
  3927  }
  3928  
  3929  // Context sets the context to be used in this call's Do method.
  3930  func (c *ProjectsLocationsInstancesDeleteCall) Context(ctx context.Context) *ProjectsLocationsInstancesDeleteCall {
  3931  	c.ctx_ = ctx
  3932  	return c
  3933  }
  3934  
  3935  // Header returns a http.Header that can be modified by the caller to add
  3936  // headers to the request.
  3937  func (c *ProjectsLocationsInstancesDeleteCall) Header() http.Header {
  3938  	if c.header_ == nil {
  3939  		c.header_ = make(http.Header)
  3940  	}
  3941  	return c.header_
  3942  }
  3943  
  3944  func (c *ProjectsLocationsInstancesDeleteCall) doRequest(alt string) (*http.Response, error) {
  3945  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3946  	var body io.Reader = nil
  3947  	c.urlParams_.Set("alt", alt)
  3948  	c.urlParams_.Set("prettyPrint", "false")
  3949  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  3950  	urls += "?" + c.urlParams_.Encode()
  3951  	req, err := http.NewRequest("DELETE", urls, body)
  3952  	if err != nil {
  3953  		return nil, err
  3954  	}
  3955  	req.Header = reqHeaders
  3956  	googleapi.Expand(req.URL, map[string]string{
  3957  		"name": c.name,
  3958  	})
  3959  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3960  }
  3961  
  3962  // Do executes the "redis.projects.locations.instances.delete" call.
  3963  // Any non-2xx status code is an error. Response headers are in either
  3964  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3965  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3966  // whether the returned error was because http.StatusNotModified was returned.
  3967  func (c *ProjectsLocationsInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3968  	gensupport.SetOptions(c.urlParams_, opts...)
  3969  	res, err := c.doRequest("json")
  3970  	if res != nil && res.StatusCode == http.StatusNotModified {
  3971  		if res.Body != nil {
  3972  			res.Body.Close()
  3973  		}
  3974  		return nil, gensupport.WrapError(&googleapi.Error{
  3975  			Code:   res.StatusCode,
  3976  			Header: res.Header,
  3977  		})
  3978  	}
  3979  	if err != nil {
  3980  		return nil, err
  3981  	}
  3982  	defer googleapi.CloseBody(res)
  3983  	if err := googleapi.CheckResponse(res); err != nil {
  3984  		return nil, gensupport.WrapError(err)
  3985  	}
  3986  	ret := &Operation{
  3987  		ServerResponse: googleapi.ServerResponse{
  3988  			Header:         res.Header,
  3989  			HTTPStatusCode: res.StatusCode,
  3990  		},
  3991  	}
  3992  	target := &ret
  3993  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3994  		return nil, err
  3995  	}
  3996  	return ret, nil
  3997  }
  3998  
  3999  type ProjectsLocationsInstancesExportCall struct {
  4000  	s                     *Service
  4001  	name                  string
  4002  	exportinstancerequest *ExportInstanceRequest
  4003  	urlParams_            gensupport.URLParams
  4004  	ctx_                  context.Context
  4005  	header_               http.Header
  4006  }
  4007  
  4008  // Export: Export Redis instance data into a Redis RDB format file in Cloud
  4009  // Storage. Redis will continue serving during this operation. The returned
  4010  // operation is automatically deleted after a few hours, so there is no need to
  4011  // call DeleteOperation.
  4012  //
  4013  //   - name: Redis instance resource name using the form:
  4014  //     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
  4015  //     where `location_id` refers to a GCP region.
  4016  func (r *ProjectsLocationsInstancesService) Export(name string, exportinstancerequest *ExportInstanceRequest) *ProjectsLocationsInstancesExportCall {
  4017  	c := &ProjectsLocationsInstancesExportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4018  	c.name = name
  4019  	c.exportinstancerequest = exportinstancerequest
  4020  	return c
  4021  }
  4022  
  4023  // Fields allows partial responses to be retrieved. See
  4024  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4025  // details.
  4026  func (c *ProjectsLocationsInstancesExportCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesExportCall {
  4027  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4028  	return c
  4029  }
  4030  
  4031  // Context sets the context to be used in this call's Do method.
  4032  func (c *ProjectsLocationsInstancesExportCall) Context(ctx context.Context) *ProjectsLocationsInstancesExportCall {
  4033  	c.ctx_ = ctx
  4034  	return c
  4035  }
  4036  
  4037  // Header returns a http.Header that can be modified by the caller to add
  4038  // headers to the request.
  4039  func (c *ProjectsLocationsInstancesExportCall) Header() http.Header {
  4040  	if c.header_ == nil {
  4041  		c.header_ = make(http.Header)
  4042  	}
  4043  	return c.header_
  4044  }
  4045  
  4046  func (c *ProjectsLocationsInstancesExportCall) doRequest(alt string) (*http.Response, error) {
  4047  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4048  	var body io.Reader = nil
  4049  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.exportinstancerequest)
  4050  	if err != nil {
  4051  		return nil, err
  4052  	}
  4053  	c.urlParams_.Set("alt", alt)
  4054  	c.urlParams_.Set("prettyPrint", "false")
  4055  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:export")
  4056  	urls += "?" + c.urlParams_.Encode()
  4057  	req, err := http.NewRequest("POST", urls, body)
  4058  	if err != nil {
  4059  		return nil, err
  4060  	}
  4061  	req.Header = reqHeaders
  4062  	googleapi.Expand(req.URL, map[string]string{
  4063  		"name": c.name,
  4064  	})
  4065  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4066  }
  4067  
  4068  // Do executes the "redis.projects.locations.instances.export" call.
  4069  // Any non-2xx status code is an error. Response headers are in either
  4070  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4071  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4072  // whether the returned error was because http.StatusNotModified was returned.
  4073  func (c *ProjectsLocationsInstancesExportCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4074  	gensupport.SetOptions(c.urlParams_, opts...)
  4075  	res, err := c.doRequest("json")
  4076  	if res != nil && res.StatusCode == http.StatusNotModified {
  4077  		if res.Body != nil {
  4078  			res.Body.Close()
  4079  		}
  4080  		return nil, gensupport.WrapError(&googleapi.Error{
  4081  			Code:   res.StatusCode,
  4082  			Header: res.Header,
  4083  		})
  4084  	}
  4085  	if err != nil {
  4086  		return nil, err
  4087  	}
  4088  	defer googleapi.CloseBody(res)
  4089  	if err := googleapi.CheckResponse(res); err != nil {
  4090  		return nil, gensupport.WrapError(err)
  4091  	}
  4092  	ret := &Operation{
  4093  		ServerResponse: googleapi.ServerResponse{
  4094  			Header:         res.Header,
  4095  			HTTPStatusCode: res.StatusCode,
  4096  		},
  4097  	}
  4098  	target := &ret
  4099  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4100  		return nil, err
  4101  	}
  4102  	return ret, nil
  4103  }
  4104  
  4105  type ProjectsLocationsInstancesFailoverCall struct {
  4106  	s                       *Service
  4107  	name                    string
  4108  	failoverinstancerequest *FailoverInstanceRequest
  4109  	urlParams_              gensupport.URLParams
  4110  	ctx_                    context.Context
  4111  	header_                 http.Header
  4112  }
  4113  
  4114  // Failover: Initiates a failover of the primary node to current replica node
  4115  // for a specific STANDARD tier Cloud Memorystore for Redis instance.
  4116  //
  4117  //   - name: Redis instance resource name using the form:
  4118  //     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
  4119  //     where `location_id` refers to a GCP region.
  4120  func (r *ProjectsLocationsInstancesService) Failover(name string, failoverinstancerequest *FailoverInstanceRequest) *ProjectsLocationsInstancesFailoverCall {
  4121  	c := &ProjectsLocationsInstancesFailoverCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4122  	c.name = name
  4123  	c.failoverinstancerequest = failoverinstancerequest
  4124  	return c
  4125  }
  4126  
  4127  // Fields allows partial responses to be retrieved. See
  4128  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4129  // details.
  4130  func (c *ProjectsLocationsInstancesFailoverCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesFailoverCall {
  4131  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4132  	return c
  4133  }
  4134  
  4135  // Context sets the context to be used in this call's Do method.
  4136  func (c *ProjectsLocationsInstancesFailoverCall) Context(ctx context.Context) *ProjectsLocationsInstancesFailoverCall {
  4137  	c.ctx_ = ctx
  4138  	return c
  4139  }
  4140  
  4141  // Header returns a http.Header that can be modified by the caller to add
  4142  // headers to the request.
  4143  func (c *ProjectsLocationsInstancesFailoverCall) Header() http.Header {
  4144  	if c.header_ == nil {
  4145  		c.header_ = make(http.Header)
  4146  	}
  4147  	return c.header_
  4148  }
  4149  
  4150  func (c *ProjectsLocationsInstancesFailoverCall) doRequest(alt string) (*http.Response, error) {
  4151  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4152  	var body io.Reader = nil
  4153  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.failoverinstancerequest)
  4154  	if err != nil {
  4155  		return nil, err
  4156  	}
  4157  	c.urlParams_.Set("alt", alt)
  4158  	c.urlParams_.Set("prettyPrint", "false")
  4159  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:failover")
  4160  	urls += "?" + c.urlParams_.Encode()
  4161  	req, err := http.NewRequest("POST", urls, body)
  4162  	if err != nil {
  4163  		return nil, err
  4164  	}
  4165  	req.Header = reqHeaders
  4166  	googleapi.Expand(req.URL, map[string]string{
  4167  		"name": c.name,
  4168  	})
  4169  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4170  }
  4171  
  4172  // Do executes the "redis.projects.locations.instances.failover" call.
  4173  // Any non-2xx status code is an error. Response headers are in either
  4174  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4175  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4176  // whether the returned error was because http.StatusNotModified was returned.
  4177  func (c *ProjectsLocationsInstancesFailoverCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4178  	gensupport.SetOptions(c.urlParams_, opts...)
  4179  	res, err := c.doRequest("json")
  4180  	if res != nil && res.StatusCode == http.StatusNotModified {
  4181  		if res.Body != nil {
  4182  			res.Body.Close()
  4183  		}
  4184  		return nil, gensupport.WrapError(&googleapi.Error{
  4185  			Code:   res.StatusCode,
  4186  			Header: res.Header,
  4187  		})
  4188  	}
  4189  	if err != nil {
  4190  		return nil, err
  4191  	}
  4192  	defer googleapi.CloseBody(res)
  4193  	if err := googleapi.CheckResponse(res); err != nil {
  4194  		return nil, gensupport.WrapError(err)
  4195  	}
  4196  	ret := &Operation{
  4197  		ServerResponse: googleapi.ServerResponse{
  4198  			Header:         res.Header,
  4199  			HTTPStatusCode: res.StatusCode,
  4200  		},
  4201  	}
  4202  	target := &ret
  4203  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4204  		return nil, err
  4205  	}
  4206  	return ret, nil
  4207  }
  4208  
  4209  type ProjectsLocationsInstancesGetCall struct {
  4210  	s            *Service
  4211  	name         string
  4212  	urlParams_   gensupport.URLParams
  4213  	ifNoneMatch_ string
  4214  	ctx_         context.Context
  4215  	header_      http.Header
  4216  }
  4217  
  4218  // Get: Gets the details of a specific Redis instance.
  4219  //
  4220  //   - name: Redis instance resource name using the form:
  4221  //     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
  4222  //     where `location_id` refers to a GCP region.
  4223  func (r *ProjectsLocationsInstancesService) Get(name string) *ProjectsLocationsInstancesGetCall {
  4224  	c := &ProjectsLocationsInstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4225  	c.name = name
  4226  	return c
  4227  }
  4228  
  4229  // Fields allows partial responses to be retrieved. See
  4230  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4231  // details.
  4232  func (c *ProjectsLocationsInstancesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesGetCall {
  4233  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4234  	return c
  4235  }
  4236  
  4237  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4238  // object's ETag matches the given value. This is useful for getting updates
  4239  // only after the object has changed since the last request.
  4240  func (c *ProjectsLocationsInstancesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesGetCall {
  4241  	c.ifNoneMatch_ = entityTag
  4242  	return c
  4243  }
  4244  
  4245  // Context sets the context to be used in this call's Do method.
  4246  func (c *ProjectsLocationsInstancesGetCall) Context(ctx context.Context) *ProjectsLocationsInstancesGetCall {
  4247  	c.ctx_ = ctx
  4248  	return c
  4249  }
  4250  
  4251  // Header returns a http.Header that can be modified by the caller to add
  4252  // headers to the request.
  4253  func (c *ProjectsLocationsInstancesGetCall) Header() http.Header {
  4254  	if c.header_ == nil {
  4255  		c.header_ = make(http.Header)
  4256  	}
  4257  	return c.header_
  4258  }
  4259  
  4260  func (c *ProjectsLocationsInstancesGetCall) doRequest(alt string) (*http.Response, error) {
  4261  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4262  	if c.ifNoneMatch_ != "" {
  4263  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4264  	}
  4265  	var body io.Reader = nil
  4266  	c.urlParams_.Set("alt", alt)
  4267  	c.urlParams_.Set("prettyPrint", "false")
  4268  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  4269  	urls += "?" + c.urlParams_.Encode()
  4270  	req, err := http.NewRequest("GET", urls, body)
  4271  	if err != nil {
  4272  		return nil, err
  4273  	}
  4274  	req.Header = reqHeaders
  4275  	googleapi.Expand(req.URL, map[string]string{
  4276  		"name": c.name,
  4277  	})
  4278  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4279  }
  4280  
  4281  // Do executes the "redis.projects.locations.instances.get" call.
  4282  // Any non-2xx status code is an error. Response headers are in either
  4283  // *Instance.ServerResponse.Header or (if a response was returned at all) in
  4284  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4285  // whether the returned error was because http.StatusNotModified was returned.
  4286  func (c *ProjectsLocationsInstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, error) {
  4287  	gensupport.SetOptions(c.urlParams_, opts...)
  4288  	res, err := c.doRequest("json")
  4289  	if res != nil && res.StatusCode == http.StatusNotModified {
  4290  		if res.Body != nil {
  4291  			res.Body.Close()
  4292  		}
  4293  		return nil, gensupport.WrapError(&googleapi.Error{
  4294  			Code:   res.StatusCode,
  4295  			Header: res.Header,
  4296  		})
  4297  	}
  4298  	if err != nil {
  4299  		return nil, err
  4300  	}
  4301  	defer googleapi.CloseBody(res)
  4302  	if err := googleapi.CheckResponse(res); err != nil {
  4303  		return nil, gensupport.WrapError(err)
  4304  	}
  4305  	ret := &Instance{
  4306  		ServerResponse: googleapi.ServerResponse{
  4307  			Header:         res.Header,
  4308  			HTTPStatusCode: res.StatusCode,
  4309  		},
  4310  	}
  4311  	target := &ret
  4312  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4313  		return nil, err
  4314  	}
  4315  	return ret, nil
  4316  }
  4317  
  4318  type ProjectsLocationsInstancesGetAuthStringCall struct {
  4319  	s            *Service
  4320  	name         string
  4321  	urlParams_   gensupport.URLParams
  4322  	ifNoneMatch_ string
  4323  	ctx_         context.Context
  4324  	header_      http.Header
  4325  }
  4326  
  4327  // GetAuthString: Gets the AUTH string for a Redis instance. If AUTH is not
  4328  // enabled for the instance the response will be empty. This information is not
  4329  // included in the details returned to GetInstance.
  4330  //
  4331  //   - name: Redis instance resource name using the form:
  4332  //     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
  4333  //     where `location_id` refers to a GCP region.
  4334  func (r *ProjectsLocationsInstancesService) GetAuthString(name string) *ProjectsLocationsInstancesGetAuthStringCall {
  4335  	c := &ProjectsLocationsInstancesGetAuthStringCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4336  	c.name = name
  4337  	return c
  4338  }
  4339  
  4340  // Fields allows partial responses to be retrieved. See
  4341  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4342  // details.
  4343  func (c *ProjectsLocationsInstancesGetAuthStringCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesGetAuthStringCall {
  4344  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4345  	return c
  4346  }
  4347  
  4348  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4349  // object's ETag matches the given value. This is useful for getting updates
  4350  // only after the object has changed since the last request.
  4351  func (c *ProjectsLocationsInstancesGetAuthStringCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesGetAuthStringCall {
  4352  	c.ifNoneMatch_ = entityTag
  4353  	return c
  4354  }
  4355  
  4356  // Context sets the context to be used in this call's Do method.
  4357  func (c *ProjectsLocationsInstancesGetAuthStringCall) Context(ctx context.Context) *ProjectsLocationsInstancesGetAuthStringCall {
  4358  	c.ctx_ = ctx
  4359  	return c
  4360  }
  4361  
  4362  // Header returns a http.Header that can be modified by the caller to add
  4363  // headers to the request.
  4364  func (c *ProjectsLocationsInstancesGetAuthStringCall) Header() http.Header {
  4365  	if c.header_ == nil {
  4366  		c.header_ = make(http.Header)
  4367  	}
  4368  	return c.header_
  4369  }
  4370  
  4371  func (c *ProjectsLocationsInstancesGetAuthStringCall) doRequest(alt string) (*http.Response, error) {
  4372  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4373  	if c.ifNoneMatch_ != "" {
  4374  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4375  	}
  4376  	var body io.Reader = nil
  4377  	c.urlParams_.Set("alt", alt)
  4378  	c.urlParams_.Set("prettyPrint", "false")
  4379  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/authString")
  4380  	urls += "?" + c.urlParams_.Encode()
  4381  	req, err := http.NewRequest("GET", urls, body)
  4382  	if err != nil {
  4383  		return nil, err
  4384  	}
  4385  	req.Header = reqHeaders
  4386  	googleapi.Expand(req.URL, map[string]string{
  4387  		"name": c.name,
  4388  	})
  4389  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4390  }
  4391  
  4392  // Do executes the "redis.projects.locations.instances.getAuthString" call.
  4393  // Any non-2xx status code is an error. Response headers are in either
  4394  // *InstanceAuthString.ServerResponse.Header or (if a response was returned at
  4395  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4396  // check whether the returned error was because http.StatusNotModified was
  4397  // returned.
  4398  func (c *ProjectsLocationsInstancesGetAuthStringCall) Do(opts ...googleapi.CallOption) (*InstanceAuthString, error) {
  4399  	gensupport.SetOptions(c.urlParams_, opts...)
  4400  	res, err := c.doRequest("json")
  4401  	if res != nil && res.StatusCode == http.StatusNotModified {
  4402  		if res.Body != nil {
  4403  			res.Body.Close()
  4404  		}
  4405  		return nil, gensupport.WrapError(&googleapi.Error{
  4406  			Code:   res.StatusCode,
  4407  			Header: res.Header,
  4408  		})
  4409  	}
  4410  	if err != nil {
  4411  		return nil, err
  4412  	}
  4413  	defer googleapi.CloseBody(res)
  4414  	if err := googleapi.CheckResponse(res); err != nil {
  4415  		return nil, gensupport.WrapError(err)
  4416  	}
  4417  	ret := &InstanceAuthString{
  4418  		ServerResponse: googleapi.ServerResponse{
  4419  			Header:         res.Header,
  4420  			HTTPStatusCode: res.StatusCode,
  4421  		},
  4422  	}
  4423  	target := &ret
  4424  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4425  		return nil, err
  4426  	}
  4427  	return ret, nil
  4428  }
  4429  
  4430  type ProjectsLocationsInstancesImportCall struct {
  4431  	s                     *Service
  4432  	name                  string
  4433  	importinstancerequest *ImportInstanceRequest
  4434  	urlParams_            gensupport.URLParams
  4435  	ctx_                  context.Context
  4436  	header_               http.Header
  4437  }
  4438  
  4439  // Import: Import a Redis RDB snapshot file from Cloud Storage into a Redis
  4440  // instance. Redis may stop serving during this operation. Instance state will
  4441  // be IMPORTING for entire operation. When complete, the instance will contain
  4442  // only data from the imported file. The returned operation is automatically
  4443  // deleted after a few hours, so there is no need to call DeleteOperation.
  4444  //
  4445  //   - name: Redis instance resource name using the form:
  4446  //     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
  4447  //     where `location_id` refers to a GCP region.
  4448  func (r *ProjectsLocationsInstancesService) Import(name string, importinstancerequest *ImportInstanceRequest) *ProjectsLocationsInstancesImportCall {
  4449  	c := &ProjectsLocationsInstancesImportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4450  	c.name = name
  4451  	c.importinstancerequest = importinstancerequest
  4452  	return c
  4453  }
  4454  
  4455  // Fields allows partial responses to be retrieved. See
  4456  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4457  // details.
  4458  func (c *ProjectsLocationsInstancesImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesImportCall {
  4459  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4460  	return c
  4461  }
  4462  
  4463  // Context sets the context to be used in this call's Do method.
  4464  func (c *ProjectsLocationsInstancesImportCall) Context(ctx context.Context) *ProjectsLocationsInstancesImportCall {
  4465  	c.ctx_ = ctx
  4466  	return c
  4467  }
  4468  
  4469  // Header returns a http.Header that can be modified by the caller to add
  4470  // headers to the request.
  4471  func (c *ProjectsLocationsInstancesImportCall) Header() http.Header {
  4472  	if c.header_ == nil {
  4473  		c.header_ = make(http.Header)
  4474  	}
  4475  	return c.header_
  4476  }
  4477  
  4478  func (c *ProjectsLocationsInstancesImportCall) doRequest(alt string) (*http.Response, error) {
  4479  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4480  	var body io.Reader = nil
  4481  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.importinstancerequest)
  4482  	if err != nil {
  4483  		return nil, err
  4484  	}
  4485  	c.urlParams_.Set("alt", alt)
  4486  	c.urlParams_.Set("prettyPrint", "false")
  4487  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:import")
  4488  	urls += "?" + c.urlParams_.Encode()
  4489  	req, err := http.NewRequest("POST", urls, body)
  4490  	if err != nil {
  4491  		return nil, err
  4492  	}
  4493  	req.Header = reqHeaders
  4494  	googleapi.Expand(req.URL, map[string]string{
  4495  		"name": c.name,
  4496  	})
  4497  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4498  }
  4499  
  4500  // Do executes the "redis.projects.locations.instances.import" call.
  4501  // Any non-2xx status code is an error. Response headers are in either
  4502  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4503  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4504  // whether the returned error was because http.StatusNotModified was returned.
  4505  func (c *ProjectsLocationsInstancesImportCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4506  	gensupport.SetOptions(c.urlParams_, opts...)
  4507  	res, err := c.doRequest("json")
  4508  	if res != nil && res.StatusCode == http.StatusNotModified {
  4509  		if res.Body != nil {
  4510  			res.Body.Close()
  4511  		}
  4512  		return nil, gensupport.WrapError(&googleapi.Error{
  4513  			Code:   res.StatusCode,
  4514  			Header: res.Header,
  4515  		})
  4516  	}
  4517  	if err != nil {
  4518  		return nil, err
  4519  	}
  4520  	defer googleapi.CloseBody(res)
  4521  	if err := googleapi.CheckResponse(res); err != nil {
  4522  		return nil, gensupport.WrapError(err)
  4523  	}
  4524  	ret := &Operation{
  4525  		ServerResponse: googleapi.ServerResponse{
  4526  			Header:         res.Header,
  4527  			HTTPStatusCode: res.StatusCode,
  4528  		},
  4529  	}
  4530  	target := &ret
  4531  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4532  		return nil, err
  4533  	}
  4534  	return ret, nil
  4535  }
  4536  
  4537  type ProjectsLocationsInstancesListCall struct {
  4538  	s            *Service
  4539  	parent       string
  4540  	urlParams_   gensupport.URLParams
  4541  	ifNoneMatch_ string
  4542  	ctx_         context.Context
  4543  	header_      http.Header
  4544  }
  4545  
  4546  // List: Lists all Redis instances owned by a project in either the specified
  4547  // location (region) or all locations. The location should have the following
  4548  // format: * `projects/{project_id}/locations/{location_id}` If `location_id`
  4549  // is specified as `-` (wildcard), then all regions available to the project
  4550  // are queried, and the results are aggregated.
  4551  //
  4552  //   - parent: The resource name of the instance location using the form:
  4553  //     `projects/{project_id}/locations/{location_id}` where `location_id` refers
  4554  //     to a GCP region.
  4555  func (r *ProjectsLocationsInstancesService) List(parent string) *ProjectsLocationsInstancesListCall {
  4556  	c := &ProjectsLocationsInstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4557  	c.parent = parent
  4558  	return c
  4559  }
  4560  
  4561  // PageSize sets the optional parameter "pageSize": The maximum number of items
  4562  // to return. If not specified, a default value of 1000 will be used by the
  4563  // service. Regardless of the page_size value, the response may include a
  4564  // partial list and a caller should only rely on response's `next_page_token`
  4565  // to determine if there are more instances left to be queried.
  4566  func (c *ProjectsLocationsInstancesListCall) PageSize(pageSize int64) *ProjectsLocationsInstancesListCall {
  4567  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4568  	return c
  4569  }
  4570  
  4571  // PageToken sets the optional parameter "pageToken": The `next_page_token`
  4572  // value returned from a previous ListInstances request, if any.
  4573  func (c *ProjectsLocationsInstancesListCall) PageToken(pageToken string) *ProjectsLocationsInstancesListCall {
  4574  	c.urlParams_.Set("pageToken", pageToken)
  4575  	return c
  4576  }
  4577  
  4578  // Fields allows partial responses to be retrieved. See
  4579  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4580  // details.
  4581  func (c *ProjectsLocationsInstancesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesListCall {
  4582  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4583  	return c
  4584  }
  4585  
  4586  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4587  // object's ETag matches the given value. This is useful for getting updates
  4588  // only after the object has changed since the last request.
  4589  func (c *ProjectsLocationsInstancesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesListCall {
  4590  	c.ifNoneMatch_ = entityTag
  4591  	return c
  4592  }
  4593  
  4594  // Context sets the context to be used in this call's Do method.
  4595  func (c *ProjectsLocationsInstancesListCall) Context(ctx context.Context) *ProjectsLocationsInstancesListCall {
  4596  	c.ctx_ = ctx
  4597  	return c
  4598  }
  4599  
  4600  // Header returns a http.Header that can be modified by the caller to add
  4601  // headers to the request.
  4602  func (c *ProjectsLocationsInstancesListCall) Header() http.Header {
  4603  	if c.header_ == nil {
  4604  		c.header_ = make(http.Header)
  4605  	}
  4606  	return c.header_
  4607  }
  4608  
  4609  func (c *ProjectsLocationsInstancesListCall) doRequest(alt string) (*http.Response, error) {
  4610  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4611  	if c.ifNoneMatch_ != "" {
  4612  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4613  	}
  4614  	var body io.Reader = nil
  4615  	c.urlParams_.Set("alt", alt)
  4616  	c.urlParams_.Set("prettyPrint", "false")
  4617  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/instances")
  4618  	urls += "?" + c.urlParams_.Encode()
  4619  	req, err := http.NewRequest("GET", urls, body)
  4620  	if err != nil {
  4621  		return nil, err
  4622  	}
  4623  	req.Header = reqHeaders
  4624  	googleapi.Expand(req.URL, map[string]string{
  4625  		"parent": c.parent,
  4626  	})
  4627  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4628  }
  4629  
  4630  // Do executes the "redis.projects.locations.instances.list" call.
  4631  // Any non-2xx status code is an error. Response headers are in either
  4632  // *ListInstancesResponse.ServerResponse.Header or (if a response was returned
  4633  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4634  // check whether the returned error was because http.StatusNotModified was
  4635  // returned.
  4636  func (c *ProjectsLocationsInstancesListCall) Do(opts ...googleapi.CallOption) (*ListInstancesResponse, error) {
  4637  	gensupport.SetOptions(c.urlParams_, opts...)
  4638  	res, err := c.doRequest("json")
  4639  	if res != nil && res.StatusCode == http.StatusNotModified {
  4640  		if res.Body != nil {
  4641  			res.Body.Close()
  4642  		}
  4643  		return nil, gensupport.WrapError(&googleapi.Error{
  4644  			Code:   res.StatusCode,
  4645  			Header: res.Header,
  4646  		})
  4647  	}
  4648  	if err != nil {
  4649  		return nil, err
  4650  	}
  4651  	defer googleapi.CloseBody(res)
  4652  	if err := googleapi.CheckResponse(res); err != nil {
  4653  		return nil, gensupport.WrapError(err)
  4654  	}
  4655  	ret := &ListInstancesResponse{
  4656  		ServerResponse: googleapi.ServerResponse{
  4657  			Header:         res.Header,
  4658  			HTTPStatusCode: res.StatusCode,
  4659  		},
  4660  	}
  4661  	target := &ret
  4662  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4663  		return nil, err
  4664  	}
  4665  	return ret, nil
  4666  }
  4667  
  4668  // Pages invokes f for each page of results.
  4669  // A non-nil error returned from f will halt the iteration.
  4670  // The provided context supersedes any context provided to the Context method.
  4671  func (c *ProjectsLocationsInstancesListCall) Pages(ctx context.Context, f func(*ListInstancesResponse) error) error {
  4672  	c.ctx_ = ctx
  4673  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4674  	for {
  4675  		x, err := c.Do()
  4676  		if err != nil {
  4677  			return err
  4678  		}
  4679  		if err := f(x); err != nil {
  4680  			return err
  4681  		}
  4682  		if x.NextPageToken == "" {
  4683  			return nil
  4684  		}
  4685  		c.PageToken(x.NextPageToken)
  4686  	}
  4687  }
  4688  
  4689  type ProjectsLocationsInstancesPatchCall struct {
  4690  	s          *Service
  4691  	name       string
  4692  	instance   *Instance
  4693  	urlParams_ gensupport.URLParams
  4694  	ctx_       context.Context
  4695  	header_    http.Header
  4696  }
  4697  
  4698  // Patch: Updates the metadata and configuration of a specific Redis instance.
  4699  // Completed longrunning.Operation will contain the new instance object in the
  4700  // response field. The returned operation is automatically deleted after a few
  4701  // hours, so there is no need to call DeleteOperation.
  4702  //
  4703  //   - name: Unique name of the resource in this scope including project and
  4704  //     location using the form:
  4705  //     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
  4706  //     Note: Redis instances are managed and addressed at regional level so
  4707  //     location_id here refers to a GCP region; however, users may choose which
  4708  //     specific zone (or collection of zones for cross-zone instances) an
  4709  //     instance should be provisioned in. Refer to location_id and
  4710  //     alternative_location_id fields for more details.
  4711  func (r *ProjectsLocationsInstancesService) Patch(name string, instance *Instance) *ProjectsLocationsInstancesPatchCall {
  4712  	c := &ProjectsLocationsInstancesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4713  	c.name = name
  4714  	c.instance = instance
  4715  	return c
  4716  }
  4717  
  4718  // UpdateMask sets the optional parameter "updateMask": Required. Mask of
  4719  // fields to update. At least one path must be supplied in this field. The
  4720  // elements of the repeated paths field may only include these fields from
  4721  // Instance: * `displayName` * `labels` * `memorySizeGb` * `redisConfig` *
  4722  // `replica_count`
  4723  func (c *ProjectsLocationsInstancesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsInstancesPatchCall {
  4724  	c.urlParams_.Set("updateMask", updateMask)
  4725  	return c
  4726  }
  4727  
  4728  // Fields allows partial responses to be retrieved. See
  4729  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4730  // details.
  4731  func (c *ProjectsLocationsInstancesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesPatchCall {
  4732  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4733  	return c
  4734  }
  4735  
  4736  // Context sets the context to be used in this call's Do method.
  4737  func (c *ProjectsLocationsInstancesPatchCall) Context(ctx context.Context) *ProjectsLocationsInstancesPatchCall {
  4738  	c.ctx_ = ctx
  4739  	return c
  4740  }
  4741  
  4742  // Header returns a http.Header that can be modified by the caller to add
  4743  // headers to the request.
  4744  func (c *ProjectsLocationsInstancesPatchCall) Header() http.Header {
  4745  	if c.header_ == nil {
  4746  		c.header_ = make(http.Header)
  4747  	}
  4748  	return c.header_
  4749  }
  4750  
  4751  func (c *ProjectsLocationsInstancesPatchCall) doRequest(alt string) (*http.Response, error) {
  4752  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4753  	var body io.Reader = nil
  4754  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instance)
  4755  	if err != nil {
  4756  		return nil, err
  4757  	}
  4758  	c.urlParams_.Set("alt", alt)
  4759  	c.urlParams_.Set("prettyPrint", "false")
  4760  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  4761  	urls += "?" + c.urlParams_.Encode()
  4762  	req, err := http.NewRequest("PATCH", urls, body)
  4763  	if err != nil {
  4764  		return nil, err
  4765  	}
  4766  	req.Header = reqHeaders
  4767  	googleapi.Expand(req.URL, map[string]string{
  4768  		"name": c.name,
  4769  	})
  4770  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4771  }
  4772  
  4773  // Do executes the "redis.projects.locations.instances.patch" call.
  4774  // Any non-2xx status code is an error. Response headers are in either
  4775  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4776  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4777  // whether the returned error was because http.StatusNotModified was returned.
  4778  func (c *ProjectsLocationsInstancesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4779  	gensupport.SetOptions(c.urlParams_, opts...)
  4780  	res, err := c.doRequest("json")
  4781  	if res != nil && res.StatusCode == http.StatusNotModified {
  4782  		if res.Body != nil {
  4783  			res.Body.Close()
  4784  		}
  4785  		return nil, gensupport.WrapError(&googleapi.Error{
  4786  			Code:   res.StatusCode,
  4787  			Header: res.Header,
  4788  		})
  4789  	}
  4790  	if err != nil {
  4791  		return nil, err
  4792  	}
  4793  	defer googleapi.CloseBody(res)
  4794  	if err := googleapi.CheckResponse(res); err != nil {
  4795  		return nil, gensupport.WrapError(err)
  4796  	}
  4797  	ret := &Operation{
  4798  		ServerResponse: googleapi.ServerResponse{
  4799  			Header:         res.Header,
  4800  			HTTPStatusCode: res.StatusCode,
  4801  		},
  4802  	}
  4803  	target := &ret
  4804  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4805  		return nil, err
  4806  	}
  4807  	return ret, nil
  4808  }
  4809  
  4810  type ProjectsLocationsInstancesRescheduleMaintenanceCall struct {
  4811  	s                            *Service
  4812  	name                         string
  4813  	reschedulemaintenancerequest *RescheduleMaintenanceRequest
  4814  	urlParams_                   gensupport.URLParams
  4815  	ctx_                         context.Context
  4816  	header_                      http.Header
  4817  }
  4818  
  4819  // RescheduleMaintenance: Reschedule maintenance for a given instance in a
  4820  // given project and location.
  4821  //
  4822  //   - name: Redis instance resource name using the form:
  4823  //     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
  4824  //     where `location_id` refers to a GCP region.
  4825  func (r *ProjectsLocationsInstancesService) RescheduleMaintenance(name string, reschedulemaintenancerequest *RescheduleMaintenanceRequest) *ProjectsLocationsInstancesRescheduleMaintenanceCall {
  4826  	c := &ProjectsLocationsInstancesRescheduleMaintenanceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4827  	c.name = name
  4828  	c.reschedulemaintenancerequest = reschedulemaintenancerequest
  4829  	return c
  4830  }
  4831  
  4832  // Fields allows partial responses to be retrieved. See
  4833  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4834  // details.
  4835  func (c *ProjectsLocationsInstancesRescheduleMaintenanceCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesRescheduleMaintenanceCall {
  4836  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4837  	return c
  4838  }
  4839  
  4840  // Context sets the context to be used in this call's Do method.
  4841  func (c *ProjectsLocationsInstancesRescheduleMaintenanceCall) Context(ctx context.Context) *ProjectsLocationsInstancesRescheduleMaintenanceCall {
  4842  	c.ctx_ = ctx
  4843  	return c
  4844  }
  4845  
  4846  // Header returns a http.Header that can be modified by the caller to add
  4847  // headers to the request.
  4848  func (c *ProjectsLocationsInstancesRescheduleMaintenanceCall) Header() http.Header {
  4849  	if c.header_ == nil {
  4850  		c.header_ = make(http.Header)
  4851  	}
  4852  	return c.header_
  4853  }
  4854  
  4855  func (c *ProjectsLocationsInstancesRescheduleMaintenanceCall) doRequest(alt string) (*http.Response, error) {
  4856  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4857  	var body io.Reader = nil
  4858  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.reschedulemaintenancerequest)
  4859  	if err != nil {
  4860  		return nil, err
  4861  	}
  4862  	c.urlParams_.Set("alt", alt)
  4863  	c.urlParams_.Set("prettyPrint", "false")
  4864  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:rescheduleMaintenance")
  4865  	urls += "?" + c.urlParams_.Encode()
  4866  	req, err := http.NewRequest("POST", urls, body)
  4867  	if err != nil {
  4868  		return nil, err
  4869  	}
  4870  	req.Header = reqHeaders
  4871  	googleapi.Expand(req.URL, map[string]string{
  4872  		"name": c.name,
  4873  	})
  4874  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4875  }
  4876  
  4877  // Do executes the "redis.projects.locations.instances.rescheduleMaintenance" call.
  4878  // Any non-2xx status code is an error. Response headers are in either
  4879  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4880  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4881  // whether the returned error was because http.StatusNotModified was returned.
  4882  func (c *ProjectsLocationsInstancesRescheduleMaintenanceCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4883  	gensupport.SetOptions(c.urlParams_, opts...)
  4884  	res, err := c.doRequest("json")
  4885  	if res != nil && res.StatusCode == http.StatusNotModified {
  4886  		if res.Body != nil {
  4887  			res.Body.Close()
  4888  		}
  4889  		return nil, gensupport.WrapError(&googleapi.Error{
  4890  			Code:   res.StatusCode,
  4891  			Header: res.Header,
  4892  		})
  4893  	}
  4894  	if err != nil {
  4895  		return nil, err
  4896  	}
  4897  	defer googleapi.CloseBody(res)
  4898  	if err := googleapi.CheckResponse(res); err != nil {
  4899  		return nil, gensupport.WrapError(err)
  4900  	}
  4901  	ret := &Operation{
  4902  		ServerResponse: googleapi.ServerResponse{
  4903  			Header:         res.Header,
  4904  			HTTPStatusCode: res.StatusCode,
  4905  		},
  4906  	}
  4907  	target := &ret
  4908  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4909  		return nil, err
  4910  	}
  4911  	return ret, nil
  4912  }
  4913  
  4914  type ProjectsLocationsInstancesUpgradeCall struct {
  4915  	s                      *Service
  4916  	name                   string
  4917  	upgradeinstancerequest *UpgradeInstanceRequest
  4918  	urlParams_             gensupport.URLParams
  4919  	ctx_                   context.Context
  4920  	header_                http.Header
  4921  }
  4922  
  4923  // Upgrade: Upgrades Redis instance to the newer Redis version specified in the
  4924  // request.
  4925  //
  4926  //   - name: Redis instance resource name using the form:
  4927  //     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
  4928  //     where `location_id` refers to a GCP region.
  4929  func (r *ProjectsLocationsInstancesService) Upgrade(name string, upgradeinstancerequest *UpgradeInstanceRequest) *ProjectsLocationsInstancesUpgradeCall {
  4930  	c := &ProjectsLocationsInstancesUpgradeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4931  	c.name = name
  4932  	c.upgradeinstancerequest = upgradeinstancerequest
  4933  	return c
  4934  }
  4935  
  4936  // Fields allows partial responses to be retrieved. See
  4937  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4938  // details.
  4939  func (c *ProjectsLocationsInstancesUpgradeCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesUpgradeCall {
  4940  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4941  	return c
  4942  }
  4943  
  4944  // Context sets the context to be used in this call's Do method.
  4945  func (c *ProjectsLocationsInstancesUpgradeCall) Context(ctx context.Context) *ProjectsLocationsInstancesUpgradeCall {
  4946  	c.ctx_ = ctx
  4947  	return c
  4948  }
  4949  
  4950  // Header returns a http.Header that can be modified by the caller to add
  4951  // headers to the request.
  4952  func (c *ProjectsLocationsInstancesUpgradeCall) Header() http.Header {
  4953  	if c.header_ == nil {
  4954  		c.header_ = make(http.Header)
  4955  	}
  4956  	return c.header_
  4957  }
  4958  
  4959  func (c *ProjectsLocationsInstancesUpgradeCall) doRequest(alt string) (*http.Response, error) {
  4960  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4961  	var body io.Reader = nil
  4962  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.upgradeinstancerequest)
  4963  	if err != nil {
  4964  		return nil, err
  4965  	}
  4966  	c.urlParams_.Set("alt", alt)
  4967  	c.urlParams_.Set("prettyPrint", "false")
  4968  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:upgrade")
  4969  	urls += "?" + c.urlParams_.Encode()
  4970  	req, err := http.NewRequest("POST", urls, body)
  4971  	if err != nil {
  4972  		return nil, err
  4973  	}
  4974  	req.Header = reqHeaders
  4975  	googleapi.Expand(req.URL, map[string]string{
  4976  		"name": c.name,
  4977  	})
  4978  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4979  }
  4980  
  4981  // Do executes the "redis.projects.locations.instances.upgrade" call.
  4982  // Any non-2xx status code is an error. Response headers are in either
  4983  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4984  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4985  // whether the returned error was because http.StatusNotModified was returned.
  4986  func (c *ProjectsLocationsInstancesUpgradeCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4987  	gensupport.SetOptions(c.urlParams_, opts...)
  4988  	res, err := c.doRequest("json")
  4989  	if res != nil && res.StatusCode == http.StatusNotModified {
  4990  		if res.Body != nil {
  4991  			res.Body.Close()
  4992  		}
  4993  		return nil, gensupport.WrapError(&googleapi.Error{
  4994  			Code:   res.StatusCode,
  4995  			Header: res.Header,
  4996  		})
  4997  	}
  4998  	if err != nil {
  4999  		return nil, err
  5000  	}
  5001  	defer googleapi.CloseBody(res)
  5002  	if err := googleapi.CheckResponse(res); err != nil {
  5003  		return nil, gensupport.WrapError(err)
  5004  	}
  5005  	ret := &Operation{
  5006  		ServerResponse: googleapi.ServerResponse{
  5007  			Header:         res.Header,
  5008  			HTTPStatusCode: res.StatusCode,
  5009  		},
  5010  	}
  5011  	target := &ret
  5012  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5013  		return nil, err
  5014  	}
  5015  	return ret, nil
  5016  }
  5017  
  5018  type ProjectsLocationsOperationsCancelCall struct {
  5019  	s          *Service
  5020  	name       string
  5021  	urlParams_ gensupport.URLParams
  5022  	ctx_       context.Context
  5023  	header_    http.Header
  5024  }
  5025  
  5026  // Cancel: Starts asynchronous cancellation on a long-running operation. The
  5027  // server makes a best effort to cancel the operation, but success is not
  5028  // guaranteed. If the server doesn't support this method, it returns
  5029  // `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or
  5030  // other methods to check whether the cancellation succeeded or whether the
  5031  // operation completed despite cancellation. On successful cancellation, the
  5032  // operation is not deleted; instead, it becomes an operation with an
  5033  // Operation.error value with a google.rpc.Status.code of 1, corresponding to
  5034  // `Code.CANCELLED`.
  5035  //
  5036  // - name: The name of the operation resource to be cancelled.
  5037  func (r *ProjectsLocationsOperationsService) Cancel(name string) *ProjectsLocationsOperationsCancelCall {
  5038  	c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5039  	c.name = name
  5040  	return c
  5041  }
  5042  
  5043  // Fields allows partial responses to be retrieved. See
  5044  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5045  // details.
  5046  func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
  5047  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5048  	return c
  5049  }
  5050  
  5051  // Context sets the context to be used in this call's Do method.
  5052  func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
  5053  	c.ctx_ = ctx
  5054  	return c
  5055  }
  5056  
  5057  // Header returns a http.Header that can be modified by the caller to add
  5058  // headers to the request.
  5059  func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
  5060  	if c.header_ == nil {
  5061  		c.header_ = make(http.Header)
  5062  	}
  5063  	return c.header_
  5064  }
  5065  
  5066  func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
  5067  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5068  	var body io.Reader = nil
  5069  	c.urlParams_.Set("alt", alt)
  5070  	c.urlParams_.Set("prettyPrint", "false")
  5071  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:cancel")
  5072  	urls += "?" + c.urlParams_.Encode()
  5073  	req, err := http.NewRequest("POST", urls, body)
  5074  	if err != nil {
  5075  		return nil, err
  5076  	}
  5077  	req.Header = reqHeaders
  5078  	googleapi.Expand(req.URL, map[string]string{
  5079  		"name": c.name,
  5080  	})
  5081  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5082  }
  5083  
  5084  // Do executes the "redis.projects.locations.operations.cancel" call.
  5085  // Any non-2xx status code is an error. Response headers are in either
  5086  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  5087  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5088  // whether the returned error was because http.StatusNotModified was returned.
  5089  func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  5090  	gensupport.SetOptions(c.urlParams_, opts...)
  5091  	res, err := c.doRequest("json")
  5092  	if res != nil && res.StatusCode == http.StatusNotModified {
  5093  		if res.Body != nil {
  5094  			res.Body.Close()
  5095  		}
  5096  		return nil, gensupport.WrapError(&googleapi.Error{
  5097  			Code:   res.StatusCode,
  5098  			Header: res.Header,
  5099  		})
  5100  	}
  5101  	if err != nil {
  5102  		return nil, err
  5103  	}
  5104  	defer googleapi.CloseBody(res)
  5105  	if err := googleapi.CheckResponse(res); err != nil {
  5106  		return nil, gensupport.WrapError(err)
  5107  	}
  5108  	ret := &Empty{
  5109  		ServerResponse: googleapi.ServerResponse{
  5110  			Header:         res.Header,
  5111  			HTTPStatusCode: res.StatusCode,
  5112  		},
  5113  	}
  5114  	target := &ret
  5115  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5116  		return nil, err
  5117  	}
  5118  	return ret, nil
  5119  }
  5120  
  5121  type ProjectsLocationsOperationsDeleteCall struct {
  5122  	s          *Service
  5123  	name       string
  5124  	urlParams_ gensupport.URLParams
  5125  	ctx_       context.Context
  5126  	header_    http.Header
  5127  }
  5128  
  5129  // Delete: Deletes a long-running operation. This method indicates that the
  5130  // client is no longer interested in the operation result. It does not cancel
  5131  // the operation. If the server doesn't support this method, it returns
  5132  // `google.rpc.Code.UNIMPLEMENTED`.
  5133  //
  5134  // - name: The name of the operation resource to be deleted.
  5135  func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall {
  5136  	c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5137  	c.name = name
  5138  	return c
  5139  }
  5140  
  5141  // Fields allows partial responses to be retrieved. See
  5142  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5143  // details.
  5144  func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall {
  5145  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5146  	return c
  5147  }
  5148  
  5149  // Context sets the context to be used in this call's Do method.
  5150  func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall {
  5151  	c.ctx_ = ctx
  5152  	return c
  5153  }
  5154  
  5155  // Header returns a http.Header that can be modified by the caller to add
  5156  // headers to the request.
  5157  func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header {
  5158  	if c.header_ == nil {
  5159  		c.header_ = make(http.Header)
  5160  	}
  5161  	return c.header_
  5162  }
  5163  
  5164  func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
  5165  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5166  	var body io.Reader = nil
  5167  	c.urlParams_.Set("alt", alt)
  5168  	c.urlParams_.Set("prettyPrint", "false")
  5169  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  5170  	urls += "?" + c.urlParams_.Encode()
  5171  	req, err := http.NewRequest("DELETE", urls, body)
  5172  	if err != nil {
  5173  		return nil, err
  5174  	}
  5175  	req.Header = reqHeaders
  5176  	googleapi.Expand(req.URL, map[string]string{
  5177  		"name": c.name,
  5178  	})
  5179  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5180  }
  5181  
  5182  // Do executes the "redis.projects.locations.operations.delete" call.
  5183  // Any non-2xx status code is an error. Response headers are in either
  5184  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  5185  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5186  // whether the returned error was because http.StatusNotModified was returned.
  5187  func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  5188  	gensupport.SetOptions(c.urlParams_, opts...)
  5189  	res, err := c.doRequest("json")
  5190  	if res != nil && res.StatusCode == http.StatusNotModified {
  5191  		if res.Body != nil {
  5192  			res.Body.Close()
  5193  		}
  5194  		return nil, gensupport.WrapError(&googleapi.Error{
  5195  			Code:   res.StatusCode,
  5196  			Header: res.Header,
  5197  		})
  5198  	}
  5199  	if err != nil {
  5200  		return nil, err
  5201  	}
  5202  	defer googleapi.CloseBody(res)
  5203  	if err := googleapi.CheckResponse(res); err != nil {
  5204  		return nil, gensupport.WrapError(err)
  5205  	}
  5206  	ret := &Empty{
  5207  		ServerResponse: googleapi.ServerResponse{
  5208  			Header:         res.Header,
  5209  			HTTPStatusCode: res.StatusCode,
  5210  		},
  5211  	}
  5212  	target := &ret
  5213  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5214  		return nil, err
  5215  	}
  5216  	return ret, nil
  5217  }
  5218  
  5219  type ProjectsLocationsOperationsGetCall struct {
  5220  	s            *Service
  5221  	name         string
  5222  	urlParams_   gensupport.URLParams
  5223  	ifNoneMatch_ string
  5224  	ctx_         context.Context
  5225  	header_      http.Header
  5226  }
  5227  
  5228  // Get: Gets the latest state of a long-running operation. Clients can use this
  5229  // method to poll the operation result at intervals as recommended by the API
  5230  // service.
  5231  //
  5232  // - name: The name of the operation resource.
  5233  func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
  5234  	c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5235  	c.name = name
  5236  	return c
  5237  }
  5238  
  5239  // Fields allows partial responses to be retrieved. See
  5240  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5241  // details.
  5242  func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
  5243  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5244  	return c
  5245  }
  5246  
  5247  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5248  // object's ETag matches the given value. This is useful for getting updates
  5249  // only after the object has changed since the last request.
  5250  func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
  5251  	c.ifNoneMatch_ = entityTag
  5252  	return c
  5253  }
  5254  
  5255  // Context sets the context to be used in this call's Do method.
  5256  func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
  5257  	c.ctx_ = ctx
  5258  	return c
  5259  }
  5260  
  5261  // Header returns a http.Header that can be modified by the caller to add
  5262  // headers to the request.
  5263  func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
  5264  	if c.header_ == nil {
  5265  		c.header_ = make(http.Header)
  5266  	}
  5267  	return c.header_
  5268  }
  5269  
  5270  func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  5271  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5272  	if c.ifNoneMatch_ != "" {
  5273  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5274  	}
  5275  	var body io.Reader = nil
  5276  	c.urlParams_.Set("alt", alt)
  5277  	c.urlParams_.Set("prettyPrint", "false")
  5278  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  5279  	urls += "?" + c.urlParams_.Encode()
  5280  	req, err := http.NewRequest("GET", urls, body)
  5281  	if err != nil {
  5282  		return nil, err
  5283  	}
  5284  	req.Header = reqHeaders
  5285  	googleapi.Expand(req.URL, map[string]string{
  5286  		"name": c.name,
  5287  	})
  5288  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5289  }
  5290  
  5291  // Do executes the "redis.projects.locations.operations.get" call.
  5292  // Any non-2xx status code is an error. Response headers are in either
  5293  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  5294  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5295  // whether the returned error was because http.StatusNotModified was returned.
  5296  func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5297  	gensupport.SetOptions(c.urlParams_, opts...)
  5298  	res, err := c.doRequest("json")
  5299  	if res != nil && res.StatusCode == http.StatusNotModified {
  5300  		if res.Body != nil {
  5301  			res.Body.Close()
  5302  		}
  5303  		return nil, gensupport.WrapError(&googleapi.Error{
  5304  			Code:   res.StatusCode,
  5305  			Header: res.Header,
  5306  		})
  5307  	}
  5308  	if err != nil {
  5309  		return nil, err
  5310  	}
  5311  	defer googleapi.CloseBody(res)
  5312  	if err := googleapi.CheckResponse(res); err != nil {
  5313  		return nil, gensupport.WrapError(err)
  5314  	}
  5315  	ret := &Operation{
  5316  		ServerResponse: googleapi.ServerResponse{
  5317  			Header:         res.Header,
  5318  			HTTPStatusCode: res.StatusCode,
  5319  		},
  5320  	}
  5321  	target := &ret
  5322  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5323  		return nil, err
  5324  	}
  5325  	return ret, nil
  5326  }
  5327  
  5328  type ProjectsLocationsOperationsListCall struct {
  5329  	s            *Service
  5330  	name         string
  5331  	urlParams_   gensupport.URLParams
  5332  	ifNoneMatch_ string
  5333  	ctx_         context.Context
  5334  	header_      http.Header
  5335  }
  5336  
  5337  // List: Lists operations that match the specified filter in the request. If
  5338  // the server doesn't support this method, it returns `UNIMPLEMENTED`.
  5339  //
  5340  // - name: The name of the operation's parent resource.
  5341  func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
  5342  	c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5343  	c.name = name
  5344  	return c
  5345  }
  5346  
  5347  // Filter sets the optional parameter "filter": The standard list filter.
  5348  func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
  5349  	c.urlParams_.Set("filter", filter)
  5350  	return c
  5351  }
  5352  
  5353  // PageSize sets the optional parameter "pageSize": The standard list page
  5354  // size.
  5355  func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
  5356  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5357  	return c
  5358  }
  5359  
  5360  // PageToken sets the optional parameter "pageToken": The standard list page
  5361  // token.
  5362  func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
  5363  	c.urlParams_.Set("pageToken", pageToken)
  5364  	return c
  5365  }
  5366  
  5367  // Fields allows partial responses to be retrieved. See
  5368  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5369  // details.
  5370  func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
  5371  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5372  	return c
  5373  }
  5374  
  5375  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5376  // object's ETag matches the given value. This is useful for getting updates
  5377  // only after the object has changed since the last request.
  5378  func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
  5379  	c.ifNoneMatch_ = entityTag
  5380  	return c
  5381  }
  5382  
  5383  // Context sets the context to be used in this call's Do method.
  5384  func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
  5385  	c.ctx_ = ctx
  5386  	return c
  5387  }
  5388  
  5389  // Header returns a http.Header that can be modified by the caller to add
  5390  // headers to the request.
  5391  func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
  5392  	if c.header_ == nil {
  5393  		c.header_ = make(http.Header)
  5394  	}
  5395  	return c.header_
  5396  }
  5397  
  5398  func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
  5399  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5400  	if c.ifNoneMatch_ != "" {
  5401  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5402  	}
  5403  	var body io.Reader = nil
  5404  	c.urlParams_.Set("alt", alt)
  5405  	c.urlParams_.Set("prettyPrint", "false")
  5406  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/operations")
  5407  	urls += "?" + c.urlParams_.Encode()
  5408  	req, err := http.NewRequest("GET", urls, body)
  5409  	if err != nil {
  5410  		return nil, err
  5411  	}
  5412  	req.Header = reqHeaders
  5413  	googleapi.Expand(req.URL, map[string]string{
  5414  		"name": c.name,
  5415  	})
  5416  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5417  }
  5418  
  5419  // Do executes the "redis.projects.locations.operations.list" call.
  5420  // Any non-2xx status code is an error. Response headers are in either
  5421  // *ListOperationsResponse.ServerResponse.Header or (if a response was returned
  5422  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5423  // check whether the returned error was because http.StatusNotModified was
  5424  // returned.
  5425  func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
  5426  	gensupport.SetOptions(c.urlParams_, opts...)
  5427  	res, err := c.doRequest("json")
  5428  	if res != nil && res.StatusCode == http.StatusNotModified {
  5429  		if res.Body != nil {
  5430  			res.Body.Close()
  5431  		}
  5432  		return nil, gensupport.WrapError(&googleapi.Error{
  5433  			Code:   res.StatusCode,
  5434  			Header: res.Header,
  5435  		})
  5436  	}
  5437  	if err != nil {
  5438  		return nil, err
  5439  	}
  5440  	defer googleapi.CloseBody(res)
  5441  	if err := googleapi.CheckResponse(res); err != nil {
  5442  		return nil, gensupport.WrapError(err)
  5443  	}
  5444  	ret := &ListOperationsResponse{
  5445  		ServerResponse: googleapi.ServerResponse{
  5446  			Header:         res.Header,
  5447  			HTTPStatusCode: res.StatusCode,
  5448  		},
  5449  	}
  5450  	target := &ret
  5451  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5452  		return nil, err
  5453  	}
  5454  	return ret, nil
  5455  }
  5456  
  5457  // Pages invokes f for each page of results.
  5458  // A non-nil error returned from f will halt the iteration.
  5459  // The provided context supersedes any context provided to the Context method.
  5460  func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
  5461  	c.ctx_ = ctx
  5462  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  5463  	for {
  5464  		x, err := c.Do()
  5465  		if err != nil {
  5466  			return err
  5467  		}
  5468  		if err := f(x); err != nil {
  5469  			return err
  5470  		}
  5471  		if x.NextPageToken == "" {
  5472  			return nil
  5473  		}
  5474  		c.PageToken(x.NextPageToken)
  5475  	}
  5476  }
  5477  

View as plain text