1// Copyright 2021 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 cloudbuild provides access to the Cloud Build API.
8//
9// For product documentation, see: https://cloud.google.com/cloud-build/docs/
10//
11// Creating a client
12//
13// Usage example:
14//
15//   import "google.golang.org/api/cloudbuild/v1alpha2"
16//   ...
17//   ctx := context.Background()
18//   cloudbuildService, err := cloudbuild.NewService(ctx)
19//
20// In this example, Google Application Default Credentials are used for authentication.
21//
22// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
23//
24// Other authentication options
25//
26// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
27//
28//   cloudbuildService, err := cloudbuild.NewService(ctx, option.WithAPIKey("AIza..."))
29//
30// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
31//
32//   config := &oauth2.Config{...}
33//   // ...
34//   token, err := config.Exchange(ctx, ...)
35//   cloudbuildService, err := cloudbuild.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
36//
37// See https://godoc.org/google.golang.org/api/option/ for details on options.
38package cloudbuild // import "google.golang.org/api/cloudbuild/v1alpha2"
39
40import (
41	"bytes"
42	"context"
43	"encoding/json"
44	"errors"
45	"fmt"
46	"io"
47	"net/http"
48	"net/url"
49	"strconv"
50	"strings"
51
52	googleapi "google.golang.org/api/googleapi"
53	gensupport "google.golang.org/api/internal/gensupport"
54	option "google.golang.org/api/option"
55	internaloption "google.golang.org/api/option/internaloption"
56	htransport "google.golang.org/api/transport/http"
57)
58
59// Always reference these packages, just in case the auto-generated code
60// below doesn't.
61var _ = bytes.NewBuffer
62var _ = strconv.Itoa
63var _ = fmt.Sprintf
64var _ = json.NewDecoder
65var _ = io.Copy
66var _ = url.Parse
67var _ = gensupport.MarshalJSON
68var _ = googleapi.Version
69var _ = errors.New
70var _ = strings.Replace
71var _ = context.Canceled
72var _ = internaloption.WithDefaultEndpoint
73
74const apiId = "cloudbuild:v1alpha2"
75const apiName = "cloudbuild"
76const apiVersion = "v1alpha2"
77const basePath = "https://cloudbuild.googleapis.com/"
78const mtlsBasePath = "https://cloudbuild.mtls.googleapis.com/"
79
80// OAuth2 scopes used by this API.
81const (
82	// See, edit, configure, and delete your Google Cloud Platform data
83	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
84)
85
86// NewService creates a new Service.
87func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
88	scopesOption := option.WithScopes(
89		"https://www.googleapis.com/auth/cloud-platform",
90	)
91	// NOTE: prepend, so we don't override user-specified scopes.
92	opts = append([]option.ClientOption{scopesOption}, opts...)
93	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
94	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
95	client, endpoint, err := htransport.NewClient(ctx, opts...)
96	if err != nil {
97		return nil, err
98	}
99	s, err := New(client)
100	if err != nil {
101		return nil, err
102	}
103	if endpoint != "" {
104		s.BasePath = endpoint
105	}
106	return s, nil
107}
108
109// New creates a new Service. It uses the provided http.Client for requests.
110//
111// Deprecated: please use NewService instead.
112// To provide a custom HTTP client, use option.WithHTTPClient.
113// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
114func New(client *http.Client) (*Service, error) {
115	if client == nil {
116		return nil, errors.New("client is nil")
117	}
118	s := &Service{client: client, BasePath: basePath}
119	s.Projects = NewProjectsService(s)
120	return s, nil
121}
122
123type Service struct {
124	client    *http.Client
125	BasePath  string // API endpoint base URL
126	UserAgent string // optional additional User-Agent fragment
127
128	Projects *ProjectsService
129}
130
131func (s *Service) userAgent() string {
132	if s.UserAgent == "" {
133		return googleapi.UserAgent
134	}
135	return googleapi.UserAgent + " " + s.UserAgent
136}
137
138func NewProjectsService(s *Service) *ProjectsService {
139	rs := &ProjectsService{s: s}
140	rs.Locations = NewProjectsLocationsService(s)
141	rs.WorkerPools = NewProjectsWorkerPoolsService(s)
142	return rs
143}
144
145type ProjectsService struct {
146	s *Service
147
148	Locations *ProjectsLocationsService
149
150	WorkerPools *ProjectsWorkerPoolsService
151}
152
153func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
154	rs := &ProjectsLocationsService{s: s}
155	rs.Operations = NewProjectsLocationsOperationsService(s)
156	return rs
157}
158
159type ProjectsLocationsService struct {
160	s *Service
161
162	Operations *ProjectsLocationsOperationsService
163}
164
165func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
166	rs := &ProjectsLocationsOperationsService{s: s}
167	return rs
168}
169
170type ProjectsLocationsOperationsService struct {
171	s *Service
172}
173
174func NewProjectsWorkerPoolsService(s *Service) *ProjectsWorkerPoolsService {
175	rs := &ProjectsWorkerPoolsService{s: s}
176	return rs
177}
178
179type ProjectsWorkerPoolsService struct {
180	s *Service
181}
182
183// ArtifactObjects: Files in the workspace to upload to Cloud Storage
184// upon successful completion of all build steps.
185type ArtifactObjects struct {
186	// Location: Cloud Storage bucket and optional object path, in the form
187	// "gs://bucket/path/to/somewhere/". (see Bucket Name Requirements
188	// (https://cloud.google.com/storage/docs/bucket-naming#requirements)).
189	// Files in the workspace matching any path pattern will be uploaded to
190	// Cloud Storage with this location as a prefix.
191	Location string `json:"location,omitempty"`
192
193	// Paths: Path globs used to match files in the build's workspace.
194	Paths []string `json:"paths,omitempty"`
195
196	// Timing: Output only. Stores timing information for pushing all
197	// artifact objects.
198	Timing *TimeSpan `json:"timing,omitempty"`
199
200	// ForceSendFields is a list of field names (e.g. "Location") to
201	// unconditionally include in API requests. By default, fields with
202	// empty values are omitted from API requests. However, any non-pointer,
203	// non-interface field appearing in ForceSendFields will be sent to the
204	// server regardless of whether the field is empty or not. This may be
205	// used to include empty fields in Patch requests.
206	ForceSendFields []string `json:"-"`
207
208	// NullFields is a list of field names (e.g. "Location") to include in
209	// API requests with the JSON null value. By default, fields with empty
210	// values are omitted from API requests. However, any field with an
211	// empty value appearing in NullFields will be sent to the server as
212	// null. It is an error if a field in this list has a non-empty value.
213	// This may be used to include null fields in Patch requests.
214	NullFields []string `json:"-"`
215}
216
217func (s *ArtifactObjects) MarshalJSON() ([]byte, error) {
218	type NoMethod ArtifactObjects
219	raw := NoMethod(*s)
220	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
221}
222
223// ArtifactResult: An artifact that was uploaded during a build. This is
224// a single record in the artifact manifest JSON file.
225type ArtifactResult struct {
226	// FileHash: The file hash of the artifact.
227	FileHash []*FileHashes `json:"fileHash,omitempty"`
228
229	// Location: The path of an artifact in a Google Cloud Storage bucket,
230	// with the generation number. For example,
231	// `gs://mybucket/path/to/output.jar#generation`.
232	Location string `json:"location,omitempty"`
233
234	// ForceSendFields is a list of field names (e.g. "FileHash") to
235	// unconditionally include in API requests. By default, fields with
236	// empty values are omitted from API requests. However, any non-pointer,
237	// non-interface field appearing in ForceSendFields will be sent to the
238	// server regardless of whether the field is empty or not. This may be
239	// used to include empty fields in Patch requests.
240	ForceSendFields []string `json:"-"`
241
242	// NullFields is a list of field names (e.g. "FileHash") to include in
243	// API requests with the JSON null value. By default, fields with empty
244	// values are omitted from API requests. However, any field with an
245	// empty value appearing in NullFields will be sent to the server as
246	// null. It is an error if a field in this list has a non-empty value.
247	// This may be used to include null fields in Patch requests.
248	NullFields []string `json:"-"`
249}
250
251func (s *ArtifactResult) MarshalJSON() ([]byte, error) {
252	type NoMethod ArtifactResult
253	raw := NoMethod(*s)
254	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
255}
256
257// Artifacts: Artifacts produced by a build that should be uploaded upon
258// successful completion of all build steps.
259type Artifacts struct {
260	// Images: A list of images to be pushed upon the successful completion
261	// of all build steps. The images will be pushed using the builder
262	// service account's credentials. The digests of the pushed images will
263	// be stored in the Build resource's results field. If any of the images
264	// fail to be pushed, the build is marked FAILURE.
265	Images []string `json:"images,omitempty"`
266
267	// Objects: A list of objects to be uploaded to Cloud Storage upon
268	// successful completion of all build steps. Files in the workspace
269	// matching specified paths globs will be uploaded to the specified
270	// Cloud Storage location using the builder service account's
271	// credentials. The location and generation of the uploaded objects will
272	// be stored in the Build resource's results field. If any objects fail
273	// to be pushed, the build is marked FAILURE.
274	Objects *ArtifactObjects `json:"objects,omitempty"`
275
276	// ForceSendFields is a list of field names (e.g. "Images") to
277	// unconditionally include in API requests. By default, fields with
278	// empty values are omitted from API requests. However, any non-pointer,
279	// non-interface field appearing in ForceSendFields will be sent to the
280	// server regardless of whether the field is empty or not. This may be
281	// used to include empty fields in Patch requests.
282	ForceSendFields []string `json:"-"`
283
284	// NullFields is a list of field names (e.g. "Images") to include in API
285	// requests with the JSON null value. By default, fields with empty
286	// values are omitted from API requests. However, any field with an
287	// empty value appearing in NullFields will be sent to the server as
288	// null. It is an error if a field in this list has a non-empty value.
289	// This may be used to include null fields in Patch requests.
290	NullFields []string `json:"-"`
291}
292
293func (s *Artifacts) MarshalJSON() ([]byte, error) {
294	type NoMethod Artifacts
295	raw := NoMethod(*s)
296	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
297}
298
299// Build: A build resource in the Cloud Build API. At a high level, a
300// `Build` describes where to find source code, how to build it (for
301// example, the builder image to run on the source), and where to store
302// the built artifacts. Fields can include the following variables,
303// which will be expanded when the build is created: - $PROJECT_ID: the
304// project ID of the build. - $PROJECT_NUMBER: the project number of the
305// build. - $BUILD_ID: the autogenerated ID of the build. - $REPO_NAME:
306// the source repository name specified by RepoSource. - $BRANCH_NAME:
307// the branch name specified by RepoSource. - $TAG_NAME: the tag name
308// specified by RepoSource. - $REVISION_ID or $COMMIT_SHA: the commit
309// SHA specified by RepoSource or resolved from the specified branch or
310// tag. - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.
311type Build struct {
312	// Artifacts: Artifacts produced by the build that should be uploaded
313	// upon successful completion of all build steps.
314	Artifacts *Artifacts `json:"artifacts,omitempty"`
315
316	// AvailableSecrets: Secrets and secret environment variables.
317	AvailableSecrets *Secrets `json:"availableSecrets,omitempty"`
318
319	// BuildTriggerId: Output only. The ID of the `BuildTrigger` that
320	// triggered this build, if it was triggered automatically.
321	BuildTriggerId string `json:"buildTriggerId,omitempty"`
322
323	// CreateTime: Output only. Time at which the request to create the
324	// build was received.
325	CreateTime string `json:"createTime,omitempty"`
326
327	// FinishTime: Output only. Time at which execution of the build was
328	// finished. The difference between finish_time and start_time is the
329	// duration of the build's execution.
330	FinishTime string `json:"finishTime,omitempty"`
331
332	// Id: Output only. Unique identifier of the build.
333	Id string `json:"id,omitempty"`
334
335	// Images: A list of images to be pushed upon the successful completion
336	// of all build steps. The images are pushed using the builder service
337	// account's credentials. The digests of the pushed images will be
338	// stored in the `Build` resource's results field. If any of the images
339	// fail to be pushed, the build status is marked `FAILURE`.
340	Images []string `json:"images,omitempty"`
341
342	// LogUrl: Output only. URL to logs for this build in Google Cloud
343	// Console.
344	LogUrl string `json:"logUrl,omitempty"`
345
346	// LogsBucket: Google Cloud Storage bucket where logs should be written
347	// (see Bucket Name Requirements
348	// (https://cloud.google.com/storage/docs/bucket-naming#requirements)).
349	// Logs file names will be of the format
350	// `${logs_bucket}/log-${build_id}.txt`.
351	LogsBucket string `json:"logsBucket,omitempty"`
352
353	// Name: Output only. The 'Build' name with format:
354	// `projects/{project}/locations/{location}/builds/{build}`, where
355	// {build} is a unique identifier generated by the service.
356	Name string `json:"name,omitempty"`
357
358	// Options: Special options for this build.
359	Options *BuildOptions `json:"options,omitempty"`
360
361	// ProjectId: Output only. ID of the project.
362	ProjectId string `json:"projectId,omitempty"`
363
364	// QueueTtl: TTL in queue for this build. If provided and the build is
365	// enqueued longer than this value, the build will expire and the build
366	// status will be `EXPIRED`. The TTL starts ticking from create_time.
367	QueueTtl string `json:"queueTtl,omitempty"`
368
369	// Results: Output only. Results of the build.
370	Results *Results `json:"results,omitempty"`
371
372	// Secrets: Secrets to decrypt using Cloud Key Management Service. Note:
373	// Secret Manager is the recommended technique for managing sensitive
374	// data with Cloud Build. Use `available_secrets` to configure builds to
375	// access secrets from Secret Manager. For instructions, see:
376	// https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets
377	Secrets []*Secret `json:"secrets,omitempty"`
378
379	// ServiceAccount: IAM service account whose credentials will be used at
380	// build runtime. Must be of the format
381	// `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. ACCOUNT can be
382	// email address or uniqueId of the service account. This field is in
383	// beta.
384	ServiceAccount string `json:"serviceAccount,omitempty"`
385
386	// Source: The location of the source files to build.
387	Source *Source `json:"source,omitempty"`
388
389	// SourceProvenance: Output only. A permanent fixed identifier for
390	// source.
391	SourceProvenance *SourceProvenance `json:"sourceProvenance,omitempty"`
392
393	// StartTime: Output only. Time at which execution of the build was
394	// started.
395	StartTime string `json:"startTime,omitempty"`
396
397	// Status: Output only. Status of the build.
398	//
399	// Possible values:
400	//   "STATUS_UNKNOWN" - Status of the build is unknown.
401	//   "QUEUED" - Build or step is queued; work has not yet begun.
402	//   "WORKING" - Build or step is being executed.
403	//   "SUCCESS" - Build or step finished successfully.
404	//   "FAILURE" - Build or step failed to complete successfully.
405	//   "INTERNAL_ERROR" - Build or step failed due to an internal cause.
406	//   "TIMEOUT" - Build or step took longer than was allowed.
407	//   "CANCELLED" - Build or step was canceled by a user.
408	//   "EXPIRED" - Build was enqueued for longer than the value of
409	// `queue_ttl`.
410	Status string `json:"status,omitempty"`
411
412	// StatusDetail: Output only. Customer-readable message about the
413	// current status.
414	StatusDetail string `json:"statusDetail,omitempty"`
415
416	// Steps: Required. The operations to be performed on the workspace.
417	Steps []*BuildStep `json:"steps,omitempty"`
418
419	// Substitutions: Substitutions data for `Build` resource.
420	Substitutions map[string]string `json:"substitutions,omitempty"`
421
422	// Tags: Tags for annotation of a `Build`. These are not docker tags.
423	Tags []string `json:"tags,omitempty"`
424
425	// Timeout: Amount of time that this build should be allowed to run, to
426	// second granularity. If this amount of time elapses, work on the build
427	// will cease and the build status will be `TIMEOUT`. `timeout` starts
428	// ticking from `startTime`. Default time is ten minutes.
429	Timeout string `json:"timeout,omitempty"`
430
431	// Timing: Output only. Stores timing information for phases of the
432	// build. Valid keys are: * BUILD: time to execute all build steps *
433	// PUSH: time to push all specified images. * FETCHSOURCE: time to fetch
434	// source. If the build does not specify source or images, these keys
435	// will not be included.
436	Timing map[string]TimeSpan `json:"timing,omitempty"`
437
438	// ForceSendFields is a list of field names (e.g. "Artifacts") to
439	// unconditionally include in API requests. By default, fields with
440	// empty values are omitted from API requests. However, any non-pointer,
441	// non-interface field appearing in ForceSendFields will be sent to the
442	// server regardless of whether the field is empty or not. This may be
443	// used to include empty fields in Patch requests.
444	ForceSendFields []string `json:"-"`
445
446	// NullFields is a list of field names (e.g. "Artifacts") to include in
447	// API requests with the JSON null value. By default, fields with empty
448	// values are omitted from API requests. However, any field with an
449	// empty value appearing in NullFields will be sent to the server as
450	// null. It is an error if a field in this list has a non-empty value.
451	// This may be used to include null fields in Patch requests.
452	NullFields []string `json:"-"`
453}
454
455func (s *Build) MarshalJSON() ([]byte, error) {
456	type NoMethod Build
457	raw := NoMethod(*s)
458	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
459}
460
461// BuildOperationMetadata: Metadata for build operations.
462type BuildOperationMetadata struct {
463	// Build: The build that the operation is tracking.
464	Build *Build `json:"build,omitempty"`
465
466	// ForceSendFields is a list of field names (e.g. "Build") to
467	// unconditionally include in API requests. By default, fields with
468	// empty values are omitted from API requests. However, any non-pointer,
469	// non-interface field appearing in ForceSendFields will be sent to the
470	// server regardless of whether the field is empty or not. This may be
471	// used to include empty fields in Patch requests.
472	ForceSendFields []string `json:"-"`
473
474	// NullFields is a list of field names (e.g. "Build") to include in API
475	// requests with the JSON null value. By default, fields with empty
476	// values are omitted from API requests. However, any field with an
477	// empty value appearing in NullFields will be sent to the server as
478	// null. It is an error if a field in this list has a non-empty value.
479	// This may be used to include null fields in Patch requests.
480	NullFields []string `json:"-"`
481}
482
483func (s *BuildOperationMetadata) MarshalJSON() ([]byte, error) {
484	type NoMethod BuildOperationMetadata
485	raw := NoMethod(*s)
486	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
487}
488
489// BuildOptions: Optional arguments to enable specific features of
490// builds.
491type BuildOptions struct {
492	// DiskSizeGb: Requested disk size for the VM that runs the build. Note
493	// that this is *NOT* "disk free"; some of the space will be used by the
494	// operating system and build utilities. Also note that this is the
495	// minimum disk size that will be allocated for the build -- the build
496	// may run with a larger disk than requested. At present, the maximum
497	// disk size is 1000GB; builds that request more than the maximum are
498	// rejected with an error.
499	DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"`
500
501	// DynamicSubstitutions: Option to specify whether or not to apply bash
502	// style string operations to the substitutions. NOTE: this is always
503	// enabled for triggered builds and cannot be overridden in the build
504	// configuration file.
505	DynamicSubstitutions bool `json:"dynamicSubstitutions,omitempty"`
506
507	// Env: A list of global environment variable definitions that will
508	// exist for all build steps in this build. If a variable is defined in
509	// both globally and in a build step, the variable will use the build
510	// step value. The elements are of the form "KEY=VALUE" for the
511	// environment variable "KEY" being given the value "VALUE".
512	Env []string `json:"env,omitempty"`
513
514	// LogStreamingOption: Option to define build log streaming behavior to
515	// Google Cloud Storage.
516	//
517	// Possible values:
518	//   "STREAM_DEFAULT" - Service may automatically determine build log
519	// streaming behavior.
520	//   "STREAM_ON" - Build logs should be streamed to Google Cloud
521	// Storage.
522	//   "STREAM_OFF" - Build logs should not be streamed to Google Cloud
523	// Storage; they will be written when the build is completed.
524	LogStreamingOption string `json:"logStreamingOption,omitempty"`
525
526	// Logging: Option to specify the logging mode, which determines if and
527	// where build logs are stored.
528	//
529	// Possible values:
530	//   "LOGGING_UNSPECIFIED" - The service determines the logging mode.
531	// The default is `LEGACY`. Do not rely on the default logging behavior
532	// as it may change in the future.
533	//   "LEGACY" - Cloud Logging and Cloud Storage logging are enabled.
534	//   "GCS_ONLY" - Only Cloud Storage logging is enabled.
535	//   "STACKDRIVER_ONLY" - This option is the same as CLOUD_LOGGING_ONLY.
536	//   "CLOUD_LOGGING_ONLY" - Only Cloud Logging is enabled. Note that
537	// logs for both the Cloud Console UI and Cloud SDK are based on Cloud
538	// Storage logs, so neither will provide logs if this option is chosen.
539	//   "NONE" - Turn off all logging. No build logs will be captured.
540	Logging string `json:"logging,omitempty"`
541
542	// MachineType: Compute Engine machine type on which to run the build.
543	//
544	// Possible values:
545	//   "UNSPECIFIED" - Standard machine type.
546	//   "N1_HIGHCPU_8" - Highcpu machine with 8 CPUs.
547	//   "N1_HIGHCPU_32" - Highcpu machine with 32 CPUs.
548	//   "E2_HIGHCPU_8" - Highcpu e2 machine with 8 CPUs.
549	//   "E2_HIGHCPU_32" - Highcpu e2 machine with 32 CPUs.
550	MachineType string `json:"machineType,omitempty"`
551
552	// RequestedVerifyOption: Requested verifiability options.
553	//
554	// Possible values:
555	//   "NOT_VERIFIED" - Not a verifiable build. (default)
556	//   "VERIFIED" - Verified build.
557	RequestedVerifyOption string `json:"requestedVerifyOption,omitempty"`
558
559	// SecretEnv: A list of global environment variables, which are
560	// encrypted using a Cloud Key Management Service crypto key. These
561	// values must be specified in the build's `Secret`. These variables
562	// will be available to all build steps in this build.
563	SecretEnv []string `json:"secretEnv,omitempty"`
564
565	// SourceProvenanceHash: Requested hash for SourceProvenance.
566	//
567	// Possible values:
568	//   "NONE" - No hash requested.
569	//   "SHA256" - Use a sha256 hash.
570	//   "MD5" - Use a md5 hash.
571	SourceProvenanceHash []string `json:"sourceProvenanceHash,omitempty"`
572
573	// SubstitutionOption: Option to specify behavior when there is an error
574	// in the substitution checks. NOTE: this is always set to ALLOW_LOOSE
575	// for triggered builds and cannot be overridden in the build
576	// configuration file.
577	//
578	// Possible values:
579	//   "MUST_MATCH" - Fails the build if error in substitutions checks,
580	// like missing a substitution in the template or in the map.
581	//   "ALLOW_LOOSE" - Do not fail the build if error in substitutions
582	// checks.
583	SubstitutionOption string `json:"substitutionOption,omitempty"`
584
585	// Volumes: Global list of volumes to mount for ALL build steps Each
586	// volume is created as an empty volume prior to starting the build
587	// process. Upon completion of the build, volumes and their contents are
588	// discarded. Global volume names and paths cannot conflict with the
589	// volumes defined a build step. Using a global volume in a build with
590	// only one step is not valid as it is indicative of a build request
591	// with an incorrect configuration.
592	Volumes []*Volume `json:"volumes,omitempty"`
593
594	// WorkerPool: Option to specify a `WorkerPool` for the build. Format:
595	// projects/{project}/locations/{location}/workerPools/{workerPool} This
596	// field is in beta and is available only to restricted users.
597	WorkerPool string `json:"workerPool,omitempty"`
598
599	// ForceSendFields is a list of field names (e.g. "DiskSizeGb") to
600	// unconditionally include in API requests. By default, fields with
601	// empty values are omitted from API requests. However, any non-pointer,
602	// non-interface field appearing in ForceSendFields will be sent to the
603	// server regardless of whether the field is empty or not. This may be
604	// used to include empty fields in Patch requests.
605	ForceSendFields []string `json:"-"`
606
607	// NullFields is a list of field names (e.g. "DiskSizeGb") to include in
608	// API requests with the JSON null value. By default, fields with empty
609	// values are omitted from API requests. However, any field with an
610	// empty value appearing in NullFields will be sent to the server as
611	// null. It is an error if a field in this list has a non-empty value.
612	// This may be used to include null fields in Patch requests.
613	NullFields []string `json:"-"`
614}
615
616func (s *BuildOptions) MarshalJSON() ([]byte, error) {
617	type NoMethod BuildOptions
618	raw := NoMethod(*s)
619	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
620}
621
622// BuildStep: A step in the build pipeline.
623type BuildStep struct {
624	// Args: A list of arguments that will be presented to the step when it
625	// is started. If the image used to run the step's container has an
626	// entrypoint, the `args` are used as arguments to that entrypoint. If
627	// the image does not define an entrypoint, the first element in args is
628	// used as the entrypoint, and the remainder will be used as arguments.
629	Args []string `json:"args,omitempty"`
630
631	// Dir: Working directory to use when running this step's container. If
632	// this value is a relative path, it is relative to the build's working
633	// directory. If this value is absolute, it may be outside the build's
634	// working directory, in which case the contents of the path may not be
635	// persisted across build step executions, unless a `volume` for that
636	// path is specified. If the build specifies a `RepoSource` with `dir`
637	// and a step with a `dir`, which specifies an absolute path, the
638	// `RepoSource` `dir` is ignored for the step's execution.
639	Dir string `json:"dir,omitempty"`
640
641	// Entrypoint: Entrypoint to be used instead of the build step image's
642	// default entrypoint. If unset, the image's default entrypoint is used.
643	Entrypoint string `json:"entrypoint,omitempty"`
644
645	// Env: A list of environment variable definitions to be used when
646	// running a step. The elements are of the form "KEY=VALUE" for the
647	// environment variable "KEY" being given the value "VALUE".
648	Env []string `json:"env,omitempty"`
649
650	// Id: Unique identifier for this build step, used in `wait_for` to
651	// reference this build step as a dependency.
652	Id string `json:"id,omitempty"`
653
654	// Name: Required. The name of the container image that will run this
655	// particular build step. If the image is available in the host's Docker
656	// daemon's cache, it will be run directly. If not, the host will
657	// attempt to pull the image first, using the builder service account's
658	// credentials if necessary. The Docker daemon's cache will already have
659	// the latest versions of all of the officially supported build steps
660	// (https://github.com/GoogleCloudPlatform/cloud-builders
661	// (https://github.com/GoogleCloudPlatform/cloud-builders)). The Docker
662	// daemon will also have cached many of the layers for some popular
663	// images, like "ubuntu", "debian", but they will be refreshed at the
664	// time you attempt to use them. If you built an image in a previous
665	// build step, it will be stored in the host's Docker daemon's cache and
666	// is available to use as the name for a later build step.
667	Name string `json:"name,omitempty"`
668
669	// PullTiming: Output only. Stores timing information for pulling this
670	// build step's builder image only.
671	PullTiming *TimeSpan `json:"pullTiming,omitempty"`
672
673	// SecretEnv: A list of environment variables which are encrypted using
674	// a Cloud Key Management Service crypto key. These values must be
675	// specified in the build's `Secret`.
676	SecretEnv []string `json:"secretEnv,omitempty"`
677
678	// Status: Output only. Status of the build step. At this time, build
679	// step status is only updated on build completion; step status is not
680	// updated in real-time as the build progresses.
681	//
682	// Possible values:
683	//   "STATUS_UNKNOWN" - Status of the build is unknown.
684	//   "QUEUED" - Build or step is queued; work has not yet begun.
685	//   "WORKING" - Build or step is being executed.
686	//   "SUCCESS" - Build or step finished successfully.
687	//   "FAILURE" - Build or step failed to complete successfully.
688	//   "INTERNAL_ERROR" - Build or step failed due to an internal cause.
689	//   "TIMEOUT" - Build or step took longer than was allowed.
690	//   "CANCELLED" - Build or step was canceled by a user.
691	//   "EXPIRED" - Build was enqueued for longer than the value of
692	// `queue_ttl`.
693	Status string `json:"status,omitempty"`
694
695	// Timeout: Time limit for executing this build step. If not defined,
696	// the step has no time limit and will be allowed to continue to run
697	// until either it completes or the build itself times out.
698	Timeout string `json:"timeout,omitempty"`
699
700	// Timing: Output only. Stores timing information for executing this
701	// build step.
702	Timing *TimeSpan `json:"timing,omitempty"`
703
704	// Volumes: List of volumes to mount into the build step. Each volume is
705	// created as an empty volume prior to execution of the build step. Upon
706	// completion of the build, volumes and their contents are discarded.
707	// Using a named volume in only one step is not valid as it is
708	// indicative of a build request with an incorrect configuration.
709	Volumes []*Volume `json:"volumes,omitempty"`
710
711	// WaitFor: The ID(s) of the step(s) that this build step depends on.
712	// This build step will not start until all the build steps in
713	// `wait_for` have completed successfully. If `wait_for` is empty, this
714	// build step will start when all previous build steps in the
715	// `Build.Steps` list have completed successfully.
716	WaitFor []string `json:"waitFor,omitempty"`
717
718	// ForceSendFields is a list of field names (e.g. "Args") to
719	// unconditionally include in API requests. By default, fields with
720	// empty values are omitted from API requests. However, any non-pointer,
721	// non-interface field appearing in ForceSendFields will be sent to the
722	// server regardless of whether the field is empty or not. This may be
723	// used to include empty fields in Patch requests.
724	ForceSendFields []string `json:"-"`
725
726	// NullFields is a list of field names (e.g. "Args") to include in API
727	// requests with the JSON null value. By default, fields with empty
728	// values are omitted from API requests. However, any field with an
729	// empty value appearing in NullFields will be sent to the server as
730	// null. It is an error if a field in this list has a non-empty value.
731	// This may be used to include null fields in Patch requests.
732	NullFields []string `json:"-"`
733}
734
735func (s *BuildStep) MarshalJSON() ([]byte, error) {
736	type NoMethod BuildStep
737	raw := NoMethod(*s)
738	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
739}
740
741// BuiltImage: An image built by the pipeline.
742type BuiltImage struct {
743	// Digest: Docker Registry 2.0 digest.
744	Digest string `json:"digest,omitempty"`
745
746	// Name: Name used to push the container image to Google Container
747	// Registry, as presented to `docker push`.
748	Name string `json:"name,omitempty"`
749
750	// PushTiming: Output only. Stores timing information for pushing the
751	// specified image.
752	PushTiming *TimeSpan `json:"pushTiming,omitempty"`
753
754	// ForceSendFields is a list of field names (e.g. "Digest") to
755	// unconditionally include in API requests. By default, fields with
756	// empty values are omitted from API requests. However, any non-pointer,
757	// non-interface field appearing in ForceSendFields will be sent to the
758	// server regardless of whether the field is empty or not. This may be
759	// used to include empty fields in Patch requests.
760	ForceSendFields []string `json:"-"`
761
762	// NullFields is a list of field names (e.g. "Digest") to include in API
763	// requests with the JSON null value. By default, fields with empty
764	// values are omitted from API requests. However, any field with an
765	// empty value appearing in NullFields will be sent to the server as
766	// null. It is an error if a field in this list has a non-empty value.
767	// This may be used to include null fields in Patch requests.
768	NullFields []string `json:"-"`
769}
770
771func (s *BuiltImage) MarshalJSON() ([]byte, error) {
772	type NoMethod BuiltImage
773	raw := NoMethod(*s)
774	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
775}
776
777// CancelOperationRequest: The request message for
778// Operations.CancelOperation.
779type CancelOperationRequest struct {
780}
781
782// Empty: A generic empty message that you can re-use to avoid defining
783// duplicated empty messages in your APIs. A typical example is to use
784// it as the request or the response type of an API method. For
785// instance: service Foo { rpc Bar(google.protobuf.Empty) returns
786// (google.protobuf.Empty); } The JSON representation for `Empty` is
787// empty JSON object `{}`.
788type Empty struct {
789	// ServerResponse contains the HTTP response code and headers from the
790	// server.
791	googleapi.ServerResponse `json:"-"`
792}
793
794// FileHashes: Container message for hashes of byte content of files,
795// used in SourceProvenance messages to verify integrity of source input
796// to the build.
797type FileHashes struct {
798	// FileHash: Collection of file hashes.
799	FileHash []*Hash `json:"fileHash,omitempty"`
800
801	// ForceSendFields is a list of field names (e.g. "FileHash") to
802	// unconditionally include in API requests. By default, fields with
803	// empty values are omitted from API requests. However, any non-pointer,
804	// non-interface field appearing in ForceSendFields will be sent to the
805	// server regardless of whether the field is empty or not. This may be
806	// used to include empty fields in Patch requests.
807	ForceSendFields []string `json:"-"`
808
809	// NullFields is a list of field names (e.g. "FileHash") to include in
810	// API requests with the JSON null value. By default, fields with empty
811	// values are omitted from API requests. However, any field with an
812	// empty value appearing in NullFields will be sent to the server as
813	// null. It is an error if a field in this list has a non-empty value.
814	// This may be used to include null fields in Patch requests.
815	NullFields []string `json:"-"`
816}
817
818func (s *FileHashes) MarshalJSON() ([]byte, error) {
819	type NoMethod FileHashes
820	raw := NoMethod(*s)
821	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
822}
823
824// HTTPDelivery: HTTPDelivery is the delivery configuration for an HTTP
825// notification.
826type HTTPDelivery struct {
827	// Uri: The URI to which JSON-containing HTTP POST requests should be
828	// sent.
829	Uri string `json:"uri,omitempty"`
830
831	// ForceSendFields is a list of field names (e.g. "Uri") to
832	// unconditionally include in API requests. By default, fields with
833	// empty values are omitted from API requests. However, any non-pointer,
834	// non-interface field appearing in ForceSendFields will be sent to the
835	// server regardless of whether the field is empty or not. This may be
836	// used to include empty fields in Patch requests.
837	ForceSendFields []string `json:"-"`
838
839	// NullFields is a list of field names (e.g. "Uri") to include in API
840	// requests with the JSON null value. By default, fields with empty
841	// values are omitted from API requests. However, any field with an
842	// empty value appearing in NullFields will be sent to the server as
843	// null. It is an error if a field in this list has a non-empty value.
844	// This may be used to include null fields in Patch requests.
845	NullFields []string `json:"-"`
846}
847
848func (s *HTTPDelivery) MarshalJSON() ([]byte, error) {
849	type NoMethod HTTPDelivery
850	raw := NoMethod(*s)
851	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
852}
853
854// Hash: Container message for hash values.
855type Hash struct {
856	// Type: The type of hash that was performed.
857	//
858	// Possible values:
859	//   "NONE" - No hash requested.
860	//   "SHA256" - Use a sha256 hash.
861	//   "MD5" - Use a md5 hash.
862	Type string `json:"type,omitempty"`
863
864	// Value: The hash value.
865	Value string `json:"value,omitempty"`
866
867	// ForceSendFields is a list of field names (e.g. "Type") to
868	// unconditionally include in API requests. By default, fields with
869	// empty values are omitted from API requests. However, any non-pointer,
870	// non-interface field appearing in ForceSendFields will be sent to the
871	// server regardless of whether the field is empty or not. This may be
872	// used to include empty fields in Patch requests.
873	ForceSendFields []string `json:"-"`
874
875	// NullFields is a list of field names (e.g. "Type") to include in API
876	// requests with the JSON null value. By default, fields with empty
877	// values are omitted from API requests. However, any field with an
878	// empty value appearing in NullFields will be sent to the server as
879	// null. It is an error if a field in this list has a non-empty value.
880	// This may be used to include null fields in Patch requests.
881	NullFields []string `json:"-"`
882}
883
884func (s *Hash) MarshalJSON() ([]byte, error) {
885	type NoMethod Hash
886	raw := NoMethod(*s)
887	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
888}
889
890// InlineSecret: Pairs a set of secret environment variables mapped to
891// encrypted values with the Cloud KMS key to use to decrypt the value.
892type InlineSecret struct {
893	// EnvMap: Map of environment variable name to its encrypted value.
894	// Secret environment variables must be unique across all of a build's
895	// secrets, and must be used by at least one build step. Values can be
896	// at most 64 KB in size. There can be at most 100 secret values across
897	// all of a build's secrets.
898	EnvMap map[string]string `json:"envMap,omitempty"`
899
900	// KmsKeyName: Resource name of Cloud KMS crypto key to decrypt the
901	// encrypted value. In format:
902	// projects/*/locations/*/keyRings/*/cryptoKeys/*
903	KmsKeyName string `json:"kmsKeyName,omitempty"`
904
905	// ForceSendFields is a list of field names (e.g. "EnvMap") to
906	// unconditionally include in API requests. By default, fields with
907	// empty values are omitted from API requests. However, any non-pointer,
908	// non-interface field appearing in ForceSendFields will be sent to the
909	// server regardless of whether the field is empty or not. This may be
910	// used to include empty fields in Patch requests.
911	ForceSendFields []string `json:"-"`
912
913	// NullFields is a list of field names (e.g. "EnvMap") to include in API
914	// requests with the JSON null value. By default, fields with empty
915	// values are omitted from API requests. However, any field with an
916	// empty value appearing in NullFields will be sent to the server as
917	// null. It is an error if a field in this list has a non-empty value.
918	// This may be used to include null fields in Patch requests.
919	NullFields []string `json:"-"`
920}
921
922func (s *InlineSecret) MarshalJSON() ([]byte, error) {
923	type NoMethod InlineSecret
924	raw := NoMethod(*s)
925	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
926}
927
928// ListWorkerPoolsResponse: Response containing existing `WorkerPools`.
929type ListWorkerPoolsResponse struct {
930	// WorkerPools: `WorkerPools` for the specified project.
931	WorkerPools []*WorkerPool `json:"workerPools,omitempty"`
932
933	// ServerResponse contains the HTTP response code and headers from the
934	// server.
935	googleapi.ServerResponse `json:"-"`
936
937	// ForceSendFields is a list of field names (e.g. "WorkerPools") to
938	// unconditionally include in API requests. By default, fields with
939	// empty values are omitted from API requests. However, any non-pointer,
940	// non-interface field appearing in ForceSendFields will be sent to the
941	// server regardless of whether the field is empty or not. This may be
942	// used to include empty fields in Patch requests.
943	ForceSendFields []string `json:"-"`
944
945	// NullFields is a list of field names (e.g. "WorkerPools") to include
946	// in API requests with the JSON null value. By default, fields with
947	// empty values are omitted from API requests. However, any field with
948	// an empty value appearing in NullFields will be sent to the server as
949	// null. It is an error if a field in this list has a non-empty value.
950	// This may be used to include null fields in Patch requests.
951	NullFields []string `json:"-"`
952}
953
954func (s *ListWorkerPoolsResponse) MarshalJSON() ([]byte, error) {
955	type NoMethod ListWorkerPoolsResponse
956	raw := NoMethod(*s)
957	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
958}
959
960// NetworkConfig: Network describes the network configuration for a
961// `WorkerPool`.
962type NetworkConfig struct {
963	// PeeredNetwork: Required. Immutable. The network definition that the
964	// workers are peered to. If this section is left empty, the workers
965	// will be peered to WorkerPool.project_id on the default network. Must
966	// be in the format `projects/{project}/global/networks/{network}`,
967	// where {project} is a project number, such as `12345`, and {network}
968	// is the name of a VPC network in the project.
969	PeeredNetwork string `json:"peeredNetwork,omitempty"`
970
971	// ForceSendFields is a list of field names (e.g. "PeeredNetwork") to
972	// unconditionally include in API requests. By default, fields with
973	// empty values are omitted from API requests. However, any non-pointer,
974	// non-interface field appearing in ForceSendFields will be sent to the
975	// server regardless of whether the field is empty or not. This may be
976	// used to include empty fields in Patch requests.
977	ForceSendFields []string `json:"-"`
978
979	// NullFields is a list of field names (e.g. "PeeredNetwork") to include
980	// in API requests with the JSON null value. By default, fields with
981	// empty values are omitted from API requests. However, any field with
982	// an empty value appearing in NullFields will be sent to the server as
983	// null. It is an error if a field in this list has a non-empty value.
984	// This may be used to include null fields in Patch requests.
985	NullFields []string `json:"-"`
986}
987
988func (s *NetworkConfig) MarshalJSON() ([]byte, error) {
989	type NoMethod NetworkConfig
990	raw := NoMethod(*s)
991	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
992}
993
994// Notification: Notification is the container which holds the data that
995// is relevant to this particular notification.
996type Notification struct {
997	// Filter: The filter string to use for notification filtering.
998	// Currently, this is assumed to be a CEL program. See
999	// https://opensource.google/projects/cel for more.
1000	Filter string `json:"filter,omitempty"`
1001
1002	// HttpDelivery: Configuration for HTTP delivery.
1003	HttpDelivery *HTTPDelivery `json:"httpDelivery,omitempty"`
1004
1005	// SlackDelivery: Configuration for Slack delivery.
1006	SlackDelivery *SlackDelivery `json:"slackDelivery,omitempty"`
1007
1008	// SmtpDelivery: Configuration for SMTP (email) delivery.
1009	SmtpDelivery *SMTPDelivery `json:"smtpDelivery,omitempty"`
1010
1011	// StructDelivery: Escape hatch for users to supply custom delivery
1012	// configs.
1013	StructDelivery googleapi.RawMessage `json:"structDelivery,omitempty"`
1014
1015	// ForceSendFields is a list of field names (e.g. "Filter") to
1016	// unconditionally include in API requests. By default, fields with
1017	// empty values are omitted from API requests. However, any non-pointer,
1018	// non-interface field appearing in ForceSendFields will be sent to the
1019	// server regardless of whether the field is empty or not. This may be
1020	// used to include empty fields in Patch requests.
1021	ForceSendFields []string `json:"-"`
1022
1023	// NullFields is a list of field names (e.g. "Filter") to include in API
1024	// requests with the JSON null value. By default, fields with empty
1025	// values are omitted from API requests. However, any field with an
1026	// empty value appearing in NullFields will be sent to the server as
1027	// null. It is an error if a field in this list has a non-empty value.
1028	// This may be used to include null fields in Patch requests.
1029	NullFields []string `json:"-"`
1030}
1031
1032func (s *Notification) MarshalJSON() ([]byte, error) {
1033	type NoMethod Notification
1034	raw := NoMethod(*s)
1035	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1036}
1037
1038// NotifierConfig: NotifierConfig is the top-level configuration
1039// message.
1040type NotifierConfig struct {
1041	// ApiVersion: The API version of this configuration format.
1042	ApiVersion string `json:"apiVersion,omitempty"`
1043
1044	// Kind: The type of notifier to use (e.g. SMTPNotifier).
1045	Kind string `json:"kind,omitempty"`
1046
1047	// Metadata: Metadata for referring to/handling/deploying this notifier.
1048	Metadata *NotifierMetadata `json:"metadata,omitempty"`
1049
1050	// Spec: The actual configuration for this notifier.
1051	Spec *NotifierSpec `json:"spec,omitempty"`
1052
1053	// ForceSendFields is a list of field names (e.g. "ApiVersion") to
1054	// unconditionally include in API requests. By default, fields with
1055	// empty values are omitted from API requests. However, any non-pointer,
1056	// non-interface field appearing in ForceSendFields will be sent to the
1057	// server regardless of whether the field is empty or not. This may be
1058	// used to include empty fields in Patch requests.
1059	ForceSendFields []string `json:"-"`
1060
1061	// NullFields is a list of field names (e.g. "ApiVersion") to include in
1062	// API requests with the JSON null value. By default, fields with empty
1063	// values are omitted from API requests. However, any field with an
1064	// empty value appearing in NullFields will be sent to the server as
1065	// null. It is an error if a field in this list has a non-empty value.
1066	// This may be used to include null fields in Patch requests.
1067	NullFields []string `json:"-"`
1068}
1069
1070func (s *NotifierConfig) MarshalJSON() ([]byte, error) {
1071	type NoMethod NotifierConfig
1072	raw := NoMethod(*s)
1073	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1074}
1075
1076// NotifierMetadata: NotifierMetadata contains the data which can be
1077// used to reference or describe this notifier.
1078type NotifierMetadata struct {
1079	// Name: The human-readable and user-given name for the notifier. For
1080	// example: "repo-merge-email-notifier".
1081	Name string `json:"name,omitempty"`
1082
1083	// Notifier: The string representing the name and version of notifier to
1084	// deploy. Expected to be of the form of "/:". For example:
1085	// "gcr.io/my-project/notifiers/smtp:1.2.34".
1086	Notifier string `json:"notifier,omitempty"`
1087
1088	// ForceSendFields is a list of field names (e.g. "Name") to
1089	// unconditionally include in API requests. By default, fields with
1090	// empty values are omitted from API requests. However, any non-pointer,
1091	// non-interface field appearing in ForceSendFields will be sent to the
1092	// server regardless of whether the field is empty or not. This may be
1093	// used to include empty fields in Patch requests.
1094	ForceSendFields []string `json:"-"`
1095
1096	// NullFields is a list of field names (e.g. "Name") to include in API
1097	// requests with the JSON null value. By default, fields with empty
1098	// values are omitted from API requests. However, any field with an
1099	// empty value appearing in NullFields will be sent to the server as
1100	// null. It is an error if a field in this list has a non-empty value.
1101	// This may be used to include null fields in Patch requests.
1102	NullFields []string `json:"-"`
1103}
1104
1105func (s *NotifierMetadata) MarshalJSON() ([]byte, error) {
1106	type NoMethod NotifierMetadata
1107	raw := NoMethod(*s)
1108	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1109}
1110
1111// NotifierSecret: NotifierSecret is the container that maps a secret
1112// name (reference) to its Google Cloud Secret Manager resource path.
1113type NotifierSecret struct {
1114	// Name: Name is the local name of the secret, such as the verbatim
1115	// string "my-smtp-password".
1116	Name string `json:"name,omitempty"`
1117
1118	// Value: Value is interpreted to be a resource path for fetching the
1119	// actual (versioned) secret data for this secret. For example, this
1120	// would be a Google Cloud Secret Manager secret version resource path
1121	// like: "projects/my-project/secrets/my-secret/versions/latest".
1122	Value string `json:"value,omitempty"`
1123
1124	// ForceSendFields is a list of field names (e.g. "Name") to
1125	// unconditionally include in API requests. By default, fields with
1126	// empty values are omitted from API requests. However, any non-pointer,
1127	// non-interface field appearing in ForceSendFields will be sent to the
1128	// server regardless of whether the field is empty or not. This may be
1129	// used to include empty fields in Patch requests.
1130	ForceSendFields []string `json:"-"`
1131
1132	// NullFields is a list of field names (e.g. "Name") to include in API
1133	// requests with the JSON null value. By default, fields with empty
1134	// values are omitted from API requests. However, any field with an
1135	// empty value appearing in NullFields will be sent to the server as
1136	// null. It is an error if a field in this list has a non-empty value.
1137	// This may be used to include null fields in Patch requests.
1138	NullFields []string `json:"-"`
1139}
1140
1141func (s *NotifierSecret) MarshalJSON() ([]byte, error) {
1142	type NoMethod NotifierSecret
1143	raw := NoMethod(*s)
1144	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1145}
1146
1147// NotifierSecretRef: NotifierSecretRef contains the reference to a
1148// secret stored in the corresponding NotifierSpec.
1149type NotifierSecretRef struct {
1150	// SecretRef: The value of `secret_ref` should be a `name` that is
1151	// registered in a `Secret` in the `secrets` list of the `Spec`.
1152	SecretRef string `json:"secretRef,omitempty"`
1153
1154	// ForceSendFields is a list of field names (e.g. "SecretRef") to
1155	// unconditionally include in API requests. By default, fields with
1156	// empty values are omitted from API requests. However, any non-pointer,
1157	// non-interface field appearing in ForceSendFields will be sent to the
1158	// server regardless of whether the field is empty or not. This may be
1159	// used to include empty fields in Patch requests.
1160	ForceSendFields []string `json:"-"`
1161
1162	// NullFields is a list of field names (e.g. "SecretRef") to include in
1163	// API requests with the JSON null value. By default, fields with empty
1164	// values are omitted from API requests. However, any field with an
1165	// empty value appearing in NullFields will be sent to the server as
1166	// null. It is an error if a field in this list has a non-empty value.
1167	// This may be used to include null fields in Patch requests.
1168	NullFields []string `json:"-"`
1169}
1170
1171func (s *NotifierSecretRef) MarshalJSON() ([]byte, error) {
1172	type NoMethod NotifierSecretRef
1173	raw := NoMethod(*s)
1174	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1175}
1176
1177// NotifierSpec: NotifierSpec is the configuration container for
1178// notifications.
1179type NotifierSpec struct {
1180	// Notification: The configuration of this particular notifier.
1181	Notification *Notification `json:"notification,omitempty"`
1182
1183	// Secrets: Configurations for secret resources used by this particular
1184	// notifier.
1185	Secrets []*NotifierSecret `json:"secrets,omitempty"`
1186
1187	// ForceSendFields is a list of field names (e.g. "Notification") to
1188	// unconditionally include in API requests. By default, fields with
1189	// empty values are omitted from API requests. However, any non-pointer,
1190	// non-interface field appearing in ForceSendFields will be sent to the
1191	// server regardless of whether the field is empty or not. This may be
1192	// used to include empty fields in Patch requests.
1193	ForceSendFields []string `json:"-"`
1194
1195	// NullFields is a list of field names (e.g. "Notification") to include
1196	// in API requests with the JSON null value. By default, fields with
1197	// empty values are omitted from API requests. However, any field with
1198	// an empty value appearing in NullFields will be sent to the server as
1199	// null. It is an error if a field in this list has a non-empty value.
1200	// This may be used to include null fields in Patch requests.
1201	NullFields []string `json:"-"`
1202}
1203
1204func (s *NotifierSpec) MarshalJSON() ([]byte, error) {
1205	type NoMethod NotifierSpec
1206	raw := NoMethod(*s)
1207	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1208}
1209
1210// Operation: This resource represents a long-running operation that is
1211// the result of a network API call.
1212type Operation struct {
1213	// Done: If the value is `false`, it means the operation is still in
1214	// progress. If `true`, the operation is completed, and either `error`
1215	// or `response` is available.
1216	Done bool `json:"done,omitempty"`
1217
1218	// Error: The error result of the operation in case of failure or
1219	// cancellation.
1220	Error *Status `json:"error,omitempty"`
1221
1222	// Metadata: Service-specific metadata associated with the operation. It
1223	// typically contains progress information and common metadata such as
1224	// create time. Some services might not provide such metadata. Any
1225	// method that returns a long-running operation should document the
1226	// metadata type, if any.
1227	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
1228
1229	// Name: The server-assigned name, which is only unique within the same
1230	// service that originally returns it. If you use the default HTTP
1231	// mapping, the `name` should be a resource name ending with
1232	// `operations/{unique_id}`.
1233	Name string `json:"name,omitempty"`
1234
1235	// Response: The normal response of the operation in case of success. If
1236	// the original method returns no data on success, such as `Delete`, the
1237	// response is `google.protobuf.Empty`. If the original method is
1238	// standard `Get`/`Create`/`Update`, the response should be the
1239	// resource. For other methods, the response should have the type
1240	// `XxxResponse`, where `Xxx` is the original method name. For example,
1241	// if the original method name is `TakeSnapshot()`, the inferred
1242	// response type is `TakeSnapshotResponse`.
1243	Response googleapi.RawMessage `json:"response,omitempty"`
1244
1245	// ServerResponse contains the HTTP response code and headers from the
1246	// server.
1247	googleapi.ServerResponse `json:"-"`
1248
1249	// ForceSendFields is a list of field names (e.g. "Done") to
1250	// unconditionally include in API requests. By default, fields with
1251	// empty values are omitted from API requests. However, any non-pointer,
1252	// non-interface field appearing in ForceSendFields will be sent to the
1253	// server regardless of whether the field is empty or not. This may be
1254	// used to include empty fields in Patch requests.
1255	ForceSendFields []string `json:"-"`
1256
1257	// NullFields is a list of field names (e.g. "Done") to include in API
1258	// requests with the JSON null value. By default, fields with empty
1259	// values are omitted from API requests. However, any field with an
1260	// empty value appearing in NullFields will be sent to the server as
1261	// null. It is an error if a field in this list has a non-empty value.
1262	// This may be used to include null fields in Patch requests.
1263	NullFields []string `json:"-"`
1264}
1265
1266func (s *Operation) MarshalJSON() ([]byte, error) {
1267	type NoMethod Operation
1268	raw := NoMethod(*s)
1269	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1270}
1271
1272// RepoSource: Location of the source in a Google Cloud Source
1273// Repository.
1274type RepoSource struct {
1275	// BranchName: Regex matching branches to build. The syntax of the
1276	// regular expressions accepted is the syntax accepted by RE2 and
1277	// described at https://github.com/google/re2/wiki/Syntax
1278	BranchName string `json:"branchName,omitempty"`
1279
1280	// CommitSha: Explicit commit SHA to build.
1281	CommitSha string `json:"commitSha,omitempty"`
1282
1283	// Dir: Directory, relative to the source root, in which to run the
1284	// build. This must be a relative path. If a step's `dir` is specified
1285	// and is an absolute path, this value is ignored for that step's
1286	// execution.
1287	Dir string `json:"dir,omitempty"`
1288
1289	// InvertRegex: Only trigger a build if the revision regex does NOT
1290	// match the revision regex.
1291	InvertRegex bool `json:"invertRegex,omitempty"`
1292
1293	// ProjectId: ID of the project that owns the Cloud Source Repository.
1294	// If omitted, the project ID requesting the build is assumed.
1295	ProjectId string `json:"projectId,omitempty"`
1296
1297	// RepoName: Name of the Cloud Source Repository.
1298	RepoName string `json:"repoName,omitempty"`
1299
1300	// Substitutions: Substitutions to use in a triggered build. Should only
1301	// be used with RunBuildTrigger
1302	Substitutions map[string]string `json:"substitutions,omitempty"`
1303
1304	// TagName: Regex matching tags to build. The syntax of the regular
1305	// expressions accepted is the syntax accepted by RE2 and described at
1306	// https://github.com/google/re2/wiki/Syntax
1307	TagName string `json:"tagName,omitempty"`
1308
1309	// ForceSendFields is a list of field names (e.g. "BranchName") to
1310	// unconditionally include in API requests. By default, fields with
1311	// empty values are omitted from API requests. However, any non-pointer,
1312	// non-interface field appearing in ForceSendFields will be sent to the
1313	// server regardless of whether the field is empty or not. This may be
1314	// used to include empty fields in Patch requests.
1315	ForceSendFields []string `json:"-"`
1316
1317	// NullFields is a list of field names (e.g. "BranchName") to include in
1318	// API requests with the JSON null value. By default, fields with empty
1319	// values are omitted from API requests. However, any field with an
1320	// empty value appearing in NullFields will be sent to the server as
1321	// null. It is an error if a field in this list has a non-empty value.
1322	// This may be used to include null fields in Patch requests.
1323	NullFields []string `json:"-"`
1324}
1325
1326func (s *RepoSource) MarshalJSON() ([]byte, error) {
1327	type NoMethod RepoSource
1328	raw := NoMethod(*s)
1329	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1330}
1331
1332// Results: Artifacts created by the build pipeline.
1333type Results struct {
1334	// ArtifactManifest: Path to the artifact manifest. Only populated when
1335	// artifacts are uploaded.
1336	ArtifactManifest string `json:"artifactManifest,omitempty"`
1337
1338	// ArtifactTiming: Time to push all non-container artifacts.
1339	ArtifactTiming *TimeSpan `json:"artifactTiming,omitempty"`
1340
1341	// BuildStepImages: List of build step digests, in the order
1342	// corresponding to build step indices.
1343	BuildStepImages []string `json:"buildStepImages,omitempty"`
1344
1345	// BuildStepOutputs: List of build step outputs, produced by builder
1346	// images, in the order corresponding to build step indices. Cloud
1347	// Builders (https://cloud.google.com/cloud-build/docs/cloud-builders)
1348	// can produce this output by writing to `$BUILDER_OUTPUT/output`. Only
1349	// the first 4KB of data is stored.
1350	BuildStepOutputs []string `json:"buildStepOutputs,omitempty"`
1351
1352	// Images: Container images that were built as a part of the build.
1353	Images []*BuiltImage `json:"images,omitempty"`
1354
1355	// NumArtifacts: Number of artifacts uploaded. Only populated when
1356	// artifacts are uploaded.
1357	NumArtifacts int64 `json:"numArtifacts,omitempty,string"`
1358
1359	// ForceSendFields is a list of field names (e.g. "ArtifactManifest") to
1360	// unconditionally include in API requests. By default, fields with
1361	// empty values are omitted from API requests. However, any non-pointer,
1362	// non-interface field appearing in ForceSendFields will be sent to the
1363	// server regardless of whether the field is empty or not. This may be
1364	// used to include empty fields in Patch requests.
1365	ForceSendFields []string `json:"-"`
1366
1367	// NullFields is a list of field names (e.g. "ArtifactManifest") to
1368	// include in API requests with the JSON null value. By default, fields
1369	// with empty values are omitted from API requests. However, any field
1370	// with an empty value appearing in NullFields will be sent to the
1371	// server as null. It is an error if a field in this list has a
1372	// non-empty value. This may be used to include null fields in Patch
1373	// requests.
1374	NullFields []string `json:"-"`
1375}
1376
1377func (s *Results) MarshalJSON() ([]byte, error) {
1378	type NoMethod Results
1379	raw := NoMethod(*s)
1380	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1381}
1382
1383// SMTPDelivery: SMTPDelivery is the delivery configuration for an SMTP
1384// (email) notification.
1385type SMTPDelivery struct {
1386	// FromAddress: This is the SMTP account/email that appears in the
1387	// `From:` of the email. If empty, it is assumed to be sender.
1388	FromAddress string `json:"fromAddress,omitempty"`
1389
1390	// Password: The SMTP sender's password.
1391	Password *NotifierSecretRef `json:"password,omitempty"`
1392
1393	// Port: The SMTP port of the server.
1394	Port string `json:"port,omitempty"`
1395
1396	// RecipientAddresses: This is the list of addresses to which we send
1397	// the email (i.e. in the `To:` of the email).
1398	RecipientAddresses []string `json:"recipientAddresses,omitempty"`
1399
1400	// SenderAddress: This is the SMTP account/email that is used to send
1401	// the message.
1402	SenderAddress string `json:"senderAddress,omitempty"`
1403
1404	// Server: The address of the SMTP server.
1405	Server string `json:"server,omitempty"`
1406
1407	// ForceSendFields is a list of field names (e.g. "FromAddress") to
1408	// unconditionally include in API requests. By default, fields with
1409	// empty values are omitted from API requests. However, any non-pointer,
1410	// non-interface field appearing in ForceSendFields will be sent to the
1411	// server regardless of whether the field is empty or not. This may be
1412	// used to include empty fields in Patch requests.
1413	ForceSendFields []string `json:"-"`
1414
1415	// NullFields is a list of field names (e.g. "FromAddress") to include
1416	// in API requests with the JSON null value. By default, fields with
1417	// empty values are omitted from API requests. However, any field with
1418	// an empty value appearing in NullFields will be sent to the server as
1419	// null. It is an error if a field in this list has a non-empty value.
1420	// This may be used to include null fields in Patch requests.
1421	NullFields []string `json:"-"`
1422}
1423
1424func (s *SMTPDelivery) MarshalJSON() ([]byte, error) {
1425	type NoMethod SMTPDelivery
1426	raw := NoMethod(*s)
1427	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1428}
1429
1430// Secret: Pairs a set of secret environment variables containing
1431// encrypted values with the Cloud KMS key to use to decrypt the value.
1432// Note: Use `kmsKeyName` with `available_secrets` instead of using
1433// `kmsKeyName` with `secret`. For instructions see:
1434// https://cloud.google.com/cloud-build/docs/securing-builds/use-encrypted-credentials.
1435type Secret struct {
1436	// KmsKeyName: Cloud KMS key name to use to decrypt these envs.
1437	KmsKeyName string `json:"kmsKeyName,omitempty"`
1438
1439	// SecretEnv: Map of environment variable name to its encrypted value.
1440	// Secret environment variables must be unique across all of a build's
1441	// secrets, and must be used by at least one build step. Values can be
1442	// at most 64 KB in size. There can be at most 100 secret values across
1443	// all of a build's secrets.
1444	SecretEnv map[string]string `json:"secretEnv,omitempty"`
1445
1446	// ForceSendFields is a list of field names (e.g. "KmsKeyName") to
1447	// unconditionally include in API requests. By default, fields with
1448	// empty values are omitted from API requests. However, any non-pointer,
1449	// non-interface field appearing in ForceSendFields will be sent to the
1450	// server regardless of whether the field is empty or not. This may be
1451	// used to include empty fields in Patch requests.
1452	ForceSendFields []string `json:"-"`
1453
1454	// NullFields is a list of field names (e.g. "KmsKeyName") to include in
1455	// API requests with the JSON null value. By default, fields with empty
1456	// values are omitted from API requests. However, any field with an
1457	// empty value appearing in NullFields will be sent to the server as
1458	// null. It is an error if a field in this list has a non-empty value.
1459	// This may be used to include null fields in Patch requests.
1460	NullFields []string `json:"-"`
1461}
1462
1463func (s *Secret) MarshalJSON() ([]byte, error) {
1464	type NoMethod Secret
1465	raw := NoMethod(*s)
1466	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1467}
1468
1469// SecretManagerSecret: Pairs a secret environment variable with a
1470// SecretVersion in Secret Manager.
1471type SecretManagerSecret struct {
1472	// Env: Environment variable name to associate with the secret. Secret
1473	// environment variables must be unique across all of a build's secrets,
1474	// and must be used by at least one build step.
1475	Env string `json:"env,omitempty"`
1476
1477	// VersionName: Resource name of the SecretVersion. In format:
1478	// projects/*/secrets/*/versions/*
1479	VersionName string `json:"versionName,omitempty"`
1480
1481	// ForceSendFields is a list of field names (e.g. "Env") to
1482	// unconditionally include in API requests. By default, fields with
1483	// empty values are omitted from API requests. However, any non-pointer,
1484	// non-interface field appearing in ForceSendFields will be sent to the
1485	// server regardless of whether the field is empty or not. This may be
1486	// used to include empty fields in Patch requests.
1487	ForceSendFields []string `json:"-"`
1488
1489	// NullFields is a list of field names (e.g. "Env") to include in API
1490	// requests with the JSON null value. By default, fields with empty
1491	// values are omitted from API requests. However, any field with an
1492	// empty value appearing in NullFields will be sent to the server as
1493	// null. It is an error if a field in this list has a non-empty value.
1494	// This may be used to include null fields in Patch requests.
1495	NullFields []string `json:"-"`
1496}
1497
1498func (s *SecretManagerSecret) MarshalJSON() ([]byte, error) {
1499	type NoMethod SecretManagerSecret
1500	raw := NoMethod(*s)
1501	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1502}
1503
1504// Secrets: Secrets and secret environment variables.
1505type Secrets struct {
1506	// Inline: Secrets encrypted with KMS key and the associated secret
1507	// environment variable.
1508	Inline []*InlineSecret `json:"inline,omitempty"`
1509
1510	// SecretManager: Secrets in Secret Manager and associated secret
1511	// environment variable.
1512	SecretManager []*SecretManagerSecret `json:"secretManager,omitempty"`
1513
1514	// ForceSendFields is a list of field names (e.g. "Inline") to
1515	// unconditionally include in API requests. By default, fields with
1516	// empty values are omitted from API requests. However, any non-pointer,
1517	// non-interface field appearing in ForceSendFields will be sent to the
1518	// server regardless of whether the field is empty or not. This may be
1519	// used to include empty fields in Patch requests.
1520	ForceSendFields []string `json:"-"`
1521
1522	// NullFields is a list of field names (e.g. "Inline") to include in API
1523	// requests with the JSON null value. By default, fields with empty
1524	// values are omitted from API requests. However, any field with an
1525	// empty value appearing in NullFields will be sent to the server as
1526	// null. It is an error if a field in this list has a non-empty value.
1527	// This may be used to include null fields in Patch requests.
1528	NullFields []string `json:"-"`
1529}
1530
1531func (s *Secrets) MarshalJSON() ([]byte, error) {
1532	type NoMethod Secrets
1533	raw := NoMethod(*s)
1534	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1535}
1536
1537// SlackDelivery: SlackDelivery is the delivery configuration for
1538// delivering Slack messages via webhooks. See Slack webhook
1539// documentation at: https://api.slack.com/messaging/webhooks.
1540type SlackDelivery struct {
1541	// WebhookUri: The secret reference for the Slack webhook URI for
1542	// sending messages to a channel.
1543	WebhookUri *NotifierSecretRef `json:"webhookUri,omitempty"`
1544
1545	// ForceSendFields is a list of field names (e.g. "WebhookUri") to
1546	// unconditionally include in API requests. By default, fields with
1547	// empty values are omitted from API requests. However, any non-pointer,
1548	// non-interface field appearing in ForceSendFields will be sent to the
1549	// server regardless of whether the field is empty or not. This may be
1550	// used to include empty fields in Patch requests.
1551	ForceSendFields []string `json:"-"`
1552
1553	// NullFields is a list of field names (e.g. "WebhookUri") to include in
1554	// API requests with the JSON null value. By default, fields with empty
1555	// values are omitted from API requests. However, any field with an
1556	// empty value appearing in NullFields will be sent to the server as
1557	// null. It is an error if a field in this list has a non-empty value.
1558	// This may be used to include null fields in Patch requests.
1559	NullFields []string `json:"-"`
1560}
1561
1562func (s *SlackDelivery) MarshalJSON() ([]byte, error) {
1563	type NoMethod SlackDelivery
1564	raw := NoMethod(*s)
1565	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1566}
1567
1568// Source: Location of the source in a supported storage service.
1569type Source struct {
1570	// RepoSource: If provided, get the source from this location in a Cloud
1571	// Source Repository.
1572	RepoSource *RepoSource `json:"repoSource,omitempty"`
1573
1574	// StorageSource: If provided, get the source from this location in
1575	// Google Cloud Storage.
1576	StorageSource *StorageSource `json:"storageSource,omitempty"`
1577
1578	// StorageSourceManifest: If provided, get the source from this manifest
1579	// in Google Cloud Storage. This feature is in Preview.
1580	StorageSourceManifest *StorageSourceManifest `json:"storageSourceManifest,omitempty"`
1581
1582	// ForceSendFields is a list of field names (e.g. "RepoSource") to
1583	// unconditionally include in API requests. By default, fields with
1584	// empty values are omitted from API requests. However, any non-pointer,
1585	// non-interface field appearing in ForceSendFields will be sent to the
1586	// server regardless of whether the field is empty or not. This may be
1587	// used to include empty fields in Patch requests.
1588	ForceSendFields []string `json:"-"`
1589
1590	// NullFields is a list of field names (e.g. "RepoSource") to include in
1591	// API requests with the JSON null value. By default, fields with empty
1592	// values are omitted from API requests. However, any field with an
1593	// empty value appearing in NullFields will be sent to the server as
1594	// null. It is an error if a field in this list has a non-empty value.
1595	// This may be used to include null fields in Patch requests.
1596	NullFields []string `json:"-"`
1597}
1598
1599func (s *Source) MarshalJSON() ([]byte, error) {
1600	type NoMethod Source
1601	raw := NoMethod(*s)
1602	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1603}
1604
1605// SourceProvenance: Provenance of the source. Ways to find the original
1606// source, or verify that some source was used for this build.
1607type SourceProvenance struct {
1608	// FileHashes: Output only. Hash(es) of the build source, which can be
1609	// used to verify that the original source integrity was maintained in
1610	// the build. Note that `FileHashes` will only be populated if
1611	// `BuildOptions` has requested a `SourceProvenanceHash`. The keys to
1612	// this map are file paths used as build source and the values contain
1613	// the hash values for those files. If the build source came in a single
1614	// package such as a gzipped tarfile (`.tar.gz`), the `FileHash` will be
1615	// for the single path to that file.
1616	FileHashes map[string]FileHashes `json:"fileHashes,omitempty"`
1617
1618	// ResolvedRepoSource: A copy of the build's `source.repo_source`, if
1619	// exists, with any revisions resolved.
1620	ResolvedRepoSource *RepoSource `json:"resolvedRepoSource,omitempty"`
1621
1622	// ResolvedStorageSource: A copy of the build's `source.storage_source`,
1623	// if exists, with any generations resolved.
1624	ResolvedStorageSource *StorageSource `json:"resolvedStorageSource,omitempty"`
1625
1626	// ResolvedStorageSourceManifest: A copy of the build's
1627	// `source.storage_source_manifest`, if exists, with any revisions
1628	// resolved. This feature is in Preview.
1629	ResolvedStorageSourceManifest *StorageSourceManifest `json:"resolvedStorageSourceManifest,omitempty"`
1630
1631	// ForceSendFields is a list of field names (e.g. "FileHashes") to
1632	// unconditionally include in API requests. By default, fields with
1633	// empty values are omitted from API requests. However, any non-pointer,
1634	// non-interface field appearing in ForceSendFields will be sent to the
1635	// server regardless of whether the field is empty or not. This may be
1636	// used to include empty fields in Patch requests.
1637	ForceSendFields []string `json:"-"`
1638
1639	// NullFields is a list of field names (e.g. "FileHashes") to include in
1640	// API requests with the JSON null value. By default, fields with empty
1641	// values are omitted from API requests. However, any field with an
1642	// empty value appearing in NullFields will be sent to the server as
1643	// null. It is an error if a field in this list has a non-empty value.
1644	// This may be used to include null fields in Patch requests.
1645	NullFields []string `json:"-"`
1646}
1647
1648func (s *SourceProvenance) MarshalJSON() ([]byte, error) {
1649	type NoMethod SourceProvenance
1650	raw := NoMethod(*s)
1651	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1652}
1653
1654// Status: The `Status` type defines a logical error model that is
1655// suitable for different programming environments, including REST APIs
1656// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each
1657// `Status` message contains three pieces of data: error code, error
1658// message, and error details. You can find out more about this error
1659// model and how to work with it in the API Design Guide
1660// (https://cloud.google.com/apis/design/errors).
1661type Status struct {
1662	// Code: The status code, which should be an enum value of
1663	// google.rpc.Code.
1664	Code int64 `json:"code,omitempty"`
1665
1666	// Details: A list of messages that carry the error details. There is a
1667	// common set of message types for APIs to use.
1668	Details []googleapi.RawMessage `json:"details,omitempty"`
1669
1670	// Message: A developer-facing error message, which should be in
1671	// English. Any user-facing error message should be localized and sent
1672	// in the google.rpc.Status.details field, or localized by the client.
1673	Message string `json:"message,omitempty"`
1674
1675	// ForceSendFields is a list of field names (e.g. "Code") to
1676	// unconditionally include in API requests. By default, fields with
1677	// empty values are omitted from API requests. However, any non-pointer,
1678	// non-interface field appearing in ForceSendFields will be sent to the
1679	// server regardless of whether the field is empty or not. This may be
1680	// used to include empty fields in Patch requests.
1681	ForceSendFields []string `json:"-"`
1682
1683	// NullFields is a list of field names (e.g. "Code") to include in API
1684	// requests with the JSON null value. By default, fields with empty
1685	// values are omitted from API requests. However, any field with an
1686	// empty value appearing in NullFields will be sent to the server as
1687	// null. It is an error if a field in this list has a non-empty value.
1688	// This may be used to include null fields in Patch requests.
1689	NullFields []string `json:"-"`
1690}
1691
1692func (s *Status) MarshalJSON() ([]byte, error) {
1693	type NoMethod Status
1694	raw := NoMethod(*s)
1695	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1696}
1697
1698// StorageSource: Location of the source in an archive file in Google
1699// Cloud Storage.
1700type StorageSource struct {
1701	// Bucket: Google Cloud Storage bucket containing the source (see Bucket
1702	// Name Requirements
1703	// (https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1704	Bucket string `json:"bucket,omitempty"`
1705
1706	// Generation: Google Cloud Storage generation for the object. If the
1707	// generation is omitted, the latest generation will be used.
1708	Generation int64 `json:"generation,omitempty,string"`
1709
1710	// Object: Google Cloud Storage object containing the source. This
1711	// object must be a gzipped archive file (`.tar.gz`) containing source
1712	// to build.
1713	Object string `json:"object,omitempty"`
1714
1715	// ForceSendFields is a list of field names (e.g. "Bucket") to
1716	// unconditionally include in API requests. By default, fields with
1717	// empty values are omitted from API requests. However, any non-pointer,
1718	// non-interface field appearing in ForceSendFields will be sent to the
1719	// server regardless of whether the field is empty or not. This may be
1720	// used to include empty fields in Patch requests.
1721	ForceSendFields []string `json:"-"`
1722
1723	// NullFields is a list of field names (e.g. "Bucket") to include in API
1724	// requests with the JSON null value. By default, fields with empty
1725	// values are omitted from API requests. However, any field with an
1726	// empty value appearing in NullFields will be sent to the server as
1727	// null. It is an error if a field in this list has a non-empty value.
1728	// This may be used to include null fields in Patch requests.
1729	NullFields []string `json:"-"`
1730}
1731
1732func (s *StorageSource) MarshalJSON() ([]byte, error) {
1733	type NoMethod StorageSource
1734	raw := NoMethod(*s)
1735	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1736}
1737
1738// StorageSourceManifest: Location of the source manifest in Google
1739// Cloud Storage. This feature is in Preview.
1740type StorageSourceManifest struct {
1741	// Bucket: Google Cloud Storage bucket containing the source manifest
1742	// (see Bucket Name Requirements
1743	// (https://cloud.google.com/storage/docs/bucket-naming#requirements)).
1744	Bucket string `json:"bucket,omitempty"`
1745
1746	// Generation: Google Cloud Storage generation for the object. If the
1747	// generation is omitted, the latest generation will be used.
1748	Generation int64 `json:"generation,omitempty,string"`
1749
1750	// Object: Google Cloud Storage object containing the source manifest.
1751	// This object must be a JSON file.
1752	Object string `json:"object,omitempty"`
1753
1754	// ForceSendFields is a list of field names (e.g. "Bucket") to
1755	// unconditionally include in API requests. By default, fields with
1756	// empty values are omitted from API requests. However, any non-pointer,
1757	// non-interface field appearing in ForceSendFields will be sent to the
1758	// server regardless of whether the field is empty or not. This may be
1759	// used to include empty fields in Patch requests.
1760	ForceSendFields []string `json:"-"`
1761
1762	// NullFields is a list of field names (e.g. "Bucket") to include in API
1763	// requests with the JSON null value. By default, fields with empty
1764	// values are omitted from API requests. However, any field with an
1765	// empty value appearing in NullFields will be sent to the server as
1766	// null. It is an error if a field in this list has a non-empty value.
1767	// This may be used to include null fields in Patch requests.
1768	NullFields []string `json:"-"`
1769}
1770
1771func (s *StorageSourceManifest) MarshalJSON() ([]byte, error) {
1772	type NoMethod StorageSourceManifest
1773	raw := NoMethod(*s)
1774	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1775}
1776
1777// TimeSpan: Start and end times for a build execution phase.
1778type TimeSpan struct {
1779	// EndTime: End of time span.
1780	EndTime string `json:"endTime,omitempty"`
1781
1782	// StartTime: Start of time span.
1783	StartTime string `json:"startTime,omitempty"`
1784
1785	// ForceSendFields is a list of field names (e.g. "EndTime") to
1786	// unconditionally include in API requests. By default, fields with
1787	// empty values are omitted from API requests. However, any non-pointer,
1788	// non-interface field appearing in ForceSendFields will be sent to the
1789	// server regardless of whether the field is empty or not. This may be
1790	// used to include empty fields in Patch requests.
1791	ForceSendFields []string `json:"-"`
1792
1793	// NullFields is a list of field names (e.g. "EndTime") to include in
1794	// API requests with the JSON null value. By default, fields with empty
1795	// values are omitted from API requests. However, any field with an
1796	// empty value appearing in NullFields will be sent to the server as
1797	// null. It is an error if a field in this list has a non-empty value.
1798	// This may be used to include null fields in Patch requests.
1799	NullFields []string `json:"-"`
1800}
1801
1802func (s *TimeSpan) MarshalJSON() ([]byte, error) {
1803	type NoMethod TimeSpan
1804	raw := NoMethod(*s)
1805	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1806}
1807
1808// Volume: Volume describes a Docker container volume which is mounted
1809// into build steps in order to persist files across build step
1810// execution.
1811type Volume struct {
1812	// Name: Name of the volume to mount. Volume names must be unique per
1813	// build step and must be valid names for Docker volumes. Each named
1814	// volume must be used by at least two build steps.
1815	Name string `json:"name,omitempty"`
1816
1817	// Path: Path at which to mount the volume. Paths must be absolute and
1818	// cannot conflict with other volume paths on the same build step or
1819	// with certain reserved volume paths.
1820	Path string `json:"path,omitempty"`
1821
1822	// ForceSendFields is a list of field names (e.g. "Name") to
1823	// unconditionally include in API requests. By default, fields with
1824	// empty values are omitted from API requests. However, any non-pointer,
1825	// non-interface field appearing in ForceSendFields will be sent to the
1826	// server regardless of whether the field is empty or not. This may be
1827	// used to include empty fields in Patch requests.
1828	ForceSendFields []string `json:"-"`
1829
1830	// NullFields is a list of field names (e.g. "Name") to include in API
1831	// requests with the JSON null value. By default, fields with empty
1832	// values are omitted from API requests. However, any field with an
1833	// empty value appearing in NullFields will be sent to the server as
1834	// null. It is an error if a field in this list has a non-empty value.
1835	// This may be used to include null fields in Patch requests.
1836	NullFields []string `json:"-"`
1837}
1838
1839func (s *Volume) MarshalJSON() ([]byte, error) {
1840	type NoMethod Volume
1841	raw := NoMethod(*s)
1842	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1843}
1844
1845// WorkerConfig: WorkerConfig defines the configuration to be used for a
1846// creating workers in the pool.
1847type WorkerConfig struct {
1848	// DiskSizeGb: Size of the disk attached to the worker, in GB. See
1849	// https://cloud.google.com/compute/docs/disks/ If `0` is specified,
1850	// Cloud Build will use a standard disk size.
1851	DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"`
1852
1853	// MachineType: Machine Type of the worker, such as n1-standard-1. See
1854	// https://cloud.google.com/compute/docs/machine-types. If left blank,
1855	// Cloud Build will use a standard unspecified machine to create the
1856	// worker pool.
1857	MachineType string `json:"machineType,omitempty"`
1858
1859	// ForceSendFields is a list of field names (e.g. "DiskSizeGb") to
1860	// unconditionally include in API requests. By default, fields with
1861	// empty values are omitted from API requests. However, any non-pointer,
1862	// non-interface field appearing in ForceSendFields will be sent to the
1863	// server regardless of whether the field is empty or not. This may be
1864	// used to include empty fields in Patch requests.
1865	ForceSendFields []string `json:"-"`
1866
1867	// NullFields is a list of field names (e.g. "DiskSizeGb") to include in
1868	// API requests with the JSON null value. By default, fields with empty
1869	// values are omitted from API requests. However, any field with an
1870	// empty value appearing in NullFields will be sent to the server as
1871	// null. It is an error if a field in this list has a non-empty value.
1872	// This may be used to include null fields in Patch requests.
1873	NullFields []string `json:"-"`
1874}
1875
1876func (s *WorkerConfig) MarshalJSON() ([]byte, error) {
1877	type NoMethod WorkerConfig
1878	raw := NoMethod(*s)
1879	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1880}
1881
1882// WorkerPool: Configuration for a WorkerPool to run the builds. Workers
1883// are machines that Cloud Build uses to run your builds. By default,
1884// all workers run in a project owned by Cloud Build. To have full
1885// control over the workers that execute your builds -- such as enabling
1886// them to access private resources on your private network -- you can
1887// request Cloud Build to run the workers in your own project by
1888// creating a custom workers pool.
1889type WorkerPool struct {
1890	// CreateTime: Output only. Time at which the request to create the
1891	// `WorkerPool` was received.
1892	CreateTime string `json:"createTime,omitempty"`
1893
1894	// DeleteTime: Output only. Time at which the request to delete the
1895	// `WorkerPool` was received.
1896	DeleteTime string `json:"deleteTime,omitempty"`
1897
1898	// Name: Output only. The resource name of the `WorkerPool`. Format of
1899	// the name is `projects/{project_id}/workerPools/{worker_pool_id}`,
1900	// where the value of {worker_pool_id} is provided in the
1901	// CreateWorkerPool request.
1902	Name string `json:"name,omitempty"`
1903
1904	// NetworkConfig: Network configuration for the `WorkerPool`.
1905	NetworkConfig *NetworkConfig `json:"networkConfig,omitempty"`
1906
1907	// Region: Required. Immutable. The region where the `WorkerPool` runs.
1908	// Only "us-central1" is currently supported. Note that `region` cannot
1909	// be changed once the `WorkerPool` is created.
1910	Region string `json:"region,omitempty"`
1911
1912	// State: Output only. WorkerPool state.
1913	//
1914	// Possible values:
1915	//   "STATE_UNSPECIFIED" - State of the `WorkerPool` is unknown.
1916	//   "CREATING" - `WorkerPool` is being created.
1917	//   "RUNNING" - `WorkerPool` is running.
1918	//   "DELETING" - `WorkerPool` is being deleted: cancelling builds and
1919	// draining workers.
1920	//   "DELETED" - `WorkerPool` is deleted.
1921	State string `json:"state,omitempty"`
1922
1923	// UpdateTime: Output only. Time at which the request to update the
1924	// `WorkerPool` was received.
1925	UpdateTime string `json:"updateTime,omitempty"`
1926
1927	// WorkerConfig: Worker configuration for the `WorkerPool`.
1928	WorkerConfig *WorkerConfig `json:"workerConfig,omitempty"`
1929
1930	// ServerResponse contains the HTTP response code and headers from the
1931	// server.
1932	googleapi.ServerResponse `json:"-"`
1933
1934	// ForceSendFields is a list of field names (e.g. "CreateTime") to
1935	// unconditionally include in API requests. By default, fields with
1936	// empty values are omitted from API requests. However, any non-pointer,
1937	// non-interface field appearing in ForceSendFields will be sent to the
1938	// server regardless of whether the field is empty or not. This may be
1939	// used to include empty fields in Patch requests.
1940	ForceSendFields []string `json:"-"`
1941
1942	// NullFields is a list of field names (e.g. "CreateTime") to include in
1943	// API requests with the JSON null value. By default, fields with empty
1944	// values are omitted from API requests. However, any field with an
1945	// empty value appearing in NullFields will be sent to the server as
1946	// null. It is an error if a field in this list has a non-empty value.
1947	// This may be used to include null fields in Patch requests.
1948	NullFields []string `json:"-"`
1949}
1950
1951func (s *WorkerPool) MarshalJSON() ([]byte, error) {
1952	type NoMethod WorkerPool
1953	raw := NoMethod(*s)
1954	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1955}
1956
1957// method id "cloudbuild.projects.locations.operations.cancel":
1958
1959type ProjectsLocationsOperationsCancelCall struct {
1960	s                      *Service
1961	name                   string
1962	canceloperationrequest *CancelOperationRequest
1963	urlParams_             gensupport.URLParams
1964	ctx_                   context.Context
1965	header_                http.Header
1966}
1967
1968// Cancel: Starts asynchronous cancellation on a long-running operation.
1969// The server makes a best effort to cancel the operation, but success
1970// is not guaranteed. If the server doesn't support this method, it
1971// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use
1972// Operations.GetOperation or other methods to check whether the
1973// cancellation succeeded or whether the operation completed despite
1974// cancellation. On successful cancellation, the operation is not
1975// deleted; instead, it becomes an operation with an Operation.error
1976// value with a google.rpc.Status.code of 1, corresponding to
1977// `Code.CANCELLED`.
1978func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall {
1979	c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1980	c.name = name
1981	c.canceloperationrequest = canceloperationrequest
1982	return c
1983}
1984
1985// Fields allows partial responses to be retrieved. See
1986// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1987// for more information.
1988func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
1989	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1990	return c
1991}
1992
1993// Context sets the context to be used in this call's Do method. Any
1994// pending HTTP request will be aborted if the provided context is
1995// canceled.
1996func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
1997	c.ctx_ = ctx
1998	return c
1999}
2000
2001// Header returns an http.Header that can be modified by the caller to
2002// add HTTP headers to the request.
2003func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
2004	if c.header_ == nil {
2005		c.header_ = make(http.Header)
2006	}
2007	return c.header_
2008}
2009
2010func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
2011	reqHeaders := make(http.Header)
2012	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
2013	for k, v := range c.header_ {
2014		reqHeaders[k] = v
2015	}
2016	reqHeaders.Set("User-Agent", c.s.userAgent())
2017	var body io.Reader = nil
2018	body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
2019	if err != nil {
2020		return nil, err
2021	}
2022	reqHeaders.Set("Content-Type", "application/json")
2023	c.urlParams_.Set("alt", alt)
2024	c.urlParams_.Set("prettyPrint", "false")
2025	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}:cancel")
2026	urls += "?" + c.urlParams_.Encode()
2027	req, err := http.NewRequest("POST", urls, body)
2028	if err != nil {
2029		return nil, err
2030	}
2031	req.Header = reqHeaders
2032	googleapi.Expand(req.URL, map[string]string{
2033		"name": c.name,
2034	})
2035	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2036}
2037
2038// Do executes the "cloudbuild.projects.locations.operations.cancel" call.
2039// Exactly one of *Empty or error will be non-nil. Any non-2xx status
2040// code is an error. Response headers are in either
2041// *Empty.ServerResponse.Header or (if a response was returned at all)
2042// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
2043// check whether the returned error was because http.StatusNotModified
2044// was returned.
2045func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
2046	gensupport.SetOptions(c.urlParams_, opts...)
2047	res, err := c.doRequest("json")
2048	if res != nil && res.StatusCode == http.StatusNotModified {
2049		if res.Body != nil {
2050			res.Body.Close()
2051		}
2052		return nil, &googleapi.Error{
2053			Code:   res.StatusCode,
2054			Header: res.Header,
2055		}
2056	}
2057	if err != nil {
2058		return nil, err
2059	}
2060	defer googleapi.CloseBody(res)
2061	if err := googleapi.CheckResponse(res); err != nil {
2062		return nil, err
2063	}
2064	ret := &Empty{
2065		ServerResponse: googleapi.ServerResponse{
2066			Header:         res.Header,
2067			HTTPStatusCode: res.StatusCode,
2068		},
2069	}
2070	target := &ret
2071	if err := gensupport.DecodeResponse(target, res); err != nil {
2072		return nil, err
2073	}
2074	return ret, nil
2075	// {
2076	//   "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.",
2077	//   "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel",
2078	//   "httpMethod": "POST",
2079	//   "id": "cloudbuild.projects.locations.operations.cancel",
2080	//   "parameterOrder": [
2081	//     "name"
2082	//   ],
2083	//   "parameters": {
2084	//     "name": {
2085	//       "description": "The name of the operation resource to be cancelled.",
2086	//       "location": "path",
2087	//       "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$",
2088	//       "required": true,
2089	//       "type": "string"
2090	//     }
2091	//   },
2092	//   "path": "v1alpha2/{+name}:cancel",
2093	//   "request": {
2094	//     "$ref": "CancelOperationRequest"
2095	//   },
2096	//   "response": {
2097	//     "$ref": "Empty"
2098	//   },
2099	//   "scopes": [
2100	//     "https://www.googleapis.com/auth/cloud-platform"
2101	//   ]
2102	// }
2103
2104}
2105
2106// method id "cloudbuild.projects.locations.operations.get":
2107
2108type ProjectsLocationsOperationsGetCall struct {
2109	s            *Service
2110	name         string
2111	urlParams_   gensupport.URLParams
2112	ifNoneMatch_ string
2113	ctx_         context.Context
2114	header_      http.Header
2115}
2116
2117// Get: Gets the latest state of a long-running operation. Clients can
2118// use this method to poll the operation result at intervals as
2119// recommended by the API service.
2120func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
2121	c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2122	c.name = name
2123	return c
2124}
2125
2126// Fields allows partial responses to be retrieved. See
2127// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2128// for more information.
2129func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
2130	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2131	return c
2132}
2133
2134// IfNoneMatch sets the optional parameter which makes the operation
2135// fail if the object's ETag matches the given value. This is useful for
2136// getting updates only after the object has changed since the last
2137// request. Use googleapi.IsNotModified to check whether the response
2138// error from Do is the result of In-None-Match.
2139func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
2140	c.ifNoneMatch_ = entityTag
2141	return c
2142}
2143
2144// Context sets the context to be used in this call's Do method. Any
2145// pending HTTP request will be aborted if the provided context is
2146// canceled.
2147func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
2148	c.ctx_ = ctx
2149	return c
2150}
2151
2152// Header returns an http.Header that can be modified by the caller to
2153// add HTTP headers to the request.
2154func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
2155	if c.header_ == nil {
2156		c.header_ = make(http.Header)
2157	}
2158	return c.header_
2159}
2160
2161func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
2162	reqHeaders := make(http.Header)
2163	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
2164	for k, v := range c.header_ {
2165		reqHeaders[k] = v
2166	}
2167	reqHeaders.Set("User-Agent", c.s.userAgent())
2168	if c.ifNoneMatch_ != "" {
2169		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2170	}
2171	var body io.Reader = nil
2172	c.urlParams_.Set("alt", alt)
2173	c.urlParams_.Set("prettyPrint", "false")
2174	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}")
2175	urls += "?" + c.urlParams_.Encode()
2176	req, err := http.NewRequest("GET", urls, body)
2177	if err != nil {
2178		return nil, err
2179	}
2180	req.Header = reqHeaders
2181	googleapi.Expand(req.URL, map[string]string{
2182		"name": c.name,
2183	})
2184	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2185}
2186
2187// Do executes the "cloudbuild.projects.locations.operations.get" call.
2188// Exactly one of *Operation or error will be non-nil. Any non-2xx
2189// status code is an error. Response headers are in either
2190// *Operation.ServerResponse.Header or (if a response was returned at
2191// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
2192// to check whether the returned error was because
2193// http.StatusNotModified was returned.
2194func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
2195	gensupport.SetOptions(c.urlParams_, opts...)
2196	res, err := c.doRequest("json")
2197	if res != nil && res.StatusCode == http.StatusNotModified {
2198		if res.Body != nil {
2199			res.Body.Close()
2200		}
2201		return nil, &googleapi.Error{
2202			Code:   res.StatusCode,
2203			Header: res.Header,
2204		}
2205	}
2206	if err != nil {
2207		return nil, err
2208	}
2209	defer googleapi.CloseBody(res)
2210	if err := googleapi.CheckResponse(res); err != nil {
2211		return nil, err
2212	}
2213	ret := &Operation{
2214		ServerResponse: googleapi.ServerResponse{
2215			Header:         res.Header,
2216			HTTPStatusCode: res.StatusCode,
2217		},
2218	}
2219	target := &ret
2220	if err := gensupport.DecodeResponse(target, res); err != nil {
2221		return nil, err
2222	}
2223	return ret, nil
2224	// {
2225	//   "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.",
2226	//   "flatPath": "v1alpha2/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}",
2227	//   "httpMethod": "GET",
2228	//   "id": "cloudbuild.projects.locations.operations.get",
2229	//   "parameterOrder": [
2230	//     "name"
2231	//   ],
2232	//   "parameters": {
2233	//     "name": {
2234	//       "description": "The name of the operation resource.",
2235	//       "location": "path",
2236	//       "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$",
2237	//       "required": true,
2238	//       "type": "string"
2239	//     }
2240	//   },
2241	//   "path": "v1alpha2/{+name}",
2242	//   "response": {
2243	//     "$ref": "Operation"
2244	//   },
2245	//   "scopes": [
2246	//     "https://www.googleapis.com/auth/cloud-platform"
2247	//   ]
2248	// }
2249
2250}
2251
2252// method id "cloudbuild.projects.workerPools.create":
2253
2254type ProjectsWorkerPoolsCreateCall struct {
2255	s          *Service
2256	parent     string
2257	workerpool *WorkerPool
2258	urlParams_ gensupport.URLParams
2259	ctx_       context.Context
2260	header_    http.Header
2261}
2262
2263// Create: Creates a `WorkerPool` to run the builds, and returns the new
2264// worker pool.
2265func (r *ProjectsWorkerPoolsService) Create(parent string, workerpool *WorkerPool) *ProjectsWorkerPoolsCreateCall {
2266	c := &ProjectsWorkerPoolsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2267	c.parent = parent
2268	c.workerpool = workerpool
2269	return c
2270}
2271
2272// WorkerPoolId sets the optional parameter "workerPoolId": Required.
2273// Immutable. The ID to use for the `WorkerPool`, which will become the
2274// final component of the resource name. This value should be 1-63
2275// characters, and valid characters are /a-z-/.
2276func (c *ProjectsWorkerPoolsCreateCall) WorkerPoolId(workerPoolId string) *ProjectsWorkerPoolsCreateCall {
2277	c.urlParams_.Set("workerPoolId", workerPoolId)
2278	return c
2279}
2280
2281// Fields allows partial responses to be retrieved. See
2282// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2283// for more information.
2284func (c *ProjectsWorkerPoolsCreateCall) Fields(s ...googleapi.Field) *ProjectsWorkerPoolsCreateCall {
2285	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2286	return c
2287}
2288
2289// Context sets the context to be used in this call's Do method. Any
2290// pending HTTP request will be aborted if the provided context is
2291// canceled.
2292func (c *ProjectsWorkerPoolsCreateCall) Context(ctx context.Context) *ProjectsWorkerPoolsCreateCall {
2293	c.ctx_ = ctx
2294	return c
2295}
2296
2297// Header returns an http.Header that can be modified by the caller to
2298// add HTTP headers to the request.
2299func (c *ProjectsWorkerPoolsCreateCall) Header() http.Header {
2300	if c.header_ == nil {
2301		c.header_ = make(http.Header)
2302	}
2303	return c.header_
2304}
2305
2306func (c *ProjectsWorkerPoolsCreateCall) doRequest(alt string) (*http.Response, error) {
2307	reqHeaders := make(http.Header)
2308	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
2309	for k, v := range c.header_ {
2310		reqHeaders[k] = v
2311	}
2312	reqHeaders.Set("User-Agent", c.s.userAgent())
2313	var body io.Reader = nil
2314	body, err := googleapi.WithoutDataWrapper.JSONReader(c.workerpool)
2315	if err != nil {
2316		return nil, err
2317	}
2318	reqHeaders.Set("Content-Type", "application/json")
2319	c.urlParams_.Set("alt", alt)
2320	c.urlParams_.Set("prettyPrint", "false")
2321	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/workerPools")
2322	urls += "?" + c.urlParams_.Encode()
2323	req, err := http.NewRequest("POST", urls, body)
2324	if err != nil {
2325		return nil, err
2326	}
2327	req.Header = reqHeaders
2328	googleapi.Expand(req.URL, map[string]string{
2329		"parent": c.parent,
2330	})
2331	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2332}
2333
2334// Do executes the "cloudbuild.projects.workerPools.create" call.
2335// Exactly one of *WorkerPool or error will be non-nil. Any non-2xx
2336// status code is an error. Response headers are in either
2337// *WorkerPool.ServerResponse.Header or (if a response was returned at
2338// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
2339// to check whether the returned error was because
2340// http.StatusNotModified was returned.
2341func (c *ProjectsWorkerPoolsCreateCall) Do(opts ...googleapi.CallOption) (*WorkerPool, error) {
2342	gensupport.SetOptions(c.urlParams_, opts...)
2343	res, err := c.doRequest("json")
2344	if res != nil && res.StatusCode == http.StatusNotModified {
2345		if res.Body != nil {
2346			res.Body.Close()
2347		}
2348		return nil, &googleapi.Error{
2349			Code:   res.StatusCode,
2350			Header: res.Header,
2351		}
2352	}
2353	if err != nil {
2354		return nil, err
2355	}
2356	defer googleapi.CloseBody(res)
2357	if err := googleapi.CheckResponse(res); err != nil {
2358		return nil, err
2359	}
2360	ret := &WorkerPool{
2361		ServerResponse: googleapi.ServerResponse{
2362			Header:         res.Header,
2363			HTTPStatusCode: res.StatusCode,
2364		},
2365	}
2366	target := &ret
2367	if err := gensupport.DecodeResponse(target, res); err != nil {
2368		return nil, err
2369	}
2370	return ret, nil
2371	// {
2372	//   "description": "Creates a `WorkerPool` to run the builds, and returns the new worker pool.",
2373	//   "flatPath": "v1alpha2/projects/{projectsId}/workerPools",
2374	//   "httpMethod": "POST",
2375	//   "id": "cloudbuild.projects.workerPools.create",
2376	//   "parameterOrder": [
2377	//     "parent"
2378	//   ],
2379	//   "parameters": {
2380	//     "parent": {
2381	//       "description": "Required. The parent resource where this book will be created. Format: projects/{project}",
2382	//       "location": "path",
2383	//       "pattern": "^projects/[^/]+$",
2384	//       "required": true,
2385	//       "type": "string"
2386	//     },
2387	//     "workerPoolId": {
2388	//       "description": "Required. Immutable. The ID to use for the `WorkerPool`, which will become the final component of the resource name. This value should be 1-63 characters, and valid characters are /a-z-/.",
2389	//       "location": "query",
2390	//       "type": "string"
2391	//     }
2392	//   },
2393	//   "path": "v1alpha2/{+parent}/workerPools",
2394	//   "request": {
2395	//     "$ref": "WorkerPool"
2396	//   },
2397	//   "response": {
2398	//     "$ref": "WorkerPool"
2399	//   },
2400	//   "scopes": [
2401	//     "https://www.googleapis.com/auth/cloud-platform"
2402	//   ]
2403	// }
2404
2405}
2406
2407// method id "cloudbuild.projects.workerPools.delete":
2408
2409type ProjectsWorkerPoolsDeleteCall struct {
2410	s          *Service
2411	name       string
2412	urlParams_ gensupport.URLParams
2413	ctx_       context.Context
2414	header_    http.Header
2415}
2416
2417// Delete: Deletes a `WorkerPool`.
2418func (r *ProjectsWorkerPoolsService) Delete(name string) *ProjectsWorkerPoolsDeleteCall {
2419	c := &ProjectsWorkerPoolsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2420	c.name = name
2421	return c
2422}
2423
2424// Fields allows partial responses to be retrieved. See
2425// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2426// for more information.
2427func (c *ProjectsWorkerPoolsDeleteCall) Fields(s ...googleapi.Field) *ProjectsWorkerPoolsDeleteCall {
2428	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2429	return c
2430}
2431
2432// Context sets the context to be used in this call's Do method. Any
2433// pending HTTP request will be aborted if the provided context is
2434// canceled.
2435func (c *ProjectsWorkerPoolsDeleteCall) Context(ctx context.Context) *ProjectsWorkerPoolsDeleteCall {
2436	c.ctx_ = ctx
2437	return c
2438}
2439
2440// Header returns an http.Header that can be modified by the caller to
2441// add HTTP headers to the request.
2442func (c *ProjectsWorkerPoolsDeleteCall) Header() http.Header {
2443	if c.header_ == nil {
2444		c.header_ = make(http.Header)
2445	}
2446	return c.header_
2447}
2448
2449func (c *ProjectsWorkerPoolsDeleteCall) doRequest(alt string) (*http.Response, error) {
2450	reqHeaders := make(http.Header)
2451	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
2452	for k, v := range c.header_ {
2453		reqHeaders[k] = v
2454	}
2455	reqHeaders.Set("User-Agent", c.s.userAgent())
2456	var body io.Reader = nil
2457	c.urlParams_.Set("alt", alt)
2458	c.urlParams_.Set("prettyPrint", "false")
2459	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}")
2460	urls += "?" + c.urlParams_.Encode()
2461	req, err := http.NewRequest("DELETE", urls, body)
2462	if err != nil {
2463		return nil, err
2464	}
2465	req.Header = reqHeaders
2466	googleapi.Expand(req.URL, map[string]string{
2467		"name": c.name,
2468	})
2469	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2470}
2471
2472// Do executes the "cloudbuild.projects.workerPools.delete" call.
2473// Exactly one of *Empty or error will be non-nil. Any non-2xx status
2474// code is an error. Response headers are in either
2475// *Empty.ServerResponse.Header or (if a response was returned at all)
2476// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
2477// check whether the returned error was because http.StatusNotModified
2478// was returned.
2479func (c *ProjectsWorkerPoolsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
2480	gensupport.SetOptions(c.urlParams_, opts...)
2481	res, err := c.doRequest("json")
2482	if res != nil && res.StatusCode == http.StatusNotModified {
2483		if res.Body != nil {
2484			res.Body.Close()
2485		}
2486		return nil, &googleapi.Error{
2487			Code:   res.StatusCode,
2488			Header: res.Header,
2489		}
2490	}
2491	if err != nil {
2492		return nil, err
2493	}
2494	defer googleapi.CloseBody(res)
2495	if err := googleapi.CheckResponse(res); err != nil {
2496		return nil, err
2497	}
2498	ret := &Empty{
2499		ServerResponse: googleapi.ServerResponse{
2500			Header:         res.Header,
2501			HTTPStatusCode: res.StatusCode,
2502		},
2503	}
2504	target := &ret
2505	if err := gensupport.DecodeResponse(target, res); err != nil {
2506		return nil, err
2507	}
2508	return ret, nil
2509	// {
2510	//   "description": "Deletes a `WorkerPool`.",
2511	//   "flatPath": "v1alpha2/projects/{projectsId}/workerPools/{workerPoolsId}",
2512	//   "httpMethod": "DELETE",
2513	//   "id": "cloudbuild.projects.workerPools.delete",
2514	//   "parameterOrder": [
2515	//     "name"
2516	//   ],
2517	//   "parameters": {
2518	//     "name": {
2519	//       "description": "Required. The name of the `WorkerPool` to delete. Format: projects/{project}/workerPools/{workerPool}",
2520	//       "location": "path",
2521	//       "pattern": "^projects/[^/]+/workerPools/[^/]+$",
2522	//       "required": true,
2523	//       "type": "string"
2524	//     }
2525	//   },
2526	//   "path": "v1alpha2/{+name}",
2527	//   "response": {
2528	//     "$ref": "Empty"
2529	//   },
2530	//   "scopes": [
2531	//     "https://www.googleapis.com/auth/cloud-platform"
2532	//   ]
2533	// }
2534
2535}
2536
2537// method id "cloudbuild.projects.workerPools.get":
2538
2539type ProjectsWorkerPoolsGetCall struct {
2540	s            *Service
2541	name         string
2542	urlParams_   gensupport.URLParams
2543	ifNoneMatch_ string
2544	ctx_         context.Context
2545	header_      http.Header
2546}
2547
2548// Get: Returns details of a `WorkerPool`.
2549func (r *ProjectsWorkerPoolsService) Get(name string) *ProjectsWorkerPoolsGetCall {
2550	c := &ProjectsWorkerPoolsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2551	c.name = name
2552	return c
2553}
2554
2555// Fields allows partial responses to be retrieved. See
2556// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2557// for more information.
2558func (c *ProjectsWorkerPoolsGetCall) Fields(s ...googleapi.Field) *ProjectsWorkerPoolsGetCall {
2559	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2560	return c
2561}
2562
2563// IfNoneMatch sets the optional parameter which makes the operation
2564// fail if the object's ETag matches the given value. This is useful for
2565// getting updates only after the object has changed since the last
2566// request. Use googleapi.IsNotModified to check whether the response
2567// error from Do is the result of In-None-Match.
2568func (c *ProjectsWorkerPoolsGetCall) IfNoneMatch(entityTag string) *ProjectsWorkerPoolsGetCall {
2569	c.ifNoneMatch_ = entityTag
2570	return c
2571}
2572
2573// Context sets the context to be used in this call's Do method. Any
2574// pending HTTP request will be aborted if the provided context is
2575// canceled.
2576func (c *ProjectsWorkerPoolsGetCall) Context(ctx context.Context) *ProjectsWorkerPoolsGetCall {
2577	c.ctx_ = ctx
2578	return c
2579}
2580
2581// Header returns an http.Header that can be modified by the caller to
2582// add HTTP headers to the request.
2583func (c *ProjectsWorkerPoolsGetCall) Header() http.Header {
2584	if c.header_ == nil {
2585		c.header_ = make(http.Header)
2586	}
2587	return c.header_
2588}
2589
2590func (c *ProjectsWorkerPoolsGetCall) doRequest(alt string) (*http.Response, error) {
2591	reqHeaders := make(http.Header)
2592	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
2593	for k, v := range c.header_ {
2594		reqHeaders[k] = v
2595	}
2596	reqHeaders.Set("User-Agent", c.s.userAgent())
2597	if c.ifNoneMatch_ != "" {
2598		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2599	}
2600	var body io.Reader = nil
2601	c.urlParams_.Set("alt", alt)
2602	c.urlParams_.Set("prettyPrint", "false")
2603	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}")
2604	urls += "?" + c.urlParams_.Encode()
2605	req, err := http.NewRequest("GET", urls, body)
2606	if err != nil {
2607		return nil, err
2608	}
2609	req.Header = reqHeaders
2610	googleapi.Expand(req.URL, map[string]string{
2611		"name": c.name,
2612	})
2613	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2614}
2615
2616// Do executes the "cloudbuild.projects.workerPools.get" call.
2617// Exactly one of *WorkerPool or error will be non-nil. Any non-2xx
2618// status code is an error. Response headers are in either
2619// *WorkerPool.ServerResponse.Header or (if a response was returned at
2620// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
2621// to check whether the returned error was because
2622// http.StatusNotModified was returned.
2623func (c *ProjectsWorkerPoolsGetCall) Do(opts ...googleapi.CallOption) (*WorkerPool, error) {
2624	gensupport.SetOptions(c.urlParams_, opts...)
2625	res, err := c.doRequest("json")
2626	if res != nil && res.StatusCode == http.StatusNotModified {
2627		if res.Body != nil {
2628			res.Body.Close()
2629		}
2630		return nil, &googleapi.Error{
2631			Code:   res.StatusCode,
2632			Header: res.Header,
2633		}
2634	}
2635	if err != nil {
2636		return nil, err
2637	}
2638	defer googleapi.CloseBody(res)
2639	if err := googleapi.CheckResponse(res); err != nil {
2640		return nil, err
2641	}
2642	ret := &WorkerPool{
2643		ServerResponse: googleapi.ServerResponse{
2644			Header:         res.Header,
2645			HTTPStatusCode: res.StatusCode,
2646		},
2647	}
2648	target := &ret
2649	if err := gensupport.DecodeResponse(target, res); err != nil {
2650		return nil, err
2651	}
2652	return ret, nil
2653	// {
2654	//   "description": "Returns details of a `WorkerPool`.",
2655	//   "flatPath": "v1alpha2/projects/{projectsId}/workerPools/{workerPoolsId}",
2656	//   "httpMethod": "GET",
2657	//   "id": "cloudbuild.projects.workerPools.get",
2658	//   "parameterOrder": [
2659	//     "name"
2660	//   ],
2661	//   "parameters": {
2662	//     "name": {
2663	//       "description": "Required. The name of the `WorkerPool` to retrieve. Format: projects/{project}/workerPools/{workerPool}",
2664	//       "location": "path",
2665	//       "pattern": "^projects/[^/]+/workerPools/[^/]+$",
2666	//       "required": true,
2667	//       "type": "string"
2668	//     }
2669	//   },
2670	//   "path": "v1alpha2/{+name}",
2671	//   "response": {
2672	//     "$ref": "WorkerPool"
2673	//   },
2674	//   "scopes": [
2675	//     "https://www.googleapis.com/auth/cloud-platform"
2676	//   ]
2677	// }
2678
2679}
2680
2681// method id "cloudbuild.projects.workerPools.list":
2682
2683type ProjectsWorkerPoolsListCall struct {
2684	s            *Service
2685	parent       string
2686	urlParams_   gensupport.URLParams
2687	ifNoneMatch_ string
2688	ctx_         context.Context
2689	header_      http.Header
2690}
2691
2692// List: Lists `WorkerPool`s by project.
2693func (r *ProjectsWorkerPoolsService) List(parent string) *ProjectsWorkerPoolsListCall {
2694	c := &ProjectsWorkerPoolsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2695	c.parent = parent
2696	return c
2697}
2698
2699// Fields allows partial responses to be retrieved. See
2700// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2701// for more information.
2702func (c *ProjectsWorkerPoolsListCall) Fields(s ...googleapi.Field) *ProjectsWorkerPoolsListCall {
2703	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2704	return c
2705}
2706
2707// IfNoneMatch sets the optional parameter which makes the operation
2708// fail if the object's ETag matches the given value. This is useful for
2709// getting updates only after the object has changed since the last
2710// request. Use googleapi.IsNotModified to check whether the response
2711// error from Do is the result of In-None-Match.
2712func (c *ProjectsWorkerPoolsListCall) IfNoneMatch(entityTag string) *ProjectsWorkerPoolsListCall {
2713	c.ifNoneMatch_ = entityTag
2714	return c
2715}
2716
2717// Context sets the context to be used in this call's Do method. Any
2718// pending HTTP request will be aborted if the provided context is
2719// canceled.
2720func (c *ProjectsWorkerPoolsListCall) Context(ctx context.Context) *ProjectsWorkerPoolsListCall {
2721	c.ctx_ = ctx
2722	return c
2723}
2724
2725// Header returns an http.Header that can be modified by the caller to
2726// add HTTP headers to the request.
2727func (c *ProjectsWorkerPoolsListCall) Header() http.Header {
2728	if c.header_ == nil {
2729		c.header_ = make(http.Header)
2730	}
2731	return c.header_
2732}
2733
2734func (c *ProjectsWorkerPoolsListCall) doRequest(alt string) (*http.Response, error) {
2735	reqHeaders := make(http.Header)
2736	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
2737	for k, v := range c.header_ {
2738		reqHeaders[k] = v
2739	}
2740	reqHeaders.Set("User-Agent", c.s.userAgent())
2741	if c.ifNoneMatch_ != "" {
2742		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2743	}
2744	var body io.Reader = nil
2745	c.urlParams_.Set("alt", alt)
2746	c.urlParams_.Set("prettyPrint", "false")
2747	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+parent}/workerPools")
2748	urls += "?" + c.urlParams_.Encode()
2749	req, err := http.NewRequest("GET", urls, body)
2750	if err != nil {
2751		return nil, err
2752	}
2753	req.Header = reqHeaders
2754	googleapi.Expand(req.URL, map[string]string{
2755		"parent": c.parent,
2756	})
2757	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2758}
2759
2760// Do executes the "cloudbuild.projects.workerPools.list" call.
2761// Exactly one of *ListWorkerPoolsResponse or error will be non-nil. Any
2762// non-2xx status code is an error. Response headers are in either
2763// *ListWorkerPoolsResponse.ServerResponse.Header or (if a response was
2764// returned at all) in error.(*googleapi.Error).Header. Use
2765// googleapi.IsNotModified to check whether the returned error was
2766// because http.StatusNotModified was returned.
2767func (c *ProjectsWorkerPoolsListCall) Do(opts ...googleapi.CallOption) (*ListWorkerPoolsResponse, error) {
2768	gensupport.SetOptions(c.urlParams_, opts...)
2769	res, err := c.doRequest("json")
2770	if res != nil && res.StatusCode == http.StatusNotModified {
2771		if res.Body != nil {
2772			res.Body.Close()
2773		}
2774		return nil, &googleapi.Error{
2775			Code:   res.StatusCode,
2776			Header: res.Header,
2777		}
2778	}
2779	if err != nil {
2780		return nil, err
2781	}
2782	defer googleapi.CloseBody(res)
2783	if err := googleapi.CheckResponse(res); err != nil {
2784		return nil, err
2785	}
2786	ret := &ListWorkerPoolsResponse{
2787		ServerResponse: googleapi.ServerResponse{
2788			Header:         res.Header,
2789			HTTPStatusCode: res.StatusCode,
2790		},
2791	}
2792	target := &ret
2793	if err := gensupport.DecodeResponse(target, res); err != nil {
2794		return nil, err
2795	}
2796	return ret, nil
2797	// {
2798	//   "description": "Lists `WorkerPool`s by project.",
2799	//   "flatPath": "v1alpha2/projects/{projectsId}/workerPools",
2800	//   "httpMethod": "GET",
2801	//   "id": "cloudbuild.projects.workerPools.list",
2802	//   "parameterOrder": [
2803	//     "parent"
2804	//   ],
2805	//   "parameters": {
2806	//     "parent": {
2807	//       "description": "Required. The parent, which owns this collection of `WorkerPools`. Format: projects/{project}",
2808	//       "location": "path",
2809	//       "pattern": "^projects/[^/]+$",
2810	//       "required": true,
2811	//       "type": "string"
2812	//     }
2813	//   },
2814	//   "path": "v1alpha2/{+parent}/workerPools",
2815	//   "response": {
2816	//     "$ref": "ListWorkerPoolsResponse"
2817	//   },
2818	//   "scopes": [
2819	//     "https://www.googleapis.com/auth/cloud-platform"
2820	//   ]
2821	// }
2822
2823}
2824
2825// method id "cloudbuild.projects.workerPools.patch":
2826
2827type ProjectsWorkerPoolsPatchCall struct {
2828	s          *Service
2829	name       string
2830	workerpool *WorkerPool
2831	urlParams_ gensupport.URLParams
2832	ctx_       context.Context
2833	header_    http.Header
2834}
2835
2836// Patch: Updates a `WorkerPool`.
2837func (r *ProjectsWorkerPoolsService) Patch(name string, workerpool *WorkerPool) *ProjectsWorkerPoolsPatchCall {
2838	c := &ProjectsWorkerPoolsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2839	c.name = name
2840	c.workerpool = workerpool
2841	return c
2842}
2843
2844// UpdateMask sets the optional parameter "updateMask": A mask
2845// specifying which fields in `WorkerPool` should be updated.
2846func (c *ProjectsWorkerPoolsPatchCall) UpdateMask(updateMask string) *ProjectsWorkerPoolsPatchCall {
2847	c.urlParams_.Set("updateMask", updateMask)
2848	return c
2849}
2850
2851// Fields allows partial responses to be retrieved. See
2852// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2853// for more information.
2854func (c *ProjectsWorkerPoolsPatchCall) Fields(s ...googleapi.Field) *ProjectsWorkerPoolsPatchCall {
2855	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2856	return c
2857}
2858
2859// Context sets the context to be used in this call's Do method. Any
2860// pending HTTP request will be aborted if the provided context is
2861// canceled.
2862func (c *ProjectsWorkerPoolsPatchCall) Context(ctx context.Context) *ProjectsWorkerPoolsPatchCall {
2863	c.ctx_ = ctx
2864	return c
2865}
2866
2867// Header returns an http.Header that can be modified by the caller to
2868// add HTTP headers to the request.
2869func (c *ProjectsWorkerPoolsPatchCall) Header() http.Header {
2870	if c.header_ == nil {
2871		c.header_ = make(http.Header)
2872	}
2873	return c.header_
2874}
2875
2876func (c *ProjectsWorkerPoolsPatchCall) doRequest(alt string) (*http.Response, error) {
2877	reqHeaders := make(http.Header)
2878	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
2879	for k, v := range c.header_ {
2880		reqHeaders[k] = v
2881	}
2882	reqHeaders.Set("User-Agent", c.s.userAgent())
2883	var body io.Reader = nil
2884	body, err := googleapi.WithoutDataWrapper.JSONReader(c.workerpool)
2885	if err != nil {
2886		return nil, err
2887	}
2888	reqHeaders.Set("Content-Type", "application/json")
2889	c.urlParams_.Set("alt", alt)
2890	c.urlParams_.Set("prettyPrint", "false")
2891	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}")
2892	urls += "?" + c.urlParams_.Encode()
2893	req, err := http.NewRequest("PATCH", urls, body)
2894	if err != nil {
2895		return nil, err
2896	}
2897	req.Header = reqHeaders
2898	googleapi.Expand(req.URL, map[string]string{
2899		"name": c.name,
2900	})
2901	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2902}
2903
2904// Do executes the "cloudbuild.projects.workerPools.patch" call.
2905// Exactly one of *WorkerPool or error will be non-nil. Any non-2xx
2906// status code is an error. Response headers are in either
2907// *WorkerPool.ServerResponse.Header or (if a response was returned at
2908// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
2909// to check whether the returned error was because
2910// http.StatusNotModified was returned.
2911func (c *ProjectsWorkerPoolsPatchCall) Do(opts ...googleapi.CallOption) (*WorkerPool, error) {
2912	gensupport.SetOptions(c.urlParams_, opts...)
2913	res, err := c.doRequest("json")
2914	if res != nil && res.StatusCode == http.StatusNotModified {
2915		if res.Body != nil {
2916			res.Body.Close()
2917		}
2918		return nil, &googleapi.Error{
2919			Code:   res.StatusCode,
2920			Header: res.Header,
2921		}
2922	}
2923	if err != nil {
2924		return nil, err
2925	}
2926	defer googleapi.CloseBody(res)
2927	if err := googleapi.CheckResponse(res); err != nil {
2928		return nil, err
2929	}
2930	ret := &WorkerPool{
2931		ServerResponse: googleapi.ServerResponse{
2932			Header:         res.Header,
2933			HTTPStatusCode: res.StatusCode,
2934		},
2935	}
2936	target := &ret
2937	if err := gensupport.DecodeResponse(target, res); err != nil {
2938		return nil, err
2939	}
2940	return ret, nil
2941	// {
2942	//   "description": "Updates a `WorkerPool`.",
2943	//   "flatPath": "v1alpha2/projects/{projectsId}/workerPools/{workerPoolsId}",
2944	//   "httpMethod": "PATCH",
2945	//   "id": "cloudbuild.projects.workerPools.patch",
2946	//   "parameterOrder": [
2947	//     "name"
2948	//   ],
2949	//   "parameters": {
2950	//     "name": {
2951	//       "description": "Output only. The resource name of the `WorkerPool`. Format of the name is `projects/{project_id}/workerPools/{worker_pool_id}`, where the value of {worker_pool_id} is provided in the CreateWorkerPool request.",
2952	//       "location": "path",
2953	//       "pattern": "^projects/[^/]+/workerPools/[^/]+$",
2954	//       "required": true,
2955	//       "type": "string"
2956	//     },
2957	//     "updateMask": {
2958	//       "description": "A mask specifying which fields in `WorkerPool` should be updated.",
2959	//       "format": "google-fieldmask",
2960	//       "location": "query",
2961	//       "type": "string"
2962	//     }
2963	//   },
2964	//   "path": "v1alpha2/{+name}",
2965	//   "request": {
2966	//     "$ref": "WorkerPool"
2967	//   },
2968	//   "response": {
2969	//     "$ref": "WorkerPool"
2970	//   },
2971	//   "scopes": [
2972	//     "https://www.googleapis.com/auth/cloud-platform"
2973	//   ]
2974	// }
2975
2976}
2977