...

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

Documentation: google.golang.org/api/config/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 config provides access to the Infrastructure Manager API.
     8  //
     9  // For product documentation, see: https://cloud.google.com/infrastructure-manager/docs
    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/config/v1"
    27  //	...
    28  //	ctx := context.Background()
    29  //	configService, err := config.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  //	configService, err := config.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  //	configService, err := config.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    49  //
    50  // See [google.golang.org/api/option.ClientOption] for details on options.
    51  package config // import "google.golang.org/api/config/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 = "config:v1"
    90  const apiName = "config"
    91  const apiVersion = "v1"
    92  const basePath = "https://config.googleapis.com/"
    93  const basePathTemplate = "https://config.UNIVERSE_DOMAIN/"
    94  const mtlsBasePath = "https://config.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.Deployments = NewProjectsLocationsDeploymentsService(s)
   172  	rs.Operations = NewProjectsLocationsOperationsService(s)
   173  	rs.Previews = NewProjectsLocationsPreviewsService(s)
   174  	rs.TerraformVersions = NewProjectsLocationsTerraformVersionsService(s)
   175  	return rs
   176  }
   177  
   178  type ProjectsLocationsService struct {
   179  	s *Service
   180  
   181  	Deployments *ProjectsLocationsDeploymentsService
   182  
   183  	Operations *ProjectsLocationsOperationsService
   184  
   185  	Previews *ProjectsLocationsPreviewsService
   186  
   187  	TerraformVersions *ProjectsLocationsTerraformVersionsService
   188  }
   189  
   190  func NewProjectsLocationsDeploymentsService(s *Service) *ProjectsLocationsDeploymentsService {
   191  	rs := &ProjectsLocationsDeploymentsService{s: s}
   192  	rs.Revisions = NewProjectsLocationsDeploymentsRevisionsService(s)
   193  	return rs
   194  }
   195  
   196  type ProjectsLocationsDeploymentsService struct {
   197  	s *Service
   198  
   199  	Revisions *ProjectsLocationsDeploymentsRevisionsService
   200  }
   201  
   202  func NewProjectsLocationsDeploymentsRevisionsService(s *Service) *ProjectsLocationsDeploymentsRevisionsService {
   203  	rs := &ProjectsLocationsDeploymentsRevisionsService{s: s}
   204  	rs.Resources = NewProjectsLocationsDeploymentsRevisionsResourcesService(s)
   205  	return rs
   206  }
   207  
   208  type ProjectsLocationsDeploymentsRevisionsService struct {
   209  	s *Service
   210  
   211  	Resources *ProjectsLocationsDeploymentsRevisionsResourcesService
   212  }
   213  
   214  func NewProjectsLocationsDeploymentsRevisionsResourcesService(s *Service) *ProjectsLocationsDeploymentsRevisionsResourcesService {
   215  	rs := &ProjectsLocationsDeploymentsRevisionsResourcesService{s: s}
   216  	return rs
   217  }
   218  
   219  type ProjectsLocationsDeploymentsRevisionsResourcesService struct {
   220  	s *Service
   221  }
   222  
   223  func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
   224  	rs := &ProjectsLocationsOperationsService{s: s}
   225  	return rs
   226  }
   227  
   228  type ProjectsLocationsOperationsService struct {
   229  	s *Service
   230  }
   231  
   232  func NewProjectsLocationsPreviewsService(s *Service) *ProjectsLocationsPreviewsService {
   233  	rs := &ProjectsLocationsPreviewsService{s: s}
   234  	return rs
   235  }
   236  
   237  type ProjectsLocationsPreviewsService struct {
   238  	s *Service
   239  }
   240  
   241  func NewProjectsLocationsTerraformVersionsService(s *Service) *ProjectsLocationsTerraformVersionsService {
   242  	rs := &ProjectsLocationsTerraformVersionsService{s: s}
   243  	return rs
   244  }
   245  
   246  type ProjectsLocationsTerraformVersionsService struct {
   247  	s *Service
   248  }
   249  
   250  // ApplyResults: Outputs and artifacts from applying a deployment.
   251  type ApplyResults struct {
   252  	// Artifacts: Location of artifacts (e.g. logs) in Google Cloud Storage.
   253  	// Format: `gs://{bucket}/{object}`
   254  	Artifacts string `json:"artifacts,omitempty"`
   255  	// Content: Location of a blueprint copy and other manifests in Google Cloud
   256  	// Storage. Format: `gs://{bucket}/{object}`
   257  	Content string `json:"content,omitempty"`
   258  	// Outputs: Map of output name to output info.
   259  	Outputs map[string]TerraformOutput `json:"outputs,omitempty"`
   260  	// ForceSendFields is a list of field names (e.g. "Artifacts") to
   261  	// unconditionally include in API requests. By default, fields with empty or
   262  	// default values are omitted from API requests. See
   263  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   264  	// details.
   265  	ForceSendFields []string `json:"-"`
   266  	// NullFields is a list of field names (e.g. "Artifacts") to include in API
   267  	// requests with the JSON null value. By default, fields with empty values are
   268  	// omitted from API requests. See
   269  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   270  	NullFields []string `json:"-"`
   271  }
   272  
   273  func (s *ApplyResults) MarshalJSON() ([]byte, error) {
   274  	type NoMethod ApplyResults
   275  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   276  }
   277  
   278  // AuditConfig: Specifies the audit configuration for a service. The
   279  // configuration determines which permission types are logged, and what
   280  // identities, if any, are exempted from logging. An AuditConfig must have one
   281  // or more AuditLogConfigs. If there are AuditConfigs for both `allServices`
   282  // and a specific service, the union of the two AuditConfigs is used for that
   283  // service: the log_types specified in each AuditConfig are enabled, and the
   284  // exempted_members in each AuditLogConfig are exempted. Example Policy with
   285  // multiple AuditConfigs: { "audit_configs": [ { "service": "allServices",
   286  // "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [
   287  // "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { "log_type":
   288  // "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com",
   289  // "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type":
   290  // "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] } For
   291  // sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
   292  // logging. It also exempts `jose@example.com` from DATA_READ logging, and
   293  // `aliya@example.com` from DATA_WRITE logging.
   294  type AuditConfig struct {
   295  	// AuditLogConfigs: The configuration for logging of each type of permission.
   296  	AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"`
   297  	// Service: Specifies a service that will be enabled for audit logging. For
   298  	// example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices`
   299  	// is a special value that covers all services.
   300  	Service string `json:"service,omitempty"`
   301  	// ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to
   302  	// unconditionally include in API requests. By default, fields with empty or
   303  	// default values are omitted from API requests. See
   304  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   305  	// details.
   306  	ForceSendFields []string `json:"-"`
   307  	// NullFields is a list of field names (e.g. "AuditLogConfigs") to include in
   308  	// API requests with the JSON null value. By default, fields with empty values
   309  	// are omitted from API requests. See
   310  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   311  	NullFields []string `json:"-"`
   312  }
   313  
   314  func (s *AuditConfig) MarshalJSON() ([]byte, error) {
   315  	type NoMethod AuditConfig
   316  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   317  }
   318  
   319  // AuditLogConfig: Provides the configuration for logging a type of
   320  // permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ",
   321  // "exempted_members": [ "user:jose@example.com" ] }, { "log_type":
   322  // "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while
   323  // exempting jose@example.com from DATA_READ logging.
   324  type AuditLogConfig struct {
   325  	// ExemptedMembers: Specifies the identities that do not cause logging for this
   326  	// type of permission. Follows the same format of Binding.members.
   327  	ExemptedMembers []string `json:"exemptedMembers,omitempty"`
   328  	// LogType: The log type that this config enables.
   329  	//
   330  	// Possible values:
   331  	//   "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this.
   332  	//   "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy
   333  	//   "DATA_WRITE" - Data writes. Example: CloudSQL Users create
   334  	//   "DATA_READ" - Data reads. Example: CloudSQL Users list
   335  	LogType string `json:"logType,omitempty"`
   336  	// ForceSendFields is a list of field names (e.g. "ExemptedMembers") to
   337  	// unconditionally include in API requests. By default, fields with empty or
   338  	// default values are omitted from API requests. See
   339  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   340  	// details.
   341  	ForceSendFields []string `json:"-"`
   342  	// NullFields is a list of field names (e.g. "ExemptedMembers") to include in
   343  	// API requests with the JSON null value. By default, fields with empty values
   344  	// are omitted from API requests. See
   345  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   346  	NullFields []string `json:"-"`
   347  }
   348  
   349  func (s *AuditLogConfig) MarshalJSON() ([]byte, error) {
   350  	type NoMethod AuditLogConfig
   351  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   352  }
   353  
   354  // Binding: Associates `members`, or principals, with a `role`.
   355  type Binding struct {
   356  	// Condition: The condition that is associated with this binding. If the
   357  	// condition evaluates to `true`, then this binding applies to the current
   358  	// request. If the condition evaluates to `false`, then this binding does not
   359  	// apply to the current request. However, a different role binding might grant
   360  	// the same role to one or more of the principals in this binding. To learn
   361  	// which resources support conditions in their IAM policies, see the IAM
   362  	// documentation
   363  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
   364  	Condition *Expr `json:"condition,omitempty"`
   365  	// Members: Specifies the principals requesting access for a Google Cloud
   366  	// resource. `members` can have the following values: * `allUsers`: A special
   367  	// identifier that represents anyone who is on the internet; with or without a
   368  	// Google account. * `allAuthenticatedUsers`: A special identifier that
   369  	// represents anyone who is authenticated with a Google account or a service
   370  	// account. Does not include identities that come from external identity
   371  	// providers (IdPs) through identity federation. * `user:{emailid}`: An email
   372  	// address that represents a specific Google account. For example,
   373  	// `alice@example.com` . * `serviceAccount:{emailid}`: An email address that
   374  	// represents a Google service account. For example,
   375  	// `my-other-app@appspot.gserviceaccount.com`. *
   376  	// `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An
   377  	// identifier for a Kubernetes service account
   378  	// (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts).
   379  	// For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. *
   380  	// `group:{emailid}`: An email address that represents a Google group. For
   381  	// example, `admins@example.com`. * `domain:{domain}`: The G Suite domain
   382  	// (primary) that represents all the users of that domain. For example,
   383  	// `google.com` or `example.com`. *
   384  	// `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/sub
   385  	// ject/{subject_attribute_value}`: A single identity in a workforce identity
   386  	// pool. *
   387  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   388  	// group/{group_id}`: All workforce identities in a group. *
   389  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   390  	// attribute.{attribute_name}/{attribute_value}`: All workforce identities with
   391  	// a specific attribute value. *
   392  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   393  	// *`: All identities in a workforce identity pool. *
   394  	// `principal://iam.googleapis.com/projects/{project_number}/locations/global/wo
   395  	// rkloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single
   396  	// identity in a workload identity pool. *
   397  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   398  	// /workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool
   399  	// group. *
   400  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   401  	// /workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}
   402  	// `: All identities in a workload identity pool with a certain attribute. *
   403  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   404  	// /workloadIdentityPools/{pool_id}/*`: All identities in a workload identity
   405  	// pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus
   406  	// unique identifier) representing a user that has been recently deleted. For
   407  	// example, `alice@example.com?uid=123456789012345678901`. If the user is
   408  	// recovered, this value reverts to `user:{emailid}` and the recovered user
   409  	// retains the role in the binding. *
   410  	// `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
   411  	// unique identifier) representing a service account that has been recently
   412  	// deleted. For example,
   413  	// `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the
   414  	// service account is undeleted, this value reverts to
   415  	// `serviceAccount:{emailid}` and the undeleted service account retains the
   416  	// role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email
   417  	// address (plus unique identifier) representing a Google group that has been
   418  	// recently deleted. For example,
   419  	// `admins@example.com?uid=123456789012345678901`. If the group is recovered,
   420  	// this value reverts to `group:{emailid}` and the recovered group retains the
   421  	// role in the binding. *
   422  	// `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool
   423  	// _id}/subject/{subject_attribute_value}`: Deleted single identity in a
   424  	// workforce identity pool. For example,
   425  	// `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-po
   426  	// ol-id/subject/my-subject-attribute-value`.
   427  	Members []string `json:"members,omitempty"`
   428  	// Role: Role that is assigned to the list of `members`, or principals. For
   429  	// example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview
   430  	// of the IAM roles and permissions, see the IAM documentation
   431  	// (https://cloud.google.com/iam/docs/roles-overview). For a list of the
   432  	// available pre-defined roles, see here
   433  	// (https://cloud.google.com/iam/docs/understanding-roles).
   434  	Role string `json:"role,omitempty"`
   435  	// ForceSendFields is a list of field names (e.g. "Condition") to
   436  	// unconditionally include in API requests. By default, fields with empty or
   437  	// default values are omitted from API requests. See
   438  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   439  	// details.
   440  	ForceSendFields []string `json:"-"`
   441  	// NullFields is a list of field names (e.g. "Condition") to include in API
   442  	// requests with the JSON null value. By default, fields with empty values are
   443  	// omitted from API requests. See
   444  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   445  	NullFields []string `json:"-"`
   446  }
   447  
   448  func (s *Binding) MarshalJSON() ([]byte, error) {
   449  	type NoMethod Binding
   450  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   451  }
   452  
   453  // CancelOperationRequest: The request message for Operations.CancelOperation.
   454  type CancelOperationRequest struct {
   455  }
   456  
   457  // DeleteStatefileRequest: A request to delete a state file passed to a
   458  // 'DeleteStatefile' call.
   459  type DeleteStatefileRequest struct {
   460  	// LockId: Required. Lock ID of the lock file to verify that the user who is
   461  	// deleting the state file previously locked the Deployment.
   462  	LockId int64 `json:"lockId,omitempty,string"`
   463  	// ForceSendFields is a list of field names (e.g. "LockId") to unconditionally
   464  	// include in API requests. By default, fields with empty or default values are
   465  	// omitted from API requests. See
   466  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   467  	// details.
   468  	ForceSendFields []string `json:"-"`
   469  	// NullFields is a list of field names (e.g. "LockId") to include in API
   470  	// requests with the JSON null value. By default, fields with empty values are
   471  	// omitted from API requests. See
   472  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   473  	NullFields []string `json:"-"`
   474  }
   475  
   476  func (s *DeleteStatefileRequest) MarshalJSON() ([]byte, error) {
   477  	type NoMethod DeleteStatefileRequest
   478  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   479  }
   480  
   481  // Deployment: A Deployment is a group of resources and configs managed and
   482  // provisioned by Infra Manager.
   483  type Deployment struct {
   484  	// Annotations: Optional. Arbitrary key-value metadata storage e.g. to help
   485  	// client tools identify deployments during automation. See
   486  	// https://google.aip.dev/148#annotations for details on format and size
   487  	// limitations.
   488  	Annotations map[string]string `json:"annotations,omitempty"`
   489  	// ArtifactsGcsBucket: Optional. User-defined location of Cloud Build logs and
   490  	// artifacts in Google Cloud Storage. Format: `gs://{bucket}/{folder}` A
   491  	// default bucket will be bootstrapped if the field is not set or empty.
   492  	// Default bucket format: `gs://--blueprint-config` Constraints: - The bucket
   493  	// needs to be in the same project as the deployment - The path cannot be
   494  	// within the path of `gcs_source` - The field cannot be updated, including
   495  	// changing its presence
   496  	ArtifactsGcsBucket string `json:"artifactsGcsBucket,omitempty"`
   497  	// CreateTime: Output only. Time when the deployment was created.
   498  	CreateTime string `json:"createTime,omitempty"`
   499  	// DeleteBuild: Output only. Cloud Build instance UUID associated with deleting
   500  	// this deployment.
   501  	DeleteBuild string `json:"deleteBuild,omitempty"`
   502  	// DeleteLogs: Output only. Location of Cloud Build logs in Google Cloud
   503  	// Storage, populated when deleting this deployment. Format:
   504  	// `gs://{bucket}/{object}`.
   505  	DeleteLogs string `json:"deleteLogs,omitempty"`
   506  	// DeleteResults: Output only. Location of artifacts from a DeleteDeployment
   507  	// operation.
   508  	DeleteResults *ApplyResults `json:"deleteResults,omitempty"`
   509  	// ErrorCode: Output only. Error code describing errors that may have occurred.
   510  	//
   511  	// Possible values:
   512  	//   "ERROR_CODE_UNSPECIFIED" - No error code was specified.
   513  	//   "REVISION_FAILED" - The revision failed. See Revision for more details.
   514  	//   "CLOUD_BUILD_PERMISSION_DENIED" - Cloud Build failed due to a permission
   515  	// issue.
   516  	//   "DELETE_BUILD_API_FAILED" - Cloud Build job associated with a deployment
   517  	// deletion could not be started.
   518  	//   "DELETE_BUILD_RUN_FAILED" - Cloud Build job associated with a deployment
   519  	// deletion was started but failed.
   520  	//   "BUCKET_CREATION_PERMISSION_DENIED" - Cloud Storage bucket creation failed
   521  	// due to a permission issue.
   522  	//   "BUCKET_CREATION_FAILED" - Cloud Storage bucket creation failed due to an
   523  	// issue unrelated to permissions.
   524  	ErrorCode string `json:"errorCode,omitempty"`
   525  	// ErrorLogs: Output only. Location of Terraform error logs in Google Cloud
   526  	// Storage. Format: `gs://{bucket}/{object}`.
   527  	ErrorLogs string `json:"errorLogs,omitempty"`
   528  	// ImportExistingResources: By default, Infra Manager will return a failure
   529  	// when Terraform encounters a 409 code (resource conflict error) during
   530  	// actuation. If this flag is set to true, Infra Manager will instead attempt
   531  	// to automatically import the resource into the Terraform state (for supported
   532  	// resource types) and continue actuation. Not all resource types are
   533  	// supported, refer to documentation.
   534  	ImportExistingResources bool `json:"importExistingResources,omitempty"`
   535  	// Labels: User-defined metadata for the deployment.
   536  	Labels map[string]string `json:"labels,omitempty"`
   537  	// LatestRevision: Output only. Revision name that was most recently applied.
   538  	// Format: `projects/{project}/locations/{location}/deployments/{deployment}/
   539  	// revisions/{revision}`
   540  	LatestRevision string `json:"latestRevision,omitempty"`
   541  	// LockState: Output only. Current lock state of the deployment.
   542  	//
   543  	// Possible values:
   544  	//   "LOCK_STATE_UNSPECIFIED" - The default value. This value is used if the
   545  	// lock state is omitted.
   546  	//   "LOCKED" - The deployment is locked.
   547  	//   "UNLOCKED" - The deployment is unlocked.
   548  	//   "LOCKING" - The deployment is being locked.
   549  	//   "UNLOCKING" - The deployment is being unlocked.
   550  	//   "LOCK_FAILED" - The deployment has failed to lock.
   551  	//   "UNLOCK_FAILED" - The deployment has failed to unlock.
   552  	LockState string `json:"lockState,omitempty"`
   553  	// Name: Resource name of the deployment. Format:
   554  	// `projects/{project}/locations/{location}/deployments/{deployment}`
   555  	Name string `json:"name,omitempty"`
   556  	// QuotaValidation: Optional. Input to control quota checks for resources in
   557  	// terraform configuration files. There are limited resources on which quota
   558  	// validation applies.
   559  	//
   560  	// Possible values:
   561  	//   "QUOTA_VALIDATION_UNSPECIFIED" - The default value. QuotaValidation on
   562  	// terraform configuration files will be disabled in this case.
   563  	//   "ENABLED" - Enable computing quotas for resources in terraform
   564  	// configuration files to get visibility on resources with insufficient quotas.
   565  	//   "ENFORCED" - Enforce quota checks so deployment fails if there isn't
   566  	// sufficient quotas available to deploy resources in terraform configuration
   567  	// files.
   568  	QuotaValidation string `json:"quotaValidation,omitempty"`
   569  	// ServiceAccount: Optional. User-specified Service Account (SA) credentials to
   570  	// be used when actuating resources. Format:
   571  	// `projects/{projectID}/serviceAccounts/{serviceAccount}`
   572  	ServiceAccount string `json:"serviceAccount,omitempty"`
   573  	// State: Output only. Current state of the deployment.
   574  	//
   575  	// Possible values:
   576  	//   "STATE_UNSPECIFIED" - The default value. This value is used if the state
   577  	// is omitted.
   578  	//   "CREATING" - The deployment is being created.
   579  	//   "ACTIVE" - The deployment is healthy.
   580  	//   "UPDATING" - The deployment is being updated.
   581  	//   "DELETING" - The deployment is being deleted.
   582  	//   "FAILED" - The deployment has encountered an unexpected error.
   583  	//   "SUSPENDED" - The deployment is no longer being actively reconciled. This
   584  	// may be the result of recovering the project after deletion.
   585  	//   "DELETED" - The deployment has been deleted.
   586  	State string `json:"state,omitempty"`
   587  	// StateDetail: Output only. Additional information regarding the current
   588  	// state.
   589  	StateDetail string `json:"stateDetail,omitempty"`
   590  	// TerraformBlueprint: A blueprint described using Terraform's HashiCorp
   591  	// Configuration Language as a root module.
   592  	TerraformBlueprint *TerraformBlueprint `json:"terraformBlueprint,omitempty"`
   593  	// TfErrors: Output only. Errors encountered when deleting this deployment.
   594  	// Errors are truncated to 10 entries, see `delete_results` and `error_logs`
   595  	// for full details.
   596  	TfErrors []*TerraformError `json:"tfErrors,omitempty"`
   597  	// TfVersion: Output only. The current Terraform version set on the deployment.
   598  	// It is in the format of "Major.Minor.Patch", for example, "1.3.10".
   599  	TfVersion string `json:"tfVersion,omitempty"`
   600  	// TfVersionConstraint: Optional. The user-specified Terraform version
   601  	// constraint. Example: "=1.3.10".
   602  	TfVersionConstraint string `json:"tfVersionConstraint,omitempty"`
   603  	// UpdateTime: Output only. Time when the deployment was last modified.
   604  	UpdateTime string `json:"updateTime,omitempty"`
   605  	// WorkerPool: Optional. The user-specified Cloud Build worker pool resource in
   606  	// which the Cloud Build job will execute. Format:
   607  	// `projects/{project}/locations/{location}/workerPools/{workerPoolId}`. If
   608  	// this field is unspecified, the default Cloud Build worker pool will be used.
   609  	WorkerPool string `json:"workerPool,omitempty"`
   610  
   611  	// ServerResponse contains the HTTP response code and headers from the server.
   612  	googleapi.ServerResponse `json:"-"`
   613  	// ForceSendFields is a list of field names (e.g. "Annotations") to
   614  	// unconditionally include in API requests. By default, fields with empty or
   615  	// default values are omitted from API requests. See
   616  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   617  	// details.
   618  	ForceSendFields []string `json:"-"`
   619  	// NullFields is a list of field names (e.g. "Annotations") to include in API
   620  	// requests with the JSON null value. By default, fields with empty values are
   621  	// omitted from API requests. See
   622  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   623  	NullFields []string `json:"-"`
   624  }
   625  
   626  func (s *Deployment) MarshalJSON() ([]byte, error) {
   627  	type NoMethod Deployment
   628  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   629  }
   630  
   631  // DeploymentOperationMetadata: Ephemeral metadata content describing the state
   632  // of a deployment operation.
   633  type DeploymentOperationMetadata struct {
   634  	// ApplyResults: Outputs and artifacts from applying a deployment.
   635  	ApplyResults *ApplyResults `json:"applyResults,omitempty"`
   636  	// Build: Output only. Cloud Build instance UUID associated with this
   637  	// operation.
   638  	Build string `json:"build,omitempty"`
   639  	// Logs: Output only. Location of Deployment operations logs in
   640  	// `gs://{bucket}/{object}` format.
   641  	Logs string `json:"logs,omitempty"`
   642  	// Step: The current step the deployment operation is running.
   643  	//
   644  	// Possible values:
   645  	//   "DEPLOYMENT_STEP_UNSPECIFIED" - Unspecified deployment step
   646  	//   "PREPARING_STORAGE_BUCKET" - Infra Manager is creating a Google Cloud
   647  	// Storage bucket to store artifacts and metadata about the deployment and
   648  	// revision
   649  	//   "DOWNLOADING_BLUEPRINT" - Downloading the blueprint onto the Google Cloud
   650  	// Storage bucket
   651  	//   "RUNNING_TF_INIT" - Initializing Terraform using `terraform init`
   652  	//   "RUNNING_TF_PLAN" - Running `terraform plan`
   653  	//   "RUNNING_TF_APPLY" - Actuating resources using Terraform using `terraform
   654  	// apply`
   655  	//   "RUNNING_TF_DESTROY" - Destroying resources using Terraform using
   656  	// `terraform destroy`
   657  	//   "RUNNING_TF_VALIDATE" - Validating the uploaded TF state file when
   658  	// unlocking a deployment
   659  	//   "UNLOCKING_DEPLOYMENT" - Unlocking a deployment
   660  	//   "SUCCEEDED" - Operation was successful
   661  	//   "FAILED" - Operation failed
   662  	//   "VALIDATING_REPOSITORY" - Validating the provided repository.
   663  	//   "RUNNING_QUOTA_VALIDATION" - Running quota validation
   664  	Step string `json:"step,omitempty"`
   665  	// ForceSendFields is a list of field names (e.g. "ApplyResults") to
   666  	// unconditionally include in API requests. By default, fields with empty or
   667  	// default values are omitted from API requests. See
   668  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   669  	// details.
   670  	ForceSendFields []string `json:"-"`
   671  	// NullFields is a list of field names (e.g. "ApplyResults") to include in API
   672  	// requests with the JSON null value. By default, fields with empty values are
   673  	// omitted from API requests. See
   674  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   675  	NullFields []string `json:"-"`
   676  }
   677  
   678  func (s *DeploymentOperationMetadata) MarshalJSON() ([]byte, error) {
   679  	type NoMethod DeploymentOperationMetadata
   680  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   681  }
   682  
   683  // Empty: A generic empty message that you can re-use to avoid defining
   684  // duplicated empty messages in your APIs. A typical example is to use it as
   685  // the request or the response type of an API method. For instance: service Foo
   686  // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
   687  type Empty struct {
   688  	// ServerResponse contains the HTTP response code and headers from the server.
   689  	googleapi.ServerResponse `json:"-"`
   690  }
   691  
   692  // ExportDeploymentStatefileRequest: A request to export a state file passed to
   693  // a 'ExportDeploymentStatefile' call.
   694  type ExportDeploymentStatefileRequest struct {
   695  	// Draft: Optional. If this flag is set to true, the exported deployment state
   696  	// file will be the draft state. This will enable the draft file to be
   697  	// validated before copying it over to the working state on unlock.
   698  	Draft bool `json:"draft,omitempty"`
   699  	// ForceSendFields is a list of field names (e.g. "Draft") to unconditionally
   700  	// include in API requests. By default, fields with empty or default values are
   701  	// omitted from API requests. See
   702  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   703  	// details.
   704  	ForceSendFields []string `json:"-"`
   705  	// NullFields is a list of field names (e.g. "Draft") to include in API
   706  	// requests with the JSON null value. By default, fields with empty values are
   707  	// omitted from API requests. See
   708  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   709  	NullFields []string `json:"-"`
   710  }
   711  
   712  func (s *ExportDeploymentStatefileRequest) MarshalJSON() ([]byte, error) {
   713  	type NoMethod ExportDeploymentStatefileRequest
   714  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   715  }
   716  
   717  // ExportPreviewResultRequest: A request to export preview results.
   718  type ExportPreviewResultRequest struct {
   719  }
   720  
   721  // ExportPreviewResultResponse: A response to `ExportPreviewResult` call.
   722  // Contains preview results.
   723  type ExportPreviewResultResponse struct {
   724  	// Result: Output only. Signed URLs for accessing the plan files.
   725  	Result *PreviewResult `json:"result,omitempty"`
   726  
   727  	// ServerResponse contains the HTTP response code and headers from the server.
   728  	googleapi.ServerResponse `json:"-"`
   729  	// ForceSendFields is a list of field names (e.g. "Result") to unconditionally
   730  	// include in API requests. By default, fields with empty or default values are
   731  	// omitted from API requests. See
   732  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   733  	// details.
   734  	ForceSendFields []string `json:"-"`
   735  	// NullFields is a list of field names (e.g. "Result") to include in API
   736  	// requests with the JSON null value. By default, fields with empty values are
   737  	// omitted from API requests. See
   738  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   739  	NullFields []string `json:"-"`
   740  }
   741  
   742  func (s *ExportPreviewResultResponse) MarshalJSON() ([]byte, error) {
   743  	type NoMethod ExportPreviewResultResponse
   744  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   745  }
   746  
   747  // ExportRevisionStatefileRequest: A request to export a state file passed to a
   748  // 'ExportRevisionStatefile' call.
   749  type ExportRevisionStatefileRequest struct {
   750  }
   751  
   752  // Expr: Represents a textual expression in the Common Expression Language
   753  // (CEL) syntax. CEL is a C-like expression language. The syntax and semantics
   754  // of CEL are documented at https://github.com/google/cel-spec. Example
   755  // (Comparison): title: "Summary size limit" description: "Determines if a
   756  // summary is less than 100 chars" expression: "document.summary.size() < 100"
   757  // Example (Equality): title: "Requestor is owner" description: "Determines if
   758  // requestor is the document owner" expression: "document.owner ==
   759  // request.auth.claims.email" Example (Logic): title: "Public documents"
   760  // description: "Determine whether the document should be publicly visible"
   761  // expression: "document.type != 'private' && document.type != 'internal'"
   762  // Example (Data Manipulation): title: "Notification string" description:
   763  // "Create a notification string with a timestamp." expression: "'New message
   764  // received at ' + string(document.create_time)" The exact variables and
   765  // functions that may be referenced within an expression are determined by the
   766  // service that evaluates it. See the service documentation for additional
   767  // information.
   768  type Expr struct {
   769  	// Description: Optional. Description of the expression. This is a longer text
   770  	// which describes the expression, e.g. when hovered over it in a UI.
   771  	Description string `json:"description,omitempty"`
   772  	// Expression: Textual representation of an expression in Common Expression
   773  	// Language syntax.
   774  	Expression string `json:"expression,omitempty"`
   775  	// Location: Optional. String indicating the location of the expression for
   776  	// error reporting, e.g. a file name and a position in the file.
   777  	Location string `json:"location,omitempty"`
   778  	// Title: Optional. Title for the expression, i.e. a short string describing
   779  	// its purpose. This can be used e.g. in UIs which allow to enter the
   780  	// expression.
   781  	Title string `json:"title,omitempty"`
   782  	// ForceSendFields is a list of field names (e.g. "Description") to
   783  	// unconditionally include in API requests. By default, fields with empty or
   784  	// default values are omitted from API requests. See
   785  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   786  	// details.
   787  	ForceSendFields []string `json:"-"`
   788  	// NullFields is a list of field names (e.g. "Description") to include in API
   789  	// requests with the JSON null value. By default, fields with empty values are
   790  	// omitted from API requests. See
   791  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   792  	NullFields []string `json:"-"`
   793  }
   794  
   795  func (s *Expr) MarshalJSON() ([]byte, error) {
   796  	type NoMethod Expr
   797  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   798  }
   799  
   800  // GitSource: A set of files in a Git repository.
   801  type GitSource struct {
   802  	// Directory: Optional. Subdirectory inside the repository. Example:
   803  	// 'staging/my-package'
   804  	Directory string `json:"directory,omitempty"`
   805  	// Ref: Optional. Git reference (e.g. branch or tag).
   806  	Ref string `json:"ref,omitempty"`
   807  	// Repo: Optional. Repository URL. Example:
   808  	// 'https://github.com/kubernetes/examples.git'
   809  	Repo string `json:"repo,omitempty"`
   810  	// ForceSendFields is a list of field names (e.g. "Directory") to
   811  	// unconditionally include in API requests. By default, fields with empty or
   812  	// default values are omitted from API requests. See
   813  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   814  	// details.
   815  	ForceSendFields []string `json:"-"`
   816  	// NullFields is a list of field names (e.g. "Directory") to include in API
   817  	// requests with the JSON null value. By default, fields with empty values are
   818  	// omitted from API requests. See
   819  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   820  	NullFields []string `json:"-"`
   821  }
   822  
   823  func (s *GitSource) MarshalJSON() ([]byte, error) {
   824  	type NoMethod GitSource
   825  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   826  }
   827  
   828  // ImportStatefileRequest: A request to import a state file passed to a
   829  // 'ImportStatefile' call.
   830  type ImportStatefileRequest struct {
   831  	// LockId: Required. Lock ID of the lock file to verify that the user who is
   832  	// importing the state file previously locked the Deployment.
   833  	LockId int64 `json:"lockId,omitempty,string"`
   834  	// ForceSendFields is a list of field names (e.g. "LockId") to unconditionally
   835  	// include in API requests. By default, fields with empty or default values are
   836  	// omitted from API requests. See
   837  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   838  	// details.
   839  	ForceSendFields []string `json:"-"`
   840  	// NullFields is a list of field names (e.g. "LockId") to include in API
   841  	// requests with the JSON null value. By default, fields with empty values are
   842  	// omitted from API requests. See
   843  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   844  	NullFields []string `json:"-"`
   845  }
   846  
   847  func (s *ImportStatefileRequest) MarshalJSON() ([]byte, error) {
   848  	type NoMethod ImportStatefileRequest
   849  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   850  }
   851  
   852  type ListDeploymentsResponse struct {
   853  	// Deployments: List of Deployments.
   854  	Deployments []*Deployment `json:"deployments,omitempty"`
   855  	// NextPageToken: Token to be supplied to the next ListDeployments request via
   856  	// `page_token` to obtain the next set of results.
   857  	NextPageToken string `json:"nextPageToken,omitempty"`
   858  	// Unreachable: Locations that could not be reached.
   859  	Unreachable []string `json:"unreachable,omitempty"`
   860  
   861  	// ServerResponse contains the HTTP response code and headers from the server.
   862  	googleapi.ServerResponse `json:"-"`
   863  	// ForceSendFields is a list of field names (e.g. "Deployments") to
   864  	// unconditionally include in API requests. By default, fields with empty or
   865  	// default values are omitted from API requests. See
   866  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   867  	// details.
   868  	ForceSendFields []string `json:"-"`
   869  	// NullFields is a list of field names (e.g. "Deployments") to include in API
   870  	// requests with the JSON null value. By default, fields with empty values are
   871  	// omitted from API requests. See
   872  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   873  	NullFields []string `json:"-"`
   874  }
   875  
   876  func (s *ListDeploymentsResponse) MarshalJSON() ([]byte, error) {
   877  	type NoMethod ListDeploymentsResponse
   878  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   879  }
   880  
   881  // ListLocationsResponse: The response message for Locations.ListLocations.
   882  type ListLocationsResponse struct {
   883  	// Locations: A list of locations that matches the specified filter in the
   884  	// request.
   885  	Locations []*Location `json:"locations,omitempty"`
   886  	// NextPageToken: The standard List next-page token.
   887  	NextPageToken string `json:"nextPageToken,omitempty"`
   888  
   889  	// ServerResponse contains the HTTP response code and headers from the server.
   890  	googleapi.ServerResponse `json:"-"`
   891  	// ForceSendFields is a list of field names (e.g. "Locations") to
   892  	// unconditionally include in API requests. By default, fields with empty or
   893  	// default values are omitted from API requests. See
   894  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   895  	// details.
   896  	ForceSendFields []string `json:"-"`
   897  	// NullFields is a list of field names (e.g. "Locations") to include in API
   898  	// requests with the JSON null value. By default, fields with empty values are
   899  	// omitted from API requests. See
   900  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   901  	NullFields []string `json:"-"`
   902  }
   903  
   904  func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
   905  	type NoMethod ListLocationsResponse
   906  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   907  }
   908  
   909  // ListOperationsResponse: The response message for Operations.ListOperations.
   910  type ListOperationsResponse struct {
   911  	// NextPageToken: The standard List next-page token.
   912  	NextPageToken string `json:"nextPageToken,omitempty"`
   913  	// Operations: A list of operations that matches the specified filter in the
   914  	// request.
   915  	Operations []*Operation `json:"operations,omitempty"`
   916  
   917  	// ServerResponse contains the HTTP response code and headers from the server.
   918  	googleapi.ServerResponse `json:"-"`
   919  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
   920  	// unconditionally include in API requests. By default, fields with empty or
   921  	// default values are omitted from API requests. See
   922  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   923  	// details.
   924  	ForceSendFields []string `json:"-"`
   925  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
   926  	// requests with the JSON null value. By default, fields with empty values are
   927  	// omitted from API requests. See
   928  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   929  	NullFields []string `json:"-"`
   930  }
   931  
   932  func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
   933  	type NoMethod ListOperationsResponse
   934  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   935  }
   936  
   937  // ListPreviewsResponse: A response to a `ListPreviews` call. Contains a list
   938  // of Previews.
   939  type ListPreviewsResponse struct {
   940  	// NextPageToken: Token to be supplied to the next ListPreviews request via
   941  	// `page_token` to obtain the next set of results.
   942  	NextPageToken string `json:"nextPageToken,omitempty"`
   943  	// Previews: List of Previewss.
   944  	Previews []*Preview `json:"previews,omitempty"`
   945  	// Unreachable: Locations that could not be reached.
   946  	Unreachable []string `json:"unreachable,omitempty"`
   947  
   948  	// ServerResponse contains the HTTP response code and headers from the server.
   949  	googleapi.ServerResponse `json:"-"`
   950  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
   951  	// unconditionally include in API requests. By default, fields with empty or
   952  	// default values are omitted from API requests. See
   953  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   954  	// details.
   955  	ForceSendFields []string `json:"-"`
   956  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
   957  	// requests with the JSON null value. By default, fields with empty values are
   958  	// omitted from API requests. See
   959  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   960  	NullFields []string `json:"-"`
   961  }
   962  
   963  func (s *ListPreviewsResponse) MarshalJSON() ([]byte, error) {
   964  	type NoMethod ListPreviewsResponse
   965  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   966  }
   967  
   968  // ListResourcesResponse: A response to a 'ListResources' call. Contains a list
   969  // of Resources.
   970  type ListResourcesResponse struct {
   971  	// NextPageToken: A token to request the next page of resources from the
   972  	// 'ListResources' method. The value of an empty string means that there are no
   973  	// more resources to return.
   974  	NextPageToken string `json:"nextPageToken,omitempty"`
   975  	// Resources: List of Resourcess.
   976  	Resources []*Resource `json:"resources,omitempty"`
   977  	// Unreachable: Locations that could not be reached.
   978  	Unreachable []string `json:"unreachable,omitempty"`
   979  
   980  	// ServerResponse contains the HTTP response code and headers from the server.
   981  	googleapi.ServerResponse `json:"-"`
   982  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
   983  	// unconditionally include in API requests. By default, fields with empty or
   984  	// default values are omitted from API requests. See
   985  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   986  	// details.
   987  	ForceSendFields []string `json:"-"`
   988  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
   989  	// requests with the JSON null value. By default, fields with empty values are
   990  	// omitted from API requests. See
   991  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   992  	NullFields []string `json:"-"`
   993  }
   994  
   995  func (s *ListResourcesResponse) MarshalJSON() ([]byte, error) {
   996  	type NoMethod ListResourcesResponse
   997  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   998  }
   999  
  1000  // ListRevisionsResponse: A response to a 'ListRevisions' call. Contains a list
  1001  // of Revisions.
  1002  type ListRevisionsResponse struct {
  1003  	// NextPageToken: A token to request the next page of resources from the
  1004  	// 'ListRevisions' method. The value of an empty string means that there are no
  1005  	// more resources to return.
  1006  	NextPageToken string `json:"nextPageToken,omitempty"`
  1007  	// Revisions: List of Revisions.
  1008  	Revisions []*Revision `json:"revisions,omitempty"`
  1009  	// Unreachable: Locations that could not be reached.
  1010  	Unreachable []string `json:"unreachable,omitempty"`
  1011  
  1012  	// ServerResponse contains the HTTP response code and headers from the server.
  1013  	googleapi.ServerResponse `json:"-"`
  1014  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1015  	// unconditionally include in API requests. By default, fields with empty or
  1016  	// default values are omitted from API requests. See
  1017  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1018  	// details.
  1019  	ForceSendFields []string `json:"-"`
  1020  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1021  	// requests with the JSON null value. By default, fields with empty values are
  1022  	// omitted from API requests. See
  1023  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1024  	NullFields []string `json:"-"`
  1025  }
  1026  
  1027  func (s *ListRevisionsResponse) MarshalJSON() ([]byte, error) {
  1028  	type NoMethod ListRevisionsResponse
  1029  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1030  }
  1031  
  1032  // ListTerraformVersionsResponse: The response message for the
  1033  // `ListTerraformVersions` method.
  1034  type ListTerraformVersionsResponse struct {
  1035  	// NextPageToken: Token to be supplied to the next ListTerraformVersions
  1036  	// request via `page_token` to obtain the next set of results.
  1037  	NextPageToken string `json:"nextPageToken,omitempty"`
  1038  	// TerraformVersions: List of TerraformVersions.
  1039  	TerraformVersions []*TerraformVersion `json:"terraformVersions,omitempty"`
  1040  	// Unreachable: Unreachable resources, if any.
  1041  	Unreachable []string `json:"unreachable,omitempty"`
  1042  
  1043  	// ServerResponse contains the HTTP response code and headers from the server.
  1044  	googleapi.ServerResponse `json:"-"`
  1045  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1046  	// unconditionally include in API requests. By default, fields with empty or
  1047  	// default values are omitted from API requests. See
  1048  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1049  	// details.
  1050  	ForceSendFields []string `json:"-"`
  1051  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1052  	// requests with the JSON null value. By default, fields with empty values are
  1053  	// omitted from API requests. See
  1054  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1055  	NullFields []string `json:"-"`
  1056  }
  1057  
  1058  func (s *ListTerraformVersionsResponse) MarshalJSON() ([]byte, error) {
  1059  	type NoMethod ListTerraformVersionsResponse
  1060  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1061  }
  1062  
  1063  // Location: A resource that represents a Google Cloud location.
  1064  type Location struct {
  1065  	// DisplayName: The friendly name for this location, typically a nearby city
  1066  	// name. For example, "Tokyo".
  1067  	DisplayName string `json:"displayName,omitempty"`
  1068  	// Labels: Cross-service attributes for the location. For example
  1069  	// {"cloud.googleapis.com/region": "us-east1"}
  1070  	Labels map[string]string `json:"labels,omitempty"`
  1071  	// LocationId: The canonical id for this location. For example: "us-east1".
  1072  	LocationId string `json:"locationId,omitempty"`
  1073  	// Metadata: Service-specific metadata. For example the available capacity at
  1074  	// the given location.
  1075  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  1076  	// Name: Resource name for the location, which may vary between
  1077  	// implementations. For example:
  1078  	// "projects/example-project/locations/us-east1"
  1079  	Name string `json:"name,omitempty"`
  1080  
  1081  	// ServerResponse contains the HTTP response code and headers from the server.
  1082  	googleapi.ServerResponse `json:"-"`
  1083  	// ForceSendFields is a list of field names (e.g. "DisplayName") to
  1084  	// unconditionally include in API requests. By default, fields with empty or
  1085  	// default values are omitted from API requests. See
  1086  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1087  	// details.
  1088  	ForceSendFields []string `json:"-"`
  1089  	// NullFields is a list of field names (e.g. "DisplayName") to include in API
  1090  	// requests with the JSON null value. By default, fields with empty values are
  1091  	// omitted from API requests. See
  1092  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1093  	NullFields []string `json:"-"`
  1094  }
  1095  
  1096  func (s *Location) MarshalJSON() ([]byte, error) {
  1097  	type NoMethod Location
  1098  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1099  }
  1100  
  1101  // LockDeploymentRequest: A request to lock a deployment passed to a
  1102  // 'LockDeployment' call.
  1103  type LockDeploymentRequest struct {
  1104  }
  1105  
  1106  // LockInfo: Details about the lock which locked the deployment.
  1107  type LockInfo struct {
  1108  	// CreateTime: Time that the lock was taken.
  1109  	CreateTime string `json:"createTime,omitempty"`
  1110  	// Info: Extra information to store with the lock, provided by the caller.
  1111  	Info string `json:"info,omitempty"`
  1112  	// LockId: Unique ID for the lock to be overridden with generation ID in the
  1113  	// backend.
  1114  	LockId int64 `json:"lockId,omitempty,string"`
  1115  	// Operation: Terraform operation, provided by the caller.
  1116  	Operation string `json:"operation,omitempty"`
  1117  	// Version: Terraform version
  1118  	Version string `json:"version,omitempty"`
  1119  	// Who: user@hostname when available
  1120  	Who string `json:"who,omitempty"`
  1121  
  1122  	// ServerResponse contains the HTTP response code and headers from the server.
  1123  	googleapi.ServerResponse `json:"-"`
  1124  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  1125  	// unconditionally include in API requests. By default, fields with empty or
  1126  	// default values are omitted from API requests. See
  1127  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1128  	// details.
  1129  	ForceSendFields []string `json:"-"`
  1130  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  1131  	// requests with the JSON null value. By default, fields with empty values are
  1132  	// omitted from API requests. See
  1133  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1134  	NullFields []string `json:"-"`
  1135  }
  1136  
  1137  func (s *LockInfo) MarshalJSON() ([]byte, error) {
  1138  	type NoMethod LockInfo
  1139  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1140  }
  1141  
  1142  // Operation: This resource represents a long-running operation that is the
  1143  // result of a network API call.
  1144  type Operation struct {
  1145  	// Done: If the value is `false`, it means the operation is still in progress.
  1146  	// If `true`, the operation is completed, and either `error` or `response` is
  1147  	// available.
  1148  	Done bool `json:"done,omitempty"`
  1149  	// Error: The error result of the operation in case of failure or cancellation.
  1150  	Error *Status `json:"error,omitempty"`
  1151  	// Metadata: Service-specific metadata associated with the operation. It
  1152  	// typically contains progress information and common metadata such as create
  1153  	// time. Some services might not provide such metadata. Any method that returns
  1154  	// a long-running operation should document the metadata type, if any.
  1155  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  1156  	// Name: The server-assigned name, which is only unique within the same service
  1157  	// that originally returns it. If you use the default HTTP mapping, the `name`
  1158  	// should be a resource name ending with `operations/{unique_id}`.
  1159  	Name string `json:"name,omitempty"`
  1160  	// Response: The normal, successful response of the operation. If the original
  1161  	// method returns no data on success, such as `Delete`, the response is
  1162  	// `google.protobuf.Empty`. If the original method is standard
  1163  	// `Get`/`Create`/`Update`, the response should be the resource. For other
  1164  	// methods, the response should have the type `XxxResponse`, where `Xxx` is the
  1165  	// original method name. For example, if the original method name is
  1166  	// `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
  1167  	Response googleapi.RawMessage `json:"response,omitempty"`
  1168  
  1169  	// ServerResponse contains the HTTP response code and headers from the server.
  1170  	googleapi.ServerResponse `json:"-"`
  1171  	// ForceSendFields is a list of field names (e.g. "Done") to unconditionally
  1172  	// include in API requests. By default, fields with empty or default values are
  1173  	// omitted from API requests. See
  1174  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1175  	// details.
  1176  	ForceSendFields []string `json:"-"`
  1177  	// NullFields is a list of field names (e.g. "Done") to include in API requests
  1178  	// with the JSON null value. By default, fields with empty values are omitted
  1179  	// from API requests. See
  1180  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1181  	NullFields []string `json:"-"`
  1182  }
  1183  
  1184  func (s *Operation) MarshalJSON() ([]byte, error) {
  1185  	type NoMethod Operation
  1186  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1187  }
  1188  
  1189  // OperationMetadata: Represents the metadata of the long-running operation.
  1190  type OperationMetadata struct {
  1191  	// ApiVersion: Output only. API version used to start the operation.
  1192  	ApiVersion string `json:"apiVersion,omitempty"`
  1193  	// CreateTime: Output only. Time when the operation was created.
  1194  	CreateTime string `json:"createTime,omitempty"`
  1195  	// DeploymentMetadata: Output only. Metadata about the deployment operation
  1196  	// state.
  1197  	DeploymentMetadata *DeploymentOperationMetadata `json:"deploymentMetadata,omitempty"`
  1198  	// EndTime: Output only. Time when the operation finished running.
  1199  	EndTime string `json:"endTime,omitempty"`
  1200  	// PreviewMetadata: Output only. Metadata about the preview operation state.
  1201  	PreviewMetadata *PreviewOperationMetadata `json:"previewMetadata,omitempty"`
  1202  	// RequestedCancellation: Output only. Identifies whether the user has
  1203  	// requested cancellation of the operation. Operations that have successfully
  1204  	// been cancelled have Operation.error value with a google.rpc.Status.code of
  1205  	// 1, corresponding to `Code.CANCELLED`.
  1206  	RequestedCancellation bool `json:"requestedCancellation,omitempty"`
  1207  	// StatusMessage: Output only. Human-readable status of the operation, if any.
  1208  	StatusMessage string `json:"statusMessage,omitempty"`
  1209  	// Target: Output only. Server-defined resource path for the target of the
  1210  	// operation.
  1211  	Target string `json:"target,omitempty"`
  1212  	// Verb: Output only. Name of the verb executed by the operation.
  1213  	Verb string `json:"verb,omitempty"`
  1214  	// ForceSendFields is a list of field names (e.g. "ApiVersion") to
  1215  	// unconditionally include in API requests. By default, fields with empty or
  1216  	// default values are omitted from API requests. See
  1217  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1218  	// details.
  1219  	ForceSendFields []string `json:"-"`
  1220  	// NullFields is a list of field names (e.g. "ApiVersion") to include in API
  1221  	// requests with the JSON null value. By default, fields with empty values are
  1222  	// omitted from API requests. See
  1223  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1224  	NullFields []string `json:"-"`
  1225  }
  1226  
  1227  func (s *OperationMetadata) MarshalJSON() ([]byte, error) {
  1228  	type NoMethod OperationMetadata
  1229  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1230  }
  1231  
  1232  // Policy: An Identity and Access Management (IAM) policy, which specifies
  1233  // access controls for Google Cloud resources. A `Policy` is a collection of
  1234  // `bindings`. A `binding` binds one or more `members`, or principals, to a
  1235  // single `role`. Principals can be user accounts, service accounts, Google
  1236  // groups, and domains (such as G Suite). A `role` is a named list of
  1237  // permissions; each `role` can be an IAM predefined role or a user-created
  1238  // custom role. For some types of Google Cloud resources, a `binding` can also
  1239  // specify a `condition`, which is a logical expression that allows access to a
  1240  // resource only if the expression evaluates to `true`. A condition can add
  1241  // constraints based on attributes of the request, the resource, or both. To
  1242  // learn which resources support conditions in their IAM policies, see the IAM
  1243  // documentation
  1244  // (https://cloud.google.com/iam/help/conditions/resource-policies). **JSON
  1245  // example:** ``` { "bindings": [ { "role":
  1246  // "roles/resourcemanager.organizationAdmin", "members": [
  1247  // "user:mike@example.com", "group:admins@example.com", "domain:google.com",
  1248  // "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role":
  1249  // "roles/resourcemanager.organizationViewer", "members": [
  1250  // "user:eve@example.com" ], "condition": { "title": "expirable access",
  1251  // "description": "Does not grant access after Sep 2020", "expression":
  1252  // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag":
  1253  // "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: -
  1254  // members: - user:mike@example.com - group:admins@example.com -
  1255  // domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com
  1256  // role: roles/resourcemanager.organizationAdmin - members: -
  1257  // user:eve@example.com role: roles/resourcemanager.organizationViewer
  1258  // condition: title: expirable access description: Does not grant access after
  1259  // Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
  1260  // etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features,
  1261  // see the IAM documentation (https://cloud.google.com/iam/docs/).
  1262  type Policy struct {
  1263  	// AuditConfigs: Specifies cloud audit logging configuration for this policy.
  1264  	AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"`
  1265  	// Bindings: Associates a list of `members`, or principals, with a `role`.
  1266  	// Optionally, may specify a `condition` that determines how and when the
  1267  	// `bindings` are applied. Each of the `bindings` must contain at least one
  1268  	// principal. The `bindings` in a `Policy` can refer to up to 1,500 principals;
  1269  	// up to 250 of these principals can be Google groups. Each occurrence of a
  1270  	// principal counts towards these limits. For example, if the `bindings` grant
  1271  	// 50 different roles to `user:alice@example.com`, and not to any other
  1272  	// principal, then you can add another 1,450 principals to the `bindings` in
  1273  	// the `Policy`.
  1274  	Bindings []*Binding `json:"bindings,omitempty"`
  1275  	// Etag: `etag` is used for optimistic concurrency control as a way to help
  1276  	// prevent simultaneous updates of a policy from overwriting each other. It is
  1277  	// strongly suggested that systems make use of the `etag` in the
  1278  	// read-modify-write cycle to perform policy updates in order to avoid race
  1279  	// conditions: An `etag` is returned in the response to `getIamPolicy`, and
  1280  	// systems are expected to put that etag in the request to `setIamPolicy` to
  1281  	// ensure that their change will be applied to the same version of the policy.
  1282  	// **Important:** If you use IAM Conditions, you must include the `etag` field
  1283  	// whenever you call `setIamPolicy`. If you omit this field, then IAM allows
  1284  	// you to overwrite a version `3` policy with a version `1` policy, and all of
  1285  	// the conditions in the version `3` policy are lost.
  1286  	Etag string `json:"etag,omitempty"`
  1287  	// Version: Specifies the format of the policy. Valid values are `0`, `1`, and
  1288  	// `3`. Requests that specify an invalid value are rejected. Any operation that
  1289  	// affects conditional role bindings must specify version `3`. This requirement
  1290  	// applies to the following operations: * Getting a policy that includes a
  1291  	// conditional role binding * Adding a conditional role binding to a policy *
  1292  	// Changing a conditional role binding in a policy * Removing any role binding,
  1293  	// with or without a condition, from a policy that includes conditions
  1294  	// **Important:** If you use IAM Conditions, you must include the `etag` field
  1295  	// whenever you call `setIamPolicy`. If you omit this field, then IAM allows
  1296  	// you to overwrite a version `3` policy with a version `1` policy, and all of
  1297  	// the conditions in the version `3` policy are lost. If a policy does not
  1298  	// include any conditions, operations on that policy may specify any valid
  1299  	// version or leave the field unset. To learn which resources support
  1300  	// conditions in their IAM policies, see the IAM documentation
  1301  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
  1302  	Version int64 `json:"version,omitempty"`
  1303  
  1304  	// ServerResponse contains the HTTP response code and headers from the server.
  1305  	googleapi.ServerResponse `json:"-"`
  1306  	// ForceSendFields is a list of field names (e.g. "AuditConfigs") to
  1307  	// unconditionally include in API requests. By default, fields with empty or
  1308  	// default values are omitted from API requests. See
  1309  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1310  	// details.
  1311  	ForceSendFields []string `json:"-"`
  1312  	// NullFields is a list of field names (e.g. "AuditConfigs") to include in API
  1313  	// requests with the JSON null value. By default, fields with empty values are
  1314  	// omitted from API requests. See
  1315  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1316  	NullFields []string `json:"-"`
  1317  }
  1318  
  1319  func (s *Policy) MarshalJSON() ([]byte, error) {
  1320  	type NoMethod Policy
  1321  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1322  }
  1323  
  1324  // Preview: A preview represents a set of actions Infra Manager would perform
  1325  // to move the resources towards the desired state as specified in the
  1326  // configuration.
  1327  type Preview struct {
  1328  	// Annotations: Optional. Arbitrary key-value metadata storage e.g. to help
  1329  	// client tools identifiy preview during automation. See
  1330  	// https://google.aip.dev/148#annotations for details on format and size
  1331  	// limitations.
  1332  	Annotations map[string]string `json:"annotations,omitempty"`
  1333  	// ArtifactsGcsBucket: Optional. User-defined location of Cloud Build logs,
  1334  	// artifacts, and in Google Cloud Storage. Format: `gs://{bucket}/{folder}` A
  1335  	// default bucket will be bootstrapped if the field is not set or empty Default
  1336  	// Bucket Format: `gs://--blueprint-config` Constraints: - The bucket needs to
  1337  	// be in the same project as the deployment - The path cannot be within the
  1338  	// path of `gcs_source` If omitted and deployment resource ref provided has
  1339  	// artifacts_gcs_bucket defined, that artifact bucket is used.
  1340  	ArtifactsGcsBucket string `json:"artifactsGcsBucket,omitempty"`
  1341  	// Build: Output only. Cloud Build instance UUID associated with this preview.
  1342  	Build string `json:"build,omitempty"`
  1343  	// CreateTime: Output only. Time the preview was created.
  1344  	CreateTime string `json:"createTime,omitempty"`
  1345  	// Deployment: Optional. Optional deployment reference. If specified, the
  1346  	// preview will be performed using the provided deployment's current state and
  1347  	// use any relevant fields from the deployment unless explicitly specified in
  1348  	// the preview create request.
  1349  	Deployment string `json:"deployment,omitempty"`
  1350  	// ErrorCode: Output only. Code describing any errors that may have occurred.
  1351  	//
  1352  	// Possible values:
  1353  	//   "ERROR_CODE_UNSPECIFIED" - No error code was specified.
  1354  	//   "CLOUD_BUILD_PERMISSION_DENIED" - Cloud Build failed due to a permissions
  1355  	// issue.
  1356  	//   "BUCKET_CREATION_PERMISSION_DENIED" - Cloud Storage bucket failed to
  1357  	// create due to a permissions issue.
  1358  	//   "BUCKET_CREATION_FAILED" - Cloud Storage bucket failed for a
  1359  	// non-permissions-related issue.
  1360  	//   "DEPLOYMENT_LOCK_ACQUIRE_FAILED" - Acquiring lock on provided deployment
  1361  	// reference failed.
  1362  	//   "PREVIEW_BUILD_API_FAILED" - Preview encountered an error when trying to
  1363  	// access Cloud Build API.
  1364  	//   "PREVIEW_BUILD_RUN_FAILED" - Preview created a build but build failed and
  1365  	// logs were generated.
  1366  	ErrorCode string `json:"errorCode,omitempty"`
  1367  	// ErrorLogs: Output only. Link to tf-error.ndjson file, which contains the
  1368  	// full list of the errors encountered during a Terraform preview. Format:
  1369  	// `gs://{bucket}/{object}`.
  1370  	ErrorLogs string `json:"errorLogs,omitempty"`
  1371  	// ErrorStatus: Output only. Additional information regarding the current
  1372  	// state.
  1373  	ErrorStatus *Status `json:"errorStatus,omitempty"`
  1374  	// Labels: Optional. User-defined labels for the preview.
  1375  	Labels map[string]string `json:"labels,omitempty"`
  1376  	// Logs: Output only. Location of preview logs in `gs://{bucket}/{object}`
  1377  	// format.
  1378  	Logs string `json:"logs,omitempty"`
  1379  	// Name: Identifier. Resource name of the preview. Resource name can be user
  1380  	// provided or server generated ID if unspecified. Format:
  1381  	// `projects/{project}/locations/{location}/previews/{preview}`
  1382  	Name string `json:"name,omitempty"`
  1383  	// PreviewArtifacts: Output only. Artifacts from preview.
  1384  	PreviewArtifacts *PreviewArtifacts `json:"previewArtifacts,omitempty"`
  1385  	// PreviewMode: Optional. Current mode of preview.
  1386  	//
  1387  	// Possible values:
  1388  	//   "PREVIEW_MODE_UNSPECIFIED" - Unspecified policy, default mode will be
  1389  	// used.
  1390  	//   "DEFAULT" - DEFAULT mode generates an execution plan for reconciling
  1391  	// current resource state into expected resource state.
  1392  	//   "DELETE" - DELETE mode generates as execution plan for destroying current
  1393  	// resources.
  1394  	PreviewMode string `json:"previewMode,omitempty"`
  1395  	// ServiceAccount: Optional. User-specified Service Account (SA) credentials to
  1396  	// be used when previewing resources. Format:
  1397  	// `projects/{projectID}/serviceAccounts/{serviceAccount}`
  1398  	ServiceAccount string `json:"serviceAccount,omitempty"`
  1399  	// State: Output only. Current state of the preview.
  1400  	//
  1401  	// Possible values:
  1402  	//   "STATE_UNSPECIFIED" - The default value. This value is used if the state
  1403  	// is unknown.
  1404  	//   "CREATING" - The preview is being created.
  1405  	//   "SUCCEEDED" - The preview has succeeded.
  1406  	//   "APPLYING" - The preview is being applied.
  1407  	//   "STALE" - The preview is stale. A preview can become stale if a revision
  1408  	// has been applied after this preview was created.
  1409  	//   "DELETING" - The preview is being deleted.
  1410  	//   "FAILED" - The preview has encountered an unexpected error.
  1411  	//   "DELETED" - The preview has been deleted.
  1412  	State string `json:"state,omitempty"`
  1413  	// TerraformBlueprint: The terraform blueprint to preview.
  1414  	TerraformBlueprint *TerraformBlueprint `json:"terraformBlueprint,omitempty"`
  1415  	// TfErrors: Output only. Summary of errors encountered during Terraform
  1416  	// preview. It has a size limit of 10, i.e. only top 10 errors will be
  1417  	// summarized here.
  1418  	TfErrors []*TerraformError `json:"tfErrors,omitempty"`
  1419  	// TfVersion: Output only. The current Terraform version set on the preview. It
  1420  	// is in the format of "Major.Minor.Patch", for example, "1.3.10".
  1421  	TfVersion string `json:"tfVersion,omitempty"`
  1422  	// TfVersionConstraint: Optional. The user-specified Terraform version
  1423  	// constraint. Example: "=1.3.10".
  1424  	TfVersionConstraint string `json:"tfVersionConstraint,omitempty"`
  1425  	// WorkerPool: Optional. The user-specified Worker Pool resource in which the
  1426  	// Cloud Build job will execute. Format
  1427  	// projects/{project}/locations/{location}/workerPools/{workerPoolId} If this
  1428  	// field is unspecified, the default Cloud Build worker pool will be used. If
  1429  	// omitted and deployment resource ref provided has worker_pool defined, that
  1430  	// worker pool is used.
  1431  	WorkerPool string `json:"workerPool,omitempty"`
  1432  
  1433  	// ServerResponse contains the HTTP response code and headers from the server.
  1434  	googleapi.ServerResponse `json:"-"`
  1435  	// ForceSendFields is a list of field names (e.g. "Annotations") to
  1436  	// unconditionally include in API requests. By default, fields with empty or
  1437  	// default values are omitted from API requests. See
  1438  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1439  	// details.
  1440  	ForceSendFields []string `json:"-"`
  1441  	// NullFields is a list of field names (e.g. "Annotations") to include in API
  1442  	// requests with the JSON null value. By default, fields with empty values are
  1443  	// omitted from API requests. See
  1444  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1445  	NullFields []string `json:"-"`
  1446  }
  1447  
  1448  func (s *Preview) MarshalJSON() ([]byte, error) {
  1449  	type NoMethod Preview
  1450  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1451  }
  1452  
  1453  // PreviewArtifacts: Artifacts created by preview.
  1454  type PreviewArtifacts struct {
  1455  	// Artifacts: Output only. Location of artifacts in Google Cloud Storage.
  1456  	// Format: `gs://{bucket}/{object}`
  1457  	Artifacts string `json:"artifacts,omitempty"`
  1458  	// Content: Output only. Location of a blueprint copy and other content in
  1459  	// Google Cloud Storage. Format: `gs://{bucket}/{object}`
  1460  	Content string `json:"content,omitempty"`
  1461  	// ForceSendFields is a list of field names (e.g. "Artifacts") to
  1462  	// unconditionally include in API requests. By default, fields with empty or
  1463  	// default values are omitted from API requests. See
  1464  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1465  	// details.
  1466  	ForceSendFields []string `json:"-"`
  1467  	// NullFields is a list of field names (e.g. "Artifacts") to include in API
  1468  	// requests with the JSON null value. By default, fields with empty values are
  1469  	// omitted from API requests. See
  1470  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1471  	NullFields []string `json:"-"`
  1472  }
  1473  
  1474  func (s *PreviewArtifacts) MarshalJSON() ([]byte, error) {
  1475  	type NoMethod PreviewArtifacts
  1476  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1477  }
  1478  
  1479  // PreviewOperationMetadata: Ephemeral metadata content describing the state of
  1480  // a preview operation.
  1481  type PreviewOperationMetadata struct {
  1482  	// Build: Output only. Cloud Build instance UUID associated with this preview.
  1483  	Build string `json:"build,omitempty"`
  1484  	// Logs: Output only. Location of preview logs in `gs://{bucket}/{object}`
  1485  	// format.
  1486  	Logs string `json:"logs,omitempty"`
  1487  	// PreviewArtifacts: Artifacts from preview.
  1488  	PreviewArtifacts *PreviewArtifacts `json:"previewArtifacts,omitempty"`
  1489  	// Step: The current step the preview operation is running.
  1490  	//
  1491  	// Possible values:
  1492  	//   "PREVIEW_STEP_UNSPECIFIED" - Unspecified preview step.
  1493  	//   "PREPARING_STORAGE_BUCKET" - Infra Manager is creating a Google Cloud
  1494  	// Storage bucket to store artifacts and metadata about the preview.
  1495  	//   "DOWNLOADING_BLUEPRINT" - Downloading the blueprint onto the Google Cloud
  1496  	// Storage bucket.
  1497  	//   "RUNNING_TF_INIT" - Initializing Terraform using `terraform init`.
  1498  	//   "RUNNING_TF_PLAN" - Running `terraform plan`.
  1499  	//   "FETCHING_DEPLOYMENT" - Fetching a deployment.
  1500  	//   "LOCKING_DEPLOYMENT" - Locking a deployment.
  1501  	//   "UNLOCKING_DEPLOYMENT" - Unlocking a deployment.
  1502  	//   "SUCCEEDED" - Operation was successful.
  1503  	//   "FAILED" - Operation failed.
  1504  	//   "VALIDATING_REPOSITORY" - Validating the provided repository.
  1505  	Step string `json:"step,omitempty"`
  1506  	// ForceSendFields is a list of field names (e.g. "Build") to unconditionally
  1507  	// include in API requests. By default, fields with empty or default values are
  1508  	// omitted from API requests. See
  1509  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1510  	// details.
  1511  	ForceSendFields []string `json:"-"`
  1512  	// NullFields is a list of field names (e.g. "Build") to include in API
  1513  	// requests with the JSON null value. By default, fields with empty values are
  1514  	// omitted from API requests. See
  1515  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1516  	NullFields []string `json:"-"`
  1517  }
  1518  
  1519  func (s *PreviewOperationMetadata) MarshalJSON() ([]byte, error) {
  1520  	type NoMethod PreviewOperationMetadata
  1521  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1522  }
  1523  
  1524  // PreviewResult: Contains a signed Cloud Storage URLs.
  1525  type PreviewResult struct {
  1526  	// BinarySignedUri: Output only. Plan binary signed URL
  1527  	BinarySignedUri string `json:"binarySignedUri,omitempty"`
  1528  	// JsonSignedUri: Output only. Plan JSON signed URL
  1529  	JsonSignedUri string `json:"jsonSignedUri,omitempty"`
  1530  	// ForceSendFields is a list of field names (e.g. "BinarySignedUri") to
  1531  	// unconditionally include in API requests. By default, fields with empty or
  1532  	// default values are omitted from API requests. See
  1533  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1534  	// details.
  1535  	ForceSendFields []string `json:"-"`
  1536  	// NullFields is a list of field names (e.g. "BinarySignedUri") to include in
  1537  	// API requests with the JSON null value. By default, fields with empty values
  1538  	// are omitted from API requests. See
  1539  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1540  	NullFields []string `json:"-"`
  1541  }
  1542  
  1543  func (s *PreviewResult) MarshalJSON() ([]byte, error) {
  1544  	type NoMethod PreviewResult
  1545  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1546  }
  1547  
  1548  // Resource: Resource represents a Google Cloud Platform resource actuated by
  1549  // IM. Resources are child resources of Revisions.
  1550  type Resource struct {
  1551  	// CaiAssets: Output only. Map of Cloud Asset Inventory (CAI) type to CAI info
  1552  	// (e.g. CAI ID). CAI type format follows
  1553  	// https://cloud.google.com/asset-inventory/docs/supported-asset-types
  1554  	CaiAssets map[string]ResourceCAIInfo `json:"caiAssets,omitempty"`
  1555  	// Intent: Output only. Intent of the resource.
  1556  	//
  1557  	// Possible values:
  1558  	//   "INTENT_UNSPECIFIED" - The default value. This value is used if the intent
  1559  	// is omitted.
  1560  	//   "CREATE" - Infra Manager will create this Resource.
  1561  	//   "UPDATE" - Infra Manager will update this Resource.
  1562  	//   "DELETE" - Infra Manager will delete this Resource.
  1563  	//   "RECREATE" - Infra Manager will destroy and recreate this Resource.
  1564  	//   "UNCHANGED" - Infra Manager will leave this Resource untouched.
  1565  	Intent string `json:"intent,omitempty"`
  1566  	// Name: Output only. Resource name. Format:
  1567  	// `projects/{project}/locations/{location}/deployments/{deployment}/revisions/{
  1568  	// revision}/resources/{resource}`
  1569  	Name string `json:"name,omitempty"`
  1570  	// State: Output only. Current state of the resource.
  1571  	//
  1572  	// Possible values:
  1573  	//   "STATE_UNSPECIFIED" - The default value. This value is used if the state
  1574  	// is omitted.
  1575  	//   "PLANNED" - Resource has been planned for reconcile.
  1576  	//   "IN_PROGRESS" - Resource is actively reconciling into the intended state.
  1577  	//   "RECONCILED" - Resource has reconciled to intended state.
  1578  	//   "FAILED" - Resource failed to reconcile.
  1579  	State string `json:"state,omitempty"`
  1580  	// TerraformInfo: Output only. Terraform-specific info if this resource was
  1581  	// created using Terraform.
  1582  	TerraformInfo *ResourceTerraformInfo `json:"terraformInfo,omitempty"`
  1583  
  1584  	// ServerResponse contains the HTTP response code and headers from the server.
  1585  	googleapi.ServerResponse `json:"-"`
  1586  	// ForceSendFields is a list of field names (e.g. "CaiAssets") to
  1587  	// unconditionally include in API requests. By default, fields with empty or
  1588  	// default values are omitted from API requests. See
  1589  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1590  	// details.
  1591  	ForceSendFields []string `json:"-"`
  1592  	// NullFields is a list of field names (e.g. "CaiAssets") to include in API
  1593  	// requests with the JSON null value. By default, fields with empty values are
  1594  	// omitted from API requests. See
  1595  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1596  	NullFields []string `json:"-"`
  1597  }
  1598  
  1599  func (s *Resource) MarshalJSON() ([]byte, error) {
  1600  	type NoMethod Resource
  1601  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1602  }
  1603  
  1604  // ResourceCAIInfo: CAI info of a Resource.
  1605  type ResourceCAIInfo struct {
  1606  	// FullResourceName: CAI resource name in the format following
  1607  	// https://cloud.google.com/apis/design/resource_names#full_resource_name
  1608  	FullResourceName string `json:"fullResourceName,omitempty"`
  1609  	// ForceSendFields is a list of field names (e.g. "FullResourceName") to
  1610  	// unconditionally include in API requests. By default, fields with empty or
  1611  	// default values are omitted from API requests. See
  1612  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1613  	// details.
  1614  	ForceSendFields []string `json:"-"`
  1615  	// NullFields is a list of field names (e.g. "FullResourceName") to include in
  1616  	// API requests with the JSON null value. By default, fields with empty values
  1617  	// are omitted from API requests. See
  1618  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1619  	NullFields []string `json:"-"`
  1620  }
  1621  
  1622  func (s *ResourceCAIInfo) MarshalJSON() ([]byte, error) {
  1623  	type NoMethod ResourceCAIInfo
  1624  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1625  }
  1626  
  1627  // ResourceTerraformInfo: Terraform info of a Resource.
  1628  type ResourceTerraformInfo struct {
  1629  	// Address: TF resource address that uniquely identifies this resource within
  1630  	// this deployment.
  1631  	Address string `json:"address,omitempty"`
  1632  	// Id: ID attribute of the TF resource
  1633  	Id string `json:"id,omitempty"`
  1634  	// Type: TF resource type
  1635  	Type string `json:"type,omitempty"`
  1636  	// ForceSendFields is a list of field names (e.g. "Address") to unconditionally
  1637  	// include in API requests. By default, fields with empty or default values are
  1638  	// omitted from API requests. See
  1639  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1640  	// details.
  1641  	ForceSendFields []string `json:"-"`
  1642  	// NullFields is a list of field names (e.g. "Address") to include in API
  1643  	// requests with the JSON null value. By default, fields with empty values are
  1644  	// omitted from API requests. See
  1645  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1646  	NullFields []string `json:"-"`
  1647  }
  1648  
  1649  func (s *ResourceTerraformInfo) MarshalJSON() ([]byte, error) {
  1650  	type NoMethod ResourceTerraformInfo
  1651  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1652  }
  1653  
  1654  // Revision: A child resource of a Deployment generated by a 'CreateDeployment'
  1655  // or 'UpdateDeployment' call. Each Revision contains metadata pertaining to a
  1656  // snapshot of a particular Deployment.
  1657  type Revision struct {
  1658  	// Action: Output only. The action which created this revision
  1659  	//
  1660  	// Possible values:
  1661  	//   "ACTION_UNSPECIFIED" - The default value. This value is used if the action
  1662  	// is omitted.
  1663  	//   "CREATE" - The revision was generated by creating a deployment.
  1664  	//   "UPDATE" - The revision was generated by updating a deployment.
  1665  	//   "DELETE" - The revision was deleted.
  1666  	Action string `json:"action,omitempty"`
  1667  	// ApplyResults: Output only. Outputs and artifacts from applying a deployment.
  1668  	ApplyResults *ApplyResults `json:"applyResults,omitempty"`
  1669  	// Build: Output only. Cloud Build instance UUID associated with this revision.
  1670  	Build string `json:"build,omitempty"`
  1671  	// CreateTime: Output only. Time when the revision was created.
  1672  	CreateTime string `json:"createTime,omitempty"`
  1673  	// ErrorCode: Output only. Code describing any errors that may have occurred.
  1674  	//
  1675  	// Possible values:
  1676  	//   "ERROR_CODE_UNSPECIFIED" - No error code was specified.
  1677  	//   "CLOUD_BUILD_PERMISSION_DENIED" - Cloud Build failed due to a permission
  1678  	// issue.
  1679  	//   "APPLY_BUILD_API_FAILED" - Cloud Build job associated with creating or
  1680  	// updating a deployment could not be started.
  1681  	//   "APPLY_BUILD_RUN_FAILED" - Cloud Build job associated with creating or
  1682  	// updating a deployment was started but failed.
  1683  	//   "QUOTA_VALIDATION_FAILED" - quota validation failed for one or more
  1684  	// resources in terraform configuration files.
  1685  	ErrorCode string `json:"errorCode,omitempty"`
  1686  	// ErrorLogs: Output only. Location of Terraform error logs in Google Cloud
  1687  	// Storage. Format: `gs://{bucket}/{object}`.
  1688  	ErrorLogs string `json:"errorLogs,omitempty"`
  1689  	// ImportExistingResources: Output only. By default, Infra Manager will return
  1690  	// a failure when Terraform encounters a 409 code (resource conflict error)
  1691  	// during actuation. If this flag is set to true, Infra Manager will instead
  1692  	// attempt to automatically import the resource into the Terraform state (for
  1693  	// supported resource types) and continue actuation. Not all resource types are
  1694  	// supported, refer to documentation.
  1695  	ImportExistingResources bool `json:"importExistingResources,omitempty"`
  1696  	// Logs: Output only. Location of Revision operation logs in
  1697  	// `gs://{bucket}/{object}` format.
  1698  	Logs string `json:"logs,omitempty"`
  1699  	// Name: Revision name. Format:
  1700  	// `projects/{project}/locations/{location}/deployments/{deployment}/
  1701  	// revisions/{revision}`
  1702  	Name string `json:"name,omitempty"`
  1703  	// QuotaValidation: Optional. Input to control quota checks for resources in
  1704  	// terraform configuration files. There are limited resources on which quota
  1705  	// validation applies.
  1706  	//
  1707  	// Possible values:
  1708  	//   "QUOTA_VALIDATION_UNSPECIFIED" - The default value. QuotaValidation on
  1709  	// terraform configuration files will be disabled in this case.
  1710  	//   "ENABLED" - Enable computing quotas for resources in terraform
  1711  	// configuration files to get visibility on resources with insufficient quotas.
  1712  	//   "ENFORCED" - Enforce quota checks so deployment fails if there isn't
  1713  	// sufficient quotas available to deploy resources in terraform configuration
  1714  	// files.
  1715  	QuotaValidation string `json:"quotaValidation,omitempty"`
  1716  	// QuotaValidationResults: Output only. Cloud Storage path containing quota
  1717  	// validation results. This field is set when a user sets
  1718  	// Deployment.quota_validation field to ENABLED or ENFORCED. Format:
  1719  	// `gs://{bucket}/{object}`.
  1720  	QuotaValidationResults string `json:"quotaValidationResults,omitempty"`
  1721  	// ServiceAccount: Output only. User-specified Service Account (SA) to be used
  1722  	// as credential to manage resources. Format:
  1723  	// `projects/{projectID}/serviceAccounts/{serviceAccount}`
  1724  	ServiceAccount string `json:"serviceAccount,omitempty"`
  1725  	// State: Output only. Current state of the revision.
  1726  	//
  1727  	// Possible values:
  1728  	//   "STATE_UNSPECIFIED" - The default value. This value is used if the state
  1729  	// is omitted.
  1730  	//   "APPLYING" - The revision is being applied.
  1731  	//   "APPLIED" - The revision was applied successfully.
  1732  	//   "FAILED" - The revision could not be applied successfully.
  1733  	State string `json:"state,omitempty"`
  1734  	// StateDetail: Output only. Additional info regarding the current state.
  1735  	StateDetail string `json:"stateDetail,omitempty"`
  1736  	// TerraformBlueprint: Output only. A blueprint described using Terraform's
  1737  	// HashiCorp Configuration Language as a root module.
  1738  	TerraformBlueprint *TerraformBlueprint `json:"terraformBlueprint,omitempty"`
  1739  	// TfErrors: Output only. Errors encountered when creating or updating this
  1740  	// deployment. Errors are truncated to 10 entries, see `delete_results` and
  1741  	// `error_logs` for full details.
  1742  	TfErrors []*TerraformError `json:"tfErrors,omitempty"`
  1743  	// TfVersion: Output only. The version of Terraform used to create the
  1744  	// Revision. It is in the format of "Major.Minor.Patch", for example, "1.3.10".
  1745  	TfVersion string `json:"tfVersion,omitempty"`
  1746  	// TfVersionConstraint: Output only. The user-specified Terraform version
  1747  	// constraint. Example: "=1.3.10".
  1748  	TfVersionConstraint string `json:"tfVersionConstraint,omitempty"`
  1749  	// UpdateTime: Output only. Time when the revision was last modified.
  1750  	UpdateTime string `json:"updateTime,omitempty"`
  1751  	// WorkerPool: Output only. The user-specified Cloud Build worker pool resource
  1752  	// in which the Cloud Build job will execute. Format:
  1753  	// `projects/{project}/locations/{location}/workerPools/{workerPoolId}`. If
  1754  	// this field is unspecified, the default Cloud Build worker pool will be used.
  1755  	WorkerPool string `json:"workerPool,omitempty"`
  1756  
  1757  	// ServerResponse contains the HTTP response code and headers from the server.
  1758  	googleapi.ServerResponse `json:"-"`
  1759  	// ForceSendFields is a list of field names (e.g. "Action") to unconditionally
  1760  	// include in API requests. By default, fields with empty or default values are
  1761  	// omitted from API requests. See
  1762  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1763  	// details.
  1764  	ForceSendFields []string `json:"-"`
  1765  	// NullFields is a list of field names (e.g. "Action") to include in API
  1766  	// requests with the JSON null value. By default, fields with empty values are
  1767  	// omitted from API requests. See
  1768  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1769  	NullFields []string `json:"-"`
  1770  }
  1771  
  1772  func (s *Revision) MarshalJSON() ([]byte, error) {
  1773  	type NoMethod Revision
  1774  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1775  }
  1776  
  1777  // SetIamPolicyRequest: Request message for `SetIamPolicy` method.
  1778  type SetIamPolicyRequest struct {
  1779  	// Policy: REQUIRED: The complete policy to be applied to the `resource`. The
  1780  	// size of the policy is limited to a few 10s of KB. An empty policy is a valid
  1781  	// policy but certain Google Cloud services (such as Projects) might reject
  1782  	// them.
  1783  	Policy *Policy `json:"policy,omitempty"`
  1784  	// UpdateMask: OPTIONAL: A FieldMask specifying which fields of the policy to
  1785  	// modify. Only the fields in the mask will be modified. If no mask is
  1786  	// provided, the following default mask is used: `paths: "bindings, etag"
  1787  	UpdateMask string `json:"updateMask,omitempty"`
  1788  	// ForceSendFields is a list of field names (e.g. "Policy") to unconditionally
  1789  	// include in API requests. By default, fields with empty or default values are
  1790  	// omitted from API requests. See
  1791  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1792  	// details.
  1793  	ForceSendFields []string `json:"-"`
  1794  	// NullFields is a list of field names (e.g. "Policy") to include in API
  1795  	// requests with the JSON null value. By default, fields with empty values are
  1796  	// omitted from API requests. See
  1797  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1798  	NullFields []string `json:"-"`
  1799  }
  1800  
  1801  func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
  1802  	type NoMethod SetIamPolicyRequest
  1803  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1804  }
  1805  
  1806  // Statefile: Contains info about a Terraform state file
  1807  type Statefile struct {
  1808  	// SignedUri: Output only. Cloud Storage signed URI used for downloading or
  1809  	// uploading the state file.
  1810  	SignedUri string `json:"signedUri,omitempty"`
  1811  
  1812  	// ServerResponse contains the HTTP response code and headers from the server.
  1813  	googleapi.ServerResponse `json:"-"`
  1814  	// ForceSendFields is a list of field names (e.g. "SignedUri") to
  1815  	// unconditionally include in API requests. By default, fields with empty or
  1816  	// default values are omitted from API requests. See
  1817  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1818  	// details.
  1819  	ForceSendFields []string `json:"-"`
  1820  	// NullFields is a list of field names (e.g. "SignedUri") to include in API
  1821  	// requests with the JSON null value. By default, fields with empty values are
  1822  	// omitted from API requests. See
  1823  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1824  	NullFields []string `json:"-"`
  1825  }
  1826  
  1827  func (s *Statefile) MarshalJSON() ([]byte, error) {
  1828  	type NoMethod Statefile
  1829  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1830  }
  1831  
  1832  // Status: The `Status` type defines a logical error model that is suitable for
  1833  // different programming environments, including REST APIs and RPC APIs. It is
  1834  // used by gRPC (https://github.com/grpc). Each `Status` message contains three
  1835  // pieces of data: error code, error message, and error details. You can find
  1836  // out more about this error model and how to work with it in the API Design
  1837  // Guide (https://cloud.google.com/apis/design/errors).
  1838  type Status struct {
  1839  	// Code: The status code, which should be an enum value of google.rpc.Code.
  1840  	Code int64 `json:"code,omitempty"`
  1841  	// Details: A list of messages that carry the error details. There is a common
  1842  	// set of message types for APIs to use.
  1843  	Details []googleapi.RawMessage `json:"details,omitempty"`
  1844  	// Message: A developer-facing error message, which should be in English. Any
  1845  	// user-facing error message should be localized and sent in the
  1846  	// google.rpc.Status.details field, or localized by the client.
  1847  	Message string `json:"message,omitempty"`
  1848  	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
  1849  	// include in API requests. By default, fields with empty or default values are
  1850  	// omitted from API requests. See
  1851  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1852  	// details.
  1853  	ForceSendFields []string `json:"-"`
  1854  	// NullFields is a list of field names (e.g. "Code") to include in API requests
  1855  	// with the JSON null value. By default, fields with empty values are omitted
  1856  	// from API requests. See
  1857  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1858  	NullFields []string `json:"-"`
  1859  }
  1860  
  1861  func (s *Status) MarshalJSON() ([]byte, error) {
  1862  	type NoMethod Status
  1863  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1864  }
  1865  
  1866  // TerraformBlueprint: TerraformBlueprint describes the source of a Terraform
  1867  // root module which describes the resources and configs to be deployed.
  1868  type TerraformBlueprint struct {
  1869  	// GcsSource: Required. URI of an object in Google Cloud Storage. Format:
  1870  	// `gs://{bucket}/{object}` URI may also specify an object version for zipped
  1871  	// objects. Format: `gs://{bucket}/{object}#{version}`
  1872  	GcsSource string `json:"gcsSource,omitempty"`
  1873  	// GitSource: Required. URI of a public Git repo.
  1874  	GitSource *GitSource `json:"gitSource,omitempty"`
  1875  	// InputValues: Input variable values for the Terraform blueprint.
  1876  	InputValues map[string]TerraformVariable `json:"inputValues,omitempty"`
  1877  	// ForceSendFields is a list of field names (e.g. "GcsSource") to
  1878  	// unconditionally include in API requests. By default, fields with empty or
  1879  	// default values are omitted from API requests. See
  1880  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1881  	// details.
  1882  	ForceSendFields []string `json:"-"`
  1883  	// NullFields is a list of field names (e.g. "GcsSource") to include in API
  1884  	// requests with the JSON null value. By default, fields with empty values are
  1885  	// omitted from API requests. See
  1886  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1887  	NullFields []string `json:"-"`
  1888  }
  1889  
  1890  func (s *TerraformBlueprint) MarshalJSON() ([]byte, error) {
  1891  	type NoMethod TerraformBlueprint
  1892  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1893  }
  1894  
  1895  // TerraformError: Errors encountered during actuation using Terraform
  1896  type TerraformError struct {
  1897  	// Error: Original error response from underlying Google API, if available.
  1898  	Error *Status `json:"error,omitempty"`
  1899  	// ErrorDescription: A human-readable error description.
  1900  	ErrorDescription string `json:"errorDescription,omitempty"`
  1901  	// HttpResponseCode: HTTP response code returned from Google Cloud Platform
  1902  	// APIs when Terraform fails to provision the resource. If unset or 0, no HTTP
  1903  	// response code was returned by Terraform.
  1904  	HttpResponseCode int64 `json:"httpResponseCode,omitempty"`
  1905  	// ResourceAddress: Address of the resource associated with the error, e.g.
  1906  	// `google_compute_network.vpc_network`.
  1907  	ResourceAddress string `json:"resourceAddress,omitempty"`
  1908  	// ForceSendFields is a list of field names (e.g. "Error") to unconditionally
  1909  	// include in API requests. By default, fields with empty or default values are
  1910  	// omitted from API requests. See
  1911  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1912  	// details.
  1913  	ForceSendFields []string `json:"-"`
  1914  	// NullFields is a list of field names (e.g. "Error") to include in API
  1915  	// requests with the JSON null value. By default, fields with empty values are
  1916  	// omitted from API requests. See
  1917  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1918  	NullFields []string `json:"-"`
  1919  }
  1920  
  1921  func (s *TerraformError) MarshalJSON() ([]byte, error) {
  1922  	type NoMethod TerraformError
  1923  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1924  }
  1925  
  1926  // TerraformOutput: Describes a Terraform output.
  1927  type TerraformOutput struct {
  1928  	// Sensitive: Identifies whether Terraform has set this output as a potential
  1929  	// sensitive value.
  1930  	Sensitive bool `json:"sensitive,omitempty"`
  1931  	// Value: Value of output.
  1932  	Value interface{} `json:"value,omitempty"`
  1933  	// ForceSendFields is a list of field names (e.g. "Sensitive") to
  1934  	// unconditionally include in API requests. By default, fields with empty or
  1935  	// default values are omitted from API requests. See
  1936  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1937  	// details.
  1938  	ForceSendFields []string `json:"-"`
  1939  	// NullFields is a list of field names (e.g. "Sensitive") to include in API
  1940  	// requests with the JSON null value. By default, fields with empty values are
  1941  	// omitted from API requests. See
  1942  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1943  	NullFields []string `json:"-"`
  1944  }
  1945  
  1946  func (s *TerraformOutput) MarshalJSON() ([]byte, error) {
  1947  	type NoMethod TerraformOutput
  1948  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1949  }
  1950  
  1951  // TerraformVariable: A Terraform input variable.
  1952  type TerraformVariable struct {
  1953  	// InputValue: Input variable value.
  1954  	InputValue interface{} `json:"inputValue,omitempty"`
  1955  	// ForceSendFields is a list of field names (e.g. "InputValue") to
  1956  	// unconditionally include in API requests. By default, fields with empty or
  1957  	// default values are omitted from API requests. See
  1958  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1959  	// details.
  1960  	ForceSendFields []string `json:"-"`
  1961  	// NullFields is a list of field names (e.g. "InputValue") to include in API
  1962  	// requests with the JSON null value. By default, fields with empty values are
  1963  	// omitted from API requests. See
  1964  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1965  	NullFields []string `json:"-"`
  1966  }
  1967  
  1968  func (s *TerraformVariable) MarshalJSON() ([]byte, error) {
  1969  	type NoMethod TerraformVariable
  1970  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1971  }
  1972  
  1973  // TerraformVersion: A TerraformVersion represents the support state the
  1974  // corresponding Terraform version.
  1975  type TerraformVersion struct {
  1976  	// DeprecateTime: Output only. When the version is deprecated.
  1977  	DeprecateTime string `json:"deprecateTime,omitempty"`
  1978  	// Name: Identifier. The version name is in the format:
  1979  	// 'projects/{project_id}/locations/{location}/terraformVersions/{terraform_vers
  1980  	// ion}'.
  1981  	Name string `json:"name,omitempty"`
  1982  	// ObsoleteTime: Output only. When the version is obsolete.
  1983  	ObsoleteTime string `json:"obsoleteTime,omitempty"`
  1984  	// State: Output only. The state of the version, ACTIVE, DEPRECATED or
  1985  	// OBSOLETE.
  1986  	//
  1987  	// Possible values:
  1988  	//   "STATE_UNSPECIFIED" - The default value. This value is used if the state
  1989  	// is omitted.
  1990  	//   "ACTIVE" - The version is actively supported.
  1991  	//   "DEPRECATED" - The version is deprecated.
  1992  	//   "OBSOLETE" - The version is obsolete.
  1993  	State string `json:"state,omitempty"`
  1994  	// SupportTime: Output only. When the version is supported.
  1995  	SupportTime string `json:"supportTime,omitempty"`
  1996  
  1997  	// ServerResponse contains the HTTP response code and headers from the server.
  1998  	googleapi.ServerResponse `json:"-"`
  1999  	// ForceSendFields is a list of field names (e.g. "DeprecateTime") to
  2000  	// unconditionally include in API requests. By default, fields with empty or
  2001  	// default values are omitted from API requests. See
  2002  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2003  	// details.
  2004  	ForceSendFields []string `json:"-"`
  2005  	// NullFields is a list of field names (e.g. "DeprecateTime") to include in API
  2006  	// requests with the JSON null value. By default, fields with empty values are
  2007  	// omitted from API requests. See
  2008  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2009  	NullFields []string `json:"-"`
  2010  }
  2011  
  2012  func (s *TerraformVersion) MarshalJSON() ([]byte, error) {
  2013  	type NoMethod TerraformVersion
  2014  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2015  }
  2016  
  2017  // TestIamPermissionsRequest: Request message for `TestIamPermissions` method.
  2018  type TestIamPermissionsRequest struct {
  2019  	// Permissions: The set of permissions to check for the `resource`. Permissions
  2020  	// with wildcards (such as `*` or `storage.*`) are not allowed. For more
  2021  	// information see IAM Overview
  2022  	// (https://cloud.google.com/iam/docs/overview#permissions).
  2023  	Permissions []string `json:"permissions,omitempty"`
  2024  	// ForceSendFields is a list of field names (e.g. "Permissions") to
  2025  	// unconditionally include in API requests. By default, fields with empty or
  2026  	// default values are omitted from API requests. See
  2027  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2028  	// details.
  2029  	ForceSendFields []string `json:"-"`
  2030  	// NullFields is a list of field names (e.g. "Permissions") to include in API
  2031  	// requests with the JSON null value. By default, fields with empty values are
  2032  	// omitted from API requests. See
  2033  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2034  	NullFields []string `json:"-"`
  2035  }
  2036  
  2037  func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
  2038  	type NoMethod TestIamPermissionsRequest
  2039  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2040  }
  2041  
  2042  // TestIamPermissionsResponse: Response message for `TestIamPermissions`
  2043  // method.
  2044  type TestIamPermissionsResponse struct {
  2045  	// Permissions: A subset of `TestPermissionsRequest.permissions` that the
  2046  	// caller is allowed.
  2047  	Permissions []string `json:"permissions,omitempty"`
  2048  
  2049  	// ServerResponse contains the HTTP response code and headers from the server.
  2050  	googleapi.ServerResponse `json:"-"`
  2051  	// ForceSendFields is a list of field names (e.g. "Permissions") to
  2052  	// unconditionally include in API requests. By default, fields with empty or
  2053  	// default values are omitted from API requests. See
  2054  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2055  	// details.
  2056  	ForceSendFields []string `json:"-"`
  2057  	// NullFields is a list of field names (e.g. "Permissions") to include in API
  2058  	// requests with the JSON null value. By default, fields with empty values are
  2059  	// omitted from API requests. See
  2060  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2061  	NullFields []string `json:"-"`
  2062  }
  2063  
  2064  func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
  2065  	type NoMethod TestIamPermissionsResponse
  2066  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2067  }
  2068  
  2069  // UnlockDeploymentRequest: A request to unlock a state file passed to a
  2070  // 'UnlockDeployment' call.
  2071  type UnlockDeploymentRequest struct {
  2072  	// LockId: Required. Lock ID of the lock file to be unlocked.
  2073  	LockId int64 `json:"lockId,omitempty,string"`
  2074  	// ForceSendFields is a list of field names (e.g. "LockId") to unconditionally
  2075  	// include in API requests. By default, fields with empty or default values are
  2076  	// omitted from API requests. See
  2077  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2078  	// details.
  2079  	ForceSendFields []string `json:"-"`
  2080  	// NullFields is a list of field names (e.g. "LockId") to include in API
  2081  	// requests with the JSON null value. By default, fields with empty values are
  2082  	// omitted from API requests. See
  2083  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2084  	NullFields []string `json:"-"`
  2085  }
  2086  
  2087  func (s *UnlockDeploymentRequest) MarshalJSON() ([]byte, error) {
  2088  	type NoMethod UnlockDeploymentRequest
  2089  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2090  }
  2091  
  2092  type ProjectsLocationsGetCall struct {
  2093  	s            *Service
  2094  	name         string
  2095  	urlParams_   gensupport.URLParams
  2096  	ifNoneMatch_ string
  2097  	ctx_         context.Context
  2098  	header_      http.Header
  2099  }
  2100  
  2101  // Get: Gets information about a location.
  2102  //
  2103  // - name: Resource name for the location.
  2104  func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
  2105  	c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2106  	c.name = name
  2107  	return c
  2108  }
  2109  
  2110  // Fields allows partial responses to be retrieved. See
  2111  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2112  // details.
  2113  func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
  2114  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2115  	return c
  2116  }
  2117  
  2118  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2119  // object's ETag matches the given value. This is useful for getting updates
  2120  // only after the object has changed since the last request.
  2121  func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
  2122  	c.ifNoneMatch_ = entityTag
  2123  	return c
  2124  }
  2125  
  2126  // Context sets the context to be used in this call's Do method.
  2127  func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
  2128  	c.ctx_ = ctx
  2129  	return c
  2130  }
  2131  
  2132  // Header returns a http.Header that can be modified by the caller to add
  2133  // headers to the request.
  2134  func (c *ProjectsLocationsGetCall) Header() http.Header {
  2135  	if c.header_ == nil {
  2136  		c.header_ = make(http.Header)
  2137  	}
  2138  	return c.header_
  2139  }
  2140  
  2141  func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
  2142  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2143  	if c.ifNoneMatch_ != "" {
  2144  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2145  	}
  2146  	var body io.Reader = nil
  2147  	c.urlParams_.Set("alt", alt)
  2148  	c.urlParams_.Set("prettyPrint", "false")
  2149  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  2150  	urls += "?" + c.urlParams_.Encode()
  2151  	req, err := http.NewRequest("GET", urls, body)
  2152  	if err != nil {
  2153  		return nil, err
  2154  	}
  2155  	req.Header = reqHeaders
  2156  	googleapi.Expand(req.URL, map[string]string{
  2157  		"name": c.name,
  2158  	})
  2159  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2160  }
  2161  
  2162  // Do executes the "config.projects.locations.get" call.
  2163  // Any non-2xx status code is an error. Response headers are in either
  2164  // *Location.ServerResponse.Header or (if a response was returned at all) in
  2165  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2166  // whether the returned error was because http.StatusNotModified was returned.
  2167  func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
  2168  	gensupport.SetOptions(c.urlParams_, opts...)
  2169  	res, err := c.doRequest("json")
  2170  	if res != nil && res.StatusCode == http.StatusNotModified {
  2171  		if res.Body != nil {
  2172  			res.Body.Close()
  2173  		}
  2174  		return nil, gensupport.WrapError(&googleapi.Error{
  2175  			Code:   res.StatusCode,
  2176  			Header: res.Header,
  2177  		})
  2178  	}
  2179  	if err != nil {
  2180  		return nil, err
  2181  	}
  2182  	defer googleapi.CloseBody(res)
  2183  	if err := googleapi.CheckResponse(res); err != nil {
  2184  		return nil, gensupport.WrapError(err)
  2185  	}
  2186  	ret := &Location{
  2187  		ServerResponse: googleapi.ServerResponse{
  2188  			Header:         res.Header,
  2189  			HTTPStatusCode: res.StatusCode,
  2190  		},
  2191  	}
  2192  	target := &ret
  2193  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2194  		return nil, err
  2195  	}
  2196  	return ret, nil
  2197  }
  2198  
  2199  type ProjectsLocationsListCall struct {
  2200  	s            *Service
  2201  	name         string
  2202  	urlParams_   gensupport.URLParams
  2203  	ifNoneMatch_ string
  2204  	ctx_         context.Context
  2205  	header_      http.Header
  2206  }
  2207  
  2208  // List: Lists information about the supported locations for this service.
  2209  //
  2210  // - name: The resource that owns the locations collection, if applicable.
  2211  func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
  2212  	c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2213  	c.name = name
  2214  	return c
  2215  }
  2216  
  2217  // Filter sets the optional parameter "filter": A filter to narrow down results
  2218  // to a preferred subset. The filtering language accepts strings like
  2219  // "displayName=tokyo", and is documented in more detail in AIP-160
  2220  // (https://google.aip.dev/160).
  2221  func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
  2222  	c.urlParams_.Set("filter", filter)
  2223  	return c
  2224  }
  2225  
  2226  // PageSize sets the optional parameter "pageSize": The maximum number of
  2227  // results to return. If not set, the service selects a default.
  2228  func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
  2229  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2230  	return c
  2231  }
  2232  
  2233  // PageToken sets the optional parameter "pageToken": A page token received
  2234  // from the `next_page_token` field in the response. Send that page token to
  2235  // receive the subsequent page.
  2236  func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
  2237  	c.urlParams_.Set("pageToken", pageToken)
  2238  	return c
  2239  }
  2240  
  2241  // Fields allows partial responses to be retrieved. See
  2242  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2243  // details.
  2244  func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
  2245  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2246  	return c
  2247  }
  2248  
  2249  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2250  // object's ETag matches the given value. This is useful for getting updates
  2251  // only after the object has changed since the last request.
  2252  func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
  2253  	c.ifNoneMatch_ = entityTag
  2254  	return c
  2255  }
  2256  
  2257  // Context sets the context to be used in this call's Do method.
  2258  func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
  2259  	c.ctx_ = ctx
  2260  	return c
  2261  }
  2262  
  2263  // Header returns a http.Header that can be modified by the caller to add
  2264  // headers to the request.
  2265  func (c *ProjectsLocationsListCall) Header() http.Header {
  2266  	if c.header_ == nil {
  2267  		c.header_ = make(http.Header)
  2268  	}
  2269  	return c.header_
  2270  }
  2271  
  2272  func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
  2273  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2274  	if c.ifNoneMatch_ != "" {
  2275  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2276  	}
  2277  	var body io.Reader = nil
  2278  	c.urlParams_.Set("alt", alt)
  2279  	c.urlParams_.Set("prettyPrint", "false")
  2280  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations")
  2281  	urls += "?" + c.urlParams_.Encode()
  2282  	req, err := http.NewRequest("GET", urls, body)
  2283  	if err != nil {
  2284  		return nil, err
  2285  	}
  2286  	req.Header = reqHeaders
  2287  	googleapi.Expand(req.URL, map[string]string{
  2288  		"name": c.name,
  2289  	})
  2290  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2291  }
  2292  
  2293  // Do executes the "config.projects.locations.list" call.
  2294  // Any non-2xx status code is an error. Response headers are in either
  2295  // *ListLocationsResponse.ServerResponse.Header or (if a response was returned
  2296  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2297  // check whether the returned error was because http.StatusNotModified was
  2298  // returned.
  2299  func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
  2300  	gensupport.SetOptions(c.urlParams_, opts...)
  2301  	res, err := c.doRequest("json")
  2302  	if res != nil && res.StatusCode == http.StatusNotModified {
  2303  		if res.Body != nil {
  2304  			res.Body.Close()
  2305  		}
  2306  		return nil, gensupport.WrapError(&googleapi.Error{
  2307  			Code:   res.StatusCode,
  2308  			Header: res.Header,
  2309  		})
  2310  	}
  2311  	if err != nil {
  2312  		return nil, err
  2313  	}
  2314  	defer googleapi.CloseBody(res)
  2315  	if err := googleapi.CheckResponse(res); err != nil {
  2316  		return nil, gensupport.WrapError(err)
  2317  	}
  2318  	ret := &ListLocationsResponse{
  2319  		ServerResponse: googleapi.ServerResponse{
  2320  			Header:         res.Header,
  2321  			HTTPStatusCode: res.StatusCode,
  2322  		},
  2323  	}
  2324  	target := &ret
  2325  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2326  		return nil, err
  2327  	}
  2328  	return ret, nil
  2329  }
  2330  
  2331  // Pages invokes f for each page of results.
  2332  // A non-nil error returned from f will halt the iteration.
  2333  // The provided context supersedes any context provided to the Context method.
  2334  func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
  2335  	c.ctx_ = ctx
  2336  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  2337  	for {
  2338  		x, err := c.Do()
  2339  		if err != nil {
  2340  			return err
  2341  		}
  2342  		if err := f(x); err != nil {
  2343  			return err
  2344  		}
  2345  		if x.NextPageToken == "" {
  2346  			return nil
  2347  		}
  2348  		c.PageToken(x.NextPageToken)
  2349  	}
  2350  }
  2351  
  2352  type ProjectsLocationsDeploymentsCreateCall struct {
  2353  	s          *Service
  2354  	parent     string
  2355  	deployment *Deployment
  2356  	urlParams_ gensupport.URLParams
  2357  	ctx_       context.Context
  2358  	header_    http.Header
  2359  }
  2360  
  2361  // Create: Creates a Deployment.
  2362  //
  2363  //   - parent: The parent in whose context the Deployment is created. The parent
  2364  //     value is in the format: 'projects/{project_id}/locations/{location}'.
  2365  func (r *ProjectsLocationsDeploymentsService) Create(parent string, deployment *Deployment) *ProjectsLocationsDeploymentsCreateCall {
  2366  	c := &ProjectsLocationsDeploymentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2367  	c.parent = parent
  2368  	c.deployment = deployment
  2369  	return c
  2370  }
  2371  
  2372  // DeploymentId sets the optional parameter "deploymentId": Required. The
  2373  // Deployment ID.
  2374  func (c *ProjectsLocationsDeploymentsCreateCall) DeploymentId(deploymentId string) *ProjectsLocationsDeploymentsCreateCall {
  2375  	c.urlParams_.Set("deploymentId", deploymentId)
  2376  	return c
  2377  }
  2378  
  2379  // RequestId sets the optional parameter "requestId": An optional request ID to
  2380  // identify requests. Specify a unique request ID so that if you must retry
  2381  // your request, the server will know to ignore the request if it has already
  2382  // been completed. The server will guarantee that for at least 60 minutes since
  2383  // the first request. For example, consider a situation where you make an
  2384  // initial request and the request times out. If you make the request again
  2385  // with the same request ID, the server can check if original operation with
  2386  // the same request ID was received, and if so, will ignore the second request.
  2387  // This prevents clients from accidentally creating duplicate commitments. The
  2388  // request ID must be a valid UUID with the exception that zero UUID is not
  2389  // supported (00000000-0000-0000-0000-000000000000).
  2390  func (c *ProjectsLocationsDeploymentsCreateCall) RequestId(requestId string) *ProjectsLocationsDeploymentsCreateCall {
  2391  	c.urlParams_.Set("requestId", requestId)
  2392  	return c
  2393  }
  2394  
  2395  // Fields allows partial responses to be retrieved. See
  2396  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2397  // details.
  2398  func (c *ProjectsLocationsDeploymentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsCreateCall {
  2399  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2400  	return c
  2401  }
  2402  
  2403  // Context sets the context to be used in this call's Do method.
  2404  func (c *ProjectsLocationsDeploymentsCreateCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsCreateCall {
  2405  	c.ctx_ = ctx
  2406  	return c
  2407  }
  2408  
  2409  // Header returns a http.Header that can be modified by the caller to add
  2410  // headers to the request.
  2411  func (c *ProjectsLocationsDeploymentsCreateCall) Header() http.Header {
  2412  	if c.header_ == nil {
  2413  		c.header_ = make(http.Header)
  2414  	}
  2415  	return c.header_
  2416  }
  2417  
  2418  func (c *ProjectsLocationsDeploymentsCreateCall) doRequest(alt string) (*http.Response, error) {
  2419  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2420  	var body io.Reader = nil
  2421  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.deployment)
  2422  	if err != nil {
  2423  		return nil, err
  2424  	}
  2425  	c.urlParams_.Set("alt", alt)
  2426  	c.urlParams_.Set("prettyPrint", "false")
  2427  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/deployments")
  2428  	urls += "?" + c.urlParams_.Encode()
  2429  	req, err := http.NewRequest("POST", urls, body)
  2430  	if err != nil {
  2431  		return nil, err
  2432  	}
  2433  	req.Header = reqHeaders
  2434  	googleapi.Expand(req.URL, map[string]string{
  2435  		"parent": c.parent,
  2436  	})
  2437  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2438  }
  2439  
  2440  // Do executes the "config.projects.locations.deployments.create" call.
  2441  // Any non-2xx status code is an error. Response headers are in either
  2442  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  2443  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2444  // whether the returned error was because http.StatusNotModified was returned.
  2445  func (c *ProjectsLocationsDeploymentsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2446  	gensupport.SetOptions(c.urlParams_, opts...)
  2447  	res, err := c.doRequest("json")
  2448  	if res != nil && res.StatusCode == http.StatusNotModified {
  2449  		if res.Body != nil {
  2450  			res.Body.Close()
  2451  		}
  2452  		return nil, gensupport.WrapError(&googleapi.Error{
  2453  			Code:   res.StatusCode,
  2454  			Header: res.Header,
  2455  		})
  2456  	}
  2457  	if err != nil {
  2458  		return nil, err
  2459  	}
  2460  	defer googleapi.CloseBody(res)
  2461  	if err := googleapi.CheckResponse(res); err != nil {
  2462  		return nil, gensupport.WrapError(err)
  2463  	}
  2464  	ret := &Operation{
  2465  		ServerResponse: googleapi.ServerResponse{
  2466  			Header:         res.Header,
  2467  			HTTPStatusCode: res.StatusCode,
  2468  		},
  2469  	}
  2470  	target := &ret
  2471  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2472  		return nil, err
  2473  	}
  2474  	return ret, nil
  2475  }
  2476  
  2477  type ProjectsLocationsDeploymentsDeleteCall struct {
  2478  	s          *Service
  2479  	name       string
  2480  	urlParams_ gensupport.URLParams
  2481  	ctx_       context.Context
  2482  	header_    http.Header
  2483  }
  2484  
  2485  // Delete: Deletes a Deployment.
  2486  //
  2487  //   - name: The name of the Deployment in the format:
  2488  //     'projects/{project_id}/locations/{location}/deployments/{deployment}'.
  2489  func (r *ProjectsLocationsDeploymentsService) Delete(name string) *ProjectsLocationsDeploymentsDeleteCall {
  2490  	c := &ProjectsLocationsDeploymentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2491  	c.name = name
  2492  	return c
  2493  }
  2494  
  2495  // DeletePolicy sets the optional parameter "deletePolicy": Policy on how
  2496  // resources actuated by the deployment should be deleted. If unspecified, the
  2497  // default behavior is to delete the underlying resources.
  2498  //
  2499  // Possible values:
  2500  //
  2501  //	"DELETE_POLICY_UNSPECIFIED" - Unspecified policy, resources will be
  2502  //
  2503  // deleted.
  2504  //
  2505  //	"DELETE" - Deletes resources actuated by the deployment.
  2506  //	"ABANDON" - Abandons resources and only deletes the deployment and its
  2507  //
  2508  // metadata.
  2509  func (c *ProjectsLocationsDeploymentsDeleteCall) DeletePolicy(deletePolicy string) *ProjectsLocationsDeploymentsDeleteCall {
  2510  	c.urlParams_.Set("deletePolicy", deletePolicy)
  2511  	return c
  2512  }
  2513  
  2514  // Force sets the optional parameter "force": If set to true, any revisions for
  2515  // this deployment will also be deleted. (Otherwise, the request will only work
  2516  // if the deployment has no revisions.)
  2517  func (c *ProjectsLocationsDeploymentsDeleteCall) Force(force bool) *ProjectsLocationsDeploymentsDeleteCall {
  2518  	c.urlParams_.Set("force", fmt.Sprint(force))
  2519  	return c
  2520  }
  2521  
  2522  // RequestId sets the optional parameter "requestId": An optional request ID to
  2523  // identify requests. Specify a unique request ID so that if you must retry
  2524  // your request, the server will know to ignore the request if it has already
  2525  // been completed. The server will guarantee that for at least 60 minutes after
  2526  // the first request. For example, consider a situation where you make an
  2527  // initial request and the request times out. If you make the request again
  2528  // with the same request ID, the server can check if original operation with
  2529  // the same request ID was received, and if so, will ignore the second request.
  2530  // This prevents clients from accidentally creating duplicate commitments. The
  2531  // request ID must be a valid UUID with the exception that zero UUID is not
  2532  // supported (00000000-0000-0000-0000-000000000000).
  2533  func (c *ProjectsLocationsDeploymentsDeleteCall) RequestId(requestId string) *ProjectsLocationsDeploymentsDeleteCall {
  2534  	c.urlParams_.Set("requestId", requestId)
  2535  	return c
  2536  }
  2537  
  2538  // Fields allows partial responses to be retrieved. See
  2539  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2540  // details.
  2541  func (c *ProjectsLocationsDeploymentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsDeleteCall {
  2542  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2543  	return c
  2544  }
  2545  
  2546  // Context sets the context to be used in this call's Do method.
  2547  func (c *ProjectsLocationsDeploymentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsDeleteCall {
  2548  	c.ctx_ = ctx
  2549  	return c
  2550  }
  2551  
  2552  // Header returns a http.Header that can be modified by the caller to add
  2553  // headers to the request.
  2554  func (c *ProjectsLocationsDeploymentsDeleteCall) Header() http.Header {
  2555  	if c.header_ == nil {
  2556  		c.header_ = make(http.Header)
  2557  	}
  2558  	return c.header_
  2559  }
  2560  
  2561  func (c *ProjectsLocationsDeploymentsDeleteCall) doRequest(alt string) (*http.Response, error) {
  2562  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2563  	var body io.Reader = nil
  2564  	c.urlParams_.Set("alt", alt)
  2565  	c.urlParams_.Set("prettyPrint", "false")
  2566  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  2567  	urls += "?" + c.urlParams_.Encode()
  2568  	req, err := http.NewRequest("DELETE", urls, body)
  2569  	if err != nil {
  2570  		return nil, err
  2571  	}
  2572  	req.Header = reqHeaders
  2573  	googleapi.Expand(req.URL, map[string]string{
  2574  		"name": c.name,
  2575  	})
  2576  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2577  }
  2578  
  2579  // Do executes the "config.projects.locations.deployments.delete" call.
  2580  // Any non-2xx status code is an error. Response headers are in either
  2581  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  2582  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2583  // whether the returned error was because http.StatusNotModified was returned.
  2584  func (c *ProjectsLocationsDeploymentsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2585  	gensupport.SetOptions(c.urlParams_, opts...)
  2586  	res, err := c.doRequest("json")
  2587  	if res != nil && res.StatusCode == http.StatusNotModified {
  2588  		if res.Body != nil {
  2589  			res.Body.Close()
  2590  		}
  2591  		return nil, gensupport.WrapError(&googleapi.Error{
  2592  			Code:   res.StatusCode,
  2593  			Header: res.Header,
  2594  		})
  2595  	}
  2596  	if err != nil {
  2597  		return nil, err
  2598  	}
  2599  	defer googleapi.CloseBody(res)
  2600  	if err := googleapi.CheckResponse(res); err != nil {
  2601  		return nil, gensupport.WrapError(err)
  2602  	}
  2603  	ret := &Operation{
  2604  		ServerResponse: googleapi.ServerResponse{
  2605  			Header:         res.Header,
  2606  			HTTPStatusCode: res.StatusCode,
  2607  		},
  2608  	}
  2609  	target := &ret
  2610  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2611  		return nil, err
  2612  	}
  2613  	return ret, nil
  2614  }
  2615  
  2616  type ProjectsLocationsDeploymentsDeleteStateCall struct {
  2617  	s                      *Service
  2618  	name                   string
  2619  	deletestatefilerequest *DeleteStatefileRequest
  2620  	urlParams_             gensupport.URLParams
  2621  	ctx_                   context.Context
  2622  	header_                http.Header
  2623  }
  2624  
  2625  // DeleteState: Deletes Terraform state file in a given deployment.
  2626  //
  2627  //   - name: The name of the deployment in the format:
  2628  //     'projects/{project_id}/locations/{location}/deployments/{deployment}'.
  2629  func (r *ProjectsLocationsDeploymentsService) DeleteState(name string, deletestatefilerequest *DeleteStatefileRequest) *ProjectsLocationsDeploymentsDeleteStateCall {
  2630  	c := &ProjectsLocationsDeploymentsDeleteStateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2631  	c.name = name
  2632  	c.deletestatefilerequest = deletestatefilerequest
  2633  	return c
  2634  }
  2635  
  2636  // Fields allows partial responses to be retrieved. See
  2637  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2638  // details.
  2639  func (c *ProjectsLocationsDeploymentsDeleteStateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsDeleteStateCall {
  2640  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2641  	return c
  2642  }
  2643  
  2644  // Context sets the context to be used in this call's Do method.
  2645  func (c *ProjectsLocationsDeploymentsDeleteStateCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsDeleteStateCall {
  2646  	c.ctx_ = ctx
  2647  	return c
  2648  }
  2649  
  2650  // Header returns a http.Header that can be modified by the caller to add
  2651  // headers to the request.
  2652  func (c *ProjectsLocationsDeploymentsDeleteStateCall) Header() http.Header {
  2653  	if c.header_ == nil {
  2654  		c.header_ = make(http.Header)
  2655  	}
  2656  	return c.header_
  2657  }
  2658  
  2659  func (c *ProjectsLocationsDeploymentsDeleteStateCall) doRequest(alt string) (*http.Response, error) {
  2660  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2661  	var body io.Reader = nil
  2662  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.deletestatefilerequest)
  2663  	if err != nil {
  2664  		return nil, err
  2665  	}
  2666  	c.urlParams_.Set("alt", alt)
  2667  	c.urlParams_.Set("prettyPrint", "false")
  2668  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:deleteState")
  2669  	urls += "?" + c.urlParams_.Encode()
  2670  	req, err := http.NewRequest("POST", urls, body)
  2671  	if err != nil {
  2672  		return nil, err
  2673  	}
  2674  	req.Header = reqHeaders
  2675  	googleapi.Expand(req.URL, map[string]string{
  2676  		"name": c.name,
  2677  	})
  2678  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2679  }
  2680  
  2681  // Do executes the "config.projects.locations.deployments.deleteState" call.
  2682  // Any non-2xx status code is an error. Response headers are in either
  2683  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  2684  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2685  // whether the returned error was because http.StatusNotModified was returned.
  2686  func (c *ProjectsLocationsDeploymentsDeleteStateCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  2687  	gensupport.SetOptions(c.urlParams_, opts...)
  2688  	res, err := c.doRequest("json")
  2689  	if res != nil && res.StatusCode == http.StatusNotModified {
  2690  		if res.Body != nil {
  2691  			res.Body.Close()
  2692  		}
  2693  		return nil, gensupport.WrapError(&googleapi.Error{
  2694  			Code:   res.StatusCode,
  2695  			Header: res.Header,
  2696  		})
  2697  	}
  2698  	if err != nil {
  2699  		return nil, err
  2700  	}
  2701  	defer googleapi.CloseBody(res)
  2702  	if err := googleapi.CheckResponse(res); err != nil {
  2703  		return nil, gensupport.WrapError(err)
  2704  	}
  2705  	ret := &Empty{
  2706  		ServerResponse: googleapi.ServerResponse{
  2707  			Header:         res.Header,
  2708  			HTTPStatusCode: res.StatusCode,
  2709  		},
  2710  	}
  2711  	target := &ret
  2712  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2713  		return nil, err
  2714  	}
  2715  	return ret, nil
  2716  }
  2717  
  2718  type ProjectsLocationsDeploymentsExportLockCall struct {
  2719  	s            *Service
  2720  	name         string
  2721  	urlParams_   gensupport.URLParams
  2722  	ifNoneMatch_ string
  2723  	ctx_         context.Context
  2724  	header_      http.Header
  2725  }
  2726  
  2727  // ExportLock: Exports the lock info on a locked deployment.
  2728  //
  2729  //   - name: The name of the deployment in the format:
  2730  //     'projects/{project_id}/locations/{location}/deployments/{deployment}'.
  2731  func (r *ProjectsLocationsDeploymentsService) ExportLock(name string) *ProjectsLocationsDeploymentsExportLockCall {
  2732  	c := &ProjectsLocationsDeploymentsExportLockCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2733  	c.name = name
  2734  	return c
  2735  }
  2736  
  2737  // Fields allows partial responses to be retrieved. See
  2738  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2739  // details.
  2740  func (c *ProjectsLocationsDeploymentsExportLockCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsExportLockCall {
  2741  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2742  	return c
  2743  }
  2744  
  2745  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2746  // object's ETag matches the given value. This is useful for getting updates
  2747  // only after the object has changed since the last request.
  2748  func (c *ProjectsLocationsDeploymentsExportLockCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeploymentsExportLockCall {
  2749  	c.ifNoneMatch_ = entityTag
  2750  	return c
  2751  }
  2752  
  2753  // Context sets the context to be used in this call's Do method.
  2754  func (c *ProjectsLocationsDeploymentsExportLockCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsExportLockCall {
  2755  	c.ctx_ = ctx
  2756  	return c
  2757  }
  2758  
  2759  // Header returns a http.Header that can be modified by the caller to add
  2760  // headers to the request.
  2761  func (c *ProjectsLocationsDeploymentsExportLockCall) Header() http.Header {
  2762  	if c.header_ == nil {
  2763  		c.header_ = make(http.Header)
  2764  	}
  2765  	return c.header_
  2766  }
  2767  
  2768  func (c *ProjectsLocationsDeploymentsExportLockCall) doRequest(alt string) (*http.Response, error) {
  2769  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2770  	if c.ifNoneMatch_ != "" {
  2771  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2772  	}
  2773  	var body io.Reader = nil
  2774  	c.urlParams_.Set("alt", alt)
  2775  	c.urlParams_.Set("prettyPrint", "false")
  2776  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:exportLock")
  2777  	urls += "?" + c.urlParams_.Encode()
  2778  	req, err := http.NewRequest("GET", urls, body)
  2779  	if err != nil {
  2780  		return nil, err
  2781  	}
  2782  	req.Header = reqHeaders
  2783  	googleapi.Expand(req.URL, map[string]string{
  2784  		"name": c.name,
  2785  	})
  2786  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2787  }
  2788  
  2789  // Do executes the "config.projects.locations.deployments.exportLock" call.
  2790  // Any non-2xx status code is an error. Response headers are in either
  2791  // *LockInfo.ServerResponse.Header or (if a response was returned at all) in
  2792  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2793  // whether the returned error was because http.StatusNotModified was returned.
  2794  func (c *ProjectsLocationsDeploymentsExportLockCall) Do(opts ...googleapi.CallOption) (*LockInfo, error) {
  2795  	gensupport.SetOptions(c.urlParams_, opts...)
  2796  	res, err := c.doRequest("json")
  2797  	if res != nil && res.StatusCode == http.StatusNotModified {
  2798  		if res.Body != nil {
  2799  			res.Body.Close()
  2800  		}
  2801  		return nil, gensupport.WrapError(&googleapi.Error{
  2802  			Code:   res.StatusCode,
  2803  			Header: res.Header,
  2804  		})
  2805  	}
  2806  	if err != nil {
  2807  		return nil, err
  2808  	}
  2809  	defer googleapi.CloseBody(res)
  2810  	if err := googleapi.CheckResponse(res); err != nil {
  2811  		return nil, gensupport.WrapError(err)
  2812  	}
  2813  	ret := &LockInfo{
  2814  		ServerResponse: googleapi.ServerResponse{
  2815  			Header:         res.Header,
  2816  			HTTPStatusCode: res.StatusCode,
  2817  		},
  2818  	}
  2819  	target := &ret
  2820  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2821  		return nil, err
  2822  	}
  2823  	return ret, nil
  2824  }
  2825  
  2826  type ProjectsLocationsDeploymentsExportStateCall struct {
  2827  	s                                *Service
  2828  	parent                           string
  2829  	exportdeploymentstatefilerequest *ExportDeploymentStatefileRequest
  2830  	urlParams_                       gensupport.URLParams
  2831  	ctx_                             context.Context
  2832  	header_                          http.Header
  2833  }
  2834  
  2835  // ExportState: Exports Terraform state file from a given deployment.
  2836  //
  2837  //   - parent: The parent in whose context the statefile is listed. The parent
  2838  //     value is in the format:
  2839  //     'projects/{project_id}/locations/{location}/deployments/{deployment}'.
  2840  func (r *ProjectsLocationsDeploymentsService) ExportState(parent string, exportdeploymentstatefilerequest *ExportDeploymentStatefileRequest) *ProjectsLocationsDeploymentsExportStateCall {
  2841  	c := &ProjectsLocationsDeploymentsExportStateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2842  	c.parent = parent
  2843  	c.exportdeploymentstatefilerequest = exportdeploymentstatefilerequest
  2844  	return c
  2845  }
  2846  
  2847  // Fields allows partial responses to be retrieved. See
  2848  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2849  // details.
  2850  func (c *ProjectsLocationsDeploymentsExportStateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsExportStateCall {
  2851  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2852  	return c
  2853  }
  2854  
  2855  // Context sets the context to be used in this call's Do method.
  2856  func (c *ProjectsLocationsDeploymentsExportStateCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsExportStateCall {
  2857  	c.ctx_ = ctx
  2858  	return c
  2859  }
  2860  
  2861  // Header returns a http.Header that can be modified by the caller to add
  2862  // headers to the request.
  2863  func (c *ProjectsLocationsDeploymentsExportStateCall) Header() http.Header {
  2864  	if c.header_ == nil {
  2865  		c.header_ = make(http.Header)
  2866  	}
  2867  	return c.header_
  2868  }
  2869  
  2870  func (c *ProjectsLocationsDeploymentsExportStateCall) doRequest(alt string) (*http.Response, error) {
  2871  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2872  	var body io.Reader = nil
  2873  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.exportdeploymentstatefilerequest)
  2874  	if err != nil {
  2875  		return nil, err
  2876  	}
  2877  	c.urlParams_.Set("alt", alt)
  2878  	c.urlParams_.Set("prettyPrint", "false")
  2879  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:exportState")
  2880  	urls += "?" + c.urlParams_.Encode()
  2881  	req, err := http.NewRequest("POST", urls, body)
  2882  	if err != nil {
  2883  		return nil, err
  2884  	}
  2885  	req.Header = reqHeaders
  2886  	googleapi.Expand(req.URL, map[string]string{
  2887  		"parent": c.parent,
  2888  	})
  2889  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2890  }
  2891  
  2892  // Do executes the "config.projects.locations.deployments.exportState" call.
  2893  // Any non-2xx status code is an error. Response headers are in either
  2894  // *Statefile.ServerResponse.Header or (if a response was returned at all) in
  2895  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2896  // whether the returned error was because http.StatusNotModified was returned.
  2897  func (c *ProjectsLocationsDeploymentsExportStateCall) Do(opts ...googleapi.CallOption) (*Statefile, error) {
  2898  	gensupport.SetOptions(c.urlParams_, opts...)
  2899  	res, err := c.doRequest("json")
  2900  	if res != nil && res.StatusCode == http.StatusNotModified {
  2901  		if res.Body != nil {
  2902  			res.Body.Close()
  2903  		}
  2904  		return nil, gensupport.WrapError(&googleapi.Error{
  2905  			Code:   res.StatusCode,
  2906  			Header: res.Header,
  2907  		})
  2908  	}
  2909  	if err != nil {
  2910  		return nil, err
  2911  	}
  2912  	defer googleapi.CloseBody(res)
  2913  	if err := googleapi.CheckResponse(res); err != nil {
  2914  		return nil, gensupport.WrapError(err)
  2915  	}
  2916  	ret := &Statefile{
  2917  		ServerResponse: googleapi.ServerResponse{
  2918  			Header:         res.Header,
  2919  			HTTPStatusCode: res.StatusCode,
  2920  		},
  2921  	}
  2922  	target := &ret
  2923  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2924  		return nil, err
  2925  	}
  2926  	return ret, nil
  2927  }
  2928  
  2929  type ProjectsLocationsDeploymentsGetCall struct {
  2930  	s            *Service
  2931  	name         string
  2932  	urlParams_   gensupport.URLParams
  2933  	ifNoneMatch_ string
  2934  	ctx_         context.Context
  2935  	header_      http.Header
  2936  }
  2937  
  2938  // Get: Gets details about a Deployment.
  2939  //
  2940  //   - name: The name of the deployment. Format:
  2941  //     'projects/{project_id}/locations/{location}/deployments/{deployment}'.
  2942  func (r *ProjectsLocationsDeploymentsService) Get(name string) *ProjectsLocationsDeploymentsGetCall {
  2943  	c := &ProjectsLocationsDeploymentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2944  	c.name = name
  2945  	return c
  2946  }
  2947  
  2948  // Fields allows partial responses to be retrieved. See
  2949  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2950  // details.
  2951  func (c *ProjectsLocationsDeploymentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsGetCall {
  2952  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2953  	return c
  2954  }
  2955  
  2956  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2957  // object's ETag matches the given value. This is useful for getting updates
  2958  // only after the object has changed since the last request.
  2959  func (c *ProjectsLocationsDeploymentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeploymentsGetCall {
  2960  	c.ifNoneMatch_ = entityTag
  2961  	return c
  2962  }
  2963  
  2964  // Context sets the context to be used in this call's Do method.
  2965  func (c *ProjectsLocationsDeploymentsGetCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsGetCall {
  2966  	c.ctx_ = ctx
  2967  	return c
  2968  }
  2969  
  2970  // Header returns a http.Header that can be modified by the caller to add
  2971  // headers to the request.
  2972  func (c *ProjectsLocationsDeploymentsGetCall) Header() http.Header {
  2973  	if c.header_ == nil {
  2974  		c.header_ = make(http.Header)
  2975  	}
  2976  	return c.header_
  2977  }
  2978  
  2979  func (c *ProjectsLocationsDeploymentsGetCall) doRequest(alt string) (*http.Response, error) {
  2980  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2981  	if c.ifNoneMatch_ != "" {
  2982  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2983  	}
  2984  	var body io.Reader = nil
  2985  	c.urlParams_.Set("alt", alt)
  2986  	c.urlParams_.Set("prettyPrint", "false")
  2987  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  2988  	urls += "?" + c.urlParams_.Encode()
  2989  	req, err := http.NewRequest("GET", urls, body)
  2990  	if err != nil {
  2991  		return nil, err
  2992  	}
  2993  	req.Header = reqHeaders
  2994  	googleapi.Expand(req.URL, map[string]string{
  2995  		"name": c.name,
  2996  	})
  2997  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2998  }
  2999  
  3000  // Do executes the "config.projects.locations.deployments.get" call.
  3001  // Any non-2xx status code is an error. Response headers are in either
  3002  // *Deployment.ServerResponse.Header or (if a response was returned at all) in
  3003  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3004  // whether the returned error was because http.StatusNotModified was returned.
  3005  func (c *ProjectsLocationsDeploymentsGetCall) Do(opts ...googleapi.CallOption) (*Deployment, error) {
  3006  	gensupport.SetOptions(c.urlParams_, opts...)
  3007  	res, err := c.doRequest("json")
  3008  	if res != nil && res.StatusCode == http.StatusNotModified {
  3009  		if res.Body != nil {
  3010  			res.Body.Close()
  3011  		}
  3012  		return nil, gensupport.WrapError(&googleapi.Error{
  3013  			Code:   res.StatusCode,
  3014  			Header: res.Header,
  3015  		})
  3016  	}
  3017  	if err != nil {
  3018  		return nil, err
  3019  	}
  3020  	defer googleapi.CloseBody(res)
  3021  	if err := googleapi.CheckResponse(res); err != nil {
  3022  		return nil, gensupport.WrapError(err)
  3023  	}
  3024  	ret := &Deployment{
  3025  		ServerResponse: googleapi.ServerResponse{
  3026  			Header:         res.Header,
  3027  			HTTPStatusCode: res.StatusCode,
  3028  		},
  3029  	}
  3030  	target := &ret
  3031  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3032  		return nil, err
  3033  	}
  3034  	return ret, nil
  3035  }
  3036  
  3037  type ProjectsLocationsDeploymentsGetIamPolicyCall struct {
  3038  	s            *Service
  3039  	resource     string
  3040  	urlParams_   gensupport.URLParams
  3041  	ifNoneMatch_ string
  3042  	ctx_         context.Context
  3043  	header_      http.Header
  3044  }
  3045  
  3046  // GetIamPolicy: Gets the access control policy for a resource. Returns an
  3047  // empty policy if the resource exists and does not have a policy set.
  3048  //
  3049  //   - resource: REQUIRED: The resource for which the policy is being requested.
  3050  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  3051  //     for the appropriate value for this field.
  3052  func (r *ProjectsLocationsDeploymentsService) GetIamPolicy(resource string) *ProjectsLocationsDeploymentsGetIamPolicyCall {
  3053  	c := &ProjectsLocationsDeploymentsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3054  	c.resource = resource
  3055  	return c
  3056  }
  3057  
  3058  // OptionsRequestedPolicyVersion sets the optional parameter
  3059  // "options.requestedPolicyVersion": The maximum policy version that will be
  3060  // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
  3061  // an invalid value will be rejected. Requests for policies with any
  3062  // conditional role bindings must specify version 3. Policies with no
  3063  // conditional role bindings may specify any valid value or leave the field
  3064  // unset. The policy in the response might use the policy version that you
  3065  // specified, or it might use a lower policy version. For example, if you
  3066  // specify version 3, but the policy has no conditional role bindings, the
  3067  // response uses version 1. To learn which resources support conditions in
  3068  // their IAM policies, see the IAM documentation
  3069  // (https://cloud.google.com/iam/help/conditions/resource-policies).
  3070  func (c *ProjectsLocationsDeploymentsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsDeploymentsGetIamPolicyCall {
  3071  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
  3072  	return c
  3073  }
  3074  
  3075  // Fields allows partial responses to be retrieved. See
  3076  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3077  // details.
  3078  func (c *ProjectsLocationsDeploymentsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsGetIamPolicyCall {
  3079  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3080  	return c
  3081  }
  3082  
  3083  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3084  // object's ETag matches the given value. This is useful for getting updates
  3085  // only after the object has changed since the last request.
  3086  func (c *ProjectsLocationsDeploymentsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeploymentsGetIamPolicyCall {
  3087  	c.ifNoneMatch_ = entityTag
  3088  	return c
  3089  }
  3090  
  3091  // Context sets the context to be used in this call's Do method.
  3092  func (c *ProjectsLocationsDeploymentsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsGetIamPolicyCall {
  3093  	c.ctx_ = ctx
  3094  	return c
  3095  }
  3096  
  3097  // Header returns a http.Header that can be modified by the caller to add
  3098  // headers to the request.
  3099  func (c *ProjectsLocationsDeploymentsGetIamPolicyCall) Header() http.Header {
  3100  	if c.header_ == nil {
  3101  		c.header_ = make(http.Header)
  3102  	}
  3103  	return c.header_
  3104  }
  3105  
  3106  func (c *ProjectsLocationsDeploymentsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  3107  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3108  	if c.ifNoneMatch_ != "" {
  3109  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3110  	}
  3111  	var body io.Reader = nil
  3112  	c.urlParams_.Set("alt", alt)
  3113  	c.urlParams_.Set("prettyPrint", "false")
  3114  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
  3115  	urls += "?" + c.urlParams_.Encode()
  3116  	req, err := http.NewRequest("GET", urls, body)
  3117  	if err != nil {
  3118  		return nil, err
  3119  	}
  3120  	req.Header = reqHeaders
  3121  	googleapi.Expand(req.URL, map[string]string{
  3122  		"resource": c.resource,
  3123  	})
  3124  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3125  }
  3126  
  3127  // Do executes the "config.projects.locations.deployments.getIamPolicy" call.
  3128  // Any non-2xx status code is an error. Response headers are in either
  3129  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  3130  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3131  // whether the returned error was because http.StatusNotModified was returned.
  3132  func (c *ProjectsLocationsDeploymentsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  3133  	gensupport.SetOptions(c.urlParams_, opts...)
  3134  	res, err := c.doRequest("json")
  3135  	if res != nil && res.StatusCode == http.StatusNotModified {
  3136  		if res.Body != nil {
  3137  			res.Body.Close()
  3138  		}
  3139  		return nil, gensupport.WrapError(&googleapi.Error{
  3140  			Code:   res.StatusCode,
  3141  			Header: res.Header,
  3142  		})
  3143  	}
  3144  	if err != nil {
  3145  		return nil, err
  3146  	}
  3147  	defer googleapi.CloseBody(res)
  3148  	if err := googleapi.CheckResponse(res); err != nil {
  3149  		return nil, gensupport.WrapError(err)
  3150  	}
  3151  	ret := &Policy{
  3152  		ServerResponse: googleapi.ServerResponse{
  3153  			Header:         res.Header,
  3154  			HTTPStatusCode: res.StatusCode,
  3155  		},
  3156  	}
  3157  	target := &ret
  3158  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3159  		return nil, err
  3160  	}
  3161  	return ret, nil
  3162  }
  3163  
  3164  type ProjectsLocationsDeploymentsImportStateCall struct {
  3165  	s                      *Service
  3166  	parent                 string
  3167  	importstatefilerequest *ImportStatefileRequest
  3168  	urlParams_             gensupport.URLParams
  3169  	ctx_                   context.Context
  3170  	header_                http.Header
  3171  }
  3172  
  3173  // ImportState: Imports Terraform state file in a given deployment. The state
  3174  // file does not take effect until the Deployment has been unlocked.
  3175  //
  3176  //   - parent: The parent in whose context the statefile is listed. The parent
  3177  //     value is in the format:
  3178  //     'projects/{project_id}/locations/{location}/deployments/{deployment}'.
  3179  func (r *ProjectsLocationsDeploymentsService) ImportState(parent string, importstatefilerequest *ImportStatefileRequest) *ProjectsLocationsDeploymentsImportStateCall {
  3180  	c := &ProjectsLocationsDeploymentsImportStateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3181  	c.parent = parent
  3182  	c.importstatefilerequest = importstatefilerequest
  3183  	return c
  3184  }
  3185  
  3186  // Fields allows partial responses to be retrieved. See
  3187  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3188  // details.
  3189  func (c *ProjectsLocationsDeploymentsImportStateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsImportStateCall {
  3190  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3191  	return c
  3192  }
  3193  
  3194  // Context sets the context to be used in this call's Do method.
  3195  func (c *ProjectsLocationsDeploymentsImportStateCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsImportStateCall {
  3196  	c.ctx_ = ctx
  3197  	return c
  3198  }
  3199  
  3200  // Header returns a http.Header that can be modified by the caller to add
  3201  // headers to the request.
  3202  func (c *ProjectsLocationsDeploymentsImportStateCall) Header() http.Header {
  3203  	if c.header_ == nil {
  3204  		c.header_ = make(http.Header)
  3205  	}
  3206  	return c.header_
  3207  }
  3208  
  3209  func (c *ProjectsLocationsDeploymentsImportStateCall) doRequest(alt string) (*http.Response, error) {
  3210  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3211  	var body io.Reader = nil
  3212  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.importstatefilerequest)
  3213  	if err != nil {
  3214  		return nil, err
  3215  	}
  3216  	c.urlParams_.Set("alt", alt)
  3217  	c.urlParams_.Set("prettyPrint", "false")
  3218  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:importState")
  3219  	urls += "?" + c.urlParams_.Encode()
  3220  	req, err := http.NewRequest("POST", urls, body)
  3221  	if err != nil {
  3222  		return nil, err
  3223  	}
  3224  	req.Header = reqHeaders
  3225  	googleapi.Expand(req.URL, map[string]string{
  3226  		"parent": c.parent,
  3227  	})
  3228  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3229  }
  3230  
  3231  // Do executes the "config.projects.locations.deployments.importState" call.
  3232  // Any non-2xx status code is an error. Response headers are in either
  3233  // *Statefile.ServerResponse.Header or (if a response was returned at all) in
  3234  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3235  // whether the returned error was because http.StatusNotModified was returned.
  3236  func (c *ProjectsLocationsDeploymentsImportStateCall) Do(opts ...googleapi.CallOption) (*Statefile, error) {
  3237  	gensupport.SetOptions(c.urlParams_, opts...)
  3238  	res, err := c.doRequest("json")
  3239  	if res != nil && res.StatusCode == http.StatusNotModified {
  3240  		if res.Body != nil {
  3241  			res.Body.Close()
  3242  		}
  3243  		return nil, gensupport.WrapError(&googleapi.Error{
  3244  			Code:   res.StatusCode,
  3245  			Header: res.Header,
  3246  		})
  3247  	}
  3248  	if err != nil {
  3249  		return nil, err
  3250  	}
  3251  	defer googleapi.CloseBody(res)
  3252  	if err := googleapi.CheckResponse(res); err != nil {
  3253  		return nil, gensupport.WrapError(err)
  3254  	}
  3255  	ret := &Statefile{
  3256  		ServerResponse: googleapi.ServerResponse{
  3257  			Header:         res.Header,
  3258  			HTTPStatusCode: res.StatusCode,
  3259  		},
  3260  	}
  3261  	target := &ret
  3262  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3263  		return nil, err
  3264  	}
  3265  	return ret, nil
  3266  }
  3267  
  3268  type ProjectsLocationsDeploymentsListCall struct {
  3269  	s            *Service
  3270  	parent       string
  3271  	urlParams_   gensupport.URLParams
  3272  	ifNoneMatch_ string
  3273  	ctx_         context.Context
  3274  	header_      http.Header
  3275  }
  3276  
  3277  // List: Lists Deployments in a given project and location.
  3278  //
  3279  //   - parent: The parent in whose context the Deployments are listed. The parent
  3280  //     value is in the format: 'projects/{project_id}/locations/{location}'.
  3281  func (r *ProjectsLocationsDeploymentsService) List(parent string) *ProjectsLocationsDeploymentsListCall {
  3282  	c := &ProjectsLocationsDeploymentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3283  	c.parent = parent
  3284  	return c
  3285  }
  3286  
  3287  // Filter sets the optional parameter "filter": Lists the Deployments that
  3288  // match the filter expression. A filter expression filters the resources
  3289  // listed in the response. The expression must be of the form '{field}
  3290  // {operator} {value}' where operators: '<', '>', '<=', '>=', '!=', '=', ':'
  3291  // are supported (colon ':' represents a HAS operator which is roughly
  3292  // synonymous with equality). {field} can refer to a proto or JSON field, or a
  3293  // synthetic field. Field names can be camelCase or snake_case. Examples: -
  3294  // Filter by name: name = "projects/foo/locations/us-central1/deployments/bar -
  3295  // Filter by labels: - Resources that have a key called 'foo' labels.foo:* -
  3296  // Resources that have a key called 'foo' whose value is 'bar' labels.foo = bar
  3297  // - Filter by state: - Deployments in CREATING state. state=CREATING
  3298  func (c *ProjectsLocationsDeploymentsListCall) Filter(filter string) *ProjectsLocationsDeploymentsListCall {
  3299  	c.urlParams_.Set("filter", filter)
  3300  	return c
  3301  }
  3302  
  3303  // OrderBy sets the optional parameter "orderBy": Field to use to sort the
  3304  // list.
  3305  func (c *ProjectsLocationsDeploymentsListCall) OrderBy(orderBy string) *ProjectsLocationsDeploymentsListCall {
  3306  	c.urlParams_.Set("orderBy", orderBy)
  3307  	return c
  3308  }
  3309  
  3310  // PageSize sets the optional parameter "pageSize": When requesting a page of
  3311  // resources, 'page_size' specifies number of resources to return. If
  3312  // unspecified, at most 500 will be returned. The maximum value is 1000.
  3313  func (c *ProjectsLocationsDeploymentsListCall) PageSize(pageSize int64) *ProjectsLocationsDeploymentsListCall {
  3314  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3315  	return c
  3316  }
  3317  
  3318  // PageToken sets the optional parameter "pageToken": Token returned by
  3319  // previous call to 'ListDeployments' which specifies the position in the list
  3320  // from where to continue listing the resources.
  3321  func (c *ProjectsLocationsDeploymentsListCall) PageToken(pageToken string) *ProjectsLocationsDeploymentsListCall {
  3322  	c.urlParams_.Set("pageToken", pageToken)
  3323  	return c
  3324  }
  3325  
  3326  // Fields allows partial responses to be retrieved. See
  3327  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3328  // details.
  3329  func (c *ProjectsLocationsDeploymentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsListCall {
  3330  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3331  	return c
  3332  }
  3333  
  3334  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3335  // object's ETag matches the given value. This is useful for getting updates
  3336  // only after the object has changed since the last request.
  3337  func (c *ProjectsLocationsDeploymentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeploymentsListCall {
  3338  	c.ifNoneMatch_ = entityTag
  3339  	return c
  3340  }
  3341  
  3342  // Context sets the context to be used in this call's Do method.
  3343  func (c *ProjectsLocationsDeploymentsListCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsListCall {
  3344  	c.ctx_ = ctx
  3345  	return c
  3346  }
  3347  
  3348  // Header returns a http.Header that can be modified by the caller to add
  3349  // headers to the request.
  3350  func (c *ProjectsLocationsDeploymentsListCall) Header() http.Header {
  3351  	if c.header_ == nil {
  3352  		c.header_ = make(http.Header)
  3353  	}
  3354  	return c.header_
  3355  }
  3356  
  3357  func (c *ProjectsLocationsDeploymentsListCall) doRequest(alt string) (*http.Response, error) {
  3358  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3359  	if c.ifNoneMatch_ != "" {
  3360  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3361  	}
  3362  	var body io.Reader = nil
  3363  	c.urlParams_.Set("alt", alt)
  3364  	c.urlParams_.Set("prettyPrint", "false")
  3365  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/deployments")
  3366  	urls += "?" + c.urlParams_.Encode()
  3367  	req, err := http.NewRequest("GET", urls, body)
  3368  	if err != nil {
  3369  		return nil, err
  3370  	}
  3371  	req.Header = reqHeaders
  3372  	googleapi.Expand(req.URL, map[string]string{
  3373  		"parent": c.parent,
  3374  	})
  3375  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3376  }
  3377  
  3378  // Do executes the "config.projects.locations.deployments.list" call.
  3379  // Any non-2xx status code is an error. Response headers are in either
  3380  // *ListDeploymentsResponse.ServerResponse.Header or (if a response was
  3381  // returned at all) in error.(*googleapi.Error).Header. Use
  3382  // googleapi.IsNotModified to check whether the returned error was because
  3383  // http.StatusNotModified was returned.
  3384  func (c *ProjectsLocationsDeploymentsListCall) Do(opts ...googleapi.CallOption) (*ListDeploymentsResponse, error) {
  3385  	gensupport.SetOptions(c.urlParams_, opts...)
  3386  	res, err := c.doRequest("json")
  3387  	if res != nil && res.StatusCode == http.StatusNotModified {
  3388  		if res.Body != nil {
  3389  			res.Body.Close()
  3390  		}
  3391  		return nil, gensupport.WrapError(&googleapi.Error{
  3392  			Code:   res.StatusCode,
  3393  			Header: res.Header,
  3394  		})
  3395  	}
  3396  	if err != nil {
  3397  		return nil, err
  3398  	}
  3399  	defer googleapi.CloseBody(res)
  3400  	if err := googleapi.CheckResponse(res); err != nil {
  3401  		return nil, gensupport.WrapError(err)
  3402  	}
  3403  	ret := &ListDeploymentsResponse{
  3404  		ServerResponse: googleapi.ServerResponse{
  3405  			Header:         res.Header,
  3406  			HTTPStatusCode: res.StatusCode,
  3407  		},
  3408  	}
  3409  	target := &ret
  3410  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3411  		return nil, err
  3412  	}
  3413  	return ret, nil
  3414  }
  3415  
  3416  // Pages invokes f for each page of results.
  3417  // A non-nil error returned from f will halt the iteration.
  3418  // The provided context supersedes any context provided to the Context method.
  3419  func (c *ProjectsLocationsDeploymentsListCall) Pages(ctx context.Context, f func(*ListDeploymentsResponse) error) error {
  3420  	c.ctx_ = ctx
  3421  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3422  	for {
  3423  		x, err := c.Do()
  3424  		if err != nil {
  3425  			return err
  3426  		}
  3427  		if err := f(x); err != nil {
  3428  			return err
  3429  		}
  3430  		if x.NextPageToken == "" {
  3431  			return nil
  3432  		}
  3433  		c.PageToken(x.NextPageToken)
  3434  	}
  3435  }
  3436  
  3437  type ProjectsLocationsDeploymentsLockCall struct {
  3438  	s                     *Service
  3439  	name                  string
  3440  	lockdeploymentrequest *LockDeploymentRequest
  3441  	urlParams_            gensupport.URLParams
  3442  	ctx_                  context.Context
  3443  	header_               http.Header
  3444  }
  3445  
  3446  // Lock: Locks a deployment.
  3447  //
  3448  //   - name: The name of the deployment in the format:
  3449  //     'projects/{project_id}/locations/{location}/deployments/{deployment}'.
  3450  func (r *ProjectsLocationsDeploymentsService) Lock(name string, lockdeploymentrequest *LockDeploymentRequest) *ProjectsLocationsDeploymentsLockCall {
  3451  	c := &ProjectsLocationsDeploymentsLockCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3452  	c.name = name
  3453  	c.lockdeploymentrequest = lockdeploymentrequest
  3454  	return c
  3455  }
  3456  
  3457  // Fields allows partial responses to be retrieved. See
  3458  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3459  // details.
  3460  func (c *ProjectsLocationsDeploymentsLockCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsLockCall {
  3461  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3462  	return c
  3463  }
  3464  
  3465  // Context sets the context to be used in this call's Do method.
  3466  func (c *ProjectsLocationsDeploymentsLockCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsLockCall {
  3467  	c.ctx_ = ctx
  3468  	return c
  3469  }
  3470  
  3471  // Header returns a http.Header that can be modified by the caller to add
  3472  // headers to the request.
  3473  func (c *ProjectsLocationsDeploymentsLockCall) Header() http.Header {
  3474  	if c.header_ == nil {
  3475  		c.header_ = make(http.Header)
  3476  	}
  3477  	return c.header_
  3478  }
  3479  
  3480  func (c *ProjectsLocationsDeploymentsLockCall) doRequest(alt string) (*http.Response, error) {
  3481  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3482  	var body io.Reader = nil
  3483  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.lockdeploymentrequest)
  3484  	if err != nil {
  3485  		return nil, err
  3486  	}
  3487  	c.urlParams_.Set("alt", alt)
  3488  	c.urlParams_.Set("prettyPrint", "false")
  3489  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:lock")
  3490  	urls += "?" + c.urlParams_.Encode()
  3491  	req, err := http.NewRequest("POST", urls, body)
  3492  	if err != nil {
  3493  		return nil, err
  3494  	}
  3495  	req.Header = reqHeaders
  3496  	googleapi.Expand(req.URL, map[string]string{
  3497  		"name": c.name,
  3498  	})
  3499  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3500  }
  3501  
  3502  // Do executes the "config.projects.locations.deployments.lock" call.
  3503  // Any non-2xx status code is an error. Response headers are in either
  3504  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3505  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3506  // whether the returned error was because http.StatusNotModified was returned.
  3507  func (c *ProjectsLocationsDeploymentsLockCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3508  	gensupport.SetOptions(c.urlParams_, opts...)
  3509  	res, err := c.doRequest("json")
  3510  	if res != nil && res.StatusCode == http.StatusNotModified {
  3511  		if res.Body != nil {
  3512  			res.Body.Close()
  3513  		}
  3514  		return nil, gensupport.WrapError(&googleapi.Error{
  3515  			Code:   res.StatusCode,
  3516  			Header: res.Header,
  3517  		})
  3518  	}
  3519  	if err != nil {
  3520  		return nil, err
  3521  	}
  3522  	defer googleapi.CloseBody(res)
  3523  	if err := googleapi.CheckResponse(res); err != nil {
  3524  		return nil, gensupport.WrapError(err)
  3525  	}
  3526  	ret := &Operation{
  3527  		ServerResponse: googleapi.ServerResponse{
  3528  			Header:         res.Header,
  3529  			HTTPStatusCode: res.StatusCode,
  3530  		},
  3531  	}
  3532  	target := &ret
  3533  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3534  		return nil, err
  3535  	}
  3536  	return ret, nil
  3537  }
  3538  
  3539  type ProjectsLocationsDeploymentsPatchCall struct {
  3540  	s          *Service
  3541  	name       string
  3542  	deployment *Deployment
  3543  	urlParams_ gensupport.URLParams
  3544  	ctx_       context.Context
  3545  	header_    http.Header
  3546  }
  3547  
  3548  // Patch: Updates a Deployment.
  3549  //
  3550  //   - name: Resource name of the deployment. Format:
  3551  //     `projects/{project}/locations/{location}/deployments/{deployment}`.
  3552  func (r *ProjectsLocationsDeploymentsService) Patch(name string, deployment *Deployment) *ProjectsLocationsDeploymentsPatchCall {
  3553  	c := &ProjectsLocationsDeploymentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3554  	c.name = name
  3555  	c.deployment = deployment
  3556  	return c
  3557  }
  3558  
  3559  // RequestId sets the optional parameter "requestId": An optional request ID to
  3560  // identify requests. Specify a unique request ID so that if you must retry
  3561  // your request, the server will know to ignore the request if it has already
  3562  // been completed. The server will guarantee that for at least 60 minutes since
  3563  // the first request. For example, consider a situation where you make an
  3564  // initial request and the request times out. If you make the request again
  3565  // with the same request ID, the server can check if original operation with
  3566  // the same request ID was received, and if so, will ignore the second request.
  3567  // This prevents clients from accidentally creating duplicate commitments. The
  3568  // request ID must be a valid UUID with the exception that zero UUID is not
  3569  // supported (00000000-0000-0000-0000-000000000000).
  3570  func (c *ProjectsLocationsDeploymentsPatchCall) RequestId(requestId string) *ProjectsLocationsDeploymentsPatchCall {
  3571  	c.urlParams_.Set("requestId", requestId)
  3572  	return c
  3573  }
  3574  
  3575  // UpdateMask sets the optional parameter "updateMask": Field mask used to
  3576  // specify the fields to be overwritten in the Deployment resource by the
  3577  // update. The fields specified in the update_mask are relative to the
  3578  // resource, not the full request. A field will be overwritten if it is in the
  3579  // mask. If the user does not provide a mask then all fields will be
  3580  // overwritten.
  3581  func (c *ProjectsLocationsDeploymentsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDeploymentsPatchCall {
  3582  	c.urlParams_.Set("updateMask", updateMask)
  3583  	return c
  3584  }
  3585  
  3586  // Fields allows partial responses to be retrieved. See
  3587  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3588  // details.
  3589  func (c *ProjectsLocationsDeploymentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsPatchCall {
  3590  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3591  	return c
  3592  }
  3593  
  3594  // Context sets the context to be used in this call's Do method.
  3595  func (c *ProjectsLocationsDeploymentsPatchCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsPatchCall {
  3596  	c.ctx_ = ctx
  3597  	return c
  3598  }
  3599  
  3600  // Header returns a http.Header that can be modified by the caller to add
  3601  // headers to the request.
  3602  func (c *ProjectsLocationsDeploymentsPatchCall) Header() http.Header {
  3603  	if c.header_ == nil {
  3604  		c.header_ = make(http.Header)
  3605  	}
  3606  	return c.header_
  3607  }
  3608  
  3609  func (c *ProjectsLocationsDeploymentsPatchCall) doRequest(alt string) (*http.Response, error) {
  3610  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3611  	var body io.Reader = nil
  3612  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.deployment)
  3613  	if err != nil {
  3614  		return nil, err
  3615  	}
  3616  	c.urlParams_.Set("alt", alt)
  3617  	c.urlParams_.Set("prettyPrint", "false")
  3618  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3619  	urls += "?" + c.urlParams_.Encode()
  3620  	req, err := http.NewRequest("PATCH", urls, body)
  3621  	if err != nil {
  3622  		return nil, err
  3623  	}
  3624  	req.Header = reqHeaders
  3625  	googleapi.Expand(req.URL, map[string]string{
  3626  		"name": c.name,
  3627  	})
  3628  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3629  }
  3630  
  3631  // Do executes the "config.projects.locations.deployments.patch" call.
  3632  // Any non-2xx status code is an error. Response headers are in either
  3633  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3634  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3635  // whether the returned error was because http.StatusNotModified was returned.
  3636  func (c *ProjectsLocationsDeploymentsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3637  	gensupport.SetOptions(c.urlParams_, opts...)
  3638  	res, err := c.doRequest("json")
  3639  	if res != nil && res.StatusCode == http.StatusNotModified {
  3640  		if res.Body != nil {
  3641  			res.Body.Close()
  3642  		}
  3643  		return nil, gensupport.WrapError(&googleapi.Error{
  3644  			Code:   res.StatusCode,
  3645  			Header: res.Header,
  3646  		})
  3647  	}
  3648  	if err != nil {
  3649  		return nil, err
  3650  	}
  3651  	defer googleapi.CloseBody(res)
  3652  	if err := googleapi.CheckResponse(res); err != nil {
  3653  		return nil, gensupport.WrapError(err)
  3654  	}
  3655  	ret := &Operation{
  3656  		ServerResponse: googleapi.ServerResponse{
  3657  			Header:         res.Header,
  3658  			HTTPStatusCode: res.StatusCode,
  3659  		},
  3660  	}
  3661  	target := &ret
  3662  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3663  		return nil, err
  3664  	}
  3665  	return ret, nil
  3666  }
  3667  
  3668  type ProjectsLocationsDeploymentsSetIamPolicyCall struct {
  3669  	s                   *Service
  3670  	resource            string
  3671  	setiampolicyrequest *SetIamPolicyRequest
  3672  	urlParams_          gensupport.URLParams
  3673  	ctx_                context.Context
  3674  	header_             http.Header
  3675  }
  3676  
  3677  // SetIamPolicy: Sets the access control policy on the specified resource.
  3678  // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
  3679  // and `PERMISSION_DENIED` errors.
  3680  //
  3681  //   - resource: REQUIRED: The resource for which the policy is being specified.
  3682  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  3683  //     for the appropriate value for this field.
  3684  func (r *ProjectsLocationsDeploymentsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDeploymentsSetIamPolicyCall {
  3685  	c := &ProjectsLocationsDeploymentsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3686  	c.resource = resource
  3687  	c.setiampolicyrequest = setiampolicyrequest
  3688  	return c
  3689  }
  3690  
  3691  // Fields allows partial responses to be retrieved. See
  3692  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3693  // details.
  3694  func (c *ProjectsLocationsDeploymentsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsSetIamPolicyCall {
  3695  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3696  	return c
  3697  }
  3698  
  3699  // Context sets the context to be used in this call's Do method.
  3700  func (c *ProjectsLocationsDeploymentsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsSetIamPolicyCall {
  3701  	c.ctx_ = ctx
  3702  	return c
  3703  }
  3704  
  3705  // Header returns a http.Header that can be modified by the caller to add
  3706  // headers to the request.
  3707  func (c *ProjectsLocationsDeploymentsSetIamPolicyCall) Header() http.Header {
  3708  	if c.header_ == nil {
  3709  		c.header_ = make(http.Header)
  3710  	}
  3711  	return c.header_
  3712  }
  3713  
  3714  func (c *ProjectsLocationsDeploymentsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  3715  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3716  	var body io.Reader = nil
  3717  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  3718  	if err != nil {
  3719  		return nil, err
  3720  	}
  3721  	c.urlParams_.Set("alt", alt)
  3722  	c.urlParams_.Set("prettyPrint", "false")
  3723  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
  3724  	urls += "?" + c.urlParams_.Encode()
  3725  	req, err := http.NewRequest("POST", urls, body)
  3726  	if err != nil {
  3727  		return nil, err
  3728  	}
  3729  	req.Header = reqHeaders
  3730  	googleapi.Expand(req.URL, map[string]string{
  3731  		"resource": c.resource,
  3732  	})
  3733  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3734  }
  3735  
  3736  // Do executes the "config.projects.locations.deployments.setIamPolicy" call.
  3737  // Any non-2xx status code is an error. Response headers are in either
  3738  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  3739  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3740  // whether the returned error was because http.StatusNotModified was returned.
  3741  func (c *ProjectsLocationsDeploymentsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  3742  	gensupport.SetOptions(c.urlParams_, opts...)
  3743  	res, err := c.doRequest("json")
  3744  	if res != nil && res.StatusCode == http.StatusNotModified {
  3745  		if res.Body != nil {
  3746  			res.Body.Close()
  3747  		}
  3748  		return nil, gensupport.WrapError(&googleapi.Error{
  3749  			Code:   res.StatusCode,
  3750  			Header: res.Header,
  3751  		})
  3752  	}
  3753  	if err != nil {
  3754  		return nil, err
  3755  	}
  3756  	defer googleapi.CloseBody(res)
  3757  	if err := googleapi.CheckResponse(res); err != nil {
  3758  		return nil, gensupport.WrapError(err)
  3759  	}
  3760  	ret := &Policy{
  3761  		ServerResponse: googleapi.ServerResponse{
  3762  			Header:         res.Header,
  3763  			HTTPStatusCode: res.StatusCode,
  3764  		},
  3765  	}
  3766  	target := &ret
  3767  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3768  		return nil, err
  3769  	}
  3770  	return ret, nil
  3771  }
  3772  
  3773  type ProjectsLocationsDeploymentsTestIamPermissionsCall struct {
  3774  	s                         *Service
  3775  	resource                  string
  3776  	testiampermissionsrequest *TestIamPermissionsRequest
  3777  	urlParams_                gensupport.URLParams
  3778  	ctx_                      context.Context
  3779  	header_                   http.Header
  3780  }
  3781  
  3782  // TestIamPermissions: Returns permissions that a caller has on the specified
  3783  // resource. If the resource does not exist, this will return an empty set of
  3784  // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
  3785  // used for building permission-aware UIs and command-line tools, not for
  3786  // authorization checking. This operation may "fail open" without warning.
  3787  //
  3788  //   - resource: REQUIRED: The resource for which the policy detail is being
  3789  //     requested. See Resource names
  3790  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
  3791  //     value for this field.
  3792  func (r *ProjectsLocationsDeploymentsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsDeploymentsTestIamPermissionsCall {
  3793  	c := &ProjectsLocationsDeploymentsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3794  	c.resource = resource
  3795  	c.testiampermissionsrequest = testiampermissionsrequest
  3796  	return c
  3797  }
  3798  
  3799  // Fields allows partial responses to be retrieved. See
  3800  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3801  // details.
  3802  func (c *ProjectsLocationsDeploymentsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsTestIamPermissionsCall {
  3803  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3804  	return c
  3805  }
  3806  
  3807  // Context sets the context to be used in this call's Do method.
  3808  func (c *ProjectsLocationsDeploymentsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsTestIamPermissionsCall {
  3809  	c.ctx_ = ctx
  3810  	return c
  3811  }
  3812  
  3813  // Header returns a http.Header that can be modified by the caller to add
  3814  // headers to the request.
  3815  func (c *ProjectsLocationsDeploymentsTestIamPermissionsCall) Header() http.Header {
  3816  	if c.header_ == nil {
  3817  		c.header_ = make(http.Header)
  3818  	}
  3819  	return c.header_
  3820  }
  3821  
  3822  func (c *ProjectsLocationsDeploymentsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  3823  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3824  	var body io.Reader = nil
  3825  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  3826  	if err != nil {
  3827  		return nil, err
  3828  	}
  3829  	c.urlParams_.Set("alt", alt)
  3830  	c.urlParams_.Set("prettyPrint", "false")
  3831  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
  3832  	urls += "?" + c.urlParams_.Encode()
  3833  	req, err := http.NewRequest("POST", urls, body)
  3834  	if err != nil {
  3835  		return nil, err
  3836  	}
  3837  	req.Header = reqHeaders
  3838  	googleapi.Expand(req.URL, map[string]string{
  3839  		"resource": c.resource,
  3840  	})
  3841  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3842  }
  3843  
  3844  // Do executes the "config.projects.locations.deployments.testIamPermissions" call.
  3845  // Any non-2xx status code is an error. Response headers are in either
  3846  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
  3847  // returned at all) in error.(*googleapi.Error).Header. Use
  3848  // googleapi.IsNotModified to check whether the returned error was because
  3849  // http.StatusNotModified was returned.
  3850  func (c *ProjectsLocationsDeploymentsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  3851  	gensupport.SetOptions(c.urlParams_, opts...)
  3852  	res, err := c.doRequest("json")
  3853  	if res != nil && res.StatusCode == http.StatusNotModified {
  3854  		if res.Body != nil {
  3855  			res.Body.Close()
  3856  		}
  3857  		return nil, gensupport.WrapError(&googleapi.Error{
  3858  			Code:   res.StatusCode,
  3859  			Header: res.Header,
  3860  		})
  3861  	}
  3862  	if err != nil {
  3863  		return nil, err
  3864  	}
  3865  	defer googleapi.CloseBody(res)
  3866  	if err := googleapi.CheckResponse(res); err != nil {
  3867  		return nil, gensupport.WrapError(err)
  3868  	}
  3869  	ret := &TestIamPermissionsResponse{
  3870  		ServerResponse: googleapi.ServerResponse{
  3871  			Header:         res.Header,
  3872  			HTTPStatusCode: res.StatusCode,
  3873  		},
  3874  	}
  3875  	target := &ret
  3876  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3877  		return nil, err
  3878  	}
  3879  	return ret, nil
  3880  }
  3881  
  3882  type ProjectsLocationsDeploymentsUnlockCall struct {
  3883  	s                       *Service
  3884  	name                    string
  3885  	unlockdeploymentrequest *UnlockDeploymentRequest
  3886  	urlParams_              gensupport.URLParams
  3887  	ctx_                    context.Context
  3888  	header_                 http.Header
  3889  }
  3890  
  3891  // Unlock: Unlocks a locked deployment.
  3892  //
  3893  //   - name: The name of the deployment in the format:
  3894  //     'projects/{project_id}/locations/{location}/deployments/{deployment}'.
  3895  func (r *ProjectsLocationsDeploymentsService) Unlock(name string, unlockdeploymentrequest *UnlockDeploymentRequest) *ProjectsLocationsDeploymentsUnlockCall {
  3896  	c := &ProjectsLocationsDeploymentsUnlockCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3897  	c.name = name
  3898  	c.unlockdeploymentrequest = unlockdeploymentrequest
  3899  	return c
  3900  }
  3901  
  3902  // Fields allows partial responses to be retrieved. See
  3903  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3904  // details.
  3905  func (c *ProjectsLocationsDeploymentsUnlockCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsUnlockCall {
  3906  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3907  	return c
  3908  }
  3909  
  3910  // Context sets the context to be used in this call's Do method.
  3911  func (c *ProjectsLocationsDeploymentsUnlockCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsUnlockCall {
  3912  	c.ctx_ = ctx
  3913  	return c
  3914  }
  3915  
  3916  // Header returns a http.Header that can be modified by the caller to add
  3917  // headers to the request.
  3918  func (c *ProjectsLocationsDeploymentsUnlockCall) Header() http.Header {
  3919  	if c.header_ == nil {
  3920  		c.header_ = make(http.Header)
  3921  	}
  3922  	return c.header_
  3923  }
  3924  
  3925  func (c *ProjectsLocationsDeploymentsUnlockCall) doRequest(alt string) (*http.Response, error) {
  3926  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3927  	var body io.Reader = nil
  3928  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.unlockdeploymentrequest)
  3929  	if err != nil {
  3930  		return nil, err
  3931  	}
  3932  	c.urlParams_.Set("alt", alt)
  3933  	c.urlParams_.Set("prettyPrint", "false")
  3934  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:unlock")
  3935  	urls += "?" + c.urlParams_.Encode()
  3936  	req, err := http.NewRequest("POST", urls, body)
  3937  	if err != nil {
  3938  		return nil, err
  3939  	}
  3940  	req.Header = reqHeaders
  3941  	googleapi.Expand(req.URL, map[string]string{
  3942  		"name": c.name,
  3943  	})
  3944  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3945  }
  3946  
  3947  // Do executes the "config.projects.locations.deployments.unlock" call.
  3948  // Any non-2xx status code is an error. Response headers are in either
  3949  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3950  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3951  // whether the returned error was because http.StatusNotModified was returned.
  3952  func (c *ProjectsLocationsDeploymentsUnlockCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3953  	gensupport.SetOptions(c.urlParams_, opts...)
  3954  	res, err := c.doRequest("json")
  3955  	if res != nil && res.StatusCode == http.StatusNotModified {
  3956  		if res.Body != nil {
  3957  			res.Body.Close()
  3958  		}
  3959  		return nil, gensupport.WrapError(&googleapi.Error{
  3960  			Code:   res.StatusCode,
  3961  			Header: res.Header,
  3962  		})
  3963  	}
  3964  	if err != nil {
  3965  		return nil, err
  3966  	}
  3967  	defer googleapi.CloseBody(res)
  3968  	if err := googleapi.CheckResponse(res); err != nil {
  3969  		return nil, gensupport.WrapError(err)
  3970  	}
  3971  	ret := &Operation{
  3972  		ServerResponse: googleapi.ServerResponse{
  3973  			Header:         res.Header,
  3974  			HTTPStatusCode: res.StatusCode,
  3975  		},
  3976  	}
  3977  	target := &ret
  3978  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3979  		return nil, err
  3980  	}
  3981  	return ret, nil
  3982  }
  3983  
  3984  type ProjectsLocationsDeploymentsRevisionsExportStateCall struct {
  3985  	s                              *Service
  3986  	parent                         string
  3987  	exportrevisionstatefilerequest *ExportRevisionStatefileRequest
  3988  	urlParams_                     gensupport.URLParams
  3989  	ctx_                           context.Context
  3990  	header_                        http.Header
  3991  }
  3992  
  3993  // ExportState: Exports Terraform state file from a given revision.
  3994  //
  3995  //   - parent: The parent in whose context the statefile is listed. The parent
  3996  //     value is in the format:
  3997  //     'projects/{project_id}/locations/{location}/deployments/{deployment}/revisi
  3998  //     ons/{revision}'.
  3999  func (r *ProjectsLocationsDeploymentsRevisionsService) ExportState(parent string, exportrevisionstatefilerequest *ExportRevisionStatefileRequest) *ProjectsLocationsDeploymentsRevisionsExportStateCall {
  4000  	c := &ProjectsLocationsDeploymentsRevisionsExportStateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4001  	c.parent = parent
  4002  	c.exportrevisionstatefilerequest = exportrevisionstatefilerequest
  4003  	return c
  4004  }
  4005  
  4006  // Fields allows partial responses to be retrieved. See
  4007  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4008  // details.
  4009  func (c *ProjectsLocationsDeploymentsRevisionsExportStateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsRevisionsExportStateCall {
  4010  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4011  	return c
  4012  }
  4013  
  4014  // Context sets the context to be used in this call's Do method.
  4015  func (c *ProjectsLocationsDeploymentsRevisionsExportStateCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsRevisionsExportStateCall {
  4016  	c.ctx_ = ctx
  4017  	return c
  4018  }
  4019  
  4020  // Header returns a http.Header that can be modified by the caller to add
  4021  // headers to the request.
  4022  func (c *ProjectsLocationsDeploymentsRevisionsExportStateCall) Header() http.Header {
  4023  	if c.header_ == nil {
  4024  		c.header_ = make(http.Header)
  4025  	}
  4026  	return c.header_
  4027  }
  4028  
  4029  func (c *ProjectsLocationsDeploymentsRevisionsExportStateCall) doRequest(alt string) (*http.Response, error) {
  4030  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4031  	var body io.Reader = nil
  4032  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.exportrevisionstatefilerequest)
  4033  	if err != nil {
  4034  		return nil, err
  4035  	}
  4036  	c.urlParams_.Set("alt", alt)
  4037  	c.urlParams_.Set("prettyPrint", "false")
  4038  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:exportState")
  4039  	urls += "?" + c.urlParams_.Encode()
  4040  	req, err := http.NewRequest("POST", urls, body)
  4041  	if err != nil {
  4042  		return nil, err
  4043  	}
  4044  	req.Header = reqHeaders
  4045  	googleapi.Expand(req.URL, map[string]string{
  4046  		"parent": c.parent,
  4047  	})
  4048  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4049  }
  4050  
  4051  // Do executes the "config.projects.locations.deployments.revisions.exportState" call.
  4052  // Any non-2xx status code is an error. Response headers are in either
  4053  // *Statefile.ServerResponse.Header or (if a response was returned at all) in
  4054  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4055  // whether the returned error was because http.StatusNotModified was returned.
  4056  func (c *ProjectsLocationsDeploymentsRevisionsExportStateCall) Do(opts ...googleapi.CallOption) (*Statefile, error) {
  4057  	gensupport.SetOptions(c.urlParams_, opts...)
  4058  	res, err := c.doRequest("json")
  4059  	if res != nil && res.StatusCode == http.StatusNotModified {
  4060  		if res.Body != nil {
  4061  			res.Body.Close()
  4062  		}
  4063  		return nil, gensupport.WrapError(&googleapi.Error{
  4064  			Code:   res.StatusCode,
  4065  			Header: res.Header,
  4066  		})
  4067  	}
  4068  	if err != nil {
  4069  		return nil, err
  4070  	}
  4071  	defer googleapi.CloseBody(res)
  4072  	if err := googleapi.CheckResponse(res); err != nil {
  4073  		return nil, gensupport.WrapError(err)
  4074  	}
  4075  	ret := &Statefile{
  4076  		ServerResponse: googleapi.ServerResponse{
  4077  			Header:         res.Header,
  4078  			HTTPStatusCode: res.StatusCode,
  4079  		},
  4080  	}
  4081  	target := &ret
  4082  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4083  		return nil, err
  4084  	}
  4085  	return ret, nil
  4086  }
  4087  
  4088  type ProjectsLocationsDeploymentsRevisionsGetCall struct {
  4089  	s            *Service
  4090  	name         string
  4091  	urlParams_   gensupport.URLParams
  4092  	ifNoneMatch_ string
  4093  	ctx_         context.Context
  4094  	header_      http.Header
  4095  }
  4096  
  4097  // Get: Gets details about a Revision.
  4098  //
  4099  //   - name: The name of the Revision in the format:
  4100  //     'projects/{project_id}/locations/{location}/deployments/{deployment}/revisi
  4101  //     ons/{revision}'.
  4102  func (r *ProjectsLocationsDeploymentsRevisionsService) Get(name string) *ProjectsLocationsDeploymentsRevisionsGetCall {
  4103  	c := &ProjectsLocationsDeploymentsRevisionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4104  	c.name = name
  4105  	return c
  4106  }
  4107  
  4108  // Fields allows partial responses to be retrieved. See
  4109  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4110  // details.
  4111  func (c *ProjectsLocationsDeploymentsRevisionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsRevisionsGetCall {
  4112  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4113  	return c
  4114  }
  4115  
  4116  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4117  // object's ETag matches the given value. This is useful for getting updates
  4118  // only after the object has changed since the last request.
  4119  func (c *ProjectsLocationsDeploymentsRevisionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeploymentsRevisionsGetCall {
  4120  	c.ifNoneMatch_ = entityTag
  4121  	return c
  4122  }
  4123  
  4124  // Context sets the context to be used in this call's Do method.
  4125  func (c *ProjectsLocationsDeploymentsRevisionsGetCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsRevisionsGetCall {
  4126  	c.ctx_ = ctx
  4127  	return c
  4128  }
  4129  
  4130  // Header returns a http.Header that can be modified by the caller to add
  4131  // headers to the request.
  4132  func (c *ProjectsLocationsDeploymentsRevisionsGetCall) Header() http.Header {
  4133  	if c.header_ == nil {
  4134  		c.header_ = make(http.Header)
  4135  	}
  4136  	return c.header_
  4137  }
  4138  
  4139  func (c *ProjectsLocationsDeploymentsRevisionsGetCall) doRequest(alt string) (*http.Response, error) {
  4140  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4141  	if c.ifNoneMatch_ != "" {
  4142  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4143  	}
  4144  	var body io.Reader = nil
  4145  	c.urlParams_.Set("alt", alt)
  4146  	c.urlParams_.Set("prettyPrint", "false")
  4147  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4148  	urls += "?" + c.urlParams_.Encode()
  4149  	req, err := http.NewRequest("GET", urls, body)
  4150  	if err != nil {
  4151  		return nil, err
  4152  	}
  4153  	req.Header = reqHeaders
  4154  	googleapi.Expand(req.URL, map[string]string{
  4155  		"name": c.name,
  4156  	})
  4157  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4158  }
  4159  
  4160  // Do executes the "config.projects.locations.deployments.revisions.get" call.
  4161  // Any non-2xx status code is an error. Response headers are in either
  4162  // *Revision.ServerResponse.Header or (if a response was returned at all) in
  4163  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4164  // whether the returned error was because http.StatusNotModified was returned.
  4165  func (c *ProjectsLocationsDeploymentsRevisionsGetCall) Do(opts ...googleapi.CallOption) (*Revision, error) {
  4166  	gensupport.SetOptions(c.urlParams_, opts...)
  4167  	res, err := c.doRequest("json")
  4168  	if res != nil && res.StatusCode == http.StatusNotModified {
  4169  		if res.Body != nil {
  4170  			res.Body.Close()
  4171  		}
  4172  		return nil, gensupport.WrapError(&googleapi.Error{
  4173  			Code:   res.StatusCode,
  4174  			Header: res.Header,
  4175  		})
  4176  	}
  4177  	if err != nil {
  4178  		return nil, err
  4179  	}
  4180  	defer googleapi.CloseBody(res)
  4181  	if err := googleapi.CheckResponse(res); err != nil {
  4182  		return nil, gensupport.WrapError(err)
  4183  	}
  4184  	ret := &Revision{
  4185  		ServerResponse: googleapi.ServerResponse{
  4186  			Header:         res.Header,
  4187  			HTTPStatusCode: res.StatusCode,
  4188  		},
  4189  	}
  4190  	target := &ret
  4191  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4192  		return nil, err
  4193  	}
  4194  	return ret, nil
  4195  }
  4196  
  4197  type ProjectsLocationsDeploymentsRevisionsListCall struct {
  4198  	s            *Service
  4199  	parent       string
  4200  	urlParams_   gensupport.URLParams
  4201  	ifNoneMatch_ string
  4202  	ctx_         context.Context
  4203  	header_      http.Header
  4204  }
  4205  
  4206  // List: Lists Revisions of a deployment.
  4207  //
  4208  //   - parent: The parent in whose context the Revisions are listed. The parent
  4209  //     value is in the format:
  4210  //     'projects/{project_id}/locations/{location}/deployments/{deployment}'.
  4211  func (r *ProjectsLocationsDeploymentsRevisionsService) List(parent string) *ProjectsLocationsDeploymentsRevisionsListCall {
  4212  	c := &ProjectsLocationsDeploymentsRevisionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4213  	c.parent = parent
  4214  	return c
  4215  }
  4216  
  4217  // Filter sets the optional parameter "filter": Lists the Revisions that match
  4218  // the filter expression. A filter expression filters the resources listed in
  4219  // the response. The expression must be of the form '{field} {operator}
  4220  // {value}' where operators: '<', '>', '<=', '>=', '!=', '=', ':' are supported
  4221  // (colon ':' represents a HAS operator which is roughly synonymous with
  4222  // equality). {field} can refer to a proto or JSON field, or a synthetic field.
  4223  // Field names can be camelCase or snake_case. Examples: - Filter by name: name
  4224  // = "projects/foo/locations/us-central1/deployments/dep/revisions/bar - Filter
  4225  // by labels: - Resources that have a key called 'foo' labels.foo:* - Resources
  4226  // that have a key called 'foo' whose value is 'bar' labels.foo = bar - Filter
  4227  // by state: - Revisions in CREATING state. state=CREATING
  4228  func (c *ProjectsLocationsDeploymentsRevisionsListCall) Filter(filter string) *ProjectsLocationsDeploymentsRevisionsListCall {
  4229  	c.urlParams_.Set("filter", filter)
  4230  	return c
  4231  }
  4232  
  4233  // OrderBy sets the optional parameter "orderBy": Field to use to sort the
  4234  // list.
  4235  func (c *ProjectsLocationsDeploymentsRevisionsListCall) OrderBy(orderBy string) *ProjectsLocationsDeploymentsRevisionsListCall {
  4236  	c.urlParams_.Set("orderBy", orderBy)
  4237  	return c
  4238  }
  4239  
  4240  // PageSize sets the optional parameter "pageSize": When requesting a page of
  4241  // resources, `page_size` specifies number of resources to return. If
  4242  // unspecified, at most 500 will be returned. The maximum value is 1000.
  4243  func (c *ProjectsLocationsDeploymentsRevisionsListCall) PageSize(pageSize int64) *ProjectsLocationsDeploymentsRevisionsListCall {
  4244  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4245  	return c
  4246  }
  4247  
  4248  // PageToken sets the optional parameter "pageToken": Token returned by
  4249  // previous call to 'ListRevisions' which specifies the position in the list
  4250  // from where to continue listing the resources.
  4251  func (c *ProjectsLocationsDeploymentsRevisionsListCall) PageToken(pageToken string) *ProjectsLocationsDeploymentsRevisionsListCall {
  4252  	c.urlParams_.Set("pageToken", pageToken)
  4253  	return c
  4254  }
  4255  
  4256  // Fields allows partial responses to be retrieved. See
  4257  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4258  // details.
  4259  func (c *ProjectsLocationsDeploymentsRevisionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsRevisionsListCall {
  4260  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4261  	return c
  4262  }
  4263  
  4264  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4265  // object's ETag matches the given value. This is useful for getting updates
  4266  // only after the object has changed since the last request.
  4267  func (c *ProjectsLocationsDeploymentsRevisionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeploymentsRevisionsListCall {
  4268  	c.ifNoneMatch_ = entityTag
  4269  	return c
  4270  }
  4271  
  4272  // Context sets the context to be used in this call's Do method.
  4273  func (c *ProjectsLocationsDeploymentsRevisionsListCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsRevisionsListCall {
  4274  	c.ctx_ = ctx
  4275  	return c
  4276  }
  4277  
  4278  // Header returns a http.Header that can be modified by the caller to add
  4279  // headers to the request.
  4280  func (c *ProjectsLocationsDeploymentsRevisionsListCall) Header() http.Header {
  4281  	if c.header_ == nil {
  4282  		c.header_ = make(http.Header)
  4283  	}
  4284  	return c.header_
  4285  }
  4286  
  4287  func (c *ProjectsLocationsDeploymentsRevisionsListCall) doRequest(alt string) (*http.Response, error) {
  4288  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4289  	if c.ifNoneMatch_ != "" {
  4290  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4291  	}
  4292  	var body io.Reader = nil
  4293  	c.urlParams_.Set("alt", alt)
  4294  	c.urlParams_.Set("prettyPrint", "false")
  4295  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/revisions")
  4296  	urls += "?" + c.urlParams_.Encode()
  4297  	req, err := http.NewRequest("GET", urls, body)
  4298  	if err != nil {
  4299  		return nil, err
  4300  	}
  4301  	req.Header = reqHeaders
  4302  	googleapi.Expand(req.URL, map[string]string{
  4303  		"parent": c.parent,
  4304  	})
  4305  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4306  }
  4307  
  4308  // Do executes the "config.projects.locations.deployments.revisions.list" call.
  4309  // Any non-2xx status code is an error. Response headers are in either
  4310  // *ListRevisionsResponse.ServerResponse.Header or (if a response was returned
  4311  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4312  // check whether the returned error was because http.StatusNotModified was
  4313  // returned.
  4314  func (c *ProjectsLocationsDeploymentsRevisionsListCall) Do(opts ...googleapi.CallOption) (*ListRevisionsResponse, error) {
  4315  	gensupport.SetOptions(c.urlParams_, opts...)
  4316  	res, err := c.doRequest("json")
  4317  	if res != nil && res.StatusCode == http.StatusNotModified {
  4318  		if res.Body != nil {
  4319  			res.Body.Close()
  4320  		}
  4321  		return nil, gensupport.WrapError(&googleapi.Error{
  4322  			Code:   res.StatusCode,
  4323  			Header: res.Header,
  4324  		})
  4325  	}
  4326  	if err != nil {
  4327  		return nil, err
  4328  	}
  4329  	defer googleapi.CloseBody(res)
  4330  	if err := googleapi.CheckResponse(res); err != nil {
  4331  		return nil, gensupport.WrapError(err)
  4332  	}
  4333  	ret := &ListRevisionsResponse{
  4334  		ServerResponse: googleapi.ServerResponse{
  4335  			Header:         res.Header,
  4336  			HTTPStatusCode: res.StatusCode,
  4337  		},
  4338  	}
  4339  	target := &ret
  4340  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4341  		return nil, err
  4342  	}
  4343  	return ret, nil
  4344  }
  4345  
  4346  // Pages invokes f for each page of results.
  4347  // A non-nil error returned from f will halt the iteration.
  4348  // The provided context supersedes any context provided to the Context method.
  4349  func (c *ProjectsLocationsDeploymentsRevisionsListCall) Pages(ctx context.Context, f func(*ListRevisionsResponse) error) error {
  4350  	c.ctx_ = ctx
  4351  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4352  	for {
  4353  		x, err := c.Do()
  4354  		if err != nil {
  4355  			return err
  4356  		}
  4357  		if err := f(x); err != nil {
  4358  			return err
  4359  		}
  4360  		if x.NextPageToken == "" {
  4361  			return nil
  4362  		}
  4363  		c.PageToken(x.NextPageToken)
  4364  	}
  4365  }
  4366  
  4367  type ProjectsLocationsDeploymentsRevisionsResourcesGetCall struct {
  4368  	s            *Service
  4369  	name         string
  4370  	urlParams_   gensupport.URLParams
  4371  	ifNoneMatch_ string
  4372  	ctx_         context.Context
  4373  	header_      http.Header
  4374  }
  4375  
  4376  // Get: Gets details about a Resource deployed by Infra Manager.
  4377  //
  4378  //   - name: The name of the Resource in the format:
  4379  //     'projects/{project_id}/locations/{location}/deployments/{deployment}/revisi
  4380  //     ons/{revision}/resource/{resource}'.
  4381  func (r *ProjectsLocationsDeploymentsRevisionsResourcesService) Get(name string) *ProjectsLocationsDeploymentsRevisionsResourcesGetCall {
  4382  	c := &ProjectsLocationsDeploymentsRevisionsResourcesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4383  	c.name = name
  4384  	return c
  4385  }
  4386  
  4387  // Fields allows partial responses to be retrieved. See
  4388  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4389  // details.
  4390  func (c *ProjectsLocationsDeploymentsRevisionsResourcesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsRevisionsResourcesGetCall {
  4391  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4392  	return c
  4393  }
  4394  
  4395  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4396  // object's ETag matches the given value. This is useful for getting updates
  4397  // only after the object has changed since the last request.
  4398  func (c *ProjectsLocationsDeploymentsRevisionsResourcesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeploymentsRevisionsResourcesGetCall {
  4399  	c.ifNoneMatch_ = entityTag
  4400  	return c
  4401  }
  4402  
  4403  // Context sets the context to be used in this call's Do method.
  4404  func (c *ProjectsLocationsDeploymentsRevisionsResourcesGetCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsRevisionsResourcesGetCall {
  4405  	c.ctx_ = ctx
  4406  	return c
  4407  }
  4408  
  4409  // Header returns a http.Header that can be modified by the caller to add
  4410  // headers to the request.
  4411  func (c *ProjectsLocationsDeploymentsRevisionsResourcesGetCall) Header() http.Header {
  4412  	if c.header_ == nil {
  4413  		c.header_ = make(http.Header)
  4414  	}
  4415  	return c.header_
  4416  }
  4417  
  4418  func (c *ProjectsLocationsDeploymentsRevisionsResourcesGetCall) doRequest(alt string) (*http.Response, error) {
  4419  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4420  	if c.ifNoneMatch_ != "" {
  4421  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4422  	}
  4423  	var body io.Reader = nil
  4424  	c.urlParams_.Set("alt", alt)
  4425  	c.urlParams_.Set("prettyPrint", "false")
  4426  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4427  	urls += "?" + c.urlParams_.Encode()
  4428  	req, err := http.NewRequest("GET", urls, body)
  4429  	if err != nil {
  4430  		return nil, err
  4431  	}
  4432  	req.Header = reqHeaders
  4433  	googleapi.Expand(req.URL, map[string]string{
  4434  		"name": c.name,
  4435  	})
  4436  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4437  }
  4438  
  4439  // Do executes the "config.projects.locations.deployments.revisions.resources.get" call.
  4440  // Any non-2xx status code is an error. Response headers are in either
  4441  // *Resource.ServerResponse.Header or (if a response was returned at all) in
  4442  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4443  // whether the returned error was because http.StatusNotModified was returned.
  4444  func (c *ProjectsLocationsDeploymentsRevisionsResourcesGetCall) Do(opts ...googleapi.CallOption) (*Resource, error) {
  4445  	gensupport.SetOptions(c.urlParams_, opts...)
  4446  	res, err := c.doRequest("json")
  4447  	if res != nil && res.StatusCode == http.StatusNotModified {
  4448  		if res.Body != nil {
  4449  			res.Body.Close()
  4450  		}
  4451  		return nil, gensupport.WrapError(&googleapi.Error{
  4452  			Code:   res.StatusCode,
  4453  			Header: res.Header,
  4454  		})
  4455  	}
  4456  	if err != nil {
  4457  		return nil, err
  4458  	}
  4459  	defer googleapi.CloseBody(res)
  4460  	if err := googleapi.CheckResponse(res); err != nil {
  4461  		return nil, gensupport.WrapError(err)
  4462  	}
  4463  	ret := &Resource{
  4464  		ServerResponse: googleapi.ServerResponse{
  4465  			Header:         res.Header,
  4466  			HTTPStatusCode: res.StatusCode,
  4467  		},
  4468  	}
  4469  	target := &ret
  4470  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4471  		return nil, err
  4472  	}
  4473  	return ret, nil
  4474  }
  4475  
  4476  type ProjectsLocationsDeploymentsRevisionsResourcesListCall struct {
  4477  	s            *Service
  4478  	parent       string
  4479  	urlParams_   gensupport.URLParams
  4480  	ifNoneMatch_ string
  4481  	ctx_         context.Context
  4482  	header_      http.Header
  4483  }
  4484  
  4485  // List: Lists Resources in a given revision.
  4486  //
  4487  //   - parent: The parent in whose context the Resources are listed. The parent
  4488  //     value is in the format:
  4489  //     'projects/{project_id}/locations/{location}/deployments/{deployment}/revisi
  4490  //     ons/{revision}'.
  4491  func (r *ProjectsLocationsDeploymentsRevisionsResourcesService) List(parent string) *ProjectsLocationsDeploymentsRevisionsResourcesListCall {
  4492  	c := &ProjectsLocationsDeploymentsRevisionsResourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4493  	c.parent = parent
  4494  	return c
  4495  }
  4496  
  4497  // Filter sets the optional parameter "filter": Lists the Resources that match
  4498  // the filter expression. A filter expression filters the resources listed in
  4499  // the response. The expression must be of the form '{field} {operator}
  4500  // {value}' where operators: '<', '>', '<=', '>=', '!=', '=', ':' are supported
  4501  // (colon ':' represents a HAS operator which is roughly synonymous with
  4502  // equality). {field} can refer to a proto or JSON field, or a synthetic field.
  4503  // Field names can be camelCase or snake_case. Examples: - Filter by name: name
  4504  // =
  4505  // "projects/foo/locations/us-central1/deployments/dep/revisions/bar/resources/b
  4506  // az
  4507  func (c *ProjectsLocationsDeploymentsRevisionsResourcesListCall) Filter(filter string) *ProjectsLocationsDeploymentsRevisionsResourcesListCall {
  4508  	c.urlParams_.Set("filter", filter)
  4509  	return c
  4510  }
  4511  
  4512  // OrderBy sets the optional parameter "orderBy": Field to use to sort the
  4513  // list.
  4514  func (c *ProjectsLocationsDeploymentsRevisionsResourcesListCall) OrderBy(orderBy string) *ProjectsLocationsDeploymentsRevisionsResourcesListCall {
  4515  	c.urlParams_.Set("orderBy", orderBy)
  4516  	return c
  4517  }
  4518  
  4519  // PageSize sets the optional parameter "pageSize": When requesting a page of
  4520  // resources, 'page_size' specifies number of resources to return. If
  4521  // unspecified, at most 500 will be returned. The maximum value is 1000.
  4522  func (c *ProjectsLocationsDeploymentsRevisionsResourcesListCall) PageSize(pageSize int64) *ProjectsLocationsDeploymentsRevisionsResourcesListCall {
  4523  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4524  	return c
  4525  }
  4526  
  4527  // PageToken sets the optional parameter "pageToken": Token returned by
  4528  // previous call to 'ListResources' which specifies the position in the list
  4529  // from where to continue listing the resources.
  4530  func (c *ProjectsLocationsDeploymentsRevisionsResourcesListCall) PageToken(pageToken string) *ProjectsLocationsDeploymentsRevisionsResourcesListCall {
  4531  	c.urlParams_.Set("pageToken", pageToken)
  4532  	return c
  4533  }
  4534  
  4535  // Fields allows partial responses to be retrieved. See
  4536  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4537  // details.
  4538  func (c *ProjectsLocationsDeploymentsRevisionsResourcesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsRevisionsResourcesListCall {
  4539  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4540  	return c
  4541  }
  4542  
  4543  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4544  // object's ETag matches the given value. This is useful for getting updates
  4545  // only after the object has changed since the last request.
  4546  func (c *ProjectsLocationsDeploymentsRevisionsResourcesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeploymentsRevisionsResourcesListCall {
  4547  	c.ifNoneMatch_ = entityTag
  4548  	return c
  4549  }
  4550  
  4551  // Context sets the context to be used in this call's Do method.
  4552  func (c *ProjectsLocationsDeploymentsRevisionsResourcesListCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsRevisionsResourcesListCall {
  4553  	c.ctx_ = ctx
  4554  	return c
  4555  }
  4556  
  4557  // Header returns a http.Header that can be modified by the caller to add
  4558  // headers to the request.
  4559  func (c *ProjectsLocationsDeploymentsRevisionsResourcesListCall) Header() http.Header {
  4560  	if c.header_ == nil {
  4561  		c.header_ = make(http.Header)
  4562  	}
  4563  	return c.header_
  4564  }
  4565  
  4566  func (c *ProjectsLocationsDeploymentsRevisionsResourcesListCall) doRequest(alt string) (*http.Response, error) {
  4567  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4568  	if c.ifNoneMatch_ != "" {
  4569  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4570  	}
  4571  	var body io.Reader = nil
  4572  	c.urlParams_.Set("alt", alt)
  4573  	c.urlParams_.Set("prettyPrint", "false")
  4574  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/resources")
  4575  	urls += "?" + c.urlParams_.Encode()
  4576  	req, err := http.NewRequest("GET", urls, body)
  4577  	if err != nil {
  4578  		return nil, err
  4579  	}
  4580  	req.Header = reqHeaders
  4581  	googleapi.Expand(req.URL, map[string]string{
  4582  		"parent": c.parent,
  4583  	})
  4584  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4585  }
  4586  
  4587  // Do executes the "config.projects.locations.deployments.revisions.resources.list" call.
  4588  // Any non-2xx status code is an error. Response headers are in either
  4589  // *ListResourcesResponse.ServerResponse.Header or (if a response was returned
  4590  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4591  // check whether the returned error was because http.StatusNotModified was
  4592  // returned.
  4593  func (c *ProjectsLocationsDeploymentsRevisionsResourcesListCall) Do(opts ...googleapi.CallOption) (*ListResourcesResponse, error) {
  4594  	gensupport.SetOptions(c.urlParams_, opts...)
  4595  	res, err := c.doRequest("json")
  4596  	if res != nil && res.StatusCode == http.StatusNotModified {
  4597  		if res.Body != nil {
  4598  			res.Body.Close()
  4599  		}
  4600  		return nil, gensupport.WrapError(&googleapi.Error{
  4601  			Code:   res.StatusCode,
  4602  			Header: res.Header,
  4603  		})
  4604  	}
  4605  	if err != nil {
  4606  		return nil, err
  4607  	}
  4608  	defer googleapi.CloseBody(res)
  4609  	if err := googleapi.CheckResponse(res); err != nil {
  4610  		return nil, gensupport.WrapError(err)
  4611  	}
  4612  	ret := &ListResourcesResponse{
  4613  		ServerResponse: googleapi.ServerResponse{
  4614  			Header:         res.Header,
  4615  			HTTPStatusCode: res.StatusCode,
  4616  		},
  4617  	}
  4618  	target := &ret
  4619  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4620  		return nil, err
  4621  	}
  4622  	return ret, nil
  4623  }
  4624  
  4625  // Pages invokes f for each page of results.
  4626  // A non-nil error returned from f will halt the iteration.
  4627  // The provided context supersedes any context provided to the Context method.
  4628  func (c *ProjectsLocationsDeploymentsRevisionsResourcesListCall) Pages(ctx context.Context, f func(*ListResourcesResponse) error) error {
  4629  	c.ctx_ = ctx
  4630  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4631  	for {
  4632  		x, err := c.Do()
  4633  		if err != nil {
  4634  			return err
  4635  		}
  4636  		if err := f(x); err != nil {
  4637  			return err
  4638  		}
  4639  		if x.NextPageToken == "" {
  4640  			return nil
  4641  		}
  4642  		c.PageToken(x.NextPageToken)
  4643  	}
  4644  }
  4645  
  4646  type ProjectsLocationsOperationsCancelCall struct {
  4647  	s                      *Service
  4648  	name                   string
  4649  	canceloperationrequest *CancelOperationRequest
  4650  	urlParams_             gensupport.URLParams
  4651  	ctx_                   context.Context
  4652  	header_                http.Header
  4653  }
  4654  
  4655  // Cancel: Starts asynchronous cancellation on a long-running operation. The
  4656  // server makes a best effort to cancel the operation, but success is not
  4657  // guaranteed. If the server doesn't support this method, it returns
  4658  // `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or
  4659  // other methods to check whether the cancellation succeeded or whether the
  4660  // operation completed despite cancellation. On successful cancellation, the
  4661  // operation is not deleted; instead, it becomes an operation with an
  4662  // Operation.error value with a google.rpc.Status.code of 1, corresponding to
  4663  // `Code.CANCELLED`.
  4664  //
  4665  // - name: The name of the operation resource to be cancelled.
  4666  func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall {
  4667  	c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4668  	c.name = name
  4669  	c.canceloperationrequest = canceloperationrequest
  4670  	return c
  4671  }
  4672  
  4673  // Fields allows partial responses to be retrieved. See
  4674  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4675  // details.
  4676  func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
  4677  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4678  	return c
  4679  }
  4680  
  4681  // Context sets the context to be used in this call's Do method.
  4682  func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
  4683  	c.ctx_ = ctx
  4684  	return c
  4685  }
  4686  
  4687  // Header returns a http.Header that can be modified by the caller to add
  4688  // headers to the request.
  4689  func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
  4690  	if c.header_ == nil {
  4691  		c.header_ = make(http.Header)
  4692  	}
  4693  	return c.header_
  4694  }
  4695  
  4696  func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
  4697  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4698  	var body io.Reader = nil
  4699  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
  4700  	if err != nil {
  4701  		return nil, err
  4702  	}
  4703  	c.urlParams_.Set("alt", alt)
  4704  	c.urlParams_.Set("prettyPrint", "false")
  4705  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
  4706  	urls += "?" + c.urlParams_.Encode()
  4707  	req, err := http.NewRequest("POST", urls, body)
  4708  	if err != nil {
  4709  		return nil, err
  4710  	}
  4711  	req.Header = reqHeaders
  4712  	googleapi.Expand(req.URL, map[string]string{
  4713  		"name": c.name,
  4714  	})
  4715  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4716  }
  4717  
  4718  // Do executes the "config.projects.locations.operations.cancel" call.
  4719  // Any non-2xx status code is an error. Response headers are in either
  4720  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  4721  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4722  // whether the returned error was because http.StatusNotModified was returned.
  4723  func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  4724  	gensupport.SetOptions(c.urlParams_, opts...)
  4725  	res, err := c.doRequest("json")
  4726  	if res != nil && res.StatusCode == http.StatusNotModified {
  4727  		if res.Body != nil {
  4728  			res.Body.Close()
  4729  		}
  4730  		return nil, gensupport.WrapError(&googleapi.Error{
  4731  			Code:   res.StatusCode,
  4732  			Header: res.Header,
  4733  		})
  4734  	}
  4735  	if err != nil {
  4736  		return nil, err
  4737  	}
  4738  	defer googleapi.CloseBody(res)
  4739  	if err := googleapi.CheckResponse(res); err != nil {
  4740  		return nil, gensupport.WrapError(err)
  4741  	}
  4742  	ret := &Empty{
  4743  		ServerResponse: googleapi.ServerResponse{
  4744  			Header:         res.Header,
  4745  			HTTPStatusCode: res.StatusCode,
  4746  		},
  4747  	}
  4748  	target := &ret
  4749  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4750  		return nil, err
  4751  	}
  4752  	return ret, nil
  4753  }
  4754  
  4755  type ProjectsLocationsOperationsDeleteCall struct {
  4756  	s          *Service
  4757  	name       string
  4758  	urlParams_ gensupport.URLParams
  4759  	ctx_       context.Context
  4760  	header_    http.Header
  4761  }
  4762  
  4763  // Delete: Deletes a long-running operation. This method indicates that the
  4764  // client is no longer interested in the operation result. It does not cancel
  4765  // the operation. If the server doesn't support this method, it returns
  4766  // `google.rpc.Code.UNIMPLEMENTED`.
  4767  //
  4768  // - name: The name of the operation resource to be deleted.
  4769  func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall {
  4770  	c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4771  	c.name = name
  4772  	return c
  4773  }
  4774  
  4775  // Fields allows partial responses to be retrieved. See
  4776  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4777  // details.
  4778  func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall {
  4779  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4780  	return c
  4781  }
  4782  
  4783  // Context sets the context to be used in this call's Do method.
  4784  func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall {
  4785  	c.ctx_ = ctx
  4786  	return c
  4787  }
  4788  
  4789  // Header returns a http.Header that can be modified by the caller to add
  4790  // headers to the request.
  4791  func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header {
  4792  	if c.header_ == nil {
  4793  		c.header_ = make(http.Header)
  4794  	}
  4795  	return c.header_
  4796  }
  4797  
  4798  func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
  4799  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4800  	var body io.Reader = nil
  4801  	c.urlParams_.Set("alt", alt)
  4802  	c.urlParams_.Set("prettyPrint", "false")
  4803  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4804  	urls += "?" + c.urlParams_.Encode()
  4805  	req, err := http.NewRequest("DELETE", urls, body)
  4806  	if err != nil {
  4807  		return nil, err
  4808  	}
  4809  	req.Header = reqHeaders
  4810  	googleapi.Expand(req.URL, map[string]string{
  4811  		"name": c.name,
  4812  	})
  4813  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4814  }
  4815  
  4816  // Do executes the "config.projects.locations.operations.delete" call.
  4817  // Any non-2xx status code is an error. Response headers are in either
  4818  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  4819  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4820  // whether the returned error was because http.StatusNotModified was returned.
  4821  func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  4822  	gensupport.SetOptions(c.urlParams_, opts...)
  4823  	res, err := c.doRequest("json")
  4824  	if res != nil && res.StatusCode == http.StatusNotModified {
  4825  		if res.Body != nil {
  4826  			res.Body.Close()
  4827  		}
  4828  		return nil, gensupport.WrapError(&googleapi.Error{
  4829  			Code:   res.StatusCode,
  4830  			Header: res.Header,
  4831  		})
  4832  	}
  4833  	if err != nil {
  4834  		return nil, err
  4835  	}
  4836  	defer googleapi.CloseBody(res)
  4837  	if err := googleapi.CheckResponse(res); err != nil {
  4838  		return nil, gensupport.WrapError(err)
  4839  	}
  4840  	ret := &Empty{
  4841  		ServerResponse: googleapi.ServerResponse{
  4842  			Header:         res.Header,
  4843  			HTTPStatusCode: res.StatusCode,
  4844  		},
  4845  	}
  4846  	target := &ret
  4847  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4848  		return nil, err
  4849  	}
  4850  	return ret, nil
  4851  }
  4852  
  4853  type ProjectsLocationsOperationsGetCall struct {
  4854  	s            *Service
  4855  	name         string
  4856  	urlParams_   gensupport.URLParams
  4857  	ifNoneMatch_ string
  4858  	ctx_         context.Context
  4859  	header_      http.Header
  4860  }
  4861  
  4862  // Get: Gets the latest state of a long-running operation. Clients can use this
  4863  // method to poll the operation result at intervals as recommended by the API
  4864  // service.
  4865  //
  4866  // - name: The name of the operation resource.
  4867  func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
  4868  	c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4869  	c.name = name
  4870  	return c
  4871  }
  4872  
  4873  // Fields allows partial responses to be retrieved. See
  4874  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4875  // details.
  4876  func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
  4877  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4878  	return c
  4879  }
  4880  
  4881  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4882  // object's ETag matches the given value. This is useful for getting updates
  4883  // only after the object has changed since the last request.
  4884  func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
  4885  	c.ifNoneMatch_ = entityTag
  4886  	return c
  4887  }
  4888  
  4889  // Context sets the context to be used in this call's Do method.
  4890  func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
  4891  	c.ctx_ = ctx
  4892  	return c
  4893  }
  4894  
  4895  // Header returns a http.Header that can be modified by the caller to add
  4896  // headers to the request.
  4897  func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
  4898  	if c.header_ == nil {
  4899  		c.header_ = make(http.Header)
  4900  	}
  4901  	return c.header_
  4902  }
  4903  
  4904  func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  4905  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4906  	if c.ifNoneMatch_ != "" {
  4907  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4908  	}
  4909  	var body io.Reader = nil
  4910  	c.urlParams_.Set("alt", alt)
  4911  	c.urlParams_.Set("prettyPrint", "false")
  4912  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4913  	urls += "?" + c.urlParams_.Encode()
  4914  	req, err := http.NewRequest("GET", urls, body)
  4915  	if err != nil {
  4916  		return nil, err
  4917  	}
  4918  	req.Header = reqHeaders
  4919  	googleapi.Expand(req.URL, map[string]string{
  4920  		"name": c.name,
  4921  	})
  4922  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4923  }
  4924  
  4925  // Do executes the "config.projects.locations.operations.get" call.
  4926  // Any non-2xx status code is an error. Response headers are in either
  4927  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4928  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4929  // whether the returned error was because http.StatusNotModified was returned.
  4930  func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4931  	gensupport.SetOptions(c.urlParams_, opts...)
  4932  	res, err := c.doRequest("json")
  4933  	if res != nil && res.StatusCode == http.StatusNotModified {
  4934  		if res.Body != nil {
  4935  			res.Body.Close()
  4936  		}
  4937  		return nil, gensupport.WrapError(&googleapi.Error{
  4938  			Code:   res.StatusCode,
  4939  			Header: res.Header,
  4940  		})
  4941  	}
  4942  	if err != nil {
  4943  		return nil, err
  4944  	}
  4945  	defer googleapi.CloseBody(res)
  4946  	if err := googleapi.CheckResponse(res); err != nil {
  4947  		return nil, gensupport.WrapError(err)
  4948  	}
  4949  	ret := &Operation{
  4950  		ServerResponse: googleapi.ServerResponse{
  4951  			Header:         res.Header,
  4952  			HTTPStatusCode: res.StatusCode,
  4953  		},
  4954  	}
  4955  	target := &ret
  4956  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4957  		return nil, err
  4958  	}
  4959  	return ret, nil
  4960  }
  4961  
  4962  type ProjectsLocationsOperationsListCall struct {
  4963  	s            *Service
  4964  	name         string
  4965  	urlParams_   gensupport.URLParams
  4966  	ifNoneMatch_ string
  4967  	ctx_         context.Context
  4968  	header_      http.Header
  4969  }
  4970  
  4971  // List: Lists operations that match the specified filter in the request. If
  4972  // the server doesn't support this method, it returns `UNIMPLEMENTED`.
  4973  //
  4974  // - name: The name of the operation's parent resource.
  4975  func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
  4976  	c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4977  	c.name = name
  4978  	return c
  4979  }
  4980  
  4981  // Filter sets the optional parameter "filter": The standard list filter.
  4982  func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
  4983  	c.urlParams_.Set("filter", filter)
  4984  	return c
  4985  }
  4986  
  4987  // PageSize sets the optional parameter "pageSize": The standard list page
  4988  // size.
  4989  func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
  4990  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4991  	return c
  4992  }
  4993  
  4994  // PageToken sets the optional parameter "pageToken": The standard list page
  4995  // token.
  4996  func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
  4997  	c.urlParams_.Set("pageToken", pageToken)
  4998  	return c
  4999  }
  5000  
  5001  // Fields allows partial responses to be retrieved. See
  5002  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5003  // details.
  5004  func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
  5005  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5006  	return c
  5007  }
  5008  
  5009  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5010  // object's ETag matches the given value. This is useful for getting updates
  5011  // only after the object has changed since the last request.
  5012  func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
  5013  	c.ifNoneMatch_ = entityTag
  5014  	return c
  5015  }
  5016  
  5017  // Context sets the context to be used in this call's Do method.
  5018  func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
  5019  	c.ctx_ = ctx
  5020  	return c
  5021  }
  5022  
  5023  // Header returns a http.Header that can be modified by the caller to add
  5024  // headers to the request.
  5025  func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
  5026  	if c.header_ == nil {
  5027  		c.header_ = make(http.Header)
  5028  	}
  5029  	return c.header_
  5030  }
  5031  
  5032  func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
  5033  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5034  	if c.ifNoneMatch_ != "" {
  5035  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5036  	}
  5037  	var body io.Reader = nil
  5038  	c.urlParams_.Set("alt", alt)
  5039  	c.urlParams_.Set("prettyPrint", "false")
  5040  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations")
  5041  	urls += "?" + c.urlParams_.Encode()
  5042  	req, err := http.NewRequest("GET", urls, body)
  5043  	if err != nil {
  5044  		return nil, err
  5045  	}
  5046  	req.Header = reqHeaders
  5047  	googleapi.Expand(req.URL, map[string]string{
  5048  		"name": c.name,
  5049  	})
  5050  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5051  }
  5052  
  5053  // Do executes the "config.projects.locations.operations.list" call.
  5054  // Any non-2xx status code is an error. Response headers are in either
  5055  // *ListOperationsResponse.ServerResponse.Header or (if a response was returned
  5056  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5057  // check whether the returned error was because http.StatusNotModified was
  5058  // returned.
  5059  func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
  5060  	gensupport.SetOptions(c.urlParams_, opts...)
  5061  	res, err := c.doRequest("json")
  5062  	if res != nil && res.StatusCode == http.StatusNotModified {
  5063  		if res.Body != nil {
  5064  			res.Body.Close()
  5065  		}
  5066  		return nil, gensupport.WrapError(&googleapi.Error{
  5067  			Code:   res.StatusCode,
  5068  			Header: res.Header,
  5069  		})
  5070  	}
  5071  	if err != nil {
  5072  		return nil, err
  5073  	}
  5074  	defer googleapi.CloseBody(res)
  5075  	if err := googleapi.CheckResponse(res); err != nil {
  5076  		return nil, gensupport.WrapError(err)
  5077  	}
  5078  	ret := &ListOperationsResponse{
  5079  		ServerResponse: googleapi.ServerResponse{
  5080  			Header:         res.Header,
  5081  			HTTPStatusCode: res.StatusCode,
  5082  		},
  5083  	}
  5084  	target := &ret
  5085  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5086  		return nil, err
  5087  	}
  5088  	return ret, nil
  5089  }
  5090  
  5091  // Pages invokes f for each page of results.
  5092  // A non-nil error returned from f will halt the iteration.
  5093  // The provided context supersedes any context provided to the Context method.
  5094  func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
  5095  	c.ctx_ = ctx
  5096  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  5097  	for {
  5098  		x, err := c.Do()
  5099  		if err != nil {
  5100  			return err
  5101  		}
  5102  		if err := f(x); err != nil {
  5103  			return err
  5104  		}
  5105  		if x.NextPageToken == "" {
  5106  			return nil
  5107  		}
  5108  		c.PageToken(x.NextPageToken)
  5109  	}
  5110  }
  5111  
  5112  type ProjectsLocationsPreviewsCreateCall struct {
  5113  	s          *Service
  5114  	parent     string
  5115  	preview    *Preview
  5116  	urlParams_ gensupport.URLParams
  5117  	ctx_       context.Context
  5118  	header_    http.Header
  5119  }
  5120  
  5121  // Create: Creates a Preview.
  5122  //
  5123  //   - parent: The parent in whose context the Preview is created. The parent
  5124  //     value is in the format: 'projects/{project_id}/locations/{location}'.
  5125  func (r *ProjectsLocationsPreviewsService) Create(parent string, preview *Preview) *ProjectsLocationsPreviewsCreateCall {
  5126  	c := &ProjectsLocationsPreviewsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5127  	c.parent = parent
  5128  	c.preview = preview
  5129  	return c
  5130  }
  5131  
  5132  // PreviewId sets the optional parameter "previewId": The preview ID.
  5133  func (c *ProjectsLocationsPreviewsCreateCall) PreviewId(previewId string) *ProjectsLocationsPreviewsCreateCall {
  5134  	c.urlParams_.Set("previewId", previewId)
  5135  	return c
  5136  }
  5137  
  5138  // RequestId sets the optional parameter "requestId": An optional request ID to
  5139  // identify requests. Specify a unique request ID so that if you must retry
  5140  // your request, the server will know to ignore the request if it has already
  5141  // been completed. The server will guarantee that for at least 60 minutes since
  5142  // the first request. For example, consider a situation where you make an
  5143  // initial request and the request times out. If you make the request again
  5144  // with the same request ID, the server can check if original operation with
  5145  // the same request ID was received, and if so, will ignore the second request.
  5146  // This prevents clients from accidentally creating duplicate commitments. The
  5147  // request ID must be a valid UUID with the exception that zero UUID is not
  5148  // supported (00000000-0000-0000-0000-000000000000).
  5149  func (c *ProjectsLocationsPreviewsCreateCall) RequestId(requestId string) *ProjectsLocationsPreviewsCreateCall {
  5150  	c.urlParams_.Set("requestId", requestId)
  5151  	return c
  5152  }
  5153  
  5154  // Fields allows partial responses to be retrieved. See
  5155  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5156  // details.
  5157  func (c *ProjectsLocationsPreviewsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsPreviewsCreateCall {
  5158  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5159  	return c
  5160  }
  5161  
  5162  // Context sets the context to be used in this call's Do method.
  5163  func (c *ProjectsLocationsPreviewsCreateCall) Context(ctx context.Context) *ProjectsLocationsPreviewsCreateCall {
  5164  	c.ctx_ = ctx
  5165  	return c
  5166  }
  5167  
  5168  // Header returns a http.Header that can be modified by the caller to add
  5169  // headers to the request.
  5170  func (c *ProjectsLocationsPreviewsCreateCall) Header() http.Header {
  5171  	if c.header_ == nil {
  5172  		c.header_ = make(http.Header)
  5173  	}
  5174  	return c.header_
  5175  }
  5176  
  5177  func (c *ProjectsLocationsPreviewsCreateCall) doRequest(alt string) (*http.Response, error) {
  5178  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5179  	var body io.Reader = nil
  5180  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.preview)
  5181  	if err != nil {
  5182  		return nil, err
  5183  	}
  5184  	c.urlParams_.Set("alt", alt)
  5185  	c.urlParams_.Set("prettyPrint", "false")
  5186  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/previews")
  5187  	urls += "?" + c.urlParams_.Encode()
  5188  	req, err := http.NewRequest("POST", urls, body)
  5189  	if err != nil {
  5190  		return nil, err
  5191  	}
  5192  	req.Header = reqHeaders
  5193  	googleapi.Expand(req.URL, map[string]string{
  5194  		"parent": c.parent,
  5195  	})
  5196  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5197  }
  5198  
  5199  // Do executes the "config.projects.locations.previews.create" call.
  5200  // Any non-2xx status code is an error. Response headers are in either
  5201  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  5202  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5203  // whether the returned error was because http.StatusNotModified was returned.
  5204  func (c *ProjectsLocationsPreviewsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5205  	gensupport.SetOptions(c.urlParams_, opts...)
  5206  	res, err := c.doRequest("json")
  5207  	if res != nil && res.StatusCode == http.StatusNotModified {
  5208  		if res.Body != nil {
  5209  			res.Body.Close()
  5210  		}
  5211  		return nil, gensupport.WrapError(&googleapi.Error{
  5212  			Code:   res.StatusCode,
  5213  			Header: res.Header,
  5214  		})
  5215  	}
  5216  	if err != nil {
  5217  		return nil, err
  5218  	}
  5219  	defer googleapi.CloseBody(res)
  5220  	if err := googleapi.CheckResponse(res); err != nil {
  5221  		return nil, gensupport.WrapError(err)
  5222  	}
  5223  	ret := &Operation{
  5224  		ServerResponse: googleapi.ServerResponse{
  5225  			Header:         res.Header,
  5226  			HTTPStatusCode: res.StatusCode,
  5227  		},
  5228  	}
  5229  	target := &ret
  5230  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5231  		return nil, err
  5232  	}
  5233  	return ret, nil
  5234  }
  5235  
  5236  type ProjectsLocationsPreviewsDeleteCall struct {
  5237  	s          *Service
  5238  	name       string
  5239  	urlParams_ gensupport.URLParams
  5240  	ctx_       context.Context
  5241  	header_    http.Header
  5242  }
  5243  
  5244  // Delete: Deletes a Preview.
  5245  //
  5246  //   - name: The name of the Preview in the format:
  5247  //     'projects/{project_id}/locations/{location}/previews/{preview}'.
  5248  func (r *ProjectsLocationsPreviewsService) Delete(name string) *ProjectsLocationsPreviewsDeleteCall {
  5249  	c := &ProjectsLocationsPreviewsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5250  	c.name = name
  5251  	return c
  5252  }
  5253  
  5254  // RequestId sets the optional parameter "requestId": An optional request ID to
  5255  // identify requests. Specify a unique request ID so that if you must retry
  5256  // your request, the server will know to ignore the request if it has already
  5257  // been completed. The server will guarantee that for at least 60 minutes after
  5258  // the first request. For example, consider a situation where you make an
  5259  // initial request and the request times out. If you make the request again
  5260  // with the same request ID, the server can check if original operation with
  5261  // the same request ID was received, and if so, will ignore the second request.
  5262  // This prevents clients from accidentally creating duplicate commitments. The
  5263  // request ID must be a valid UUID with the exception that zero UUID is not
  5264  // supported (00000000-0000-0000-0000-000000000000).
  5265  func (c *ProjectsLocationsPreviewsDeleteCall) RequestId(requestId string) *ProjectsLocationsPreviewsDeleteCall {
  5266  	c.urlParams_.Set("requestId", requestId)
  5267  	return c
  5268  }
  5269  
  5270  // Fields allows partial responses to be retrieved. See
  5271  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5272  // details.
  5273  func (c *ProjectsLocationsPreviewsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsPreviewsDeleteCall {
  5274  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5275  	return c
  5276  }
  5277  
  5278  // Context sets the context to be used in this call's Do method.
  5279  func (c *ProjectsLocationsPreviewsDeleteCall) Context(ctx context.Context) *ProjectsLocationsPreviewsDeleteCall {
  5280  	c.ctx_ = ctx
  5281  	return c
  5282  }
  5283  
  5284  // Header returns a http.Header that can be modified by the caller to add
  5285  // headers to the request.
  5286  func (c *ProjectsLocationsPreviewsDeleteCall) Header() http.Header {
  5287  	if c.header_ == nil {
  5288  		c.header_ = make(http.Header)
  5289  	}
  5290  	return c.header_
  5291  }
  5292  
  5293  func (c *ProjectsLocationsPreviewsDeleteCall) doRequest(alt string) (*http.Response, error) {
  5294  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5295  	var body io.Reader = nil
  5296  	c.urlParams_.Set("alt", alt)
  5297  	c.urlParams_.Set("prettyPrint", "false")
  5298  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5299  	urls += "?" + c.urlParams_.Encode()
  5300  	req, err := http.NewRequest("DELETE", urls, body)
  5301  	if err != nil {
  5302  		return nil, err
  5303  	}
  5304  	req.Header = reqHeaders
  5305  	googleapi.Expand(req.URL, map[string]string{
  5306  		"name": c.name,
  5307  	})
  5308  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5309  }
  5310  
  5311  // Do executes the "config.projects.locations.previews.delete" call.
  5312  // Any non-2xx status code is an error. Response headers are in either
  5313  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  5314  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5315  // whether the returned error was because http.StatusNotModified was returned.
  5316  func (c *ProjectsLocationsPreviewsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5317  	gensupport.SetOptions(c.urlParams_, opts...)
  5318  	res, err := c.doRequest("json")
  5319  	if res != nil && res.StatusCode == http.StatusNotModified {
  5320  		if res.Body != nil {
  5321  			res.Body.Close()
  5322  		}
  5323  		return nil, gensupport.WrapError(&googleapi.Error{
  5324  			Code:   res.StatusCode,
  5325  			Header: res.Header,
  5326  		})
  5327  	}
  5328  	if err != nil {
  5329  		return nil, err
  5330  	}
  5331  	defer googleapi.CloseBody(res)
  5332  	if err := googleapi.CheckResponse(res); err != nil {
  5333  		return nil, gensupport.WrapError(err)
  5334  	}
  5335  	ret := &Operation{
  5336  		ServerResponse: googleapi.ServerResponse{
  5337  			Header:         res.Header,
  5338  			HTTPStatusCode: res.StatusCode,
  5339  		},
  5340  	}
  5341  	target := &ret
  5342  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5343  		return nil, err
  5344  	}
  5345  	return ret, nil
  5346  }
  5347  
  5348  type ProjectsLocationsPreviewsExportCall struct {
  5349  	s                          *Service
  5350  	parent                     string
  5351  	exportpreviewresultrequest *ExportPreviewResultRequest
  5352  	urlParams_                 gensupport.URLParams
  5353  	ctx_                       context.Context
  5354  	header_                    http.Header
  5355  }
  5356  
  5357  // Export: Export Preview results.
  5358  //
  5359  //   - parent: The preview whose results should be exported. The preview value is
  5360  //     in the format:
  5361  //     'projects/{project_id}/locations/{location}/previews/{preview}'.
  5362  func (r *ProjectsLocationsPreviewsService) Export(parent string, exportpreviewresultrequest *ExportPreviewResultRequest) *ProjectsLocationsPreviewsExportCall {
  5363  	c := &ProjectsLocationsPreviewsExportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5364  	c.parent = parent
  5365  	c.exportpreviewresultrequest = exportpreviewresultrequest
  5366  	return c
  5367  }
  5368  
  5369  // Fields allows partial responses to be retrieved. See
  5370  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5371  // details.
  5372  func (c *ProjectsLocationsPreviewsExportCall) Fields(s ...googleapi.Field) *ProjectsLocationsPreviewsExportCall {
  5373  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5374  	return c
  5375  }
  5376  
  5377  // Context sets the context to be used in this call's Do method.
  5378  func (c *ProjectsLocationsPreviewsExportCall) Context(ctx context.Context) *ProjectsLocationsPreviewsExportCall {
  5379  	c.ctx_ = ctx
  5380  	return c
  5381  }
  5382  
  5383  // Header returns a http.Header that can be modified by the caller to add
  5384  // headers to the request.
  5385  func (c *ProjectsLocationsPreviewsExportCall) Header() http.Header {
  5386  	if c.header_ == nil {
  5387  		c.header_ = make(http.Header)
  5388  	}
  5389  	return c.header_
  5390  }
  5391  
  5392  func (c *ProjectsLocationsPreviewsExportCall) doRequest(alt string) (*http.Response, error) {
  5393  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5394  	var body io.Reader = nil
  5395  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.exportpreviewresultrequest)
  5396  	if err != nil {
  5397  		return nil, err
  5398  	}
  5399  	c.urlParams_.Set("alt", alt)
  5400  	c.urlParams_.Set("prettyPrint", "false")
  5401  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:export")
  5402  	urls += "?" + c.urlParams_.Encode()
  5403  	req, err := http.NewRequest("POST", urls, body)
  5404  	if err != nil {
  5405  		return nil, err
  5406  	}
  5407  	req.Header = reqHeaders
  5408  	googleapi.Expand(req.URL, map[string]string{
  5409  		"parent": c.parent,
  5410  	})
  5411  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5412  }
  5413  
  5414  // Do executes the "config.projects.locations.previews.export" call.
  5415  // Any non-2xx status code is an error. Response headers are in either
  5416  // *ExportPreviewResultResponse.ServerResponse.Header or (if a response was
  5417  // returned at all) in error.(*googleapi.Error).Header. Use
  5418  // googleapi.IsNotModified to check whether the returned error was because
  5419  // http.StatusNotModified was returned.
  5420  func (c *ProjectsLocationsPreviewsExportCall) Do(opts ...googleapi.CallOption) (*ExportPreviewResultResponse, error) {
  5421  	gensupport.SetOptions(c.urlParams_, opts...)
  5422  	res, err := c.doRequest("json")
  5423  	if res != nil && res.StatusCode == http.StatusNotModified {
  5424  		if res.Body != nil {
  5425  			res.Body.Close()
  5426  		}
  5427  		return nil, gensupport.WrapError(&googleapi.Error{
  5428  			Code:   res.StatusCode,
  5429  			Header: res.Header,
  5430  		})
  5431  	}
  5432  	if err != nil {
  5433  		return nil, err
  5434  	}
  5435  	defer googleapi.CloseBody(res)
  5436  	if err := googleapi.CheckResponse(res); err != nil {
  5437  		return nil, gensupport.WrapError(err)
  5438  	}
  5439  	ret := &ExportPreviewResultResponse{
  5440  		ServerResponse: googleapi.ServerResponse{
  5441  			Header:         res.Header,
  5442  			HTTPStatusCode: res.StatusCode,
  5443  		},
  5444  	}
  5445  	target := &ret
  5446  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5447  		return nil, err
  5448  	}
  5449  	return ret, nil
  5450  }
  5451  
  5452  type ProjectsLocationsPreviewsGetCall struct {
  5453  	s            *Service
  5454  	name         string
  5455  	urlParams_   gensupport.URLParams
  5456  	ifNoneMatch_ string
  5457  	ctx_         context.Context
  5458  	header_      http.Header
  5459  }
  5460  
  5461  // Get: Gets details about a Preview.
  5462  //
  5463  //   - name: The name of the preview. Format:
  5464  //     'projects/{project_id}/locations/{location}/previews/{preview}'.
  5465  func (r *ProjectsLocationsPreviewsService) Get(name string) *ProjectsLocationsPreviewsGetCall {
  5466  	c := &ProjectsLocationsPreviewsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5467  	c.name = name
  5468  	return c
  5469  }
  5470  
  5471  // Fields allows partial responses to be retrieved. See
  5472  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5473  // details.
  5474  func (c *ProjectsLocationsPreviewsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsPreviewsGetCall {
  5475  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5476  	return c
  5477  }
  5478  
  5479  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5480  // object's ETag matches the given value. This is useful for getting updates
  5481  // only after the object has changed since the last request.
  5482  func (c *ProjectsLocationsPreviewsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsPreviewsGetCall {
  5483  	c.ifNoneMatch_ = entityTag
  5484  	return c
  5485  }
  5486  
  5487  // Context sets the context to be used in this call's Do method.
  5488  func (c *ProjectsLocationsPreviewsGetCall) Context(ctx context.Context) *ProjectsLocationsPreviewsGetCall {
  5489  	c.ctx_ = ctx
  5490  	return c
  5491  }
  5492  
  5493  // Header returns a http.Header that can be modified by the caller to add
  5494  // headers to the request.
  5495  func (c *ProjectsLocationsPreviewsGetCall) Header() http.Header {
  5496  	if c.header_ == nil {
  5497  		c.header_ = make(http.Header)
  5498  	}
  5499  	return c.header_
  5500  }
  5501  
  5502  func (c *ProjectsLocationsPreviewsGetCall) doRequest(alt string) (*http.Response, error) {
  5503  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5504  	if c.ifNoneMatch_ != "" {
  5505  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5506  	}
  5507  	var body io.Reader = nil
  5508  	c.urlParams_.Set("alt", alt)
  5509  	c.urlParams_.Set("prettyPrint", "false")
  5510  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5511  	urls += "?" + c.urlParams_.Encode()
  5512  	req, err := http.NewRequest("GET", urls, body)
  5513  	if err != nil {
  5514  		return nil, err
  5515  	}
  5516  	req.Header = reqHeaders
  5517  	googleapi.Expand(req.URL, map[string]string{
  5518  		"name": c.name,
  5519  	})
  5520  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5521  }
  5522  
  5523  // Do executes the "config.projects.locations.previews.get" call.
  5524  // Any non-2xx status code is an error. Response headers are in either
  5525  // *Preview.ServerResponse.Header or (if a response was returned at all) in
  5526  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5527  // whether the returned error was because http.StatusNotModified was returned.
  5528  func (c *ProjectsLocationsPreviewsGetCall) Do(opts ...googleapi.CallOption) (*Preview, error) {
  5529  	gensupport.SetOptions(c.urlParams_, opts...)
  5530  	res, err := c.doRequest("json")
  5531  	if res != nil && res.StatusCode == http.StatusNotModified {
  5532  		if res.Body != nil {
  5533  			res.Body.Close()
  5534  		}
  5535  		return nil, gensupport.WrapError(&googleapi.Error{
  5536  			Code:   res.StatusCode,
  5537  			Header: res.Header,
  5538  		})
  5539  	}
  5540  	if err != nil {
  5541  		return nil, err
  5542  	}
  5543  	defer googleapi.CloseBody(res)
  5544  	if err := googleapi.CheckResponse(res); err != nil {
  5545  		return nil, gensupport.WrapError(err)
  5546  	}
  5547  	ret := &Preview{
  5548  		ServerResponse: googleapi.ServerResponse{
  5549  			Header:         res.Header,
  5550  			HTTPStatusCode: res.StatusCode,
  5551  		},
  5552  	}
  5553  	target := &ret
  5554  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5555  		return nil, err
  5556  	}
  5557  	return ret, nil
  5558  }
  5559  
  5560  type ProjectsLocationsPreviewsListCall struct {
  5561  	s            *Service
  5562  	parent       string
  5563  	urlParams_   gensupport.URLParams
  5564  	ifNoneMatch_ string
  5565  	ctx_         context.Context
  5566  	header_      http.Header
  5567  }
  5568  
  5569  // List: Lists Previews in a given project and location.
  5570  //
  5571  //   - parent: The parent in whose context the Previews are listed. The parent
  5572  //     value is in the format: 'projects/{project_id}/locations/{location}'.
  5573  func (r *ProjectsLocationsPreviewsService) List(parent string) *ProjectsLocationsPreviewsListCall {
  5574  	c := &ProjectsLocationsPreviewsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5575  	c.parent = parent
  5576  	return c
  5577  }
  5578  
  5579  // Filter sets the optional parameter "filter": Lists the Deployments that
  5580  // match the filter expression. A filter expression filters the resources
  5581  // listed in the response. The expression must be of the form '{field}
  5582  // {operator} {value}' where operators: '<', '>', '<=', '>=', '!=', '=', ':'
  5583  // are supported (colon ':' represents a HAS operator which is roughly
  5584  // synonymous with equality). {field} can refer to a proto or JSON field, or a
  5585  // synthetic field. Field names can be camelCase or snake_case. Examples: -
  5586  // Filter by name: name = "projects/foo/locations/us-central1/deployments/bar -
  5587  // Filter by labels: - Resources that have a key called 'foo' labels.foo:* -
  5588  // Resources that have a key called 'foo' whose value is 'bar' labels.foo = bar
  5589  // - Filter by state: - Deployments in CREATING state. state=CREATING
  5590  func (c *ProjectsLocationsPreviewsListCall) Filter(filter string) *ProjectsLocationsPreviewsListCall {
  5591  	c.urlParams_.Set("filter", filter)
  5592  	return c
  5593  }
  5594  
  5595  // OrderBy sets the optional parameter "orderBy": Field to use to sort the
  5596  // list.
  5597  func (c *ProjectsLocationsPreviewsListCall) OrderBy(orderBy string) *ProjectsLocationsPreviewsListCall {
  5598  	c.urlParams_.Set("orderBy", orderBy)
  5599  	return c
  5600  }
  5601  
  5602  // PageSize sets the optional parameter "pageSize": When requesting a page of
  5603  // resources, 'page_size' specifies number of resources to return. If
  5604  // unspecified, at most 500 will be returned. The maximum value is 1000.
  5605  func (c *ProjectsLocationsPreviewsListCall) PageSize(pageSize int64) *ProjectsLocationsPreviewsListCall {
  5606  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5607  	return c
  5608  }
  5609  
  5610  // PageToken sets the optional parameter "pageToken": Token returned by
  5611  // previous call to 'ListDeployments' which specifies the position in the list
  5612  // from where to continue listing the resources.
  5613  func (c *ProjectsLocationsPreviewsListCall) PageToken(pageToken string) *ProjectsLocationsPreviewsListCall {
  5614  	c.urlParams_.Set("pageToken", pageToken)
  5615  	return c
  5616  }
  5617  
  5618  // Fields allows partial responses to be retrieved. See
  5619  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5620  // details.
  5621  func (c *ProjectsLocationsPreviewsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsPreviewsListCall {
  5622  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5623  	return c
  5624  }
  5625  
  5626  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5627  // object's ETag matches the given value. This is useful for getting updates
  5628  // only after the object has changed since the last request.
  5629  func (c *ProjectsLocationsPreviewsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsPreviewsListCall {
  5630  	c.ifNoneMatch_ = entityTag
  5631  	return c
  5632  }
  5633  
  5634  // Context sets the context to be used in this call's Do method.
  5635  func (c *ProjectsLocationsPreviewsListCall) Context(ctx context.Context) *ProjectsLocationsPreviewsListCall {
  5636  	c.ctx_ = ctx
  5637  	return c
  5638  }
  5639  
  5640  // Header returns a http.Header that can be modified by the caller to add
  5641  // headers to the request.
  5642  func (c *ProjectsLocationsPreviewsListCall) Header() http.Header {
  5643  	if c.header_ == nil {
  5644  		c.header_ = make(http.Header)
  5645  	}
  5646  	return c.header_
  5647  }
  5648  
  5649  func (c *ProjectsLocationsPreviewsListCall) doRequest(alt string) (*http.Response, error) {
  5650  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5651  	if c.ifNoneMatch_ != "" {
  5652  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5653  	}
  5654  	var body io.Reader = nil
  5655  	c.urlParams_.Set("alt", alt)
  5656  	c.urlParams_.Set("prettyPrint", "false")
  5657  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/previews")
  5658  	urls += "?" + c.urlParams_.Encode()
  5659  	req, err := http.NewRequest("GET", urls, body)
  5660  	if err != nil {
  5661  		return nil, err
  5662  	}
  5663  	req.Header = reqHeaders
  5664  	googleapi.Expand(req.URL, map[string]string{
  5665  		"parent": c.parent,
  5666  	})
  5667  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5668  }
  5669  
  5670  // Do executes the "config.projects.locations.previews.list" call.
  5671  // Any non-2xx status code is an error. Response headers are in either
  5672  // *ListPreviewsResponse.ServerResponse.Header or (if a response was returned
  5673  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5674  // check whether the returned error was because http.StatusNotModified was
  5675  // returned.
  5676  func (c *ProjectsLocationsPreviewsListCall) Do(opts ...googleapi.CallOption) (*ListPreviewsResponse, error) {
  5677  	gensupport.SetOptions(c.urlParams_, opts...)
  5678  	res, err := c.doRequest("json")
  5679  	if res != nil && res.StatusCode == http.StatusNotModified {
  5680  		if res.Body != nil {
  5681  			res.Body.Close()
  5682  		}
  5683  		return nil, gensupport.WrapError(&googleapi.Error{
  5684  			Code:   res.StatusCode,
  5685  			Header: res.Header,
  5686  		})
  5687  	}
  5688  	if err != nil {
  5689  		return nil, err
  5690  	}
  5691  	defer googleapi.CloseBody(res)
  5692  	if err := googleapi.CheckResponse(res); err != nil {
  5693  		return nil, gensupport.WrapError(err)
  5694  	}
  5695  	ret := &ListPreviewsResponse{
  5696  		ServerResponse: googleapi.ServerResponse{
  5697  			Header:         res.Header,
  5698  			HTTPStatusCode: res.StatusCode,
  5699  		},
  5700  	}
  5701  	target := &ret
  5702  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5703  		return nil, err
  5704  	}
  5705  	return ret, nil
  5706  }
  5707  
  5708  // Pages invokes f for each page of results.
  5709  // A non-nil error returned from f will halt the iteration.
  5710  // The provided context supersedes any context provided to the Context method.
  5711  func (c *ProjectsLocationsPreviewsListCall) Pages(ctx context.Context, f func(*ListPreviewsResponse) error) error {
  5712  	c.ctx_ = ctx
  5713  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  5714  	for {
  5715  		x, err := c.Do()
  5716  		if err != nil {
  5717  			return err
  5718  		}
  5719  		if err := f(x); err != nil {
  5720  			return err
  5721  		}
  5722  		if x.NextPageToken == "" {
  5723  			return nil
  5724  		}
  5725  		c.PageToken(x.NextPageToken)
  5726  	}
  5727  }
  5728  
  5729  type ProjectsLocationsTerraformVersionsGetCall struct {
  5730  	s            *Service
  5731  	name         string
  5732  	urlParams_   gensupport.URLParams
  5733  	ifNoneMatch_ string
  5734  	ctx_         context.Context
  5735  	header_      http.Header
  5736  }
  5737  
  5738  // Get: Gets details about a TerraformVersion.
  5739  //
  5740  //   - name: The name of the TerraformVersion. Format:
  5741  //     'projects/{project_id}/locations/{location}/terraformVersions/{terraform_ve
  5742  //     rsion}'.
  5743  func (r *ProjectsLocationsTerraformVersionsService) Get(name string) *ProjectsLocationsTerraformVersionsGetCall {
  5744  	c := &ProjectsLocationsTerraformVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5745  	c.name = name
  5746  	return c
  5747  }
  5748  
  5749  // Fields allows partial responses to be retrieved. See
  5750  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5751  // details.
  5752  func (c *ProjectsLocationsTerraformVersionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsTerraformVersionsGetCall {
  5753  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5754  	return c
  5755  }
  5756  
  5757  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5758  // object's ETag matches the given value. This is useful for getting updates
  5759  // only after the object has changed since the last request.
  5760  func (c *ProjectsLocationsTerraformVersionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsTerraformVersionsGetCall {
  5761  	c.ifNoneMatch_ = entityTag
  5762  	return c
  5763  }
  5764  
  5765  // Context sets the context to be used in this call's Do method.
  5766  func (c *ProjectsLocationsTerraformVersionsGetCall) Context(ctx context.Context) *ProjectsLocationsTerraformVersionsGetCall {
  5767  	c.ctx_ = ctx
  5768  	return c
  5769  }
  5770  
  5771  // Header returns a http.Header that can be modified by the caller to add
  5772  // headers to the request.
  5773  func (c *ProjectsLocationsTerraformVersionsGetCall) Header() http.Header {
  5774  	if c.header_ == nil {
  5775  		c.header_ = make(http.Header)
  5776  	}
  5777  	return c.header_
  5778  }
  5779  
  5780  func (c *ProjectsLocationsTerraformVersionsGetCall) doRequest(alt string) (*http.Response, error) {
  5781  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5782  	if c.ifNoneMatch_ != "" {
  5783  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5784  	}
  5785  	var body io.Reader = nil
  5786  	c.urlParams_.Set("alt", alt)
  5787  	c.urlParams_.Set("prettyPrint", "false")
  5788  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5789  	urls += "?" + c.urlParams_.Encode()
  5790  	req, err := http.NewRequest("GET", urls, body)
  5791  	if err != nil {
  5792  		return nil, err
  5793  	}
  5794  	req.Header = reqHeaders
  5795  	googleapi.Expand(req.URL, map[string]string{
  5796  		"name": c.name,
  5797  	})
  5798  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5799  }
  5800  
  5801  // Do executes the "config.projects.locations.terraformVersions.get" call.
  5802  // Any non-2xx status code is an error. Response headers are in either
  5803  // *TerraformVersion.ServerResponse.Header or (if a response was returned at
  5804  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5805  // check whether the returned error was because http.StatusNotModified was
  5806  // returned.
  5807  func (c *ProjectsLocationsTerraformVersionsGetCall) Do(opts ...googleapi.CallOption) (*TerraformVersion, error) {
  5808  	gensupport.SetOptions(c.urlParams_, opts...)
  5809  	res, err := c.doRequest("json")
  5810  	if res != nil && res.StatusCode == http.StatusNotModified {
  5811  		if res.Body != nil {
  5812  			res.Body.Close()
  5813  		}
  5814  		return nil, gensupport.WrapError(&googleapi.Error{
  5815  			Code:   res.StatusCode,
  5816  			Header: res.Header,
  5817  		})
  5818  	}
  5819  	if err != nil {
  5820  		return nil, err
  5821  	}
  5822  	defer googleapi.CloseBody(res)
  5823  	if err := googleapi.CheckResponse(res); err != nil {
  5824  		return nil, gensupport.WrapError(err)
  5825  	}
  5826  	ret := &TerraformVersion{
  5827  		ServerResponse: googleapi.ServerResponse{
  5828  			Header:         res.Header,
  5829  			HTTPStatusCode: res.StatusCode,
  5830  		},
  5831  	}
  5832  	target := &ret
  5833  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5834  		return nil, err
  5835  	}
  5836  	return ret, nil
  5837  }
  5838  
  5839  type ProjectsLocationsTerraformVersionsListCall struct {
  5840  	s            *Service
  5841  	parent       string
  5842  	urlParams_   gensupport.URLParams
  5843  	ifNoneMatch_ string
  5844  	ctx_         context.Context
  5845  	header_      http.Header
  5846  }
  5847  
  5848  // List: Lists TerraformVersions in a given project and location.
  5849  //
  5850  //   - parent: The parent in whose context the TerraformVersions are listed. The
  5851  //     parent value is in the format:
  5852  //     'projects/{project_id}/locations/{location}'.
  5853  func (r *ProjectsLocationsTerraformVersionsService) List(parent string) *ProjectsLocationsTerraformVersionsListCall {
  5854  	c := &ProjectsLocationsTerraformVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5855  	c.parent = parent
  5856  	return c
  5857  }
  5858  
  5859  // Filter sets the optional parameter "filter": Lists the TerraformVersions
  5860  // that match the filter expression. A filter expression filters the resources
  5861  // listed in the response. The expression must be of the form '{field}
  5862  // {operator} {value}' where operators: '<', '>', '<=', '>=', '!=', '=', ':'
  5863  // are supported (colon ':' represents a HAS operator which is roughly
  5864  // synonymous with equality). {field} can refer to a proto or JSON field, or a
  5865  // synthetic field. Field names can be camelCase or snake_case.
  5866  func (c *ProjectsLocationsTerraformVersionsListCall) Filter(filter string) *ProjectsLocationsTerraformVersionsListCall {
  5867  	c.urlParams_.Set("filter", filter)
  5868  	return c
  5869  }
  5870  
  5871  // OrderBy sets the optional parameter "orderBy": Field to use to sort the
  5872  // list.
  5873  func (c *ProjectsLocationsTerraformVersionsListCall) OrderBy(orderBy string) *ProjectsLocationsTerraformVersionsListCall {
  5874  	c.urlParams_.Set("orderBy", orderBy)
  5875  	return c
  5876  }
  5877  
  5878  // PageSize sets the optional parameter "pageSize": When requesting a page of
  5879  // resources, 'page_size' specifies number of resources to return. If
  5880  // unspecified, at most 500 will be returned. The maximum value is 1000.
  5881  func (c *ProjectsLocationsTerraformVersionsListCall) PageSize(pageSize int64) *ProjectsLocationsTerraformVersionsListCall {
  5882  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5883  	return c
  5884  }
  5885  
  5886  // PageToken sets the optional parameter "pageToken": Token returned by
  5887  // previous call to 'ListTerraformVersions' which specifies the position in the
  5888  // list from where to continue listing the resources.
  5889  func (c *ProjectsLocationsTerraformVersionsListCall) PageToken(pageToken string) *ProjectsLocationsTerraformVersionsListCall {
  5890  	c.urlParams_.Set("pageToken", pageToken)
  5891  	return c
  5892  }
  5893  
  5894  // Fields allows partial responses to be retrieved. See
  5895  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5896  // details.
  5897  func (c *ProjectsLocationsTerraformVersionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsTerraformVersionsListCall {
  5898  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5899  	return c
  5900  }
  5901  
  5902  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5903  // object's ETag matches the given value. This is useful for getting updates
  5904  // only after the object has changed since the last request.
  5905  func (c *ProjectsLocationsTerraformVersionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsTerraformVersionsListCall {
  5906  	c.ifNoneMatch_ = entityTag
  5907  	return c
  5908  }
  5909  
  5910  // Context sets the context to be used in this call's Do method.
  5911  func (c *ProjectsLocationsTerraformVersionsListCall) Context(ctx context.Context) *ProjectsLocationsTerraformVersionsListCall {
  5912  	c.ctx_ = ctx
  5913  	return c
  5914  }
  5915  
  5916  // Header returns a http.Header that can be modified by the caller to add
  5917  // headers to the request.
  5918  func (c *ProjectsLocationsTerraformVersionsListCall) Header() http.Header {
  5919  	if c.header_ == nil {
  5920  		c.header_ = make(http.Header)
  5921  	}
  5922  	return c.header_
  5923  }
  5924  
  5925  func (c *ProjectsLocationsTerraformVersionsListCall) doRequest(alt string) (*http.Response, error) {
  5926  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5927  	if c.ifNoneMatch_ != "" {
  5928  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5929  	}
  5930  	var body io.Reader = nil
  5931  	c.urlParams_.Set("alt", alt)
  5932  	c.urlParams_.Set("prettyPrint", "false")
  5933  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/terraformVersions")
  5934  	urls += "?" + c.urlParams_.Encode()
  5935  	req, err := http.NewRequest("GET", urls, body)
  5936  	if err != nil {
  5937  		return nil, err
  5938  	}
  5939  	req.Header = reqHeaders
  5940  	googleapi.Expand(req.URL, map[string]string{
  5941  		"parent": c.parent,
  5942  	})
  5943  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5944  }
  5945  
  5946  // Do executes the "config.projects.locations.terraformVersions.list" call.
  5947  // Any non-2xx status code is an error. Response headers are in either
  5948  // *ListTerraformVersionsResponse.ServerResponse.Header or (if a response was
  5949  // returned at all) in error.(*googleapi.Error).Header. Use
  5950  // googleapi.IsNotModified to check whether the returned error was because
  5951  // http.StatusNotModified was returned.
  5952  func (c *ProjectsLocationsTerraformVersionsListCall) Do(opts ...googleapi.CallOption) (*ListTerraformVersionsResponse, error) {
  5953  	gensupport.SetOptions(c.urlParams_, opts...)
  5954  	res, err := c.doRequest("json")
  5955  	if res != nil && res.StatusCode == http.StatusNotModified {
  5956  		if res.Body != nil {
  5957  			res.Body.Close()
  5958  		}
  5959  		return nil, gensupport.WrapError(&googleapi.Error{
  5960  			Code:   res.StatusCode,
  5961  			Header: res.Header,
  5962  		})
  5963  	}
  5964  	if err != nil {
  5965  		return nil, err
  5966  	}
  5967  	defer googleapi.CloseBody(res)
  5968  	if err := googleapi.CheckResponse(res); err != nil {
  5969  		return nil, gensupport.WrapError(err)
  5970  	}
  5971  	ret := &ListTerraformVersionsResponse{
  5972  		ServerResponse: googleapi.ServerResponse{
  5973  			Header:         res.Header,
  5974  			HTTPStatusCode: res.StatusCode,
  5975  		},
  5976  	}
  5977  	target := &ret
  5978  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5979  		return nil, err
  5980  	}
  5981  	return ret, nil
  5982  }
  5983  
  5984  // Pages invokes f for each page of results.
  5985  // A non-nil error returned from f will halt the iteration.
  5986  // The provided context supersedes any context provided to the Context method.
  5987  func (c *ProjectsLocationsTerraformVersionsListCall) Pages(ctx context.Context, f func(*ListTerraformVersionsResponse) error) error {
  5988  	c.ctx_ = ctx
  5989  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  5990  	for {
  5991  		x, err := c.Do()
  5992  		if err != nil {
  5993  			return err
  5994  		}
  5995  		if err := f(x); err != nil {
  5996  			return err
  5997  		}
  5998  		if x.NextPageToken == "" {
  5999  			return nil
  6000  		}
  6001  		c.PageToken(x.NextPageToken)
  6002  	}
  6003  }
  6004  

View as plain text