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