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