...

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

Documentation: google.golang.org/api/gkebackup/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 gkebackup provides access to the Backup for GKE API.
     8  //
     9  // For product documentation, see: https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke
    10  //
    11  // # Library status
    12  //
    13  // These client libraries are officially supported by Google. However, this
    14  // library is considered complete and is in maintenance mode. This means
    15  // that we will address critical bugs and security issues but will not add
    16  // any new features.
    17  //
    18  // When possible, we recommend using our newer
    19  // [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)
    20  // that are still actively being worked and iterated on.
    21  //
    22  // # Creating a client
    23  //
    24  // Usage example:
    25  //
    26  //	import "google.golang.org/api/gkebackup/v1"
    27  //	...
    28  //	ctx := context.Background()
    29  //	gkebackupService, err := gkebackup.NewService(ctx)
    30  //
    31  // In this example, Google Application Default Credentials are used for
    32  // authentication. For information on how to create and obtain Application
    33  // Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
    34  //
    35  // # Other authentication options
    36  //
    37  // To use an API key for authentication (note: some APIs do not support API
    38  // keys), use [google.golang.org/api/option.WithAPIKey]:
    39  //
    40  //	gkebackupService, err := gkebackup.NewService(ctx, option.WithAPIKey("AIza..."))
    41  //
    42  // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth
    43  // flow, use [google.golang.org/api/option.WithTokenSource]:
    44  //
    45  //	config := &oauth2.Config{...}
    46  //	// ...
    47  //	token, err := config.Exchange(ctx, ...)
    48  //	gkebackupService, err := gkebackup.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    49  //
    50  // See [google.golang.org/api/option.ClientOption] for details on options.
    51  package gkebackup // import "google.golang.org/api/gkebackup/v1"
    52  
    53  import (
    54  	"bytes"
    55  	"context"
    56  	"encoding/json"
    57  	"errors"
    58  	"fmt"
    59  	"io"
    60  	"net/http"
    61  	"net/url"
    62  	"strconv"
    63  	"strings"
    64  
    65  	googleapi "google.golang.org/api/googleapi"
    66  	internal "google.golang.org/api/internal"
    67  	gensupport "google.golang.org/api/internal/gensupport"
    68  	option "google.golang.org/api/option"
    69  	internaloption "google.golang.org/api/option/internaloption"
    70  	htransport "google.golang.org/api/transport/http"
    71  )
    72  
    73  // Always reference these packages, just in case the auto-generated code
    74  // below doesn't.
    75  var _ = bytes.NewBuffer
    76  var _ = strconv.Itoa
    77  var _ = fmt.Sprintf
    78  var _ = json.NewDecoder
    79  var _ = io.Copy
    80  var _ = url.Parse
    81  var _ = gensupport.MarshalJSON
    82  var _ = googleapi.Version
    83  var _ = errors.New
    84  var _ = strings.Replace
    85  var _ = context.Canceled
    86  var _ = internaloption.WithDefaultEndpoint
    87  var _ = internal.Version
    88  
    89  const apiId = "gkebackup:v1"
    90  const apiName = "gkebackup"
    91  const apiVersion = "v1"
    92  const basePath = "https://gkebackup.googleapis.com/"
    93  const basePathTemplate = "https://gkebackup.UNIVERSE_DOMAIN/"
    94  const mtlsBasePath = "https://gkebackup.mtls.googleapis.com/"
    95  
    96  // OAuth2 scopes used by this API.
    97  const (
    98  	// See, edit, configure, and delete your Google Cloud data and see the email
    99  	// address for your Google Account.
   100  	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
   101  )
   102  
   103  // NewService creates a new Service.
   104  func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
   105  	scopesOption := internaloption.WithDefaultScopes(
   106  		"https://www.googleapis.com/auth/cloud-platform",
   107  	)
   108  	// NOTE: prepend, so we don't override user-specified scopes.
   109  	opts = append([]option.ClientOption{scopesOption}, opts...)
   110  	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
   111  	opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
   112  	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
   113  	opts = append(opts, internaloption.EnableNewAuthLibrary())
   114  	client, endpoint, err := htransport.NewClient(ctx, opts...)
   115  	if err != nil {
   116  		return nil, err
   117  	}
   118  	s, err := New(client)
   119  	if err != nil {
   120  		return nil, err
   121  	}
   122  	if endpoint != "" {
   123  		s.BasePath = endpoint
   124  	}
   125  	return s, nil
   126  }
   127  
   128  // New creates a new Service. It uses the provided http.Client for requests.
   129  //
   130  // Deprecated: please use NewService instead.
   131  // To provide a custom HTTP client, use option.WithHTTPClient.
   132  // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
   133  func New(client *http.Client) (*Service, error) {
   134  	if client == nil {
   135  		return nil, errors.New("client is nil")
   136  	}
   137  	s := &Service{client: client, BasePath: basePath}
   138  	s.Projects = NewProjectsService(s)
   139  	return s, nil
   140  }
   141  
   142  type Service struct {
   143  	client    *http.Client
   144  	BasePath  string // API endpoint base URL
   145  	UserAgent string // optional additional User-Agent fragment
   146  
   147  	Projects *ProjectsService
   148  }
   149  
   150  func (s *Service) userAgent() string {
   151  	if s.UserAgent == "" {
   152  		return googleapi.UserAgent
   153  	}
   154  	return googleapi.UserAgent + " " + s.UserAgent
   155  }
   156  
   157  func NewProjectsService(s *Service) *ProjectsService {
   158  	rs := &ProjectsService{s: s}
   159  	rs.Locations = NewProjectsLocationsService(s)
   160  	return rs
   161  }
   162  
   163  type ProjectsService struct {
   164  	s *Service
   165  
   166  	Locations *ProjectsLocationsService
   167  }
   168  
   169  func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
   170  	rs := &ProjectsLocationsService{s: s}
   171  	rs.BackupPlans = NewProjectsLocationsBackupPlansService(s)
   172  	rs.Operations = NewProjectsLocationsOperationsService(s)
   173  	rs.RestorePlans = NewProjectsLocationsRestorePlansService(s)
   174  	return rs
   175  }
   176  
   177  type ProjectsLocationsService struct {
   178  	s *Service
   179  
   180  	BackupPlans *ProjectsLocationsBackupPlansService
   181  
   182  	Operations *ProjectsLocationsOperationsService
   183  
   184  	RestorePlans *ProjectsLocationsRestorePlansService
   185  }
   186  
   187  func NewProjectsLocationsBackupPlansService(s *Service) *ProjectsLocationsBackupPlansService {
   188  	rs := &ProjectsLocationsBackupPlansService{s: s}
   189  	rs.Backups = NewProjectsLocationsBackupPlansBackupsService(s)
   190  	return rs
   191  }
   192  
   193  type ProjectsLocationsBackupPlansService struct {
   194  	s *Service
   195  
   196  	Backups *ProjectsLocationsBackupPlansBackupsService
   197  }
   198  
   199  func NewProjectsLocationsBackupPlansBackupsService(s *Service) *ProjectsLocationsBackupPlansBackupsService {
   200  	rs := &ProjectsLocationsBackupPlansBackupsService{s: s}
   201  	rs.VolumeBackups = NewProjectsLocationsBackupPlansBackupsVolumeBackupsService(s)
   202  	return rs
   203  }
   204  
   205  type ProjectsLocationsBackupPlansBackupsService struct {
   206  	s *Service
   207  
   208  	VolumeBackups *ProjectsLocationsBackupPlansBackupsVolumeBackupsService
   209  }
   210  
   211  func NewProjectsLocationsBackupPlansBackupsVolumeBackupsService(s *Service) *ProjectsLocationsBackupPlansBackupsVolumeBackupsService {
   212  	rs := &ProjectsLocationsBackupPlansBackupsVolumeBackupsService{s: s}
   213  	return rs
   214  }
   215  
   216  type ProjectsLocationsBackupPlansBackupsVolumeBackupsService struct {
   217  	s *Service
   218  }
   219  
   220  func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
   221  	rs := &ProjectsLocationsOperationsService{s: s}
   222  	return rs
   223  }
   224  
   225  type ProjectsLocationsOperationsService struct {
   226  	s *Service
   227  }
   228  
   229  func NewProjectsLocationsRestorePlansService(s *Service) *ProjectsLocationsRestorePlansService {
   230  	rs := &ProjectsLocationsRestorePlansService{s: s}
   231  	rs.Restores = NewProjectsLocationsRestorePlansRestoresService(s)
   232  	return rs
   233  }
   234  
   235  type ProjectsLocationsRestorePlansService struct {
   236  	s *Service
   237  
   238  	Restores *ProjectsLocationsRestorePlansRestoresService
   239  }
   240  
   241  func NewProjectsLocationsRestorePlansRestoresService(s *Service) *ProjectsLocationsRestorePlansRestoresService {
   242  	rs := &ProjectsLocationsRestorePlansRestoresService{s: s}
   243  	rs.VolumeRestores = NewProjectsLocationsRestorePlansRestoresVolumeRestoresService(s)
   244  	return rs
   245  }
   246  
   247  type ProjectsLocationsRestorePlansRestoresService struct {
   248  	s *Service
   249  
   250  	VolumeRestores *ProjectsLocationsRestorePlansRestoresVolumeRestoresService
   251  }
   252  
   253  func NewProjectsLocationsRestorePlansRestoresVolumeRestoresService(s *Service) *ProjectsLocationsRestorePlansRestoresVolumeRestoresService {
   254  	rs := &ProjectsLocationsRestorePlansRestoresVolumeRestoresService{s: s}
   255  	return rs
   256  }
   257  
   258  type ProjectsLocationsRestorePlansRestoresVolumeRestoresService struct {
   259  	s *Service
   260  }
   261  
   262  // AuditConfig: Specifies the audit configuration for a service. The
   263  // configuration determines which permission types are logged, and what
   264  // identities, if any, are exempted from logging. An AuditConfig must have one
   265  // or more AuditLogConfigs. If there are AuditConfigs for both `allServices`
   266  // and a specific service, the union of the two AuditConfigs is used for that
   267  // service: the log_types specified in each AuditConfig are enabled, and the
   268  // exempted_members in each AuditLogConfig are exempted. Example Policy with
   269  // multiple AuditConfigs: { "audit_configs": [ { "service": "allServices",
   270  // "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [
   271  // "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { "log_type":
   272  // "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com",
   273  // "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type":
   274  // "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] } For
   275  // sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
   276  // logging. It also exempts `jose@example.com` from DATA_READ logging, and
   277  // `aliya@example.com` from DATA_WRITE logging.
   278  type AuditConfig struct {
   279  	// AuditLogConfigs: The configuration for logging of each type of permission.
   280  	AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"`
   281  	// Service: Specifies a service that will be enabled for audit logging. For
   282  	// example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices`
   283  	// is a special value that covers all services.
   284  	Service string `json:"service,omitempty"`
   285  	// ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to
   286  	// unconditionally include in API requests. By default, fields with empty or
   287  	// default values are omitted from API requests. See
   288  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   289  	// details.
   290  	ForceSendFields []string `json:"-"`
   291  	// NullFields is a list of field names (e.g. "AuditLogConfigs") to include in
   292  	// API requests with the JSON null value. By default, fields with empty values
   293  	// are omitted from API requests. See
   294  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   295  	NullFields []string `json:"-"`
   296  }
   297  
   298  func (s *AuditConfig) MarshalJSON() ([]byte, error) {
   299  	type NoMethod AuditConfig
   300  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   301  }
   302  
   303  // AuditLogConfig: Provides the configuration for logging a type of
   304  // permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ",
   305  // "exempted_members": [ "user:jose@example.com" ] }, { "log_type":
   306  // "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while
   307  // exempting jose@example.com from DATA_READ logging.
   308  type AuditLogConfig struct {
   309  	// ExemptedMembers: Specifies the identities that do not cause logging for this
   310  	// type of permission. Follows the same format of Binding.members.
   311  	ExemptedMembers []string `json:"exemptedMembers,omitempty"`
   312  	// LogType: The log type that this config enables.
   313  	//
   314  	// Possible values:
   315  	//   "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this.
   316  	//   "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy
   317  	//   "DATA_WRITE" - Data writes. Example: CloudSQL Users create
   318  	//   "DATA_READ" - Data reads. Example: CloudSQL Users list
   319  	LogType string `json:"logType,omitempty"`
   320  	// ForceSendFields is a list of field names (e.g. "ExemptedMembers") to
   321  	// unconditionally include in API requests. By default, fields with empty or
   322  	// default values are omitted from API requests. See
   323  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   324  	// details.
   325  	ForceSendFields []string `json:"-"`
   326  	// NullFields is a list of field names (e.g. "ExemptedMembers") to include in
   327  	// API requests with the JSON null value. By default, fields with empty values
   328  	// are omitted from API requests. See
   329  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   330  	NullFields []string `json:"-"`
   331  }
   332  
   333  func (s *AuditLogConfig) MarshalJSON() ([]byte, error) {
   334  	type NoMethod AuditLogConfig
   335  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   336  }
   337  
   338  // Backup: Represents a request to perform a single point-in-time capture of
   339  // some portion of the state of a GKE cluster, the record of the backup
   340  // operation itself, and an anchor for the underlying artifacts that comprise
   341  // the Backup (the config backup and VolumeBackups).
   342  type Backup struct {
   343  	// AllNamespaces: Output only. If True, all namespaces were included in the
   344  	// Backup.
   345  	AllNamespaces bool `json:"allNamespaces,omitempty"`
   346  	// ClusterMetadata: Output only. Information about the GKE cluster from which
   347  	// this Backup was created.
   348  	ClusterMetadata *ClusterMetadata `json:"clusterMetadata,omitempty"`
   349  	// CompleteTime: Output only. Completion time of the Backup
   350  	CompleteTime string `json:"completeTime,omitempty"`
   351  	// ConfigBackupSizeBytes: Output only. The size of the config backup in bytes.
   352  	ConfigBackupSizeBytes int64 `json:"configBackupSizeBytes,omitempty,string"`
   353  	// ContainsSecrets: Output only. Whether or not the Backup contains Kubernetes
   354  	// Secrets. Controlled by the parent BackupPlan's include_secrets value.
   355  	ContainsSecrets bool `json:"containsSecrets,omitempty"`
   356  	// ContainsVolumeData: Output only. Whether or not the Backup contains volume
   357  	// data. Controlled by the parent BackupPlan's include_volume_data value.
   358  	ContainsVolumeData bool `json:"containsVolumeData,omitempty"`
   359  	// CreateTime: Output only. The timestamp when this Backup resource was
   360  	// created.
   361  	CreateTime string `json:"createTime,omitempty"`
   362  	// DeleteLockDays: Optional. Minimum age for this Backup (in days). If this
   363  	// field is set to a non-zero value, the Backup will be "locked" against
   364  	// deletion (either manual or automatic deletion) for the number of days
   365  	// provided (measured from the creation time of the Backup). MUST be an integer
   366  	// value between 0-90 (inclusive). Defaults to parent BackupPlan's
   367  	// backup_delete_lock_days setting and may only be increased (either at
   368  	// creation time or in a subsequent update).
   369  	DeleteLockDays int64 `json:"deleteLockDays,omitempty"`
   370  	// DeleteLockExpireTime: Output only. The time at which an existing delete lock
   371  	// will expire for this backup (calculated from create_time +
   372  	// delete_lock_days).
   373  	DeleteLockExpireTime string `json:"deleteLockExpireTime,omitempty"`
   374  	// Description: Optional. User specified descriptive string for this Backup.
   375  	Description string `json:"description,omitempty"`
   376  	// EncryptionKey: Output only. The customer managed encryption key that was
   377  	// used to encrypt the Backup's artifacts. Inherited from the parent
   378  	// BackupPlan's encryption_key value.
   379  	EncryptionKey *EncryptionKey `json:"encryptionKey,omitempty"`
   380  	// Etag: Output only. `etag` is used for optimistic concurrency control as a
   381  	// way to help prevent simultaneous updates of a backup from overwriting each
   382  	// other. It is strongly suggested that systems make use of the `etag` in the
   383  	// read-modify-write cycle to perform backup updates in order to avoid race
   384  	// conditions: An `etag` is returned in the response to `GetBackup`, and
   385  	// systems are expected to put that etag in the request to `UpdateBackup` or
   386  	// `DeleteBackup` to ensure that their change will be applied to the same
   387  	// version of the resource.
   388  	Etag string `json:"etag,omitempty"`
   389  	// Labels: Optional. A set of custom labels supplied by user.
   390  	Labels map[string]string `json:"labels,omitempty"`
   391  	// Manual: Output only. This flag indicates whether this Backup resource was
   392  	// created manually by a user or via a schedule in the BackupPlan. A value of
   393  	// True means that the Backup was created manually.
   394  	Manual bool `json:"manual,omitempty"`
   395  	// Name: Output only. The fully qualified name of the Backup.
   396  	// `projects/*/locations/*/backupPlans/*/backups/*`
   397  	Name string `json:"name,omitempty"`
   398  	// PodCount: Output only. The total number of Kubernetes Pods contained in the
   399  	// Backup.
   400  	PodCount int64 `json:"podCount,omitempty"`
   401  	// ResourceCount: Output only. The total number of Kubernetes resources
   402  	// included in the Backup.
   403  	ResourceCount int64 `json:"resourceCount,omitempty"`
   404  	// RetainDays: Optional. The age (in days) after which this Backup will be
   405  	// automatically deleted. Must be an integer value >= 0: - If 0, no automatic
   406  	// deletion will occur for this Backup. - If not 0, this must be >=
   407  	// delete_lock_days and <= 365. Once a Backup is created, this value may only
   408  	// be increased. Defaults to the parent BackupPlan's backup_retain_days value.
   409  	RetainDays int64 `json:"retainDays,omitempty"`
   410  	// RetainExpireTime: Output only. The time at which this Backup will be
   411  	// automatically deleted (calculated from create_time + retain_days).
   412  	RetainExpireTime string `json:"retainExpireTime,omitempty"`
   413  	// SelectedApplications: Output only. If set, the list of ProtectedApplications
   414  	// whose resources were included in the Backup.
   415  	SelectedApplications *NamespacedNames `json:"selectedApplications,omitempty"`
   416  	// SelectedNamespaces: Output only. If set, the list of namespaces that were
   417  	// included in the Backup.
   418  	SelectedNamespaces *Namespaces `json:"selectedNamespaces,omitempty"`
   419  	// SizeBytes: Output only. The total size of the Backup in bytes = config
   420  	// backup size + sum(volume backup sizes)
   421  	SizeBytes int64 `json:"sizeBytes,omitempty,string"`
   422  	// State: Output only. Current state of the Backup
   423  	//
   424  	// Possible values:
   425  	//   "STATE_UNSPECIFIED" - The Backup resource is in the process of being
   426  	// created.
   427  	//   "CREATING" - The Backup resource has been created and the associated
   428  	// BackupJob Kubernetes resource has been injected into the source cluster.
   429  	//   "IN_PROGRESS" - The gkebackup agent in the cluster has begun executing the
   430  	// backup operation.
   431  	//   "SUCCEEDED" - The backup operation has completed successfully.
   432  	//   "FAILED" - The backup operation has failed.
   433  	//   "DELETING" - This Backup resource (and its associated artifacts) is in the
   434  	// process of being deleted.
   435  	State string `json:"state,omitempty"`
   436  	// StateReason: Output only. Human-readable description of why the backup is in
   437  	// the current `state`.
   438  	StateReason string `json:"stateReason,omitempty"`
   439  	// Uid: Output only. Server generated global unique identifier of UUID4
   440  	// (https://en.wikipedia.org/wiki/Universally_unique_identifier)
   441  	Uid string `json:"uid,omitempty"`
   442  	// UpdateTime: Output only. The timestamp when this Backup resource was last
   443  	// updated.
   444  	UpdateTime string `json:"updateTime,omitempty"`
   445  	// VolumeCount: Output only. The total number of volume backups contained in
   446  	// the Backup.
   447  	VolumeCount int64 `json:"volumeCount,omitempty"`
   448  
   449  	// ServerResponse contains the HTTP response code and headers from the server.
   450  	googleapi.ServerResponse `json:"-"`
   451  	// ForceSendFields is a list of field names (e.g. "AllNamespaces") to
   452  	// unconditionally include in API requests. By default, fields with empty or
   453  	// default values are omitted from API requests. See
   454  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   455  	// details.
   456  	ForceSendFields []string `json:"-"`
   457  	// NullFields is a list of field names (e.g. "AllNamespaces") to include in API
   458  	// requests with the JSON null value. By default, fields with empty values are
   459  	// omitted from API requests. See
   460  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   461  	NullFields []string `json:"-"`
   462  }
   463  
   464  func (s *Backup) MarshalJSON() ([]byte, error) {
   465  	type NoMethod Backup
   466  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   467  }
   468  
   469  // BackupConfig: BackupConfig defines the configuration of Backups created via
   470  // this BackupPlan.
   471  type BackupConfig struct {
   472  	// AllNamespaces: If True, include all namespaced resources
   473  	AllNamespaces bool `json:"allNamespaces,omitempty"`
   474  	// EncryptionKey: Optional. This defines a customer managed encryption key that
   475  	// will be used to encrypt the "config" portion (the Kubernetes resources) of
   476  	// Backups created via this plan. Default (empty): Config backup artifacts will
   477  	// not be encrypted.
   478  	EncryptionKey *EncryptionKey `json:"encryptionKey,omitempty"`
   479  	// IncludeSecrets: Optional. This flag specifies whether Kubernetes Secret
   480  	// resources should be included when they fall into the scope of Backups.
   481  	// Default: False
   482  	IncludeSecrets bool `json:"includeSecrets,omitempty"`
   483  	// IncludeVolumeData: Optional. This flag specifies whether volume data should
   484  	// be backed up when PVCs are included in the scope of a Backup. Default: False
   485  	IncludeVolumeData bool `json:"includeVolumeData,omitempty"`
   486  	// SelectedApplications: If set, include just the resources referenced by the
   487  	// listed ProtectedApplications.
   488  	SelectedApplications *NamespacedNames `json:"selectedApplications,omitempty"`
   489  	// SelectedNamespaces: If set, include just the resources in the listed
   490  	// namespaces.
   491  	SelectedNamespaces *Namespaces `json:"selectedNamespaces,omitempty"`
   492  	// ForceSendFields is a list of field names (e.g. "AllNamespaces") to
   493  	// unconditionally include in API requests. By default, fields with empty or
   494  	// default values are omitted from API requests. See
   495  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   496  	// details.
   497  	ForceSendFields []string `json:"-"`
   498  	// NullFields is a list of field names (e.g. "AllNamespaces") to include in API
   499  	// requests with the JSON null value. By default, fields with empty values are
   500  	// omitted from API requests. See
   501  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   502  	NullFields []string `json:"-"`
   503  }
   504  
   505  func (s *BackupConfig) MarshalJSON() ([]byte, error) {
   506  	type NoMethod BackupConfig
   507  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   508  }
   509  
   510  // BackupPlan: Defines the configuration and scheduling for a "line" of
   511  // Backups.
   512  type BackupPlan struct {
   513  	// BackupConfig: Optional. Defines the configuration of Backups created via
   514  	// this BackupPlan.
   515  	BackupConfig *BackupConfig `json:"backupConfig,omitempty"`
   516  	// BackupSchedule: Optional. Defines a schedule for automatic Backup creation
   517  	// via this BackupPlan.
   518  	BackupSchedule *Schedule `json:"backupSchedule,omitempty"`
   519  	// Cluster: Required. Immutable. The source cluster from which Backups will be
   520  	// created via this BackupPlan. Valid formats: -
   521  	// `projects/*/locations/*/clusters/*` - `projects/*/zones/*/clusters/*`
   522  	Cluster string `json:"cluster,omitempty"`
   523  	// CreateTime: Output only. The timestamp when this BackupPlan resource was
   524  	// created.
   525  	CreateTime string `json:"createTime,omitempty"`
   526  	// Deactivated: Optional. This flag indicates whether this BackupPlan has been
   527  	// deactivated. Setting this field to True locks the BackupPlan such that no
   528  	// further updates will be allowed (except deletes), including the deactivated
   529  	// field itself. It also prevents any new Backups from being created via this
   530  	// BackupPlan (including scheduled Backups). Default: False
   531  	Deactivated bool `json:"deactivated,omitempty"`
   532  	// Description: Optional. User specified descriptive string for this
   533  	// BackupPlan.
   534  	Description string `json:"description,omitempty"`
   535  	// Etag: Output only. `etag` is used for optimistic concurrency control as a
   536  	// way to help prevent simultaneous updates of a backup plan from overwriting
   537  	// each other. It is strongly suggested that systems make use of the 'etag' in
   538  	// the read-modify-write cycle to perform BackupPlan updates in order to avoid
   539  	// race conditions: An `etag` is returned in the response to `GetBackupPlan`,
   540  	// and systems are expected to put that etag in the request to
   541  	// `UpdateBackupPlan` or `DeleteBackupPlan` to ensure that their change will be
   542  	// applied to the same version of the resource.
   543  	Etag string `json:"etag,omitempty"`
   544  	// Labels: Optional. A set of custom labels supplied by user.
   545  	Labels map[string]string `json:"labels,omitempty"`
   546  	// Name: Output only. The full name of the BackupPlan resource. Format:
   547  	// `projects/*/locations/*/backupPlans/*`
   548  	Name string `json:"name,omitempty"`
   549  	// ProtectedPodCount: Output only. The number of Kubernetes Pods backed up in
   550  	// the last successful Backup created via this BackupPlan.
   551  	ProtectedPodCount int64 `json:"protectedPodCount,omitempty"`
   552  	// RetentionPolicy: Optional. RetentionPolicy governs lifecycle of Backups
   553  	// created under this plan.
   554  	RetentionPolicy *RetentionPolicy `json:"retentionPolicy,omitempty"`
   555  	// RpoRiskLevel: Output only. A number that represents the current risk level
   556  	// of this BackupPlan from RPO perspective with 1 being no risk and 5 being
   557  	// highest risk.
   558  	RpoRiskLevel int64 `json:"rpoRiskLevel,omitempty"`
   559  	// RpoRiskReason: Output only. Human-readable description of why the BackupPlan
   560  	// is in the current rpo_risk_level and action items if any.
   561  	RpoRiskReason string `json:"rpoRiskReason,omitempty"`
   562  	// State: Output only. State of the BackupPlan. This State field reflects the
   563  	// various stages a BackupPlan can be in during the Create operation. It will
   564  	// be set to "DEACTIVATED" if the BackupPlan is deactivated on an Update
   565  	//
   566  	// Possible values:
   567  	//   "STATE_UNSPECIFIED" - Default first value for Enums.
   568  	//   "CLUSTER_PENDING" - Waiting for cluster state to be RUNNING.
   569  	//   "PROVISIONING" - The BackupPlan is in the process of being created.
   570  	//   "READY" - The BackupPlan has successfully been created and is ready for
   571  	// Backups.
   572  	//   "FAILED" - BackupPlan creation has failed.
   573  	//   "DEACTIVATED" - The BackupPlan has been deactivated.
   574  	//   "DELETING" - The BackupPlan is in the process of being deleted.
   575  	State string `json:"state,omitempty"`
   576  	// StateReason: Output only. Human-readable description of why BackupPlan is in
   577  	// the current `state`
   578  	StateReason string `json:"stateReason,omitempty"`
   579  	// Uid: Output only. Server generated global unique identifier of UUID
   580  	// (https://en.wikipedia.org/wiki/Universally_unique_identifier) format.
   581  	Uid string `json:"uid,omitempty"`
   582  	// UpdateTime: Output only. The timestamp when this BackupPlan resource was
   583  	// last updated.
   584  	UpdateTime string `json:"updateTime,omitempty"`
   585  
   586  	// ServerResponse contains the HTTP response code and headers from the server.
   587  	googleapi.ServerResponse `json:"-"`
   588  	// ForceSendFields is a list of field names (e.g. "BackupConfig") to
   589  	// unconditionally include in API requests. By default, fields with empty or
   590  	// default values are omitted from API requests. See
   591  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   592  	// details.
   593  	ForceSendFields []string `json:"-"`
   594  	// NullFields is a list of field names (e.g. "BackupConfig") to include in API
   595  	// requests with the JSON null value. By default, fields with empty values are
   596  	// omitted from API requests. See
   597  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   598  	NullFields []string `json:"-"`
   599  }
   600  
   601  func (s *BackupPlan) MarshalJSON() ([]byte, error) {
   602  	type NoMethod BackupPlan
   603  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   604  }
   605  
   606  // Binding: Associates `members`, or principals, with a `role`.
   607  type Binding struct {
   608  	// Condition: The condition that is associated with this binding. If the
   609  	// condition evaluates to `true`, then this binding applies to the current
   610  	// request. If the condition evaluates to `false`, then this binding does not
   611  	// apply to the current request. However, a different role binding might grant
   612  	// the same role to one or more of the principals in this binding. To learn
   613  	// which resources support conditions in their IAM policies, see the IAM
   614  	// documentation
   615  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
   616  	Condition *Expr `json:"condition,omitempty"`
   617  	// Members: Specifies the principals requesting access for a Google Cloud
   618  	// resource. `members` can have the following values: * `allUsers`: A special
   619  	// identifier that represents anyone who is on the internet; with or without a
   620  	// Google account. * `allAuthenticatedUsers`: A special identifier that
   621  	// represents anyone who is authenticated with a Google account or a service
   622  	// account. Does not include identities that come from external identity
   623  	// providers (IdPs) through identity federation. * `user:{emailid}`: An email
   624  	// address that represents a specific Google account. For example,
   625  	// `alice@example.com` . * `serviceAccount:{emailid}`: An email address that
   626  	// represents a Google service account. For example,
   627  	// `my-other-app@appspot.gserviceaccount.com`. *
   628  	// `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An
   629  	// identifier for a Kubernetes service account
   630  	// (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts).
   631  	// For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. *
   632  	// `group:{emailid}`: An email address that represents a Google group. For
   633  	// example, `admins@example.com`. * `domain:{domain}`: The G Suite domain
   634  	// (primary) that represents all the users of that domain. For example,
   635  	// `google.com` or `example.com`. *
   636  	// `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/sub
   637  	// ject/{subject_attribute_value}`: A single identity in a workforce identity
   638  	// pool. *
   639  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   640  	// group/{group_id}`: All workforce identities in a group. *
   641  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   642  	// attribute.{attribute_name}/{attribute_value}`: All workforce identities with
   643  	// a specific attribute value. *
   644  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   645  	// *`: All identities in a workforce identity pool. *
   646  	// `principal://iam.googleapis.com/projects/{project_number}/locations/global/wo
   647  	// rkloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single
   648  	// identity in a workload identity pool. *
   649  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   650  	// /workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool
   651  	// group. *
   652  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   653  	// /workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}
   654  	// `: All identities in a workload identity pool with a certain attribute. *
   655  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   656  	// /workloadIdentityPools/{pool_id}/*`: All identities in a workload identity
   657  	// pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus
   658  	// unique identifier) representing a user that has been recently deleted. For
   659  	// example, `alice@example.com?uid=123456789012345678901`. If the user is
   660  	// recovered, this value reverts to `user:{emailid}` and the recovered user
   661  	// retains the role in the binding. *
   662  	// `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
   663  	// unique identifier) representing a service account that has been recently
   664  	// deleted. For example,
   665  	// `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the
   666  	// service account is undeleted, this value reverts to
   667  	// `serviceAccount:{emailid}` and the undeleted service account retains the
   668  	// role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email
   669  	// address (plus unique identifier) representing a Google group that has been
   670  	// recently deleted. For example,
   671  	// `admins@example.com?uid=123456789012345678901`. If the group is recovered,
   672  	// this value reverts to `group:{emailid}` and the recovered group retains the
   673  	// role in the binding. *
   674  	// `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool
   675  	// _id}/subject/{subject_attribute_value}`: Deleted single identity in a
   676  	// workforce identity pool. For example,
   677  	// `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-po
   678  	// ol-id/subject/my-subject-attribute-value`.
   679  	Members []string `json:"members,omitempty"`
   680  	// Role: Role that is assigned to the list of `members`, or principals. For
   681  	// example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview
   682  	// of the IAM roles and permissions, see the IAM documentation
   683  	// (https://cloud.google.com/iam/docs/roles-overview). For a list of the
   684  	// available pre-defined roles, see here
   685  	// (https://cloud.google.com/iam/docs/understanding-roles).
   686  	Role string `json:"role,omitempty"`
   687  	// ForceSendFields is a list of field names (e.g. "Condition") to
   688  	// unconditionally include in API requests. By default, fields with empty or
   689  	// default values are omitted from API requests. See
   690  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   691  	// details.
   692  	ForceSendFields []string `json:"-"`
   693  	// NullFields is a list of field names (e.g. "Condition") to include in API
   694  	// requests with the JSON null value. By default, fields with empty values are
   695  	// omitted from API requests. See
   696  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   697  	NullFields []string `json:"-"`
   698  }
   699  
   700  func (s *Binding) MarshalJSON() ([]byte, error) {
   701  	type NoMethod Binding
   702  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   703  }
   704  
   705  // ClusterMetadata: Information about the GKE cluster from which this Backup
   706  // was created.
   707  type ClusterMetadata struct {
   708  	// AnthosVersion: Output only. Anthos version
   709  	AnthosVersion string `json:"anthosVersion,omitempty"`
   710  	// BackupCrdVersions: Output only. A list of the Backup for GKE CRD versions
   711  	// found in the cluster.
   712  	BackupCrdVersions map[string]string `json:"backupCrdVersions,omitempty"`
   713  	// Cluster: Output only. The source cluster from which this Backup was created.
   714  	// Valid formats: - `projects/*/locations/*/clusters/*` -
   715  	// `projects/*/zones/*/clusters/*` This is inherited from the parent
   716  	// BackupPlan's cluster field.
   717  	Cluster string `json:"cluster,omitempty"`
   718  	// GkeVersion: Output only. GKE version
   719  	GkeVersion string `json:"gkeVersion,omitempty"`
   720  	// K8sVersion: Output only. The Kubernetes server version of the source
   721  	// cluster.
   722  	K8sVersion string `json:"k8sVersion,omitempty"`
   723  	// ForceSendFields is a list of field names (e.g. "AnthosVersion") to
   724  	// unconditionally include in API requests. By default, fields with empty or
   725  	// default values are omitted from API requests. See
   726  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   727  	// details.
   728  	ForceSendFields []string `json:"-"`
   729  	// NullFields is a list of field names (e.g. "AnthosVersion") to include in API
   730  	// requests with the JSON null value. By default, fields with empty values are
   731  	// omitted from API requests. See
   732  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   733  	NullFields []string `json:"-"`
   734  }
   735  
   736  func (s *ClusterMetadata) MarshalJSON() ([]byte, error) {
   737  	type NoMethod ClusterMetadata
   738  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   739  }
   740  
   741  // ClusterResourceRestoreScope: Defines the scope of cluster-scoped resources
   742  // to restore. Some group kinds are not reasonable choices for a restore, and
   743  // will cause an error if selected here. Any scope selection that would restore
   744  // "all valid" resources automatically excludes these group kinds. -
   745  // gkebackup.gke.io/BackupJob - gkebackup.gke.io/RestoreJob -
   746  // metrics.k8s.io/NodeMetrics - migration.k8s.io/StorageState -
   747  // migration.k8s.io/StorageVersionMigration - Node -
   748  // snapshot.storage.k8s.io/VolumeSnapshotContent - storage.k8s.io/CSINode Some
   749  // group kinds are driven by restore configuration elsewhere, and will cause an
   750  // error if selected here. - Namespace - PersistentVolume
   751  type ClusterResourceRestoreScope struct {
   752  	// AllGroupKinds: Optional. If True, all valid cluster-scoped resources will be
   753  	// restored. Mutually exclusive to any other field in the message.
   754  	AllGroupKinds bool `json:"allGroupKinds,omitempty"`
   755  	// ExcludedGroupKinds: Optional. A list of cluster-scoped resource group kinds
   756  	// to NOT restore from the backup. If specified, all valid cluster-scoped
   757  	// resources will be restored except for those specified in the list. Mutually
   758  	// exclusive to any other field in the message.
   759  	ExcludedGroupKinds []*GroupKind `json:"excludedGroupKinds,omitempty"`
   760  	// NoGroupKinds: Optional. If True, no cluster-scoped resources will be
   761  	// restored. This has the same restore scope as if the message is not defined.
   762  	// Mutually exclusive to any other field in the message.
   763  	NoGroupKinds bool `json:"noGroupKinds,omitempty"`
   764  	// SelectedGroupKinds: Optional. A list of cluster-scoped resource group kinds
   765  	// to restore from the backup. If specified, only the selected resources will
   766  	// be restored. Mutually exclusive to any other field in the message.
   767  	SelectedGroupKinds []*GroupKind `json:"selectedGroupKinds,omitempty"`
   768  	// ForceSendFields is a list of field names (e.g. "AllGroupKinds") to
   769  	// unconditionally include in API requests. By default, fields with empty or
   770  	// default values are omitted from API requests. See
   771  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   772  	// details.
   773  	ForceSendFields []string `json:"-"`
   774  	// NullFields is a list of field names (e.g. "AllGroupKinds") to include in API
   775  	// requests with the JSON null value. By default, fields with empty values are
   776  	// omitted from API requests. See
   777  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   778  	NullFields []string `json:"-"`
   779  }
   780  
   781  func (s *ClusterResourceRestoreScope) MarshalJSON() ([]byte, error) {
   782  	type NoMethod ClusterResourceRestoreScope
   783  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   784  }
   785  
   786  // Date: Represents a whole or partial calendar date, such as a birthday. The
   787  // time of day and time zone are either specified elsewhere or are
   788  // insignificant. The date is relative to the Gregorian Calendar. This can
   789  // represent one of the following: * A full date, with non-zero year, month,
   790  // and day values. * A month and day, with a zero year (for example, an
   791  // anniversary). * A year on its own, with a zero month and a zero day. * A
   792  // year and month, with a zero day (for example, a credit card expiration
   793  // date). Related types: * google.type.TimeOfDay * google.type.DateTime *
   794  // google.protobuf.Timestamp
   795  type Date struct {
   796  	// Day: Day of a month. Must be from 1 to 31 and valid for the year and month,
   797  	// or 0 to specify a year by itself or a year and month where the day isn't
   798  	// significant.
   799  	Day int64 `json:"day,omitempty"`
   800  	// Month: Month of a year. Must be from 1 to 12, or 0 to specify a year without
   801  	// a month and day.
   802  	Month int64 `json:"month,omitempty"`
   803  	// Year: Year of the date. Must be from 1 to 9999, or 0 to specify a date
   804  	// without a year.
   805  	Year int64 `json:"year,omitempty"`
   806  	// ForceSendFields is a list of field names (e.g. "Day") to unconditionally
   807  	// include in API requests. By default, fields with empty or default values are
   808  	// omitted from API requests. See
   809  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   810  	// details.
   811  	ForceSendFields []string `json:"-"`
   812  	// NullFields is a list of field names (e.g. "Day") to include in API requests
   813  	// with the JSON null value. By default, fields with empty values are omitted
   814  	// from API requests. See
   815  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   816  	NullFields []string `json:"-"`
   817  }
   818  
   819  func (s *Date) MarshalJSON() ([]byte, error) {
   820  	type NoMethod Date
   821  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   822  }
   823  
   824  // DayOfWeekList: Holds repeated DaysOfWeek values as a container.
   825  type DayOfWeekList struct {
   826  	// DaysOfWeek: Optional. A list of days of week.
   827  	//
   828  	// Possible values:
   829  	//   "DAY_OF_WEEK_UNSPECIFIED" - The day of the week is unspecified.
   830  	//   "MONDAY" - Monday
   831  	//   "TUESDAY" - Tuesday
   832  	//   "WEDNESDAY" - Wednesday
   833  	//   "THURSDAY" - Thursday
   834  	//   "FRIDAY" - Friday
   835  	//   "SATURDAY" - Saturday
   836  	//   "SUNDAY" - Sunday
   837  	DaysOfWeek []string `json:"daysOfWeek,omitempty"`
   838  	// ForceSendFields is a list of field names (e.g. "DaysOfWeek") to
   839  	// unconditionally include in API requests. By default, fields with empty or
   840  	// default values are omitted from API requests. See
   841  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   842  	// details.
   843  	ForceSendFields []string `json:"-"`
   844  	// NullFields is a list of field names (e.g. "DaysOfWeek") to include in API
   845  	// requests with the JSON null value. By default, fields with empty values are
   846  	// omitted from API requests. See
   847  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   848  	NullFields []string `json:"-"`
   849  }
   850  
   851  func (s *DayOfWeekList) MarshalJSON() ([]byte, error) {
   852  	type NoMethod DayOfWeekList
   853  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   854  }
   855  
   856  // Empty: A generic empty message that you can re-use to avoid defining
   857  // duplicated empty messages in your APIs. A typical example is to use it as
   858  // the request or the response type of an API method. For instance: service Foo
   859  // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
   860  type Empty struct {
   861  	// ServerResponse contains the HTTP response code and headers from the server.
   862  	googleapi.ServerResponse `json:"-"`
   863  }
   864  
   865  // EncryptionKey: Defined a customer managed encryption key that will be used
   866  // to encrypt Backup artifacts.
   867  type EncryptionKey struct {
   868  	// GcpKmsEncryptionKey: Optional. Google Cloud KMS encryption key. Format:
   869  	// `projects/*/locations/*/keyRings/*/cryptoKeys/*`
   870  	GcpKmsEncryptionKey string `json:"gcpKmsEncryptionKey,omitempty"`
   871  	// ForceSendFields is a list of field names (e.g. "GcpKmsEncryptionKey") to
   872  	// unconditionally include in API requests. By default, fields with empty or
   873  	// default values are omitted from API requests. See
   874  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   875  	// details.
   876  	ForceSendFields []string `json:"-"`
   877  	// NullFields is a list of field names (e.g. "GcpKmsEncryptionKey") to include
   878  	// in API requests with the JSON null value. By default, fields with empty
   879  	// values are omitted from API requests. See
   880  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   881  	NullFields []string `json:"-"`
   882  }
   883  
   884  func (s *EncryptionKey) MarshalJSON() ([]byte, error) {
   885  	type NoMethod EncryptionKey
   886  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   887  }
   888  
   889  // ExclusionWindow: Defines a time window during which no backup should happen.
   890  // All time and date are in UTC.
   891  type ExclusionWindow struct {
   892  	// Daily: The exclusion window occurs every day if set to "True". Specifying
   893  	// this field to "False" is an error.
   894  	Daily bool `json:"daily,omitempty"`
   895  	// DaysOfWeek: The exclusion window occurs on these days of each week in UTC.
   896  	DaysOfWeek *DayOfWeekList `json:"daysOfWeek,omitempty"`
   897  	// Duration: Required. Specifies duration of the window. Duration must be >= 5
   898  	// minutes and < (target RPO - 20 minutes). Additional restrictions based on
   899  	// the recurrence type to allow some time for backup to happen: -
   900  	// single_occurrence_date: no restriction, but UI may warn about this when
   901  	// duration >= target RPO - daily window: duration < 24 hours - weekly window:
   902  	// - days of week includes all seven days of a week: duration < 24 hours - all
   903  	// other weekly window: duration < 168 hours (i.e., 24 * 7 hours)
   904  	Duration string `json:"duration,omitempty"`
   905  	// SingleOccurrenceDate: No recurrence. The exclusion window occurs only once
   906  	// and on this date in UTC.
   907  	SingleOccurrenceDate *Date `json:"singleOccurrenceDate,omitempty"`
   908  	// StartTime: Required. Specifies the start time of the window using time of
   909  	// the day in UTC.
   910  	StartTime *TimeOfDay `json:"startTime,omitempty"`
   911  	// ForceSendFields is a list of field names (e.g. "Daily") to unconditionally
   912  	// include in API requests. By default, fields with empty or default values are
   913  	// omitted from API requests. See
   914  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   915  	// details.
   916  	ForceSendFields []string `json:"-"`
   917  	// NullFields is a list of field names (e.g. "Daily") to include in API
   918  	// requests with the JSON null value. By default, fields with empty values are
   919  	// omitted from API requests. See
   920  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   921  	NullFields []string `json:"-"`
   922  }
   923  
   924  func (s *ExclusionWindow) MarshalJSON() ([]byte, error) {
   925  	type NoMethod ExclusionWindow
   926  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   927  }
   928  
   929  // Expr: Represents a textual expression in the Common Expression Language
   930  // (CEL) syntax. CEL is a C-like expression language. The syntax and semantics
   931  // of CEL are documented at https://github.com/google/cel-spec. Example
   932  // (Comparison): title: "Summary size limit" description: "Determines if a
   933  // summary is less than 100 chars" expression: "document.summary.size() < 100"
   934  // Example (Equality): title: "Requestor is owner" description: "Determines if
   935  // requestor is the document owner" expression: "document.owner ==
   936  // request.auth.claims.email" Example (Logic): title: "Public documents"
   937  // description: "Determine whether the document should be publicly visible"
   938  // expression: "document.type != 'private' && document.type != 'internal'"
   939  // Example (Data Manipulation): title: "Notification string" description:
   940  // "Create a notification string with a timestamp." expression: "'New message
   941  // received at ' + string(document.create_time)" The exact variables and
   942  // functions that may be referenced within an expression are determined by the
   943  // service that evaluates it. See the service documentation for additional
   944  // information.
   945  type Expr struct {
   946  	// Description: Optional. Description of the expression. This is a longer text
   947  	// which describes the expression, e.g. when hovered over it in a UI.
   948  	Description string `json:"description,omitempty"`
   949  	// Expression: Textual representation of an expression in Common Expression
   950  	// Language syntax.
   951  	Expression string `json:"expression,omitempty"`
   952  	// Location: Optional. String indicating the location of the expression for
   953  	// error reporting, e.g. a file name and a position in the file.
   954  	Location string `json:"location,omitempty"`
   955  	// Title: Optional. Title for the expression, i.e. a short string describing
   956  	// its purpose. This can be used e.g. in UIs which allow to enter the
   957  	// expression.
   958  	Title string `json:"title,omitempty"`
   959  	// ForceSendFields is a list of field names (e.g. "Description") to
   960  	// unconditionally include in API requests. By default, fields with empty or
   961  	// default values are omitted from API requests. See
   962  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   963  	// details.
   964  	ForceSendFields []string `json:"-"`
   965  	// NullFields is a list of field names (e.g. "Description") to include in API
   966  	// requests with the JSON null value. By default, fields with empty values are
   967  	// omitted from API requests. See
   968  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   969  	NullFields []string `json:"-"`
   970  }
   971  
   972  func (s *Expr) MarshalJSON() ([]byte, error) {
   973  	type NoMethod Expr
   974  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   975  }
   976  
   977  // GetBackupIndexDownloadUrlResponse: Response message for
   978  // GetBackupIndexDownloadUrl.
   979  type GetBackupIndexDownloadUrlResponse struct {
   980  	SignedUrl string `json:"signedUrl,omitempty"`
   981  
   982  	// ServerResponse contains the HTTP response code and headers from the server.
   983  	googleapi.ServerResponse `json:"-"`
   984  	// ForceSendFields is a list of field names (e.g. "SignedUrl") to
   985  	// unconditionally include in API requests. By default, fields with empty or
   986  	// default values are omitted from API requests. See
   987  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   988  	// details.
   989  	ForceSendFields []string `json:"-"`
   990  	// NullFields is a list of field names (e.g. "SignedUrl") to include in API
   991  	// requests with the JSON null value. By default, fields with empty values are
   992  	// omitted from API requests. See
   993  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   994  	NullFields []string `json:"-"`
   995  }
   996  
   997  func (s *GetBackupIndexDownloadUrlResponse) MarshalJSON() ([]byte, error) {
   998  	type NoMethod GetBackupIndexDownloadUrlResponse
   999  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1000  }
  1001  
  1002  // GoogleLongrunningCancelOperationRequest: The request message for
  1003  // Operations.CancelOperation.
  1004  type GoogleLongrunningCancelOperationRequest struct {
  1005  }
  1006  
  1007  // GoogleLongrunningListOperationsResponse: The response message for
  1008  // Operations.ListOperations.
  1009  type GoogleLongrunningListOperationsResponse struct {
  1010  	// NextPageToken: The standard List next-page token.
  1011  	NextPageToken string `json:"nextPageToken,omitempty"`
  1012  	// Operations: A list of operations that matches the specified filter in the
  1013  	// request.
  1014  	Operations []*GoogleLongrunningOperation `json:"operations,omitempty"`
  1015  
  1016  	// ServerResponse contains the HTTP response code and headers from the server.
  1017  	googleapi.ServerResponse `json:"-"`
  1018  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1019  	// unconditionally include in API requests. By default, fields with empty or
  1020  	// default values are omitted from API requests. See
  1021  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1022  	// details.
  1023  	ForceSendFields []string `json:"-"`
  1024  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1025  	// requests with the JSON null value. By default, fields with empty values are
  1026  	// omitted from API requests. See
  1027  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1028  	NullFields []string `json:"-"`
  1029  }
  1030  
  1031  func (s *GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) {
  1032  	type NoMethod GoogleLongrunningListOperationsResponse
  1033  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1034  }
  1035  
  1036  // GoogleLongrunningOperation: This resource represents a long-running
  1037  // operation that is the result of a network API call.
  1038  type GoogleLongrunningOperation struct {
  1039  	// Done: If the value is `false`, it means the operation is still in progress.
  1040  	// If `true`, the operation is completed, and either `error` or `response` is
  1041  	// available.
  1042  	Done bool `json:"done,omitempty"`
  1043  	// Error: The error result of the operation in case of failure or cancellation.
  1044  	Error *GoogleRpcStatus `json:"error,omitempty"`
  1045  	// Metadata: Service-specific metadata associated with the operation. It
  1046  	// typically contains progress information and common metadata such as create
  1047  	// time. Some services might not provide such metadata. Any method that returns
  1048  	// a long-running operation should document the metadata type, if any.
  1049  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  1050  	// Name: The server-assigned name, which is only unique within the same service
  1051  	// that originally returns it. If you use the default HTTP mapping, the `name`
  1052  	// should be a resource name ending with `operations/{unique_id}`.
  1053  	Name string `json:"name,omitempty"`
  1054  	// Response: The normal, successful response of the operation. If the original
  1055  	// method returns no data on success, such as `Delete`, the response is
  1056  	// `google.protobuf.Empty`. If the original method is standard
  1057  	// `Get`/`Create`/`Update`, the response should be the resource. For other
  1058  	// methods, the response should have the type `XxxResponse`, where `Xxx` is the
  1059  	// original method name. For example, if the original method name is
  1060  	// `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
  1061  	Response googleapi.RawMessage `json:"response,omitempty"`
  1062  
  1063  	// ServerResponse contains the HTTP response code and headers from the server.
  1064  	googleapi.ServerResponse `json:"-"`
  1065  	// ForceSendFields is a list of field names (e.g. "Done") to unconditionally
  1066  	// include in API requests. By default, fields with empty or default values are
  1067  	// omitted from API requests. See
  1068  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1069  	// details.
  1070  	ForceSendFields []string `json:"-"`
  1071  	// NullFields is a list of field names (e.g. "Done") to include in API requests
  1072  	// with the JSON null value. By default, fields with empty values are omitted
  1073  	// from API requests. See
  1074  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1075  	NullFields []string `json:"-"`
  1076  }
  1077  
  1078  func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) {
  1079  	type NoMethod GoogleLongrunningOperation
  1080  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1081  }
  1082  
  1083  // GoogleRpcStatus: The `Status` type defines a logical error model that is
  1084  // suitable for different programming environments, including REST APIs and RPC
  1085  // APIs. It is used by gRPC (https://github.com/grpc). Each `Status` message
  1086  // contains three pieces of data: error code, error message, and error details.
  1087  // You can find out more about this error model and how to work with it in the
  1088  // API Design Guide (https://cloud.google.com/apis/design/errors).
  1089  type GoogleRpcStatus struct {
  1090  	// Code: The status code, which should be an enum value of google.rpc.Code.
  1091  	Code int64 `json:"code,omitempty"`
  1092  	// Details: A list of messages that carry the error details. There is a common
  1093  	// set of message types for APIs to use.
  1094  	Details []googleapi.RawMessage `json:"details,omitempty"`
  1095  	// Message: A developer-facing error message, which should be in English. Any
  1096  	// user-facing error message should be localized and sent in the
  1097  	// google.rpc.Status.details field, or localized by the client.
  1098  	Message string `json:"message,omitempty"`
  1099  	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
  1100  	// include in API requests. By default, fields with empty or default values are
  1101  	// omitted from API requests. See
  1102  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1103  	// details.
  1104  	ForceSendFields []string `json:"-"`
  1105  	// NullFields is a list of field names (e.g. "Code") to include in API requests
  1106  	// with the JSON null value. By default, fields with empty values are omitted
  1107  	// from API requests. See
  1108  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1109  	NullFields []string `json:"-"`
  1110  }
  1111  
  1112  func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) {
  1113  	type NoMethod GoogleRpcStatus
  1114  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1115  }
  1116  
  1117  // GroupKind: This is a direct map to the Kubernetes GroupKind type GroupKind
  1118  // (https://godoc.org/k8s.io/apimachinery/pkg/runtime/schema#GroupKind) and is
  1119  // used for identifying specific "types" of resources to restore.
  1120  type GroupKind struct {
  1121  	// ResourceGroup: Optional. API group string of a Kubernetes resource, e.g.
  1122  	// "apiextensions.k8s.io", "storage.k8s.io", etc. Note: use empty string for
  1123  	// core API group
  1124  	ResourceGroup string `json:"resourceGroup,omitempty"`
  1125  	// ResourceKind: Optional. Kind of a Kubernetes resource, must be in
  1126  	// UpperCamelCase (PascalCase) and singular form. E.g.
  1127  	// "CustomResourceDefinition", "StorageClass", etc.
  1128  	ResourceKind string `json:"resourceKind,omitempty"`
  1129  	// ForceSendFields is a list of field names (e.g. "ResourceGroup") to
  1130  	// unconditionally include in API requests. By default, fields with empty or
  1131  	// default values are omitted from API requests. See
  1132  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1133  	// details.
  1134  	ForceSendFields []string `json:"-"`
  1135  	// NullFields is a list of field names (e.g. "ResourceGroup") to include in API
  1136  	// requests with the JSON null value. By default, fields with empty values are
  1137  	// omitted from API requests. See
  1138  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1139  	NullFields []string `json:"-"`
  1140  }
  1141  
  1142  func (s *GroupKind) MarshalJSON() ([]byte, error) {
  1143  	type NoMethod GroupKind
  1144  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1145  }
  1146  
  1147  // ListBackupPlansResponse: Response message for ListBackupPlans.
  1148  type ListBackupPlansResponse struct {
  1149  	// BackupPlans: The list of BackupPlans matching the given criteria.
  1150  	BackupPlans []*BackupPlan `json:"backupPlans,omitempty"`
  1151  	// NextPageToken: A token which may be sent as page_token in a subsequent
  1152  	// `ListBackupPlans` call to retrieve the next page of results. If this field
  1153  	// is omitted or empty, then there are no more results to return.
  1154  	NextPageToken string `json:"nextPageToken,omitempty"`
  1155  	// Unreachable: Locations that could not be reached.
  1156  	Unreachable []string `json:"unreachable,omitempty"`
  1157  
  1158  	// ServerResponse contains the HTTP response code and headers from the server.
  1159  	googleapi.ServerResponse `json:"-"`
  1160  	// ForceSendFields is a list of field names (e.g. "BackupPlans") to
  1161  	// unconditionally include in API requests. By default, fields with empty or
  1162  	// default values are omitted from API requests. See
  1163  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1164  	// details.
  1165  	ForceSendFields []string `json:"-"`
  1166  	// NullFields is a list of field names (e.g. "BackupPlans") to include in API
  1167  	// requests with the JSON null value. By default, fields with empty values are
  1168  	// omitted from API requests. See
  1169  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1170  	NullFields []string `json:"-"`
  1171  }
  1172  
  1173  func (s *ListBackupPlansResponse) MarshalJSON() ([]byte, error) {
  1174  	type NoMethod ListBackupPlansResponse
  1175  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1176  }
  1177  
  1178  // ListBackupsResponse: Response message for ListBackups.
  1179  type ListBackupsResponse struct {
  1180  	// Backups: The list of Backups matching the given criteria.
  1181  	Backups []*Backup `json:"backups,omitempty"`
  1182  	// NextPageToken: A token which may be sent as page_token in a subsequent
  1183  	// `ListBackups` call to retrieve the next page of results. If this field is
  1184  	// omitted or empty, then there are no more results to return.
  1185  	NextPageToken string `json:"nextPageToken,omitempty"`
  1186  
  1187  	// ServerResponse contains the HTTP response code and headers from the server.
  1188  	googleapi.ServerResponse `json:"-"`
  1189  	// ForceSendFields is a list of field names (e.g. "Backups") to unconditionally
  1190  	// include in API requests. By default, fields with empty or default values are
  1191  	// omitted from API requests. See
  1192  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1193  	// details.
  1194  	ForceSendFields []string `json:"-"`
  1195  	// NullFields is a list of field names (e.g. "Backups") to include in API
  1196  	// requests with the JSON null value. By default, fields with empty values are
  1197  	// omitted from API requests. See
  1198  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1199  	NullFields []string `json:"-"`
  1200  }
  1201  
  1202  func (s *ListBackupsResponse) MarshalJSON() ([]byte, error) {
  1203  	type NoMethod ListBackupsResponse
  1204  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1205  }
  1206  
  1207  // ListLocationsResponse: The response message for Locations.ListLocations.
  1208  type ListLocationsResponse struct {
  1209  	// Locations: A list of locations that matches the specified filter in the
  1210  	// request.
  1211  	Locations []*Location `json:"locations,omitempty"`
  1212  	// NextPageToken: The standard List next-page token.
  1213  	NextPageToken string `json:"nextPageToken,omitempty"`
  1214  
  1215  	// ServerResponse contains the HTTP response code and headers from the server.
  1216  	googleapi.ServerResponse `json:"-"`
  1217  	// ForceSendFields is a list of field names (e.g. "Locations") 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. "Locations") 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 *ListLocationsResponse) MarshalJSON() ([]byte, error) {
  1231  	type NoMethod ListLocationsResponse
  1232  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1233  }
  1234  
  1235  // ListRestorePlansResponse: Response message for ListRestorePlans.
  1236  type ListRestorePlansResponse struct {
  1237  	// NextPageToken: A token which may be sent as page_token in a subsequent
  1238  	// `ListRestorePlans` call to retrieve the next page of results. If this field
  1239  	// is omitted or empty, then there are no more results to return.
  1240  	NextPageToken string `json:"nextPageToken,omitempty"`
  1241  	// RestorePlans: The list of RestorePlans matching the given criteria.
  1242  	RestorePlans []*RestorePlan `json:"restorePlans,omitempty"`
  1243  	// Unreachable: Locations that could not be reached.
  1244  	Unreachable []string `json:"unreachable,omitempty"`
  1245  
  1246  	// ServerResponse contains the HTTP response code and headers from the server.
  1247  	googleapi.ServerResponse `json:"-"`
  1248  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1249  	// unconditionally include in API requests. By default, fields with empty or
  1250  	// default values are omitted from API requests. See
  1251  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1252  	// details.
  1253  	ForceSendFields []string `json:"-"`
  1254  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1255  	// requests with the JSON null value. By default, fields with empty values are
  1256  	// omitted from API requests. See
  1257  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1258  	NullFields []string `json:"-"`
  1259  }
  1260  
  1261  func (s *ListRestorePlansResponse) MarshalJSON() ([]byte, error) {
  1262  	type NoMethod ListRestorePlansResponse
  1263  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1264  }
  1265  
  1266  // ListRestoresResponse: Response message for ListRestores.
  1267  type ListRestoresResponse struct {
  1268  	// NextPageToken: A token which may be sent as page_token in a subsequent
  1269  	// `ListRestores` call to retrieve the next page of results. If this field is
  1270  	// omitted or empty, then there are no more results to return.
  1271  	NextPageToken string `json:"nextPageToken,omitempty"`
  1272  	// Restores: The list of Restores matching the given criteria.
  1273  	Restores []*Restore `json:"restores,omitempty"`
  1274  	// Unreachable: Locations that could not be reached.
  1275  	Unreachable []string `json:"unreachable,omitempty"`
  1276  
  1277  	// ServerResponse contains the HTTP response code and headers from the server.
  1278  	googleapi.ServerResponse `json:"-"`
  1279  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1280  	// unconditionally include in API requests. By default, fields with empty or
  1281  	// default values are omitted from API requests. See
  1282  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1283  	// details.
  1284  	ForceSendFields []string `json:"-"`
  1285  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1286  	// requests with the JSON null value. By default, fields with empty values are
  1287  	// omitted from API requests. See
  1288  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1289  	NullFields []string `json:"-"`
  1290  }
  1291  
  1292  func (s *ListRestoresResponse) MarshalJSON() ([]byte, error) {
  1293  	type NoMethod ListRestoresResponse
  1294  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1295  }
  1296  
  1297  // ListVolumeBackupsResponse: Response message for ListVolumeBackups.
  1298  type ListVolumeBackupsResponse struct {
  1299  	// NextPageToken: A token which may be sent as page_token in a subsequent
  1300  	// `ListVolumeBackups` call to retrieve the next page of results. If this field
  1301  	// is omitted or empty, then there are no more results to return.
  1302  	NextPageToken string `json:"nextPageToken,omitempty"`
  1303  	// VolumeBackups: The list of VolumeBackups matching the given criteria.
  1304  	VolumeBackups []*VolumeBackup `json:"volumeBackups,omitempty"`
  1305  
  1306  	// ServerResponse contains the HTTP response code and headers from the server.
  1307  	googleapi.ServerResponse `json:"-"`
  1308  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1309  	// unconditionally include in API requests. By default, fields with empty or
  1310  	// default values are omitted from API requests. See
  1311  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1312  	// details.
  1313  	ForceSendFields []string `json:"-"`
  1314  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1315  	// requests with the JSON null value. By default, fields with empty values are
  1316  	// omitted from API requests. See
  1317  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1318  	NullFields []string `json:"-"`
  1319  }
  1320  
  1321  func (s *ListVolumeBackupsResponse) MarshalJSON() ([]byte, error) {
  1322  	type NoMethod ListVolumeBackupsResponse
  1323  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1324  }
  1325  
  1326  // ListVolumeRestoresResponse: Response message for ListVolumeRestores.
  1327  type ListVolumeRestoresResponse struct {
  1328  	// NextPageToken: A token which may be sent as page_token in a subsequent
  1329  	// `ListVolumeRestores` call to retrieve the next page of results. If this
  1330  	// field is omitted or empty, then there are no more results to return.
  1331  	NextPageToken string `json:"nextPageToken,omitempty"`
  1332  	// VolumeRestores: The list of VolumeRestores matching the given criteria.
  1333  	VolumeRestores []*VolumeRestore `json:"volumeRestores,omitempty"`
  1334  
  1335  	// ServerResponse contains the HTTP response code and headers from the server.
  1336  	googleapi.ServerResponse `json:"-"`
  1337  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1338  	// unconditionally include in API requests. By default, fields with empty or
  1339  	// default values are omitted from API requests. See
  1340  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1341  	// details.
  1342  	ForceSendFields []string `json:"-"`
  1343  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1344  	// requests with the JSON null value. By default, fields with empty values are
  1345  	// omitted from API requests. See
  1346  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1347  	NullFields []string `json:"-"`
  1348  }
  1349  
  1350  func (s *ListVolumeRestoresResponse) MarshalJSON() ([]byte, error) {
  1351  	type NoMethod ListVolumeRestoresResponse
  1352  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1353  }
  1354  
  1355  // Location: A resource that represents a Google Cloud location.
  1356  type Location struct {
  1357  	// DisplayName: The friendly name for this location, typically a nearby city
  1358  	// name. For example, "Tokyo".
  1359  	DisplayName string `json:"displayName,omitempty"`
  1360  	// Labels: Cross-service attributes for the location. For example
  1361  	// {"cloud.googleapis.com/region": "us-east1"}
  1362  	Labels map[string]string `json:"labels,omitempty"`
  1363  	// LocationId: The canonical id for this location. For example: "us-east1".
  1364  	LocationId string `json:"locationId,omitempty"`
  1365  	// Metadata: Service-specific metadata. For example the available capacity at
  1366  	// the given location.
  1367  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  1368  	// Name: Resource name for the location, which may vary between
  1369  	// implementations. For example:
  1370  	// "projects/example-project/locations/us-east1"
  1371  	Name string `json:"name,omitempty"`
  1372  
  1373  	// ServerResponse contains the HTTP response code and headers from the server.
  1374  	googleapi.ServerResponse `json:"-"`
  1375  	// ForceSendFields is a list of field names (e.g. "DisplayName") to
  1376  	// unconditionally include in API requests. By default, fields with empty or
  1377  	// default values are omitted from API requests. See
  1378  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1379  	// details.
  1380  	ForceSendFields []string `json:"-"`
  1381  	// NullFields is a list of field names (e.g. "DisplayName") to include in API
  1382  	// requests with the JSON null value. By default, fields with empty values are
  1383  	// omitted from API requests. See
  1384  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1385  	NullFields []string `json:"-"`
  1386  }
  1387  
  1388  func (s *Location) MarshalJSON() ([]byte, error) {
  1389  	type NoMethod Location
  1390  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1391  }
  1392  
  1393  // NamespacedName: A reference to a namespaced resource in Kubernetes.
  1394  type NamespacedName struct {
  1395  	// Name: Optional. The name of the Kubernetes resource.
  1396  	Name string `json:"name,omitempty"`
  1397  	// Namespace: Optional. The Namespace of the Kubernetes resource.
  1398  	Namespace string `json:"namespace,omitempty"`
  1399  	// ForceSendFields is a list of field names (e.g. "Name") to unconditionally
  1400  	// include in API requests. By default, fields with empty or default values are
  1401  	// omitted from API requests. See
  1402  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1403  	// details.
  1404  	ForceSendFields []string `json:"-"`
  1405  	// NullFields is a list of field names (e.g. "Name") to include in API requests
  1406  	// with the JSON null value. By default, fields with empty values are omitted
  1407  	// from API requests. See
  1408  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1409  	NullFields []string `json:"-"`
  1410  }
  1411  
  1412  func (s *NamespacedName) MarshalJSON() ([]byte, error) {
  1413  	type NoMethod NamespacedName
  1414  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1415  }
  1416  
  1417  // NamespacedNames: A list of namespaced Kubernetes resources.
  1418  type NamespacedNames struct {
  1419  	// NamespacedNames: Optional. A list of namespaced Kubernetes resources.
  1420  	NamespacedNames []*NamespacedName `json:"namespacedNames,omitempty"`
  1421  	// ForceSendFields is a list of field names (e.g. "NamespacedNames") to
  1422  	// unconditionally include in API requests. By default, fields with empty or
  1423  	// default values are omitted from API requests. See
  1424  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1425  	// details.
  1426  	ForceSendFields []string `json:"-"`
  1427  	// NullFields is a list of field names (e.g. "NamespacedNames") to include in
  1428  	// API requests with the JSON null value. By default, fields with empty values
  1429  	// are omitted from API requests. See
  1430  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1431  	NullFields []string `json:"-"`
  1432  }
  1433  
  1434  func (s *NamespacedNames) MarshalJSON() ([]byte, error) {
  1435  	type NoMethod NamespacedNames
  1436  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1437  }
  1438  
  1439  // Namespaces: A list of Kubernetes Namespaces
  1440  type Namespaces struct {
  1441  	// Namespaces: Optional. A list of Kubernetes Namespaces
  1442  	Namespaces []string `json:"namespaces,omitempty"`
  1443  	// ForceSendFields is a list of field names (e.g. "Namespaces") to
  1444  	// unconditionally include in API requests. By default, fields with empty or
  1445  	// default values are omitted from API requests. See
  1446  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1447  	// details.
  1448  	ForceSendFields []string `json:"-"`
  1449  	// NullFields is a list of field names (e.g. "Namespaces") to include in API
  1450  	// requests with the JSON null value. By default, fields with empty values are
  1451  	// omitted from API requests. See
  1452  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1453  	NullFields []string `json:"-"`
  1454  }
  1455  
  1456  func (s *Namespaces) MarshalJSON() ([]byte, error) {
  1457  	type NoMethod Namespaces
  1458  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1459  }
  1460  
  1461  // OperationMetadata: Represents the metadata of the long-running operation.
  1462  type OperationMetadata struct {
  1463  	// ApiVersion: Output only. API version used to start the operation.
  1464  	ApiVersion string `json:"apiVersion,omitempty"`
  1465  	// CreateTime: Output only. The time the operation was created.
  1466  	CreateTime string `json:"createTime,omitempty"`
  1467  	// EndTime: Output only. The time the operation finished running.
  1468  	EndTime string `json:"endTime,omitempty"`
  1469  	// RequestedCancellation: Output only. Identifies whether the user has
  1470  	// requested cancellation of the operation. Operations that have successfully
  1471  	// been cancelled have Operation.error value with a google.rpc.Status.code of
  1472  	// 1, corresponding to `Code.CANCELLED`.
  1473  	RequestedCancellation bool `json:"requestedCancellation,omitempty"`
  1474  	// StatusMessage: Output only. Human-readable status of the operation, if any.
  1475  	StatusMessage string `json:"statusMessage,omitempty"`
  1476  	// Target: Output only. Server-defined resource path for the target of the
  1477  	// operation.
  1478  	Target string `json:"target,omitempty"`
  1479  	// Verb: Output only. Name of the verb executed by the operation.
  1480  	Verb string `json:"verb,omitempty"`
  1481  	// ForceSendFields is a list of field names (e.g. "ApiVersion") to
  1482  	// unconditionally include in API requests. By default, fields with empty or
  1483  	// default values are omitted from API requests. See
  1484  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1485  	// details.
  1486  	ForceSendFields []string `json:"-"`
  1487  	// NullFields is a list of field names (e.g. "ApiVersion") to include in API
  1488  	// requests with the JSON null value. By default, fields with empty values are
  1489  	// omitted from API requests. See
  1490  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1491  	NullFields []string `json:"-"`
  1492  }
  1493  
  1494  func (s *OperationMetadata) MarshalJSON() ([]byte, error) {
  1495  	type NoMethod OperationMetadata
  1496  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1497  }
  1498  
  1499  // Policy: An Identity and Access Management (IAM) policy, which specifies
  1500  // access controls for Google Cloud resources. A `Policy` is a collection of
  1501  // `bindings`. A `binding` binds one or more `members`, or principals, to a
  1502  // single `role`. Principals can be user accounts, service accounts, Google
  1503  // groups, and domains (such as G Suite). A `role` is a named list of
  1504  // permissions; each `role` can be an IAM predefined role or a user-created
  1505  // custom role. For some types of Google Cloud resources, a `binding` can also
  1506  // specify a `condition`, which is a logical expression that allows access to a
  1507  // resource only if the expression evaluates to `true`. A condition can add
  1508  // constraints based on attributes of the request, the resource, or both. To
  1509  // learn which resources support conditions in their IAM policies, see the IAM
  1510  // documentation
  1511  // (https://cloud.google.com/iam/help/conditions/resource-policies). **JSON
  1512  // example:** ``` { "bindings": [ { "role":
  1513  // "roles/resourcemanager.organizationAdmin", "members": [
  1514  // "user:mike@example.com", "group:admins@example.com", "domain:google.com",
  1515  // "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role":
  1516  // "roles/resourcemanager.organizationViewer", "members": [
  1517  // "user:eve@example.com" ], "condition": { "title": "expirable access",
  1518  // "description": "Does not grant access after Sep 2020", "expression":
  1519  // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag":
  1520  // "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: -
  1521  // members: - user:mike@example.com - group:admins@example.com -
  1522  // domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com
  1523  // role: roles/resourcemanager.organizationAdmin - members: -
  1524  // user:eve@example.com role: roles/resourcemanager.organizationViewer
  1525  // condition: title: expirable access description: Does not grant access after
  1526  // Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
  1527  // etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features,
  1528  // see the IAM documentation (https://cloud.google.com/iam/docs/).
  1529  type Policy struct {
  1530  	// AuditConfigs: Specifies cloud audit logging configuration for this policy.
  1531  	AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"`
  1532  	// Bindings: Associates a list of `members`, or principals, with a `role`.
  1533  	// Optionally, may specify a `condition` that determines how and when the
  1534  	// `bindings` are applied. Each of the `bindings` must contain at least one
  1535  	// principal. The `bindings` in a `Policy` can refer to up to 1,500 principals;
  1536  	// up to 250 of these principals can be Google groups. Each occurrence of a
  1537  	// principal counts towards these limits. For example, if the `bindings` grant
  1538  	// 50 different roles to `user:alice@example.com`, and not to any other
  1539  	// principal, then you can add another 1,450 principals to the `bindings` in
  1540  	// the `Policy`.
  1541  	Bindings []*Binding `json:"bindings,omitempty"`
  1542  	// Etag: `etag` is used for optimistic concurrency control as a way to help
  1543  	// prevent simultaneous updates of a policy from overwriting each other. It is
  1544  	// strongly suggested that systems make use of the `etag` in the
  1545  	// read-modify-write cycle to perform policy updates in order to avoid race
  1546  	// conditions: An `etag` is returned in the response to `getIamPolicy`, and
  1547  	// systems are expected to put that etag in the request to `setIamPolicy` to
  1548  	// ensure that their change will be applied to the same version of the policy.
  1549  	// **Important:** If you use IAM Conditions, you must include the `etag` field
  1550  	// whenever you call `setIamPolicy`. If you omit this field, then IAM allows
  1551  	// you to overwrite a version `3` policy with a version `1` policy, and all of
  1552  	// the conditions in the version `3` policy are lost.
  1553  	Etag string `json:"etag,omitempty"`
  1554  	// Version: Specifies the format of the policy. Valid values are `0`, `1`, and
  1555  	// `3`. Requests that specify an invalid value are rejected. Any operation that
  1556  	// affects conditional role bindings must specify version `3`. This requirement
  1557  	// applies to the following operations: * Getting a policy that includes a
  1558  	// conditional role binding * Adding a conditional role binding to a policy *
  1559  	// Changing a conditional role binding in a policy * Removing any role binding,
  1560  	// with or without a condition, from a policy that includes conditions
  1561  	// **Important:** If you use IAM Conditions, you must include the `etag` field
  1562  	// whenever you call `setIamPolicy`. If you omit this field, then IAM allows
  1563  	// you to overwrite a version `3` policy with a version `1` policy, and all of
  1564  	// the conditions in the version `3` policy are lost. If a policy does not
  1565  	// include any conditions, operations on that policy may specify any valid
  1566  	// version or leave the field unset. To learn which resources support
  1567  	// conditions in their IAM policies, see the IAM documentation
  1568  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
  1569  	Version int64 `json:"version,omitempty"`
  1570  
  1571  	// ServerResponse contains the HTTP response code and headers from the server.
  1572  	googleapi.ServerResponse `json:"-"`
  1573  	// ForceSendFields is a list of field names (e.g. "AuditConfigs") to
  1574  	// unconditionally include in API requests. By default, fields with empty or
  1575  	// default values are omitted from API requests. See
  1576  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1577  	// details.
  1578  	ForceSendFields []string `json:"-"`
  1579  	// NullFields is a list of field names (e.g. "AuditConfigs") to include in API
  1580  	// requests with the JSON null value. By default, fields with empty values are
  1581  	// omitted from API requests. See
  1582  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1583  	NullFields []string `json:"-"`
  1584  }
  1585  
  1586  func (s *Policy) MarshalJSON() ([]byte, error) {
  1587  	type NoMethod Policy
  1588  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1589  }
  1590  
  1591  // ResourceFilter: ResourceFilter specifies matching criteria to limit the
  1592  // scope of a change to a specific set of kubernetes resources that are
  1593  // selected for restoration from a backup.
  1594  type ResourceFilter struct {
  1595  	// GroupKinds: Optional. (Filtering parameter) Any resource subject to
  1596  	// transformation must belong to one of the listed "types". If this field is
  1597  	// not provided, no type filtering will be performed (all resources of all
  1598  	// types matching previous filtering parameters will be candidates for
  1599  	// transformation).
  1600  	GroupKinds []*GroupKind `json:"groupKinds,omitempty"`
  1601  	// JsonPath: Optional. This is a [JSONPath]
  1602  	// (https://github.com/json-path/JsonPath/blob/master/README.md) expression
  1603  	// that matches specific fields of candidate resources and it operates as a
  1604  	// filtering parameter (resources that are not matched with this expression
  1605  	// will not be candidates for transformation).
  1606  	JsonPath string `json:"jsonPath,omitempty"`
  1607  	// Namespaces: Optional. (Filtering parameter) Any resource subject to
  1608  	// transformation must be contained within one of the listed Kubernetes
  1609  	// Namespace in the Backup. If this field is not provided, no namespace
  1610  	// filtering will be performed (all resources in all Namespaces, including all
  1611  	// cluster-scoped resources, will be candidates for transformation).
  1612  	Namespaces []string `json:"namespaces,omitempty"`
  1613  	// ForceSendFields is a list of field names (e.g. "GroupKinds") to
  1614  	// unconditionally include in API requests. By default, fields with empty or
  1615  	// default values are omitted from API requests. See
  1616  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1617  	// details.
  1618  	ForceSendFields []string `json:"-"`
  1619  	// NullFields is a list of field names (e.g. "GroupKinds") to include in API
  1620  	// requests with the JSON null value. By default, fields with empty values are
  1621  	// omitted from API requests. See
  1622  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1623  	NullFields []string `json:"-"`
  1624  }
  1625  
  1626  func (s *ResourceFilter) MarshalJSON() ([]byte, error) {
  1627  	type NoMethod ResourceFilter
  1628  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1629  }
  1630  
  1631  // Restore: Represents both a request to Restore some portion of a Backup into
  1632  // a target GKE cluster and a record of the restore operation itself.
  1633  type Restore struct {
  1634  	// Backup: Required. Immutable. A reference to the Backup used as the source
  1635  	// from which this Restore will restore. Note that this Backup must be a
  1636  	// sub-resource of the RestorePlan's backup_plan. Format:
  1637  	// `projects/*/locations/*/backupPlans/*/backups/*`.
  1638  	Backup string `json:"backup,omitempty"`
  1639  	// Cluster: Output only. The target cluster into which this Restore will
  1640  	// restore data. Valid formats: - `projects/*/locations/*/clusters/*` -
  1641  	// `projects/*/zones/*/clusters/*` Inherited from parent RestorePlan's cluster
  1642  	// value.
  1643  	Cluster string `json:"cluster,omitempty"`
  1644  	// CompleteTime: Output only. Timestamp of when the restore operation
  1645  	// completed.
  1646  	CompleteTime string `json:"completeTime,omitempty"`
  1647  	// CreateTime: Output only. The timestamp when this Restore resource was
  1648  	// created.
  1649  	CreateTime string `json:"createTime,omitempty"`
  1650  	// Description: User specified descriptive string for this Restore.
  1651  	Description string `json:"description,omitempty"`
  1652  	// Etag: Output only. `etag` is used for optimistic concurrency control as a
  1653  	// way to help prevent simultaneous updates of a restore from overwriting each
  1654  	// other. It is strongly suggested that systems make use of the `etag` in the
  1655  	// read-modify-write cycle to perform restore updates in order to avoid race
  1656  	// conditions: An `etag` is returned in the response to `GetRestore`, and
  1657  	// systems are expected to put that etag in the request to `UpdateRestore` or
  1658  	// `DeleteRestore` to ensure that their change will be applied to the same
  1659  	// version of the resource.
  1660  	Etag string `json:"etag,omitempty"`
  1661  	// Labels: A set of custom labels supplied by user.
  1662  	Labels map[string]string `json:"labels,omitempty"`
  1663  	// Name: Output only. The full name of the Restore resource. Format:
  1664  	// `projects/*/locations/*/restorePlans/*/restores/*`
  1665  	Name string `json:"name,omitempty"`
  1666  	// ResourcesExcludedCount: Output only. Number of resources excluded during the
  1667  	// restore execution.
  1668  	ResourcesExcludedCount int64 `json:"resourcesExcludedCount,omitempty"`
  1669  	// ResourcesFailedCount: Output only. Number of resources that failed to be
  1670  	// restored during the restore execution.
  1671  	ResourcesFailedCount int64 `json:"resourcesFailedCount,omitempty"`
  1672  	// ResourcesRestoredCount: Output only. Number of resources restored during the
  1673  	// restore execution.
  1674  	ResourcesRestoredCount int64 `json:"resourcesRestoredCount,omitempty"`
  1675  	// RestoreConfig: Output only. Configuration of the Restore. Inherited from
  1676  	// parent RestorePlan's restore_config.
  1677  	RestoreConfig *RestoreConfig `json:"restoreConfig,omitempty"`
  1678  	// State: Output only. The current state of the Restore.
  1679  	//
  1680  	// Possible values:
  1681  	//   "STATE_UNSPECIFIED" - The Restore resource is in the process of being
  1682  	// created.
  1683  	//   "CREATING" - The Restore resource has been created and the associated
  1684  	// RestoreJob Kubernetes resource has been injected into target cluster.
  1685  	//   "IN_PROGRESS" - The gkebackup agent in the cluster has begun executing the
  1686  	// restore operation.
  1687  	//   "SUCCEEDED" - The restore operation has completed successfully. Restored
  1688  	// workloads may not yet be operational.
  1689  	//   "FAILED" - The restore operation has failed.
  1690  	//   "DELETING" - This Restore resource is in the process of being deleted.
  1691  	State string `json:"state,omitempty"`
  1692  	// StateReason: Output only. Human-readable description of why the Restore is
  1693  	// in its current state.
  1694  	StateReason string `json:"stateReason,omitempty"`
  1695  	// Uid: Output only. Server generated global unique identifier of UUID
  1696  	// (https://en.wikipedia.org/wiki/Universally_unique_identifier) format.
  1697  	Uid string `json:"uid,omitempty"`
  1698  	// UpdateTime: Output only. The timestamp when this Restore resource was last
  1699  	// updated.
  1700  	UpdateTime string `json:"updateTime,omitempty"`
  1701  	// VolumesRestoredCount: Output only. Number of volumes restored during the
  1702  	// restore execution.
  1703  	VolumesRestoredCount int64 `json:"volumesRestoredCount,omitempty"`
  1704  
  1705  	// ServerResponse contains the HTTP response code and headers from the server.
  1706  	googleapi.ServerResponse `json:"-"`
  1707  	// ForceSendFields is a list of field names (e.g. "Backup") to unconditionally
  1708  	// include in API requests. By default, fields with empty or default values are
  1709  	// omitted from API requests. See
  1710  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1711  	// details.
  1712  	ForceSendFields []string `json:"-"`
  1713  	// NullFields is a list of field names (e.g. "Backup") to include in API
  1714  	// requests with the JSON null value. By default, fields with empty values are
  1715  	// omitted from API requests. See
  1716  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1717  	NullFields []string `json:"-"`
  1718  }
  1719  
  1720  func (s *Restore) MarshalJSON() ([]byte, error) {
  1721  	type NoMethod Restore
  1722  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1723  }
  1724  
  1725  // RestoreConfig: Configuration of a restore.
  1726  type RestoreConfig struct {
  1727  	// AllNamespaces: Restore all namespaced resources in the Backup if set to
  1728  	// "True". Specifying this field to "False" is an error.
  1729  	AllNamespaces bool `json:"allNamespaces,omitempty"`
  1730  	// ClusterResourceConflictPolicy: Optional. Defines the behavior for handling
  1731  	// the situation where cluster-scoped resources being restored already exist in
  1732  	// the target cluster. This MUST be set to a value other than
  1733  	// CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED if
  1734  	// cluster_resource_restore_scope is not empty.
  1735  	//
  1736  	// Possible values:
  1737  	//   "CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED" - Unspecified. Only allowed
  1738  	// if no cluster-scoped resources will be restored.
  1739  	//   "USE_EXISTING_VERSION" - Do not attempt to restore the conflicting
  1740  	// resource.
  1741  	//   "USE_BACKUP_VERSION" - Delete the existing version before re-creating it
  1742  	// from the Backup. This is a dangerous option which could cause unintentional
  1743  	// data loss if used inappropriately. For example, deleting a CRD will cause
  1744  	// Kubernetes to delete all CRs of that type.
  1745  	ClusterResourceConflictPolicy string `json:"clusterResourceConflictPolicy,omitempty"`
  1746  	// ClusterResourceRestoreScope: Optional. Identifies the cluster-scoped
  1747  	// resources to restore from the Backup. Not specifying it means NO cluster
  1748  	// resource will be restored.
  1749  	ClusterResourceRestoreScope *ClusterResourceRestoreScope `json:"clusterResourceRestoreScope,omitempty"`
  1750  	// ExcludedNamespaces: A list of selected namespaces excluded from restoration.
  1751  	// All namespaces except those in this list will be restored.
  1752  	ExcludedNamespaces *Namespaces `json:"excludedNamespaces,omitempty"`
  1753  	// NamespacedResourceRestoreMode: Optional. Defines the behavior for handling
  1754  	// the situation where sets of namespaced resources being restored already
  1755  	// exist in the target cluster. This MUST be set to a value other than
  1756  	// NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED.
  1757  	//
  1758  	// Possible values:
  1759  	//   "NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED" - Unspecified (invalid).
  1760  	//   "DELETE_AND_RESTORE" - When conflicting top-level resources (either
  1761  	// Namespaces or ProtectedApplications, depending upon the scope) are
  1762  	// encountered, this will first trigger a delete of the conflicting resource
  1763  	// AND ALL OF ITS REFERENCED RESOURCES (e.g., all resources in the Namespace or
  1764  	// all resources referenced by the ProtectedApplication) before restoring the
  1765  	// resources from the Backup. This mode should only be used when you are
  1766  	// intending to revert some portion of a cluster to an earlier state.
  1767  	//   "FAIL_ON_CONFLICT" - If conflicting top-level resources (either Namespaces
  1768  	// or ProtectedApplications, depending upon the scope) are encountered at the
  1769  	// beginning of a restore process, the Restore will fail. If a conflict occurs
  1770  	// during the restore process itself (e.g., because an out of band process
  1771  	// creates conflicting resources), a conflict will be reported.
  1772  	NamespacedResourceRestoreMode string `json:"namespacedResourceRestoreMode,omitempty"`
  1773  	// NoNamespaces: Do not restore any namespaced resources if set to "True".
  1774  	// Specifying this field to "False" is not allowed.
  1775  	NoNamespaces bool `json:"noNamespaces,omitempty"`
  1776  	// SelectedApplications: A list of selected ProtectedApplications to restore.
  1777  	// The listed ProtectedApplications and all the resources to which they refer
  1778  	// will be restored.
  1779  	SelectedApplications *NamespacedNames `json:"selectedApplications,omitempty"`
  1780  	// SelectedNamespaces: A list of selected Namespaces to restore from the
  1781  	// Backup. The listed Namespaces and all resources contained in them will be
  1782  	// restored.
  1783  	SelectedNamespaces *Namespaces `json:"selectedNamespaces,omitempty"`
  1784  	// SubstitutionRules: Optional. A list of transformation rules to be applied
  1785  	// against Kubernetes resources as they are selected for restoration from a
  1786  	// Backup. Rules are executed in order defined - this order matters, as changes
  1787  	// made by a rule may impact the filtering logic of subsequent rules. An empty
  1788  	// list means no substitution will occur.
  1789  	SubstitutionRules []*SubstitutionRule `json:"substitutionRules,omitempty"`
  1790  	// TransformationRules: Optional. A list of transformation rules to be applied
  1791  	// against Kubernetes resources as they are selected for restoration from a
  1792  	// Backup. Rules are executed in order defined - this order matters, as changes
  1793  	// made by a rule may impact the filtering logic of subsequent rules. An empty
  1794  	// list means no transformation will occur.
  1795  	TransformationRules []*TransformationRule `json:"transformationRules,omitempty"`
  1796  	// VolumeDataRestorePolicy: Optional. Specifies the mechanism to be used to
  1797  	// restore volume data. Default: VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED (will
  1798  	// be treated as NO_VOLUME_DATA_RESTORATION).
  1799  	//
  1800  	// Possible values:
  1801  	//   "VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED" - Unspecified (illegal).
  1802  	//   "RESTORE_VOLUME_DATA_FROM_BACKUP" - For each PVC to be restored, create a
  1803  	// new underlying volume and PV from the corresponding VolumeBackup contained
  1804  	// within the Backup.
  1805  	//   "REUSE_VOLUME_HANDLE_FROM_BACKUP" - For each PVC to be restored, attempt
  1806  	// to reuse the original PV contained in the Backup (with its original
  1807  	// underlying volume). This option is likely only usable when restoring a
  1808  	// workload to its original cluster.
  1809  	//   "NO_VOLUME_DATA_RESTORATION" - For each PVC to be restored, create PVC
  1810  	// without any particular action to restore data. In this case, the normal
  1811  	// Kubernetes provisioning logic would kick in, and this would likely result in
  1812  	// either dynamically provisioning blank PVs or binding to statically
  1813  	// provisioned PVs.
  1814  	VolumeDataRestorePolicy string `json:"volumeDataRestorePolicy,omitempty"`
  1815  	// ForceSendFields is a list of field names (e.g. "AllNamespaces") to
  1816  	// unconditionally include in API requests. By default, fields with empty or
  1817  	// default values are omitted from API requests. See
  1818  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1819  	// details.
  1820  	ForceSendFields []string `json:"-"`
  1821  	// NullFields is a list of field names (e.g. "AllNamespaces") to include in API
  1822  	// requests with the JSON null value. By default, fields with empty values are
  1823  	// omitted from API requests. See
  1824  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1825  	NullFields []string `json:"-"`
  1826  }
  1827  
  1828  func (s *RestoreConfig) MarshalJSON() ([]byte, error) {
  1829  	type NoMethod RestoreConfig
  1830  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1831  }
  1832  
  1833  // RestorePlan: The configuration of a potential series of Restore operations
  1834  // to be performed against Backups belong to a particular BackupPlan.
  1835  type RestorePlan struct {
  1836  	// BackupPlan: Required. Immutable. A reference to the BackupPlan from which
  1837  	// Backups may be used as the source for Restores created via this RestorePlan.
  1838  	// Format: `projects/*/locations/*/backupPlans/*`.
  1839  	BackupPlan string `json:"backupPlan,omitempty"`
  1840  	// Cluster: Required. Immutable. The target cluster into which Restores created
  1841  	// via this RestorePlan will restore data. NOTE: the cluster's region must be
  1842  	// the same as the RestorePlan. Valid formats: -
  1843  	// `projects/*/locations/*/clusters/*` - `projects/*/zones/*/clusters/*`
  1844  	Cluster string `json:"cluster,omitempty"`
  1845  	// CreateTime: Output only. The timestamp when this RestorePlan resource was
  1846  	// created.
  1847  	CreateTime string `json:"createTime,omitempty"`
  1848  	// Description: Optional. User specified descriptive string for this
  1849  	// RestorePlan.
  1850  	Description string `json:"description,omitempty"`
  1851  	// Etag: Output only. `etag` is used for optimistic concurrency control as a
  1852  	// way to help prevent simultaneous updates of a restore from overwriting each
  1853  	// other. It is strongly suggested that systems make use of the `etag` in the
  1854  	// read-modify-write cycle to perform restore updates in order to avoid race
  1855  	// conditions: An `etag` is returned in the response to `GetRestorePlan`, and
  1856  	// systems are expected to put that etag in the request to `UpdateRestorePlan`
  1857  	// or `DeleteRestorePlan` to ensure that their change will be applied to the
  1858  	// same version of the resource.
  1859  	Etag string `json:"etag,omitempty"`
  1860  	// Labels: Optional. A set of custom labels supplied by user.
  1861  	Labels map[string]string `json:"labels,omitempty"`
  1862  	// Name: Output only. The full name of the RestorePlan resource. Format:
  1863  	// `projects/*/locations/*/restorePlans/*`.
  1864  	Name string `json:"name,omitempty"`
  1865  	// RestoreConfig: Required. Configuration of Restores created via this
  1866  	// RestorePlan.
  1867  	RestoreConfig *RestoreConfig `json:"restoreConfig,omitempty"`
  1868  	// State: Output only. State of the RestorePlan. This State field reflects the
  1869  	// various stages a RestorePlan can be in during the Create operation.
  1870  	//
  1871  	// Possible values:
  1872  	//   "STATE_UNSPECIFIED" - Default first value for Enums.
  1873  	//   "CLUSTER_PENDING" - Waiting for cluster state to be RUNNING.
  1874  	//   "READY" - The RestorePlan has successfully been created and is ready for
  1875  	// Restores.
  1876  	//   "FAILED" - RestorePlan creation has failed.
  1877  	//   "DELETING" - The RestorePlan is in the process of being deleted.
  1878  	State string `json:"state,omitempty"`
  1879  	// StateReason: Output only. Human-readable description of why RestorePlan is
  1880  	// in the current `state`
  1881  	StateReason string `json:"stateReason,omitempty"`
  1882  	// Uid: Output only. Server generated global unique identifier of UUID
  1883  	// (https://en.wikipedia.org/wiki/Universally_unique_identifier) format.
  1884  	Uid string `json:"uid,omitempty"`
  1885  	// UpdateTime: Output only. The timestamp when this RestorePlan resource was
  1886  	// last updated.
  1887  	UpdateTime string `json:"updateTime,omitempty"`
  1888  
  1889  	// ServerResponse contains the HTTP response code and headers from the server.
  1890  	googleapi.ServerResponse `json:"-"`
  1891  	// ForceSendFields is a list of field names (e.g. "BackupPlan") to
  1892  	// unconditionally include in API requests. By default, fields with empty or
  1893  	// default values are omitted from API requests. See
  1894  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1895  	// details.
  1896  	ForceSendFields []string `json:"-"`
  1897  	// NullFields is a list of field names (e.g. "BackupPlan") to include in API
  1898  	// requests with the JSON null value. By default, fields with empty values are
  1899  	// omitted from API requests. See
  1900  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1901  	NullFields []string `json:"-"`
  1902  }
  1903  
  1904  func (s *RestorePlan) MarshalJSON() ([]byte, error) {
  1905  	type NoMethod RestorePlan
  1906  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1907  }
  1908  
  1909  // RetentionPolicy: RetentionPolicy defines a Backup retention policy for a
  1910  // BackupPlan.
  1911  type RetentionPolicy struct {
  1912  	// BackupDeleteLockDays: Optional. Minimum age for Backups created via this
  1913  	// BackupPlan (in days). This field MUST be an integer value between 0-90
  1914  	// (inclusive). A Backup created under this BackupPlan will NOT be deletable
  1915  	// until it reaches Backup's (create_time + backup_delete_lock_days). Updating
  1916  	// this field of a BackupPlan does NOT affect existing Backups under it.
  1917  	// Backups created AFTER a successful update will inherit the new value.
  1918  	// Default: 0 (no delete blocking)
  1919  	BackupDeleteLockDays int64 `json:"backupDeleteLockDays,omitempty"`
  1920  	// BackupRetainDays: Optional. The default maximum age of a Backup created via
  1921  	// this BackupPlan. This field MUST be an integer value >= 0 and <= 365. If
  1922  	// specified, a Backup created under this BackupPlan will be automatically
  1923  	// deleted after its age reaches (create_time + backup_retain_days). If not
  1924  	// specified, Backups created under this BackupPlan will NOT be subject to
  1925  	// automatic deletion. Updating this field does NOT affect existing Backups
  1926  	// under it. Backups created AFTER a successful update will automatically pick
  1927  	// up the new value. NOTE: backup_retain_days must be >=
  1928  	// backup_delete_lock_days. If cron_schedule is defined, then this must be <=
  1929  	// 360 * the creation interval. If rpo_config is defined, then this must be <=
  1930  	// 360 * target_rpo_minutes / (1440minutes/day). Default: 0 (no automatic
  1931  	// deletion)
  1932  	BackupRetainDays int64 `json:"backupRetainDays,omitempty"`
  1933  	// Locked: Optional. This flag denotes whether the retention policy of this
  1934  	// BackupPlan is locked. If set to True, no further update is allowed on this
  1935  	// policy, including the `locked` field itself. Default: False
  1936  	Locked bool `json:"locked,omitempty"`
  1937  	// ForceSendFields is a list of field names (e.g. "BackupDeleteLockDays") to
  1938  	// unconditionally include in API requests. By default, fields with empty or
  1939  	// default values are omitted from API requests. See
  1940  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1941  	// details.
  1942  	ForceSendFields []string `json:"-"`
  1943  	// NullFields is a list of field names (e.g. "BackupDeleteLockDays") to include
  1944  	// in API requests with the JSON null value. By default, fields with empty
  1945  	// values are omitted from API requests. See
  1946  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1947  	NullFields []string `json:"-"`
  1948  }
  1949  
  1950  func (s *RetentionPolicy) MarshalJSON() ([]byte, error) {
  1951  	type NoMethod RetentionPolicy
  1952  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1953  }
  1954  
  1955  // RpoConfig: Defines RPO scheduling configuration for automatically creating
  1956  // Backups via this BackupPlan.
  1957  type RpoConfig struct {
  1958  	// ExclusionWindows: Optional. User specified time windows during which backup
  1959  	// can NOT happen for this BackupPlan - backups should start and finish outside
  1960  	// of any given exclusion window. Note: backup jobs will be scheduled to start
  1961  	// and finish outside the duration of the window as much as possible, but
  1962  	// running jobs will not get canceled when it runs into the window. All the
  1963  	// time and date values in exclusion_windows entry in the API are in UTC. We
  1964  	// only allow <=1 recurrence (daily or weekly) exclusion window for a
  1965  	// BackupPlan while no restriction on number of single occurrence windows.
  1966  	ExclusionWindows []*ExclusionWindow `json:"exclusionWindows,omitempty"`
  1967  	// TargetRpoMinutes: Required. Defines the target RPO for the BackupPlan in
  1968  	// minutes, which means the target maximum data loss in time that is acceptable
  1969  	// for this BackupPlan. This must be at least 60, i.e., 1 hour, and at most
  1970  	// 86400, i.e., 60 days.
  1971  	TargetRpoMinutes int64 `json:"targetRpoMinutes,omitempty"`
  1972  	// ForceSendFields is a list of field names (e.g. "ExclusionWindows") to
  1973  	// unconditionally include in API requests. By default, fields with empty or
  1974  	// default values are omitted from API requests. See
  1975  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1976  	// details.
  1977  	ForceSendFields []string `json:"-"`
  1978  	// NullFields is a list of field names (e.g. "ExclusionWindows") to include in
  1979  	// API requests with the JSON null value. By default, fields with empty values
  1980  	// are omitted from API requests. See
  1981  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1982  	NullFields []string `json:"-"`
  1983  }
  1984  
  1985  func (s *RpoConfig) MarshalJSON() ([]byte, error) {
  1986  	type NoMethod RpoConfig
  1987  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1988  }
  1989  
  1990  // Schedule: Defines scheduling parameters for automatically creating Backups
  1991  // via this BackupPlan.
  1992  type Schedule struct {
  1993  	// CronSchedule: Optional. A standard cron (https://wikipedia.com/wiki/cron)
  1994  	// string that defines a repeating schedule for creating Backups via this
  1995  	// BackupPlan. This is mutually exclusive with the rpo_config field since at
  1996  	// most one schedule can be defined for a BackupPlan. If this is defined, then
  1997  	// backup_retain_days must also be defined. Default (empty): no automatic
  1998  	// backup creation will occur.
  1999  	CronSchedule string `json:"cronSchedule,omitempty"`
  2000  	// NextScheduledBackupTime: Output only. Start time of next scheduled backup
  2001  	// under this BackupPlan by either cron_schedule or rpo config.
  2002  	NextScheduledBackupTime string `json:"nextScheduledBackupTime,omitempty"`
  2003  	// Paused: Optional. This flag denotes whether automatic Backup creation is
  2004  	// paused for this BackupPlan. Default: False
  2005  	Paused bool `json:"paused,omitempty"`
  2006  	// RpoConfig: Optional. Defines the RPO schedule configuration for this
  2007  	// BackupPlan. This is mutually exclusive with the cron_schedule field since at
  2008  	// most one schedule can be defined for a BackupPLan. If this is defined, then
  2009  	// backup_retain_days must also be defined. Default (empty): no automatic
  2010  	// backup creation will occur.
  2011  	RpoConfig *RpoConfig `json:"rpoConfig,omitempty"`
  2012  	// ForceSendFields is a list of field names (e.g. "CronSchedule") to
  2013  	// unconditionally include in API requests. By default, fields with empty or
  2014  	// default values are omitted from API requests. See
  2015  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2016  	// details.
  2017  	ForceSendFields []string `json:"-"`
  2018  	// NullFields is a list of field names (e.g. "CronSchedule") to include in API
  2019  	// requests with the JSON null value. By default, fields with empty values are
  2020  	// omitted from API requests. See
  2021  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2022  	NullFields []string `json:"-"`
  2023  }
  2024  
  2025  func (s *Schedule) MarshalJSON() ([]byte, error) {
  2026  	type NoMethod Schedule
  2027  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2028  }
  2029  
  2030  // SetIamPolicyRequest: Request message for `SetIamPolicy` method.
  2031  type SetIamPolicyRequest struct {
  2032  	// Policy: REQUIRED: The complete policy to be applied to the `resource`. The
  2033  	// size of the policy is limited to a few 10s of KB. An empty policy is a valid
  2034  	// policy but certain Google Cloud services (such as Projects) might reject
  2035  	// them.
  2036  	Policy *Policy `json:"policy,omitempty"`
  2037  	// UpdateMask: OPTIONAL: A FieldMask specifying which fields of the policy to
  2038  	// modify. Only the fields in the mask will be modified. If no mask is
  2039  	// provided, the following default mask is used: `paths: "bindings, etag"
  2040  	UpdateMask string `json:"updateMask,omitempty"`
  2041  	// ForceSendFields is a list of field names (e.g. "Policy") to unconditionally
  2042  	// include in API requests. By default, fields with empty or default values are
  2043  	// omitted from API requests. See
  2044  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2045  	// details.
  2046  	ForceSendFields []string `json:"-"`
  2047  	// NullFields is a list of field names (e.g. "Policy") to include in API
  2048  	// requests with the JSON null value. By default, fields with empty values are
  2049  	// omitted from API requests. See
  2050  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2051  	NullFields []string `json:"-"`
  2052  }
  2053  
  2054  func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
  2055  	type NoMethod SetIamPolicyRequest
  2056  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2057  }
  2058  
  2059  // SubstitutionRule: A transformation rule to be applied against Kubernetes
  2060  // resources as they are selected for restoration from a Backup. A rule
  2061  // contains both filtering logic (which resources are subject to substitution)
  2062  // and substitution logic.
  2063  type SubstitutionRule struct {
  2064  	// NewValue: Optional. This is the new value to set for any fields that pass
  2065  	// the filtering and selection criteria. To remove a value from a Kubernetes
  2066  	// resource, either leave this field unspecified, or set it to the empty string
  2067  	// ("").
  2068  	NewValue string `json:"newValue,omitempty"`
  2069  	// OriginalValuePattern: Optional. (Filtering parameter) This is a [regular
  2070  	// expression] (https://en.wikipedia.org/wiki/Regular_expression) that is
  2071  	// compared against the fields matched by the target_json_path expression (and
  2072  	// must also have passed the previous filters). Substitution will not be
  2073  	// performed against fields whose value does not match this expression. If this
  2074  	// field is NOT specified, then ALL fields matched by the target_json_path
  2075  	// expression will undergo substitution. Note that an empty (e.g., "", rather
  2076  	// than unspecified) value for this field will only match empty fields.
  2077  	OriginalValuePattern string `json:"originalValuePattern,omitempty"`
  2078  	// TargetGroupKinds: Optional. (Filtering parameter) Any resource subject to
  2079  	// substitution must belong to one of the listed "types". If this field is not
  2080  	// provided, no type filtering will be performed (all resources of all types
  2081  	// matching previous filtering parameters will be candidates for substitution).
  2082  	TargetGroupKinds []*GroupKind `json:"targetGroupKinds,omitempty"`
  2083  	// TargetJsonPath: Required. This is a [JSONPath]
  2084  	// (https://kubernetes.io/docs/reference/kubectl/jsonpath/) expression that
  2085  	// matches specific fields of candidate resources and it operates as both a
  2086  	// filtering parameter (resources that are not matched with this expression
  2087  	// will not be candidates for substitution) as well as a field identifier
  2088  	// (identifies exactly which fields out of the candidate resources will be
  2089  	// modified).
  2090  	TargetJsonPath string `json:"targetJsonPath,omitempty"`
  2091  	// TargetNamespaces: Optional. (Filtering parameter) Any resource subject to
  2092  	// substitution must be contained within one of the listed Kubernetes Namespace
  2093  	// in the Backup. If this field is not provided, no namespace filtering will be
  2094  	// performed (all resources in all Namespaces, including all cluster-scoped
  2095  	// resources, will be candidates for substitution). To mix cluster-scoped and
  2096  	// namespaced resources in the same rule, use an empty string ("") as one of
  2097  	// the target namespaces.
  2098  	TargetNamespaces []string `json:"targetNamespaces,omitempty"`
  2099  	// ForceSendFields is a list of field names (e.g. "NewValue") to
  2100  	// unconditionally include in API requests. By default, fields with empty or
  2101  	// default values are omitted from API requests. See
  2102  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2103  	// details.
  2104  	ForceSendFields []string `json:"-"`
  2105  	// NullFields is a list of field names (e.g. "NewValue") to include in API
  2106  	// requests with the JSON null value. By default, fields with empty values are
  2107  	// omitted from API requests. See
  2108  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2109  	NullFields []string `json:"-"`
  2110  }
  2111  
  2112  func (s *SubstitutionRule) MarshalJSON() ([]byte, error) {
  2113  	type NoMethod SubstitutionRule
  2114  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2115  }
  2116  
  2117  // TestIamPermissionsRequest: Request message for `TestIamPermissions` method.
  2118  type TestIamPermissionsRequest struct {
  2119  	// Permissions: The set of permissions to check for the `resource`. Permissions
  2120  	// with wildcards (such as `*` or `storage.*`) are not allowed. For more
  2121  	// information see IAM Overview
  2122  	// (https://cloud.google.com/iam/docs/overview#permissions).
  2123  	Permissions []string `json:"permissions,omitempty"`
  2124  	// ForceSendFields is a list of field names (e.g. "Permissions") to
  2125  	// unconditionally include in API requests. By default, fields with empty or
  2126  	// default values are omitted from API requests. See
  2127  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2128  	// details.
  2129  	ForceSendFields []string `json:"-"`
  2130  	// NullFields is a list of field names (e.g. "Permissions") to include in API
  2131  	// requests with the JSON null value. By default, fields with empty values are
  2132  	// omitted from API requests. See
  2133  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2134  	NullFields []string `json:"-"`
  2135  }
  2136  
  2137  func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
  2138  	type NoMethod TestIamPermissionsRequest
  2139  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2140  }
  2141  
  2142  // TestIamPermissionsResponse: Response message for `TestIamPermissions`
  2143  // method.
  2144  type TestIamPermissionsResponse struct {
  2145  	// Permissions: A subset of `TestPermissionsRequest.permissions` that the
  2146  	// caller is allowed.
  2147  	Permissions []string `json:"permissions,omitempty"`
  2148  
  2149  	// ServerResponse contains the HTTP response code and headers from the server.
  2150  	googleapi.ServerResponse `json:"-"`
  2151  	// ForceSendFields is a list of field names (e.g. "Permissions") to
  2152  	// unconditionally include in API requests. By default, fields with empty or
  2153  	// default values are omitted from API requests. See
  2154  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2155  	// details.
  2156  	ForceSendFields []string `json:"-"`
  2157  	// NullFields is a list of field names (e.g. "Permissions") to include in API
  2158  	// requests with the JSON null value. By default, fields with empty values are
  2159  	// omitted from API requests. See
  2160  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2161  	NullFields []string `json:"-"`
  2162  }
  2163  
  2164  func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
  2165  	type NoMethod TestIamPermissionsResponse
  2166  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2167  }
  2168  
  2169  // TimeOfDay: Represents a time of day. The date and time zone are either not
  2170  // significant or are specified elsewhere. An API may choose to allow leap
  2171  // seconds. Related types are google.type.Date and `google.protobuf.Timestamp`.
  2172  type TimeOfDay struct {
  2173  	// Hours: Hours of day in 24 hour format. Should be from 0 to 23. An API may
  2174  	// choose to allow the value "24:00:00" for scenarios like business closing
  2175  	// time.
  2176  	Hours int64 `json:"hours,omitempty"`
  2177  	// Minutes: Minutes of hour of day. Must be from 0 to 59.
  2178  	Minutes int64 `json:"minutes,omitempty"`
  2179  	// Nanos: Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
  2180  	Nanos int64 `json:"nanos,omitempty"`
  2181  	// Seconds: Seconds of minutes of the time. Must normally be from 0 to 59. An
  2182  	// API may allow the value 60 if it allows leap-seconds.
  2183  	Seconds int64 `json:"seconds,omitempty"`
  2184  	// ForceSendFields is a list of field names (e.g. "Hours") to unconditionally
  2185  	// include in API requests. By default, fields with empty or default values are
  2186  	// omitted from API requests. See
  2187  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2188  	// details.
  2189  	ForceSendFields []string `json:"-"`
  2190  	// NullFields is a list of field names (e.g. "Hours") to include in API
  2191  	// requests with the JSON null value. By default, fields with empty values are
  2192  	// omitted from API requests. See
  2193  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2194  	NullFields []string `json:"-"`
  2195  }
  2196  
  2197  func (s *TimeOfDay) MarshalJSON() ([]byte, error) {
  2198  	type NoMethod TimeOfDay
  2199  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2200  }
  2201  
  2202  // TransformationRule: A transformation rule to be applied against Kubernetes
  2203  // resources as they are selected for restoration from a Backup. A rule
  2204  // contains both filtering logic (which resources are subject to transform) and
  2205  // transformation logic.
  2206  type TransformationRule struct {
  2207  	// Description: Optional. The description is a user specified string
  2208  	// description of the transformation rule.
  2209  	Description string `json:"description,omitempty"`
  2210  	// FieldActions: Required. A list of transformation rule actions to take
  2211  	// against candidate resources. Actions are executed in order defined - this
  2212  	// order matters, as they could potentially interfere with each other and the
  2213  	// first operation could affect the outcome of the second operation.
  2214  	FieldActions []*TransformationRuleAction `json:"fieldActions,omitempty"`
  2215  	// ResourceFilter: Optional. This field is used to specify a set of fields that
  2216  	// should be used to determine which resources in backup should be acted upon
  2217  	// by the supplied transformation rule actions, and this will ensure that only
  2218  	// specific resources are affected by transformation rule actions.
  2219  	ResourceFilter *ResourceFilter `json:"resourceFilter,omitempty"`
  2220  	// ForceSendFields is a list of field names (e.g. "Description") to
  2221  	// unconditionally include in API requests. By default, fields with empty or
  2222  	// default values are omitted from API requests. See
  2223  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2224  	// details.
  2225  	ForceSendFields []string `json:"-"`
  2226  	// NullFields is a list of field names (e.g. "Description") to include in API
  2227  	// requests with the JSON null value. By default, fields with empty values are
  2228  	// omitted from API requests. See
  2229  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2230  	NullFields []string `json:"-"`
  2231  }
  2232  
  2233  func (s *TransformationRule) MarshalJSON() ([]byte, error) {
  2234  	type NoMethod TransformationRule
  2235  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2236  }
  2237  
  2238  // TransformationRuleAction: TransformationRuleAction defines a
  2239  // TransformationRule action based on the JSON Patch RFC
  2240  // (https://www.rfc-editor.org/rfc/rfc6902)
  2241  type TransformationRuleAction struct {
  2242  	// FromPath: Optional. A string containing a JSON Pointer value that references
  2243  	// the location in the target document to move the value from.
  2244  	FromPath string `json:"fromPath,omitempty"`
  2245  	// Op: Required. op specifies the operation to perform.
  2246  	//
  2247  	// Possible values:
  2248  	//   "OP_UNSPECIFIED" - Unspecified operation
  2249  	//   "REMOVE" - The "remove" operation removes the value at the target
  2250  	// location.
  2251  	//   "MOVE" - The "move" operation removes the value at a specified location
  2252  	// and adds it to the target location.
  2253  	//   "COPY" - The "copy" operation copies the value at a specified location to
  2254  	// the target location.
  2255  	//   "ADD" - The "add" operation performs one of the following functions,
  2256  	// depending upon what the target location references: 1. If the target
  2257  	// location specifies an array index, a new value is inserted into the array at
  2258  	// the specified index. 2. If the target location specifies an object member
  2259  	// that does not already exist, a new member is added to the object. 3. If the
  2260  	// target location specifies an object member that does exist, that member's
  2261  	// value is replaced.
  2262  	//   "TEST" - The "test" operation tests that a value at the target location is
  2263  	// equal to a specified value.
  2264  	//   "REPLACE" - The "replace" operation replaces the value at the target
  2265  	// location with a new value. The operation object MUST contain a "value"
  2266  	// member whose content specifies the replacement value.
  2267  	Op string `json:"op,omitempty"`
  2268  	// Path: Optional. A string containing a JSON-Pointer value that references a
  2269  	// location within the target document where the operation is performed.
  2270  	Path string `json:"path,omitempty"`
  2271  	// Value: Optional. A string that specifies the desired value in string format
  2272  	// to use for transformation.
  2273  	Value string `json:"value,omitempty"`
  2274  	// ForceSendFields is a list of field names (e.g. "FromPath") to
  2275  	// unconditionally include in API requests. By default, fields with empty or
  2276  	// default values are omitted from API requests. See
  2277  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2278  	// details.
  2279  	ForceSendFields []string `json:"-"`
  2280  	// NullFields is a list of field names (e.g. "FromPath") to include in API
  2281  	// requests with the JSON null value. By default, fields with empty values are
  2282  	// omitted from API requests. See
  2283  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2284  	NullFields []string `json:"-"`
  2285  }
  2286  
  2287  func (s *TransformationRuleAction) MarshalJSON() ([]byte, error) {
  2288  	type NoMethod TransformationRuleAction
  2289  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2290  }
  2291  
  2292  // VolumeBackup: Represents the backup of a specific persistent volume as a
  2293  // component of a Backup - both the record of the operation and a pointer to
  2294  // the underlying storage-specific artifacts.
  2295  type VolumeBackup struct {
  2296  	// CompleteTime: Output only. The timestamp when the associated underlying
  2297  	// volume backup operation completed.
  2298  	CompleteTime string `json:"completeTime,omitempty"`
  2299  	// CreateTime: Output only. The timestamp when this VolumeBackup resource was
  2300  	// created.
  2301  	CreateTime string `json:"createTime,omitempty"`
  2302  	// DiskSizeBytes: Output only. The minimum size of the disk to which this
  2303  	// VolumeBackup can be restored.
  2304  	DiskSizeBytes int64 `json:"diskSizeBytes,omitempty,string"`
  2305  	// Etag: Output only. `etag` is used for optimistic concurrency control as a
  2306  	// way to help prevent simultaneous updates of a volume backup from overwriting
  2307  	// each other. It is strongly suggested that systems make use of the `etag` in
  2308  	// the read-modify-write cycle to perform volume backup updates in order to
  2309  	// avoid race conditions.
  2310  	Etag string `json:"etag,omitempty"`
  2311  	// Format: Output only. The format used for the volume backup.
  2312  	//
  2313  	// Possible values:
  2314  	//   "VOLUME_BACKUP_FORMAT_UNSPECIFIED" - Default value, not specified.
  2315  	//   "GCE_PERSISTENT_DISK" - Compute Engine Persistent Disk snapshot based
  2316  	// volume backup.
  2317  	Format string `json:"format,omitempty"`
  2318  	// Name: Output only. The full name of the VolumeBackup resource. Format:
  2319  	// `projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*`.
  2320  	Name string `json:"name,omitempty"`
  2321  	// SourcePvc: Output only. A reference to the source Kubernetes PVC from which
  2322  	// this VolumeBackup was created.
  2323  	SourcePvc *NamespacedName `json:"sourcePvc,omitempty"`
  2324  	// State: Output only. The current state of this VolumeBackup.
  2325  	//
  2326  	// Possible values:
  2327  	//   "STATE_UNSPECIFIED" - This is an illegal state and should not be
  2328  	// encountered.
  2329  	//   "CREATING" - A volume for the backup was identified and backup process is
  2330  	// about to start.
  2331  	//   "SNAPSHOTTING" - The volume backup operation has begun and is in the
  2332  	// initial "snapshot" phase of the process. Any defined ProtectedApplication
  2333  	// "pre" hooks will be executed before entering this state and "post" hooks
  2334  	// will be executed upon leaving this state.
  2335  	//   "UPLOADING" - The snapshot phase of the volume backup operation has
  2336  	// completed and the snapshot is now being uploaded to backup storage.
  2337  	//   "SUCCEEDED" - The volume backup operation has completed successfully.
  2338  	//   "FAILED" - The volume backup operation has failed.
  2339  	//   "DELETING" - This VolumeBackup resource (and its associated artifacts) is
  2340  	// in the process of being deleted.
  2341  	State string `json:"state,omitempty"`
  2342  	// StateMessage: Output only. A human readable message explaining why the
  2343  	// VolumeBackup is in its current state.
  2344  	StateMessage string `json:"stateMessage,omitempty"`
  2345  	// StorageBytes: Output only. The aggregate size of the underlying artifacts
  2346  	// associated with this VolumeBackup in the backup storage. This may change
  2347  	// over time when multiple backups of the same volume share the same backup
  2348  	// storage location. In particular, this is likely to increase in size when the
  2349  	// immediately preceding backup of the same volume is deleted.
  2350  	StorageBytes int64 `json:"storageBytes,omitempty,string"`
  2351  	// Uid: Output only. Server generated global unique identifier of UUID
  2352  	// (https://en.wikipedia.org/wiki/Universally_unique_identifier) format.
  2353  	Uid string `json:"uid,omitempty"`
  2354  	// UpdateTime: Output only. The timestamp when this VolumeBackup resource was
  2355  	// last updated.
  2356  	UpdateTime string `json:"updateTime,omitempty"`
  2357  	// VolumeBackupHandle: Output only. A storage system-specific opaque handle to
  2358  	// the underlying volume backup.
  2359  	VolumeBackupHandle string `json:"volumeBackupHandle,omitempty"`
  2360  
  2361  	// ServerResponse contains the HTTP response code and headers from the server.
  2362  	googleapi.ServerResponse `json:"-"`
  2363  	// ForceSendFields is a list of field names (e.g. "CompleteTime") to
  2364  	// unconditionally include in API requests. By default, fields with empty or
  2365  	// default values are omitted from API requests. See
  2366  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2367  	// details.
  2368  	ForceSendFields []string `json:"-"`
  2369  	// NullFields is a list of field names (e.g. "CompleteTime") to include in API
  2370  	// requests with the JSON null value. By default, fields with empty values are
  2371  	// omitted from API requests. See
  2372  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2373  	NullFields []string `json:"-"`
  2374  }
  2375  
  2376  func (s *VolumeBackup) MarshalJSON() ([]byte, error) {
  2377  	type NoMethod VolumeBackup
  2378  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2379  }
  2380  
  2381  // VolumeRestore: Represents the operation of restoring a volume from a
  2382  // VolumeBackup.
  2383  type VolumeRestore struct {
  2384  	// CompleteTime: Output only. The timestamp when the associated underlying
  2385  	// volume restoration completed.
  2386  	CompleteTime string `json:"completeTime,omitempty"`
  2387  	// CreateTime: Output only. The timestamp when this VolumeRestore resource was
  2388  	// created.
  2389  	CreateTime string `json:"createTime,omitempty"`
  2390  	// Etag: Output only. `etag` is used for optimistic concurrency control as a
  2391  	// way to help prevent simultaneous updates of a volume restore from
  2392  	// overwriting each other. It is strongly suggested that systems make use of
  2393  	// the `etag` in the read-modify-write cycle to perform volume restore updates
  2394  	// in order to avoid race conditions.
  2395  	Etag string `json:"etag,omitempty"`
  2396  	// Name: Output only. Full name of the VolumeRestore resource. Format:
  2397  	// `projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*`
  2398  	Name string `json:"name,omitempty"`
  2399  	// State: Output only. The current state of this VolumeRestore.
  2400  	//
  2401  	// Possible values:
  2402  	//   "STATE_UNSPECIFIED" - This is an illegal state and should not be
  2403  	// encountered.
  2404  	//   "CREATING" - A volume for the restore was identified and restore process
  2405  	// is about to start.
  2406  	//   "RESTORING" - The volume is currently being restored.
  2407  	//   "SUCCEEDED" - The volume has been successfully restored.
  2408  	//   "FAILED" - The volume restoration process failed.
  2409  	//   "DELETING" - This VolumeRestore resource is in the process of being
  2410  	// deleted.
  2411  	State string `json:"state,omitempty"`
  2412  	// StateMessage: Output only. A human readable message explaining why the
  2413  	// VolumeRestore is in its current state.
  2414  	StateMessage string `json:"stateMessage,omitempty"`
  2415  	// TargetPvc: Output only. The reference to the target Kubernetes PVC to be
  2416  	// restored.
  2417  	TargetPvc *NamespacedName `json:"targetPvc,omitempty"`
  2418  	// Uid: Output only. Server generated global unique identifier of UUID
  2419  	// (https://en.wikipedia.org/wiki/Universally_unique_identifier) format.
  2420  	Uid string `json:"uid,omitempty"`
  2421  	// UpdateTime: Output only. The timestamp when this VolumeRestore resource was
  2422  	// last updated.
  2423  	UpdateTime string `json:"updateTime,omitempty"`
  2424  	// VolumeBackup: Output only. The full name of the VolumeBackup from which the
  2425  	// volume will be restored. Format:
  2426  	// `projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*`.
  2427  	VolumeBackup string `json:"volumeBackup,omitempty"`
  2428  	// VolumeHandle: Output only. A storage system-specific opaque handler to the
  2429  	// underlying volume created for the target PVC from the volume backup.
  2430  	VolumeHandle string `json:"volumeHandle,omitempty"`
  2431  	// VolumeType: Output only. The type of volume provisioned
  2432  	//
  2433  	// Possible values:
  2434  	//   "VOLUME_TYPE_UNSPECIFIED" - Default
  2435  	//   "GCE_PERSISTENT_DISK" - Compute Engine Persistent Disk volume
  2436  	VolumeType string `json:"volumeType,omitempty"`
  2437  
  2438  	// ServerResponse contains the HTTP response code and headers from the server.
  2439  	googleapi.ServerResponse `json:"-"`
  2440  	// ForceSendFields is a list of field names (e.g. "CompleteTime") to
  2441  	// unconditionally include in API requests. By default, fields with empty or
  2442  	// default values are omitted from API requests. See
  2443  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2444  	// details.
  2445  	ForceSendFields []string `json:"-"`
  2446  	// NullFields is a list of field names (e.g. "CompleteTime") to include in API
  2447  	// requests with the JSON null value. By default, fields with empty values are
  2448  	// omitted from API requests. See
  2449  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2450  	NullFields []string `json:"-"`
  2451  }
  2452  
  2453  func (s *VolumeRestore) MarshalJSON() ([]byte, error) {
  2454  	type NoMethod VolumeRestore
  2455  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2456  }
  2457  
  2458  type ProjectsLocationsGetCall struct {
  2459  	s            *Service
  2460  	name         string
  2461  	urlParams_   gensupport.URLParams
  2462  	ifNoneMatch_ string
  2463  	ctx_         context.Context
  2464  	header_      http.Header
  2465  }
  2466  
  2467  // Get: Gets information about a location.
  2468  //
  2469  // - name: Resource name for the location.
  2470  func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
  2471  	c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2472  	c.name = name
  2473  	return c
  2474  }
  2475  
  2476  // Fields allows partial responses to be retrieved. See
  2477  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2478  // details.
  2479  func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
  2480  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2481  	return c
  2482  }
  2483  
  2484  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2485  // object's ETag matches the given value. This is useful for getting updates
  2486  // only after the object has changed since the last request.
  2487  func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
  2488  	c.ifNoneMatch_ = entityTag
  2489  	return c
  2490  }
  2491  
  2492  // Context sets the context to be used in this call's Do method.
  2493  func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
  2494  	c.ctx_ = ctx
  2495  	return c
  2496  }
  2497  
  2498  // Header returns a http.Header that can be modified by the caller to add
  2499  // headers to the request.
  2500  func (c *ProjectsLocationsGetCall) Header() http.Header {
  2501  	if c.header_ == nil {
  2502  		c.header_ = make(http.Header)
  2503  	}
  2504  	return c.header_
  2505  }
  2506  
  2507  func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
  2508  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2509  	if c.ifNoneMatch_ != "" {
  2510  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2511  	}
  2512  	var body io.Reader = nil
  2513  	c.urlParams_.Set("alt", alt)
  2514  	c.urlParams_.Set("prettyPrint", "false")
  2515  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  2516  	urls += "?" + c.urlParams_.Encode()
  2517  	req, err := http.NewRequest("GET", urls, body)
  2518  	if err != nil {
  2519  		return nil, err
  2520  	}
  2521  	req.Header = reqHeaders
  2522  	googleapi.Expand(req.URL, map[string]string{
  2523  		"name": c.name,
  2524  	})
  2525  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2526  }
  2527  
  2528  // Do executes the "gkebackup.projects.locations.get" call.
  2529  // Any non-2xx status code is an error. Response headers are in either
  2530  // *Location.ServerResponse.Header or (if a response was returned at all) in
  2531  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2532  // whether the returned error was because http.StatusNotModified was returned.
  2533  func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
  2534  	gensupport.SetOptions(c.urlParams_, opts...)
  2535  	res, err := c.doRequest("json")
  2536  	if res != nil && res.StatusCode == http.StatusNotModified {
  2537  		if res.Body != nil {
  2538  			res.Body.Close()
  2539  		}
  2540  		return nil, gensupport.WrapError(&googleapi.Error{
  2541  			Code:   res.StatusCode,
  2542  			Header: res.Header,
  2543  		})
  2544  	}
  2545  	if err != nil {
  2546  		return nil, err
  2547  	}
  2548  	defer googleapi.CloseBody(res)
  2549  	if err := googleapi.CheckResponse(res); err != nil {
  2550  		return nil, gensupport.WrapError(err)
  2551  	}
  2552  	ret := &Location{
  2553  		ServerResponse: googleapi.ServerResponse{
  2554  			Header:         res.Header,
  2555  			HTTPStatusCode: res.StatusCode,
  2556  		},
  2557  	}
  2558  	target := &ret
  2559  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2560  		return nil, err
  2561  	}
  2562  	return ret, nil
  2563  }
  2564  
  2565  type ProjectsLocationsListCall struct {
  2566  	s            *Service
  2567  	name         string
  2568  	urlParams_   gensupport.URLParams
  2569  	ifNoneMatch_ string
  2570  	ctx_         context.Context
  2571  	header_      http.Header
  2572  }
  2573  
  2574  // List: Lists information about the supported locations for this service.
  2575  //
  2576  // - name: The resource that owns the locations collection, if applicable.
  2577  func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
  2578  	c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2579  	c.name = name
  2580  	return c
  2581  }
  2582  
  2583  // Filter sets the optional parameter "filter": A filter to narrow down results
  2584  // to a preferred subset. The filtering language accepts strings like
  2585  // "displayName=tokyo", and is documented in more detail in AIP-160
  2586  // (https://google.aip.dev/160).
  2587  func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
  2588  	c.urlParams_.Set("filter", filter)
  2589  	return c
  2590  }
  2591  
  2592  // PageSize sets the optional parameter "pageSize": The maximum number of
  2593  // results to return. If not set, the service selects a default.
  2594  func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
  2595  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2596  	return c
  2597  }
  2598  
  2599  // PageToken sets the optional parameter "pageToken": A page token received
  2600  // from the `next_page_token` field in the response. Send that page token to
  2601  // receive the subsequent page.
  2602  func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
  2603  	c.urlParams_.Set("pageToken", pageToken)
  2604  	return c
  2605  }
  2606  
  2607  // Fields allows partial responses to be retrieved. See
  2608  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2609  // details.
  2610  func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
  2611  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2612  	return c
  2613  }
  2614  
  2615  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2616  // object's ETag matches the given value. This is useful for getting updates
  2617  // only after the object has changed since the last request.
  2618  func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
  2619  	c.ifNoneMatch_ = entityTag
  2620  	return c
  2621  }
  2622  
  2623  // Context sets the context to be used in this call's Do method.
  2624  func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
  2625  	c.ctx_ = ctx
  2626  	return c
  2627  }
  2628  
  2629  // Header returns a http.Header that can be modified by the caller to add
  2630  // headers to the request.
  2631  func (c *ProjectsLocationsListCall) Header() http.Header {
  2632  	if c.header_ == nil {
  2633  		c.header_ = make(http.Header)
  2634  	}
  2635  	return c.header_
  2636  }
  2637  
  2638  func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
  2639  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2640  	if c.ifNoneMatch_ != "" {
  2641  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2642  	}
  2643  	var body io.Reader = nil
  2644  	c.urlParams_.Set("alt", alt)
  2645  	c.urlParams_.Set("prettyPrint", "false")
  2646  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations")
  2647  	urls += "?" + c.urlParams_.Encode()
  2648  	req, err := http.NewRequest("GET", urls, body)
  2649  	if err != nil {
  2650  		return nil, err
  2651  	}
  2652  	req.Header = reqHeaders
  2653  	googleapi.Expand(req.URL, map[string]string{
  2654  		"name": c.name,
  2655  	})
  2656  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2657  }
  2658  
  2659  // Do executes the "gkebackup.projects.locations.list" call.
  2660  // Any non-2xx status code is an error. Response headers are in either
  2661  // *ListLocationsResponse.ServerResponse.Header or (if a response was returned
  2662  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2663  // check whether the returned error was because http.StatusNotModified was
  2664  // returned.
  2665  func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
  2666  	gensupport.SetOptions(c.urlParams_, opts...)
  2667  	res, err := c.doRequest("json")
  2668  	if res != nil && res.StatusCode == http.StatusNotModified {
  2669  		if res.Body != nil {
  2670  			res.Body.Close()
  2671  		}
  2672  		return nil, gensupport.WrapError(&googleapi.Error{
  2673  			Code:   res.StatusCode,
  2674  			Header: res.Header,
  2675  		})
  2676  	}
  2677  	if err != nil {
  2678  		return nil, err
  2679  	}
  2680  	defer googleapi.CloseBody(res)
  2681  	if err := googleapi.CheckResponse(res); err != nil {
  2682  		return nil, gensupport.WrapError(err)
  2683  	}
  2684  	ret := &ListLocationsResponse{
  2685  		ServerResponse: googleapi.ServerResponse{
  2686  			Header:         res.Header,
  2687  			HTTPStatusCode: res.StatusCode,
  2688  		},
  2689  	}
  2690  	target := &ret
  2691  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2692  		return nil, err
  2693  	}
  2694  	return ret, nil
  2695  }
  2696  
  2697  // Pages invokes f for each page of results.
  2698  // A non-nil error returned from f will halt the iteration.
  2699  // The provided context supersedes any context provided to the Context method.
  2700  func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
  2701  	c.ctx_ = ctx
  2702  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  2703  	for {
  2704  		x, err := c.Do()
  2705  		if err != nil {
  2706  			return err
  2707  		}
  2708  		if err := f(x); err != nil {
  2709  			return err
  2710  		}
  2711  		if x.NextPageToken == "" {
  2712  			return nil
  2713  		}
  2714  		c.PageToken(x.NextPageToken)
  2715  	}
  2716  }
  2717  
  2718  type ProjectsLocationsBackupPlansCreateCall struct {
  2719  	s          *Service
  2720  	parent     string
  2721  	backupplan *BackupPlan
  2722  	urlParams_ gensupport.URLParams
  2723  	ctx_       context.Context
  2724  	header_    http.Header
  2725  }
  2726  
  2727  // Create: Creates a new BackupPlan in a given location.
  2728  //
  2729  //   - parent: The location within which to create the BackupPlan. Format:
  2730  //     `projects/*/locations/*`.
  2731  func (r *ProjectsLocationsBackupPlansService) Create(parent string, backupplan *BackupPlan) *ProjectsLocationsBackupPlansCreateCall {
  2732  	c := &ProjectsLocationsBackupPlansCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2733  	c.parent = parent
  2734  	c.backupplan = backupplan
  2735  	return c
  2736  }
  2737  
  2738  // BackupPlanId sets the optional parameter "backupPlanId": Required. The
  2739  // client-provided short name for the BackupPlan resource. This name must: - be
  2740  // between 1 and 63 characters long (inclusive) - consist of only lower-case
  2741  // ASCII letters, numbers, and dashes - start with a lower-case letter - end
  2742  // with a lower-case letter or number - be unique within the set of BackupPlans
  2743  // in this location
  2744  func (c *ProjectsLocationsBackupPlansCreateCall) BackupPlanId(backupPlanId string) *ProjectsLocationsBackupPlansCreateCall {
  2745  	c.urlParams_.Set("backupPlanId", backupPlanId)
  2746  	return c
  2747  }
  2748  
  2749  // Fields allows partial responses to be retrieved. See
  2750  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2751  // details.
  2752  func (c *ProjectsLocationsBackupPlansCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupPlansCreateCall {
  2753  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2754  	return c
  2755  }
  2756  
  2757  // Context sets the context to be used in this call's Do method.
  2758  func (c *ProjectsLocationsBackupPlansCreateCall) Context(ctx context.Context) *ProjectsLocationsBackupPlansCreateCall {
  2759  	c.ctx_ = ctx
  2760  	return c
  2761  }
  2762  
  2763  // Header returns a http.Header that can be modified by the caller to add
  2764  // headers to the request.
  2765  func (c *ProjectsLocationsBackupPlansCreateCall) Header() http.Header {
  2766  	if c.header_ == nil {
  2767  		c.header_ = make(http.Header)
  2768  	}
  2769  	return c.header_
  2770  }
  2771  
  2772  func (c *ProjectsLocationsBackupPlansCreateCall) doRequest(alt string) (*http.Response, error) {
  2773  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2774  	var body io.Reader = nil
  2775  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.backupplan)
  2776  	if err != nil {
  2777  		return nil, err
  2778  	}
  2779  	c.urlParams_.Set("alt", alt)
  2780  	c.urlParams_.Set("prettyPrint", "false")
  2781  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/backupPlans")
  2782  	urls += "?" + c.urlParams_.Encode()
  2783  	req, err := http.NewRequest("POST", urls, body)
  2784  	if err != nil {
  2785  		return nil, err
  2786  	}
  2787  	req.Header = reqHeaders
  2788  	googleapi.Expand(req.URL, map[string]string{
  2789  		"parent": c.parent,
  2790  	})
  2791  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2792  }
  2793  
  2794  // Do executes the "gkebackup.projects.locations.backupPlans.create" call.
  2795  // Any non-2xx status code is an error. Response headers are in either
  2796  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  2797  // returned at all) in error.(*googleapi.Error).Header. Use
  2798  // googleapi.IsNotModified to check whether the returned error was because
  2799  // http.StatusNotModified was returned.
  2800  func (c *ProjectsLocationsBackupPlansCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  2801  	gensupport.SetOptions(c.urlParams_, opts...)
  2802  	res, err := c.doRequest("json")
  2803  	if res != nil && res.StatusCode == http.StatusNotModified {
  2804  		if res.Body != nil {
  2805  			res.Body.Close()
  2806  		}
  2807  		return nil, gensupport.WrapError(&googleapi.Error{
  2808  			Code:   res.StatusCode,
  2809  			Header: res.Header,
  2810  		})
  2811  	}
  2812  	if err != nil {
  2813  		return nil, err
  2814  	}
  2815  	defer googleapi.CloseBody(res)
  2816  	if err := googleapi.CheckResponse(res); err != nil {
  2817  		return nil, gensupport.WrapError(err)
  2818  	}
  2819  	ret := &GoogleLongrunningOperation{
  2820  		ServerResponse: googleapi.ServerResponse{
  2821  			Header:         res.Header,
  2822  			HTTPStatusCode: res.StatusCode,
  2823  		},
  2824  	}
  2825  	target := &ret
  2826  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2827  		return nil, err
  2828  	}
  2829  	return ret, nil
  2830  }
  2831  
  2832  type ProjectsLocationsBackupPlansDeleteCall struct {
  2833  	s          *Service
  2834  	name       string
  2835  	urlParams_ gensupport.URLParams
  2836  	ctx_       context.Context
  2837  	header_    http.Header
  2838  }
  2839  
  2840  // Delete: Deletes an existing BackupPlan.
  2841  //
  2842  //   - name: Fully qualified BackupPlan name. Format:
  2843  //     `projects/*/locations/*/backupPlans/*`.
  2844  func (r *ProjectsLocationsBackupPlansService) Delete(name string) *ProjectsLocationsBackupPlansDeleteCall {
  2845  	c := &ProjectsLocationsBackupPlansDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2846  	c.name = name
  2847  	return c
  2848  }
  2849  
  2850  // Etag sets the optional parameter "etag": If provided, this value must match
  2851  // the current value of the target BackupPlan's etag field or the request is
  2852  // rejected.
  2853  func (c *ProjectsLocationsBackupPlansDeleteCall) Etag(etag string) *ProjectsLocationsBackupPlansDeleteCall {
  2854  	c.urlParams_.Set("etag", etag)
  2855  	return c
  2856  }
  2857  
  2858  // Fields allows partial responses to be retrieved. See
  2859  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2860  // details.
  2861  func (c *ProjectsLocationsBackupPlansDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupPlansDeleteCall {
  2862  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2863  	return c
  2864  }
  2865  
  2866  // Context sets the context to be used in this call's Do method.
  2867  func (c *ProjectsLocationsBackupPlansDeleteCall) Context(ctx context.Context) *ProjectsLocationsBackupPlansDeleteCall {
  2868  	c.ctx_ = ctx
  2869  	return c
  2870  }
  2871  
  2872  // Header returns a http.Header that can be modified by the caller to add
  2873  // headers to the request.
  2874  func (c *ProjectsLocationsBackupPlansDeleteCall) Header() http.Header {
  2875  	if c.header_ == nil {
  2876  		c.header_ = make(http.Header)
  2877  	}
  2878  	return c.header_
  2879  }
  2880  
  2881  func (c *ProjectsLocationsBackupPlansDeleteCall) doRequest(alt string) (*http.Response, error) {
  2882  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2883  	var body io.Reader = nil
  2884  	c.urlParams_.Set("alt", alt)
  2885  	c.urlParams_.Set("prettyPrint", "false")
  2886  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  2887  	urls += "?" + c.urlParams_.Encode()
  2888  	req, err := http.NewRequest("DELETE", urls, body)
  2889  	if err != nil {
  2890  		return nil, err
  2891  	}
  2892  	req.Header = reqHeaders
  2893  	googleapi.Expand(req.URL, map[string]string{
  2894  		"name": c.name,
  2895  	})
  2896  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2897  }
  2898  
  2899  // Do executes the "gkebackup.projects.locations.backupPlans.delete" call.
  2900  // Any non-2xx status code is an error. Response headers are in either
  2901  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  2902  // returned at all) in error.(*googleapi.Error).Header. Use
  2903  // googleapi.IsNotModified to check whether the returned error was because
  2904  // http.StatusNotModified was returned.
  2905  func (c *ProjectsLocationsBackupPlansDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  2906  	gensupport.SetOptions(c.urlParams_, opts...)
  2907  	res, err := c.doRequest("json")
  2908  	if res != nil && res.StatusCode == http.StatusNotModified {
  2909  		if res.Body != nil {
  2910  			res.Body.Close()
  2911  		}
  2912  		return nil, gensupport.WrapError(&googleapi.Error{
  2913  			Code:   res.StatusCode,
  2914  			Header: res.Header,
  2915  		})
  2916  	}
  2917  	if err != nil {
  2918  		return nil, err
  2919  	}
  2920  	defer googleapi.CloseBody(res)
  2921  	if err := googleapi.CheckResponse(res); err != nil {
  2922  		return nil, gensupport.WrapError(err)
  2923  	}
  2924  	ret := &GoogleLongrunningOperation{
  2925  		ServerResponse: googleapi.ServerResponse{
  2926  			Header:         res.Header,
  2927  			HTTPStatusCode: res.StatusCode,
  2928  		},
  2929  	}
  2930  	target := &ret
  2931  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2932  		return nil, err
  2933  	}
  2934  	return ret, nil
  2935  }
  2936  
  2937  type ProjectsLocationsBackupPlansGetCall struct {
  2938  	s            *Service
  2939  	name         string
  2940  	urlParams_   gensupport.URLParams
  2941  	ifNoneMatch_ string
  2942  	ctx_         context.Context
  2943  	header_      http.Header
  2944  }
  2945  
  2946  // Get: Retrieve the details of a single BackupPlan.
  2947  //
  2948  //   - name: Fully qualified BackupPlan name. Format:
  2949  //     `projects/*/locations/*/backupPlans/*`.
  2950  func (r *ProjectsLocationsBackupPlansService) Get(name string) *ProjectsLocationsBackupPlansGetCall {
  2951  	c := &ProjectsLocationsBackupPlansGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2952  	c.name = name
  2953  	return c
  2954  }
  2955  
  2956  // Fields allows partial responses to be retrieved. See
  2957  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2958  // details.
  2959  func (c *ProjectsLocationsBackupPlansGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupPlansGetCall {
  2960  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2961  	return c
  2962  }
  2963  
  2964  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2965  // object's ETag matches the given value. This is useful for getting updates
  2966  // only after the object has changed since the last request.
  2967  func (c *ProjectsLocationsBackupPlansGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsBackupPlansGetCall {
  2968  	c.ifNoneMatch_ = entityTag
  2969  	return c
  2970  }
  2971  
  2972  // Context sets the context to be used in this call's Do method.
  2973  func (c *ProjectsLocationsBackupPlansGetCall) Context(ctx context.Context) *ProjectsLocationsBackupPlansGetCall {
  2974  	c.ctx_ = ctx
  2975  	return c
  2976  }
  2977  
  2978  // Header returns a http.Header that can be modified by the caller to add
  2979  // headers to the request.
  2980  func (c *ProjectsLocationsBackupPlansGetCall) Header() http.Header {
  2981  	if c.header_ == nil {
  2982  		c.header_ = make(http.Header)
  2983  	}
  2984  	return c.header_
  2985  }
  2986  
  2987  func (c *ProjectsLocationsBackupPlansGetCall) doRequest(alt string) (*http.Response, error) {
  2988  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2989  	if c.ifNoneMatch_ != "" {
  2990  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2991  	}
  2992  	var body io.Reader = nil
  2993  	c.urlParams_.Set("alt", alt)
  2994  	c.urlParams_.Set("prettyPrint", "false")
  2995  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  2996  	urls += "?" + c.urlParams_.Encode()
  2997  	req, err := http.NewRequest("GET", urls, body)
  2998  	if err != nil {
  2999  		return nil, err
  3000  	}
  3001  	req.Header = reqHeaders
  3002  	googleapi.Expand(req.URL, map[string]string{
  3003  		"name": c.name,
  3004  	})
  3005  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3006  }
  3007  
  3008  // Do executes the "gkebackup.projects.locations.backupPlans.get" call.
  3009  // Any non-2xx status code is an error. Response headers are in either
  3010  // *BackupPlan.ServerResponse.Header or (if a response was returned at all) in
  3011  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3012  // whether the returned error was because http.StatusNotModified was returned.
  3013  func (c *ProjectsLocationsBackupPlansGetCall) Do(opts ...googleapi.CallOption) (*BackupPlan, error) {
  3014  	gensupport.SetOptions(c.urlParams_, opts...)
  3015  	res, err := c.doRequest("json")
  3016  	if res != nil && res.StatusCode == http.StatusNotModified {
  3017  		if res.Body != nil {
  3018  			res.Body.Close()
  3019  		}
  3020  		return nil, gensupport.WrapError(&googleapi.Error{
  3021  			Code:   res.StatusCode,
  3022  			Header: res.Header,
  3023  		})
  3024  	}
  3025  	if err != nil {
  3026  		return nil, err
  3027  	}
  3028  	defer googleapi.CloseBody(res)
  3029  	if err := googleapi.CheckResponse(res); err != nil {
  3030  		return nil, gensupport.WrapError(err)
  3031  	}
  3032  	ret := &BackupPlan{
  3033  		ServerResponse: googleapi.ServerResponse{
  3034  			Header:         res.Header,
  3035  			HTTPStatusCode: res.StatusCode,
  3036  		},
  3037  	}
  3038  	target := &ret
  3039  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3040  		return nil, err
  3041  	}
  3042  	return ret, nil
  3043  }
  3044  
  3045  type ProjectsLocationsBackupPlansGetIamPolicyCall struct {
  3046  	s            *Service
  3047  	resource     string
  3048  	urlParams_   gensupport.URLParams
  3049  	ifNoneMatch_ string
  3050  	ctx_         context.Context
  3051  	header_      http.Header
  3052  }
  3053  
  3054  // GetIamPolicy: Gets the access control policy for a resource. Returns an
  3055  // empty policy if the resource exists and does not have a policy set.
  3056  //
  3057  //   - resource: REQUIRED: The resource for which the policy is being requested.
  3058  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  3059  //     for the appropriate value for this field.
  3060  func (r *ProjectsLocationsBackupPlansService) GetIamPolicy(resource string) *ProjectsLocationsBackupPlansGetIamPolicyCall {
  3061  	c := &ProjectsLocationsBackupPlansGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3062  	c.resource = resource
  3063  	return c
  3064  }
  3065  
  3066  // OptionsRequestedPolicyVersion sets the optional parameter
  3067  // "options.requestedPolicyVersion": The maximum policy version that will be
  3068  // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
  3069  // an invalid value will be rejected. Requests for policies with any
  3070  // conditional role bindings must specify version 3. Policies with no
  3071  // conditional role bindings may specify any valid value or leave the field
  3072  // unset. The policy in the response might use the policy version that you
  3073  // specified, or it might use a lower policy version. For example, if you
  3074  // specify version 3, but the policy has no conditional role bindings, the
  3075  // response uses version 1. To learn which resources support conditions in
  3076  // their IAM policies, see the IAM documentation
  3077  // (https://cloud.google.com/iam/help/conditions/resource-policies).
  3078  func (c *ProjectsLocationsBackupPlansGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsBackupPlansGetIamPolicyCall {
  3079  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
  3080  	return c
  3081  }
  3082  
  3083  // Fields allows partial responses to be retrieved. See
  3084  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3085  // details.
  3086  func (c *ProjectsLocationsBackupPlansGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupPlansGetIamPolicyCall {
  3087  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3088  	return c
  3089  }
  3090  
  3091  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3092  // object's ETag matches the given value. This is useful for getting updates
  3093  // only after the object has changed since the last request.
  3094  func (c *ProjectsLocationsBackupPlansGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsBackupPlansGetIamPolicyCall {
  3095  	c.ifNoneMatch_ = entityTag
  3096  	return c
  3097  }
  3098  
  3099  // Context sets the context to be used in this call's Do method.
  3100  func (c *ProjectsLocationsBackupPlansGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsBackupPlansGetIamPolicyCall {
  3101  	c.ctx_ = ctx
  3102  	return c
  3103  }
  3104  
  3105  // Header returns a http.Header that can be modified by the caller to add
  3106  // headers to the request.
  3107  func (c *ProjectsLocationsBackupPlansGetIamPolicyCall) Header() http.Header {
  3108  	if c.header_ == nil {
  3109  		c.header_ = make(http.Header)
  3110  	}
  3111  	return c.header_
  3112  }
  3113  
  3114  func (c *ProjectsLocationsBackupPlansGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  3115  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3116  	if c.ifNoneMatch_ != "" {
  3117  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3118  	}
  3119  	var body io.Reader = nil
  3120  	c.urlParams_.Set("alt", alt)
  3121  	c.urlParams_.Set("prettyPrint", "false")
  3122  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
  3123  	urls += "?" + c.urlParams_.Encode()
  3124  	req, err := http.NewRequest("GET", urls, body)
  3125  	if err != nil {
  3126  		return nil, err
  3127  	}
  3128  	req.Header = reqHeaders
  3129  	googleapi.Expand(req.URL, map[string]string{
  3130  		"resource": c.resource,
  3131  	})
  3132  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3133  }
  3134  
  3135  // Do executes the "gkebackup.projects.locations.backupPlans.getIamPolicy" call.
  3136  // Any non-2xx status code is an error. Response headers are in either
  3137  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  3138  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3139  // whether the returned error was because http.StatusNotModified was returned.
  3140  func (c *ProjectsLocationsBackupPlansGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  3141  	gensupport.SetOptions(c.urlParams_, opts...)
  3142  	res, err := c.doRequest("json")
  3143  	if res != nil && res.StatusCode == http.StatusNotModified {
  3144  		if res.Body != nil {
  3145  			res.Body.Close()
  3146  		}
  3147  		return nil, gensupport.WrapError(&googleapi.Error{
  3148  			Code:   res.StatusCode,
  3149  			Header: res.Header,
  3150  		})
  3151  	}
  3152  	if err != nil {
  3153  		return nil, err
  3154  	}
  3155  	defer googleapi.CloseBody(res)
  3156  	if err := googleapi.CheckResponse(res); err != nil {
  3157  		return nil, gensupport.WrapError(err)
  3158  	}
  3159  	ret := &Policy{
  3160  		ServerResponse: googleapi.ServerResponse{
  3161  			Header:         res.Header,
  3162  			HTTPStatusCode: res.StatusCode,
  3163  		},
  3164  	}
  3165  	target := &ret
  3166  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3167  		return nil, err
  3168  	}
  3169  	return ret, nil
  3170  }
  3171  
  3172  type ProjectsLocationsBackupPlansListCall struct {
  3173  	s            *Service
  3174  	parent       string
  3175  	urlParams_   gensupport.URLParams
  3176  	ifNoneMatch_ string
  3177  	ctx_         context.Context
  3178  	header_      http.Header
  3179  }
  3180  
  3181  // List: Lists BackupPlans in a given location.
  3182  //
  3183  //   - parent: The location that contains the BackupPlans to list. Format:
  3184  //     `projects/*/locations/*`.
  3185  func (r *ProjectsLocationsBackupPlansService) List(parent string) *ProjectsLocationsBackupPlansListCall {
  3186  	c := &ProjectsLocationsBackupPlansListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3187  	c.parent = parent
  3188  	return c
  3189  }
  3190  
  3191  // Filter sets the optional parameter "filter": Field match expression used to
  3192  // filter the results.
  3193  func (c *ProjectsLocationsBackupPlansListCall) Filter(filter string) *ProjectsLocationsBackupPlansListCall {
  3194  	c.urlParams_.Set("filter", filter)
  3195  	return c
  3196  }
  3197  
  3198  // OrderBy sets the optional parameter "orderBy": Field by which to sort the
  3199  // results.
  3200  func (c *ProjectsLocationsBackupPlansListCall) OrderBy(orderBy string) *ProjectsLocationsBackupPlansListCall {
  3201  	c.urlParams_.Set("orderBy", orderBy)
  3202  	return c
  3203  }
  3204  
  3205  // PageSize sets the optional parameter "pageSize": The target number of
  3206  // results to return in a single response. If not specified, a default value
  3207  // will be chosen by the service. Note that the response may include a partial
  3208  // list and a caller should only rely on the response's next_page_token to
  3209  // determine if there are more instances left to be queried.
  3210  func (c *ProjectsLocationsBackupPlansListCall) PageSize(pageSize int64) *ProjectsLocationsBackupPlansListCall {
  3211  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3212  	return c
  3213  }
  3214  
  3215  // PageToken sets the optional parameter "pageToken": The value of
  3216  // next_page_token received from a previous `ListBackupPlans` call. Provide
  3217  // this to retrieve the subsequent page in a multi-page list of results. When
  3218  // paginating, all other parameters provided to `ListBackupPlans` must match
  3219  // the call that provided the page token.
  3220  func (c *ProjectsLocationsBackupPlansListCall) PageToken(pageToken string) *ProjectsLocationsBackupPlansListCall {
  3221  	c.urlParams_.Set("pageToken", pageToken)
  3222  	return c
  3223  }
  3224  
  3225  // Fields allows partial responses to be retrieved. See
  3226  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3227  // details.
  3228  func (c *ProjectsLocationsBackupPlansListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupPlansListCall {
  3229  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3230  	return c
  3231  }
  3232  
  3233  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3234  // object's ETag matches the given value. This is useful for getting updates
  3235  // only after the object has changed since the last request.
  3236  func (c *ProjectsLocationsBackupPlansListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBackupPlansListCall {
  3237  	c.ifNoneMatch_ = entityTag
  3238  	return c
  3239  }
  3240  
  3241  // Context sets the context to be used in this call's Do method.
  3242  func (c *ProjectsLocationsBackupPlansListCall) Context(ctx context.Context) *ProjectsLocationsBackupPlansListCall {
  3243  	c.ctx_ = ctx
  3244  	return c
  3245  }
  3246  
  3247  // Header returns a http.Header that can be modified by the caller to add
  3248  // headers to the request.
  3249  func (c *ProjectsLocationsBackupPlansListCall) Header() http.Header {
  3250  	if c.header_ == nil {
  3251  		c.header_ = make(http.Header)
  3252  	}
  3253  	return c.header_
  3254  }
  3255  
  3256  func (c *ProjectsLocationsBackupPlansListCall) doRequest(alt string) (*http.Response, error) {
  3257  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3258  	if c.ifNoneMatch_ != "" {
  3259  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3260  	}
  3261  	var body io.Reader = nil
  3262  	c.urlParams_.Set("alt", alt)
  3263  	c.urlParams_.Set("prettyPrint", "false")
  3264  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/backupPlans")
  3265  	urls += "?" + c.urlParams_.Encode()
  3266  	req, err := http.NewRequest("GET", urls, body)
  3267  	if err != nil {
  3268  		return nil, err
  3269  	}
  3270  	req.Header = reqHeaders
  3271  	googleapi.Expand(req.URL, map[string]string{
  3272  		"parent": c.parent,
  3273  	})
  3274  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3275  }
  3276  
  3277  // Do executes the "gkebackup.projects.locations.backupPlans.list" call.
  3278  // Any non-2xx status code is an error. Response headers are in either
  3279  // *ListBackupPlansResponse.ServerResponse.Header or (if a response was
  3280  // returned at all) in error.(*googleapi.Error).Header. Use
  3281  // googleapi.IsNotModified to check whether the returned error was because
  3282  // http.StatusNotModified was returned.
  3283  func (c *ProjectsLocationsBackupPlansListCall) Do(opts ...googleapi.CallOption) (*ListBackupPlansResponse, error) {
  3284  	gensupport.SetOptions(c.urlParams_, opts...)
  3285  	res, err := c.doRequest("json")
  3286  	if res != nil && res.StatusCode == http.StatusNotModified {
  3287  		if res.Body != nil {
  3288  			res.Body.Close()
  3289  		}
  3290  		return nil, gensupport.WrapError(&googleapi.Error{
  3291  			Code:   res.StatusCode,
  3292  			Header: res.Header,
  3293  		})
  3294  	}
  3295  	if err != nil {
  3296  		return nil, err
  3297  	}
  3298  	defer googleapi.CloseBody(res)
  3299  	if err := googleapi.CheckResponse(res); err != nil {
  3300  		return nil, gensupport.WrapError(err)
  3301  	}
  3302  	ret := &ListBackupPlansResponse{
  3303  		ServerResponse: googleapi.ServerResponse{
  3304  			Header:         res.Header,
  3305  			HTTPStatusCode: res.StatusCode,
  3306  		},
  3307  	}
  3308  	target := &ret
  3309  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3310  		return nil, err
  3311  	}
  3312  	return ret, nil
  3313  }
  3314  
  3315  // Pages invokes f for each page of results.
  3316  // A non-nil error returned from f will halt the iteration.
  3317  // The provided context supersedes any context provided to the Context method.
  3318  func (c *ProjectsLocationsBackupPlansListCall) Pages(ctx context.Context, f func(*ListBackupPlansResponse) error) error {
  3319  	c.ctx_ = ctx
  3320  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3321  	for {
  3322  		x, err := c.Do()
  3323  		if err != nil {
  3324  			return err
  3325  		}
  3326  		if err := f(x); err != nil {
  3327  			return err
  3328  		}
  3329  		if x.NextPageToken == "" {
  3330  			return nil
  3331  		}
  3332  		c.PageToken(x.NextPageToken)
  3333  	}
  3334  }
  3335  
  3336  type ProjectsLocationsBackupPlansPatchCall struct {
  3337  	s          *Service
  3338  	name       string
  3339  	backupplan *BackupPlan
  3340  	urlParams_ gensupport.URLParams
  3341  	ctx_       context.Context
  3342  	header_    http.Header
  3343  }
  3344  
  3345  // Patch: Update a BackupPlan.
  3346  //
  3347  //   - name: Output only. The full name of the BackupPlan resource. Format:
  3348  //     `projects/*/locations/*/backupPlans/*`.
  3349  func (r *ProjectsLocationsBackupPlansService) Patch(name string, backupplan *BackupPlan) *ProjectsLocationsBackupPlansPatchCall {
  3350  	c := &ProjectsLocationsBackupPlansPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3351  	c.name = name
  3352  	c.backupplan = backupplan
  3353  	return c
  3354  }
  3355  
  3356  // UpdateMask sets the optional parameter "updateMask": This is used to specify
  3357  // the fields to be overwritten in the BackupPlan targeted for update. The
  3358  // values for each of these updated fields will be taken from the `backup_plan`
  3359  // provided with this request. Field names are relative to the root of the
  3360  // resource (e.g., `description`, `backup_config.include_volume_data`, etc.) If
  3361  // no `update_mask` is provided, all fields in `backup_plan` will be written to
  3362  // the target BackupPlan resource. Note that OUTPUT_ONLY and IMMUTABLE fields
  3363  // in `backup_plan` are ignored and are not used to update the target
  3364  // BackupPlan.
  3365  func (c *ProjectsLocationsBackupPlansPatchCall) UpdateMask(updateMask string) *ProjectsLocationsBackupPlansPatchCall {
  3366  	c.urlParams_.Set("updateMask", updateMask)
  3367  	return c
  3368  }
  3369  
  3370  // Fields allows partial responses to be retrieved. See
  3371  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3372  // details.
  3373  func (c *ProjectsLocationsBackupPlansPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupPlansPatchCall {
  3374  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3375  	return c
  3376  }
  3377  
  3378  // Context sets the context to be used in this call's Do method.
  3379  func (c *ProjectsLocationsBackupPlansPatchCall) Context(ctx context.Context) *ProjectsLocationsBackupPlansPatchCall {
  3380  	c.ctx_ = ctx
  3381  	return c
  3382  }
  3383  
  3384  // Header returns a http.Header that can be modified by the caller to add
  3385  // headers to the request.
  3386  func (c *ProjectsLocationsBackupPlansPatchCall) Header() http.Header {
  3387  	if c.header_ == nil {
  3388  		c.header_ = make(http.Header)
  3389  	}
  3390  	return c.header_
  3391  }
  3392  
  3393  func (c *ProjectsLocationsBackupPlansPatchCall) doRequest(alt string) (*http.Response, error) {
  3394  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3395  	var body io.Reader = nil
  3396  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.backupplan)
  3397  	if err != nil {
  3398  		return nil, err
  3399  	}
  3400  	c.urlParams_.Set("alt", alt)
  3401  	c.urlParams_.Set("prettyPrint", "false")
  3402  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3403  	urls += "?" + c.urlParams_.Encode()
  3404  	req, err := http.NewRequest("PATCH", urls, body)
  3405  	if err != nil {
  3406  		return nil, err
  3407  	}
  3408  	req.Header = reqHeaders
  3409  	googleapi.Expand(req.URL, map[string]string{
  3410  		"name": c.name,
  3411  	})
  3412  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3413  }
  3414  
  3415  // Do executes the "gkebackup.projects.locations.backupPlans.patch" call.
  3416  // Any non-2xx status code is an error. Response headers are in either
  3417  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  3418  // returned at all) in error.(*googleapi.Error).Header. Use
  3419  // googleapi.IsNotModified to check whether the returned error was because
  3420  // http.StatusNotModified was returned.
  3421  func (c *ProjectsLocationsBackupPlansPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  3422  	gensupport.SetOptions(c.urlParams_, opts...)
  3423  	res, err := c.doRequest("json")
  3424  	if res != nil && res.StatusCode == http.StatusNotModified {
  3425  		if res.Body != nil {
  3426  			res.Body.Close()
  3427  		}
  3428  		return nil, gensupport.WrapError(&googleapi.Error{
  3429  			Code:   res.StatusCode,
  3430  			Header: res.Header,
  3431  		})
  3432  	}
  3433  	if err != nil {
  3434  		return nil, err
  3435  	}
  3436  	defer googleapi.CloseBody(res)
  3437  	if err := googleapi.CheckResponse(res); err != nil {
  3438  		return nil, gensupport.WrapError(err)
  3439  	}
  3440  	ret := &GoogleLongrunningOperation{
  3441  		ServerResponse: googleapi.ServerResponse{
  3442  			Header:         res.Header,
  3443  			HTTPStatusCode: res.StatusCode,
  3444  		},
  3445  	}
  3446  	target := &ret
  3447  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3448  		return nil, err
  3449  	}
  3450  	return ret, nil
  3451  }
  3452  
  3453  type ProjectsLocationsBackupPlansSetIamPolicyCall struct {
  3454  	s                   *Service
  3455  	resource            string
  3456  	setiampolicyrequest *SetIamPolicyRequest
  3457  	urlParams_          gensupport.URLParams
  3458  	ctx_                context.Context
  3459  	header_             http.Header
  3460  }
  3461  
  3462  // SetIamPolicy: Sets the access control policy on the specified resource.
  3463  // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
  3464  // and `PERMISSION_DENIED` errors.
  3465  //
  3466  //   - resource: REQUIRED: The resource for which the policy is being specified.
  3467  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  3468  //     for the appropriate value for this field.
  3469  func (r *ProjectsLocationsBackupPlansService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsBackupPlansSetIamPolicyCall {
  3470  	c := &ProjectsLocationsBackupPlansSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3471  	c.resource = resource
  3472  	c.setiampolicyrequest = setiampolicyrequest
  3473  	return c
  3474  }
  3475  
  3476  // Fields allows partial responses to be retrieved. See
  3477  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3478  // details.
  3479  func (c *ProjectsLocationsBackupPlansSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupPlansSetIamPolicyCall {
  3480  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3481  	return c
  3482  }
  3483  
  3484  // Context sets the context to be used in this call's Do method.
  3485  func (c *ProjectsLocationsBackupPlansSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsBackupPlansSetIamPolicyCall {
  3486  	c.ctx_ = ctx
  3487  	return c
  3488  }
  3489  
  3490  // Header returns a http.Header that can be modified by the caller to add
  3491  // headers to the request.
  3492  func (c *ProjectsLocationsBackupPlansSetIamPolicyCall) Header() http.Header {
  3493  	if c.header_ == nil {
  3494  		c.header_ = make(http.Header)
  3495  	}
  3496  	return c.header_
  3497  }
  3498  
  3499  func (c *ProjectsLocationsBackupPlansSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  3500  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3501  	var body io.Reader = nil
  3502  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  3503  	if err != nil {
  3504  		return nil, err
  3505  	}
  3506  	c.urlParams_.Set("alt", alt)
  3507  	c.urlParams_.Set("prettyPrint", "false")
  3508  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
  3509  	urls += "?" + c.urlParams_.Encode()
  3510  	req, err := http.NewRequest("POST", urls, body)
  3511  	if err != nil {
  3512  		return nil, err
  3513  	}
  3514  	req.Header = reqHeaders
  3515  	googleapi.Expand(req.URL, map[string]string{
  3516  		"resource": c.resource,
  3517  	})
  3518  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3519  }
  3520  
  3521  // Do executes the "gkebackup.projects.locations.backupPlans.setIamPolicy" call.
  3522  // Any non-2xx status code is an error. Response headers are in either
  3523  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  3524  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3525  // whether the returned error was because http.StatusNotModified was returned.
  3526  func (c *ProjectsLocationsBackupPlansSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  3527  	gensupport.SetOptions(c.urlParams_, opts...)
  3528  	res, err := c.doRequest("json")
  3529  	if res != nil && res.StatusCode == http.StatusNotModified {
  3530  		if res.Body != nil {
  3531  			res.Body.Close()
  3532  		}
  3533  		return nil, gensupport.WrapError(&googleapi.Error{
  3534  			Code:   res.StatusCode,
  3535  			Header: res.Header,
  3536  		})
  3537  	}
  3538  	if err != nil {
  3539  		return nil, err
  3540  	}
  3541  	defer googleapi.CloseBody(res)
  3542  	if err := googleapi.CheckResponse(res); err != nil {
  3543  		return nil, gensupport.WrapError(err)
  3544  	}
  3545  	ret := &Policy{
  3546  		ServerResponse: googleapi.ServerResponse{
  3547  			Header:         res.Header,
  3548  			HTTPStatusCode: res.StatusCode,
  3549  		},
  3550  	}
  3551  	target := &ret
  3552  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3553  		return nil, err
  3554  	}
  3555  	return ret, nil
  3556  }
  3557  
  3558  type ProjectsLocationsBackupPlansTestIamPermissionsCall struct {
  3559  	s                         *Service
  3560  	resource                  string
  3561  	testiampermissionsrequest *TestIamPermissionsRequest
  3562  	urlParams_                gensupport.URLParams
  3563  	ctx_                      context.Context
  3564  	header_                   http.Header
  3565  }
  3566  
  3567  // TestIamPermissions: Returns permissions that a caller has on the specified
  3568  // resource. If the resource does not exist, this will return an empty set of
  3569  // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
  3570  // used for building permission-aware UIs and command-line tools, not for
  3571  // authorization checking. This operation may "fail open" without warning.
  3572  //
  3573  //   - resource: REQUIRED: The resource for which the policy detail is being
  3574  //     requested. See Resource names
  3575  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
  3576  //     value for this field.
  3577  func (r *ProjectsLocationsBackupPlansService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsBackupPlansTestIamPermissionsCall {
  3578  	c := &ProjectsLocationsBackupPlansTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3579  	c.resource = resource
  3580  	c.testiampermissionsrequest = testiampermissionsrequest
  3581  	return c
  3582  }
  3583  
  3584  // Fields allows partial responses to be retrieved. See
  3585  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3586  // details.
  3587  func (c *ProjectsLocationsBackupPlansTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupPlansTestIamPermissionsCall {
  3588  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3589  	return c
  3590  }
  3591  
  3592  // Context sets the context to be used in this call's Do method.
  3593  func (c *ProjectsLocationsBackupPlansTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsBackupPlansTestIamPermissionsCall {
  3594  	c.ctx_ = ctx
  3595  	return c
  3596  }
  3597  
  3598  // Header returns a http.Header that can be modified by the caller to add
  3599  // headers to the request.
  3600  func (c *ProjectsLocationsBackupPlansTestIamPermissionsCall) Header() http.Header {
  3601  	if c.header_ == nil {
  3602  		c.header_ = make(http.Header)
  3603  	}
  3604  	return c.header_
  3605  }
  3606  
  3607  func (c *ProjectsLocationsBackupPlansTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  3608  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3609  	var body io.Reader = nil
  3610  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  3611  	if err != nil {
  3612  		return nil, err
  3613  	}
  3614  	c.urlParams_.Set("alt", alt)
  3615  	c.urlParams_.Set("prettyPrint", "false")
  3616  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
  3617  	urls += "?" + c.urlParams_.Encode()
  3618  	req, err := http.NewRequest("POST", urls, body)
  3619  	if err != nil {
  3620  		return nil, err
  3621  	}
  3622  	req.Header = reqHeaders
  3623  	googleapi.Expand(req.URL, map[string]string{
  3624  		"resource": c.resource,
  3625  	})
  3626  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3627  }
  3628  
  3629  // Do executes the "gkebackup.projects.locations.backupPlans.testIamPermissions" call.
  3630  // Any non-2xx status code is an error. Response headers are in either
  3631  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
  3632  // returned at all) in error.(*googleapi.Error).Header. Use
  3633  // googleapi.IsNotModified to check whether the returned error was because
  3634  // http.StatusNotModified was returned.
  3635  func (c *ProjectsLocationsBackupPlansTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  3636  	gensupport.SetOptions(c.urlParams_, opts...)
  3637  	res, err := c.doRequest("json")
  3638  	if res != nil && res.StatusCode == http.StatusNotModified {
  3639  		if res.Body != nil {
  3640  			res.Body.Close()
  3641  		}
  3642  		return nil, gensupport.WrapError(&googleapi.Error{
  3643  			Code:   res.StatusCode,
  3644  			Header: res.Header,
  3645  		})
  3646  	}
  3647  	if err != nil {
  3648  		return nil, err
  3649  	}
  3650  	defer googleapi.CloseBody(res)
  3651  	if err := googleapi.CheckResponse(res); err != nil {
  3652  		return nil, gensupport.WrapError(err)
  3653  	}
  3654  	ret := &TestIamPermissionsResponse{
  3655  		ServerResponse: googleapi.ServerResponse{
  3656  			Header:         res.Header,
  3657  			HTTPStatusCode: res.StatusCode,
  3658  		},
  3659  	}
  3660  	target := &ret
  3661  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3662  		return nil, err
  3663  	}
  3664  	return ret, nil
  3665  }
  3666  
  3667  type ProjectsLocationsBackupPlansBackupsCreateCall struct {
  3668  	s          *Service
  3669  	parent     string
  3670  	backup     *Backup
  3671  	urlParams_ gensupport.URLParams
  3672  	ctx_       context.Context
  3673  	header_    http.Header
  3674  }
  3675  
  3676  // Create: Creates a Backup for the given BackupPlan.
  3677  //
  3678  //   - parent: The BackupPlan within which to create the Backup. Format:
  3679  //     `projects/*/locations/*/backupPlans/*`.
  3680  func (r *ProjectsLocationsBackupPlansBackupsService) Create(parent string, backup *Backup) *ProjectsLocationsBackupPlansBackupsCreateCall {
  3681  	c := &ProjectsLocationsBackupPlansBackupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3682  	c.parent = parent
  3683  	c.backup = backup
  3684  	return c
  3685  }
  3686  
  3687  // BackupId sets the optional parameter "backupId": The client-provided short
  3688  // name for the Backup resource. This name must: - be between 1 and 63
  3689  // characters long (inclusive) - consist of only lower-case ASCII letters,
  3690  // numbers, and dashes - start with a lower-case letter - end with a lower-case
  3691  // letter or number - be unique within the set of Backups in this BackupPlan
  3692  func (c *ProjectsLocationsBackupPlansBackupsCreateCall) BackupId(backupId string) *ProjectsLocationsBackupPlansBackupsCreateCall {
  3693  	c.urlParams_.Set("backupId", backupId)
  3694  	return c
  3695  }
  3696  
  3697  // Fields allows partial responses to be retrieved. See
  3698  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3699  // details.
  3700  func (c *ProjectsLocationsBackupPlansBackupsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupPlansBackupsCreateCall {
  3701  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3702  	return c
  3703  }
  3704  
  3705  // Context sets the context to be used in this call's Do method.
  3706  func (c *ProjectsLocationsBackupPlansBackupsCreateCall) Context(ctx context.Context) *ProjectsLocationsBackupPlansBackupsCreateCall {
  3707  	c.ctx_ = ctx
  3708  	return c
  3709  }
  3710  
  3711  // Header returns a http.Header that can be modified by the caller to add
  3712  // headers to the request.
  3713  func (c *ProjectsLocationsBackupPlansBackupsCreateCall) Header() http.Header {
  3714  	if c.header_ == nil {
  3715  		c.header_ = make(http.Header)
  3716  	}
  3717  	return c.header_
  3718  }
  3719  
  3720  func (c *ProjectsLocationsBackupPlansBackupsCreateCall) doRequest(alt string) (*http.Response, error) {
  3721  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3722  	var body io.Reader = nil
  3723  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.backup)
  3724  	if err != nil {
  3725  		return nil, err
  3726  	}
  3727  	c.urlParams_.Set("alt", alt)
  3728  	c.urlParams_.Set("prettyPrint", "false")
  3729  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/backups")
  3730  	urls += "?" + c.urlParams_.Encode()
  3731  	req, err := http.NewRequest("POST", urls, body)
  3732  	if err != nil {
  3733  		return nil, err
  3734  	}
  3735  	req.Header = reqHeaders
  3736  	googleapi.Expand(req.URL, map[string]string{
  3737  		"parent": c.parent,
  3738  	})
  3739  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3740  }
  3741  
  3742  // Do executes the "gkebackup.projects.locations.backupPlans.backups.create" call.
  3743  // Any non-2xx status code is an error. Response headers are in either
  3744  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  3745  // returned at all) in error.(*googleapi.Error).Header. Use
  3746  // googleapi.IsNotModified to check whether the returned error was because
  3747  // http.StatusNotModified was returned.
  3748  func (c *ProjectsLocationsBackupPlansBackupsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  3749  	gensupport.SetOptions(c.urlParams_, opts...)
  3750  	res, err := c.doRequest("json")
  3751  	if res != nil && res.StatusCode == http.StatusNotModified {
  3752  		if res.Body != nil {
  3753  			res.Body.Close()
  3754  		}
  3755  		return nil, gensupport.WrapError(&googleapi.Error{
  3756  			Code:   res.StatusCode,
  3757  			Header: res.Header,
  3758  		})
  3759  	}
  3760  	if err != nil {
  3761  		return nil, err
  3762  	}
  3763  	defer googleapi.CloseBody(res)
  3764  	if err := googleapi.CheckResponse(res); err != nil {
  3765  		return nil, gensupport.WrapError(err)
  3766  	}
  3767  	ret := &GoogleLongrunningOperation{
  3768  		ServerResponse: googleapi.ServerResponse{
  3769  			Header:         res.Header,
  3770  			HTTPStatusCode: res.StatusCode,
  3771  		},
  3772  	}
  3773  	target := &ret
  3774  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3775  		return nil, err
  3776  	}
  3777  	return ret, nil
  3778  }
  3779  
  3780  type ProjectsLocationsBackupPlansBackupsDeleteCall struct {
  3781  	s          *Service
  3782  	name       string
  3783  	urlParams_ gensupport.URLParams
  3784  	ctx_       context.Context
  3785  	header_    http.Header
  3786  }
  3787  
  3788  // Delete: Deletes an existing Backup.
  3789  //
  3790  //   - name: Name of the Backup resource. Format:
  3791  //     `projects/*/locations/*/backupPlans/*/backups/*`.
  3792  func (r *ProjectsLocationsBackupPlansBackupsService) Delete(name string) *ProjectsLocationsBackupPlansBackupsDeleteCall {
  3793  	c := &ProjectsLocationsBackupPlansBackupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3794  	c.name = name
  3795  	return c
  3796  }
  3797  
  3798  // Etag sets the optional parameter "etag": If provided, this value must match
  3799  // the current value of the target Backup's etag field or the request is
  3800  // rejected.
  3801  func (c *ProjectsLocationsBackupPlansBackupsDeleteCall) Etag(etag string) *ProjectsLocationsBackupPlansBackupsDeleteCall {
  3802  	c.urlParams_.Set("etag", etag)
  3803  	return c
  3804  }
  3805  
  3806  // Force sets the optional parameter "force": If set to true, any VolumeBackups
  3807  // below this Backup will also be deleted. Otherwise, the request will only
  3808  // succeed if the Backup has no VolumeBackups.
  3809  func (c *ProjectsLocationsBackupPlansBackupsDeleteCall) Force(force bool) *ProjectsLocationsBackupPlansBackupsDeleteCall {
  3810  	c.urlParams_.Set("force", fmt.Sprint(force))
  3811  	return c
  3812  }
  3813  
  3814  // Fields allows partial responses to be retrieved. See
  3815  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3816  // details.
  3817  func (c *ProjectsLocationsBackupPlansBackupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupPlansBackupsDeleteCall {
  3818  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3819  	return c
  3820  }
  3821  
  3822  // Context sets the context to be used in this call's Do method.
  3823  func (c *ProjectsLocationsBackupPlansBackupsDeleteCall) Context(ctx context.Context) *ProjectsLocationsBackupPlansBackupsDeleteCall {
  3824  	c.ctx_ = ctx
  3825  	return c
  3826  }
  3827  
  3828  // Header returns a http.Header that can be modified by the caller to add
  3829  // headers to the request.
  3830  func (c *ProjectsLocationsBackupPlansBackupsDeleteCall) Header() http.Header {
  3831  	if c.header_ == nil {
  3832  		c.header_ = make(http.Header)
  3833  	}
  3834  	return c.header_
  3835  }
  3836  
  3837  func (c *ProjectsLocationsBackupPlansBackupsDeleteCall) doRequest(alt string) (*http.Response, error) {
  3838  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3839  	var body io.Reader = nil
  3840  	c.urlParams_.Set("alt", alt)
  3841  	c.urlParams_.Set("prettyPrint", "false")
  3842  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3843  	urls += "?" + c.urlParams_.Encode()
  3844  	req, err := http.NewRequest("DELETE", urls, body)
  3845  	if err != nil {
  3846  		return nil, err
  3847  	}
  3848  	req.Header = reqHeaders
  3849  	googleapi.Expand(req.URL, map[string]string{
  3850  		"name": c.name,
  3851  	})
  3852  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3853  }
  3854  
  3855  // Do executes the "gkebackup.projects.locations.backupPlans.backups.delete" call.
  3856  // Any non-2xx status code is an error. Response headers are in either
  3857  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  3858  // returned at all) in error.(*googleapi.Error).Header. Use
  3859  // googleapi.IsNotModified to check whether the returned error was because
  3860  // http.StatusNotModified was returned.
  3861  func (c *ProjectsLocationsBackupPlansBackupsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  3862  	gensupport.SetOptions(c.urlParams_, opts...)
  3863  	res, err := c.doRequest("json")
  3864  	if res != nil && res.StatusCode == http.StatusNotModified {
  3865  		if res.Body != nil {
  3866  			res.Body.Close()
  3867  		}
  3868  		return nil, gensupport.WrapError(&googleapi.Error{
  3869  			Code:   res.StatusCode,
  3870  			Header: res.Header,
  3871  		})
  3872  	}
  3873  	if err != nil {
  3874  		return nil, err
  3875  	}
  3876  	defer googleapi.CloseBody(res)
  3877  	if err := googleapi.CheckResponse(res); err != nil {
  3878  		return nil, gensupport.WrapError(err)
  3879  	}
  3880  	ret := &GoogleLongrunningOperation{
  3881  		ServerResponse: googleapi.ServerResponse{
  3882  			Header:         res.Header,
  3883  			HTTPStatusCode: res.StatusCode,
  3884  		},
  3885  	}
  3886  	target := &ret
  3887  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3888  		return nil, err
  3889  	}
  3890  	return ret, nil
  3891  }
  3892  
  3893  type ProjectsLocationsBackupPlansBackupsGetCall struct {
  3894  	s            *Service
  3895  	name         string
  3896  	urlParams_   gensupport.URLParams
  3897  	ifNoneMatch_ string
  3898  	ctx_         context.Context
  3899  	header_      http.Header
  3900  }
  3901  
  3902  // Get: Retrieve the details of a single Backup.
  3903  //
  3904  //   - name: Full name of the Backup resource. Format:
  3905  //     `projects/*/locations/*/backupPlans/*/backups/*`.
  3906  func (r *ProjectsLocationsBackupPlansBackupsService) Get(name string) *ProjectsLocationsBackupPlansBackupsGetCall {
  3907  	c := &ProjectsLocationsBackupPlansBackupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3908  	c.name = name
  3909  	return c
  3910  }
  3911  
  3912  // Fields allows partial responses to be retrieved. See
  3913  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3914  // details.
  3915  func (c *ProjectsLocationsBackupPlansBackupsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupPlansBackupsGetCall {
  3916  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3917  	return c
  3918  }
  3919  
  3920  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3921  // object's ETag matches the given value. This is useful for getting updates
  3922  // only after the object has changed since the last request.
  3923  func (c *ProjectsLocationsBackupPlansBackupsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsBackupPlansBackupsGetCall {
  3924  	c.ifNoneMatch_ = entityTag
  3925  	return c
  3926  }
  3927  
  3928  // Context sets the context to be used in this call's Do method.
  3929  func (c *ProjectsLocationsBackupPlansBackupsGetCall) Context(ctx context.Context) *ProjectsLocationsBackupPlansBackupsGetCall {
  3930  	c.ctx_ = ctx
  3931  	return c
  3932  }
  3933  
  3934  // Header returns a http.Header that can be modified by the caller to add
  3935  // headers to the request.
  3936  func (c *ProjectsLocationsBackupPlansBackupsGetCall) Header() http.Header {
  3937  	if c.header_ == nil {
  3938  		c.header_ = make(http.Header)
  3939  	}
  3940  	return c.header_
  3941  }
  3942  
  3943  func (c *ProjectsLocationsBackupPlansBackupsGetCall) doRequest(alt string) (*http.Response, error) {
  3944  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3945  	if c.ifNoneMatch_ != "" {
  3946  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3947  	}
  3948  	var body io.Reader = nil
  3949  	c.urlParams_.Set("alt", alt)
  3950  	c.urlParams_.Set("prettyPrint", "false")
  3951  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3952  	urls += "?" + c.urlParams_.Encode()
  3953  	req, err := http.NewRequest("GET", urls, body)
  3954  	if err != nil {
  3955  		return nil, err
  3956  	}
  3957  	req.Header = reqHeaders
  3958  	googleapi.Expand(req.URL, map[string]string{
  3959  		"name": c.name,
  3960  	})
  3961  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3962  }
  3963  
  3964  // Do executes the "gkebackup.projects.locations.backupPlans.backups.get" call.
  3965  // Any non-2xx status code is an error. Response headers are in either
  3966  // *Backup.ServerResponse.Header or (if a response was returned at all) in
  3967  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3968  // whether the returned error was because http.StatusNotModified was returned.
  3969  func (c *ProjectsLocationsBackupPlansBackupsGetCall) Do(opts ...googleapi.CallOption) (*Backup, error) {
  3970  	gensupport.SetOptions(c.urlParams_, opts...)
  3971  	res, err := c.doRequest("json")
  3972  	if res != nil && res.StatusCode == http.StatusNotModified {
  3973  		if res.Body != nil {
  3974  			res.Body.Close()
  3975  		}
  3976  		return nil, gensupport.WrapError(&googleapi.Error{
  3977  			Code:   res.StatusCode,
  3978  			Header: res.Header,
  3979  		})
  3980  	}
  3981  	if err != nil {
  3982  		return nil, err
  3983  	}
  3984  	defer googleapi.CloseBody(res)
  3985  	if err := googleapi.CheckResponse(res); err != nil {
  3986  		return nil, gensupport.WrapError(err)
  3987  	}
  3988  	ret := &Backup{
  3989  		ServerResponse: googleapi.ServerResponse{
  3990  			Header:         res.Header,
  3991  			HTTPStatusCode: res.StatusCode,
  3992  		},
  3993  	}
  3994  	target := &ret
  3995  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3996  		return nil, err
  3997  	}
  3998  	return ret, nil
  3999  }
  4000  
  4001  type ProjectsLocationsBackupPlansBackupsGetBackupIndexDownloadUrlCall struct {
  4002  	s            *Service
  4003  	backup       string
  4004  	urlParams_   gensupport.URLParams
  4005  	ifNoneMatch_ string
  4006  	ctx_         context.Context
  4007  	header_      http.Header
  4008  }
  4009  
  4010  // GetBackupIndexDownloadUrl: Retrieve the link to the backupIndex.
  4011  //
  4012  //   - backup: Full name of Backup resource. Format:
  4013  //     projects/{project}/locations/{location}/backupPlans/{backup_plan}/backups/{
  4014  //     backup}.
  4015  func (r *ProjectsLocationsBackupPlansBackupsService) GetBackupIndexDownloadUrl(backup string) *ProjectsLocationsBackupPlansBackupsGetBackupIndexDownloadUrlCall {
  4016  	c := &ProjectsLocationsBackupPlansBackupsGetBackupIndexDownloadUrlCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4017  	c.backup = backup
  4018  	return c
  4019  }
  4020  
  4021  // Fields allows partial responses to be retrieved. See
  4022  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4023  // details.
  4024  func (c *ProjectsLocationsBackupPlansBackupsGetBackupIndexDownloadUrlCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupPlansBackupsGetBackupIndexDownloadUrlCall {
  4025  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4026  	return c
  4027  }
  4028  
  4029  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4030  // object's ETag matches the given value. This is useful for getting updates
  4031  // only after the object has changed since the last request.
  4032  func (c *ProjectsLocationsBackupPlansBackupsGetBackupIndexDownloadUrlCall) IfNoneMatch(entityTag string) *ProjectsLocationsBackupPlansBackupsGetBackupIndexDownloadUrlCall {
  4033  	c.ifNoneMatch_ = entityTag
  4034  	return c
  4035  }
  4036  
  4037  // Context sets the context to be used in this call's Do method.
  4038  func (c *ProjectsLocationsBackupPlansBackupsGetBackupIndexDownloadUrlCall) Context(ctx context.Context) *ProjectsLocationsBackupPlansBackupsGetBackupIndexDownloadUrlCall {
  4039  	c.ctx_ = ctx
  4040  	return c
  4041  }
  4042  
  4043  // Header returns a http.Header that can be modified by the caller to add
  4044  // headers to the request.
  4045  func (c *ProjectsLocationsBackupPlansBackupsGetBackupIndexDownloadUrlCall) Header() http.Header {
  4046  	if c.header_ == nil {
  4047  		c.header_ = make(http.Header)
  4048  	}
  4049  	return c.header_
  4050  }
  4051  
  4052  func (c *ProjectsLocationsBackupPlansBackupsGetBackupIndexDownloadUrlCall) doRequest(alt string) (*http.Response, error) {
  4053  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4054  	if c.ifNoneMatch_ != "" {
  4055  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4056  	}
  4057  	var body io.Reader = nil
  4058  	c.urlParams_.Set("alt", alt)
  4059  	c.urlParams_.Set("prettyPrint", "false")
  4060  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+backup}:getBackupIndexDownloadUrl")
  4061  	urls += "?" + c.urlParams_.Encode()
  4062  	req, err := http.NewRequest("GET", urls, body)
  4063  	if err != nil {
  4064  		return nil, err
  4065  	}
  4066  	req.Header = reqHeaders
  4067  	googleapi.Expand(req.URL, map[string]string{
  4068  		"backup": c.backup,
  4069  	})
  4070  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4071  }
  4072  
  4073  // Do executes the "gkebackup.projects.locations.backupPlans.backups.getBackupIndexDownloadUrl" call.
  4074  // Any non-2xx status code is an error. Response headers are in either
  4075  // *GetBackupIndexDownloadUrlResponse.ServerResponse.Header or (if a response
  4076  // was returned at all) in error.(*googleapi.Error).Header. Use
  4077  // googleapi.IsNotModified to check whether the returned error was because
  4078  // http.StatusNotModified was returned.
  4079  func (c *ProjectsLocationsBackupPlansBackupsGetBackupIndexDownloadUrlCall) Do(opts ...googleapi.CallOption) (*GetBackupIndexDownloadUrlResponse, error) {
  4080  	gensupport.SetOptions(c.urlParams_, opts...)
  4081  	res, err := c.doRequest("json")
  4082  	if res != nil && res.StatusCode == http.StatusNotModified {
  4083  		if res.Body != nil {
  4084  			res.Body.Close()
  4085  		}
  4086  		return nil, gensupport.WrapError(&googleapi.Error{
  4087  			Code:   res.StatusCode,
  4088  			Header: res.Header,
  4089  		})
  4090  	}
  4091  	if err != nil {
  4092  		return nil, err
  4093  	}
  4094  	defer googleapi.CloseBody(res)
  4095  	if err := googleapi.CheckResponse(res); err != nil {
  4096  		return nil, gensupport.WrapError(err)
  4097  	}
  4098  	ret := &GetBackupIndexDownloadUrlResponse{
  4099  		ServerResponse: googleapi.ServerResponse{
  4100  			Header:         res.Header,
  4101  			HTTPStatusCode: res.StatusCode,
  4102  		},
  4103  	}
  4104  	target := &ret
  4105  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4106  		return nil, err
  4107  	}
  4108  	return ret, nil
  4109  }
  4110  
  4111  type ProjectsLocationsBackupPlansBackupsGetIamPolicyCall struct {
  4112  	s            *Service
  4113  	resource     string
  4114  	urlParams_   gensupport.URLParams
  4115  	ifNoneMatch_ string
  4116  	ctx_         context.Context
  4117  	header_      http.Header
  4118  }
  4119  
  4120  // GetIamPolicy: Gets the access control policy for a resource. Returns an
  4121  // empty policy if the resource exists and does not have a policy set.
  4122  //
  4123  //   - resource: REQUIRED: The resource for which the policy is being requested.
  4124  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  4125  //     for the appropriate value for this field.
  4126  func (r *ProjectsLocationsBackupPlansBackupsService) GetIamPolicy(resource string) *ProjectsLocationsBackupPlansBackupsGetIamPolicyCall {
  4127  	c := &ProjectsLocationsBackupPlansBackupsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4128  	c.resource = resource
  4129  	return c
  4130  }
  4131  
  4132  // OptionsRequestedPolicyVersion sets the optional parameter
  4133  // "options.requestedPolicyVersion": The maximum policy version that will be
  4134  // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
  4135  // an invalid value will be rejected. Requests for policies with any
  4136  // conditional role bindings must specify version 3. Policies with no
  4137  // conditional role bindings may specify any valid value or leave the field
  4138  // unset. The policy in the response might use the policy version that you
  4139  // specified, or it might use a lower policy version. For example, if you
  4140  // specify version 3, but the policy has no conditional role bindings, the
  4141  // response uses version 1. To learn which resources support conditions in
  4142  // their IAM policies, see the IAM documentation
  4143  // (https://cloud.google.com/iam/help/conditions/resource-policies).
  4144  func (c *ProjectsLocationsBackupPlansBackupsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsBackupPlansBackupsGetIamPolicyCall {
  4145  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
  4146  	return c
  4147  }
  4148  
  4149  // Fields allows partial responses to be retrieved. See
  4150  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4151  // details.
  4152  func (c *ProjectsLocationsBackupPlansBackupsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupPlansBackupsGetIamPolicyCall {
  4153  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4154  	return c
  4155  }
  4156  
  4157  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4158  // object's ETag matches the given value. This is useful for getting updates
  4159  // only after the object has changed since the last request.
  4160  func (c *ProjectsLocationsBackupPlansBackupsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsBackupPlansBackupsGetIamPolicyCall {
  4161  	c.ifNoneMatch_ = entityTag
  4162  	return c
  4163  }
  4164  
  4165  // Context sets the context to be used in this call's Do method.
  4166  func (c *ProjectsLocationsBackupPlansBackupsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsBackupPlansBackupsGetIamPolicyCall {
  4167  	c.ctx_ = ctx
  4168  	return c
  4169  }
  4170  
  4171  // Header returns a http.Header that can be modified by the caller to add
  4172  // headers to the request.
  4173  func (c *ProjectsLocationsBackupPlansBackupsGetIamPolicyCall) Header() http.Header {
  4174  	if c.header_ == nil {
  4175  		c.header_ = make(http.Header)
  4176  	}
  4177  	return c.header_
  4178  }
  4179  
  4180  func (c *ProjectsLocationsBackupPlansBackupsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  4181  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4182  	if c.ifNoneMatch_ != "" {
  4183  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4184  	}
  4185  	var body io.Reader = nil
  4186  	c.urlParams_.Set("alt", alt)
  4187  	c.urlParams_.Set("prettyPrint", "false")
  4188  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
  4189  	urls += "?" + c.urlParams_.Encode()
  4190  	req, err := http.NewRequest("GET", urls, body)
  4191  	if err != nil {
  4192  		return nil, err
  4193  	}
  4194  	req.Header = reqHeaders
  4195  	googleapi.Expand(req.URL, map[string]string{
  4196  		"resource": c.resource,
  4197  	})
  4198  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4199  }
  4200  
  4201  // Do executes the "gkebackup.projects.locations.backupPlans.backups.getIamPolicy" call.
  4202  // Any non-2xx status code is an error. Response headers are in either
  4203  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  4204  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4205  // whether the returned error was because http.StatusNotModified was returned.
  4206  func (c *ProjectsLocationsBackupPlansBackupsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  4207  	gensupport.SetOptions(c.urlParams_, opts...)
  4208  	res, err := c.doRequest("json")
  4209  	if res != nil && res.StatusCode == http.StatusNotModified {
  4210  		if res.Body != nil {
  4211  			res.Body.Close()
  4212  		}
  4213  		return nil, gensupport.WrapError(&googleapi.Error{
  4214  			Code:   res.StatusCode,
  4215  			Header: res.Header,
  4216  		})
  4217  	}
  4218  	if err != nil {
  4219  		return nil, err
  4220  	}
  4221  	defer googleapi.CloseBody(res)
  4222  	if err := googleapi.CheckResponse(res); err != nil {
  4223  		return nil, gensupport.WrapError(err)
  4224  	}
  4225  	ret := &Policy{
  4226  		ServerResponse: googleapi.ServerResponse{
  4227  			Header:         res.Header,
  4228  			HTTPStatusCode: res.StatusCode,
  4229  		},
  4230  	}
  4231  	target := &ret
  4232  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4233  		return nil, err
  4234  	}
  4235  	return ret, nil
  4236  }
  4237  
  4238  type ProjectsLocationsBackupPlansBackupsListCall struct {
  4239  	s            *Service
  4240  	parent       string
  4241  	urlParams_   gensupport.URLParams
  4242  	ifNoneMatch_ string
  4243  	ctx_         context.Context
  4244  	header_      http.Header
  4245  }
  4246  
  4247  // List: Lists the Backups for a given BackupPlan.
  4248  //
  4249  //   - parent: The BackupPlan that contains the Backups to list. Format:
  4250  //     `projects/*/locations/*/backupPlans/*`.
  4251  func (r *ProjectsLocationsBackupPlansBackupsService) List(parent string) *ProjectsLocationsBackupPlansBackupsListCall {
  4252  	c := &ProjectsLocationsBackupPlansBackupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4253  	c.parent = parent
  4254  	return c
  4255  }
  4256  
  4257  // Filter sets the optional parameter "filter": Field match expression used to
  4258  // filter the results.
  4259  func (c *ProjectsLocationsBackupPlansBackupsListCall) Filter(filter string) *ProjectsLocationsBackupPlansBackupsListCall {
  4260  	c.urlParams_.Set("filter", filter)
  4261  	return c
  4262  }
  4263  
  4264  // OrderBy sets the optional parameter "orderBy": Field by which to sort the
  4265  // results.
  4266  func (c *ProjectsLocationsBackupPlansBackupsListCall) OrderBy(orderBy string) *ProjectsLocationsBackupPlansBackupsListCall {
  4267  	c.urlParams_.Set("orderBy", orderBy)
  4268  	return c
  4269  }
  4270  
  4271  // PageSize sets the optional parameter "pageSize": The target number of
  4272  // results to return in a single response. If not specified, a default value
  4273  // will be chosen by the service. Note that the response may include a partial
  4274  // list and a caller should only rely on the response's next_page_token to
  4275  // determine if there are more instances left to be queried.
  4276  func (c *ProjectsLocationsBackupPlansBackupsListCall) PageSize(pageSize int64) *ProjectsLocationsBackupPlansBackupsListCall {
  4277  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4278  	return c
  4279  }
  4280  
  4281  // PageToken sets the optional parameter "pageToken": The value of
  4282  // next_page_token received from a previous `ListBackups` call. Provide this to
  4283  // retrieve the subsequent page in a multi-page list of results. When
  4284  // paginating, all other parameters provided to `ListBackups` must match the
  4285  // call that provided the page token.
  4286  func (c *ProjectsLocationsBackupPlansBackupsListCall) PageToken(pageToken string) *ProjectsLocationsBackupPlansBackupsListCall {
  4287  	c.urlParams_.Set("pageToken", pageToken)
  4288  	return c
  4289  }
  4290  
  4291  // Fields allows partial responses to be retrieved. See
  4292  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4293  // details.
  4294  func (c *ProjectsLocationsBackupPlansBackupsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupPlansBackupsListCall {
  4295  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4296  	return c
  4297  }
  4298  
  4299  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4300  // object's ETag matches the given value. This is useful for getting updates
  4301  // only after the object has changed since the last request.
  4302  func (c *ProjectsLocationsBackupPlansBackupsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBackupPlansBackupsListCall {
  4303  	c.ifNoneMatch_ = entityTag
  4304  	return c
  4305  }
  4306  
  4307  // Context sets the context to be used in this call's Do method.
  4308  func (c *ProjectsLocationsBackupPlansBackupsListCall) Context(ctx context.Context) *ProjectsLocationsBackupPlansBackupsListCall {
  4309  	c.ctx_ = ctx
  4310  	return c
  4311  }
  4312  
  4313  // Header returns a http.Header that can be modified by the caller to add
  4314  // headers to the request.
  4315  func (c *ProjectsLocationsBackupPlansBackupsListCall) Header() http.Header {
  4316  	if c.header_ == nil {
  4317  		c.header_ = make(http.Header)
  4318  	}
  4319  	return c.header_
  4320  }
  4321  
  4322  func (c *ProjectsLocationsBackupPlansBackupsListCall) doRequest(alt string) (*http.Response, error) {
  4323  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4324  	if c.ifNoneMatch_ != "" {
  4325  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4326  	}
  4327  	var body io.Reader = nil
  4328  	c.urlParams_.Set("alt", alt)
  4329  	c.urlParams_.Set("prettyPrint", "false")
  4330  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/backups")
  4331  	urls += "?" + c.urlParams_.Encode()
  4332  	req, err := http.NewRequest("GET", urls, body)
  4333  	if err != nil {
  4334  		return nil, err
  4335  	}
  4336  	req.Header = reqHeaders
  4337  	googleapi.Expand(req.URL, map[string]string{
  4338  		"parent": c.parent,
  4339  	})
  4340  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4341  }
  4342  
  4343  // Do executes the "gkebackup.projects.locations.backupPlans.backups.list" call.
  4344  // Any non-2xx status code is an error. Response headers are in either
  4345  // *ListBackupsResponse.ServerResponse.Header or (if a response was returned at
  4346  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4347  // check whether the returned error was because http.StatusNotModified was
  4348  // returned.
  4349  func (c *ProjectsLocationsBackupPlansBackupsListCall) Do(opts ...googleapi.CallOption) (*ListBackupsResponse, error) {
  4350  	gensupport.SetOptions(c.urlParams_, opts...)
  4351  	res, err := c.doRequest("json")
  4352  	if res != nil && res.StatusCode == http.StatusNotModified {
  4353  		if res.Body != nil {
  4354  			res.Body.Close()
  4355  		}
  4356  		return nil, gensupport.WrapError(&googleapi.Error{
  4357  			Code:   res.StatusCode,
  4358  			Header: res.Header,
  4359  		})
  4360  	}
  4361  	if err != nil {
  4362  		return nil, err
  4363  	}
  4364  	defer googleapi.CloseBody(res)
  4365  	if err := googleapi.CheckResponse(res); err != nil {
  4366  		return nil, gensupport.WrapError(err)
  4367  	}
  4368  	ret := &ListBackupsResponse{
  4369  		ServerResponse: googleapi.ServerResponse{
  4370  			Header:         res.Header,
  4371  			HTTPStatusCode: res.StatusCode,
  4372  		},
  4373  	}
  4374  	target := &ret
  4375  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4376  		return nil, err
  4377  	}
  4378  	return ret, nil
  4379  }
  4380  
  4381  // Pages invokes f for each page of results.
  4382  // A non-nil error returned from f will halt the iteration.
  4383  // The provided context supersedes any context provided to the Context method.
  4384  func (c *ProjectsLocationsBackupPlansBackupsListCall) Pages(ctx context.Context, f func(*ListBackupsResponse) error) error {
  4385  	c.ctx_ = ctx
  4386  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4387  	for {
  4388  		x, err := c.Do()
  4389  		if err != nil {
  4390  			return err
  4391  		}
  4392  		if err := f(x); err != nil {
  4393  			return err
  4394  		}
  4395  		if x.NextPageToken == "" {
  4396  			return nil
  4397  		}
  4398  		c.PageToken(x.NextPageToken)
  4399  	}
  4400  }
  4401  
  4402  type ProjectsLocationsBackupPlansBackupsPatchCall struct {
  4403  	s          *Service
  4404  	name       string
  4405  	backup     *Backup
  4406  	urlParams_ gensupport.URLParams
  4407  	ctx_       context.Context
  4408  	header_    http.Header
  4409  }
  4410  
  4411  // Patch: Update a Backup.
  4412  //
  4413  //   - name: Output only. The fully qualified name of the Backup.
  4414  //     `projects/*/locations/*/backupPlans/*/backups/*`.
  4415  func (r *ProjectsLocationsBackupPlansBackupsService) Patch(name string, backup *Backup) *ProjectsLocationsBackupPlansBackupsPatchCall {
  4416  	c := &ProjectsLocationsBackupPlansBackupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4417  	c.name = name
  4418  	c.backup = backup
  4419  	return c
  4420  }
  4421  
  4422  // UpdateMask sets the optional parameter "updateMask": This is used to specify
  4423  // the fields to be overwritten in the Backup targeted for update. The values
  4424  // for each of these updated fields will be taken from the `backup_plan`
  4425  // provided with this request. Field names are relative to the root of the
  4426  // resource. If no `update_mask` is provided, all fields in `backup` will be
  4427  // written to the target Backup resource. Note that OUTPUT_ONLY and IMMUTABLE
  4428  // fields in `backup` are ignored and are not used to update the target Backup.
  4429  func (c *ProjectsLocationsBackupPlansBackupsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsBackupPlansBackupsPatchCall {
  4430  	c.urlParams_.Set("updateMask", updateMask)
  4431  	return c
  4432  }
  4433  
  4434  // Fields allows partial responses to be retrieved. See
  4435  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4436  // details.
  4437  func (c *ProjectsLocationsBackupPlansBackupsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupPlansBackupsPatchCall {
  4438  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4439  	return c
  4440  }
  4441  
  4442  // Context sets the context to be used in this call's Do method.
  4443  func (c *ProjectsLocationsBackupPlansBackupsPatchCall) Context(ctx context.Context) *ProjectsLocationsBackupPlansBackupsPatchCall {
  4444  	c.ctx_ = ctx
  4445  	return c
  4446  }
  4447  
  4448  // Header returns a http.Header that can be modified by the caller to add
  4449  // headers to the request.
  4450  func (c *ProjectsLocationsBackupPlansBackupsPatchCall) Header() http.Header {
  4451  	if c.header_ == nil {
  4452  		c.header_ = make(http.Header)
  4453  	}
  4454  	return c.header_
  4455  }
  4456  
  4457  func (c *ProjectsLocationsBackupPlansBackupsPatchCall) doRequest(alt string) (*http.Response, error) {
  4458  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4459  	var body io.Reader = nil
  4460  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.backup)
  4461  	if err != nil {
  4462  		return nil, err
  4463  	}
  4464  	c.urlParams_.Set("alt", alt)
  4465  	c.urlParams_.Set("prettyPrint", "false")
  4466  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4467  	urls += "?" + c.urlParams_.Encode()
  4468  	req, err := http.NewRequest("PATCH", urls, body)
  4469  	if err != nil {
  4470  		return nil, err
  4471  	}
  4472  	req.Header = reqHeaders
  4473  	googleapi.Expand(req.URL, map[string]string{
  4474  		"name": c.name,
  4475  	})
  4476  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4477  }
  4478  
  4479  // Do executes the "gkebackup.projects.locations.backupPlans.backups.patch" call.
  4480  // Any non-2xx status code is an error. Response headers are in either
  4481  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  4482  // returned at all) in error.(*googleapi.Error).Header. Use
  4483  // googleapi.IsNotModified to check whether the returned error was because
  4484  // http.StatusNotModified was returned.
  4485  func (c *ProjectsLocationsBackupPlansBackupsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  4486  	gensupport.SetOptions(c.urlParams_, opts...)
  4487  	res, err := c.doRequest("json")
  4488  	if res != nil && res.StatusCode == http.StatusNotModified {
  4489  		if res.Body != nil {
  4490  			res.Body.Close()
  4491  		}
  4492  		return nil, gensupport.WrapError(&googleapi.Error{
  4493  			Code:   res.StatusCode,
  4494  			Header: res.Header,
  4495  		})
  4496  	}
  4497  	if err != nil {
  4498  		return nil, err
  4499  	}
  4500  	defer googleapi.CloseBody(res)
  4501  	if err := googleapi.CheckResponse(res); err != nil {
  4502  		return nil, gensupport.WrapError(err)
  4503  	}
  4504  	ret := &GoogleLongrunningOperation{
  4505  		ServerResponse: googleapi.ServerResponse{
  4506  			Header:         res.Header,
  4507  			HTTPStatusCode: res.StatusCode,
  4508  		},
  4509  	}
  4510  	target := &ret
  4511  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4512  		return nil, err
  4513  	}
  4514  	return ret, nil
  4515  }
  4516  
  4517  type ProjectsLocationsBackupPlansBackupsSetIamPolicyCall struct {
  4518  	s                   *Service
  4519  	resource            string
  4520  	setiampolicyrequest *SetIamPolicyRequest
  4521  	urlParams_          gensupport.URLParams
  4522  	ctx_                context.Context
  4523  	header_             http.Header
  4524  }
  4525  
  4526  // SetIamPolicy: Sets the access control policy on the specified resource.
  4527  // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
  4528  // and `PERMISSION_DENIED` errors.
  4529  //
  4530  //   - resource: REQUIRED: The resource for which the policy is being specified.
  4531  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  4532  //     for the appropriate value for this field.
  4533  func (r *ProjectsLocationsBackupPlansBackupsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsBackupPlansBackupsSetIamPolicyCall {
  4534  	c := &ProjectsLocationsBackupPlansBackupsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4535  	c.resource = resource
  4536  	c.setiampolicyrequest = setiampolicyrequest
  4537  	return c
  4538  }
  4539  
  4540  // Fields allows partial responses to be retrieved. See
  4541  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4542  // details.
  4543  func (c *ProjectsLocationsBackupPlansBackupsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupPlansBackupsSetIamPolicyCall {
  4544  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4545  	return c
  4546  }
  4547  
  4548  // Context sets the context to be used in this call's Do method.
  4549  func (c *ProjectsLocationsBackupPlansBackupsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsBackupPlansBackupsSetIamPolicyCall {
  4550  	c.ctx_ = ctx
  4551  	return c
  4552  }
  4553  
  4554  // Header returns a http.Header that can be modified by the caller to add
  4555  // headers to the request.
  4556  func (c *ProjectsLocationsBackupPlansBackupsSetIamPolicyCall) Header() http.Header {
  4557  	if c.header_ == nil {
  4558  		c.header_ = make(http.Header)
  4559  	}
  4560  	return c.header_
  4561  }
  4562  
  4563  func (c *ProjectsLocationsBackupPlansBackupsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  4564  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4565  	var body io.Reader = nil
  4566  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  4567  	if err != nil {
  4568  		return nil, err
  4569  	}
  4570  	c.urlParams_.Set("alt", alt)
  4571  	c.urlParams_.Set("prettyPrint", "false")
  4572  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
  4573  	urls += "?" + c.urlParams_.Encode()
  4574  	req, err := http.NewRequest("POST", urls, body)
  4575  	if err != nil {
  4576  		return nil, err
  4577  	}
  4578  	req.Header = reqHeaders
  4579  	googleapi.Expand(req.URL, map[string]string{
  4580  		"resource": c.resource,
  4581  	})
  4582  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4583  }
  4584  
  4585  // Do executes the "gkebackup.projects.locations.backupPlans.backups.setIamPolicy" call.
  4586  // Any non-2xx status code is an error. Response headers are in either
  4587  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  4588  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4589  // whether the returned error was because http.StatusNotModified was returned.
  4590  func (c *ProjectsLocationsBackupPlansBackupsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  4591  	gensupport.SetOptions(c.urlParams_, opts...)
  4592  	res, err := c.doRequest("json")
  4593  	if res != nil && res.StatusCode == http.StatusNotModified {
  4594  		if res.Body != nil {
  4595  			res.Body.Close()
  4596  		}
  4597  		return nil, gensupport.WrapError(&googleapi.Error{
  4598  			Code:   res.StatusCode,
  4599  			Header: res.Header,
  4600  		})
  4601  	}
  4602  	if err != nil {
  4603  		return nil, err
  4604  	}
  4605  	defer googleapi.CloseBody(res)
  4606  	if err := googleapi.CheckResponse(res); err != nil {
  4607  		return nil, gensupport.WrapError(err)
  4608  	}
  4609  	ret := &Policy{
  4610  		ServerResponse: googleapi.ServerResponse{
  4611  			Header:         res.Header,
  4612  			HTTPStatusCode: res.StatusCode,
  4613  		},
  4614  	}
  4615  	target := &ret
  4616  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4617  		return nil, err
  4618  	}
  4619  	return ret, nil
  4620  }
  4621  
  4622  type ProjectsLocationsBackupPlansBackupsTestIamPermissionsCall struct {
  4623  	s                         *Service
  4624  	resource                  string
  4625  	testiampermissionsrequest *TestIamPermissionsRequest
  4626  	urlParams_                gensupport.URLParams
  4627  	ctx_                      context.Context
  4628  	header_                   http.Header
  4629  }
  4630  
  4631  // TestIamPermissions: Returns permissions that a caller has on the specified
  4632  // resource. If the resource does not exist, this will return an empty set of
  4633  // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
  4634  // used for building permission-aware UIs and command-line tools, not for
  4635  // authorization checking. This operation may "fail open" without warning.
  4636  //
  4637  //   - resource: REQUIRED: The resource for which the policy detail is being
  4638  //     requested. See Resource names
  4639  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
  4640  //     value for this field.
  4641  func (r *ProjectsLocationsBackupPlansBackupsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsBackupPlansBackupsTestIamPermissionsCall {
  4642  	c := &ProjectsLocationsBackupPlansBackupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4643  	c.resource = resource
  4644  	c.testiampermissionsrequest = testiampermissionsrequest
  4645  	return c
  4646  }
  4647  
  4648  // Fields allows partial responses to be retrieved. See
  4649  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4650  // details.
  4651  func (c *ProjectsLocationsBackupPlansBackupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupPlansBackupsTestIamPermissionsCall {
  4652  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4653  	return c
  4654  }
  4655  
  4656  // Context sets the context to be used in this call's Do method.
  4657  func (c *ProjectsLocationsBackupPlansBackupsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsBackupPlansBackupsTestIamPermissionsCall {
  4658  	c.ctx_ = ctx
  4659  	return c
  4660  }
  4661  
  4662  // Header returns a http.Header that can be modified by the caller to add
  4663  // headers to the request.
  4664  func (c *ProjectsLocationsBackupPlansBackupsTestIamPermissionsCall) Header() http.Header {
  4665  	if c.header_ == nil {
  4666  		c.header_ = make(http.Header)
  4667  	}
  4668  	return c.header_
  4669  }
  4670  
  4671  func (c *ProjectsLocationsBackupPlansBackupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  4672  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4673  	var body io.Reader = nil
  4674  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  4675  	if err != nil {
  4676  		return nil, err
  4677  	}
  4678  	c.urlParams_.Set("alt", alt)
  4679  	c.urlParams_.Set("prettyPrint", "false")
  4680  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
  4681  	urls += "?" + c.urlParams_.Encode()
  4682  	req, err := http.NewRequest("POST", urls, body)
  4683  	if err != nil {
  4684  		return nil, err
  4685  	}
  4686  	req.Header = reqHeaders
  4687  	googleapi.Expand(req.URL, map[string]string{
  4688  		"resource": c.resource,
  4689  	})
  4690  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4691  }
  4692  
  4693  // Do executes the "gkebackup.projects.locations.backupPlans.backups.testIamPermissions" call.
  4694  // Any non-2xx status code is an error. Response headers are in either
  4695  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
  4696  // returned at all) in error.(*googleapi.Error).Header. Use
  4697  // googleapi.IsNotModified to check whether the returned error was because
  4698  // http.StatusNotModified was returned.
  4699  func (c *ProjectsLocationsBackupPlansBackupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  4700  	gensupport.SetOptions(c.urlParams_, opts...)
  4701  	res, err := c.doRequest("json")
  4702  	if res != nil && res.StatusCode == http.StatusNotModified {
  4703  		if res.Body != nil {
  4704  			res.Body.Close()
  4705  		}
  4706  		return nil, gensupport.WrapError(&googleapi.Error{
  4707  			Code:   res.StatusCode,
  4708  			Header: res.Header,
  4709  		})
  4710  	}
  4711  	if err != nil {
  4712  		return nil, err
  4713  	}
  4714  	defer googleapi.CloseBody(res)
  4715  	if err := googleapi.CheckResponse(res); err != nil {
  4716  		return nil, gensupport.WrapError(err)
  4717  	}
  4718  	ret := &TestIamPermissionsResponse{
  4719  		ServerResponse: googleapi.ServerResponse{
  4720  			Header:         res.Header,
  4721  			HTTPStatusCode: res.StatusCode,
  4722  		},
  4723  	}
  4724  	target := &ret
  4725  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4726  		return nil, err
  4727  	}
  4728  	return ret, nil
  4729  }
  4730  
  4731  type ProjectsLocationsBackupPlansBackupsVolumeBackupsGetCall struct {
  4732  	s            *Service
  4733  	name         string
  4734  	urlParams_   gensupport.URLParams
  4735  	ifNoneMatch_ string
  4736  	ctx_         context.Context
  4737  	header_      http.Header
  4738  }
  4739  
  4740  // Get: Retrieve the details of a single VolumeBackup.
  4741  //
  4742  //   - name: Full name of the VolumeBackup resource. Format:
  4743  //     `projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*`.
  4744  func (r *ProjectsLocationsBackupPlansBackupsVolumeBackupsService) Get(name string) *ProjectsLocationsBackupPlansBackupsVolumeBackupsGetCall {
  4745  	c := &ProjectsLocationsBackupPlansBackupsVolumeBackupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4746  	c.name = name
  4747  	return c
  4748  }
  4749  
  4750  // Fields allows partial responses to be retrieved. See
  4751  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4752  // details.
  4753  func (c *ProjectsLocationsBackupPlansBackupsVolumeBackupsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupPlansBackupsVolumeBackupsGetCall {
  4754  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4755  	return c
  4756  }
  4757  
  4758  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4759  // object's ETag matches the given value. This is useful for getting updates
  4760  // only after the object has changed since the last request.
  4761  func (c *ProjectsLocationsBackupPlansBackupsVolumeBackupsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsBackupPlansBackupsVolumeBackupsGetCall {
  4762  	c.ifNoneMatch_ = entityTag
  4763  	return c
  4764  }
  4765  
  4766  // Context sets the context to be used in this call's Do method.
  4767  func (c *ProjectsLocationsBackupPlansBackupsVolumeBackupsGetCall) Context(ctx context.Context) *ProjectsLocationsBackupPlansBackupsVolumeBackupsGetCall {
  4768  	c.ctx_ = ctx
  4769  	return c
  4770  }
  4771  
  4772  // Header returns a http.Header that can be modified by the caller to add
  4773  // headers to the request.
  4774  func (c *ProjectsLocationsBackupPlansBackupsVolumeBackupsGetCall) Header() http.Header {
  4775  	if c.header_ == nil {
  4776  		c.header_ = make(http.Header)
  4777  	}
  4778  	return c.header_
  4779  }
  4780  
  4781  func (c *ProjectsLocationsBackupPlansBackupsVolumeBackupsGetCall) doRequest(alt string) (*http.Response, error) {
  4782  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4783  	if c.ifNoneMatch_ != "" {
  4784  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4785  	}
  4786  	var body io.Reader = nil
  4787  	c.urlParams_.Set("alt", alt)
  4788  	c.urlParams_.Set("prettyPrint", "false")
  4789  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4790  	urls += "?" + c.urlParams_.Encode()
  4791  	req, err := http.NewRequest("GET", urls, body)
  4792  	if err != nil {
  4793  		return nil, err
  4794  	}
  4795  	req.Header = reqHeaders
  4796  	googleapi.Expand(req.URL, map[string]string{
  4797  		"name": c.name,
  4798  	})
  4799  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4800  }
  4801  
  4802  // Do executes the "gkebackup.projects.locations.backupPlans.backups.volumeBackups.get" call.
  4803  // Any non-2xx status code is an error. Response headers are in either
  4804  // *VolumeBackup.ServerResponse.Header or (if a response was returned at all)
  4805  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4806  // whether the returned error was because http.StatusNotModified was returned.
  4807  func (c *ProjectsLocationsBackupPlansBackupsVolumeBackupsGetCall) Do(opts ...googleapi.CallOption) (*VolumeBackup, error) {
  4808  	gensupport.SetOptions(c.urlParams_, opts...)
  4809  	res, err := c.doRequest("json")
  4810  	if res != nil && res.StatusCode == http.StatusNotModified {
  4811  		if res.Body != nil {
  4812  			res.Body.Close()
  4813  		}
  4814  		return nil, gensupport.WrapError(&googleapi.Error{
  4815  			Code:   res.StatusCode,
  4816  			Header: res.Header,
  4817  		})
  4818  	}
  4819  	if err != nil {
  4820  		return nil, err
  4821  	}
  4822  	defer googleapi.CloseBody(res)
  4823  	if err := googleapi.CheckResponse(res); err != nil {
  4824  		return nil, gensupport.WrapError(err)
  4825  	}
  4826  	ret := &VolumeBackup{
  4827  		ServerResponse: googleapi.ServerResponse{
  4828  			Header:         res.Header,
  4829  			HTTPStatusCode: res.StatusCode,
  4830  		},
  4831  	}
  4832  	target := &ret
  4833  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4834  		return nil, err
  4835  	}
  4836  	return ret, nil
  4837  }
  4838  
  4839  type ProjectsLocationsBackupPlansBackupsVolumeBackupsGetIamPolicyCall struct {
  4840  	s            *Service
  4841  	resource     string
  4842  	urlParams_   gensupport.URLParams
  4843  	ifNoneMatch_ string
  4844  	ctx_         context.Context
  4845  	header_      http.Header
  4846  }
  4847  
  4848  // GetIamPolicy: Gets the access control policy for a resource. Returns an
  4849  // empty policy if the resource exists and does not have a policy set.
  4850  //
  4851  //   - resource: REQUIRED: The resource for which the policy is being requested.
  4852  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  4853  //     for the appropriate value for this field.
  4854  func (r *ProjectsLocationsBackupPlansBackupsVolumeBackupsService) GetIamPolicy(resource string) *ProjectsLocationsBackupPlansBackupsVolumeBackupsGetIamPolicyCall {
  4855  	c := &ProjectsLocationsBackupPlansBackupsVolumeBackupsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4856  	c.resource = resource
  4857  	return c
  4858  }
  4859  
  4860  // OptionsRequestedPolicyVersion sets the optional parameter
  4861  // "options.requestedPolicyVersion": The maximum policy version that will be
  4862  // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
  4863  // an invalid value will be rejected. Requests for policies with any
  4864  // conditional role bindings must specify version 3. Policies with no
  4865  // conditional role bindings may specify any valid value or leave the field
  4866  // unset. The policy in the response might use the policy version that you
  4867  // specified, or it might use a lower policy version. For example, if you
  4868  // specify version 3, but the policy has no conditional role bindings, the
  4869  // response uses version 1. To learn which resources support conditions in
  4870  // their IAM policies, see the IAM documentation
  4871  // (https://cloud.google.com/iam/help/conditions/resource-policies).
  4872  func (c *ProjectsLocationsBackupPlansBackupsVolumeBackupsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsBackupPlansBackupsVolumeBackupsGetIamPolicyCall {
  4873  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
  4874  	return c
  4875  }
  4876  
  4877  // Fields allows partial responses to be retrieved. See
  4878  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4879  // details.
  4880  func (c *ProjectsLocationsBackupPlansBackupsVolumeBackupsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupPlansBackupsVolumeBackupsGetIamPolicyCall {
  4881  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4882  	return c
  4883  }
  4884  
  4885  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4886  // object's ETag matches the given value. This is useful for getting updates
  4887  // only after the object has changed since the last request.
  4888  func (c *ProjectsLocationsBackupPlansBackupsVolumeBackupsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsBackupPlansBackupsVolumeBackupsGetIamPolicyCall {
  4889  	c.ifNoneMatch_ = entityTag
  4890  	return c
  4891  }
  4892  
  4893  // Context sets the context to be used in this call's Do method.
  4894  func (c *ProjectsLocationsBackupPlansBackupsVolumeBackupsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsBackupPlansBackupsVolumeBackupsGetIamPolicyCall {
  4895  	c.ctx_ = ctx
  4896  	return c
  4897  }
  4898  
  4899  // Header returns a http.Header that can be modified by the caller to add
  4900  // headers to the request.
  4901  func (c *ProjectsLocationsBackupPlansBackupsVolumeBackupsGetIamPolicyCall) Header() http.Header {
  4902  	if c.header_ == nil {
  4903  		c.header_ = make(http.Header)
  4904  	}
  4905  	return c.header_
  4906  }
  4907  
  4908  func (c *ProjectsLocationsBackupPlansBackupsVolumeBackupsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  4909  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4910  	if c.ifNoneMatch_ != "" {
  4911  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4912  	}
  4913  	var body io.Reader = nil
  4914  	c.urlParams_.Set("alt", alt)
  4915  	c.urlParams_.Set("prettyPrint", "false")
  4916  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
  4917  	urls += "?" + c.urlParams_.Encode()
  4918  	req, err := http.NewRequest("GET", urls, body)
  4919  	if err != nil {
  4920  		return nil, err
  4921  	}
  4922  	req.Header = reqHeaders
  4923  	googleapi.Expand(req.URL, map[string]string{
  4924  		"resource": c.resource,
  4925  	})
  4926  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4927  }
  4928  
  4929  // Do executes the "gkebackup.projects.locations.backupPlans.backups.volumeBackups.getIamPolicy" call.
  4930  // Any non-2xx status code is an error. Response headers are in either
  4931  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  4932  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4933  // whether the returned error was because http.StatusNotModified was returned.
  4934  func (c *ProjectsLocationsBackupPlansBackupsVolumeBackupsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  4935  	gensupport.SetOptions(c.urlParams_, opts...)
  4936  	res, err := c.doRequest("json")
  4937  	if res != nil && res.StatusCode == http.StatusNotModified {
  4938  		if res.Body != nil {
  4939  			res.Body.Close()
  4940  		}
  4941  		return nil, gensupport.WrapError(&googleapi.Error{
  4942  			Code:   res.StatusCode,
  4943  			Header: res.Header,
  4944  		})
  4945  	}
  4946  	if err != nil {
  4947  		return nil, err
  4948  	}
  4949  	defer googleapi.CloseBody(res)
  4950  	if err := googleapi.CheckResponse(res); err != nil {
  4951  		return nil, gensupport.WrapError(err)
  4952  	}
  4953  	ret := &Policy{
  4954  		ServerResponse: googleapi.ServerResponse{
  4955  			Header:         res.Header,
  4956  			HTTPStatusCode: res.StatusCode,
  4957  		},
  4958  	}
  4959  	target := &ret
  4960  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4961  		return nil, err
  4962  	}
  4963  	return ret, nil
  4964  }
  4965  
  4966  type ProjectsLocationsBackupPlansBackupsVolumeBackupsListCall struct {
  4967  	s            *Service
  4968  	parent       string
  4969  	urlParams_   gensupport.URLParams
  4970  	ifNoneMatch_ string
  4971  	ctx_         context.Context
  4972  	header_      http.Header
  4973  }
  4974  
  4975  // List: Lists the VolumeBackups for a given Backup.
  4976  //
  4977  //   - parent: The Backup that contains the VolumeBackups to list. Format:
  4978  //     `projects/*/locations/*/backupPlans/*/backups/*`.
  4979  func (r *ProjectsLocationsBackupPlansBackupsVolumeBackupsService) List(parent string) *ProjectsLocationsBackupPlansBackupsVolumeBackupsListCall {
  4980  	c := &ProjectsLocationsBackupPlansBackupsVolumeBackupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4981  	c.parent = parent
  4982  	return c
  4983  }
  4984  
  4985  // Filter sets the optional parameter "filter": Field match expression used to
  4986  // filter the results.
  4987  func (c *ProjectsLocationsBackupPlansBackupsVolumeBackupsListCall) Filter(filter string) *ProjectsLocationsBackupPlansBackupsVolumeBackupsListCall {
  4988  	c.urlParams_.Set("filter", filter)
  4989  	return c
  4990  }
  4991  
  4992  // OrderBy sets the optional parameter "orderBy": Field by which to sort the
  4993  // results.
  4994  func (c *ProjectsLocationsBackupPlansBackupsVolumeBackupsListCall) OrderBy(orderBy string) *ProjectsLocationsBackupPlansBackupsVolumeBackupsListCall {
  4995  	c.urlParams_.Set("orderBy", orderBy)
  4996  	return c
  4997  }
  4998  
  4999  // PageSize sets the optional parameter "pageSize": The target number of
  5000  // results to return in a single response. If not specified, a default value
  5001  // will be chosen by the service. Note that the response may include a partial
  5002  // list and a caller should only rely on the response's next_page_token to
  5003  // determine if there are more instances left to be queried.
  5004  func (c *ProjectsLocationsBackupPlansBackupsVolumeBackupsListCall) PageSize(pageSize int64) *ProjectsLocationsBackupPlansBackupsVolumeBackupsListCall {
  5005  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5006  	return c
  5007  }
  5008  
  5009  // PageToken sets the optional parameter "pageToken": The value of
  5010  // next_page_token received from a previous `ListVolumeBackups` call. Provide
  5011  // this to retrieve the subsequent page in a multi-page list of results. When
  5012  // paginating, all other parameters provided to `ListVolumeBackups` must match
  5013  // the call that provided the page token.
  5014  func (c *ProjectsLocationsBackupPlansBackupsVolumeBackupsListCall) PageToken(pageToken string) *ProjectsLocationsBackupPlansBackupsVolumeBackupsListCall {
  5015  	c.urlParams_.Set("pageToken", pageToken)
  5016  	return c
  5017  }
  5018  
  5019  // Fields allows partial responses to be retrieved. See
  5020  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5021  // details.
  5022  func (c *ProjectsLocationsBackupPlansBackupsVolumeBackupsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupPlansBackupsVolumeBackupsListCall {
  5023  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5024  	return c
  5025  }
  5026  
  5027  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5028  // object's ETag matches the given value. This is useful for getting updates
  5029  // only after the object has changed since the last request.
  5030  func (c *ProjectsLocationsBackupPlansBackupsVolumeBackupsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBackupPlansBackupsVolumeBackupsListCall {
  5031  	c.ifNoneMatch_ = entityTag
  5032  	return c
  5033  }
  5034  
  5035  // Context sets the context to be used in this call's Do method.
  5036  func (c *ProjectsLocationsBackupPlansBackupsVolumeBackupsListCall) Context(ctx context.Context) *ProjectsLocationsBackupPlansBackupsVolumeBackupsListCall {
  5037  	c.ctx_ = ctx
  5038  	return c
  5039  }
  5040  
  5041  // Header returns a http.Header that can be modified by the caller to add
  5042  // headers to the request.
  5043  func (c *ProjectsLocationsBackupPlansBackupsVolumeBackupsListCall) Header() http.Header {
  5044  	if c.header_ == nil {
  5045  		c.header_ = make(http.Header)
  5046  	}
  5047  	return c.header_
  5048  }
  5049  
  5050  func (c *ProjectsLocationsBackupPlansBackupsVolumeBackupsListCall) doRequest(alt string) (*http.Response, error) {
  5051  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5052  	if c.ifNoneMatch_ != "" {
  5053  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5054  	}
  5055  	var body io.Reader = nil
  5056  	c.urlParams_.Set("alt", alt)
  5057  	c.urlParams_.Set("prettyPrint", "false")
  5058  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/volumeBackups")
  5059  	urls += "?" + c.urlParams_.Encode()
  5060  	req, err := http.NewRequest("GET", urls, body)
  5061  	if err != nil {
  5062  		return nil, err
  5063  	}
  5064  	req.Header = reqHeaders
  5065  	googleapi.Expand(req.URL, map[string]string{
  5066  		"parent": c.parent,
  5067  	})
  5068  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5069  }
  5070  
  5071  // Do executes the "gkebackup.projects.locations.backupPlans.backups.volumeBackups.list" call.
  5072  // Any non-2xx status code is an error. Response headers are in either
  5073  // *ListVolumeBackupsResponse.ServerResponse.Header or (if a response was
  5074  // returned at all) in error.(*googleapi.Error).Header. Use
  5075  // googleapi.IsNotModified to check whether the returned error was because
  5076  // http.StatusNotModified was returned.
  5077  func (c *ProjectsLocationsBackupPlansBackupsVolumeBackupsListCall) Do(opts ...googleapi.CallOption) (*ListVolumeBackupsResponse, error) {
  5078  	gensupport.SetOptions(c.urlParams_, opts...)
  5079  	res, err := c.doRequest("json")
  5080  	if res != nil && res.StatusCode == http.StatusNotModified {
  5081  		if res.Body != nil {
  5082  			res.Body.Close()
  5083  		}
  5084  		return nil, gensupport.WrapError(&googleapi.Error{
  5085  			Code:   res.StatusCode,
  5086  			Header: res.Header,
  5087  		})
  5088  	}
  5089  	if err != nil {
  5090  		return nil, err
  5091  	}
  5092  	defer googleapi.CloseBody(res)
  5093  	if err := googleapi.CheckResponse(res); err != nil {
  5094  		return nil, gensupport.WrapError(err)
  5095  	}
  5096  	ret := &ListVolumeBackupsResponse{
  5097  		ServerResponse: googleapi.ServerResponse{
  5098  			Header:         res.Header,
  5099  			HTTPStatusCode: res.StatusCode,
  5100  		},
  5101  	}
  5102  	target := &ret
  5103  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5104  		return nil, err
  5105  	}
  5106  	return ret, nil
  5107  }
  5108  
  5109  // Pages invokes f for each page of results.
  5110  // A non-nil error returned from f will halt the iteration.
  5111  // The provided context supersedes any context provided to the Context method.
  5112  func (c *ProjectsLocationsBackupPlansBackupsVolumeBackupsListCall) Pages(ctx context.Context, f func(*ListVolumeBackupsResponse) error) error {
  5113  	c.ctx_ = ctx
  5114  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  5115  	for {
  5116  		x, err := c.Do()
  5117  		if err != nil {
  5118  			return err
  5119  		}
  5120  		if err := f(x); err != nil {
  5121  			return err
  5122  		}
  5123  		if x.NextPageToken == "" {
  5124  			return nil
  5125  		}
  5126  		c.PageToken(x.NextPageToken)
  5127  	}
  5128  }
  5129  
  5130  type ProjectsLocationsBackupPlansBackupsVolumeBackupsSetIamPolicyCall struct {
  5131  	s                   *Service
  5132  	resource            string
  5133  	setiampolicyrequest *SetIamPolicyRequest
  5134  	urlParams_          gensupport.URLParams
  5135  	ctx_                context.Context
  5136  	header_             http.Header
  5137  }
  5138  
  5139  // SetIamPolicy: Sets the access control policy on the specified resource.
  5140  // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
  5141  // and `PERMISSION_DENIED` errors.
  5142  //
  5143  //   - resource: REQUIRED: The resource for which the policy is being specified.
  5144  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  5145  //     for the appropriate value for this field.
  5146  func (r *ProjectsLocationsBackupPlansBackupsVolumeBackupsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsBackupPlansBackupsVolumeBackupsSetIamPolicyCall {
  5147  	c := &ProjectsLocationsBackupPlansBackupsVolumeBackupsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5148  	c.resource = resource
  5149  	c.setiampolicyrequest = setiampolicyrequest
  5150  	return c
  5151  }
  5152  
  5153  // Fields allows partial responses to be retrieved. See
  5154  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5155  // details.
  5156  func (c *ProjectsLocationsBackupPlansBackupsVolumeBackupsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupPlansBackupsVolumeBackupsSetIamPolicyCall {
  5157  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5158  	return c
  5159  }
  5160  
  5161  // Context sets the context to be used in this call's Do method.
  5162  func (c *ProjectsLocationsBackupPlansBackupsVolumeBackupsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsBackupPlansBackupsVolumeBackupsSetIamPolicyCall {
  5163  	c.ctx_ = ctx
  5164  	return c
  5165  }
  5166  
  5167  // Header returns a http.Header that can be modified by the caller to add
  5168  // headers to the request.
  5169  func (c *ProjectsLocationsBackupPlansBackupsVolumeBackupsSetIamPolicyCall) Header() http.Header {
  5170  	if c.header_ == nil {
  5171  		c.header_ = make(http.Header)
  5172  	}
  5173  	return c.header_
  5174  }
  5175  
  5176  func (c *ProjectsLocationsBackupPlansBackupsVolumeBackupsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  5177  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5178  	var body io.Reader = nil
  5179  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  5180  	if err != nil {
  5181  		return nil, err
  5182  	}
  5183  	c.urlParams_.Set("alt", alt)
  5184  	c.urlParams_.Set("prettyPrint", "false")
  5185  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
  5186  	urls += "?" + c.urlParams_.Encode()
  5187  	req, err := http.NewRequest("POST", urls, body)
  5188  	if err != nil {
  5189  		return nil, err
  5190  	}
  5191  	req.Header = reqHeaders
  5192  	googleapi.Expand(req.URL, map[string]string{
  5193  		"resource": c.resource,
  5194  	})
  5195  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5196  }
  5197  
  5198  // Do executes the "gkebackup.projects.locations.backupPlans.backups.volumeBackups.setIamPolicy" call.
  5199  // Any non-2xx status code is an error. Response headers are in either
  5200  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  5201  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5202  // whether the returned error was because http.StatusNotModified was returned.
  5203  func (c *ProjectsLocationsBackupPlansBackupsVolumeBackupsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  5204  	gensupport.SetOptions(c.urlParams_, opts...)
  5205  	res, err := c.doRequest("json")
  5206  	if res != nil && res.StatusCode == http.StatusNotModified {
  5207  		if res.Body != nil {
  5208  			res.Body.Close()
  5209  		}
  5210  		return nil, gensupport.WrapError(&googleapi.Error{
  5211  			Code:   res.StatusCode,
  5212  			Header: res.Header,
  5213  		})
  5214  	}
  5215  	if err != nil {
  5216  		return nil, err
  5217  	}
  5218  	defer googleapi.CloseBody(res)
  5219  	if err := googleapi.CheckResponse(res); err != nil {
  5220  		return nil, gensupport.WrapError(err)
  5221  	}
  5222  	ret := &Policy{
  5223  		ServerResponse: googleapi.ServerResponse{
  5224  			Header:         res.Header,
  5225  			HTTPStatusCode: res.StatusCode,
  5226  		},
  5227  	}
  5228  	target := &ret
  5229  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5230  		return nil, err
  5231  	}
  5232  	return ret, nil
  5233  }
  5234  
  5235  type ProjectsLocationsBackupPlansBackupsVolumeBackupsTestIamPermissionsCall struct {
  5236  	s                         *Service
  5237  	resource                  string
  5238  	testiampermissionsrequest *TestIamPermissionsRequest
  5239  	urlParams_                gensupport.URLParams
  5240  	ctx_                      context.Context
  5241  	header_                   http.Header
  5242  }
  5243  
  5244  // TestIamPermissions: Returns permissions that a caller has on the specified
  5245  // resource. If the resource does not exist, this will return an empty set of
  5246  // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
  5247  // used for building permission-aware UIs and command-line tools, not for
  5248  // authorization checking. This operation may "fail open" without warning.
  5249  //
  5250  //   - resource: REQUIRED: The resource for which the policy detail is being
  5251  //     requested. See Resource names
  5252  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
  5253  //     value for this field.
  5254  func (r *ProjectsLocationsBackupPlansBackupsVolumeBackupsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsBackupPlansBackupsVolumeBackupsTestIamPermissionsCall {
  5255  	c := &ProjectsLocationsBackupPlansBackupsVolumeBackupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5256  	c.resource = resource
  5257  	c.testiampermissionsrequest = testiampermissionsrequest
  5258  	return c
  5259  }
  5260  
  5261  // Fields allows partial responses to be retrieved. See
  5262  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5263  // details.
  5264  func (c *ProjectsLocationsBackupPlansBackupsVolumeBackupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupPlansBackupsVolumeBackupsTestIamPermissionsCall {
  5265  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5266  	return c
  5267  }
  5268  
  5269  // Context sets the context to be used in this call's Do method.
  5270  func (c *ProjectsLocationsBackupPlansBackupsVolumeBackupsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsBackupPlansBackupsVolumeBackupsTestIamPermissionsCall {
  5271  	c.ctx_ = ctx
  5272  	return c
  5273  }
  5274  
  5275  // Header returns a http.Header that can be modified by the caller to add
  5276  // headers to the request.
  5277  func (c *ProjectsLocationsBackupPlansBackupsVolumeBackupsTestIamPermissionsCall) Header() http.Header {
  5278  	if c.header_ == nil {
  5279  		c.header_ = make(http.Header)
  5280  	}
  5281  	return c.header_
  5282  }
  5283  
  5284  func (c *ProjectsLocationsBackupPlansBackupsVolumeBackupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  5285  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5286  	var body io.Reader = nil
  5287  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  5288  	if err != nil {
  5289  		return nil, err
  5290  	}
  5291  	c.urlParams_.Set("alt", alt)
  5292  	c.urlParams_.Set("prettyPrint", "false")
  5293  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
  5294  	urls += "?" + c.urlParams_.Encode()
  5295  	req, err := http.NewRequest("POST", urls, body)
  5296  	if err != nil {
  5297  		return nil, err
  5298  	}
  5299  	req.Header = reqHeaders
  5300  	googleapi.Expand(req.URL, map[string]string{
  5301  		"resource": c.resource,
  5302  	})
  5303  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5304  }
  5305  
  5306  // Do executes the "gkebackup.projects.locations.backupPlans.backups.volumeBackups.testIamPermissions" call.
  5307  // Any non-2xx status code is an error. Response headers are in either
  5308  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
  5309  // returned at all) in error.(*googleapi.Error).Header. Use
  5310  // googleapi.IsNotModified to check whether the returned error was because
  5311  // http.StatusNotModified was returned.
  5312  func (c *ProjectsLocationsBackupPlansBackupsVolumeBackupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  5313  	gensupport.SetOptions(c.urlParams_, opts...)
  5314  	res, err := c.doRequest("json")
  5315  	if res != nil && res.StatusCode == http.StatusNotModified {
  5316  		if res.Body != nil {
  5317  			res.Body.Close()
  5318  		}
  5319  		return nil, gensupport.WrapError(&googleapi.Error{
  5320  			Code:   res.StatusCode,
  5321  			Header: res.Header,
  5322  		})
  5323  	}
  5324  	if err != nil {
  5325  		return nil, err
  5326  	}
  5327  	defer googleapi.CloseBody(res)
  5328  	if err := googleapi.CheckResponse(res); err != nil {
  5329  		return nil, gensupport.WrapError(err)
  5330  	}
  5331  	ret := &TestIamPermissionsResponse{
  5332  		ServerResponse: googleapi.ServerResponse{
  5333  			Header:         res.Header,
  5334  			HTTPStatusCode: res.StatusCode,
  5335  		},
  5336  	}
  5337  	target := &ret
  5338  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5339  		return nil, err
  5340  	}
  5341  	return ret, nil
  5342  }
  5343  
  5344  type ProjectsLocationsOperationsCancelCall struct {
  5345  	s                                       *Service
  5346  	name                                    string
  5347  	googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest
  5348  	urlParams_                              gensupport.URLParams
  5349  	ctx_                                    context.Context
  5350  	header_                                 http.Header
  5351  }
  5352  
  5353  // Cancel: Starts asynchronous cancellation on a long-running operation. The
  5354  // server makes a best effort to cancel the operation, but success is not
  5355  // guaranteed. If the server doesn't support this method, it returns
  5356  // `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or
  5357  // other methods to check whether the cancellation succeeded or whether the
  5358  // operation completed despite cancellation. On successful cancellation, the
  5359  // operation is not deleted; instead, it becomes an operation with an
  5360  // Operation.error value with a google.rpc.Status.code of 1, corresponding to
  5361  // `Code.CANCELLED`.
  5362  //
  5363  // - name: The name of the operation resource to be cancelled.
  5364  func (r *ProjectsLocationsOperationsService) Cancel(name string, googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest) *ProjectsLocationsOperationsCancelCall {
  5365  	c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5366  	c.name = name
  5367  	c.googlelongrunningcanceloperationrequest = googlelongrunningcanceloperationrequest
  5368  	return c
  5369  }
  5370  
  5371  // Fields allows partial responses to be retrieved. See
  5372  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5373  // details.
  5374  func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
  5375  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5376  	return c
  5377  }
  5378  
  5379  // Context sets the context to be used in this call's Do method.
  5380  func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
  5381  	c.ctx_ = ctx
  5382  	return c
  5383  }
  5384  
  5385  // Header returns a http.Header that can be modified by the caller to add
  5386  // headers to the request.
  5387  func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
  5388  	if c.header_ == nil {
  5389  		c.header_ = make(http.Header)
  5390  	}
  5391  	return c.header_
  5392  }
  5393  
  5394  func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
  5395  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5396  	var body io.Reader = nil
  5397  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlelongrunningcanceloperationrequest)
  5398  	if err != nil {
  5399  		return nil, err
  5400  	}
  5401  	c.urlParams_.Set("alt", alt)
  5402  	c.urlParams_.Set("prettyPrint", "false")
  5403  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
  5404  	urls += "?" + c.urlParams_.Encode()
  5405  	req, err := http.NewRequest("POST", urls, body)
  5406  	if err != nil {
  5407  		return nil, err
  5408  	}
  5409  	req.Header = reqHeaders
  5410  	googleapi.Expand(req.URL, map[string]string{
  5411  		"name": c.name,
  5412  	})
  5413  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5414  }
  5415  
  5416  // Do executes the "gkebackup.projects.locations.operations.cancel" call.
  5417  // Any non-2xx status code is an error. Response headers are in either
  5418  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  5419  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5420  // whether the returned error was because http.StatusNotModified was returned.
  5421  func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  5422  	gensupport.SetOptions(c.urlParams_, opts...)
  5423  	res, err := c.doRequest("json")
  5424  	if res != nil && res.StatusCode == http.StatusNotModified {
  5425  		if res.Body != nil {
  5426  			res.Body.Close()
  5427  		}
  5428  		return nil, gensupport.WrapError(&googleapi.Error{
  5429  			Code:   res.StatusCode,
  5430  			Header: res.Header,
  5431  		})
  5432  	}
  5433  	if err != nil {
  5434  		return nil, err
  5435  	}
  5436  	defer googleapi.CloseBody(res)
  5437  	if err := googleapi.CheckResponse(res); err != nil {
  5438  		return nil, gensupport.WrapError(err)
  5439  	}
  5440  	ret := &Empty{
  5441  		ServerResponse: googleapi.ServerResponse{
  5442  			Header:         res.Header,
  5443  			HTTPStatusCode: res.StatusCode,
  5444  		},
  5445  	}
  5446  	target := &ret
  5447  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5448  		return nil, err
  5449  	}
  5450  	return ret, nil
  5451  }
  5452  
  5453  type ProjectsLocationsOperationsDeleteCall struct {
  5454  	s          *Service
  5455  	name       string
  5456  	urlParams_ gensupport.URLParams
  5457  	ctx_       context.Context
  5458  	header_    http.Header
  5459  }
  5460  
  5461  // Delete: Deletes a long-running operation. This method indicates that the
  5462  // client is no longer interested in the operation result. It does not cancel
  5463  // the operation. If the server doesn't support this method, it returns
  5464  // `google.rpc.Code.UNIMPLEMENTED`.
  5465  //
  5466  // - name: The name of the operation resource to be deleted.
  5467  func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall {
  5468  	c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5469  	c.name = name
  5470  	return c
  5471  }
  5472  
  5473  // Fields allows partial responses to be retrieved. See
  5474  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5475  // details.
  5476  func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall {
  5477  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5478  	return c
  5479  }
  5480  
  5481  // Context sets the context to be used in this call's Do method.
  5482  func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall {
  5483  	c.ctx_ = ctx
  5484  	return c
  5485  }
  5486  
  5487  // Header returns a http.Header that can be modified by the caller to add
  5488  // headers to the request.
  5489  func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header {
  5490  	if c.header_ == nil {
  5491  		c.header_ = make(http.Header)
  5492  	}
  5493  	return c.header_
  5494  }
  5495  
  5496  func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
  5497  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5498  	var body io.Reader = nil
  5499  	c.urlParams_.Set("alt", alt)
  5500  	c.urlParams_.Set("prettyPrint", "false")
  5501  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5502  	urls += "?" + c.urlParams_.Encode()
  5503  	req, err := http.NewRequest("DELETE", urls, body)
  5504  	if err != nil {
  5505  		return nil, err
  5506  	}
  5507  	req.Header = reqHeaders
  5508  	googleapi.Expand(req.URL, map[string]string{
  5509  		"name": c.name,
  5510  	})
  5511  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5512  }
  5513  
  5514  // Do executes the "gkebackup.projects.locations.operations.delete" call.
  5515  // Any non-2xx status code is an error. Response headers are in either
  5516  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  5517  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5518  // whether the returned error was because http.StatusNotModified was returned.
  5519  func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  5520  	gensupport.SetOptions(c.urlParams_, opts...)
  5521  	res, err := c.doRequest("json")
  5522  	if res != nil && res.StatusCode == http.StatusNotModified {
  5523  		if res.Body != nil {
  5524  			res.Body.Close()
  5525  		}
  5526  		return nil, gensupport.WrapError(&googleapi.Error{
  5527  			Code:   res.StatusCode,
  5528  			Header: res.Header,
  5529  		})
  5530  	}
  5531  	if err != nil {
  5532  		return nil, err
  5533  	}
  5534  	defer googleapi.CloseBody(res)
  5535  	if err := googleapi.CheckResponse(res); err != nil {
  5536  		return nil, gensupport.WrapError(err)
  5537  	}
  5538  	ret := &Empty{
  5539  		ServerResponse: googleapi.ServerResponse{
  5540  			Header:         res.Header,
  5541  			HTTPStatusCode: res.StatusCode,
  5542  		},
  5543  	}
  5544  	target := &ret
  5545  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5546  		return nil, err
  5547  	}
  5548  	return ret, nil
  5549  }
  5550  
  5551  type ProjectsLocationsOperationsGetCall struct {
  5552  	s            *Service
  5553  	name         string
  5554  	urlParams_   gensupport.URLParams
  5555  	ifNoneMatch_ string
  5556  	ctx_         context.Context
  5557  	header_      http.Header
  5558  }
  5559  
  5560  // Get: Gets the latest state of a long-running operation. Clients can use this
  5561  // method to poll the operation result at intervals as recommended by the API
  5562  // service.
  5563  //
  5564  // - name: The name of the operation resource.
  5565  func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
  5566  	c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5567  	c.name = name
  5568  	return c
  5569  }
  5570  
  5571  // Fields allows partial responses to be retrieved. See
  5572  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5573  // details.
  5574  func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
  5575  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5576  	return c
  5577  }
  5578  
  5579  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5580  // object's ETag matches the given value. This is useful for getting updates
  5581  // only after the object has changed since the last request.
  5582  func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
  5583  	c.ifNoneMatch_ = entityTag
  5584  	return c
  5585  }
  5586  
  5587  // Context sets the context to be used in this call's Do method.
  5588  func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
  5589  	c.ctx_ = ctx
  5590  	return c
  5591  }
  5592  
  5593  // Header returns a http.Header that can be modified by the caller to add
  5594  // headers to the request.
  5595  func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
  5596  	if c.header_ == nil {
  5597  		c.header_ = make(http.Header)
  5598  	}
  5599  	return c.header_
  5600  }
  5601  
  5602  func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  5603  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5604  	if c.ifNoneMatch_ != "" {
  5605  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5606  	}
  5607  	var body io.Reader = nil
  5608  	c.urlParams_.Set("alt", alt)
  5609  	c.urlParams_.Set("prettyPrint", "false")
  5610  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5611  	urls += "?" + c.urlParams_.Encode()
  5612  	req, err := http.NewRequest("GET", urls, body)
  5613  	if err != nil {
  5614  		return nil, err
  5615  	}
  5616  	req.Header = reqHeaders
  5617  	googleapi.Expand(req.URL, map[string]string{
  5618  		"name": c.name,
  5619  	})
  5620  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5621  }
  5622  
  5623  // Do executes the "gkebackup.projects.locations.operations.get" call.
  5624  // Any non-2xx status code is an error. Response headers are in either
  5625  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  5626  // returned at all) in error.(*googleapi.Error).Header. Use
  5627  // googleapi.IsNotModified to check whether the returned error was because
  5628  // http.StatusNotModified was returned.
  5629  func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  5630  	gensupport.SetOptions(c.urlParams_, opts...)
  5631  	res, err := c.doRequest("json")
  5632  	if res != nil && res.StatusCode == http.StatusNotModified {
  5633  		if res.Body != nil {
  5634  			res.Body.Close()
  5635  		}
  5636  		return nil, gensupport.WrapError(&googleapi.Error{
  5637  			Code:   res.StatusCode,
  5638  			Header: res.Header,
  5639  		})
  5640  	}
  5641  	if err != nil {
  5642  		return nil, err
  5643  	}
  5644  	defer googleapi.CloseBody(res)
  5645  	if err := googleapi.CheckResponse(res); err != nil {
  5646  		return nil, gensupport.WrapError(err)
  5647  	}
  5648  	ret := &GoogleLongrunningOperation{
  5649  		ServerResponse: googleapi.ServerResponse{
  5650  			Header:         res.Header,
  5651  			HTTPStatusCode: res.StatusCode,
  5652  		},
  5653  	}
  5654  	target := &ret
  5655  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5656  		return nil, err
  5657  	}
  5658  	return ret, nil
  5659  }
  5660  
  5661  type ProjectsLocationsOperationsListCall struct {
  5662  	s            *Service
  5663  	name         string
  5664  	urlParams_   gensupport.URLParams
  5665  	ifNoneMatch_ string
  5666  	ctx_         context.Context
  5667  	header_      http.Header
  5668  }
  5669  
  5670  // List: Lists operations that match the specified filter in the request. If
  5671  // the server doesn't support this method, it returns `UNIMPLEMENTED`.
  5672  //
  5673  // - name: The name of the operation's parent resource.
  5674  func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
  5675  	c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5676  	c.name = name
  5677  	return c
  5678  }
  5679  
  5680  // Filter sets the optional parameter "filter": The standard list filter.
  5681  func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
  5682  	c.urlParams_.Set("filter", filter)
  5683  	return c
  5684  }
  5685  
  5686  // PageSize sets the optional parameter "pageSize": The standard list page
  5687  // size.
  5688  func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
  5689  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5690  	return c
  5691  }
  5692  
  5693  // PageToken sets the optional parameter "pageToken": The standard list page
  5694  // token.
  5695  func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
  5696  	c.urlParams_.Set("pageToken", pageToken)
  5697  	return c
  5698  }
  5699  
  5700  // Fields allows partial responses to be retrieved. See
  5701  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5702  // details.
  5703  func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
  5704  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5705  	return c
  5706  }
  5707  
  5708  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5709  // object's ETag matches the given value. This is useful for getting updates
  5710  // only after the object has changed since the last request.
  5711  func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
  5712  	c.ifNoneMatch_ = entityTag
  5713  	return c
  5714  }
  5715  
  5716  // Context sets the context to be used in this call's Do method.
  5717  func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
  5718  	c.ctx_ = ctx
  5719  	return c
  5720  }
  5721  
  5722  // Header returns a http.Header that can be modified by the caller to add
  5723  // headers to the request.
  5724  func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
  5725  	if c.header_ == nil {
  5726  		c.header_ = make(http.Header)
  5727  	}
  5728  	return c.header_
  5729  }
  5730  
  5731  func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
  5732  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5733  	if c.ifNoneMatch_ != "" {
  5734  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5735  	}
  5736  	var body io.Reader = nil
  5737  	c.urlParams_.Set("alt", alt)
  5738  	c.urlParams_.Set("prettyPrint", "false")
  5739  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations")
  5740  	urls += "?" + c.urlParams_.Encode()
  5741  	req, err := http.NewRequest("GET", urls, body)
  5742  	if err != nil {
  5743  		return nil, err
  5744  	}
  5745  	req.Header = reqHeaders
  5746  	googleapi.Expand(req.URL, map[string]string{
  5747  		"name": c.name,
  5748  	})
  5749  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5750  }
  5751  
  5752  // Do executes the "gkebackup.projects.locations.operations.list" call.
  5753  // Any non-2xx status code is an error. Response headers are in either
  5754  // *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a
  5755  // response was returned at all) in error.(*googleapi.Error).Header. Use
  5756  // googleapi.IsNotModified to check whether the returned error was because
  5757  // http.StatusNotModified was returned.
  5758  func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) {
  5759  	gensupport.SetOptions(c.urlParams_, opts...)
  5760  	res, err := c.doRequest("json")
  5761  	if res != nil && res.StatusCode == http.StatusNotModified {
  5762  		if res.Body != nil {
  5763  			res.Body.Close()
  5764  		}
  5765  		return nil, gensupport.WrapError(&googleapi.Error{
  5766  			Code:   res.StatusCode,
  5767  			Header: res.Header,
  5768  		})
  5769  	}
  5770  	if err != nil {
  5771  		return nil, err
  5772  	}
  5773  	defer googleapi.CloseBody(res)
  5774  	if err := googleapi.CheckResponse(res); err != nil {
  5775  		return nil, gensupport.WrapError(err)
  5776  	}
  5777  	ret := &GoogleLongrunningListOperationsResponse{
  5778  		ServerResponse: googleapi.ServerResponse{
  5779  			Header:         res.Header,
  5780  			HTTPStatusCode: res.StatusCode,
  5781  		},
  5782  	}
  5783  	target := &ret
  5784  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5785  		return nil, err
  5786  	}
  5787  	return ret, nil
  5788  }
  5789  
  5790  // Pages invokes f for each page of results.
  5791  // A non-nil error returned from f will halt the iteration.
  5792  // The provided context supersedes any context provided to the Context method.
  5793  func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error {
  5794  	c.ctx_ = ctx
  5795  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  5796  	for {
  5797  		x, err := c.Do()
  5798  		if err != nil {
  5799  			return err
  5800  		}
  5801  		if err := f(x); err != nil {
  5802  			return err
  5803  		}
  5804  		if x.NextPageToken == "" {
  5805  			return nil
  5806  		}
  5807  		c.PageToken(x.NextPageToken)
  5808  	}
  5809  }
  5810  
  5811  type ProjectsLocationsRestorePlansCreateCall struct {
  5812  	s           *Service
  5813  	parent      string
  5814  	restoreplan *RestorePlan
  5815  	urlParams_  gensupport.URLParams
  5816  	ctx_        context.Context
  5817  	header_     http.Header
  5818  }
  5819  
  5820  // Create: Creates a new RestorePlan in a given location.
  5821  //
  5822  //   - parent: The location within which to create the RestorePlan. Format:
  5823  //     `projects/*/locations/*`.
  5824  func (r *ProjectsLocationsRestorePlansService) Create(parent string, restoreplan *RestorePlan) *ProjectsLocationsRestorePlansCreateCall {
  5825  	c := &ProjectsLocationsRestorePlansCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5826  	c.parent = parent
  5827  	c.restoreplan = restoreplan
  5828  	return c
  5829  }
  5830  
  5831  // RestorePlanId sets the optional parameter "restorePlanId": Required. The
  5832  // client-provided short name for the RestorePlan resource. This name must: -
  5833  // be between 1 and 63 characters long (inclusive) - consist of only lower-case
  5834  // ASCII letters, numbers, and dashes - start with a lower-case letter - end
  5835  // with a lower-case letter or number - be unique within the set of
  5836  // RestorePlans in this location
  5837  func (c *ProjectsLocationsRestorePlansCreateCall) RestorePlanId(restorePlanId string) *ProjectsLocationsRestorePlansCreateCall {
  5838  	c.urlParams_.Set("restorePlanId", restorePlanId)
  5839  	return c
  5840  }
  5841  
  5842  // Fields allows partial responses to be retrieved. See
  5843  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5844  // details.
  5845  func (c *ProjectsLocationsRestorePlansCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsRestorePlansCreateCall {
  5846  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5847  	return c
  5848  }
  5849  
  5850  // Context sets the context to be used in this call's Do method.
  5851  func (c *ProjectsLocationsRestorePlansCreateCall) Context(ctx context.Context) *ProjectsLocationsRestorePlansCreateCall {
  5852  	c.ctx_ = ctx
  5853  	return c
  5854  }
  5855  
  5856  // Header returns a http.Header that can be modified by the caller to add
  5857  // headers to the request.
  5858  func (c *ProjectsLocationsRestorePlansCreateCall) Header() http.Header {
  5859  	if c.header_ == nil {
  5860  		c.header_ = make(http.Header)
  5861  	}
  5862  	return c.header_
  5863  }
  5864  
  5865  func (c *ProjectsLocationsRestorePlansCreateCall) doRequest(alt string) (*http.Response, error) {
  5866  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5867  	var body io.Reader = nil
  5868  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.restoreplan)
  5869  	if err != nil {
  5870  		return nil, err
  5871  	}
  5872  	c.urlParams_.Set("alt", alt)
  5873  	c.urlParams_.Set("prettyPrint", "false")
  5874  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/restorePlans")
  5875  	urls += "?" + c.urlParams_.Encode()
  5876  	req, err := http.NewRequest("POST", urls, body)
  5877  	if err != nil {
  5878  		return nil, err
  5879  	}
  5880  	req.Header = reqHeaders
  5881  	googleapi.Expand(req.URL, map[string]string{
  5882  		"parent": c.parent,
  5883  	})
  5884  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5885  }
  5886  
  5887  // Do executes the "gkebackup.projects.locations.restorePlans.create" call.
  5888  // Any non-2xx status code is an error. Response headers are in either
  5889  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  5890  // returned at all) in error.(*googleapi.Error).Header. Use
  5891  // googleapi.IsNotModified to check whether the returned error was because
  5892  // http.StatusNotModified was returned.
  5893  func (c *ProjectsLocationsRestorePlansCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  5894  	gensupport.SetOptions(c.urlParams_, opts...)
  5895  	res, err := c.doRequest("json")
  5896  	if res != nil && res.StatusCode == http.StatusNotModified {
  5897  		if res.Body != nil {
  5898  			res.Body.Close()
  5899  		}
  5900  		return nil, gensupport.WrapError(&googleapi.Error{
  5901  			Code:   res.StatusCode,
  5902  			Header: res.Header,
  5903  		})
  5904  	}
  5905  	if err != nil {
  5906  		return nil, err
  5907  	}
  5908  	defer googleapi.CloseBody(res)
  5909  	if err := googleapi.CheckResponse(res); err != nil {
  5910  		return nil, gensupport.WrapError(err)
  5911  	}
  5912  	ret := &GoogleLongrunningOperation{
  5913  		ServerResponse: googleapi.ServerResponse{
  5914  			Header:         res.Header,
  5915  			HTTPStatusCode: res.StatusCode,
  5916  		},
  5917  	}
  5918  	target := &ret
  5919  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5920  		return nil, err
  5921  	}
  5922  	return ret, nil
  5923  }
  5924  
  5925  type ProjectsLocationsRestorePlansDeleteCall struct {
  5926  	s          *Service
  5927  	name       string
  5928  	urlParams_ gensupport.URLParams
  5929  	ctx_       context.Context
  5930  	header_    http.Header
  5931  }
  5932  
  5933  // Delete: Deletes an existing RestorePlan.
  5934  //
  5935  //   - name: Fully qualified RestorePlan name. Format:
  5936  //     `projects/*/locations/*/restorePlans/*`.
  5937  func (r *ProjectsLocationsRestorePlansService) Delete(name string) *ProjectsLocationsRestorePlansDeleteCall {
  5938  	c := &ProjectsLocationsRestorePlansDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5939  	c.name = name
  5940  	return c
  5941  }
  5942  
  5943  // Etag sets the optional parameter "etag": If provided, this value must match
  5944  // the current value of the target RestorePlan's etag field or the request is
  5945  // rejected.
  5946  func (c *ProjectsLocationsRestorePlansDeleteCall) Etag(etag string) *ProjectsLocationsRestorePlansDeleteCall {
  5947  	c.urlParams_.Set("etag", etag)
  5948  	return c
  5949  }
  5950  
  5951  // Force sets the optional parameter "force": If set to true, any Restores
  5952  // below this RestorePlan will also be deleted. Otherwise, the request will
  5953  // only succeed if the RestorePlan has no Restores.
  5954  func (c *ProjectsLocationsRestorePlansDeleteCall) Force(force bool) *ProjectsLocationsRestorePlansDeleteCall {
  5955  	c.urlParams_.Set("force", fmt.Sprint(force))
  5956  	return c
  5957  }
  5958  
  5959  // Fields allows partial responses to be retrieved. See
  5960  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5961  // details.
  5962  func (c *ProjectsLocationsRestorePlansDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRestorePlansDeleteCall {
  5963  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5964  	return c
  5965  }
  5966  
  5967  // Context sets the context to be used in this call's Do method.
  5968  func (c *ProjectsLocationsRestorePlansDeleteCall) Context(ctx context.Context) *ProjectsLocationsRestorePlansDeleteCall {
  5969  	c.ctx_ = ctx
  5970  	return c
  5971  }
  5972  
  5973  // Header returns a http.Header that can be modified by the caller to add
  5974  // headers to the request.
  5975  func (c *ProjectsLocationsRestorePlansDeleteCall) Header() http.Header {
  5976  	if c.header_ == nil {
  5977  		c.header_ = make(http.Header)
  5978  	}
  5979  	return c.header_
  5980  }
  5981  
  5982  func (c *ProjectsLocationsRestorePlansDeleteCall) doRequest(alt string) (*http.Response, error) {
  5983  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5984  	var body io.Reader = nil
  5985  	c.urlParams_.Set("alt", alt)
  5986  	c.urlParams_.Set("prettyPrint", "false")
  5987  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5988  	urls += "?" + c.urlParams_.Encode()
  5989  	req, err := http.NewRequest("DELETE", urls, body)
  5990  	if err != nil {
  5991  		return nil, err
  5992  	}
  5993  	req.Header = reqHeaders
  5994  	googleapi.Expand(req.URL, map[string]string{
  5995  		"name": c.name,
  5996  	})
  5997  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5998  }
  5999  
  6000  // Do executes the "gkebackup.projects.locations.restorePlans.delete" call.
  6001  // Any non-2xx status code is an error. Response headers are in either
  6002  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  6003  // returned at all) in error.(*googleapi.Error).Header. Use
  6004  // googleapi.IsNotModified to check whether the returned error was because
  6005  // http.StatusNotModified was returned.
  6006  func (c *ProjectsLocationsRestorePlansDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  6007  	gensupport.SetOptions(c.urlParams_, opts...)
  6008  	res, err := c.doRequest("json")
  6009  	if res != nil && res.StatusCode == http.StatusNotModified {
  6010  		if res.Body != nil {
  6011  			res.Body.Close()
  6012  		}
  6013  		return nil, gensupport.WrapError(&googleapi.Error{
  6014  			Code:   res.StatusCode,
  6015  			Header: res.Header,
  6016  		})
  6017  	}
  6018  	if err != nil {
  6019  		return nil, err
  6020  	}
  6021  	defer googleapi.CloseBody(res)
  6022  	if err := googleapi.CheckResponse(res); err != nil {
  6023  		return nil, gensupport.WrapError(err)
  6024  	}
  6025  	ret := &GoogleLongrunningOperation{
  6026  		ServerResponse: googleapi.ServerResponse{
  6027  			Header:         res.Header,
  6028  			HTTPStatusCode: res.StatusCode,
  6029  		},
  6030  	}
  6031  	target := &ret
  6032  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6033  		return nil, err
  6034  	}
  6035  	return ret, nil
  6036  }
  6037  
  6038  type ProjectsLocationsRestorePlansGetCall struct {
  6039  	s            *Service
  6040  	name         string
  6041  	urlParams_   gensupport.URLParams
  6042  	ifNoneMatch_ string
  6043  	ctx_         context.Context
  6044  	header_      http.Header
  6045  }
  6046  
  6047  // Get: Retrieve the details of a single RestorePlan.
  6048  //
  6049  //   - name: Fully qualified RestorePlan name. Format:
  6050  //     `projects/*/locations/*/restorePlans/*`.
  6051  func (r *ProjectsLocationsRestorePlansService) Get(name string) *ProjectsLocationsRestorePlansGetCall {
  6052  	c := &ProjectsLocationsRestorePlansGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6053  	c.name = name
  6054  	return c
  6055  }
  6056  
  6057  // Fields allows partial responses to be retrieved. See
  6058  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6059  // details.
  6060  func (c *ProjectsLocationsRestorePlansGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRestorePlansGetCall {
  6061  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6062  	return c
  6063  }
  6064  
  6065  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6066  // object's ETag matches the given value. This is useful for getting updates
  6067  // only after the object has changed since the last request.
  6068  func (c *ProjectsLocationsRestorePlansGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRestorePlansGetCall {
  6069  	c.ifNoneMatch_ = entityTag
  6070  	return c
  6071  }
  6072  
  6073  // Context sets the context to be used in this call's Do method.
  6074  func (c *ProjectsLocationsRestorePlansGetCall) Context(ctx context.Context) *ProjectsLocationsRestorePlansGetCall {
  6075  	c.ctx_ = ctx
  6076  	return c
  6077  }
  6078  
  6079  // Header returns a http.Header that can be modified by the caller to add
  6080  // headers to the request.
  6081  func (c *ProjectsLocationsRestorePlansGetCall) Header() http.Header {
  6082  	if c.header_ == nil {
  6083  		c.header_ = make(http.Header)
  6084  	}
  6085  	return c.header_
  6086  }
  6087  
  6088  func (c *ProjectsLocationsRestorePlansGetCall) doRequest(alt string) (*http.Response, error) {
  6089  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6090  	if c.ifNoneMatch_ != "" {
  6091  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6092  	}
  6093  	var body io.Reader = nil
  6094  	c.urlParams_.Set("alt", alt)
  6095  	c.urlParams_.Set("prettyPrint", "false")
  6096  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  6097  	urls += "?" + c.urlParams_.Encode()
  6098  	req, err := http.NewRequest("GET", urls, body)
  6099  	if err != nil {
  6100  		return nil, err
  6101  	}
  6102  	req.Header = reqHeaders
  6103  	googleapi.Expand(req.URL, map[string]string{
  6104  		"name": c.name,
  6105  	})
  6106  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6107  }
  6108  
  6109  // Do executes the "gkebackup.projects.locations.restorePlans.get" call.
  6110  // Any non-2xx status code is an error. Response headers are in either
  6111  // *RestorePlan.ServerResponse.Header or (if a response was returned at all) in
  6112  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6113  // whether the returned error was because http.StatusNotModified was returned.
  6114  func (c *ProjectsLocationsRestorePlansGetCall) Do(opts ...googleapi.CallOption) (*RestorePlan, error) {
  6115  	gensupport.SetOptions(c.urlParams_, opts...)
  6116  	res, err := c.doRequest("json")
  6117  	if res != nil && res.StatusCode == http.StatusNotModified {
  6118  		if res.Body != nil {
  6119  			res.Body.Close()
  6120  		}
  6121  		return nil, gensupport.WrapError(&googleapi.Error{
  6122  			Code:   res.StatusCode,
  6123  			Header: res.Header,
  6124  		})
  6125  	}
  6126  	if err != nil {
  6127  		return nil, err
  6128  	}
  6129  	defer googleapi.CloseBody(res)
  6130  	if err := googleapi.CheckResponse(res); err != nil {
  6131  		return nil, gensupport.WrapError(err)
  6132  	}
  6133  	ret := &RestorePlan{
  6134  		ServerResponse: googleapi.ServerResponse{
  6135  			Header:         res.Header,
  6136  			HTTPStatusCode: res.StatusCode,
  6137  		},
  6138  	}
  6139  	target := &ret
  6140  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6141  		return nil, err
  6142  	}
  6143  	return ret, nil
  6144  }
  6145  
  6146  type ProjectsLocationsRestorePlansGetIamPolicyCall struct {
  6147  	s            *Service
  6148  	resource     string
  6149  	urlParams_   gensupport.URLParams
  6150  	ifNoneMatch_ string
  6151  	ctx_         context.Context
  6152  	header_      http.Header
  6153  }
  6154  
  6155  // GetIamPolicy: Gets the access control policy for a resource. Returns an
  6156  // empty policy if the resource exists and does not have a policy set.
  6157  //
  6158  //   - resource: REQUIRED: The resource for which the policy is being requested.
  6159  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  6160  //     for the appropriate value for this field.
  6161  func (r *ProjectsLocationsRestorePlansService) GetIamPolicy(resource string) *ProjectsLocationsRestorePlansGetIamPolicyCall {
  6162  	c := &ProjectsLocationsRestorePlansGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6163  	c.resource = resource
  6164  	return c
  6165  }
  6166  
  6167  // OptionsRequestedPolicyVersion sets the optional parameter
  6168  // "options.requestedPolicyVersion": The maximum policy version that will be
  6169  // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
  6170  // an invalid value will be rejected. Requests for policies with any
  6171  // conditional role bindings must specify version 3. Policies with no
  6172  // conditional role bindings may specify any valid value or leave the field
  6173  // unset. The policy in the response might use the policy version that you
  6174  // specified, or it might use a lower policy version. For example, if you
  6175  // specify version 3, but the policy has no conditional role bindings, the
  6176  // response uses version 1. To learn which resources support conditions in
  6177  // their IAM policies, see the IAM documentation
  6178  // (https://cloud.google.com/iam/help/conditions/resource-policies).
  6179  func (c *ProjectsLocationsRestorePlansGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsRestorePlansGetIamPolicyCall {
  6180  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
  6181  	return c
  6182  }
  6183  
  6184  // Fields allows partial responses to be retrieved. See
  6185  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6186  // details.
  6187  func (c *ProjectsLocationsRestorePlansGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsRestorePlansGetIamPolicyCall {
  6188  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6189  	return c
  6190  }
  6191  
  6192  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6193  // object's ETag matches the given value. This is useful for getting updates
  6194  // only after the object has changed since the last request.
  6195  func (c *ProjectsLocationsRestorePlansGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsRestorePlansGetIamPolicyCall {
  6196  	c.ifNoneMatch_ = entityTag
  6197  	return c
  6198  }
  6199  
  6200  // Context sets the context to be used in this call's Do method.
  6201  func (c *ProjectsLocationsRestorePlansGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsRestorePlansGetIamPolicyCall {
  6202  	c.ctx_ = ctx
  6203  	return c
  6204  }
  6205  
  6206  // Header returns a http.Header that can be modified by the caller to add
  6207  // headers to the request.
  6208  func (c *ProjectsLocationsRestorePlansGetIamPolicyCall) Header() http.Header {
  6209  	if c.header_ == nil {
  6210  		c.header_ = make(http.Header)
  6211  	}
  6212  	return c.header_
  6213  }
  6214  
  6215  func (c *ProjectsLocationsRestorePlansGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  6216  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6217  	if c.ifNoneMatch_ != "" {
  6218  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6219  	}
  6220  	var body io.Reader = nil
  6221  	c.urlParams_.Set("alt", alt)
  6222  	c.urlParams_.Set("prettyPrint", "false")
  6223  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
  6224  	urls += "?" + c.urlParams_.Encode()
  6225  	req, err := http.NewRequest("GET", urls, body)
  6226  	if err != nil {
  6227  		return nil, err
  6228  	}
  6229  	req.Header = reqHeaders
  6230  	googleapi.Expand(req.URL, map[string]string{
  6231  		"resource": c.resource,
  6232  	})
  6233  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6234  }
  6235  
  6236  // Do executes the "gkebackup.projects.locations.restorePlans.getIamPolicy" call.
  6237  // Any non-2xx status code is an error. Response headers are in either
  6238  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  6239  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6240  // whether the returned error was because http.StatusNotModified was returned.
  6241  func (c *ProjectsLocationsRestorePlansGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  6242  	gensupport.SetOptions(c.urlParams_, opts...)
  6243  	res, err := c.doRequest("json")
  6244  	if res != nil && res.StatusCode == http.StatusNotModified {
  6245  		if res.Body != nil {
  6246  			res.Body.Close()
  6247  		}
  6248  		return nil, gensupport.WrapError(&googleapi.Error{
  6249  			Code:   res.StatusCode,
  6250  			Header: res.Header,
  6251  		})
  6252  	}
  6253  	if err != nil {
  6254  		return nil, err
  6255  	}
  6256  	defer googleapi.CloseBody(res)
  6257  	if err := googleapi.CheckResponse(res); err != nil {
  6258  		return nil, gensupport.WrapError(err)
  6259  	}
  6260  	ret := &Policy{
  6261  		ServerResponse: googleapi.ServerResponse{
  6262  			Header:         res.Header,
  6263  			HTTPStatusCode: res.StatusCode,
  6264  		},
  6265  	}
  6266  	target := &ret
  6267  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6268  		return nil, err
  6269  	}
  6270  	return ret, nil
  6271  }
  6272  
  6273  type ProjectsLocationsRestorePlansListCall struct {
  6274  	s            *Service
  6275  	parent       string
  6276  	urlParams_   gensupport.URLParams
  6277  	ifNoneMatch_ string
  6278  	ctx_         context.Context
  6279  	header_      http.Header
  6280  }
  6281  
  6282  // List: Lists RestorePlans in a given location.
  6283  //
  6284  //   - parent: The location that contains the RestorePlans to list. Format:
  6285  //     `projects/*/locations/*`.
  6286  func (r *ProjectsLocationsRestorePlansService) List(parent string) *ProjectsLocationsRestorePlansListCall {
  6287  	c := &ProjectsLocationsRestorePlansListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6288  	c.parent = parent
  6289  	return c
  6290  }
  6291  
  6292  // Filter sets the optional parameter "filter": Field match expression used to
  6293  // filter the results.
  6294  func (c *ProjectsLocationsRestorePlansListCall) Filter(filter string) *ProjectsLocationsRestorePlansListCall {
  6295  	c.urlParams_.Set("filter", filter)
  6296  	return c
  6297  }
  6298  
  6299  // OrderBy sets the optional parameter "orderBy": Field by which to sort the
  6300  // results.
  6301  func (c *ProjectsLocationsRestorePlansListCall) OrderBy(orderBy string) *ProjectsLocationsRestorePlansListCall {
  6302  	c.urlParams_.Set("orderBy", orderBy)
  6303  	return c
  6304  }
  6305  
  6306  // PageSize sets the optional parameter "pageSize": The target number of
  6307  // results to return in a single response. If not specified, a default value
  6308  // will be chosen by the service. Note that the response may include a partial
  6309  // list and a caller should only rely on the response's next_page_token to
  6310  // determine if there are more instances left to be queried.
  6311  func (c *ProjectsLocationsRestorePlansListCall) PageSize(pageSize int64) *ProjectsLocationsRestorePlansListCall {
  6312  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6313  	return c
  6314  }
  6315  
  6316  // PageToken sets the optional parameter "pageToken": The value of
  6317  // next_page_token received from a previous `ListRestorePlans` call. Provide
  6318  // this to retrieve the subsequent page in a multi-page list of results. When
  6319  // paginating, all other parameters provided to `ListRestorePlans` must match
  6320  // the call that provided the page token.
  6321  func (c *ProjectsLocationsRestorePlansListCall) PageToken(pageToken string) *ProjectsLocationsRestorePlansListCall {
  6322  	c.urlParams_.Set("pageToken", pageToken)
  6323  	return c
  6324  }
  6325  
  6326  // Fields allows partial responses to be retrieved. See
  6327  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6328  // details.
  6329  func (c *ProjectsLocationsRestorePlansListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRestorePlansListCall {
  6330  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6331  	return c
  6332  }
  6333  
  6334  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6335  // object's ETag matches the given value. This is useful for getting updates
  6336  // only after the object has changed since the last request.
  6337  func (c *ProjectsLocationsRestorePlansListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRestorePlansListCall {
  6338  	c.ifNoneMatch_ = entityTag
  6339  	return c
  6340  }
  6341  
  6342  // Context sets the context to be used in this call's Do method.
  6343  func (c *ProjectsLocationsRestorePlansListCall) Context(ctx context.Context) *ProjectsLocationsRestorePlansListCall {
  6344  	c.ctx_ = ctx
  6345  	return c
  6346  }
  6347  
  6348  // Header returns a http.Header that can be modified by the caller to add
  6349  // headers to the request.
  6350  func (c *ProjectsLocationsRestorePlansListCall) Header() http.Header {
  6351  	if c.header_ == nil {
  6352  		c.header_ = make(http.Header)
  6353  	}
  6354  	return c.header_
  6355  }
  6356  
  6357  func (c *ProjectsLocationsRestorePlansListCall) doRequest(alt string) (*http.Response, error) {
  6358  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6359  	if c.ifNoneMatch_ != "" {
  6360  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6361  	}
  6362  	var body io.Reader = nil
  6363  	c.urlParams_.Set("alt", alt)
  6364  	c.urlParams_.Set("prettyPrint", "false")
  6365  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/restorePlans")
  6366  	urls += "?" + c.urlParams_.Encode()
  6367  	req, err := http.NewRequest("GET", urls, body)
  6368  	if err != nil {
  6369  		return nil, err
  6370  	}
  6371  	req.Header = reqHeaders
  6372  	googleapi.Expand(req.URL, map[string]string{
  6373  		"parent": c.parent,
  6374  	})
  6375  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6376  }
  6377  
  6378  // Do executes the "gkebackup.projects.locations.restorePlans.list" call.
  6379  // Any non-2xx status code is an error. Response headers are in either
  6380  // *ListRestorePlansResponse.ServerResponse.Header or (if a response was
  6381  // returned at all) in error.(*googleapi.Error).Header. Use
  6382  // googleapi.IsNotModified to check whether the returned error was because
  6383  // http.StatusNotModified was returned.
  6384  func (c *ProjectsLocationsRestorePlansListCall) Do(opts ...googleapi.CallOption) (*ListRestorePlansResponse, error) {
  6385  	gensupport.SetOptions(c.urlParams_, opts...)
  6386  	res, err := c.doRequest("json")
  6387  	if res != nil && res.StatusCode == http.StatusNotModified {
  6388  		if res.Body != nil {
  6389  			res.Body.Close()
  6390  		}
  6391  		return nil, gensupport.WrapError(&googleapi.Error{
  6392  			Code:   res.StatusCode,
  6393  			Header: res.Header,
  6394  		})
  6395  	}
  6396  	if err != nil {
  6397  		return nil, err
  6398  	}
  6399  	defer googleapi.CloseBody(res)
  6400  	if err := googleapi.CheckResponse(res); err != nil {
  6401  		return nil, gensupport.WrapError(err)
  6402  	}
  6403  	ret := &ListRestorePlansResponse{
  6404  		ServerResponse: googleapi.ServerResponse{
  6405  			Header:         res.Header,
  6406  			HTTPStatusCode: res.StatusCode,
  6407  		},
  6408  	}
  6409  	target := &ret
  6410  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6411  		return nil, err
  6412  	}
  6413  	return ret, nil
  6414  }
  6415  
  6416  // Pages invokes f for each page of results.
  6417  // A non-nil error returned from f will halt the iteration.
  6418  // The provided context supersedes any context provided to the Context method.
  6419  func (c *ProjectsLocationsRestorePlansListCall) Pages(ctx context.Context, f func(*ListRestorePlansResponse) error) error {
  6420  	c.ctx_ = ctx
  6421  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  6422  	for {
  6423  		x, err := c.Do()
  6424  		if err != nil {
  6425  			return err
  6426  		}
  6427  		if err := f(x); err != nil {
  6428  			return err
  6429  		}
  6430  		if x.NextPageToken == "" {
  6431  			return nil
  6432  		}
  6433  		c.PageToken(x.NextPageToken)
  6434  	}
  6435  }
  6436  
  6437  type ProjectsLocationsRestorePlansPatchCall struct {
  6438  	s           *Service
  6439  	name        string
  6440  	restoreplan *RestorePlan
  6441  	urlParams_  gensupport.URLParams
  6442  	ctx_        context.Context
  6443  	header_     http.Header
  6444  }
  6445  
  6446  // Patch: Update a RestorePlan.
  6447  //
  6448  //   - name: Output only. The full name of the RestorePlan resource. Format:
  6449  //     `projects/*/locations/*/restorePlans/*`.
  6450  func (r *ProjectsLocationsRestorePlansService) Patch(name string, restoreplan *RestorePlan) *ProjectsLocationsRestorePlansPatchCall {
  6451  	c := &ProjectsLocationsRestorePlansPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6452  	c.name = name
  6453  	c.restoreplan = restoreplan
  6454  	return c
  6455  }
  6456  
  6457  // UpdateMask sets the optional parameter "updateMask": This is used to specify
  6458  // the fields to be overwritten in the RestorePlan targeted for update. The
  6459  // values for each of these updated fields will be taken from the
  6460  // `restore_plan` provided with this request. Field names are relative to the
  6461  // root of the resource. If no `update_mask` is provided, all fields in
  6462  // `restore_plan` will be written to the target RestorePlan resource. Note that
  6463  // OUTPUT_ONLY and IMMUTABLE fields in `restore_plan` are ignored and are not
  6464  // used to update the target RestorePlan.
  6465  func (c *ProjectsLocationsRestorePlansPatchCall) UpdateMask(updateMask string) *ProjectsLocationsRestorePlansPatchCall {
  6466  	c.urlParams_.Set("updateMask", updateMask)
  6467  	return c
  6468  }
  6469  
  6470  // Fields allows partial responses to be retrieved. See
  6471  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6472  // details.
  6473  func (c *ProjectsLocationsRestorePlansPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsRestorePlansPatchCall {
  6474  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6475  	return c
  6476  }
  6477  
  6478  // Context sets the context to be used in this call's Do method.
  6479  func (c *ProjectsLocationsRestorePlansPatchCall) Context(ctx context.Context) *ProjectsLocationsRestorePlansPatchCall {
  6480  	c.ctx_ = ctx
  6481  	return c
  6482  }
  6483  
  6484  // Header returns a http.Header that can be modified by the caller to add
  6485  // headers to the request.
  6486  func (c *ProjectsLocationsRestorePlansPatchCall) Header() http.Header {
  6487  	if c.header_ == nil {
  6488  		c.header_ = make(http.Header)
  6489  	}
  6490  	return c.header_
  6491  }
  6492  
  6493  func (c *ProjectsLocationsRestorePlansPatchCall) doRequest(alt string) (*http.Response, error) {
  6494  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6495  	var body io.Reader = nil
  6496  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.restoreplan)
  6497  	if err != nil {
  6498  		return nil, err
  6499  	}
  6500  	c.urlParams_.Set("alt", alt)
  6501  	c.urlParams_.Set("prettyPrint", "false")
  6502  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  6503  	urls += "?" + c.urlParams_.Encode()
  6504  	req, err := http.NewRequest("PATCH", urls, body)
  6505  	if err != nil {
  6506  		return nil, err
  6507  	}
  6508  	req.Header = reqHeaders
  6509  	googleapi.Expand(req.URL, map[string]string{
  6510  		"name": c.name,
  6511  	})
  6512  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6513  }
  6514  
  6515  // Do executes the "gkebackup.projects.locations.restorePlans.patch" call.
  6516  // Any non-2xx status code is an error. Response headers are in either
  6517  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  6518  // returned at all) in error.(*googleapi.Error).Header. Use
  6519  // googleapi.IsNotModified to check whether the returned error was because
  6520  // http.StatusNotModified was returned.
  6521  func (c *ProjectsLocationsRestorePlansPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  6522  	gensupport.SetOptions(c.urlParams_, opts...)
  6523  	res, err := c.doRequest("json")
  6524  	if res != nil && res.StatusCode == http.StatusNotModified {
  6525  		if res.Body != nil {
  6526  			res.Body.Close()
  6527  		}
  6528  		return nil, gensupport.WrapError(&googleapi.Error{
  6529  			Code:   res.StatusCode,
  6530  			Header: res.Header,
  6531  		})
  6532  	}
  6533  	if err != nil {
  6534  		return nil, err
  6535  	}
  6536  	defer googleapi.CloseBody(res)
  6537  	if err := googleapi.CheckResponse(res); err != nil {
  6538  		return nil, gensupport.WrapError(err)
  6539  	}
  6540  	ret := &GoogleLongrunningOperation{
  6541  		ServerResponse: googleapi.ServerResponse{
  6542  			Header:         res.Header,
  6543  			HTTPStatusCode: res.StatusCode,
  6544  		},
  6545  	}
  6546  	target := &ret
  6547  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6548  		return nil, err
  6549  	}
  6550  	return ret, nil
  6551  }
  6552  
  6553  type ProjectsLocationsRestorePlansSetIamPolicyCall struct {
  6554  	s                   *Service
  6555  	resource            string
  6556  	setiampolicyrequest *SetIamPolicyRequest
  6557  	urlParams_          gensupport.URLParams
  6558  	ctx_                context.Context
  6559  	header_             http.Header
  6560  }
  6561  
  6562  // SetIamPolicy: Sets the access control policy on the specified resource.
  6563  // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
  6564  // and `PERMISSION_DENIED` errors.
  6565  //
  6566  //   - resource: REQUIRED: The resource for which the policy is being specified.
  6567  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  6568  //     for the appropriate value for this field.
  6569  func (r *ProjectsLocationsRestorePlansService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsRestorePlansSetIamPolicyCall {
  6570  	c := &ProjectsLocationsRestorePlansSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6571  	c.resource = resource
  6572  	c.setiampolicyrequest = setiampolicyrequest
  6573  	return c
  6574  }
  6575  
  6576  // Fields allows partial responses to be retrieved. See
  6577  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6578  // details.
  6579  func (c *ProjectsLocationsRestorePlansSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsRestorePlansSetIamPolicyCall {
  6580  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6581  	return c
  6582  }
  6583  
  6584  // Context sets the context to be used in this call's Do method.
  6585  func (c *ProjectsLocationsRestorePlansSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsRestorePlansSetIamPolicyCall {
  6586  	c.ctx_ = ctx
  6587  	return c
  6588  }
  6589  
  6590  // Header returns a http.Header that can be modified by the caller to add
  6591  // headers to the request.
  6592  func (c *ProjectsLocationsRestorePlansSetIamPolicyCall) Header() http.Header {
  6593  	if c.header_ == nil {
  6594  		c.header_ = make(http.Header)
  6595  	}
  6596  	return c.header_
  6597  }
  6598  
  6599  func (c *ProjectsLocationsRestorePlansSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  6600  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6601  	var body io.Reader = nil
  6602  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  6603  	if err != nil {
  6604  		return nil, err
  6605  	}
  6606  	c.urlParams_.Set("alt", alt)
  6607  	c.urlParams_.Set("prettyPrint", "false")
  6608  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
  6609  	urls += "?" + c.urlParams_.Encode()
  6610  	req, err := http.NewRequest("POST", urls, body)
  6611  	if err != nil {
  6612  		return nil, err
  6613  	}
  6614  	req.Header = reqHeaders
  6615  	googleapi.Expand(req.URL, map[string]string{
  6616  		"resource": c.resource,
  6617  	})
  6618  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6619  }
  6620  
  6621  // Do executes the "gkebackup.projects.locations.restorePlans.setIamPolicy" call.
  6622  // Any non-2xx status code is an error. Response headers are in either
  6623  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  6624  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6625  // whether the returned error was because http.StatusNotModified was returned.
  6626  func (c *ProjectsLocationsRestorePlansSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  6627  	gensupport.SetOptions(c.urlParams_, opts...)
  6628  	res, err := c.doRequest("json")
  6629  	if res != nil && res.StatusCode == http.StatusNotModified {
  6630  		if res.Body != nil {
  6631  			res.Body.Close()
  6632  		}
  6633  		return nil, gensupport.WrapError(&googleapi.Error{
  6634  			Code:   res.StatusCode,
  6635  			Header: res.Header,
  6636  		})
  6637  	}
  6638  	if err != nil {
  6639  		return nil, err
  6640  	}
  6641  	defer googleapi.CloseBody(res)
  6642  	if err := googleapi.CheckResponse(res); err != nil {
  6643  		return nil, gensupport.WrapError(err)
  6644  	}
  6645  	ret := &Policy{
  6646  		ServerResponse: googleapi.ServerResponse{
  6647  			Header:         res.Header,
  6648  			HTTPStatusCode: res.StatusCode,
  6649  		},
  6650  	}
  6651  	target := &ret
  6652  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6653  		return nil, err
  6654  	}
  6655  	return ret, nil
  6656  }
  6657  
  6658  type ProjectsLocationsRestorePlansTestIamPermissionsCall struct {
  6659  	s                         *Service
  6660  	resource                  string
  6661  	testiampermissionsrequest *TestIamPermissionsRequest
  6662  	urlParams_                gensupport.URLParams
  6663  	ctx_                      context.Context
  6664  	header_                   http.Header
  6665  }
  6666  
  6667  // TestIamPermissions: Returns permissions that a caller has on the specified
  6668  // resource. If the resource does not exist, this will return an empty set of
  6669  // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
  6670  // used for building permission-aware UIs and command-line tools, not for
  6671  // authorization checking. This operation may "fail open" without warning.
  6672  //
  6673  //   - resource: REQUIRED: The resource for which the policy detail is being
  6674  //     requested. See Resource names
  6675  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
  6676  //     value for this field.
  6677  func (r *ProjectsLocationsRestorePlansService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsRestorePlansTestIamPermissionsCall {
  6678  	c := &ProjectsLocationsRestorePlansTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6679  	c.resource = resource
  6680  	c.testiampermissionsrequest = testiampermissionsrequest
  6681  	return c
  6682  }
  6683  
  6684  // Fields allows partial responses to be retrieved. See
  6685  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6686  // details.
  6687  func (c *ProjectsLocationsRestorePlansTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsRestorePlansTestIamPermissionsCall {
  6688  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6689  	return c
  6690  }
  6691  
  6692  // Context sets the context to be used in this call's Do method.
  6693  func (c *ProjectsLocationsRestorePlansTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsRestorePlansTestIamPermissionsCall {
  6694  	c.ctx_ = ctx
  6695  	return c
  6696  }
  6697  
  6698  // Header returns a http.Header that can be modified by the caller to add
  6699  // headers to the request.
  6700  func (c *ProjectsLocationsRestorePlansTestIamPermissionsCall) Header() http.Header {
  6701  	if c.header_ == nil {
  6702  		c.header_ = make(http.Header)
  6703  	}
  6704  	return c.header_
  6705  }
  6706  
  6707  func (c *ProjectsLocationsRestorePlansTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  6708  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6709  	var body io.Reader = nil
  6710  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  6711  	if err != nil {
  6712  		return nil, err
  6713  	}
  6714  	c.urlParams_.Set("alt", alt)
  6715  	c.urlParams_.Set("prettyPrint", "false")
  6716  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
  6717  	urls += "?" + c.urlParams_.Encode()
  6718  	req, err := http.NewRequest("POST", urls, body)
  6719  	if err != nil {
  6720  		return nil, err
  6721  	}
  6722  	req.Header = reqHeaders
  6723  	googleapi.Expand(req.URL, map[string]string{
  6724  		"resource": c.resource,
  6725  	})
  6726  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6727  }
  6728  
  6729  // Do executes the "gkebackup.projects.locations.restorePlans.testIamPermissions" call.
  6730  // Any non-2xx status code is an error. Response headers are in either
  6731  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
  6732  // returned at all) in error.(*googleapi.Error).Header. Use
  6733  // googleapi.IsNotModified to check whether the returned error was because
  6734  // http.StatusNotModified was returned.
  6735  func (c *ProjectsLocationsRestorePlansTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  6736  	gensupport.SetOptions(c.urlParams_, opts...)
  6737  	res, err := c.doRequest("json")
  6738  	if res != nil && res.StatusCode == http.StatusNotModified {
  6739  		if res.Body != nil {
  6740  			res.Body.Close()
  6741  		}
  6742  		return nil, gensupport.WrapError(&googleapi.Error{
  6743  			Code:   res.StatusCode,
  6744  			Header: res.Header,
  6745  		})
  6746  	}
  6747  	if err != nil {
  6748  		return nil, err
  6749  	}
  6750  	defer googleapi.CloseBody(res)
  6751  	if err := googleapi.CheckResponse(res); err != nil {
  6752  		return nil, gensupport.WrapError(err)
  6753  	}
  6754  	ret := &TestIamPermissionsResponse{
  6755  		ServerResponse: googleapi.ServerResponse{
  6756  			Header:         res.Header,
  6757  			HTTPStatusCode: res.StatusCode,
  6758  		},
  6759  	}
  6760  	target := &ret
  6761  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6762  		return nil, err
  6763  	}
  6764  	return ret, nil
  6765  }
  6766  
  6767  type ProjectsLocationsRestorePlansRestoresCreateCall struct {
  6768  	s          *Service
  6769  	parent     string
  6770  	restore    *Restore
  6771  	urlParams_ gensupport.URLParams
  6772  	ctx_       context.Context
  6773  	header_    http.Header
  6774  }
  6775  
  6776  // Create: Creates a new Restore for the given RestorePlan.
  6777  //
  6778  //   - parent: The RestorePlan within which to create the Restore. Format:
  6779  //     `projects/*/locations/*/restorePlans/*`.
  6780  func (r *ProjectsLocationsRestorePlansRestoresService) Create(parent string, restore *Restore) *ProjectsLocationsRestorePlansRestoresCreateCall {
  6781  	c := &ProjectsLocationsRestorePlansRestoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6782  	c.parent = parent
  6783  	c.restore = restore
  6784  	return c
  6785  }
  6786  
  6787  // RestoreId sets the optional parameter "restoreId": Required. The
  6788  // client-provided short name for the Restore resource. This name must: - be
  6789  // between 1 and 63 characters long (inclusive) - consist of only lower-case
  6790  // ASCII letters, numbers, and dashes - start with a lower-case letter - end
  6791  // with a lower-case letter or number - be unique within the set of Restores in
  6792  // this RestorePlan.
  6793  func (c *ProjectsLocationsRestorePlansRestoresCreateCall) RestoreId(restoreId string) *ProjectsLocationsRestorePlansRestoresCreateCall {
  6794  	c.urlParams_.Set("restoreId", restoreId)
  6795  	return c
  6796  }
  6797  
  6798  // Fields allows partial responses to be retrieved. See
  6799  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6800  // details.
  6801  func (c *ProjectsLocationsRestorePlansRestoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsRestorePlansRestoresCreateCall {
  6802  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6803  	return c
  6804  }
  6805  
  6806  // Context sets the context to be used in this call's Do method.
  6807  func (c *ProjectsLocationsRestorePlansRestoresCreateCall) Context(ctx context.Context) *ProjectsLocationsRestorePlansRestoresCreateCall {
  6808  	c.ctx_ = ctx
  6809  	return c
  6810  }
  6811  
  6812  // Header returns a http.Header that can be modified by the caller to add
  6813  // headers to the request.
  6814  func (c *ProjectsLocationsRestorePlansRestoresCreateCall) Header() http.Header {
  6815  	if c.header_ == nil {
  6816  		c.header_ = make(http.Header)
  6817  	}
  6818  	return c.header_
  6819  }
  6820  
  6821  func (c *ProjectsLocationsRestorePlansRestoresCreateCall) doRequest(alt string) (*http.Response, error) {
  6822  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6823  	var body io.Reader = nil
  6824  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.restore)
  6825  	if err != nil {
  6826  		return nil, err
  6827  	}
  6828  	c.urlParams_.Set("alt", alt)
  6829  	c.urlParams_.Set("prettyPrint", "false")
  6830  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/restores")
  6831  	urls += "?" + c.urlParams_.Encode()
  6832  	req, err := http.NewRequest("POST", urls, body)
  6833  	if err != nil {
  6834  		return nil, err
  6835  	}
  6836  	req.Header = reqHeaders
  6837  	googleapi.Expand(req.URL, map[string]string{
  6838  		"parent": c.parent,
  6839  	})
  6840  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6841  }
  6842  
  6843  // Do executes the "gkebackup.projects.locations.restorePlans.restores.create" call.
  6844  // Any non-2xx status code is an error. Response headers are in either
  6845  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  6846  // returned at all) in error.(*googleapi.Error).Header. Use
  6847  // googleapi.IsNotModified to check whether the returned error was because
  6848  // http.StatusNotModified was returned.
  6849  func (c *ProjectsLocationsRestorePlansRestoresCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  6850  	gensupport.SetOptions(c.urlParams_, opts...)
  6851  	res, err := c.doRequest("json")
  6852  	if res != nil && res.StatusCode == http.StatusNotModified {
  6853  		if res.Body != nil {
  6854  			res.Body.Close()
  6855  		}
  6856  		return nil, gensupport.WrapError(&googleapi.Error{
  6857  			Code:   res.StatusCode,
  6858  			Header: res.Header,
  6859  		})
  6860  	}
  6861  	if err != nil {
  6862  		return nil, err
  6863  	}
  6864  	defer googleapi.CloseBody(res)
  6865  	if err := googleapi.CheckResponse(res); err != nil {
  6866  		return nil, gensupport.WrapError(err)
  6867  	}
  6868  	ret := &GoogleLongrunningOperation{
  6869  		ServerResponse: googleapi.ServerResponse{
  6870  			Header:         res.Header,
  6871  			HTTPStatusCode: res.StatusCode,
  6872  		},
  6873  	}
  6874  	target := &ret
  6875  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6876  		return nil, err
  6877  	}
  6878  	return ret, nil
  6879  }
  6880  
  6881  type ProjectsLocationsRestorePlansRestoresDeleteCall struct {
  6882  	s          *Service
  6883  	name       string
  6884  	urlParams_ gensupport.URLParams
  6885  	ctx_       context.Context
  6886  	header_    http.Header
  6887  }
  6888  
  6889  // Delete: Deletes an existing Restore.
  6890  //
  6891  //   - name: Full name of the Restore Format:
  6892  //     `projects/*/locations/*/restorePlans/*/restores/*`.
  6893  func (r *ProjectsLocationsRestorePlansRestoresService) Delete(name string) *ProjectsLocationsRestorePlansRestoresDeleteCall {
  6894  	c := &ProjectsLocationsRestorePlansRestoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6895  	c.name = name
  6896  	return c
  6897  }
  6898  
  6899  // Etag sets the optional parameter "etag": If provided, this value must match
  6900  // the current value of the target Restore's etag field or the request is
  6901  // rejected.
  6902  func (c *ProjectsLocationsRestorePlansRestoresDeleteCall) Etag(etag string) *ProjectsLocationsRestorePlansRestoresDeleteCall {
  6903  	c.urlParams_.Set("etag", etag)
  6904  	return c
  6905  }
  6906  
  6907  // Force sets the optional parameter "force": If set to true, any
  6908  // VolumeRestores below this restore will also be deleted. Otherwise, the
  6909  // request will only succeed if the restore has no VolumeRestores.
  6910  func (c *ProjectsLocationsRestorePlansRestoresDeleteCall) Force(force bool) *ProjectsLocationsRestorePlansRestoresDeleteCall {
  6911  	c.urlParams_.Set("force", fmt.Sprint(force))
  6912  	return c
  6913  }
  6914  
  6915  // Fields allows partial responses to be retrieved. See
  6916  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6917  // details.
  6918  func (c *ProjectsLocationsRestorePlansRestoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRestorePlansRestoresDeleteCall {
  6919  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6920  	return c
  6921  }
  6922  
  6923  // Context sets the context to be used in this call's Do method.
  6924  func (c *ProjectsLocationsRestorePlansRestoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsRestorePlansRestoresDeleteCall {
  6925  	c.ctx_ = ctx
  6926  	return c
  6927  }
  6928  
  6929  // Header returns a http.Header that can be modified by the caller to add
  6930  // headers to the request.
  6931  func (c *ProjectsLocationsRestorePlansRestoresDeleteCall) Header() http.Header {
  6932  	if c.header_ == nil {
  6933  		c.header_ = make(http.Header)
  6934  	}
  6935  	return c.header_
  6936  }
  6937  
  6938  func (c *ProjectsLocationsRestorePlansRestoresDeleteCall) doRequest(alt string) (*http.Response, error) {
  6939  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6940  	var body io.Reader = nil
  6941  	c.urlParams_.Set("alt", alt)
  6942  	c.urlParams_.Set("prettyPrint", "false")
  6943  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  6944  	urls += "?" + c.urlParams_.Encode()
  6945  	req, err := http.NewRequest("DELETE", urls, body)
  6946  	if err != nil {
  6947  		return nil, err
  6948  	}
  6949  	req.Header = reqHeaders
  6950  	googleapi.Expand(req.URL, map[string]string{
  6951  		"name": c.name,
  6952  	})
  6953  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6954  }
  6955  
  6956  // Do executes the "gkebackup.projects.locations.restorePlans.restores.delete" call.
  6957  // Any non-2xx status code is an error. Response headers are in either
  6958  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  6959  // returned at all) in error.(*googleapi.Error).Header. Use
  6960  // googleapi.IsNotModified to check whether the returned error was because
  6961  // http.StatusNotModified was returned.
  6962  func (c *ProjectsLocationsRestorePlansRestoresDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  6963  	gensupport.SetOptions(c.urlParams_, opts...)
  6964  	res, err := c.doRequest("json")
  6965  	if res != nil && res.StatusCode == http.StatusNotModified {
  6966  		if res.Body != nil {
  6967  			res.Body.Close()
  6968  		}
  6969  		return nil, gensupport.WrapError(&googleapi.Error{
  6970  			Code:   res.StatusCode,
  6971  			Header: res.Header,
  6972  		})
  6973  	}
  6974  	if err != nil {
  6975  		return nil, err
  6976  	}
  6977  	defer googleapi.CloseBody(res)
  6978  	if err := googleapi.CheckResponse(res); err != nil {
  6979  		return nil, gensupport.WrapError(err)
  6980  	}
  6981  	ret := &GoogleLongrunningOperation{
  6982  		ServerResponse: googleapi.ServerResponse{
  6983  			Header:         res.Header,
  6984  			HTTPStatusCode: res.StatusCode,
  6985  		},
  6986  	}
  6987  	target := &ret
  6988  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6989  		return nil, err
  6990  	}
  6991  	return ret, nil
  6992  }
  6993  
  6994  type ProjectsLocationsRestorePlansRestoresGetCall struct {
  6995  	s            *Service
  6996  	name         string
  6997  	urlParams_   gensupport.URLParams
  6998  	ifNoneMatch_ string
  6999  	ctx_         context.Context
  7000  	header_      http.Header
  7001  }
  7002  
  7003  // Get: Retrieves the details of a single Restore.
  7004  //
  7005  //   - name: Name of the restore resource. Format:
  7006  //     `projects/*/locations/*/restorePlans/*/restores/*`.
  7007  func (r *ProjectsLocationsRestorePlansRestoresService) Get(name string) *ProjectsLocationsRestorePlansRestoresGetCall {
  7008  	c := &ProjectsLocationsRestorePlansRestoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7009  	c.name = name
  7010  	return c
  7011  }
  7012  
  7013  // Fields allows partial responses to be retrieved. See
  7014  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7015  // details.
  7016  func (c *ProjectsLocationsRestorePlansRestoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRestorePlansRestoresGetCall {
  7017  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7018  	return c
  7019  }
  7020  
  7021  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7022  // object's ETag matches the given value. This is useful for getting updates
  7023  // only after the object has changed since the last request.
  7024  func (c *ProjectsLocationsRestorePlansRestoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRestorePlansRestoresGetCall {
  7025  	c.ifNoneMatch_ = entityTag
  7026  	return c
  7027  }
  7028  
  7029  // Context sets the context to be used in this call's Do method.
  7030  func (c *ProjectsLocationsRestorePlansRestoresGetCall) Context(ctx context.Context) *ProjectsLocationsRestorePlansRestoresGetCall {
  7031  	c.ctx_ = ctx
  7032  	return c
  7033  }
  7034  
  7035  // Header returns a http.Header that can be modified by the caller to add
  7036  // headers to the request.
  7037  func (c *ProjectsLocationsRestorePlansRestoresGetCall) Header() http.Header {
  7038  	if c.header_ == nil {
  7039  		c.header_ = make(http.Header)
  7040  	}
  7041  	return c.header_
  7042  }
  7043  
  7044  func (c *ProjectsLocationsRestorePlansRestoresGetCall) doRequest(alt string) (*http.Response, error) {
  7045  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7046  	if c.ifNoneMatch_ != "" {
  7047  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7048  	}
  7049  	var body io.Reader = nil
  7050  	c.urlParams_.Set("alt", alt)
  7051  	c.urlParams_.Set("prettyPrint", "false")
  7052  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  7053  	urls += "?" + c.urlParams_.Encode()
  7054  	req, err := http.NewRequest("GET", urls, body)
  7055  	if err != nil {
  7056  		return nil, err
  7057  	}
  7058  	req.Header = reqHeaders
  7059  	googleapi.Expand(req.URL, map[string]string{
  7060  		"name": c.name,
  7061  	})
  7062  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7063  }
  7064  
  7065  // Do executes the "gkebackup.projects.locations.restorePlans.restores.get" call.
  7066  // Any non-2xx status code is an error. Response headers are in either
  7067  // *Restore.ServerResponse.Header or (if a response was returned at all) in
  7068  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7069  // whether the returned error was because http.StatusNotModified was returned.
  7070  func (c *ProjectsLocationsRestorePlansRestoresGetCall) Do(opts ...googleapi.CallOption) (*Restore, error) {
  7071  	gensupport.SetOptions(c.urlParams_, opts...)
  7072  	res, err := c.doRequest("json")
  7073  	if res != nil && res.StatusCode == http.StatusNotModified {
  7074  		if res.Body != nil {
  7075  			res.Body.Close()
  7076  		}
  7077  		return nil, gensupport.WrapError(&googleapi.Error{
  7078  			Code:   res.StatusCode,
  7079  			Header: res.Header,
  7080  		})
  7081  	}
  7082  	if err != nil {
  7083  		return nil, err
  7084  	}
  7085  	defer googleapi.CloseBody(res)
  7086  	if err := googleapi.CheckResponse(res); err != nil {
  7087  		return nil, gensupport.WrapError(err)
  7088  	}
  7089  	ret := &Restore{
  7090  		ServerResponse: googleapi.ServerResponse{
  7091  			Header:         res.Header,
  7092  			HTTPStatusCode: res.StatusCode,
  7093  		},
  7094  	}
  7095  	target := &ret
  7096  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7097  		return nil, err
  7098  	}
  7099  	return ret, nil
  7100  }
  7101  
  7102  type ProjectsLocationsRestorePlansRestoresGetIamPolicyCall struct {
  7103  	s            *Service
  7104  	resource     string
  7105  	urlParams_   gensupport.URLParams
  7106  	ifNoneMatch_ string
  7107  	ctx_         context.Context
  7108  	header_      http.Header
  7109  }
  7110  
  7111  // GetIamPolicy: Gets the access control policy for a resource. Returns an
  7112  // empty policy if the resource exists and does not have a policy set.
  7113  //
  7114  //   - resource: REQUIRED: The resource for which the policy is being requested.
  7115  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  7116  //     for the appropriate value for this field.
  7117  func (r *ProjectsLocationsRestorePlansRestoresService) GetIamPolicy(resource string) *ProjectsLocationsRestorePlansRestoresGetIamPolicyCall {
  7118  	c := &ProjectsLocationsRestorePlansRestoresGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7119  	c.resource = resource
  7120  	return c
  7121  }
  7122  
  7123  // OptionsRequestedPolicyVersion sets the optional parameter
  7124  // "options.requestedPolicyVersion": The maximum policy version that will be
  7125  // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
  7126  // an invalid value will be rejected. Requests for policies with any
  7127  // conditional role bindings must specify version 3. Policies with no
  7128  // conditional role bindings may specify any valid value or leave the field
  7129  // unset. The policy in the response might use the policy version that you
  7130  // specified, or it might use a lower policy version. For example, if you
  7131  // specify version 3, but the policy has no conditional role bindings, the
  7132  // response uses version 1. To learn which resources support conditions in
  7133  // their IAM policies, see the IAM documentation
  7134  // (https://cloud.google.com/iam/help/conditions/resource-policies).
  7135  func (c *ProjectsLocationsRestorePlansRestoresGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsRestorePlansRestoresGetIamPolicyCall {
  7136  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
  7137  	return c
  7138  }
  7139  
  7140  // Fields allows partial responses to be retrieved. See
  7141  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7142  // details.
  7143  func (c *ProjectsLocationsRestorePlansRestoresGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsRestorePlansRestoresGetIamPolicyCall {
  7144  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7145  	return c
  7146  }
  7147  
  7148  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7149  // object's ETag matches the given value. This is useful for getting updates
  7150  // only after the object has changed since the last request.
  7151  func (c *ProjectsLocationsRestorePlansRestoresGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsRestorePlansRestoresGetIamPolicyCall {
  7152  	c.ifNoneMatch_ = entityTag
  7153  	return c
  7154  }
  7155  
  7156  // Context sets the context to be used in this call's Do method.
  7157  func (c *ProjectsLocationsRestorePlansRestoresGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsRestorePlansRestoresGetIamPolicyCall {
  7158  	c.ctx_ = ctx
  7159  	return c
  7160  }
  7161  
  7162  // Header returns a http.Header that can be modified by the caller to add
  7163  // headers to the request.
  7164  func (c *ProjectsLocationsRestorePlansRestoresGetIamPolicyCall) Header() http.Header {
  7165  	if c.header_ == nil {
  7166  		c.header_ = make(http.Header)
  7167  	}
  7168  	return c.header_
  7169  }
  7170  
  7171  func (c *ProjectsLocationsRestorePlansRestoresGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  7172  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7173  	if c.ifNoneMatch_ != "" {
  7174  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7175  	}
  7176  	var body io.Reader = nil
  7177  	c.urlParams_.Set("alt", alt)
  7178  	c.urlParams_.Set("prettyPrint", "false")
  7179  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
  7180  	urls += "?" + c.urlParams_.Encode()
  7181  	req, err := http.NewRequest("GET", urls, body)
  7182  	if err != nil {
  7183  		return nil, err
  7184  	}
  7185  	req.Header = reqHeaders
  7186  	googleapi.Expand(req.URL, map[string]string{
  7187  		"resource": c.resource,
  7188  	})
  7189  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7190  }
  7191  
  7192  // Do executes the "gkebackup.projects.locations.restorePlans.restores.getIamPolicy" call.
  7193  // Any non-2xx status code is an error. Response headers are in either
  7194  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  7195  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7196  // whether the returned error was because http.StatusNotModified was returned.
  7197  func (c *ProjectsLocationsRestorePlansRestoresGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  7198  	gensupport.SetOptions(c.urlParams_, opts...)
  7199  	res, err := c.doRequest("json")
  7200  	if res != nil && res.StatusCode == http.StatusNotModified {
  7201  		if res.Body != nil {
  7202  			res.Body.Close()
  7203  		}
  7204  		return nil, gensupport.WrapError(&googleapi.Error{
  7205  			Code:   res.StatusCode,
  7206  			Header: res.Header,
  7207  		})
  7208  	}
  7209  	if err != nil {
  7210  		return nil, err
  7211  	}
  7212  	defer googleapi.CloseBody(res)
  7213  	if err := googleapi.CheckResponse(res); err != nil {
  7214  		return nil, gensupport.WrapError(err)
  7215  	}
  7216  	ret := &Policy{
  7217  		ServerResponse: googleapi.ServerResponse{
  7218  			Header:         res.Header,
  7219  			HTTPStatusCode: res.StatusCode,
  7220  		},
  7221  	}
  7222  	target := &ret
  7223  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7224  		return nil, err
  7225  	}
  7226  	return ret, nil
  7227  }
  7228  
  7229  type ProjectsLocationsRestorePlansRestoresListCall struct {
  7230  	s            *Service
  7231  	parent       string
  7232  	urlParams_   gensupport.URLParams
  7233  	ifNoneMatch_ string
  7234  	ctx_         context.Context
  7235  	header_      http.Header
  7236  }
  7237  
  7238  // List: Lists the Restores for a given RestorePlan.
  7239  //
  7240  //   - parent: The RestorePlan that contains the Restores to list. Format:
  7241  //     `projects/*/locations/*/restorePlans/*`.
  7242  func (r *ProjectsLocationsRestorePlansRestoresService) List(parent string) *ProjectsLocationsRestorePlansRestoresListCall {
  7243  	c := &ProjectsLocationsRestorePlansRestoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7244  	c.parent = parent
  7245  	return c
  7246  }
  7247  
  7248  // Filter sets the optional parameter "filter": Field match expression used to
  7249  // filter the results.
  7250  func (c *ProjectsLocationsRestorePlansRestoresListCall) Filter(filter string) *ProjectsLocationsRestorePlansRestoresListCall {
  7251  	c.urlParams_.Set("filter", filter)
  7252  	return c
  7253  }
  7254  
  7255  // OrderBy sets the optional parameter "orderBy": Field by which to sort the
  7256  // results.
  7257  func (c *ProjectsLocationsRestorePlansRestoresListCall) OrderBy(orderBy string) *ProjectsLocationsRestorePlansRestoresListCall {
  7258  	c.urlParams_.Set("orderBy", orderBy)
  7259  	return c
  7260  }
  7261  
  7262  // PageSize sets the optional parameter "pageSize": The target number of
  7263  // results to return in a single response. If not specified, a default value
  7264  // will be chosen by the service. Note that the response may include a partial
  7265  // list and a caller should only rely on the response's next_page_token to
  7266  // determine if there are more instances left to be queried.
  7267  func (c *ProjectsLocationsRestorePlansRestoresListCall) PageSize(pageSize int64) *ProjectsLocationsRestorePlansRestoresListCall {
  7268  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  7269  	return c
  7270  }
  7271  
  7272  // PageToken sets the optional parameter "pageToken": The value of
  7273  // next_page_token received from a previous `ListRestores` call. Provide this
  7274  // to retrieve the subsequent page in a multi-page list of results. When
  7275  // paginating, all other parameters provided to `ListRestores` must match the
  7276  // call that provided the page token.
  7277  func (c *ProjectsLocationsRestorePlansRestoresListCall) PageToken(pageToken string) *ProjectsLocationsRestorePlansRestoresListCall {
  7278  	c.urlParams_.Set("pageToken", pageToken)
  7279  	return c
  7280  }
  7281  
  7282  // Fields allows partial responses to be retrieved. See
  7283  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7284  // details.
  7285  func (c *ProjectsLocationsRestorePlansRestoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRestorePlansRestoresListCall {
  7286  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7287  	return c
  7288  }
  7289  
  7290  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7291  // object's ETag matches the given value. This is useful for getting updates
  7292  // only after the object has changed since the last request.
  7293  func (c *ProjectsLocationsRestorePlansRestoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRestorePlansRestoresListCall {
  7294  	c.ifNoneMatch_ = entityTag
  7295  	return c
  7296  }
  7297  
  7298  // Context sets the context to be used in this call's Do method.
  7299  func (c *ProjectsLocationsRestorePlansRestoresListCall) Context(ctx context.Context) *ProjectsLocationsRestorePlansRestoresListCall {
  7300  	c.ctx_ = ctx
  7301  	return c
  7302  }
  7303  
  7304  // Header returns a http.Header that can be modified by the caller to add
  7305  // headers to the request.
  7306  func (c *ProjectsLocationsRestorePlansRestoresListCall) Header() http.Header {
  7307  	if c.header_ == nil {
  7308  		c.header_ = make(http.Header)
  7309  	}
  7310  	return c.header_
  7311  }
  7312  
  7313  func (c *ProjectsLocationsRestorePlansRestoresListCall) doRequest(alt string) (*http.Response, error) {
  7314  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7315  	if c.ifNoneMatch_ != "" {
  7316  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7317  	}
  7318  	var body io.Reader = nil
  7319  	c.urlParams_.Set("alt", alt)
  7320  	c.urlParams_.Set("prettyPrint", "false")
  7321  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/restores")
  7322  	urls += "?" + c.urlParams_.Encode()
  7323  	req, err := http.NewRequest("GET", urls, body)
  7324  	if err != nil {
  7325  		return nil, err
  7326  	}
  7327  	req.Header = reqHeaders
  7328  	googleapi.Expand(req.URL, map[string]string{
  7329  		"parent": c.parent,
  7330  	})
  7331  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7332  }
  7333  
  7334  // Do executes the "gkebackup.projects.locations.restorePlans.restores.list" call.
  7335  // Any non-2xx status code is an error. Response headers are in either
  7336  // *ListRestoresResponse.ServerResponse.Header or (if a response was returned
  7337  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  7338  // check whether the returned error was because http.StatusNotModified was
  7339  // returned.
  7340  func (c *ProjectsLocationsRestorePlansRestoresListCall) Do(opts ...googleapi.CallOption) (*ListRestoresResponse, error) {
  7341  	gensupport.SetOptions(c.urlParams_, opts...)
  7342  	res, err := c.doRequest("json")
  7343  	if res != nil && res.StatusCode == http.StatusNotModified {
  7344  		if res.Body != nil {
  7345  			res.Body.Close()
  7346  		}
  7347  		return nil, gensupport.WrapError(&googleapi.Error{
  7348  			Code:   res.StatusCode,
  7349  			Header: res.Header,
  7350  		})
  7351  	}
  7352  	if err != nil {
  7353  		return nil, err
  7354  	}
  7355  	defer googleapi.CloseBody(res)
  7356  	if err := googleapi.CheckResponse(res); err != nil {
  7357  		return nil, gensupport.WrapError(err)
  7358  	}
  7359  	ret := &ListRestoresResponse{
  7360  		ServerResponse: googleapi.ServerResponse{
  7361  			Header:         res.Header,
  7362  			HTTPStatusCode: res.StatusCode,
  7363  		},
  7364  	}
  7365  	target := &ret
  7366  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7367  		return nil, err
  7368  	}
  7369  	return ret, nil
  7370  }
  7371  
  7372  // Pages invokes f for each page of results.
  7373  // A non-nil error returned from f will halt the iteration.
  7374  // The provided context supersedes any context provided to the Context method.
  7375  func (c *ProjectsLocationsRestorePlansRestoresListCall) Pages(ctx context.Context, f func(*ListRestoresResponse) error) error {
  7376  	c.ctx_ = ctx
  7377  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  7378  	for {
  7379  		x, err := c.Do()
  7380  		if err != nil {
  7381  			return err
  7382  		}
  7383  		if err := f(x); err != nil {
  7384  			return err
  7385  		}
  7386  		if x.NextPageToken == "" {
  7387  			return nil
  7388  		}
  7389  		c.PageToken(x.NextPageToken)
  7390  	}
  7391  }
  7392  
  7393  type ProjectsLocationsRestorePlansRestoresPatchCall struct {
  7394  	s          *Service
  7395  	name       string
  7396  	restore    *Restore
  7397  	urlParams_ gensupport.URLParams
  7398  	ctx_       context.Context
  7399  	header_    http.Header
  7400  }
  7401  
  7402  // Patch: Update a Restore.
  7403  //
  7404  //   - name: Output only. The full name of the Restore resource. Format:
  7405  //     `projects/*/locations/*/restorePlans/*/restores/*`.
  7406  func (r *ProjectsLocationsRestorePlansRestoresService) Patch(name string, restore *Restore) *ProjectsLocationsRestorePlansRestoresPatchCall {
  7407  	c := &ProjectsLocationsRestorePlansRestoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7408  	c.name = name
  7409  	c.restore = restore
  7410  	return c
  7411  }
  7412  
  7413  // UpdateMask sets the optional parameter "updateMask": This is used to specify
  7414  // the fields to be overwritten in the Restore targeted for update. The values
  7415  // for each of these updated fields will be taken from the `restore` provided
  7416  // with this request. Field names are relative to the root of the resource. If
  7417  // no `update_mask` is provided, all fields in `restore` will be written to the
  7418  // target Restore resource. Note that OUTPUT_ONLY and IMMUTABLE fields in
  7419  // `restore` are ignored and are not used to update the target Restore.
  7420  func (c *ProjectsLocationsRestorePlansRestoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsRestorePlansRestoresPatchCall {
  7421  	c.urlParams_.Set("updateMask", updateMask)
  7422  	return c
  7423  }
  7424  
  7425  // Fields allows partial responses to be retrieved. See
  7426  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7427  // details.
  7428  func (c *ProjectsLocationsRestorePlansRestoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsRestorePlansRestoresPatchCall {
  7429  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7430  	return c
  7431  }
  7432  
  7433  // Context sets the context to be used in this call's Do method.
  7434  func (c *ProjectsLocationsRestorePlansRestoresPatchCall) Context(ctx context.Context) *ProjectsLocationsRestorePlansRestoresPatchCall {
  7435  	c.ctx_ = ctx
  7436  	return c
  7437  }
  7438  
  7439  // Header returns a http.Header that can be modified by the caller to add
  7440  // headers to the request.
  7441  func (c *ProjectsLocationsRestorePlansRestoresPatchCall) Header() http.Header {
  7442  	if c.header_ == nil {
  7443  		c.header_ = make(http.Header)
  7444  	}
  7445  	return c.header_
  7446  }
  7447  
  7448  func (c *ProjectsLocationsRestorePlansRestoresPatchCall) doRequest(alt string) (*http.Response, error) {
  7449  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7450  	var body io.Reader = nil
  7451  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.restore)
  7452  	if err != nil {
  7453  		return nil, err
  7454  	}
  7455  	c.urlParams_.Set("alt", alt)
  7456  	c.urlParams_.Set("prettyPrint", "false")
  7457  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  7458  	urls += "?" + c.urlParams_.Encode()
  7459  	req, err := http.NewRequest("PATCH", urls, body)
  7460  	if err != nil {
  7461  		return nil, err
  7462  	}
  7463  	req.Header = reqHeaders
  7464  	googleapi.Expand(req.URL, map[string]string{
  7465  		"name": c.name,
  7466  	})
  7467  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7468  }
  7469  
  7470  // Do executes the "gkebackup.projects.locations.restorePlans.restores.patch" call.
  7471  // Any non-2xx status code is an error. Response headers are in either
  7472  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  7473  // returned at all) in error.(*googleapi.Error).Header. Use
  7474  // googleapi.IsNotModified to check whether the returned error was because
  7475  // http.StatusNotModified was returned.
  7476  func (c *ProjectsLocationsRestorePlansRestoresPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  7477  	gensupport.SetOptions(c.urlParams_, opts...)
  7478  	res, err := c.doRequest("json")
  7479  	if res != nil && res.StatusCode == http.StatusNotModified {
  7480  		if res.Body != nil {
  7481  			res.Body.Close()
  7482  		}
  7483  		return nil, gensupport.WrapError(&googleapi.Error{
  7484  			Code:   res.StatusCode,
  7485  			Header: res.Header,
  7486  		})
  7487  	}
  7488  	if err != nil {
  7489  		return nil, err
  7490  	}
  7491  	defer googleapi.CloseBody(res)
  7492  	if err := googleapi.CheckResponse(res); err != nil {
  7493  		return nil, gensupport.WrapError(err)
  7494  	}
  7495  	ret := &GoogleLongrunningOperation{
  7496  		ServerResponse: googleapi.ServerResponse{
  7497  			Header:         res.Header,
  7498  			HTTPStatusCode: res.StatusCode,
  7499  		},
  7500  	}
  7501  	target := &ret
  7502  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7503  		return nil, err
  7504  	}
  7505  	return ret, nil
  7506  }
  7507  
  7508  type ProjectsLocationsRestorePlansRestoresSetIamPolicyCall struct {
  7509  	s                   *Service
  7510  	resource            string
  7511  	setiampolicyrequest *SetIamPolicyRequest
  7512  	urlParams_          gensupport.URLParams
  7513  	ctx_                context.Context
  7514  	header_             http.Header
  7515  }
  7516  
  7517  // SetIamPolicy: Sets the access control policy on the specified resource.
  7518  // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
  7519  // and `PERMISSION_DENIED` errors.
  7520  //
  7521  //   - resource: REQUIRED: The resource for which the policy is being specified.
  7522  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  7523  //     for the appropriate value for this field.
  7524  func (r *ProjectsLocationsRestorePlansRestoresService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsRestorePlansRestoresSetIamPolicyCall {
  7525  	c := &ProjectsLocationsRestorePlansRestoresSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7526  	c.resource = resource
  7527  	c.setiampolicyrequest = setiampolicyrequest
  7528  	return c
  7529  }
  7530  
  7531  // Fields allows partial responses to be retrieved. See
  7532  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7533  // details.
  7534  func (c *ProjectsLocationsRestorePlansRestoresSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsRestorePlansRestoresSetIamPolicyCall {
  7535  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7536  	return c
  7537  }
  7538  
  7539  // Context sets the context to be used in this call's Do method.
  7540  func (c *ProjectsLocationsRestorePlansRestoresSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsRestorePlansRestoresSetIamPolicyCall {
  7541  	c.ctx_ = ctx
  7542  	return c
  7543  }
  7544  
  7545  // Header returns a http.Header that can be modified by the caller to add
  7546  // headers to the request.
  7547  func (c *ProjectsLocationsRestorePlansRestoresSetIamPolicyCall) Header() http.Header {
  7548  	if c.header_ == nil {
  7549  		c.header_ = make(http.Header)
  7550  	}
  7551  	return c.header_
  7552  }
  7553  
  7554  func (c *ProjectsLocationsRestorePlansRestoresSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  7555  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7556  	var body io.Reader = nil
  7557  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  7558  	if err != nil {
  7559  		return nil, err
  7560  	}
  7561  	c.urlParams_.Set("alt", alt)
  7562  	c.urlParams_.Set("prettyPrint", "false")
  7563  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
  7564  	urls += "?" + c.urlParams_.Encode()
  7565  	req, err := http.NewRequest("POST", urls, body)
  7566  	if err != nil {
  7567  		return nil, err
  7568  	}
  7569  	req.Header = reqHeaders
  7570  	googleapi.Expand(req.URL, map[string]string{
  7571  		"resource": c.resource,
  7572  	})
  7573  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7574  }
  7575  
  7576  // Do executes the "gkebackup.projects.locations.restorePlans.restores.setIamPolicy" call.
  7577  // Any non-2xx status code is an error. Response headers are in either
  7578  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  7579  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7580  // whether the returned error was because http.StatusNotModified was returned.
  7581  func (c *ProjectsLocationsRestorePlansRestoresSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  7582  	gensupport.SetOptions(c.urlParams_, opts...)
  7583  	res, err := c.doRequest("json")
  7584  	if res != nil && res.StatusCode == http.StatusNotModified {
  7585  		if res.Body != nil {
  7586  			res.Body.Close()
  7587  		}
  7588  		return nil, gensupport.WrapError(&googleapi.Error{
  7589  			Code:   res.StatusCode,
  7590  			Header: res.Header,
  7591  		})
  7592  	}
  7593  	if err != nil {
  7594  		return nil, err
  7595  	}
  7596  	defer googleapi.CloseBody(res)
  7597  	if err := googleapi.CheckResponse(res); err != nil {
  7598  		return nil, gensupport.WrapError(err)
  7599  	}
  7600  	ret := &Policy{
  7601  		ServerResponse: googleapi.ServerResponse{
  7602  			Header:         res.Header,
  7603  			HTTPStatusCode: res.StatusCode,
  7604  		},
  7605  	}
  7606  	target := &ret
  7607  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7608  		return nil, err
  7609  	}
  7610  	return ret, nil
  7611  }
  7612  
  7613  type ProjectsLocationsRestorePlansRestoresTestIamPermissionsCall struct {
  7614  	s                         *Service
  7615  	resource                  string
  7616  	testiampermissionsrequest *TestIamPermissionsRequest
  7617  	urlParams_                gensupport.URLParams
  7618  	ctx_                      context.Context
  7619  	header_                   http.Header
  7620  }
  7621  
  7622  // TestIamPermissions: Returns permissions that a caller has on the specified
  7623  // resource. If the resource does not exist, this will return an empty set of
  7624  // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
  7625  // used for building permission-aware UIs and command-line tools, not for
  7626  // authorization checking. This operation may "fail open" without warning.
  7627  //
  7628  //   - resource: REQUIRED: The resource for which the policy detail is being
  7629  //     requested. See Resource names
  7630  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
  7631  //     value for this field.
  7632  func (r *ProjectsLocationsRestorePlansRestoresService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsRestorePlansRestoresTestIamPermissionsCall {
  7633  	c := &ProjectsLocationsRestorePlansRestoresTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7634  	c.resource = resource
  7635  	c.testiampermissionsrequest = testiampermissionsrequest
  7636  	return c
  7637  }
  7638  
  7639  // Fields allows partial responses to be retrieved. See
  7640  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7641  // details.
  7642  func (c *ProjectsLocationsRestorePlansRestoresTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsRestorePlansRestoresTestIamPermissionsCall {
  7643  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7644  	return c
  7645  }
  7646  
  7647  // Context sets the context to be used in this call's Do method.
  7648  func (c *ProjectsLocationsRestorePlansRestoresTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsRestorePlansRestoresTestIamPermissionsCall {
  7649  	c.ctx_ = ctx
  7650  	return c
  7651  }
  7652  
  7653  // Header returns a http.Header that can be modified by the caller to add
  7654  // headers to the request.
  7655  func (c *ProjectsLocationsRestorePlansRestoresTestIamPermissionsCall) Header() http.Header {
  7656  	if c.header_ == nil {
  7657  		c.header_ = make(http.Header)
  7658  	}
  7659  	return c.header_
  7660  }
  7661  
  7662  func (c *ProjectsLocationsRestorePlansRestoresTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  7663  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7664  	var body io.Reader = nil
  7665  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  7666  	if err != nil {
  7667  		return nil, err
  7668  	}
  7669  	c.urlParams_.Set("alt", alt)
  7670  	c.urlParams_.Set("prettyPrint", "false")
  7671  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
  7672  	urls += "?" + c.urlParams_.Encode()
  7673  	req, err := http.NewRequest("POST", urls, body)
  7674  	if err != nil {
  7675  		return nil, err
  7676  	}
  7677  	req.Header = reqHeaders
  7678  	googleapi.Expand(req.URL, map[string]string{
  7679  		"resource": c.resource,
  7680  	})
  7681  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7682  }
  7683  
  7684  // Do executes the "gkebackup.projects.locations.restorePlans.restores.testIamPermissions" call.
  7685  // Any non-2xx status code is an error. Response headers are in either
  7686  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
  7687  // returned at all) in error.(*googleapi.Error).Header. Use
  7688  // googleapi.IsNotModified to check whether the returned error was because
  7689  // http.StatusNotModified was returned.
  7690  func (c *ProjectsLocationsRestorePlansRestoresTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  7691  	gensupport.SetOptions(c.urlParams_, opts...)
  7692  	res, err := c.doRequest("json")
  7693  	if res != nil && res.StatusCode == http.StatusNotModified {
  7694  		if res.Body != nil {
  7695  			res.Body.Close()
  7696  		}
  7697  		return nil, gensupport.WrapError(&googleapi.Error{
  7698  			Code:   res.StatusCode,
  7699  			Header: res.Header,
  7700  		})
  7701  	}
  7702  	if err != nil {
  7703  		return nil, err
  7704  	}
  7705  	defer googleapi.CloseBody(res)
  7706  	if err := googleapi.CheckResponse(res); err != nil {
  7707  		return nil, gensupport.WrapError(err)
  7708  	}
  7709  	ret := &TestIamPermissionsResponse{
  7710  		ServerResponse: googleapi.ServerResponse{
  7711  			Header:         res.Header,
  7712  			HTTPStatusCode: res.StatusCode,
  7713  		},
  7714  	}
  7715  	target := &ret
  7716  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7717  		return nil, err
  7718  	}
  7719  	return ret, nil
  7720  }
  7721  
  7722  type ProjectsLocationsRestorePlansRestoresVolumeRestoresGetCall struct {
  7723  	s            *Service
  7724  	name         string
  7725  	urlParams_   gensupport.URLParams
  7726  	ifNoneMatch_ string
  7727  	ctx_         context.Context
  7728  	header_      http.Header
  7729  }
  7730  
  7731  // Get: Retrieve the details of a single VolumeRestore.
  7732  //
  7733  //   - name: Full name of the VolumeRestore resource. Format:
  7734  //     `projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*`.
  7735  func (r *ProjectsLocationsRestorePlansRestoresVolumeRestoresService) Get(name string) *ProjectsLocationsRestorePlansRestoresVolumeRestoresGetCall {
  7736  	c := &ProjectsLocationsRestorePlansRestoresVolumeRestoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7737  	c.name = name
  7738  	return c
  7739  }
  7740  
  7741  // Fields allows partial responses to be retrieved. See
  7742  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7743  // details.
  7744  func (c *ProjectsLocationsRestorePlansRestoresVolumeRestoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRestorePlansRestoresVolumeRestoresGetCall {
  7745  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7746  	return c
  7747  }
  7748  
  7749  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7750  // object's ETag matches the given value. This is useful for getting updates
  7751  // only after the object has changed since the last request.
  7752  func (c *ProjectsLocationsRestorePlansRestoresVolumeRestoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRestorePlansRestoresVolumeRestoresGetCall {
  7753  	c.ifNoneMatch_ = entityTag
  7754  	return c
  7755  }
  7756  
  7757  // Context sets the context to be used in this call's Do method.
  7758  func (c *ProjectsLocationsRestorePlansRestoresVolumeRestoresGetCall) Context(ctx context.Context) *ProjectsLocationsRestorePlansRestoresVolumeRestoresGetCall {
  7759  	c.ctx_ = ctx
  7760  	return c
  7761  }
  7762  
  7763  // Header returns a http.Header that can be modified by the caller to add
  7764  // headers to the request.
  7765  func (c *ProjectsLocationsRestorePlansRestoresVolumeRestoresGetCall) Header() http.Header {
  7766  	if c.header_ == nil {
  7767  		c.header_ = make(http.Header)
  7768  	}
  7769  	return c.header_
  7770  }
  7771  
  7772  func (c *ProjectsLocationsRestorePlansRestoresVolumeRestoresGetCall) doRequest(alt string) (*http.Response, error) {
  7773  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7774  	if c.ifNoneMatch_ != "" {
  7775  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7776  	}
  7777  	var body io.Reader = nil
  7778  	c.urlParams_.Set("alt", alt)
  7779  	c.urlParams_.Set("prettyPrint", "false")
  7780  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  7781  	urls += "?" + c.urlParams_.Encode()
  7782  	req, err := http.NewRequest("GET", urls, body)
  7783  	if err != nil {
  7784  		return nil, err
  7785  	}
  7786  	req.Header = reqHeaders
  7787  	googleapi.Expand(req.URL, map[string]string{
  7788  		"name": c.name,
  7789  	})
  7790  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7791  }
  7792  
  7793  // Do executes the "gkebackup.projects.locations.restorePlans.restores.volumeRestores.get" call.
  7794  // Any non-2xx status code is an error. Response headers are in either
  7795  // *VolumeRestore.ServerResponse.Header or (if a response was returned at all)
  7796  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7797  // whether the returned error was because http.StatusNotModified was returned.
  7798  func (c *ProjectsLocationsRestorePlansRestoresVolumeRestoresGetCall) Do(opts ...googleapi.CallOption) (*VolumeRestore, error) {
  7799  	gensupport.SetOptions(c.urlParams_, opts...)
  7800  	res, err := c.doRequest("json")
  7801  	if res != nil && res.StatusCode == http.StatusNotModified {
  7802  		if res.Body != nil {
  7803  			res.Body.Close()
  7804  		}
  7805  		return nil, gensupport.WrapError(&googleapi.Error{
  7806  			Code:   res.StatusCode,
  7807  			Header: res.Header,
  7808  		})
  7809  	}
  7810  	if err != nil {
  7811  		return nil, err
  7812  	}
  7813  	defer googleapi.CloseBody(res)
  7814  	if err := googleapi.CheckResponse(res); err != nil {
  7815  		return nil, gensupport.WrapError(err)
  7816  	}
  7817  	ret := &VolumeRestore{
  7818  		ServerResponse: googleapi.ServerResponse{
  7819  			Header:         res.Header,
  7820  			HTTPStatusCode: res.StatusCode,
  7821  		},
  7822  	}
  7823  	target := &ret
  7824  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7825  		return nil, err
  7826  	}
  7827  	return ret, nil
  7828  }
  7829  
  7830  type ProjectsLocationsRestorePlansRestoresVolumeRestoresGetIamPolicyCall struct {
  7831  	s            *Service
  7832  	resource     string
  7833  	urlParams_   gensupport.URLParams
  7834  	ifNoneMatch_ string
  7835  	ctx_         context.Context
  7836  	header_      http.Header
  7837  }
  7838  
  7839  // GetIamPolicy: Gets the access control policy for a resource. Returns an
  7840  // empty policy if the resource exists and does not have a policy set.
  7841  //
  7842  //   - resource: REQUIRED: The resource for which the policy is being requested.
  7843  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  7844  //     for the appropriate value for this field.
  7845  func (r *ProjectsLocationsRestorePlansRestoresVolumeRestoresService) GetIamPolicy(resource string) *ProjectsLocationsRestorePlansRestoresVolumeRestoresGetIamPolicyCall {
  7846  	c := &ProjectsLocationsRestorePlansRestoresVolumeRestoresGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7847  	c.resource = resource
  7848  	return c
  7849  }
  7850  
  7851  // OptionsRequestedPolicyVersion sets the optional parameter
  7852  // "options.requestedPolicyVersion": The maximum policy version that will be
  7853  // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
  7854  // an invalid value will be rejected. Requests for policies with any
  7855  // conditional role bindings must specify version 3. Policies with no
  7856  // conditional role bindings may specify any valid value or leave the field
  7857  // unset. The policy in the response might use the policy version that you
  7858  // specified, or it might use a lower policy version. For example, if you
  7859  // specify version 3, but the policy has no conditional role bindings, the
  7860  // response uses version 1. To learn which resources support conditions in
  7861  // their IAM policies, see the IAM documentation
  7862  // (https://cloud.google.com/iam/help/conditions/resource-policies).
  7863  func (c *ProjectsLocationsRestorePlansRestoresVolumeRestoresGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsRestorePlansRestoresVolumeRestoresGetIamPolicyCall {
  7864  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
  7865  	return c
  7866  }
  7867  
  7868  // Fields allows partial responses to be retrieved. See
  7869  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7870  // details.
  7871  func (c *ProjectsLocationsRestorePlansRestoresVolumeRestoresGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsRestorePlansRestoresVolumeRestoresGetIamPolicyCall {
  7872  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7873  	return c
  7874  }
  7875  
  7876  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7877  // object's ETag matches the given value. This is useful for getting updates
  7878  // only after the object has changed since the last request.
  7879  func (c *ProjectsLocationsRestorePlansRestoresVolumeRestoresGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsRestorePlansRestoresVolumeRestoresGetIamPolicyCall {
  7880  	c.ifNoneMatch_ = entityTag
  7881  	return c
  7882  }
  7883  
  7884  // Context sets the context to be used in this call's Do method.
  7885  func (c *ProjectsLocationsRestorePlansRestoresVolumeRestoresGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsRestorePlansRestoresVolumeRestoresGetIamPolicyCall {
  7886  	c.ctx_ = ctx
  7887  	return c
  7888  }
  7889  
  7890  // Header returns a http.Header that can be modified by the caller to add
  7891  // headers to the request.
  7892  func (c *ProjectsLocationsRestorePlansRestoresVolumeRestoresGetIamPolicyCall) Header() http.Header {
  7893  	if c.header_ == nil {
  7894  		c.header_ = make(http.Header)
  7895  	}
  7896  	return c.header_
  7897  }
  7898  
  7899  func (c *ProjectsLocationsRestorePlansRestoresVolumeRestoresGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  7900  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7901  	if c.ifNoneMatch_ != "" {
  7902  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7903  	}
  7904  	var body io.Reader = nil
  7905  	c.urlParams_.Set("alt", alt)
  7906  	c.urlParams_.Set("prettyPrint", "false")
  7907  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
  7908  	urls += "?" + c.urlParams_.Encode()
  7909  	req, err := http.NewRequest("GET", urls, body)
  7910  	if err != nil {
  7911  		return nil, err
  7912  	}
  7913  	req.Header = reqHeaders
  7914  	googleapi.Expand(req.URL, map[string]string{
  7915  		"resource": c.resource,
  7916  	})
  7917  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7918  }
  7919  
  7920  // Do executes the "gkebackup.projects.locations.restorePlans.restores.volumeRestores.getIamPolicy" call.
  7921  // Any non-2xx status code is an error. Response headers are in either
  7922  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  7923  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7924  // whether the returned error was because http.StatusNotModified was returned.
  7925  func (c *ProjectsLocationsRestorePlansRestoresVolumeRestoresGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  7926  	gensupport.SetOptions(c.urlParams_, opts...)
  7927  	res, err := c.doRequest("json")
  7928  	if res != nil && res.StatusCode == http.StatusNotModified {
  7929  		if res.Body != nil {
  7930  			res.Body.Close()
  7931  		}
  7932  		return nil, gensupport.WrapError(&googleapi.Error{
  7933  			Code:   res.StatusCode,
  7934  			Header: res.Header,
  7935  		})
  7936  	}
  7937  	if err != nil {
  7938  		return nil, err
  7939  	}
  7940  	defer googleapi.CloseBody(res)
  7941  	if err := googleapi.CheckResponse(res); err != nil {
  7942  		return nil, gensupport.WrapError(err)
  7943  	}
  7944  	ret := &Policy{
  7945  		ServerResponse: googleapi.ServerResponse{
  7946  			Header:         res.Header,
  7947  			HTTPStatusCode: res.StatusCode,
  7948  		},
  7949  	}
  7950  	target := &ret
  7951  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7952  		return nil, err
  7953  	}
  7954  	return ret, nil
  7955  }
  7956  
  7957  type ProjectsLocationsRestorePlansRestoresVolumeRestoresListCall struct {
  7958  	s            *Service
  7959  	parent       string
  7960  	urlParams_   gensupport.URLParams
  7961  	ifNoneMatch_ string
  7962  	ctx_         context.Context
  7963  	header_      http.Header
  7964  }
  7965  
  7966  // List: Lists the VolumeRestores for a given Restore.
  7967  //
  7968  //   - parent: The Restore that contains the VolumeRestores to list. Format:
  7969  //     `projects/*/locations/*/restorePlans/*/restores/*`.
  7970  func (r *ProjectsLocationsRestorePlansRestoresVolumeRestoresService) List(parent string) *ProjectsLocationsRestorePlansRestoresVolumeRestoresListCall {
  7971  	c := &ProjectsLocationsRestorePlansRestoresVolumeRestoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7972  	c.parent = parent
  7973  	return c
  7974  }
  7975  
  7976  // Filter sets the optional parameter "filter": Field match expression used to
  7977  // filter the results.
  7978  func (c *ProjectsLocationsRestorePlansRestoresVolumeRestoresListCall) Filter(filter string) *ProjectsLocationsRestorePlansRestoresVolumeRestoresListCall {
  7979  	c.urlParams_.Set("filter", filter)
  7980  	return c
  7981  }
  7982  
  7983  // OrderBy sets the optional parameter "orderBy": Field by which to sort the
  7984  // results.
  7985  func (c *ProjectsLocationsRestorePlansRestoresVolumeRestoresListCall) OrderBy(orderBy string) *ProjectsLocationsRestorePlansRestoresVolumeRestoresListCall {
  7986  	c.urlParams_.Set("orderBy", orderBy)
  7987  	return c
  7988  }
  7989  
  7990  // PageSize sets the optional parameter "pageSize": The target number of
  7991  // results to return in a single response. If not specified, a default value
  7992  // will be chosen by the service. Note that the response may include a partial
  7993  // list and a caller should only rely on the response's next_page_token to
  7994  // determine if there are more instances left to be queried.
  7995  func (c *ProjectsLocationsRestorePlansRestoresVolumeRestoresListCall) PageSize(pageSize int64) *ProjectsLocationsRestorePlansRestoresVolumeRestoresListCall {
  7996  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  7997  	return c
  7998  }
  7999  
  8000  // PageToken sets the optional parameter "pageToken": The value of
  8001  // next_page_token received from a previous `ListVolumeRestores` call. Provide
  8002  // this to retrieve the subsequent page in a multi-page list of results. When
  8003  // paginating, all other parameters provided to `ListVolumeRestores` must match
  8004  // the call that provided the page token.
  8005  func (c *ProjectsLocationsRestorePlansRestoresVolumeRestoresListCall) PageToken(pageToken string) *ProjectsLocationsRestorePlansRestoresVolumeRestoresListCall {
  8006  	c.urlParams_.Set("pageToken", pageToken)
  8007  	return c
  8008  }
  8009  
  8010  // Fields allows partial responses to be retrieved. See
  8011  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8012  // details.
  8013  func (c *ProjectsLocationsRestorePlansRestoresVolumeRestoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRestorePlansRestoresVolumeRestoresListCall {
  8014  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8015  	return c
  8016  }
  8017  
  8018  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8019  // object's ETag matches the given value. This is useful for getting updates
  8020  // only after the object has changed since the last request.
  8021  func (c *ProjectsLocationsRestorePlansRestoresVolumeRestoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRestorePlansRestoresVolumeRestoresListCall {
  8022  	c.ifNoneMatch_ = entityTag
  8023  	return c
  8024  }
  8025  
  8026  // Context sets the context to be used in this call's Do method.
  8027  func (c *ProjectsLocationsRestorePlansRestoresVolumeRestoresListCall) Context(ctx context.Context) *ProjectsLocationsRestorePlansRestoresVolumeRestoresListCall {
  8028  	c.ctx_ = ctx
  8029  	return c
  8030  }
  8031  
  8032  // Header returns a http.Header that can be modified by the caller to add
  8033  // headers to the request.
  8034  func (c *ProjectsLocationsRestorePlansRestoresVolumeRestoresListCall) Header() http.Header {
  8035  	if c.header_ == nil {
  8036  		c.header_ = make(http.Header)
  8037  	}
  8038  	return c.header_
  8039  }
  8040  
  8041  func (c *ProjectsLocationsRestorePlansRestoresVolumeRestoresListCall) doRequest(alt string) (*http.Response, error) {
  8042  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8043  	if c.ifNoneMatch_ != "" {
  8044  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8045  	}
  8046  	var body io.Reader = nil
  8047  	c.urlParams_.Set("alt", alt)
  8048  	c.urlParams_.Set("prettyPrint", "false")
  8049  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/volumeRestores")
  8050  	urls += "?" + c.urlParams_.Encode()
  8051  	req, err := http.NewRequest("GET", urls, body)
  8052  	if err != nil {
  8053  		return nil, err
  8054  	}
  8055  	req.Header = reqHeaders
  8056  	googleapi.Expand(req.URL, map[string]string{
  8057  		"parent": c.parent,
  8058  	})
  8059  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8060  }
  8061  
  8062  // Do executes the "gkebackup.projects.locations.restorePlans.restores.volumeRestores.list" call.
  8063  // Any non-2xx status code is an error. Response headers are in either
  8064  // *ListVolumeRestoresResponse.ServerResponse.Header or (if a response was
  8065  // returned at all) in error.(*googleapi.Error).Header. Use
  8066  // googleapi.IsNotModified to check whether the returned error was because
  8067  // http.StatusNotModified was returned.
  8068  func (c *ProjectsLocationsRestorePlansRestoresVolumeRestoresListCall) Do(opts ...googleapi.CallOption) (*ListVolumeRestoresResponse, error) {
  8069  	gensupport.SetOptions(c.urlParams_, opts...)
  8070  	res, err := c.doRequest("json")
  8071  	if res != nil && res.StatusCode == http.StatusNotModified {
  8072  		if res.Body != nil {
  8073  			res.Body.Close()
  8074  		}
  8075  		return nil, gensupport.WrapError(&googleapi.Error{
  8076  			Code:   res.StatusCode,
  8077  			Header: res.Header,
  8078  		})
  8079  	}
  8080  	if err != nil {
  8081  		return nil, err
  8082  	}
  8083  	defer googleapi.CloseBody(res)
  8084  	if err := googleapi.CheckResponse(res); err != nil {
  8085  		return nil, gensupport.WrapError(err)
  8086  	}
  8087  	ret := &ListVolumeRestoresResponse{
  8088  		ServerResponse: googleapi.ServerResponse{
  8089  			Header:         res.Header,
  8090  			HTTPStatusCode: res.StatusCode,
  8091  		},
  8092  	}
  8093  	target := &ret
  8094  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8095  		return nil, err
  8096  	}
  8097  	return ret, nil
  8098  }
  8099  
  8100  // Pages invokes f for each page of results.
  8101  // A non-nil error returned from f will halt the iteration.
  8102  // The provided context supersedes any context provided to the Context method.
  8103  func (c *ProjectsLocationsRestorePlansRestoresVolumeRestoresListCall) Pages(ctx context.Context, f func(*ListVolumeRestoresResponse) error) error {
  8104  	c.ctx_ = ctx
  8105  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  8106  	for {
  8107  		x, err := c.Do()
  8108  		if err != nil {
  8109  			return err
  8110  		}
  8111  		if err := f(x); err != nil {
  8112  			return err
  8113  		}
  8114  		if x.NextPageToken == "" {
  8115  			return nil
  8116  		}
  8117  		c.PageToken(x.NextPageToken)
  8118  	}
  8119  }
  8120  
  8121  type ProjectsLocationsRestorePlansRestoresVolumeRestoresSetIamPolicyCall struct {
  8122  	s                   *Service
  8123  	resource            string
  8124  	setiampolicyrequest *SetIamPolicyRequest
  8125  	urlParams_          gensupport.URLParams
  8126  	ctx_                context.Context
  8127  	header_             http.Header
  8128  }
  8129  
  8130  // SetIamPolicy: Sets the access control policy on the specified resource.
  8131  // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
  8132  // and `PERMISSION_DENIED` errors.
  8133  //
  8134  //   - resource: REQUIRED: The resource for which the policy is being specified.
  8135  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  8136  //     for the appropriate value for this field.
  8137  func (r *ProjectsLocationsRestorePlansRestoresVolumeRestoresService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsRestorePlansRestoresVolumeRestoresSetIamPolicyCall {
  8138  	c := &ProjectsLocationsRestorePlansRestoresVolumeRestoresSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8139  	c.resource = resource
  8140  	c.setiampolicyrequest = setiampolicyrequest
  8141  	return c
  8142  }
  8143  
  8144  // Fields allows partial responses to be retrieved. See
  8145  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8146  // details.
  8147  func (c *ProjectsLocationsRestorePlansRestoresVolumeRestoresSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsRestorePlansRestoresVolumeRestoresSetIamPolicyCall {
  8148  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8149  	return c
  8150  }
  8151  
  8152  // Context sets the context to be used in this call's Do method.
  8153  func (c *ProjectsLocationsRestorePlansRestoresVolumeRestoresSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsRestorePlansRestoresVolumeRestoresSetIamPolicyCall {
  8154  	c.ctx_ = ctx
  8155  	return c
  8156  }
  8157  
  8158  // Header returns a http.Header that can be modified by the caller to add
  8159  // headers to the request.
  8160  func (c *ProjectsLocationsRestorePlansRestoresVolumeRestoresSetIamPolicyCall) Header() http.Header {
  8161  	if c.header_ == nil {
  8162  		c.header_ = make(http.Header)
  8163  	}
  8164  	return c.header_
  8165  }
  8166  
  8167  func (c *ProjectsLocationsRestorePlansRestoresVolumeRestoresSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  8168  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8169  	var body io.Reader = nil
  8170  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  8171  	if err != nil {
  8172  		return nil, err
  8173  	}
  8174  	c.urlParams_.Set("alt", alt)
  8175  	c.urlParams_.Set("prettyPrint", "false")
  8176  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
  8177  	urls += "?" + c.urlParams_.Encode()
  8178  	req, err := http.NewRequest("POST", urls, body)
  8179  	if err != nil {
  8180  		return nil, err
  8181  	}
  8182  	req.Header = reqHeaders
  8183  	googleapi.Expand(req.URL, map[string]string{
  8184  		"resource": c.resource,
  8185  	})
  8186  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8187  }
  8188  
  8189  // Do executes the "gkebackup.projects.locations.restorePlans.restores.volumeRestores.setIamPolicy" call.
  8190  // Any non-2xx status code is an error. Response headers are in either
  8191  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  8192  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8193  // whether the returned error was because http.StatusNotModified was returned.
  8194  func (c *ProjectsLocationsRestorePlansRestoresVolumeRestoresSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  8195  	gensupport.SetOptions(c.urlParams_, opts...)
  8196  	res, err := c.doRequest("json")
  8197  	if res != nil && res.StatusCode == http.StatusNotModified {
  8198  		if res.Body != nil {
  8199  			res.Body.Close()
  8200  		}
  8201  		return nil, gensupport.WrapError(&googleapi.Error{
  8202  			Code:   res.StatusCode,
  8203  			Header: res.Header,
  8204  		})
  8205  	}
  8206  	if err != nil {
  8207  		return nil, err
  8208  	}
  8209  	defer googleapi.CloseBody(res)
  8210  	if err := googleapi.CheckResponse(res); err != nil {
  8211  		return nil, gensupport.WrapError(err)
  8212  	}
  8213  	ret := &Policy{
  8214  		ServerResponse: googleapi.ServerResponse{
  8215  			Header:         res.Header,
  8216  			HTTPStatusCode: res.StatusCode,
  8217  		},
  8218  	}
  8219  	target := &ret
  8220  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8221  		return nil, err
  8222  	}
  8223  	return ret, nil
  8224  }
  8225  
  8226  type ProjectsLocationsRestorePlansRestoresVolumeRestoresTestIamPermissionsCall struct {
  8227  	s                         *Service
  8228  	resource                  string
  8229  	testiampermissionsrequest *TestIamPermissionsRequest
  8230  	urlParams_                gensupport.URLParams
  8231  	ctx_                      context.Context
  8232  	header_                   http.Header
  8233  }
  8234  
  8235  // TestIamPermissions: Returns permissions that a caller has on the specified
  8236  // resource. If the resource does not exist, this will return an empty set of
  8237  // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
  8238  // used for building permission-aware UIs and command-line tools, not for
  8239  // authorization checking. This operation may "fail open" without warning.
  8240  //
  8241  //   - resource: REQUIRED: The resource for which the policy detail is being
  8242  //     requested. See Resource names
  8243  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
  8244  //     value for this field.
  8245  func (r *ProjectsLocationsRestorePlansRestoresVolumeRestoresService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsRestorePlansRestoresVolumeRestoresTestIamPermissionsCall {
  8246  	c := &ProjectsLocationsRestorePlansRestoresVolumeRestoresTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8247  	c.resource = resource
  8248  	c.testiampermissionsrequest = testiampermissionsrequest
  8249  	return c
  8250  }
  8251  
  8252  // Fields allows partial responses to be retrieved. See
  8253  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8254  // details.
  8255  func (c *ProjectsLocationsRestorePlansRestoresVolumeRestoresTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsRestorePlansRestoresVolumeRestoresTestIamPermissionsCall {
  8256  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8257  	return c
  8258  }
  8259  
  8260  // Context sets the context to be used in this call's Do method.
  8261  func (c *ProjectsLocationsRestorePlansRestoresVolumeRestoresTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsRestorePlansRestoresVolumeRestoresTestIamPermissionsCall {
  8262  	c.ctx_ = ctx
  8263  	return c
  8264  }
  8265  
  8266  // Header returns a http.Header that can be modified by the caller to add
  8267  // headers to the request.
  8268  func (c *ProjectsLocationsRestorePlansRestoresVolumeRestoresTestIamPermissionsCall) Header() http.Header {
  8269  	if c.header_ == nil {
  8270  		c.header_ = make(http.Header)
  8271  	}
  8272  	return c.header_
  8273  }
  8274  
  8275  func (c *ProjectsLocationsRestorePlansRestoresVolumeRestoresTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  8276  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8277  	var body io.Reader = nil
  8278  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  8279  	if err != nil {
  8280  		return nil, err
  8281  	}
  8282  	c.urlParams_.Set("alt", alt)
  8283  	c.urlParams_.Set("prettyPrint", "false")
  8284  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
  8285  	urls += "?" + c.urlParams_.Encode()
  8286  	req, err := http.NewRequest("POST", urls, body)
  8287  	if err != nil {
  8288  		return nil, err
  8289  	}
  8290  	req.Header = reqHeaders
  8291  	googleapi.Expand(req.URL, map[string]string{
  8292  		"resource": c.resource,
  8293  	})
  8294  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8295  }
  8296  
  8297  // Do executes the "gkebackup.projects.locations.restorePlans.restores.volumeRestores.testIamPermissions" call.
  8298  // Any non-2xx status code is an error. Response headers are in either
  8299  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
  8300  // returned at all) in error.(*googleapi.Error).Header. Use
  8301  // googleapi.IsNotModified to check whether the returned error was because
  8302  // http.StatusNotModified was returned.
  8303  func (c *ProjectsLocationsRestorePlansRestoresVolumeRestoresTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  8304  	gensupport.SetOptions(c.urlParams_, opts...)
  8305  	res, err := c.doRequest("json")
  8306  	if res != nil && res.StatusCode == http.StatusNotModified {
  8307  		if res.Body != nil {
  8308  			res.Body.Close()
  8309  		}
  8310  		return nil, gensupport.WrapError(&googleapi.Error{
  8311  			Code:   res.StatusCode,
  8312  			Header: res.Header,
  8313  		})
  8314  	}
  8315  	if err != nil {
  8316  		return nil, err
  8317  	}
  8318  	defer googleapi.CloseBody(res)
  8319  	if err := googleapi.CheckResponse(res); err != nil {
  8320  		return nil, gensupport.WrapError(err)
  8321  	}
  8322  	ret := &TestIamPermissionsResponse{
  8323  		ServerResponse: googleapi.ServerResponse{
  8324  			Header:         res.Header,
  8325  			HTTPStatusCode: res.StatusCode,
  8326  		},
  8327  	}
  8328  	target := &ret
  8329  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8330  		return nil, err
  8331  	}
  8332  	return ret, nil
  8333  }
  8334  

View as plain text