...

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

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

     1  // Copyright 2024 Google LLC.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // Code generated file. DO NOT EDIT.
     6  
     7  // Package spanner provides access to the Cloud Spanner API.
     8  //
     9  // This package is DEPRECATED. Use package cloud.google.com/go/spanner instead.
    10  //
    11  // For product documentation, see: https://cloud.google.com/spanner/
    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/spanner/v1"
    29  //	...
    30  //	ctx := context.Background()
    31  //	spannerService, err := spanner.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  // By default, all available scopes (see "Constants") are used to authenticate.
    40  // To restrict scopes, use [google.golang.org/api/option.WithScopes]:
    41  //
    42  //	spannerService, err := spanner.NewService(ctx, option.WithScopes(spanner.SpannerDataScope))
    43  //
    44  // To use an API key for authentication (note: some APIs do not support API
    45  // keys), use [google.golang.org/api/option.WithAPIKey]:
    46  //
    47  //	spannerService, err := spanner.NewService(ctx, option.WithAPIKey("AIza..."))
    48  //
    49  // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth
    50  // flow, use [google.golang.org/api/option.WithTokenSource]:
    51  //
    52  //	config := &oauth2.Config{...}
    53  //	// ...
    54  //	token, err := config.Exchange(ctx, ...)
    55  //	spannerService, err := spanner.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    56  //
    57  // See [google.golang.org/api/option.ClientOption] for details on options.
    58  package spanner // import "google.golang.org/api/spanner/v1"
    59  
    60  import (
    61  	"bytes"
    62  	"context"
    63  	"encoding/json"
    64  	"errors"
    65  	"fmt"
    66  	"io"
    67  	"net/http"
    68  	"net/url"
    69  	"strconv"
    70  	"strings"
    71  
    72  	googleapi "google.golang.org/api/googleapi"
    73  	internal "google.golang.org/api/internal"
    74  	gensupport "google.golang.org/api/internal/gensupport"
    75  	option "google.golang.org/api/option"
    76  	internaloption "google.golang.org/api/option/internaloption"
    77  	htransport "google.golang.org/api/transport/http"
    78  )
    79  
    80  // Always reference these packages, just in case the auto-generated code
    81  // below doesn't.
    82  var _ = bytes.NewBuffer
    83  var _ = strconv.Itoa
    84  var _ = fmt.Sprintf
    85  var _ = json.NewDecoder
    86  var _ = io.Copy
    87  var _ = url.Parse
    88  var _ = gensupport.MarshalJSON
    89  var _ = googleapi.Version
    90  var _ = errors.New
    91  var _ = strings.Replace
    92  var _ = context.Canceled
    93  var _ = internaloption.WithDefaultEndpoint
    94  var _ = internal.Version
    95  
    96  const apiId = "spanner:v1"
    97  const apiName = "spanner"
    98  const apiVersion = "v1"
    99  const basePath = "https://spanner.googleapis.com/"
   100  const basePathTemplate = "https://spanner.UNIVERSE_DOMAIN/"
   101  const mtlsBasePath = "https://spanner.mtls.googleapis.com/"
   102  
   103  // OAuth2 scopes used by this API.
   104  const (
   105  	// See, edit, configure, and delete your Google Cloud data and see the email
   106  	// address for your Google Account.
   107  	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
   108  
   109  	// Administer your Spanner databases
   110  	SpannerAdminScope = "https://www.googleapis.com/auth/spanner.admin"
   111  
   112  	// View and manage the contents of your Spanner databases
   113  	SpannerDataScope = "https://www.googleapis.com/auth/spanner.data"
   114  )
   115  
   116  // NewService creates a new Service.
   117  func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
   118  	scopesOption := internaloption.WithDefaultScopes(
   119  		"https://www.googleapis.com/auth/cloud-platform",
   120  		"https://www.googleapis.com/auth/spanner.admin",
   121  		"https://www.googleapis.com/auth/spanner.data",
   122  	)
   123  	// NOTE: prepend, so we don't override user-specified scopes.
   124  	opts = append([]option.ClientOption{scopesOption}, opts...)
   125  	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
   126  	opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
   127  	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
   128  	opts = append(opts, internaloption.EnableNewAuthLibrary())
   129  	client, endpoint, err := htransport.NewClient(ctx, opts...)
   130  	if err != nil {
   131  		return nil, err
   132  	}
   133  	s, err := New(client)
   134  	if err != nil {
   135  		return nil, err
   136  	}
   137  	if endpoint != "" {
   138  		s.BasePath = endpoint
   139  	}
   140  	return s, nil
   141  }
   142  
   143  // New creates a new Service. It uses the provided http.Client for requests.
   144  //
   145  // Deprecated: please use NewService instead.
   146  // To provide a custom HTTP client, use option.WithHTTPClient.
   147  // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
   148  func New(client *http.Client) (*Service, error) {
   149  	if client == nil {
   150  		return nil, errors.New("client is nil")
   151  	}
   152  	s := &Service{client: client, BasePath: basePath}
   153  	s.Projects = NewProjectsService(s)
   154  	s.Scans = NewScansService(s)
   155  	return s, nil
   156  }
   157  
   158  type Service struct {
   159  	client    *http.Client
   160  	BasePath  string // API endpoint base URL
   161  	UserAgent string // optional additional User-Agent fragment
   162  
   163  	Projects *ProjectsService
   164  
   165  	Scans *ScansService
   166  }
   167  
   168  func (s *Service) userAgent() string {
   169  	if s.UserAgent == "" {
   170  		return googleapi.UserAgent
   171  	}
   172  	return googleapi.UserAgent + " " + s.UserAgent
   173  }
   174  
   175  func NewProjectsService(s *Service) *ProjectsService {
   176  	rs := &ProjectsService{s: s}
   177  	rs.InstanceConfigOperations = NewProjectsInstanceConfigOperationsService(s)
   178  	rs.InstanceConfigs = NewProjectsInstanceConfigsService(s)
   179  	rs.Instances = NewProjectsInstancesService(s)
   180  	return rs
   181  }
   182  
   183  type ProjectsService struct {
   184  	s *Service
   185  
   186  	InstanceConfigOperations *ProjectsInstanceConfigOperationsService
   187  
   188  	InstanceConfigs *ProjectsInstanceConfigsService
   189  
   190  	Instances *ProjectsInstancesService
   191  }
   192  
   193  func NewProjectsInstanceConfigOperationsService(s *Service) *ProjectsInstanceConfigOperationsService {
   194  	rs := &ProjectsInstanceConfigOperationsService{s: s}
   195  	return rs
   196  }
   197  
   198  type ProjectsInstanceConfigOperationsService struct {
   199  	s *Service
   200  }
   201  
   202  func NewProjectsInstanceConfigsService(s *Service) *ProjectsInstanceConfigsService {
   203  	rs := &ProjectsInstanceConfigsService{s: s}
   204  	rs.Operations = NewProjectsInstanceConfigsOperationsService(s)
   205  	rs.SsdCaches = NewProjectsInstanceConfigsSsdCachesService(s)
   206  	return rs
   207  }
   208  
   209  type ProjectsInstanceConfigsService struct {
   210  	s *Service
   211  
   212  	Operations *ProjectsInstanceConfigsOperationsService
   213  
   214  	SsdCaches *ProjectsInstanceConfigsSsdCachesService
   215  }
   216  
   217  func NewProjectsInstanceConfigsOperationsService(s *Service) *ProjectsInstanceConfigsOperationsService {
   218  	rs := &ProjectsInstanceConfigsOperationsService{s: s}
   219  	return rs
   220  }
   221  
   222  type ProjectsInstanceConfigsOperationsService struct {
   223  	s *Service
   224  }
   225  
   226  func NewProjectsInstanceConfigsSsdCachesService(s *Service) *ProjectsInstanceConfigsSsdCachesService {
   227  	rs := &ProjectsInstanceConfigsSsdCachesService{s: s}
   228  	rs.Operations = NewProjectsInstanceConfigsSsdCachesOperationsService(s)
   229  	return rs
   230  }
   231  
   232  type ProjectsInstanceConfigsSsdCachesService struct {
   233  	s *Service
   234  
   235  	Operations *ProjectsInstanceConfigsSsdCachesOperationsService
   236  }
   237  
   238  func NewProjectsInstanceConfigsSsdCachesOperationsService(s *Service) *ProjectsInstanceConfigsSsdCachesOperationsService {
   239  	rs := &ProjectsInstanceConfigsSsdCachesOperationsService{s: s}
   240  	return rs
   241  }
   242  
   243  type ProjectsInstanceConfigsSsdCachesOperationsService struct {
   244  	s *Service
   245  }
   246  
   247  func NewProjectsInstancesService(s *Service) *ProjectsInstancesService {
   248  	rs := &ProjectsInstancesService{s: s}
   249  	rs.BackupOperations = NewProjectsInstancesBackupOperationsService(s)
   250  	rs.Backups = NewProjectsInstancesBackupsService(s)
   251  	rs.DatabaseOperations = NewProjectsInstancesDatabaseOperationsService(s)
   252  	rs.Databases = NewProjectsInstancesDatabasesService(s)
   253  	rs.InstancePartitionOperations = NewProjectsInstancesInstancePartitionOperationsService(s)
   254  	rs.InstancePartitions = NewProjectsInstancesInstancePartitionsService(s)
   255  	rs.Operations = NewProjectsInstancesOperationsService(s)
   256  	return rs
   257  }
   258  
   259  type ProjectsInstancesService struct {
   260  	s *Service
   261  
   262  	BackupOperations *ProjectsInstancesBackupOperationsService
   263  
   264  	Backups *ProjectsInstancesBackupsService
   265  
   266  	DatabaseOperations *ProjectsInstancesDatabaseOperationsService
   267  
   268  	Databases *ProjectsInstancesDatabasesService
   269  
   270  	InstancePartitionOperations *ProjectsInstancesInstancePartitionOperationsService
   271  
   272  	InstancePartitions *ProjectsInstancesInstancePartitionsService
   273  
   274  	Operations *ProjectsInstancesOperationsService
   275  }
   276  
   277  func NewProjectsInstancesBackupOperationsService(s *Service) *ProjectsInstancesBackupOperationsService {
   278  	rs := &ProjectsInstancesBackupOperationsService{s: s}
   279  	return rs
   280  }
   281  
   282  type ProjectsInstancesBackupOperationsService struct {
   283  	s *Service
   284  }
   285  
   286  func NewProjectsInstancesBackupsService(s *Service) *ProjectsInstancesBackupsService {
   287  	rs := &ProjectsInstancesBackupsService{s: s}
   288  	rs.Operations = NewProjectsInstancesBackupsOperationsService(s)
   289  	return rs
   290  }
   291  
   292  type ProjectsInstancesBackupsService struct {
   293  	s *Service
   294  
   295  	Operations *ProjectsInstancesBackupsOperationsService
   296  }
   297  
   298  func NewProjectsInstancesBackupsOperationsService(s *Service) *ProjectsInstancesBackupsOperationsService {
   299  	rs := &ProjectsInstancesBackupsOperationsService{s: s}
   300  	return rs
   301  }
   302  
   303  type ProjectsInstancesBackupsOperationsService struct {
   304  	s *Service
   305  }
   306  
   307  func NewProjectsInstancesDatabaseOperationsService(s *Service) *ProjectsInstancesDatabaseOperationsService {
   308  	rs := &ProjectsInstancesDatabaseOperationsService{s: s}
   309  	return rs
   310  }
   311  
   312  type ProjectsInstancesDatabaseOperationsService struct {
   313  	s *Service
   314  }
   315  
   316  func NewProjectsInstancesDatabasesService(s *Service) *ProjectsInstancesDatabasesService {
   317  	rs := &ProjectsInstancesDatabasesService{s: s}
   318  	rs.DatabaseRoles = NewProjectsInstancesDatabasesDatabaseRolesService(s)
   319  	rs.Operations = NewProjectsInstancesDatabasesOperationsService(s)
   320  	rs.Sessions = NewProjectsInstancesDatabasesSessionsService(s)
   321  	return rs
   322  }
   323  
   324  type ProjectsInstancesDatabasesService struct {
   325  	s *Service
   326  
   327  	DatabaseRoles *ProjectsInstancesDatabasesDatabaseRolesService
   328  
   329  	Operations *ProjectsInstancesDatabasesOperationsService
   330  
   331  	Sessions *ProjectsInstancesDatabasesSessionsService
   332  }
   333  
   334  func NewProjectsInstancesDatabasesDatabaseRolesService(s *Service) *ProjectsInstancesDatabasesDatabaseRolesService {
   335  	rs := &ProjectsInstancesDatabasesDatabaseRolesService{s: s}
   336  	return rs
   337  }
   338  
   339  type ProjectsInstancesDatabasesDatabaseRolesService struct {
   340  	s *Service
   341  }
   342  
   343  func NewProjectsInstancesDatabasesOperationsService(s *Service) *ProjectsInstancesDatabasesOperationsService {
   344  	rs := &ProjectsInstancesDatabasesOperationsService{s: s}
   345  	return rs
   346  }
   347  
   348  type ProjectsInstancesDatabasesOperationsService struct {
   349  	s *Service
   350  }
   351  
   352  func NewProjectsInstancesDatabasesSessionsService(s *Service) *ProjectsInstancesDatabasesSessionsService {
   353  	rs := &ProjectsInstancesDatabasesSessionsService{s: s}
   354  	return rs
   355  }
   356  
   357  type ProjectsInstancesDatabasesSessionsService struct {
   358  	s *Service
   359  }
   360  
   361  func NewProjectsInstancesInstancePartitionOperationsService(s *Service) *ProjectsInstancesInstancePartitionOperationsService {
   362  	rs := &ProjectsInstancesInstancePartitionOperationsService{s: s}
   363  	return rs
   364  }
   365  
   366  type ProjectsInstancesInstancePartitionOperationsService struct {
   367  	s *Service
   368  }
   369  
   370  func NewProjectsInstancesInstancePartitionsService(s *Service) *ProjectsInstancesInstancePartitionsService {
   371  	rs := &ProjectsInstancesInstancePartitionsService{s: s}
   372  	rs.Operations = NewProjectsInstancesInstancePartitionsOperationsService(s)
   373  	return rs
   374  }
   375  
   376  type ProjectsInstancesInstancePartitionsService struct {
   377  	s *Service
   378  
   379  	Operations *ProjectsInstancesInstancePartitionsOperationsService
   380  }
   381  
   382  func NewProjectsInstancesInstancePartitionsOperationsService(s *Service) *ProjectsInstancesInstancePartitionsOperationsService {
   383  	rs := &ProjectsInstancesInstancePartitionsOperationsService{s: s}
   384  	return rs
   385  }
   386  
   387  type ProjectsInstancesInstancePartitionsOperationsService struct {
   388  	s *Service
   389  }
   390  
   391  func NewProjectsInstancesOperationsService(s *Service) *ProjectsInstancesOperationsService {
   392  	rs := &ProjectsInstancesOperationsService{s: s}
   393  	return rs
   394  }
   395  
   396  type ProjectsInstancesOperationsService struct {
   397  	s *Service
   398  }
   399  
   400  func NewScansService(s *Service) *ScansService {
   401  	rs := &ScansService{s: s}
   402  	return rs
   403  }
   404  
   405  type ScansService struct {
   406  	s *Service
   407  }
   408  
   409  // AutoscalingConfig: Autoscaling config for an instance.
   410  type AutoscalingConfig struct {
   411  	// AutoscalingLimits: Required. Autoscaling limits for an instance.
   412  	AutoscalingLimits *AutoscalingLimits `json:"autoscalingLimits,omitempty"`
   413  	// AutoscalingTargets: Required. The autoscaling targets for an instance.
   414  	AutoscalingTargets *AutoscalingTargets `json:"autoscalingTargets,omitempty"`
   415  	// ForceSendFields is a list of field names (e.g. "AutoscalingLimits") to
   416  	// unconditionally include in API requests. By default, fields with empty or
   417  	// default values are omitted from API requests. See
   418  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   419  	// details.
   420  	ForceSendFields []string `json:"-"`
   421  	// NullFields is a list of field names (e.g. "AutoscalingLimits") to include in
   422  	// API requests with the JSON null value. By default, fields with empty values
   423  	// are omitted from API requests. See
   424  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   425  	NullFields []string `json:"-"`
   426  }
   427  
   428  func (s *AutoscalingConfig) MarshalJSON() ([]byte, error) {
   429  	type NoMethod AutoscalingConfig
   430  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   431  }
   432  
   433  // AutoscalingLimits: The autoscaling limits for the instance. Users can define
   434  // the minimum and maximum compute capacity allocated to the instance, and the
   435  // autoscaler will only scale within that range. Users can either use nodes or
   436  // processing units to specify the limits, but should use the same unit to set
   437  // both the min_limit and max_limit.
   438  type AutoscalingLimits struct {
   439  	// MaxNodes: Maximum number of nodes allocated to the instance. If set, this
   440  	// number should be greater than or equal to min_nodes.
   441  	MaxNodes int64 `json:"maxNodes,omitempty"`
   442  	// MaxProcessingUnits: Maximum number of processing units allocated to the
   443  	// instance. If set, this number should be multiples of 1000 and be greater
   444  	// than or equal to min_processing_units.
   445  	MaxProcessingUnits int64 `json:"maxProcessingUnits,omitempty"`
   446  	// MinNodes: Minimum number of nodes allocated to the instance. If set, this
   447  	// number should be greater than or equal to 1.
   448  	MinNodes int64 `json:"minNodes,omitempty"`
   449  	// MinProcessingUnits: Minimum number of processing units allocated to the
   450  	// instance. If set, this number should be multiples of 1000.
   451  	MinProcessingUnits int64 `json:"minProcessingUnits,omitempty"`
   452  	// ForceSendFields is a list of field names (e.g. "MaxNodes") to
   453  	// unconditionally include in API requests. By default, fields with empty or
   454  	// default values are omitted from API requests. See
   455  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   456  	// details.
   457  	ForceSendFields []string `json:"-"`
   458  	// NullFields is a list of field names (e.g. "MaxNodes") to include in API
   459  	// requests with the JSON null value. By default, fields with empty values are
   460  	// omitted from API requests. See
   461  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   462  	NullFields []string `json:"-"`
   463  }
   464  
   465  func (s *AutoscalingLimits) MarshalJSON() ([]byte, error) {
   466  	type NoMethod AutoscalingLimits
   467  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   468  }
   469  
   470  // AutoscalingTargets: The autoscaling targets for an instance.
   471  type AutoscalingTargets struct {
   472  	// HighPriorityCpuUtilizationPercent: Required. The target high priority cpu
   473  	// utilization percentage that the autoscaler should be trying to achieve for
   474  	// the instance. This number is on a scale from 0 (no utilization) to 100 (full
   475  	// utilization). The valid range is [10, 90] inclusive.
   476  	HighPriorityCpuUtilizationPercent int64 `json:"highPriorityCpuUtilizationPercent,omitempty"`
   477  	// StorageUtilizationPercent: Required. The target storage utilization
   478  	// percentage that the autoscaler should be trying to achieve for the instance.
   479  	// This number is on a scale from 0 (no utilization) to 100 (full utilization).
   480  	// The valid range is [10, 99] inclusive.
   481  	StorageUtilizationPercent int64 `json:"storageUtilizationPercent,omitempty"`
   482  	// ForceSendFields is a list of field names (e.g.
   483  	// "HighPriorityCpuUtilizationPercent") to unconditionally include in API
   484  	// requests. By default, fields with empty or default values are omitted from
   485  	// API requests. See
   486  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   487  	// details.
   488  	ForceSendFields []string `json:"-"`
   489  	// NullFields is a list of field names (e.g.
   490  	// "HighPriorityCpuUtilizationPercent") to include in API requests with the
   491  	// JSON null value. By default, fields with empty values are omitted from API
   492  	// requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for
   493  	// more details.
   494  	NullFields []string `json:"-"`
   495  }
   496  
   497  func (s *AutoscalingTargets) MarshalJSON() ([]byte, error) {
   498  	type NoMethod AutoscalingTargets
   499  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   500  }
   501  
   502  // Backup: A backup of a Cloud Spanner database.
   503  type Backup struct {
   504  	// CreateTime: Output only. The time the CreateBackup request is received. If
   505  	// the request does not specify `version_time`, the `version_time` of the
   506  	// backup will be equivalent to the `create_time`.
   507  	CreateTime string `json:"createTime,omitempty"`
   508  	// Database: Required for the CreateBackup operation. Name of the database from
   509  	// which this backup was created. This needs to be in the same instance as the
   510  	// backup. Values are of the form `projects//instances//databases/`.
   511  	Database string `json:"database,omitempty"`
   512  	// DatabaseDialect: Output only. The database dialect information for the
   513  	// backup.
   514  	//
   515  	// Possible values:
   516  	//   "DATABASE_DIALECT_UNSPECIFIED" - Default value. This value will create a
   517  	// database with the GOOGLE_STANDARD_SQL dialect.
   518  	//   "GOOGLE_STANDARD_SQL" - GoogleSQL supported SQL.
   519  	//   "POSTGRESQL" - PostgreSQL supported SQL.
   520  	DatabaseDialect string `json:"databaseDialect,omitempty"`
   521  	// EncryptionInfo: Output only. The encryption information for the backup.
   522  	EncryptionInfo *EncryptionInfo `json:"encryptionInfo,omitempty"`
   523  	// EncryptionInformation: Output only. The encryption information for the
   524  	// backup, whether it is protected by one or more KMS keys. The information
   525  	// includes all Cloud KMS key versions used to encrypt the backup. The
   526  	// `encryption_status' field inside of each `EncryptionInfo` is not populated.
   527  	// At least one of the key versions must be available for the backup to be
   528  	// restored. If a key version is revoked in the middle of a restore, the
   529  	// restore behavior is undefined.
   530  	EncryptionInformation []*EncryptionInfo `json:"encryptionInformation,omitempty"`
   531  	// ExpireTime: Required for the CreateBackup operation. The expiration time of
   532  	// the backup, with microseconds granularity that must be at least 6 hours and
   533  	// at most 366 days from the time the CreateBackup request is processed. Once
   534  	// the `expire_time` has passed, the backup is eligible to be automatically
   535  	// deleted by Cloud Spanner to free the resources used by the backup.
   536  	ExpireTime string `json:"expireTime,omitempty"`
   537  	// MaxExpireTime: Output only. The max allowed expiration time of the backup,
   538  	// with microseconds granularity. A backup's expiration time can be configured
   539  	// in multiple APIs: CreateBackup, UpdateBackup, CopyBackup. When updating or
   540  	// copying an existing backup, the expiration time specified must be less than
   541  	// `Backup.max_expire_time`.
   542  	MaxExpireTime string `json:"maxExpireTime,omitempty"`
   543  	// Name: Output only for the CreateBackup operation. Required for the
   544  	// UpdateBackup operation. A globally unique identifier for the backup which
   545  	// cannot be changed. Values are of the form
   546  	// `projects//instances//backups/a-z*[a-z0-9]` The final segment of the name
   547  	// must be between 2 and 60 characters in length. The backup is stored in the
   548  	// location(s) specified in the instance configuration of the instance
   549  	// containing the backup, identified by the prefix of the backup name of the
   550  	// form `projects//instances/`.
   551  	Name string `json:"name,omitempty"`
   552  	// ReferencingBackups: Output only. The names of the destination backups being
   553  	// created by copying this source backup. The backup names are of the form
   554  	// `projects//instances//backups/`. Referencing backups may exist in different
   555  	// instances. The existence of any referencing backup prevents the backup from
   556  	// being deleted. When the copy operation is done (either successfully
   557  	// completed or cancelled or the destination backup is deleted), the reference
   558  	// to the backup is removed.
   559  	ReferencingBackups []string `json:"referencingBackups,omitempty"`
   560  	// ReferencingDatabases: Output only. The names of the restored databases that
   561  	// reference the backup. The database names are of the form
   562  	// `projects//instances//databases/`. Referencing databases may exist in
   563  	// different instances. The existence of any referencing database prevents the
   564  	// backup from being deleted. When a restored database from the backup enters
   565  	// the `READY` state, the reference to the backup is removed.
   566  	ReferencingDatabases []string `json:"referencingDatabases,omitempty"`
   567  	// SizeBytes: Output only. Size of the backup in bytes.
   568  	SizeBytes int64 `json:"sizeBytes,omitempty,string"`
   569  	// State: Output only. The current state of the backup.
   570  	//
   571  	// Possible values:
   572  	//   "STATE_UNSPECIFIED" - Not specified.
   573  	//   "CREATING" - The pending backup is still being created. Operations on the
   574  	// backup may fail with `FAILED_PRECONDITION` in this state.
   575  	//   "READY" - The backup is complete and ready for use.
   576  	State string `json:"state,omitempty"`
   577  	// VersionTime: The backup will contain an externally consistent copy of the
   578  	// database at the timestamp specified by `version_time`. If `version_time` is
   579  	// not specified, the system will set `version_time` to the `create_time` of
   580  	// the backup.
   581  	VersionTime string `json:"versionTime,omitempty"`
   582  
   583  	// ServerResponse contains the HTTP response code and headers from the server.
   584  	googleapi.ServerResponse `json:"-"`
   585  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
   586  	// unconditionally include in API requests. By default, fields with empty or
   587  	// default values are omitted from API requests. See
   588  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   589  	// details.
   590  	ForceSendFields []string `json:"-"`
   591  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
   592  	// requests with the JSON null value. By default, fields with empty values are
   593  	// omitted from API requests. See
   594  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   595  	NullFields []string `json:"-"`
   596  }
   597  
   598  func (s *Backup) MarshalJSON() ([]byte, error) {
   599  	type NoMethod Backup
   600  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   601  }
   602  
   603  // BackupInfo: Information about a backup.
   604  type BackupInfo struct {
   605  	// Backup: Name of the backup.
   606  	Backup string `json:"backup,omitempty"`
   607  	// CreateTime: The time the CreateBackup request was received.
   608  	CreateTime string `json:"createTime,omitempty"`
   609  	// SourceDatabase: Name of the database the backup was created from.
   610  	SourceDatabase string `json:"sourceDatabase,omitempty"`
   611  	// VersionTime: The backup contains an externally consistent copy of
   612  	// `source_database` at the timestamp specified by `version_time`. If the
   613  	// CreateBackup request did not specify `version_time`, the `version_time` of
   614  	// the backup is equivalent to the `create_time`.
   615  	VersionTime string `json:"versionTime,omitempty"`
   616  	// ForceSendFields is a list of field names (e.g. "Backup") to unconditionally
   617  	// include in API requests. By default, fields with empty or default values are
   618  	// omitted from API requests. See
   619  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   620  	// details.
   621  	ForceSendFields []string `json:"-"`
   622  	// NullFields is a list of field names (e.g. "Backup") to include in API
   623  	// requests with the JSON null value. By default, fields with empty values are
   624  	// omitted from API requests. See
   625  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   626  	NullFields []string `json:"-"`
   627  }
   628  
   629  func (s *BackupInfo) MarshalJSON() ([]byte, error) {
   630  	type NoMethod BackupInfo
   631  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   632  }
   633  
   634  // BatchCreateSessionsRequest: The request for BatchCreateSessions.
   635  type BatchCreateSessionsRequest struct {
   636  	// SessionCount: Required. The number of sessions to be created in this batch
   637  	// call. The API may return fewer than the requested number of sessions. If a
   638  	// specific number of sessions are desired, the client can make additional
   639  	// calls to BatchCreateSessions (adjusting session_count as necessary).
   640  	SessionCount int64 `json:"sessionCount,omitempty"`
   641  	// SessionTemplate: Parameters to be applied to each created session.
   642  	SessionTemplate *Session `json:"sessionTemplate,omitempty"`
   643  	// ForceSendFields is a list of field names (e.g. "SessionCount") to
   644  	// unconditionally include in API requests. By default, fields with empty or
   645  	// default values are omitted from API requests. See
   646  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   647  	// details.
   648  	ForceSendFields []string `json:"-"`
   649  	// NullFields is a list of field names (e.g. "SessionCount") to include in API
   650  	// requests with the JSON null value. By default, fields with empty values are
   651  	// omitted from API requests. See
   652  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   653  	NullFields []string `json:"-"`
   654  }
   655  
   656  func (s *BatchCreateSessionsRequest) MarshalJSON() ([]byte, error) {
   657  	type NoMethod BatchCreateSessionsRequest
   658  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   659  }
   660  
   661  // BatchCreateSessionsResponse: The response for BatchCreateSessions.
   662  type BatchCreateSessionsResponse struct {
   663  	// Session: The freshly created sessions.
   664  	Session []*Session `json:"session,omitempty"`
   665  
   666  	// ServerResponse contains the HTTP response code and headers from the server.
   667  	googleapi.ServerResponse `json:"-"`
   668  	// ForceSendFields is a list of field names (e.g. "Session") to unconditionally
   669  	// include in API requests. By default, fields with empty or default values are
   670  	// omitted from API requests. See
   671  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   672  	// details.
   673  	ForceSendFields []string `json:"-"`
   674  	// NullFields is a list of field names (e.g. "Session") to include in API
   675  	// requests with the JSON null value. By default, fields with empty values are
   676  	// omitted from API requests. See
   677  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   678  	NullFields []string `json:"-"`
   679  }
   680  
   681  func (s *BatchCreateSessionsResponse) MarshalJSON() ([]byte, error) {
   682  	type NoMethod BatchCreateSessionsResponse
   683  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   684  }
   685  
   686  // BatchWriteRequest: The request for BatchWrite.
   687  type BatchWriteRequest struct {
   688  	// ExcludeTxnFromChangeStreams: Optional. When
   689  	// `exclude_txn_from_change_streams` is set to `true`: * Modifications from all
   690  	// transactions in this batch write operation will not be recorded in change
   691  	// streams with DDL option `allow_txn_exclusion=true` that are tracking columns
   692  	// modified by these transactions. * Modifications from all transactions in
   693  	// this batch write operation will be recorded in change streams with DDL
   694  	// option `allow_txn_exclusion=false or not set` that are tracking columns
   695  	// modified by these transactions. When `exclude_txn_from_change_streams` is
   696  	// set to `false` or not set, Modifications from all transactions in this batch
   697  	// write operation will be recorded in all change streams that are tracking
   698  	// columns modified by these transactions.
   699  	ExcludeTxnFromChangeStreams bool `json:"excludeTxnFromChangeStreams,omitempty"`
   700  	// MutationGroups: Required. The groups of mutations to be applied.
   701  	MutationGroups []*MutationGroup `json:"mutationGroups,omitempty"`
   702  	// RequestOptions: Common options for this request.
   703  	RequestOptions *RequestOptions `json:"requestOptions,omitempty"`
   704  	// ForceSendFields is a list of field names (e.g.
   705  	// "ExcludeTxnFromChangeStreams") to unconditionally include in API requests.
   706  	// By default, fields with empty or default values are omitted from API
   707  	// requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields
   708  	// for more details.
   709  	ForceSendFields []string `json:"-"`
   710  	// NullFields is a list of field names (e.g. "ExcludeTxnFromChangeStreams") to
   711  	// include in API requests with the JSON null value. By default, fields with
   712  	// empty values are omitted from API requests. See
   713  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   714  	NullFields []string `json:"-"`
   715  }
   716  
   717  func (s *BatchWriteRequest) MarshalJSON() ([]byte, error) {
   718  	type NoMethod BatchWriteRequest
   719  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   720  }
   721  
   722  // BatchWriteResponse: The result of applying a batch of mutations.
   723  type BatchWriteResponse struct {
   724  	// CommitTimestamp: The commit timestamp of the transaction that applied this
   725  	// batch. Present if `status` is `OK`, absent otherwise.
   726  	CommitTimestamp string `json:"commitTimestamp,omitempty"`
   727  	// Indexes: The mutation groups applied in this batch. The values index into
   728  	// the `mutation_groups` field in the corresponding `BatchWriteRequest`.
   729  	Indexes []int64 `json:"indexes,omitempty"`
   730  	// Status: An `OK` status indicates success. Any other status indicates a
   731  	// failure.
   732  	Status *Status `json:"status,omitempty"`
   733  
   734  	// ServerResponse contains the HTTP response code and headers from the server.
   735  	googleapi.ServerResponse `json:"-"`
   736  	// ForceSendFields is a list of field names (e.g. "CommitTimestamp") to
   737  	// unconditionally include in API requests. By default, fields with empty or
   738  	// default values are omitted from API requests. See
   739  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   740  	// details.
   741  	ForceSendFields []string `json:"-"`
   742  	// NullFields is a list of field names (e.g. "CommitTimestamp") to include in
   743  	// API requests with the JSON null value. By default, fields with empty values
   744  	// are omitted from API requests. See
   745  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   746  	NullFields []string `json:"-"`
   747  }
   748  
   749  func (s *BatchWriteResponse) MarshalJSON() ([]byte, error) {
   750  	type NoMethod BatchWriteResponse
   751  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   752  }
   753  
   754  // BeginTransactionRequest: The request for BeginTransaction.
   755  type BeginTransactionRequest struct {
   756  	// Options: Required. Options for the new transaction.
   757  	Options *TransactionOptions `json:"options,omitempty"`
   758  	// RequestOptions: Common options for this request. Priority is ignored for
   759  	// this request. Setting the priority in this request_options struct will not
   760  	// do anything. To set the priority for a transaction, set it on the reads and
   761  	// writes that are part of this transaction instead.
   762  	RequestOptions *RequestOptions `json:"requestOptions,omitempty"`
   763  	// ForceSendFields is a list of field names (e.g. "Options") to unconditionally
   764  	// include in API requests. By default, fields with empty or default values are
   765  	// omitted from API requests. See
   766  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   767  	// details.
   768  	ForceSendFields []string `json:"-"`
   769  	// NullFields is a list of field names (e.g. "Options") to include in API
   770  	// requests with the JSON null value. By default, fields with empty values are
   771  	// omitted from API requests. See
   772  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   773  	NullFields []string `json:"-"`
   774  }
   775  
   776  func (s *BeginTransactionRequest) MarshalJSON() ([]byte, error) {
   777  	type NoMethod BeginTransactionRequest
   778  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   779  }
   780  
   781  // Binding: Associates `members`, or principals, with a `role`.
   782  type Binding struct {
   783  	// Condition: The condition that is associated with this binding. If the
   784  	// condition evaluates to `true`, then this binding applies to the current
   785  	// request. If the condition evaluates to `false`, then this binding does not
   786  	// apply to the current request. However, a different role binding might grant
   787  	// the same role to one or more of the principals in this binding. To learn
   788  	// which resources support conditions in their IAM policies, see the IAM
   789  	// documentation
   790  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
   791  	Condition *Expr `json:"condition,omitempty"`
   792  	// Members: Specifies the principals requesting access for a Google Cloud
   793  	// resource. `members` can have the following values: * `allUsers`: A special
   794  	// identifier that represents anyone who is on the internet; with or without a
   795  	// Google account. * `allAuthenticatedUsers`: A special identifier that
   796  	// represents anyone who is authenticated with a Google account or a service
   797  	// account. Does not include identities that come from external identity
   798  	// providers (IdPs) through identity federation. * `user:{emailid}`: An email
   799  	// address that represents a specific Google account. For example,
   800  	// `alice@example.com` . * `serviceAccount:{emailid}`: An email address that
   801  	// represents a Google service account. For example,
   802  	// `my-other-app@appspot.gserviceaccount.com`. *
   803  	// `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An
   804  	// identifier for a Kubernetes service account
   805  	// (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts).
   806  	// For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. *
   807  	// `group:{emailid}`: An email address that represents a Google group. For
   808  	// example, `admins@example.com`. * `domain:{domain}`: The G Suite domain
   809  	// (primary) that represents all the users of that domain. For example,
   810  	// `google.com` or `example.com`. *
   811  	// `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/sub
   812  	// ject/{subject_attribute_value}`: A single identity in a workforce identity
   813  	// pool. *
   814  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   815  	// group/{group_id}`: All workforce identities in a group. *
   816  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   817  	// attribute.{attribute_name}/{attribute_value}`: All workforce identities with
   818  	// a specific attribute value. *
   819  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   820  	// *`: All identities in a workforce identity pool. *
   821  	// `principal://iam.googleapis.com/projects/{project_number}/locations/global/wo
   822  	// rkloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single
   823  	// identity in a workload identity pool. *
   824  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   825  	// /workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool
   826  	// group. *
   827  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   828  	// /workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}
   829  	// `: All identities in a workload identity pool with a certain attribute. *
   830  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   831  	// /workloadIdentityPools/{pool_id}/*`: All identities in a workload identity
   832  	// pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus
   833  	// unique identifier) representing a user that has been recently deleted. For
   834  	// example, `alice@example.com?uid=123456789012345678901`. If the user is
   835  	// recovered, this value reverts to `user:{emailid}` and the recovered user
   836  	// retains the role in the binding. *
   837  	// `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
   838  	// unique identifier) representing a service account that has been recently
   839  	// deleted. For example,
   840  	// `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the
   841  	// service account is undeleted, this value reverts to
   842  	// `serviceAccount:{emailid}` and the undeleted service account retains the
   843  	// role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email
   844  	// address (plus unique identifier) representing a Google group that has been
   845  	// recently deleted. For example,
   846  	// `admins@example.com?uid=123456789012345678901`. If the group is recovered,
   847  	// this value reverts to `group:{emailid}` and the recovered group retains the
   848  	// role in the binding. *
   849  	// `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool
   850  	// _id}/subject/{subject_attribute_value}`: Deleted single identity in a
   851  	// workforce identity pool. For example,
   852  	// `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-po
   853  	// ol-id/subject/my-subject-attribute-value`.
   854  	Members []string `json:"members,omitempty"`
   855  	// Role: Role that is assigned to the list of `members`, or principals. For
   856  	// example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview
   857  	// of the IAM roles and permissions, see the IAM documentation
   858  	// (https://cloud.google.com/iam/docs/roles-overview). For a list of the
   859  	// available pre-defined roles, see here
   860  	// (https://cloud.google.com/iam/docs/understanding-roles).
   861  	Role string `json:"role,omitempty"`
   862  	// ForceSendFields is a list of field names (e.g. "Condition") to
   863  	// unconditionally include in API requests. By default, fields with empty or
   864  	// default values are omitted from API requests. See
   865  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   866  	// details.
   867  	ForceSendFields []string `json:"-"`
   868  	// NullFields is a list of field names (e.g. "Condition") to include in API
   869  	// requests with the JSON null value. By default, fields with empty values are
   870  	// omitted from API requests. See
   871  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   872  	NullFields []string `json:"-"`
   873  }
   874  
   875  func (s *Binding) MarshalJSON() ([]byte, error) {
   876  	type NoMethod Binding
   877  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   878  }
   879  
   880  // ChildLink: Metadata associated with a parent-child relationship appearing in
   881  // a PlanNode.
   882  type ChildLink struct {
   883  	// ChildIndex: The node to which the link points.
   884  	ChildIndex int64 `json:"childIndex,omitempty"`
   885  	// Type: The type of the link. For example, in Hash Joins this could be used to
   886  	// distinguish between the build child and the probe child, or in the case of
   887  	// the child being an output variable, to represent the tag associated with the
   888  	// output variable.
   889  	Type string `json:"type,omitempty"`
   890  	// Variable: Only present if the child node is SCALAR and corresponds to an
   891  	// output variable of the parent node. The field carries the name of the output
   892  	// variable. For example, a `TableScan` operator that reads rows from a table
   893  	// will have child links to the `SCALAR` nodes representing the output
   894  	// variables created for each column that is read by the operator. The
   895  	// corresponding `variable` fields will be set to the variable names assigned
   896  	// to the columns.
   897  	Variable string `json:"variable,omitempty"`
   898  	// ForceSendFields is a list of field names (e.g. "ChildIndex") to
   899  	// unconditionally include in API requests. By default, fields with empty or
   900  	// default values are omitted from API requests. See
   901  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   902  	// details.
   903  	ForceSendFields []string `json:"-"`
   904  	// NullFields is a list of field names (e.g. "ChildIndex") to include in API
   905  	// requests with the JSON null value. By default, fields with empty values are
   906  	// omitted from API requests. See
   907  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   908  	NullFields []string `json:"-"`
   909  }
   910  
   911  func (s *ChildLink) MarshalJSON() ([]byte, error) {
   912  	type NoMethod ChildLink
   913  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   914  }
   915  
   916  // CommitRequest: The request for Commit.
   917  type CommitRequest struct {
   918  	// MaxCommitDelay: Optional. The amount of latency this request is configured
   919  	// to incur in order to improve throughput. If this field is not set, Spanner
   920  	// assumes requests are relatively latency sensitive and automatically
   921  	// determines an appropriate delay time. You can specify a commit delay value
   922  	// between 0 and 500 ms.
   923  	MaxCommitDelay string `json:"maxCommitDelay,omitempty"`
   924  	// Mutations: The mutations to be executed when this transaction commits. All
   925  	// mutations are applied atomically, in the order they appear in this list.
   926  	Mutations []*Mutation `json:"mutations,omitempty"`
   927  	// RequestOptions: Common options for this request.
   928  	RequestOptions *RequestOptions `json:"requestOptions,omitempty"`
   929  	// ReturnCommitStats: If `true`, then statistics related to the transaction
   930  	// will be included in the CommitResponse. Default value is `false`.
   931  	ReturnCommitStats bool `json:"returnCommitStats,omitempty"`
   932  	// SingleUseTransaction: Execute mutations in a temporary transaction. Note
   933  	// that unlike commit of a previously-started transaction, commit with a
   934  	// temporary transaction is non-idempotent. That is, if the `CommitRequest` is
   935  	// sent to Cloud Spanner more than once (for instance, due to retries in the
   936  	// application, or in the transport library), it is possible that the mutations
   937  	// are executed more than once. If this is undesirable, use BeginTransaction
   938  	// and Commit instead.
   939  	SingleUseTransaction *TransactionOptions `json:"singleUseTransaction,omitempty"`
   940  	// TransactionId: Commit a previously-started transaction.
   941  	TransactionId string `json:"transactionId,omitempty"`
   942  	// ForceSendFields is a list of field names (e.g. "MaxCommitDelay") to
   943  	// unconditionally include in API requests. By default, fields with empty or
   944  	// default values are omitted from API requests. See
   945  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   946  	// details.
   947  	ForceSendFields []string `json:"-"`
   948  	// NullFields is a list of field names (e.g. "MaxCommitDelay") to include in
   949  	// API requests with the JSON null value. By default, fields with empty values
   950  	// are omitted from API requests. See
   951  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   952  	NullFields []string `json:"-"`
   953  }
   954  
   955  func (s *CommitRequest) MarshalJSON() ([]byte, error) {
   956  	type NoMethod CommitRequest
   957  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   958  }
   959  
   960  // CommitResponse: The response for Commit.
   961  type CommitResponse struct {
   962  	// CommitStats: The statistics about this Commit. Not returned by default. For
   963  	// more information, see CommitRequest.return_commit_stats.
   964  	CommitStats *CommitStats `json:"commitStats,omitempty"`
   965  	// CommitTimestamp: The Cloud Spanner timestamp at which the transaction
   966  	// committed.
   967  	CommitTimestamp string `json:"commitTimestamp,omitempty"`
   968  
   969  	// ServerResponse contains the HTTP response code and headers from the server.
   970  	googleapi.ServerResponse `json:"-"`
   971  	// ForceSendFields is a list of field names (e.g. "CommitStats") to
   972  	// unconditionally include in API requests. By default, fields with empty or
   973  	// default values are omitted from API requests. See
   974  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   975  	// details.
   976  	ForceSendFields []string `json:"-"`
   977  	// NullFields is a list of field names (e.g. "CommitStats") to include in API
   978  	// requests with the JSON null value. By default, fields with empty values are
   979  	// omitted from API requests. See
   980  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   981  	NullFields []string `json:"-"`
   982  }
   983  
   984  func (s *CommitResponse) MarshalJSON() ([]byte, error) {
   985  	type NoMethod CommitResponse
   986  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   987  }
   988  
   989  // CommitStats: Additional statistics about a commit.
   990  type CommitStats struct {
   991  	// MutationCount: The total number of mutations for the transaction. Knowing
   992  	// the `mutation_count` value can help you maximize the number of mutations in
   993  	// a transaction and minimize the number of API round trips. You can also
   994  	// monitor this value to prevent transactions from exceeding the system limit
   995  	// (https://cloud.google.com/spanner/quotas#limits_for_creating_reading_updating_and_deleting_data).
   996  	// If the number of mutations exceeds the limit, the server returns
   997  	// INVALID_ARGUMENT
   998  	// (https://cloud.google.com/spanner/docs/reference/rest/v1/Code#ENUM_VALUES.INVALID_ARGUMENT).
   999  	MutationCount int64 `json:"mutationCount,omitempty,string"`
  1000  	// ForceSendFields is a list of field names (e.g. "MutationCount") to
  1001  	// unconditionally include in API requests. By default, fields with empty or
  1002  	// default values are omitted from API requests. See
  1003  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1004  	// details.
  1005  	ForceSendFields []string `json:"-"`
  1006  	// NullFields is a list of field names (e.g. "MutationCount") to include in API
  1007  	// requests with the JSON null value. By default, fields with empty values are
  1008  	// omitted from API requests. See
  1009  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1010  	NullFields []string `json:"-"`
  1011  }
  1012  
  1013  func (s *CommitStats) MarshalJSON() ([]byte, error) {
  1014  	type NoMethod CommitStats
  1015  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1016  }
  1017  
  1018  // ContextValue: A message representing context for a KeyRangeInfo, including a
  1019  // label, value, unit, and severity.
  1020  type ContextValue struct {
  1021  	// Label: The label for the context value. e.g. "latency".
  1022  	Label *LocalizedString `json:"label,omitempty"`
  1023  	// Severity: The severity of this context.
  1024  	//
  1025  	// Possible values:
  1026  	//   "SEVERITY_UNSPECIFIED" - Required default value.
  1027  	//   "INFO" - Lowest severity level "Info".
  1028  	//   "WARNING" - Middle severity level "Warning".
  1029  	//   "ERROR" - Severity level signaling an error "Error"
  1030  	//   "FATAL" - Severity level signaling a non recoverable error "Fatal"
  1031  	Severity string `json:"severity,omitempty"`
  1032  	// Unit: The unit of the context value.
  1033  	Unit string `json:"unit,omitempty"`
  1034  	// Value: The value for the context.
  1035  	Value float64 `json:"value,omitempty"`
  1036  	// ForceSendFields is a list of field names (e.g. "Label") to unconditionally
  1037  	// include in API requests. By default, fields with empty or default values are
  1038  	// omitted from API requests. See
  1039  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1040  	// details.
  1041  	ForceSendFields []string `json:"-"`
  1042  	// NullFields is a list of field names (e.g. "Label") to include in API
  1043  	// requests with the JSON null value. By default, fields with empty values are
  1044  	// omitted from API requests. See
  1045  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1046  	NullFields []string `json:"-"`
  1047  }
  1048  
  1049  func (s *ContextValue) MarshalJSON() ([]byte, error) {
  1050  	type NoMethod ContextValue
  1051  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1052  }
  1053  
  1054  func (s *ContextValue) UnmarshalJSON(data []byte) error {
  1055  	type NoMethod ContextValue
  1056  	var s1 struct {
  1057  		Value gensupport.JSONFloat64 `json:"value"`
  1058  		*NoMethod
  1059  	}
  1060  	s1.NoMethod = (*NoMethod)(s)
  1061  	if err := json.Unmarshal(data, &s1); err != nil {
  1062  		return err
  1063  	}
  1064  	s.Value = float64(s1.Value)
  1065  	return nil
  1066  }
  1067  
  1068  // CopyBackupEncryptionConfig: Encryption configuration for the copied backup.
  1069  type CopyBackupEncryptionConfig struct {
  1070  	// EncryptionType: Required. The encryption type of the backup.
  1071  	//
  1072  	// Possible values:
  1073  	//   "ENCRYPTION_TYPE_UNSPECIFIED" - Unspecified. Do not use.
  1074  	//   "USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION" - This is the default option for
  1075  	// CopyBackup when encryption_config is not specified. For example, if the
  1076  	// source backup is using `Customer_Managed_Encryption`, the backup will be
  1077  	// using the same Cloud KMS key as the source backup.
  1078  	//   "GOOGLE_DEFAULT_ENCRYPTION" - Use Google default encryption.
  1079  	//   "CUSTOMER_MANAGED_ENCRYPTION" - Use customer managed encryption. If
  1080  	// specified, either `kms_key_name` or `kms_key_names` must contain valid Cloud
  1081  	// KMS key(s).
  1082  	EncryptionType string `json:"encryptionType,omitempty"`
  1083  	// KmsKeyName: Optional. The Cloud KMS key that will be used to protect the
  1084  	// backup. This field should be set only when encryption_type is
  1085  	// `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form
  1086  	// `projects//locations//keyRings//cryptoKeys/`.
  1087  	KmsKeyName string `json:"kmsKeyName,omitempty"`
  1088  	// KmsKeyNames: Optional. Specifies the KMS configuration for the one or more
  1089  	// keys used to protect the backup. Values are of the form
  1090  	// `projects//locations//keyRings//cryptoKeys/`. Kms keys specified can be in
  1091  	// any order. The keys referenced by kms_key_names must fully cover all regions
  1092  	// of the backup's instance configuration. Some examples: * For single region
  1093  	// instance configs, specify a single regional location KMS key. * For
  1094  	// multi-regional instance configs of type GOOGLE_MANAGED, either specify a
  1095  	// multi-regional location KMS key or multiple regional location KMS keys that
  1096  	// cover all regions in the instance config. * For an instance config of type
  1097  	// USER_MANAGED, please specify only regional location KMS keys to cover each
  1098  	// region in the instance config. Multi-regional location KMS keys are not
  1099  	// supported for USER_MANAGED instance configs.
  1100  	KmsKeyNames []string `json:"kmsKeyNames,omitempty"`
  1101  	// ForceSendFields is a list of field names (e.g. "EncryptionType") to
  1102  	// unconditionally include in API requests. By default, fields with empty or
  1103  	// default values are omitted from API requests. See
  1104  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1105  	// details.
  1106  	ForceSendFields []string `json:"-"`
  1107  	// NullFields is a list of field names (e.g. "EncryptionType") to include in
  1108  	// API requests with the JSON null value. By default, fields with empty values
  1109  	// are omitted from API requests. See
  1110  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1111  	NullFields []string `json:"-"`
  1112  }
  1113  
  1114  func (s *CopyBackupEncryptionConfig) MarshalJSON() ([]byte, error) {
  1115  	type NoMethod CopyBackupEncryptionConfig
  1116  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1117  }
  1118  
  1119  // CopyBackupMetadata: Metadata type for the operation returned by CopyBackup.
  1120  type CopyBackupMetadata struct {
  1121  	// CancelTime: The time at which cancellation of CopyBackup operation was
  1122  	// received. Operations.CancelOperation starts asynchronous cancellation on a
  1123  	// long-running operation. The server makes a best effort to cancel the
  1124  	// operation, but success is not guaranteed. Clients can use
  1125  	// Operations.GetOperation or other methods to check whether the cancellation
  1126  	// succeeded or whether the operation completed despite cancellation. On
  1127  	// successful cancellation, the operation is not deleted; instead, it becomes
  1128  	// an operation with an Operation.error value with a google.rpc.Status.code of
  1129  	// 1, corresponding to `Code.CANCELLED`.
  1130  	CancelTime string `json:"cancelTime,omitempty"`
  1131  	// Name: The name of the backup being created through the copy operation.
  1132  	// Values are of the form `projects//instances//backups/`.
  1133  	Name string `json:"name,omitempty"`
  1134  	// Progress: The progress of the CopyBackup operation.
  1135  	Progress *OperationProgress `json:"progress,omitempty"`
  1136  	// SourceBackup: The name of the source backup that is being copied. Values are
  1137  	// of the form `projects//instances//backups/`.
  1138  	SourceBackup string `json:"sourceBackup,omitempty"`
  1139  	// ForceSendFields is a list of field names (e.g. "CancelTime") to
  1140  	// unconditionally include in API requests. By default, fields with empty or
  1141  	// default values are omitted from API requests. See
  1142  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1143  	// details.
  1144  	ForceSendFields []string `json:"-"`
  1145  	// NullFields is a list of field names (e.g. "CancelTime") to include in API
  1146  	// requests with the JSON null value. By default, fields with empty values are
  1147  	// omitted from API requests. See
  1148  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1149  	NullFields []string `json:"-"`
  1150  }
  1151  
  1152  func (s *CopyBackupMetadata) MarshalJSON() ([]byte, error) {
  1153  	type NoMethod CopyBackupMetadata
  1154  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1155  }
  1156  
  1157  // CopyBackupRequest: The request for CopyBackup.
  1158  type CopyBackupRequest struct {
  1159  	// BackupId: Required. The id of the backup copy. The `backup_id` appended to
  1160  	// `parent` forms the full backup_uri of the form
  1161  	// `projects//instances//backups/`.
  1162  	BackupId string `json:"backupId,omitempty"`
  1163  	// EncryptionConfig: Optional. The encryption configuration used to encrypt the
  1164  	// backup. If this field is not specified, the backup will use the same
  1165  	// encryption configuration as the source backup by default, namely
  1166  	// encryption_type = `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`.
  1167  	EncryptionConfig *CopyBackupEncryptionConfig `json:"encryptionConfig,omitempty"`
  1168  	// ExpireTime: Required. The expiration time of the backup in microsecond
  1169  	// granularity. The expiration time must be at least 6 hours and at most 366
  1170  	// days from the `create_time` of the source backup. Once the `expire_time` has
  1171  	// passed, the backup is eligible to be automatically deleted by Cloud Spanner
  1172  	// to free the resources used by the backup.
  1173  	ExpireTime string `json:"expireTime,omitempty"`
  1174  	// SourceBackup: Required. The source backup to be copied. The source backup
  1175  	// needs to be in READY state for it to be copied. Once CopyBackup is in
  1176  	// progress, the source backup cannot be deleted or cleaned up on expiration
  1177  	// until CopyBackup is finished. Values are of the form:
  1178  	// `projects//instances//backups/`.
  1179  	SourceBackup string `json:"sourceBackup,omitempty"`
  1180  	// ForceSendFields is a list of field names (e.g. "BackupId") to
  1181  	// unconditionally include in API requests. By default, fields with empty or
  1182  	// default values are omitted from API requests. See
  1183  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1184  	// details.
  1185  	ForceSendFields []string `json:"-"`
  1186  	// NullFields is a list of field names (e.g. "BackupId") to include in API
  1187  	// requests with the JSON null value. By default, fields with empty values are
  1188  	// omitted from API requests. See
  1189  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1190  	NullFields []string `json:"-"`
  1191  }
  1192  
  1193  func (s *CopyBackupRequest) MarshalJSON() ([]byte, error) {
  1194  	type NoMethod CopyBackupRequest
  1195  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1196  }
  1197  
  1198  // CreateBackupMetadata: Metadata type for the operation returned by
  1199  // CreateBackup.
  1200  type CreateBackupMetadata struct {
  1201  	// CancelTime: The time at which cancellation of this operation was received.
  1202  	// Operations.CancelOperation starts asynchronous cancellation on a
  1203  	// long-running operation. The server makes a best effort to cancel the
  1204  	// operation, but success is not guaranteed. Clients can use
  1205  	// Operations.GetOperation or other methods to check whether the cancellation
  1206  	// succeeded or whether the operation completed despite cancellation. On
  1207  	// successful cancellation, the operation is not deleted; instead, it becomes
  1208  	// an operation with an Operation.error value with a google.rpc.Status.code of
  1209  	// 1, corresponding to `Code.CANCELLED`.
  1210  	CancelTime string `json:"cancelTime,omitempty"`
  1211  	// Database: The name of the database the backup is created from.
  1212  	Database string `json:"database,omitempty"`
  1213  	// Name: The name of the backup being created.
  1214  	Name string `json:"name,omitempty"`
  1215  	// Progress: The progress of the CreateBackup operation.
  1216  	Progress *OperationProgress `json:"progress,omitempty"`
  1217  	// ForceSendFields is a list of field names (e.g. "CancelTime") to
  1218  	// unconditionally include in API requests. By default, fields with empty or
  1219  	// default values are omitted from API requests. See
  1220  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1221  	// details.
  1222  	ForceSendFields []string `json:"-"`
  1223  	// NullFields is a list of field names (e.g. "CancelTime") to include in API
  1224  	// requests with the JSON null value. By default, fields with empty values are
  1225  	// omitted from API requests. See
  1226  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1227  	NullFields []string `json:"-"`
  1228  }
  1229  
  1230  func (s *CreateBackupMetadata) MarshalJSON() ([]byte, error) {
  1231  	type NoMethod CreateBackupMetadata
  1232  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1233  }
  1234  
  1235  // CreateDatabaseMetadata: Metadata type for the operation returned by
  1236  // CreateDatabase.
  1237  type CreateDatabaseMetadata struct {
  1238  	// Database: The database being created.
  1239  	Database string `json:"database,omitempty"`
  1240  	// ForceSendFields is a list of field names (e.g. "Database") to
  1241  	// unconditionally include in API requests. By default, fields with empty or
  1242  	// default values are omitted from API requests. See
  1243  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1244  	// details.
  1245  	ForceSendFields []string `json:"-"`
  1246  	// NullFields is a list of field names (e.g. "Database") to include in API
  1247  	// requests with the JSON null value. By default, fields with empty values are
  1248  	// omitted from API requests. See
  1249  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1250  	NullFields []string `json:"-"`
  1251  }
  1252  
  1253  func (s *CreateDatabaseMetadata) MarshalJSON() ([]byte, error) {
  1254  	type NoMethod CreateDatabaseMetadata
  1255  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1256  }
  1257  
  1258  // CreateDatabaseRequest: The request for CreateDatabase.
  1259  type CreateDatabaseRequest struct {
  1260  	// CreateStatement: Required. A `CREATE DATABASE` statement, which specifies
  1261  	// the ID of the new database. The database ID must conform to the regular
  1262  	// expression `a-z*[a-z0-9]` and be between 2 and 30 characters in length. If
  1263  	// the database ID is a reserved word or if it contains a hyphen, the database
  1264  	// ID must be enclosed in backticks (`` ` ``).
  1265  	CreateStatement string `json:"createStatement,omitempty"`
  1266  	// DatabaseDialect: Optional. The dialect of the Cloud Spanner Database.
  1267  	//
  1268  	// Possible values:
  1269  	//   "DATABASE_DIALECT_UNSPECIFIED" - Default value. This value will create a
  1270  	// database with the GOOGLE_STANDARD_SQL dialect.
  1271  	//   "GOOGLE_STANDARD_SQL" - GoogleSQL supported SQL.
  1272  	//   "POSTGRESQL" - PostgreSQL supported SQL.
  1273  	DatabaseDialect string `json:"databaseDialect,omitempty"`
  1274  	// EncryptionConfig: Optional. The encryption configuration for the database.
  1275  	// If this field is not specified, Cloud Spanner will encrypt/decrypt all data
  1276  	// at rest using Google default encryption.
  1277  	EncryptionConfig *EncryptionConfig `json:"encryptionConfig,omitempty"`
  1278  	// ExtraStatements: Optional. A list of DDL statements to run inside the newly
  1279  	// created database. Statements can create tables, indexes, etc. These
  1280  	// statements execute atomically with the creation of the database: if there is
  1281  	// an error in any statement, the database is not created.
  1282  	ExtraStatements []string `json:"extraStatements,omitempty"`
  1283  	// ProtoDescriptors: Optional. Proto descriptors used by CREATE/ALTER PROTO
  1284  	// BUNDLE statements in 'extra_statements' above. Contains a
  1285  	// protobuf-serialized google.protobuf.FileDescriptorSet
  1286  	// (https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto).
  1287  	// To generate it, install (https://grpc.io/docs/protoc-installation/) and run
  1288  	// `protoc` with --include_imports and --descriptor_set_out. For example, to
  1289  	// generate for moon/shot/app.proto, run ``` $protoc --proto_path=/app_path
  1290  	// --proto_path=/lib_path \ --include_imports \
  1291  	// --descriptor_set_out=descriptors.data \ moon/shot/app.proto ``` For more
  1292  	// details, see protobuffer self description
  1293  	// (https://developers.google.com/protocol-buffers/docs/techniques#self-description).
  1294  	ProtoDescriptors string `json:"protoDescriptors,omitempty"`
  1295  	// ForceSendFields is a list of field names (e.g. "CreateStatement") to
  1296  	// unconditionally include in API requests. By default, fields with empty or
  1297  	// default values are omitted from API requests. See
  1298  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1299  	// details.
  1300  	ForceSendFields []string `json:"-"`
  1301  	// NullFields is a list of field names (e.g. "CreateStatement") to include in
  1302  	// API requests with the JSON null value. By default, fields with empty values
  1303  	// are omitted from API requests. See
  1304  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1305  	NullFields []string `json:"-"`
  1306  }
  1307  
  1308  func (s *CreateDatabaseRequest) MarshalJSON() ([]byte, error) {
  1309  	type NoMethod CreateDatabaseRequest
  1310  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1311  }
  1312  
  1313  // CreateInstanceConfigMetadata: Metadata type for the operation returned by
  1314  // CreateInstanceConfig.
  1315  type CreateInstanceConfigMetadata struct {
  1316  	// CancelTime: The time at which this operation was cancelled.
  1317  	CancelTime string `json:"cancelTime,omitempty"`
  1318  	// InstanceConfig: The target instance config end state.
  1319  	InstanceConfig *InstanceConfig `json:"instanceConfig,omitempty"`
  1320  	// Progress: The progress of the CreateInstanceConfig operation.
  1321  	Progress *InstanceOperationProgress `json:"progress,omitempty"`
  1322  	// ForceSendFields is a list of field names (e.g. "CancelTime") to
  1323  	// unconditionally include in API requests. By default, fields with empty or
  1324  	// default values are omitted from API requests. See
  1325  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1326  	// details.
  1327  	ForceSendFields []string `json:"-"`
  1328  	// NullFields is a list of field names (e.g. "CancelTime") to include in API
  1329  	// requests with the JSON null value. By default, fields with empty values are
  1330  	// omitted from API requests. See
  1331  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1332  	NullFields []string `json:"-"`
  1333  }
  1334  
  1335  func (s *CreateInstanceConfigMetadata) MarshalJSON() ([]byte, error) {
  1336  	type NoMethod CreateInstanceConfigMetadata
  1337  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1338  }
  1339  
  1340  // CreateInstanceConfigRequest: The request for CreateInstanceConfigRequest.
  1341  type CreateInstanceConfigRequest struct {
  1342  	// InstanceConfig: Required. The InstanceConfig proto of the configuration to
  1343  	// create. instance_config.name must be `/instanceConfigs/`.
  1344  	// instance_config.base_config must be a Google managed configuration name,
  1345  	// e.g. /instanceConfigs/us-east1, /instanceConfigs/nam3.
  1346  	InstanceConfig *InstanceConfig `json:"instanceConfig,omitempty"`
  1347  	// InstanceConfigId: Required. The ID of the instance config to create. Valid
  1348  	// identifiers are of the form `custom-[-a-z0-9]*[a-z0-9]` and must be between
  1349  	// 2 and 64 characters in length. The `custom-` prefix is required to avoid
  1350  	// name conflicts with Google managed configurations.
  1351  	InstanceConfigId string `json:"instanceConfigId,omitempty"`
  1352  	// ValidateOnly: An option to validate, but not actually execute, a request,
  1353  	// and provide the same response.
  1354  	ValidateOnly bool `json:"validateOnly,omitempty"`
  1355  	// ForceSendFields is a list of field names (e.g. "InstanceConfig") to
  1356  	// unconditionally include in API requests. By default, fields with empty or
  1357  	// default values are omitted from API requests. See
  1358  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1359  	// details.
  1360  	ForceSendFields []string `json:"-"`
  1361  	// NullFields is a list of field names (e.g. "InstanceConfig") to include in
  1362  	// API requests with the JSON null value. By default, fields with empty values
  1363  	// are omitted from API requests. See
  1364  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1365  	NullFields []string `json:"-"`
  1366  }
  1367  
  1368  func (s *CreateInstanceConfigRequest) MarshalJSON() ([]byte, error) {
  1369  	type NoMethod CreateInstanceConfigRequest
  1370  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1371  }
  1372  
  1373  // CreateInstanceMetadata: Metadata type for the operation returned by
  1374  // CreateInstance.
  1375  type CreateInstanceMetadata struct {
  1376  	// CancelTime: The time at which this operation was cancelled. If set, this
  1377  	// operation is in the process of undoing itself (which is guaranteed to
  1378  	// succeed) and cannot be cancelled again.
  1379  	CancelTime string `json:"cancelTime,omitempty"`
  1380  	// EndTime: The time at which this operation failed or was completed
  1381  	// successfully.
  1382  	EndTime string `json:"endTime,omitempty"`
  1383  	// ExpectedFulfillmentPeriod: The expected fulfillment period of this create
  1384  	// operation.
  1385  	//
  1386  	// Possible values:
  1387  	//   "FULFILLMENT_PERIOD_UNSPECIFIED" - Not specified.
  1388  	//   "FULFILLMENT_PERIOD_NORMAL" - Normal fulfillment period. The operation is
  1389  	// expected to complete within minutes.
  1390  	//   "FULFILLMENT_PERIOD_EXTENDED" - Extended fulfillment period. It can take
  1391  	// up to an hour for the operation to complete.
  1392  	ExpectedFulfillmentPeriod string `json:"expectedFulfillmentPeriod,omitempty"`
  1393  	// Instance: The instance being created.
  1394  	Instance *Instance `json:"instance,omitempty"`
  1395  	// StartTime: The time at which the CreateInstance request was received.
  1396  	StartTime string `json:"startTime,omitempty"`
  1397  	// ForceSendFields is a list of field names (e.g. "CancelTime") to
  1398  	// unconditionally include in API requests. By default, fields with empty or
  1399  	// default values are omitted from API requests. See
  1400  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1401  	// details.
  1402  	ForceSendFields []string `json:"-"`
  1403  	// NullFields is a list of field names (e.g. "CancelTime") to include in API
  1404  	// requests with the JSON null value. By default, fields with empty values are
  1405  	// omitted from API requests. See
  1406  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1407  	NullFields []string `json:"-"`
  1408  }
  1409  
  1410  func (s *CreateInstanceMetadata) MarshalJSON() ([]byte, error) {
  1411  	type NoMethod CreateInstanceMetadata
  1412  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1413  }
  1414  
  1415  // CreateInstancePartitionMetadata: Metadata type for the operation returned by
  1416  // CreateInstancePartition.
  1417  type CreateInstancePartitionMetadata struct {
  1418  	// CancelTime: The time at which this operation was cancelled. If set, this
  1419  	// operation is in the process of undoing itself (which is guaranteed to
  1420  	// succeed) and cannot be cancelled again.
  1421  	CancelTime string `json:"cancelTime,omitempty"`
  1422  	// EndTime: The time at which this operation failed or was completed
  1423  	// successfully.
  1424  	EndTime string `json:"endTime,omitempty"`
  1425  	// InstancePartition: The instance partition being created.
  1426  	InstancePartition *InstancePartition `json:"instancePartition,omitempty"`
  1427  	// StartTime: The time at which the CreateInstancePartition request was
  1428  	// received.
  1429  	StartTime string `json:"startTime,omitempty"`
  1430  	// ForceSendFields is a list of field names (e.g. "CancelTime") to
  1431  	// unconditionally include in API requests. By default, fields with empty or
  1432  	// default values are omitted from API requests. See
  1433  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1434  	// details.
  1435  	ForceSendFields []string `json:"-"`
  1436  	// NullFields is a list of field names (e.g. "CancelTime") to include in API
  1437  	// requests with the JSON null value. By default, fields with empty values are
  1438  	// omitted from API requests. See
  1439  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1440  	NullFields []string `json:"-"`
  1441  }
  1442  
  1443  func (s *CreateInstancePartitionMetadata) MarshalJSON() ([]byte, error) {
  1444  	type NoMethod CreateInstancePartitionMetadata
  1445  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1446  }
  1447  
  1448  // CreateInstancePartitionRequest: The request for CreateInstancePartition.
  1449  type CreateInstancePartitionRequest struct {
  1450  	// InstancePartition: Required. The instance partition to create. The
  1451  	// instance_partition.name may be omitted, but if specified must be
  1452  	// `/instancePartitions/`.
  1453  	InstancePartition *InstancePartition `json:"instancePartition,omitempty"`
  1454  	// InstancePartitionId: Required. The ID of the instance partition to create.
  1455  	// Valid identifiers are of the form `a-z*[a-z0-9]` and must be between 2 and
  1456  	// 64 characters in length.
  1457  	InstancePartitionId string `json:"instancePartitionId,omitempty"`
  1458  	// ForceSendFields is a list of field names (e.g. "InstancePartition") to
  1459  	// unconditionally include in API requests. By default, fields with empty or
  1460  	// default values are omitted from API requests. See
  1461  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1462  	// details.
  1463  	ForceSendFields []string `json:"-"`
  1464  	// NullFields is a list of field names (e.g. "InstancePartition") to include in
  1465  	// API requests with the JSON null value. By default, fields with empty values
  1466  	// are omitted from API requests. See
  1467  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1468  	NullFields []string `json:"-"`
  1469  }
  1470  
  1471  func (s *CreateInstancePartitionRequest) MarshalJSON() ([]byte, error) {
  1472  	type NoMethod CreateInstancePartitionRequest
  1473  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1474  }
  1475  
  1476  // CreateInstanceRequest: The request for CreateInstance.
  1477  type CreateInstanceRequest struct {
  1478  	// Instance: Required. The instance to create. The name may be omitted, but if
  1479  	// specified must be `/instances/`.
  1480  	Instance *Instance `json:"instance,omitempty"`
  1481  	// InstanceId: Required. The ID of the instance to create. Valid identifiers
  1482  	// are of the form `a-z*[a-z0-9]` and must be between 2 and 64 characters in
  1483  	// length.
  1484  	InstanceId string `json:"instanceId,omitempty"`
  1485  	// ForceSendFields is a list of field names (e.g. "Instance") to
  1486  	// unconditionally include in API requests. By default, fields with empty or
  1487  	// default values are omitted from API requests. See
  1488  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1489  	// details.
  1490  	ForceSendFields []string `json:"-"`
  1491  	// NullFields is a list of field names (e.g. "Instance") to include in API
  1492  	// requests with the JSON null value. By default, fields with empty values are
  1493  	// omitted from API requests. See
  1494  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1495  	NullFields []string `json:"-"`
  1496  }
  1497  
  1498  func (s *CreateInstanceRequest) MarshalJSON() ([]byte, error) {
  1499  	type NoMethod CreateInstanceRequest
  1500  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1501  }
  1502  
  1503  // CreateSessionRequest: The request for CreateSession.
  1504  type CreateSessionRequest struct {
  1505  	// Session: Required. The session to create.
  1506  	Session *Session `json:"session,omitempty"`
  1507  	// ForceSendFields is a list of field names (e.g. "Session") to unconditionally
  1508  	// include in API requests. By default, fields with empty or default values are
  1509  	// omitted from API requests. See
  1510  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1511  	// details.
  1512  	ForceSendFields []string `json:"-"`
  1513  	// NullFields is a list of field names (e.g. "Session") to include in API
  1514  	// requests with the JSON null value. By default, fields with empty values are
  1515  	// omitted from API requests. See
  1516  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1517  	NullFields []string `json:"-"`
  1518  }
  1519  
  1520  func (s *CreateSessionRequest) MarshalJSON() ([]byte, error) {
  1521  	type NoMethod CreateSessionRequest
  1522  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1523  }
  1524  
  1525  // Database: A Cloud Spanner database.
  1526  type Database struct {
  1527  	// CreateTime: Output only. If exists, the time at which the database creation
  1528  	// started.
  1529  	CreateTime string `json:"createTime,omitempty"`
  1530  	// DatabaseDialect: Output only. The dialect of the Cloud Spanner Database.
  1531  	//
  1532  	// Possible values:
  1533  	//   "DATABASE_DIALECT_UNSPECIFIED" - Default value. This value will create a
  1534  	// database with the GOOGLE_STANDARD_SQL dialect.
  1535  	//   "GOOGLE_STANDARD_SQL" - GoogleSQL supported SQL.
  1536  	//   "POSTGRESQL" - PostgreSQL supported SQL.
  1537  	DatabaseDialect string `json:"databaseDialect,omitempty"`
  1538  	// DefaultLeader: Output only. The read-write region which contains the
  1539  	// database's leader replicas. This is the same as the value of default_leader
  1540  	// database option set using DatabaseAdmin.CreateDatabase or
  1541  	// DatabaseAdmin.UpdateDatabaseDdl. If not explicitly set, this is empty.
  1542  	DefaultLeader string `json:"defaultLeader,omitempty"`
  1543  	// EarliestVersionTime: Output only. Earliest timestamp at which older versions
  1544  	// of the data can be read. This value is continuously updated by Cloud Spanner
  1545  	// and becomes stale the moment it is queried. If you are using this value to
  1546  	// recover data, make sure to account for the time from the moment when the
  1547  	// value is queried to the moment when you initiate the recovery.
  1548  	EarliestVersionTime string `json:"earliestVersionTime,omitempty"`
  1549  	// EnableDropProtection: Whether drop protection is enabled for this database.
  1550  	// Defaults to false, if not set. For more details, please see how to prevent
  1551  	// accidental database deletion
  1552  	// (https://cloud.google.com/spanner/docs/prevent-database-deletion).
  1553  	EnableDropProtection bool `json:"enableDropProtection,omitempty"`
  1554  	// EncryptionConfig: Output only. For databases that are using customer managed
  1555  	// encryption, this field contains the encryption configuration for the
  1556  	// database. For databases that are using Google default or other types of
  1557  	// encryption, this field is empty.
  1558  	EncryptionConfig *EncryptionConfig `json:"encryptionConfig,omitempty"`
  1559  	// EncryptionInfo: Output only. For databases that are using customer managed
  1560  	// encryption, this field contains the encryption information for the database,
  1561  	// such as all Cloud KMS key versions that are in use. The `encryption_status'
  1562  	// field inside of each `EncryptionInfo` is not populated. For databases that
  1563  	// are using Google default or other types of encryption, this field is empty.
  1564  	// This field is propagated lazily from the backend. There might be a delay
  1565  	// from when a key version is being used and when it appears in this field.
  1566  	EncryptionInfo []*EncryptionInfo `json:"encryptionInfo,omitempty"`
  1567  	// Name: Required. The name of the database. Values are of the form
  1568  	// `projects//instances//databases/`, where `` is as specified in the `CREATE
  1569  	// DATABASE` statement. This name can be passed to other API methods to
  1570  	// identify the database.
  1571  	Name string `json:"name,omitempty"`
  1572  	// Reconciling: Output only. If true, the database is being updated. If false,
  1573  	// there are no ongoing update operations for the database.
  1574  	Reconciling bool `json:"reconciling,omitempty"`
  1575  	// RestoreInfo: Output only. Applicable only for restored databases. Contains
  1576  	// information about the restore source.
  1577  	RestoreInfo *RestoreInfo `json:"restoreInfo,omitempty"`
  1578  	// State: Output only. The current database state.
  1579  	//
  1580  	// Possible values:
  1581  	//   "STATE_UNSPECIFIED" - Not specified.
  1582  	//   "CREATING" - The database is still being created. Operations on the
  1583  	// database may fail with `FAILED_PRECONDITION` in this state.
  1584  	//   "READY" - The database is fully created and ready for use.
  1585  	//   "READY_OPTIMIZING" - The database is fully created and ready for use, but
  1586  	// is still being optimized for performance and cannot handle full load. In
  1587  	// this state, the database still references the backup it was restore from,
  1588  	// preventing the backup from being deleted. When optimizations are complete,
  1589  	// the full performance of the database will be restored, and the database will
  1590  	// transition to `READY` state.
  1591  	State string `json:"state,omitempty"`
  1592  	// VersionRetentionPeriod: Output only. The period in which Cloud Spanner
  1593  	// retains all versions of data for the database. This is the same as the value
  1594  	// of version_retention_period database option set using UpdateDatabaseDdl.
  1595  	// Defaults to 1 hour, if not set.
  1596  	VersionRetentionPeriod string `json:"versionRetentionPeriod,omitempty"`
  1597  
  1598  	// ServerResponse contains the HTTP response code and headers from the server.
  1599  	googleapi.ServerResponse `json:"-"`
  1600  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  1601  	// unconditionally include in API requests. By default, fields with empty or
  1602  	// default values are omitted from API requests. See
  1603  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1604  	// details.
  1605  	ForceSendFields []string `json:"-"`
  1606  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  1607  	// requests with the JSON null value. By default, fields with empty values are
  1608  	// omitted from API requests. See
  1609  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1610  	NullFields []string `json:"-"`
  1611  }
  1612  
  1613  func (s *Database) MarshalJSON() ([]byte, error) {
  1614  	type NoMethod Database
  1615  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1616  }
  1617  
  1618  // DatabaseRole: A Cloud Spanner database role.
  1619  type DatabaseRole struct {
  1620  	// Name: Required. The name of the database role. Values are of the form
  1621  	// `projects//instances//databases//databaseRoles/` where `` is as specified in
  1622  	// the `CREATE ROLE` DDL statement.
  1623  	Name string `json:"name,omitempty"`
  1624  	// ForceSendFields is a list of field names (e.g. "Name") to unconditionally
  1625  	// include in API requests. By default, fields with empty or default values are
  1626  	// omitted from API requests. See
  1627  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1628  	// details.
  1629  	ForceSendFields []string `json:"-"`
  1630  	// NullFields is a list of field names (e.g. "Name") to include in API requests
  1631  	// with the JSON null value. By default, fields with empty values are omitted
  1632  	// from API requests. See
  1633  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1634  	NullFields []string `json:"-"`
  1635  }
  1636  
  1637  func (s *DatabaseRole) MarshalJSON() ([]byte, error) {
  1638  	type NoMethod DatabaseRole
  1639  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1640  }
  1641  
  1642  // DdlStatementActionInfo: Action information extracted from a DDL statement.
  1643  // This proto is used to display the brief info of the DDL statement for the
  1644  // operation UpdateDatabaseDdl.
  1645  type DdlStatementActionInfo struct {
  1646  	// Action: The action for the DDL statement, e.g. CREATE, ALTER, DROP, GRANT,
  1647  	// etc. This field is a non-empty string.
  1648  	Action string `json:"action,omitempty"`
  1649  	// EntityNames: The entity name(s) being operated on the DDL statement. E.g. 1.
  1650  	// For statement "CREATE TABLE t1(...)", `entity_names` = ["t1"]. 2. For
  1651  	// statement "GRANT ROLE r1, r2 ...", `entity_names` = ["r1", "r2"]. 3. For
  1652  	// statement "ANALYZE", `entity_names` = [].
  1653  	EntityNames []string `json:"entityNames,omitempty"`
  1654  	// EntityType: The entity type for the DDL statement, e.g. TABLE, INDEX, VIEW,
  1655  	// etc. This field can be empty string for some DDL statement, e.g. for
  1656  	// statement "ANALYZE", `entity_type` = "".
  1657  	EntityType string `json:"entityType,omitempty"`
  1658  	// ForceSendFields is a list of field names (e.g. "Action") to unconditionally
  1659  	// include in API requests. By default, fields with empty or default values are
  1660  	// omitted from API requests. See
  1661  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1662  	// details.
  1663  	ForceSendFields []string `json:"-"`
  1664  	// NullFields is a list of field names (e.g. "Action") to include in API
  1665  	// requests with the JSON null value. By default, fields with empty values are
  1666  	// omitted from API requests. See
  1667  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1668  	NullFields []string `json:"-"`
  1669  }
  1670  
  1671  func (s *DdlStatementActionInfo) MarshalJSON() ([]byte, error) {
  1672  	type NoMethod DdlStatementActionInfo
  1673  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1674  }
  1675  
  1676  // Delete: Arguments to delete operations.
  1677  type Delete struct {
  1678  	// KeySet: Required. The primary keys of the rows within table to delete. The
  1679  	// primary keys must be specified in the order in which they appear in the
  1680  	// `PRIMARY KEY()` clause of the table's equivalent DDL statement (the DDL
  1681  	// statement used to create the table). Delete is idempotent. The transaction
  1682  	// will succeed even if some or all rows do not exist.
  1683  	KeySet *KeySet `json:"keySet,omitempty"`
  1684  	// Table: Required. The table whose rows will be deleted.
  1685  	Table string `json:"table,omitempty"`
  1686  	// ForceSendFields is a list of field names (e.g. "KeySet") to unconditionally
  1687  	// include in API requests. By default, fields with empty or default values are
  1688  	// omitted from API requests. See
  1689  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1690  	// details.
  1691  	ForceSendFields []string `json:"-"`
  1692  	// NullFields is a list of field names (e.g. "KeySet") to include in API
  1693  	// requests with the JSON null value. By default, fields with empty values are
  1694  	// omitted from API requests. See
  1695  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1696  	NullFields []string `json:"-"`
  1697  }
  1698  
  1699  func (s *Delete) MarshalJSON() ([]byte, error) {
  1700  	type NoMethod Delete
  1701  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1702  }
  1703  
  1704  // DerivedMetric: A message representing a derived metric.
  1705  type DerivedMetric struct {
  1706  	// Denominator: The name of the denominator metric. e.g. "rows".
  1707  	Denominator *LocalizedString `json:"denominator,omitempty"`
  1708  	// Numerator: The name of the numerator metric. e.g. "latency".
  1709  	Numerator *LocalizedString `json:"numerator,omitempty"`
  1710  	// ForceSendFields is a list of field names (e.g. "Denominator") to
  1711  	// unconditionally include in API requests. By default, fields with empty or
  1712  	// default values are omitted from API requests. See
  1713  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1714  	// details.
  1715  	ForceSendFields []string `json:"-"`
  1716  	// NullFields is a list of field names (e.g. "Denominator") to include in API
  1717  	// requests with the JSON null value. By default, fields with empty values are
  1718  	// omitted from API requests. See
  1719  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1720  	NullFields []string `json:"-"`
  1721  }
  1722  
  1723  func (s *DerivedMetric) MarshalJSON() ([]byte, error) {
  1724  	type NoMethod DerivedMetric
  1725  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1726  }
  1727  
  1728  // DiagnosticMessage: A message representing the key visualizer diagnostic
  1729  // messages.
  1730  type DiagnosticMessage struct {
  1731  	// Info: Information about this diagnostic information.
  1732  	Info *LocalizedString `json:"info,omitempty"`
  1733  	// Metric: The metric.
  1734  	Metric *LocalizedString `json:"metric,omitempty"`
  1735  	// MetricSpecific: Whether this message is specific only for the current
  1736  	// metric. By default Diagnostics are shown for all metrics, regardless which
  1737  	// metric is the currently selected metric in the UI. However occasionally a
  1738  	// metric will generate so many messages that the resulting visual clutter
  1739  	// becomes overwhelming. In this case setting this to true, will show the
  1740  	// diagnostic messages for that metric only if it is the currently selected
  1741  	// metric.
  1742  	MetricSpecific bool `json:"metricSpecific,omitempty"`
  1743  	// Severity: The severity of the diagnostic message.
  1744  	//
  1745  	// Possible values:
  1746  	//   "SEVERITY_UNSPECIFIED" - Required default value.
  1747  	//   "INFO" - Lowest severity level "Info".
  1748  	//   "WARNING" - Middle severity level "Warning".
  1749  	//   "ERROR" - Severity level signaling an error "Error"
  1750  	//   "FATAL" - Severity level signaling a non recoverable error "Fatal"
  1751  	Severity string `json:"severity,omitempty"`
  1752  	// ShortMessage: The short message.
  1753  	ShortMessage *LocalizedString `json:"shortMessage,omitempty"`
  1754  	// ForceSendFields is a list of field names (e.g. "Info") to unconditionally
  1755  	// include in API requests. By default, fields with empty or default values are
  1756  	// omitted from API requests. See
  1757  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1758  	// details.
  1759  	ForceSendFields []string `json:"-"`
  1760  	// NullFields is a list of field names (e.g. "Info") to include in API requests
  1761  	// with the JSON null value. By default, fields with empty values are omitted
  1762  	// from API requests. See
  1763  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1764  	NullFields []string `json:"-"`
  1765  }
  1766  
  1767  func (s *DiagnosticMessage) MarshalJSON() ([]byte, error) {
  1768  	type NoMethod DiagnosticMessage
  1769  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1770  }
  1771  
  1772  // DirectedReadOptions: The DirectedReadOptions can be used to indicate which
  1773  // replicas or regions should be used for non-transactional reads or queries.
  1774  // DirectedReadOptions may only be specified for a read-only transaction,
  1775  // otherwise the API will return an `INVALID_ARGUMENT` error.
  1776  type DirectedReadOptions struct {
  1777  	// ExcludeReplicas: Exclude_replicas indicates that specified replicas should
  1778  	// be excluded from serving requests. Spanner will not route requests to the
  1779  	// replicas in this list.
  1780  	ExcludeReplicas *ExcludeReplicas `json:"excludeReplicas,omitempty"`
  1781  	// IncludeReplicas: Include_replicas indicates the order of replicas (as they
  1782  	// appear in this list) to process the request. If auto_failover_disabled is
  1783  	// set to true and all replicas are exhausted without finding a healthy
  1784  	// replica, Spanner will wait for a replica in the list to become available,
  1785  	// requests may fail due to `DEADLINE_EXCEEDED` errors.
  1786  	IncludeReplicas *IncludeReplicas `json:"includeReplicas,omitempty"`
  1787  	// ForceSendFields is a list of field names (e.g. "ExcludeReplicas") to
  1788  	// unconditionally include in API requests. By default, fields with empty or
  1789  	// default values are omitted from API requests. See
  1790  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1791  	// details.
  1792  	ForceSendFields []string `json:"-"`
  1793  	// NullFields is a list of field names (e.g. "ExcludeReplicas") to include in
  1794  	// API requests with the JSON null value. By default, fields with empty values
  1795  	// are omitted from API requests. See
  1796  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1797  	NullFields []string `json:"-"`
  1798  }
  1799  
  1800  func (s *DirectedReadOptions) MarshalJSON() ([]byte, error) {
  1801  	type NoMethod DirectedReadOptions
  1802  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1803  }
  1804  
  1805  // Empty: A generic empty message that you can re-use to avoid defining
  1806  // duplicated empty messages in your APIs. A typical example is to use it as
  1807  // the request or the response type of an API method. For instance: service Foo
  1808  // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
  1809  type Empty struct {
  1810  	// ServerResponse contains the HTTP response code and headers from the server.
  1811  	googleapi.ServerResponse `json:"-"`
  1812  }
  1813  
  1814  // EncryptionConfig: Encryption configuration for a Cloud Spanner database.
  1815  type EncryptionConfig struct {
  1816  	// KmsKeyName: The Cloud KMS key to be used for encrypting and decrypting the
  1817  	// database. Values are of the form
  1818  	// `projects//locations//keyRings//cryptoKeys/`.
  1819  	KmsKeyName string `json:"kmsKeyName,omitempty"`
  1820  	// KmsKeyNames: Specifies the KMS configuration for the one or more keys used
  1821  	// to encrypt the database. Values are of the form
  1822  	// `projects//locations//keyRings//cryptoKeys/`. The keys referenced by
  1823  	// kms_key_names must fully cover all regions of the database instance
  1824  	// configuration. Some examples: * For single region database instance configs,
  1825  	// specify a single regional location KMS key. * For multi-regional database
  1826  	// instance configs of type GOOGLE_MANAGED, either specify a multi-regional
  1827  	// location KMS key or multiple regional location KMS keys that cover all
  1828  	// regions in the instance config. * For a database instance config of type
  1829  	// USER_MANAGED, please specify only regional location KMS keys to cover each
  1830  	// region in the instance config. Multi-regional location KMS keys are not
  1831  	// supported for USER_MANAGED instance configs.
  1832  	KmsKeyNames []string `json:"kmsKeyNames,omitempty"`
  1833  	// ForceSendFields is a list of field names (e.g. "KmsKeyName") to
  1834  	// unconditionally include in API requests. By default, fields with empty or
  1835  	// default values are omitted from API requests. See
  1836  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1837  	// details.
  1838  	ForceSendFields []string `json:"-"`
  1839  	// NullFields is a list of field names (e.g. "KmsKeyName") to include in API
  1840  	// requests with the JSON null value. By default, fields with empty values are
  1841  	// omitted from API requests. See
  1842  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1843  	NullFields []string `json:"-"`
  1844  }
  1845  
  1846  func (s *EncryptionConfig) MarshalJSON() ([]byte, error) {
  1847  	type NoMethod EncryptionConfig
  1848  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1849  }
  1850  
  1851  // EncryptionInfo: Encryption information for a Cloud Spanner database or
  1852  // backup.
  1853  type EncryptionInfo struct {
  1854  	// EncryptionStatus: Output only. If present, the status of a recent
  1855  	// encrypt/decrypt call on underlying data for this database or backup.
  1856  	// Regardless of status, data is always encrypted at rest.
  1857  	EncryptionStatus *Status `json:"encryptionStatus,omitempty"`
  1858  	// EncryptionType: Output only. The type of encryption.
  1859  	//
  1860  	// Possible values:
  1861  	//   "TYPE_UNSPECIFIED" - Encryption type was not specified, though data at
  1862  	// rest remains encrypted.
  1863  	//   "GOOGLE_DEFAULT_ENCRYPTION" - The data is encrypted at rest with a key
  1864  	// that is fully managed by Google. No key version or status will be populated.
  1865  	// This is the default state.
  1866  	//   "CUSTOMER_MANAGED_ENCRYPTION" - The data is encrypted at rest with a key
  1867  	// that is managed by the customer. The active version of the key.
  1868  	// `kms_key_version` will be populated, and `encryption_status` may be
  1869  	// populated.
  1870  	EncryptionType string `json:"encryptionType,omitempty"`
  1871  	// KmsKeyVersion: Output only. A Cloud KMS key version that is being used to
  1872  	// protect the database or backup.
  1873  	KmsKeyVersion string `json:"kmsKeyVersion,omitempty"`
  1874  	// ForceSendFields is a list of field names (e.g. "EncryptionStatus") to
  1875  	// unconditionally include in API requests. By default, fields with empty or
  1876  	// default values are omitted from API requests. See
  1877  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1878  	// details.
  1879  	ForceSendFields []string `json:"-"`
  1880  	// NullFields is a list of field names (e.g. "EncryptionStatus") to include in
  1881  	// API requests with the JSON null value. By default, fields with empty values
  1882  	// are omitted from API requests. See
  1883  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1884  	NullFields []string `json:"-"`
  1885  }
  1886  
  1887  func (s *EncryptionInfo) MarshalJSON() ([]byte, error) {
  1888  	type NoMethod EncryptionInfo
  1889  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1890  }
  1891  
  1892  // ExcludeReplicas: An ExcludeReplicas contains a repeated set of
  1893  // ReplicaSelection that should be excluded from serving requests.
  1894  type ExcludeReplicas struct {
  1895  	// ReplicaSelections: The directed read replica selector.
  1896  	ReplicaSelections []*ReplicaSelection `json:"replicaSelections,omitempty"`
  1897  	// ForceSendFields is a list of field names (e.g. "ReplicaSelections") to
  1898  	// unconditionally include in API requests. By default, fields with empty or
  1899  	// default values are omitted from API requests. See
  1900  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1901  	// details.
  1902  	ForceSendFields []string `json:"-"`
  1903  	// NullFields is a list of field names (e.g. "ReplicaSelections") to include in
  1904  	// API requests with the JSON null value. By default, fields with empty values
  1905  	// are omitted from API requests. See
  1906  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1907  	NullFields []string `json:"-"`
  1908  }
  1909  
  1910  func (s *ExcludeReplicas) MarshalJSON() ([]byte, error) {
  1911  	type NoMethod ExcludeReplicas
  1912  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1913  }
  1914  
  1915  // ExecuteBatchDmlRequest: The request for ExecuteBatchDml.
  1916  type ExecuteBatchDmlRequest struct {
  1917  	// RequestOptions: Common options for this request.
  1918  	RequestOptions *RequestOptions `json:"requestOptions,omitempty"`
  1919  	// Seqno: Required. A per-transaction sequence number used to identify this
  1920  	// request. This field makes each request idempotent such that if the request
  1921  	// is received multiple times, at most one will succeed. The sequence number
  1922  	// must be monotonically increasing within the transaction. If a request
  1923  	// arrives for the first time with an out-of-order sequence number, the
  1924  	// transaction may be aborted. Replays of previously handled requests will
  1925  	// yield the same response as the first execution.
  1926  	Seqno int64 `json:"seqno,omitempty,string"`
  1927  	// Statements: Required. The list of statements to execute in this batch.
  1928  	// Statements are executed serially, such that the effects of statement `i` are
  1929  	// visible to statement `i+1`. Each statement must be a DML statement.
  1930  	// Execution stops at the first failed statement; the remaining statements are
  1931  	// not executed. Callers must provide at least one statement.
  1932  	Statements []*Statement `json:"statements,omitempty"`
  1933  	// Transaction: Required. The transaction to use. Must be a read-write
  1934  	// transaction. To protect against replays, single-use transactions are not
  1935  	// supported. The caller must either supply an existing transaction ID or begin
  1936  	// a new transaction.
  1937  	Transaction *TransactionSelector `json:"transaction,omitempty"`
  1938  	// ForceSendFields is a list of field names (e.g. "RequestOptions") to
  1939  	// unconditionally include in API requests. By default, fields with empty or
  1940  	// default values are omitted from API requests. See
  1941  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1942  	// details.
  1943  	ForceSendFields []string `json:"-"`
  1944  	// NullFields is a list of field names (e.g. "RequestOptions") to include in
  1945  	// API requests with the JSON null value. By default, fields with empty values
  1946  	// are omitted from API requests. See
  1947  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1948  	NullFields []string `json:"-"`
  1949  }
  1950  
  1951  func (s *ExecuteBatchDmlRequest) MarshalJSON() ([]byte, error) {
  1952  	type NoMethod ExecuteBatchDmlRequest
  1953  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1954  }
  1955  
  1956  // ExecuteBatchDmlResponse: The response for ExecuteBatchDml. Contains a list
  1957  // of ResultSet messages, one for each DML statement that has successfully
  1958  // executed, in the same order as the statements in the request. If a statement
  1959  // fails, the status in the response body identifies the cause of the failure.
  1960  // To check for DML statements that failed, use the following approach: 1.
  1961  // Check the status in the response message. The google.rpc.Code enum value
  1962  // `OK` indicates that all statements were executed successfully. 2. If the
  1963  // status was not `OK`, check the number of result sets in the response. If the
  1964  // response contains `N` ResultSet messages, then statement `N+1` in the
  1965  // request failed. Example 1: * Request: 5 DML statements, all executed
  1966  // successfully. * Response: 5 ResultSet messages, with the status `OK`.
  1967  // Example 2: * Request: 5 DML statements. The third statement has a syntax
  1968  // error. * Response: 2 ResultSet messages, and a syntax error
  1969  // (`INVALID_ARGUMENT`) status. The number of ResultSet messages indicates that
  1970  // the third statement failed, and the fourth and fifth statements were not
  1971  // executed.
  1972  type ExecuteBatchDmlResponse struct {
  1973  	// ResultSets: One ResultSet for each statement in the request that ran
  1974  	// successfully, in the same order as the statements in the request. Each
  1975  	// ResultSet does not contain any rows. The ResultSetStats in each ResultSet
  1976  	// contain the number of rows modified by the statement. Only the first
  1977  	// ResultSet in the response contains valid ResultSetMetadata.
  1978  	ResultSets []*ResultSet `json:"resultSets,omitempty"`
  1979  	// Status: If all DML statements are executed successfully, the status is `OK`.
  1980  	// Otherwise, the error status of the first failed statement.
  1981  	Status *Status `json:"status,omitempty"`
  1982  
  1983  	// ServerResponse contains the HTTP response code and headers from the server.
  1984  	googleapi.ServerResponse `json:"-"`
  1985  	// ForceSendFields is a list of field names (e.g. "ResultSets") to
  1986  	// unconditionally include in API requests. By default, fields with empty or
  1987  	// default values are omitted from API requests. See
  1988  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1989  	// details.
  1990  	ForceSendFields []string `json:"-"`
  1991  	// NullFields is a list of field names (e.g. "ResultSets") to include in API
  1992  	// requests with the JSON null value. By default, fields with empty values are
  1993  	// omitted from API requests. See
  1994  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1995  	NullFields []string `json:"-"`
  1996  }
  1997  
  1998  func (s *ExecuteBatchDmlResponse) MarshalJSON() ([]byte, error) {
  1999  	type NoMethod ExecuteBatchDmlResponse
  2000  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2001  }
  2002  
  2003  // ExecuteSqlRequest: The request for ExecuteSql and ExecuteStreamingSql.
  2004  type ExecuteSqlRequest struct {
  2005  	// DataBoostEnabled: If this is for a partitioned query and this field is set
  2006  	// to `true`, the request is executed with Spanner Data Boost independent
  2007  	// compute resources. If the field is set to `true` but the request does not
  2008  	// set `partition_token`, the API returns an `INVALID_ARGUMENT` error.
  2009  	DataBoostEnabled bool `json:"dataBoostEnabled,omitempty"`
  2010  	// DirectedReadOptions: Directed read options for this request.
  2011  	DirectedReadOptions *DirectedReadOptions `json:"directedReadOptions,omitempty"`
  2012  	// ParamTypes: It is not always possible for Cloud Spanner to infer the right
  2013  	// SQL type from a JSON value. For example, values of type `BYTES` and values
  2014  	// of type `STRING` both appear in params as JSON strings. In these cases,
  2015  	// `param_types` can be used to specify the exact SQL type for some or all of
  2016  	// the SQL statement parameters. See the definition of Type for more
  2017  	// information about SQL types.
  2018  	ParamTypes map[string]Type `json:"paramTypes,omitempty"`
  2019  	// Params: Parameter names and values that bind to placeholders in the SQL
  2020  	// string. A parameter placeholder consists of the `@` character followed by
  2021  	// the parameter name (for example, `@firstName`). Parameter names must conform
  2022  	// to the naming requirements of identifiers as specified at
  2023  	// https://cloud.google.com/spanner/docs/lexical#identifiers. Parameters can
  2024  	// appear anywhere that a literal value is expected. The same parameter name
  2025  	// can be used more than once, for example: "WHERE id > @msg_id AND id <
  2026  	// @msg_id + 100" It is an error to execute a SQL statement with unbound
  2027  	// parameters.
  2028  	Params googleapi.RawMessage `json:"params,omitempty"`
  2029  	// PartitionToken: If present, results will be restricted to the specified
  2030  	// partition previously created using PartitionQuery(). There must be an exact
  2031  	// match for the values of fields common to this message and the
  2032  	// PartitionQueryRequest message used to create this partition_token.
  2033  	PartitionToken string `json:"partitionToken,omitempty"`
  2034  	// QueryMode: Used to control the amount of debugging information returned in
  2035  	// ResultSetStats. If partition_token is set, query_mode can only be set to
  2036  	// QueryMode.NORMAL.
  2037  	//
  2038  	// Possible values:
  2039  	//   "NORMAL" - The default mode. Only the statement results are returned.
  2040  	//   "PLAN" - This mode returns only the query plan, without any results or
  2041  	// execution statistics information.
  2042  	//   "PROFILE" - This mode returns both the query plan and the execution
  2043  	// statistics along with the results.
  2044  	QueryMode string `json:"queryMode,omitempty"`
  2045  	// QueryOptions: Query optimizer configuration to use for the given query.
  2046  	QueryOptions *QueryOptions `json:"queryOptions,omitempty"`
  2047  	// RequestOptions: Common options for this request.
  2048  	RequestOptions *RequestOptions `json:"requestOptions,omitempty"`
  2049  	// ResumeToken: If this request is resuming a previously interrupted SQL
  2050  	// statement execution, `resume_token` should be copied from the last
  2051  	// PartialResultSet yielded before the interruption. Doing this enables the new
  2052  	// SQL statement execution to resume where the last one left off. The rest of
  2053  	// the request parameters must exactly match the request that yielded this
  2054  	// token.
  2055  	ResumeToken string `json:"resumeToken,omitempty"`
  2056  	// Seqno: A per-transaction sequence number used to identify this request. This
  2057  	// field makes each request idempotent such that if the request is received
  2058  	// multiple times, at most one will succeed. The sequence number must be
  2059  	// monotonically increasing within the transaction. If a request arrives for
  2060  	// the first time with an out-of-order sequence number, the transaction may be
  2061  	// aborted. Replays of previously handled requests will yield the same response
  2062  	// as the first execution. Required for DML statements. Ignored for queries.
  2063  	Seqno int64 `json:"seqno,omitempty,string"`
  2064  	// Sql: Required. The SQL string.
  2065  	Sql string `json:"sql,omitempty"`
  2066  	// Transaction: The transaction to use. For queries, if none is provided, the
  2067  	// default is a temporary read-only transaction with strong concurrency.
  2068  	// Standard DML statements require a read-write transaction. To protect against
  2069  	// replays, single-use transactions are not supported. The caller must either
  2070  	// supply an existing transaction ID or begin a new transaction. Partitioned
  2071  	// DML requires an existing Partitioned DML transaction ID.
  2072  	Transaction *TransactionSelector `json:"transaction,omitempty"`
  2073  	// ForceSendFields is a list of field names (e.g. "DataBoostEnabled") to
  2074  	// unconditionally include in API requests. By default, fields with empty or
  2075  	// default values are omitted from API requests. See
  2076  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2077  	// details.
  2078  	ForceSendFields []string `json:"-"`
  2079  	// NullFields is a list of field names (e.g. "DataBoostEnabled") to include in
  2080  	// API requests with the JSON null value. By default, fields with empty values
  2081  	// are omitted from API requests. See
  2082  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2083  	NullFields []string `json:"-"`
  2084  }
  2085  
  2086  func (s *ExecuteSqlRequest) MarshalJSON() ([]byte, error) {
  2087  	type NoMethod ExecuteSqlRequest
  2088  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2089  }
  2090  
  2091  // Expr: Represents a textual expression in the Common Expression Language
  2092  // (CEL) syntax. CEL is a C-like expression language. The syntax and semantics
  2093  // of CEL are documented at https://github.com/google/cel-spec. Example
  2094  // (Comparison): title: "Summary size limit" description: "Determines if a
  2095  // summary is less than 100 chars" expression: "document.summary.size() < 100"
  2096  // Example (Equality): title: "Requestor is owner" description: "Determines if
  2097  // requestor is the document owner" expression: "document.owner ==
  2098  // request.auth.claims.email" Example (Logic): title: "Public documents"
  2099  // description: "Determine whether the document should be publicly visible"
  2100  // expression: "document.type != 'private' && document.type != 'internal'"
  2101  // Example (Data Manipulation): title: "Notification string" description:
  2102  // "Create a notification string with a timestamp." expression: "'New message
  2103  // received at ' + string(document.create_time)" The exact variables and
  2104  // functions that may be referenced within an expression are determined by the
  2105  // service that evaluates it. See the service documentation for additional
  2106  // information.
  2107  type Expr struct {
  2108  	// Description: Optional. Description of the expression. This is a longer text
  2109  	// which describes the expression, e.g. when hovered over it in a UI.
  2110  	Description string `json:"description,omitempty"`
  2111  	// Expression: Textual representation of an expression in Common Expression
  2112  	// Language syntax.
  2113  	Expression string `json:"expression,omitempty"`
  2114  	// Location: Optional. String indicating the location of the expression for
  2115  	// error reporting, e.g. a file name and a position in the file.
  2116  	Location string `json:"location,omitempty"`
  2117  	// Title: Optional. Title for the expression, i.e. a short string describing
  2118  	// its purpose. This can be used e.g. in UIs which allow to enter the
  2119  	// expression.
  2120  	Title string `json:"title,omitempty"`
  2121  	// ForceSendFields is a list of field names (e.g. "Description") to
  2122  	// unconditionally include in API requests. By default, fields with empty or
  2123  	// default values are omitted from API requests. See
  2124  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2125  	// details.
  2126  	ForceSendFields []string `json:"-"`
  2127  	// NullFields is a list of field names (e.g. "Description") to include in API
  2128  	// requests with the JSON null value. By default, fields with empty values are
  2129  	// omitted from API requests. See
  2130  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2131  	NullFields []string `json:"-"`
  2132  }
  2133  
  2134  func (s *Expr) MarshalJSON() ([]byte, error) {
  2135  	type NoMethod Expr
  2136  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2137  }
  2138  
  2139  // Field: Message representing a single field of a struct.
  2140  type Field struct {
  2141  	// Name: The name of the field. For reads, this is the column name. For SQL
  2142  	// queries, it is the column alias (e.g., "Word" in the query "SELECT
  2143  	// 'hello' AS Word"), or the column name (e.g., "ColName" in the query
  2144  	// "SELECT ColName FROM Table"). Some columns might have an empty name (e.g.,
  2145  	// "SELECT UPPER(ColName)"). Note that a query result can contain multiple
  2146  	// fields with the same name.
  2147  	Name string `json:"name,omitempty"`
  2148  	// Type: The type of the field.
  2149  	Type *Type `json:"type,omitempty"`
  2150  	// ForceSendFields is a list of field names (e.g. "Name") to unconditionally
  2151  	// include in API requests. By default, fields with empty or default values are
  2152  	// omitted from API requests. See
  2153  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2154  	// details.
  2155  	ForceSendFields []string `json:"-"`
  2156  	// NullFields is a list of field names (e.g. "Name") to include in API requests
  2157  	// with the JSON null value. By default, fields with empty values are omitted
  2158  	// from API requests. See
  2159  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2160  	NullFields []string `json:"-"`
  2161  }
  2162  
  2163  func (s *Field) MarshalJSON() ([]byte, error) {
  2164  	type NoMethod Field
  2165  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2166  }
  2167  
  2168  // FreeInstanceMetadata: Free instance specific metadata that is kept even
  2169  // after an instance has been upgraded for tracking purposes.
  2170  type FreeInstanceMetadata struct {
  2171  	// ExpireBehavior: Specifies the expiration behavior of a free instance. The
  2172  	// default of ExpireBehavior is `REMOVE_AFTER_GRACE_PERIOD`. This can be
  2173  	// modified during or after creation, and before expiration.
  2174  	//
  2175  	// Possible values:
  2176  	//   "EXPIRE_BEHAVIOR_UNSPECIFIED" - Not specified.
  2177  	//   "FREE_TO_PROVISIONED" - When the free instance expires, upgrade the
  2178  	// instance to a provisioned instance.
  2179  	//   "REMOVE_AFTER_GRACE_PERIOD" - When the free instance expires, disable the
  2180  	// instance, and delete it after the grace period passes if it has not been
  2181  	// upgraded.
  2182  	ExpireBehavior string `json:"expireBehavior,omitempty"`
  2183  	// ExpireTime: Output only. Timestamp after which the instance will either be
  2184  	// upgraded or scheduled for deletion after a grace period. ExpireBehavior is
  2185  	// used to choose between upgrading or scheduling the free instance for
  2186  	// deletion. This timestamp is set during the creation of a free instance.
  2187  	ExpireTime string `json:"expireTime,omitempty"`
  2188  	// UpgradeTime: Output only. If present, the timestamp at which the free
  2189  	// instance was upgraded to a provisioned instance.
  2190  	UpgradeTime string `json:"upgradeTime,omitempty"`
  2191  	// ForceSendFields is a list of field names (e.g. "ExpireBehavior") to
  2192  	// unconditionally include in API requests. By default, fields with empty or
  2193  	// default values are omitted from API requests. See
  2194  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2195  	// details.
  2196  	ForceSendFields []string `json:"-"`
  2197  	// NullFields is a list of field names (e.g. "ExpireBehavior") to include in
  2198  	// API requests with the JSON null value. By default, fields with empty values
  2199  	// are omitted from API requests. See
  2200  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2201  	NullFields []string `json:"-"`
  2202  }
  2203  
  2204  func (s *FreeInstanceMetadata) MarshalJSON() ([]byte, error) {
  2205  	type NoMethod FreeInstanceMetadata
  2206  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2207  }
  2208  
  2209  // GetDatabaseDdlResponse: The response for GetDatabaseDdl.
  2210  type GetDatabaseDdlResponse struct {
  2211  	// ProtoDescriptors: Proto descriptors stored in the database. Contains a
  2212  	// protobuf-serialized google.protobuf.FileDescriptorSet
  2213  	// (https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto).
  2214  	// For more details, see protobuffer self description
  2215  	// (https://developers.google.com/protocol-buffers/docs/techniques#self-description).
  2216  	ProtoDescriptors string `json:"protoDescriptors,omitempty"`
  2217  	// Statements: A list of formatted DDL statements defining the schema of the
  2218  	// database specified in the request.
  2219  	Statements []string `json:"statements,omitempty"`
  2220  
  2221  	// ServerResponse contains the HTTP response code and headers from the server.
  2222  	googleapi.ServerResponse `json:"-"`
  2223  	// ForceSendFields is a list of field names (e.g. "ProtoDescriptors") to
  2224  	// unconditionally include in API requests. By default, fields with empty or
  2225  	// default values are omitted from API requests. See
  2226  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2227  	// details.
  2228  	ForceSendFields []string `json:"-"`
  2229  	// NullFields is a list of field names (e.g. "ProtoDescriptors") to include in
  2230  	// API requests with the JSON null value. By default, fields with empty values
  2231  	// are omitted from API requests. See
  2232  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2233  	NullFields []string `json:"-"`
  2234  }
  2235  
  2236  func (s *GetDatabaseDdlResponse) MarshalJSON() ([]byte, error) {
  2237  	type NoMethod GetDatabaseDdlResponse
  2238  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2239  }
  2240  
  2241  // GetIamPolicyRequest: Request message for `GetIamPolicy` method.
  2242  type GetIamPolicyRequest struct {
  2243  	// Options: OPTIONAL: A `GetPolicyOptions` object for specifying options to
  2244  	// `GetIamPolicy`.
  2245  	Options *GetPolicyOptions `json:"options,omitempty"`
  2246  	// ForceSendFields is a list of field names (e.g. "Options") to unconditionally
  2247  	// include in API requests. By default, fields with empty or default values are
  2248  	// omitted from API requests. See
  2249  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2250  	// details.
  2251  	ForceSendFields []string `json:"-"`
  2252  	// NullFields is a list of field names (e.g. "Options") to include in API
  2253  	// requests with the JSON null value. By default, fields with empty values are
  2254  	// omitted from API requests. See
  2255  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2256  	NullFields []string `json:"-"`
  2257  }
  2258  
  2259  func (s *GetIamPolicyRequest) MarshalJSON() ([]byte, error) {
  2260  	type NoMethod GetIamPolicyRequest
  2261  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2262  }
  2263  
  2264  // GetPolicyOptions: Encapsulates settings provided to GetIamPolicy.
  2265  type GetPolicyOptions struct {
  2266  	// RequestedPolicyVersion: Optional. The maximum policy version that will be
  2267  	// used to format the policy. Valid values are 0, 1, and 3. Requests specifying
  2268  	// an invalid value will be rejected. Requests for policies with any
  2269  	// conditional role bindings must specify version 3. Policies with no
  2270  	// conditional role bindings may specify any valid value or leave the field
  2271  	// unset. The policy in the response might use the policy version that you
  2272  	// specified, or it might use a lower policy version. For example, if you
  2273  	// specify version 3, but the policy has no conditional role bindings, the
  2274  	// response uses version 1. To learn which resources support conditions in
  2275  	// their IAM policies, see the IAM documentation
  2276  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
  2277  	RequestedPolicyVersion int64 `json:"requestedPolicyVersion,omitempty"`
  2278  	// ForceSendFields is a list of field names (e.g. "RequestedPolicyVersion") to
  2279  	// unconditionally include in API requests. By default, fields with empty or
  2280  	// default values are omitted from API requests. See
  2281  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2282  	// details.
  2283  	ForceSendFields []string `json:"-"`
  2284  	// NullFields is a list of field names (e.g. "RequestedPolicyVersion") to
  2285  	// include in API requests with the JSON null value. By default, fields with
  2286  	// empty values are omitted from API requests. See
  2287  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2288  	NullFields []string `json:"-"`
  2289  }
  2290  
  2291  func (s *GetPolicyOptions) MarshalJSON() ([]byte, error) {
  2292  	type NoMethod GetPolicyOptions
  2293  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2294  }
  2295  
  2296  // IncludeReplicas: An IncludeReplicas contains a repeated set of
  2297  // ReplicaSelection which indicates the order in which replicas should be
  2298  // considered.
  2299  type IncludeReplicas struct {
  2300  	// AutoFailoverDisabled: If true, Spanner will not route requests to a replica
  2301  	// outside the include_replicas list when all of the specified replicas are
  2302  	// unavailable or unhealthy. Default value is `false`.
  2303  	AutoFailoverDisabled bool `json:"autoFailoverDisabled,omitempty"`
  2304  	// ReplicaSelections: The directed read replica selector.
  2305  	ReplicaSelections []*ReplicaSelection `json:"replicaSelections,omitempty"`
  2306  	// ForceSendFields is a list of field names (e.g. "AutoFailoverDisabled") to
  2307  	// unconditionally include in API requests. By default, fields with empty or
  2308  	// default values are omitted from API requests. See
  2309  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2310  	// details.
  2311  	ForceSendFields []string `json:"-"`
  2312  	// NullFields is a list of field names (e.g. "AutoFailoverDisabled") to include
  2313  	// in API requests with the JSON null value. By default, fields with empty
  2314  	// values are omitted from API requests. See
  2315  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2316  	NullFields []string `json:"-"`
  2317  }
  2318  
  2319  func (s *IncludeReplicas) MarshalJSON() ([]byte, error) {
  2320  	type NoMethod IncludeReplicas
  2321  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2322  }
  2323  
  2324  // IndexAdvice: Recommendation to add new indexes to run queries more
  2325  // efficiently.
  2326  type IndexAdvice struct {
  2327  	// Ddl: Optional. DDL statements to add new indexes that will improve the
  2328  	// query.
  2329  	Ddl []string `json:"ddl,omitempty"`
  2330  	// ImprovementFactor: Optional. Estimated latency improvement factor. For
  2331  	// example if the query currently takes 500 ms to run and the estimated latency
  2332  	// with new indexes is 100 ms this field will be 5.
  2333  	ImprovementFactor float64 `json:"improvementFactor,omitempty"`
  2334  	// ForceSendFields is a list of field names (e.g. "Ddl") to unconditionally
  2335  	// include in API requests. By default, fields with empty or default values are
  2336  	// omitted from API requests. See
  2337  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2338  	// details.
  2339  	ForceSendFields []string `json:"-"`
  2340  	// NullFields is a list of field names (e.g. "Ddl") to include in API requests
  2341  	// with the JSON null value. By default, fields with empty values are omitted
  2342  	// from API requests. See
  2343  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2344  	NullFields []string `json:"-"`
  2345  }
  2346  
  2347  func (s *IndexAdvice) MarshalJSON() ([]byte, error) {
  2348  	type NoMethod IndexAdvice
  2349  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2350  }
  2351  
  2352  func (s *IndexAdvice) UnmarshalJSON(data []byte) error {
  2353  	type NoMethod IndexAdvice
  2354  	var s1 struct {
  2355  		ImprovementFactor gensupport.JSONFloat64 `json:"improvementFactor"`
  2356  		*NoMethod
  2357  	}
  2358  	s1.NoMethod = (*NoMethod)(s)
  2359  	if err := json.Unmarshal(data, &s1); err != nil {
  2360  		return err
  2361  	}
  2362  	s.ImprovementFactor = float64(s1.ImprovementFactor)
  2363  	return nil
  2364  }
  2365  
  2366  // IndexedHotKey: A message representing a (sparse) collection of hot keys for
  2367  // specific key buckets.
  2368  type IndexedHotKey struct {
  2369  	// SparseHotKeys: A (sparse) mapping from key bucket index to the index of the
  2370  	// specific hot row key for that key bucket. The index of the hot row key can
  2371  	// be translated to the actual row key via the
  2372  	// ScanData.VisualizationData.indexed_keys repeated field.
  2373  	SparseHotKeys map[string]int64 `json:"sparseHotKeys,omitempty"`
  2374  	// ForceSendFields is a list of field names (e.g. "SparseHotKeys") to
  2375  	// unconditionally include in API requests. By default, fields with empty or
  2376  	// default values are omitted from API requests. See
  2377  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2378  	// details.
  2379  	ForceSendFields []string `json:"-"`
  2380  	// NullFields is a list of field names (e.g. "SparseHotKeys") to include in API
  2381  	// requests with the JSON null value. By default, fields with empty values are
  2382  	// omitted from API requests. See
  2383  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2384  	NullFields []string `json:"-"`
  2385  }
  2386  
  2387  func (s *IndexedHotKey) MarshalJSON() ([]byte, error) {
  2388  	type NoMethod IndexedHotKey
  2389  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2390  }
  2391  
  2392  // IndexedKeyRangeInfos: A message representing a (sparse) collection of
  2393  // KeyRangeInfos for specific key buckets.
  2394  type IndexedKeyRangeInfos struct {
  2395  	// KeyRangeInfos: A (sparse) mapping from key bucket index to the KeyRangeInfos
  2396  	// for that key bucket.
  2397  	KeyRangeInfos map[string]KeyRangeInfos `json:"keyRangeInfos,omitempty"`
  2398  	// ForceSendFields is a list of field names (e.g. "KeyRangeInfos") to
  2399  	// unconditionally include in API requests. By default, fields with empty or
  2400  	// default values are omitted from API requests. See
  2401  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2402  	// details.
  2403  	ForceSendFields []string `json:"-"`
  2404  	// NullFields is a list of field names (e.g. "KeyRangeInfos") to include in API
  2405  	// requests with the JSON null value. By default, fields with empty values are
  2406  	// omitted from API requests. See
  2407  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2408  	NullFields []string `json:"-"`
  2409  }
  2410  
  2411  func (s *IndexedKeyRangeInfos) MarshalJSON() ([]byte, error) {
  2412  	type NoMethod IndexedKeyRangeInfos
  2413  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2414  }
  2415  
  2416  // Instance: An isolated set of Cloud Spanner resources on which databases can
  2417  // be hosted.
  2418  type Instance struct {
  2419  	// AutoscalingConfig: Optional. The autoscaling configuration. Autoscaling is
  2420  	// enabled if this field is set. When autoscaling is enabled, node_count and
  2421  	// processing_units are treated as OUTPUT_ONLY fields and reflect the current
  2422  	// compute capacity allocated to the instance.
  2423  	AutoscalingConfig *AutoscalingConfig `json:"autoscalingConfig,omitempty"`
  2424  	// Config: Required. The name of the instance's configuration. Values are of
  2425  	// the form `projects//instanceConfigs/`. See also InstanceConfig and
  2426  	// ListInstanceConfigs.
  2427  	Config string `json:"config,omitempty"`
  2428  	// CreateTime: Output only. The time at which the instance was created.
  2429  	CreateTime string `json:"createTime,omitempty"`
  2430  	// DisplayName: Required. The descriptive name for this instance as it appears
  2431  	// in UIs. Must be unique per project and between 4 and 30 characters in
  2432  	// length.
  2433  	DisplayName string `json:"displayName,omitempty"`
  2434  	// EndpointUris: Deprecated. This field is not populated.
  2435  	EndpointUris []string `json:"endpointUris,omitempty"`
  2436  	// FreeInstanceMetadata: Free instance metadata. Only populated for free
  2437  	// instances.
  2438  	FreeInstanceMetadata *FreeInstanceMetadata `json:"freeInstanceMetadata,omitempty"`
  2439  	// InstanceType: The `InstanceType` of the current instance.
  2440  	//
  2441  	// Possible values:
  2442  	//   "INSTANCE_TYPE_UNSPECIFIED" - Not specified.
  2443  	//   "PROVISIONED" - Provisioned instances have dedicated resources, standard
  2444  	// usage limits and support.
  2445  	//   "FREE_INSTANCE" - Free instances provide no guarantee for dedicated
  2446  	// resources, [node_count, processing_units] should be 0. They come with
  2447  	// stricter usage limits and limited support.
  2448  	InstanceType string `json:"instanceType,omitempty"`
  2449  	// Labels: Cloud Labels are a flexible and lightweight mechanism for organizing
  2450  	// cloud resources into groups that reflect a customer's organizational needs
  2451  	// and deployment strategies. Cloud Labels can be used to filter collections of
  2452  	// resources. They can be used to control how resource metrics are aggregated.
  2453  	// And they can be used as arguments to policy management rules (e.g. route,
  2454  	// firewall, load balancing, etc.). * Label keys must be between 1 and 63
  2455  	// characters long and must conform to the following regular expression:
  2456  	// `a-z{0,62}`. * Label values must be between 0 and 63 characters long and
  2457  	// must conform to the regular expression `[a-z0-9_-]{0,63}`. * No more than 64
  2458  	// labels can be associated with a given resource. See https://goo.gl/xmQnxf
  2459  	// for more information on and examples of labels. If you plan to use labels in
  2460  	// your own code, please note that additional characters may be allowed in the
  2461  	// future. And so you are advised to use an internal label representation, such
  2462  	// as JSON, which doesn't rely upon specific characters being disallowed. For
  2463  	// example, representing labels as the string: name + "_" + value would prove
  2464  	// problematic if we were to allow "_" in a future release.
  2465  	Labels map[string]string `json:"labels,omitempty"`
  2466  	// Name: Required. A unique identifier for the instance, which cannot be
  2467  	// changed after the instance is created. Values are of the form
  2468  	// `projects//instances/a-z*[a-z0-9]`. The final segment of the name must be
  2469  	// between 2 and 64 characters in length.
  2470  	Name string `json:"name,omitempty"`
  2471  	// NodeCount: The number of nodes allocated to this instance. At most one of
  2472  	// either node_count or processing_units should be present in the message.
  2473  	// Users can set the node_count field to specify the target number of nodes
  2474  	// allocated to the instance. This may be zero in API responses for instances
  2475  	// that are not yet in state `READY`. See the documentation
  2476  	// (https://cloud.google.com/spanner/docs/compute-capacity) for more
  2477  	// information about nodes and processing units.
  2478  	NodeCount int64 `json:"nodeCount,omitempty"`
  2479  	// ProcessingUnits: The number of processing units allocated to this instance.
  2480  	// At most one of processing_units or node_count should be present in the
  2481  	// message. Users can set the processing_units field to specify the target
  2482  	// number of processing units allocated to the instance. This may be zero in
  2483  	// API responses for instances that are not yet in state `READY`. See the
  2484  	// documentation (https://cloud.google.com/spanner/docs/compute-capacity) for
  2485  	// more information about nodes and processing units.
  2486  	ProcessingUnits int64 `json:"processingUnits,omitempty"`
  2487  	// State: Output only. The current instance state. For CreateInstance, the
  2488  	// state must be either omitted or set to `CREATING`. For UpdateInstance, the
  2489  	// state must be either omitted or set to `READY`.
  2490  	//
  2491  	// Possible values:
  2492  	//   "STATE_UNSPECIFIED" - Not specified.
  2493  	//   "CREATING" - The instance is still being created. Resources may not be
  2494  	// available yet, and operations such as database creation may not work.
  2495  	//   "READY" - The instance is fully created and ready to do work such as
  2496  	// creating databases.
  2497  	State string `json:"state,omitempty"`
  2498  	// UpdateTime: Output only. The time at which the instance was most recently
  2499  	// updated.
  2500  	UpdateTime string `json:"updateTime,omitempty"`
  2501  
  2502  	// ServerResponse contains the HTTP response code and headers from the server.
  2503  	googleapi.ServerResponse `json:"-"`
  2504  	// ForceSendFields is a list of field names (e.g. "AutoscalingConfig") to
  2505  	// unconditionally include in API requests. By default, fields with empty or
  2506  	// default values are omitted from API requests. See
  2507  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2508  	// details.
  2509  	ForceSendFields []string `json:"-"`
  2510  	// NullFields is a list of field names (e.g. "AutoscalingConfig") to include in
  2511  	// API requests with the JSON null value. By default, fields with empty values
  2512  	// are omitted from API requests. See
  2513  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2514  	NullFields []string `json:"-"`
  2515  }
  2516  
  2517  func (s *Instance) MarshalJSON() ([]byte, error) {
  2518  	type NoMethod Instance
  2519  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2520  }
  2521  
  2522  // InstanceConfig: A possible configuration for a Cloud Spanner instance.
  2523  // Configurations define the geographic placement of nodes and their
  2524  // replication.
  2525  type InstanceConfig struct {
  2526  	// BaseConfig: Base configuration name, e.g. projects//instanceConfigs/nam3,
  2527  	// based on which this configuration is created. Only set for user managed
  2528  	// configurations. `base_config` must refer to a configuration of type
  2529  	// GOOGLE_MANAGED in the same project as this configuration.
  2530  	BaseConfig string `json:"baseConfig,omitempty"`
  2531  	// ConfigType: Output only. Whether this instance config is a Google or User
  2532  	// Managed Configuration.
  2533  	//
  2534  	// Possible values:
  2535  	//   "TYPE_UNSPECIFIED" - Unspecified.
  2536  	//   "GOOGLE_MANAGED" - Google managed configuration.
  2537  	//   "USER_MANAGED" - User managed configuration.
  2538  	ConfigType string `json:"configType,omitempty"`
  2539  	// DisplayName: The name of this instance configuration as it appears in UIs.
  2540  	DisplayName string `json:"displayName,omitempty"`
  2541  	// Etag: etag is used for optimistic concurrency control as a way to help
  2542  	// prevent simultaneous updates of a instance config from overwriting each
  2543  	// other. It is strongly suggested that systems make use of the etag in the
  2544  	// read-modify-write cycle to perform instance config updates in order to avoid
  2545  	// race conditions: An etag is returned in the response which contains instance
  2546  	// configs, and systems are expected to put that etag in the request to update
  2547  	// instance config to ensure that their change will be applied to the same
  2548  	// version of the instance config. If no etag is provided in the call to update
  2549  	// instance config, then the existing instance config is overwritten blindly.
  2550  	Etag string `json:"etag,omitempty"`
  2551  	// FreeInstanceAvailability: Output only. Describes whether free instances are
  2552  	// available to be created in this instance config.
  2553  	//
  2554  	// Possible values:
  2555  	//   "FREE_INSTANCE_AVAILABILITY_UNSPECIFIED" - Not specified.
  2556  	//   "AVAILABLE" - Indicates that free instances are available to be created in
  2557  	// this instance config.
  2558  	//   "UNSUPPORTED" - Indicates that free instances are not supported in this
  2559  	// instance config.
  2560  	//   "DISABLED" - Indicates that free instances are currently not available to
  2561  	// be created in this instance config.
  2562  	//   "QUOTA_EXCEEDED" - Indicates that additional free instances cannot be
  2563  	// created in this instance config because the project has reached its limit of
  2564  	// free instances.
  2565  	FreeInstanceAvailability string `json:"freeInstanceAvailability,omitempty"`
  2566  	// Labels: Cloud Labels are a flexible and lightweight mechanism for organizing
  2567  	// cloud resources into groups that reflect a customer's organizational needs
  2568  	// and deployment strategies. Cloud Labels can be used to filter collections of
  2569  	// resources. They can be used to control how resource metrics are aggregated.
  2570  	// And they can be used as arguments to policy management rules (e.g. route,
  2571  	// firewall, load balancing, etc.). * Label keys must be between 1 and 63
  2572  	// characters long and must conform to the following regular expression:
  2573  	// `a-z{0,62}`. * Label values must be between 0 and 63 characters long and
  2574  	// must conform to the regular expression `[a-z0-9_-]{0,63}`. * No more than 64
  2575  	// labels can be associated with a given resource. See https://goo.gl/xmQnxf
  2576  	// for more information on and examples of labels. If you plan to use labels in
  2577  	// your own code, please note that additional characters may be allowed in the
  2578  	// future. Therefore, you are advised to use an internal label representation,
  2579  	// such as JSON, which doesn't rely upon specific characters being disallowed.
  2580  	// For example, representing labels as the string: name + "_" + value would
  2581  	// prove problematic if we were to allow "_" in a future release.
  2582  	Labels map[string]string `json:"labels,omitempty"`
  2583  	// LeaderOptions: Allowed values of the "default_leader" schema option for
  2584  	// databases in instances that use this instance configuration.
  2585  	LeaderOptions []string `json:"leaderOptions,omitempty"`
  2586  	// Name: A unique identifier for the instance configuration. Values are of the
  2587  	// form `projects//instanceConfigs/a-z*`.
  2588  	Name string `json:"name,omitempty"`
  2589  	// OptionalReplicas: Output only. The available optional replicas to choose
  2590  	// from for user managed configurations. Populated for Google managed
  2591  	// configurations.
  2592  	OptionalReplicas []*ReplicaInfo `json:"optionalReplicas,omitempty"`
  2593  	// Reconciling: Output only. If true, the instance config is being created or
  2594  	// updated. If false, there are no ongoing operations for the instance config.
  2595  	Reconciling bool `json:"reconciling,omitempty"`
  2596  	// Replicas: The geographic placement of nodes in this instance configuration
  2597  	// and their replication properties.
  2598  	Replicas []*ReplicaInfo `json:"replicas,omitempty"`
  2599  	// State: Output only. The current instance config state. Applicable only for
  2600  	// USER_MANAGED configs.
  2601  	//
  2602  	// Possible values:
  2603  	//   "STATE_UNSPECIFIED" - Not specified.
  2604  	//   "CREATING" - The instance config is still being created.
  2605  	//   "READY" - The instance config is fully created and ready to be used to
  2606  	// create instances.
  2607  	State string `json:"state,omitempty"`
  2608  	// StorageLimitPerProcessingUnit: Output only. The storage limit in bytes per
  2609  	// processing unit.
  2610  	StorageLimitPerProcessingUnit int64 `json:"storageLimitPerProcessingUnit,omitempty,string"`
  2611  
  2612  	// ServerResponse contains the HTTP response code and headers from the server.
  2613  	googleapi.ServerResponse `json:"-"`
  2614  	// ForceSendFields is a list of field names (e.g. "BaseConfig") to
  2615  	// unconditionally include in API requests. By default, fields with empty or
  2616  	// default values are omitted from API requests. See
  2617  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2618  	// details.
  2619  	ForceSendFields []string `json:"-"`
  2620  	// NullFields is a list of field names (e.g. "BaseConfig") to include in API
  2621  	// requests with the JSON null value. By default, fields with empty values are
  2622  	// omitted from API requests. See
  2623  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2624  	NullFields []string `json:"-"`
  2625  }
  2626  
  2627  func (s *InstanceConfig) MarshalJSON() ([]byte, error) {
  2628  	type NoMethod InstanceConfig
  2629  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2630  }
  2631  
  2632  // InstanceOperationProgress: Encapsulates progress related information for a
  2633  // Cloud Spanner long running instance operations.
  2634  type InstanceOperationProgress struct {
  2635  	// EndTime: If set, the time at which this operation failed or was completed
  2636  	// successfully.
  2637  	EndTime string `json:"endTime,omitempty"`
  2638  	// ProgressPercent: Percent completion of the operation. Values are between 0
  2639  	// and 100 inclusive.
  2640  	ProgressPercent int64 `json:"progressPercent,omitempty"`
  2641  	// StartTime: Time the request was received.
  2642  	StartTime string `json:"startTime,omitempty"`
  2643  	// ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally
  2644  	// include in API requests. By default, fields with empty or default values are
  2645  	// omitted from API requests. See
  2646  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2647  	// details.
  2648  	ForceSendFields []string `json:"-"`
  2649  	// NullFields is a list of field names (e.g. "EndTime") to include in API
  2650  	// requests with the JSON null value. By default, fields with empty values are
  2651  	// omitted from API requests. See
  2652  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2653  	NullFields []string `json:"-"`
  2654  }
  2655  
  2656  func (s *InstanceOperationProgress) MarshalJSON() ([]byte, error) {
  2657  	type NoMethod InstanceOperationProgress
  2658  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2659  }
  2660  
  2661  // InstancePartition: An isolated set of Cloud Spanner resources that databases
  2662  // can define placements on.
  2663  type InstancePartition struct {
  2664  	// Config: Required. The name of the instance partition's configuration. Values
  2665  	// are of the form `projects//instanceConfigs/`. See also InstanceConfig and
  2666  	// ListInstanceConfigs.
  2667  	Config string `json:"config,omitempty"`
  2668  	// CreateTime: Output only. The time at which the instance partition was
  2669  	// created.
  2670  	CreateTime string `json:"createTime,omitempty"`
  2671  	// DisplayName: Required. The descriptive name for this instance partition as
  2672  	// it appears in UIs. Must be unique per project and between 4 and 30
  2673  	// characters in length.
  2674  	DisplayName string `json:"displayName,omitempty"`
  2675  	// Etag: Used for optimistic concurrency control as a way to help prevent
  2676  	// simultaneous updates of a instance partition from overwriting each other. It
  2677  	// is strongly suggested that systems make use of the etag in the
  2678  	// read-modify-write cycle to perform instance partition updates in order to
  2679  	// avoid race conditions: An etag is returned in the response which contains
  2680  	// instance partitions, and systems are expected to put that etag in the
  2681  	// request to update instance partitions to ensure that their change will be
  2682  	// applied to the same version of the instance partition. If no etag is
  2683  	// provided in the call to update instance partition, then the existing
  2684  	// instance partition is overwritten blindly.
  2685  	Etag string `json:"etag,omitempty"`
  2686  	// Name: Required. A unique identifier for the instance partition. Values are
  2687  	// of the form `projects//instances//instancePartitions/a-z*[a-z0-9]`. The
  2688  	// final segment of the name must be between 2 and 64 characters in length. An
  2689  	// instance partition's name cannot be changed after the instance partition is
  2690  	// created.
  2691  	Name string `json:"name,omitempty"`
  2692  	// NodeCount: The number of nodes allocated to this instance partition. Users
  2693  	// can set the node_count field to specify the target number of nodes allocated
  2694  	// to the instance partition. This may be zero in API responses for instance
  2695  	// partitions that are not yet in state `READY`.
  2696  	NodeCount int64 `json:"nodeCount,omitempty"`
  2697  	// ProcessingUnits: The number of processing units allocated to this instance
  2698  	// partition. Users can set the processing_units field to specify the target
  2699  	// number of processing units allocated to the instance partition. This may be
  2700  	// zero in API responses for instance partitions that are not yet in state
  2701  	// `READY`.
  2702  	ProcessingUnits int64 `json:"processingUnits,omitempty"`
  2703  	// ReferencingBackups: Output only. The names of the backups that reference
  2704  	// this instance partition. Referencing backups should share the parent
  2705  	// instance. The existence of any referencing backup prevents the instance
  2706  	// partition from being deleted.
  2707  	ReferencingBackups []string `json:"referencingBackups,omitempty"`
  2708  	// ReferencingDatabases: Output only. The names of the databases that reference
  2709  	// this instance partition. Referencing databases should share the parent
  2710  	// instance. The existence of any referencing database prevents the instance
  2711  	// partition from being deleted.
  2712  	ReferencingDatabases []string `json:"referencingDatabases,omitempty"`
  2713  	// State: Output only. The current instance partition state.
  2714  	//
  2715  	// Possible values:
  2716  	//   "STATE_UNSPECIFIED" - Not specified.
  2717  	//   "CREATING" - The instance partition is still being created. Resources may
  2718  	// not be available yet, and operations such as creating placements using this
  2719  	// instance partition may not work.
  2720  	//   "READY" - The instance partition is fully created and ready to do work
  2721  	// such as creating placements and using in databases.
  2722  	State string `json:"state,omitempty"`
  2723  	// UpdateTime: Output only. The time at which the instance partition was most
  2724  	// recently updated.
  2725  	UpdateTime string `json:"updateTime,omitempty"`
  2726  
  2727  	// ServerResponse contains the HTTP response code and headers from the server.
  2728  	googleapi.ServerResponse `json:"-"`
  2729  	// ForceSendFields is a list of field names (e.g. "Config") to unconditionally
  2730  	// include in API requests. By default, fields with empty or default values are
  2731  	// omitted from API requests. See
  2732  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2733  	// details.
  2734  	ForceSendFields []string `json:"-"`
  2735  	// NullFields is a list of field names (e.g. "Config") to include in API
  2736  	// requests with the JSON null value. By default, fields with empty values are
  2737  	// omitted from API requests. See
  2738  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2739  	NullFields []string `json:"-"`
  2740  }
  2741  
  2742  func (s *InstancePartition) MarshalJSON() ([]byte, error) {
  2743  	type NoMethod InstancePartition
  2744  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2745  }
  2746  
  2747  // KeyRange: KeyRange represents a range of rows in a table or index. A range
  2748  // has a start key and an end key. These keys can be open or closed, indicating
  2749  // if the range includes rows with that key. Keys are represented by lists,
  2750  // where the ith value in the list corresponds to the ith component of the
  2751  // table or index primary key. Individual values are encoded as described here.
  2752  // For example, consider the following table definition: CREATE TABLE
  2753  // UserEvents ( UserName STRING(MAX), EventDate STRING(10) ) PRIMARY
  2754  // KEY(UserName, EventDate); The following keys name rows in this table: "Bob",
  2755  // "2014-09-23" Since the `UserEvents` table's `PRIMARY KEY` clause names two
  2756  // columns, each `UserEvents` key has two elements; the first is the
  2757  // `UserName`, and the second is the `EventDate`. Key ranges with multiple
  2758  // components are interpreted lexicographically by component using the table or
  2759  // index key's declared sort order. For example, the following range returns
  2760  // all events for user "Bob" that occurred in the year 2015: "start_closed":
  2761  // ["Bob", "2015-01-01"] "end_closed": ["Bob", "2015-12-31"] Start and end keys
  2762  // can omit trailing key components. This affects the inclusion and exclusion
  2763  // of rows that exactly match the provided key components: if the key is
  2764  // closed, then rows that exactly match the provided components are included;
  2765  // if the key is open, then rows that exactly match are not included. For
  2766  // example, the following range includes all events for "Bob" that occurred
  2767  // during and after the year 2000: "start_closed": ["Bob", "2000-01-01"]
  2768  // "end_closed": ["Bob"] The next example retrieves all events for "Bob":
  2769  // "start_closed": ["Bob"] "end_closed": ["Bob"] To retrieve events before the
  2770  // year 2000: "start_closed": ["Bob"] "end_open": ["Bob", "2000-01-01"] The
  2771  // following range includes all rows in the table: "start_closed": []
  2772  // "end_closed": [] This range returns all users whose `UserName` begins with
  2773  // any character from A to C: "start_closed": ["A"] "end_open": ["D"] This
  2774  // range returns all users whose `UserName` begins with B: "start_closed":
  2775  // ["B"] "end_open": ["C"] Key ranges honor column sort order. For example,
  2776  // suppose a table is defined as follows: CREATE TABLE DescendingSortedTable {
  2777  // Key INT64, ... ) PRIMARY KEY(Key DESC); The following range retrieves all
  2778  // rows with key values between 1 and 100 inclusive: "start_closed": ["100"]
  2779  // "end_closed": ["1"] Note that 100 is passed as the start, and 1 is passed as
  2780  // the end, because `Key` is a descending column in the schema.
  2781  type KeyRange struct {
  2782  	// EndClosed: If the end is closed, then the range includes all rows whose
  2783  	// first `len(end_closed)` key columns exactly match `end_closed`.
  2784  	EndClosed []interface{} `json:"endClosed,omitempty"`
  2785  	// EndOpen: If the end is open, then the range excludes rows whose first
  2786  	// `len(end_open)` key columns exactly match `end_open`.
  2787  	EndOpen []interface{} `json:"endOpen,omitempty"`
  2788  	// StartClosed: If the start is closed, then the range includes all rows whose
  2789  	// first `len(start_closed)` key columns exactly match `start_closed`.
  2790  	StartClosed []interface{} `json:"startClosed,omitempty"`
  2791  	// StartOpen: If the start is open, then the range excludes rows whose first
  2792  	// `len(start_open)` key columns exactly match `start_open`.
  2793  	StartOpen []interface{} `json:"startOpen,omitempty"`
  2794  	// ForceSendFields is a list of field names (e.g. "EndClosed") to
  2795  	// unconditionally include in API requests. By default, fields with empty or
  2796  	// default values are omitted from API requests. See
  2797  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2798  	// details.
  2799  	ForceSendFields []string `json:"-"`
  2800  	// NullFields is a list of field names (e.g. "EndClosed") to include in API
  2801  	// requests with the JSON null value. By default, fields with empty values are
  2802  	// omitted from API requests. See
  2803  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2804  	NullFields []string `json:"-"`
  2805  }
  2806  
  2807  func (s *KeyRange) MarshalJSON() ([]byte, error) {
  2808  	type NoMethod KeyRange
  2809  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2810  }
  2811  
  2812  // KeyRangeInfo: A message representing information for a key range (possibly
  2813  // one key).
  2814  type KeyRangeInfo struct {
  2815  	// ContextValues: The list of context values for this key range.
  2816  	ContextValues []*ContextValue `json:"contextValues,omitempty"`
  2817  	// EndKeyIndex: The index of the end key in indexed_keys.
  2818  	EndKeyIndex int64 `json:"endKeyIndex,omitempty"`
  2819  	// Info: Information about this key range, for all metrics.
  2820  	Info *LocalizedString `json:"info,omitempty"`
  2821  	// KeysCount: The number of keys this range covers.
  2822  	KeysCount int64 `json:"keysCount,omitempty,string"`
  2823  	// Metric: The name of the metric. e.g. "latency".
  2824  	Metric *LocalizedString `json:"metric,omitempty"`
  2825  	// StartKeyIndex: The index of the start key in indexed_keys.
  2826  	StartKeyIndex int64 `json:"startKeyIndex,omitempty"`
  2827  	// TimeOffset: The time offset. This is the time since the start of the time
  2828  	// interval.
  2829  	TimeOffset string `json:"timeOffset,omitempty"`
  2830  	// Unit: The unit of the metric. This is an unstructured field and will be
  2831  	// mapped as is to the user.
  2832  	Unit *LocalizedString `json:"unit,omitempty"`
  2833  	// Value: The value of the metric.
  2834  	Value float64 `json:"value,omitempty"`
  2835  	// ForceSendFields is a list of field names (e.g. "ContextValues") to
  2836  	// unconditionally include in API requests. By default, fields with empty or
  2837  	// default values are omitted from API requests. See
  2838  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2839  	// details.
  2840  	ForceSendFields []string `json:"-"`
  2841  	// NullFields is a list of field names (e.g. "ContextValues") to include in API
  2842  	// requests with the JSON null value. By default, fields with empty values are
  2843  	// omitted from API requests. See
  2844  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2845  	NullFields []string `json:"-"`
  2846  }
  2847  
  2848  func (s *KeyRangeInfo) MarshalJSON() ([]byte, error) {
  2849  	type NoMethod KeyRangeInfo
  2850  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2851  }
  2852  
  2853  func (s *KeyRangeInfo) UnmarshalJSON(data []byte) error {
  2854  	type NoMethod KeyRangeInfo
  2855  	var s1 struct {
  2856  		Value gensupport.JSONFloat64 `json:"value"`
  2857  		*NoMethod
  2858  	}
  2859  	s1.NoMethod = (*NoMethod)(s)
  2860  	if err := json.Unmarshal(data, &s1); err != nil {
  2861  		return err
  2862  	}
  2863  	s.Value = float64(s1.Value)
  2864  	return nil
  2865  }
  2866  
  2867  // KeyRangeInfos: A message representing a list of specific information for
  2868  // multiple key ranges.
  2869  type KeyRangeInfos struct {
  2870  	// Infos: The list individual KeyRangeInfos.
  2871  	Infos []*KeyRangeInfo `json:"infos,omitempty"`
  2872  	// TotalSize: The total size of the list of all KeyRangeInfos. This may be
  2873  	// larger than the number of repeated messages above. If that is the case, this
  2874  	// number may be used to determine how many are not being shown.
  2875  	TotalSize int64 `json:"totalSize,omitempty"`
  2876  	// ForceSendFields is a list of field names (e.g. "Infos") to unconditionally
  2877  	// include in API requests. By default, fields with empty or default values are
  2878  	// omitted from API requests. See
  2879  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2880  	// details.
  2881  	ForceSendFields []string `json:"-"`
  2882  	// NullFields is a list of field names (e.g. "Infos") to include in API
  2883  	// requests with the JSON null value. By default, fields with empty values are
  2884  	// omitted from API requests. See
  2885  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2886  	NullFields []string `json:"-"`
  2887  }
  2888  
  2889  func (s *KeyRangeInfos) MarshalJSON() ([]byte, error) {
  2890  	type NoMethod KeyRangeInfos
  2891  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2892  }
  2893  
  2894  // KeySet: `KeySet` defines a collection of Cloud Spanner keys and/or key
  2895  // ranges. All the keys are expected to be in the same table or index. The keys
  2896  // need not be sorted in any particular way. If the same key is specified
  2897  // multiple times in the set (for example if two ranges, two keys, or a key and
  2898  // a range overlap), Cloud Spanner behaves as if the key were only specified
  2899  // once.
  2900  type KeySet struct {
  2901  	// All: For convenience `all` can be set to `true` to indicate that this
  2902  	// `KeySet` matches all keys in the table or index. Note that any keys
  2903  	// specified in `keys` or `ranges` are only yielded once.
  2904  	All bool `json:"all,omitempty"`
  2905  	// Keys: A list of specific keys. Entries in `keys` should have exactly as many
  2906  	// elements as there are columns in the primary or index key with which this
  2907  	// `KeySet` is used. Individual key values are encoded as described here.
  2908  	Keys [][]interface{} `json:"keys,omitempty"`
  2909  	// Ranges: A list of key ranges. See KeyRange for more information about key
  2910  	// range specifications.
  2911  	Ranges []*KeyRange `json:"ranges,omitempty"`
  2912  	// ForceSendFields is a list of field names (e.g. "All") to unconditionally
  2913  	// include in API requests. By default, fields with empty or default values are
  2914  	// omitted from API requests. See
  2915  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2916  	// details.
  2917  	ForceSendFields []string `json:"-"`
  2918  	// NullFields is a list of field names (e.g. "All") to include in API requests
  2919  	// with the JSON null value. By default, fields with empty values are omitted
  2920  	// from API requests. See
  2921  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2922  	NullFields []string `json:"-"`
  2923  }
  2924  
  2925  func (s *KeySet) MarshalJSON() ([]byte, error) {
  2926  	type NoMethod KeySet
  2927  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2928  }
  2929  
  2930  // ListBackupOperationsResponse: The response for ListBackupOperations.
  2931  type ListBackupOperationsResponse struct {
  2932  	// NextPageToken: `next_page_token` can be sent in a subsequent
  2933  	// ListBackupOperations call to fetch more of the matching metadata.
  2934  	NextPageToken string `json:"nextPageToken,omitempty"`
  2935  	// Operations: The list of matching backup long-running operations. Each
  2936  	// operation's name will be prefixed by the backup's name. The operation's
  2937  	// metadata field type `metadata.type_url` describes the type of the metadata.
  2938  	// Operations returned include those that are pending or have
  2939  	// completed/failed/canceled within the last 7 days. Operations returned are
  2940  	// ordered by `operation.metadata.value.progress.start_time` in descending
  2941  	// order starting from the most recently started operation.
  2942  	Operations []*Operation `json:"operations,omitempty"`
  2943  
  2944  	// ServerResponse contains the HTTP response code and headers from the server.
  2945  	googleapi.ServerResponse `json:"-"`
  2946  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  2947  	// unconditionally include in API requests. By default, fields with empty or
  2948  	// default values are omitted from API requests. See
  2949  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2950  	// details.
  2951  	ForceSendFields []string `json:"-"`
  2952  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  2953  	// requests with the JSON null value. By default, fields with empty values are
  2954  	// omitted from API requests. See
  2955  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2956  	NullFields []string `json:"-"`
  2957  }
  2958  
  2959  func (s *ListBackupOperationsResponse) MarshalJSON() ([]byte, error) {
  2960  	type NoMethod ListBackupOperationsResponse
  2961  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2962  }
  2963  
  2964  // ListBackupsResponse: The response for ListBackups.
  2965  type ListBackupsResponse struct {
  2966  	// Backups: The list of matching backups. Backups returned are ordered by
  2967  	// `create_time` in descending order, starting from the most recent
  2968  	// `create_time`.
  2969  	Backups []*Backup `json:"backups,omitempty"`
  2970  	// NextPageToken: `next_page_token` can be sent in a subsequent ListBackups
  2971  	// call to fetch more of the matching backups.
  2972  	NextPageToken string `json:"nextPageToken,omitempty"`
  2973  
  2974  	// ServerResponse contains the HTTP response code and headers from the server.
  2975  	googleapi.ServerResponse `json:"-"`
  2976  	// ForceSendFields is a list of field names (e.g. "Backups") to unconditionally
  2977  	// include in API requests. By default, fields with empty or default values are
  2978  	// omitted from API requests. See
  2979  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2980  	// details.
  2981  	ForceSendFields []string `json:"-"`
  2982  	// NullFields is a list of field names (e.g. "Backups") to include in API
  2983  	// requests with the JSON null value. By default, fields with empty values are
  2984  	// omitted from API requests. See
  2985  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2986  	NullFields []string `json:"-"`
  2987  }
  2988  
  2989  func (s *ListBackupsResponse) MarshalJSON() ([]byte, error) {
  2990  	type NoMethod ListBackupsResponse
  2991  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2992  }
  2993  
  2994  // ListDatabaseOperationsResponse: The response for ListDatabaseOperations.
  2995  type ListDatabaseOperationsResponse struct {
  2996  	// NextPageToken: `next_page_token` can be sent in a subsequent
  2997  	// ListDatabaseOperations call to fetch more of the matching metadata.
  2998  	NextPageToken string `json:"nextPageToken,omitempty"`
  2999  	// Operations: The list of matching database long-running operations. Each
  3000  	// operation's name will be prefixed by the database's name. The operation's
  3001  	// metadata field type `metadata.type_url` describes the type of the metadata.
  3002  	Operations []*Operation `json:"operations,omitempty"`
  3003  
  3004  	// ServerResponse contains the HTTP response code and headers from the server.
  3005  	googleapi.ServerResponse `json:"-"`
  3006  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  3007  	// unconditionally include in API requests. By default, fields with empty or
  3008  	// default values are omitted from API requests. See
  3009  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3010  	// details.
  3011  	ForceSendFields []string `json:"-"`
  3012  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  3013  	// requests with the JSON null value. By default, fields with empty values are
  3014  	// omitted from API requests. See
  3015  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3016  	NullFields []string `json:"-"`
  3017  }
  3018  
  3019  func (s *ListDatabaseOperationsResponse) MarshalJSON() ([]byte, error) {
  3020  	type NoMethod ListDatabaseOperationsResponse
  3021  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3022  }
  3023  
  3024  // ListDatabaseRolesResponse: The response for ListDatabaseRoles.
  3025  type ListDatabaseRolesResponse struct {
  3026  	// DatabaseRoles: Database roles that matched the request.
  3027  	DatabaseRoles []*DatabaseRole `json:"databaseRoles,omitempty"`
  3028  	// NextPageToken: `next_page_token` can be sent in a subsequent
  3029  	// ListDatabaseRoles call to fetch more of the matching roles.
  3030  	NextPageToken string `json:"nextPageToken,omitempty"`
  3031  
  3032  	// ServerResponse contains the HTTP response code and headers from the server.
  3033  	googleapi.ServerResponse `json:"-"`
  3034  	// ForceSendFields is a list of field names (e.g. "DatabaseRoles") to
  3035  	// unconditionally include in API requests. By default, fields with empty or
  3036  	// default values are omitted from API requests. See
  3037  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3038  	// details.
  3039  	ForceSendFields []string `json:"-"`
  3040  	// NullFields is a list of field names (e.g. "DatabaseRoles") to include in API
  3041  	// requests with the JSON null value. By default, fields with empty values are
  3042  	// omitted from API requests. See
  3043  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3044  	NullFields []string `json:"-"`
  3045  }
  3046  
  3047  func (s *ListDatabaseRolesResponse) MarshalJSON() ([]byte, error) {
  3048  	type NoMethod ListDatabaseRolesResponse
  3049  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3050  }
  3051  
  3052  // ListDatabasesResponse: The response for ListDatabases.
  3053  type ListDatabasesResponse struct {
  3054  	// Databases: Databases that matched the request.
  3055  	Databases []*Database `json:"databases,omitempty"`
  3056  	// NextPageToken: `next_page_token` can be sent in a subsequent ListDatabases
  3057  	// call to fetch more of the matching databases.
  3058  	NextPageToken string `json:"nextPageToken,omitempty"`
  3059  
  3060  	// ServerResponse contains the HTTP response code and headers from the server.
  3061  	googleapi.ServerResponse `json:"-"`
  3062  	// ForceSendFields is a list of field names (e.g. "Databases") to
  3063  	// unconditionally include in API requests. By default, fields with empty or
  3064  	// default values are omitted from API requests. See
  3065  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3066  	// details.
  3067  	ForceSendFields []string `json:"-"`
  3068  	// NullFields is a list of field names (e.g. "Databases") to include in API
  3069  	// requests with the JSON null value. By default, fields with empty values are
  3070  	// omitted from API requests. See
  3071  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3072  	NullFields []string `json:"-"`
  3073  }
  3074  
  3075  func (s *ListDatabasesResponse) MarshalJSON() ([]byte, error) {
  3076  	type NoMethod ListDatabasesResponse
  3077  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3078  }
  3079  
  3080  // ListInstanceConfigOperationsResponse: The response for
  3081  // ListInstanceConfigOperations.
  3082  type ListInstanceConfigOperationsResponse struct {
  3083  	// NextPageToken: `next_page_token` can be sent in a subsequent
  3084  	// ListInstanceConfigOperations call to fetch more of the matching metadata.
  3085  	NextPageToken string `json:"nextPageToken,omitempty"`
  3086  	// Operations: The list of matching instance config long-running operations.
  3087  	// Each operation's name will be prefixed by the instance config's name. The
  3088  	// operation's metadata field type `metadata.type_url` describes the type of
  3089  	// the metadata.
  3090  	Operations []*Operation `json:"operations,omitempty"`
  3091  
  3092  	// ServerResponse contains the HTTP response code and headers from the server.
  3093  	googleapi.ServerResponse `json:"-"`
  3094  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  3095  	// unconditionally include in API requests. By default, fields with empty or
  3096  	// default values are omitted from API requests. See
  3097  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3098  	// details.
  3099  	ForceSendFields []string `json:"-"`
  3100  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  3101  	// requests with the JSON null value. By default, fields with empty values are
  3102  	// omitted from API requests. See
  3103  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3104  	NullFields []string `json:"-"`
  3105  }
  3106  
  3107  func (s *ListInstanceConfigOperationsResponse) MarshalJSON() ([]byte, error) {
  3108  	type NoMethod ListInstanceConfigOperationsResponse
  3109  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3110  }
  3111  
  3112  // ListInstanceConfigsResponse: The response for ListInstanceConfigs.
  3113  type ListInstanceConfigsResponse struct {
  3114  	// InstanceConfigs: The list of requested instance configurations.
  3115  	InstanceConfigs []*InstanceConfig `json:"instanceConfigs,omitempty"`
  3116  	// NextPageToken: `next_page_token` can be sent in a subsequent
  3117  	// ListInstanceConfigs call to fetch more of the matching instance
  3118  	// configurations.
  3119  	NextPageToken string `json:"nextPageToken,omitempty"`
  3120  
  3121  	// ServerResponse contains the HTTP response code and headers from the server.
  3122  	googleapi.ServerResponse `json:"-"`
  3123  	// ForceSendFields is a list of field names (e.g. "InstanceConfigs") to
  3124  	// unconditionally include in API requests. By default, fields with empty or
  3125  	// default values are omitted from API requests. See
  3126  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3127  	// details.
  3128  	ForceSendFields []string `json:"-"`
  3129  	// NullFields is a list of field names (e.g. "InstanceConfigs") to include in
  3130  	// API requests with the JSON null value. By default, fields with empty values
  3131  	// are omitted from API requests. See
  3132  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3133  	NullFields []string `json:"-"`
  3134  }
  3135  
  3136  func (s *ListInstanceConfigsResponse) MarshalJSON() ([]byte, error) {
  3137  	type NoMethod ListInstanceConfigsResponse
  3138  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3139  }
  3140  
  3141  // ListInstancePartitionOperationsResponse: The response for
  3142  // ListInstancePartitionOperations.
  3143  type ListInstancePartitionOperationsResponse struct {
  3144  	// NextPageToken: `next_page_token` can be sent in a subsequent
  3145  	// ListInstancePartitionOperations call to fetch more of the matching metadata.
  3146  	NextPageToken string `json:"nextPageToken,omitempty"`
  3147  	// Operations: The list of matching instance partition long-running operations.
  3148  	// Each operation's name will be prefixed by the instance partition's name. The
  3149  	// operation's metadata field type `metadata.type_url` describes the type of
  3150  	// the metadata.
  3151  	Operations []*Operation `json:"operations,omitempty"`
  3152  	// UnreachableInstancePartitions: The list of unreachable instance partitions.
  3153  	// It includes the names of instance partitions whose operation metadata could
  3154  	// not be retrieved within instance_partition_deadline.
  3155  	UnreachableInstancePartitions []string `json:"unreachableInstancePartitions,omitempty"`
  3156  
  3157  	// ServerResponse contains the HTTP response code and headers from the server.
  3158  	googleapi.ServerResponse `json:"-"`
  3159  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  3160  	// unconditionally include in API requests. By default, fields with empty or
  3161  	// default values are omitted from API requests. See
  3162  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3163  	// details.
  3164  	ForceSendFields []string `json:"-"`
  3165  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  3166  	// requests with the JSON null value. By default, fields with empty values are
  3167  	// omitted from API requests. See
  3168  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3169  	NullFields []string `json:"-"`
  3170  }
  3171  
  3172  func (s *ListInstancePartitionOperationsResponse) MarshalJSON() ([]byte, error) {
  3173  	type NoMethod ListInstancePartitionOperationsResponse
  3174  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3175  }
  3176  
  3177  // ListInstancePartitionsResponse: The response for ListInstancePartitions.
  3178  type ListInstancePartitionsResponse struct {
  3179  	// InstancePartitions: The list of requested instancePartitions.
  3180  	InstancePartitions []*InstancePartition `json:"instancePartitions,omitempty"`
  3181  	// NextPageToken: `next_page_token` can be sent in a subsequent
  3182  	// ListInstancePartitions call to fetch more of the matching instance
  3183  	// partitions.
  3184  	NextPageToken string `json:"nextPageToken,omitempty"`
  3185  	// Unreachable: The list of unreachable instance partitions. It includes the
  3186  	// names of instance partitions whose metadata could not be retrieved within
  3187  	// instance_partition_deadline.
  3188  	Unreachable []string `json:"unreachable,omitempty"`
  3189  
  3190  	// ServerResponse contains the HTTP response code and headers from the server.
  3191  	googleapi.ServerResponse `json:"-"`
  3192  	// ForceSendFields is a list of field names (e.g. "InstancePartitions") to
  3193  	// unconditionally include in API requests. By default, fields with empty or
  3194  	// default values are omitted from API requests. See
  3195  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3196  	// details.
  3197  	ForceSendFields []string `json:"-"`
  3198  	// NullFields is a list of field names (e.g. "InstancePartitions") to include
  3199  	// in API requests with the JSON null value. By default, fields with empty
  3200  	// values are omitted from API requests. See
  3201  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3202  	NullFields []string `json:"-"`
  3203  }
  3204  
  3205  func (s *ListInstancePartitionsResponse) MarshalJSON() ([]byte, error) {
  3206  	type NoMethod ListInstancePartitionsResponse
  3207  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3208  }
  3209  
  3210  // ListInstancesResponse: The response for ListInstances.
  3211  type ListInstancesResponse struct {
  3212  	// Instances: The list of requested instances.
  3213  	Instances []*Instance `json:"instances,omitempty"`
  3214  	// NextPageToken: `next_page_token` can be sent in a subsequent ListInstances
  3215  	// call to fetch more of the matching instances.
  3216  	NextPageToken string `json:"nextPageToken,omitempty"`
  3217  	// Unreachable: The list of unreachable instances. It includes the names of
  3218  	// instances whose metadata could not be retrieved within instance_deadline.
  3219  	Unreachable []string `json:"unreachable,omitempty"`
  3220  
  3221  	// ServerResponse contains the HTTP response code and headers from the server.
  3222  	googleapi.ServerResponse `json:"-"`
  3223  	// ForceSendFields is a list of field names (e.g. "Instances") to
  3224  	// unconditionally include in API requests. By default, fields with empty or
  3225  	// default values are omitted from API requests. See
  3226  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3227  	// details.
  3228  	ForceSendFields []string `json:"-"`
  3229  	// NullFields is a list of field names (e.g. "Instances") to include in API
  3230  	// requests with the JSON null value. By default, fields with empty values are
  3231  	// omitted from API requests. See
  3232  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3233  	NullFields []string `json:"-"`
  3234  }
  3235  
  3236  func (s *ListInstancesResponse) MarshalJSON() ([]byte, error) {
  3237  	type NoMethod ListInstancesResponse
  3238  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3239  }
  3240  
  3241  // ListOperationsResponse: The response message for Operations.ListOperations.
  3242  type ListOperationsResponse struct {
  3243  	// NextPageToken: The standard List next-page token.
  3244  	NextPageToken string `json:"nextPageToken,omitempty"`
  3245  	// Operations: A list of operations that matches the specified filter in the
  3246  	// request.
  3247  	Operations []*Operation `json:"operations,omitempty"`
  3248  
  3249  	// ServerResponse contains the HTTP response code and headers from the server.
  3250  	googleapi.ServerResponse `json:"-"`
  3251  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  3252  	// unconditionally include in API requests. By default, fields with empty or
  3253  	// default values are omitted from API requests. See
  3254  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3255  	// details.
  3256  	ForceSendFields []string `json:"-"`
  3257  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  3258  	// requests with the JSON null value. By default, fields with empty values are
  3259  	// omitted from API requests. See
  3260  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3261  	NullFields []string `json:"-"`
  3262  }
  3263  
  3264  func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
  3265  	type NoMethod ListOperationsResponse
  3266  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3267  }
  3268  
  3269  // ListScansResponse: Response method from the ListScans method.
  3270  type ListScansResponse struct {
  3271  	// NextPageToken: Token to retrieve the next page of results, or empty if there
  3272  	// are no more results in the list.
  3273  	NextPageToken string `json:"nextPageToken,omitempty"`
  3274  	// Scans: Available scans based on the list query parameters.
  3275  	Scans []*Scan `json:"scans,omitempty"`
  3276  
  3277  	// ServerResponse contains the HTTP response code and headers from the server.
  3278  	googleapi.ServerResponse `json:"-"`
  3279  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  3280  	// unconditionally include in API requests. By default, fields with empty or
  3281  	// default values are omitted from API requests. See
  3282  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3283  	// details.
  3284  	ForceSendFields []string `json:"-"`
  3285  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  3286  	// requests with the JSON null value. By default, fields with empty values are
  3287  	// omitted from API requests. See
  3288  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3289  	NullFields []string `json:"-"`
  3290  }
  3291  
  3292  func (s *ListScansResponse) MarshalJSON() ([]byte, error) {
  3293  	type NoMethod ListScansResponse
  3294  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3295  }
  3296  
  3297  // ListSessionsResponse: The response for ListSessions.
  3298  type ListSessionsResponse struct {
  3299  	// NextPageToken: `next_page_token` can be sent in a subsequent ListSessions
  3300  	// call to fetch more of the matching sessions.
  3301  	NextPageToken string `json:"nextPageToken,omitempty"`
  3302  	// Sessions: The list of requested sessions.
  3303  	Sessions []*Session `json:"sessions,omitempty"`
  3304  
  3305  	// ServerResponse contains the HTTP response code and headers from the server.
  3306  	googleapi.ServerResponse `json:"-"`
  3307  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  3308  	// unconditionally include in API requests. By default, fields with empty or
  3309  	// default values are omitted from API requests. See
  3310  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3311  	// details.
  3312  	ForceSendFields []string `json:"-"`
  3313  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  3314  	// requests with the JSON null value. By default, fields with empty values are
  3315  	// omitted from API requests. See
  3316  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3317  	NullFields []string `json:"-"`
  3318  }
  3319  
  3320  func (s *ListSessionsResponse) MarshalJSON() ([]byte, error) {
  3321  	type NoMethod ListSessionsResponse
  3322  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3323  }
  3324  
  3325  // LocalizedString: A message representing a user-facing string whose value may
  3326  // need to be translated before being displayed.
  3327  type LocalizedString struct {
  3328  	// Args: A map of arguments used when creating the localized message. Keys
  3329  	// represent parameter names which may be used by the localized version when
  3330  	// substituting dynamic values.
  3331  	Args map[string]string `json:"args,omitempty"`
  3332  	// Message: The canonical English version of this message. If no token is
  3333  	// provided or the front-end has no message associated with the token, this
  3334  	// text will be displayed as-is.
  3335  	Message string `json:"message,omitempty"`
  3336  	// Token: The token identifying the message, e.g. 'METRIC_READ_CPU'. This
  3337  	// should be unique within the service.
  3338  	Token string `json:"token,omitempty"`
  3339  	// ForceSendFields is a list of field names (e.g. "Args") to unconditionally
  3340  	// include in API requests. By default, fields with empty or default values are
  3341  	// omitted from API requests. See
  3342  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3343  	// details.
  3344  	ForceSendFields []string `json:"-"`
  3345  	// NullFields is a list of field names (e.g. "Args") to include in API requests
  3346  	// with the JSON null value. By default, fields with empty values are omitted
  3347  	// from API requests. See
  3348  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3349  	NullFields []string `json:"-"`
  3350  }
  3351  
  3352  func (s *LocalizedString) MarshalJSON() ([]byte, error) {
  3353  	type NoMethod LocalizedString
  3354  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3355  }
  3356  
  3357  // Metric: A message representing the actual monitoring data, values for each
  3358  // key bucket over time, of a metric.
  3359  type Metric struct {
  3360  	// Aggregation: The aggregation function used to aggregate each key bucket
  3361  	//
  3362  	// Possible values:
  3363  	//   "AGGREGATION_UNSPECIFIED" - Required default value.
  3364  	//   "MAX" - Use the maximum of all values.
  3365  	//   "SUM" - Use the sum of all values.
  3366  	Aggregation string `json:"aggregation,omitempty"`
  3367  	// Category: The category of the metric, e.g. "Activity", "Alerts", "Reads",
  3368  	// etc.
  3369  	Category *LocalizedString `json:"category,omitempty"`
  3370  	// Derived: The references to numerator and denominator metrics for a derived
  3371  	// metric.
  3372  	Derived *DerivedMetric `json:"derived,omitempty"`
  3373  	// DisplayLabel: The displayed label of the metric.
  3374  	DisplayLabel *LocalizedString `json:"displayLabel,omitempty"`
  3375  	// HasNonzeroData: Whether the metric has any non-zero data.
  3376  	HasNonzeroData bool `json:"hasNonzeroData,omitempty"`
  3377  	// HotValue: The value that is considered hot for the metric. On a per metric
  3378  	// basis hotness signals high utilization and something that might potentially
  3379  	// be a cause for concern by the end user. hot_value is used to calibrate and
  3380  	// scale visual color scales.
  3381  	HotValue float64 `json:"hotValue,omitempty"`
  3382  	// IndexedHotKeys: The (sparse) mapping from time index to an IndexedHotKey
  3383  	// message, representing those time intervals for which there are hot keys.
  3384  	IndexedHotKeys map[string]IndexedHotKey `json:"indexedHotKeys,omitempty"`
  3385  	// IndexedKeyRangeInfos: The (sparse) mapping from time interval index to an
  3386  	// IndexedKeyRangeInfos message, representing those time intervals for which
  3387  	// there are informational messages concerning key ranges.
  3388  	IndexedKeyRangeInfos map[string]IndexedKeyRangeInfos `json:"indexedKeyRangeInfos,omitempty"`
  3389  	// Info: Information about the metric.
  3390  	Info *LocalizedString `json:"info,omitempty"`
  3391  	// Matrix: The data for the metric as a matrix.
  3392  	Matrix *MetricMatrix `json:"matrix,omitempty"`
  3393  	// Unit: The unit of the metric.
  3394  	Unit *LocalizedString `json:"unit,omitempty"`
  3395  	// Visible: Whether the metric is visible to the end user.
  3396  	Visible bool `json:"visible,omitempty"`
  3397  	// ForceSendFields is a list of field names (e.g. "Aggregation") to
  3398  	// unconditionally include in API requests. By default, fields with empty or
  3399  	// default values are omitted from API requests. See
  3400  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3401  	// details.
  3402  	ForceSendFields []string `json:"-"`
  3403  	// NullFields is a list of field names (e.g. "Aggregation") to include in API
  3404  	// requests with the JSON null value. By default, fields with empty values are
  3405  	// omitted from API requests. See
  3406  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3407  	NullFields []string `json:"-"`
  3408  }
  3409  
  3410  func (s *Metric) MarshalJSON() ([]byte, error) {
  3411  	type NoMethod Metric
  3412  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3413  }
  3414  
  3415  func (s *Metric) UnmarshalJSON(data []byte) error {
  3416  	type NoMethod Metric
  3417  	var s1 struct {
  3418  		HotValue gensupport.JSONFloat64 `json:"hotValue"`
  3419  		*NoMethod
  3420  	}
  3421  	s1.NoMethod = (*NoMethod)(s)
  3422  	if err := json.Unmarshal(data, &s1); err != nil {
  3423  		return err
  3424  	}
  3425  	s.HotValue = float64(s1.HotValue)
  3426  	return nil
  3427  }
  3428  
  3429  // MetricMatrix: A message representing a matrix of floats.
  3430  type MetricMatrix struct {
  3431  	// Rows: The rows of the matrix.
  3432  	Rows []*MetricMatrixRow `json:"rows,omitempty"`
  3433  	// ForceSendFields is a list of field names (e.g. "Rows") to unconditionally
  3434  	// include in API requests. By default, fields with empty or default values are
  3435  	// omitted from API requests. See
  3436  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3437  	// details.
  3438  	ForceSendFields []string `json:"-"`
  3439  	// NullFields is a list of field names (e.g. "Rows") to include in API requests
  3440  	// with the JSON null value. By default, fields with empty values are omitted
  3441  	// from API requests. See
  3442  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3443  	NullFields []string `json:"-"`
  3444  }
  3445  
  3446  func (s *MetricMatrix) MarshalJSON() ([]byte, error) {
  3447  	type NoMethod MetricMatrix
  3448  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3449  }
  3450  
  3451  // MetricMatrixRow: A message representing a row of a matrix of floats.
  3452  type MetricMatrixRow struct {
  3453  	// Cols: The columns of the row.
  3454  	Cols []float64 `json:"cols,omitempty"`
  3455  	// ForceSendFields is a list of field names (e.g. "Cols") to unconditionally
  3456  	// include in API requests. By default, fields with empty or default values are
  3457  	// omitted from API requests. See
  3458  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3459  	// details.
  3460  	ForceSendFields []string `json:"-"`
  3461  	// NullFields is a list of field names (e.g. "Cols") to include in API requests
  3462  	// with the JSON null value. By default, fields with empty values are omitted
  3463  	// from API requests. See
  3464  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3465  	NullFields []string `json:"-"`
  3466  }
  3467  
  3468  func (s *MetricMatrixRow) MarshalJSON() ([]byte, error) {
  3469  	type NoMethod MetricMatrixRow
  3470  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3471  }
  3472  
  3473  func (s *MetricMatrixRow) UnmarshalJSON(data []byte) error {
  3474  	type NoMethod MetricMatrixRow
  3475  	var s1 struct {
  3476  		Cols []gensupport.JSONFloat64 `json:"cols"`
  3477  		*NoMethod
  3478  	}
  3479  	s1.NoMethod = (*NoMethod)(s)
  3480  	if err := json.Unmarshal(data, &s1); err != nil {
  3481  		return err
  3482  	}
  3483  	s.Cols = make([]float64, len(s1.Cols))
  3484  	for i := range s1.Cols {
  3485  		s.Cols[i] = float64(s1.Cols[i])
  3486  	}
  3487  	return nil
  3488  }
  3489  
  3490  // MoveInstanceRequest: The request for MoveInstance.
  3491  type MoveInstanceRequest struct {
  3492  	// TargetConfig: Required. The target instance config for the instance to move.
  3493  	// Values are of the form `projects//instanceConfigs/`.
  3494  	TargetConfig string `json:"targetConfig,omitempty"`
  3495  	// ForceSendFields is a list of field names (e.g. "TargetConfig") to
  3496  	// unconditionally include in API requests. By default, fields with empty or
  3497  	// default values are omitted from API requests. See
  3498  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3499  	// details.
  3500  	ForceSendFields []string `json:"-"`
  3501  	// NullFields is a list of field names (e.g. "TargetConfig") to include in API
  3502  	// requests with the JSON null value. By default, fields with empty values are
  3503  	// omitted from API requests. See
  3504  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3505  	NullFields []string `json:"-"`
  3506  }
  3507  
  3508  func (s *MoveInstanceRequest) MarshalJSON() ([]byte, error) {
  3509  	type NoMethod MoveInstanceRequest
  3510  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3511  }
  3512  
  3513  // Mutation: A modification to one or more Cloud Spanner rows. Mutations can be
  3514  // applied to a Cloud Spanner database by sending them in a Commit call.
  3515  type Mutation struct {
  3516  	// Delete: Delete rows from a table. Succeeds whether or not the named rows
  3517  	// were present.
  3518  	Delete *Delete `json:"delete,omitempty"`
  3519  	// Insert: Insert new rows in a table. If any of the rows already exist, the
  3520  	// write or transaction fails with error `ALREADY_EXISTS`.
  3521  	Insert *Write `json:"insert,omitempty"`
  3522  	// InsertOrUpdate: Like insert, except that if the row already exists, then its
  3523  	// column values are overwritten with the ones provided. Any column values not
  3524  	// explicitly written are preserved. When using insert_or_update, just as when
  3525  	// using insert, all `NOT NULL` columns in the table must be given a value.
  3526  	// This holds true even when the row already exists and will therefore actually
  3527  	// be updated.
  3528  	InsertOrUpdate *Write `json:"insertOrUpdate,omitempty"`
  3529  	// Replace: Like insert, except that if the row already exists, it is deleted,
  3530  	// and the column values provided are inserted instead. Unlike
  3531  	// insert_or_update, this means any values not explicitly written become
  3532  	// `NULL`. In an interleaved table, if you create the child table with the `ON
  3533  	// DELETE CASCADE` annotation, then replacing a parent row also deletes the
  3534  	// child rows. Otherwise, you must delete the child rows before you replace the
  3535  	// parent row.
  3536  	Replace *Write `json:"replace,omitempty"`
  3537  	// Update: Update existing rows in a table. If any of the rows does not already
  3538  	// exist, the transaction fails with error `NOT_FOUND`.
  3539  	Update *Write `json:"update,omitempty"`
  3540  	// ForceSendFields is a list of field names (e.g. "Delete") to unconditionally
  3541  	// include in API requests. By default, fields with empty or default values are
  3542  	// omitted from API requests. See
  3543  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3544  	// details.
  3545  	ForceSendFields []string `json:"-"`
  3546  	// NullFields is a list of field names (e.g. "Delete") to include in API
  3547  	// requests with the JSON null value. By default, fields with empty values are
  3548  	// omitted from API requests. See
  3549  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3550  	NullFields []string `json:"-"`
  3551  }
  3552  
  3553  func (s *Mutation) MarshalJSON() ([]byte, error) {
  3554  	type NoMethod Mutation
  3555  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3556  }
  3557  
  3558  // MutationGroup: A group of mutations to be committed together. Related
  3559  // mutations should be placed in a group. For example, two mutations inserting
  3560  // rows with the same primary key prefix in both parent and child tables are
  3561  // related.
  3562  type MutationGroup struct {
  3563  	// Mutations: Required. The mutations in this group.
  3564  	Mutations []*Mutation `json:"mutations,omitempty"`
  3565  	// ForceSendFields is a list of field names (e.g. "Mutations") to
  3566  	// unconditionally include in API requests. By default, fields with empty or
  3567  	// default values are omitted from API requests. See
  3568  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3569  	// details.
  3570  	ForceSendFields []string `json:"-"`
  3571  	// NullFields is a list of field names (e.g. "Mutations") to include in API
  3572  	// requests with the JSON null value. By default, fields with empty values are
  3573  	// omitted from API requests. See
  3574  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3575  	NullFields []string `json:"-"`
  3576  }
  3577  
  3578  func (s *MutationGroup) MarshalJSON() ([]byte, error) {
  3579  	type NoMethod MutationGroup
  3580  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3581  }
  3582  
  3583  // Operation: This resource represents a long-running operation that is the
  3584  // result of a network API call.
  3585  type Operation struct {
  3586  	// Done: If the value is `false`, it means the operation is still in progress.
  3587  	// If `true`, the operation is completed, and either `error` or `response` is
  3588  	// available.
  3589  	Done bool `json:"done,omitempty"`
  3590  	// Error: The error result of the operation in case of failure or cancellation.
  3591  	Error *Status `json:"error,omitempty"`
  3592  	// Metadata: Service-specific metadata associated with the operation. It
  3593  	// typically contains progress information and common metadata such as create
  3594  	// time. Some services might not provide such metadata. Any method that returns
  3595  	// a long-running operation should document the metadata type, if any.
  3596  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  3597  	// Name: The server-assigned name, which is only unique within the same service
  3598  	// that originally returns it. If you use the default HTTP mapping, the `name`
  3599  	// should be a resource name ending with `operations/{unique_id}`.
  3600  	Name string `json:"name,omitempty"`
  3601  	// Response: The normal, successful response of the operation. If the original
  3602  	// method returns no data on success, such as `Delete`, the response is
  3603  	// `google.protobuf.Empty`. If the original method is standard
  3604  	// `Get`/`Create`/`Update`, the response should be the resource. For other
  3605  	// methods, the response should have the type `XxxResponse`, where `Xxx` is the
  3606  	// original method name. For example, if the original method name is
  3607  	// `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
  3608  	Response googleapi.RawMessage `json:"response,omitempty"`
  3609  
  3610  	// ServerResponse contains the HTTP response code and headers from the server.
  3611  	googleapi.ServerResponse `json:"-"`
  3612  	// ForceSendFields is a list of field names (e.g. "Done") to unconditionally
  3613  	// include in API requests. By default, fields with empty or default values are
  3614  	// omitted from API requests. See
  3615  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3616  	// details.
  3617  	ForceSendFields []string `json:"-"`
  3618  	// NullFields is a list of field names (e.g. "Done") to include in API requests
  3619  	// with the JSON null value. By default, fields with empty values are omitted
  3620  	// from API requests. See
  3621  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3622  	NullFields []string `json:"-"`
  3623  }
  3624  
  3625  func (s *Operation) MarshalJSON() ([]byte, error) {
  3626  	type NoMethod Operation
  3627  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3628  }
  3629  
  3630  // OperationProgress: Encapsulates progress related information for a Cloud
  3631  // Spanner long running operation.
  3632  type OperationProgress struct {
  3633  	// EndTime: If set, the time at which this operation failed or was completed
  3634  	// successfully.
  3635  	EndTime string `json:"endTime,omitempty"`
  3636  	// ProgressPercent: Percent completion of the operation. Values are between 0
  3637  	// and 100 inclusive.
  3638  	ProgressPercent int64 `json:"progressPercent,omitempty"`
  3639  	// StartTime: Time the request was received.
  3640  	StartTime string `json:"startTime,omitempty"`
  3641  	// ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally
  3642  	// include in API requests. By default, fields with empty or default values are
  3643  	// omitted from API requests. See
  3644  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3645  	// details.
  3646  	ForceSendFields []string `json:"-"`
  3647  	// NullFields is a list of field names (e.g. "EndTime") to include in API
  3648  	// requests with the JSON null value. By default, fields with empty values are
  3649  	// omitted from API requests. See
  3650  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3651  	NullFields []string `json:"-"`
  3652  }
  3653  
  3654  func (s *OperationProgress) MarshalJSON() ([]byte, error) {
  3655  	type NoMethod OperationProgress
  3656  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3657  }
  3658  
  3659  // OptimizeRestoredDatabaseMetadata: Metadata type for the long-running
  3660  // operation used to track the progress of optimizations performed on a newly
  3661  // restored database. This long-running operation is automatically created by
  3662  // the system after the successful completion of a database restore, and cannot
  3663  // be cancelled.
  3664  type OptimizeRestoredDatabaseMetadata struct {
  3665  	// Name: Name of the restored database being optimized.
  3666  	Name string `json:"name,omitempty"`
  3667  	// Progress: The progress of the post-restore optimizations.
  3668  	Progress *OperationProgress `json:"progress,omitempty"`
  3669  	// ForceSendFields is a list of field names (e.g. "Name") to unconditionally
  3670  	// include in API requests. By default, fields with empty or default values are
  3671  	// omitted from API requests. See
  3672  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3673  	// details.
  3674  	ForceSendFields []string `json:"-"`
  3675  	// NullFields is a list of field names (e.g. "Name") to include in API requests
  3676  	// with the JSON null value. By default, fields with empty values are omitted
  3677  	// from API requests. See
  3678  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3679  	NullFields []string `json:"-"`
  3680  }
  3681  
  3682  func (s *OptimizeRestoredDatabaseMetadata) MarshalJSON() ([]byte, error) {
  3683  	type NoMethod OptimizeRestoredDatabaseMetadata
  3684  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3685  }
  3686  
  3687  // PartialResultSet: Partial results from a streaming read or SQL query.
  3688  // Streaming reads and SQL queries better tolerate large result sets, large
  3689  // rows, and large values, but are a little trickier to consume.
  3690  type PartialResultSet struct {
  3691  	// ChunkedValue: If true, then the final value in values is chunked, and must
  3692  	// be combined with more values from subsequent `PartialResultSet`s to obtain a
  3693  	// complete field value.
  3694  	ChunkedValue bool `json:"chunkedValue,omitempty"`
  3695  	// Metadata: Metadata about the result set, such as row type information. Only
  3696  	// present in the first response.
  3697  	Metadata *ResultSetMetadata `json:"metadata,omitempty"`
  3698  	// ResumeToken: Streaming calls might be interrupted for a variety of reasons,
  3699  	// such as TCP connection loss. If this occurs, the stream of results can be
  3700  	// resumed by re-sending the original request and including `resume_token`.
  3701  	// Note that executing any other transaction in the same session invalidates
  3702  	// the token.
  3703  	ResumeToken string `json:"resumeToken,omitempty"`
  3704  	// Stats: Query plan and execution statistics for the statement that produced
  3705  	// this streaming result set. These can be requested by setting
  3706  	// ExecuteSqlRequest.query_mode and are sent only once with the last response
  3707  	// in the stream. This field will also be present in the last response for DML
  3708  	// statements.
  3709  	Stats *ResultSetStats `json:"stats,omitempty"`
  3710  	// Values: A streamed result set consists of a stream of values, which might be
  3711  	// split into many `PartialResultSet` messages to accommodate large rows and/or
  3712  	// large values. Every N complete values defines a row, where N is equal to the
  3713  	// number of entries in metadata.row_type.fields. Most values are encoded based
  3714  	// on type as described here. It is possible that the last value in values is
  3715  	// "chunked", meaning that the rest of the value is sent in subsequent
  3716  	// `PartialResultSet`(s). This is denoted by the chunked_value field. Two or
  3717  	// more chunked values can be merged to form a complete value as follows: *
  3718  	// `bool/number/null`: cannot be chunked * `string`: concatenate the strings *
  3719  	// `list`: concatenate the lists. If the last element in a list is a `string`,
  3720  	// `list`, or `object`, merge it with the first element in the next list by
  3721  	// applying these rules recursively. * `object`: concatenate the (field name,
  3722  	// field value) pairs. If a field name is duplicated, then apply these rules
  3723  	// recursively to merge the field values. Some examples of merging: # Strings
  3724  	// are concatenated. "foo", "bar" => "foobar" # Lists of non-strings are
  3725  	// concatenated. [2, 3], [4] => [2, 3, 4] # Lists are concatenated, but the
  3726  	// last and first elements are merged # because they are strings. ["a", "b"],
  3727  	// ["c", "d"] => ["a", "bc", "d"] # Lists are concatenated, but the last and
  3728  	// first elements are merged # because they are lists. Recursively, the last
  3729  	// and first elements # of the inner lists are merged because they are strings.
  3730  	// ["a", ["b", "c"]], [["d"], "e"] => ["a", ["b", "cd"], "e"] # Non-overlapping
  3731  	// object fields are combined. {"a": "1"}, {"b": "2"} => {"a": "1", "b": 2"} #
  3732  	// Overlapping object fields are merged. {"a": "1"}, {"a": "2"} => {"a": "12"}
  3733  	// # Examples of merging objects containing lists of strings. {"a": ["1"]},
  3734  	// {"a": ["2"]} => {"a": ["12"]} For a more complete example, suppose a
  3735  	// streaming SQL query is yielding a result set whose rows contain a single
  3736  	// string field. The following `PartialResultSet`s might be yielded: {
  3737  	// "metadata": { ... } "values": ["Hello", "W"] "chunked_value": true
  3738  	// "resume_token": "Af65..." } { "values": ["orl"] "chunked_value": true } {
  3739  	// "values": ["d"] "resume_token": "Zx1B..." } This sequence of
  3740  	// `PartialResultSet`s encodes two rows, one containing the field value
  3741  	// "Hello", and a second containing the field value "World" = "W" + "orl" +
  3742  	// "d". Not all `PartialResultSet`s contain a `resume_token`. Execution can
  3743  	// only be resumed from a previously yielded `resume_token`. For the above
  3744  	// sequence of `PartialResultSet`s, resuming the query with "resume_token":
  3745  	// "Af65..." will yield results from the `PartialResultSet` with value
  3746  	// `["orl"]`.
  3747  	Values []interface{} `json:"values,omitempty"`
  3748  
  3749  	// ServerResponse contains the HTTP response code and headers from the server.
  3750  	googleapi.ServerResponse `json:"-"`
  3751  	// ForceSendFields is a list of field names (e.g. "ChunkedValue") to
  3752  	// unconditionally include in API requests. By default, fields with empty or
  3753  	// default values are omitted from API requests. See
  3754  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3755  	// details.
  3756  	ForceSendFields []string `json:"-"`
  3757  	// NullFields is a list of field names (e.g. "ChunkedValue") to include in API
  3758  	// requests with the JSON null value. By default, fields with empty values are
  3759  	// omitted from API requests. See
  3760  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3761  	NullFields []string `json:"-"`
  3762  }
  3763  
  3764  func (s *PartialResultSet) MarshalJSON() ([]byte, error) {
  3765  	type NoMethod PartialResultSet
  3766  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3767  }
  3768  
  3769  // Partition: Information returned for each partition returned in a
  3770  // PartitionResponse.
  3771  type Partition struct {
  3772  	// PartitionToken: This token can be passed to Read, StreamingRead, ExecuteSql,
  3773  	// or ExecuteStreamingSql requests to restrict the results to those identified
  3774  	// by this partition token.
  3775  	PartitionToken string `json:"partitionToken,omitempty"`
  3776  	// ForceSendFields is a list of field names (e.g. "PartitionToken") to
  3777  	// unconditionally include in API requests. By default, fields with empty or
  3778  	// default values are omitted from API requests. See
  3779  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3780  	// details.
  3781  	ForceSendFields []string `json:"-"`
  3782  	// NullFields is a list of field names (e.g. "PartitionToken") to include in
  3783  	// API requests with the JSON null value. By default, fields with empty values
  3784  	// are omitted from API requests. See
  3785  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3786  	NullFields []string `json:"-"`
  3787  }
  3788  
  3789  func (s *Partition) MarshalJSON() ([]byte, error) {
  3790  	type NoMethod Partition
  3791  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3792  }
  3793  
  3794  // PartitionOptions: Options for a PartitionQueryRequest and
  3795  // PartitionReadRequest.
  3796  type PartitionOptions struct {
  3797  	// MaxPartitions: **Note:** This hint is currently ignored by PartitionQuery
  3798  	// and PartitionRead requests. The desired maximum number of partitions to
  3799  	// return. For example, this may be set to the number of workers available. The
  3800  	// default for this option is currently 10,000. The maximum value is currently
  3801  	// 200,000. This is only a hint. The actual number of partitions returned may
  3802  	// be smaller or larger than this maximum count request.
  3803  	MaxPartitions int64 `json:"maxPartitions,omitempty,string"`
  3804  	// PartitionSizeBytes: **Note:** This hint is currently ignored by
  3805  	// PartitionQuery and PartitionRead requests. The desired data size for each
  3806  	// partition generated. The default for this option is currently 1 GiB. This is
  3807  	// only a hint. The actual size of each partition may be smaller or larger than
  3808  	// this size request.
  3809  	PartitionSizeBytes int64 `json:"partitionSizeBytes,omitempty,string"`
  3810  	// ForceSendFields is a list of field names (e.g. "MaxPartitions") to
  3811  	// unconditionally include in API requests. By default, fields with empty or
  3812  	// default values are omitted from API requests. See
  3813  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3814  	// details.
  3815  	ForceSendFields []string `json:"-"`
  3816  	// NullFields is a list of field names (e.g. "MaxPartitions") to include in API
  3817  	// requests with the JSON null value. By default, fields with empty values are
  3818  	// omitted from API requests. See
  3819  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3820  	NullFields []string `json:"-"`
  3821  }
  3822  
  3823  func (s *PartitionOptions) MarshalJSON() ([]byte, error) {
  3824  	type NoMethod PartitionOptions
  3825  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3826  }
  3827  
  3828  // PartitionQueryRequest: The request for PartitionQuery
  3829  type PartitionQueryRequest struct {
  3830  	// ParamTypes: It is not always possible for Cloud Spanner to infer the right
  3831  	// SQL type from a JSON value. For example, values of type `BYTES` and values
  3832  	// of type `STRING` both appear in params as JSON strings. In these cases,
  3833  	// `param_types` can be used to specify the exact SQL type for some or all of
  3834  	// the SQL query parameters. See the definition of Type for more information
  3835  	// about SQL types.
  3836  	ParamTypes map[string]Type `json:"paramTypes,omitempty"`
  3837  	// Params: Parameter names and values that bind to placeholders in the SQL
  3838  	// string. A parameter placeholder consists of the `@` character followed by
  3839  	// the parameter name (for example, `@firstName`). Parameter names can contain
  3840  	// letters, numbers, and underscores. Parameters can appear anywhere that a
  3841  	// literal value is expected. The same parameter name can be used more than
  3842  	// once, for example: "WHERE id > @msg_id AND id < @msg_id + 100" It is an
  3843  	// error to execute a SQL statement with unbound parameters.
  3844  	Params googleapi.RawMessage `json:"params,omitempty"`
  3845  	// PartitionOptions: Additional options that affect how many partitions are
  3846  	// created.
  3847  	PartitionOptions *PartitionOptions `json:"partitionOptions,omitempty"`
  3848  	// Sql: Required. The query request to generate partitions for. The request
  3849  	// will fail if the query is not root partitionable. For a query to be root
  3850  	// partitionable, it needs to satisfy a few conditions. For example, if the
  3851  	// query execution plan contains a distributed union operator, then it must be
  3852  	// the first operator in the plan. For more information about other conditions,
  3853  	// see Read data in parallel
  3854  	// (https://cloud.google.com/spanner/docs/reads#read_data_in_parallel). The
  3855  	// query request must not contain DML commands, such as INSERT, UPDATE, or
  3856  	// DELETE. Use ExecuteStreamingSql with a PartitionedDml transaction for large,
  3857  	// partition-friendly DML operations.
  3858  	Sql string `json:"sql,omitempty"`
  3859  	// Transaction: Read only snapshot transactions are supported, read/write and
  3860  	// single use transactions are not.
  3861  	Transaction *TransactionSelector `json:"transaction,omitempty"`
  3862  	// ForceSendFields is a list of field names (e.g. "ParamTypes") to
  3863  	// unconditionally include in API requests. By default, fields with empty or
  3864  	// default values are omitted from API requests. See
  3865  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3866  	// details.
  3867  	ForceSendFields []string `json:"-"`
  3868  	// NullFields is a list of field names (e.g. "ParamTypes") to include in API
  3869  	// requests with the JSON null value. By default, fields with empty values are
  3870  	// omitted from API requests. See
  3871  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3872  	NullFields []string `json:"-"`
  3873  }
  3874  
  3875  func (s *PartitionQueryRequest) MarshalJSON() ([]byte, error) {
  3876  	type NoMethod PartitionQueryRequest
  3877  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3878  }
  3879  
  3880  // PartitionReadRequest: The request for PartitionRead
  3881  type PartitionReadRequest struct {
  3882  	// Columns: The columns of table to be returned for each row matching this
  3883  	// request.
  3884  	Columns []string `json:"columns,omitempty"`
  3885  	// Index: If non-empty, the name of an index on table. This index is used
  3886  	// instead of the table primary key when interpreting key_set and sorting
  3887  	// result rows. See key_set for further information.
  3888  	Index string `json:"index,omitempty"`
  3889  	// KeySet: Required. `key_set` identifies the rows to be yielded. `key_set`
  3890  	// names the primary keys of the rows in table to be yielded, unless index is
  3891  	// present. If index is present, then key_set instead names index keys in
  3892  	// index. It is not an error for the `key_set` to name rows that do not exist
  3893  	// in the database. Read yields nothing for nonexistent rows.
  3894  	KeySet *KeySet `json:"keySet,omitempty"`
  3895  	// PartitionOptions: Additional options that affect how many partitions are
  3896  	// created.
  3897  	PartitionOptions *PartitionOptions `json:"partitionOptions,omitempty"`
  3898  	// Table: Required. The name of the table in the database to be read.
  3899  	Table string `json:"table,omitempty"`
  3900  	// Transaction: Read only snapshot transactions are supported, read/write and
  3901  	// single use transactions are not.
  3902  	Transaction *TransactionSelector `json:"transaction,omitempty"`
  3903  	// ForceSendFields is a list of field names (e.g. "Columns") to unconditionally
  3904  	// include in API requests. By default, fields with empty or default values are
  3905  	// omitted from API requests. See
  3906  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3907  	// details.
  3908  	ForceSendFields []string `json:"-"`
  3909  	// NullFields is a list of field names (e.g. "Columns") to include in API
  3910  	// requests with the JSON null value. By default, fields with empty values are
  3911  	// omitted from API requests. See
  3912  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3913  	NullFields []string `json:"-"`
  3914  }
  3915  
  3916  func (s *PartitionReadRequest) MarshalJSON() ([]byte, error) {
  3917  	type NoMethod PartitionReadRequest
  3918  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3919  }
  3920  
  3921  // PartitionResponse: The response for PartitionQuery or PartitionRead
  3922  type PartitionResponse struct {
  3923  	// Partitions: Partitions created by this request.
  3924  	Partitions []*Partition `json:"partitions,omitempty"`
  3925  	// Transaction: Transaction created by this request.
  3926  	Transaction *Transaction `json:"transaction,omitempty"`
  3927  
  3928  	// ServerResponse contains the HTTP response code and headers from the server.
  3929  	googleapi.ServerResponse `json:"-"`
  3930  	// ForceSendFields is a list of field names (e.g. "Partitions") to
  3931  	// unconditionally include in API requests. By default, fields with empty or
  3932  	// default values are omitted from API requests. See
  3933  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3934  	// details.
  3935  	ForceSendFields []string `json:"-"`
  3936  	// NullFields is a list of field names (e.g. "Partitions") to include in API
  3937  	// requests with the JSON null value. By default, fields with empty values are
  3938  	// omitted from API requests. See
  3939  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3940  	NullFields []string `json:"-"`
  3941  }
  3942  
  3943  func (s *PartitionResponse) MarshalJSON() ([]byte, error) {
  3944  	type NoMethod PartitionResponse
  3945  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3946  }
  3947  
  3948  // PartitionedDml: Message type to initiate a Partitioned DML transaction.
  3949  type PartitionedDml struct {
  3950  }
  3951  
  3952  // PlanNode: Node information for nodes appearing in a QueryPlan.plan_nodes.
  3953  type PlanNode struct {
  3954  	// ChildLinks: List of child node `index`es and their relationship to this
  3955  	// parent.
  3956  	ChildLinks []*ChildLink `json:"childLinks,omitempty"`
  3957  	// DisplayName: The display name for the node.
  3958  	DisplayName string `json:"displayName,omitempty"`
  3959  	// ExecutionStats: The execution statistics associated with the node, contained
  3960  	// in a group of key-value pairs. Only present if the plan was returned as a
  3961  	// result of a profile query. For example, number of executions, number of
  3962  	// rows/time per execution etc.
  3963  	ExecutionStats googleapi.RawMessage `json:"executionStats,omitempty"`
  3964  	// Index: The `PlanNode`'s index in node list.
  3965  	Index int64 `json:"index,omitempty"`
  3966  	// Kind: Used to determine the type of node. May be needed for visualizing
  3967  	// different kinds of nodes differently. For example, If the node is a SCALAR
  3968  	// node, it will have a condensed representation which can be used to directly
  3969  	// embed a description of the node in its parent.
  3970  	//
  3971  	// Possible values:
  3972  	//   "KIND_UNSPECIFIED" - Not specified.
  3973  	//   "RELATIONAL" - Denotes a Relational operator node in the expression tree.
  3974  	// Relational operators represent iterative processing of rows during query
  3975  	// execution. For example, a `TableScan` operation that reads rows from a
  3976  	// table.
  3977  	//   "SCALAR" - Denotes a Scalar node in the expression tree. Scalar nodes
  3978  	// represent non-iterable entities in the query plan. For example, constants or
  3979  	// arithmetic operators appearing inside predicate expressions or references to
  3980  	// column names.
  3981  	Kind string `json:"kind,omitempty"`
  3982  	// Metadata: Attributes relevant to the node contained in a group of key-value
  3983  	// pairs. For example, a Parameter Reference node could have the following
  3984  	// information in its metadata: { "parameter_reference": "param1",
  3985  	// "parameter_type": "array" }
  3986  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  3987  	// ShortRepresentation: Condensed representation for SCALAR nodes.
  3988  	ShortRepresentation *ShortRepresentation `json:"shortRepresentation,omitempty"`
  3989  	// ForceSendFields is a list of field names (e.g. "ChildLinks") to
  3990  	// unconditionally include in API requests. By default, fields with empty or
  3991  	// default values are omitted from API requests. See
  3992  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3993  	// details.
  3994  	ForceSendFields []string `json:"-"`
  3995  	// NullFields is a list of field names (e.g. "ChildLinks") to include in API
  3996  	// requests with the JSON null value. By default, fields with empty values are
  3997  	// omitted from API requests. See
  3998  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3999  	NullFields []string `json:"-"`
  4000  }
  4001  
  4002  func (s *PlanNode) MarshalJSON() ([]byte, error) {
  4003  	type NoMethod PlanNode
  4004  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4005  }
  4006  
  4007  // Policy: An Identity and Access Management (IAM) policy, which specifies
  4008  // access controls for Google Cloud resources. A `Policy` is a collection of
  4009  // `bindings`. A `binding` binds one or more `members`, or principals, to a
  4010  // single `role`. Principals can be user accounts, service accounts, Google
  4011  // groups, and domains (such as G Suite). A `role` is a named list of
  4012  // permissions; each `role` can be an IAM predefined role or a user-created
  4013  // custom role. For some types of Google Cloud resources, a `binding` can also
  4014  // specify a `condition`, which is a logical expression that allows access to a
  4015  // resource only if the expression evaluates to `true`. A condition can add
  4016  // constraints based on attributes of the request, the resource, or both. To
  4017  // learn which resources support conditions in their IAM policies, see the IAM
  4018  // documentation
  4019  // (https://cloud.google.com/iam/help/conditions/resource-policies). **JSON
  4020  // example:** ``` { "bindings": [ { "role":
  4021  // "roles/resourcemanager.organizationAdmin", "members": [
  4022  // "user:mike@example.com", "group:admins@example.com", "domain:google.com",
  4023  // "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role":
  4024  // "roles/resourcemanager.organizationViewer", "members": [
  4025  // "user:eve@example.com" ], "condition": { "title": "expirable access",
  4026  // "description": "Does not grant access after Sep 2020", "expression":
  4027  // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag":
  4028  // "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: -
  4029  // members: - user:mike@example.com - group:admins@example.com -
  4030  // domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com
  4031  // role: roles/resourcemanager.organizationAdmin - members: -
  4032  // user:eve@example.com role: roles/resourcemanager.organizationViewer
  4033  // condition: title: expirable access description: Does not grant access after
  4034  // Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
  4035  // etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features,
  4036  // see the IAM documentation (https://cloud.google.com/iam/docs/).
  4037  type Policy struct {
  4038  	// Bindings: Associates a list of `members`, or principals, with a `role`.
  4039  	// Optionally, may specify a `condition` that determines how and when the
  4040  	// `bindings` are applied. Each of the `bindings` must contain at least one
  4041  	// principal. The `bindings` in a `Policy` can refer to up to 1,500 principals;
  4042  	// up to 250 of these principals can be Google groups. Each occurrence of a
  4043  	// principal counts towards these limits. For example, if the `bindings` grant
  4044  	// 50 different roles to `user:alice@example.com`, and not to any other
  4045  	// principal, then you can add another 1,450 principals to the `bindings` in
  4046  	// the `Policy`.
  4047  	Bindings []*Binding `json:"bindings,omitempty"`
  4048  	// Etag: `etag` is used for optimistic concurrency control as a way to help
  4049  	// prevent simultaneous updates of a policy from overwriting each other. It is
  4050  	// strongly suggested that systems make use of the `etag` in the
  4051  	// read-modify-write cycle to perform policy updates in order to avoid race
  4052  	// conditions: An `etag` is returned in the response to `getIamPolicy`, and
  4053  	// systems are expected to put that etag in the request to `setIamPolicy` to
  4054  	// ensure that their change will be applied to the same version of the policy.
  4055  	// **Important:** If you use IAM Conditions, you must include the `etag` field
  4056  	// whenever you call `setIamPolicy`. If you omit this field, then IAM allows
  4057  	// you to overwrite a version `3` policy with a version `1` policy, and all of
  4058  	// the conditions in the version `3` policy are lost.
  4059  	Etag string `json:"etag,omitempty"`
  4060  	// Version: Specifies the format of the policy. Valid values are `0`, `1`, and
  4061  	// `3`. Requests that specify an invalid value are rejected. Any operation that
  4062  	// affects conditional role bindings must specify version `3`. This requirement
  4063  	// applies to the following operations: * Getting a policy that includes a
  4064  	// conditional role binding * Adding a conditional role binding to a policy *
  4065  	// Changing a conditional role binding in a policy * Removing any role binding,
  4066  	// with or without a condition, from a policy that includes conditions
  4067  	// **Important:** If you use IAM Conditions, you must include the `etag` field
  4068  	// whenever you call `setIamPolicy`. If you omit this field, then IAM allows
  4069  	// you to overwrite a version `3` policy with a version `1` policy, and all of
  4070  	// the conditions in the version `3` policy are lost. If a policy does not
  4071  	// include any conditions, operations on that policy may specify any valid
  4072  	// version or leave the field unset. To learn which resources support
  4073  	// conditions in their IAM policies, see the IAM documentation
  4074  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
  4075  	Version int64 `json:"version,omitempty"`
  4076  
  4077  	// ServerResponse contains the HTTP response code and headers from the server.
  4078  	googleapi.ServerResponse `json:"-"`
  4079  	// ForceSendFields is a list of field names (e.g. "Bindings") to
  4080  	// unconditionally include in API requests. By default, fields with empty or
  4081  	// default values are omitted from API requests. See
  4082  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4083  	// details.
  4084  	ForceSendFields []string `json:"-"`
  4085  	// NullFields is a list of field names (e.g. "Bindings") to include in API
  4086  	// requests with the JSON null value. By default, fields with empty values are
  4087  	// omitted from API requests. See
  4088  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4089  	NullFields []string `json:"-"`
  4090  }
  4091  
  4092  func (s *Policy) MarshalJSON() ([]byte, error) {
  4093  	type NoMethod Policy
  4094  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4095  }
  4096  
  4097  // PrefixNode: A message representing a key prefix node in the key prefix
  4098  // hierarchy. for eg. Bigtable keyspaces are lexicographically ordered mappings
  4099  // of keys to values. Keys often have a shared prefix structure where users use
  4100  // the keys to organize data. Eg ///employee In this case Keysight will
  4101  // possibly use one node for a company and reuse it for all employees that fall
  4102  // under the company. Doing so improves legibility in the UI.
  4103  type PrefixNode struct {
  4104  	// DataSourceNode: Whether this corresponds to a data_source name.
  4105  	DataSourceNode bool `json:"dataSourceNode,omitempty"`
  4106  	// Depth: The depth in the prefix hierarchy.
  4107  	Depth int64 `json:"depth,omitempty"`
  4108  	// EndIndex: The index of the end key bucket of the range that this node spans.
  4109  	EndIndex int64 `json:"endIndex,omitempty"`
  4110  	// StartIndex: The index of the start key bucket of the range that this node
  4111  	// spans.
  4112  	StartIndex int64 `json:"startIndex,omitempty"`
  4113  	// Word: The string represented by the prefix node.
  4114  	Word string `json:"word,omitempty"`
  4115  	// ForceSendFields is a list of field names (e.g. "DataSourceNode") to
  4116  	// unconditionally include in API requests. By default, fields with empty or
  4117  	// default values are omitted from API requests. See
  4118  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4119  	// details.
  4120  	ForceSendFields []string `json:"-"`
  4121  	// NullFields is a list of field names (e.g. "DataSourceNode") to include in
  4122  	// API requests with the JSON null value. By default, fields with empty values
  4123  	// are omitted from API requests. See
  4124  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4125  	NullFields []string `json:"-"`
  4126  }
  4127  
  4128  func (s *PrefixNode) MarshalJSON() ([]byte, error) {
  4129  	type NoMethod PrefixNode
  4130  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4131  }
  4132  
  4133  // QueryAdvisorResult: Output of query advisor analysis.
  4134  type QueryAdvisorResult struct {
  4135  	// IndexAdvice: Optional. Index Recommendation for a query. This is an optional
  4136  	// field and the recommendation will only be available when the recommendation
  4137  	// guarantees significant improvement in query performance.
  4138  	IndexAdvice []*IndexAdvice `json:"indexAdvice,omitempty"`
  4139  	// ForceSendFields is a list of field names (e.g. "IndexAdvice") to
  4140  	// unconditionally include in API requests. By default, fields with empty or
  4141  	// default values are omitted from API requests. See
  4142  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4143  	// details.
  4144  	ForceSendFields []string `json:"-"`
  4145  	// NullFields is a list of field names (e.g. "IndexAdvice") to include in API
  4146  	// requests with the JSON null value. By default, fields with empty values are
  4147  	// omitted from API requests. See
  4148  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4149  	NullFields []string `json:"-"`
  4150  }
  4151  
  4152  func (s *QueryAdvisorResult) MarshalJSON() ([]byte, error) {
  4153  	type NoMethod QueryAdvisorResult
  4154  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4155  }
  4156  
  4157  // QueryOptions: Query optimizer configuration.
  4158  type QueryOptions struct {
  4159  	// OptimizerStatisticsPackage: An option to control the selection of optimizer
  4160  	// statistics package. This parameter allows individual queries to use a
  4161  	// different query optimizer statistics package. Specifying `latest` as a value
  4162  	// instructs Cloud Spanner to use the latest generated statistics package. If
  4163  	// not specified, Cloud Spanner uses the statistics package set at the database
  4164  	// level options, or the latest package if the database option is not set. The
  4165  	// statistics package requested by the query has to be exempt from garbage
  4166  	// collection. This can be achieved with the following DDL statement: ``` ALTER
  4167  	// STATISTICS SET OPTIONS (allow_gc=false) ``` The list of available statistics
  4168  	// packages can be queried from `INFORMATION_SCHEMA.SPANNER_STATISTICS`.
  4169  	// Executing a SQL statement with an invalid optimizer statistics package or
  4170  	// with a statistics package that allows garbage collection fails with an
  4171  	// `INVALID_ARGUMENT` error.
  4172  	OptimizerStatisticsPackage string `json:"optimizerStatisticsPackage,omitempty"`
  4173  	// OptimizerVersion: An option to control the selection of optimizer version.
  4174  	// This parameter allows individual queries to pick different query optimizer
  4175  	// versions. Specifying `latest` as a value instructs Cloud Spanner to use the
  4176  	// latest supported query optimizer version. If not specified, Cloud Spanner
  4177  	// uses the optimizer version set at the database level options. Any other
  4178  	// positive integer (from the list of supported optimizer versions) overrides
  4179  	// the default optimizer version for query execution. The list of supported
  4180  	// optimizer versions can be queried from
  4181  	// SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS. Executing a SQL statement with an
  4182  	// invalid optimizer version fails with an `INVALID_ARGUMENT` error. See
  4183  	// https://cloud.google.com/spanner/docs/query-optimizer/manage-query-optimizer
  4184  	// for more information on managing the query optimizer. The
  4185  	// `optimizer_version` statement hint has precedence over this setting.
  4186  	OptimizerVersion string `json:"optimizerVersion,omitempty"`
  4187  	// ForceSendFields is a list of field names (e.g. "OptimizerStatisticsPackage")
  4188  	// to unconditionally include in API requests. By default, fields with empty or
  4189  	// default values are omitted from API requests. See
  4190  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4191  	// details.
  4192  	ForceSendFields []string `json:"-"`
  4193  	// NullFields is a list of field names (e.g. "OptimizerStatisticsPackage") to
  4194  	// include in API requests with the JSON null value. By default, fields with
  4195  	// empty values are omitted from API requests. See
  4196  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4197  	NullFields []string `json:"-"`
  4198  }
  4199  
  4200  func (s *QueryOptions) MarshalJSON() ([]byte, error) {
  4201  	type NoMethod QueryOptions
  4202  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4203  }
  4204  
  4205  // QueryPlan: Contains an ordered list of nodes appearing in the query plan.
  4206  type QueryPlan struct {
  4207  	// PlanNodes: The nodes in the query plan. Plan nodes are returned in pre-order
  4208  	// starting with the plan root. Each PlanNode's `id` corresponds to its index
  4209  	// in `plan_nodes`.
  4210  	PlanNodes []*PlanNode `json:"planNodes,omitempty"`
  4211  	// QueryAdvice: Optional. The advices/recommendations for a query. Currently
  4212  	// this field will be serving index recommendations for a query.
  4213  	QueryAdvice *QueryAdvisorResult `json:"queryAdvice,omitempty"`
  4214  	// ForceSendFields is a list of field names (e.g. "PlanNodes") to
  4215  	// unconditionally include in API requests. By default, fields with empty or
  4216  	// default values are omitted from API requests. See
  4217  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4218  	// details.
  4219  	ForceSendFields []string `json:"-"`
  4220  	// NullFields is a list of field names (e.g. "PlanNodes") to include in API
  4221  	// requests with the JSON null value. By default, fields with empty values are
  4222  	// omitted from API requests. See
  4223  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4224  	NullFields []string `json:"-"`
  4225  }
  4226  
  4227  func (s *QueryPlan) MarshalJSON() ([]byte, error) {
  4228  	type NoMethod QueryPlan
  4229  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4230  }
  4231  
  4232  // ReadOnly: Message type to initiate a read-only transaction.
  4233  type ReadOnly struct {
  4234  	// ExactStaleness: Executes all reads at a timestamp that is `exact_staleness`
  4235  	// old. The timestamp is chosen soon after the read is started. Guarantees that
  4236  	// all writes that have committed more than the specified number of seconds ago
  4237  	// are visible. Because Cloud Spanner chooses the exact timestamp, this mode
  4238  	// works even if the client's local clock is substantially skewed from Cloud
  4239  	// Spanner commit timestamps. Useful for reading at nearby replicas without the
  4240  	// distributed timestamp negotiation overhead of `max_staleness`.
  4241  	ExactStaleness string `json:"exactStaleness,omitempty"`
  4242  	// MaxStaleness: Read data at a timestamp >= `NOW - max_staleness` seconds.
  4243  	// Guarantees that all writes that have committed more than the specified
  4244  	// number of seconds ago are visible. Because Cloud Spanner chooses the exact
  4245  	// timestamp, this mode works even if the client's local clock is substantially
  4246  	// skewed from Cloud Spanner commit timestamps. Useful for reading the freshest
  4247  	// data available at a nearby replica, while bounding the possible staleness if
  4248  	// the local replica has fallen behind. Note that this option can only be used
  4249  	// in single-use transactions.
  4250  	MaxStaleness string `json:"maxStaleness,omitempty"`
  4251  	// MinReadTimestamp: Executes all reads at a timestamp >= `min_read_timestamp`.
  4252  	// This is useful for requesting fresher data than some previous read, or data
  4253  	// that is fresh enough to observe the effects of some previously committed
  4254  	// transaction whose timestamp is known. Note that this option can only be used
  4255  	// in single-use transactions. A timestamp in RFC3339 UTC \"Zulu\" format,
  4256  	// accurate to nanoseconds. Example: "2014-10-02T15:01:23.045123456Z".
  4257  	MinReadTimestamp string `json:"minReadTimestamp,omitempty"`
  4258  	// ReadTimestamp: Executes all reads at the given timestamp. Unlike other
  4259  	// modes, reads at a specific timestamp are repeatable; the same read at the
  4260  	// same timestamp always returns the same data. If the timestamp is in the
  4261  	// future, the read will block until the specified timestamp, modulo the read's
  4262  	// deadline. Useful for large scale consistent reads such as mapreduces, or for
  4263  	// coordinating many reads against a consistent snapshot of the data. A
  4264  	// timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds. Example:
  4265  	// "2014-10-02T15:01:23.045123456Z".
  4266  	ReadTimestamp string `json:"readTimestamp,omitempty"`
  4267  	// ReturnReadTimestamp: If true, the Cloud Spanner-selected read timestamp is
  4268  	// included in the Transaction message that describes the transaction.
  4269  	ReturnReadTimestamp bool `json:"returnReadTimestamp,omitempty"`
  4270  	// Strong: Read at a timestamp where all previously committed transactions are
  4271  	// visible.
  4272  	Strong bool `json:"strong,omitempty"`
  4273  	// ForceSendFields is a list of field names (e.g. "ExactStaleness") to
  4274  	// unconditionally include in API requests. By default, fields with empty or
  4275  	// default values are omitted from API requests. See
  4276  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4277  	// details.
  4278  	ForceSendFields []string `json:"-"`
  4279  	// NullFields is a list of field names (e.g. "ExactStaleness") to include in
  4280  	// API requests with the JSON null value. By default, fields with empty values
  4281  	// are omitted from API requests. See
  4282  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4283  	NullFields []string `json:"-"`
  4284  }
  4285  
  4286  func (s *ReadOnly) MarshalJSON() ([]byte, error) {
  4287  	type NoMethod ReadOnly
  4288  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4289  }
  4290  
  4291  // ReadRequest: The request for Read and StreamingRead.
  4292  type ReadRequest struct {
  4293  	// Columns: Required. The columns of table to be returned for each row matching
  4294  	// this request.
  4295  	Columns []string `json:"columns,omitempty"`
  4296  	// DataBoostEnabled: If this is for a partitioned read and this field is set to
  4297  	// `true`, the request is executed with Spanner Data Boost independent compute
  4298  	// resources. If the field is set to `true` but the request does not set
  4299  	// `partition_token`, the API returns an `INVALID_ARGUMENT` error.
  4300  	DataBoostEnabled bool `json:"dataBoostEnabled,omitempty"`
  4301  	// DirectedReadOptions: Directed read options for this request.
  4302  	DirectedReadOptions *DirectedReadOptions `json:"directedReadOptions,omitempty"`
  4303  	// Index: If non-empty, the name of an index on table. This index is used
  4304  	// instead of the table primary key when interpreting key_set and sorting
  4305  	// result rows. See key_set for further information.
  4306  	Index string `json:"index,omitempty"`
  4307  	// KeySet: Required. `key_set` identifies the rows to be yielded. `key_set`
  4308  	// names the primary keys of the rows in table to be yielded, unless index is
  4309  	// present. If index is present, then key_set instead names index keys in
  4310  	// index. If the partition_token field is empty, rows are yielded in table
  4311  	// primary key order (if index is empty) or index key order (if index is
  4312  	// non-empty). If the partition_token field is not empty, rows will be yielded
  4313  	// in an unspecified order. It is not an error for the `key_set` to name rows
  4314  	// that do not exist in the database. Read yields nothing for nonexistent rows.
  4315  	KeySet *KeySet `json:"keySet,omitempty"`
  4316  	// Limit: If greater than zero, only the first `limit` rows are yielded. If
  4317  	// `limit` is zero, the default is no limit. A limit cannot be specified if
  4318  	// `partition_token` is set.
  4319  	Limit int64 `json:"limit,omitempty,string"`
  4320  	// PartitionToken: If present, results will be restricted to the specified
  4321  	// partition previously created using PartitionRead(). There must be an exact
  4322  	// match for the values of fields common to this message and the
  4323  	// PartitionReadRequest message used to create this partition_token.
  4324  	PartitionToken string `json:"partitionToken,omitempty"`
  4325  	// RequestOptions: Common options for this request.
  4326  	RequestOptions *RequestOptions `json:"requestOptions,omitempty"`
  4327  	// ResumeToken: If this request is resuming a previously interrupted read,
  4328  	// `resume_token` should be copied from the last PartialResultSet yielded
  4329  	// before the interruption. Doing this enables the new read to resume where the
  4330  	// last read left off. The rest of the request parameters must exactly match
  4331  	// the request that yielded this token.
  4332  	ResumeToken string `json:"resumeToken,omitempty"`
  4333  	// Table: Required. The name of the table in the database to be read.
  4334  	Table string `json:"table,omitempty"`
  4335  	// Transaction: The transaction to use. If none is provided, the default is a
  4336  	// temporary read-only transaction with strong concurrency.
  4337  	Transaction *TransactionSelector `json:"transaction,omitempty"`
  4338  	// ForceSendFields is a list of field names (e.g. "Columns") to unconditionally
  4339  	// include in API requests. By default, fields with empty or default values are
  4340  	// omitted from API requests. See
  4341  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4342  	// details.
  4343  	ForceSendFields []string `json:"-"`
  4344  	// NullFields is a list of field names (e.g. "Columns") to include in API
  4345  	// requests with the JSON null value. By default, fields with empty values are
  4346  	// omitted from API requests. See
  4347  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4348  	NullFields []string `json:"-"`
  4349  }
  4350  
  4351  func (s *ReadRequest) MarshalJSON() ([]byte, error) {
  4352  	type NoMethod ReadRequest
  4353  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4354  }
  4355  
  4356  // ReadWrite: Message type to initiate a read-write transaction. Currently this
  4357  // transaction type has no options.
  4358  type ReadWrite struct {
  4359  	// ReadLockMode: Read lock mode for the transaction.
  4360  	//
  4361  	// Possible values:
  4362  	//   "READ_LOCK_MODE_UNSPECIFIED" - Default value. If the value is not
  4363  	// specified, the pessimistic read lock is used.
  4364  	//   "PESSIMISTIC" - Pessimistic lock mode. Read locks are acquired immediately
  4365  	// on read.
  4366  	//   "OPTIMISTIC" - Optimistic lock mode. Locks for reads within the
  4367  	// transaction are not acquired on read. Instead the locks are acquired on a
  4368  	// commit to validate that read/queried data has not changed since the
  4369  	// transaction started.
  4370  	ReadLockMode string `json:"readLockMode,omitempty"`
  4371  	// ForceSendFields is a list of field names (e.g. "ReadLockMode") to
  4372  	// unconditionally include in API requests. By default, fields with empty or
  4373  	// default values are omitted from API requests. See
  4374  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4375  	// details.
  4376  	ForceSendFields []string `json:"-"`
  4377  	// NullFields is a list of field names (e.g. "ReadLockMode") to include in API
  4378  	// requests with the JSON null value. By default, fields with empty values are
  4379  	// omitted from API requests. See
  4380  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4381  	NullFields []string `json:"-"`
  4382  }
  4383  
  4384  func (s *ReadWrite) MarshalJSON() ([]byte, error) {
  4385  	type NoMethod ReadWrite
  4386  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4387  }
  4388  
  4389  type ReplicaInfo struct {
  4390  	// DefaultLeaderLocation: If true, this location is designated as the default
  4391  	// leader location where leader replicas are placed. See the region types
  4392  	// documentation (https://cloud.google.com/spanner/docs/instances#region_types)
  4393  	// for more details.
  4394  	DefaultLeaderLocation bool `json:"defaultLeaderLocation,omitempty"`
  4395  	// Location: The location of the serving resources, e.g., "us-central1".
  4396  	Location string `json:"location,omitempty"`
  4397  	// Type: The type of replica.
  4398  	//
  4399  	// Possible values:
  4400  	//   "TYPE_UNSPECIFIED" - Not specified.
  4401  	//   "READ_WRITE" - Read-write replicas support both reads and writes. These
  4402  	// replicas: * Maintain a full copy of your data. * Serve reads. * Can vote
  4403  	// whether to commit a write. * Participate in leadership election. * Are
  4404  	// eligible to become a leader.
  4405  	//   "READ_ONLY" - Read-only replicas only support reads (not writes).
  4406  	// Read-only replicas: * Maintain a full copy of your data. * Serve reads. * Do
  4407  	// not participate in voting to commit writes. * Are not eligible to become a
  4408  	// leader.
  4409  	//   "WITNESS" - Witness replicas don't support reads but do participate in
  4410  	// voting to commit writes. Witness replicas: * Do not maintain a full copy of
  4411  	// data. * Do not serve reads. * Vote whether to commit writes. * Participate
  4412  	// in leader election but are not eligible to become leader.
  4413  	Type string `json:"type,omitempty"`
  4414  	// ForceSendFields is a list of field names (e.g. "DefaultLeaderLocation") to
  4415  	// unconditionally include in API requests. By default, fields with empty or
  4416  	// default values are omitted from API requests. See
  4417  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4418  	// details.
  4419  	ForceSendFields []string `json:"-"`
  4420  	// NullFields is a list of field names (e.g. "DefaultLeaderLocation") to
  4421  	// include in API requests with the JSON null value. By default, fields with
  4422  	// empty values are omitted from API requests. See
  4423  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4424  	NullFields []string `json:"-"`
  4425  }
  4426  
  4427  func (s *ReplicaInfo) MarshalJSON() ([]byte, error) {
  4428  	type NoMethod ReplicaInfo
  4429  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4430  }
  4431  
  4432  // ReplicaSelection: The directed read replica selector. Callers must provide
  4433  // one or more of the following fields for replica selection: * `location` -
  4434  // The location must be one of the regions within the multi-region
  4435  // configuration of your database. * `type` - The type of the replica. Some
  4436  // examples of using replica_selectors are: * `location:us-east1` --> The
  4437  // "us-east1" replica(s) of any available type will be used to process the
  4438  // request. * `type:READ_ONLY` --> The "READ_ONLY" type replica(s) in nearest
  4439  // available location will be used to process the request. * `location:us-east1
  4440  // type:READ_ONLY` --> The "READ_ONLY" type replica(s) in location "us-east1"
  4441  // will be used to process the request.
  4442  type ReplicaSelection struct {
  4443  	// Location: The location or region of the serving requests, e.g. "us-east1".
  4444  	Location string `json:"location,omitempty"`
  4445  	// Type: The type of replica.
  4446  	//
  4447  	// Possible values:
  4448  	//   "TYPE_UNSPECIFIED" - Not specified.
  4449  	//   "READ_WRITE" - Read-write replicas support both reads and writes.
  4450  	//   "READ_ONLY" - Read-only replicas only support reads (not writes).
  4451  	Type string `json:"type,omitempty"`
  4452  	// ForceSendFields is a list of field names (e.g. "Location") to
  4453  	// unconditionally include in API requests. By default, fields with empty or
  4454  	// default values are omitted from API requests. See
  4455  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4456  	// details.
  4457  	ForceSendFields []string `json:"-"`
  4458  	// NullFields is a list of field names (e.g. "Location") to include in API
  4459  	// requests with the JSON null value. By default, fields with empty values are
  4460  	// omitted from API requests. See
  4461  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4462  	NullFields []string `json:"-"`
  4463  }
  4464  
  4465  func (s *ReplicaSelection) MarshalJSON() ([]byte, error) {
  4466  	type NoMethod ReplicaSelection
  4467  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4468  }
  4469  
  4470  // RequestOptions: Common request options for various APIs.
  4471  type RequestOptions struct {
  4472  	// Priority: Priority for the request.
  4473  	//
  4474  	// Possible values:
  4475  	//   "PRIORITY_UNSPECIFIED" - `PRIORITY_UNSPECIFIED` is equivalent to
  4476  	// `PRIORITY_HIGH`.
  4477  	//   "PRIORITY_LOW" - This specifies that the request is low priority.
  4478  	//   "PRIORITY_MEDIUM" - This specifies that the request is medium priority.
  4479  	//   "PRIORITY_HIGH" - This specifies that the request is high priority.
  4480  	Priority string `json:"priority,omitempty"`
  4481  	// RequestTag: A per-request tag which can be applied to queries or reads, used
  4482  	// for statistics collection. Both request_tag and transaction_tag can be
  4483  	// specified for a read or query that belongs to a transaction. This field is
  4484  	// ignored for requests where it's not applicable (e.g. CommitRequest). Legal
  4485  	// characters for `request_tag` values are all printable characters (ASCII 32 -
  4486  	// 126) and the length of a request_tag is limited to 50 characters. Values
  4487  	// that exceed this limit are truncated. Any leading underscore (_) characters
  4488  	// will be removed from the string.
  4489  	RequestTag string `json:"requestTag,omitempty"`
  4490  	// TransactionTag: A tag used for statistics collection about this transaction.
  4491  	// Both request_tag and transaction_tag can be specified for a read or query
  4492  	// that belongs to a transaction. The value of transaction_tag should be the
  4493  	// same for all requests belonging to the same transaction. If this request
  4494  	// doesn't belong to any transaction, transaction_tag will be ignored. Legal
  4495  	// characters for `transaction_tag` values are all printable characters (ASCII
  4496  	// 32 - 126) and the length of a transaction_tag is limited to 50 characters.
  4497  	// Values that exceed this limit are truncated. Any leading underscore (_)
  4498  	// characters will be removed from the string.
  4499  	TransactionTag string `json:"transactionTag,omitempty"`
  4500  	// ForceSendFields is a list of field names (e.g. "Priority") to
  4501  	// unconditionally include in API requests. By default, fields with empty or
  4502  	// default values are omitted from API requests. See
  4503  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4504  	// details.
  4505  	ForceSendFields []string `json:"-"`
  4506  	// NullFields is a list of field names (e.g. "Priority") to include in API
  4507  	// requests with the JSON null value. By default, fields with empty values are
  4508  	// omitted from API requests. See
  4509  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4510  	NullFields []string `json:"-"`
  4511  }
  4512  
  4513  func (s *RequestOptions) MarshalJSON() ([]byte, error) {
  4514  	type NoMethod RequestOptions
  4515  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4516  }
  4517  
  4518  // RestoreDatabaseEncryptionConfig: Encryption configuration for the restored
  4519  // database.
  4520  type RestoreDatabaseEncryptionConfig struct {
  4521  	// EncryptionType: Required. The encryption type of the restored database.
  4522  	//
  4523  	// Possible values:
  4524  	//   "ENCRYPTION_TYPE_UNSPECIFIED" - Unspecified. Do not use.
  4525  	//   "USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION" - This is the default option
  4526  	// when encryption_config is not specified.
  4527  	//   "GOOGLE_DEFAULT_ENCRYPTION" - Use Google default encryption.
  4528  	//   "CUSTOMER_MANAGED_ENCRYPTION" - Use customer managed encryption. If
  4529  	// specified, `kms_key_name` must must contain a valid Cloud KMS key.
  4530  	EncryptionType string `json:"encryptionType,omitempty"`
  4531  	// KmsKeyName: Optional. The Cloud KMS key that will be used to encrypt/decrypt
  4532  	// the restored database. This field should be set only when encryption_type is
  4533  	// `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form
  4534  	// `projects//locations//keyRings//cryptoKeys/`.
  4535  	KmsKeyName string `json:"kmsKeyName,omitempty"`
  4536  	// KmsKeyNames: Optional. Specifies the KMS configuration for the one or more
  4537  	// keys used to encrypt the database. Values are of the form
  4538  	// `projects//locations//keyRings//cryptoKeys/`. The keys referenced by
  4539  	// kms_key_names must fully cover all regions of the database instance
  4540  	// configuration. Some examples: * For single region database instance configs,
  4541  	// specify a single regional location KMS key. * For multi-regional database
  4542  	// instance configs of type GOOGLE_MANAGED, either specify a multi-regional
  4543  	// location KMS key or multiple regional location KMS keys that cover all
  4544  	// regions in the instance config. * For a database instance config of type
  4545  	// USER_MANAGED, please specify only regional location KMS keys to cover each
  4546  	// region in the instance config. Multi-regional location KMS keys are not
  4547  	// supported for USER_MANAGED instance configs.
  4548  	KmsKeyNames []string `json:"kmsKeyNames,omitempty"`
  4549  	// ForceSendFields is a list of field names (e.g. "EncryptionType") to
  4550  	// unconditionally include in API requests. By default, fields with empty or
  4551  	// default values are omitted from API requests. See
  4552  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4553  	// details.
  4554  	ForceSendFields []string `json:"-"`
  4555  	// NullFields is a list of field names (e.g. "EncryptionType") to include in
  4556  	// API requests with the JSON null value. By default, fields with empty values
  4557  	// are omitted from API requests. See
  4558  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4559  	NullFields []string `json:"-"`
  4560  }
  4561  
  4562  func (s *RestoreDatabaseEncryptionConfig) MarshalJSON() ([]byte, error) {
  4563  	type NoMethod RestoreDatabaseEncryptionConfig
  4564  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4565  }
  4566  
  4567  // RestoreDatabaseMetadata: Metadata type for the long-running operation
  4568  // returned by RestoreDatabase.
  4569  type RestoreDatabaseMetadata struct {
  4570  	// BackupInfo: Information about the backup used to restore the database.
  4571  	BackupInfo *BackupInfo `json:"backupInfo,omitempty"`
  4572  	// CancelTime: The time at which cancellation of this operation was received.
  4573  	// Operations.CancelOperation starts asynchronous cancellation on a
  4574  	// long-running operation. The server makes a best effort to cancel the
  4575  	// operation, but success is not guaranteed. Clients can use
  4576  	// Operations.GetOperation or other methods to check whether the cancellation
  4577  	// succeeded or whether the operation completed despite cancellation. On
  4578  	// successful cancellation, the operation is not deleted; instead, it becomes
  4579  	// an operation with an Operation.error value with a google.rpc.Status.code of
  4580  	// 1, corresponding to `Code.CANCELLED`.
  4581  	CancelTime string `json:"cancelTime,omitempty"`
  4582  	// Name: Name of the database being created and restored to.
  4583  	Name string `json:"name,omitempty"`
  4584  	// OptimizeDatabaseOperationName: If exists, the name of the long-running
  4585  	// operation that will be used to track the post-restore optimization process
  4586  	// to optimize the performance of the restored database, and remove the
  4587  	// dependency on the restore source. The name is of the form
  4588  	// `projects//instances//databases//operations/` where the is the name of
  4589  	// database being created and restored to. The metadata type of the
  4590  	// long-running operation is OptimizeRestoredDatabaseMetadata. This
  4591  	// long-running operation will be automatically created by the system after the
  4592  	// RestoreDatabase long-running operation completes successfully. This
  4593  	// operation will not be created if the restore was not successful.
  4594  	OptimizeDatabaseOperationName string `json:"optimizeDatabaseOperationName,omitempty"`
  4595  	// Progress: The progress of the RestoreDatabase operation.
  4596  	Progress *OperationProgress `json:"progress,omitempty"`
  4597  	// SourceType: The type of the restore source.
  4598  	//
  4599  	// Possible values:
  4600  	//   "TYPE_UNSPECIFIED" - No restore associated.
  4601  	//   "BACKUP" - A backup was used as the source of the restore.
  4602  	SourceType string `json:"sourceType,omitempty"`
  4603  	// ForceSendFields is a list of field names (e.g. "BackupInfo") to
  4604  	// unconditionally include in API requests. By default, fields with empty or
  4605  	// default values are omitted from API requests. See
  4606  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4607  	// details.
  4608  	ForceSendFields []string `json:"-"`
  4609  	// NullFields is a list of field names (e.g. "BackupInfo") to include in API
  4610  	// requests with the JSON null value. By default, fields with empty values are
  4611  	// omitted from API requests. See
  4612  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4613  	NullFields []string `json:"-"`
  4614  }
  4615  
  4616  func (s *RestoreDatabaseMetadata) MarshalJSON() ([]byte, error) {
  4617  	type NoMethod RestoreDatabaseMetadata
  4618  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4619  }
  4620  
  4621  // RestoreDatabaseRequest: The request for RestoreDatabase.
  4622  type RestoreDatabaseRequest struct {
  4623  	// Backup: Name of the backup from which to restore. Values are of the form
  4624  	// `projects//instances//backups/`.
  4625  	Backup string `json:"backup,omitempty"`
  4626  	// DatabaseId: Required. The id of the database to create and restore to. This
  4627  	// database must not already exist. The `database_id` appended to `parent`
  4628  	// forms the full database name of the form `projects//instances//databases/`.
  4629  	DatabaseId string `json:"databaseId,omitempty"`
  4630  	// EncryptionConfig: Optional. An encryption configuration describing the
  4631  	// encryption type and key resources in Cloud KMS used to encrypt/decrypt the
  4632  	// database to restore to. If this field is not specified, the restored
  4633  	// database will use the same encryption configuration as the backup by
  4634  	// default, namely encryption_type = `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`.
  4635  	EncryptionConfig *RestoreDatabaseEncryptionConfig `json:"encryptionConfig,omitempty"`
  4636  	// ForceSendFields is a list of field names (e.g. "Backup") to unconditionally
  4637  	// include in API requests. By default, fields with empty or default values are
  4638  	// omitted from API requests. See
  4639  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4640  	// details.
  4641  	ForceSendFields []string `json:"-"`
  4642  	// NullFields is a list of field names (e.g. "Backup") to include in API
  4643  	// requests with the JSON null value. By default, fields with empty values are
  4644  	// omitted from API requests. See
  4645  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4646  	NullFields []string `json:"-"`
  4647  }
  4648  
  4649  func (s *RestoreDatabaseRequest) MarshalJSON() ([]byte, error) {
  4650  	type NoMethod RestoreDatabaseRequest
  4651  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4652  }
  4653  
  4654  // RestoreInfo: Information about the database restore.
  4655  type RestoreInfo struct {
  4656  	// BackupInfo: Information about the backup used to restore the database. The
  4657  	// backup may no longer exist.
  4658  	BackupInfo *BackupInfo `json:"backupInfo,omitempty"`
  4659  	// SourceType: The type of the restore source.
  4660  	//
  4661  	// Possible values:
  4662  	//   "TYPE_UNSPECIFIED" - No restore associated.
  4663  	//   "BACKUP" - A backup was used as the source of the restore.
  4664  	SourceType string `json:"sourceType,omitempty"`
  4665  	// ForceSendFields is a list of field names (e.g. "BackupInfo") to
  4666  	// unconditionally include in API requests. By default, fields with empty or
  4667  	// default values are omitted from API requests. See
  4668  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4669  	// details.
  4670  	ForceSendFields []string `json:"-"`
  4671  	// NullFields is a list of field names (e.g. "BackupInfo") to include in API
  4672  	// requests with the JSON null value. By default, fields with empty values are
  4673  	// omitted from API requests. See
  4674  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4675  	NullFields []string `json:"-"`
  4676  }
  4677  
  4678  func (s *RestoreInfo) MarshalJSON() ([]byte, error) {
  4679  	type NoMethod RestoreInfo
  4680  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4681  }
  4682  
  4683  // ResultSet: Results from Read or ExecuteSql.
  4684  type ResultSet struct {
  4685  	// Metadata: Metadata about the result set, such as row type information.
  4686  	Metadata *ResultSetMetadata `json:"metadata,omitempty"`
  4687  	// Rows: Each element in `rows` is a row whose format is defined by
  4688  	// metadata.row_type. The ith element in each row matches the ith field in
  4689  	// metadata.row_type. Elements are encoded based on type as described here.
  4690  	Rows [][]interface{} `json:"rows,omitempty"`
  4691  	// Stats: Query plan and execution statistics for the SQL statement that
  4692  	// produced this result set. These can be requested by setting
  4693  	// ExecuteSqlRequest.query_mode. DML statements always produce stats containing
  4694  	// the number of rows modified, unless executed using the
  4695  	// ExecuteSqlRequest.QueryMode.PLAN ExecuteSqlRequest.query_mode. Other fields
  4696  	// may or may not be populated, based on the ExecuteSqlRequest.query_mode.
  4697  	Stats *ResultSetStats `json:"stats,omitempty"`
  4698  
  4699  	// ServerResponse contains the HTTP response code and headers from the server.
  4700  	googleapi.ServerResponse `json:"-"`
  4701  	// ForceSendFields is a list of field names (e.g. "Metadata") to
  4702  	// unconditionally include in API requests. By default, fields with empty or
  4703  	// default values are omitted from API requests. See
  4704  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4705  	// details.
  4706  	ForceSendFields []string `json:"-"`
  4707  	// NullFields is a list of field names (e.g. "Metadata") to include in API
  4708  	// requests with the JSON null value. By default, fields with empty values are
  4709  	// omitted from API requests. See
  4710  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4711  	NullFields []string `json:"-"`
  4712  }
  4713  
  4714  func (s *ResultSet) MarshalJSON() ([]byte, error) {
  4715  	type NoMethod ResultSet
  4716  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4717  }
  4718  
  4719  // ResultSetMetadata: Metadata about a ResultSet or PartialResultSet.
  4720  type ResultSetMetadata struct {
  4721  	// RowType: Indicates the field names and types for the rows in the result set.
  4722  	// For example, a SQL query like "SELECT UserId, UserName FROM Users" could
  4723  	// return a `row_type` value like: "fields": [ { "name": "UserId", "type": {
  4724  	// "code": "INT64" } }, { "name": "UserName", "type": { "code": "STRING" } }, ]
  4725  	RowType *StructType `json:"rowType,omitempty"`
  4726  	// Transaction: If the read or SQL query began a transaction as a side-effect,
  4727  	// the information about the new transaction is yielded here.
  4728  	Transaction *Transaction `json:"transaction,omitempty"`
  4729  	// UndeclaredParameters: A SQL query can be parameterized. In PLAN mode, these
  4730  	// parameters can be undeclared. This indicates the field names and types for
  4731  	// those undeclared parameters in the SQL query. For example, a SQL query like
  4732  	// "SELECT * FROM Users where UserId = @userId and UserName = @userName "
  4733  	// could return a `undeclared_parameters` value like: "fields": [ { "name":
  4734  	// "UserId", "type": { "code": "INT64" } }, { "name": "UserName", "type": {
  4735  	// "code": "STRING" } }, ]
  4736  	UndeclaredParameters *StructType `json:"undeclaredParameters,omitempty"`
  4737  	// ForceSendFields is a list of field names (e.g. "RowType") to unconditionally
  4738  	// include in API requests. By default, fields with empty or default values are
  4739  	// omitted from API requests. See
  4740  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4741  	// details.
  4742  	ForceSendFields []string `json:"-"`
  4743  	// NullFields is a list of field names (e.g. "RowType") to include in API
  4744  	// requests with the JSON null value. By default, fields with empty values are
  4745  	// omitted from API requests. See
  4746  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4747  	NullFields []string `json:"-"`
  4748  }
  4749  
  4750  func (s *ResultSetMetadata) MarshalJSON() ([]byte, error) {
  4751  	type NoMethod ResultSetMetadata
  4752  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4753  }
  4754  
  4755  // ResultSetStats: Additional statistics about a ResultSet or PartialResultSet.
  4756  type ResultSetStats struct {
  4757  	// QueryPlan: QueryPlan for the query associated with this result.
  4758  	QueryPlan *QueryPlan `json:"queryPlan,omitempty"`
  4759  	// QueryStats: Aggregated statistics from the execution of the query. Only
  4760  	// present when the query is profiled. For example, a query could return the
  4761  	// statistics as follows: { "rows_returned": "3", "elapsed_time": "1.22 secs",
  4762  	// "cpu_time": "1.19 secs" }
  4763  	QueryStats googleapi.RawMessage `json:"queryStats,omitempty"`
  4764  	// RowCountExact: Standard DML returns an exact count of rows that were
  4765  	// modified.
  4766  	RowCountExact int64 `json:"rowCountExact,omitempty,string"`
  4767  	// RowCountLowerBound: Partitioned DML does not offer exactly-once semantics,
  4768  	// so it returns a lower bound of the rows modified.
  4769  	RowCountLowerBound int64 `json:"rowCountLowerBound,omitempty,string"`
  4770  	// ForceSendFields is a list of field names (e.g. "QueryPlan") to
  4771  	// unconditionally include in API requests. By default, fields with empty or
  4772  	// default values are omitted from API requests. See
  4773  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4774  	// details.
  4775  	ForceSendFields []string `json:"-"`
  4776  	// NullFields is a list of field names (e.g. "QueryPlan") to include in API
  4777  	// requests with the JSON null value. By default, fields with empty values are
  4778  	// omitted from API requests. See
  4779  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4780  	NullFields []string `json:"-"`
  4781  }
  4782  
  4783  func (s *ResultSetStats) MarshalJSON() ([]byte, error) {
  4784  	type NoMethod ResultSetStats
  4785  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4786  }
  4787  
  4788  // RollbackRequest: The request for Rollback.
  4789  type RollbackRequest struct {
  4790  	// TransactionId: Required. The transaction to roll back.
  4791  	TransactionId string `json:"transactionId,omitempty"`
  4792  	// ForceSendFields is a list of field names (e.g. "TransactionId") to
  4793  	// unconditionally include in API requests. By default, fields with empty or
  4794  	// default values are omitted from API requests. See
  4795  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4796  	// details.
  4797  	ForceSendFields []string `json:"-"`
  4798  	// NullFields is a list of field names (e.g. "TransactionId") to include in API
  4799  	// requests with the JSON null value. By default, fields with empty values are
  4800  	// omitted from API requests. See
  4801  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4802  	NullFields []string `json:"-"`
  4803  }
  4804  
  4805  func (s *RollbackRequest) MarshalJSON() ([]byte, error) {
  4806  	type NoMethod RollbackRequest
  4807  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4808  }
  4809  
  4810  // Scan: Scan is a structure which describes Cloud Key Visualizer scan
  4811  // information.
  4812  type Scan struct {
  4813  	// Details: Additional information provided by the implementer.
  4814  	Details googleapi.RawMessage `json:"details,omitempty"`
  4815  	// EndTime: The upper bound for when the scan is defined.
  4816  	EndTime string `json:"endTime,omitempty"`
  4817  	// Name: The unique name of the scan, specific to the Database service
  4818  	// implementing this interface.
  4819  	Name string `json:"name,omitempty"`
  4820  	// ScanData: Output only. Cloud Key Visualizer scan data. Note, this field is
  4821  	// not available to the ListScans method.
  4822  	ScanData *ScanData `json:"scanData,omitempty"`
  4823  	// StartTime: A range of time (inclusive) for when the scan is defined. The
  4824  	// lower bound for when the scan is defined.
  4825  	StartTime string `json:"startTime,omitempty"`
  4826  
  4827  	// ServerResponse contains the HTTP response code and headers from the server.
  4828  	googleapi.ServerResponse `json:"-"`
  4829  	// ForceSendFields is a list of field names (e.g. "Details") to unconditionally
  4830  	// include in API requests. By default, fields with empty or default values are
  4831  	// omitted from API requests. See
  4832  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4833  	// details.
  4834  	ForceSendFields []string `json:"-"`
  4835  	// NullFields is a list of field names (e.g. "Details") to include in API
  4836  	// requests with the JSON null value. By default, fields with empty values are
  4837  	// omitted from API requests. See
  4838  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4839  	NullFields []string `json:"-"`
  4840  }
  4841  
  4842  func (s *Scan) MarshalJSON() ([]byte, error) {
  4843  	type NoMethod Scan
  4844  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4845  }
  4846  
  4847  // ScanData: ScanData contains Cloud Key Visualizer scan data used by the
  4848  // caller to construct a visualization.
  4849  type ScanData struct {
  4850  	// Data: Cloud Key Visualizer scan data. The range of time this information
  4851  	// covers is captured via the above time range fields. Note, this field is not
  4852  	// available to the ListScans method.
  4853  	Data *VisualizationData `json:"data,omitempty"`
  4854  	// EndTime: The upper bound for when the contained data is defined.
  4855  	EndTime string `json:"endTime,omitempty"`
  4856  	// StartTime: A range of time (inclusive) for when the contained data is
  4857  	// defined. The lower bound for when the contained data is defined.
  4858  	StartTime string `json:"startTime,omitempty"`
  4859  	// ForceSendFields is a list of field names (e.g. "Data") to unconditionally
  4860  	// include in API requests. By default, fields with empty or default values are
  4861  	// omitted from API requests. See
  4862  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4863  	// details.
  4864  	ForceSendFields []string `json:"-"`
  4865  	// NullFields is a list of field names (e.g. "Data") to include in API requests
  4866  	// with the JSON null value. By default, fields with empty values are omitted
  4867  	// from API requests. See
  4868  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4869  	NullFields []string `json:"-"`
  4870  }
  4871  
  4872  func (s *ScanData) MarshalJSON() ([]byte, error) {
  4873  	type NoMethod ScanData
  4874  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4875  }
  4876  
  4877  // Session: A session in the Cloud Spanner API.
  4878  type Session struct {
  4879  	// ApproximateLastUseTime: Output only. The approximate timestamp when the
  4880  	// session is last used. It is typically earlier than the actual last use time.
  4881  	ApproximateLastUseTime string `json:"approximateLastUseTime,omitempty"`
  4882  	// CreateTime: Output only. The timestamp when the session is created.
  4883  	CreateTime string `json:"createTime,omitempty"`
  4884  	// CreatorRole: The database role which created this session.
  4885  	CreatorRole string `json:"creatorRole,omitempty"`
  4886  	// Labels: The labels for the session. * Label keys must be between 1 and 63
  4887  	// characters long and must conform to the following regular expression: `a-z
  4888  	// ([-a-z0-9]*[a-z0-9])?`. * Label values must be between 0 and 63 characters
  4889  	// long and must conform to the regular expression
  4890  	// `([a-z]([-a-z0-9]*[a-z0-9])?)?`. * No more than 64 labels can be associated
  4891  	// with a given session. See https://goo.gl/xmQnxf for more information on and
  4892  	// examples of labels.
  4893  	Labels map[string]string `json:"labels,omitempty"`
  4894  	// Multiplexed: Optional. If true, specifies a multiplexed session. A
  4895  	// multiplexed session may be used for multiple, concurrent read-only
  4896  	// operations but can not be used for read-write transactions, partitioned
  4897  	// reads, or partitioned queries. Multiplexed sessions can be created via
  4898  	// CreateSession but not via BatchCreateSessions. Multiplexed sessions may not
  4899  	// be deleted nor listed.
  4900  	Multiplexed bool `json:"multiplexed,omitempty"`
  4901  	// Name: Output only. The name of the session. This is always system-assigned.
  4902  	Name string `json:"name,omitempty"`
  4903  
  4904  	// ServerResponse contains the HTTP response code and headers from the server.
  4905  	googleapi.ServerResponse `json:"-"`
  4906  	// ForceSendFields is a list of field names (e.g. "ApproximateLastUseTime") to
  4907  	// unconditionally include in API requests. By default, fields with empty or
  4908  	// default values are omitted from API requests. See
  4909  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4910  	// details.
  4911  	ForceSendFields []string `json:"-"`
  4912  	// NullFields is a list of field names (e.g. "ApproximateLastUseTime") to
  4913  	// include in API requests with the JSON null value. By default, fields with
  4914  	// empty values are omitted from API requests. See
  4915  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4916  	NullFields []string `json:"-"`
  4917  }
  4918  
  4919  func (s *Session) MarshalJSON() ([]byte, error) {
  4920  	type NoMethod Session
  4921  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4922  }
  4923  
  4924  // SetIamPolicyRequest: Request message for `SetIamPolicy` method.
  4925  type SetIamPolicyRequest struct {
  4926  	// Policy: REQUIRED: The complete policy to be applied to the `resource`. The
  4927  	// size of the policy is limited to a few 10s of KB. An empty policy is a valid
  4928  	// policy but certain Google Cloud services (such as Projects) might reject
  4929  	// them.
  4930  	Policy *Policy `json:"policy,omitempty"`
  4931  	// ForceSendFields is a list of field names (e.g. "Policy") to unconditionally
  4932  	// include in API requests. By default, fields with empty or default values are
  4933  	// omitted from API requests. See
  4934  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4935  	// details.
  4936  	ForceSendFields []string `json:"-"`
  4937  	// NullFields is a list of field names (e.g. "Policy") to include in API
  4938  	// requests with the JSON null value. By default, fields with empty values are
  4939  	// omitted from API requests. See
  4940  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4941  	NullFields []string `json:"-"`
  4942  }
  4943  
  4944  func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
  4945  	type NoMethod SetIamPolicyRequest
  4946  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4947  }
  4948  
  4949  // ShortRepresentation: Condensed representation of a node and its subtree.
  4950  // Only present for `SCALAR` PlanNode(s).
  4951  type ShortRepresentation struct {
  4952  	// Description: A string representation of the expression subtree rooted at
  4953  	// this node.
  4954  	Description string `json:"description,omitempty"`
  4955  	// Subqueries: A mapping of (subquery variable name) -> (subquery node id) for
  4956  	// cases where the `description` string of this node references a `SCALAR`
  4957  	// subquery contained in the expression subtree rooted at this node. The
  4958  	// referenced `SCALAR` subquery may not necessarily be a direct child of this
  4959  	// node.
  4960  	Subqueries map[string]int64 `json:"subqueries,omitempty"`
  4961  	// ForceSendFields is a list of field names (e.g. "Description") to
  4962  	// unconditionally include in API requests. By default, fields with empty or
  4963  	// default values are omitted from API requests. See
  4964  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  4965  	// details.
  4966  	ForceSendFields []string `json:"-"`
  4967  	// NullFields is a list of field names (e.g. "Description") to include in API
  4968  	// requests with the JSON null value. By default, fields with empty values are
  4969  	// omitted from API requests. See
  4970  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  4971  	NullFields []string `json:"-"`
  4972  }
  4973  
  4974  func (s *ShortRepresentation) MarshalJSON() ([]byte, error) {
  4975  	type NoMethod ShortRepresentation
  4976  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  4977  }
  4978  
  4979  // Statement: A single DML statement.
  4980  type Statement struct {
  4981  	// ParamTypes: It is not always possible for Cloud Spanner to infer the right
  4982  	// SQL type from a JSON value. For example, values of type `BYTES` and values
  4983  	// of type `STRING` both appear in params as JSON strings. In these cases,
  4984  	// `param_types` can be used to specify the exact SQL type for some or all of
  4985  	// the SQL statement parameters. See the definition of Type for more
  4986  	// information about SQL types.
  4987  	ParamTypes map[string]Type `json:"paramTypes,omitempty"`
  4988  	// Params: Parameter names and values that bind to placeholders in the DML
  4989  	// string. A parameter placeholder consists of the `@` character followed by
  4990  	// the parameter name (for example, `@firstName`). Parameter names can contain
  4991  	// letters, numbers, and underscores. Parameters can appear anywhere that a
  4992  	// literal value is expected. The same parameter name can be used more than
  4993  	// once, for example: "WHERE id > @msg_id AND id < @msg_id + 100" It is an
  4994  	// error to execute a SQL statement with unbound parameters.
  4995  	Params googleapi.RawMessage `json:"params,omitempty"`
  4996  	// Sql: Required. The DML string.
  4997  	Sql string `json:"sql,omitempty"`
  4998  	// ForceSendFields is a list of field names (e.g. "ParamTypes") to
  4999  	// unconditionally include in API requests. By default, fields with empty or
  5000  	// default values are omitted from API requests. See
  5001  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5002  	// details.
  5003  	ForceSendFields []string `json:"-"`
  5004  	// NullFields is a list of field names (e.g. "ParamTypes") to include in API
  5005  	// requests with the JSON null value. By default, fields with empty values are
  5006  	// omitted from API requests. See
  5007  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5008  	NullFields []string `json:"-"`
  5009  }
  5010  
  5011  func (s *Statement) MarshalJSON() ([]byte, error) {
  5012  	type NoMethod Statement
  5013  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5014  }
  5015  
  5016  // Status: The `Status` type defines a logical error model that is suitable for
  5017  // different programming environments, including REST APIs and RPC APIs. It is
  5018  // used by gRPC (https://github.com/grpc). Each `Status` message contains three
  5019  // pieces of data: error code, error message, and error details. You can find
  5020  // out more about this error model and how to work with it in the API Design
  5021  // Guide (https://cloud.google.com/apis/design/errors).
  5022  type Status struct {
  5023  	// Code: The status code, which should be an enum value of google.rpc.Code.
  5024  	Code int64 `json:"code,omitempty"`
  5025  	// Details: A list of messages that carry the error details. There is a common
  5026  	// set of message types for APIs to use.
  5027  	Details []googleapi.RawMessage `json:"details,omitempty"`
  5028  	// Message: A developer-facing error message, which should be in English. Any
  5029  	// user-facing error message should be localized and sent in the
  5030  	// google.rpc.Status.details field, or localized by the client.
  5031  	Message string `json:"message,omitempty"`
  5032  	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
  5033  	// include in API requests. By default, fields with empty or default values are
  5034  	// omitted from API requests. See
  5035  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5036  	// details.
  5037  	ForceSendFields []string `json:"-"`
  5038  	// NullFields is a list of field names (e.g. "Code") to include in API requests
  5039  	// with the JSON null value. By default, fields with empty values are omitted
  5040  	// from API requests. See
  5041  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5042  	NullFields []string `json:"-"`
  5043  }
  5044  
  5045  func (s *Status) MarshalJSON() ([]byte, error) {
  5046  	type NoMethod Status
  5047  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5048  }
  5049  
  5050  // StructType: `StructType` defines the fields of a STRUCT type.
  5051  type StructType struct {
  5052  	// Fields: The list of fields that make up this struct. Order is significant,
  5053  	// because values of this struct type are represented as lists, where the order
  5054  	// of field values matches the order of fields in the StructType. In turn, the
  5055  	// order of fields matches the order of columns in a read request, or the order
  5056  	// of fields in the `SELECT` clause of a query.
  5057  	Fields []*Field `json:"fields,omitempty"`
  5058  	// ForceSendFields is a list of field names (e.g. "Fields") to unconditionally
  5059  	// include in API requests. By default, fields with empty or default values are
  5060  	// omitted from API requests. See
  5061  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5062  	// details.
  5063  	ForceSendFields []string `json:"-"`
  5064  	// NullFields is a list of field names (e.g. "Fields") to include in API
  5065  	// requests with the JSON null value. By default, fields with empty values are
  5066  	// omitted from API requests. See
  5067  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5068  	NullFields []string `json:"-"`
  5069  }
  5070  
  5071  func (s *StructType) MarshalJSON() ([]byte, error) {
  5072  	type NoMethod StructType
  5073  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5074  }
  5075  
  5076  // TestIamPermissionsRequest: Request message for `TestIamPermissions` method.
  5077  type TestIamPermissionsRequest struct {
  5078  	// Permissions: REQUIRED: The set of permissions to check for 'resource'.
  5079  	// Permissions with wildcards (such as '*', 'spanner.*', 'spanner.instances.*')
  5080  	// are not allowed.
  5081  	Permissions []string `json:"permissions,omitempty"`
  5082  	// ForceSendFields is a list of field names (e.g. "Permissions") to
  5083  	// unconditionally include in API requests. By default, fields with empty or
  5084  	// default values are omitted from API requests. See
  5085  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5086  	// details.
  5087  	ForceSendFields []string `json:"-"`
  5088  	// NullFields is a list of field names (e.g. "Permissions") to include in API
  5089  	// requests with the JSON null value. By default, fields with empty values are
  5090  	// omitted from API requests. See
  5091  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5092  	NullFields []string `json:"-"`
  5093  }
  5094  
  5095  func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
  5096  	type NoMethod TestIamPermissionsRequest
  5097  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5098  }
  5099  
  5100  // TestIamPermissionsResponse: Response message for `TestIamPermissions`
  5101  // method.
  5102  type TestIamPermissionsResponse struct {
  5103  	// Permissions: A subset of `TestPermissionsRequest.permissions` that the
  5104  	// caller is allowed.
  5105  	Permissions []string `json:"permissions,omitempty"`
  5106  
  5107  	// ServerResponse contains the HTTP response code and headers from the server.
  5108  	googleapi.ServerResponse `json:"-"`
  5109  	// ForceSendFields is a list of field names (e.g. "Permissions") to
  5110  	// unconditionally include in API requests. By default, fields with empty or
  5111  	// default values are omitted from API requests. See
  5112  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5113  	// details.
  5114  	ForceSendFields []string `json:"-"`
  5115  	// NullFields is a list of field names (e.g. "Permissions") to include in API
  5116  	// requests with the JSON null value. By default, fields with empty values are
  5117  	// omitted from API requests. See
  5118  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5119  	NullFields []string `json:"-"`
  5120  }
  5121  
  5122  func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
  5123  	type NoMethod TestIamPermissionsResponse
  5124  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5125  }
  5126  
  5127  // Transaction: A transaction.
  5128  type Transaction struct {
  5129  	// Id: `id` may be used to identify the transaction in subsequent Read,
  5130  	// ExecuteSql, Commit, or Rollback calls. Single-use read-only transactions do
  5131  	// not have IDs, because single-use transactions do not support multiple
  5132  	// requests.
  5133  	Id string `json:"id,omitempty"`
  5134  	// ReadTimestamp: For snapshot read-only transactions, the read timestamp
  5135  	// chosen for the transaction. Not returned by default: see
  5136  	// TransactionOptions.ReadOnly.return_read_timestamp. A timestamp in RFC3339
  5137  	// UTC \"Zulu\" format, accurate to nanoseconds. Example:
  5138  	// "2014-10-02T15:01:23.045123456Z".
  5139  	ReadTimestamp string `json:"readTimestamp,omitempty"`
  5140  
  5141  	// ServerResponse contains the HTTP response code and headers from the server.
  5142  	googleapi.ServerResponse `json:"-"`
  5143  	// ForceSendFields is a list of field names (e.g. "Id") to unconditionally
  5144  	// include in API requests. By default, fields with empty or default values are
  5145  	// omitted from API requests. See
  5146  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5147  	// details.
  5148  	ForceSendFields []string `json:"-"`
  5149  	// NullFields is a list of field names (e.g. "Id") to include in API requests
  5150  	// with the JSON null value. By default, fields with empty values are omitted
  5151  	// from API requests. See
  5152  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5153  	NullFields []string `json:"-"`
  5154  }
  5155  
  5156  func (s *Transaction) MarshalJSON() ([]byte, error) {
  5157  	type NoMethod Transaction
  5158  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5159  }
  5160  
  5161  // TransactionOptions: Transactions: Each session can have at most one active
  5162  // transaction at a time (note that standalone reads and queries use a
  5163  // transaction internally and do count towards the one transaction limit).
  5164  // After the active transaction is completed, the session can immediately be
  5165  // re-used for the next transaction. It is not necessary to create a new
  5166  // session for each transaction. Transaction modes: Cloud Spanner supports
  5167  // three transaction modes: 1. Locking read-write. This type of transaction is
  5168  // the only way to write data into Cloud Spanner. These transactions rely on
  5169  // pessimistic locking and, if necessary, two-phase commit. Locking read-write
  5170  // transactions may abort, requiring the application to retry. 2. Snapshot
  5171  // read-only. Snapshot read-only transactions provide guaranteed consistency
  5172  // across several reads, but do not allow writes. Snapshot read-only
  5173  // transactions can be configured to read at timestamps in the past, or
  5174  // configured to perform a strong read (where Spanner will select a timestamp
  5175  // such that the read is guaranteed to see the effects of all transactions that
  5176  // have committed before the start of the read). Snapshot read-only
  5177  // transactions do not need to be committed. Queries on change streams must be
  5178  // performed with the snapshot read-only transaction mode, specifying a strong
  5179  // read. Please see TransactionOptions.ReadOnly.strong for more details. 3.
  5180  // Partitioned DML. This type of transaction is used to execute a single
  5181  // Partitioned DML statement. Partitioned DML partitions the key space and runs
  5182  // the DML statement over each partition in parallel using separate, internal
  5183  // transactions that commit independently. Partitioned DML transactions do not
  5184  // need to be committed. For transactions that only read, snapshot read-only
  5185  // transactions provide simpler semantics and are almost always faster. In
  5186  // particular, read-only transactions do not take locks, so they do not
  5187  // conflict with read-write transactions. As a consequence of not taking locks,
  5188  // they also do not abort, so retry loops are not needed. Transactions may only
  5189  // read-write data in a single database. They may, however, read-write data in
  5190  // different tables within that database. Locking read-write transactions:
  5191  // Locking transactions may be used to atomically read-modify-write data
  5192  // anywhere in a database. This type of transaction is externally consistent.
  5193  // Clients should attempt to minimize the amount of time a transaction is
  5194  // active. Faster transactions commit with higher probability and cause less
  5195  // contention. Cloud Spanner attempts to keep read locks active as long as the
  5196  // transaction continues to do reads, and the transaction has not been
  5197  // terminated by Commit or Rollback. Long periods of inactivity at the client
  5198  // may cause Cloud Spanner to release a transaction's locks and abort it.
  5199  // Conceptually, a read-write transaction consists of zero or more reads or SQL
  5200  // statements followed by Commit. At any time before Commit, the client can
  5201  // send a Rollback request to abort the transaction. Semantics: Cloud Spanner
  5202  // can commit the transaction if all read locks it acquired are still valid at
  5203  // commit time, and it is able to acquire write locks for all writes. Cloud
  5204  // Spanner can abort the transaction for any reason. If a commit attempt
  5205  // returns `ABORTED`, Cloud Spanner guarantees that the transaction has not
  5206  // modified any user data in Cloud Spanner. Unless the transaction commits,
  5207  // Cloud Spanner makes no guarantees about how long the transaction's locks
  5208  // were held for. It is an error to use Cloud Spanner locks for any sort of
  5209  // mutual exclusion other than between Cloud Spanner transactions themselves.
  5210  // Retrying aborted transactions: When a transaction aborts, the application
  5211  // can choose to retry the whole transaction again. To maximize the chances of
  5212  // successfully committing the retry, the client should execute the retry in
  5213  // the same session as the original attempt. The original session's lock
  5214  // priority increases with each consecutive abort, meaning that each attempt
  5215  // has a slightly better chance of success than the previous. Note that the
  5216  // lock priority is preserved per session (not per transaction). Lock priority
  5217  // is set by the first read or write in the first attempt of a read-write
  5218  // transaction. If the application starts a new session to retry the whole
  5219  // transaction, the transaction loses its original lock priority. Moreover, the
  5220  // lock priority is only preserved if the transaction fails with an `ABORTED`
  5221  // error. Under some circumstances (for example, many transactions attempting
  5222  // to modify the same row(s)), a transaction can abort many times in a short
  5223  // period before successfully committing. Thus, it is not a good idea to cap
  5224  // the number of retries a transaction can attempt; instead, it is better to
  5225  // limit the total amount of time spent retrying. Idle transactions: A
  5226  // transaction is considered idle if it has no outstanding reads or SQL queries
  5227  // and has not started a read or SQL query within the last 10 seconds. Idle
  5228  // transactions can be aborted by Cloud Spanner so that they don't hold on to
  5229  // locks indefinitely. If an idle transaction is aborted, the commit will fail
  5230  // with error `ABORTED`. If this behavior is undesirable, periodically
  5231  // executing a simple SQL query in the transaction (for example, `SELECT 1`)
  5232  // prevents the transaction from becoming idle. Snapshot read-only
  5233  // transactions: Snapshot read-only transactions provides a simpler method than
  5234  // locking read-write transactions for doing several consistent reads. However,
  5235  // this type of transaction does not support writes. Snapshot transactions do
  5236  // not take locks. Instead, they work by choosing a Cloud Spanner timestamp,
  5237  // then executing all reads at that timestamp. Since they do not acquire locks,
  5238  // they do not block concurrent read-write transactions. Unlike locking
  5239  // read-write transactions, snapshot read-only transactions never abort. They
  5240  // can fail if the chosen read timestamp is garbage collected; however, the
  5241  // default garbage collection policy is generous enough that most applications
  5242  // do not need to worry about this in practice. Snapshot read-only transactions
  5243  // do not need to call Commit or Rollback (and in fact are not permitted to do
  5244  // so). To execute a snapshot transaction, the client specifies a timestamp
  5245  // bound, which tells Cloud Spanner how to choose a read timestamp. The types
  5246  // of timestamp bound are: - Strong (the default). - Bounded staleness. - Exact
  5247  // staleness. If the Cloud Spanner database to be read is geographically
  5248  // distributed, stale read-only transactions can execute more quickly than
  5249  // strong or read-write transactions, because they are able to execute far from
  5250  // the leader replica. Each type of timestamp bound is discussed in detail
  5251  // below. Strong: Strong reads are guaranteed to see the effects of all
  5252  // transactions that have committed before the start of the read. Furthermore,
  5253  // all rows yielded by a single read are consistent with each other -- if any
  5254  // part of the read observes a transaction, all parts of the read see the
  5255  // transaction. Strong reads are not repeatable: two consecutive strong
  5256  // read-only transactions might return inconsistent results if there are
  5257  // concurrent writes. If consistency across reads is required, the reads should
  5258  // be executed within a transaction or at an exact read timestamp. Queries on
  5259  // change streams (see below for more details) must also specify the strong
  5260  // read timestamp bound. See TransactionOptions.ReadOnly.strong. Exact
  5261  // staleness: These timestamp bounds execute reads at a user-specified
  5262  // timestamp. Reads at a timestamp are guaranteed to see a consistent prefix of
  5263  // the global transaction history: they observe modifications done by all
  5264  // transactions with a commit timestamp less than or equal to the read
  5265  // timestamp, and observe none of the modifications done by transactions with a
  5266  // larger commit timestamp. They will block until all conflicting transactions
  5267  // that may be assigned commit timestamps <= the read timestamp have finished.
  5268  // The timestamp can either be expressed as an absolute Cloud Spanner commit
  5269  // timestamp or a staleness relative to the current time. These modes do not
  5270  // require a "negotiation phase" to pick a timestamp. As a result, they execute
  5271  // slightly faster than the equivalent boundedly stale concurrency modes. On
  5272  // the other hand, boundedly stale reads usually return fresher results. See
  5273  // TransactionOptions.ReadOnly.read_timestamp and
  5274  // TransactionOptions.ReadOnly.exact_staleness. Bounded staleness: Bounded
  5275  // staleness modes allow Cloud Spanner to pick the read timestamp, subject to a
  5276  // user-provided staleness bound. Cloud Spanner chooses the newest timestamp
  5277  // within the staleness bound that allows execution of the reads at the closest
  5278  // available replica without blocking. All rows yielded are consistent with
  5279  // each other -- if any part of the read observes a transaction, all parts of
  5280  // the read see the transaction. Boundedly stale reads are not repeatable: two
  5281  // stale reads, even if they use the same staleness bound, can execute at
  5282  // different timestamps and thus return inconsistent results. Boundedly stale
  5283  // reads execute in two phases: the first phase negotiates a timestamp among
  5284  // all replicas needed to serve the read. In the second phase, reads are
  5285  // executed at the negotiated timestamp. As a result of the two phase
  5286  // execution, bounded staleness reads are usually a little slower than
  5287  // comparable exact staleness reads. However, they are typically able to return
  5288  // fresher results, and are more likely to execute at the closest replica.
  5289  // Because the timestamp negotiation requires up-front knowledge of which rows
  5290  // will be read, it can only be used with single-use read-only transactions.
  5291  // See TransactionOptions.ReadOnly.max_staleness and
  5292  // TransactionOptions.ReadOnly.min_read_timestamp. Old read timestamps and
  5293  // garbage collection: Cloud Spanner continuously garbage collects deleted and
  5294  // overwritten data in the background to reclaim storage space. This process is
  5295  // known as "version GC". By default, version GC reclaims versions after they
  5296  // are one hour old. Because of this, Cloud Spanner cannot perform reads at
  5297  // read timestamps more than one hour in the past. This restriction also
  5298  // applies to in-progress reads and/or SQL queries whose timestamp become too
  5299  // old while executing. Reads and SQL queries with too-old read timestamps fail
  5300  // with the error `FAILED_PRECONDITION`. You can configure and extend the
  5301  // `VERSION_RETENTION_PERIOD` of a database up to a period as long as one week,
  5302  // which allows Cloud Spanner to perform reads up to one week in the past.
  5303  // Querying change Streams: A Change Stream is a schema object that can be
  5304  // configured to watch data changes on the entire database, a set of tables, or
  5305  // a set of columns in a database. When a change stream is created, Spanner
  5306  // automatically defines a corresponding SQL Table-Valued Function (TVF) that
  5307  // can be used to query the change records in the associated change stream
  5308  // using the ExecuteStreamingSql API. The name of the TVF for a change stream
  5309  // is generated from the name of the change stream: READ_. All queries on
  5310  // change stream TVFs must be executed using the ExecuteStreamingSql API with a
  5311  // single-use read-only transaction with a strong read-only timestamp_bound.
  5312  // The change stream TVF allows users to specify the start_timestamp and
  5313  // end_timestamp for the time range of interest. All change records within the
  5314  // retention period is accessible using the strong read-only timestamp_bound.
  5315  // All other TransactionOptions are invalid for change stream queries. In
  5316  // addition, if TransactionOptions.read_only.return_read_timestamp is set to
  5317  // true, a special value of 2^63 - 2 will be returned in the Transaction
  5318  // message that describes the transaction, instead of a valid read timestamp.
  5319  // This special value should be discarded and not used for any subsequent
  5320  // queries. Please see https://cloud.google.com/spanner/docs/change-streams for
  5321  // more details on how to query the change stream TVFs. Partitioned DML
  5322  // transactions: Partitioned DML transactions are used to execute DML
  5323  // statements with a different execution strategy that provides different, and
  5324  // often better, scalability properties for large, table-wide operations than
  5325  // DML in a ReadWrite transaction. Smaller scoped statements, such as an OLTP
  5326  // workload, should prefer using ReadWrite transactions. Partitioned DML
  5327  // partitions the keyspace and runs the DML statement on each partition in
  5328  // separate, internal transactions. These transactions commit automatically
  5329  // when complete, and run independently from one another. To reduce lock
  5330  // contention, this execution strategy only acquires read locks on rows that
  5331  // match the WHERE clause of the statement. Additionally, the smaller
  5332  // per-partition transactions hold locks for less time. That said, Partitioned
  5333  // DML is not a drop-in replacement for standard DML used in ReadWrite
  5334  // transactions. - The DML statement must be fully-partitionable. Specifically,
  5335  // the statement must be expressible as the union of many statements which each
  5336  // access only a single row of the table. - The statement is not applied
  5337  // atomically to all rows of the table. Rather, the statement is applied
  5338  // atomically to partitions of the table, in independent transactions.
  5339  // Secondary index rows are updated atomically with the base table rows. -
  5340  // Partitioned DML does not guarantee exactly-once execution semantics against
  5341  // a partition. The statement is applied at least once to each partition. It is
  5342  // strongly recommended that the DML statement should be idempotent to avoid
  5343  // unexpected results. For instance, it is potentially dangerous to run a
  5344  // statement such as `UPDATE table SET column = column + 1` as it could be run
  5345  // multiple times against some rows. - The partitions are committed
  5346  // automatically - there is no support for Commit or Rollback. If the call
  5347  // returns an error, or if the client issuing the ExecuteSql call dies, it is
  5348  // possible that some rows had the statement executed on them successfully. It
  5349  // is also possible that statement was never executed against other rows. -
  5350  // Partitioned DML transactions may only contain the execution of a single DML
  5351  // statement via ExecuteSql or ExecuteStreamingSql. - If any error is
  5352  // encountered during the execution of the partitioned DML operation (for
  5353  // instance, a UNIQUE INDEX violation, division by zero, or a value that cannot
  5354  // be stored due to schema constraints), then the operation is stopped at that
  5355  // point and an error is returned. It is possible that at this point, some
  5356  // partitions have been committed (or even committed multiple times), and other
  5357  // partitions have not been run at all. Given the above, Partitioned DML is
  5358  // good fit for large, database-wide, operations that are idempotent, such as
  5359  // deleting old rows from a very large table.
  5360  type TransactionOptions struct {
  5361  	// ExcludeTxnFromChangeStreams: When `exclude_txn_from_change_streams` is set
  5362  	// to `true`: * Modifications from this transaction will not be recorded in
  5363  	// change streams with DDL option `allow_txn_exclusion=true` that are tracking
  5364  	// columns modified by these transactions. * Modifications from this
  5365  	// transaction will be recorded in change streams with DDL option
  5366  	// `allow_txn_exclusion=false or not set` that are tracking columns modified by
  5367  	// these transactions. When `exclude_txn_from_change_streams` is set to `false`
  5368  	// or not set, Modifications from this transaction will be recorded in all
  5369  	// change streams that are tracking columns modified by these transactions.
  5370  	// `exclude_txn_from_change_streams` may only be specified for read-write or
  5371  	// partitioned-dml transactions, otherwise the API will return an
  5372  	// `INVALID_ARGUMENT` error.
  5373  	ExcludeTxnFromChangeStreams bool `json:"excludeTxnFromChangeStreams,omitempty"`
  5374  	// PartitionedDml: Partitioned DML transaction. Authorization to begin a
  5375  	// Partitioned DML transaction requires
  5376  	// `spanner.databases.beginPartitionedDmlTransaction` permission on the
  5377  	// `session` resource.
  5378  	PartitionedDml *PartitionedDml `json:"partitionedDml,omitempty"`
  5379  	// ReadOnly: Transaction will not write. Authorization to begin a read-only
  5380  	// transaction requires `spanner.databases.beginReadOnlyTransaction` permission
  5381  	// on the `session` resource.
  5382  	ReadOnly *ReadOnly `json:"readOnly,omitempty"`
  5383  	// ReadWrite: Transaction may write. Authorization to begin a read-write
  5384  	// transaction requires `spanner.databases.beginOrRollbackReadWriteTransaction`
  5385  	// permission on the `session` resource.
  5386  	ReadWrite *ReadWrite `json:"readWrite,omitempty"`
  5387  	// ForceSendFields is a list of field names (e.g.
  5388  	// "ExcludeTxnFromChangeStreams") to unconditionally include in API requests.
  5389  	// By default, fields with empty or default values are omitted from API
  5390  	// requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields
  5391  	// for more details.
  5392  	ForceSendFields []string `json:"-"`
  5393  	// NullFields is a list of field names (e.g. "ExcludeTxnFromChangeStreams") to
  5394  	// include in API requests with the JSON null value. By default, fields with
  5395  	// empty values are omitted from API requests. See
  5396  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5397  	NullFields []string `json:"-"`
  5398  }
  5399  
  5400  func (s *TransactionOptions) MarshalJSON() ([]byte, error) {
  5401  	type NoMethod TransactionOptions
  5402  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5403  }
  5404  
  5405  // TransactionSelector: This message is used to select the transaction in which
  5406  // a Read or ExecuteSql call runs. See TransactionOptions for more information
  5407  // about transactions.
  5408  type TransactionSelector struct {
  5409  	// Begin: Begin a new transaction and execute this read or SQL query in it. The
  5410  	// transaction ID of the new transaction is returned in
  5411  	// ResultSetMetadata.transaction, which is a Transaction.
  5412  	Begin *TransactionOptions `json:"begin,omitempty"`
  5413  	// Id: Execute the read or SQL query in a previously-started transaction.
  5414  	Id string `json:"id,omitempty"`
  5415  	// SingleUse: Execute the read or SQL query in a temporary transaction. This is
  5416  	// the most efficient way to execute a transaction that consists of a single
  5417  	// SQL query.
  5418  	SingleUse *TransactionOptions `json:"singleUse,omitempty"`
  5419  	// ForceSendFields is a list of field names (e.g. "Begin") to unconditionally
  5420  	// include in API requests. By default, fields with empty or default values are
  5421  	// omitted from API requests. See
  5422  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5423  	// details.
  5424  	ForceSendFields []string `json:"-"`
  5425  	// NullFields is a list of field names (e.g. "Begin") to include in API
  5426  	// requests with the JSON null value. By default, fields with empty values are
  5427  	// omitted from API requests. See
  5428  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5429  	NullFields []string `json:"-"`
  5430  }
  5431  
  5432  func (s *TransactionSelector) MarshalJSON() ([]byte, error) {
  5433  	type NoMethod TransactionSelector
  5434  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5435  }
  5436  
  5437  // Type: `Type` indicates the type of a Cloud Spanner value, as might be stored
  5438  // in a table cell or returned from an SQL query.
  5439  type Type struct {
  5440  	// ArrayElementType: If code == ARRAY, then `array_element_type` is the type of
  5441  	// the array elements.
  5442  	ArrayElementType *Type `json:"arrayElementType,omitempty"`
  5443  	// Code: Required. The TypeCode for this type.
  5444  	//
  5445  	// Possible values:
  5446  	//   "TYPE_CODE_UNSPECIFIED" - Not specified.
  5447  	//   "BOOL" - Encoded as JSON `true` or `false`.
  5448  	//   "INT64" - Encoded as `string`, in decimal format.
  5449  	//   "FLOAT64" - Encoded as `number`, or the strings "NaN", "Infinity", or
  5450  	// "-Infinity".
  5451  	//   "FLOAT32" - Encoded as `number`, or the strings "NaN", "Infinity", or
  5452  	// "-Infinity".
  5453  	//   "TIMESTAMP" - Encoded as `string` in RFC 3339 timestamp format. The time
  5454  	// zone must be present, and must be "Z". If the schema has the column option
  5455  	// `allow_commit_timestamp=true`, the placeholder string
  5456  	// "spanner.commit_timestamp()" can be used to instruct the system to insert
  5457  	// the commit timestamp associated with the transaction commit.
  5458  	//   "DATE" - Encoded as `string` in RFC 3339 date format.
  5459  	//   "STRING" - Encoded as `string`.
  5460  	//   "BYTES" - Encoded as a base64-encoded `string`, as described in RFC 4648,
  5461  	// section 4.
  5462  	//   "ARRAY" - Encoded as `list`, where the list elements are represented
  5463  	// according to array_element_type.
  5464  	//   "STRUCT" - Encoded as `list`, where list element `i` is represented
  5465  	// according to [struct_type.fields[i]][google.spanner.v1.StructType.fields].
  5466  	//   "NUMERIC" - Encoded as `string`, in decimal format or scientific notation
  5467  	// format. Decimal format: `[+-]Digits[.[Digits]]` or `+-.Digits` Scientific
  5468  	// notation: `[+-]Digits[.[Digits]][ExponentIndicator[+-]Digits]` or
  5469  	// `+-.Digits[ExponentIndicator[+-]Digits]` (ExponentIndicator is "e" or
  5470  	// "E")
  5471  	//   "JSON" - Encoded as a JSON-formatted `string` as described in RFC 7159.
  5472  	// The following rules are applied when parsing JSON input: - Whitespace
  5473  	// characters are not preserved. - If a JSON object has duplicate keys, only
  5474  	// the first key is preserved. - Members of a JSON object are not guaranteed to
  5475  	// have their order preserved. - JSON array elements will have their order
  5476  	// preserved.
  5477  	//   "PROTO" - Encoded as a base64-encoded `string`, as described in RFC 4648,
  5478  	// section 4.
  5479  	//   "ENUM" - Encoded as `string`, in decimal format.
  5480  	Code string `json:"code,omitempty"`
  5481  	// ProtoTypeFqn: If code == PROTO or code == ENUM, then `proto_type_fqn` is the
  5482  	// fully qualified name of the proto type representing the proto/enum
  5483  	// definition.
  5484  	ProtoTypeFqn string `json:"protoTypeFqn,omitempty"`
  5485  	// StructType: If code == STRUCT, then `struct_type` provides type information
  5486  	// for the struct's fields.
  5487  	StructType *StructType `json:"structType,omitempty"`
  5488  	// TypeAnnotation: The TypeAnnotationCode that disambiguates SQL type that
  5489  	// Spanner will use to represent values of this type during query processing.
  5490  	// This is necessary for some type codes because a single TypeCode can be
  5491  	// mapped to different SQL types depending on the SQL dialect. type_annotation
  5492  	// typically is not needed to process the content of a value (it doesn't affect
  5493  	// serialization) and clients can ignore it on the read path.
  5494  	//
  5495  	// Possible values:
  5496  	//   "TYPE_ANNOTATION_CODE_UNSPECIFIED" - Not specified.
  5497  	//   "PG_NUMERIC" - PostgreSQL compatible NUMERIC type. This annotation needs
  5498  	// to be applied to Type instances having NUMERIC type code to specify that
  5499  	// values of this type should be treated as PostgreSQL NUMERIC values.
  5500  	// Currently this annotation is always needed for NUMERIC when a client
  5501  	// interacts with PostgreSQL-enabled Spanner databases.
  5502  	//   "PG_JSONB" - PostgreSQL compatible JSONB type. This annotation needs to be
  5503  	// applied to Type instances having JSON type code to specify that values of
  5504  	// this type should be treated as PostgreSQL JSONB values. Currently this
  5505  	// annotation is always needed for JSON when a client interacts with
  5506  	// PostgreSQL-enabled Spanner databases.
  5507  	TypeAnnotation string `json:"typeAnnotation,omitempty"`
  5508  	// ForceSendFields is a list of field names (e.g. "ArrayElementType") to
  5509  	// unconditionally include in API requests. By default, fields with empty or
  5510  	// default values are omitted from API requests. See
  5511  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5512  	// details.
  5513  	ForceSendFields []string `json:"-"`
  5514  	// NullFields is a list of field names (e.g. "ArrayElementType") to include in
  5515  	// API requests with the JSON null value. By default, fields with empty values
  5516  	// are omitted from API requests. See
  5517  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5518  	NullFields []string `json:"-"`
  5519  }
  5520  
  5521  func (s *Type) MarshalJSON() ([]byte, error) {
  5522  	type NoMethod Type
  5523  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5524  }
  5525  
  5526  // UpdateDatabaseDdlMetadata: Metadata type for the operation returned by
  5527  // UpdateDatabaseDdl.
  5528  type UpdateDatabaseDdlMetadata struct {
  5529  	// Actions: The brief action info for the DDL statements. `actions[i]` is the
  5530  	// brief info for `statements[i]`.
  5531  	Actions []*DdlStatementActionInfo `json:"actions,omitempty"`
  5532  	// CommitTimestamps: Reports the commit timestamps of all statements that have
  5533  	// succeeded so far, where `commit_timestamps[i]` is the commit timestamp for
  5534  	// the statement `statements[i]`.
  5535  	CommitTimestamps []string `json:"commitTimestamps,omitempty"`
  5536  	// Database: The database being modified.
  5537  	Database string `json:"database,omitempty"`
  5538  	// Progress: The progress of the UpdateDatabaseDdl operations. All DDL
  5539  	// statements will have continuously updating progress, and `progress[i]` is
  5540  	// the operation progress for `statements[i]`. Also, `progress[i]` will have
  5541  	// start time and end time populated with commit timestamp of operation, as
  5542  	// well as a progress of 100% once the operation has completed.
  5543  	Progress []*OperationProgress `json:"progress,omitempty"`
  5544  	// Statements: For an update this list contains all the statements. For an
  5545  	// individual statement, this list contains only that statement.
  5546  	Statements []string `json:"statements,omitempty"`
  5547  	// Throttled: Output only. When true, indicates that the operation is throttled
  5548  	// e.g. due to resource constraints. When resources become available the
  5549  	// operation will resume and this field will be false again.
  5550  	Throttled bool `json:"throttled,omitempty"`
  5551  	// ForceSendFields is a list of field names (e.g. "Actions") to unconditionally
  5552  	// include in API requests. By default, fields with empty or default values are
  5553  	// omitted from API requests. See
  5554  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5555  	// details.
  5556  	ForceSendFields []string `json:"-"`
  5557  	// NullFields is a list of field names (e.g. "Actions") to include in API
  5558  	// requests with the JSON null value. By default, fields with empty values are
  5559  	// omitted from API requests. See
  5560  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5561  	NullFields []string `json:"-"`
  5562  }
  5563  
  5564  func (s *UpdateDatabaseDdlMetadata) MarshalJSON() ([]byte, error) {
  5565  	type NoMethod UpdateDatabaseDdlMetadata
  5566  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5567  }
  5568  
  5569  // UpdateDatabaseDdlRequest: Enqueues the given DDL statements to be applied,
  5570  // in order but not necessarily all at once, to the database schema at some
  5571  // point (or points) in the future. The server checks that the statements are
  5572  // executable (syntactically valid, name tables that exist, etc.) before
  5573  // enqueueing them, but they may still fail upon later execution (e.g., if a
  5574  // statement from another batch of statements is applied first and it conflicts
  5575  // in some way, or if there is some data-related problem like a `NULL` value in
  5576  // a column to which `NOT NULL` would be added). If a statement fails, all
  5577  // subsequent statements in the batch are automatically cancelled. Each batch
  5578  // of statements is assigned a name which can be used with the Operations API
  5579  // to monitor progress. See the operation_id field for more details.
  5580  type UpdateDatabaseDdlRequest struct {
  5581  	// OperationId: If empty, the new update request is assigned an
  5582  	// automatically-generated operation ID. Otherwise, `operation_id` is used to
  5583  	// construct the name of the resulting Operation. Specifying an explicit
  5584  	// operation ID simplifies determining whether the statements were executed in
  5585  	// the event that the UpdateDatabaseDdl call is replayed, or the return value
  5586  	// is otherwise lost: the database and `operation_id` fields can be combined to
  5587  	// form the name of the resulting longrunning.Operation: `/operations/`.
  5588  	// `operation_id` should be unique within the database, and must be a valid
  5589  	// identifier: `a-z*`. Note that automatically-generated operation IDs always
  5590  	// begin with an underscore. If the named operation already exists,
  5591  	// UpdateDatabaseDdl returns `ALREADY_EXISTS`.
  5592  	OperationId string `json:"operationId,omitempty"`
  5593  	// ProtoDescriptors: Optional. Proto descriptors used by CREATE/ALTER PROTO
  5594  	// BUNDLE statements. Contains a protobuf-serialized
  5595  	// google.protobuf.FileDescriptorSet
  5596  	// (https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto).
  5597  	// To generate it, install (https://grpc.io/docs/protoc-installation/) and run
  5598  	// `protoc` with --include_imports and --descriptor_set_out. For example, to
  5599  	// generate for moon/shot/app.proto, run ``` $protoc --proto_path=/app_path
  5600  	// --proto_path=/lib_path \ --include_imports \
  5601  	// --descriptor_set_out=descriptors.data \ moon/shot/app.proto ``` For more
  5602  	// details, see protobuffer self description
  5603  	// (https://developers.google.com/protocol-buffers/docs/techniques#self-description).
  5604  	ProtoDescriptors string `json:"protoDescriptors,omitempty"`
  5605  	// Statements: Required. DDL statements to be applied to the database.
  5606  	Statements []string `json:"statements,omitempty"`
  5607  	// ForceSendFields is a list of field names (e.g. "OperationId") to
  5608  	// unconditionally include in API requests. By default, fields with empty or
  5609  	// default values are omitted from API requests. See
  5610  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5611  	// details.
  5612  	ForceSendFields []string `json:"-"`
  5613  	// NullFields is a list of field names (e.g. "OperationId") to include in API
  5614  	// requests with the JSON null value. By default, fields with empty values are
  5615  	// omitted from API requests. See
  5616  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5617  	NullFields []string `json:"-"`
  5618  }
  5619  
  5620  func (s *UpdateDatabaseDdlRequest) MarshalJSON() ([]byte, error) {
  5621  	type NoMethod UpdateDatabaseDdlRequest
  5622  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5623  }
  5624  
  5625  // UpdateDatabaseMetadata: Metadata type for the operation returned by
  5626  // UpdateDatabase.
  5627  type UpdateDatabaseMetadata struct {
  5628  	// CancelTime: The time at which this operation was cancelled. If set, this
  5629  	// operation is in the process of undoing itself (which is best-effort).
  5630  	CancelTime string `json:"cancelTime,omitempty"`
  5631  	// Progress: The progress of the UpdateDatabase operation.
  5632  	Progress *OperationProgress `json:"progress,omitempty"`
  5633  	// Request: The request for UpdateDatabase.
  5634  	Request *UpdateDatabaseRequest `json:"request,omitempty"`
  5635  	// ForceSendFields is a list of field names (e.g. "CancelTime") to
  5636  	// unconditionally include in API requests. By default, fields with empty or
  5637  	// default values are omitted from API requests. See
  5638  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5639  	// details.
  5640  	ForceSendFields []string `json:"-"`
  5641  	// NullFields is a list of field names (e.g. "CancelTime") to include in API
  5642  	// requests with the JSON null value. By default, fields with empty values are
  5643  	// omitted from API requests. See
  5644  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5645  	NullFields []string `json:"-"`
  5646  }
  5647  
  5648  func (s *UpdateDatabaseMetadata) MarshalJSON() ([]byte, error) {
  5649  	type NoMethod UpdateDatabaseMetadata
  5650  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5651  }
  5652  
  5653  // UpdateDatabaseRequest: The request for UpdateDatabase.
  5654  type UpdateDatabaseRequest struct {
  5655  	// Database: Required. The database to update. The `name` field of the database
  5656  	// is of the form `projects//instances//databases/`.
  5657  	Database *Database `json:"database,omitempty"`
  5658  	// UpdateMask: Required. The list of fields to update. Currently, only
  5659  	// `enable_drop_protection` field can be updated.
  5660  	UpdateMask string `json:"updateMask,omitempty"`
  5661  	// ForceSendFields is a list of field names (e.g. "Database") to
  5662  	// unconditionally include in API requests. By default, fields with empty or
  5663  	// default values are omitted from API requests. See
  5664  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5665  	// details.
  5666  	ForceSendFields []string `json:"-"`
  5667  	// NullFields is a list of field names (e.g. "Database") to include in API
  5668  	// requests with the JSON null value. By default, fields with empty values are
  5669  	// omitted from API requests. See
  5670  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5671  	NullFields []string `json:"-"`
  5672  }
  5673  
  5674  func (s *UpdateDatabaseRequest) MarshalJSON() ([]byte, error) {
  5675  	type NoMethod UpdateDatabaseRequest
  5676  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5677  }
  5678  
  5679  // UpdateInstanceConfigMetadata: Metadata type for the operation returned by
  5680  // UpdateInstanceConfig.
  5681  type UpdateInstanceConfigMetadata struct {
  5682  	// CancelTime: The time at which this operation was cancelled.
  5683  	CancelTime string `json:"cancelTime,omitempty"`
  5684  	// InstanceConfig: The desired instance config after updating.
  5685  	InstanceConfig *InstanceConfig `json:"instanceConfig,omitempty"`
  5686  	// Progress: The progress of the UpdateInstanceConfig operation.
  5687  	Progress *InstanceOperationProgress `json:"progress,omitempty"`
  5688  	// ForceSendFields is a list of field names (e.g. "CancelTime") to
  5689  	// unconditionally include in API requests. By default, fields with empty or
  5690  	// default values are omitted from API requests. See
  5691  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5692  	// details.
  5693  	ForceSendFields []string `json:"-"`
  5694  	// NullFields is a list of field names (e.g. "CancelTime") to include in API
  5695  	// requests with the JSON null value. By default, fields with empty values are
  5696  	// omitted from API requests. See
  5697  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5698  	NullFields []string `json:"-"`
  5699  }
  5700  
  5701  func (s *UpdateInstanceConfigMetadata) MarshalJSON() ([]byte, error) {
  5702  	type NoMethod UpdateInstanceConfigMetadata
  5703  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5704  }
  5705  
  5706  // UpdateInstanceConfigRequest: The request for UpdateInstanceConfigRequest.
  5707  type UpdateInstanceConfigRequest struct {
  5708  	// InstanceConfig: Required. The user instance config to update, which must
  5709  	// always include the instance config name. Otherwise, only fields mentioned in
  5710  	// update_mask need be included. To prevent conflicts of concurrent updates,
  5711  	// etag can be used.
  5712  	InstanceConfig *InstanceConfig `json:"instanceConfig,omitempty"`
  5713  	// UpdateMask: Required. A mask specifying which fields in InstanceConfig
  5714  	// should be updated. The field mask must always be specified; this prevents
  5715  	// any future fields in InstanceConfig from being erased accidentally by
  5716  	// clients that do not know about them. Only display_name and labels can be
  5717  	// updated.
  5718  	UpdateMask string `json:"updateMask,omitempty"`
  5719  	// ValidateOnly: An option to validate, but not actually execute, a request,
  5720  	// and provide the same response.
  5721  	ValidateOnly bool `json:"validateOnly,omitempty"`
  5722  	// ForceSendFields is a list of field names (e.g. "InstanceConfig") to
  5723  	// unconditionally include in API requests. By default, fields with empty or
  5724  	// default values are omitted from API requests. See
  5725  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5726  	// details.
  5727  	ForceSendFields []string `json:"-"`
  5728  	// NullFields is a list of field names (e.g. "InstanceConfig") to include in
  5729  	// API requests with the JSON null value. By default, fields with empty values
  5730  	// are omitted from API requests. See
  5731  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5732  	NullFields []string `json:"-"`
  5733  }
  5734  
  5735  func (s *UpdateInstanceConfigRequest) MarshalJSON() ([]byte, error) {
  5736  	type NoMethod UpdateInstanceConfigRequest
  5737  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5738  }
  5739  
  5740  // UpdateInstanceMetadata: Metadata type for the operation returned by
  5741  // UpdateInstance.
  5742  type UpdateInstanceMetadata struct {
  5743  	// CancelTime: The time at which this operation was cancelled. If set, this
  5744  	// operation is in the process of undoing itself (which is guaranteed to
  5745  	// succeed) and cannot be cancelled again.
  5746  	CancelTime string `json:"cancelTime,omitempty"`
  5747  	// EndTime: The time at which this operation failed or was completed
  5748  	// successfully.
  5749  	EndTime string `json:"endTime,omitempty"`
  5750  	// ExpectedFulfillmentPeriod: The expected fulfillment period of this update
  5751  	// operation.
  5752  	//
  5753  	// Possible values:
  5754  	//   "FULFILLMENT_PERIOD_UNSPECIFIED" - Not specified.
  5755  	//   "FULFILLMENT_PERIOD_NORMAL" - Normal fulfillment period. The operation is
  5756  	// expected to complete within minutes.
  5757  	//   "FULFILLMENT_PERIOD_EXTENDED" - Extended fulfillment period. It can take
  5758  	// up to an hour for the operation to complete.
  5759  	ExpectedFulfillmentPeriod string `json:"expectedFulfillmentPeriod,omitempty"`
  5760  	// Instance: The desired end state of the update.
  5761  	Instance *Instance `json:"instance,omitempty"`
  5762  	// StartTime: The time at which UpdateInstance request was received.
  5763  	StartTime string `json:"startTime,omitempty"`
  5764  	// ForceSendFields is a list of field names (e.g. "CancelTime") to
  5765  	// unconditionally include in API requests. By default, fields with empty or
  5766  	// default values are omitted from API requests. See
  5767  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5768  	// details.
  5769  	ForceSendFields []string `json:"-"`
  5770  	// NullFields is a list of field names (e.g. "CancelTime") to include in API
  5771  	// requests with the JSON null value. By default, fields with empty values are
  5772  	// omitted from API requests. See
  5773  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5774  	NullFields []string `json:"-"`
  5775  }
  5776  
  5777  func (s *UpdateInstanceMetadata) MarshalJSON() ([]byte, error) {
  5778  	type NoMethod UpdateInstanceMetadata
  5779  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5780  }
  5781  
  5782  // UpdateInstancePartitionMetadata: Metadata type for the operation returned by
  5783  // UpdateInstancePartition.
  5784  type UpdateInstancePartitionMetadata struct {
  5785  	// CancelTime: The time at which this operation was cancelled. If set, this
  5786  	// operation is in the process of undoing itself (which is guaranteed to
  5787  	// succeed) and cannot be cancelled again.
  5788  	CancelTime string `json:"cancelTime,omitempty"`
  5789  	// EndTime: The time at which this operation failed or was completed
  5790  	// successfully.
  5791  	EndTime string `json:"endTime,omitempty"`
  5792  	// InstancePartition: The desired end state of the update.
  5793  	InstancePartition *InstancePartition `json:"instancePartition,omitempty"`
  5794  	// StartTime: The time at which UpdateInstancePartition request was received.
  5795  	StartTime string `json:"startTime,omitempty"`
  5796  	// ForceSendFields is a list of field names (e.g. "CancelTime") to
  5797  	// unconditionally include in API requests. By default, fields with empty or
  5798  	// default values are omitted from API requests. See
  5799  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5800  	// details.
  5801  	ForceSendFields []string `json:"-"`
  5802  	// NullFields is a list of field names (e.g. "CancelTime") to include in API
  5803  	// requests with the JSON null value. By default, fields with empty values are
  5804  	// omitted from API requests. See
  5805  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5806  	NullFields []string `json:"-"`
  5807  }
  5808  
  5809  func (s *UpdateInstancePartitionMetadata) MarshalJSON() ([]byte, error) {
  5810  	type NoMethod UpdateInstancePartitionMetadata
  5811  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5812  }
  5813  
  5814  // UpdateInstancePartitionRequest: The request for UpdateInstancePartition.
  5815  type UpdateInstancePartitionRequest struct {
  5816  	// FieldMask: Required. A mask specifying which fields in InstancePartition
  5817  	// should be updated. The field mask must always be specified; this prevents
  5818  	// any future fields in InstancePartition from being erased accidentally by
  5819  	// clients that do not know about them.
  5820  	FieldMask string `json:"fieldMask,omitempty"`
  5821  	// InstancePartition: Required. The instance partition to update, which must
  5822  	// always include the instance partition name. Otherwise, only fields mentioned
  5823  	// in field_mask need be included.
  5824  	InstancePartition *InstancePartition `json:"instancePartition,omitempty"`
  5825  	// ForceSendFields is a list of field names (e.g. "FieldMask") to
  5826  	// unconditionally include in API requests. By default, fields with empty or
  5827  	// default values are omitted from API requests. See
  5828  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5829  	// details.
  5830  	ForceSendFields []string `json:"-"`
  5831  	// NullFields is a list of field names (e.g. "FieldMask") to include in API
  5832  	// requests with the JSON null value. By default, fields with empty values are
  5833  	// omitted from API requests. See
  5834  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5835  	NullFields []string `json:"-"`
  5836  }
  5837  
  5838  func (s *UpdateInstancePartitionRequest) MarshalJSON() ([]byte, error) {
  5839  	type NoMethod UpdateInstancePartitionRequest
  5840  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5841  }
  5842  
  5843  // UpdateInstanceRequest: The request for UpdateInstance.
  5844  type UpdateInstanceRequest struct {
  5845  	// FieldMask: Required. A mask specifying which fields in Instance should be
  5846  	// updated. The field mask must always be specified; this prevents any future
  5847  	// fields in Instance from being erased accidentally by clients that do not
  5848  	// know about them.
  5849  	FieldMask string `json:"fieldMask,omitempty"`
  5850  	// Instance: Required. The instance to update, which must always include the
  5851  	// instance name. Otherwise, only fields mentioned in field_mask need be
  5852  	// included.
  5853  	Instance *Instance `json:"instance,omitempty"`
  5854  	// ForceSendFields is a list of field names (e.g. "FieldMask") to
  5855  	// unconditionally include in API requests. By default, fields with empty or
  5856  	// default values are omitted from API requests. See
  5857  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5858  	// details.
  5859  	ForceSendFields []string `json:"-"`
  5860  	// NullFields is a list of field names (e.g. "FieldMask") to include in API
  5861  	// requests with the JSON null value. By default, fields with empty values are
  5862  	// omitted from API requests. See
  5863  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5864  	NullFields []string `json:"-"`
  5865  }
  5866  
  5867  func (s *UpdateInstanceRequest) MarshalJSON() ([]byte, error) {
  5868  	type NoMethod UpdateInstanceRequest
  5869  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5870  }
  5871  
  5872  type VisualizationData struct {
  5873  	// DataSourceEndToken: The token signifying the end of a data_source.
  5874  	DataSourceEndToken string `json:"dataSourceEndToken,omitempty"`
  5875  	// DataSourceSeparatorToken: The token delimiting a datasource name from the
  5876  	// rest of a key in a data_source.
  5877  	DataSourceSeparatorToken string `json:"dataSourceSeparatorToken,omitempty"`
  5878  	// DiagnosticMessages: The list of messages (info, alerts, ...)
  5879  	DiagnosticMessages []*DiagnosticMessage `json:"diagnosticMessages,omitempty"`
  5880  	// EndKeyStrings: We discretize the entire keyspace into buckets. Assuming each
  5881  	// bucket has an inclusive keyrange and covers keys from k(i) ... k(n). In this
  5882  	// case k(n) would be an end key for a given range. end_key_string is the
  5883  	// collection of all such end keys
  5884  	EndKeyStrings []string `json:"endKeyStrings,omitempty"`
  5885  	// HasPii: Whether this scan contains PII.
  5886  	HasPii bool `json:"hasPii,omitempty"`
  5887  	// IndexedKeys: Keys of key ranges that contribute significantly to a given
  5888  	// metric Can be thought of as heavy hitters.
  5889  	IndexedKeys []string `json:"indexedKeys,omitempty"`
  5890  	// KeySeparator: The token delimiting the key prefixes.
  5891  	KeySeparator string `json:"keySeparator,omitempty"`
  5892  	// KeyUnit: The unit for the key: e.g. 'key' or 'chunk'.
  5893  	//
  5894  	// Possible values:
  5895  	//   "KEY_UNIT_UNSPECIFIED" - Required default value
  5896  	//   "KEY" - Each entry corresponds to one key
  5897  	//   "CHUNK" - Each entry corresponds to a chunk of keys
  5898  	KeyUnit string `json:"keyUnit,omitempty"`
  5899  	// Metrics: The list of data objects for each metric.
  5900  	Metrics []*Metric `json:"metrics,omitempty"`
  5901  	// PrefixNodes: The list of extracted key prefix nodes used in the key prefix
  5902  	// hierarchy.
  5903  	PrefixNodes []*PrefixNode `json:"prefixNodes,omitempty"`
  5904  	// ForceSendFields is a list of field names (e.g. "DataSourceEndToken") to
  5905  	// unconditionally include in API requests. By default, fields with empty or
  5906  	// default values are omitted from API requests. See
  5907  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5908  	// details.
  5909  	ForceSendFields []string `json:"-"`
  5910  	// NullFields is a list of field names (e.g. "DataSourceEndToken") to include
  5911  	// in API requests with the JSON null value. By default, fields with empty
  5912  	// values are omitted from API requests. See
  5913  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5914  	NullFields []string `json:"-"`
  5915  }
  5916  
  5917  func (s *VisualizationData) MarshalJSON() ([]byte, error) {
  5918  	type NoMethod VisualizationData
  5919  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5920  }
  5921  
  5922  // Write: Arguments to insert, update, insert_or_update, and replace
  5923  // operations.
  5924  type Write struct {
  5925  	// Columns: The names of the columns in table to be written. The list of
  5926  	// columns must contain enough columns to allow Cloud Spanner to derive values
  5927  	// for all primary key columns in the row(s) to be modified.
  5928  	Columns []string `json:"columns,omitempty"`
  5929  	// Table: Required. The table whose rows will be written.
  5930  	Table string `json:"table,omitempty"`
  5931  	// Values: The values to be written. `values` can contain more than one list of
  5932  	// values. If it does, then multiple rows are written, one for each entry in
  5933  	// `values`. Each list in `values` must have exactly as many entries as there
  5934  	// are entries in columns above. Sending multiple lists is equivalent to
  5935  	// sending multiple `Mutation`s, each containing one `values` entry and
  5936  	// repeating table and columns. Individual values in each list are encoded as
  5937  	// described here.
  5938  	Values [][]interface{} `json:"values,omitempty"`
  5939  	// ForceSendFields is a list of field names (e.g. "Columns") to unconditionally
  5940  	// include in API requests. By default, fields with empty or default values are
  5941  	// omitted from API requests. See
  5942  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  5943  	// details.
  5944  	ForceSendFields []string `json:"-"`
  5945  	// NullFields is a list of field names (e.g. "Columns") to include in API
  5946  	// requests with the JSON null value. By default, fields with empty values are
  5947  	// omitted from API requests. See
  5948  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  5949  	NullFields []string `json:"-"`
  5950  }
  5951  
  5952  func (s *Write) MarshalJSON() ([]byte, error) {
  5953  	type NoMethod Write
  5954  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  5955  }
  5956  
  5957  type ProjectsInstanceConfigOperationsListCall struct {
  5958  	s            *Service
  5959  	parent       string
  5960  	urlParams_   gensupport.URLParams
  5961  	ifNoneMatch_ string
  5962  	ctx_         context.Context
  5963  	header_      http.Header
  5964  }
  5965  
  5966  // List: Lists the user-managed instance config long-running operations in the
  5967  // given project. An instance config operation has a name of the form
  5968  // `projects//instanceConfigs//operations/`. The long-running operation
  5969  // metadata field type `metadata.type_url` describes the type of the metadata.
  5970  // Operations returned include those that have completed/failed/canceled within
  5971  // the last 7 days, and pending operations. Operations returned are ordered by
  5972  // `operation.metadata.value.start_time` in descending order starting from the
  5973  // most recently started operation.
  5974  //
  5975  //   - parent: The project of the instance config operations. Values are of the
  5976  //     form `projects/`.
  5977  func (r *ProjectsInstanceConfigOperationsService) List(parent string) *ProjectsInstanceConfigOperationsListCall {
  5978  	c := &ProjectsInstanceConfigOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5979  	c.parent = parent
  5980  	return c
  5981  }
  5982  
  5983  // Filter sets the optional parameter "filter": An expression that filters the
  5984  // list of returned operations. A filter expression consists of a field name, a
  5985  // comparison operator, and a value for filtering. The value must be a string,
  5986  // a number, or a boolean. The comparison operator must be one of: `<`, `>`,
  5987  // `<=`, `>=`, `!=`, `=`, or `:`. Colon `:` is the contains operator. Filter
  5988  // rules are not case sensitive. The following fields in the Operation are
  5989  // eligible for filtering: * `name` - The name of the long-running operation *
  5990  // `done` - False if the operation is in progress, else true. *
  5991  // `metadata.@type` - the type of metadata. For example, the type string for
  5992  // CreateInstanceConfigMetadata is
  5993  // `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMet
  5994  // adata`. * `metadata.` - any field in metadata.value. `metadata.@type` must
  5995  // be specified first, if filtering on metadata fields. * `error` - Error
  5996  // associated with the long-running operation. * `response.@type` - the type of
  5997  // response. * `response.` - any field in response.value. You can combine
  5998  // multiple expressions by enclosing each expression in parentheses. By
  5999  // default, expressions are combined with AND logic. However, you can specify
  6000  // AND, OR, and NOT logic explicitly. Here are a few examples: * `done:true` -
  6001  // The operation is complete. * `(metadata.@type=` \
  6002  // `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMet
  6003  // adata) AND` \ `(metadata.instance_config.name:custom-config) AND` \
  6004  // `(metadata.progress.start_time < \"2021-03-28T14:50:00Z\") AND` \
  6005  // `(error:*)` - Return operations where: * The operation's metadata type is
  6006  // CreateInstanceConfigMetadata. * The instance config name contains
  6007  // "custom-config". * The operation started before 2021-03-28T14:50:00Z. * The
  6008  // operation resulted in an error.
  6009  func (c *ProjectsInstanceConfigOperationsListCall) Filter(filter string) *ProjectsInstanceConfigOperationsListCall {
  6010  	c.urlParams_.Set("filter", filter)
  6011  	return c
  6012  }
  6013  
  6014  // PageSize sets the optional parameter "pageSize": Number of operations to be
  6015  // returned in the response. If 0 or less, defaults to the server's maximum
  6016  // allowed page size.
  6017  func (c *ProjectsInstanceConfigOperationsListCall) PageSize(pageSize int64) *ProjectsInstanceConfigOperationsListCall {
  6018  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6019  	return c
  6020  }
  6021  
  6022  // PageToken sets the optional parameter "pageToken": If non-empty,
  6023  // `page_token` should contain a next_page_token from a previous
  6024  // ListInstanceConfigOperationsResponse to the same `parent` and with the same
  6025  // `filter`.
  6026  func (c *ProjectsInstanceConfigOperationsListCall) PageToken(pageToken string) *ProjectsInstanceConfigOperationsListCall {
  6027  	c.urlParams_.Set("pageToken", pageToken)
  6028  	return c
  6029  }
  6030  
  6031  // Fields allows partial responses to be retrieved. See
  6032  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6033  // details.
  6034  func (c *ProjectsInstanceConfigOperationsListCall) Fields(s ...googleapi.Field) *ProjectsInstanceConfigOperationsListCall {
  6035  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6036  	return c
  6037  }
  6038  
  6039  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6040  // object's ETag matches the given value. This is useful for getting updates
  6041  // only after the object has changed since the last request.
  6042  func (c *ProjectsInstanceConfigOperationsListCall) IfNoneMatch(entityTag string) *ProjectsInstanceConfigOperationsListCall {
  6043  	c.ifNoneMatch_ = entityTag
  6044  	return c
  6045  }
  6046  
  6047  // Context sets the context to be used in this call's Do method.
  6048  func (c *ProjectsInstanceConfigOperationsListCall) Context(ctx context.Context) *ProjectsInstanceConfigOperationsListCall {
  6049  	c.ctx_ = ctx
  6050  	return c
  6051  }
  6052  
  6053  // Header returns a http.Header that can be modified by the caller to add
  6054  // headers to the request.
  6055  func (c *ProjectsInstanceConfigOperationsListCall) Header() http.Header {
  6056  	if c.header_ == nil {
  6057  		c.header_ = make(http.Header)
  6058  	}
  6059  	return c.header_
  6060  }
  6061  
  6062  func (c *ProjectsInstanceConfigOperationsListCall) doRequest(alt string) (*http.Response, error) {
  6063  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6064  	if c.ifNoneMatch_ != "" {
  6065  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6066  	}
  6067  	var body io.Reader = nil
  6068  	c.urlParams_.Set("alt", alt)
  6069  	c.urlParams_.Set("prettyPrint", "false")
  6070  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/instanceConfigOperations")
  6071  	urls += "?" + c.urlParams_.Encode()
  6072  	req, err := http.NewRequest("GET", urls, body)
  6073  	if err != nil {
  6074  		return nil, err
  6075  	}
  6076  	req.Header = reqHeaders
  6077  	googleapi.Expand(req.URL, map[string]string{
  6078  		"parent": c.parent,
  6079  	})
  6080  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6081  }
  6082  
  6083  // Do executes the "spanner.projects.instanceConfigOperations.list" call.
  6084  // Any non-2xx status code is an error. Response headers are in either
  6085  // *ListInstanceConfigOperationsResponse.ServerResponse.Header or (if a
  6086  // response was returned at all) in error.(*googleapi.Error).Header. Use
  6087  // googleapi.IsNotModified to check whether the returned error was because
  6088  // http.StatusNotModified was returned.
  6089  func (c *ProjectsInstanceConfigOperationsListCall) Do(opts ...googleapi.CallOption) (*ListInstanceConfigOperationsResponse, error) {
  6090  	gensupport.SetOptions(c.urlParams_, opts...)
  6091  	res, err := c.doRequest("json")
  6092  	if res != nil && res.StatusCode == http.StatusNotModified {
  6093  		if res.Body != nil {
  6094  			res.Body.Close()
  6095  		}
  6096  		return nil, gensupport.WrapError(&googleapi.Error{
  6097  			Code:   res.StatusCode,
  6098  			Header: res.Header,
  6099  		})
  6100  	}
  6101  	if err != nil {
  6102  		return nil, err
  6103  	}
  6104  	defer googleapi.CloseBody(res)
  6105  	if err := googleapi.CheckResponse(res); err != nil {
  6106  		return nil, gensupport.WrapError(err)
  6107  	}
  6108  	ret := &ListInstanceConfigOperationsResponse{
  6109  		ServerResponse: googleapi.ServerResponse{
  6110  			Header:         res.Header,
  6111  			HTTPStatusCode: res.StatusCode,
  6112  		},
  6113  	}
  6114  	target := &ret
  6115  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6116  		return nil, err
  6117  	}
  6118  	return ret, nil
  6119  }
  6120  
  6121  // Pages invokes f for each page of results.
  6122  // A non-nil error returned from f will halt the iteration.
  6123  // The provided context supersedes any context provided to the Context method.
  6124  func (c *ProjectsInstanceConfigOperationsListCall) Pages(ctx context.Context, f func(*ListInstanceConfigOperationsResponse) error) error {
  6125  	c.ctx_ = ctx
  6126  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  6127  	for {
  6128  		x, err := c.Do()
  6129  		if err != nil {
  6130  			return err
  6131  		}
  6132  		if err := f(x); err != nil {
  6133  			return err
  6134  		}
  6135  		if x.NextPageToken == "" {
  6136  			return nil
  6137  		}
  6138  		c.PageToken(x.NextPageToken)
  6139  	}
  6140  }
  6141  
  6142  type ProjectsInstanceConfigsCreateCall struct {
  6143  	s                           *Service
  6144  	parent                      string
  6145  	createinstanceconfigrequest *CreateInstanceConfigRequest
  6146  	urlParams_                  gensupport.URLParams
  6147  	ctx_                        context.Context
  6148  	header_                     http.Header
  6149  }
  6150  
  6151  // Create: Creates an instance config and begins preparing it to be used. The
  6152  // returned long-running operation can be used to track the progress of
  6153  // preparing the new instance config. The instance config name is assigned by
  6154  // the caller. If the named instance config already exists,
  6155  // `CreateInstanceConfig` returns `ALREADY_EXISTS`. Immediately after the
  6156  // request returns: * The instance config is readable via the API, with all
  6157  // requested attributes. The instance config's reconciling field is set to
  6158  // true. Its state is `CREATING`. While the operation is pending: * Cancelling
  6159  // the operation renders the instance config immediately unreadable via the
  6160  // API. * Except for deleting the creating resource, all other attempts to
  6161  // modify the instance config are rejected. Upon completion of the returned
  6162  // operation: * Instances can be created using the instance configuration. *
  6163  // The instance config's reconciling field becomes false. Its state becomes
  6164  // `READY`. The returned long-running operation will have a name of the format
  6165  // `/operations/` and can be used to track creation of the instance config. The
  6166  // metadata field type is CreateInstanceConfigMetadata. The response field type
  6167  // is InstanceConfig, if successful. Authorization requires
  6168  // `spanner.instanceConfigs.create` permission on the resource parent.
  6169  //
  6170  //   - parent: The name of the project in which to create the instance config.
  6171  //     Values are of the form `projects/`.
  6172  func (r *ProjectsInstanceConfigsService) Create(parent string, createinstanceconfigrequest *CreateInstanceConfigRequest) *ProjectsInstanceConfigsCreateCall {
  6173  	c := &ProjectsInstanceConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6174  	c.parent = parent
  6175  	c.createinstanceconfigrequest = createinstanceconfigrequest
  6176  	return c
  6177  }
  6178  
  6179  // Fields allows partial responses to be retrieved. See
  6180  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6181  // details.
  6182  func (c *ProjectsInstanceConfigsCreateCall) Fields(s ...googleapi.Field) *ProjectsInstanceConfigsCreateCall {
  6183  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6184  	return c
  6185  }
  6186  
  6187  // Context sets the context to be used in this call's Do method.
  6188  func (c *ProjectsInstanceConfigsCreateCall) Context(ctx context.Context) *ProjectsInstanceConfigsCreateCall {
  6189  	c.ctx_ = ctx
  6190  	return c
  6191  }
  6192  
  6193  // Header returns a http.Header that can be modified by the caller to add
  6194  // headers to the request.
  6195  func (c *ProjectsInstanceConfigsCreateCall) Header() http.Header {
  6196  	if c.header_ == nil {
  6197  		c.header_ = make(http.Header)
  6198  	}
  6199  	return c.header_
  6200  }
  6201  
  6202  func (c *ProjectsInstanceConfigsCreateCall) doRequest(alt string) (*http.Response, error) {
  6203  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6204  	var body io.Reader = nil
  6205  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.createinstanceconfigrequest)
  6206  	if err != nil {
  6207  		return nil, err
  6208  	}
  6209  	c.urlParams_.Set("alt", alt)
  6210  	c.urlParams_.Set("prettyPrint", "false")
  6211  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/instanceConfigs")
  6212  	urls += "?" + c.urlParams_.Encode()
  6213  	req, err := http.NewRequest("POST", urls, body)
  6214  	if err != nil {
  6215  		return nil, err
  6216  	}
  6217  	req.Header = reqHeaders
  6218  	googleapi.Expand(req.URL, map[string]string{
  6219  		"parent": c.parent,
  6220  	})
  6221  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6222  }
  6223  
  6224  // Do executes the "spanner.projects.instanceConfigs.create" call.
  6225  // Any non-2xx status code is an error. Response headers are in either
  6226  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  6227  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6228  // whether the returned error was because http.StatusNotModified was returned.
  6229  func (c *ProjectsInstanceConfigsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  6230  	gensupport.SetOptions(c.urlParams_, opts...)
  6231  	res, err := c.doRequest("json")
  6232  	if res != nil && res.StatusCode == http.StatusNotModified {
  6233  		if res.Body != nil {
  6234  			res.Body.Close()
  6235  		}
  6236  		return nil, gensupport.WrapError(&googleapi.Error{
  6237  			Code:   res.StatusCode,
  6238  			Header: res.Header,
  6239  		})
  6240  	}
  6241  	if err != nil {
  6242  		return nil, err
  6243  	}
  6244  	defer googleapi.CloseBody(res)
  6245  	if err := googleapi.CheckResponse(res); err != nil {
  6246  		return nil, gensupport.WrapError(err)
  6247  	}
  6248  	ret := &Operation{
  6249  		ServerResponse: googleapi.ServerResponse{
  6250  			Header:         res.Header,
  6251  			HTTPStatusCode: res.StatusCode,
  6252  		},
  6253  	}
  6254  	target := &ret
  6255  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6256  		return nil, err
  6257  	}
  6258  	return ret, nil
  6259  }
  6260  
  6261  type ProjectsInstanceConfigsDeleteCall struct {
  6262  	s          *Service
  6263  	name       string
  6264  	urlParams_ gensupport.URLParams
  6265  	ctx_       context.Context
  6266  	header_    http.Header
  6267  }
  6268  
  6269  // Delete: Deletes the instance config. Deletion is only allowed when no
  6270  // instances are using the configuration. If any instances are using the
  6271  // config, returns `FAILED_PRECONDITION`. Only user managed configurations can
  6272  // be deleted. Authorization requires `spanner.instanceConfigs.delete`
  6273  // permission on the resource name.
  6274  //
  6275  //   - name: The name of the instance configuration to be deleted. Values are of
  6276  //     the form `projects//instanceConfigs/`.
  6277  func (r *ProjectsInstanceConfigsService) Delete(name string) *ProjectsInstanceConfigsDeleteCall {
  6278  	c := &ProjectsInstanceConfigsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6279  	c.name = name
  6280  	return c
  6281  }
  6282  
  6283  // Etag sets the optional parameter "etag": Used for optimistic concurrency
  6284  // control as a way to help prevent simultaneous deletes of an instance config
  6285  // from overwriting each other. If not empty, the API only deletes the instance
  6286  // config when the etag provided matches the current status of the requested
  6287  // instance config. Otherwise, deletes the instance config without checking the
  6288  // current status of the requested instance config.
  6289  func (c *ProjectsInstanceConfigsDeleteCall) Etag(etag string) *ProjectsInstanceConfigsDeleteCall {
  6290  	c.urlParams_.Set("etag", etag)
  6291  	return c
  6292  }
  6293  
  6294  // ValidateOnly sets the optional parameter "validateOnly": An option to
  6295  // validate, but not actually execute, a request, and provide the same
  6296  // response.
  6297  func (c *ProjectsInstanceConfigsDeleteCall) ValidateOnly(validateOnly bool) *ProjectsInstanceConfigsDeleteCall {
  6298  	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
  6299  	return c
  6300  }
  6301  
  6302  // Fields allows partial responses to be retrieved. See
  6303  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6304  // details.
  6305  func (c *ProjectsInstanceConfigsDeleteCall) Fields(s ...googleapi.Field) *ProjectsInstanceConfigsDeleteCall {
  6306  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6307  	return c
  6308  }
  6309  
  6310  // Context sets the context to be used in this call's Do method.
  6311  func (c *ProjectsInstanceConfigsDeleteCall) Context(ctx context.Context) *ProjectsInstanceConfigsDeleteCall {
  6312  	c.ctx_ = ctx
  6313  	return c
  6314  }
  6315  
  6316  // Header returns a http.Header that can be modified by the caller to add
  6317  // headers to the request.
  6318  func (c *ProjectsInstanceConfigsDeleteCall) Header() http.Header {
  6319  	if c.header_ == nil {
  6320  		c.header_ = make(http.Header)
  6321  	}
  6322  	return c.header_
  6323  }
  6324  
  6325  func (c *ProjectsInstanceConfigsDeleteCall) doRequest(alt string) (*http.Response, error) {
  6326  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6327  	var body io.Reader = nil
  6328  	c.urlParams_.Set("alt", alt)
  6329  	c.urlParams_.Set("prettyPrint", "false")
  6330  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  6331  	urls += "?" + c.urlParams_.Encode()
  6332  	req, err := http.NewRequest("DELETE", urls, body)
  6333  	if err != nil {
  6334  		return nil, err
  6335  	}
  6336  	req.Header = reqHeaders
  6337  	googleapi.Expand(req.URL, map[string]string{
  6338  		"name": c.name,
  6339  	})
  6340  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6341  }
  6342  
  6343  // Do executes the "spanner.projects.instanceConfigs.delete" call.
  6344  // Any non-2xx status code is an error. Response headers are in either
  6345  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  6346  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6347  // whether the returned error was because http.StatusNotModified was returned.
  6348  func (c *ProjectsInstanceConfigsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  6349  	gensupport.SetOptions(c.urlParams_, opts...)
  6350  	res, err := c.doRequest("json")
  6351  	if res != nil && res.StatusCode == http.StatusNotModified {
  6352  		if res.Body != nil {
  6353  			res.Body.Close()
  6354  		}
  6355  		return nil, gensupport.WrapError(&googleapi.Error{
  6356  			Code:   res.StatusCode,
  6357  			Header: res.Header,
  6358  		})
  6359  	}
  6360  	if err != nil {
  6361  		return nil, err
  6362  	}
  6363  	defer googleapi.CloseBody(res)
  6364  	if err := googleapi.CheckResponse(res); err != nil {
  6365  		return nil, gensupport.WrapError(err)
  6366  	}
  6367  	ret := &Empty{
  6368  		ServerResponse: googleapi.ServerResponse{
  6369  			Header:         res.Header,
  6370  			HTTPStatusCode: res.StatusCode,
  6371  		},
  6372  	}
  6373  	target := &ret
  6374  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6375  		return nil, err
  6376  	}
  6377  	return ret, nil
  6378  }
  6379  
  6380  type ProjectsInstanceConfigsGetCall struct {
  6381  	s            *Service
  6382  	name         string
  6383  	urlParams_   gensupport.URLParams
  6384  	ifNoneMatch_ string
  6385  	ctx_         context.Context
  6386  	header_      http.Header
  6387  }
  6388  
  6389  // Get: Gets information about a particular instance configuration.
  6390  //
  6391  //   - name: The name of the requested instance configuration. Values are of the
  6392  //     form `projects//instanceConfigs/`.
  6393  func (r *ProjectsInstanceConfigsService) Get(name string) *ProjectsInstanceConfigsGetCall {
  6394  	c := &ProjectsInstanceConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6395  	c.name = name
  6396  	return c
  6397  }
  6398  
  6399  // Fields allows partial responses to be retrieved. See
  6400  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6401  // details.
  6402  func (c *ProjectsInstanceConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsInstanceConfigsGetCall {
  6403  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6404  	return c
  6405  }
  6406  
  6407  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6408  // object's ETag matches the given value. This is useful for getting updates
  6409  // only after the object has changed since the last request.
  6410  func (c *ProjectsInstanceConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsInstanceConfigsGetCall {
  6411  	c.ifNoneMatch_ = entityTag
  6412  	return c
  6413  }
  6414  
  6415  // Context sets the context to be used in this call's Do method.
  6416  func (c *ProjectsInstanceConfigsGetCall) Context(ctx context.Context) *ProjectsInstanceConfigsGetCall {
  6417  	c.ctx_ = ctx
  6418  	return c
  6419  }
  6420  
  6421  // Header returns a http.Header that can be modified by the caller to add
  6422  // headers to the request.
  6423  func (c *ProjectsInstanceConfigsGetCall) Header() http.Header {
  6424  	if c.header_ == nil {
  6425  		c.header_ = make(http.Header)
  6426  	}
  6427  	return c.header_
  6428  }
  6429  
  6430  func (c *ProjectsInstanceConfigsGetCall) doRequest(alt string) (*http.Response, error) {
  6431  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6432  	if c.ifNoneMatch_ != "" {
  6433  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6434  	}
  6435  	var body io.Reader = nil
  6436  	c.urlParams_.Set("alt", alt)
  6437  	c.urlParams_.Set("prettyPrint", "false")
  6438  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  6439  	urls += "?" + c.urlParams_.Encode()
  6440  	req, err := http.NewRequest("GET", urls, body)
  6441  	if err != nil {
  6442  		return nil, err
  6443  	}
  6444  	req.Header = reqHeaders
  6445  	googleapi.Expand(req.URL, map[string]string{
  6446  		"name": c.name,
  6447  	})
  6448  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6449  }
  6450  
  6451  // Do executes the "spanner.projects.instanceConfigs.get" call.
  6452  // Any non-2xx status code is an error. Response headers are in either
  6453  // *InstanceConfig.ServerResponse.Header or (if a response was returned at all)
  6454  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6455  // whether the returned error was because http.StatusNotModified was returned.
  6456  func (c *ProjectsInstanceConfigsGetCall) Do(opts ...googleapi.CallOption) (*InstanceConfig, error) {
  6457  	gensupport.SetOptions(c.urlParams_, opts...)
  6458  	res, err := c.doRequest("json")
  6459  	if res != nil && res.StatusCode == http.StatusNotModified {
  6460  		if res.Body != nil {
  6461  			res.Body.Close()
  6462  		}
  6463  		return nil, gensupport.WrapError(&googleapi.Error{
  6464  			Code:   res.StatusCode,
  6465  			Header: res.Header,
  6466  		})
  6467  	}
  6468  	if err != nil {
  6469  		return nil, err
  6470  	}
  6471  	defer googleapi.CloseBody(res)
  6472  	if err := googleapi.CheckResponse(res); err != nil {
  6473  		return nil, gensupport.WrapError(err)
  6474  	}
  6475  	ret := &InstanceConfig{
  6476  		ServerResponse: googleapi.ServerResponse{
  6477  			Header:         res.Header,
  6478  			HTTPStatusCode: res.StatusCode,
  6479  		},
  6480  	}
  6481  	target := &ret
  6482  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6483  		return nil, err
  6484  	}
  6485  	return ret, nil
  6486  }
  6487  
  6488  type ProjectsInstanceConfigsListCall struct {
  6489  	s            *Service
  6490  	parent       string
  6491  	urlParams_   gensupport.URLParams
  6492  	ifNoneMatch_ string
  6493  	ctx_         context.Context
  6494  	header_      http.Header
  6495  }
  6496  
  6497  // List: Lists the supported instance configurations for a given project.
  6498  //
  6499  //   - parent: The name of the project for which a list of supported instance
  6500  //     configurations is requested. Values are of the form `projects/`.
  6501  func (r *ProjectsInstanceConfigsService) List(parent string) *ProjectsInstanceConfigsListCall {
  6502  	c := &ProjectsInstanceConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6503  	c.parent = parent
  6504  	return c
  6505  }
  6506  
  6507  // PageSize sets the optional parameter "pageSize": Number of instance
  6508  // configurations to be returned in the response. If 0 or less, defaults to the
  6509  // server's maximum allowed page size.
  6510  func (c *ProjectsInstanceConfigsListCall) PageSize(pageSize int64) *ProjectsInstanceConfigsListCall {
  6511  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6512  	return c
  6513  }
  6514  
  6515  // PageToken sets the optional parameter "pageToken": If non-empty,
  6516  // `page_token` should contain a next_page_token from a previous
  6517  // ListInstanceConfigsResponse.
  6518  func (c *ProjectsInstanceConfigsListCall) PageToken(pageToken string) *ProjectsInstanceConfigsListCall {
  6519  	c.urlParams_.Set("pageToken", pageToken)
  6520  	return c
  6521  }
  6522  
  6523  // Fields allows partial responses to be retrieved. See
  6524  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6525  // details.
  6526  func (c *ProjectsInstanceConfigsListCall) Fields(s ...googleapi.Field) *ProjectsInstanceConfigsListCall {
  6527  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6528  	return c
  6529  }
  6530  
  6531  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6532  // object's ETag matches the given value. This is useful for getting updates
  6533  // only after the object has changed since the last request.
  6534  func (c *ProjectsInstanceConfigsListCall) IfNoneMatch(entityTag string) *ProjectsInstanceConfigsListCall {
  6535  	c.ifNoneMatch_ = entityTag
  6536  	return c
  6537  }
  6538  
  6539  // Context sets the context to be used in this call's Do method.
  6540  func (c *ProjectsInstanceConfigsListCall) Context(ctx context.Context) *ProjectsInstanceConfigsListCall {
  6541  	c.ctx_ = ctx
  6542  	return c
  6543  }
  6544  
  6545  // Header returns a http.Header that can be modified by the caller to add
  6546  // headers to the request.
  6547  func (c *ProjectsInstanceConfigsListCall) Header() http.Header {
  6548  	if c.header_ == nil {
  6549  		c.header_ = make(http.Header)
  6550  	}
  6551  	return c.header_
  6552  }
  6553  
  6554  func (c *ProjectsInstanceConfigsListCall) doRequest(alt string) (*http.Response, error) {
  6555  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6556  	if c.ifNoneMatch_ != "" {
  6557  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6558  	}
  6559  	var body io.Reader = nil
  6560  	c.urlParams_.Set("alt", alt)
  6561  	c.urlParams_.Set("prettyPrint", "false")
  6562  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/instanceConfigs")
  6563  	urls += "?" + c.urlParams_.Encode()
  6564  	req, err := http.NewRequest("GET", urls, body)
  6565  	if err != nil {
  6566  		return nil, err
  6567  	}
  6568  	req.Header = reqHeaders
  6569  	googleapi.Expand(req.URL, map[string]string{
  6570  		"parent": c.parent,
  6571  	})
  6572  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6573  }
  6574  
  6575  // Do executes the "spanner.projects.instanceConfigs.list" call.
  6576  // Any non-2xx status code is an error. Response headers are in either
  6577  // *ListInstanceConfigsResponse.ServerResponse.Header or (if a response was
  6578  // returned at all) in error.(*googleapi.Error).Header. Use
  6579  // googleapi.IsNotModified to check whether the returned error was because
  6580  // http.StatusNotModified was returned.
  6581  func (c *ProjectsInstanceConfigsListCall) Do(opts ...googleapi.CallOption) (*ListInstanceConfigsResponse, error) {
  6582  	gensupport.SetOptions(c.urlParams_, opts...)
  6583  	res, err := c.doRequest("json")
  6584  	if res != nil && res.StatusCode == http.StatusNotModified {
  6585  		if res.Body != nil {
  6586  			res.Body.Close()
  6587  		}
  6588  		return nil, gensupport.WrapError(&googleapi.Error{
  6589  			Code:   res.StatusCode,
  6590  			Header: res.Header,
  6591  		})
  6592  	}
  6593  	if err != nil {
  6594  		return nil, err
  6595  	}
  6596  	defer googleapi.CloseBody(res)
  6597  	if err := googleapi.CheckResponse(res); err != nil {
  6598  		return nil, gensupport.WrapError(err)
  6599  	}
  6600  	ret := &ListInstanceConfigsResponse{
  6601  		ServerResponse: googleapi.ServerResponse{
  6602  			Header:         res.Header,
  6603  			HTTPStatusCode: res.StatusCode,
  6604  		},
  6605  	}
  6606  	target := &ret
  6607  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6608  		return nil, err
  6609  	}
  6610  	return ret, nil
  6611  }
  6612  
  6613  // Pages invokes f for each page of results.
  6614  // A non-nil error returned from f will halt the iteration.
  6615  // The provided context supersedes any context provided to the Context method.
  6616  func (c *ProjectsInstanceConfigsListCall) Pages(ctx context.Context, f func(*ListInstanceConfigsResponse) error) error {
  6617  	c.ctx_ = ctx
  6618  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  6619  	for {
  6620  		x, err := c.Do()
  6621  		if err != nil {
  6622  			return err
  6623  		}
  6624  		if err := f(x); err != nil {
  6625  			return err
  6626  		}
  6627  		if x.NextPageToken == "" {
  6628  			return nil
  6629  		}
  6630  		c.PageToken(x.NextPageToken)
  6631  	}
  6632  }
  6633  
  6634  type ProjectsInstanceConfigsPatchCall struct {
  6635  	s                           *Service
  6636  	nameid                      string
  6637  	updateinstanceconfigrequest *UpdateInstanceConfigRequest
  6638  	urlParams_                  gensupport.URLParams
  6639  	ctx_                        context.Context
  6640  	header_                     http.Header
  6641  }
  6642  
  6643  // Patch: Updates an instance config. The returned long-running operation can
  6644  // be used to track the progress of updating the instance. If the named
  6645  // instance config does not exist, returns `NOT_FOUND`. Only user managed
  6646  // configurations can be updated. Immediately after the request returns: * The
  6647  // instance config's reconciling field is set to true. While the operation is
  6648  // pending: * Cancelling the operation sets its metadata's cancel_time. The
  6649  // operation is guaranteed to succeed at undoing all changes, after which point
  6650  // it terminates with a `CANCELLED` status. * All other attempts to modify the
  6651  // instance config are rejected. * Reading the instance config via the API
  6652  // continues to give the pre-request values. Upon completion of the returned
  6653  // operation: * Creating instances using the instance configuration uses the
  6654  // new values. * The instance config's new values are readable via the API. *
  6655  // The instance config's reconciling field becomes false. The returned
  6656  // long-running operation will have a name of the format `/operations/` and can
  6657  // be used to track the instance config modification. The metadata field type
  6658  // is UpdateInstanceConfigMetadata. The response field type is InstanceConfig,
  6659  // if successful. Authorization requires `spanner.instanceConfigs.update`
  6660  // permission on the resource name.
  6661  //
  6662  //   - name: A unique identifier for the instance configuration. Values are of
  6663  //     the form `projects//instanceConfigs/a-z*`.
  6664  func (r *ProjectsInstanceConfigsService) Patch(nameid string, updateinstanceconfigrequest *UpdateInstanceConfigRequest) *ProjectsInstanceConfigsPatchCall {
  6665  	c := &ProjectsInstanceConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6666  	c.nameid = nameid
  6667  	c.updateinstanceconfigrequest = updateinstanceconfigrequest
  6668  	return c
  6669  }
  6670  
  6671  // Fields allows partial responses to be retrieved. See
  6672  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6673  // details.
  6674  func (c *ProjectsInstanceConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsInstanceConfigsPatchCall {
  6675  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6676  	return c
  6677  }
  6678  
  6679  // Context sets the context to be used in this call's Do method.
  6680  func (c *ProjectsInstanceConfigsPatchCall) Context(ctx context.Context) *ProjectsInstanceConfigsPatchCall {
  6681  	c.ctx_ = ctx
  6682  	return c
  6683  }
  6684  
  6685  // Header returns a http.Header that can be modified by the caller to add
  6686  // headers to the request.
  6687  func (c *ProjectsInstanceConfigsPatchCall) Header() http.Header {
  6688  	if c.header_ == nil {
  6689  		c.header_ = make(http.Header)
  6690  	}
  6691  	return c.header_
  6692  }
  6693  
  6694  func (c *ProjectsInstanceConfigsPatchCall) doRequest(alt string) (*http.Response, error) {
  6695  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6696  	var body io.Reader = nil
  6697  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.updateinstanceconfigrequest)
  6698  	if err != nil {
  6699  		return nil, err
  6700  	}
  6701  	c.urlParams_.Set("alt", alt)
  6702  	c.urlParams_.Set("prettyPrint", "false")
  6703  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  6704  	urls += "?" + c.urlParams_.Encode()
  6705  	req, err := http.NewRequest("PATCH", urls, body)
  6706  	if err != nil {
  6707  		return nil, err
  6708  	}
  6709  	req.Header = reqHeaders
  6710  	googleapi.Expand(req.URL, map[string]string{
  6711  		"name": c.nameid,
  6712  	})
  6713  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6714  }
  6715  
  6716  // Do executes the "spanner.projects.instanceConfigs.patch" call.
  6717  // Any non-2xx status code is an error. Response headers are in either
  6718  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  6719  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6720  // whether the returned error was because http.StatusNotModified was returned.
  6721  func (c *ProjectsInstanceConfigsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  6722  	gensupport.SetOptions(c.urlParams_, opts...)
  6723  	res, err := c.doRequest("json")
  6724  	if res != nil && res.StatusCode == http.StatusNotModified {
  6725  		if res.Body != nil {
  6726  			res.Body.Close()
  6727  		}
  6728  		return nil, gensupport.WrapError(&googleapi.Error{
  6729  			Code:   res.StatusCode,
  6730  			Header: res.Header,
  6731  		})
  6732  	}
  6733  	if err != nil {
  6734  		return nil, err
  6735  	}
  6736  	defer googleapi.CloseBody(res)
  6737  	if err := googleapi.CheckResponse(res); err != nil {
  6738  		return nil, gensupport.WrapError(err)
  6739  	}
  6740  	ret := &Operation{
  6741  		ServerResponse: googleapi.ServerResponse{
  6742  			Header:         res.Header,
  6743  			HTTPStatusCode: res.StatusCode,
  6744  		},
  6745  	}
  6746  	target := &ret
  6747  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6748  		return nil, err
  6749  	}
  6750  	return ret, nil
  6751  }
  6752  
  6753  type ProjectsInstanceConfigsOperationsCancelCall struct {
  6754  	s          *Service
  6755  	name       string
  6756  	urlParams_ gensupport.URLParams
  6757  	ctx_       context.Context
  6758  	header_    http.Header
  6759  }
  6760  
  6761  // Cancel: Starts asynchronous cancellation on a long-running operation. The
  6762  // server makes a best effort to cancel the operation, but success is not
  6763  // guaranteed. If the server doesn't support this method, it returns
  6764  // `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or
  6765  // other methods to check whether the cancellation succeeded or whether the
  6766  // operation completed despite cancellation. On successful cancellation, the
  6767  // operation is not deleted; instead, it becomes an operation with an
  6768  // Operation.error value with a google.rpc.Status.code of 1, corresponding to
  6769  // `Code.CANCELLED`.
  6770  //
  6771  // - name: The name of the operation resource to be cancelled.
  6772  func (r *ProjectsInstanceConfigsOperationsService) Cancel(name string) *ProjectsInstanceConfigsOperationsCancelCall {
  6773  	c := &ProjectsInstanceConfigsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6774  	c.name = name
  6775  	return c
  6776  }
  6777  
  6778  // Fields allows partial responses to be retrieved. See
  6779  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6780  // details.
  6781  func (c *ProjectsInstanceConfigsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsInstanceConfigsOperationsCancelCall {
  6782  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6783  	return c
  6784  }
  6785  
  6786  // Context sets the context to be used in this call's Do method.
  6787  func (c *ProjectsInstanceConfigsOperationsCancelCall) Context(ctx context.Context) *ProjectsInstanceConfigsOperationsCancelCall {
  6788  	c.ctx_ = ctx
  6789  	return c
  6790  }
  6791  
  6792  // Header returns a http.Header that can be modified by the caller to add
  6793  // headers to the request.
  6794  func (c *ProjectsInstanceConfigsOperationsCancelCall) Header() http.Header {
  6795  	if c.header_ == nil {
  6796  		c.header_ = make(http.Header)
  6797  	}
  6798  	return c.header_
  6799  }
  6800  
  6801  func (c *ProjectsInstanceConfigsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
  6802  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6803  	var body io.Reader = nil
  6804  	c.urlParams_.Set("alt", alt)
  6805  	c.urlParams_.Set("prettyPrint", "false")
  6806  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
  6807  	urls += "?" + c.urlParams_.Encode()
  6808  	req, err := http.NewRequest("POST", urls, body)
  6809  	if err != nil {
  6810  		return nil, err
  6811  	}
  6812  	req.Header = reqHeaders
  6813  	googleapi.Expand(req.URL, map[string]string{
  6814  		"name": c.name,
  6815  	})
  6816  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6817  }
  6818  
  6819  // Do executes the "spanner.projects.instanceConfigs.operations.cancel" call.
  6820  // Any non-2xx status code is an error. Response headers are in either
  6821  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  6822  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6823  // whether the returned error was because http.StatusNotModified was returned.
  6824  func (c *ProjectsInstanceConfigsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  6825  	gensupport.SetOptions(c.urlParams_, opts...)
  6826  	res, err := c.doRequest("json")
  6827  	if res != nil && res.StatusCode == http.StatusNotModified {
  6828  		if res.Body != nil {
  6829  			res.Body.Close()
  6830  		}
  6831  		return nil, gensupport.WrapError(&googleapi.Error{
  6832  			Code:   res.StatusCode,
  6833  			Header: res.Header,
  6834  		})
  6835  	}
  6836  	if err != nil {
  6837  		return nil, err
  6838  	}
  6839  	defer googleapi.CloseBody(res)
  6840  	if err := googleapi.CheckResponse(res); err != nil {
  6841  		return nil, gensupport.WrapError(err)
  6842  	}
  6843  	ret := &Empty{
  6844  		ServerResponse: googleapi.ServerResponse{
  6845  			Header:         res.Header,
  6846  			HTTPStatusCode: res.StatusCode,
  6847  		},
  6848  	}
  6849  	target := &ret
  6850  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6851  		return nil, err
  6852  	}
  6853  	return ret, nil
  6854  }
  6855  
  6856  type ProjectsInstanceConfigsOperationsDeleteCall struct {
  6857  	s          *Service
  6858  	name       string
  6859  	urlParams_ gensupport.URLParams
  6860  	ctx_       context.Context
  6861  	header_    http.Header
  6862  }
  6863  
  6864  // Delete: Deletes a long-running operation. This method indicates that the
  6865  // client is no longer interested in the operation result. It does not cancel
  6866  // the operation. If the server doesn't support this method, it returns
  6867  // `google.rpc.Code.UNIMPLEMENTED`.
  6868  //
  6869  // - name: The name of the operation resource to be deleted.
  6870  func (r *ProjectsInstanceConfigsOperationsService) Delete(name string) *ProjectsInstanceConfigsOperationsDeleteCall {
  6871  	c := &ProjectsInstanceConfigsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6872  	c.name = name
  6873  	return c
  6874  }
  6875  
  6876  // Fields allows partial responses to be retrieved. See
  6877  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6878  // details.
  6879  func (c *ProjectsInstanceConfigsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsInstanceConfigsOperationsDeleteCall {
  6880  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6881  	return c
  6882  }
  6883  
  6884  // Context sets the context to be used in this call's Do method.
  6885  func (c *ProjectsInstanceConfigsOperationsDeleteCall) Context(ctx context.Context) *ProjectsInstanceConfigsOperationsDeleteCall {
  6886  	c.ctx_ = ctx
  6887  	return c
  6888  }
  6889  
  6890  // Header returns a http.Header that can be modified by the caller to add
  6891  // headers to the request.
  6892  func (c *ProjectsInstanceConfigsOperationsDeleteCall) Header() http.Header {
  6893  	if c.header_ == nil {
  6894  		c.header_ = make(http.Header)
  6895  	}
  6896  	return c.header_
  6897  }
  6898  
  6899  func (c *ProjectsInstanceConfigsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
  6900  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6901  	var body io.Reader = nil
  6902  	c.urlParams_.Set("alt", alt)
  6903  	c.urlParams_.Set("prettyPrint", "false")
  6904  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  6905  	urls += "?" + c.urlParams_.Encode()
  6906  	req, err := http.NewRequest("DELETE", urls, body)
  6907  	if err != nil {
  6908  		return nil, err
  6909  	}
  6910  	req.Header = reqHeaders
  6911  	googleapi.Expand(req.URL, map[string]string{
  6912  		"name": c.name,
  6913  	})
  6914  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6915  }
  6916  
  6917  // Do executes the "spanner.projects.instanceConfigs.operations.delete" call.
  6918  // Any non-2xx status code is an error. Response headers are in either
  6919  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  6920  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6921  // whether the returned error was because http.StatusNotModified was returned.
  6922  func (c *ProjectsInstanceConfigsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  6923  	gensupport.SetOptions(c.urlParams_, opts...)
  6924  	res, err := c.doRequest("json")
  6925  	if res != nil && res.StatusCode == http.StatusNotModified {
  6926  		if res.Body != nil {
  6927  			res.Body.Close()
  6928  		}
  6929  		return nil, gensupport.WrapError(&googleapi.Error{
  6930  			Code:   res.StatusCode,
  6931  			Header: res.Header,
  6932  		})
  6933  	}
  6934  	if err != nil {
  6935  		return nil, err
  6936  	}
  6937  	defer googleapi.CloseBody(res)
  6938  	if err := googleapi.CheckResponse(res); err != nil {
  6939  		return nil, gensupport.WrapError(err)
  6940  	}
  6941  	ret := &Empty{
  6942  		ServerResponse: googleapi.ServerResponse{
  6943  			Header:         res.Header,
  6944  			HTTPStatusCode: res.StatusCode,
  6945  		},
  6946  	}
  6947  	target := &ret
  6948  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6949  		return nil, err
  6950  	}
  6951  	return ret, nil
  6952  }
  6953  
  6954  type ProjectsInstanceConfigsOperationsGetCall struct {
  6955  	s            *Service
  6956  	name         string
  6957  	urlParams_   gensupport.URLParams
  6958  	ifNoneMatch_ string
  6959  	ctx_         context.Context
  6960  	header_      http.Header
  6961  }
  6962  
  6963  // Get: Gets the latest state of a long-running operation. Clients can use this
  6964  // method to poll the operation result at intervals as recommended by the API
  6965  // service.
  6966  //
  6967  // - name: The name of the operation resource.
  6968  func (r *ProjectsInstanceConfigsOperationsService) Get(name string) *ProjectsInstanceConfigsOperationsGetCall {
  6969  	c := &ProjectsInstanceConfigsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6970  	c.name = name
  6971  	return c
  6972  }
  6973  
  6974  // Fields allows partial responses to be retrieved. See
  6975  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6976  // details.
  6977  func (c *ProjectsInstanceConfigsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsInstanceConfigsOperationsGetCall {
  6978  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6979  	return c
  6980  }
  6981  
  6982  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6983  // object's ETag matches the given value. This is useful for getting updates
  6984  // only after the object has changed since the last request.
  6985  func (c *ProjectsInstanceConfigsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsInstanceConfigsOperationsGetCall {
  6986  	c.ifNoneMatch_ = entityTag
  6987  	return c
  6988  }
  6989  
  6990  // Context sets the context to be used in this call's Do method.
  6991  func (c *ProjectsInstanceConfigsOperationsGetCall) Context(ctx context.Context) *ProjectsInstanceConfigsOperationsGetCall {
  6992  	c.ctx_ = ctx
  6993  	return c
  6994  }
  6995  
  6996  // Header returns a http.Header that can be modified by the caller to add
  6997  // headers to the request.
  6998  func (c *ProjectsInstanceConfigsOperationsGetCall) Header() http.Header {
  6999  	if c.header_ == nil {
  7000  		c.header_ = make(http.Header)
  7001  	}
  7002  	return c.header_
  7003  }
  7004  
  7005  func (c *ProjectsInstanceConfigsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  7006  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7007  	if c.ifNoneMatch_ != "" {
  7008  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7009  	}
  7010  	var body io.Reader = nil
  7011  	c.urlParams_.Set("alt", alt)
  7012  	c.urlParams_.Set("prettyPrint", "false")
  7013  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  7014  	urls += "?" + c.urlParams_.Encode()
  7015  	req, err := http.NewRequest("GET", urls, body)
  7016  	if err != nil {
  7017  		return nil, err
  7018  	}
  7019  	req.Header = reqHeaders
  7020  	googleapi.Expand(req.URL, map[string]string{
  7021  		"name": c.name,
  7022  	})
  7023  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7024  }
  7025  
  7026  // Do executes the "spanner.projects.instanceConfigs.operations.get" call.
  7027  // Any non-2xx status code is an error. Response headers are in either
  7028  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  7029  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7030  // whether the returned error was because http.StatusNotModified was returned.
  7031  func (c *ProjectsInstanceConfigsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7032  	gensupport.SetOptions(c.urlParams_, opts...)
  7033  	res, err := c.doRequest("json")
  7034  	if res != nil && res.StatusCode == http.StatusNotModified {
  7035  		if res.Body != nil {
  7036  			res.Body.Close()
  7037  		}
  7038  		return nil, gensupport.WrapError(&googleapi.Error{
  7039  			Code:   res.StatusCode,
  7040  			Header: res.Header,
  7041  		})
  7042  	}
  7043  	if err != nil {
  7044  		return nil, err
  7045  	}
  7046  	defer googleapi.CloseBody(res)
  7047  	if err := googleapi.CheckResponse(res); err != nil {
  7048  		return nil, gensupport.WrapError(err)
  7049  	}
  7050  	ret := &Operation{
  7051  		ServerResponse: googleapi.ServerResponse{
  7052  			Header:         res.Header,
  7053  			HTTPStatusCode: res.StatusCode,
  7054  		},
  7055  	}
  7056  	target := &ret
  7057  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7058  		return nil, err
  7059  	}
  7060  	return ret, nil
  7061  }
  7062  
  7063  type ProjectsInstanceConfigsOperationsListCall struct {
  7064  	s            *Service
  7065  	name         string
  7066  	urlParams_   gensupport.URLParams
  7067  	ifNoneMatch_ string
  7068  	ctx_         context.Context
  7069  	header_      http.Header
  7070  }
  7071  
  7072  // List: Lists operations that match the specified filter in the request. If
  7073  // the server doesn't support this method, it returns `UNIMPLEMENTED`.
  7074  //
  7075  // - name: The name of the operation's parent resource.
  7076  func (r *ProjectsInstanceConfigsOperationsService) List(name string) *ProjectsInstanceConfigsOperationsListCall {
  7077  	c := &ProjectsInstanceConfigsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7078  	c.name = name
  7079  	return c
  7080  }
  7081  
  7082  // Filter sets the optional parameter "filter": The standard list filter.
  7083  func (c *ProjectsInstanceConfigsOperationsListCall) Filter(filter string) *ProjectsInstanceConfigsOperationsListCall {
  7084  	c.urlParams_.Set("filter", filter)
  7085  	return c
  7086  }
  7087  
  7088  // PageSize sets the optional parameter "pageSize": The standard list page
  7089  // size.
  7090  func (c *ProjectsInstanceConfigsOperationsListCall) PageSize(pageSize int64) *ProjectsInstanceConfigsOperationsListCall {
  7091  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  7092  	return c
  7093  }
  7094  
  7095  // PageToken sets the optional parameter "pageToken": The standard list page
  7096  // token.
  7097  func (c *ProjectsInstanceConfigsOperationsListCall) PageToken(pageToken string) *ProjectsInstanceConfigsOperationsListCall {
  7098  	c.urlParams_.Set("pageToken", pageToken)
  7099  	return c
  7100  }
  7101  
  7102  // Fields allows partial responses to be retrieved. See
  7103  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7104  // details.
  7105  func (c *ProjectsInstanceConfigsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsInstanceConfigsOperationsListCall {
  7106  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7107  	return c
  7108  }
  7109  
  7110  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7111  // object's ETag matches the given value. This is useful for getting updates
  7112  // only after the object has changed since the last request.
  7113  func (c *ProjectsInstanceConfigsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsInstanceConfigsOperationsListCall {
  7114  	c.ifNoneMatch_ = entityTag
  7115  	return c
  7116  }
  7117  
  7118  // Context sets the context to be used in this call's Do method.
  7119  func (c *ProjectsInstanceConfigsOperationsListCall) Context(ctx context.Context) *ProjectsInstanceConfigsOperationsListCall {
  7120  	c.ctx_ = ctx
  7121  	return c
  7122  }
  7123  
  7124  // Header returns a http.Header that can be modified by the caller to add
  7125  // headers to the request.
  7126  func (c *ProjectsInstanceConfigsOperationsListCall) Header() http.Header {
  7127  	if c.header_ == nil {
  7128  		c.header_ = make(http.Header)
  7129  	}
  7130  	return c.header_
  7131  }
  7132  
  7133  func (c *ProjectsInstanceConfigsOperationsListCall) doRequest(alt string) (*http.Response, error) {
  7134  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7135  	if c.ifNoneMatch_ != "" {
  7136  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7137  	}
  7138  	var body io.Reader = nil
  7139  	c.urlParams_.Set("alt", alt)
  7140  	c.urlParams_.Set("prettyPrint", "false")
  7141  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  7142  	urls += "?" + c.urlParams_.Encode()
  7143  	req, err := http.NewRequest("GET", urls, body)
  7144  	if err != nil {
  7145  		return nil, err
  7146  	}
  7147  	req.Header = reqHeaders
  7148  	googleapi.Expand(req.URL, map[string]string{
  7149  		"name": c.name,
  7150  	})
  7151  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7152  }
  7153  
  7154  // Do executes the "spanner.projects.instanceConfigs.operations.list" call.
  7155  // Any non-2xx status code is an error. Response headers are in either
  7156  // *ListOperationsResponse.ServerResponse.Header or (if a response was returned
  7157  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  7158  // check whether the returned error was because http.StatusNotModified was
  7159  // returned.
  7160  func (c *ProjectsInstanceConfigsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
  7161  	gensupport.SetOptions(c.urlParams_, opts...)
  7162  	res, err := c.doRequest("json")
  7163  	if res != nil && res.StatusCode == http.StatusNotModified {
  7164  		if res.Body != nil {
  7165  			res.Body.Close()
  7166  		}
  7167  		return nil, gensupport.WrapError(&googleapi.Error{
  7168  			Code:   res.StatusCode,
  7169  			Header: res.Header,
  7170  		})
  7171  	}
  7172  	if err != nil {
  7173  		return nil, err
  7174  	}
  7175  	defer googleapi.CloseBody(res)
  7176  	if err := googleapi.CheckResponse(res); err != nil {
  7177  		return nil, gensupport.WrapError(err)
  7178  	}
  7179  	ret := &ListOperationsResponse{
  7180  		ServerResponse: googleapi.ServerResponse{
  7181  			Header:         res.Header,
  7182  			HTTPStatusCode: res.StatusCode,
  7183  		},
  7184  	}
  7185  	target := &ret
  7186  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7187  		return nil, err
  7188  	}
  7189  	return ret, nil
  7190  }
  7191  
  7192  // Pages invokes f for each page of results.
  7193  // A non-nil error returned from f will halt the iteration.
  7194  // The provided context supersedes any context provided to the Context method.
  7195  func (c *ProjectsInstanceConfigsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
  7196  	c.ctx_ = ctx
  7197  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  7198  	for {
  7199  		x, err := c.Do()
  7200  		if err != nil {
  7201  			return err
  7202  		}
  7203  		if err := f(x); err != nil {
  7204  			return err
  7205  		}
  7206  		if x.NextPageToken == "" {
  7207  			return nil
  7208  		}
  7209  		c.PageToken(x.NextPageToken)
  7210  	}
  7211  }
  7212  
  7213  type ProjectsInstanceConfigsSsdCachesOperationsCancelCall struct {
  7214  	s          *Service
  7215  	name       string
  7216  	urlParams_ gensupport.URLParams
  7217  	ctx_       context.Context
  7218  	header_    http.Header
  7219  }
  7220  
  7221  // Cancel: Starts asynchronous cancellation on a long-running operation. The
  7222  // server makes a best effort to cancel the operation, but success is not
  7223  // guaranteed. If the server doesn't support this method, it returns
  7224  // `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or
  7225  // other methods to check whether the cancellation succeeded or whether the
  7226  // operation completed despite cancellation. On successful cancellation, the
  7227  // operation is not deleted; instead, it becomes an operation with an
  7228  // Operation.error value with a google.rpc.Status.code of 1, corresponding to
  7229  // `Code.CANCELLED`.
  7230  //
  7231  // - name: The name of the operation resource to be cancelled.
  7232  func (r *ProjectsInstanceConfigsSsdCachesOperationsService) Cancel(name string) *ProjectsInstanceConfigsSsdCachesOperationsCancelCall {
  7233  	c := &ProjectsInstanceConfigsSsdCachesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7234  	c.name = name
  7235  	return c
  7236  }
  7237  
  7238  // Fields allows partial responses to be retrieved. See
  7239  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7240  // details.
  7241  func (c *ProjectsInstanceConfigsSsdCachesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsInstanceConfigsSsdCachesOperationsCancelCall {
  7242  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7243  	return c
  7244  }
  7245  
  7246  // Context sets the context to be used in this call's Do method.
  7247  func (c *ProjectsInstanceConfigsSsdCachesOperationsCancelCall) Context(ctx context.Context) *ProjectsInstanceConfigsSsdCachesOperationsCancelCall {
  7248  	c.ctx_ = ctx
  7249  	return c
  7250  }
  7251  
  7252  // Header returns a http.Header that can be modified by the caller to add
  7253  // headers to the request.
  7254  func (c *ProjectsInstanceConfigsSsdCachesOperationsCancelCall) Header() http.Header {
  7255  	if c.header_ == nil {
  7256  		c.header_ = make(http.Header)
  7257  	}
  7258  	return c.header_
  7259  }
  7260  
  7261  func (c *ProjectsInstanceConfigsSsdCachesOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
  7262  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7263  	var body io.Reader = nil
  7264  	c.urlParams_.Set("alt", alt)
  7265  	c.urlParams_.Set("prettyPrint", "false")
  7266  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
  7267  	urls += "?" + c.urlParams_.Encode()
  7268  	req, err := http.NewRequest("POST", urls, body)
  7269  	if err != nil {
  7270  		return nil, err
  7271  	}
  7272  	req.Header = reqHeaders
  7273  	googleapi.Expand(req.URL, map[string]string{
  7274  		"name": c.name,
  7275  	})
  7276  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7277  }
  7278  
  7279  // Do executes the "spanner.projects.instanceConfigs.ssdCaches.operations.cancel" call.
  7280  // Any non-2xx status code is an error. Response headers are in either
  7281  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  7282  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7283  // whether the returned error was because http.StatusNotModified was returned.
  7284  func (c *ProjectsInstanceConfigsSsdCachesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  7285  	gensupport.SetOptions(c.urlParams_, opts...)
  7286  	res, err := c.doRequest("json")
  7287  	if res != nil && res.StatusCode == http.StatusNotModified {
  7288  		if res.Body != nil {
  7289  			res.Body.Close()
  7290  		}
  7291  		return nil, gensupport.WrapError(&googleapi.Error{
  7292  			Code:   res.StatusCode,
  7293  			Header: res.Header,
  7294  		})
  7295  	}
  7296  	if err != nil {
  7297  		return nil, err
  7298  	}
  7299  	defer googleapi.CloseBody(res)
  7300  	if err := googleapi.CheckResponse(res); err != nil {
  7301  		return nil, gensupport.WrapError(err)
  7302  	}
  7303  	ret := &Empty{
  7304  		ServerResponse: googleapi.ServerResponse{
  7305  			Header:         res.Header,
  7306  			HTTPStatusCode: res.StatusCode,
  7307  		},
  7308  	}
  7309  	target := &ret
  7310  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7311  		return nil, err
  7312  	}
  7313  	return ret, nil
  7314  }
  7315  
  7316  type ProjectsInstanceConfigsSsdCachesOperationsDeleteCall struct {
  7317  	s          *Service
  7318  	name       string
  7319  	urlParams_ gensupport.URLParams
  7320  	ctx_       context.Context
  7321  	header_    http.Header
  7322  }
  7323  
  7324  // Delete: Deletes a long-running operation. This method indicates that the
  7325  // client is no longer interested in the operation result. It does not cancel
  7326  // the operation. If the server doesn't support this method, it returns
  7327  // `google.rpc.Code.UNIMPLEMENTED`.
  7328  //
  7329  // - name: The name of the operation resource to be deleted.
  7330  func (r *ProjectsInstanceConfigsSsdCachesOperationsService) Delete(name string) *ProjectsInstanceConfigsSsdCachesOperationsDeleteCall {
  7331  	c := &ProjectsInstanceConfigsSsdCachesOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7332  	c.name = name
  7333  	return c
  7334  }
  7335  
  7336  // Fields allows partial responses to be retrieved. See
  7337  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7338  // details.
  7339  func (c *ProjectsInstanceConfigsSsdCachesOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsInstanceConfigsSsdCachesOperationsDeleteCall {
  7340  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7341  	return c
  7342  }
  7343  
  7344  // Context sets the context to be used in this call's Do method.
  7345  func (c *ProjectsInstanceConfigsSsdCachesOperationsDeleteCall) Context(ctx context.Context) *ProjectsInstanceConfigsSsdCachesOperationsDeleteCall {
  7346  	c.ctx_ = ctx
  7347  	return c
  7348  }
  7349  
  7350  // Header returns a http.Header that can be modified by the caller to add
  7351  // headers to the request.
  7352  func (c *ProjectsInstanceConfigsSsdCachesOperationsDeleteCall) Header() http.Header {
  7353  	if c.header_ == nil {
  7354  		c.header_ = make(http.Header)
  7355  	}
  7356  	return c.header_
  7357  }
  7358  
  7359  func (c *ProjectsInstanceConfigsSsdCachesOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
  7360  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7361  	var body io.Reader = nil
  7362  	c.urlParams_.Set("alt", alt)
  7363  	c.urlParams_.Set("prettyPrint", "false")
  7364  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  7365  	urls += "?" + c.urlParams_.Encode()
  7366  	req, err := http.NewRequest("DELETE", urls, body)
  7367  	if err != nil {
  7368  		return nil, err
  7369  	}
  7370  	req.Header = reqHeaders
  7371  	googleapi.Expand(req.URL, map[string]string{
  7372  		"name": c.name,
  7373  	})
  7374  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7375  }
  7376  
  7377  // Do executes the "spanner.projects.instanceConfigs.ssdCaches.operations.delete" call.
  7378  // Any non-2xx status code is an error. Response headers are in either
  7379  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  7380  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7381  // whether the returned error was because http.StatusNotModified was returned.
  7382  func (c *ProjectsInstanceConfigsSsdCachesOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  7383  	gensupport.SetOptions(c.urlParams_, opts...)
  7384  	res, err := c.doRequest("json")
  7385  	if res != nil && res.StatusCode == http.StatusNotModified {
  7386  		if res.Body != nil {
  7387  			res.Body.Close()
  7388  		}
  7389  		return nil, gensupport.WrapError(&googleapi.Error{
  7390  			Code:   res.StatusCode,
  7391  			Header: res.Header,
  7392  		})
  7393  	}
  7394  	if err != nil {
  7395  		return nil, err
  7396  	}
  7397  	defer googleapi.CloseBody(res)
  7398  	if err := googleapi.CheckResponse(res); err != nil {
  7399  		return nil, gensupport.WrapError(err)
  7400  	}
  7401  	ret := &Empty{
  7402  		ServerResponse: googleapi.ServerResponse{
  7403  			Header:         res.Header,
  7404  			HTTPStatusCode: res.StatusCode,
  7405  		},
  7406  	}
  7407  	target := &ret
  7408  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7409  		return nil, err
  7410  	}
  7411  	return ret, nil
  7412  }
  7413  
  7414  type ProjectsInstanceConfigsSsdCachesOperationsGetCall struct {
  7415  	s            *Service
  7416  	name         string
  7417  	urlParams_   gensupport.URLParams
  7418  	ifNoneMatch_ string
  7419  	ctx_         context.Context
  7420  	header_      http.Header
  7421  }
  7422  
  7423  // Get: Gets the latest state of a long-running operation. Clients can use this
  7424  // method to poll the operation result at intervals as recommended by the API
  7425  // service.
  7426  //
  7427  // - name: The name of the operation resource.
  7428  func (r *ProjectsInstanceConfigsSsdCachesOperationsService) Get(name string) *ProjectsInstanceConfigsSsdCachesOperationsGetCall {
  7429  	c := &ProjectsInstanceConfigsSsdCachesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7430  	c.name = name
  7431  	return c
  7432  }
  7433  
  7434  // Fields allows partial responses to be retrieved. See
  7435  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7436  // details.
  7437  func (c *ProjectsInstanceConfigsSsdCachesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsInstanceConfigsSsdCachesOperationsGetCall {
  7438  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7439  	return c
  7440  }
  7441  
  7442  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7443  // object's ETag matches the given value. This is useful for getting updates
  7444  // only after the object has changed since the last request.
  7445  func (c *ProjectsInstanceConfigsSsdCachesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsInstanceConfigsSsdCachesOperationsGetCall {
  7446  	c.ifNoneMatch_ = entityTag
  7447  	return c
  7448  }
  7449  
  7450  // Context sets the context to be used in this call's Do method.
  7451  func (c *ProjectsInstanceConfigsSsdCachesOperationsGetCall) Context(ctx context.Context) *ProjectsInstanceConfigsSsdCachesOperationsGetCall {
  7452  	c.ctx_ = ctx
  7453  	return c
  7454  }
  7455  
  7456  // Header returns a http.Header that can be modified by the caller to add
  7457  // headers to the request.
  7458  func (c *ProjectsInstanceConfigsSsdCachesOperationsGetCall) Header() http.Header {
  7459  	if c.header_ == nil {
  7460  		c.header_ = make(http.Header)
  7461  	}
  7462  	return c.header_
  7463  }
  7464  
  7465  func (c *ProjectsInstanceConfigsSsdCachesOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  7466  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7467  	if c.ifNoneMatch_ != "" {
  7468  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7469  	}
  7470  	var body io.Reader = nil
  7471  	c.urlParams_.Set("alt", alt)
  7472  	c.urlParams_.Set("prettyPrint", "false")
  7473  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  7474  	urls += "?" + c.urlParams_.Encode()
  7475  	req, err := http.NewRequest("GET", urls, body)
  7476  	if err != nil {
  7477  		return nil, err
  7478  	}
  7479  	req.Header = reqHeaders
  7480  	googleapi.Expand(req.URL, map[string]string{
  7481  		"name": c.name,
  7482  	})
  7483  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7484  }
  7485  
  7486  // Do executes the "spanner.projects.instanceConfigs.ssdCaches.operations.get" call.
  7487  // Any non-2xx status code is an error. Response headers are in either
  7488  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  7489  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7490  // whether the returned error was because http.StatusNotModified was returned.
  7491  func (c *ProjectsInstanceConfigsSsdCachesOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7492  	gensupport.SetOptions(c.urlParams_, opts...)
  7493  	res, err := c.doRequest("json")
  7494  	if res != nil && res.StatusCode == http.StatusNotModified {
  7495  		if res.Body != nil {
  7496  			res.Body.Close()
  7497  		}
  7498  		return nil, gensupport.WrapError(&googleapi.Error{
  7499  			Code:   res.StatusCode,
  7500  			Header: res.Header,
  7501  		})
  7502  	}
  7503  	if err != nil {
  7504  		return nil, err
  7505  	}
  7506  	defer googleapi.CloseBody(res)
  7507  	if err := googleapi.CheckResponse(res); err != nil {
  7508  		return nil, gensupport.WrapError(err)
  7509  	}
  7510  	ret := &Operation{
  7511  		ServerResponse: googleapi.ServerResponse{
  7512  			Header:         res.Header,
  7513  			HTTPStatusCode: res.StatusCode,
  7514  		},
  7515  	}
  7516  	target := &ret
  7517  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7518  		return nil, err
  7519  	}
  7520  	return ret, nil
  7521  }
  7522  
  7523  type ProjectsInstanceConfigsSsdCachesOperationsListCall struct {
  7524  	s            *Service
  7525  	name         string
  7526  	urlParams_   gensupport.URLParams
  7527  	ifNoneMatch_ string
  7528  	ctx_         context.Context
  7529  	header_      http.Header
  7530  }
  7531  
  7532  // List: Lists operations that match the specified filter in the request. If
  7533  // the server doesn't support this method, it returns `UNIMPLEMENTED`.
  7534  //
  7535  // - name: The name of the operation's parent resource.
  7536  func (r *ProjectsInstanceConfigsSsdCachesOperationsService) List(name string) *ProjectsInstanceConfigsSsdCachesOperationsListCall {
  7537  	c := &ProjectsInstanceConfigsSsdCachesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7538  	c.name = name
  7539  	return c
  7540  }
  7541  
  7542  // Filter sets the optional parameter "filter": The standard list filter.
  7543  func (c *ProjectsInstanceConfigsSsdCachesOperationsListCall) Filter(filter string) *ProjectsInstanceConfigsSsdCachesOperationsListCall {
  7544  	c.urlParams_.Set("filter", filter)
  7545  	return c
  7546  }
  7547  
  7548  // PageSize sets the optional parameter "pageSize": The standard list page
  7549  // size.
  7550  func (c *ProjectsInstanceConfigsSsdCachesOperationsListCall) PageSize(pageSize int64) *ProjectsInstanceConfigsSsdCachesOperationsListCall {
  7551  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  7552  	return c
  7553  }
  7554  
  7555  // PageToken sets the optional parameter "pageToken": The standard list page
  7556  // token.
  7557  func (c *ProjectsInstanceConfigsSsdCachesOperationsListCall) PageToken(pageToken string) *ProjectsInstanceConfigsSsdCachesOperationsListCall {
  7558  	c.urlParams_.Set("pageToken", pageToken)
  7559  	return c
  7560  }
  7561  
  7562  // Fields allows partial responses to be retrieved. See
  7563  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7564  // details.
  7565  func (c *ProjectsInstanceConfigsSsdCachesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsInstanceConfigsSsdCachesOperationsListCall {
  7566  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7567  	return c
  7568  }
  7569  
  7570  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7571  // object's ETag matches the given value. This is useful for getting updates
  7572  // only after the object has changed since the last request.
  7573  func (c *ProjectsInstanceConfigsSsdCachesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsInstanceConfigsSsdCachesOperationsListCall {
  7574  	c.ifNoneMatch_ = entityTag
  7575  	return c
  7576  }
  7577  
  7578  // Context sets the context to be used in this call's Do method.
  7579  func (c *ProjectsInstanceConfigsSsdCachesOperationsListCall) Context(ctx context.Context) *ProjectsInstanceConfigsSsdCachesOperationsListCall {
  7580  	c.ctx_ = ctx
  7581  	return c
  7582  }
  7583  
  7584  // Header returns a http.Header that can be modified by the caller to add
  7585  // headers to the request.
  7586  func (c *ProjectsInstanceConfigsSsdCachesOperationsListCall) Header() http.Header {
  7587  	if c.header_ == nil {
  7588  		c.header_ = make(http.Header)
  7589  	}
  7590  	return c.header_
  7591  }
  7592  
  7593  func (c *ProjectsInstanceConfigsSsdCachesOperationsListCall) doRequest(alt string) (*http.Response, error) {
  7594  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7595  	if c.ifNoneMatch_ != "" {
  7596  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7597  	}
  7598  	var body io.Reader = nil
  7599  	c.urlParams_.Set("alt", alt)
  7600  	c.urlParams_.Set("prettyPrint", "false")
  7601  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  7602  	urls += "?" + c.urlParams_.Encode()
  7603  	req, err := http.NewRequest("GET", urls, body)
  7604  	if err != nil {
  7605  		return nil, err
  7606  	}
  7607  	req.Header = reqHeaders
  7608  	googleapi.Expand(req.URL, map[string]string{
  7609  		"name": c.name,
  7610  	})
  7611  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7612  }
  7613  
  7614  // Do executes the "spanner.projects.instanceConfigs.ssdCaches.operations.list" call.
  7615  // Any non-2xx status code is an error. Response headers are in either
  7616  // *ListOperationsResponse.ServerResponse.Header or (if a response was returned
  7617  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  7618  // check whether the returned error was because http.StatusNotModified was
  7619  // returned.
  7620  func (c *ProjectsInstanceConfigsSsdCachesOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
  7621  	gensupport.SetOptions(c.urlParams_, opts...)
  7622  	res, err := c.doRequest("json")
  7623  	if res != nil && res.StatusCode == http.StatusNotModified {
  7624  		if res.Body != nil {
  7625  			res.Body.Close()
  7626  		}
  7627  		return nil, gensupport.WrapError(&googleapi.Error{
  7628  			Code:   res.StatusCode,
  7629  			Header: res.Header,
  7630  		})
  7631  	}
  7632  	if err != nil {
  7633  		return nil, err
  7634  	}
  7635  	defer googleapi.CloseBody(res)
  7636  	if err := googleapi.CheckResponse(res); err != nil {
  7637  		return nil, gensupport.WrapError(err)
  7638  	}
  7639  	ret := &ListOperationsResponse{
  7640  		ServerResponse: googleapi.ServerResponse{
  7641  			Header:         res.Header,
  7642  			HTTPStatusCode: res.StatusCode,
  7643  		},
  7644  	}
  7645  	target := &ret
  7646  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7647  		return nil, err
  7648  	}
  7649  	return ret, nil
  7650  }
  7651  
  7652  // Pages invokes f for each page of results.
  7653  // A non-nil error returned from f will halt the iteration.
  7654  // The provided context supersedes any context provided to the Context method.
  7655  func (c *ProjectsInstanceConfigsSsdCachesOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
  7656  	c.ctx_ = ctx
  7657  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  7658  	for {
  7659  		x, err := c.Do()
  7660  		if err != nil {
  7661  			return err
  7662  		}
  7663  		if err := f(x); err != nil {
  7664  			return err
  7665  		}
  7666  		if x.NextPageToken == "" {
  7667  			return nil
  7668  		}
  7669  		c.PageToken(x.NextPageToken)
  7670  	}
  7671  }
  7672  
  7673  type ProjectsInstancesCreateCall struct {
  7674  	s                     *Service
  7675  	parent                string
  7676  	createinstancerequest *CreateInstanceRequest
  7677  	urlParams_            gensupport.URLParams
  7678  	ctx_                  context.Context
  7679  	header_               http.Header
  7680  }
  7681  
  7682  // Create: Creates an instance and begins preparing it to begin serving. The
  7683  // returned long-running operation can be used to track the progress of
  7684  // preparing the new instance. The instance name is assigned by the caller. If
  7685  // the named instance already exists, `CreateInstance` returns
  7686  // `ALREADY_EXISTS`. Immediately upon completion of this request: * The
  7687  // instance is readable via the API, with all requested attributes but no
  7688  // allocated resources. Its state is `CREATING`. Until completion of the
  7689  // returned operation: * Cancelling the operation renders the instance
  7690  // immediately unreadable via the API. * The instance can be deleted. * All
  7691  // other attempts to modify the instance are rejected. Upon completion of the
  7692  // returned operation: * Billing for all successfully-allocated resources
  7693  // begins (some types may have lower than the requested levels). * Databases
  7694  // can be created in the instance. * The instance's allocated resource levels
  7695  // are readable via the API. * The instance's state becomes `READY`. The
  7696  // returned long-running operation will have a name of the format
  7697  // `/operations/` and can be used to track creation of the instance. The
  7698  // metadata field type is CreateInstanceMetadata. The response field type is
  7699  // Instance, if successful.
  7700  //
  7701  //   - parent: The name of the project in which to create the instance. Values
  7702  //     are of the form `projects/`.
  7703  func (r *ProjectsInstancesService) Create(parent string, createinstancerequest *CreateInstanceRequest) *ProjectsInstancesCreateCall {
  7704  	c := &ProjectsInstancesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7705  	c.parent = parent
  7706  	c.createinstancerequest = createinstancerequest
  7707  	return c
  7708  }
  7709  
  7710  // Fields allows partial responses to be retrieved. See
  7711  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7712  // details.
  7713  func (c *ProjectsInstancesCreateCall) Fields(s ...googleapi.Field) *ProjectsInstancesCreateCall {
  7714  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7715  	return c
  7716  }
  7717  
  7718  // Context sets the context to be used in this call's Do method.
  7719  func (c *ProjectsInstancesCreateCall) Context(ctx context.Context) *ProjectsInstancesCreateCall {
  7720  	c.ctx_ = ctx
  7721  	return c
  7722  }
  7723  
  7724  // Header returns a http.Header that can be modified by the caller to add
  7725  // headers to the request.
  7726  func (c *ProjectsInstancesCreateCall) Header() http.Header {
  7727  	if c.header_ == nil {
  7728  		c.header_ = make(http.Header)
  7729  	}
  7730  	return c.header_
  7731  }
  7732  
  7733  func (c *ProjectsInstancesCreateCall) doRequest(alt string) (*http.Response, error) {
  7734  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7735  	var body io.Reader = nil
  7736  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.createinstancerequest)
  7737  	if err != nil {
  7738  		return nil, err
  7739  	}
  7740  	c.urlParams_.Set("alt", alt)
  7741  	c.urlParams_.Set("prettyPrint", "false")
  7742  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/instances")
  7743  	urls += "?" + c.urlParams_.Encode()
  7744  	req, err := http.NewRequest("POST", urls, body)
  7745  	if err != nil {
  7746  		return nil, err
  7747  	}
  7748  	req.Header = reqHeaders
  7749  	googleapi.Expand(req.URL, map[string]string{
  7750  		"parent": c.parent,
  7751  	})
  7752  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7753  }
  7754  
  7755  // Do executes the "spanner.projects.instances.create" call.
  7756  // Any non-2xx status code is an error. Response headers are in either
  7757  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  7758  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7759  // whether the returned error was because http.StatusNotModified was returned.
  7760  func (c *ProjectsInstancesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7761  	gensupport.SetOptions(c.urlParams_, opts...)
  7762  	res, err := c.doRequest("json")
  7763  	if res != nil && res.StatusCode == http.StatusNotModified {
  7764  		if res.Body != nil {
  7765  			res.Body.Close()
  7766  		}
  7767  		return nil, gensupport.WrapError(&googleapi.Error{
  7768  			Code:   res.StatusCode,
  7769  			Header: res.Header,
  7770  		})
  7771  	}
  7772  	if err != nil {
  7773  		return nil, err
  7774  	}
  7775  	defer googleapi.CloseBody(res)
  7776  	if err := googleapi.CheckResponse(res); err != nil {
  7777  		return nil, gensupport.WrapError(err)
  7778  	}
  7779  	ret := &Operation{
  7780  		ServerResponse: googleapi.ServerResponse{
  7781  			Header:         res.Header,
  7782  			HTTPStatusCode: res.StatusCode,
  7783  		},
  7784  	}
  7785  	target := &ret
  7786  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7787  		return nil, err
  7788  	}
  7789  	return ret, nil
  7790  }
  7791  
  7792  type ProjectsInstancesDeleteCall struct {
  7793  	s          *Service
  7794  	name       string
  7795  	urlParams_ gensupport.URLParams
  7796  	ctx_       context.Context
  7797  	header_    http.Header
  7798  }
  7799  
  7800  // Delete: Deletes an instance. Immediately upon completion of the request: *
  7801  // Billing ceases for all of the instance's reserved resources. Soon afterward:
  7802  // * The instance and *all of its databases* immediately and irrevocably
  7803  // disappear from the API. All data in the databases is permanently deleted.
  7804  //
  7805  //   - name: The name of the instance to be deleted. Values are of the form
  7806  //     `projects//instances/`.
  7807  func (r *ProjectsInstancesService) Delete(name string) *ProjectsInstancesDeleteCall {
  7808  	c := &ProjectsInstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7809  	c.name = name
  7810  	return c
  7811  }
  7812  
  7813  // Fields allows partial responses to be retrieved. See
  7814  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7815  // details.
  7816  func (c *ProjectsInstancesDeleteCall) Fields(s ...googleapi.Field) *ProjectsInstancesDeleteCall {
  7817  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7818  	return c
  7819  }
  7820  
  7821  // Context sets the context to be used in this call's Do method.
  7822  func (c *ProjectsInstancesDeleteCall) Context(ctx context.Context) *ProjectsInstancesDeleteCall {
  7823  	c.ctx_ = ctx
  7824  	return c
  7825  }
  7826  
  7827  // Header returns a http.Header that can be modified by the caller to add
  7828  // headers to the request.
  7829  func (c *ProjectsInstancesDeleteCall) Header() http.Header {
  7830  	if c.header_ == nil {
  7831  		c.header_ = make(http.Header)
  7832  	}
  7833  	return c.header_
  7834  }
  7835  
  7836  func (c *ProjectsInstancesDeleteCall) doRequest(alt string) (*http.Response, error) {
  7837  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7838  	var body io.Reader = nil
  7839  	c.urlParams_.Set("alt", alt)
  7840  	c.urlParams_.Set("prettyPrint", "false")
  7841  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  7842  	urls += "?" + c.urlParams_.Encode()
  7843  	req, err := http.NewRequest("DELETE", urls, body)
  7844  	if err != nil {
  7845  		return nil, err
  7846  	}
  7847  	req.Header = reqHeaders
  7848  	googleapi.Expand(req.URL, map[string]string{
  7849  		"name": c.name,
  7850  	})
  7851  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7852  }
  7853  
  7854  // Do executes the "spanner.projects.instances.delete" call.
  7855  // Any non-2xx status code is an error. Response headers are in either
  7856  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  7857  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7858  // whether the returned error was because http.StatusNotModified was returned.
  7859  func (c *ProjectsInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  7860  	gensupport.SetOptions(c.urlParams_, opts...)
  7861  	res, err := c.doRequest("json")
  7862  	if res != nil && res.StatusCode == http.StatusNotModified {
  7863  		if res.Body != nil {
  7864  			res.Body.Close()
  7865  		}
  7866  		return nil, gensupport.WrapError(&googleapi.Error{
  7867  			Code:   res.StatusCode,
  7868  			Header: res.Header,
  7869  		})
  7870  	}
  7871  	if err != nil {
  7872  		return nil, err
  7873  	}
  7874  	defer googleapi.CloseBody(res)
  7875  	if err := googleapi.CheckResponse(res); err != nil {
  7876  		return nil, gensupport.WrapError(err)
  7877  	}
  7878  	ret := &Empty{
  7879  		ServerResponse: googleapi.ServerResponse{
  7880  			Header:         res.Header,
  7881  			HTTPStatusCode: res.StatusCode,
  7882  		},
  7883  	}
  7884  	target := &ret
  7885  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7886  		return nil, err
  7887  	}
  7888  	return ret, nil
  7889  }
  7890  
  7891  type ProjectsInstancesGetCall struct {
  7892  	s            *Service
  7893  	name         string
  7894  	urlParams_   gensupport.URLParams
  7895  	ifNoneMatch_ string
  7896  	ctx_         context.Context
  7897  	header_      http.Header
  7898  }
  7899  
  7900  // Get: Gets information about a particular instance.
  7901  //
  7902  //   - name: The name of the requested instance. Values are of the form
  7903  //     `projects//instances/`.
  7904  func (r *ProjectsInstancesService) Get(name string) *ProjectsInstancesGetCall {
  7905  	c := &ProjectsInstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7906  	c.name = name
  7907  	return c
  7908  }
  7909  
  7910  // FieldMask sets the optional parameter "fieldMask": If field_mask is present,
  7911  // specifies the subset of Instance fields that should be returned. If absent,
  7912  // all Instance fields are returned.
  7913  func (c *ProjectsInstancesGetCall) FieldMask(fieldMask string) *ProjectsInstancesGetCall {
  7914  	c.urlParams_.Set("fieldMask", fieldMask)
  7915  	return c
  7916  }
  7917  
  7918  // Fields allows partial responses to be retrieved. See
  7919  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7920  // details.
  7921  func (c *ProjectsInstancesGetCall) Fields(s ...googleapi.Field) *ProjectsInstancesGetCall {
  7922  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7923  	return c
  7924  }
  7925  
  7926  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7927  // object's ETag matches the given value. This is useful for getting updates
  7928  // only after the object has changed since the last request.
  7929  func (c *ProjectsInstancesGetCall) IfNoneMatch(entityTag string) *ProjectsInstancesGetCall {
  7930  	c.ifNoneMatch_ = entityTag
  7931  	return c
  7932  }
  7933  
  7934  // Context sets the context to be used in this call's Do method.
  7935  func (c *ProjectsInstancesGetCall) Context(ctx context.Context) *ProjectsInstancesGetCall {
  7936  	c.ctx_ = ctx
  7937  	return c
  7938  }
  7939  
  7940  // Header returns a http.Header that can be modified by the caller to add
  7941  // headers to the request.
  7942  func (c *ProjectsInstancesGetCall) Header() http.Header {
  7943  	if c.header_ == nil {
  7944  		c.header_ = make(http.Header)
  7945  	}
  7946  	return c.header_
  7947  }
  7948  
  7949  func (c *ProjectsInstancesGetCall) doRequest(alt string) (*http.Response, error) {
  7950  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7951  	if c.ifNoneMatch_ != "" {
  7952  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7953  	}
  7954  	var body io.Reader = nil
  7955  	c.urlParams_.Set("alt", alt)
  7956  	c.urlParams_.Set("prettyPrint", "false")
  7957  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  7958  	urls += "?" + c.urlParams_.Encode()
  7959  	req, err := http.NewRequest("GET", urls, body)
  7960  	if err != nil {
  7961  		return nil, err
  7962  	}
  7963  	req.Header = reqHeaders
  7964  	googleapi.Expand(req.URL, map[string]string{
  7965  		"name": c.name,
  7966  	})
  7967  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7968  }
  7969  
  7970  // Do executes the "spanner.projects.instances.get" call.
  7971  // Any non-2xx status code is an error. Response headers are in either
  7972  // *Instance.ServerResponse.Header or (if a response was returned at all) in
  7973  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7974  // whether the returned error was because http.StatusNotModified was returned.
  7975  func (c *ProjectsInstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, error) {
  7976  	gensupport.SetOptions(c.urlParams_, opts...)
  7977  	res, err := c.doRequest("json")
  7978  	if res != nil && res.StatusCode == http.StatusNotModified {
  7979  		if res.Body != nil {
  7980  			res.Body.Close()
  7981  		}
  7982  		return nil, gensupport.WrapError(&googleapi.Error{
  7983  			Code:   res.StatusCode,
  7984  			Header: res.Header,
  7985  		})
  7986  	}
  7987  	if err != nil {
  7988  		return nil, err
  7989  	}
  7990  	defer googleapi.CloseBody(res)
  7991  	if err := googleapi.CheckResponse(res); err != nil {
  7992  		return nil, gensupport.WrapError(err)
  7993  	}
  7994  	ret := &Instance{
  7995  		ServerResponse: googleapi.ServerResponse{
  7996  			Header:         res.Header,
  7997  			HTTPStatusCode: res.StatusCode,
  7998  		},
  7999  	}
  8000  	target := &ret
  8001  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8002  		return nil, err
  8003  	}
  8004  	return ret, nil
  8005  }
  8006  
  8007  type ProjectsInstancesGetIamPolicyCall struct {
  8008  	s                   *Service
  8009  	resource            string
  8010  	getiampolicyrequest *GetIamPolicyRequest
  8011  	urlParams_          gensupport.URLParams
  8012  	ctx_                context.Context
  8013  	header_             http.Header
  8014  }
  8015  
  8016  // GetIamPolicy: Gets the access control policy for an instance resource.
  8017  // Returns an empty policy if an instance exists but does not have a policy
  8018  // set. Authorization requires `spanner.instances.getIamPolicy` on resource.
  8019  //
  8020  //   - resource: REQUIRED: The Cloud Spanner resource for which the policy is
  8021  //     being retrieved. The format is `projects//instances/` for instance
  8022  //     resources and `projects//instances//databases/` for database resources.
  8023  func (r *ProjectsInstancesService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsInstancesGetIamPolicyCall {
  8024  	c := &ProjectsInstancesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8025  	c.resource = resource
  8026  	c.getiampolicyrequest = getiampolicyrequest
  8027  	return c
  8028  }
  8029  
  8030  // Fields allows partial responses to be retrieved. See
  8031  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8032  // details.
  8033  func (c *ProjectsInstancesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsInstancesGetIamPolicyCall {
  8034  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8035  	return c
  8036  }
  8037  
  8038  // Context sets the context to be used in this call's Do method.
  8039  func (c *ProjectsInstancesGetIamPolicyCall) Context(ctx context.Context) *ProjectsInstancesGetIamPolicyCall {
  8040  	c.ctx_ = ctx
  8041  	return c
  8042  }
  8043  
  8044  // Header returns a http.Header that can be modified by the caller to add
  8045  // headers to the request.
  8046  func (c *ProjectsInstancesGetIamPolicyCall) Header() http.Header {
  8047  	if c.header_ == nil {
  8048  		c.header_ = make(http.Header)
  8049  	}
  8050  	return c.header_
  8051  }
  8052  
  8053  func (c *ProjectsInstancesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  8054  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8055  	var body io.Reader = nil
  8056  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
  8057  	if err != nil {
  8058  		return nil, err
  8059  	}
  8060  	c.urlParams_.Set("alt", alt)
  8061  	c.urlParams_.Set("prettyPrint", "false")
  8062  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
  8063  	urls += "?" + c.urlParams_.Encode()
  8064  	req, err := http.NewRequest("POST", urls, body)
  8065  	if err != nil {
  8066  		return nil, err
  8067  	}
  8068  	req.Header = reqHeaders
  8069  	googleapi.Expand(req.URL, map[string]string{
  8070  		"resource": c.resource,
  8071  	})
  8072  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8073  }
  8074  
  8075  // Do executes the "spanner.projects.instances.getIamPolicy" call.
  8076  // Any non-2xx status code is an error. Response headers are in either
  8077  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  8078  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8079  // whether the returned error was because http.StatusNotModified was returned.
  8080  func (c *ProjectsInstancesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  8081  	gensupport.SetOptions(c.urlParams_, opts...)
  8082  	res, err := c.doRequest("json")
  8083  	if res != nil && res.StatusCode == http.StatusNotModified {
  8084  		if res.Body != nil {
  8085  			res.Body.Close()
  8086  		}
  8087  		return nil, gensupport.WrapError(&googleapi.Error{
  8088  			Code:   res.StatusCode,
  8089  			Header: res.Header,
  8090  		})
  8091  	}
  8092  	if err != nil {
  8093  		return nil, err
  8094  	}
  8095  	defer googleapi.CloseBody(res)
  8096  	if err := googleapi.CheckResponse(res); err != nil {
  8097  		return nil, gensupport.WrapError(err)
  8098  	}
  8099  	ret := &Policy{
  8100  		ServerResponse: googleapi.ServerResponse{
  8101  			Header:         res.Header,
  8102  			HTTPStatusCode: res.StatusCode,
  8103  		},
  8104  	}
  8105  	target := &ret
  8106  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8107  		return nil, err
  8108  	}
  8109  	return ret, nil
  8110  }
  8111  
  8112  type ProjectsInstancesListCall struct {
  8113  	s            *Service
  8114  	parent       string
  8115  	urlParams_   gensupport.URLParams
  8116  	ifNoneMatch_ string
  8117  	ctx_         context.Context
  8118  	header_      http.Header
  8119  }
  8120  
  8121  // List: Lists all instances in the given project.
  8122  //
  8123  //   - parent: The name of the project for which a list of instances is
  8124  //     requested. Values are of the form `projects/`.
  8125  func (r *ProjectsInstancesService) List(parent string) *ProjectsInstancesListCall {
  8126  	c := &ProjectsInstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8127  	c.parent = parent
  8128  	return c
  8129  }
  8130  
  8131  // Filter sets the optional parameter "filter": An expression for filtering the
  8132  // results of the request. Filter rules are case insensitive. The fields
  8133  // eligible for filtering are: * `name` * `display_name` * `labels.key` where
  8134  // key is the name of a label Some examples of using filters are: * `name:*`
  8135  // --> The instance has a name. * `name:Howl` --> The instance's name contains
  8136  // the string "howl". * `name:HOWL` --> Equivalent to above. * `NAME:howl` -->
  8137  // Equivalent to above. * `labels.env:*` --> The instance has the label "env".
  8138  // * `labels.env:dev` --> The instance has the label "env" and the value of the
  8139  // label contains the string "dev". * `name:howl labels.env:dev` --> The
  8140  // instance's name contains "howl" and it has the label "env" with its value
  8141  // containing "dev".
  8142  func (c *ProjectsInstancesListCall) Filter(filter string) *ProjectsInstancesListCall {
  8143  	c.urlParams_.Set("filter", filter)
  8144  	return c
  8145  }
  8146  
  8147  // InstanceDeadline sets the optional parameter "instanceDeadline": Deadline
  8148  // used while retrieving metadata for instances. Instances whose metadata
  8149  // cannot be retrieved within this deadline will be added to unreachable in
  8150  // ListInstancesResponse.
  8151  func (c *ProjectsInstancesListCall) InstanceDeadline(instanceDeadline string) *ProjectsInstancesListCall {
  8152  	c.urlParams_.Set("instanceDeadline", instanceDeadline)
  8153  	return c
  8154  }
  8155  
  8156  // PageSize sets the optional parameter "pageSize": Number of instances to be
  8157  // returned in the response. If 0 or less, defaults to the server's maximum
  8158  // allowed page size.
  8159  func (c *ProjectsInstancesListCall) PageSize(pageSize int64) *ProjectsInstancesListCall {
  8160  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  8161  	return c
  8162  }
  8163  
  8164  // PageToken sets the optional parameter "pageToken": If non-empty,
  8165  // `page_token` should contain a next_page_token from a previous
  8166  // ListInstancesResponse.
  8167  func (c *ProjectsInstancesListCall) PageToken(pageToken string) *ProjectsInstancesListCall {
  8168  	c.urlParams_.Set("pageToken", pageToken)
  8169  	return c
  8170  }
  8171  
  8172  // Fields allows partial responses to be retrieved. See
  8173  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8174  // details.
  8175  func (c *ProjectsInstancesListCall) Fields(s ...googleapi.Field) *ProjectsInstancesListCall {
  8176  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8177  	return c
  8178  }
  8179  
  8180  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8181  // object's ETag matches the given value. This is useful for getting updates
  8182  // only after the object has changed since the last request.
  8183  func (c *ProjectsInstancesListCall) IfNoneMatch(entityTag string) *ProjectsInstancesListCall {
  8184  	c.ifNoneMatch_ = entityTag
  8185  	return c
  8186  }
  8187  
  8188  // Context sets the context to be used in this call's Do method.
  8189  func (c *ProjectsInstancesListCall) Context(ctx context.Context) *ProjectsInstancesListCall {
  8190  	c.ctx_ = ctx
  8191  	return c
  8192  }
  8193  
  8194  // Header returns a http.Header that can be modified by the caller to add
  8195  // headers to the request.
  8196  func (c *ProjectsInstancesListCall) Header() http.Header {
  8197  	if c.header_ == nil {
  8198  		c.header_ = make(http.Header)
  8199  	}
  8200  	return c.header_
  8201  }
  8202  
  8203  func (c *ProjectsInstancesListCall) doRequest(alt string) (*http.Response, error) {
  8204  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8205  	if c.ifNoneMatch_ != "" {
  8206  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8207  	}
  8208  	var body io.Reader = nil
  8209  	c.urlParams_.Set("alt", alt)
  8210  	c.urlParams_.Set("prettyPrint", "false")
  8211  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/instances")
  8212  	urls += "?" + c.urlParams_.Encode()
  8213  	req, err := http.NewRequest("GET", urls, body)
  8214  	if err != nil {
  8215  		return nil, err
  8216  	}
  8217  	req.Header = reqHeaders
  8218  	googleapi.Expand(req.URL, map[string]string{
  8219  		"parent": c.parent,
  8220  	})
  8221  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8222  }
  8223  
  8224  // Do executes the "spanner.projects.instances.list" call.
  8225  // Any non-2xx status code is an error. Response headers are in either
  8226  // *ListInstancesResponse.ServerResponse.Header or (if a response was returned
  8227  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  8228  // check whether the returned error was because http.StatusNotModified was
  8229  // returned.
  8230  func (c *ProjectsInstancesListCall) Do(opts ...googleapi.CallOption) (*ListInstancesResponse, error) {
  8231  	gensupport.SetOptions(c.urlParams_, opts...)
  8232  	res, err := c.doRequest("json")
  8233  	if res != nil && res.StatusCode == http.StatusNotModified {
  8234  		if res.Body != nil {
  8235  			res.Body.Close()
  8236  		}
  8237  		return nil, gensupport.WrapError(&googleapi.Error{
  8238  			Code:   res.StatusCode,
  8239  			Header: res.Header,
  8240  		})
  8241  	}
  8242  	if err != nil {
  8243  		return nil, err
  8244  	}
  8245  	defer googleapi.CloseBody(res)
  8246  	if err := googleapi.CheckResponse(res); err != nil {
  8247  		return nil, gensupport.WrapError(err)
  8248  	}
  8249  	ret := &ListInstancesResponse{
  8250  		ServerResponse: googleapi.ServerResponse{
  8251  			Header:         res.Header,
  8252  			HTTPStatusCode: res.StatusCode,
  8253  		},
  8254  	}
  8255  	target := &ret
  8256  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8257  		return nil, err
  8258  	}
  8259  	return ret, nil
  8260  }
  8261  
  8262  // Pages invokes f for each page of results.
  8263  // A non-nil error returned from f will halt the iteration.
  8264  // The provided context supersedes any context provided to the Context method.
  8265  func (c *ProjectsInstancesListCall) Pages(ctx context.Context, f func(*ListInstancesResponse) error) error {
  8266  	c.ctx_ = ctx
  8267  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  8268  	for {
  8269  		x, err := c.Do()
  8270  		if err != nil {
  8271  			return err
  8272  		}
  8273  		if err := f(x); err != nil {
  8274  			return err
  8275  		}
  8276  		if x.NextPageToken == "" {
  8277  			return nil
  8278  		}
  8279  		c.PageToken(x.NextPageToken)
  8280  	}
  8281  }
  8282  
  8283  type ProjectsInstancesMoveCall struct {
  8284  	s                   *Service
  8285  	name                string
  8286  	moveinstancerequest *MoveInstanceRequest
  8287  	urlParams_          gensupport.URLParams
  8288  	ctx_                context.Context
  8289  	header_             http.Header
  8290  }
  8291  
  8292  // Move: Moves the instance to the target instance config. The returned
  8293  // long-running operation can be used to track the progress of moving the
  8294  // instance. `MoveInstance` returns `FAILED_PRECONDITION` if the instance meets
  8295  // any of the following criteria: * Has an ongoing move to a different instance
  8296  // config * Has backups * Has an ongoing update * Is under free trial *
  8297  // Contains any CMEK-enabled databases While the operation is pending: * All
  8298  // other attempts to modify the instance, including changes to its compute
  8299  // capacity, are rejected. * The following database and backup admin operations
  8300  // are rejected: * DatabaseAdmin.CreateDatabase, *
  8301  // DatabaseAdmin.UpdateDatabaseDdl (Disabled if default_leader is specified in
  8302  // the request.) * DatabaseAdmin.RestoreDatabase * DatabaseAdmin.CreateBackup *
  8303  // DatabaseAdmin.CopyBackup * Both the source and target instance configs are
  8304  // subject to hourly compute and storage charges. * The instance may experience
  8305  // higher read-write latencies and a higher transaction abort rate. However,
  8306  // moving an instance does not cause any downtime. The returned long-running
  8307  // operation will have a name of the format `/operations/` and can be used to
  8308  // track the move instance operation. The metadata field type is
  8309  // MoveInstanceMetadata. The response field type is Instance, if successful.
  8310  // Cancelling the operation sets its metadata's cancel_time. Cancellation is
  8311  // not immediate since it involves moving any data previously moved to target
  8312  // instance config back to the original instance config. The same operation can
  8313  // be used to track the progress of the cancellation. Upon successful
  8314  // completion of the cancellation, the operation terminates with CANCELLED
  8315  // status. Upon completion(if not cancelled) of the returned operation: *
  8316  // Instance would be successfully moved to the target instance config. * You
  8317  // are billed for compute and storage in target instance config. Authorization
  8318  // requires `spanner.instances.update` permission on the resource instance. For
  8319  // more details, please see documentation
  8320  // (https://cloud.google.com/spanner/docs/move-instance).
  8321  //
  8322  // - name: The instance to move. Values are of the form `projects//instances/`.
  8323  func (r *ProjectsInstancesService) Move(name string, moveinstancerequest *MoveInstanceRequest) *ProjectsInstancesMoveCall {
  8324  	c := &ProjectsInstancesMoveCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8325  	c.name = name
  8326  	c.moveinstancerequest = moveinstancerequest
  8327  	return c
  8328  }
  8329  
  8330  // Fields allows partial responses to be retrieved. See
  8331  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8332  // details.
  8333  func (c *ProjectsInstancesMoveCall) Fields(s ...googleapi.Field) *ProjectsInstancesMoveCall {
  8334  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8335  	return c
  8336  }
  8337  
  8338  // Context sets the context to be used in this call's Do method.
  8339  func (c *ProjectsInstancesMoveCall) Context(ctx context.Context) *ProjectsInstancesMoveCall {
  8340  	c.ctx_ = ctx
  8341  	return c
  8342  }
  8343  
  8344  // Header returns a http.Header that can be modified by the caller to add
  8345  // headers to the request.
  8346  func (c *ProjectsInstancesMoveCall) Header() http.Header {
  8347  	if c.header_ == nil {
  8348  		c.header_ = make(http.Header)
  8349  	}
  8350  	return c.header_
  8351  }
  8352  
  8353  func (c *ProjectsInstancesMoveCall) doRequest(alt string) (*http.Response, error) {
  8354  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8355  	var body io.Reader = nil
  8356  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.moveinstancerequest)
  8357  	if err != nil {
  8358  		return nil, err
  8359  	}
  8360  	c.urlParams_.Set("alt", alt)
  8361  	c.urlParams_.Set("prettyPrint", "false")
  8362  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:move")
  8363  	urls += "?" + c.urlParams_.Encode()
  8364  	req, err := http.NewRequest("POST", urls, body)
  8365  	if err != nil {
  8366  		return nil, err
  8367  	}
  8368  	req.Header = reqHeaders
  8369  	googleapi.Expand(req.URL, map[string]string{
  8370  		"name": c.name,
  8371  	})
  8372  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8373  }
  8374  
  8375  // Do executes the "spanner.projects.instances.move" call.
  8376  // Any non-2xx status code is an error. Response headers are in either
  8377  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  8378  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8379  // whether the returned error was because http.StatusNotModified was returned.
  8380  func (c *ProjectsInstancesMoveCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  8381  	gensupport.SetOptions(c.urlParams_, opts...)
  8382  	res, err := c.doRequest("json")
  8383  	if res != nil && res.StatusCode == http.StatusNotModified {
  8384  		if res.Body != nil {
  8385  			res.Body.Close()
  8386  		}
  8387  		return nil, gensupport.WrapError(&googleapi.Error{
  8388  			Code:   res.StatusCode,
  8389  			Header: res.Header,
  8390  		})
  8391  	}
  8392  	if err != nil {
  8393  		return nil, err
  8394  	}
  8395  	defer googleapi.CloseBody(res)
  8396  	if err := googleapi.CheckResponse(res); err != nil {
  8397  		return nil, gensupport.WrapError(err)
  8398  	}
  8399  	ret := &Operation{
  8400  		ServerResponse: googleapi.ServerResponse{
  8401  			Header:         res.Header,
  8402  			HTTPStatusCode: res.StatusCode,
  8403  		},
  8404  	}
  8405  	target := &ret
  8406  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8407  		return nil, err
  8408  	}
  8409  	return ret, nil
  8410  }
  8411  
  8412  type ProjectsInstancesPatchCall struct {
  8413  	s                     *Service
  8414  	nameid                string
  8415  	updateinstancerequest *UpdateInstanceRequest
  8416  	urlParams_            gensupport.URLParams
  8417  	ctx_                  context.Context
  8418  	header_               http.Header
  8419  }
  8420  
  8421  // Patch: Updates an instance, and begins allocating or releasing resources as
  8422  // requested. The returned long-running operation can be used to track the
  8423  // progress of updating the instance. If the named instance does not exist,
  8424  // returns `NOT_FOUND`. Immediately upon completion of this request: * For
  8425  // resource types for which a decrease in the instance's allocation has been
  8426  // requested, billing is based on the newly-requested level. Until completion
  8427  // of the returned operation: * Cancelling the operation sets its metadata's
  8428  // cancel_time, and begins restoring resources to their pre-request values. The
  8429  // operation is guaranteed to succeed at undoing all resource changes, after
  8430  // which point it terminates with a `CANCELLED` status. * All other attempts to
  8431  // modify the instance are rejected. * Reading the instance via the API
  8432  // continues to give the pre-request resource levels. Upon completion of the
  8433  // returned operation: * Billing begins for all successfully-allocated
  8434  // resources (some types may have lower than the requested levels). * All
  8435  // newly-reserved resources are available for serving the instance's tables. *
  8436  // The instance's new resource levels are readable via the API. The returned
  8437  // long-running operation will have a name of the format `/operations/` and can
  8438  // be used to track the instance modification. The metadata field type is
  8439  // UpdateInstanceMetadata. The response field type is Instance, if successful.
  8440  // Authorization requires `spanner.instances.update` permission on the resource
  8441  // name.
  8442  //
  8443  //   - name: A unique identifier for the instance, which cannot be changed after
  8444  //     the instance is created. Values are of the form
  8445  //     `projects//instances/a-z*[a-z0-9]`. The final segment of the name must be
  8446  //     between 2 and 64 characters in length.
  8447  func (r *ProjectsInstancesService) Patch(nameid string, updateinstancerequest *UpdateInstanceRequest) *ProjectsInstancesPatchCall {
  8448  	c := &ProjectsInstancesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8449  	c.nameid = nameid
  8450  	c.updateinstancerequest = updateinstancerequest
  8451  	return c
  8452  }
  8453  
  8454  // Fields allows partial responses to be retrieved. See
  8455  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8456  // details.
  8457  func (c *ProjectsInstancesPatchCall) Fields(s ...googleapi.Field) *ProjectsInstancesPatchCall {
  8458  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8459  	return c
  8460  }
  8461  
  8462  // Context sets the context to be used in this call's Do method.
  8463  func (c *ProjectsInstancesPatchCall) Context(ctx context.Context) *ProjectsInstancesPatchCall {
  8464  	c.ctx_ = ctx
  8465  	return c
  8466  }
  8467  
  8468  // Header returns a http.Header that can be modified by the caller to add
  8469  // headers to the request.
  8470  func (c *ProjectsInstancesPatchCall) Header() http.Header {
  8471  	if c.header_ == nil {
  8472  		c.header_ = make(http.Header)
  8473  	}
  8474  	return c.header_
  8475  }
  8476  
  8477  func (c *ProjectsInstancesPatchCall) doRequest(alt string) (*http.Response, error) {
  8478  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8479  	var body io.Reader = nil
  8480  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.updateinstancerequest)
  8481  	if err != nil {
  8482  		return nil, err
  8483  	}
  8484  	c.urlParams_.Set("alt", alt)
  8485  	c.urlParams_.Set("prettyPrint", "false")
  8486  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  8487  	urls += "?" + c.urlParams_.Encode()
  8488  	req, err := http.NewRequest("PATCH", urls, body)
  8489  	if err != nil {
  8490  		return nil, err
  8491  	}
  8492  	req.Header = reqHeaders
  8493  	googleapi.Expand(req.URL, map[string]string{
  8494  		"name": c.nameid,
  8495  	})
  8496  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8497  }
  8498  
  8499  // Do executes the "spanner.projects.instances.patch" call.
  8500  // Any non-2xx status code is an error. Response headers are in either
  8501  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  8502  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8503  // whether the returned error was because http.StatusNotModified was returned.
  8504  func (c *ProjectsInstancesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  8505  	gensupport.SetOptions(c.urlParams_, opts...)
  8506  	res, err := c.doRequest("json")
  8507  	if res != nil && res.StatusCode == http.StatusNotModified {
  8508  		if res.Body != nil {
  8509  			res.Body.Close()
  8510  		}
  8511  		return nil, gensupport.WrapError(&googleapi.Error{
  8512  			Code:   res.StatusCode,
  8513  			Header: res.Header,
  8514  		})
  8515  	}
  8516  	if err != nil {
  8517  		return nil, err
  8518  	}
  8519  	defer googleapi.CloseBody(res)
  8520  	if err := googleapi.CheckResponse(res); err != nil {
  8521  		return nil, gensupport.WrapError(err)
  8522  	}
  8523  	ret := &Operation{
  8524  		ServerResponse: googleapi.ServerResponse{
  8525  			Header:         res.Header,
  8526  			HTTPStatusCode: res.StatusCode,
  8527  		},
  8528  	}
  8529  	target := &ret
  8530  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8531  		return nil, err
  8532  	}
  8533  	return ret, nil
  8534  }
  8535  
  8536  type ProjectsInstancesSetIamPolicyCall struct {
  8537  	s                   *Service
  8538  	resource            string
  8539  	setiampolicyrequest *SetIamPolicyRequest
  8540  	urlParams_          gensupport.URLParams
  8541  	ctx_                context.Context
  8542  	header_             http.Header
  8543  }
  8544  
  8545  // SetIamPolicy: Sets the access control policy on an instance resource.
  8546  // Replaces any existing policy. Authorization requires
  8547  // `spanner.instances.setIamPolicy` on resource.
  8548  //
  8549  //   - resource: REQUIRED: The Cloud Spanner resource for which the policy is
  8550  //     being set. The format is `projects//instances/` for instance resources and
  8551  //     `projects//instances//databases/` for databases resources.
  8552  func (r *ProjectsInstancesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsInstancesSetIamPolicyCall {
  8553  	c := &ProjectsInstancesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8554  	c.resource = resource
  8555  	c.setiampolicyrequest = setiampolicyrequest
  8556  	return c
  8557  }
  8558  
  8559  // Fields allows partial responses to be retrieved. See
  8560  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8561  // details.
  8562  func (c *ProjectsInstancesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsInstancesSetIamPolicyCall {
  8563  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8564  	return c
  8565  }
  8566  
  8567  // Context sets the context to be used in this call's Do method.
  8568  func (c *ProjectsInstancesSetIamPolicyCall) Context(ctx context.Context) *ProjectsInstancesSetIamPolicyCall {
  8569  	c.ctx_ = ctx
  8570  	return c
  8571  }
  8572  
  8573  // Header returns a http.Header that can be modified by the caller to add
  8574  // headers to the request.
  8575  func (c *ProjectsInstancesSetIamPolicyCall) Header() http.Header {
  8576  	if c.header_ == nil {
  8577  		c.header_ = make(http.Header)
  8578  	}
  8579  	return c.header_
  8580  }
  8581  
  8582  func (c *ProjectsInstancesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  8583  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8584  	var body io.Reader = nil
  8585  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  8586  	if err != nil {
  8587  		return nil, err
  8588  	}
  8589  	c.urlParams_.Set("alt", alt)
  8590  	c.urlParams_.Set("prettyPrint", "false")
  8591  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
  8592  	urls += "?" + c.urlParams_.Encode()
  8593  	req, err := http.NewRequest("POST", urls, body)
  8594  	if err != nil {
  8595  		return nil, err
  8596  	}
  8597  	req.Header = reqHeaders
  8598  	googleapi.Expand(req.URL, map[string]string{
  8599  		"resource": c.resource,
  8600  	})
  8601  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8602  }
  8603  
  8604  // Do executes the "spanner.projects.instances.setIamPolicy" call.
  8605  // Any non-2xx status code is an error. Response headers are in either
  8606  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  8607  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8608  // whether the returned error was because http.StatusNotModified was returned.
  8609  func (c *ProjectsInstancesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  8610  	gensupport.SetOptions(c.urlParams_, opts...)
  8611  	res, err := c.doRequest("json")
  8612  	if res != nil && res.StatusCode == http.StatusNotModified {
  8613  		if res.Body != nil {
  8614  			res.Body.Close()
  8615  		}
  8616  		return nil, gensupport.WrapError(&googleapi.Error{
  8617  			Code:   res.StatusCode,
  8618  			Header: res.Header,
  8619  		})
  8620  	}
  8621  	if err != nil {
  8622  		return nil, err
  8623  	}
  8624  	defer googleapi.CloseBody(res)
  8625  	if err := googleapi.CheckResponse(res); err != nil {
  8626  		return nil, gensupport.WrapError(err)
  8627  	}
  8628  	ret := &Policy{
  8629  		ServerResponse: googleapi.ServerResponse{
  8630  			Header:         res.Header,
  8631  			HTTPStatusCode: res.StatusCode,
  8632  		},
  8633  	}
  8634  	target := &ret
  8635  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8636  		return nil, err
  8637  	}
  8638  	return ret, nil
  8639  }
  8640  
  8641  type ProjectsInstancesTestIamPermissionsCall struct {
  8642  	s                         *Service
  8643  	resource                  string
  8644  	testiampermissionsrequest *TestIamPermissionsRequest
  8645  	urlParams_                gensupport.URLParams
  8646  	ctx_                      context.Context
  8647  	header_                   http.Header
  8648  }
  8649  
  8650  // TestIamPermissions: Returns permissions that the caller has on the specified
  8651  // instance resource. Attempting this RPC on a non-existent Cloud Spanner
  8652  // instance resource will result in a NOT_FOUND error if the user has
  8653  // `spanner.instances.list` permission on the containing Google Cloud Project.
  8654  // Otherwise returns an empty set of permissions.
  8655  //
  8656  //   - resource: REQUIRED: The Cloud Spanner resource for which permissions are
  8657  //     being tested. The format is `projects//instances/` for instance resources
  8658  //     and `projects//instances//databases/` for database resources.
  8659  func (r *ProjectsInstancesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsInstancesTestIamPermissionsCall {
  8660  	c := &ProjectsInstancesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8661  	c.resource = resource
  8662  	c.testiampermissionsrequest = testiampermissionsrequest
  8663  	return c
  8664  }
  8665  
  8666  // Fields allows partial responses to be retrieved. See
  8667  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8668  // details.
  8669  func (c *ProjectsInstancesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsInstancesTestIamPermissionsCall {
  8670  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8671  	return c
  8672  }
  8673  
  8674  // Context sets the context to be used in this call's Do method.
  8675  func (c *ProjectsInstancesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsInstancesTestIamPermissionsCall {
  8676  	c.ctx_ = ctx
  8677  	return c
  8678  }
  8679  
  8680  // Header returns a http.Header that can be modified by the caller to add
  8681  // headers to the request.
  8682  func (c *ProjectsInstancesTestIamPermissionsCall) Header() http.Header {
  8683  	if c.header_ == nil {
  8684  		c.header_ = make(http.Header)
  8685  	}
  8686  	return c.header_
  8687  }
  8688  
  8689  func (c *ProjectsInstancesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  8690  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8691  	var body io.Reader = nil
  8692  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  8693  	if err != nil {
  8694  		return nil, err
  8695  	}
  8696  	c.urlParams_.Set("alt", alt)
  8697  	c.urlParams_.Set("prettyPrint", "false")
  8698  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
  8699  	urls += "?" + c.urlParams_.Encode()
  8700  	req, err := http.NewRequest("POST", urls, body)
  8701  	if err != nil {
  8702  		return nil, err
  8703  	}
  8704  	req.Header = reqHeaders
  8705  	googleapi.Expand(req.URL, map[string]string{
  8706  		"resource": c.resource,
  8707  	})
  8708  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8709  }
  8710  
  8711  // Do executes the "spanner.projects.instances.testIamPermissions" call.
  8712  // Any non-2xx status code is an error. Response headers are in either
  8713  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
  8714  // returned at all) in error.(*googleapi.Error).Header. Use
  8715  // googleapi.IsNotModified to check whether the returned error was because
  8716  // http.StatusNotModified was returned.
  8717  func (c *ProjectsInstancesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  8718  	gensupport.SetOptions(c.urlParams_, opts...)
  8719  	res, err := c.doRequest("json")
  8720  	if res != nil && res.StatusCode == http.StatusNotModified {
  8721  		if res.Body != nil {
  8722  			res.Body.Close()
  8723  		}
  8724  		return nil, gensupport.WrapError(&googleapi.Error{
  8725  			Code:   res.StatusCode,
  8726  			Header: res.Header,
  8727  		})
  8728  	}
  8729  	if err != nil {
  8730  		return nil, err
  8731  	}
  8732  	defer googleapi.CloseBody(res)
  8733  	if err := googleapi.CheckResponse(res); err != nil {
  8734  		return nil, gensupport.WrapError(err)
  8735  	}
  8736  	ret := &TestIamPermissionsResponse{
  8737  		ServerResponse: googleapi.ServerResponse{
  8738  			Header:         res.Header,
  8739  			HTTPStatusCode: res.StatusCode,
  8740  		},
  8741  	}
  8742  	target := &ret
  8743  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8744  		return nil, err
  8745  	}
  8746  	return ret, nil
  8747  }
  8748  
  8749  type ProjectsInstancesBackupOperationsListCall struct {
  8750  	s            *Service
  8751  	parent       string
  8752  	urlParams_   gensupport.URLParams
  8753  	ifNoneMatch_ string
  8754  	ctx_         context.Context
  8755  	header_      http.Header
  8756  }
  8757  
  8758  // List: Lists the backup long-running operations in the given instance. A
  8759  // backup operation has a name of the form
  8760  // `projects//instances//backups//operations/`. The long-running operation
  8761  // metadata field type `metadata.type_url` describes the type of the metadata.
  8762  // Operations returned include those that have completed/failed/canceled within
  8763  // the last 7 days, and pending operations. Operations returned are ordered by
  8764  // `operation.metadata.value.progress.start_time` in descending order starting
  8765  // from the most recently started operation.
  8766  //
  8767  //   - parent: The instance of the backup operations. Values are of the form
  8768  //     `projects//instances/`.
  8769  func (r *ProjectsInstancesBackupOperationsService) List(parent string) *ProjectsInstancesBackupOperationsListCall {
  8770  	c := &ProjectsInstancesBackupOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8771  	c.parent = parent
  8772  	return c
  8773  }
  8774  
  8775  // Filter sets the optional parameter "filter": An expression that filters the
  8776  // list of returned backup operations. A filter expression consists of a field
  8777  // name, a comparison operator, and a value for filtering. The value must be a
  8778  // string, a number, or a boolean. The comparison operator must be one of: `<`,
  8779  // `>`, `<=`, `>=`, `!=`, `=`, or `:`. Colon `:` is the contains operator.
  8780  // Filter rules are not case sensitive. The following fields in the operation
  8781  // are eligible for filtering: * `name` - The name of the long-running
  8782  // operation * `done` - False if the operation is in progress, else true. *
  8783  // `metadata.@type` - the type of metadata. For example, the type string for
  8784  // CreateBackupMetadata is
  8785  // `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`.
  8786  // * `metadata.` - any field in metadata.value. `metadata.@type` must be
  8787  // specified first if filtering on metadata fields. * `error` - Error
  8788  // associated with the long-running operation. * `response.@type` - the type of
  8789  // response. * `response.` - any field in response.value. You can combine
  8790  // multiple expressions by enclosing each expression in parentheses. By
  8791  // default, expressions are combined with AND logic, but you can specify AND,
  8792  // OR, and NOT logic explicitly. Here are a few examples: * `done:true` - The
  8793  // operation is complete. *
  8794  // `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateB
  8795  // ackupMetadata) AND` \ `metadata.database:prod` - Returns operations where: *
  8796  // The operation's metadata type is CreateBackupMetadata. * The source database
  8797  // name of backup contains the string "prod". *
  8798  // `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateB
  8799  // ackupMetadata) AND` \ `(metadata.name:howl) AND` \
  8800  // `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \
  8801  // `(error:*)` - Returns operations where: * The operation's metadata type is
  8802  // CreateBackupMetadata. * The backup name contains the string "howl". * The
  8803  // operation started before 2018-03-28T14:50:00Z. * The operation resulted in
  8804  // an error. *
  8805  // `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBac
  8806  // kupMetadata) AND` \ `(metadata.source_backup:test) AND` \
  8807  // `(metadata.progress.start_time < \"2022-01-18T14:50:00Z\") AND` \
  8808  // `(error:*)` - Returns operations where: * The operation's metadata type is
  8809  // CopyBackupMetadata. * The source backup name contains the string "test". *
  8810  // The operation started before 2022-01-18T14:50:00Z. * The operation resulted
  8811  // in an error. *
  8812  // `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.Create
  8813  // BackupMetadata) AND` \ `(metadata.database:test_db)) OR` \
  8814  // `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBa
  8815  // ckupMetadata) AND` \ `(metadata.source_backup:test_bkp)) AND` \ `(error:*)`
  8816  // - Returns operations where: * The operation's metadata matches either of
  8817  // criteria: * The operation's metadata type is CreateBackupMetadata AND the
  8818  // source database name of the backup contains the string "test_db" * The
  8819  // operation's metadata type is CopyBackupMetadata AND the source backup name
  8820  // contains the string "test_bkp" * The operation resulted in an error.
  8821  func (c *ProjectsInstancesBackupOperationsListCall) Filter(filter string) *ProjectsInstancesBackupOperationsListCall {
  8822  	c.urlParams_.Set("filter", filter)
  8823  	return c
  8824  }
  8825  
  8826  // PageSize sets the optional parameter "pageSize": Number of operations to be
  8827  // returned in the response. If 0 or less, defaults to the server's maximum
  8828  // allowed page size.
  8829  func (c *ProjectsInstancesBackupOperationsListCall) PageSize(pageSize int64) *ProjectsInstancesBackupOperationsListCall {
  8830  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  8831  	return c
  8832  }
  8833  
  8834  // PageToken sets the optional parameter "pageToken": If non-empty,
  8835  // `page_token` should contain a next_page_token from a previous
  8836  // ListBackupOperationsResponse to the same `parent` and with the same
  8837  // `filter`.
  8838  func (c *ProjectsInstancesBackupOperationsListCall) PageToken(pageToken string) *ProjectsInstancesBackupOperationsListCall {
  8839  	c.urlParams_.Set("pageToken", pageToken)
  8840  	return c
  8841  }
  8842  
  8843  // Fields allows partial responses to be retrieved. See
  8844  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8845  // details.
  8846  func (c *ProjectsInstancesBackupOperationsListCall) Fields(s ...googleapi.Field) *ProjectsInstancesBackupOperationsListCall {
  8847  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8848  	return c
  8849  }
  8850  
  8851  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8852  // object's ETag matches the given value. This is useful for getting updates
  8853  // only after the object has changed since the last request.
  8854  func (c *ProjectsInstancesBackupOperationsListCall) IfNoneMatch(entityTag string) *ProjectsInstancesBackupOperationsListCall {
  8855  	c.ifNoneMatch_ = entityTag
  8856  	return c
  8857  }
  8858  
  8859  // Context sets the context to be used in this call's Do method.
  8860  func (c *ProjectsInstancesBackupOperationsListCall) Context(ctx context.Context) *ProjectsInstancesBackupOperationsListCall {
  8861  	c.ctx_ = ctx
  8862  	return c
  8863  }
  8864  
  8865  // Header returns a http.Header that can be modified by the caller to add
  8866  // headers to the request.
  8867  func (c *ProjectsInstancesBackupOperationsListCall) Header() http.Header {
  8868  	if c.header_ == nil {
  8869  		c.header_ = make(http.Header)
  8870  	}
  8871  	return c.header_
  8872  }
  8873  
  8874  func (c *ProjectsInstancesBackupOperationsListCall) doRequest(alt string) (*http.Response, error) {
  8875  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8876  	if c.ifNoneMatch_ != "" {
  8877  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8878  	}
  8879  	var body io.Reader = nil
  8880  	c.urlParams_.Set("alt", alt)
  8881  	c.urlParams_.Set("prettyPrint", "false")
  8882  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/backupOperations")
  8883  	urls += "?" + c.urlParams_.Encode()
  8884  	req, err := http.NewRequest("GET", urls, body)
  8885  	if err != nil {
  8886  		return nil, err
  8887  	}
  8888  	req.Header = reqHeaders
  8889  	googleapi.Expand(req.URL, map[string]string{
  8890  		"parent": c.parent,
  8891  	})
  8892  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8893  }
  8894  
  8895  // Do executes the "spanner.projects.instances.backupOperations.list" call.
  8896  // Any non-2xx status code is an error. Response headers are in either
  8897  // *ListBackupOperationsResponse.ServerResponse.Header or (if a response was
  8898  // returned at all) in error.(*googleapi.Error).Header. Use
  8899  // googleapi.IsNotModified to check whether the returned error was because
  8900  // http.StatusNotModified was returned.
  8901  func (c *ProjectsInstancesBackupOperationsListCall) Do(opts ...googleapi.CallOption) (*ListBackupOperationsResponse, error) {
  8902  	gensupport.SetOptions(c.urlParams_, opts...)
  8903  	res, err := c.doRequest("json")
  8904  	if res != nil && res.StatusCode == http.StatusNotModified {
  8905  		if res.Body != nil {
  8906  			res.Body.Close()
  8907  		}
  8908  		return nil, gensupport.WrapError(&googleapi.Error{
  8909  			Code:   res.StatusCode,
  8910  			Header: res.Header,
  8911  		})
  8912  	}
  8913  	if err != nil {
  8914  		return nil, err
  8915  	}
  8916  	defer googleapi.CloseBody(res)
  8917  	if err := googleapi.CheckResponse(res); err != nil {
  8918  		return nil, gensupport.WrapError(err)
  8919  	}
  8920  	ret := &ListBackupOperationsResponse{
  8921  		ServerResponse: googleapi.ServerResponse{
  8922  			Header:         res.Header,
  8923  			HTTPStatusCode: res.StatusCode,
  8924  		},
  8925  	}
  8926  	target := &ret
  8927  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8928  		return nil, err
  8929  	}
  8930  	return ret, nil
  8931  }
  8932  
  8933  // Pages invokes f for each page of results.
  8934  // A non-nil error returned from f will halt the iteration.
  8935  // The provided context supersedes any context provided to the Context method.
  8936  func (c *ProjectsInstancesBackupOperationsListCall) Pages(ctx context.Context, f func(*ListBackupOperationsResponse) error) error {
  8937  	c.ctx_ = ctx
  8938  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  8939  	for {
  8940  		x, err := c.Do()
  8941  		if err != nil {
  8942  			return err
  8943  		}
  8944  		if err := f(x); err != nil {
  8945  			return err
  8946  		}
  8947  		if x.NextPageToken == "" {
  8948  			return nil
  8949  		}
  8950  		c.PageToken(x.NextPageToken)
  8951  	}
  8952  }
  8953  
  8954  type ProjectsInstancesBackupsCopyCall struct {
  8955  	s                 *Service
  8956  	parent            string
  8957  	copybackuprequest *CopyBackupRequest
  8958  	urlParams_        gensupport.URLParams
  8959  	ctx_              context.Context
  8960  	header_           http.Header
  8961  }
  8962  
  8963  // Copy: Starts copying a Cloud Spanner Backup. The returned backup
  8964  // long-running operation will have a name of the format
  8965  // `projects//instances//backups//operations/` and can be used to track copying
  8966  // of the backup. The operation is associated with the destination backup. The
  8967  // metadata field type is CopyBackupMetadata. The response field type is
  8968  // Backup, if successful. Cancelling the returned operation will stop the
  8969  // copying and delete the destination backup. Concurrent CopyBackup requests
  8970  // can run on the same source backup.
  8971  //
  8972  //   - parent: The name of the destination instance that will contain the backup
  8973  //     copy. Values are of the form: `projects//instances/`.
  8974  func (r *ProjectsInstancesBackupsService) Copy(parent string, copybackuprequest *CopyBackupRequest) *ProjectsInstancesBackupsCopyCall {
  8975  	c := &ProjectsInstancesBackupsCopyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8976  	c.parent = parent
  8977  	c.copybackuprequest = copybackuprequest
  8978  	return c
  8979  }
  8980  
  8981  // Fields allows partial responses to be retrieved. See
  8982  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8983  // details.
  8984  func (c *ProjectsInstancesBackupsCopyCall) Fields(s ...googleapi.Field) *ProjectsInstancesBackupsCopyCall {
  8985  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8986  	return c
  8987  }
  8988  
  8989  // Context sets the context to be used in this call's Do method.
  8990  func (c *ProjectsInstancesBackupsCopyCall) Context(ctx context.Context) *ProjectsInstancesBackupsCopyCall {
  8991  	c.ctx_ = ctx
  8992  	return c
  8993  }
  8994  
  8995  // Header returns a http.Header that can be modified by the caller to add
  8996  // headers to the request.
  8997  func (c *ProjectsInstancesBackupsCopyCall) Header() http.Header {
  8998  	if c.header_ == nil {
  8999  		c.header_ = make(http.Header)
  9000  	}
  9001  	return c.header_
  9002  }
  9003  
  9004  func (c *ProjectsInstancesBackupsCopyCall) doRequest(alt string) (*http.Response, error) {
  9005  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9006  	var body io.Reader = nil
  9007  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.copybackuprequest)
  9008  	if err != nil {
  9009  		return nil, err
  9010  	}
  9011  	c.urlParams_.Set("alt", alt)
  9012  	c.urlParams_.Set("prettyPrint", "false")
  9013  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/backups:copy")
  9014  	urls += "?" + c.urlParams_.Encode()
  9015  	req, err := http.NewRequest("POST", urls, body)
  9016  	if err != nil {
  9017  		return nil, err
  9018  	}
  9019  	req.Header = reqHeaders
  9020  	googleapi.Expand(req.URL, map[string]string{
  9021  		"parent": c.parent,
  9022  	})
  9023  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9024  }
  9025  
  9026  // Do executes the "spanner.projects.instances.backups.copy" call.
  9027  // Any non-2xx status code is an error. Response headers are in either
  9028  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  9029  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9030  // whether the returned error was because http.StatusNotModified was returned.
  9031  func (c *ProjectsInstancesBackupsCopyCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  9032  	gensupport.SetOptions(c.urlParams_, opts...)
  9033  	res, err := c.doRequest("json")
  9034  	if res != nil && res.StatusCode == http.StatusNotModified {
  9035  		if res.Body != nil {
  9036  			res.Body.Close()
  9037  		}
  9038  		return nil, gensupport.WrapError(&googleapi.Error{
  9039  			Code:   res.StatusCode,
  9040  			Header: res.Header,
  9041  		})
  9042  	}
  9043  	if err != nil {
  9044  		return nil, err
  9045  	}
  9046  	defer googleapi.CloseBody(res)
  9047  	if err := googleapi.CheckResponse(res); err != nil {
  9048  		return nil, gensupport.WrapError(err)
  9049  	}
  9050  	ret := &Operation{
  9051  		ServerResponse: googleapi.ServerResponse{
  9052  			Header:         res.Header,
  9053  			HTTPStatusCode: res.StatusCode,
  9054  		},
  9055  	}
  9056  	target := &ret
  9057  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9058  		return nil, err
  9059  	}
  9060  	return ret, nil
  9061  }
  9062  
  9063  type ProjectsInstancesBackupsCreateCall struct {
  9064  	s          *Service
  9065  	parent     string
  9066  	backup     *Backup
  9067  	urlParams_ gensupport.URLParams
  9068  	ctx_       context.Context
  9069  	header_    http.Header
  9070  }
  9071  
  9072  // Create: Starts creating a new Cloud Spanner Backup. The returned backup
  9073  // long-running operation will have a name of the format
  9074  // `projects//instances//backups//operations/` and can be used to track
  9075  // creation of the backup. The metadata field type is CreateBackupMetadata. The
  9076  // response field type is Backup, if successful. Cancelling the returned
  9077  // operation will stop the creation and delete the backup. There can be only
  9078  // one pending backup creation per database. Backup creation of different
  9079  // databases can run concurrently.
  9080  //
  9081  //   - parent: The name of the instance in which the backup will be created. This
  9082  //     must be the same instance that contains the database the backup will be
  9083  //     created from. The backup will be stored in the location(s) specified in
  9084  //     the instance configuration of this instance. Values are of the form
  9085  //     `projects//instances/`.
  9086  func (r *ProjectsInstancesBackupsService) Create(parent string, backup *Backup) *ProjectsInstancesBackupsCreateCall {
  9087  	c := &ProjectsInstancesBackupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9088  	c.parent = parent
  9089  	c.backup = backup
  9090  	return c
  9091  }
  9092  
  9093  // BackupId sets the optional parameter "backupId": Required. The id of the
  9094  // backup to be created. The `backup_id` appended to `parent` forms the full
  9095  // backup name of the form `projects//instances//backups/`.
  9096  func (c *ProjectsInstancesBackupsCreateCall) BackupId(backupId string) *ProjectsInstancesBackupsCreateCall {
  9097  	c.urlParams_.Set("backupId", backupId)
  9098  	return c
  9099  }
  9100  
  9101  // EncryptionConfigEncryptionType sets the optional parameter
  9102  // "encryptionConfig.encryptionType": Required. The encryption type of the
  9103  // backup.
  9104  //
  9105  // Possible values:
  9106  //
  9107  //	"ENCRYPTION_TYPE_UNSPECIFIED" - Unspecified. Do not use.
  9108  //	"USE_DATABASE_ENCRYPTION" - Use the same encryption configuration as the
  9109  //
  9110  // database. This is the default option when encryption_config is empty. For
  9111  // example, if the database is using `Customer_Managed_Encryption`, the backup
  9112  // will be using the same Cloud KMS key as the database.
  9113  //
  9114  //	"GOOGLE_DEFAULT_ENCRYPTION" - Use Google default encryption.
  9115  //	"CUSTOMER_MANAGED_ENCRYPTION" - Use customer managed encryption. If
  9116  //
  9117  // specified, `kms_key_name` must contain a valid Cloud KMS key.
  9118  func (c *ProjectsInstancesBackupsCreateCall) EncryptionConfigEncryptionType(encryptionConfigEncryptionType string) *ProjectsInstancesBackupsCreateCall {
  9119  	c.urlParams_.Set("encryptionConfig.encryptionType", encryptionConfigEncryptionType)
  9120  	return c
  9121  }
  9122  
  9123  // EncryptionConfigKmsKeyName sets the optional parameter
  9124  // "encryptionConfig.kmsKeyName": The Cloud KMS key that will be used to
  9125  // protect the backup. This field should be set only when encryption_type is
  9126  // `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form
  9127  // `projects//locations//keyRings//cryptoKeys/`.
  9128  func (c *ProjectsInstancesBackupsCreateCall) EncryptionConfigKmsKeyName(encryptionConfigKmsKeyName string) *ProjectsInstancesBackupsCreateCall {
  9129  	c.urlParams_.Set("encryptionConfig.kmsKeyName", encryptionConfigKmsKeyName)
  9130  	return c
  9131  }
  9132  
  9133  // EncryptionConfigKmsKeyNames sets the optional parameter
  9134  // "encryptionConfig.kmsKeyNames": Specifies the KMS configuration for the one
  9135  // or more keys used to protect the backup. Values are of the form
  9136  // `projects//locations//keyRings//cryptoKeys/`. The keys referenced by
  9137  // kms_key_names must fully cover all regions of the backup's instance
  9138  // configuration. Some examples: * For single region instance configs, specify
  9139  // a single regional location KMS key. * For multi-regional instance configs of
  9140  // type GOOGLE_MANAGED, either specify a multi-regional location KMS key or
  9141  // multiple regional location KMS keys that cover all regions in the instance
  9142  // config. * For an instance config of type USER_MANAGED, please specify only
  9143  // regional location KMS keys to cover each region in the instance config.
  9144  // Multi-regional location KMS keys are not supported for USER_MANAGED instance
  9145  // configs.
  9146  func (c *ProjectsInstancesBackupsCreateCall) EncryptionConfigKmsKeyNames(encryptionConfigKmsKeyNames ...string) *ProjectsInstancesBackupsCreateCall {
  9147  	c.urlParams_.SetMulti("encryptionConfig.kmsKeyNames", append([]string{}, encryptionConfigKmsKeyNames...))
  9148  	return c
  9149  }
  9150  
  9151  // Fields allows partial responses to be retrieved. See
  9152  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9153  // details.
  9154  func (c *ProjectsInstancesBackupsCreateCall) Fields(s ...googleapi.Field) *ProjectsInstancesBackupsCreateCall {
  9155  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9156  	return c
  9157  }
  9158  
  9159  // Context sets the context to be used in this call's Do method.
  9160  func (c *ProjectsInstancesBackupsCreateCall) Context(ctx context.Context) *ProjectsInstancesBackupsCreateCall {
  9161  	c.ctx_ = ctx
  9162  	return c
  9163  }
  9164  
  9165  // Header returns a http.Header that can be modified by the caller to add
  9166  // headers to the request.
  9167  func (c *ProjectsInstancesBackupsCreateCall) Header() http.Header {
  9168  	if c.header_ == nil {
  9169  		c.header_ = make(http.Header)
  9170  	}
  9171  	return c.header_
  9172  }
  9173  
  9174  func (c *ProjectsInstancesBackupsCreateCall) doRequest(alt string) (*http.Response, error) {
  9175  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9176  	var body io.Reader = nil
  9177  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.backup)
  9178  	if err != nil {
  9179  		return nil, err
  9180  	}
  9181  	c.urlParams_.Set("alt", alt)
  9182  	c.urlParams_.Set("prettyPrint", "false")
  9183  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/backups")
  9184  	urls += "?" + c.urlParams_.Encode()
  9185  	req, err := http.NewRequest("POST", urls, body)
  9186  	if err != nil {
  9187  		return nil, err
  9188  	}
  9189  	req.Header = reqHeaders
  9190  	googleapi.Expand(req.URL, map[string]string{
  9191  		"parent": c.parent,
  9192  	})
  9193  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9194  }
  9195  
  9196  // Do executes the "spanner.projects.instances.backups.create" call.
  9197  // Any non-2xx status code is an error. Response headers are in either
  9198  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  9199  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9200  // whether the returned error was because http.StatusNotModified was returned.
  9201  func (c *ProjectsInstancesBackupsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  9202  	gensupport.SetOptions(c.urlParams_, opts...)
  9203  	res, err := c.doRequest("json")
  9204  	if res != nil && res.StatusCode == http.StatusNotModified {
  9205  		if res.Body != nil {
  9206  			res.Body.Close()
  9207  		}
  9208  		return nil, gensupport.WrapError(&googleapi.Error{
  9209  			Code:   res.StatusCode,
  9210  			Header: res.Header,
  9211  		})
  9212  	}
  9213  	if err != nil {
  9214  		return nil, err
  9215  	}
  9216  	defer googleapi.CloseBody(res)
  9217  	if err := googleapi.CheckResponse(res); err != nil {
  9218  		return nil, gensupport.WrapError(err)
  9219  	}
  9220  	ret := &Operation{
  9221  		ServerResponse: googleapi.ServerResponse{
  9222  			Header:         res.Header,
  9223  			HTTPStatusCode: res.StatusCode,
  9224  		},
  9225  	}
  9226  	target := &ret
  9227  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9228  		return nil, err
  9229  	}
  9230  	return ret, nil
  9231  }
  9232  
  9233  type ProjectsInstancesBackupsDeleteCall struct {
  9234  	s          *Service
  9235  	name       string
  9236  	urlParams_ gensupport.URLParams
  9237  	ctx_       context.Context
  9238  	header_    http.Header
  9239  }
  9240  
  9241  // Delete: Deletes a pending or completed Backup.
  9242  //
  9243  //   - name: Name of the backup to delete. Values are of the form
  9244  //     `projects//instances//backups/`.
  9245  func (r *ProjectsInstancesBackupsService) Delete(name string) *ProjectsInstancesBackupsDeleteCall {
  9246  	c := &ProjectsInstancesBackupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9247  	c.name = name
  9248  	return c
  9249  }
  9250  
  9251  // Fields allows partial responses to be retrieved. See
  9252  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9253  // details.
  9254  func (c *ProjectsInstancesBackupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsInstancesBackupsDeleteCall {
  9255  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9256  	return c
  9257  }
  9258  
  9259  // Context sets the context to be used in this call's Do method.
  9260  func (c *ProjectsInstancesBackupsDeleteCall) Context(ctx context.Context) *ProjectsInstancesBackupsDeleteCall {
  9261  	c.ctx_ = ctx
  9262  	return c
  9263  }
  9264  
  9265  // Header returns a http.Header that can be modified by the caller to add
  9266  // headers to the request.
  9267  func (c *ProjectsInstancesBackupsDeleteCall) Header() http.Header {
  9268  	if c.header_ == nil {
  9269  		c.header_ = make(http.Header)
  9270  	}
  9271  	return c.header_
  9272  }
  9273  
  9274  func (c *ProjectsInstancesBackupsDeleteCall) doRequest(alt string) (*http.Response, error) {
  9275  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9276  	var body io.Reader = nil
  9277  	c.urlParams_.Set("alt", alt)
  9278  	c.urlParams_.Set("prettyPrint", "false")
  9279  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  9280  	urls += "?" + c.urlParams_.Encode()
  9281  	req, err := http.NewRequest("DELETE", urls, body)
  9282  	if err != nil {
  9283  		return nil, err
  9284  	}
  9285  	req.Header = reqHeaders
  9286  	googleapi.Expand(req.URL, map[string]string{
  9287  		"name": c.name,
  9288  	})
  9289  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9290  }
  9291  
  9292  // Do executes the "spanner.projects.instances.backups.delete" call.
  9293  // Any non-2xx status code is an error. Response headers are in either
  9294  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  9295  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9296  // whether the returned error was because http.StatusNotModified was returned.
  9297  func (c *ProjectsInstancesBackupsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  9298  	gensupport.SetOptions(c.urlParams_, opts...)
  9299  	res, err := c.doRequest("json")
  9300  	if res != nil && res.StatusCode == http.StatusNotModified {
  9301  		if res.Body != nil {
  9302  			res.Body.Close()
  9303  		}
  9304  		return nil, gensupport.WrapError(&googleapi.Error{
  9305  			Code:   res.StatusCode,
  9306  			Header: res.Header,
  9307  		})
  9308  	}
  9309  	if err != nil {
  9310  		return nil, err
  9311  	}
  9312  	defer googleapi.CloseBody(res)
  9313  	if err := googleapi.CheckResponse(res); err != nil {
  9314  		return nil, gensupport.WrapError(err)
  9315  	}
  9316  	ret := &Empty{
  9317  		ServerResponse: googleapi.ServerResponse{
  9318  			Header:         res.Header,
  9319  			HTTPStatusCode: res.StatusCode,
  9320  		},
  9321  	}
  9322  	target := &ret
  9323  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9324  		return nil, err
  9325  	}
  9326  	return ret, nil
  9327  }
  9328  
  9329  type ProjectsInstancesBackupsGetCall struct {
  9330  	s            *Service
  9331  	name         string
  9332  	urlParams_   gensupport.URLParams
  9333  	ifNoneMatch_ string
  9334  	ctx_         context.Context
  9335  	header_      http.Header
  9336  }
  9337  
  9338  // Get: Gets metadata on a pending or completed Backup.
  9339  //
  9340  //   - name: Name of the backup. Values are of the form
  9341  //     `projects//instances//backups/`.
  9342  func (r *ProjectsInstancesBackupsService) Get(name string) *ProjectsInstancesBackupsGetCall {
  9343  	c := &ProjectsInstancesBackupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9344  	c.name = name
  9345  	return c
  9346  }
  9347  
  9348  // Fields allows partial responses to be retrieved. See
  9349  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9350  // details.
  9351  func (c *ProjectsInstancesBackupsGetCall) Fields(s ...googleapi.Field) *ProjectsInstancesBackupsGetCall {
  9352  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9353  	return c
  9354  }
  9355  
  9356  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  9357  // object's ETag matches the given value. This is useful for getting updates
  9358  // only after the object has changed since the last request.
  9359  func (c *ProjectsInstancesBackupsGetCall) IfNoneMatch(entityTag string) *ProjectsInstancesBackupsGetCall {
  9360  	c.ifNoneMatch_ = entityTag
  9361  	return c
  9362  }
  9363  
  9364  // Context sets the context to be used in this call's Do method.
  9365  func (c *ProjectsInstancesBackupsGetCall) Context(ctx context.Context) *ProjectsInstancesBackupsGetCall {
  9366  	c.ctx_ = ctx
  9367  	return c
  9368  }
  9369  
  9370  // Header returns a http.Header that can be modified by the caller to add
  9371  // headers to the request.
  9372  func (c *ProjectsInstancesBackupsGetCall) Header() http.Header {
  9373  	if c.header_ == nil {
  9374  		c.header_ = make(http.Header)
  9375  	}
  9376  	return c.header_
  9377  }
  9378  
  9379  func (c *ProjectsInstancesBackupsGetCall) doRequest(alt string) (*http.Response, error) {
  9380  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9381  	if c.ifNoneMatch_ != "" {
  9382  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9383  	}
  9384  	var body io.Reader = nil
  9385  	c.urlParams_.Set("alt", alt)
  9386  	c.urlParams_.Set("prettyPrint", "false")
  9387  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  9388  	urls += "?" + c.urlParams_.Encode()
  9389  	req, err := http.NewRequest("GET", urls, body)
  9390  	if err != nil {
  9391  		return nil, err
  9392  	}
  9393  	req.Header = reqHeaders
  9394  	googleapi.Expand(req.URL, map[string]string{
  9395  		"name": c.name,
  9396  	})
  9397  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9398  }
  9399  
  9400  // Do executes the "spanner.projects.instances.backups.get" call.
  9401  // Any non-2xx status code is an error. Response headers are in either
  9402  // *Backup.ServerResponse.Header or (if a response was returned at all) in
  9403  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9404  // whether the returned error was because http.StatusNotModified was returned.
  9405  func (c *ProjectsInstancesBackupsGetCall) Do(opts ...googleapi.CallOption) (*Backup, error) {
  9406  	gensupport.SetOptions(c.urlParams_, opts...)
  9407  	res, err := c.doRequest("json")
  9408  	if res != nil && res.StatusCode == http.StatusNotModified {
  9409  		if res.Body != nil {
  9410  			res.Body.Close()
  9411  		}
  9412  		return nil, gensupport.WrapError(&googleapi.Error{
  9413  			Code:   res.StatusCode,
  9414  			Header: res.Header,
  9415  		})
  9416  	}
  9417  	if err != nil {
  9418  		return nil, err
  9419  	}
  9420  	defer googleapi.CloseBody(res)
  9421  	if err := googleapi.CheckResponse(res); err != nil {
  9422  		return nil, gensupport.WrapError(err)
  9423  	}
  9424  	ret := &Backup{
  9425  		ServerResponse: googleapi.ServerResponse{
  9426  			Header:         res.Header,
  9427  			HTTPStatusCode: res.StatusCode,
  9428  		},
  9429  	}
  9430  	target := &ret
  9431  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9432  		return nil, err
  9433  	}
  9434  	return ret, nil
  9435  }
  9436  
  9437  type ProjectsInstancesBackupsGetIamPolicyCall struct {
  9438  	s                   *Service
  9439  	resource            string
  9440  	getiampolicyrequest *GetIamPolicyRequest
  9441  	urlParams_          gensupport.URLParams
  9442  	ctx_                context.Context
  9443  	header_             http.Header
  9444  }
  9445  
  9446  // GetIamPolicy: Gets the access control policy for a database or backup
  9447  // resource. Returns an empty policy if a database or backup exists but does
  9448  // not have a policy set. Authorization requires
  9449  // `spanner.databases.getIamPolicy` permission on resource. For backups,
  9450  // authorization requires `spanner.backups.getIamPolicy` permission on
  9451  // resource.
  9452  //
  9453  //   - resource: REQUIRED: The Cloud Spanner resource for which the policy is
  9454  //     being retrieved. The format is `projects//instances/` for instance
  9455  //     resources and `projects//instances//databases/` for database resources.
  9456  func (r *ProjectsInstancesBackupsService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsInstancesBackupsGetIamPolicyCall {
  9457  	c := &ProjectsInstancesBackupsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9458  	c.resource = resource
  9459  	c.getiampolicyrequest = getiampolicyrequest
  9460  	return c
  9461  }
  9462  
  9463  // Fields allows partial responses to be retrieved. See
  9464  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9465  // details.
  9466  func (c *ProjectsInstancesBackupsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsInstancesBackupsGetIamPolicyCall {
  9467  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9468  	return c
  9469  }
  9470  
  9471  // Context sets the context to be used in this call's Do method.
  9472  func (c *ProjectsInstancesBackupsGetIamPolicyCall) Context(ctx context.Context) *ProjectsInstancesBackupsGetIamPolicyCall {
  9473  	c.ctx_ = ctx
  9474  	return c
  9475  }
  9476  
  9477  // Header returns a http.Header that can be modified by the caller to add
  9478  // headers to the request.
  9479  func (c *ProjectsInstancesBackupsGetIamPolicyCall) Header() http.Header {
  9480  	if c.header_ == nil {
  9481  		c.header_ = make(http.Header)
  9482  	}
  9483  	return c.header_
  9484  }
  9485  
  9486  func (c *ProjectsInstancesBackupsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  9487  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9488  	var body io.Reader = nil
  9489  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
  9490  	if err != nil {
  9491  		return nil, err
  9492  	}
  9493  	c.urlParams_.Set("alt", alt)
  9494  	c.urlParams_.Set("prettyPrint", "false")
  9495  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
  9496  	urls += "?" + c.urlParams_.Encode()
  9497  	req, err := http.NewRequest("POST", urls, body)
  9498  	if err != nil {
  9499  		return nil, err
  9500  	}
  9501  	req.Header = reqHeaders
  9502  	googleapi.Expand(req.URL, map[string]string{
  9503  		"resource": c.resource,
  9504  	})
  9505  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9506  }
  9507  
  9508  // Do executes the "spanner.projects.instances.backups.getIamPolicy" call.
  9509  // Any non-2xx status code is an error. Response headers are in either
  9510  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  9511  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9512  // whether the returned error was because http.StatusNotModified was returned.
  9513  func (c *ProjectsInstancesBackupsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  9514  	gensupport.SetOptions(c.urlParams_, opts...)
  9515  	res, err := c.doRequest("json")
  9516  	if res != nil && res.StatusCode == http.StatusNotModified {
  9517  		if res.Body != nil {
  9518  			res.Body.Close()
  9519  		}
  9520  		return nil, gensupport.WrapError(&googleapi.Error{
  9521  			Code:   res.StatusCode,
  9522  			Header: res.Header,
  9523  		})
  9524  	}
  9525  	if err != nil {
  9526  		return nil, err
  9527  	}
  9528  	defer googleapi.CloseBody(res)
  9529  	if err := googleapi.CheckResponse(res); err != nil {
  9530  		return nil, gensupport.WrapError(err)
  9531  	}
  9532  	ret := &Policy{
  9533  		ServerResponse: googleapi.ServerResponse{
  9534  			Header:         res.Header,
  9535  			HTTPStatusCode: res.StatusCode,
  9536  		},
  9537  	}
  9538  	target := &ret
  9539  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9540  		return nil, err
  9541  	}
  9542  	return ret, nil
  9543  }
  9544  
  9545  type ProjectsInstancesBackupsListCall struct {
  9546  	s            *Service
  9547  	parent       string
  9548  	urlParams_   gensupport.URLParams
  9549  	ifNoneMatch_ string
  9550  	ctx_         context.Context
  9551  	header_      http.Header
  9552  }
  9553  
  9554  // List: Lists completed and pending backups. Backups returned are ordered by
  9555  // `create_time` in descending order, starting from the most recent
  9556  // `create_time`.
  9557  //
  9558  //   - parent: The instance to list backups from. Values are of the form
  9559  //     `projects//instances/`.
  9560  func (r *ProjectsInstancesBackupsService) List(parent string) *ProjectsInstancesBackupsListCall {
  9561  	c := &ProjectsInstancesBackupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9562  	c.parent = parent
  9563  	return c
  9564  }
  9565  
  9566  // Filter sets the optional parameter "filter": An expression that filters the
  9567  // list of returned backups. A filter expression consists of a field name, a
  9568  // comparison operator, and a value for filtering. The value must be a string,
  9569  // a number, or a boolean. The comparison operator must be one of: `<`, `>`,
  9570  // `<=`, `>=`, `!=`, `=`, or `:`. Colon `:` is the contains operator. Filter
  9571  // rules are not case sensitive. The following fields in the Backup are
  9572  // eligible for filtering: * `name` * `database` * `state` * `create_time` (and
  9573  // values are of the format YYYY-MM-DDTHH:MM:SSZ) * `expire_time` (and values
  9574  // are of the format YYYY-MM-DDTHH:MM:SSZ) * `version_time` (and values are of
  9575  // the format YYYY-MM-DDTHH:MM:SSZ) * `size_bytes` You can combine multiple
  9576  // expressions by enclosing each expression in parentheses. By default,
  9577  // expressions are combined with AND logic, but you can specify AND, OR, and
  9578  // NOT logic explicitly. Here are a few examples: * `name:Howl` - The backup's
  9579  // name contains the string "howl". * `database:prod` - The database's name
  9580  // contains the string "prod". * `state:CREATING` - The backup is pending
  9581  // creation. * `state:READY` - The backup is fully created and ready for use. *
  9582  // `(name:howl) AND (create_time < \"2018-03-28T14:50:00Z\")` - The backup name
  9583  // contains the string "howl" and `create_time` of the backup is before
  9584  // 2018-03-28T14:50:00Z. * `expire_time < \"2018-03-28T14:50:00Z\" - The
  9585  // backup `expire_time` is before 2018-03-28T14:50:00Z. * `size_bytes >
  9586  // 10000000000` - The backup's size is greater than 10GB
  9587  func (c *ProjectsInstancesBackupsListCall) Filter(filter string) *ProjectsInstancesBackupsListCall {
  9588  	c.urlParams_.Set("filter", filter)
  9589  	return c
  9590  }
  9591  
  9592  // PageSize sets the optional parameter "pageSize": Number of backups to be
  9593  // returned in the response. If 0 or less, defaults to the server's maximum
  9594  // allowed page size.
  9595  func (c *ProjectsInstancesBackupsListCall) PageSize(pageSize int64) *ProjectsInstancesBackupsListCall {
  9596  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  9597  	return c
  9598  }
  9599  
  9600  // PageToken sets the optional parameter "pageToken": If non-empty,
  9601  // `page_token` should contain a next_page_token from a previous
  9602  // ListBackupsResponse to the same `parent` and with the same `filter`.
  9603  func (c *ProjectsInstancesBackupsListCall) PageToken(pageToken string) *ProjectsInstancesBackupsListCall {
  9604  	c.urlParams_.Set("pageToken", pageToken)
  9605  	return c
  9606  }
  9607  
  9608  // Fields allows partial responses to be retrieved. See
  9609  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9610  // details.
  9611  func (c *ProjectsInstancesBackupsListCall) Fields(s ...googleapi.Field) *ProjectsInstancesBackupsListCall {
  9612  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9613  	return c
  9614  }
  9615  
  9616  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  9617  // object's ETag matches the given value. This is useful for getting updates
  9618  // only after the object has changed since the last request.
  9619  func (c *ProjectsInstancesBackupsListCall) IfNoneMatch(entityTag string) *ProjectsInstancesBackupsListCall {
  9620  	c.ifNoneMatch_ = entityTag
  9621  	return c
  9622  }
  9623  
  9624  // Context sets the context to be used in this call's Do method.
  9625  func (c *ProjectsInstancesBackupsListCall) Context(ctx context.Context) *ProjectsInstancesBackupsListCall {
  9626  	c.ctx_ = ctx
  9627  	return c
  9628  }
  9629  
  9630  // Header returns a http.Header that can be modified by the caller to add
  9631  // headers to the request.
  9632  func (c *ProjectsInstancesBackupsListCall) Header() http.Header {
  9633  	if c.header_ == nil {
  9634  		c.header_ = make(http.Header)
  9635  	}
  9636  	return c.header_
  9637  }
  9638  
  9639  func (c *ProjectsInstancesBackupsListCall) doRequest(alt string) (*http.Response, error) {
  9640  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9641  	if c.ifNoneMatch_ != "" {
  9642  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9643  	}
  9644  	var body io.Reader = nil
  9645  	c.urlParams_.Set("alt", alt)
  9646  	c.urlParams_.Set("prettyPrint", "false")
  9647  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/backups")
  9648  	urls += "?" + c.urlParams_.Encode()
  9649  	req, err := http.NewRequest("GET", urls, body)
  9650  	if err != nil {
  9651  		return nil, err
  9652  	}
  9653  	req.Header = reqHeaders
  9654  	googleapi.Expand(req.URL, map[string]string{
  9655  		"parent": c.parent,
  9656  	})
  9657  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9658  }
  9659  
  9660  // Do executes the "spanner.projects.instances.backups.list" call.
  9661  // Any non-2xx status code is an error. Response headers are in either
  9662  // *ListBackupsResponse.ServerResponse.Header or (if a response was returned at
  9663  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  9664  // check whether the returned error was because http.StatusNotModified was
  9665  // returned.
  9666  func (c *ProjectsInstancesBackupsListCall) Do(opts ...googleapi.CallOption) (*ListBackupsResponse, error) {
  9667  	gensupport.SetOptions(c.urlParams_, opts...)
  9668  	res, err := c.doRequest("json")
  9669  	if res != nil && res.StatusCode == http.StatusNotModified {
  9670  		if res.Body != nil {
  9671  			res.Body.Close()
  9672  		}
  9673  		return nil, gensupport.WrapError(&googleapi.Error{
  9674  			Code:   res.StatusCode,
  9675  			Header: res.Header,
  9676  		})
  9677  	}
  9678  	if err != nil {
  9679  		return nil, err
  9680  	}
  9681  	defer googleapi.CloseBody(res)
  9682  	if err := googleapi.CheckResponse(res); err != nil {
  9683  		return nil, gensupport.WrapError(err)
  9684  	}
  9685  	ret := &ListBackupsResponse{
  9686  		ServerResponse: googleapi.ServerResponse{
  9687  			Header:         res.Header,
  9688  			HTTPStatusCode: res.StatusCode,
  9689  		},
  9690  	}
  9691  	target := &ret
  9692  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9693  		return nil, err
  9694  	}
  9695  	return ret, nil
  9696  }
  9697  
  9698  // Pages invokes f for each page of results.
  9699  // A non-nil error returned from f will halt the iteration.
  9700  // The provided context supersedes any context provided to the Context method.
  9701  func (c *ProjectsInstancesBackupsListCall) Pages(ctx context.Context, f func(*ListBackupsResponse) error) error {
  9702  	c.ctx_ = ctx
  9703  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  9704  	for {
  9705  		x, err := c.Do()
  9706  		if err != nil {
  9707  			return err
  9708  		}
  9709  		if err := f(x); err != nil {
  9710  			return err
  9711  		}
  9712  		if x.NextPageToken == "" {
  9713  			return nil
  9714  		}
  9715  		c.PageToken(x.NextPageToken)
  9716  	}
  9717  }
  9718  
  9719  type ProjectsInstancesBackupsPatchCall struct {
  9720  	s          *Service
  9721  	nameid     string
  9722  	backup     *Backup
  9723  	urlParams_ gensupport.URLParams
  9724  	ctx_       context.Context
  9725  	header_    http.Header
  9726  }
  9727  
  9728  // Patch: Updates a pending or completed Backup.
  9729  //
  9730  //   - name: Output only for the CreateBackup operation. Required for the
  9731  //     UpdateBackup operation. A globally unique identifier for the backup which
  9732  //     cannot be changed. Values are of the form
  9733  //     `projects//instances//backups/a-z*[a-z0-9]` The final segment of the name
  9734  //     must be between 2 and 60 characters in length. The backup is stored in the
  9735  //     location(s) specified in the instance configuration of the instance
  9736  //     containing the backup, identified by the prefix of the backup name of the
  9737  //     form `projects//instances/`.
  9738  func (r *ProjectsInstancesBackupsService) Patch(nameid string, backup *Backup) *ProjectsInstancesBackupsPatchCall {
  9739  	c := &ProjectsInstancesBackupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9740  	c.nameid = nameid
  9741  	c.backup = backup
  9742  	return c
  9743  }
  9744  
  9745  // UpdateMask sets the optional parameter "updateMask": Required. A mask
  9746  // specifying which fields (e.g. `expire_time`) in the Backup resource should
  9747  // be updated. This mask is relative to the Backup resource, not to the request
  9748  // message. The field mask must always be specified; this prevents any future
  9749  // fields from being erased accidentally by clients that do not know about
  9750  // them.
  9751  func (c *ProjectsInstancesBackupsPatchCall) UpdateMask(updateMask string) *ProjectsInstancesBackupsPatchCall {
  9752  	c.urlParams_.Set("updateMask", updateMask)
  9753  	return c
  9754  }
  9755  
  9756  // Fields allows partial responses to be retrieved. See
  9757  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9758  // details.
  9759  func (c *ProjectsInstancesBackupsPatchCall) Fields(s ...googleapi.Field) *ProjectsInstancesBackupsPatchCall {
  9760  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9761  	return c
  9762  }
  9763  
  9764  // Context sets the context to be used in this call's Do method.
  9765  func (c *ProjectsInstancesBackupsPatchCall) Context(ctx context.Context) *ProjectsInstancesBackupsPatchCall {
  9766  	c.ctx_ = ctx
  9767  	return c
  9768  }
  9769  
  9770  // Header returns a http.Header that can be modified by the caller to add
  9771  // headers to the request.
  9772  func (c *ProjectsInstancesBackupsPatchCall) Header() http.Header {
  9773  	if c.header_ == nil {
  9774  		c.header_ = make(http.Header)
  9775  	}
  9776  	return c.header_
  9777  }
  9778  
  9779  func (c *ProjectsInstancesBackupsPatchCall) doRequest(alt string) (*http.Response, error) {
  9780  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9781  	var body io.Reader = nil
  9782  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.backup)
  9783  	if err != nil {
  9784  		return nil, err
  9785  	}
  9786  	c.urlParams_.Set("alt", alt)
  9787  	c.urlParams_.Set("prettyPrint", "false")
  9788  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  9789  	urls += "?" + c.urlParams_.Encode()
  9790  	req, err := http.NewRequest("PATCH", urls, body)
  9791  	if err != nil {
  9792  		return nil, err
  9793  	}
  9794  	req.Header = reqHeaders
  9795  	googleapi.Expand(req.URL, map[string]string{
  9796  		"name": c.nameid,
  9797  	})
  9798  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9799  }
  9800  
  9801  // Do executes the "spanner.projects.instances.backups.patch" call.
  9802  // Any non-2xx status code is an error. Response headers are in either
  9803  // *Backup.ServerResponse.Header or (if a response was returned at all) in
  9804  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9805  // whether the returned error was because http.StatusNotModified was returned.
  9806  func (c *ProjectsInstancesBackupsPatchCall) Do(opts ...googleapi.CallOption) (*Backup, error) {
  9807  	gensupport.SetOptions(c.urlParams_, opts...)
  9808  	res, err := c.doRequest("json")
  9809  	if res != nil && res.StatusCode == http.StatusNotModified {
  9810  		if res.Body != nil {
  9811  			res.Body.Close()
  9812  		}
  9813  		return nil, gensupport.WrapError(&googleapi.Error{
  9814  			Code:   res.StatusCode,
  9815  			Header: res.Header,
  9816  		})
  9817  	}
  9818  	if err != nil {
  9819  		return nil, err
  9820  	}
  9821  	defer googleapi.CloseBody(res)
  9822  	if err := googleapi.CheckResponse(res); err != nil {
  9823  		return nil, gensupport.WrapError(err)
  9824  	}
  9825  	ret := &Backup{
  9826  		ServerResponse: googleapi.ServerResponse{
  9827  			Header:         res.Header,
  9828  			HTTPStatusCode: res.StatusCode,
  9829  		},
  9830  	}
  9831  	target := &ret
  9832  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9833  		return nil, err
  9834  	}
  9835  	return ret, nil
  9836  }
  9837  
  9838  type ProjectsInstancesBackupsSetIamPolicyCall struct {
  9839  	s                   *Service
  9840  	resource            string
  9841  	setiampolicyrequest *SetIamPolicyRequest
  9842  	urlParams_          gensupport.URLParams
  9843  	ctx_                context.Context
  9844  	header_             http.Header
  9845  }
  9846  
  9847  // SetIamPolicy: Sets the access control policy on a database or backup
  9848  // resource. Replaces any existing policy. Authorization requires
  9849  // `spanner.databases.setIamPolicy` permission on resource. For backups,
  9850  // authorization requires `spanner.backups.setIamPolicy` permission on
  9851  // resource.
  9852  //
  9853  //   - resource: REQUIRED: The Cloud Spanner resource for which the policy is
  9854  //     being set. The format is `projects//instances/` for instance resources and
  9855  //     `projects//instances//databases/` for databases resources.
  9856  func (r *ProjectsInstancesBackupsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsInstancesBackupsSetIamPolicyCall {
  9857  	c := &ProjectsInstancesBackupsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9858  	c.resource = resource
  9859  	c.setiampolicyrequest = setiampolicyrequest
  9860  	return c
  9861  }
  9862  
  9863  // Fields allows partial responses to be retrieved. See
  9864  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9865  // details.
  9866  func (c *ProjectsInstancesBackupsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsInstancesBackupsSetIamPolicyCall {
  9867  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9868  	return c
  9869  }
  9870  
  9871  // Context sets the context to be used in this call's Do method.
  9872  func (c *ProjectsInstancesBackupsSetIamPolicyCall) Context(ctx context.Context) *ProjectsInstancesBackupsSetIamPolicyCall {
  9873  	c.ctx_ = ctx
  9874  	return c
  9875  }
  9876  
  9877  // Header returns a http.Header that can be modified by the caller to add
  9878  // headers to the request.
  9879  func (c *ProjectsInstancesBackupsSetIamPolicyCall) Header() http.Header {
  9880  	if c.header_ == nil {
  9881  		c.header_ = make(http.Header)
  9882  	}
  9883  	return c.header_
  9884  }
  9885  
  9886  func (c *ProjectsInstancesBackupsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  9887  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9888  	var body io.Reader = nil
  9889  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  9890  	if err != nil {
  9891  		return nil, err
  9892  	}
  9893  	c.urlParams_.Set("alt", alt)
  9894  	c.urlParams_.Set("prettyPrint", "false")
  9895  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
  9896  	urls += "?" + c.urlParams_.Encode()
  9897  	req, err := http.NewRequest("POST", urls, body)
  9898  	if err != nil {
  9899  		return nil, err
  9900  	}
  9901  	req.Header = reqHeaders
  9902  	googleapi.Expand(req.URL, map[string]string{
  9903  		"resource": c.resource,
  9904  	})
  9905  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9906  }
  9907  
  9908  // Do executes the "spanner.projects.instances.backups.setIamPolicy" call.
  9909  // Any non-2xx status code is an error. Response headers are in either
  9910  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  9911  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9912  // whether the returned error was because http.StatusNotModified was returned.
  9913  func (c *ProjectsInstancesBackupsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  9914  	gensupport.SetOptions(c.urlParams_, opts...)
  9915  	res, err := c.doRequest("json")
  9916  	if res != nil && res.StatusCode == http.StatusNotModified {
  9917  		if res.Body != nil {
  9918  			res.Body.Close()
  9919  		}
  9920  		return nil, gensupport.WrapError(&googleapi.Error{
  9921  			Code:   res.StatusCode,
  9922  			Header: res.Header,
  9923  		})
  9924  	}
  9925  	if err != nil {
  9926  		return nil, err
  9927  	}
  9928  	defer googleapi.CloseBody(res)
  9929  	if err := googleapi.CheckResponse(res); err != nil {
  9930  		return nil, gensupport.WrapError(err)
  9931  	}
  9932  	ret := &Policy{
  9933  		ServerResponse: googleapi.ServerResponse{
  9934  			Header:         res.Header,
  9935  			HTTPStatusCode: res.StatusCode,
  9936  		},
  9937  	}
  9938  	target := &ret
  9939  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9940  		return nil, err
  9941  	}
  9942  	return ret, nil
  9943  }
  9944  
  9945  type ProjectsInstancesBackupsTestIamPermissionsCall struct {
  9946  	s                         *Service
  9947  	resource                  string
  9948  	testiampermissionsrequest *TestIamPermissionsRequest
  9949  	urlParams_                gensupport.URLParams
  9950  	ctx_                      context.Context
  9951  	header_                   http.Header
  9952  }
  9953  
  9954  // TestIamPermissions: Returns permissions that the caller has on the specified
  9955  // database or backup resource. Attempting this RPC on a non-existent Cloud
  9956  // Spanner database will result in a NOT_FOUND error if the user has
  9957  // `spanner.databases.list` permission on the containing Cloud Spanner
  9958  // instance. Otherwise returns an empty set of permissions. Calling this method
  9959  // on a backup that does not exist will result in a NOT_FOUND error if the user
  9960  // has `spanner.backups.list` permission on the containing instance.
  9961  //
  9962  //   - resource: REQUIRED: The Cloud Spanner resource for which permissions are
  9963  //     being tested. The format is `projects//instances/` for instance resources
  9964  //     and `projects//instances//databases/` for database resources.
  9965  func (r *ProjectsInstancesBackupsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsInstancesBackupsTestIamPermissionsCall {
  9966  	c := &ProjectsInstancesBackupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9967  	c.resource = resource
  9968  	c.testiampermissionsrequest = testiampermissionsrequest
  9969  	return c
  9970  }
  9971  
  9972  // Fields allows partial responses to be retrieved. See
  9973  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9974  // details.
  9975  func (c *ProjectsInstancesBackupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsInstancesBackupsTestIamPermissionsCall {
  9976  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9977  	return c
  9978  }
  9979  
  9980  // Context sets the context to be used in this call's Do method.
  9981  func (c *ProjectsInstancesBackupsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsInstancesBackupsTestIamPermissionsCall {
  9982  	c.ctx_ = ctx
  9983  	return c
  9984  }
  9985  
  9986  // Header returns a http.Header that can be modified by the caller to add
  9987  // headers to the request.
  9988  func (c *ProjectsInstancesBackupsTestIamPermissionsCall) Header() http.Header {
  9989  	if c.header_ == nil {
  9990  		c.header_ = make(http.Header)
  9991  	}
  9992  	return c.header_
  9993  }
  9994  
  9995  func (c *ProjectsInstancesBackupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  9996  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9997  	var body io.Reader = nil
  9998  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  9999  	if err != nil {
 10000  		return nil, err
 10001  	}
 10002  	c.urlParams_.Set("alt", alt)
 10003  	c.urlParams_.Set("prettyPrint", "false")
 10004  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
 10005  	urls += "?" + c.urlParams_.Encode()
 10006  	req, err := http.NewRequest("POST", urls, body)
 10007  	if err != nil {
 10008  		return nil, err
 10009  	}
 10010  	req.Header = reqHeaders
 10011  	googleapi.Expand(req.URL, map[string]string{
 10012  		"resource": c.resource,
 10013  	})
 10014  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10015  }
 10016  
 10017  // Do executes the "spanner.projects.instances.backups.testIamPermissions" call.
 10018  // Any non-2xx status code is an error. Response headers are in either
 10019  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
 10020  // returned at all) in error.(*googleapi.Error).Header. Use
 10021  // googleapi.IsNotModified to check whether the returned error was because
 10022  // http.StatusNotModified was returned.
 10023  func (c *ProjectsInstancesBackupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
 10024  	gensupport.SetOptions(c.urlParams_, opts...)
 10025  	res, err := c.doRequest("json")
 10026  	if res != nil && res.StatusCode == http.StatusNotModified {
 10027  		if res.Body != nil {
 10028  			res.Body.Close()
 10029  		}
 10030  		return nil, gensupport.WrapError(&googleapi.Error{
 10031  			Code:   res.StatusCode,
 10032  			Header: res.Header,
 10033  		})
 10034  	}
 10035  	if err != nil {
 10036  		return nil, err
 10037  	}
 10038  	defer googleapi.CloseBody(res)
 10039  	if err := googleapi.CheckResponse(res); err != nil {
 10040  		return nil, gensupport.WrapError(err)
 10041  	}
 10042  	ret := &TestIamPermissionsResponse{
 10043  		ServerResponse: googleapi.ServerResponse{
 10044  			Header:         res.Header,
 10045  			HTTPStatusCode: res.StatusCode,
 10046  		},
 10047  	}
 10048  	target := &ret
 10049  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10050  		return nil, err
 10051  	}
 10052  	return ret, nil
 10053  }
 10054  
 10055  type ProjectsInstancesBackupsOperationsCancelCall struct {
 10056  	s          *Service
 10057  	name       string
 10058  	urlParams_ gensupport.URLParams
 10059  	ctx_       context.Context
 10060  	header_    http.Header
 10061  }
 10062  
 10063  // Cancel: Starts asynchronous cancellation on a long-running operation. The
 10064  // server makes a best effort to cancel the operation, but success is not
 10065  // guaranteed. If the server doesn't support this method, it returns
 10066  // `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or
 10067  // other methods to check whether the cancellation succeeded or whether the
 10068  // operation completed despite cancellation. On successful cancellation, the
 10069  // operation is not deleted; instead, it becomes an operation with an
 10070  // Operation.error value with a google.rpc.Status.code of 1, corresponding to
 10071  // `Code.CANCELLED`.
 10072  //
 10073  // - name: The name of the operation resource to be cancelled.
 10074  func (r *ProjectsInstancesBackupsOperationsService) Cancel(name string) *ProjectsInstancesBackupsOperationsCancelCall {
 10075  	c := &ProjectsInstancesBackupsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10076  	c.name = name
 10077  	return c
 10078  }
 10079  
 10080  // Fields allows partial responses to be retrieved. See
 10081  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10082  // details.
 10083  func (c *ProjectsInstancesBackupsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsInstancesBackupsOperationsCancelCall {
 10084  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10085  	return c
 10086  }
 10087  
 10088  // Context sets the context to be used in this call's Do method.
 10089  func (c *ProjectsInstancesBackupsOperationsCancelCall) Context(ctx context.Context) *ProjectsInstancesBackupsOperationsCancelCall {
 10090  	c.ctx_ = ctx
 10091  	return c
 10092  }
 10093  
 10094  // Header returns a http.Header that can be modified by the caller to add
 10095  // headers to the request.
 10096  func (c *ProjectsInstancesBackupsOperationsCancelCall) Header() http.Header {
 10097  	if c.header_ == nil {
 10098  		c.header_ = make(http.Header)
 10099  	}
 10100  	return c.header_
 10101  }
 10102  
 10103  func (c *ProjectsInstancesBackupsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
 10104  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10105  	var body io.Reader = nil
 10106  	c.urlParams_.Set("alt", alt)
 10107  	c.urlParams_.Set("prettyPrint", "false")
 10108  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
 10109  	urls += "?" + c.urlParams_.Encode()
 10110  	req, err := http.NewRequest("POST", urls, body)
 10111  	if err != nil {
 10112  		return nil, err
 10113  	}
 10114  	req.Header = reqHeaders
 10115  	googleapi.Expand(req.URL, map[string]string{
 10116  		"name": c.name,
 10117  	})
 10118  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10119  }
 10120  
 10121  // Do executes the "spanner.projects.instances.backups.operations.cancel" call.
 10122  // Any non-2xx status code is an error. Response headers are in either
 10123  // *Empty.ServerResponse.Header or (if a response was returned at all) in
 10124  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10125  // whether the returned error was because http.StatusNotModified was returned.
 10126  func (c *ProjectsInstancesBackupsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
 10127  	gensupport.SetOptions(c.urlParams_, opts...)
 10128  	res, err := c.doRequest("json")
 10129  	if res != nil && res.StatusCode == http.StatusNotModified {
 10130  		if res.Body != nil {
 10131  			res.Body.Close()
 10132  		}
 10133  		return nil, gensupport.WrapError(&googleapi.Error{
 10134  			Code:   res.StatusCode,
 10135  			Header: res.Header,
 10136  		})
 10137  	}
 10138  	if err != nil {
 10139  		return nil, err
 10140  	}
 10141  	defer googleapi.CloseBody(res)
 10142  	if err := googleapi.CheckResponse(res); err != nil {
 10143  		return nil, gensupport.WrapError(err)
 10144  	}
 10145  	ret := &Empty{
 10146  		ServerResponse: googleapi.ServerResponse{
 10147  			Header:         res.Header,
 10148  			HTTPStatusCode: res.StatusCode,
 10149  		},
 10150  	}
 10151  	target := &ret
 10152  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10153  		return nil, err
 10154  	}
 10155  	return ret, nil
 10156  }
 10157  
 10158  type ProjectsInstancesBackupsOperationsDeleteCall struct {
 10159  	s          *Service
 10160  	name       string
 10161  	urlParams_ gensupport.URLParams
 10162  	ctx_       context.Context
 10163  	header_    http.Header
 10164  }
 10165  
 10166  // Delete: Deletes a long-running operation. This method indicates that the
 10167  // client is no longer interested in the operation result. It does not cancel
 10168  // the operation. If the server doesn't support this method, it returns
 10169  // `google.rpc.Code.UNIMPLEMENTED`.
 10170  //
 10171  // - name: The name of the operation resource to be deleted.
 10172  func (r *ProjectsInstancesBackupsOperationsService) Delete(name string) *ProjectsInstancesBackupsOperationsDeleteCall {
 10173  	c := &ProjectsInstancesBackupsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10174  	c.name = name
 10175  	return c
 10176  }
 10177  
 10178  // Fields allows partial responses to be retrieved. See
 10179  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10180  // details.
 10181  func (c *ProjectsInstancesBackupsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsInstancesBackupsOperationsDeleteCall {
 10182  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10183  	return c
 10184  }
 10185  
 10186  // Context sets the context to be used in this call's Do method.
 10187  func (c *ProjectsInstancesBackupsOperationsDeleteCall) Context(ctx context.Context) *ProjectsInstancesBackupsOperationsDeleteCall {
 10188  	c.ctx_ = ctx
 10189  	return c
 10190  }
 10191  
 10192  // Header returns a http.Header that can be modified by the caller to add
 10193  // headers to the request.
 10194  func (c *ProjectsInstancesBackupsOperationsDeleteCall) Header() http.Header {
 10195  	if c.header_ == nil {
 10196  		c.header_ = make(http.Header)
 10197  	}
 10198  	return c.header_
 10199  }
 10200  
 10201  func (c *ProjectsInstancesBackupsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
 10202  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10203  	var body io.Reader = nil
 10204  	c.urlParams_.Set("alt", alt)
 10205  	c.urlParams_.Set("prettyPrint", "false")
 10206  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 10207  	urls += "?" + c.urlParams_.Encode()
 10208  	req, err := http.NewRequest("DELETE", urls, body)
 10209  	if err != nil {
 10210  		return nil, err
 10211  	}
 10212  	req.Header = reqHeaders
 10213  	googleapi.Expand(req.URL, map[string]string{
 10214  		"name": c.name,
 10215  	})
 10216  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10217  }
 10218  
 10219  // Do executes the "spanner.projects.instances.backups.operations.delete" call.
 10220  // Any non-2xx status code is an error. Response headers are in either
 10221  // *Empty.ServerResponse.Header or (if a response was returned at all) in
 10222  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10223  // whether the returned error was because http.StatusNotModified was returned.
 10224  func (c *ProjectsInstancesBackupsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
 10225  	gensupport.SetOptions(c.urlParams_, opts...)
 10226  	res, err := c.doRequest("json")
 10227  	if res != nil && res.StatusCode == http.StatusNotModified {
 10228  		if res.Body != nil {
 10229  			res.Body.Close()
 10230  		}
 10231  		return nil, gensupport.WrapError(&googleapi.Error{
 10232  			Code:   res.StatusCode,
 10233  			Header: res.Header,
 10234  		})
 10235  	}
 10236  	if err != nil {
 10237  		return nil, err
 10238  	}
 10239  	defer googleapi.CloseBody(res)
 10240  	if err := googleapi.CheckResponse(res); err != nil {
 10241  		return nil, gensupport.WrapError(err)
 10242  	}
 10243  	ret := &Empty{
 10244  		ServerResponse: googleapi.ServerResponse{
 10245  			Header:         res.Header,
 10246  			HTTPStatusCode: res.StatusCode,
 10247  		},
 10248  	}
 10249  	target := &ret
 10250  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10251  		return nil, err
 10252  	}
 10253  	return ret, nil
 10254  }
 10255  
 10256  type ProjectsInstancesBackupsOperationsGetCall struct {
 10257  	s            *Service
 10258  	name         string
 10259  	urlParams_   gensupport.URLParams
 10260  	ifNoneMatch_ string
 10261  	ctx_         context.Context
 10262  	header_      http.Header
 10263  }
 10264  
 10265  // Get: Gets the latest state of a long-running operation. Clients can use this
 10266  // method to poll the operation result at intervals as recommended by the API
 10267  // service.
 10268  //
 10269  // - name: The name of the operation resource.
 10270  func (r *ProjectsInstancesBackupsOperationsService) Get(name string) *ProjectsInstancesBackupsOperationsGetCall {
 10271  	c := &ProjectsInstancesBackupsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10272  	c.name = name
 10273  	return c
 10274  }
 10275  
 10276  // Fields allows partial responses to be retrieved. See
 10277  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10278  // details.
 10279  func (c *ProjectsInstancesBackupsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsInstancesBackupsOperationsGetCall {
 10280  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10281  	return c
 10282  }
 10283  
 10284  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 10285  // object's ETag matches the given value. This is useful for getting updates
 10286  // only after the object has changed since the last request.
 10287  func (c *ProjectsInstancesBackupsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsInstancesBackupsOperationsGetCall {
 10288  	c.ifNoneMatch_ = entityTag
 10289  	return c
 10290  }
 10291  
 10292  // Context sets the context to be used in this call's Do method.
 10293  func (c *ProjectsInstancesBackupsOperationsGetCall) Context(ctx context.Context) *ProjectsInstancesBackupsOperationsGetCall {
 10294  	c.ctx_ = ctx
 10295  	return c
 10296  }
 10297  
 10298  // Header returns a http.Header that can be modified by the caller to add
 10299  // headers to the request.
 10300  func (c *ProjectsInstancesBackupsOperationsGetCall) Header() http.Header {
 10301  	if c.header_ == nil {
 10302  		c.header_ = make(http.Header)
 10303  	}
 10304  	return c.header_
 10305  }
 10306  
 10307  func (c *ProjectsInstancesBackupsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
 10308  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10309  	if c.ifNoneMatch_ != "" {
 10310  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 10311  	}
 10312  	var body io.Reader = nil
 10313  	c.urlParams_.Set("alt", alt)
 10314  	c.urlParams_.Set("prettyPrint", "false")
 10315  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 10316  	urls += "?" + c.urlParams_.Encode()
 10317  	req, err := http.NewRequest("GET", urls, body)
 10318  	if err != nil {
 10319  		return nil, err
 10320  	}
 10321  	req.Header = reqHeaders
 10322  	googleapi.Expand(req.URL, map[string]string{
 10323  		"name": c.name,
 10324  	})
 10325  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10326  }
 10327  
 10328  // Do executes the "spanner.projects.instances.backups.operations.get" call.
 10329  // Any non-2xx status code is an error. Response headers are in either
 10330  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 10331  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10332  // whether the returned error was because http.StatusNotModified was returned.
 10333  func (c *ProjectsInstancesBackupsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 10334  	gensupport.SetOptions(c.urlParams_, opts...)
 10335  	res, err := c.doRequest("json")
 10336  	if res != nil && res.StatusCode == http.StatusNotModified {
 10337  		if res.Body != nil {
 10338  			res.Body.Close()
 10339  		}
 10340  		return nil, gensupport.WrapError(&googleapi.Error{
 10341  			Code:   res.StatusCode,
 10342  			Header: res.Header,
 10343  		})
 10344  	}
 10345  	if err != nil {
 10346  		return nil, err
 10347  	}
 10348  	defer googleapi.CloseBody(res)
 10349  	if err := googleapi.CheckResponse(res); err != nil {
 10350  		return nil, gensupport.WrapError(err)
 10351  	}
 10352  	ret := &Operation{
 10353  		ServerResponse: googleapi.ServerResponse{
 10354  			Header:         res.Header,
 10355  			HTTPStatusCode: res.StatusCode,
 10356  		},
 10357  	}
 10358  	target := &ret
 10359  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10360  		return nil, err
 10361  	}
 10362  	return ret, nil
 10363  }
 10364  
 10365  type ProjectsInstancesBackupsOperationsListCall struct {
 10366  	s            *Service
 10367  	name         string
 10368  	urlParams_   gensupport.URLParams
 10369  	ifNoneMatch_ string
 10370  	ctx_         context.Context
 10371  	header_      http.Header
 10372  }
 10373  
 10374  // List: Lists operations that match the specified filter in the request. If
 10375  // the server doesn't support this method, it returns `UNIMPLEMENTED`.
 10376  //
 10377  // - name: The name of the operation's parent resource.
 10378  func (r *ProjectsInstancesBackupsOperationsService) List(name string) *ProjectsInstancesBackupsOperationsListCall {
 10379  	c := &ProjectsInstancesBackupsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10380  	c.name = name
 10381  	return c
 10382  }
 10383  
 10384  // Filter sets the optional parameter "filter": The standard list filter.
 10385  func (c *ProjectsInstancesBackupsOperationsListCall) Filter(filter string) *ProjectsInstancesBackupsOperationsListCall {
 10386  	c.urlParams_.Set("filter", filter)
 10387  	return c
 10388  }
 10389  
 10390  // PageSize sets the optional parameter "pageSize": The standard list page
 10391  // size.
 10392  func (c *ProjectsInstancesBackupsOperationsListCall) PageSize(pageSize int64) *ProjectsInstancesBackupsOperationsListCall {
 10393  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 10394  	return c
 10395  }
 10396  
 10397  // PageToken sets the optional parameter "pageToken": The standard list page
 10398  // token.
 10399  func (c *ProjectsInstancesBackupsOperationsListCall) PageToken(pageToken string) *ProjectsInstancesBackupsOperationsListCall {
 10400  	c.urlParams_.Set("pageToken", pageToken)
 10401  	return c
 10402  }
 10403  
 10404  // Fields allows partial responses to be retrieved. See
 10405  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10406  // details.
 10407  func (c *ProjectsInstancesBackupsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsInstancesBackupsOperationsListCall {
 10408  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10409  	return c
 10410  }
 10411  
 10412  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 10413  // object's ETag matches the given value. This is useful for getting updates
 10414  // only after the object has changed since the last request.
 10415  func (c *ProjectsInstancesBackupsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsInstancesBackupsOperationsListCall {
 10416  	c.ifNoneMatch_ = entityTag
 10417  	return c
 10418  }
 10419  
 10420  // Context sets the context to be used in this call's Do method.
 10421  func (c *ProjectsInstancesBackupsOperationsListCall) Context(ctx context.Context) *ProjectsInstancesBackupsOperationsListCall {
 10422  	c.ctx_ = ctx
 10423  	return c
 10424  }
 10425  
 10426  // Header returns a http.Header that can be modified by the caller to add
 10427  // headers to the request.
 10428  func (c *ProjectsInstancesBackupsOperationsListCall) Header() http.Header {
 10429  	if c.header_ == nil {
 10430  		c.header_ = make(http.Header)
 10431  	}
 10432  	return c.header_
 10433  }
 10434  
 10435  func (c *ProjectsInstancesBackupsOperationsListCall) doRequest(alt string) (*http.Response, error) {
 10436  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10437  	if c.ifNoneMatch_ != "" {
 10438  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 10439  	}
 10440  	var body io.Reader = nil
 10441  	c.urlParams_.Set("alt", alt)
 10442  	c.urlParams_.Set("prettyPrint", "false")
 10443  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 10444  	urls += "?" + c.urlParams_.Encode()
 10445  	req, err := http.NewRequest("GET", urls, body)
 10446  	if err != nil {
 10447  		return nil, err
 10448  	}
 10449  	req.Header = reqHeaders
 10450  	googleapi.Expand(req.URL, map[string]string{
 10451  		"name": c.name,
 10452  	})
 10453  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10454  }
 10455  
 10456  // Do executes the "spanner.projects.instances.backups.operations.list" call.
 10457  // Any non-2xx status code is an error. Response headers are in either
 10458  // *ListOperationsResponse.ServerResponse.Header or (if a response was returned
 10459  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 10460  // check whether the returned error was because http.StatusNotModified was
 10461  // returned.
 10462  func (c *ProjectsInstancesBackupsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
 10463  	gensupport.SetOptions(c.urlParams_, opts...)
 10464  	res, err := c.doRequest("json")
 10465  	if res != nil && res.StatusCode == http.StatusNotModified {
 10466  		if res.Body != nil {
 10467  			res.Body.Close()
 10468  		}
 10469  		return nil, gensupport.WrapError(&googleapi.Error{
 10470  			Code:   res.StatusCode,
 10471  			Header: res.Header,
 10472  		})
 10473  	}
 10474  	if err != nil {
 10475  		return nil, err
 10476  	}
 10477  	defer googleapi.CloseBody(res)
 10478  	if err := googleapi.CheckResponse(res); err != nil {
 10479  		return nil, gensupport.WrapError(err)
 10480  	}
 10481  	ret := &ListOperationsResponse{
 10482  		ServerResponse: googleapi.ServerResponse{
 10483  			Header:         res.Header,
 10484  			HTTPStatusCode: res.StatusCode,
 10485  		},
 10486  	}
 10487  	target := &ret
 10488  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10489  		return nil, err
 10490  	}
 10491  	return ret, nil
 10492  }
 10493  
 10494  // Pages invokes f for each page of results.
 10495  // A non-nil error returned from f will halt the iteration.
 10496  // The provided context supersedes any context provided to the Context method.
 10497  func (c *ProjectsInstancesBackupsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
 10498  	c.ctx_ = ctx
 10499  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 10500  	for {
 10501  		x, err := c.Do()
 10502  		if err != nil {
 10503  			return err
 10504  		}
 10505  		if err := f(x); err != nil {
 10506  			return err
 10507  		}
 10508  		if x.NextPageToken == "" {
 10509  			return nil
 10510  		}
 10511  		c.PageToken(x.NextPageToken)
 10512  	}
 10513  }
 10514  
 10515  type ProjectsInstancesDatabaseOperationsListCall struct {
 10516  	s            *Service
 10517  	parent       string
 10518  	urlParams_   gensupport.URLParams
 10519  	ifNoneMatch_ string
 10520  	ctx_         context.Context
 10521  	header_      http.Header
 10522  }
 10523  
 10524  // List: Lists database longrunning-operations. A database operation has a name
 10525  // of the form `projects//instances//databases//operations/`. The long-running
 10526  // operation metadata field type `metadata.type_url` describes the type of the
 10527  // metadata. Operations returned include those that have
 10528  // completed/failed/canceled within the last 7 days, and pending operations.
 10529  //
 10530  //   - parent: The instance of the database operations. Values are of the form
 10531  //     `projects//instances/`.
 10532  func (r *ProjectsInstancesDatabaseOperationsService) List(parent string) *ProjectsInstancesDatabaseOperationsListCall {
 10533  	c := &ProjectsInstancesDatabaseOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10534  	c.parent = parent
 10535  	return c
 10536  }
 10537  
 10538  // Filter sets the optional parameter "filter": An expression that filters the
 10539  // list of returned operations. A filter expression consists of a field name, a
 10540  // comparison operator, and a value for filtering. The value must be a string,
 10541  // a number, or a boolean. The comparison operator must be one of: `<`, `>`,
 10542  // `<=`, `>=`, `!=`, `=`, or `:`. Colon `:` is the contains operator. Filter
 10543  // rules are not case sensitive. The following fields in the Operation are
 10544  // eligible for filtering: * `name` - The name of the long-running operation *
 10545  // `done` - False if the operation is in progress, else true. *
 10546  // `metadata.@type` - the type of metadata. For example, the type string for
 10547  // RestoreDatabaseMetadata is
 10548  // `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata
 10549  // `. * `metadata.` - any field in metadata.value. `metadata.@type` must be
 10550  // specified first, if filtering on metadata fields. * `error` - Error
 10551  // associated with the long-running operation. * `response.@type` - the type of
 10552  // response. * `response.` - any field in response.value. You can combine
 10553  // multiple expressions by enclosing each expression in parentheses. By
 10554  // default, expressions are combined with AND logic. However, you can specify
 10555  // AND, OR, and NOT logic explicitly. Here are a few examples: * `done:true` -
 10556  // The operation is complete. *
 10557  // `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.Restore
 10558  // DatabaseMetadata) AND` \ `(metadata.source_type:BACKUP) AND` \
 10559  // `(metadata.backup_info.backup:backup_howl) AND` \
 10560  // `(metadata.name:restored_howl) AND` \ `(metadata.progress.start_time <
 10561  // \"2018-03-28T14:50:00Z\") AND` \ `(error:*)` - Return operations where: *
 10562  // The operation's metadata type is RestoreDatabaseMetadata. * The database is
 10563  // restored from a backup. * The backup name contains "backup_howl". * The
 10564  // restored database's name contains "restored_howl". * The operation started
 10565  // before 2018-03-28T14:50:00Z. * The operation resulted in an error.
 10566  func (c *ProjectsInstancesDatabaseOperationsListCall) Filter(filter string) *ProjectsInstancesDatabaseOperationsListCall {
 10567  	c.urlParams_.Set("filter", filter)
 10568  	return c
 10569  }
 10570  
 10571  // PageSize sets the optional parameter "pageSize": Number of operations to be
 10572  // returned in the response. If 0 or less, defaults to the server's maximum
 10573  // allowed page size.
 10574  func (c *ProjectsInstancesDatabaseOperationsListCall) PageSize(pageSize int64) *ProjectsInstancesDatabaseOperationsListCall {
 10575  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 10576  	return c
 10577  }
 10578  
 10579  // PageToken sets the optional parameter "pageToken": If non-empty,
 10580  // `page_token` should contain a next_page_token from a previous
 10581  // ListDatabaseOperationsResponse to the same `parent` and with the same
 10582  // `filter`.
 10583  func (c *ProjectsInstancesDatabaseOperationsListCall) PageToken(pageToken string) *ProjectsInstancesDatabaseOperationsListCall {
 10584  	c.urlParams_.Set("pageToken", pageToken)
 10585  	return c
 10586  }
 10587  
 10588  // Fields allows partial responses to be retrieved. See
 10589  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10590  // details.
 10591  func (c *ProjectsInstancesDatabaseOperationsListCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabaseOperationsListCall {
 10592  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10593  	return c
 10594  }
 10595  
 10596  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 10597  // object's ETag matches the given value. This is useful for getting updates
 10598  // only after the object has changed since the last request.
 10599  func (c *ProjectsInstancesDatabaseOperationsListCall) IfNoneMatch(entityTag string) *ProjectsInstancesDatabaseOperationsListCall {
 10600  	c.ifNoneMatch_ = entityTag
 10601  	return c
 10602  }
 10603  
 10604  // Context sets the context to be used in this call's Do method.
 10605  func (c *ProjectsInstancesDatabaseOperationsListCall) Context(ctx context.Context) *ProjectsInstancesDatabaseOperationsListCall {
 10606  	c.ctx_ = ctx
 10607  	return c
 10608  }
 10609  
 10610  // Header returns a http.Header that can be modified by the caller to add
 10611  // headers to the request.
 10612  func (c *ProjectsInstancesDatabaseOperationsListCall) Header() http.Header {
 10613  	if c.header_ == nil {
 10614  		c.header_ = make(http.Header)
 10615  	}
 10616  	return c.header_
 10617  }
 10618  
 10619  func (c *ProjectsInstancesDatabaseOperationsListCall) doRequest(alt string) (*http.Response, error) {
 10620  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10621  	if c.ifNoneMatch_ != "" {
 10622  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 10623  	}
 10624  	var body io.Reader = nil
 10625  	c.urlParams_.Set("alt", alt)
 10626  	c.urlParams_.Set("prettyPrint", "false")
 10627  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/databaseOperations")
 10628  	urls += "?" + c.urlParams_.Encode()
 10629  	req, err := http.NewRequest("GET", urls, body)
 10630  	if err != nil {
 10631  		return nil, err
 10632  	}
 10633  	req.Header = reqHeaders
 10634  	googleapi.Expand(req.URL, map[string]string{
 10635  		"parent": c.parent,
 10636  	})
 10637  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10638  }
 10639  
 10640  // Do executes the "spanner.projects.instances.databaseOperations.list" call.
 10641  // Any non-2xx status code is an error. Response headers are in either
 10642  // *ListDatabaseOperationsResponse.ServerResponse.Header or (if a response was
 10643  // returned at all) in error.(*googleapi.Error).Header. Use
 10644  // googleapi.IsNotModified to check whether the returned error was because
 10645  // http.StatusNotModified was returned.
 10646  func (c *ProjectsInstancesDatabaseOperationsListCall) Do(opts ...googleapi.CallOption) (*ListDatabaseOperationsResponse, error) {
 10647  	gensupport.SetOptions(c.urlParams_, opts...)
 10648  	res, err := c.doRequest("json")
 10649  	if res != nil && res.StatusCode == http.StatusNotModified {
 10650  		if res.Body != nil {
 10651  			res.Body.Close()
 10652  		}
 10653  		return nil, gensupport.WrapError(&googleapi.Error{
 10654  			Code:   res.StatusCode,
 10655  			Header: res.Header,
 10656  		})
 10657  	}
 10658  	if err != nil {
 10659  		return nil, err
 10660  	}
 10661  	defer googleapi.CloseBody(res)
 10662  	if err := googleapi.CheckResponse(res); err != nil {
 10663  		return nil, gensupport.WrapError(err)
 10664  	}
 10665  	ret := &ListDatabaseOperationsResponse{
 10666  		ServerResponse: googleapi.ServerResponse{
 10667  			Header:         res.Header,
 10668  			HTTPStatusCode: res.StatusCode,
 10669  		},
 10670  	}
 10671  	target := &ret
 10672  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10673  		return nil, err
 10674  	}
 10675  	return ret, nil
 10676  }
 10677  
 10678  // Pages invokes f for each page of results.
 10679  // A non-nil error returned from f will halt the iteration.
 10680  // The provided context supersedes any context provided to the Context method.
 10681  func (c *ProjectsInstancesDatabaseOperationsListCall) Pages(ctx context.Context, f func(*ListDatabaseOperationsResponse) error) error {
 10682  	c.ctx_ = ctx
 10683  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 10684  	for {
 10685  		x, err := c.Do()
 10686  		if err != nil {
 10687  			return err
 10688  		}
 10689  		if err := f(x); err != nil {
 10690  			return err
 10691  		}
 10692  		if x.NextPageToken == "" {
 10693  			return nil
 10694  		}
 10695  		c.PageToken(x.NextPageToken)
 10696  	}
 10697  }
 10698  
 10699  type ProjectsInstancesDatabasesCreateCall struct {
 10700  	s                     *Service
 10701  	parent                string
 10702  	createdatabaserequest *CreateDatabaseRequest
 10703  	urlParams_            gensupport.URLParams
 10704  	ctx_                  context.Context
 10705  	header_               http.Header
 10706  }
 10707  
 10708  // Create: Creates a new Cloud Spanner database and starts to prepare it for
 10709  // serving. The returned long-running operation will have a name of the format
 10710  // `/operations/` and can be used to track preparation of the database. The
 10711  // metadata field type is CreateDatabaseMetadata. The response field type is
 10712  // Database, if successful.
 10713  //
 10714  //   - parent: The name of the instance that will serve the new database. Values
 10715  //     are of the form `projects//instances/`.
 10716  func (r *ProjectsInstancesDatabasesService) Create(parent string, createdatabaserequest *CreateDatabaseRequest) *ProjectsInstancesDatabasesCreateCall {
 10717  	c := &ProjectsInstancesDatabasesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10718  	c.parent = parent
 10719  	c.createdatabaserequest = createdatabaserequest
 10720  	return c
 10721  }
 10722  
 10723  // Fields allows partial responses to be retrieved. See
 10724  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10725  // details.
 10726  func (c *ProjectsInstancesDatabasesCreateCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesCreateCall {
 10727  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10728  	return c
 10729  }
 10730  
 10731  // Context sets the context to be used in this call's Do method.
 10732  func (c *ProjectsInstancesDatabasesCreateCall) Context(ctx context.Context) *ProjectsInstancesDatabasesCreateCall {
 10733  	c.ctx_ = ctx
 10734  	return c
 10735  }
 10736  
 10737  // Header returns a http.Header that can be modified by the caller to add
 10738  // headers to the request.
 10739  func (c *ProjectsInstancesDatabasesCreateCall) Header() http.Header {
 10740  	if c.header_ == nil {
 10741  		c.header_ = make(http.Header)
 10742  	}
 10743  	return c.header_
 10744  }
 10745  
 10746  func (c *ProjectsInstancesDatabasesCreateCall) doRequest(alt string) (*http.Response, error) {
 10747  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 10748  	var body io.Reader = nil
 10749  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.createdatabaserequest)
 10750  	if err != nil {
 10751  		return nil, err
 10752  	}
 10753  	c.urlParams_.Set("alt", alt)
 10754  	c.urlParams_.Set("prettyPrint", "false")
 10755  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/databases")
 10756  	urls += "?" + c.urlParams_.Encode()
 10757  	req, err := http.NewRequest("POST", urls, body)
 10758  	if err != nil {
 10759  		return nil, err
 10760  	}
 10761  	req.Header = reqHeaders
 10762  	googleapi.Expand(req.URL, map[string]string{
 10763  		"parent": c.parent,
 10764  	})
 10765  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10766  }
 10767  
 10768  // Do executes the "spanner.projects.instances.databases.create" call.
 10769  // Any non-2xx status code is an error. Response headers are in either
 10770  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 10771  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10772  // whether the returned error was because http.StatusNotModified was returned.
 10773  func (c *ProjectsInstancesDatabasesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 10774  	gensupport.SetOptions(c.urlParams_, opts...)
 10775  	res, err := c.doRequest("json")
 10776  	if res != nil && res.StatusCode == http.StatusNotModified {
 10777  		if res.Body != nil {
 10778  			res.Body.Close()
 10779  		}
 10780  		return nil, gensupport.WrapError(&googleapi.Error{
 10781  			Code:   res.StatusCode,
 10782  			Header: res.Header,
 10783  		})
 10784  	}
 10785  	if err != nil {
 10786  		return nil, err
 10787  	}
 10788  	defer googleapi.CloseBody(res)
 10789  	if err := googleapi.CheckResponse(res); err != nil {
 10790  		return nil, gensupport.WrapError(err)
 10791  	}
 10792  	ret := &Operation{
 10793  		ServerResponse: googleapi.ServerResponse{
 10794  			Header:         res.Header,
 10795  			HTTPStatusCode: res.StatusCode,
 10796  		},
 10797  	}
 10798  	target := &ret
 10799  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10800  		return nil, err
 10801  	}
 10802  	return ret, nil
 10803  }
 10804  
 10805  type ProjectsInstancesDatabasesDropDatabaseCall struct {
 10806  	s          *Service
 10807  	database   string
 10808  	urlParams_ gensupport.URLParams
 10809  	ctx_       context.Context
 10810  	header_    http.Header
 10811  }
 10812  
 10813  // DropDatabase: Drops (aka deletes) a Cloud Spanner database. Completed
 10814  // backups for the database will be retained according to their `expire_time`.
 10815  // Note: Cloud Spanner might continue to accept requests for a few seconds
 10816  // after the database has been deleted.
 10817  //
 10818  // - database: The database to be dropped.
 10819  func (r *ProjectsInstancesDatabasesService) DropDatabase(database string) *ProjectsInstancesDatabasesDropDatabaseCall {
 10820  	c := &ProjectsInstancesDatabasesDropDatabaseCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10821  	c.database = database
 10822  	return c
 10823  }
 10824  
 10825  // Fields allows partial responses to be retrieved. See
 10826  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10827  // details.
 10828  func (c *ProjectsInstancesDatabasesDropDatabaseCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesDropDatabaseCall {
 10829  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10830  	return c
 10831  }
 10832  
 10833  // Context sets the context to be used in this call's Do method.
 10834  func (c *ProjectsInstancesDatabasesDropDatabaseCall) Context(ctx context.Context) *ProjectsInstancesDatabasesDropDatabaseCall {
 10835  	c.ctx_ = ctx
 10836  	return c
 10837  }
 10838  
 10839  // Header returns a http.Header that can be modified by the caller to add
 10840  // headers to the request.
 10841  func (c *ProjectsInstancesDatabasesDropDatabaseCall) Header() http.Header {
 10842  	if c.header_ == nil {
 10843  		c.header_ = make(http.Header)
 10844  	}
 10845  	return c.header_
 10846  }
 10847  
 10848  func (c *ProjectsInstancesDatabasesDropDatabaseCall) doRequest(alt string) (*http.Response, error) {
 10849  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10850  	var body io.Reader = nil
 10851  	c.urlParams_.Set("alt", alt)
 10852  	c.urlParams_.Set("prettyPrint", "false")
 10853  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+database}")
 10854  	urls += "?" + c.urlParams_.Encode()
 10855  	req, err := http.NewRequest("DELETE", urls, body)
 10856  	if err != nil {
 10857  		return nil, err
 10858  	}
 10859  	req.Header = reqHeaders
 10860  	googleapi.Expand(req.URL, map[string]string{
 10861  		"database": c.database,
 10862  	})
 10863  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10864  }
 10865  
 10866  // Do executes the "spanner.projects.instances.databases.dropDatabase" call.
 10867  // Any non-2xx status code is an error. Response headers are in either
 10868  // *Empty.ServerResponse.Header or (if a response was returned at all) in
 10869  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10870  // whether the returned error was because http.StatusNotModified was returned.
 10871  func (c *ProjectsInstancesDatabasesDropDatabaseCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
 10872  	gensupport.SetOptions(c.urlParams_, opts...)
 10873  	res, err := c.doRequest("json")
 10874  	if res != nil && res.StatusCode == http.StatusNotModified {
 10875  		if res.Body != nil {
 10876  			res.Body.Close()
 10877  		}
 10878  		return nil, gensupport.WrapError(&googleapi.Error{
 10879  			Code:   res.StatusCode,
 10880  			Header: res.Header,
 10881  		})
 10882  	}
 10883  	if err != nil {
 10884  		return nil, err
 10885  	}
 10886  	defer googleapi.CloseBody(res)
 10887  	if err := googleapi.CheckResponse(res); err != nil {
 10888  		return nil, gensupport.WrapError(err)
 10889  	}
 10890  	ret := &Empty{
 10891  		ServerResponse: googleapi.ServerResponse{
 10892  			Header:         res.Header,
 10893  			HTTPStatusCode: res.StatusCode,
 10894  		},
 10895  	}
 10896  	target := &ret
 10897  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10898  		return nil, err
 10899  	}
 10900  	return ret, nil
 10901  }
 10902  
 10903  type ProjectsInstancesDatabasesGetCall struct {
 10904  	s            *Service
 10905  	name         string
 10906  	urlParams_   gensupport.URLParams
 10907  	ifNoneMatch_ string
 10908  	ctx_         context.Context
 10909  	header_      http.Header
 10910  }
 10911  
 10912  // Get: Gets the state of a Cloud Spanner database.
 10913  //
 10914  //   - name: The name of the requested database. Values are of the form
 10915  //     `projects//instances//databases/`.
 10916  func (r *ProjectsInstancesDatabasesService) Get(name string) *ProjectsInstancesDatabasesGetCall {
 10917  	c := &ProjectsInstancesDatabasesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10918  	c.name = name
 10919  	return c
 10920  }
 10921  
 10922  // Fields allows partial responses to be retrieved. See
 10923  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10924  // details.
 10925  func (c *ProjectsInstancesDatabasesGetCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesGetCall {
 10926  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10927  	return c
 10928  }
 10929  
 10930  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 10931  // object's ETag matches the given value. This is useful for getting updates
 10932  // only after the object has changed since the last request.
 10933  func (c *ProjectsInstancesDatabasesGetCall) IfNoneMatch(entityTag string) *ProjectsInstancesDatabasesGetCall {
 10934  	c.ifNoneMatch_ = entityTag
 10935  	return c
 10936  }
 10937  
 10938  // Context sets the context to be used in this call's Do method.
 10939  func (c *ProjectsInstancesDatabasesGetCall) Context(ctx context.Context) *ProjectsInstancesDatabasesGetCall {
 10940  	c.ctx_ = ctx
 10941  	return c
 10942  }
 10943  
 10944  // Header returns a http.Header that can be modified by the caller to add
 10945  // headers to the request.
 10946  func (c *ProjectsInstancesDatabasesGetCall) Header() http.Header {
 10947  	if c.header_ == nil {
 10948  		c.header_ = make(http.Header)
 10949  	}
 10950  	return c.header_
 10951  }
 10952  
 10953  func (c *ProjectsInstancesDatabasesGetCall) doRequest(alt string) (*http.Response, error) {
 10954  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10955  	if c.ifNoneMatch_ != "" {
 10956  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 10957  	}
 10958  	var body io.Reader = nil
 10959  	c.urlParams_.Set("alt", alt)
 10960  	c.urlParams_.Set("prettyPrint", "false")
 10961  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 10962  	urls += "?" + c.urlParams_.Encode()
 10963  	req, err := http.NewRequest("GET", urls, body)
 10964  	if err != nil {
 10965  		return nil, err
 10966  	}
 10967  	req.Header = reqHeaders
 10968  	googleapi.Expand(req.URL, map[string]string{
 10969  		"name": c.name,
 10970  	})
 10971  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10972  }
 10973  
 10974  // Do executes the "spanner.projects.instances.databases.get" call.
 10975  // Any non-2xx status code is an error. Response headers are in either
 10976  // *Database.ServerResponse.Header or (if a response was returned at all) in
 10977  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10978  // whether the returned error was because http.StatusNotModified was returned.
 10979  func (c *ProjectsInstancesDatabasesGetCall) Do(opts ...googleapi.CallOption) (*Database, error) {
 10980  	gensupport.SetOptions(c.urlParams_, opts...)
 10981  	res, err := c.doRequest("json")
 10982  	if res != nil && res.StatusCode == http.StatusNotModified {
 10983  		if res.Body != nil {
 10984  			res.Body.Close()
 10985  		}
 10986  		return nil, gensupport.WrapError(&googleapi.Error{
 10987  			Code:   res.StatusCode,
 10988  			Header: res.Header,
 10989  		})
 10990  	}
 10991  	if err != nil {
 10992  		return nil, err
 10993  	}
 10994  	defer googleapi.CloseBody(res)
 10995  	if err := googleapi.CheckResponse(res); err != nil {
 10996  		return nil, gensupport.WrapError(err)
 10997  	}
 10998  	ret := &Database{
 10999  		ServerResponse: googleapi.ServerResponse{
 11000  			Header:         res.Header,
 11001  			HTTPStatusCode: res.StatusCode,
 11002  		},
 11003  	}
 11004  	target := &ret
 11005  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11006  		return nil, err
 11007  	}
 11008  	return ret, nil
 11009  }
 11010  
 11011  type ProjectsInstancesDatabasesGetDdlCall struct {
 11012  	s            *Service
 11013  	database     string
 11014  	urlParams_   gensupport.URLParams
 11015  	ifNoneMatch_ string
 11016  	ctx_         context.Context
 11017  	header_      http.Header
 11018  }
 11019  
 11020  // GetDdl: Returns the schema of a Cloud Spanner database as a list of
 11021  // formatted DDL statements. This method does not show pending schema updates,
 11022  // those may be queried using the Operations API.
 11023  //
 11024  //   - database: The database whose schema we wish to get. Values are of the form
 11025  //     `projects//instances//databases/`.
 11026  func (r *ProjectsInstancesDatabasesService) GetDdl(database string) *ProjectsInstancesDatabasesGetDdlCall {
 11027  	c := &ProjectsInstancesDatabasesGetDdlCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11028  	c.database = database
 11029  	return c
 11030  }
 11031  
 11032  // Fields allows partial responses to be retrieved. See
 11033  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11034  // details.
 11035  func (c *ProjectsInstancesDatabasesGetDdlCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesGetDdlCall {
 11036  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11037  	return c
 11038  }
 11039  
 11040  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 11041  // object's ETag matches the given value. This is useful for getting updates
 11042  // only after the object has changed since the last request.
 11043  func (c *ProjectsInstancesDatabasesGetDdlCall) IfNoneMatch(entityTag string) *ProjectsInstancesDatabasesGetDdlCall {
 11044  	c.ifNoneMatch_ = entityTag
 11045  	return c
 11046  }
 11047  
 11048  // Context sets the context to be used in this call's Do method.
 11049  func (c *ProjectsInstancesDatabasesGetDdlCall) Context(ctx context.Context) *ProjectsInstancesDatabasesGetDdlCall {
 11050  	c.ctx_ = ctx
 11051  	return c
 11052  }
 11053  
 11054  // Header returns a http.Header that can be modified by the caller to add
 11055  // headers to the request.
 11056  func (c *ProjectsInstancesDatabasesGetDdlCall) Header() http.Header {
 11057  	if c.header_ == nil {
 11058  		c.header_ = make(http.Header)
 11059  	}
 11060  	return c.header_
 11061  }
 11062  
 11063  func (c *ProjectsInstancesDatabasesGetDdlCall) doRequest(alt string) (*http.Response, error) {
 11064  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 11065  	if c.ifNoneMatch_ != "" {
 11066  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 11067  	}
 11068  	var body io.Reader = nil
 11069  	c.urlParams_.Set("alt", alt)
 11070  	c.urlParams_.Set("prettyPrint", "false")
 11071  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+database}/ddl")
 11072  	urls += "?" + c.urlParams_.Encode()
 11073  	req, err := http.NewRequest("GET", urls, body)
 11074  	if err != nil {
 11075  		return nil, err
 11076  	}
 11077  	req.Header = reqHeaders
 11078  	googleapi.Expand(req.URL, map[string]string{
 11079  		"database": c.database,
 11080  	})
 11081  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11082  }
 11083  
 11084  // Do executes the "spanner.projects.instances.databases.getDdl" call.
 11085  // Any non-2xx status code is an error. Response headers are in either
 11086  // *GetDatabaseDdlResponse.ServerResponse.Header or (if a response was returned
 11087  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 11088  // check whether the returned error was because http.StatusNotModified was
 11089  // returned.
 11090  func (c *ProjectsInstancesDatabasesGetDdlCall) Do(opts ...googleapi.CallOption) (*GetDatabaseDdlResponse, error) {
 11091  	gensupport.SetOptions(c.urlParams_, opts...)
 11092  	res, err := c.doRequest("json")
 11093  	if res != nil && res.StatusCode == http.StatusNotModified {
 11094  		if res.Body != nil {
 11095  			res.Body.Close()
 11096  		}
 11097  		return nil, gensupport.WrapError(&googleapi.Error{
 11098  			Code:   res.StatusCode,
 11099  			Header: res.Header,
 11100  		})
 11101  	}
 11102  	if err != nil {
 11103  		return nil, err
 11104  	}
 11105  	defer googleapi.CloseBody(res)
 11106  	if err := googleapi.CheckResponse(res); err != nil {
 11107  		return nil, gensupport.WrapError(err)
 11108  	}
 11109  	ret := &GetDatabaseDdlResponse{
 11110  		ServerResponse: googleapi.ServerResponse{
 11111  			Header:         res.Header,
 11112  			HTTPStatusCode: res.StatusCode,
 11113  		},
 11114  	}
 11115  	target := &ret
 11116  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11117  		return nil, err
 11118  	}
 11119  	return ret, nil
 11120  }
 11121  
 11122  type ProjectsInstancesDatabasesGetIamPolicyCall struct {
 11123  	s                   *Service
 11124  	resource            string
 11125  	getiampolicyrequest *GetIamPolicyRequest
 11126  	urlParams_          gensupport.URLParams
 11127  	ctx_                context.Context
 11128  	header_             http.Header
 11129  }
 11130  
 11131  // GetIamPolicy: Gets the access control policy for a database or backup
 11132  // resource. Returns an empty policy if a database or backup exists but does
 11133  // not have a policy set. Authorization requires
 11134  // `spanner.databases.getIamPolicy` permission on resource. For backups,
 11135  // authorization requires `spanner.backups.getIamPolicy` permission on
 11136  // resource.
 11137  //
 11138  //   - resource: REQUIRED: The Cloud Spanner resource for which the policy is
 11139  //     being retrieved. The format is `projects//instances/` for instance
 11140  //     resources and `projects//instances//databases/` for database resources.
 11141  func (r *ProjectsInstancesDatabasesService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsInstancesDatabasesGetIamPolicyCall {
 11142  	c := &ProjectsInstancesDatabasesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11143  	c.resource = resource
 11144  	c.getiampolicyrequest = getiampolicyrequest
 11145  	return c
 11146  }
 11147  
 11148  // Fields allows partial responses to be retrieved. See
 11149  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11150  // details.
 11151  func (c *ProjectsInstancesDatabasesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesGetIamPolicyCall {
 11152  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11153  	return c
 11154  }
 11155  
 11156  // Context sets the context to be used in this call's Do method.
 11157  func (c *ProjectsInstancesDatabasesGetIamPolicyCall) Context(ctx context.Context) *ProjectsInstancesDatabasesGetIamPolicyCall {
 11158  	c.ctx_ = ctx
 11159  	return c
 11160  }
 11161  
 11162  // Header returns a http.Header that can be modified by the caller to add
 11163  // headers to the request.
 11164  func (c *ProjectsInstancesDatabasesGetIamPolicyCall) Header() http.Header {
 11165  	if c.header_ == nil {
 11166  		c.header_ = make(http.Header)
 11167  	}
 11168  	return c.header_
 11169  }
 11170  
 11171  func (c *ProjectsInstancesDatabasesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
 11172  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 11173  	var body io.Reader = nil
 11174  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
 11175  	if err != nil {
 11176  		return nil, err
 11177  	}
 11178  	c.urlParams_.Set("alt", alt)
 11179  	c.urlParams_.Set("prettyPrint", "false")
 11180  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
 11181  	urls += "?" + c.urlParams_.Encode()
 11182  	req, err := http.NewRequest("POST", urls, body)
 11183  	if err != nil {
 11184  		return nil, err
 11185  	}
 11186  	req.Header = reqHeaders
 11187  	googleapi.Expand(req.URL, map[string]string{
 11188  		"resource": c.resource,
 11189  	})
 11190  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11191  }
 11192  
 11193  // Do executes the "spanner.projects.instances.databases.getIamPolicy" call.
 11194  // Any non-2xx status code is an error. Response headers are in either
 11195  // *Policy.ServerResponse.Header or (if a response was returned at all) in
 11196  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 11197  // whether the returned error was because http.StatusNotModified was returned.
 11198  func (c *ProjectsInstancesDatabasesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
 11199  	gensupport.SetOptions(c.urlParams_, opts...)
 11200  	res, err := c.doRequest("json")
 11201  	if res != nil && res.StatusCode == http.StatusNotModified {
 11202  		if res.Body != nil {
 11203  			res.Body.Close()
 11204  		}
 11205  		return nil, gensupport.WrapError(&googleapi.Error{
 11206  			Code:   res.StatusCode,
 11207  			Header: res.Header,
 11208  		})
 11209  	}
 11210  	if err != nil {
 11211  		return nil, err
 11212  	}
 11213  	defer googleapi.CloseBody(res)
 11214  	if err := googleapi.CheckResponse(res); err != nil {
 11215  		return nil, gensupport.WrapError(err)
 11216  	}
 11217  	ret := &Policy{
 11218  		ServerResponse: googleapi.ServerResponse{
 11219  			Header:         res.Header,
 11220  			HTTPStatusCode: res.StatusCode,
 11221  		},
 11222  	}
 11223  	target := &ret
 11224  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11225  		return nil, err
 11226  	}
 11227  	return ret, nil
 11228  }
 11229  
 11230  type ProjectsInstancesDatabasesGetScansCall struct {
 11231  	s            *Service
 11232  	name         string
 11233  	urlParams_   gensupport.URLParams
 11234  	ifNoneMatch_ string
 11235  	ctx_         context.Context
 11236  	header_      http.Header
 11237  }
 11238  
 11239  // GetScans: Request a specific scan with Database-specific data for Cloud Key
 11240  // Visualizer.
 11241  //
 11242  //   - name: The unique name of the scan containing the requested information,
 11243  //     specific to the Database service implementing this interface.
 11244  func (r *ProjectsInstancesDatabasesService) GetScans(name string) *ProjectsInstancesDatabasesGetScansCall {
 11245  	c := &ProjectsInstancesDatabasesGetScansCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11246  	c.name = name
 11247  	return c
 11248  }
 11249  
 11250  // EndTime sets the optional parameter "endTime": The upper bound for the time
 11251  // range to retrieve Scan data for.
 11252  func (c *ProjectsInstancesDatabasesGetScansCall) EndTime(endTime string) *ProjectsInstancesDatabasesGetScansCall {
 11253  	c.urlParams_.Set("endTime", endTime)
 11254  	return c
 11255  }
 11256  
 11257  // StartTime sets the optional parameter "startTime": These fields restrict the
 11258  // Database-specific information returned in the `Scan.data` field. If a `View`
 11259  // is provided that does not include the `Scan.data` field, these are ignored.
 11260  // This range of time must be entirely contained within the defined time range
 11261  // of the targeted scan. The lower bound for the time range to retrieve Scan
 11262  // data for.
 11263  func (c *ProjectsInstancesDatabasesGetScansCall) StartTime(startTime string) *ProjectsInstancesDatabasesGetScansCall {
 11264  	c.urlParams_.Set("startTime", startTime)
 11265  	return c
 11266  }
 11267  
 11268  // View sets the optional parameter "view": Specifies which parts of the Scan
 11269  // should be returned in the response. Note, if left unspecified, the FULL view
 11270  // is assumed.
 11271  //
 11272  // Possible values:
 11273  //
 11274  //	"VIEW_UNSPECIFIED" - Not specified, equivalent to SUMMARY.
 11275  //	"SUMMARY" - Server responses only include `name`, `details`, `start_time`
 11276  //
 11277  // and `end_time`. The default value. Note, the ListScans method may only use
 11278  // this view type, others view types are not supported.
 11279  //
 11280  //	"FULL" - Full representation of the scan is returned in the server
 11281  //
 11282  // response, including `data`.
 11283  func (c *ProjectsInstancesDatabasesGetScansCall) View(view string) *ProjectsInstancesDatabasesGetScansCall {
 11284  	c.urlParams_.Set("view", view)
 11285  	return c
 11286  }
 11287  
 11288  // Fields allows partial responses to be retrieved. See
 11289  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11290  // details.
 11291  func (c *ProjectsInstancesDatabasesGetScansCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesGetScansCall {
 11292  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11293  	return c
 11294  }
 11295  
 11296  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 11297  // object's ETag matches the given value. This is useful for getting updates
 11298  // only after the object has changed since the last request.
 11299  func (c *ProjectsInstancesDatabasesGetScansCall) IfNoneMatch(entityTag string) *ProjectsInstancesDatabasesGetScansCall {
 11300  	c.ifNoneMatch_ = entityTag
 11301  	return c
 11302  }
 11303  
 11304  // Context sets the context to be used in this call's Do method.
 11305  func (c *ProjectsInstancesDatabasesGetScansCall) Context(ctx context.Context) *ProjectsInstancesDatabasesGetScansCall {
 11306  	c.ctx_ = ctx
 11307  	return c
 11308  }
 11309  
 11310  // Header returns a http.Header that can be modified by the caller to add
 11311  // headers to the request.
 11312  func (c *ProjectsInstancesDatabasesGetScansCall) Header() http.Header {
 11313  	if c.header_ == nil {
 11314  		c.header_ = make(http.Header)
 11315  	}
 11316  	return c.header_
 11317  }
 11318  
 11319  func (c *ProjectsInstancesDatabasesGetScansCall) doRequest(alt string) (*http.Response, error) {
 11320  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 11321  	if c.ifNoneMatch_ != "" {
 11322  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 11323  	}
 11324  	var body io.Reader = nil
 11325  	c.urlParams_.Set("alt", alt)
 11326  	c.urlParams_.Set("prettyPrint", "false")
 11327  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/scans")
 11328  	urls += "?" + c.urlParams_.Encode()
 11329  	req, err := http.NewRequest("GET", urls, body)
 11330  	if err != nil {
 11331  		return nil, err
 11332  	}
 11333  	req.Header = reqHeaders
 11334  	googleapi.Expand(req.URL, map[string]string{
 11335  		"name": c.name,
 11336  	})
 11337  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11338  }
 11339  
 11340  // Do executes the "spanner.projects.instances.databases.getScans" call.
 11341  // Any non-2xx status code is an error. Response headers are in either
 11342  // *Scan.ServerResponse.Header or (if a response was returned at all) in
 11343  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 11344  // whether the returned error was because http.StatusNotModified was returned.
 11345  func (c *ProjectsInstancesDatabasesGetScansCall) Do(opts ...googleapi.CallOption) (*Scan, error) {
 11346  	gensupport.SetOptions(c.urlParams_, opts...)
 11347  	res, err := c.doRequest("json")
 11348  	if res != nil && res.StatusCode == http.StatusNotModified {
 11349  		if res.Body != nil {
 11350  			res.Body.Close()
 11351  		}
 11352  		return nil, gensupport.WrapError(&googleapi.Error{
 11353  			Code:   res.StatusCode,
 11354  			Header: res.Header,
 11355  		})
 11356  	}
 11357  	if err != nil {
 11358  		return nil, err
 11359  	}
 11360  	defer googleapi.CloseBody(res)
 11361  	if err := googleapi.CheckResponse(res); err != nil {
 11362  		return nil, gensupport.WrapError(err)
 11363  	}
 11364  	ret := &Scan{
 11365  		ServerResponse: googleapi.ServerResponse{
 11366  			Header:         res.Header,
 11367  			HTTPStatusCode: res.StatusCode,
 11368  		},
 11369  	}
 11370  	target := &ret
 11371  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11372  		return nil, err
 11373  	}
 11374  	return ret, nil
 11375  }
 11376  
 11377  type ProjectsInstancesDatabasesListCall struct {
 11378  	s            *Service
 11379  	parent       string
 11380  	urlParams_   gensupport.URLParams
 11381  	ifNoneMatch_ string
 11382  	ctx_         context.Context
 11383  	header_      http.Header
 11384  }
 11385  
 11386  // List: Lists Cloud Spanner databases.
 11387  //
 11388  //   - parent: The instance whose databases should be listed. Values are of the
 11389  //     form `projects//instances/`.
 11390  func (r *ProjectsInstancesDatabasesService) List(parent string) *ProjectsInstancesDatabasesListCall {
 11391  	c := &ProjectsInstancesDatabasesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11392  	c.parent = parent
 11393  	return c
 11394  }
 11395  
 11396  // PageSize sets the optional parameter "pageSize": Number of databases to be
 11397  // returned in the response. If 0 or less, defaults to the server's maximum
 11398  // allowed page size.
 11399  func (c *ProjectsInstancesDatabasesListCall) PageSize(pageSize int64) *ProjectsInstancesDatabasesListCall {
 11400  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 11401  	return c
 11402  }
 11403  
 11404  // PageToken sets the optional parameter "pageToken": If non-empty,
 11405  // `page_token` should contain a next_page_token from a previous
 11406  // ListDatabasesResponse.
 11407  func (c *ProjectsInstancesDatabasesListCall) PageToken(pageToken string) *ProjectsInstancesDatabasesListCall {
 11408  	c.urlParams_.Set("pageToken", pageToken)
 11409  	return c
 11410  }
 11411  
 11412  // Fields allows partial responses to be retrieved. See
 11413  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11414  // details.
 11415  func (c *ProjectsInstancesDatabasesListCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesListCall {
 11416  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11417  	return c
 11418  }
 11419  
 11420  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 11421  // object's ETag matches the given value. This is useful for getting updates
 11422  // only after the object has changed since the last request.
 11423  func (c *ProjectsInstancesDatabasesListCall) IfNoneMatch(entityTag string) *ProjectsInstancesDatabasesListCall {
 11424  	c.ifNoneMatch_ = entityTag
 11425  	return c
 11426  }
 11427  
 11428  // Context sets the context to be used in this call's Do method.
 11429  func (c *ProjectsInstancesDatabasesListCall) Context(ctx context.Context) *ProjectsInstancesDatabasesListCall {
 11430  	c.ctx_ = ctx
 11431  	return c
 11432  }
 11433  
 11434  // Header returns a http.Header that can be modified by the caller to add
 11435  // headers to the request.
 11436  func (c *ProjectsInstancesDatabasesListCall) Header() http.Header {
 11437  	if c.header_ == nil {
 11438  		c.header_ = make(http.Header)
 11439  	}
 11440  	return c.header_
 11441  }
 11442  
 11443  func (c *ProjectsInstancesDatabasesListCall) doRequest(alt string) (*http.Response, error) {
 11444  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 11445  	if c.ifNoneMatch_ != "" {
 11446  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 11447  	}
 11448  	var body io.Reader = nil
 11449  	c.urlParams_.Set("alt", alt)
 11450  	c.urlParams_.Set("prettyPrint", "false")
 11451  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/databases")
 11452  	urls += "?" + c.urlParams_.Encode()
 11453  	req, err := http.NewRequest("GET", urls, body)
 11454  	if err != nil {
 11455  		return nil, err
 11456  	}
 11457  	req.Header = reqHeaders
 11458  	googleapi.Expand(req.URL, map[string]string{
 11459  		"parent": c.parent,
 11460  	})
 11461  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11462  }
 11463  
 11464  // Do executes the "spanner.projects.instances.databases.list" call.
 11465  // Any non-2xx status code is an error. Response headers are in either
 11466  // *ListDatabasesResponse.ServerResponse.Header or (if a response was returned
 11467  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 11468  // check whether the returned error was because http.StatusNotModified was
 11469  // returned.
 11470  func (c *ProjectsInstancesDatabasesListCall) Do(opts ...googleapi.CallOption) (*ListDatabasesResponse, error) {
 11471  	gensupport.SetOptions(c.urlParams_, opts...)
 11472  	res, err := c.doRequest("json")
 11473  	if res != nil && res.StatusCode == http.StatusNotModified {
 11474  		if res.Body != nil {
 11475  			res.Body.Close()
 11476  		}
 11477  		return nil, gensupport.WrapError(&googleapi.Error{
 11478  			Code:   res.StatusCode,
 11479  			Header: res.Header,
 11480  		})
 11481  	}
 11482  	if err != nil {
 11483  		return nil, err
 11484  	}
 11485  	defer googleapi.CloseBody(res)
 11486  	if err := googleapi.CheckResponse(res); err != nil {
 11487  		return nil, gensupport.WrapError(err)
 11488  	}
 11489  	ret := &ListDatabasesResponse{
 11490  		ServerResponse: googleapi.ServerResponse{
 11491  			Header:         res.Header,
 11492  			HTTPStatusCode: res.StatusCode,
 11493  		},
 11494  	}
 11495  	target := &ret
 11496  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11497  		return nil, err
 11498  	}
 11499  	return ret, nil
 11500  }
 11501  
 11502  // Pages invokes f for each page of results.
 11503  // A non-nil error returned from f will halt the iteration.
 11504  // The provided context supersedes any context provided to the Context method.
 11505  func (c *ProjectsInstancesDatabasesListCall) Pages(ctx context.Context, f func(*ListDatabasesResponse) error) error {
 11506  	c.ctx_ = ctx
 11507  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 11508  	for {
 11509  		x, err := c.Do()
 11510  		if err != nil {
 11511  			return err
 11512  		}
 11513  		if err := f(x); err != nil {
 11514  			return err
 11515  		}
 11516  		if x.NextPageToken == "" {
 11517  			return nil
 11518  		}
 11519  		c.PageToken(x.NextPageToken)
 11520  	}
 11521  }
 11522  
 11523  type ProjectsInstancesDatabasesPatchCall struct {
 11524  	s          *Service
 11525  	name       string
 11526  	database   *Database
 11527  	urlParams_ gensupport.URLParams
 11528  	ctx_       context.Context
 11529  	header_    http.Header
 11530  }
 11531  
 11532  // Patch: Updates a Cloud Spanner database. The returned long-running operation
 11533  // can be used to track the progress of updating the database. If the named
 11534  // database does not exist, returns `NOT_FOUND`. While the operation is
 11535  // pending: * The database's reconciling field is set to true. * Cancelling the
 11536  // operation is best-effort. If the cancellation succeeds, the operation
 11537  // metadata's cancel_time is set, the updates are reverted, and the operation
 11538  // terminates with a `CANCELLED` status. * New UpdateDatabase requests will
 11539  // return a `FAILED_PRECONDITION` error until the pending operation is done
 11540  // (returns successfully or with error). * Reading the database via the API
 11541  // continues to give the pre-request values. Upon completion of the returned
 11542  // operation: * The new values are in effect and readable via the API. * The
 11543  // database's reconciling field becomes false. The returned long-running
 11544  // operation will have a name of the format
 11545  // `projects//instances//databases//operations/` and can be used to track the
 11546  // database modification. The metadata field type is UpdateDatabaseMetadata.
 11547  // The response field type is Database, if successful.
 11548  //
 11549  //   - name: The name of the database. Values are of the form
 11550  //     `projects//instances//databases/`, where “ is as specified in the `CREATE
 11551  //     DATABASE` statement. This name can be passed to other API methods to
 11552  //     identify the database.
 11553  func (r *ProjectsInstancesDatabasesService) Patch(name string, database *Database) *ProjectsInstancesDatabasesPatchCall {
 11554  	c := &ProjectsInstancesDatabasesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11555  	c.name = name
 11556  	c.database = database
 11557  	return c
 11558  }
 11559  
 11560  // UpdateMask sets the optional parameter "updateMask": Required. The list of
 11561  // fields to update. Currently, only `enable_drop_protection` field can be
 11562  // updated.
 11563  func (c *ProjectsInstancesDatabasesPatchCall) UpdateMask(updateMask string) *ProjectsInstancesDatabasesPatchCall {
 11564  	c.urlParams_.Set("updateMask", updateMask)
 11565  	return c
 11566  }
 11567  
 11568  // Fields allows partial responses to be retrieved. See
 11569  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11570  // details.
 11571  func (c *ProjectsInstancesDatabasesPatchCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesPatchCall {
 11572  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11573  	return c
 11574  }
 11575  
 11576  // Context sets the context to be used in this call's Do method.
 11577  func (c *ProjectsInstancesDatabasesPatchCall) Context(ctx context.Context) *ProjectsInstancesDatabasesPatchCall {
 11578  	c.ctx_ = ctx
 11579  	return c
 11580  }
 11581  
 11582  // Header returns a http.Header that can be modified by the caller to add
 11583  // headers to the request.
 11584  func (c *ProjectsInstancesDatabasesPatchCall) Header() http.Header {
 11585  	if c.header_ == nil {
 11586  		c.header_ = make(http.Header)
 11587  	}
 11588  	return c.header_
 11589  }
 11590  
 11591  func (c *ProjectsInstancesDatabasesPatchCall) doRequest(alt string) (*http.Response, error) {
 11592  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 11593  	var body io.Reader = nil
 11594  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.database)
 11595  	if err != nil {
 11596  		return nil, err
 11597  	}
 11598  	c.urlParams_.Set("alt", alt)
 11599  	c.urlParams_.Set("prettyPrint", "false")
 11600  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 11601  	urls += "?" + c.urlParams_.Encode()
 11602  	req, err := http.NewRequest("PATCH", urls, body)
 11603  	if err != nil {
 11604  		return nil, err
 11605  	}
 11606  	req.Header = reqHeaders
 11607  	googleapi.Expand(req.URL, map[string]string{
 11608  		"name": c.name,
 11609  	})
 11610  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11611  }
 11612  
 11613  // Do executes the "spanner.projects.instances.databases.patch" call.
 11614  // Any non-2xx status code is an error. Response headers are in either
 11615  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 11616  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 11617  // whether the returned error was because http.StatusNotModified was returned.
 11618  func (c *ProjectsInstancesDatabasesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 11619  	gensupport.SetOptions(c.urlParams_, opts...)
 11620  	res, err := c.doRequest("json")
 11621  	if res != nil && res.StatusCode == http.StatusNotModified {
 11622  		if res.Body != nil {
 11623  			res.Body.Close()
 11624  		}
 11625  		return nil, gensupport.WrapError(&googleapi.Error{
 11626  			Code:   res.StatusCode,
 11627  			Header: res.Header,
 11628  		})
 11629  	}
 11630  	if err != nil {
 11631  		return nil, err
 11632  	}
 11633  	defer googleapi.CloseBody(res)
 11634  	if err := googleapi.CheckResponse(res); err != nil {
 11635  		return nil, gensupport.WrapError(err)
 11636  	}
 11637  	ret := &Operation{
 11638  		ServerResponse: googleapi.ServerResponse{
 11639  			Header:         res.Header,
 11640  			HTTPStatusCode: res.StatusCode,
 11641  		},
 11642  	}
 11643  	target := &ret
 11644  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11645  		return nil, err
 11646  	}
 11647  	return ret, nil
 11648  }
 11649  
 11650  type ProjectsInstancesDatabasesRestoreCall struct {
 11651  	s                      *Service
 11652  	parent                 string
 11653  	restoredatabaserequest *RestoreDatabaseRequest
 11654  	urlParams_             gensupport.URLParams
 11655  	ctx_                   context.Context
 11656  	header_                http.Header
 11657  }
 11658  
 11659  // Restore: Create a new database by restoring from a completed backup. The new
 11660  // database must be in the same project and in an instance with the same
 11661  // instance configuration as the instance containing the backup. The returned
 11662  // database long-running operation has a name of the format
 11663  // `projects//instances//databases//operations/`, and can be used to track the
 11664  // progress of the operation, and to cancel it. The metadata field type is
 11665  // RestoreDatabaseMetadata. The response type is Database, if successful.
 11666  // Cancelling the returned operation will stop the restore and delete the
 11667  // database. There can be only one database being restored into an instance at
 11668  // a time. Once the restore operation completes, a new restore operation can be
 11669  // initiated, without waiting for the optimize operation associated with the
 11670  // first restore to complete.
 11671  //
 11672  //   - parent: The name of the instance in which to create the restored database.
 11673  //     This instance must be in the same project and have the same instance
 11674  //     configuration as the instance containing the source backup. Values are of
 11675  //     the form `projects//instances/`.
 11676  func (r *ProjectsInstancesDatabasesService) Restore(parent string, restoredatabaserequest *RestoreDatabaseRequest) *ProjectsInstancesDatabasesRestoreCall {
 11677  	c := &ProjectsInstancesDatabasesRestoreCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11678  	c.parent = parent
 11679  	c.restoredatabaserequest = restoredatabaserequest
 11680  	return c
 11681  }
 11682  
 11683  // Fields allows partial responses to be retrieved. See
 11684  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11685  // details.
 11686  func (c *ProjectsInstancesDatabasesRestoreCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesRestoreCall {
 11687  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11688  	return c
 11689  }
 11690  
 11691  // Context sets the context to be used in this call's Do method.
 11692  func (c *ProjectsInstancesDatabasesRestoreCall) Context(ctx context.Context) *ProjectsInstancesDatabasesRestoreCall {
 11693  	c.ctx_ = ctx
 11694  	return c
 11695  }
 11696  
 11697  // Header returns a http.Header that can be modified by the caller to add
 11698  // headers to the request.
 11699  func (c *ProjectsInstancesDatabasesRestoreCall) Header() http.Header {
 11700  	if c.header_ == nil {
 11701  		c.header_ = make(http.Header)
 11702  	}
 11703  	return c.header_
 11704  }
 11705  
 11706  func (c *ProjectsInstancesDatabasesRestoreCall) doRequest(alt string) (*http.Response, error) {
 11707  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 11708  	var body io.Reader = nil
 11709  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.restoredatabaserequest)
 11710  	if err != nil {
 11711  		return nil, err
 11712  	}
 11713  	c.urlParams_.Set("alt", alt)
 11714  	c.urlParams_.Set("prettyPrint", "false")
 11715  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/databases:restore")
 11716  	urls += "?" + c.urlParams_.Encode()
 11717  	req, err := http.NewRequest("POST", urls, body)
 11718  	if err != nil {
 11719  		return nil, err
 11720  	}
 11721  	req.Header = reqHeaders
 11722  	googleapi.Expand(req.URL, map[string]string{
 11723  		"parent": c.parent,
 11724  	})
 11725  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11726  }
 11727  
 11728  // Do executes the "spanner.projects.instances.databases.restore" call.
 11729  // Any non-2xx status code is an error. Response headers are in either
 11730  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 11731  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 11732  // whether the returned error was because http.StatusNotModified was returned.
 11733  func (c *ProjectsInstancesDatabasesRestoreCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 11734  	gensupport.SetOptions(c.urlParams_, opts...)
 11735  	res, err := c.doRequest("json")
 11736  	if res != nil && res.StatusCode == http.StatusNotModified {
 11737  		if res.Body != nil {
 11738  			res.Body.Close()
 11739  		}
 11740  		return nil, gensupport.WrapError(&googleapi.Error{
 11741  			Code:   res.StatusCode,
 11742  			Header: res.Header,
 11743  		})
 11744  	}
 11745  	if err != nil {
 11746  		return nil, err
 11747  	}
 11748  	defer googleapi.CloseBody(res)
 11749  	if err := googleapi.CheckResponse(res); err != nil {
 11750  		return nil, gensupport.WrapError(err)
 11751  	}
 11752  	ret := &Operation{
 11753  		ServerResponse: googleapi.ServerResponse{
 11754  			Header:         res.Header,
 11755  			HTTPStatusCode: res.StatusCode,
 11756  		},
 11757  	}
 11758  	target := &ret
 11759  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11760  		return nil, err
 11761  	}
 11762  	return ret, nil
 11763  }
 11764  
 11765  type ProjectsInstancesDatabasesSetIamPolicyCall struct {
 11766  	s                   *Service
 11767  	resource            string
 11768  	setiampolicyrequest *SetIamPolicyRequest
 11769  	urlParams_          gensupport.URLParams
 11770  	ctx_                context.Context
 11771  	header_             http.Header
 11772  }
 11773  
 11774  // SetIamPolicy: Sets the access control policy on a database or backup
 11775  // resource. Replaces any existing policy. Authorization requires
 11776  // `spanner.databases.setIamPolicy` permission on resource. For backups,
 11777  // authorization requires `spanner.backups.setIamPolicy` permission on
 11778  // resource.
 11779  //
 11780  //   - resource: REQUIRED: The Cloud Spanner resource for which the policy is
 11781  //     being set. The format is `projects//instances/` for instance resources and
 11782  //     `projects//instances//databases/` for databases resources.
 11783  func (r *ProjectsInstancesDatabasesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsInstancesDatabasesSetIamPolicyCall {
 11784  	c := &ProjectsInstancesDatabasesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11785  	c.resource = resource
 11786  	c.setiampolicyrequest = setiampolicyrequest
 11787  	return c
 11788  }
 11789  
 11790  // Fields allows partial responses to be retrieved. See
 11791  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11792  // details.
 11793  func (c *ProjectsInstancesDatabasesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesSetIamPolicyCall {
 11794  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11795  	return c
 11796  }
 11797  
 11798  // Context sets the context to be used in this call's Do method.
 11799  func (c *ProjectsInstancesDatabasesSetIamPolicyCall) Context(ctx context.Context) *ProjectsInstancesDatabasesSetIamPolicyCall {
 11800  	c.ctx_ = ctx
 11801  	return c
 11802  }
 11803  
 11804  // Header returns a http.Header that can be modified by the caller to add
 11805  // headers to the request.
 11806  func (c *ProjectsInstancesDatabasesSetIamPolicyCall) Header() http.Header {
 11807  	if c.header_ == nil {
 11808  		c.header_ = make(http.Header)
 11809  	}
 11810  	return c.header_
 11811  }
 11812  
 11813  func (c *ProjectsInstancesDatabasesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
 11814  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 11815  	var body io.Reader = nil
 11816  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
 11817  	if err != nil {
 11818  		return nil, err
 11819  	}
 11820  	c.urlParams_.Set("alt", alt)
 11821  	c.urlParams_.Set("prettyPrint", "false")
 11822  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
 11823  	urls += "?" + c.urlParams_.Encode()
 11824  	req, err := http.NewRequest("POST", urls, body)
 11825  	if err != nil {
 11826  		return nil, err
 11827  	}
 11828  	req.Header = reqHeaders
 11829  	googleapi.Expand(req.URL, map[string]string{
 11830  		"resource": c.resource,
 11831  	})
 11832  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11833  }
 11834  
 11835  // Do executes the "spanner.projects.instances.databases.setIamPolicy" call.
 11836  // Any non-2xx status code is an error. Response headers are in either
 11837  // *Policy.ServerResponse.Header or (if a response was returned at all) in
 11838  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 11839  // whether the returned error was because http.StatusNotModified was returned.
 11840  func (c *ProjectsInstancesDatabasesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
 11841  	gensupport.SetOptions(c.urlParams_, opts...)
 11842  	res, err := c.doRequest("json")
 11843  	if res != nil && res.StatusCode == http.StatusNotModified {
 11844  		if res.Body != nil {
 11845  			res.Body.Close()
 11846  		}
 11847  		return nil, gensupport.WrapError(&googleapi.Error{
 11848  			Code:   res.StatusCode,
 11849  			Header: res.Header,
 11850  		})
 11851  	}
 11852  	if err != nil {
 11853  		return nil, err
 11854  	}
 11855  	defer googleapi.CloseBody(res)
 11856  	if err := googleapi.CheckResponse(res); err != nil {
 11857  		return nil, gensupport.WrapError(err)
 11858  	}
 11859  	ret := &Policy{
 11860  		ServerResponse: googleapi.ServerResponse{
 11861  			Header:         res.Header,
 11862  			HTTPStatusCode: res.StatusCode,
 11863  		},
 11864  	}
 11865  	target := &ret
 11866  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11867  		return nil, err
 11868  	}
 11869  	return ret, nil
 11870  }
 11871  
 11872  type ProjectsInstancesDatabasesTestIamPermissionsCall struct {
 11873  	s                         *Service
 11874  	resource                  string
 11875  	testiampermissionsrequest *TestIamPermissionsRequest
 11876  	urlParams_                gensupport.URLParams
 11877  	ctx_                      context.Context
 11878  	header_                   http.Header
 11879  }
 11880  
 11881  // TestIamPermissions: Returns permissions that the caller has on the specified
 11882  // database or backup resource. Attempting this RPC on a non-existent Cloud
 11883  // Spanner database will result in a NOT_FOUND error if the user has
 11884  // `spanner.databases.list` permission on the containing Cloud Spanner
 11885  // instance. Otherwise returns an empty set of permissions. Calling this method
 11886  // on a backup that does not exist will result in a NOT_FOUND error if the user
 11887  // has `spanner.backups.list` permission on the containing instance.
 11888  //
 11889  //   - resource: REQUIRED: The Cloud Spanner resource for which permissions are
 11890  //     being tested. The format is `projects//instances/` for instance resources
 11891  //     and `projects//instances//databases/` for database resources.
 11892  func (r *ProjectsInstancesDatabasesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsInstancesDatabasesTestIamPermissionsCall {
 11893  	c := &ProjectsInstancesDatabasesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11894  	c.resource = resource
 11895  	c.testiampermissionsrequest = testiampermissionsrequest
 11896  	return c
 11897  }
 11898  
 11899  // Fields allows partial responses to be retrieved. See
 11900  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11901  // details.
 11902  func (c *ProjectsInstancesDatabasesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesTestIamPermissionsCall {
 11903  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11904  	return c
 11905  }
 11906  
 11907  // Context sets the context to be used in this call's Do method.
 11908  func (c *ProjectsInstancesDatabasesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsInstancesDatabasesTestIamPermissionsCall {
 11909  	c.ctx_ = ctx
 11910  	return c
 11911  }
 11912  
 11913  // Header returns a http.Header that can be modified by the caller to add
 11914  // headers to the request.
 11915  func (c *ProjectsInstancesDatabasesTestIamPermissionsCall) Header() http.Header {
 11916  	if c.header_ == nil {
 11917  		c.header_ = make(http.Header)
 11918  	}
 11919  	return c.header_
 11920  }
 11921  
 11922  func (c *ProjectsInstancesDatabasesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
 11923  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 11924  	var body io.Reader = nil
 11925  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
 11926  	if err != nil {
 11927  		return nil, err
 11928  	}
 11929  	c.urlParams_.Set("alt", alt)
 11930  	c.urlParams_.Set("prettyPrint", "false")
 11931  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
 11932  	urls += "?" + c.urlParams_.Encode()
 11933  	req, err := http.NewRequest("POST", urls, body)
 11934  	if err != nil {
 11935  		return nil, err
 11936  	}
 11937  	req.Header = reqHeaders
 11938  	googleapi.Expand(req.URL, map[string]string{
 11939  		"resource": c.resource,
 11940  	})
 11941  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11942  }
 11943  
 11944  // Do executes the "spanner.projects.instances.databases.testIamPermissions" call.
 11945  // Any non-2xx status code is an error. Response headers are in either
 11946  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
 11947  // returned at all) in error.(*googleapi.Error).Header. Use
 11948  // googleapi.IsNotModified to check whether the returned error was because
 11949  // http.StatusNotModified was returned.
 11950  func (c *ProjectsInstancesDatabasesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
 11951  	gensupport.SetOptions(c.urlParams_, opts...)
 11952  	res, err := c.doRequest("json")
 11953  	if res != nil && res.StatusCode == http.StatusNotModified {
 11954  		if res.Body != nil {
 11955  			res.Body.Close()
 11956  		}
 11957  		return nil, gensupport.WrapError(&googleapi.Error{
 11958  			Code:   res.StatusCode,
 11959  			Header: res.Header,
 11960  		})
 11961  	}
 11962  	if err != nil {
 11963  		return nil, err
 11964  	}
 11965  	defer googleapi.CloseBody(res)
 11966  	if err := googleapi.CheckResponse(res); err != nil {
 11967  		return nil, gensupport.WrapError(err)
 11968  	}
 11969  	ret := &TestIamPermissionsResponse{
 11970  		ServerResponse: googleapi.ServerResponse{
 11971  			Header:         res.Header,
 11972  			HTTPStatusCode: res.StatusCode,
 11973  		},
 11974  	}
 11975  	target := &ret
 11976  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11977  		return nil, err
 11978  	}
 11979  	return ret, nil
 11980  }
 11981  
 11982  type ProjectsInstancesDatabasesUpdateDdlCall struct {
 11983  	s                        *Service
 11984  	database                 string
 11985  	updatedatabaseddlrequest *UpdateDatabaseDdlRequest
 11986  	urlParams_               gensupport.URLParams
 11987  	ctx_                     context.Context
 11988  	header_                  http.Header
 11989  }
 11990  
 11991  // UpdateDdl: Updates the schema of a Cloud Spanner database by
 11992  // creating/altering/dropping tables, columns, indexes, etc. The returned
 11993  // long-running operation will have a name of the format `/operations/` and can
 11994  // be used to track execution of the schema change(s). The metadata field type
 11995  // is UpdateDatabaseDdlMetadata. The operation has no response.
 11996  //
 11997  // - database: The database to update.
 11998  func (r *ProjectsInstancesDatabasesService) UpdateDdl(database string, updatedatabaseddlrequest *UpdateDatabaseDdlRequest) *ProjectsInstancesDatabasesUpdateDdlCall {
 11999  	c := &ProjectsInstancesDatabasesUpdateDdlCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12000  	c.database = database
 12001  	c.updatedatabaseddlrequest = updatedatabaseddlrequest
 12002  	return c
 12003  }
 12004  
 12005  // Fields allows partial responses to be retrieved. See
 12006  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12007  // details.
 12008  func (c *ProjectsInstancesDatabasesUpdateDdlCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesUpdateDdlCall {
 12009  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12010  	return c
 12011  }
 12012  
 12013  // Context sets the context to be used in this call's Do method.
 12014  func (c *ProjectsInstancesDatabasesUpdateDdlCall) Context(ctx context.Context) *ProjectsInstancesDatabasesUpdateDdlCall {
 12015  	c.ctx_ = ctx
 12016  	return c
 12017  }
 12018  
 12019  // Header returns a http.Header that can be modified by the caller to add
 12020  // headers to the request.
 12021  func (c *ProjectsInstancesDatabasesUpdateDdlCall) Header() http.Header {
 12022  	if c.header_ == nil {
 12023  		c.header_ = make(http.Header)
 12024  	}
 12025  	return c.header_
 12026  }
 12027  
 12028  func (c *ProjectsInstancesDatabasesUpdateDdlCall) doRequest(alt string) (*http.Response, error) {
 12029  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 12030  	var body io.Reader = nil
 12031  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.updatedatabaseddlrequest)
 12032  	if err != nil {
 12033  		return nil, err
 12034  	}
 12035  	c.urlParams_.Set("alt", alt)
 12036  	c.urlParams_.Set("prettyPrint", "false")
 12037  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+database}/ddl")
 12038  	urls += "?" + c.urlParams_.Encode()
 12039  	req, err := http.NewRequest("PATCH", urls, body)
 12040  	if err != nil {
 12041  		return nil, err
 12042  	}
 12043  	req.Header = reqHeaders
 12044  	googleapi.Expand(req.URL, map[string]string{
 12045  		"database": c.database,
 12046  	})
 12047  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12048  }
 12049  
 12050  // Do executes the "spanner.projects.instances.databases.updateDdl" call.
 12051  // Any non-2xx status code is an error. Response headers are in either
 12052  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 12053  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 12054  // whether the returned error was because http.StatusNotModified was returned.
 12055  func (c *ProjectsInstancesDatabasesUpdateDdlCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 12056  	gensupport.SetOptions(c.urlParams_, opts...)
 12057  	res, err := c.doRequest("json")
 12058  	if res != nil && res.StatusCode == http.StatusNotModified {
 12059  		if res.Body != nil {
 12060  			res.Body.Close()
 12061  		}
 12062  		return nil, gensupport.WrapError(&googleapi.Error{
 12063  			Code:   res.StatusCode,
 12064  			Header: res.Header,
 12065  		})
 12066  	}
 12067  	if err != nil {
 12068  		return nil, err
 12069  	}
 12070  	defer googleapi.CloseBody(res)
 12071  	if err := googleapi.CheckResponse(res); err != nil {
 12072  		return nil, gensupport.WrapError(err)
 12073  	}
 12074  	ret := &Operation{
 12075  		ServerResponse: googleapi.ServerResponse{
 12076  			Header:         res.Header,
 12077  			HTTPStatusCode: res.StatusCode,
 12078  		},
 12079  	}
 12080  	target := &ret
 12081  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12082  		return nil, err
 12083  	}
 12084  	return ret, nil
 12085  }
 12086  
 12087  type ProjectsInstancesDatabasesDatabaseRolesListCall struct {
 12088  	s            *Service
 12089  	parent       string
 12090  	urlParams_   gensupport.URLParams
 12091  	ifNoneMatch_ string
 12092  	ctx_         context.Context
 12093  	header_      http.Header
 12094  }
 12095  
 12096  // List: Lists Cloud Spanner database roles.
 12097  //
 12098  //   - parent: The database whose roles should be listed. Values are of the form
 12099  //     `projects//instances//databases/`.
 12100  func (r *ProjectsInstancesDatabasesDatabaseRolesService) List(parent string) *ProjectsInstancesDatabasesDatabaseRolesListCall {
 12101  	c := &ProjectsInstancesDatabasesDatabaseRolesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12102  	c.parent = parent
 12103  	return c
 12104  }
 12105  
 12106  // PageSize sets the optional parameter "pageSize": Number of database roles to
 12107  // be returned in the response. If 0 or less, defaults to the server's maximum
 12108  // allowed page size.
 12109  func (c *ProjectsInstancesDatabasesDatabaseRolesListCall) PageSize(pageSize int64) *ProjectsInstancesDatabasesDatabaseRolesListCall {
 12110  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 12111  	return c
 12112  }
 12113  
 12114  // PageToken sets the optional parameter "pageToken": If non-empty,
 12115  // `page_token` should contain a next_page_token from a previous
 12116  // ListDatabaseRolesResponse.
 12117  func (c *ProjectsInstancesDatabasesDatabaseRolesListCall) PageToken(pageToken string) *ProjectsInstancesDatabasesDatabaseRolesListCall {
 12118  	c.urlParams_.Set("pageToken", pageToken)
 12119  	return c
 12120  }
 12121  
 12122  // Fields allows partial responses to be retrieved. See
 12123  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12124  // details.
 12125  func (c *ProjectsInstancesDatabasesDatabaseRolesListCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesDatabaseRolesListCall {
 12126  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12127  	return c
 12128  }
 12129  
 12130  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 12131  // object's ETag matches the given value. This is useful for getting updates
 12132  // only after the object has changed since the last request.
 12133  func (c *ProjectsInstancesDatabasesDatabaseRolesListCall) IfNoneMatch(entityTag string) *ProjectsInstancesDatabasesDatabaseRolesListCall {
 12134  	c.ifNoneMatch_ = entityTag
 12135  	return c
 12136  }
 12137  
 12138  // Context sets the context to be used in this call's Do method.
 12139  func (c *ProjectsInstancesDatabasesDatabaseRolesListCall) Context(ctx context.Context) *ProjectsInstancesDatabasesDatabaseRolesListCall {
 12140  	c.ctx_ = ctx
 12141  	return c
 12142  }
 12143  
 12144  // Header returns a http.Header that can be modified by the caller to add
 12145  // headers to the request.
 12146  func (c *ProjectsInstancesDatabasesDatabaseRolesListCall) Header() http.Header {
 12147  	if c.header_ == nil {
 12148  		c.header_ = make(http.Header)
 12149  	}
 12150  	return c.header_
 12151  }
 12152  
 12153  func (c *ProjectsInstancesDatabasesDatabaseRolesListCall) doRequest(alt string) (*http.Response, error) {
 12154  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 12155  	if c.ifNoneMatch_ != "" {
 12156  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 12157  	}
 12158  	var body io.Reader = nil
 12159  	c.urlParams_.Set("alt", alt)
 12160  	c.urlParams_.Set("prettyPrint", "false")
 12161  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/databaseRoles")
 12162  	urls += "?" + c.urlParams_.Encode()
 12163  	req, err := http.NewRequest("GET", urls, body)
 12164  	if err != nil {
 12165  		return nil, err
 12166  	}
 12167  	req.Header = reqHeaders
 12168  	googleapi.Expand(req.URL, map[string]string{
 12169  		"parent": c.parent,
 12170  	})
 12171  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12172  }
 12173  
 12174  // Do executes the "spanner.projects.instances.databases.databaseRoles.list" call.
 12175  // Any non-2xx status code is an error. Response headers are in either
 12176  // *ListDatabaseRolesResponse.ServerResponse.Header or (if a response was
 12177  // returned at all) in error.(*googleapi.Error).Header. Use
 12178  // googleapi.IsNotModified to check whether the returned error was because
 12179  // http.StatusNotModified was returned.
 12180  func (c *ProjectsInstancesDatabasesDatabaseRolesListCall) Do(opts ...googleapi.CallOption) (*ListDatabaseRolesResponse, error) {
 12181  	gensupport.SetOptions(c.urlParams_, opts...)
 12182  	res, err := c.doRequest("json")
 12183  	if res != nil && res.StatusCode == http.StatusNotModified {
 12184  		if res.Body != nil {
 12185  			res.Body.Close()
 12186  		}
 12187  		return nil, gensupport.WrapError(&googleapi.Error{
 12188  			Code:   res.StatusCode,
 12189  			Header: res.Header,
 12190  		})
 12191  	}
 12192  	if err != nil {
 12193  		return nil, err
 12194  	}
 12195  	defer googleapi.CloseBody(res)
 12196  	if err := googleapi.CheckResponse(res); err != nil {
 12197  		return nil, gensupport.WrapError(err)
 12198  	}
 12199  	ret := &ListDatabaseRolesResponse{
 12200  		ServerResponse: googleapi.ServerResponse{
 12201  			Header:         res.Header,
 12202  			HTTPStatusCode: res.StatusCode,
 12203  		},
 12204  	}
 12205  	target := &ret
 12206  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12207  		return nil, err
 12208  	}
 12209  	return ret, nil
 12210  }
 12211  
 12212  // Pages invokes f for each page of results.
 12213  // A non-nil error returned from f will halt the iteration.
 12214  // The provided context supersedes any context provided to the Context method.
 12215  func (c *ProjectsInstancesDatabasesDatabaseRolesListCall) Pages(ctx context.Context, f func(*ListDatabaseRolesResponse) error) error {
 12216  	c.ctx_ = ctx
 12217  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 12218  	for {
 12219  		x, err := c.Do()
 12220  		if err != nil {
 12221  			return err
 12222  		}
 12223  		if err := f(x); err != nil {
 12224  			return err
 12225  		}
 12226  		if x.NextPageToken == "" {
 12227  			return nil
 12228  		}
 12229  		c.PageToken(x.NextPageToken)
 12230  	}
 12231  }
 12232  
 12233  type ProjectsInstancesDatabasesDatabaseRolesTestIamPermissionsCall struct {
 12234  	s                         *Service
 12235  	resource                  string
 12236  	testiampermissionsrequest *TestIamPermissionsRequest
 12237  	urlParams_                gensupport.URLParams
 12238  	ctx_                      context.Context
 12239  	header_                   http.Header
 12240  }
 12241  
 12242  // TestIamPermissions: Returns permissions that the caller has on the specified
 12243  // database or backup resource. Attempting this RPC on a non-existent Cloud
 12244  // Spanner database will result in a NOT_FOUND error if the user has
 12245  // `spanner.databases.list` permission on the containing Cloud Spanner
 12246  // instance. Otherwise returns an empty set of permissions. Calling this method
 12247  // on a backup that does not exist will result in a NOT_FOUND error if the user
 12248  // has `spanner.backups.list` permission on the containing instance.
 12249  //
 12250  //   - resource: REQUIRED: The Cloud Spanner resource for which permissions are
 12251  //     being tested. The format is `projects//instances/` for instance resources
 12252  //     and `projects//instances//databases/` for database resources.
 12253  func (r *ProjectsInstancesDatabasesDatabaseRolesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsInstancesDatabasesDatabaseRolesTestIamPermissionsCall {
 12254  	c := &ProjectsInstancesDatabasesDatabaseRolesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12255  	c.resource = resource
 12256  	c.testiampermissionsrequest = testiampermissionsrequest
 12257  	return c
 12258  }
 12259  
 12260  // Fields allows partial responses to be retrieved. See
 12261  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12262  // details.
 12263  func (c *ProjectsInstancesDatabasesDatabaseRolesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesDatabaseRolesTestIamPermissionsCall {
 12264  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12265  	return c
 12266  }
 12267  
 12268  // Context sets the context to be used in this call's Do method.
 12269  func (c *ProjectsInstancesDatabasesDatabaseRolesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsInstancesDatabasesDatabaseRolesTestIamPermissionsCall {
 12270  	c.ctx_ = ctx
 12271  	return c
 12272  }
 12273  
 12274  // Header returns a http.Header that can be modified by the caller to add
 12275  // headers to the request.
 12276  func (c *ProjectsInstancesDatabasesDatabaseRolesTestIamPermissionsCall) Header() http.Header {
 12277  	if c.header_ == nil {
 12278  		c.header_ = make(http.Header)
 12279  	}
 12280  	return c.header_
 12281  }
 12282  
 12283  func (c *ProjectsInstancesDatabasesDatabaseRolesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
 12284  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 12285  	var body io.Reader = nil
 12286  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
 12287  	if err != nil {
 12288  		return nil, err
 12289  	}
 12290  	c.urlParams_.Set("alt", alt)
 12291  	c.urlParams_.Set("prettyPrint", "false")
 12292  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
 12293  	urls += "?" + c.urlParams_.Encode()
 12294  	req, err := http.NewRequest("POST", urls, body)
 12295  	if err != nil {
 12296  		return nil, err
 12297  	}
 12298  	req.Header = reqHeaders
 12299  	googleapi.Expand(req.URL, map[string]string{
 12300  		"resource": c.resource,
 12301  	})
 12302  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12303  }
 12304  
 12305  // Do executes the "spanner.projects.instances.databases.databaseRoles.testIamPermissions" call.
 12306  // Any non-2xx status code is an error. Response headers are in either
 12307  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
 12308  // returned at all) in error.(*googleapi.Error).Header. Use
 12309  // googleapi.IsNotModified to check whether the returned error was because
 12310  // http.StatusNotModified was returned.
 12311  func (c *ProjectsInstancesDatabasesDatabaseRolesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
 12312  	gensupport.SetOptions(c.urlParams_, opts...)
 12313  	res, err := c.doRequest("json")
 12314  	if res != nil && res.StatusCode == http.StatusNotModified {
 12315  		if res.Body != nil {
 12316  			res.Body.Close()
 12317  		}
 12318  		return nil, gensupport.WrapError(&googleapi.Error{
 12319  			Code:   res.StatusCode,
 12320  			Header: res.Header,
 12321  		})
 12322  	}
 12323  	if err != nil {
 12324  		return nil, err
 12325  	}
 12326  	defer googleapi.CloseBody(res)
 12327  	if err := googleapi.CheckResponse(res); err != nil {
 12328  		return nil, gensupport.WrapError(err)
 12329  	}
 12330  	ret := &TestIamPermissionsResponse{
 12331  		ServerResponse: googleapi.ServerResponse{
 12332  			Header:         res.Header,
 12333  			HTTPStatusCode: res.StatusCode,
 12334  		},
 12335  	}
 12336  	target := &ret
 12337  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12338  		return nil, err
 12339  	}
 12340  	return ret, nil
 12341  }
 12342  
 12343  type ProjectsInstancesDatabasesOperationsCancelCall struct {
 12344  	s          *Service
 12345  	name       string
 12346  	urlParams_ gensupport.URLParams
 12347  	ctx_       context.Context
 12348  	header_    http.Header
 12349  }
 12350  
 12351  // Cancel: Starts asynchronous cancellation on a long-running operation. The
 12352  // server makes a best effort to cancel the operation, but success is not
 12353  // guaranteed. If the server doesn't support this method, it returns
 12354  // `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or
 12355  // other methods to check whether the cancellation succeeded or whether the
 12356  // operation completed despite cancellation. On successful cancellation, the
 12357  // operation is not deleted; instead, it becomes an operation with an
 12358  // Operation.error value with a google.rpc.Status.code of 1, corresponding to
 12359  // `Code.CANCELLED`.
 12360  //
 12361  // - name: The name of the operation resource to be cancelled.
 12362  func (r *ProjectsInstancesDatabasesOperationsService) Cancel(name string) *ProjectsInstancesDatabasesOperationsCancelCall {
 12363  	c := &ProjectsInstancesDatabasesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12364  	c.name = name
 12365  	return c
 12366  }
 12367  
 12368  // Fields allows partial responses to be retrieved. See
 12369  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12370  // details.
 12371  func (c *ProjectsInstancesDatabasesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesOperationsCancelCall {
 12372  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12373  	return c
 12374  }
 12375  
 12376  // Context sets the context to be used in this call's Do method.
 12377  func (c *ProjectsInstancesDatabasesOperationsCancelCall) Context(ctx context.Context) *ProjectsInstancesDatabasesOperationsCancelCall {
 12378  	c.ctx_ = ctx
 12379  	return c
 12380  }
 12381  
 12382  // Header returns a http.Header that can be modified by the caller to add
 12383  // headers to the request.
 12384  func (c *ProjectsInstancesDatabasesOperationsCancelCall) Header() http.Header {
 12385  	if c.header_ == nil {
 12386  		c.header_ = make(http.Header)
 12387  	}
 12388  	return c.header_
 12389  }
 12390  
 12391  func (c *ProjectsInstancesDatabasesOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
 12392  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 12393  	var body io.Reader = nil
 12394  	c.urlParams_.Set("alt", alt)
 12395  	c.urlParams_.Set("prettyPrint", "false")
 12396  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
 12397  	urls += "?" + c.urlParams_.Encode()
 12398  	req, err := http.NewRequest("POST", urls, body)
 12399  	if err != nil {
 12400  		return nil, err
 12401  	}
 12402  	req.Header = reqHeaders
 12403  	googleapi.Expand(req.URL, map[string]string{
 12404  		"name": c.name,
 12405  	})
 12406  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12407  }
 12408  
 12409  // Do executes the "spanner.projects.instances.databases.operations.cancel" call.
 12410  // Any non-2xx status code is an error. Response headers are in either
 12411  // *Empty.ServerResponse.Header or (if a response was returned at all) in
 12412  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 12413  // whether the returned error was because http.StatusNotModified was returned.
 12414  func (c *ProjectsInstancesDatabasesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
 12415  	gensupport.SetOptions(c.urlParams_, opts...)
 12416  	res, err := c.doRequest("json")
 12417  	if res != nil && res.StatusCode == http.StatusNotModified {
 12418  		if res.Body != nil {
 12419  			res.Body.Close()
 12420  		}
 12421  		return nil, gensupport.WrapError(&googleapi.Error{
 12422  			Code:   res.StatusCode,
 12423  			Header: res.Header,
 12424  		})
 12425  	}
 12426  	if err != nil {
 12427  		return nil, err
 12428  	}
 12429  	defer googleapi.CloseBody(res)
 12430  	if err := googleapi.CheckResponse(res); err != nil {
 12431  		return nil, gensupport.WrapError(err)
 12432  	}
 12433  	ret := &Empty{
 12434  		ServerResponse: googleapi.ServerResponse{
 12435  			Header:         res.Header,
 12436  			HTTPStatusCode: res.StatusCode,
 12437  		},
 12438  	}
 12439  	target := &ret
 12440  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12441  		return nil, err
 12442  	}
 12443  	return ret, nil
 12444  }
 12445  
 12446  type ProjectsInstancesDatabasesOperationsDeleteCall struct {
 12447  	s          *Service
 12448  	name       string
 12449  	urlParams_ gensupport.URLParams
 12450  	ctx_       context.Context
 12451  	header_    http.Header
 12452  }
 12453  
 12454  // Delete: Deletes a long-running operation. This method indicates that the
 12455  // client is no longer interested in the operation result. It does not cancel
 12456  // the operation. If the server doesn't support this method, it returns
 12457  // `google.rpc.Code.UNIMPLEMENTED`.
 12458  //
 12459  // - name: The name of the operation resource to be deleted.
 12460  func (r *ProjectsInstancesDatabasesOperationsService) Delete(name string) *ProjectsInstancesDatabasesOperationsDeleteCall {
 12461  	c := &ProjectsInstancesDatabasesOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12462  	c.name = name
 12463  	return c
 12464  }
 12465  
 12466  // Fields allows partial responses to be retrieved. See
 12467  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12468  // details.
 12469  func (c *ProjectsInstancesDatabasesOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesOperationsDeleteCall {
 12470  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12471  	return c
 12472  }
 12473  
 12474  // Context sets the context to be used in this call's Do method.
 12475  func (c *ProjectsInstancesDatabasesOperationsDeleteCall) Context(ctx context.Context) *ProjectsInstancesDatabasesOperationsDeleteCall {
 12476  	c.ctx_ = ctx
 12477  	return c
 12478  }
 12479  
 12480  // Header returns a http.Header that can be modified by the caller to add
 12481  // headers to the request.
 12482  func (c *ProjectsInstancesDatabasesOperationsDeleteCall) Header() http.Header {
 12483  	if c.header_ == nil {
 12484  		c.header_ = make(http.Header)
 12485  	}
 12486  	return c.header_
 12487  }
 12488  
 12489  func (c *ProjectsInstancesDatabasesOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
 12490  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 12491  	var body io.Reader = nil
 12492  	c.urlParams_.Set("alt", alt)
 12493  	c.urlParams_.Set("prettyPrint", "false")
 12494  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 12495  	urls += "?" + c.urlParams_.Encode()
 12496  	req, err := http.NewRequest("DELETE", urls, body)
 12497  	if err != nil {
 12498  		return nil, err
 12499  	}
 12500  	req.Header = reqHeaders
 12501  	googleapi.Expand(req.URL, map[string]string{
 12502  		"name": c.name,
 12503  	})
 12504  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12505  }
 12506  
 12507  // Do executes the "spanner.projects.instances.databases.operations.delete" call.
 12508  // Any non-2xx status code is an error. Response headers are in either
 12509  // *Empty.ServerResponse.Header or (if a response was returned at all) in
 12510  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 12511  // whether the returned error was because http.StatusNotModified was returned.
 12512  func (c *ProjectsInstancesDatabasesOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
 12513  	gensupport.SetOptions(c.urlParams_, opts...)
 12514  	res, err := c.doRequest("json")
 12515  	if res != nil && res.StatusCode == http.StatusNotModified {
 12516  		if res.Body != nil {
 12517  			res.Body.Close()
 12518  		}
 12519  		return nil, gensupport.WrapError(&googleapi.Error{
 12520  			Code:   res.StatusCode,
 12521  			Header: res.Header,
 12522  		})
 12523  	}
 12524  	if err != nil {
 12525  		return nil, err
 12526  	}
 12527  	defer googleapi.CloseBody(res)
 12528  	if err := googleapi.CheckResponse(res); err != nil {
 12529  		return nil, gensupport.WrapError(err)
 12530  	}
 12531  	ret := &Empty{
 12532  		ServerResponse: googleapi.ServerResponse{
 12533  			Header:         res.Header,
 12534  			HTTPStatusCode: res.StatusCode,
 12535  		},
 12536  	}
 12537  	target := &ret
 12538  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12539  		return nil, err
 12540  	}
 12541  	return ret, nil
 12542  }
 12543  
 12544  type ProjectsInstancesDatabasesOperationsGetCall struct {
 12545  	s            *Service
 12546  	name         string
 12547  	urlParams_   gensupport.URLParams
 12548  	ifNoneMatch_ string
 12549  	ctx_         context.Context
 12550  	header_      http.Header
 12551  }
 12552  
 12553  // Get: Gets the latest state of a long-running operation. Clients can use this
 12554  // method to poll the operation result at intervals as recommended by the API
 12555  // service.
 12556  //
 12557  // - name: The name of the operation resource.
 12558  func (r *ProjectsInstancesDatabasesOperationsService) Get(name string) *ProjectsInstancesDatabasesOperationsGetCall {
 12559  	c := &ProjectsInstancesDatabasesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12560  	c.name = name
 12561  	return c
 12562  }
 12563  
 12564  // Fields allows partial responses to be retrieved. See
 12565  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12566  // details.
 12567  func (c *ProjectsInstancesDatabasesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesOperationsGetCall {
 12568  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12569  	return c
 12570  }
 12571  
 12572  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 12573  // object's ETag matches the given value. This is useful for getting updates
 12574  // only after the object has changed since the last request.
 12575  func (c *ProjectsInstancesDatabasesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsInstancesDatabasesOperationsGetCall {
 12576  	c.ifNoneMatch_ = entityTag
 12577  	return c
 12578  }
 12579  
 12580  // Context sets the context to be used in this call's Do method.
 12581  func (c *ProjectsInstancesDatabasesOperationsGetCall) Context(ctx context.Context) *ProjectsInstancesDatabasesOperationsGetCall {
 12582  	c.ctx_ = ctx
 12583  	return c
 12584  }
 12585  
 12586  // Header returns a http.Header that can be modified by the caller to add
 12587  // headers to the request.
 12588  func (c *ProjectsInstancesDatabasesOperationsGetCall) Header() http.Header {
 12589  	if c.header_ == nil {
 12590  		c.header_ = make(http.Header)
 12591  	}
 12592  	return c.header_
 12593  }
 12594  
 12595  func (c *ProjectsInstancesDatabasesOperationsGetCall) doRequest(alt string) (*http.Response, error) {
 12596  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 12597  	if c.ifNoneMatch_ != "" {
 12598  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 12599  	}
 12600  	var body io.Reader = nil
 12601  	c.urlParams_.Set("alt", alt)
 12602  	c.urlParams_.Set("prettyPrint", "false")
 12603  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 12604  	urls += "?" + c.urlParams_.Encode()
 12605  	req, err := http.NewRequest("GET", urls, body)
 12606  	if err != nil {
 12607  		return nil, err
 12608  	}
 12609  	req.Header = reqHeaders
 12610  	googleapi.Expand(req.URL, map[string]string{
 12611  		"name": c.name,
 12612  	})
 12613  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12614  }
 12615  
 12616  // Do executes the "spanner.projects.instances.databases.operations.get" call.
 12617  // Any non-2xx status code is an error. Response headers are in either
 12618  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 12619  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 12620  // whether the returned error was because http.StatusNotModified was returned.
 12621  func (c *ProjectsInstancesDatabasesOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 12622  	gensupport.SetOptions(c.urlParams_, opts...)
 12623  	res, err := c.doRequest("json")
 12624  	if res != nil && res.StatusCode == http.StatusNotModified {
 12625  		if res.Body != nil {
 12626  			res.Body.Close()
 12627  		}
 12628  		return nil, gensupport.WrapError(&googleapi.Error{
 12629  			Code:   res.StatusCode,
 12630  			Header: res.Header,
 12631  		})
 12632  	}
 12633  	if err != nil {
 12634  		return nil, err
 12635  	}
 12636  	defer googleapi.CloseBody(res)
 12637  	if err := googleapi.CheckResponse(res); err != nil {
 12638  		return nil, gensupport.WrapError(err)
 12639  	}
 12640  	ret := &Operation{
 12641  		ServerResponse: googleapi.ServerResponse{
 12642  			Header:         res.Header,
 12643  			HTTPStatusCode: res.StatusCode,
 12644  		},
 12645  	}
 12646  	target := &ret
 12647  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12648  		return nil, err
 12649  	}
 12650  	return ret, nil
 12651  }
 12652  
 12653  type ProjectsInstancesDatabasesOperationsListCall struct {
 12654  	s            *Service
 12655  	name         string
 12656  	urlParams_   gensupport.URLParams
 12657  	ifNoneMatch_ string
 12658  	ctx_         context.Context
 12659  	header_      http.Header
 12660  }
 12661  
 12662  // List: Lists operations that match the specified filter in the request. If
 12663  // the server doesn't support this method, it returns `UNIMPLEMENTED`.
 12664  //
 12665  // - name: The name of the operation's parent resource.
 12666  func (r *ProjectsInstancesDatabasesOperationsService) List(name string) *ProjectsInstancesDatabasesOperationsListCall {
 12667  	c := &ProjectsInstancesDatabasesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12668  	c.name = name
 12669  	return c
 12670  }
 12671  
 12672  // Filter sets the optional parameter "filter": The standard list filter.
 12673  func (c *ProjectsInstancesDatabasesOperationsListCall) Filter(filter string) *ProjectsInstancesDatabasesOperationsListCall {
 12674  	c.urlParams_.Set("filter", filter)
 12675  	return c
 12676  }
 12677  
 12678  // PageSize sets the optional parameter "pageSize": The standard list page
 12679  // size.
 12680  func (c *ProjectsInstancesDatabasesOperationsListCall) PageSize(pageSize int64) *ProjectsInstancesDatabasesOperationsListCall {
 12681  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 12682  	return c
 12683  }
 12684  
 12685  // PageToken sets the optional parameter "pageToken": The standard list page
 12686  // token.
 12687  func (c *ProjectsInstancesDatabasesOperationsListCall) PageToken(pageToken string) *ProjectsInstancesDatabasesOperationsListCall {
 12688  	c.urlParams_.Set("pageToken", pageToken)
 12689  	return c
 12690  }
 12691  
 12692  // Fields allows partial responses to be retrieved. See
 12693  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12694  // details.
 12695  func (c *ProjectsInstancesDatabasesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesOperationsListCall {
 12696  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12697  	return c
 12698  }
 12699  
 12700  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 12701  // object's ETag matches the given value. This is useful for getting updates
 12702  // only after the object has changed since the last request.
 12703  func (c *ProjectsInstancesDatabasesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsInstancesDatabasesOperationsListCall {
 12704  	c.ifNoneMatch_ = entityTag
 12705  	return c
 12706  }
 12707  
 12708  // Context sets the context to be used in this call's Do method.
 12709  func (c *ProjectsInstancesDatabasesOperationsListCall) Context(ctx context.Context) *ProjectsInstancesDatabasesOperationsListCall {
 12710  	c.ctx_ = ctx
 12711  	return c
 12712  }
 12713  
 12714  // Header returns a http.Header that can be modified by the caller to add
 12715  // headers to the request.
 12716  func (c *ProjectsInstancesDatabasesOperationsListCall) Header() http.Header {
 12717  	if c.header_ == nil {
 12718  		c.header_ = make(http.Header)
 12719  	}
 12720  	return c.header_
 12721  }
 12722  
 12723  func (c *ProjectsInstancesDatabasesOperationsListCall) doRequest(alt string) (*http.Response, error) {
 12724  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 12725  	if c.ifNoneMatch_ != "" {
 12726  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 12727  	}
 12728  	var body io.Reader = nil
 12729  	c.urlParams_.Set("alt", alt)
 12730  	c.urlParams_.Set("prettyPrint", "false")
 12731  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 12732  	urls += "?" + c.urlParams_.Encode()
 12733  	req, err := http.NewRequest("GET", urls, body)
 12734  	if err != nil {
 12735  		return nil, err
 12736  	}
 12737  	req.Header = reqHeaders
 12738  	googleapi.Expand(req.URL, map[string]string{
 12739  		"name": c.name,
 12740  	})
 12741  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12742  }
 12743  
 12744  // Do executes the "spanner.projects.instances.databases.operations.list" call.
 12745  // Any non-2xx status code is an error. Response headers are in either
 12746  // *ListOperationsResponse.ServerResponse.Header or (if a response was returned
 12747  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 12748  // check whether the returned error was because http.StatusNotModified was
 12749  // returned.
 12750  func (c *ProjectsInstancesDatabasesOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
 12751  	gensupport.SetOptions(c.urlParams_, opts...)
 12752  	res, err := c.doRequest("json")
 12753  	if res != nil && res.StatusCode == http.StatusNotModified {
 12754  		if res.Body != nil {
 12755  			res.Body.Close()
 12756  		}
 12757  		return nil, gensupport.WrapError(&googleapi.Error{
 12758  			Code:   res.StatusCode,
 12759  			Header: res.Header,
 12760  		})
 12761  	}
 12762  	if err != nil {
 12763  		return nil, err
 12764  	}
 12765  	defer googleapi.CloseBody(res)
 12766  	if err := googleapi.CheckResponse(res); err != nil {
 12767  		return nil, gensupport.WrapError(err)
 12768  	}
 12769  	ret := &ListOperationsResponse{
 12770  		ServerResponse: googleapi.ServerResponse{
 12771  			Header:         res.Header,
 12772  			HTTPStatusCode: res.StatusCode,
 12773  		},
 12774  	}
 12775  	target := &ret
 12776  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12777  		return nil, err
 12778  	}
 12779  	return ret, nil
 12780  }
 12781  
 12782  // Pages invokes f for each page of results.
 12783  // A non-nil error returned from f will halt the iteration.
 12784  // The provided context supersedes any context provided to the Context method.
 12785  func (c *ProjectsInstancesDatabasesOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
 12786  	c.ctx_ = ctx
 12787  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 12788  	for {
 12789  		x, err := c.Do()
 12790  		if err != nil {
 12791  			return err
 12792  		}
 12793  		if err := f(x); err != nil {
 12794  			return err
 12795  		}
 12796  		if x.NextPageToken == "" {
 12797  			return nil
 12798  		}
 12799  		c.PageToken(x.NextPageToken)
 12800  	}
 12801  }
 12802  
 12803  type ProjectsInstancesDatabasesSessionsBatchCreateCall struct {
 12804  	s                          *Service
 12805  	database                   string
 12806  	batchcreatesessionsrequest *BatchCreateSessionsRequest
 12807  	urlParams_                 gensupport.URLParams
 12808  	ctx_                       context.Context
 12809  	header_                    http.Header
 12810  }
 12811  
 12812  // BatchCreate: Creates multiple new sessions. This API can be used to
 12813  // initialize a session cache on the clients. See https://goo.gl/TgSFN2 for
 12814  // best practices on session cache management.
 12815  //
 12816  // - database: The database in which the new sessions are created.
 12817  func (r *ProjectsInstancesDatabasesSessionsService) BatchCreate(database string, batchcreatesessionsrequest *BatchCreateSessionsRequest) *ProjectsInstancesDatabasesSessionsBatchCreateCall {
 12818  	c := &ProjectsInstancesDatabasesSessionsBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12819  	c.database = database
 12820  	c.batchcreatesessionsrequest = batchcreatesessionsrequest
 12821  	return c
 12822  }
 12823  
 12824  // Fields allows partial responses to be retrieved. See
 12825  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12826  // details.
 12827  func (c *ProjectsInstancesDatabasesSessionsBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesSessionsBatchCreateCall {
 12828  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12829  	return c
 12830  }
 12831  
 12832  // Context sets the context to be used in this call's Do method.
 12833  func (c *ProjectsInstancesDatabasesSessionsBatchCreateCall) Context(ctx context.Context) *ProjectsInstancesDatabasesSessionsBatchCreateCall {
 12834  	c.ctx_ = ctx
 12835  	return c
 12836  }
 12837  
 12838  // Header returns a http.Header that can be modified by the caller to add
 12839  // headers to the request.
 12840  func (c *ProjectsInstancesDatabasesSessionsBatchCreateCall) Header() http.Header {
 12841  	if c.header_ == nil {
 12842  		c.header_ = make(http.Header)
 12843  	}
 12844  	return c.header_
 12845  }
 12846  
 12847  func (c *ProjectsInstancesDatabasesSessionsBatchCreateCall) doRequest(alt string) (*http.Response, error) {
 12848  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 12849  	var body io.Reader = nil
 12850  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchcreatesessionsrequest)
 12851  	if err != nil {
 12852  		return nil, err
 12853  	}
 12854  	c.urlParams_.Set("alt", alt)
 12855  	c.urlParams_.Set("prettyPrint", "false")
 12856  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+database}/sessions:batchCreate")
 12857  	urls += "?" + c.urlParams_.Encode()
 12858  	req, err := http.NewRequest("POST", urls, body)
 12859  	if err != nil {
 12860  		return nil, err
 12861  	}
 12862  	req.Header = reqHeaders
 12863  	googleapi.Expand(req.URL, map[string]string{
 12864  		"database": c.database,
 12865  	})
 12866  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12867  }
 12868  
 12869  // Do executes the "spanner.projects.instances.databases.sessions.batchCreate" call.
 12870  // Any non-2xx status code is an error. Response headers are in either
 12871  // *BatchCreateSessionsResponse.ServerResponse.Header or (if a response was
 12872  // returned at all) in error.(*googleapi.Error).Header. Use
 12873  // googleapi.IsNotModified to check whether the returned error was because
 12874  // http.StatusNotModified was returned.
 12875  func (c *ProjectsInstancesDatabasesSessionsBatchCreateCall) Do(opts ...googleapi.CallOption) (*BatchCreateSessionsResponse, error) {
 12876  	gensupport.SetOptions(c.urlParams_, opts...)
 12877  	res, err := c.doRequest("json")
 12878  	if res != nil && res.StatusCode == http.StatusNotModified {
 12879  		if res.Body != nil {
 12880  			res.Body.Close()
 12881  		}
 12882  		return nil, gensupport.WrapError(&googleapi.Error{
 12883  			Code:   res.StatusCode,
 12884  			Header: res.Header,
 12885  		})
 12886  	}
 12887  	if err != nil {
 12888  		return nil, err
 12889  	}
 12890  	defer googleapi.CloseBody(res)
 12891  	if err := googleapi.CheckResponse(res); err != nil {
 12892  		return nil, gensupport.WrapError(err)
 12893  	}
 12894  	ret := &BatchCreateSessionsResponse{
 12895  		ServerResponse: googleapi.ServerResponse{
 12896  			Header:         res.Header,
 12897  			HTTPStatusCode: res.StatusCode,
 12898  		},
 12899  	}
 12900  	target := &ret
 12901  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12902  		return nil, err
 12903  	}
 12904  	return ret, nil
 12905  }
 12906  
 12907  type ProjectsInstancesDatabasesSessionsBatchWriteCall struct {
 12908  	s                 *Service
 12909  	session           string
 12910  	batchwriterequest *BatchWriteRequest
 12911  	urlParams_        gensupport.URLParams
 12912  	ctx_              context.Context
 12913  	header_           http.Header
 12914  }
 12915  
 12916  // BatchWrite: Batches the supplied mutation groups in a collection of
 12917  // efficient transactions. All mutations in a group are committed atomically.
 12918  // However, mutations across groups can be committed non-atomically in an
 12919  // unspecified order and thus, they must be independent of each other. Partial
 12920  // failure is possible, i.e., some groups may have been committed successfully,
 12921  // while some may have failed. The results of individual batches are streamed
 12922  // into the response as the batches are applied. BatchWrite requests are not
 12923  // replay protected, meaning that each mutation group may be applied more than
 12924  // once. Replays of non-idempotent mutations may have undesirable effects. For
 12925  // example, replays of an insert mutation may produce an already exists error
 12926  // or if you use generated or commit timestamp-based keys, it may result in
 12927  // additional rows being added to the mutation's table. We recommend
 12928  // structuring your mutation groups to be idempotent to avoid this issue.
 12929  //
 12930  // - session: The session in which the batch request is to be run.
 12931  func (r *ProjectsInstancesDatabasesSessionsService) BatchWrite(session string, batchwriterequest *BatchWriteRequest) *ProjectsInstancesDatabasesSessionsBatchWriteCall {
 12932  	c := &ProjectsInstancesDatabasesSessionsBatchWriteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12933  	c.session = session
 12934  	c.batchwriterequest = batchwriterequest
 12935  	return c
 12936  }
 12937  
 12938  // Fields allows partial responses to be retrieved. See
 12939  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12940  // details.
 12941  func (c *ProjectsInstancesDatabasesSessionsBatchWriteCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesSessionsBatchWriteCall {
 12942  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12943  	return c
 12944  }
 12945  
 12946  // Context sets the context to be used in this call's Do method.
 12947  func (c *ProjectsInstancesDatabasesSessionsBatchWriteCall) Context(ctx context.Context) *ProjectsInstancesDatabasesSessionsBatchWriteCall {
 12948  	c.ctx_ = ctx
 12949  	return c
 12950  }
 12951  
 12952  // Header returns a http.Header that can be modified by the caller to add
 12953  // headers to the request.
 12954  func (c *ProjectsInstancesDatabasesSessionsBatchWriteCall) Header() http.Header {
 12955  	if c.header_ == nil {
 12956  		c.header_ = make(http.Header)
 12957  	}
 12958  	return c.header_
 12959  }
 12960  
 12961  func (c *ProjectsInstancesDatabasesSessionsBatchWriteCall) doRequest(alt string) (*http.Response, error) {
 12962  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 12963  	var body io.Reader = nil
 12964  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchwriterequest)
 12965  	if err != nil {
 12966  		return nil, err
 12967  	}
 12968  	c.urlParams_.Set("alt", alt)
 12969  	c.urlParams_.Set("prettyPrint", "false")
 12970  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+session}:batchWrite")
 12971  	urls += "?" + c.urlParams_.Encode()
 12972  	req, err := http.NewRequest("POST", urls, body)
 12973  	if err != nil {
 12974  		return nil, err
 12975  	}
 12976  	req.Header = reqHeaders
 12977  	googleapi.Expand(req.URL, map[string]string{
 12978  		"session": c.session,
 12979  	})
 12980  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12981  }
 12982  
 12983  // Do executes the "spanner.projects.instances.databases.sessions.batchWrite" call.
 12984  // Any non-2xx status code is an error. Response headers are in either
 12985  // *BatchWriteResponse.ServerResponse.Header or (if a response was returned at
 12986  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 12987  // check whether the returned error was because http.StatusNotModified was
 12988  // returned.
 12989  func (c *ProjectsInstancesDatabasesSessionsBatchWriteCall) Do(opts ...googleapi.CallOption) (*BatchWriteResponse, error) {
 12990  	gensupport.SetOptions(c.urlParams_, opts...)
 12991  	res, err := c.doRequest("json")
 12992  	if res != nil && res.StatusCode == http.StatusNotModified {
 12993  		if res.Body != nil {
 12994  			res.Body.Close()
 12995  		}
 12996  		return nil, gensupport.WrapError(&googleapi.Error{
 12997  			Code:   res.StatusCode,
 12998  			Header: res.Header,
 12999  		})
 13000  	}
 13001  	if err != nil {
 13002  		return nil, err
 13003  	}
 13004  	defer googleapi.CloseBody(res)
 13005  	if err := googleapi.CheckResponse(res); err != nil {
 13006  		return nil, gensupport.WrapError(err)
 13007  	}
 13008  	ret := &BatchWriteResponse{
 13009  		ServerResponse: googleapi.ServerResponse{
 13010  			Header:         res.Header,
 13011  			HTTPStatusCode: res.StatusCode,
 13012  		},
 13013  	}
 13014  	target := &ret
 13015  	if err := gensupport.DecodeResponse(target, res); err != nil {
 13016  		return nil, err
 13017  	}
 13018  	return ret, nil
 13019  }
 13020  
 13021  type ProjectsInstancesDatabasesSessionsBeginTransactionCall struct {
 13022  	s                       *Service
 13023  	session                 string
 13024  	begintransactionrequest *BeginTransactionRequest
 13025  	urlParams_              gensupport.URLParams
 13026  	ctx_                    context.Context
 13027  	header_                 http.Header
 13028  }
 13029  
 13030  // BeginTransaction: Begins a new transaction. This step can often be skipped:
 13031  // Read, ExecuteSql and Commit can begin a new transaction as a side-effect.
 13032  //
 13033  // - session: The session in which the transaction runs.
 13034  func (r *ProjectsInstancesDatabasesSessionsService) BeginTransaction(session string, begintransactionrequest *BeginTransactionRequest) *ProjectsInstancesDatabasesSessionsBeginTransactionCall {
 13035  	c := &ProjectsInstancesDatabasesSessionsBeginTransactionCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 13036  	c.session = session
 13037  	c.begintransactionrequest = begintransactionrequest
 13038  	return c
 13039  }
 13040  
 13041  // Fields allows partial responses to be retrieved. See
 13042  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 13043  // details.
 13044  func (c *ProjectsInstancesDatabasesSessionsBeginTransactionCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesSessionsBeginTransactionCall {
 13045  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 13046  	return c
 13047  }
 13048  
 13049  // Context sets the context to be used in this call's Do method.
 13050  func (c *ProjectsInstancesDatabasesSessionsBeginTransactionCall) Context(ctx context.Context) *ProjectsInstancesDatabasesSessionsBeginTransactionCall {
 13051  	c.ctx_ = ctx
 13052  	return c
 13053  }
 13054  
 13055  // Header returns a http.Header that can be modified by the caller to add
 13056  // headers to the request.
 13057  func (c *ProjectsInstancesDatabasesSessionsBeginTransactionCall) Header() http.Header {
 13058  	if c.header_ == nil {
 13059  		c.header_ = make(http.Header)
 13060  	}
 13061  	return c.header_
 13062  }
 13063  
 13064  func (c *ProjectsInstancesDatabasesSessionsBeginTransactionCall) doRequest(alt string) (*http.Response, error) {
 13065  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 13066  	var body io.Reader = nil
 13067  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.begintransactionrequest)
 13068  	if err != nil {
 13069  		return nil, err
 13070  	}
 13071  	c.urlParams_.Set("alt", alt)
 13072  	c.urlParams_.Set("prettyPrint", "false")
 13073  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+session}:beginTransaction")
 13074  	urls += "?" + c.urlParams_.Encode()
 13075  	req, err := http.NewRequest("POST", urls, body)
 13076  	if err != nil {
 13077  		return nil, err
 13078  	}
 13079  	req.Header = reqHeaders
 13080  	googleapi.Expand(req.URL, map[string]string{
 13081  		"session": c.session,
 13082  	})
 13083  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13084  }
 13085  
 13086  // Do executes the "spanner.projects.instances.databases.sessions.beginTransaction" call.
 13087  // Any non-2xx status code is an error. Response headers are in either
 13088  // *Transaction.ServerResponse.Header or (if a response was returned at all) in
 13089  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 13090  // whether the returned error was because http.StatusNotModified was returned.
 13091  func (c *ProjectsInstancesDatabasesSessionsBeginTransactionCall) Do(opts ...googleapi.CallOption) (*Transaction, error) {
 13092  	gensupport.SetOptions(c.urlParams_, opts...)
 13093  	res, err := c.doRequest("json")
 13094  	if res != nil && res.StatusCode == http.StatusNotModified {
 13095  		if res.Body != nil {
 13096  			res.Body.Close()
 13097  		}
 13098  		return nil, gensupport.WrapError(&googleapi.Error{
 13099  			Code:   res.StatusCode,
 13100  			Header: res.Header,
 13101  		})
 13102  	}
 13103  	if err != nil {
 13104  		return nil, err
 13105  	}
 13106  	defer googleapi.CloseBody(res)
 13107  	if err := googleapi.CheckResponse(res); err != nil {
 13108  		return nil, gensupport.WrapError(err)
 13109  	}
 13110  	ret := &Transaction{
 13111  		ServerResponse: googleapi.ServerResponse{
 13112  			Header:         res.Header,
 13113  			HTTPStatusCode: res.StatusCode,
 13114  		},
 13115  	}
 13116  	target := &ret
 13117  	if err := gensupport.DecodeResponse(target, res); err != nil {
 13118  		return nil, err
 13119  	}
 13120  	return ret, nil
 13121  }
 13122  
 13123  type ProjectsInstancesDatabasesSessionsCommitCall struct {
 13124  	s             *Service
 13125  	session       string
 13126  	commitrequest *CommitRequest
 13127  	urlParams_    gensupport.URLParams
 13128  	ctx_          context.Context
 13129  	header_       http.Header
 13130  }
 13131  
 13132  // Commit: Commits a transaction. The request includes the mutations to be
 13133  // applied to rows in the database. `Commit` might return an `ABORTED` error.
 13134  // This can occur at any time; commonly, the cause is conflicts with concurrent
 13135  // transactions. However, it can also happen for a variety of other reasons. If
 13136  // `Commit` returns `ABORTED`, the caller should re-attempt the transaction
 13137  // from the beginning, re-using the same session. On very rare occasions,
 13138  // `Commit` might return `UNKNOWN`. This can happen, for example, if the client
 13139  // job experiences a 1+ hour networking failure. At that point, Cloud Spanner
 13140  // has lost track of the transaction outcome and we recommend that you perform
 13141  // another read from the database to see the state of things as they are now.
 13142  //
 13143  // - session: The session in which the transaction to be committed is running.
 13144  func (r *ProjectsInstancesDatabasesSessionsService) Commit(session string, commitrequest *CommitRequest) *ProjectsInstancesDatabasesSessionsCommitCall {
 13145  	c := &ProjectsInstancesDatabasesSessionsCommitCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 13146  	c.session = session
 13147  	c.commitrequest = commitrequest
 13148  	return c
 13149  }
 13150  
 13151  // Fields allows partial responses to be retrieved. See
 13152  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 13153  // details.
 13154  func (c *ProjectsInstancesDatabasesSessionsCommitCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesSessionsCommitCall {
 13155  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 13156  	return c
 13157  }
 13158  
 13159  // Context sets the context to be used in this call's Do method.
 13160  func (c *ProjectsInstancesDatabasesSessionsCommitCall) Context(ctx context.Context) *ProjectsInstancesDatabasesSessionsCommitCall {
 13161  	c.ctx_ = ctx
 13162  	return c
 13163  }
 13164  
 13165  // Header returns a http.Header that can be modified by the caller to add
 13166  // headers to the request.
 13167  func (c *ProjectsInstancesDatabasesSessionsCommitCall) Header() http.Header {
 13168  	if c.header_ == nil {
 13169  		c.header_ = make(http.Header)
 13170  	}
 13171  	return c.header_
 13172  }
 13173  
 13174  func (c *ProjectsInstancesDatabasesSessionsCommitCall) doRequest(alt string) (*http.Response, error) {
 13175  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 13176  	var body io.Reader = nil
 13177  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.commitrequest)
 13178  	if err != nil {
 13179  		return nil, err
 13180  	}
 13181  	c.urlParams_.Set("alt", alt)
 13182  	c.urlParams_.Set("prettyPrint", "false")
 13183  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+session}:commit")
 13184  	urls += "?" + c.urlParams_.Encode()
 13185  	req, err := http.NewRequest("POST", urls, body)
 13186  	if err != nil {
 13187  		return nil, err
 13188  	}
 13189  	req.Header = reqHeaders
 13190  	googleapi.Expand(req.URL, map[string]string{
 13191  		"session": c.session,
 13192  	})
 13193  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13194  }
 13195  
 13196  // Do executes the "spanner.projects.instances.databases.sessions.commit" call.
 13197  // Any non-2xx status code is an error. Response headers are in either
 13198  // *CommitResponse.ServerResponse.Header or (if a response was returned at all)
 13199  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 13200  // whether the returned error was because http.StatusNotModified was returned.
 13201  func (c *ProjectsInstancesDatabasesSessionsCommitCall) Do(opts ...googleapi.CallOption) (*CommitResponse, error) {
 13202  	gensupport.SetOptions(c.urlParams_, opts...)
 13203  	res, err := c.doRequest("json")
 13204  	if res != nil && res.StatusCode == http.StatusNotModified {
 13205  		if res.Body != nil {
 13206  			res.Body.Close()
 13207  		}
 13208  		return nil, gensupport.WrapError(&googleapi.Error{
 13209  			Code:   res.StatusCode,
 13210  			Header: res.Header,
 13211  		})
 13212  	}
 13213  	if err != nil {
 13214  		return nil, err
 13215  	}
 13216  	defer googleapi.CloseBody(res)
 13217  	if err := googleapi.CheckResponse(res); err != nil {
 13218  		return nil, gensupport.WrapError(err)
 13219  	}
 13220  	ret := &CommitResponse{
 13221  		ServerResponse: googleapi.ServerResponse{
 13222  			Header:         res.Header,
 13223  			HTTPStatusCode: res.StatusCode,
 13224  		},
 13225  	}
 13226  	target := &ret
 13227  	if err := gensupport.DecodeResponse(target, res); err != nil {
 13228  		return nil, err
 13229  	}
 13230  	return ret, nil
 13231  }
 13232  
 13233  type ProjectsInstancesDatabasesSessionsCreateCall struct {
 13234  	s                    *Service
 13235  	database             string
 13236  	createsessionrequest *CreateSessionRequest
 13237  	urlParams_           gensupport.URLParams
 13238  	ctx_                 context.Context
 13239  	header_              http.Header
 13240  }
 13241  
 13242  // Create: Creates a new session. A session can be used to perform transactions
 13243  // that read and/or modify data in a Cloud Spanner database. Sessions are meant
 13244  // to be reused for many consecutive transactions. Sessions can only execute
 13245  // one transaction at a time. To execute multiple concurrent
 13246  // read-write/write-only transactions, create multiple sessions. Note that
 13247  // standalone reads and queries use a transaction internally, and count toward
 13248  // the one transaction limit. Active sessions use additional server resources,
 13249  // so it is a good idea to delete idle and unneeded sessions. Aside from
 13250  // explicit deletes, Cloud Spanner may delete sessions for which no operations
 13251  // are sent for more than an hour. If a session is deleted, requests to it
 13252  // return `NOT_FOUND`. Idle sessions can be kept alive by sending a trivial SQL
 13253  // query periodically, e.g., "SELECT 1".
 13254  //
 13255  // - database: The database in which the new session is created.
 13256  func (r *ProjectsInstancesDatabasesSessionsService) Create(database string, createsessionrequest *CreateSessionRequest) *ProjectsInstancesDatabasesSessionsCreateCall {
 13257  	c := &ProjectsInstancesDatabasesSessionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 13258  	c.database = database
 13259  	c.createsessionrequest = createsessionrequest
 13260  	return c
 13261  }
 13262  
 13263  // Fields allows partial responses to be retrieved. See
 13264  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 13265  // details.
 13266  func (c *ProjectsInstancesDatabasesSessionsCreateCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesSessionsCreateCall {
 13267  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 13268  	return c
 13269  }
 13270  
 13271  // Context sets the context to be used in this call's Do method.
 13272  func (c *ProjectsInstancesDatabasesSessionsCreateCall) Context(ctx context.Context) *ProjectsInstancesDatabasesSessionsCreateCall {
 13273  	c.ctx_ = ctx
 13274  	return c
 13275  }
 13276  
 13277  // Header returns a http.Header that can be modified by the caller to add
 13278  // headers to the request.
 13279  func (c *ProjectsInstancesDatabasesSessionsCreateCall) Header() http.Header {
 13280  	if c.header_ == nil {
 13281  		c.header_ = make(http.Header)
 13282  	}
 13283  	return c.header_
 13284  }
 13285  
 13286  func (c *ProjectsInstancesDatabasesSessionsCreateCall) doRequest(alt string) (*http.Response, error) {
 13287  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 13288  	var body io.Reader = nil
 13289  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.createsessionrequest)
 13290  	if err != nil {
 13291  		return nil, err
 13292  	}
 13293  	c.urlParams_.Set("alt", alt)
 13294  	c.urlParams_.Set("prettyPrint", "false")
 13295  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+database}/sessions")
 13296  	urls += "?" + c.urlParams_.Encode()
 13297  	req, err := http.NewRequest("POST", urls, body)
 13298  	if err != nil {
 13299  		return nil, err
 13300  	}
 13301  	req.Header = reqHeaders
 13302  	googleapi.Expand(req.URL, map[string]string{
 13303  		"database": c.database,
 13304  	})
 13305  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13306  }
 13307  
 13308  // Do executes the "spanner.projects.instances.databases.sessions.create" call.
 13309  // Any non-2xx status code is an error. Response headers are in either
 13310  // *Session.ServerResponse.Header or (if a response was returned at all) in
 13311  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 13312  // whether the returned error was because http.StatusNotModified was returned.
 13313  func (c *ProjectsInstancesDatabasesSessionsCreateCall) Do(opts ...googleapi.CallOption) (*Session, error) {
 13314  	gensupport.SetOptions(c.urlParams_, opts...)
 13315  	res, err := c.doRequest("json")
 13316  	if res != nil && res.StatusCode == http.StatusNotModified {
 13317  		if res.Body != nil {
 13318  			res.Body.Close()
 13319  		}
 13320  		return nil, gensupport.WrapError(&googleapi.Error{
 13321  			Code:   res.StatusCode,
 13322  			Header: res.Header,
 13323  		})
 13324  	}
 13325  	if err != nil {
 13326  		return nil, err
 13327  	}
 13328  	defer googleapi.CloseBody(res)
 13329  	if err := googleapi.CheckResponse(res); err != nil {
 13330  		return nil, gensupport.WrapError(err)
 13331  	}
 13332  	ret := &Session{
 13333  		ServerResponse: googleapi.ServerResponse{
 13334  			Header:         res.Header,
 13335  			HTTPStatusCode: res.StatusCode,
 13336  		},
 13337  	}
 13338  	target := &ret
 13339  	if err := gensupport.DecodeResponse(target, res); err != nil {
 13340  		return nil, err
 13341  	}
 13342  	return ret, nil
 13343  }
 13344  
 13345  type ProjectsInstancesDatabasesSessionsDeleteCall struct {
 13346  	s          *Service
 13347  	name       string
 13348  	urlParams_ gensupport.URLParams
 13349  	ctx_       context.Context
 13350  	header_    http.Header
 13351  }
 13352  
 13353  // Delete: Ends a session, releasing server resources associated with it. This
 13354  // will asynchronously trigger cancellation of any operations that are running
 13355  // with this session.
 13356  //
 13357  // - name: The name of the session to delete.
 13358  func (r *ProjectsInstancesDatabasesSessionsService) Delete(name string) *ProjectsInstancesDatabasesSessionsDeleteCall {
 13359  	c := &ProjectsInstancesDatabasesSessionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 13360  	c.name = name
 13361  	return c
 13362  }
 13363  
 13364  // Fields allows partial responses to be retrieved. See
 13365  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 13366  // details.
 13367  func (c *ProjectsInstancesDatabasesSessionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesSessionsDeleteCall {
 13368  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 13369  	return c
 13370  }
 13371  
 13372  // Context sets the context to be used in this call's Do method.
 13373  func (c *ProjectsInstancesDatabasesSessionsDeleteCall) Context(ctx context.Context) *ProjectsInstancesDatabasesSessionsDeleteCall {
 13374  	c.ctx_ = ctx
 13375  	return c
 13376  }
 13377  
 13378  // Header returns a http.Header that can be modified by the caller to add
 13379  // headers to the request.
 13380  func (c *ProjectsInstancesDatabasesSessionsDeleteCall) Header() http.Header {
 13381  	if c.header_ == nil {
 13382  		c.header_ = make(http.Header)
 13383  	}
 13384  	return c.header_
 13385  }
 13386  
 13387  func (c *ProjectsInstancesDatabasesSessionsDeleteCall) doRequest(alt string) (*http.Response, error) {
 13388  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 13389  	var body io.Reader = nil
 13390  	c.urlParams_.Set("alt", alt)
 13391  	c.urlParams_.Set("prettyPrint", "false")
 13392  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 13393  	urls += "?" + c.urlParams_.Encode()
 13394  	req, err := http.NewRequest("DELETE", urls, body)
 13395  	if err != nil {
 13396  		return nil, err
 13397  	}
 13398  	req.Header = reqHeaders
 13399  	googleapi.Expand(req.URL, map[string]string{
 13400  		"name": c.name,
 13401  	})
 13402  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13403  }
 13404  
 13405  // Do executes the "spanner.projects.instances.databases.sessions.delete" call.
 13406  // Any non-2xx status code is an error. Response headers are in either
 13407  // *Empty.ServerResponse.Header or (if a response was returned at all) in
 13408  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 13409  // whether the returned error was because http.StatusNotModified was returned.
 13410  func (c *ProjectsInstancesDatabasesSessionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
 13411  	gensupport.SetOptions(c.urlParams_, opts...)
 13412  	res, err := c.doRequest("json")
 13413  	if res != nil && res.StatusCode == http.StatusNotModified {
 13414  		if res.Body != nil {
 13415  			res.Body.Close()
 13416  		}
 13417  		return nil, gensupport.WrapError(&googleapi.Error{
 13418  			Code:   res.StatusCode,
 13419  			Header: res.Header,
 13420  		})
 13421  	}
 13422  	if err != nil {
 13423  		return nil, err
 13424  	}
 13425  	defer googleapi.CloseBody(res)
 13426  	if err := googleapi.CheckResponse(res); err != nil {
 13427  		return nil, gensupport.WrapError(err)
 13428  	}
 13429  	ret := &Empty{
 13430  		ServerResponse: googleapi.ServerResponse{
 13431  			Header:         res.Header,
 13432  			HTTPStatusCode: res.StatusCode,
 13433  		},
 13434  	}
 13435  	target := &ret
 13436  	if err := gensupport.DecodeResponse(target, res); err != nil {
 13437  		return nil, err
 13438  	}
 13439  	return ret, nil
 13440  }
 13441  
 13442  type ProjectsInstancesDatabasesSessionsExecuteBatchDmlCall struct {
 13443  	s                      *Service
 13444  	session                string
 13445  	executebatchdmlrequest *ExecuteBatchDmlRequest
 13446  	urlParams_             gensupport.URLParams
 13447  	ctx_                   context.Context
 13448  	header_                http.Header
 13449  }
 13450  
 13451  // ExecuteBatchDml: Executes a batch of SQL DML statements. This method allows
 13452  // many statements to be run with lower latency than submitting them
 13453  // sequentially with ExecuteSql. Statements are executed in sequential order. A
 13454  // request can succeed even if a statement fails. The
 13455  // ExecuteBatchDmlResponse.status field in the response provides information
 13456  // about the statement that failed. Clients must inspect this field to
 13457  // determine whether an error occurred. Execution stops after the first failed
 13458  // statement; the remaining statements are not executed.
 13459  //
 13460  // - session: The session in which the DML statements should be performed.
 13461  func (r *ProjectsInstancesDatabasesSessionsService) ExecuteBatchDml(session string, executebatchdmlrequest *ExecuteBatchDmlRequest) *ProjectsInstancesDatabasesSessionsExecuteBatchDmlCall {
 13462  	c := &ProjectsInstancesDatabasesSessionsExecuteBatchDmlCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 13463  	c.session = session
 13464  	c.executebatchdmlrequest = executebatchdmlrequest
 13465  	return c
 13466  }
 13467  
 13468  // Fields allows partial responses to be retrieved. See
 13469  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 13470  // details.
 13471  func (c *ProjectsInstancesDatabasesSessionsExecuteBatchDmlCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesSessionsExecuteBatchDmlCall {
 13472  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 13473  	return c
 13474  }
 13475  
 13476  // Context sets the context to be used in this call's Do method.
 13477  func (c *ProjectsInstancesDatabasesSessionsExecuteBatchDmlCall) Context(ctx context.Context) *ProjectsInstancesDatabasesSessionsExecuteBatchDmlCall {
 13478  	c.ctx_ = ctx
 13479  	return c
 13480  }
 13481  
 13482  // Header returns a http.Header that can be modified by the caller to add
 13483  // headers to the request.
 13484  func (c *ProjectsInstancesDatabasesSessionsExecuteBatchDmlCall) Header() http.Header {
 13485  	if c.header_ == nil {
 13486  		c.header_ = make(http.Header)
 13487  	}
 13488  	return c.header_
 13489  }
 13490  
 13491  func (c *ProjectsInstancesDatabasesSessionsExecuteBatchDmlCall) doRequest(alt string) (*http.Response, error) {
 13492  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 13493  	var body io.Reader = nil
 13494  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.executebatchdmlrequest)
 13495  	if err != nil {
 13496  		return nil, err
 13497  	}
 13498  	c.urlParams_.Set("alt", alt)
 13499  	c.urlParams_.Set("prettyPrint", "false")
 13500  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+session}:executeBatchDml")
 13501  	urls += "?" + c.urlParams_.Encode()
 13502  	req, err := http.NewRequest("POST", urls, body)
 13503  	if err != nil {
 13504  		return nil, err
 13505  	}
 13506  	req.Header = reqHeaders
 13507  	googleapi.Expand(req.URL, map[string]string{
 13508  		"session": c.session,
 13509  	})
 13510  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13511  }
 13512  
 13513  // Do executes the "spanner.projects.instances.databases.sessions.executeBatchDml" call.
 13514  // Any non-2xx status code is an error. Response headers are in either
 13515  // *ExecuteBatchDmlResponse.ServerResponse.Header or (if a response was
 13516  // returned at all) in error.(*googleapi.Error).Header. Use
 13517  // googleapi.IsNotModified to check whether the returned error was because
 13518  // http.StatusNotModified was returned.
 13519  func (c *ProjectsInstancesDatabasesSessionsExecuteBatchDmlCall) Do(opts ...googleapi.CallOption) (*ExecuteBatchDmlResponse, error) {
 13520  	gensupport.SetOptions(c.urlParams_, opts...)
 13521  	res, err := c.doRequest("json")
 13522  	if res != nil && res.StatusCode == http.StatusNotModified {
 13523  		if res.Body != nil {
 13524  			res.Body.Close()
 13525  		}
 13526  		return nil, gensupport.WrapError(&googleapi.Error{
 13527  			Code:   res.StatusCode,
 13528  			Header: res.Header,
 13529  		})
 13530  	}
 13531  	if err != nil {
 13532  		return nil, err
 13533  	}
 13534  	defer googleapi.CloseBody(res)
 13535  	if err := googleapi.CheckResponse(res); err != nil {
 13536  		return nil, gensupport.WrapError(err)
 13537  	}
 13538  	ret := &ExecuteBatchDmlResponse{
 13539  		ServerResponse: googleapi.ServerResponse{
 13540  			Header:         res.Header,
 13541  			HTTPStatusCode: res.StatusCode,
 13542  		},
 13543  	}
 13544  	target := &ret
 13545  	if err := gensupport.DecodeResponse(target, res); err != nil {
 13546  		return nil, err
 13547  	}
 13548  	return ret, nil
 13549  }
 13550  
 13551  type ProjectsInstancesDatabasesSessionsExecuteSqlCall struct {
 13552  	s                 *Service
 13553  	session           string
 13554  	executesqlrequest *ExecuteSqlRequest
 13555  	urlParams_        gensupport.URLParams
 13556  	ctx_              context.Context
 13557  	header_           http.Header
 13558  }
 13559  
 13560  // ExecuteSql: Executes an SQL statement, returning all results in a single
 13561  // reply. This method cannot be used to return a result set larger than 10 MiB;
 13562  // if the query yields more data than that, the query fails with a
 13563  // `FAILED_PRECONDITION` error. Operations inside read-write transactions might
 13564  // return `ABORTED`. If this occurs, the application should restart the
 13565  // transaction from the beginning. See Transaction for more details. Larger
 13566  // result sets can be fetched in streaming fashion by calling
 13567  // ExecuteStreamingSql instead.
 13568  //
 13569  // - session: The session in which the SQL query should be performed.
 13570  func (r *ProjectsInstancesDatabasesSessionsService) ExecuteSql(session string, executesqlrequest *ExecuteSqlRequest) *ProjectsInstancesDatabasesSessionsExecuteSqlCall {
 13571  	c := &ProjectsInstancesDatabasesSessionsExecuteSqlCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 13572  	c.session = session
 13573  	c.executesqlrequest = executesqlrequest
 13574  	return c
 13575  }
 13576  
 13577  // Fields allows partial responses to be retrieved. See
 13578  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 13579  // details.
 13580  func (c *ProjectsInstancesDatabasesSessionsExecuteSqlCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesSessionsExecuteSqlCall {
 13581  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 13582  	return c
 13583  }
 13584  
 13585  // Context sets the context to be used in this call's Do method.
 13586  func (c *ProjectsInstancesDatabasesSessionsExecuteSqlCall) Context(ctx context.Context) *ProjectsInstancesDatabasesSessionsExecuteSqlCall {
 13587  	c.ctx_ = ctx
 13588  	return c
 13589  }
 13590  
 13591  // Header returns a http.Header that can be modified by the caller to add
 13592  // headers to the request.
 13593  func (c *ProjectsInstancesDatabasesSessionsExecuteSqlCall) Header() http.Header {
 13594  	if c.header_ == nil {
 13595  		c.header_ = make(http.Header)
 13596  	}
 13597  	return c.header_
 13598  }
 13599  
 13600  func (c *ProjectsInstancesDatabasesSessionsExecuteSqlCall) doRequest(alt string) (*http.Response, error) {
 13601  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 13602  	var body io.Reader = nil
 13603  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.executesqlrequest)
 13604  	if err != nil {
 13605  		return nil, err
 13606  	}
 13607  	c.urlParams_.Set("alt", alt)
 13608  	c.urlParams_.Set("prettyPrint", "false")
 13609  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+session}:executeSql")
 13610  	urls += "?" + c.urlParams_.Encode()
 13611  	req, err := http.NewRequest("POST", urls, body)
 13612  	if err != nil {
 13613  		return nil, err
 13614  	}
 13615  	req.Header = reqHeaders
 13616  	googleapi.Expand(req.URL, map[string]string{
 13617  		"session": c.session,
 13618  	})
 13619  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13620  }
 13621  
 13622  // Do executes the "spanner.projects.instances.databases.sessions.executeSql" call.
 13623  // Any non-2xx status code is an error. Response headers are in either
 13624  // *ResultSet.ServerResponse.Header or (if a response was returned at all) in
 13625  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 13626  // whether the returned error was because http.StatusNotModified was returned.
 13627  func (c *ProjectsInstancesDatabasesSessionsExecuteSqlCall) Do(opts ...googleapi.CallOption) (*ResultSet, error) {
 13628  	gensupport.SetOptions(c.urlParams_, opts...)
 13629  	res, err := c.doRequest("json")
 13630  	if res != nil && res.StatusCode == http.StatusNotModified {
 13631  		if res.Body != nil {
 13632  			res.Body.Close()
 13633  		}
 13634  		return nil, gensupport.WrapError(&googleapi.Error{
 13635  			Code:   res.StatusCode,
 13636  			Header: res.Header,
 13637  		})
 13638  	}
 13639  	if err != nil {
 13640  		return nil, err
 13641  	}
 13642  	defer googleapi.CloseBody(res)
 13643  	if err := googleapi.CheckResponse(res); err != nil {
 13644  		return nil, gensupport.WrapError(err)
 13645  	}
 13646  	ret := &ResultSet{
 13647  		ServerResponse: googleapi.ServerResponse{
 13648  			Header:         res.Header,
 13649  			HTTPStatusCode: res.StatusCode,
 13650  		},
 13651  	}
 13652  	target := &ret
 13653  	if err := gensupport.DecodeResponse(target, res); err != nil {
 13654  		return nil, err
 13655  	}
 13656  	return ret, nil
 13657  }
 13658  
 13659  type ProjectsInstancesDatabasesSessionsExecuteStreamingSqlCall struct {
 13660  	s                 *Service
 13661  	session           string
 13662  	executesqlrequest *ExecuteSqlRequest
 13663  	urlParams_        gensupport.URLParams
 13664  	ctx_              context.Context
 13665  	header_           http.Header
 13666  }
 13667  
 13668  // ExecuteStreamingSql: Like ExecuteSql, except returns the result set as a
 13669  // stream. Unlike ExecuteSql, there is no limit on the size of the returned
 13670  // result set. However, no individual row in the result set can exceed 100 MiB,
 13671  // and no column value can exceed 10 MiB.
 13672  //
 13673  // - session: The session in which the SQL query should be performed.
 13674  func (r *ProjectsInstancesDatabasesSessionsService) ExecuteStreamingSql(session string, executesqlrequest *ExecuteSqlRequest) *ProjectsInstancesDatabasesSessionsExecuteStreamingSqlCall {
 13675  	c := &ProjectsInstancesDatabasesSessionsExecuteStreamingSqlCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 13676  	c.session = session
 13677  	c.executesqlrequest = executesqlrequest
 13678  	return c
 13679  }
 13680  
 13681  // Fields allows partial responses to be retrieved. See
 13682  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 13683  // details.
 13684  func (c *ProjectsInstancesDatabasesSessionsExecuteStreamingSqlCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesSessionsExecuteStreamingSqlCall {
 13685  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 13686  	return c
 13687  }
 13688  
 13689  // Context sets the context to be used in this call's Do method.
 13690  func (c *ProjectsInstancesDatabasesSessionsExecuteStreamingSqlCall) Context(ctx context.Context) *ProjectsInstancesDatabasesSessionsExecuteStreamingSqlCall {
 13691  	c.ctx_ = ctx
 13692  	return c
 13693  }
 13694  
 13695  // Header returns a http.Header that can be modified by the caller to add
 13696  // headers to the request.
 13697  func (c *ProjectsInstancesDatabasesSessionsExecuteStreamingSqlCall) Header() http.Header {
 13698  	if c.header_ == nil {
 13699  		c.header_ = make(http.Header)
 13700  	}
 13701  	return c.header_
 13702  }
 13703  
 13704  func (c *ProjectsInstancesDatabasesSessionsExecuteStreamingSqlCall) doRequest(alt string) (*http.Response, error) {
 13705  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 13706  	var body io.Reader = nil
 13707  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.executesqlrequest)
 13708  	if err != nil {
 13709  		return nil, err
 13710  	}
 13711  	c.urlParams_.Set("alt", alt)
 13712  	c.urlParams_.Set("prettyPrint", "false")
 13713  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+session}:executeStreamingSql")
 13714  	urls += "?" + c.urlParams_.Encode()
 13715  	req, err := http.NewRequest("POST", urls, body)
 13716  	if err != nil {
 13717  		return nil, err
 13718  	}
 13719  	req.Header = reqHeaders
 13720  	googleapi.Expand(req.URL, map[string]string{
 13721  		"session": c.session,
 13722  	})
 13723  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13724  }
 13725  
 13726  // Do executes the "spanner.projects.instances.databases.sessions.executeStreamingSql" call.
 13727  // Any non-2xx status code is an error. Response headers are in either
 13728  // *PartialResultSet.ServerResponse.Header or (if a response was returned at
 13729  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 13730  // check whether the returned error was because http.StatusNotModified was
 13731  // returned.
 13732  func (c *ProjectsInstancesDatabasesSessionsExecuteStreamingSqlCall) Do(opts ...googleapi.CallOption) (*PartialResultSet, error) {
 13733  	gensupport.SetOptions(c.urlParams_, opts...)
 13734  	res, err := c.doRequest("json")
 13735  	if res != nil && res.StatusCode == http.StatusNotModified {
 13736  		if res.Body != nil {
 13737  			res.Body.Close()
 13738  		}
 13739  		return nil, gensupport.WrapError(&googleapi.Error{
 13740  			Code:   res.StatusCode,
 13741  			Header: res.Header,
 13742  		})
 13743  	}
 13744  	if err != nil {
 13745  		return nil, err
 13746  	}
 13747  	defer googleapi.CloseBody(res)
 13748  	if err := googleapi.CheckResponse(res); err != nil {
 13749  		return nil, gensupport.WrapError(err)
 13750  	}
 13751  	ret := &PartialResultSet{
 13752  		ServerResponse: googleapi.ServerResponse{
 13753  			Header:         res.Header,
 13754  			HTTPStatusCode: res.StatusCode,
 13755  		},
 13756  	}
 13757  	target := &ret
 13758  	if err := gensupport.DecodeResponse(target, res); err != nil {
 13759  		return nil, err
 13760  	}
 13761  	return ret, nil
 13762  }
 13763  
 13764  type ProjectsInstancesDatabasesSessionsGetCall struct {
 13765  	s            *Service
 13766  	name         string
 13767  	urlParams_   gensupport.URLParams
 13768  	ifNoneMatch_ string
 13769  	ctx_         context.Context
 13770  	header_      http.Header
 13771  }
 13772  
 13773  // Get: Gets a session. Returns `NOT_FOUND` if the session does not exist. This
 13774  // is mainly useful for determining whether a session is still alive.
 13775  //
 13776  // - name: The name of the session to retrieve.
 13777  func (r *ProjectsInstancesDatabasesSessionsService) Get(name string) *ProjectsInstancesDatabasesSessionsGetCall {
 13778  	c := &ProjectsInstancesDatabasesSessionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 13779  	c.name = name
 13780  	return c
 13781  }
 13782  
 13783  // Fields allows partial responses to be retrieved. See
 13784  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 13785  // details.
 13786  func (c *ProjectsInstancesDatabasesSessionsGetCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesSessionsGetCall {
 13787  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 13788  	return c
 13789  }
 13790  
 13791  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 13792  // object's ETag matches the given value. This is useful for getting updates
 13793  // only after the object has changed since the last request.
 13794  func (c *ProjectsInstancesDatabasesSessionsGetCall) IfNoneMatch(entityTag string) *ProjectsInstancesDatabasesSessionsGetCall {
 13795  	c.ifNoneMatch_ = entityTag
 13796  	return c
 13797  }
 13798  
 13799  // Context sets the context to be used in this call's Do method.
 13800  func (c *ProjectsInstancesDatabasesSessionsGetCall) Context(ctx context.Context) *ProjectsInstancesDatabasesSessionsGetCall {
 13801  	c.ctx_ = ctx
 13802  	return c
 13803  }
 13804  
 13805  // Header returns a http.Header that can be modified by the caller to add
 13806  // headers to the request.
 13807  func (c *ProjectsInstancesDatabasesSessionsGetCall) Header() http.Header {
 13808  	if c.header_ == nil {
 13809  		c.header_ = make(http.Header)
 13810  	}
 13811  	return c.header_
 13812  }
 13813  
 13814  func (c *ProjectsInstancesDatabasesSessionsGetCall) doRequest(alt string) (*http.Response, error) {
 13815  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 13816  	if c.ifNoneMatch_ != "" {
 13817  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 13818  	}
 13819  	var body io.Reader = nil
 13820  	c.urlParams_.Set("alt", alt)
 13821  	c.urlParams_.Set("prettyPrint", "false")
 13822  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 13823  	urls += "?" + c.urlParams_.Encode()
 13824  	req, err := http.NewRequest("GET", urls, body)
 13825  	if err != nil {
 13826  		return nil, err
 13827  	}
 13828  	req.Header = reqHeaders
 13829  	googleapi.Expand(req.URL, map[string]string{
 13830  		"name": c.name,
 13831  	})
 13832  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13833  }
 13834  
 13835  // Do executes the "spanner.projects.instances.databases.sessions.get" call.
 13836  // Any non-2xx status code is an error. Response headers are in either
 13837  // *Session.ServerResponse.Header or (if a response was returned at all) in
 13838  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 13839  // whether the returned error was because http.StatusNotModified was returned.
 13840  func (c *ProjectsInstancesDatabasesSessionsGetCall) Do(opts ...googleapi.CallOption) (*Session, error) {
 13841  	gensupport.SetOptions(c.urlParams_, opts...)
 13842  	res, err := c.doRequest("json")
 13843  	if res != nil && res.StatusCode == http.StatusNotModified {
 13844  		if res.Body != nil {
 13845  			res.Body.Close()
 13846  		}
 13847  		return nil, gensupport.WrapError(&googleapi.Error{
 13848  			Code:   res.StatusCode,
 13849  			Header: res.Header,
 13850  		})
 13851  	}
 13852  	if err != nil {
 13853  		return nil, err
 13854  	}
 13855  	defer googleapi.CloseBody(res)
 13856  	if err := googleapi.CheckResponse(res); err != nil {
 13857  		return nil, gensupport.WrapError(err)
 13858  	}
 13859  	ret := &Session{
 13860  		ServerResponse: googleapi.ServerResponse{
 13861  			Header:         res.Header,
 13862  			HTTPStatusCode: res.StatusCode,
 13863  		},
 13864  	}
 13865  	target := &ret
 13866  	if err := gensupport.DecodeResponse(target, res); err != nil {
 13867  		return nil, err
 13868  	}
 13869  	return ret, nil
 13870  }
 13871  
 13872  type ProjectsInstancesDatabasesSessionsListCall struct {
 13873  	s            *Service
 13874  	database     string
 13875  	urlParams_   gensupport.URLParams
 13876  	ifNoneMatch_ string
 13877  	ctx_         context.Context
 13878  	header_      http.Header
 13879  }
 13880  
 13881  // List: Lists all sessions in a given database.
 13882  //
 13883  // - database: The database in which to list sessions.
 13884  func (r *ProjectsInstancesDatabasesSessionsService) List(database string) *ProjectsInstancesDatabasesSessionsListCall {
 13885  	c := &ProjectsInstancesDatabasesSessionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 13886  	c.database = database
 13887  	return c
 13888  }
 13889  
 13890  // Filter sets the optional parameter "filter": An expression for filtering the
 13891  // results of the request. Filter rules are case insensitive. The fields
 13892  // eligible for filtering are: * `labels.key` where key is the name of a label
 13893  // Some examples of using filters are: * `labels.env:*` --> The session has the
 13894  // label "env". * `labels.env:dev` --> The session has the label "env" and the
 13895  // value of the label contains the string "dev".
 13896  func (c *ProjectsInstancesDatabasesSessionsListCall) Filter(filter string) *ProjectsInstancesDatabasesSessionsListCall {
 13897  	c.urlParams_.Set("filter", filter)
 13898  	return c
 13899  }
 13900  
 13901  // PageSize sets the optional parameter "pageSize": Number of sessions to be
 13902  // returned in the response. If 0 or less, defaults to the server's maximum
 13903  // allowed page size.
 13904  func (c *ProjectsInstancesDatabasesSessionsListCall) PageSize(pageSize int64) *ProjectsInstancesDatabasesSessionsListCall {
 13905  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 13906  	return c
 13907  }
 13908  
 13909  // PageToken sets the optional parameter "pageToken": If non-empty,
 13910  // `page_token` should contain a next_page_token from a previous
 13911  // ListSessionsResponse.
 13912  func (c *ProjectsInstancesDatabasesSessionsListCall) PageToken(pageToken string) *ProjectsInstancesDatabasesSessionsListCall {
 13913  	c.urlParams_.Set("pageToken", pageToken)
 13914  	return c
 13915  }
 13916  
 13917  // Fields allows partial responses to be retrieved. See
 13918  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 13919  // details.
 13920  func (c *ProjectsInstancesDatabasesSessionsListCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesSessionsListCall {
 13921  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 13922  	return c
 13923  }
 13924  
 13925  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 13926  // object's ETag matches the given value. This is useful for getting updates
 13927  // only after the object has changed since the last request.
 13928  func (c *ProjectsInstancesDatabasesSessionsListCall) IfNoneMatch(entityTag string) *ProjectsInstancesDatabasesSessionsListCall {
 13929  	c.ifNoneMatch_ = entityTag
 13930  	return c
 13931  }
 13932  
 13933  // Context sets the context to be used in this call's Do method.
 13934  func (c *ProjectsInstancesDatabasesSessionsListCall) Context(ctx context.Context) *ProjectsInstancesDatabasesSessionsListCall {
 13935  	c.ctx_ = ctx
 13936  	return c
 13937  }
 13938  
 13939  // Header returns a http.Header that can be modified by the caller to add
 13940  // headers to the request.
 13941  func (c *ProjectsInstancesDatabasesSessionsListCall) Header() http.Header {
 13942  	if c.header_ == nil {
 13943  		c.header_ = make(http.Header)
 13944  	}
 13945  	return c.header_
 13946  }
 13947  
 13948  func (c *ProjectsInstancesDatabasesSessionsListCall) doRequest(alt string) (*http.Response, error) {
 13949  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 13950  	if c.ifNoneMatch_ != "" {
 13951  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 13952  	}
 13953  	var body io.Reader = nil
 13954  	c.urlParams_.Set("alt", alt)
 13955  	c.urlParams_.Set("prettyPrint", "false")
 13956  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+database}/sessions")
 13957  	urls += "?" + c.urlParams_.Encode()
 13958  	req, err := http.NewRequest("GET", urls, body)
 13959  	if err != nil {
 13960  		return nil, err
 13961  	}
 13962  	req.Header = reqHeaders
 13963  	googleapi.Expand(req.URL, map[string]string{
 13964  		"database": c.database,
 13965  	})
 13966  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13967  }
 13968  
 13969  // Do executes the "spanner.projects.instances.databases.sessions.list" call.
 13970  // Any non-2xx status code is an error. Response headers are in either
 13971  // *ListSessionsResponse.ServerResponse.Header or (if a response was returned
 13972  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 13973  // check whether the returned error was because http.StatusNotModified was
 13974  // returned.
 13975  func (c *ProjectsInstancesDatabasesSessionsListCall) Do(opts ...googleapi.CallOption) (*ListSessionsResponse, error) {
 13976  	gensupport.SetOptions(c.urlParams_, opts...)
 13977  	res, err := c.doRequest("json")
 13978  	if res != nil && res.StatusCode == http.StatusNotModified {
 13979  		if res.Body != nil {
 13980  			res.Body.Close()
 13981  		}
 13982  		return nil, gensupport.WrapError(&googleapi.Error{
 13983  			Code:   res.StatusCode,
 13984  			Header: res.Header,
 13985  		})
 13986  	}
 13987  	if err != nil {
 13988  		return nil, err
 13989  	}
 13990  	defer googleapi.CloseBody(res)
 13991  	if err := googleapi.CheckResponse(res); err != nil {
 13992  		return nil, gensupport.WrapError(err)
 13993  	}
 13994  	ret := &ListSessionsResponse{
 13995  		ServerResponse: googleapi.ServerResponse{
 13996  			Header:         res.Header,
 13997  			HTTPStatusCode: res.StatusCode,
 13998  		},
 13999  	}
 14000  	target := &ret
 14001  	if err := gensupport.DecodeResponse(target, res); err != nil {
 14002  		return nil, err
 14003  	}
 14004  	return ret, nil
 14005  }
 14006  
 14007  // Pages invokes f for each page of results.
 14008  // A non-nil error returned from f will halt the iteration.
 14009  // The provided context supersedes any context provided to the Context method.
 14010  func (c *ProjectsInstancesDatabasesSessionsListCall) Pages(ctx context.Context, f func(*ListSessionsResponse) error) error {
 14011  	c.ctx_ = ctx
 14012  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 14013  	for {
 14014  		x, err := c.Do()
 14015  		if err != nil {
 14016  			return err
 14017  		}
 14018  		if err := f(x); err != nil {
 14019  			return err
 14020  		}
 14021  		if x.NextPageToken == "" {
 14022  			return nil
 14023  		}
 14024  		c.PageToken(x.NextPageToken)
 14025  	}
 14026  }
 14027  
 14028  type ProjectsInstancesDatabasesSessionsPartitionQueryCall struct {
 14029  	s                     *Service
 14030  	session               string
 14031  	partitionqueryrequest *PartitionQueryRequest
 14032  	urlParams_            gensupport.URLParams
 14033  	ctx_                  context.Context
 14034  	header_               http.Header
 14035  }
 14036  
 14037  // PartitionQuery: Creates a set of partition tokens that can be used to
 14038  // execute a query operation in parallel. Each of the returned partition tokens
 14039  // can be used by ExecuteStreamingSql to specify a subset of the query result
 14040  // to read. The same session and read-only transaction must be used by the
 14041  // PartitionQueryRequest used to create the partition tokens and the
 14042  // ExecuteSqlRequests that use the partition tokens. Partition tokens become
 14043  // invalid when the session used to create them is deleted, is idle for too
 14044  // long, begins a new transaction, or becomes too old. When any of these
 14045  // happen, it is not possible to resume the query, and the whole operation must
 14046  // be restarted from the beginning.
 14047  //
 14048  // - session: The session used to create the partitions.
 14049  func (r *ProjectsInstancesDatabasesSessionsService) PartitionQuery(session string, partitionqueryrequest *PartitionQueryRequest) *ProjectsInstancesDatabasesSessionsPartitionQueryCall {
 14050  	c := &ProjectsInstancesDatabasesSessionsPartitionQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 14051  	c.session = session
 14052  	c.partitionqueryrequest = partitionqueryrequest
 14053  	return c
 14054  }
 14055  
 14056  // Fields allows partial responses to be retrieved. See
 14057  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 14058  // details.
 14059  func (c *ProjectsInstancesDatabasesSessionsPartitionQueryCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesSessionsPartitionQueryCall {
 14060  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 14061  	return c
 14062  }
 14063  
 14064  // Context sets the context to be used in this call's Do method.
 14065  func (c *ProjectsInstancesDatabasesSessionsPartitionQueryCall) Context(ctx context.Context) *ProjectsInstancesDatabasesSessionsPartitionQueryCall {
 14066  	c.ctx_ = ctx
 14067  	return c
 14068  }
 14069  
 14070  // Header returns a http.Header that can be modified by the caller to add
 14071  // headers to the request.
 14072  func (c *ProjectsInstancesDatabasesSessionsPartitionQueryCall) Header() http.Header {
 14073  	if c.header_ == nil {
 14074  		c.header_ = make(http.Header)
 14075  	}
 14076  	return c.header_
 14077  }
 14078  
 14079  func (c *ProjectsInstancesDatabasesSessionsPartitionQueryCall) doRequest(alt string) (*http.Response, error) {
 14080  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 14081  	var body io.Reader = nil
 14082  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.partitionqueryrequest)
 14083  	if err != nil {
 14084  		return nil, err
 14085  	}
 14086  	c.urlParams_.Set("alt", alt)
 14087  	c.urlParams_.Set("prettyPrint", "false")
 14088  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+session}:partitionQuery")
 14089  	urls += "?" + c.urlParams_.Encode()
 14090  	req, err := http.NewRequest("POST", urls, body)
 14091  	if err != nil {
 14092  		return nil, err
 14093  	}
 14094  	req.Header = reqHeaders
 14095  	googleapi.Expand(req.URL, map[string]string{
 14096  		"session": c.session,
 14097  	})
 14098  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 14099  }
 14100  
 14101  // Do executes the "spanner.projects.instances.databases.sessions.partitionQuery" call.
 14102  // Any non-2xx status code is an error. Response headers are in either
 14103  // *PartitionResponse.ServerResponse.Header or (if a response was returned at
 14104  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 14105  // check whether the returned error was because http.StatusNotModified was
 14106  // returned.
 14107  func (c *ProjectsInstancesDatabasesSessionsPartitionQueryCall) Do(opts ...googleapi.CallOption) (*PartitionResponse, error) {
 14108  	gensupport.SetOptions(c.urlParams_, opts...)
 14109  	res, err := c.doRequest("json")
 14110  	if res != nil && res.StatusCode == http.StatusNotModified {
 14111  		if res.Body != nil {
 14112  			res.Body.Close()
 14113  		}
 14114  		return nil, gensupport.WrapError(&googleapi.Error{
 14115  			Code:   res.StatusCode,
 14116  			Header: res.Header,
 14117  		})
 14118  	}
 14119  	if err != nil {
 14120  		return nil, err
 14121  	}
 14122  	defer googleapi.CloseBody(res)
 14123  	if err := googleapi.CheckResponse(res); err != nil {
 14124  		return nil, gensupport.WrapError(err)
 14125  	}
 14126  	ret := &PartitionResponse{
 14127  		ServerResponse: googleapi.ServerResponse{
 14128  			Header:         res.Header,
 14129  			HTTPStatusCode: res.StatusCode,
 14130  		},
 14131  	}
 14132  	target := &ret
 14133  	if err := gensupport.DecodeResponse(target, res); err != nil {
 14134  		return nil, err
 14135  	}
 14136  	return ret, nil
 14137  }
 14138  
 14139  type ProjectsInstancesDatabasesSessionsPartitionReadCall struct {
 14140  	s                    *Service
 14141  	session              string
 14142  	partitionreadrequest *PartitionReadRequest
 14143  	urlParams_           gensupport.URLParams
 14144  	ctx_                 context.Context
 14145  	header_              http.Header
 14146  }
 14147  
 14148  // PartitionRead: Creates a set of partition tokens that can be used to execute
 14149  // a read operation in parallel. Each of the returned partition tokens can be
 14150  // used by StreamingRead to specify a subset of the read result to read. The
 14151  // same session and read-only transaction must be used by the
 14152  // PartitionReadRequest used to create the partition tokens and the
 14153  // ReadRequests that use the partition tokens. There are no ordering guarantees
 14154  // on rows returned among the returned partition tokens, or even within each
 14155  // individual StreamingRead call issued with a partition_token. Partition
 14156  // tokens become invalid when the session used to create them is deleted, is
 14157  // idle for too long, begins a new transaction, or becomes too old. When any of
 14158  // these happen, it is not possible to resume the read, and the whole operation
 14159  // must be restarted from the beginning.
 14160  //
 14161  // - session: The session used to create the partitions.
 14162  func (r *ProjectsInstancesDatabasesSessionsService) PartitionRead(session string, partitionreadrequest *PartitionReadRequest) *ProjectsInstancesDatabasesSessionsPartitionReadCall {
 14163  	c := &ProjectsInstancesDatabasesSessionsPartitionReadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 14164  	c.session = session
 14165  	c.partitionreadrequest = partitionreadrequest
 14166  	return c
 14167  }
 14168  
 14169  // Fields allows partial responses to be retrieved. See
 14170  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 14171  // details.
 14172  func (c *ProjectsInstancesDatabasesSessionsPartitionReadCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesSessionsPartitionReadCall {
 14173  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 14174  	return c
 14175  }
 14176  
 14177  // Context sets the context to be used in this call's Do method.
 14178  func (c *ProjectsInstancesDatabasesSessionsPartitionReadCall) Context(ctx context.Context) *ProjectsInstancesDatabasesSessionsPartitionReadCall {
 14179  	c.ctx_ = ctx
 14180  	return c
 14181  }
 14182  
 14183  // Header returns a http.Header that can be modified by the caller to add
 14184  // headers to the request.
 14185  func (c *ProjectsInstancesDatabasesSessionsPartitionReadCall) Header() http.Header {
 14186  	if c.header_ == nil {
 14187  		c.header_ = make(http.Header)
 14188  	}
 14189  	return c.header_
 14190  }
 14191  
 14192  func (c *ProjectsInstancesDatabasesSessionsPartitionReadCall) doRequest(alt string) (*http.Response, error) {
 14193  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 14194  	var body io.Reader = nil
 14195  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.partitionreadrequest)
 14196  	if err != nil {
 14197  		return nil, err
 14198  	}
 14199  	c.urlParams_.Set("alt", alt)
 14200  	c.urlParams_.Set("prettyPrint", "false")
 14201  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+session}:partitionRead")
 14202  	urls += "?" + c.urlParams_.Encode()
 14203  	req, err := http.NewRequest("POST", urls, body)
 14204  	if err != nil {
 14205  		return nil, err
 14206  	}
 14207  	req.Header = reqHeaders
 14208  	googleapi.Expand(req.URL, map[string]string{
 14209  		"session": c.session,
 14210  	})
 14211  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 14212  }
 14213  
 14214  // Do executes the "spanner.projects.instances.databases.sessions.partitionRead" call.
 14215  // Any non-2xx status code is an error. Response headers are in either
 14216  // *PartitionResponse.ServerResponse.Header or (if a response was returned at
 14217  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 14218  // check whether the returned error was because http.StatusNotModified was
 14219  // returned.
 14220  func (c *ProjectsInstancesDatabasesSessionsPartitionReadCall) Do(opts ...googleapi.CallOption) (*PartitionResponse, error) {
 14221  	gensupport.SetOptions(c.urlParams_, opts...)
 14222  	res, err := c.doRequest("json")
 14223  	if res != nil && res.StatusCode == http.StatusNotModified {
 14224  		if res.Body != nil {
 14225  			res.Body.Close()
 14226  		}
 14227  		return nil, gensupport.WrapError(&googleapi.Error{
 14228  			Code:   res.StatusCode,
 14229  			Header: res.Header,
 14230  		})
 14231  	}
 14232  	if err != nil {
 14233  		return nil, err
 14234  	}
 14235  	defer googleapi.CloseBody(res)
 14236  	if err := googleapi.CheckResponse(res); err != nil {
 14237  		return nil, gensupport.WrapError(err)
 14238  	}
 14239  	ret := &PartitionResponse{
 14240  		ServerResponse: googleapi.ServerResponse{
 14241  			Header:         res.Header,
 14242  			HTTPStatusCode: res.StatusCode,
 14243  		},
 14244  	}
 14245  	target := &ret
 14246  	if err := gensupport.DecodeResponse(target, res); err != nil {
 14247  		return nil, err
 14248  	}
 14249  	return ret, nil
 14250  }
 14251  
 14252  type ProjectsInstancesDatabasesSessionsReadCall struct {
 14253  	s           *Service
 14254  	session     string
 14255  	readrequest *ReadRequest
 14256  	urlParams_  gensupport.URLParams
 14257  	ctx_        context.Context
 14258  	header_     http.Header
 14259  }
 14260  
 14261  // Read: Reads rows from the database using key lookups and scans, as a simple
 14262  // key/value style alternative to ExecuteSql. This method cannot be used to
 14263  // return a result set larger than 10 MiB; if the read matches more data than
 14264  // that, the read fails with a `FAILED_PRECONDITION` error. Reads inside
 14265  // read-write transactions might return `ABORTED`. If this occurs, the
 14266  // application should restart the transaction from the beginning. See
 14267  // Transaction for more details. Larger result sets can be yielded in streaming
 14268  // fashion by calling StreamingRead instead.
 14269  //
 14270  // - session: The session in which the read should be performed.
 14271  func (r *ProjectsInstancesDatabasesSessionsService) Read(session string, readrequest *ReadRequest) *ProjectsInstancesDatabasesSessionsReadCall {
 14272  	c := &ProjectsInstancesDatabasesSessionsReadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 14273  	c.session = session
 14274  	c.readrequest = readrequest
 14275  	return c
 14276  }
 14277  
 14278  // Fields allows partial responses to be retrieved. See
 14279  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 14280  // details.
 14281  func (c *ProjectsInstancesDatabasesSessionsReadCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesSessionsReadCall {
 14282  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 14283  	return c
 14284  }
 14285  
 14286  // Context sets the context to be used in this call's Do method.
 14287  func (c *ProjectsInstancesDatabasesSessionsReadCall) Context(ctx context.Context) *ProjectsInstancesDatabasesSessionsReadCall {
 14288  	c.ctx_ = ctx
 14289  	return c
 14290  }
 14291  
 14292  // Header returns a http.Header that can be modified by the caller to add
 14293  // headers to the request.
 14294  func (c *ProjectsInstancesDatabasesSessionsReadCall) Header() http.Header {
 14295  	if c.header_ == nil {
 14296  		c.header_ = make(http.Header)
 14297  	}
 14298  	return c.header_
 14299  }
 14300  
 14301  func (c *ProjectsInstancesDatabasesSessionsReadCall) doRequest(alt string) (*http.Response, error) {
 14302  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 14303  	var body io.Reader = nil
 14304  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.readrequest)
 14305  	if err != nil {
 14306  		return nil, err
 14307  	}
 14308  	c.urlParams_.Set("alt", alt)
 14309  	c.urlParams_.Set("prettyPrint", "false")
 14310  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+session}:read")
 14311  	urls += "?" + c.urlParams_.Encode()
 14312  	req, err := http.NewRequest("POST", urls, body)
 14313  	if err != nil {
 14314  		return nil, err
 14315  	}
 14316  	req.Header = reqHeaders
 14317  	googleapi.Expand(req.URL, map[string]string{
 14318  		"session": c.session,
 14319  	})
 14320  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 14321  }
 14322  
 14323  // Do executes the "spanner.projects.instances.databases.sessions.read" call.
 14324  // Any non-2xx status code is an error. Response headers are in either
 14325  // *ResultSet.ServerResponse.Header or (if a response was returned at all) in
 14326  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 14327  // whether the returned error was because http.StatusNotModified was returned.
 14328  func (c *ProjectsInstancesDatabasesSessionsReadCall) Do(opts ...googleapi.CallOption) (*ResultSet, error) {
 14329  	gensupport.SetOptions(c.urlParams_, opts...)
 14330  	res, err := c.doRequest("json")
 14331  	if res != nil && res.StatusCode == http.StatusNotModified {
 14332  		if res.Body != nil {
 14333  			res.Body.Close()
 14334  		}
 14335  		return nil, gensupport.WrapError(&googleapi.Error{
 14336  			Code:   res.StatusCode,
 14337  			Header: res.Header,
 14338  		})
 14339  	}
 14340  	if err != nil {
 14341  		return nil, err
 14342  	}
 14343  	defer googleapi.CloseBody(res)
 14344  	if err := googleapi.CheckResponse(res); err != nil {
 14345  		return nil, gensupport.WrapError(err)
 14346  	}
 14347  	ret := &ResultSet{
 14348  		ServerResponse: googleapi.ServerResponse{
 14349  			Header:         res.Header,
 14350  			HTTPStatusCode: res.StatusCode,
 14351  		},
 14352  	}
 14353  	target := &ret
 14354  	if err := gensupport.DecodeResponse(target, res); err != nil {
 14355  		return nil, err
 14356  	}
 14357  	return ret, nil
 14358  }
 14359  
 14360  type ProjectsInstancesDatabasesSessionsRollbackCall struct {
 14361  	s               *Service
 14362  	session         string
 14363  	rollbackrequest *RollbackRequest
 14364  	urlParams_      gensupport.URLParams
 14365  	ctx_            context.Context
 14366  	header_         http.Header
 14367  }
 14368  
 14369  // Rollback: Rolls back a transaction, releasing any locks it holds. It is a
 14370  // good idea to call this for any transaction that includes one or more Read or
 14371  // ExecuteSql requests and ultimately decides not to commit. `Rollback` returns
 14372  // `OK` if it successfully aborts the transaction, the transaction was already
 14373  // aborted, or the transaction is not found. `Rollback` never returns
 14374  // `ABORTED`.
 14375  //
 14376  // - session: The session in which the transaction to roll back is running.
 14377  func (r *ProjectsInstancesDatabasesSessionsService) Rollback(session string, rollbackrequest *RollbackRequest) *ProjectsInstancesDatabasesSessionsRollbackCall {
 14378  	c := &ProjectsInstancesDatabasesSessionsRollbackCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 14379  	c.session = session
 14380  	c.rollbackrequest = rollbackrequest
 14381  	return c
 14382  }
 14383  
 14384  // Fields allows partial responses to be retrieved. See
 14385  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 14386  // details.
 14387  func (c *ProjectsInstancesDatabasesSessionsRollbackCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesSessionsRollbackCall {
 14388  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 14389  	return c
 14390  }
 14391  
 14392  // Context sets the context to be used in this call's Do method.
 14393  func (c *ProjectsInstancesDatabasesSessionsRollbackCall) Context(ctx context.Context) *ProjectsInstancesDatabasesSessionsRollbackCall {
 14394  	c.ctx_ = ctx
 14395  	return c
 14396  }
 14397  
 14398  // Header returns a http.Header that can be modified by the caller to add
 14399  // headers to the request.
 14400  func (c *ProjectsInstancesDatabasesSessionsRollbackCall) Header() http.Header {
 14401  	if c.header_ == nil {
 14402  		c.header_ = make(http.Header)
 14403  	}
 14404  	return c.header_
 14405  }
 14406  
 14407  func (c *ProjectsInstancesDatabasesSessionsRollbackCall) doRequest(alt string) (*http.Response, error) {
 14408  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 14409  	var body io.Reader = nil
 14410  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.rollbackrequest)
 14411  	if err != nil {
 14412  		return nil, err
 14413  	}
 14414  	c.urlParams_.Set("alt", alt)
 14415  	c.urlParams_.Set("prettyPrint", "false")
 14416  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+session}:rollback")
 14417  	urls += "?" + c.urlParams_.Encode()
 14418  	req, err := http.NewRequest("POST", urls, body)
 14419  	if err != nil {
 14420  		return nil, err
 14421  	}
 14422  	req.Header = reqHeaders
 14423  	googleapi.Expand(req.URL, map[string]string{
 14424  		"session": c.session,
 14425  	})
 14426  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 14427  }
 14428  
 14429  // Do executes the "spanner.projects.instances.databases.sessions.rollback" call.
 14430  // Any non-2xx status code is an error. Response headers are in either
 14431  // *Empty.ServerResponse.Header or (if a response was returned at all) in
 14432  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 14433  // whether the returned error was because http.StatusNotModified was returned.
 14434  func (c *ProjectsInstancesDatabasesSessionsRollbackCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
 14435  	gensupport.SetOptions(c.urlParams_, opts...)
 14436  	res, err := c.doRequest("json")
 14437  	if res != nil && res.StatusCode == http.StatusNotModified {
 14438  		if res.Body != nil {
 14439  			res.Body.Close()
 14440  		}
 14441  		return nil, gensupport.WrapError(&googleapi.Error{
 14442  			Code:   res.StatusCode,
 14443  			Header: res.Header,
 14444  		})
 14445  	}
 14446  	if err != nil {
 14447  		return nil, err
 14448  	}
 14449  	defer googleapi.CloseBody(res)
 14450  	if err := googleapi.CheckResponse(res); err != nil {
 14451  		return nil, gensupport.WrapError(err)
 14452  	}
 14453  	ret := &Empty{
 14454  		ServerResponse: googleapi.ServerResponse{
 14455  			Header:         res.Header,
 14456  			HTTPStatusCode: res.StatusCode,
 14457  		},
 14458  	}
 14459  	target := &ret
 14460  	if err := gensupport.DecodeResponse(target, res); err != nil {
 14461  		return nil, err
 14462  	}
 14463  	return ret, nil
 14464  }
 14465  
 14466  type ProjectsInstancesDatabasesSessionsStreamingReadCall struct {
 14467  	s           *Service
 14468  	session     string
 14469  	readrequest *ReadRequest
 14470  	urlParams_  gensupport.URLParams
 14471  	ctx_        context.Context
 14472  	header_     http.Header
 14473  }
 14474  
 14475  // StreamingRead: Like Read, except returns the result set as a stream. Unlike
 14476  // Read, there is no limit on the size of the returned result set. However, no
 14477  // individual row in the result set can exceed 100 MiB, and no column value can
 14478  // exceed 10 MiB.
 14479  //
 14480  // - session: The session in which the read should be performed.
 14481  func (r *ProjectsInstancesDatabasesSessionsService) StreamingRead(session string, readrequest *ReadRequest) *ProjectsInstancesDatabasesSessionsStreamingReadCall {
 14482  	c := &ProjectsInstancesDatabasesSessionsStreamingReadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 14483  	c.session = session
 14484  	c.readrequest = readrequest
 14485  	return c
 14486  }
 14487  
 14488  // Fields allows partial responses to be retrieved. See
 14489  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 14490  // details.
 14491  func (c *ProjectsInstancesDatabasesSessionsStreamingReadCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesSessionsStreamingReadCall {
 14492  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 14493  	return c
 14494  }
 14495  
 14496  // Context sets the context to be used in this call's Do method.
 14497  func (c *ProjectsInstancesDatabasesSessionsStreamingReadCall) Context(ctx context.Context) *ProjectsInstancesDatabasesSessionsStreamingReadCall {
 14498  	c.ctx_ = ctx
 14499  	return c
 14500  }
 14501  
 14502  // Header returns a http.Header that can be modified by the caller to add
 14503  // headers to the request.
 14504  func (c *ProjectsInstancesDatabasesSessionsStreamingReadCall) Header() http.Header {
 14505  	if c.header_ == nil {
 14506  		c.header_ = make(http.Header)
 14507  	}
 14508  	return c.header_
 14509  }
 14510  
 14511  func (c *ProjectsInstancesDatabasesSessionsStreamingReadCall) doRequest(alt string) (*http.Response, error) {
 14512  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 14513  	var body io.Reader = nil
 14514  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.readrequest)
 14515  	if err != nil {
 14516  		return nil, err
 14517  	}
 14518  	c.urlParams_.Set("alt", alt)
 14519  	c.urlParams_.Set("prettyPrint", "false")
 14520  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+session}:streamingRead")
 14521  	urls += "?" + c.urlParams_.Encode()
 14522  	req, err := http.NewRequest("POST", urls, body)
 14523  	if err != nil {
 14524  		return nil, err
 14525  	}
 14526  	req.Header = reqHeaders
 14527  	googleapi.Expand(req.URL, map[string]string{
 14528  		"session": c.session,
 14529  	})
 14530  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 14531  }
 14532  
 14533  // Do executes the "spanner.projects.instances.databases.sessions.streamingRead" call.
 14534  // Any non-2xx status code is an error. Response headers are in either
 14535  // *PartialResultSet.ServerResponse.Header or (if a response was returned at
 14536  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 14537  // check whether the returned error was because http.StatusNotModified was
 14538  // returned.
 14539  func (c *ProjectsInstancesDatabasesSessionsStreamingReadCall) Do(opts ...googleapi.CallOption) (*PartialResultSet, error) {
 14540  	gensupport.SetOptions(c.urlParams_, opts...)
 14541  	res, err := c.doRequest("json")
 14542  	if res != nil && res.StatusCode == http.StatusNotModified {
 14543  		if res.Body != nil {
 14544  			res.Body.Close()
 14545  		}
 14546  		return nil, gensupport.WrapError(&googleapi.Error{
 14547  			Code:   res.StatusCode,
 14548  			Header: res.Header,
 14549  		})
 14550  	}
 14551  	if err != nil {
 14552  		return nil, err
 14553  	}
 14554  	defer googleapi.CloseBody(res)
 14555  	if err := googleapi.CheckResponse(res); err != nil {
 14556  		return nil, gensupport.WrapError(err)
 14557  	}
 14558  	ret := &PartialResultSet{
 14559  		ServerResponse: googleapi.ServerResponse{
 14560  			Header:         res.Header,
 14561  			HTTPStatusCode: res.StatusCode,
 14562  		},
 14563  	}
 14564  	target := &ret
 14565  	if err := gensupport.DecodeResponse(target, res); err != nil {
 14566  		return nil, err
 14567  	}
 14568  	return ret, nil
 14569  }
 14570  
 14571  type ProjectsInstancesInstancePartitionOperationsListCall struct {
 14572  	s            *Service
 14573  	parent       string
 14574  	urlParams_   gensupport.URLParams
 14575  	ifNoneMatch_ string
 14576  	ctx_         context.Context
 14577  	header_      http.Header
 14578  }
 14579  
 14580  // List: Lists instance partition long-running operations in the given
 14581  // instance. An instance partition operation has a name of the form
 14582  // `projects//instances//instancePartitions//operations/`. The long-running
 14583  // operation metadata field type `metadata.type_url` describes the type of the
 14584  // metadata. Operations returned include those that have
 14585  // completed/failed/canceled within the last 7 days, and pending operations.
 14586  // Operations returned are ordered by `operation.metadata.value.start_time` in
 14587  // descending order starting from the most recently started operation.
 14588  // Authorization requires `spanner.instancePartitionOperations.list` permission
 14589  // on the resource parent.
 14590  //
 14591  //   - parent: The parent instance of the instance partition operations. Values
 14592  //     are of the form `projects//instances/`.
 14593  func (r *ProjectsInstancesInstancePartitionOperationsService) List(parent string) *ProjectsInstancesInstancePartitionOperationsListCall {
 14594  	c := &ProjectsInstancesInstancePartitionOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 14595  	c.parent = parent
 14596  	return c
 14597  }
 14598  
 14599  // Filter sets the optional parameter "filter": An expression that filters the
 14600  // list of returned operations. A filter expression consists of a field name, a
 14601  // comparison operator, and a value for filtering. The value must be a string,
 14602  // a number, or a boolean. The comparison operator must be one of: `<`, `>`,
 14603  // `<=`, `>=`, `!=`, `=`, or `:`. Colon `:` is the contains operator. Filter
 14604  // rules are not case sensitive. The following fields in the Operation are
 14605  // eligible for filtering: * `name` - The name of the long-running operation *
 14606  // `done` - False if the operation is in progress, else true. *
 14607  // `metadata.@type` - the type of metadata. For example, the type string for
 14608  // CreateInstancePartitionMetadata is
 14609  // `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartition
 14610  // Metadata`. * `metadata.` - any field in metadata.value. `metadata.@type`
 14611  // must be specified first, if filtering on metadata fields. * `error` - Error
 14612  // associated with the long-running operation. * `response.@type` - the type of
 14613  // response. * `response.` - any field in response.value. You can combine
 14614  // multiple expressions by enclosing each expression in parentheses. By
 14615  // default, expressions are combined with AND logic. However, you can specify
 14616  // AND, OR, and NOT logic explicitly. Here are a few examples: * `done:true` -
 14617  // The operation is complete. * `(metadata.@type=` \
 14618  // `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartition
 14619  // Metadata) AND` \
 14620  // `(metadata.instance_partition.name:custom-instance-partition) AND` \
 14621  // `(metadata.start_time < \"2021-03-28T14:50:00Z\") AND` \ `(error:*)` -
 14622  // Return operations where: * The operation's metadata type is
 14623  // CreateInstancePartitionMetadata. * The instance partition name contains
 14624  // "custom-instance-partition". * The operation started before
 14625  // 2021-03-28T14:50:00Z. * The operation resulted in an error.
 14626  func (c *ProjectsInstancesInstancePartitionOperationsListCall) Filter(filter string) *ProjectsInstancesInstancePartitionOperationsListCall {
 14627  	c.urlParams_.Set("filter", filter)
 14628  	return c
 14629  }
 14630  
 14631  // InstancePartitionDeadline sets the optional parameter
 14632  // "instancePartitionDeadline": Deadline used while retrieving metadata for
 14633  // instance partition operations. Instance partitions whose operation metadata
 14634  // cannot be retrieved within this deadline will be added to unreachable in
 14635  // ListInstancePartitionOperationsResponse.
 14636  func (c *ProjectsInstancesInstancePartitionOperationsListCall) InstancePartitionDeadline(instancePartitionDeadline string) *ProjectsInstancesInstancePartitionOperationsListCall {
 14637  	c.urlParams_.Set("instancePartitionDeadline", instancePartitionDeadline)
 14638  	return c
 14639  }
 14640  
 14641  // PageSize sets the optional parameter "pageSize": Number of operations to be
 14642  // returned in the response. If 0 or less, defaults to the server's maximum
 14643  // allowed page size.
 14644  func (c *ProjectsInstancesInstancePartitionOperationsListCall) PageSize(pageSize int64) *ProjectsInstancesInstancePartitionOperationsListCall {
 14645  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 14646  	return c
 14647  }
 14648  
 14649  // PageToken sets the optional parameter "pageToken": If non-empty,
 14650  // `page_token` should contain a next_page_token from a previous
 14651  // ListInstancePartitionOperationsResponse to the same `parent` and with the
 14652  // same `filter`.
 14653  func (c *ProjectsInstancesInstancePartitionOperationsListCall) PageToken(pageToken string) *ProjectsInstancesInstancePartitionOperationsListCall {
 14654  	c.urlParams_.Set("pageToken", pageToken)
 14655  	return c
 14656  }
 14657  
 14658  // Fields allows partial responses to be retrieved. See
 14659  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 14660  // details.
 14661  func (c *ProjectsInstancesInstancePartitionOperationsListCall) Fields(s ...googleapi.Field) *ProjectsInstancesInstancePartitionOperationsListCall {
 14662  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 14663  	return c
 14664  }
 14665  
 14666  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 14667  // object's ETag matches the given value. This is useful for getting updates
 14668  // only after the object has changed since the last request.
 14669  func (c *ProjectsInstancesInstancePartitionOperationsListCall) IfNoneMatch(entityTag string) *ProjectsInstancesInstancePartitionOperationsListCall {
 14670  	c.ifNoneMatch_ = entityTag
 14671  	return c
 14672  }
 14673  
 14674  // Context sets the context to be used in this call's Do method.
 14675  func (c *ProjectsInstancesInstancePartitionOperationsListCall) Context(ctx context.Context) *ProjectsInstancesInstancePartitionOperationsListCall {
 14676  	c.ctx_ = ctx
 14677  	return c
 14678  }
 14679  
 14680  // Header returns a http.Header that can be modified by the caller to add
 14681  // headers to the request.
 14682  func (c *ProjectsInstancesInstancePartitionOperationsListCall) Header() http.Header {
 14683  	if c.header_ == nil {
 14684  		c.header_ = make(http.Header)
 14685  	}
 14686  	return c.header_
 14687  }
 14688  
 14689  func (c *ProjectsInstancesInstancePartitionOperationsListCall) doRequest(alt string) (*http.Response, error) {
 14690  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 14691  	if c.ifNoneMatch_ != "" {
 14692  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 14693  	}
 14694  	var body io.Reader = nil
 14695  	c.urlParams_.Set("alt", alt)
 14696  	c.urlParams_.Set("prettyPrint", "false")
 14697  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/instancePartitionOperations")
 14698  	urls += "?" + c.urlParams_.Encode()
 14699  	req, err := http.NewRequest("GET", urls, body)
 14700  	if err != nil {
 14701  		return nil, err
 14702  	}
 14703  	req.Header = reqHeaders
 14704  	googleapi.Expand(req.URL, map[string]string{
 14705  		"parent": c.parent,
 14706  	})
 14707  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 14708  }
 14709  
 14710  // Do executes the "spanner.projects.instances.instancePartitionOperations.list" call.
 14711  // Any non-2xx status code is an error. Response headers are in either
 14712  // *ListInstancePartitionOperationsResponse.ServerResponse.Header or (if a
 14713  // response was returned at all) in error.(*googleapi.Error).Header. Use
 14714  // googleapi.IsNotModified to check whether the returned error was because
 14715  // http.StatusNotModified was returned.
 14716  func (c *ProjectsInstancesInstancePartitionOperationsListCall) Do(opts ...googleapi.CallOption) (*ListInstancePartitionOperationsResponse, error) {
 14717  	gensupport.SetOptions(c.urlParams_, opts...)
 14718  	res, err := c.doRequest("json")
 14719  	if res != nil && res.StatusCode == http.StatusNotModified {
 14720  		if res.Body != nil {
 14721  			res.Body.Close()
 14722  		}
 14723  		return nil, gensupport.WrapError(&googleapi.Error{
 14724  			Code:   res.StatusCode,
 14725  			Header: res.Header,
 14726  		})
 14727  	}
 14728  	if err != nil {
 14729  		return nil, err
 14730  	}
 14731  	defer googleapi.CloseBody(res)
 14732  	if err := googleapi.CheckResponse(res); err != nil {
 14733  		return nil, gensupport.WrapError(err)
 14734  	}
 14735  	ret := &ListInstancePartitionOperationsResponse{
 14736  		ServerResponse: googleapi.ServerResponse{
 14737  			Header:         res.Header,
 14738  			HTTPStatusCode: res.StatusCode,
 14739  		},
 14740  	}
 14741  	target := &ret
 14742  	if err := gensupport.DecodeResponse(target, res); err != nil {
 14743  		return nil, err
 14744  	}
 14745  	return ret, nil
 14746  }
 14747  
 14748  // Pages invokes f for each page of results.
 14749  // A non-nil error returned from f will halt the iteration.
 14750  // The provided context supersedes any context provided to the Context method.
 14751  func (c *ProjectsInstancesInstancePartitionOperationsListCall) Pages(ctx context.Context, f func(*ListInstancePartitionOperationsResponse) error) error {
 14752  	c.ctx_ = ctx
 14753  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 14754  	for {
 14755  		x, err := c.Do()
 14756  		if err != nil {
 14757  			return err
 14758  		}
 14759  		if err := f(x); err != nil {
 14760  			return err
 14761  		}
 14762  		if x.NextPageToken == "" {
 14763  			return nil
 14764  		}
 14765  		c.PageToken(x.NextPageToken)
 14766  	}
 14767  }
 14768  
 14769  type ProjectsInstancesInstancePartitionsCreateCall struct {
 14770  	s                              *Service
 14771  	parent                         string
 14772  	createinstancepartitionrequest *CreateInstancePartitionRequest
 14773  	urlParams_                     gensupport.URLParams
 14774  	ctx_                           context.Context
 14775  	header_                        http.Header
 14776  }
 14777  
 14778  // Create: Creates an instance partition and begins preparing it to be used.
 14779  // The returned long-running operation can be used to track the progress of
 14780  // preparing the new instance partition. The instance partition name is
 14781  // assigned by the caller. If the named instance partition already exists,
 14782  // `CreateInstancePartition` returns `ALREADY_EXISTS`. Immediately upon
 14783  // completion of this request: * The instance partition is readable via the
 14784  // API, with all requested attributes but no allocated resources. Its state is
 14785  // `CREATING`. Until completion of the returned operation: * Cancelling the
 14786  // operation renders the instance partition immediately unreadable via the API.
 14787  // * The instance partition can be deleted. * All other attempts to modify the
 14788  // instance partition are rejected. Upon completion of the returned operation:
 14789  // * Billing for all successfully-allocated resources begins (some types may
 14790  // have lower than the requested levels). * Databases can start using this
 14791  // instance partition. * The instance partition's allocated resource levels are
 14792  // readable via the API. * The instance partition's state becomes `READY`. The
 14793  // returned long-running operation will have a name of the format
 14794  // `/operations/` and can be used to track creation of the instance partition.
 14795  // The metadata field type is CreateInstancePartitionMetadata. The response
 14796  // field type is InstancePartition, if successful.
 14797  //
 14798  //   - parent: The name of the instance in which to create the instance
 14799  //     partition. Values are of the form `projects//instances/`.
 14800  func (r *ProjectsInstancesInstancePartitionsService) Create(parent string, createinstancepartitionrequest *CreateInstancePartitionRequest) *ProjectsInstancesInstancePartitionsCreateCall {
 14801  	c := &ProjectsInstancesInstancePartitionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 14802  	c.parent = parent
 14803  	c.createinstancepartitionrequest = createinstancepartitionrequest
 14804  	return c
 14805  }
 14806  
 14807  // Fields allows partial responses to be retrieved. See
 14808  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 14809  // details.
 14810  func (c *ProjectsInstancesInstancePartitionsCreateCall) Fields(s ...googleapi.Field) *ProjectsInstancesInstancePartitionsCreateCall {
 14811  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 14812  	return c
 14813  }
 14814  
 14815  // Context sets the context to be used in this call's Do method.
 14816  func (c *ProjectsInstancesInstancePartitionsCreateCall) Context(ctx context.Context) *ProjectsInstancesInstancePartitionsCreateCall {
 14817  	c.ctx_ = ctx
 14818  	return c
 14819  }
 14820  
 14821  // Header returns a http.Header that can be modified by the caller to add
 14822  // headers to the request.
 14823  func (c *ProjectsInstancesInstancePartitionsCreateCall) Header() http.Header {
 14824  	if c.header_ == nil {
 14825  		c.header_ = make(http.Header)
 14826  	}
 14827  	return c.header_
 14828  }
 14829  
 14830  func (c *ProjectsInstancesInstancePartitionsCreateCall) doRequest(alt string) (*http.Response, error) {
 14831  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 14832  	var body io.Reader = nil
 14833  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.createinstancepartitionrequest)
 14834  	if err != nil {
 14835  		return nil, err
 14836  	}
 14837  	c.urlParams_.Set("alt", alt)
 14838  	c.urlParams_.Set("prettyPrint", "false")
 14839  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/instancePartitions")
 14840  	urls += "?" + c.urlParams_.Encode()
 14841  	req, err := http.NewRequest("POST", urls, body)
 14842  	if err != nil {
 14843  		return nil, err
 14844  	}
 14845  	req.Header = reqHeaders
 14846  	googleapi.Expand(req.URL, map[string]string{
 14847  		"parent": c.parent,
 14848  	})
 14849  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 14850  }
 14851  
 14852  // Do executes the "spanner.projects.instances.instancePartitions.create" call.
 14853  // Any non-2xx status code is an error. Response headers are in either
 14854  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 14855  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 14856  // whether the returned error was because http.StatusNotModified was returned.
 14857  func (c *ProjectsInstancesInstancePartitionsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 14858  	gensupport.SetOptions(c.urlParams_, opts...)
 14859  	res, err := c.doRequest("json")
 14860  	if res != nil && res.StatusCode == http.StatusNotModified {
 14861  		if res.Body != nil {
 14862  			res.Body.Close()
 14863  		}
 14864  		return nil, gensupport.WrapError(&googleapi.Error{
 14865  			Code:   res.StatusCode,
 14866  			Header: res.Header,
 14867  		})
 14868  	}
 14869  	if err != nil {
 14870  		return nil, err
 14871  	}
 14872  	defer googleapi.CloseBody(res)
 14873  	if err := googleapi.CheckResponse(res); err != nil {
 14874  		return nil, gensupport.WrapError(err)
 14875  	}
 14876  	ret := &Operation{
 14877  		ServerResponse: googleapi.ServerResponse{
 14878  			Header:         res.Header,
 14879  			HTTPStatusCode: res.StatusCode,
 14880  		},
 14881  	}
 14882  	target := &ret
 14883  	if err := gensupport.DecodeResponse(target, res); err != nil {
 14884  		return nil, err
 14885  	}
 14886  	return ret, nil
 14887  }
 14888  
 14889  type ProjectsInstancesInstancePartitionsDeleteCall struct {
 14890  	s          *Service
 14891  	name       string
 14892  	urlParams_ gensupport.URLParams
 14893  	ctx_       context.Context
 14894  	header_    http.Header
 14895  }
 14896  
 14897  // Delete: Deletes an existing instance partition. Requires that the instance
 14898  // partition is not used by any database or backup and is not the default
 14899  // instance partition of an instance. Authorization requires
 14900  // `spanner.instancePartitions.delete` permission on the resource name.
 14901  //
 14902  //   - name: The name of the instance partition to be deleted. Values are of the
 14903  //     form
 14904  //     `projects/{project}/instances/{instance}/instancePartitions/{instance_parti
 14905  //     tion}`.
 14906  func (r *ProjectsInstancesInstancePartitionsService) Delete(name string) *ProjectsInstancesInstancePartitionsDeleteCall {
 14907  	c := &ProjectsInstancesInstancePartitionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 14908  	c.name = name
 14909  	return c
 14910  }
 14911  
 14912  // Etag sets the optional parameter "etag": If not empty, the API only deletes
 14913  // the instance partition when the etag provided matches the current status of
 14914  // the requested instance partition. Otherwise, deletes the instance partition
 14915  // without checking the current status of the requested instance partition.
 14916  func (c *ProjectsInstancesInstancePartitionsDeleteCall) Etag(etag string) *ProjectsInstancesInstancePartitionsDeleteCall {
 14917  	c.urlParams_.Set("etag", etag)
 14918  	return c
 14919  }
 14920  
 14921  // Fields allows partial responses to be retrieved. See
 14922  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 14923  // details.
 14924  func (c *ProjectsInstancesInstancePartitionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsInstancesInstancePartitionsDeleteCall {
 14925  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 14926  	return c
 14927  }
 14928  
 14929  // Context sets the context to be used in this call's Do method.
 14930  func (c *ProjectsInstancesInstancePartitionsDeleteCall) Context(ctx context.Context) *ProjectsInstancesInstancePartitionsDeleteCall {
 14931  	c.ctx_ = ctx
 14932  	return c
 14933  }
 14934  
 14935  // Header returns a http.Header that can be modified by the caller to add
 14936  // headers to the request.
 14937  func (c *ProjectsInstancesInstancePartitionsDeleteCall) Header() http.Header {
 14938  	if c.header_ == nil {
 14939  		c.header_ = make(http.Header)
 14940  	}
 14941  	return c.header_
 14942  }
 14943  
 14944  func (c *ProjectsInstancesInstancePartitionsDeleteCall) doRequest(alt string) (*http.Response, error) {
 14945  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 14946  	var body io.Reader = nil
 14947  	c.urlParams_.Set("alt", alt)
 14948  	c.urlParams_.Set("prettyPrint", "false")
 14949  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 14950  	urls += "?" + c.urlParams_.Encode()
 14951  	req, err := http.NewRequest("DELETE", urls, body)
 14952  	if err != nil {
 14953  		return nil, err
 14954  	}
 14955  	req.Header = reqHeaders
 14956  	googleapi.Expand(req.URL, map[string]string{
 14957  		"name": c.name,
 14958  	})
 14959  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 14960  }
 14961  
 14962  // Do executes the "spanner.projects.instances.instancePartitions.delete" call.
 14963  // Any non-2xx status code is an error. Response headers are in either
 14964  // *Empty.ServerResponse.Header or (if a response was returned at all) in
 14965  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 14966  // whether the returned error was because http.StatusNotModified was returned.
 14967  func (c *ProjectsInstancesInstancePartitionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
 14968  	gensupport.SetOptions(c.urlParams_, opts...)
 14969  	res, err := c.doRequest("json")
 14970  	if res != nil && res.StatusCode == http.StatusNotModified {
 14971  		if res.Body != nil {
 14972  			res.Body.Close()
 14973  		}
 14974  		return nil, gensupport.WrapError(&googleapi.Error{
 14975  			Code:   res.StatusCode,
 14976  			Header: res.Header,
 14977  		})
 14978  	}
 14979  	if err != nil {
 14980  		return nil, err
 14981  	}
 14982  	defer googleapi.CloseBody(res)
 14983  	if err := googleapi.CheckResponse(res); err != nil {
 14984  		return nil, gensupport.WrapError(err)
 14985  	}
 14986  	ret := &Empty{
 14987  		ServerResponse: googleapi.ServerResponse{
 14988  			Header:         res.Header,
 14989  			HTTPStatusCode: res.StatusCode,
 14990  		},
 14991  	}
 14992  	target := &ret
 14993  	if err := gensupport.DecodeResponse(target, res); err != nil {
 14994  		return nil, err
 14995  	}
 14996  	return ret, nil
 14997  }
 14998  
 14999  type ProjectsInstancesInstancePartitionsGetCall struct {
 15000  	s            *Service
 15001  	name         string
 15002  	urlParams_   gensupport.URLParams
 15003  	ifNoneMatch_ string
 15004  	ctx_         context.Context
 15005  	header_      http.Header
 15006  }
 15007  
 15008  // Get: Gets information about a particular instance partition.
 15009  //
 15010  //   - name: The name of the requested instance partition. Values are of the form
 15011  //     `projects/{project}/instances/{instance}/instancePartitions/{instance_parti
 15012  //     tion}`.
 15013  func (r *ProjectsInstancesInstancePartitionsService) Get(name string) *ProjectsInstancesInstancePartitionsGetCall {
 15014  	c := &ProjectsInstancesInstancePartitionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 15015  	c.name = name
 15016  	return c
 15017  }
 15018  
 15019  // Fields allows partial responses to be retrieved. See
 15020  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 15021  // details.
 15022  func (c *ProjectsInstancesInstancePartitionsGetCall) Fields(s ...googleapi.Field) *ProjectsInstancesInstancePartitionsGetCall {
 15023  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 15024  	return c
 15025  }
 15026  
 15027  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 15028  // object's ETag matches the given value. This is useful for getting updates
 15029  // only after the object has changed since the last request.
 15030  func (c *ProjectsInstancesInstancePartitionsGetCall) IfNoneMatch(entityTag string) *ProjectsInstancesInstancePartitionsGetCall {
 15031  	c.ifNoneMatch_ = entityTag
 15032  	return c
 15033  }
 15034  
 15035  // Context sets the context to be used in this call's Do method.
 15036  func (c *ProjectsInstancesInstancePartitionsGetCall) Context(ctx context.Context) *ProjectsInstancesInstancePartitionsGetCall {
 15037  	c.ctx_ = ctx
 15038  	return c
 15039  }
 15040  
 15041  // Header returns a http.Header that can be modified by the caller to add
 15042  // headers to the request.
 15043  func (c *ProjectsInstancesInstancePartitionsGetCall) Header() http.Header {
 15044  	if c.header_ == nil {
 15045  		c.header_ = make(http.Header)
 15046  	}
 15047  	return c.header_
 15048  }
 15049  
 15050  func (c *ProjectsInstancesInstancePartitionsGetCall) doRequest(alt string) (*http.Response, error) {
 15051  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 15052  	if c.ifNoneMatch_ != "" {
 15053  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 15054  	}
 15055  	var body io.Reader = nil
 15056  	c.urlParams_.Set("alt", alt)
 15057  	c.urlParams_.Set("prettyPrint", "false")
 15058  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 15059  	urls += "?" + c.urlParams_.Encode()
 15060  	req, err := http.NewRequest("GET", urls, body)
 15061  	if err != nil {
 15062  		return nil, err
 15063  	}
 15064  	req.Header = reqHeaders
 15065  	googleapi.Expand(req.URL, map[string]string{
 15066  		"name": c.name,
 15067  	})
 15068  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 15069  }
 15070  
 15071  // Do executes the "spanner.projects.instances.instancePartitions.get" call.
 15072  // Any non-2xx status code is an error. Response headers are in either
 15073  // *InstancePartition.ServerResponse.Header or (if a response was returned at
 15074  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 15075  // check whether the returned error was because http.StatusNotModified was
 15076  // returned.
 15077  func (c *ProjectsInstancesInstancePartitionsGetCall) Do(opts ...googleapi.CallOption) (*InstancePartition, error) {
 15078  	gensupport.SetOptions(c.urlParams_, opts...)
 15079  	res, err := c.doRequest("json")
 15080  	if res != nil && res.StatusCode == http.StatusNotModified {
 15081  		if res.Body != nil {
 15082  			res.Body.Close()
 15083  		}
 15084  		return nil, gensupport.WrapError(&googleapi.Error{
 15085  			Code:   res.StatusCode,
 15086  			Header: res.Header,
 15087  		})
 15088  	}
 15089  	if err != nil {
 15090  		return nil, err
 15091  	}
 15092  	defer googleapi.CloseBody(res)
 15093  	if err := googleapi.CheckResponse(res); err != nil {
 15094  		return nil, gensupport.WrapError(err)
 15095  	}
 15096  	ret := &InstancePartition{
 15097  		ServerResponse: googleapi.ServerResponse{
 15098  			Header:         res.Header,
 15099  			HTTPStatusCode: res.StatusCode,
 15100  		},
 15101  	}
 15102  	target := &ret
 15103  	if err := gensupport.DecodeResponse(target, res); err != nil {
 15104  		return nil, err
 15105  	}
 15106  	return ret, nil
 15107  }
 15108  
 15109  type ProjectsInstancesInstancePartitionsListCall struct {
 15110  	s            *Service
 15111  	parent       string
 15112  	urlParams_   gensupport.URLParams
 15113  	ifNoneMatch_ string
 15114  	ctx_         context.Context
 15115  	header_      http.Header
 15116  }
 15117  
 15118  // List: Lists all instance partitions for the given instance.
 15119  //
 15120  //   - parent: The instance whose instance partitions should be listed. Values
 15121  //     are of the form `projects//instances/`.
 15122  func (r *ProjectsInstancesInstancePartitionsService) List(parent string) *ProjectsInstancesInstancePartitionsListCall {
 15123  	c := &ProjectsInstancesInstancePartitionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 15124  	c.parent = parent
 15125  	return c
 15126  }
 15127  
 15128  // InstancePartitionDeadline sets the optional parameter
 15129  // "instancePartitionDeadline": Deadline used while retrieving metadata for
 15130  // instance partitions. Instance partitions whose metadata cannot be retrieved
 15131  // within this deadline will be added to unreachable in
 15132  // ListInstancePartitionsResponse.
 15133  func (c *ProjectsInstancesInstancePartitionsListCall) InstancePartitionDeadline(instancePartitionDeadline string) *ProjectsInstancesInstancePartitionsListCall {
 15134  	c.urlParams_.Set("instancePartitionDeadline", instancePartitionDeadline)
 15135  	return c
 15136  }
 15137  
 15138  // PageSize sets the optional parameter "pageSize": Number of instance
 15139  // partitions to be returned in the response. If 0 or less, defaults to the
 15140  // server's maximum allowed page size.
 15141  func (c *ProjectsInstancesInstancePartitionsListCall) PageSize(pageSize int64) *ProjectsInstancesInstancePartitionsListCall {
 15142  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 15143  	return c
 15144  }
 15145  
 15146  // PageToken sets the optional parameter "pageToken": If non-empty,
 15147  // `page_token` should contain a next_page_token from a previous
 15148  // ListInstancePartitionsResponse.
 15149  func (c *ProjectsInstancesInstancePartitionsListCall) PageToken(pageToken string) *ProjectsInstancesInstancePartitionsListCall {
 15150  	c.urlParams_.Set("pageToken", pageToken)
 15151  	return c
 15152  }
 15153  
 15154  // Fields allows partial responses to be retrieved. See
 15155  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 15156  // details.
 15157  func (c *ProjectsInstancesInstancePartitionsListCall) Fields(s ...googleapi.Field) *ProjectsInstancesInstancePartitionsListCall {
 15158  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 15159  	return c
 15160  }
 15161  
 15162  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 15163  // object's ETag matches the given value. This is useful for getting updates
 15164  // only after the object has changed since the last request.
 15165  func (c *ProjectsInstancesInstancePartitionsListCall) IfNoneMatch(entityTag string) *ProjectsInstancesInstancePartitionsListCall {
 15166  	c.ifNoneMatch_ = entityTag
 15167  	return c
 15168  }
 15169  
 15170  // Context sets the context to be used in this call's Do method.
 15171  func (c *ProjectsInstancesInstancePartitionsListCall) Context(ctx context.Context) *ProjectsInstancesInstancePartitionsListCall {
 15172  	c.ctx_ = ctx
 15173  	return c
 15174  }
 15175  
 15176  // Header returns a http.Header that can be modified by the caller to add
 15177  // headers to the request.
 15178  func (c *ProjectsInstancesInstancePartitionsListCall) Header() http.Header {
 15179  	if c.header_ == nil {
 15180  		c.header_ = make(http.Header)
 15181  	}
 15182  	return c.header_
 15183  }
 15184  
 15185  func (c *ProjectsInstancesInstancePartitionsListCall) doRequest(alt string) (*http.Response, error) {
 15186  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 15187  	if c.ifNoneMatch_ != "" {
 15188  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 15189  	}
 15190  	var body io.Reader = nil
 15191  	c.urlParams_.Set("alt", alt)
 15192  	c.urlParams_.Set("prettyPrint", "false")
 15193  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/instancePartitions")
 15194  	urls += "?" + c.urlParams_.Encode()
 15195  	req, err := http.NewRequest("GET", urls, body)
 15196  	if err != nil {
 15197  		return nil, err
 15198  	}
 15199  	req.Header = reqHeaders
 15200  	googleapi.Expand(req.URL, map[string]string{
 15201  		"parent": c.parent,
 15202  	})
 15203  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 15204  }
 15205  
 15206  // Do executes the "spanner.projects.instances.instancePartitions.list" call.
 15207  // Any non-2xx status code is an error. Response headers are in either
 15208  // *ListInstancePartitionsResponse.ServerResponse.Header or (if a response was
 15209  // returned at all) in error.(*googleapi.Error).Header. Use
 15210  // googleapi.IsNotModified to check whether the returned error was because
 15211  // http.StatusNotModified was returned.
 15212  func (c *ProjectsInstancesInstancePartitionsListCall) Do(opts ...googleapi.CallOption) (*ListInstancePartitionsResponse, error) {
 15213  	gensupport.SetOptions(c.urlParams_, opts...)
 15214  	res, err := c.doRequest("json")
 15215  	if res != nil && res.StatusCode == http.StatusNotModified {
 15216  		if res.Body != nil {
 15217  			res.Body.Close()
 15218  		}
 15219  		return nil, gensupport.WrapError(&googleapi.Error{
 15220  			Code:   res.StatusCode,
 15221  			Header: res.Header,
 15222  		})
 15223  	}
 15224  	if err != nil {
 15225  		return nil, err
 15226  	}
 15227  	defer googleapi.CloseBody(res)
 15228  	if err := googleapi.CheckResponse(res); err != nil {
 15229  		return nil, gensupport.WrapError(err)
 15230  	}
 15231  	ret := &ListInstancePartitionsResponse{
 15232  		ServerResponse: googleapi.ServerResponse{
 15233  			Header:         res.Header,
 15234  			HTTPStatusCode: res.StatusCode,
 15235  		},
 15236  	}
 15237  	target := &ret
 15238  	if err := gensupport.DecodeResponse(target, res); err != nil {
 15239  		return nil, err
 15240  	}
 15241  	return ret, nil
 15242  }
 15243  
 15244  // Pages invokes f for each page of results.
 15245  // A non-nil error returned from f will halt the iteration.
 15246  // The provided context supersedes any context provided to the Context method.
 15247  func (c *ProjectsInstancesInstancePartitionsListCall) Pages(ctx context.Context, f func(*ListInstancePartitionsResponse) error) error {
 15248  	c.ctx_ = ctx
 15249  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 15250  	for {
 15251  		x, err := c.Do()
 15252  		if err != nil {
 15253  			return err
 15254  		}
 15255  		if err := f(x); err != nil {
 15256  			return err
 15257  		}
 15258  		if x.NextPageToken == "" {
 15259  			return nil
 15260  		}
 15261  		c.PageToken(x.NextPageToken)
 15262  	}
 15263  }
 15264  
 15265  type ProjectsInstancesInstancePartitionsPatchCall struct {
 15266  	s                              *Service
 15267  	nameid                         string
 15268  	updateinstancepartitionrequest *UpdateInstancePartitionRequest
 15269  	urlParams_                     gensupport.URLParams
 15270  	ctx_                           context.Context
 15271  	header_                        http.Header
 15272  }
 15273  
 15274  // Patch: Updates an instance partition, and begins allocating or releasing
 15275  // resources as requested. The returned long-running operation can be used to
 15276  // track the progress of updating the instance partition. If the named instance
 15277  // partition does not exist, returns `NOT_FOUND`. Immediately upon completion
 15278  // of this request: * For resource types for which a decrease in the instance
 15279  // partition's allocation has been requested, billing is based on the
 15280  // newly-requested level. Until completion of the returned operation: *
 15281  // Cancelling the operation sets its metadata's cancel_time, and begins
 15282  // restoring resources to their pre-request values. The operation is guaranteed
 15283  // to succeed at undoing all resource changes, after which point it terminates
 15284  // with a `CANCELLED` status. * All other attempts to modify the instance
 15285  // partition are rejected. * Reading the instance partition via the API
 15286  // continues to give the pre-request resource levels. Upon completion of the
 15287  // returned operation: * Billing begins for all successfully-allocated
 15288  // resources (some types may have lower than the requested levels). * All
 15289  // newly-reserved resources are available for serving the instance partition's
 15290  // tables. * The instance partition's new resource levels are readable via the
 15291  // API. The returned long-running operation will have a name of the format
 15292  // `/operations/` and can be used to track the instance partition modification.
 15293  // The metadata field type is UpdateInstancePartitionMetadata. The response
 15294  // field type is InstancePartition, if successful. Authorization requires
 15295  // `spanner.instancePartitions.update` permission on the resource name.
 15296  //
 15297  //   - name: A unique identifier for the instance partition. Values are of the
 15298  //     form `projects//instances//instancePartitions/a-z*[a-z0-9]`. The final
 15299  //     segment of the name must be between 2 and 64 characters in length. An
 15300  //     instance partition's name cannot be changed after the instance partition
 15301  //     is created.
 15302  func (r *ProjectsInstancesInstancePartitionsService) Patch(nameid string, updateinstancepartitionrequest *UpdateInstancePartitionRequest) *ProjectsInstancesInstancePartitionsPatchCall {
 15303  	c := &ProjectsInstancesInstancePartitionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 15304  	c.nameid = nameid
 15305  	c.updateinstancepartitionrequest = updateinstancepartitionrequest
 15306  	return c
 15307  }
 15308  
 15309  // Fields allows partial responses to be retrieved. See
 15310  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 15311  // details.
 15312  func (c *ProjectsInstancesInstancePartitionsPatchCall) Fields(s ...googleapi.Field) *ProjectsInstancesInstancePartitionsPatchCall {
 15313  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 15314  	return c
 15315  }
 15316  
 15317  // Context sets the context to be used in this call's Do method.
 15318  func (c *ProjectsInstancesInstancePartitionsPatchCall) Context(ctx context.Context) *ProjectsInstancesInstancePartitionsPatchCall {
 15319  	c.ctx_ = ctx
 15320  	return c
 15321  }
 15322  
 15323  // Header returns a http.Header that can be modified by the caller to add
 15324  // headers to the request.
 15325  func (c *ProjectsInstancesInstancePartitionsPatchCall) Header() http.Header {
 15326  	if c.header_ == nil {
 15327  		c.header_ = make(http.Header)
 15328  	}
 15329  	return c.header_
 15330  }
 15331  
 15332  func (c *ProjectsInstancesInstancePartitionsPatchCall) doRequest(alt string) (*http.Response, error) {
 15333  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 15334  	var body io.Reader = nil
 15335  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.updateinstancepartitionrequest)
 15336  	if err != nil {
 15337  		return nil, err
 15338  	}
 15339  	c.urlParams_.Set("alt", alt)
 15340  	c.urlParams_.Set("prettyPrint", "false")
 15341  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 15342  	urls += "?" + c.urlParams_.Encode()
 15343  	req, err := http.NewRequest("PATCH", urls, body)
 15344  	if err != nil {
 15345  		return nil, err
 15346  	}
 15347  	req.Header = reqHeaders
 15348  	googleapi.Expand(req.URL, map[string]string{
 15349  		"name": c.nameid,
 15350  	})
 15351  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 15352  }
 15353  
 15354  // Do executes the "spanner.projects.instances.instancePartitions.patch" call.
 15355  // Any non-2xx status code is an error. Response headers are in either
 15356  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 15357  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 15358  // whether the returned error was because http.StatusNotModified was returned.
 15359  func (c *ProjectsInstancesInstancePartitionsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 15360  	gensupport.SetOptions(c.urlParams_, opts...)
 15361  	res, err := c.doRequest("json")
 15362  	if res != nil && res.StatusCode == http.StatusNotModified {
 15363  		if res.Body != nil {
 15364  			res.Body.Close()
 15365  		}
 15366  		return nil, gensupport.WrapError(&googleapi.Error{
 15367  			Code:   res.StatusCode,
 15368  			Header: res.Header,
 15369  		})
 15370  	}
 15371  	if err != nil {
 15372  		return nil, err
 15373  	}
 15374  	defer googleapi.CloseBody(res)
 15375  	if err := googleapi.CheckResponse(res); err != nil {
 15376  		return nil, gensupport.WrapError(err)
 15377  	}
 15378  	ret := &Operation{
 15379  		ServerResponse: googleapi.ServerResponse{
 15380  			Header:         res.Header,
 15381  			HTTPStatusCode: res.StatusCode,
 15382  		},
 15383  	}
 15384  	target := &ret
 15385  	if err := gensupport.DecodeResponse(target, res); err != nil {
 15386  		return nil, err
 15387  	}
 15388  	return ret, nil
 15389  }
 15390  
 15391  type ProjectsInstancesInstancePartitionsOperationsCancelCall struct {
 15392  	s          *Service
 15393  	name       string
 15394  	urlParams_ gensupport.URLParams
 15395  	ctx_       context.Context
 15396  	header_    http.Header
 15397  }
 15398  
 15399  // Cancel: Starts asynchronous cancellation on a long-running operation. The
 15400  // server makes a best effort to cancel the operation, but success is not
 15401  // guaranteed. If the server doesn't support this method, it returns
 15402  // `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or
 15403  // other methods to check whether the cancellation succeeded or whether the
 15404  // operation completed despite cancellation. On successful cancellation, the
 15405  // operation is not deleted; instead, it becomes an operation with an
 15406  // Operation.error value with a google.rpc.Status.code of 1, corresponding to
 15407  // `Code.CANCELLED`.
 15408  //
 15409  // - name: The name of the operation resource to be cancelled.
 15410  func (r *ProjectsInstancesInstancePartitionsOperationsService) Cancel(name string) *ProjectsInstancesInstancePartitionsOperationsCancelCall {
 15411  	c := &ProjectsInstancesInstancePartitionsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 15412  	c.name = name
 15413  	return c
 15414  }
 15415  
 15416  // Fields allows partial responses to be retrieved. See
 15417  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 15418  // details.
 15419  func (c *ProjectsInstancesInstancePartitionsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsInstancesInstancePartitionsOperationsCancelCall {
 15420  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 15421  	return c
 15422  }
 15423  
 15424  // Context sets the context to be used in this call's Do method.
 15425  func (c *ProjectsInstancesInstancePartitionsOperationsCancelCall) Context(ctx context.Context) *ProjectsInstancesInstancePartitionsOperationsCancelCall {
 15426  	c.ctx_ = ctx
 15427  	return c
 15428  }
 15429  
 15430  // Header returns a http.Header that can be modified by the caller to add
 15431  // headers to the request.
 15432  func (c *ProjectsInstancesInstancePartitionsOperationsCancelCall) Header() http.Header {
 15433  	if c.header_ == nil {
 15434  		c.header_ = make(http.Header)
 15435  	}
 15436  	return c.header_
 15437  }
 15438  
 15439  func (c *ProjectsInstancesInstancePartitionsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
 15440  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 15441  	var body io.Reader = nil
 15442  	c.urlParams_.Set("alt", alt)
 15443  	c.urlParams_.Set("prettyPrint", "false")
 15444  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
 15445  	urls += "?" + c.urlParams_.Encode()
 15446  	req, err := http.NewRequest("POST", urls, body)
 15447  	if err != nil {
 15448  		return nil, err
 15449  	}
 15450  	req.Header = reqHeaders
 15451  	googleapi.Expand(req.URL, map[string]string{
 15452  		"name": c.name,
 15453  	})
 15454  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 15455  }
 15456  
 15457  // Do executes the "spanner.projects.instances.instancePartitions.operations.cancel" call.
 15458  // Any non-2xx status code is an error. Response headers are in either
 15459  // *Empty.ServerResponse.Header or (if a response was returned at all) in
 15460  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 15461  // whether the returned error was because http.StatusNotModified was returned.
 15462  func (c *ProjectsInstancesInstancePartitionsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
 15463  	gensupport.SetOptions(c.urlParams_, opts...)
 15464  	res, err := c.doRequest("json")
 15465  	if res != nil && res.StatusCode == http.StatusNotModified {
 15466  		if res.Body != nil {
 15467  			res.Body.Close()
 15468  		}
 15469  		return nil, gensupport.WrapError(&googleapi.Error{
 15470  			Code:   res.StatusCode,
 15471  			Header: res.Header,
 15472  		})
 15473  	}
 15474  	if err != nil {
 15475  		return nil, err
 15476  	}
 15477  	defer googleapi.CloseBody(res)
 15478  	if err := googleapi.CheckResponse(res); err != nil {
 15479  		return nil, gensupport.WrapError(err)
 15480  	}
 15481  	ret := &Empty{
 15482  		ServerResponse: googleapi.ServerResponse{
 15483  			Header:         res.Header,
 15484  			HTTPStatusCode: res.StatusCode,
 15485  		},
 15486  	}
 15487  	target := &ret
 15488  	if err := gensupport.DecodeResponse(target, res); err != nil {
 15489  		return nil, err
 15490  	}
 15491  	return ret, nil
 15492  }
 15493  
 15494  type ProjectsInstancesInstancePartitionsOperationsDeleteCall struct {
 15495  	s          *Service
 15496  	name       string
 15497  	urlParams_ gensupport.URLParams
 15498  	ctx_       context.Context
 15499  	header_    http.Header
 15500  }
 15501  
 15502  // Delete: Deletes a long-running operation. This method indicates that the
 15503  // client is no longer interested in the operation result. It does not cancel
 15504  // the operation. If the server doesn't support this method, it returns
 15505  // `google.rpc.Code.UNIMPLEMENTED`.
 15506  //
 15507  // - name: The name of the operation resource to be deleted.
 15508  func (r *ProjectsInstancesInstancePartitionsOperationsService) Delete(name string) *ProjectsInstancesInstancePartitionsOperationsDeleteCall {
 15509  	c := &ProjectsInstancesInstancePartitionsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 15510  	c.name = name
 15511  	return c
 15512  }
 15513  
 15514  // Fields allows partial responses to be retrieved. See
 15515  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 15516  // details.
 15517  func (c *ProjectsInstancesInstancePartitionsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsInstancesInstancePartitionsOperationsDeleteCall {
 15518  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 15519  	return c
 15520  }
 15521  
 15522  // Context sets the context to be used in this call's Do method.
 15523  func (c *ProjectsInstancesInstancePartitionsOperationsDeleteCall) Context(ctx context.Context) *ProjectsInstancesInstancePartitionsOperationsDeleteCall {
 15524  	c.ctx_ = ctx
 15525  	return c
 15526  }
 15527  
 15528  // Header returns a http.Header that can be modified by the caller to add
 15529  // headers to the request.
 15530  func (c *ProjectsInstancesInstancePartitionsOperationsDeleteCall) Header() http.Header {
 15531  	if c.header_ == nil {
 15532  		c.header_ = make(http.Header)
 15533  	}
 15534  	return c.header_
 15535  }
 15536  
 15537  func (c *ProjectsInstancesInstancePartitionsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
 15538  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 15539  	var body io.Reader = nil
 15540  	c.urlParams_.Set("alt", alt)
 15541  	c.urlParams_.Set("prettyPrint", "false")
 15542  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 15543  	urls += "?" + c.urlParams_.Encode()
 15544  	req, err := http.NewRequest("DELETE", urls, body)
 15545  	if err != nil {
 15546  		return nil, err
 15547  	}
 15548  	req.Header = reqHeaders
 15549  	googleapi.Expand(req.URL, map[string]string{
 15550  		"name": c.name,
 15551  	})
 15552  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 15553  }
 15554  
 15555  // Do executes the "spanner.projects.instances.instancePartitions.operations.delete" call.
 15556  // Any non-2xx status code is an error. Response headers are in either
 15557  // *Empty.ServerResponse.Header or (if a response was returned at all) in
 15558  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 15559  // whether the returned error was because http.StatusNotModified was returned.
 15560  func (c *ProjectsInstancesInstancePartitionsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
 15561  	gensupport.SetOptions(c.urlParams_, opts...)
 15562  	res, err := c.doRequest("json")
 15563  	if res != nil && res.StatusCode == http.StatusNotModified {
 15564  		if res.Body != nil {
 15565  			res.Body.Close()
 15566  		}
 15567  		return nil, gensupport.WrapError(&googleapi.Error{
 15568  			Code:   res.StatusCode,
 15569  			Header: res.Header,
 15570  		})
 15571  	}
 15572  	if err != nil {
 15573  		return nil, err
 15574  	}
 15575  	defer googleapi.CloseBody(res)
 15576  	if err := googleapi.CheckResponse(res); err != nil {
 15577  		return nil, gensupport.WrapError(err)
 15578  	}
 15579  	ret := &Empty{
 15580  		ServerResponse: googleapi.ServerResponse{
 15581  			Header:         res.Header,
 15582  			HTTPStatusCode: res.StatusCode,
 15583  		},
 15584  	}
 15585  	target := &ret
 15586  	if err := gensupport.DecodeResponse(target, res); err != nil {
 15587  		return nil, err
 15588  	}
 15589  	return ret, nil
 15590  }
 15591  
 15592  type ProjectsInstancesInstancePartitionsOperationsGetCall struct {
 15593  	s            *Service
 15594  	name         string
 15595  	urlParams_   gensupport.URLParams
 15596  	ifNoneMatch_ string
 15597  	ctx_         context.Context
 15598  	header_      http.Header
 15599  }
 15600  
 15601  // Get: Gets the latest state of a long-running operation. Clients can use this
 15602  // method to poll the operation result at intervals as recommended by the API
 15603  // service.
 15604  //
 15605  // - name: The name of the operation resource.
 15606  func (r *ProjectsInstancesInstancePartitionsOperationsService) Get(name string) *ProjectsInstancesInstancePartitionsOperationsGetCall {
 15607  	c := &ProjectsInstancesInstancePartitionsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 15608  	c.name = name
 15609  	return c
 15610  }
 15611  
 15612  // Fields allows partial responses to be retrieved. See
 15613  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 15614  // details.
 15615  func (c *ProjectsInstancesInstancePartitionsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsInstancesInstancePartitionsOperationsGetCall {
 15616  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 15617  	return c
 15618  }
 15619  
 15620  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 15621  // object's ETag matches the given value. This is useful for getting updates
 15622  // only after the object has changed since the last request.
 15623  func (c *ProjectsInstancesInstancePartitionsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsInstancesInstancePartitionsOperationsGetCall {
 15624  	c.ifNoneMatch_ = entityTag
 15625  	return c
 15626  }
 15627  
 15628  // Context sets the context to be used in this call's Do method.
 15629  func (c *ProjectsInstancesInstancePartitionsOperationsGetCall) Context(ctx context.Context) *ProjectsInstancesInstancePartitionsOperationsGetCall {
 15630  	c.ctx_ = ctx
 15631  	return c
 15632  }
 15633  
 15634  // Header returns a http.Header that can be modified by the caller to add
 15635  // headers to the request.
 15636  func (c *ProjectsInstancesInstancePartitionsOperationsGetCall) Header() http.Header {
 15637  	if c.header_ == nil {
 15638  		c.header_ = make(http.Header)
 15639  	}
 15640  	return c.header_
 15641  }
 15642  
 15643  func (c *ProjectsInstancesInstancePartitionsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
 15644  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 15645  	if c.ifNoneMatch_ != "" {
 15646  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 15647  	}
 15648  	var body io.Reader = nil
 15649  	c.urlParams_.Set("alt", alt)
 15650  	c.urlParams_.Set("prettyPrint", "false")
 15651  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 15652  	urls += "?" + c.urlParams_.Encode()
 15653  	req, err := http.NewRequest("GET", urls, body)
 15654  	if err != nil {
 15655  		return nil, err
 15656  	}
 15657  	req.Header = reqHeaders
 15658  	googleapi.Expand(req.URL, map[string]string{
 15659  		"name": c.name,
 15660  	})
 15661  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 15662  }
 15663  
 15664  // Do executes the "spanner.projects.instances.instancePartitions.operations.get" call.
 15665  // Any non-2xx status code is an error. Response headers are in either
 15666  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 15667  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 15668  // whether the returned error was because http.StatusNotModified was returned.
 15669  func (c *ProjectsInstancesInstancePartitionsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 15670  	gensupport.SetOptions(c.urlParams_, opts...)
 15671  	res, err := c.doRequest("json")
 15672  	if res != nil && res.StatusCode == http.StatusNotModified {
 15673  		if res.Body != nil {
 15674  			res.Body.Close()
 15675  		}
 15676  		return nil, gensupport.WrapError(&googleapi.Error{
 15677  			Code:   res.StatusCode,
 15678  			Header: res.Header,
 15679  		})
 15680  	}
 15681  	if err != nil {
 15682  		return nil, err
 15683  	}
 15684  	defer googleapi.CloseBody(res)
 15685  	if err := googleapi.CheckResponse(res); err != nil {
 15686  		return nil, gensupport.WrapError(err)
 15687  	}
 15688  	ret := &Operation{
 15689  		ServerResponse: googleapi.ServerResponse{
 15690  			Header:         res.Header,
 15691  			HTTPStatusCode: res.StatusCode,
 15692  		},
 15693  	}
 15694  	target := &ret
 15695  	if err := gensupport.DecodeResponse(target, res); err != nil {
 15696  		return nil, err
 15697  	}
 15698  	return ret, nil
 15699  }
 15700  
 15701  type ProjectsInstancesInstancePartitionsOperationsListCall struct {
 15702  	s            *Service
 15703  	name         string
 15704  	urlParams_   gensupport.URLParams
 15705  	ifNoneMatch_ string
 15706  	ctx_         context.Context
 15707  	header_      http.Header
 15708  }
 15709  
 15710  // List: Lists operations that match the specified filter in the request. If
 15711  // the server doesn't support this method, it returns `UNIMPLEMENTED`.
 15712  //
 15713  // - name: The name of the operation's parent resource.
 15714  func (r *ProjectsInstancesInstancePartitionsOperationsService) List(name string) *ProjectsInstancesInstancePartitionsOperationsListCall {
 15715  	c := &ProjectsInstancesInstancePartitionsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 15716  	c.name = name
 15717  	return c
 15718  }
 15719  
 15720  // Filter sets the optional parameter "filter": The standard list filter.
 15721  func (c *ProjectsInstancesInstancePartitionsOperationsListCall) Filter(filter string) *ProjectsInstancesInstancePartitionsOperationsListCall {
 15722  	c.urlParams_.Set("filter", filter)
 15723  	return c
 15724  }
 15725  
 15726  // PageSize sets the optional parameter "pageSize": The standard list page
 15727  // size.
 15728  func (c *ProjectsInstancesInstancePartitionsOperationsListCall) PageSize(pageSize int64) *ProjectsInstancesInstancePartitionsOperationsListCall {
 15729  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 15730  	return c
 15731  }
 15732  
 15733  // PageToken sets the optional parameter "pageToken": The standard list page
 15734  // token.
 15735  func (c *ProjectsInstancesInstancePartitionsOperationsListCall) PageToken(pageToken string) *ProjectsInstancesInstancePartitionsOperationsListCall {
 15736  	c.urlParams_.Set("pageToken", pageToken)
 15737  	return c
 15738  }
 15739  
 15740  // Fields allows partial responses to be retrieved. See
 15741  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 15742  // details.
 15743  func (c *ProjectsInstancesInstancePartitionsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsInstancesInstancePartitionsOperationsListCall {
 15744  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 15745  	return c
 15746  }
 15747  
 15748  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 15749  // object's ETag matches the given value. This is useful for getting updates
 15750  // only after the object has changed since the last request.
 15751  func (c *ProjectsInstancesInstancePartitionsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsInstancesInstancePartitionsOperationsListCall {
 15752  	c.ifNoneMatch_ = entityTag
 15753  	return c
 15754  }
 15755  
 15756  // Context sets the context to be used in this call's Do method.
 15757  func (c *ProjectsInstancesInstancePartitionsOperationsListCall) Context(ctx context.Context) *ProjectsInstancesInstancePartitionsOperationsListCall {
 15758  	c.ctx_ = ctx
 15759  	return c
 15760  }
 15761  
 15762  // Header returns a http.Header that can be modified by the caller to add
 15763  // headers to the request.
 15764  func (c *ProjectsInstancesInstancePartitionsOperationsListCall) Header() http.Header {
 15765  	if c.header_ == nil {
 15766  		c.header_ = make(http.Header)
 15767  	}
 15768  	return c.header_
 15769  }
 15770  
 15771  func (c *ProjectsInstancesInstancePartitionsOperationsListCall) doRequest(alt string) (*http.Response, error) {
 15772  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 15773  	if c.ifNoneMatch_ != "" {
 15774  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 15775  	}
 15776  	var body io.Reader = nil
 15777  	c.urlParams_.Set("alt", alt)
 15778  	c.urlParams_.Set("prettyPrint", "false")
 15779  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 15780  	urls += "?" + c.urlParams_.Encode()
 15781  	req, err := http.NewRequest("GET", urls, body)
 15782  	if err != nil {
 15783  		return nil, err
 15784  	}
 15785  	req.Header = reqHeaders
 15786  	googleapi.Expand(req.URL, map[string]string{
 15787  		"name": c.name,
 15788  	})
 15789  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 15790  }
 15791  
 15792  // Do executes the "spanner.projects.instances.instancePartitions.operations.list" call.
 15793  // Any non-2xx status code is an error. Response headers are in either
 15794  // *ListOperationsResponse.ServerResponse.Header or (if a response was returned
 15795  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 15796  // check whether the returned error was because http.StatusNotModified was
 15797  // returned.
 15798  func (c *ProjectsInstancesInstancePartitionsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
 15799  	gensupport.SetOptions(c.urlParams_, opts...)
 15800  	res, err := c.doRequest("json")
 15801  	if res != nil && res.StatusCode == http.StatusNotModified {
 15802  		if res.Body != nil {
 15803  			res.Body.Close()
 15804  		}
 15805  		return nil, gensupport.WrapError(&googleapi.Error{
 15806  			Code:   res.StatusCode,
 15807  			Header: res.Header,
 15808  		})
 15809  	}
 15810  	if err != nil {
 15811  		return nil, err
 15812  	}
 15813  	defer googleapi.CloseBody(res)
 15814  	if err := googleapi.CheckResponse(res); err != nil {
 15815  		return nil, gensupport.WrapError(err)
 15816  	}
 15817  	ret := &ListOperationsResponse{
 15818  		ServerResponse: googleapi.ServerResponse{
 15819  			Header:         res.Header,
 15820  			HTTPStatusCode: res.StatusCode,
 15821  		},
 15822  	}
 15823  	target := &ret
 15824  	if err := gensupport.DecodeResponse(target, res); err != nil {
 15825  		return nil, err
 15826  	}
 15827  	return ret, nil
 15828  }
 15829  
 15830  // Pages invokes f for each page of results.
 15831  // A non-nil error returned from f will halt the iteration.
 15832  // The provided context supersedes any context provided to the Context method.
 15833  func (c *ProjectsInstancesInstancePartitionsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
 15834  	c.ctx_ = ctx
 15835  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 15836  	for {
 15837  		x, err := c.Do()
 15838  		if err != nil {
 15839  			return err
 15840  		}
 15841  		if err := f(x); err != nil {
 15842  			return err
 15843  		}
 15844  		if x.NextPageToken == "" {
 15845  			return nil
 15846  		}
 15847  		c.PageToken(x.NextPageToken)
 15848  	}
 15849  }
 15850  
 15851  type ProjectsInstancesOperationsCancelCall struct {
 15852  	s          *Service
 15853  	name       string
 15854  	urlParams_ gensupport.URLParams
 15855  	ctx_       context.Context
 15856  	header_    http.Header
 15857  }
 15858  
 15859  // Cancel: Starts asynchronous cancellation on a long-running operation. The
 15860  // server makes a best effort to cancel the operation, but success is not
 15861  // guaranteed. If the server doesn't support this method, it returns
 15862  // `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or
 15863  // other methods to check whether the cancellation succeeded or whether the
 15864  // operation completed despite cancellation. On successful cancellation, the
 15865  // operation is not deleted; instead, it becomes an operation with an
 15866  // Operation.error value with a google.rpc.Status.code of 1, corresponding to
 15867  // `Code.CANCELLED`.
 15868  //
 15869  // - name: The name of the operation resource to be cancelled.
 15870  func (r *ProjectsInstancesOperationsService) Cancel(name string) *ProjectsInstancesOperationsCancelCall {
 15871  	c := &ProjectsInstancesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 15872  	c.name = name
 15873  	return c
 15874  }
 15875  
 15876  // Fields allows partial responses to be retrieved. See
 15877  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 15878  // details.
 15879  func (c *ProjectsInstancesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsInstancesOperationsCancelCall {
 15880  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 15881  	return c
 15882  }
 15883  
 15884  // Context sets the context to be used in this call's Do method.
 15885  func (c *ProjectsInstancesOperationsCancelCall) Context(ctx context.Context) *ProjectsInstancesOperationsCancelCall {
 15886  	c.ctx_ = ctx
 15887  	return c
 15888  }
 15889  
 15890  // Header returns a http.Header that can be modified by the caller to add
 15891  // headers to the request.
 15892  func (c *ProjectsInstancesOperationsCancelCall) Header() http.Header {
 15893  	if c.header_ == nil {
 15894  		c.header_ = make(http.Header)
 15895  	}
 15896  	return c.header_
 15897  }
 15898  
 15899  func (c *ProjectsInstancesOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
 15900  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 15901  	var body io.Reader = nil
 15902  	c.urlParams_.Set("alt", alt)
 15903  	c.urlParams_.Set("prettyPrint", "false")
 15904  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
 15905  	urls += "?" + c.urlParams_.Encode()
 15906  	req, err := http.NewRequest("POST", urls, body)
 15907  	if err != nil {
 15908  		return nil, err
 15909  	}
 15910  	req.Header = reqHeaders
 15911  	googleapi.Expand(req.URL, map[string]string{
 15912  		"name": c.name,
 15913  	})
 15914  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 15915  }
 15916  
 15917  // Do executes the "spanner.projects.instances.operations.cancel" call.
 15918  // Any non-2xx status code is an error. Response headers are in either
 15919  // *Empty.ServerResponse.Header or (if a response was returned at all) in
 15920  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 15921  // whether the returned error was because http.StatusNotModified was returned.
 15922  func (c *ProjectsInstancesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
 15923  	gensupport.SetOptions(c.urlParams_, opts...)
 15924  	res, err := c.doRequest("json")
 15925  	if res != nil && res.StatusCode == http.StatusNotModified {
 15926  		if res.Body != nil {
 15927  			res.Body.Close()
 15928  		}
 15929  		return nil, gensupport.WrapError(&googleapi.Error{
 15930  			Code:   res.StatusCode,
 15931  			Header: res.Header,
 15932  		})
 15933  	}
 15934  	if err != nil {
 15935  		return nil, err
 15936  	}
 15937  	defer googleapi.CloseBody(res)
 15938  	if err := googleapi.CheckResponse(res); err != nil {
 15939  		return nil, gensupport.WrapError(err)
 15940  	}
 15941  	ret := &Empty{
 15942  		ServerResponse: googleapi.ServerResponse{
 15943  			Header:         res.Header,
 15944  			HTTPStatusCode: res.StatusCode,
 15945  		},
 15946  	}
 15947  	target := &ret
 15948  	if err := gensupport.DecodeResponse(target, res); err != nil {
 15949  		return nil, err
 15950  	}
 15951  	return ret, nil
 15952  }
 15953  
 15954  type ProjectsInstancesOperationsDeleteCall struct {
 15955  	s          *Service
 15956  	name       string
 15957  	urlParams_ gensupport.URLParams
 15958  	ctx_       context.Context
 15959  	header_    http.Header
 15960  }
 15961  
 15962  // Delete: Deletes a long-running operation. This method indicates that the
 15963  // client is no longer interested in the operation result. It does not cancel
 15964  // the operation. If the server doesn't support this method, it returns
 15965  // `google.rpc.Code.UNIMPLEMENTED`.
 15966  //
 15967  // - name: The name of the operation resource to be deleted.
 15968  func (r *ProjectsInstancesOperationsService) Delete(name string) *ProjectsInstancesOperationsDeleteCall {
 15969  	c := &ProjectsInstancesOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 15970  	c.name = name
 15971  	return c
 15972  }
 15973  
 15974  // Fields allows partial responses to be retrieved. See
 15975  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 15976  // details.
 15977  func (c *ProjectsInstancesOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsInstancesOperationsDeleteCall {
 15978  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 15979  	return c
 15980  }
 15981  
 15982  // Context sets the context to be used in this call's Do method.
 15983  func (c *ProjectsInstancesOperationsDeleteCall) Context(ctx context.Context) *ProjectsInstancesOperationsDeleteCall {
 15984  	c.ctx_ = ctx
 15985  	return c
 15986  }
 15987  
 15988  // Header returns a http.Header that can be modified by the caller to add
 15989  // headers to the request.
 15990  func (c *ProjectsInstancesOperationsDeleteCall) Header() http.Header {
 15991  	if c.header_ == nil {
 15992  		c.header_ = make(http.Header)
 15993  	}
 15994  	return c.header_
 15995  }
 15996  
 15997  func (c *ProjectsInstancesOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
 15998  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 15999  	var body io.Reader = nil
 16000  	c.urlParams_.Set("alt", alt)
 16001  	c.urlParams_.Set("prettyPrint", "false")
 16002  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 16003  	urls += "?" + c.urlParams_.Encode()
 16004  	req, err := http.NewRequest("DELETE", urls, body)
 16005  	if err != nil {
 16006  		return nil, err
 16007  	}
 16008  	req.Header = reqHeaders
 16009  	googleapi.Expand(req.URL, map[string]string{
 16010  		"name": c.name,
 16011  	})
 16012  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 16013  }
 16014  
 16015  // Do executes the "spanner.projects.instances.operations.delete" call.
 16016  // Any non-2xx status code is an error. Response headers are in either
 16017  // *Empty.ServerResponse.Header or (if a response was returned at all) in
 16018  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 16019  // whether the returned error was because http.StatusNotModified was returned.
 16020  func (c *ProjectsInstancesOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
 16021  	gensupport.SetOptions(c.urlParams_, opts...)
 16022  	res, err := c.doRequest("json")
 16023  	if res != nil && res.StatusCode == http.StatusNotModified {
 16024  		if res.Body != nil {
 16025  			res.Body.Close()
 16026  		}
 16027  		return nil, gensupport.WrapError(&googleapi.Error{
 16028  			Code:   res.StatusCode,
 16029  			Header: res.Header,
 16030  		})
 16031  	}
 16032  	if err != nil {
 16033  		return nil, err
 16034  	}
 16035  	defer googleapi.CloseBody(res)
 16036  	if err := googleapi.CheckResponse(res); err != nil {
 16037  		return nil, gensupport.WrapError(err)
 16038  	}
 16039  	ret := &Empty{
 16040  		ServerResponse: googleapi.ServerResponse{
 16041  			Header:         res.Header,
 16042  			HTTPStatusCode: res.StatusCode,
 16043  		},
 16044  	}
 16045  	target := &ret
 16046  	if err := gensupport.DecodeResponse(target, res); err != nil {
 16047  		return nil, err
 16048  	}
 16049  	return ret, nil
 16050  }
 16051  
 16052  type ProjectsInstancesOperationsGetCall struct {
 16053  	s            *Service
 16054  	name         string
 16055  	urlParams_   gensupport.URLParams
 16056  	ifNoneMatch_ string
 16057  	ctx_         context.Context
 16058  	header_      http.Header
 16059  }
 16060  
 16061  // Get: Gets the latest state of a long-running operation. Clients can use this
 16062  // method to poll the operation result at intervals as recommended by the API
 16063  // service.
 16064  //
 16065  // - name: The name of the operation resource.
 16066  func (r *ProjectsInstancesOperationsService) Get(name string) *ProjectsInstancesOperationsGetCall {
 16067  	c := &ProjectsInstancesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 16068  	c.name = name
 16069  	return c
 16070  }
 16071  
 16072  // Fields allows partial responses to be retrieved. See
 16073  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 16074  // details.
 16075  func (c *ProjectsInstancesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsInstancesOperationsGetCall {
 16076  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 16077  	return c
 16078  }
 16079  
 16080  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 16081  // object's ETag matches the given value. This is useful for getting updates
 16082  // only after the object has changed since the last request.
 16083  func (c *ProjectsInstancesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsInstancesOperationsGetCall {
 16084  	c.ifNoneMatch_ = entityTag
 16085  	return c
 16086  }
 16087  
 16088  // Context sets the context to be used in this call's Do method.
 16089  func (c *ProjectsInstancesOperationsGetCall) Context(ctx context.Context) *ProjectsInstancesOperationsGetCall {
 16090  	c.ctx_ = ctx
 16091  	return c
 16092  }
 16093  
 16094  // Header returns a http.Header that can be modified by the caller to add
 16095  // headers to the request.
 16096  func (c *ProjectsInstancesOperationsGetCall) Header() http.Header {
 16097  	if c.header_ == nil {
 16098  		c.header_ = make(http.Header)
 16099  	}
 16100  	return c.header_
 16101  }
 16102  
 16103  func (c *ProjectsInstancesOperationsGetCall) doRequest(alt string) (*http.Response, error) {
 16104  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 16105  	if c.ifNoneMatch_ != "" {
 16106  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 16107  	}
 16108  	var body io.Reader = nil
 16109  	c.urlParams_.Set("alt", alt)
 16110  	c.urlParams_.Set("prettyPrint", "false")
 16111  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 16112  	urls += "?" + c.urlParams_.Encode()
 16113  	req, err := http.NewRequest("GET", urls, body)
 16114  	if err != nil {
 16115  		return nil, err
 16116  	}
 16117  	req.Header = reqHeaders
 16118  	googleapi.Expand(req.URL, map[string]string{
 16119  		"name": c.name,
 16120  	})
 16121  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 16122  }
 16123  
 16124  // Do executes the "spanner.projects.instances.operations.get" call.
 16125  // Any non-2xx status code is an error. Response headers are in either
 16126  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 16127  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 16128  // whether the returned error was because http.StatusNotModified was returned.
 16129  func (c *ProjectsInstancesOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 16130  	gensupport.SetOptions(c.urlParams_, opts...)
 16131  	res, err := c.doRequest("json")
 16132  	if res != nil && res.StatusCode == http.StatusNotModified {
 16133  		if res.Body != nil {
 16134  			res.Body.Close()
 16135  		}
 16136  		return nil, gensupport.WrapError(&googleapi.Error{
 16137  			Code:   res.StatusCode,
 16138  			Header: res.Header,
 16139  		})
 16140  	}
 16141  	if err != nil {
 16142  		return nil, err
 16143  	}
 16144  	defer googleapi.CloseBody(res)
 16145  	if err := googleapi.CheckResponse(res); err != nil {
 16146  		return nil, gensupport.WrapError(err)
 16147  	}
 16148  	ret := &Operation{
 16149  		ServerResponse: googleapi.ServerResponse{
 16150  			Header:         res.Header,
 16151  			HTTPStatusCode: res.StatusCode,
 16152  		},
 16153  	}
 16154  	target := &ret
 16155  	if err := gensupport.DecodeResponse(target, res); err != nil {
 16156  		return nil, err
 16157  	}
 16158  	return ret, nil
 16159  }
 16160  
 16161  type ProjectsInstancesOperationsListCall struct {
 16162  	s            *Service
 16163  	name         string
 16164  	urlParams_   gensupport.URLParams
 16165  	ifNoneMatch_ string
 16166  	ctx_         context.Context
 16167  	header_      http.Header
 16168  }
 16169  
 16170  // List: Lists operations that match the specified filter in the request. If
 16171  // the server doesn't support this method, it returns `UNIMPLEMENTED`.
 16172  //
 16173  // - name: The name of the operation's parent resource.
 16174  func (r *ProjectsInstancesOperationsService) List(name string) *ProjectsInstancesOperationsListCall {
 16175  	c := &ProjectsInstancesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 16176  	c.name = name
 16177  	return c
 16178  }
 16179  
 16180  // Filter sets the optional parameter "filter": The standard list filter.
 16181  func (c *ProjectsInstancesOperationsListCall) Filter(filter string) *ProjectsInstancesOperationsListCall {
 16182  	c.urlParams_.Set("filter", filter)
 16183  	return c
 16184  }
 16185  
 16186  // PageSize sets the optional parameter "pageSize": The standard list page
 16187  // size.
 16188  func (c *ProjectsInstancesOperationsListCall) PageSize(pageSize int64) *ProjectsInstancesOperationsListCall {
 16189  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 16190  	return c
 16191  }
 16192  
 16193  // PageToken sets the optional parameter "pageToken": The standard list page
 16194  // token.
 16195  func (c *ProjectsInstancesOperationsListCall) PageToken(pageToken string) *ProjectsInstancesOperationsListCall {
 16196  	c.urlParams_.Set("pageToken", pageToken)
 16197  	return c
 16198  }
 16199  
 16200  // Fields allows partial responses to be retrieved. See
 16201  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 16202  // details.
 16203  func (c *ProjectsInstancesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsInstancesOperationsListCall {
 16204  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 16205  	return c
 16206  }
 16207  
 16208  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 16209  // object's ETag matches the given value. This is useful for getting updates
 16210  // only after the object has changed since the last request.
 16211  func (c *ProjectsInstancesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsInstancesOperationsListCall {
 16212  	c.ifNoneMatch_ = entityTag
 16213  	return c
 16214  }
 16215  
 16216  // Context sets the context to be used in this call's Do method.
 16217  func (c *ProjectsInstancesOperationsListCall) Context(ctx context.Context) *ProjectsInstancesOperationsListCall {
 16218  	c.ctx_ = ctx
 16219  	return c
 16220  }
 16221  
 16222  // Header returns a http.Header that can be modified by the caller to add
 16223  // headers to the request.
 16224  func (c *ProjectsInstancesOperationsListCall) Header() http.Header {
 16225  	if c.header_ == nil {
 16226  		c.header_ = make(http.Header)
 16227  	}
 16228  	return c.header_
 16229  }
 16230  
 16231  func (c *ProjectsInstancesOperationsListCall) doRequest(alt string) (*http.Response, error) {
 16232  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 16233  	if c.ifNoneMatch_ != "" {
 16234  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 16235  	}
 16236  	var body io.Reader = nil
 16237  	c.urlParams_.Set("alt", alt)
 16238  	c.urlParams_.Set("prettyPrint", "false")
 16239  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 16240  	urls += "?" + c.urlParams_.Encode()
 16241  	req, err := http.NewRequest("GET", urls, body)
 16242  	if err != nil {
 16243  		return nil, err
 16244  	}
 16245  	req.Header = reqHeaders
 16246  	googleapi.Expand(req.URL, map[string]string{
 16247  		"name": c.name,
 16248  	})
 16249  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 16250  }
 16251  
 16252  // Do executes the "spanner.projects.instances.operations.list" call.
 16253  // Any non-2xx status code is an error. Response headers are in either
 16254  // *ListOperationsResponse.ServerResponse.Header or (if a response was returned
 16255  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 16256  // check whether the returned error was because http.StatusNotModified was
 16257  // returned.
 16258  func (c *ProjectsInstancesOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
 16259  	gensupport.SetOptions(c.urlParams_, opts...)
 16260  	res, err := c.doRequest("json")
 16261  	if res != nil && res.StatusCode == http.StatusNotModified {
 16262  		if res.Body != nil {
 16263  			res.Body.Close()
 16264  		}
 16265  		return nil, gensupport.WrapError(&googleapi.Error{
 16266  			Code:   res.StatusCode,
 16267  			Header: res.Header,
 16268  		})
 16269  	}
 16270  	if err != nil {
 16271  		return nil, err
 16272  	}
 16273  	defer googleapi.CloseBody(res)
 16274  	if err := googleapi.CheckResponse(res); err != nil {
 16275  		return nil, gensupport.WrapError(err)
 16276  	}
 16277  	ret := &ListOperationsResponse{
 16278  		ServerResponse: googleapi.ServerResponse{
 16279  			Header:         res.Header,
 16280  			HTTPStatusCode: res.StatusCode,
 16281  		},
 16282  	}
 16283  	target := &ret
 16284  	if err := gensupport.DecodeResponse(target, res); err != nil {
 16285  		return nil, err
 16286  	}
 16287  	return ret, nil
 16288  }
 16289  
 16290  // Pages invokes f for each page of results.
 16291  // A non-nil error returned from f will halt the iteration.
 16292  // The provided context supersedes any context provided to the Context method.
 16293  func (c *ProjectsInstancesOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
 16294  	c.ctx_ = ctx
 16295  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 16296  	for {
 16297  		x, err := c.Do()
 16298  		if err != nil {
 16299  			return err
 16300  		}
 16301  		if err := f(x); err != nil {
 16302  			return err
 16303  		}
 16304  		if x.NextPageToken == "" {
 16305  			return nil
 16306  		}
 16307  		c.PageToken(x.NextPageToken)
 16308  	}
 16309  }
 16310  
 16311  type ScansListCall struct {
 16312  	s            *Service
 16313  	parent       string
 16314  	urlParams_   gensupport.URLParams
 16315  	ifNoneMatch_ string
 16316  	ctx_         context.Context
 16317  	header_      http.Header
 16318  }
 16319  
 16320  // List: Return available scans given a Database-specific resource name.
 16321  //
 16322  //   - parent: The unique name of the parent resource, specific to the Database
 16323  //     service implementing this interface.
 16324  func (r *ScansService) List(parent string) *ScansListCall {
 16325  	c := &ScansListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 16326  	c.parent = parent
 16327  	return c
 16328  }
 16329  
 16330  // Filter sets the optional parameter "filter": A filter expression to restrict
 16331  // the results based on information present in the available Scan collection.
 16332  // The filter applies to all fields within the Scan message except for `data`.
 16333  func (c *ScansListCall) Filter(filter string) *ScansListCall {
 16334  	c.urlParams_.Set("filter", filter)
 16335  	return c
 16336  }
 16337  
 16338  // PageSize sets the optional parameter "pageSize": The maximum number of items
 16339  // to return.
 16340  func (c *ScansListCall) PageSize(pageSize int64) *ScansListCall {
 16341  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 16342  	return c
 16343  }
 16344  
 16345  // PageToken sets the optional parameter "pageToken": The next_page_token value
 16346  // returned from a previous List request, if any.
 16347  func (c *ScansListCall) PageToken(pageToken string) *ScansListCall {
 16348  	c.urlParams_.Set("pageToken", pageToken)
 16349  	return c
 16350  }
 16351  
 16352  // View sets the optional parameter "view": Specifies which parts of the Scan
 16353  // should be returned in the response. Note, only the SUMMARY view (the
 16354  // default) is currently supported for ListScans.
 16355  //
 16356  // Possible values:
 16357  //
 16358  //	"VIEW_UNSPECIFIED" - Not specified, equivalent to SUMMARY.
 16359  //	"SUMMARY" - Server responses only include `name`, `details`, `start_time`
 16360  //
 16361  // and `end_time`. The default value. Note, the ListScans method may only use
 16362  // this view type, others view types are not supported.
 16363  //
 16364  //	"FULL" - Full representation of the scan is returned in the server
 16365  //
 16366  // response, including `data`.
 16367  func (c *ScansListCall) View(view string) *ScansListCall {
 16368  	c.urlParams_.Set("view", view)
 16369  	return c
 16370  }
 16371  
 16372  // Fields allows partial responses to be retrieved. See
 16373  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 16374  // details.
 16375  func (c *ScansListCall) Fields(s ...googleapi.Field) *ScansListCall {
 16376  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 16377  	return c
 16378  }
 16379  
 16380  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 16381  // object's ETag matches the given value. This is useful for getting updates
 16382  // only after the object has changed since the last request.
 16383  func (c *ScansListCall) IfNoneMatch(entityTag string) *ScansListCall {
 16384  	c.ifNoneMatch_ = entityTag
 16385  	return c
 16386  }
 16387  
 16388  // Context sets the context to be used in this call's Do method.
 16389  func (c *ScansListCall) Context(ctx context.Context) *ScansListCall {
 16390  	c.ctx_ = ctx
 16391  	return c
 16392  }
 16393  
 16394  // Header returns a http.Header that can be modified by the caller to add
 16395  // headers to the request.
 16396  func (c *ScansListCall) Header() http.Header {
 16397  	if c.header_ == nil {
 16398  		c.header_ = make(http.Header)
 16399  	}
 16400  	return c.header_
 16401  }
 16402  
 16403  func (c *ScansListCall) doRequest(alt string) (*http.Response, error) {
 16404  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 16405  	if c.ifNoneMatch_ != "" {
 16406  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 16407  	}
 16408  	var body io.Reader = nil
 16409  	c.urlParams_.Set("alt", alt)
 16410  	c.urlParams_.Set("prettyPrint", "false")
 16411  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}")
 16412  	urls += "?" + c.urlParams_.Encode()
 16413  	req, err := http.NewRequest("GET", urls, body)
 16414  	if err != nil {
 16415  		return nil, err
 16416  	}
 16417  	req.Header = reqHeaders
 16418  	googleapi.Expand(req.URL, map[string]string{
 16419  		"parent": c.parent,
 16420  	})
 16421  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 16422  }
 16423  
 16424  // Do executes the "spanner.scans.list" call.
 16425  // Any non-2xx status code is an error. Response headers are in either
 16426  // *ListScansResponse.ServerResponse.Header or (if a response was returned at
 16427  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 16428  // check whether the returned error was because http.StatusNotModified was
 16429  // returned.
 16430  func (c *ScansListCall) Do(opts ...googleapi.CallOption) (*ListScansResponse, error) {
 16431  	gensupport.SetOptions(c.urlParams_, opts...)
 16432  	res, err := c.doRequest("json")
 16433  	if res != nil && res.StatusCode == http.StatusNotModified {
 16434  		if res.Body != nil {
 16435  			res.Body.Close()
 16436  		}
 16437  		return nil, gensupport.WrapError(&googleapi.Error{
 16438  			Code:   res.StatusCode,
 16439  			Header: res.Header,
 16440  		})
 16441  	}
 16442  	if err != nil {
 16443  		return nil, err
 16444  	}
 16445  	defer googleapi.CloseBody(res)
 16446  	if err := googleapi.CheckResponse(res); err != nil {
 16447  		return nil, gensupport.WrapError(err)
 16448  	}
 16449  	ret := &ListScansResponse{
 16450  		ServerResponse: googleapi.ServerResponse{
 16451  			Header:         res.Header,
 16452  			HTTPStatusCode: res.StatusCode,
 16453  		},
 16454  	}
 16455  	target := &ret
 16456  	if err := gensupport.DecodeResponse(target, res); err != nil {
 16457  		return nil, err
 16458  	}
 16459  	return ret, nil
 16460  }
 16461  
 16462  // Pages invokes f for each page of results.
 16463  // A non-nil error returned from f will halt the iteration.
 16464  // The provided context supersedes any context provided to the Context method.
 16465  func (c *ScansListCall) Pages(ctx context.Context, f func(*ListScansResponse) error) error {
 16466  	c.ctx_ = ctx
 16467  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 16468  	for {
 16469  		x, err := c.Do()
 16470  		if err != nil {
 16471  			return err
 16472  		}
 16473  		if err := f(x); err != nil {
 16474  			return err
 16475  		}
 16476  		if x.NextPageToken == "" {
 16477  			return nil
 16478  		}
 16479  		c.PageToken(x.NextPageToken)
 16480  	}
 16481  }
 16482  

View as plain text