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