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/v1"
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/v1"
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:v1"
75const apiName = "cloudbuild"
76const apiVersion = "v1"
77const basePath = "https://cloudbuild.googleapis.com/"
78const mtlsBasePath = "https://cloudbuild.mtls.googleapis.com/"
79
80// OAuth2 scopes used by this API.
81const (
82	// See, edit, configure, and delete your Google Cloud Platform data
83	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
84)
85
86// NewService creates a new Service.
87func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
88	scopesOption := option.WithScopes(
89		"https://www.googleapis.com/auth/cloud-platform",
90	)
91	// NOTE: prepend, so we don't override user-specified scopes.
92	opts = append([]option.ClientOption{scopesOption}, opts...)
93	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
94	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
95	client, endpoint, err := htransport.NewClient(ctx, opts...)
96	if err != nil {
97		return nil, err
98	}
99	s, err := New(client)
100	if err != nil {
101		return nil, err
102	}
103	if endpoint != "" {
104		s.BasePath = endpoint
105	}
106	return s, nil
107}
108
109// New creates a new Service. It uses the provided http.Client for requests.
110//
111// Deprecated: please use NewService instead.
112// To provide a custom HTTP client, use option.WithHTTPClient.
113// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
114func New(client *http.Client) (*Service, error) {
115	if client == nil {
116		return nil, errors.New("client is nil")
117	}
118	s := &Service{client: client, BasePath: basePath}
119	s.Operations = NewOperationsService(s)
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	Operations *OperationsService
130
131	Projects *ProjectsService
132}
133
134func (s *Service) userAgent() string {
135	if s.UserAgent == "" {
136		return googleapi.UserAgent
137	}
138	return googleapi.UserAgent + " " + s.UserAgent
139}
140
141func NewOperationsService(s *Service) *OperationsService {
142	rs := &OperationsService{s: s}
143	return rs
144}
145
146type OperationsService struct {
147	s *Service
148}
149
150func NewProjectsService(s *Service) *ProjectsService {
151	rs := &ProjectsService{s: s}
152	rs.Builds = NewProjectsBuildsService(s)
153	rs.Locations = NewProjectsLocationsService(s)
154	rs.Triggers = NewProjectsTriggersService(s)
155	return rs
156}
157
158type ProjectsService struct {
159	s *Service
160
161	Builds *ProjectsBuildsService
162
163	Locations *ProjectsLocationsService
164
165	Triggers *ProjectsTriggersService
166}
167
168func NewProjectsBuildsService(s *Service) *ProjectsBuildsService {
169	rs := &ProjectsBuildsService{s: s}
170	return rs
171}
172
173type ProjectsBuildsService struct {
174	s *Service
175}
176
177func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
178	rs := &ProjectsLocationsService{s: s}
179	rs.Builds = NewProjectsLocationsBuildsService(s)
180	rs.Operations = NewProjectsLocationsOperationsService(s)
181	return rs
182}
183
184type ProjectsLocationsService struct {
185	s *Service
186
187	Builds *ProjectsLocationsBuildsService
188
189	Operations *ProjectsLocationsOperationsService
190}
191
192func NewProjectsLocationsBuildsService(s *Service) *ProjectsLocationsBuildsService {
193	rs := &ProjectsLocationsBuildsService{s: s}
194	return rs
195}
196
197type ProjectsLocationsBuildsService struct {
198	s *Service
199}
200
201func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
202	rs := &ProjectsLocationsOperationsService{s: s}
203	return rs
204}
205
206type ProjectsLocationsOperationsService struct {
207	s *Service
208}
209
210func NewProjectsTriggersService(s *Service) *ProjectsTriggersService {
211	rs := &ProjectsTriggersService{s: s}
212	return rs
213}
214
215type ProjectsTriggersService struct {
216	s *Service
217}
218
219// ArtifactObjects: Files in the workspace to upload to Cloud Storage
220// upon successful completion of all build steps.
221type ArtifactObjects struct {
222	// Location: Cloud Storage bucket and optional object path, in the form
223	// "gs://bucket/path/to/somewhere/". (see Bucket Name Requirements
224	// (https://cloud.google.com/storage/docs/bucket-naming#requirements)).
225	// Files in the workspace matching any path pattern will be uploaded to
226	// Cloud Storage with this location as a prefix.
227	Location string `json:"location,omitempty"`
228
229	// Paths: Path globs used to match files in the build's workspace.
230	Paths []string `json:"paths,omitempty"`
231
232	// Timing: Output only. Stores timing information for pushing all
233	// artifact objects.
234	Timing *TimeSpan `json:"timing,omitempty"`
235
236	// ForceSendFields is a list of field names (e.g. "Location") to
237	// unconditionally include in API requests. By default, fields with
238	// empty values are omitted from API requests. However, any non-pointer,
239	// non-interface field appearing in ForceSendFields will be sent to the
240	// server regardless of whether the field is empty or not. This may be
241	// used to include empty fields in Patch requests.
242	ForceSendFields []string `json:"-"`
243
244	// NullFields is a list of field names (e.g. "Location") to include in
245	// API requests with the JSON null value. By default, fields with empty
246	// values are omitted from API requests. However, any field with an
247	// empty value appearing in NullFields will be sent to the server as
248	// null. It is an error if a field in this list has a non-empty value.
249	// This may be used to include null fields in Patch requests.
250	NullFields []string `json:"-"`
251}
252
253func (s *ArtifactObjects) MarshalJSON() ([]byte, error) {
254	type NoMethod ArtifactObjects
255	raw := NoMethod(*s)
256	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
257}
258
259// ArtifactResult: An artifact that was uploaded during a build. This is
260// a single record in the artifact manifest JSON file.
261type ArtifactResult struct {
262	// FileHash: The file hash of the artifact.
263	FileHash []*FileHashes `json:"fileHash,omitempty"`
264
265	// Location: The path of an artifact in a Google Cloud Storage bucket,
266	// with the generation number. For example,
267	// `gs://mybucket/path/to/output.jar#generation`.
268	Location string `json:"location,omitempty"`
269
270	// ForceSendFields is a list of field names (e.g. "FileHash") to
271	// unconditionally include in API requests. By default, fields with
272	// empty values are omitted from API requests. However, any non-pointer,
273	// non-interface field appearing in ForceSendFields will be sent to the
274	// server regardless of whether the field is empty or not. This may be
275	// used to include empty fields in Patch requests.
276	ForceSendFields []string `json:"-"`
277
278	// NullFields is a list of field names (e.g. "FileHash") to include in
279	// API requests with the JSON null value. By default, fields with empty
280	// values are omitted from API requests. However, any field with an
281	// empty value appearing in NullFields will be sent to the server as
282	// null. It is an error if a field in this list has a non-empty value.
283	// This may be used to include null fields in Patch requests.
284	NullFields []string `json:"-"`
285}
286
287func (s *ArtifactResult) MarshalJSON() ([]byte, error) {
288	type NoMethod ArtifactResult
289	raw := NoMethod(*s)
290	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
291}
292
293// Artifacts: Artifacts produced by a build that should be uploaded upon
294// successful completion of all build steps.
295type Artifacts struct {
296	// Images: A list of images to be pushed upon the successful completion
297	// of all build steps. The images will be pushed using the builder
298	// service account's credentials. The digests of the pushed images will
299	// be stored in the Build resource's results field. If any of the images
300	// fail to be pushed, the build is marked FAILURE.
301	Images []string `json:"images,omitempty"`
302
303	// Objects: A list of objects to be uploaded to Cloud Storage upon
304	// successful completion of all build steps. Files in the workspace
305	// matching specified paths globs will be uploaded to the specified
306	// Cloud Storage location using the builder service account's
307	// credentials. The location and generation of the uploaded objects will
308	// be stored in the Build resource's results field. If any objects fail
309	// to be pushed, the build is marked FAILURE.
310	Objects *ArtifactObjects `json:"objects,omitempty"`
311
312	// ForceSendFields is a list of field names (e.g. "Images") to
313	// unconditionally include in API requests. By default, fields with
314	// empty values are omitted from API requests. However, any non-pointer,
315	// non-interface field appearing in ForceSendFields will be sent to the
316	// server regardless of whether the field is empty or not. This may be
317	// used to include empty fields in Patch requests.
318	ForceSendFields []string `json:"-"`
319
320	// NullFields is a list of field names (e.g. "Images") to include in API
321	// requests with the JSON null value. By default, fields with empty
322	// values are omitted from API requests. However, any field with an
323	// empty value appearing in NullFields will be sent to the server as
324	// null. It is an error if a field in this list has a non-empty value.
325	// This may be used to include null fields in Patch requests.
326	NullFields []string `json:"-"`
327}
328
329func (s *Artifacts) MarshalJSON() ([]byte, error) {
330	type NoMethod Artifacts
331	raw := NoMethod(*s)
332	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
333}
334
335// Build: A build resource in the Cloud Build API. At a high level, a
336// `Build` describes where to find source code, how to build it (for
337// example, the builder image to run on the source), and where to store
338// the built artifacts. Fields can include the following variables,
339// which will be expanded when the build is created: - $PROJECT_ID: the
340// project ID of the build. - $PROJECT_NUMBER: the project number of the
341// build. - $BUILD_ID: the autogenerated ID of the build. - $REPO_NAME:
342// the source repository name specified by RepoSource. - $BRANCH_NAME:
343// the branch name specified by RepoSource. - $TAG_NAME: the tag name
344// specified by RepoSource. - $REVISION_ID or $COMMIT_SHA: the commit
345// SHA specified by RepoSource or resolved from the specified branch or
346// tag. - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.
347type Build struct {
348	// Artifacts: Artifacts produced by the build that should be uploaded
349	// upon successful completion of all build steps.
350	Artifacts *Artifacts `json:"artifacts,omitempty"`
351
352	// AvailableSecrets: Secrets and secret environment variables.
353	AvailableSecrets *Secrets `json:"availableSecrets,omitempty"`
354
355	// BuildTriggerId: Output only. The ID of the `BuildTrigger` that
356	// triggered this build, if it was triggered automatically.
357	BuildTriggerId string `json:"buildTriggerId,omitempty"`
358
359	// CreateTime: Output only. Time at which the request to create the
360	// build was received.
361	CreateTime string `json:"createTime,omitempty"`
362
363	// FinishTime: Output only. Time at which execution of the build was
364	// finished. The difference between finish_time and start_time is the
365	// duration of the build's execution.
366	FinishTime string `json:"finishTime,omitempty"`
367
368	// Id: Output only. Unique identifier of the build.
369	Id string `json:"id,omitempty"`
370
371	// Images: A list of images to be pushed upon the successful completion
372	// of all build steps. The images are pushed using the builder service
373	// account's credentials. The digests of the pushed images will be
374	// stored in the `Build` resource's results field. If any of the images
375	// fail to be pushed, the build status is marked `FAILURE`.
376	Images []string `json:"images,omitempty"`
377
378	// LogUrl: Output only. URL to logs for this build in Google Cloud
379	// Console.
380	LogUrl string `json:"logUrl,omitempty"`
381
382	// LogsBucket: Google Cloud Storage bucket where logs should be written
383	// (see Bucket Name Requirements
384	// (https://cloud.google.com/storage/docs/bucket-naming#requirements)).
385	// Logs file names will be of the format
386	// `${logs_bucket}/log-${build_id}.txt`.
387	LogsBucket string `json:"logsBucket,omitempty"`
388
389	// Name: Output only. The 'Build' name with format:
390	// `projects/{project}/locations/{location}/builds/{build}`, where
391	// {build} is a unique identifier generated by the service.
392	Name string `json:"name,omitempty"`
393
394	// Options: Special options for this build.
395	Options *BuildOptions `json:"options,omitempty"`
396
397	// ProjectId: Output only. ID of the project.
398	ProjectId string `json:"projectId,omitempty"`
399
400	// QueueTtl: TTL in queue for this build. If provided and the build is
401	// enqueued longer than this value, the build will expire and the build
402	// status will be `EXPIRED`. The TTL starts ticking from create_time.
403	QueueTtl string `json:"queueTtl,omitempty"`
404
405	// Results: Output only. Results of the build.
406	Results *Results `json:"results,omitempty"`
407
408	// Secrets: Secrets to decrypt using Cloud Key Management Service. Note:
409	// Secret Manager is the recommended technique for managing sensitive
410	// data with Cloud Build. Use `available_secrets` to configure builds to
411	// access secrets from Secret Manager. For instructions, see:
412	// https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets
413	Secrets []*Secret `json:"secrets,omitempty"`
414
415	// ServiceAccount: IAM service account whose credentials will be used at
416	// build runtime. Must be of the format
417	// `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. ACCOUNT can be
418	// email address or uniqueId of the service account. This field is in
419	// beta.
420	ServiceAccount string `json:"serviceAccount,omitempty"`
421
422	// Source: The location of the source files to build.
423	Source *Source `json:"source,omitempty"`
424
425	// SourceProvenance: Output only. A permanent fixed identifier for
426	// source.
427	SourceProvenance *SourceProvenance `json:"sourceProvenance,omitempty"`
428
429	// StartTime: Output only. Time at which execution of the build was
430	// started.
431	StartTime string `json:"startTime,omitempty"`
432
433	// Status: Output only. Status of the build.
434	//
435	// Possible values:
436	//   "STATUS_UNKNOWN" - Status of the build is unknown.
437	//   "QUEUED" - Build or step is queued; work has not yet begun.
438	//   "WORKING" - Build or step is being executed.
439	//   "SUCCESS" - Build or step finished successfully.
440	//   "FAILURE" - Build or step failed to complete successfully.
441	//   "INTERNAL_ERROR" - Build or step failed due to an internal cause.
442	//   "TIMEOUT" - Build or step took longer than was allowed.
443	//   "CANCELLED" - Build or step was canceled by a user.
444	//   "EXPIRED" - Build was enqueued for longer than the value of
445	// `queue_ttl`.
446	Status string `json:"status,omitempty"`
447
448	// StatusDetail: Output only. Customer-readable message about the
449	// current status.
450	StatusDetail string `json:"statusDetail,omitempty"`
451
452	// Steps: Required. The operations to be performed on the workspace.
453	Steps []*BuildStep `json:"steps,omitempty"`
454
455	// Substitutions: Substitutions data for `Build` resource.
456	Substitutions map[string]string `json:"substitutions,omitempty"`
457
458	// Tags: Tags for annotation of a `Build`. These are not docker tags.
459	Tags []string `json:"tags,omitempty"`
460
461	// Timeout: Amount of time that this build should be allowed to run, to
462	// second granularity. If this amount of time elapses, work on the build
463	// will cease and the build status will be `TIMEOUT`. `timeout` starts
464	// ticking from `startTime`. Default time is ten minutes.
465	Timeout string `json:"timeout,omitempty"`
466
467	// Timing: Output only. Stores timing information for phases of the
468	// build. Valid keys are: * BUILD: time to execute all build steps *
469	// PUSH: time to push all specified images. * FETCHSOURCE: time to fetch
470	// source. If the build does not specify source or images, these keys
471	// will not be included.
472	Timing map[string]TimeSpan `json:"timing,omitempty"`
473
474	// ServerResponse contains the HTTP response code and headers from the
475	// server.
476	googleapi.ServerResponse `json:"-"`
477
478	// ForceSendFields is a list of field names (e.g. "Artifacts") to
479	// unconditionally include in API requests. By default, fields with
480	// empty values are omitted from API requests. However, any non-pointer,
481	// non-interface field appearing in ForceSendFields will be sent to the
482	// server regardless of whether the field is empty or not. This may be
483	// used to include empty fields in Patch requests.
484	ForceSendFields []string `json:"-"`
485
486	// NullFields is a list of field names (e.g. "Artifacts") to include in
487	// API requests with the JSON null value. By default, fields with empty
488	// values are omitted from API requests. However, any field with an
489	// empty value appearing in NullFields will be sent to the server as
490	// null. It is an error if a field in this list has a non-empty value.
491	// This may be used to include null fields in Patch requests.
492	NullFields []string `json:"-"`
493}
494
495func (s *Build) MarshalJSON() ([]byte, error) {
496	type NoMethod Build
497	raw := NoMethod(*s)
498	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
499}
500
501// BuildOperationMetadata: Metadata for build operations.
502type BuildOperationMetadata struct {
503	// Build: The build that the operation is tracking.
504	Build *Build `json:"build,omitempty"`
505
506	// ForceSendFields is a list of field names (e.g. "Build") to
507	// unconditionally include in API requests. By default, fields with
508	// empty values are omitted from API requests. However, any non-pointer,
509	// non-interface field appearing in ForceSendFields will be sent to the
510	// server regardless of whether the field is empty or not. This may be
511	// used to include empty fields in Patch requests.
512	ForceSendFields []string `json:"-"`
513
514	// NullFields is a list of field names (e.g. "Build") to include in API
515	// requests with the JSON null value. By default, fields with empty
516	// values are omitted from API requests. However, any field with an
517	// empty value appearing in NullFields will be sent to the server as
518	// null. It is an error if a field in this list has a non-empty value.
519	// This may be used to include null fields in Patch requests.
520	NullFields []string `json:"-"`
521}
522
523func (s *BuildOperationMetadata) MarshalJSON() ([]byte, error) {
524	type NoMethod BuildOperationMetadata
525	raw := NoMethod(*s)
526	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
527}
528
529// BuildOptions: Optional arguments to enable specific features of
530// builds.
531type BuildOptions struct {
532	// DiskSizeGb: Requested disk size for the VM that runs the build. Note
533	// that this is *NOT* "disk free"; some of the space will be used by the
534	// operating system and build utilities. Also note that this is the
535	// minimum disk size that will be allocated for the build -- the build
536	// may run with a larger disk than requested. At present, the maximum
537	// disk size is 1000GB; builds that request more than the maximum are
538	// rejected with an error.
539	DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"`
540
541	// DynamicSubstitutions: Option to specify whether or not to apply bash
542	// style string operations to the substitutions. NOTE: this is always
543	// enabled for triggered builds and cannot be overridden in the build
544	// configuration file.
545	DynamicSubstitutions bool `json:"dynamicSubstitutions,omitempty"`
546
547	// Env: A list of global environment variable definitions that will
548	// exist for all build steps in this build. If a variable is defined in
549	// both globally and in a build step, the variable will use the build
550	// step value. The elements are of the form "KEY=VALUE" for the
551	// environment variable "KEY" being given the value "VALUE".
552	Env []string `json:"env,omitempty"`
553
554	// LogStreamingOption: Option to define build log streaming behavior to
555	// Google Cloud Storage.
556	//
557	// Possible values:
558	//   "STREAM_DEFAULT" - Service may automatically determine build log
559	// streaming behavior.
560	//   "STREAM_ON" - Build logs should be streamed to Google Cloud
561	// Storage.
562	//   "STREAM_OFF" - Build logs should not be streamed to Google Cloud
563	// Storage; they will be written when the build is completed.
564	LogStreamingOption string `json:"logStreamingOption,omitempty"`
565
566	// Logging: Option to specify the logging mode, which determines if and
567	// where build logs are stored.
568	//
569	// Possible values:
570	//   "LOGGING_UNSPECIFIED" - The service determines the logging mode.
571	// The default is `LEGACY`. Do not rely on the default logging behavior
572	// as it may change in the future.
573	//   "LEGACY" - Cloud Logging and Cloud Storage logging are enabled.
574	//   "GCS_ONLY" - Only Cloud Storage logging is enabled.
575	//   "STACKDRIVER_ONLY" - This option is the same as CLOUD_LOGGING_ONLY.
576	//   "CLOUD_LOGGING_ONLY" - Only Cloud Logging is enabled. Note that
577	// logs for both the Cloud Console UI and Cloud SDK are based on Cloud
578	// Storage logs, so neither will provide logs if this option is chosen.
579	//   "NONE" - Turn off all logging. No build logs will be captured.
580	Logging string `json:"logging,omitempty"`
581
582	// MachineType: Compute Engine machine type on which to run the build.
583	//
584	// Possible values:
585	//   "UNSPECIFIED" - Standard machine type.
586	//   "N1_HIGHCPU_8" - Highcpu machine with 8 CPUs.
587	//   "N1_HIGHCPU_32" - Highcpu machine with 32 CPUs.
588	//   "E2_HIGHCPU_8" - Highcpu e2 machine with 8 CPUs.
589	//   "E2_HIGHCPU_32" - Highcpu e2 machine with 32 CPUs.
590	MachineType string `json:"machineType,omitempty"`
591
592	// RequestedVerifyOption: Requested verifiability options.
593	//
594	// Possible values:
595	//   "NOT_VERIFIED" - Not a verifiable build. (default)
596	//   "VERIFIED" - Verified build.
597	RequestedVerifyOption string `json:"requestedVerifyOption,omitempty"`
598
599	// SecretEnv: A list of global environment variables, which are
600	// encrypted using a Cloud Key Management Service crypto key. These
601	// values must be specified in the build's `Secret`. These variables
602	// will be available to all build steps in this build.
603	SecretEnv []string `json:"secretEnv,omitempty"`
604
605	// SourceProvenanceHash: Requested hash for SourceProvenance.
606	//
607	// Possible values:
608	//   "NONE" - No hash requested.
609	//   "SHA256" - Use a sha256 hash.
610	//   "MD5" - Use a md5 hash.
611	SourceProvenanceHash []string `json:"sourceProvenanceHash,omitempty"`
612
613	// SubstitutionOption: Option to specify behavior when there is an error
614	// in the substitution checks. NOTE: this is always set to ALLOW_LOOSE
615	// for triggered builds and cannot be overridden in the build
616	// configuration file.
617	//
618	// Possible values:
619	//   "MUST_MATCH" - Fails the build if error in substitutions checks,
620	// like missing a substitution in the template or in the map.
621	//   "ALLOW_LOOSE" - Do not fail the build if error in substitutions
622	// checks.
623	SubstitutionOption string `json:"substitutionOption,omitempty"`
624
625	// Volumes: Global list of volumes to mount for ALL build steps Each
626	// volume is created as an empty volume prior to starting the build
627	// process. Upon completion of the build, volumes and their contents are
628	// discarded. Global volume names and paths cannot conflict with the
629	// volumes defined a build step. Using a global volume in a build with
630	// only one step is not valid as it is indicative of a build request
631	// with an incorrect configuration.
632	Volumes []*Volume `json:"volumes,omitempty"`
633
634	// WorkerPool: Option to specify a `WorkerPool` for the build. Format:
635	// projects/{project}/locations/{location}/workerPools/{workerPool} This
636	// field is in beta and is available only to restricted users.
637	WorkerPool string `json:"workerPool,omitempty"`
638
639	// ForceSendFields is a list of field names (e.g. "DiskSizeGb") to
640	// unconditionally include in API requests. By default, fields with
641	// empty values are omitted from API requests. However, any non-pointer,
642	// non-interface field appearing in ForceSendFields will be sent to the
643	// server regardless of whether the field is empty or not. This may be
644	// used to include empty fields in Patch requests.
645	ForceSendFields []string `json:"-"`
646
647	// NullFields is a list of field names (e.g. "DiskSizeGb") to include in
648	// API requests with the JSON null value. By default, fields with empty
649	// values are omitted from API requests. However, any field with an
650	// empty value appearing in NullFields will be sent to the server as
651	// null. It is an error if a field in this list has a non-empty value.
652	// This may be used to include null fields in Patch requests.
653	NullFields []string `json:"-"`
654}
655
656func (s *BuildOptions) MarshalJSON() ([]byte, error) {
657	type NoMethod BuildOptions
658	raw := NoMethod(*s)
659	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
660}
661
662// BuildStep: A step in the build pipeline.
663type BuildStep struct {
664	// Args: A list of arguments that will be presented to the step when it
665	// is started. If the image used to run the step's container has an
666	// entrypoint, the `args` are used as arguments to that entrypoint. If
667	// the image does not define an entrypoint, the first element in args is
668	// used as the entrypoint, and the remainder will be used as arguments.
669	Args []string `json:"args,omitempty"`
670
671	// Dir: Working directory to use when running this step's container. If
672	// this value is a relative path, it is relative to the build's working
673	// directory. If this value is absolute, it may be outside the build's
674	// working directory, in which case the contents of the path may not be
675	// persisted across build step executions, unless a `volume` for that
676	// path is specified. If the build specifies a `RepoSource` with `dir`
677	// and a step with a `dir`, which specifies an absolute path, the
678	// `RepoSource` `dir` is ignored for the step's execution.
679	Dir string `json:"dir,omitempty"`
680
681	// Entrypoint: Entrypoint to be used instead of the build step image's
682	// default entrypoint. If unset, the image's default entrypoint is used.
683	Entrypoint string `json:"entrypoint,omitempty"`
684
685	// Env: A list of environment variable definitions to be used when
686	// running a step. The elements are of the form "KEY=VALUE" for the
687	// environment variable "KEY" being given the value "VALUE".
688	Env []string `json:"env,omitempty"`
689
690	// Id: Unique identifier for this build step, used in `wait_for` to
691	// reference this build step as a dependency.
692	Id string `json:"id,omitempty"`
693
694	// Name: Required. The name of the container image that will run this
695	// particular build step. If the image is available in the host's Docker
696	// daemon's cache, it will be run directly. If not, the host will
697	// attempt to pull the image first, using the builder service account's
698	// credentials if necessary. The Docker daemon's cache will already have
699	// the latest versions of all of the officially supported build steps
700	// (https://github.com/GoogleCloudPlatform/cloud-builders
701	// (https://github.com/GoogleCloudPlatform/cloud-builders)). The Docker
702	// daemon will also have cached many of the layers for some popular
703	// images, like "ubuntu", "debian", but they will be refreshed at the
704	// time you attempt to use them. If you built an image in a previous
705	// build step, it will be stored in the host's Docker daemon's cache and
706	// is available to use as the name for a later build step.
707	Name string `json:"name,omitempty"`
708
709	// PullTiming: Output only. Stores timing information for pulling this
710	// build step's builder image only.
711	PullTiming *TimeSpan `json:"pullTiming,omitempty"`
712
713	// SecretEnv: A list of environment variables which are encrypted using
714	// a Cloud Key Management Service crypto key. These values must be
715	// specified in the build's `Secret`.
716	SecretEnv []string `json:"secretEnv,omitempty"`
717
718	// Status: Output only. Status of the build step. At this time, build
719	// step status is only updated on build completion; step status is not
720	// updated in real-time as the build progresses.
721	//
722	// Possible values:
723	//   "STATUS_UNKNOWN" - Status of the build is unknown.
724	//   "QUEUED" - Build or step is queued; work has not yet begun.
725	//   "WORKING" - Build or step is being executed.
726	//   "SUCCESS" - Build or step finished successfully.
727	//   "FAILURE" - Build or step failed to complete successfully.
728	//   "INTERNAL_ERROR" - Build or step failed due to an internal cause.
729	//   "TIMEOUT" - Build or step took longer than was allowed.
730	//   "CANCELLED" - Build or step was canceled by a user.
731	//   "EXPIRED" - Build was enqueued for longer than the value of
732	// `queue_ttl`.
733	Status string `json:"status,omitempty"`
734
735	// Timeout: Time limit for executing this build step. If not defined,
736	// the step has no time limit and will be allowed to continue to run
737	// until either it completes or the build itself times out.
738	Timeout string `json:"timeout,omitempty"`
739
740	// Timing: Output only. Stores timing information for executing this
741	// build step.
742	Timing *TimeSpan `json:"timing,omitempty"`
743
744	// Volumes: List of volumes to mount into the build step. Each volume is
745	// created as an empty volume prior to execution of the build step. Upon
746	// completion of the build, volumes and their contents are discarded.
747	// Using a named volume in only one step is not valid as it is
748	// indicative of a build request with an incorrect configuration.
749	Volumes []*Volume `json:"volumes,omitempty"`
750
751	// WaitFor: The ID(s) of the step(s) that this build step depends on.
752	// This build step will not start until all the build steps in
753	// `wait_for` have completed successfully. If `wait_for` is empty, this
754	// build step will start when all previous build steps in the
755	// `Build.Steps` list have completed successfully.
756	WaitFor []string `json:"waitFor,omitempty"`
757
758	// ForceSendFields is a list of field names (e.g. "Args") to
759	// unconditionally include in API requests. By default, fields with
760	// empty values are omitted from API requests. However, any non-pointer,
761	// non-interface field appearing in ForceSendFields will be sent to the
762	// server regardless of whether the field is empty or not. This may be
763	// used to include empty fields in Patch requests.
764	ForceSendFields []string `json:"-"`
765
766	// NullFields is a list of field names (e.g. "Args") to include in API
767	// requests with the JSON null value. By default, fields with empty
768	// values are omitted from API requests. However, any field with an
769	// empty value appearing in NullFields will be sent to the server as
770	// null. It is an error if a field in this list has a non-empty value.
771	// This may be used to include null fields in Patch requests.
772	NullFields []string `json:"-"`
773}
774
775func (s *BuildStep) MarshalJSON() ([]byte, error) {
776	type NoMethod BuildStep
777	raw := NoMethod(*s)
778	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
779}
780
781// BuildTrigger: Configuration for an automated build in response to
782// source repository changes.
783type BuildTrigger struct {
784	// Build: Contents of the build template.
785	Build *Build `json:"build,omitempty"`
786
787	// CreateTime: Output only. Time when the trigger was created.
788	CreateTime string `json:"createTime,omitempty"`
789
790	// Description: Human-readable description of this trigger.
791	Description string `json:"description,omitempty"`
792
793	// Disabled: If true, the trigger will never automatically execute a
794	// build.
795	Disabled bool `json:"disabled,omitempty"`
796
797	// Filename: Path, from the source root, to the build configuration file
798	// (i.e. cloudbuild.yaml).
799	Filename string `json:"filename,omitempty"`
800
801	// Github: GitHubEventsConfig describes the configuration of a trigger
802	// that creates a build whenever a GitHub event is received. Mutually
803	// exclusive with `trigger_template`.
804	Github *GitHubEventsConfig `json:"github,omitempty"`
805
806	// Id: Output only. Unique identifier of the trigger.
807	Id string `json:"id,omitempty"`
808
809	// IgnoredFiles: ignored_files and included_files are file glob matches
810	// using https://golang.org/pkg/path/filepath/#Match extended with
811	// support for "**". If ignored_files and changed files are both empty,
812	// then they are not used to determine whether or not to trigger a
813	// build. If ignored_files is not empty, then we ignore any files that
814	// match any of the ignored_file globs. If the change has no files that
815	// are outside of the ignored_files globs, then we do not trigger a
816	// build.
817	IgnoredFiles []string `json:"ignoredFiles,omitempty"`
818
819	// IncludedFiles: If any of the files altered in the commit pass the
820	// ignored_files filter and included_files is empty, then as far as this
821	// filter is concerned, we should trigger the build. If any of the files
822	// altered in the commit pass the ignored_files filter and
823	// included_files is not empty, then we make sure that at least one of
824	// those files matches a included_files glob. If not, then we do not
825	// trigger a build.
826	IncludedFiles []string `json:"includedFiles,omitempty"`
827
828	// Name: User-assigned name of the trigger. Must be unique within the
829	// project. Trigger names must meet the following requirements: + They
830	// must contain only alphanumeric characters and dashes. + They can be
831	// 1-64 characters long. + They must begin and end with an alphanumeric
832	// character.
833	Name string `json:"name,omitempty"`
834
835	// Substitutions: Substitutions for Build resource. The keys must match
836	// the following regular expression: `^_[A-Z0-9_]+$`.
837	Substitutions map[string]string `json:"substitutions,omitempty"`
838
839	// Tags: Tags for annotation of a `BuildTrigger`
840	Tags []string `json:"tags,omitempty"`
841
842	// TriggerTemplate: Template describing the types of source changes to
843	// trigger a build. Branch and tag names in trigger templates are
844	// interpreted as regular expressions. Any branch or tag change that
845	// matches that regular expression will trigger a build. Mutually
846	// exclusive with `github`.
847	TriggerTemplate *RepoSource `json:"triggerTemplate,omitempty"`
848
849	// ServerResponse contains the HTTP response code and headers from the
850	// server.
851	googleapi.ServerResponse `json:"-"`
852
853	// ForceSendFields is a list of field names (e.g. "Build") to
854	// unconditionally include in API requests. By default, fields with
855	// empty values are omitted from API requests. However, any non-pointer,
856	// non-interface field appearing in ForceSendFields will be sent to the
857	// server regardless of whether the field is empty or not. This may be
858	// used to include empty fields in Patch requests.
859	ForceSendFields []string `json:"-"`
860
861	// NullFields is a list of field names (e.g. "Build") to include in API
862	// requests with the JSON null value. By default, fields with empty
863	// values are omitted from API requests. However, any field with an
864	// empty value appearing in NullFields will be sent to the server as
865	// null. It is an error if a field in this list has a non-empty value.
866	// This may be used to include null fields in Patch requests.
867	NullFields []string `json:"-"`
868}
869
870func (s *BuildTrigger) MarshalJSON() ([]byte, error) {
871	type NoMethod BuildTrigger
872	raw := NoMethod(*s)
873	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
874}
875
876// BuiltImage: An image built by the pipeline.
877type BuiltImage struct {
878	// Digest: Docker Registry 2.0 digest.
879	Digest string `json:"digest,omitempty"`
880
881	// Name: Name used to push the container image to Google Container
882	// Registry, as presented to `docker push`.
883	Name string `json:"name,omitempty"`
884
885	// PushTiming: Output only. Stores timing information for pushing the
886	// specified image.
887	PushTiming *TimeSpan `json:"pushTiming,omitempty"`
888
889	// ForceSendFields is a list of field names (e.g. "Digest") to
890	// unconditionally include in API requests. By default, fields with
891	// empty values are omitted from API requests. However, any non-pointer,
892	// non-interface field appearing in ForceSendFields will be sent to the
893	// server regardless of whether the field is empty or not. This may be
894	// used to include empty fields in Patch requests.
895	ForceSendFields []string `json:"-"`
896
897	// NullFields is a list of field names (e.g. "Digest") to include in API
898	// requests with the JSON null value. By default, fields with empty
899	// values are omitted from API requests. However, any field with an
900	// empty value appearing in NullFields will be sent to the server as
901	// null. It is an error if a field in this list has a non-empty value.
902	// This may be used to include null fields in Patch requests.
903	NullFields []string `json:"-"`
904}
905
906func (s *BuiltImage) MarshalJSON() ([]byte, error) {
907	type NoMethod BuiltImage
908	raw := NoMethod(*s)
909	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
910}
911
912// CancelBuildRequest: Request to cancel an ongoing build.
913type CancelBuildRequest struct {
914	// Id: Required. ID of the build.
915	Id string `json:"id,omitempty"`
916
917	// Name: The name of the `Build` to cancel. Format:
918	// `projects/{project}/locations/{location}/builds/{build}`
919	Name string `json:"name,omitempty"`
920
921	// ProjectId: Required. ID of the project.
922	ProjectId string `json:"projectId,omitempty"`
923
924	// ForceSendFields is a list of field names (e.g. "Id") to
925	// unconditionally include in API requests. By default, fields with
926	// empty values are omitted from API requests. However, any non-pointer,
927	// non-interface field appearing in ForceSendFields will be sent to the
928	// server regardless of whether the field is empty or not. This may be
929	// used to include empty fields in Patch requests.
930	ForceSendFields []string `json:"-"`
931
932	// NullFields is a list of field names (e.g. "Id") to include in API
933	// requests with the JSON null value. By default, fields with empty
934	// values are omitted from API requests. However, any field with an
935	// empty value appearing in NullFields will be sent to the server as
936	// null. It is an error if a field in this list has a non-empty value.
937	// This may be used to include null fields in Patch requests.
938	NullFields []string `json:"-"`
939}
940
941func (s *CancelBuildRequest) MarshalJSON() ([]byte, error) {
942	type NoMethod CancelBuildRequest
943	raw := NoMethod(*s)
944	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
945}
946
947// CancelOperationRequest: The request message for
948// Operations.CancelOperation.
949type CancelOperationRequest struct {
950}
951
952// Empty: A generic empty message that you can re-use to avoid defining
953// duplicated empty messages in your APIs. A typical example is to use
954// it as the request or the response type of an API method. For
955// instance: service Foo { rpc Bar(google.protobuf.Empty) returns
956// (google.protobuf.Empty); } The JSON representation for `Empty` is
957// empty JSON object `{}`.
958type Empty struct {
959	// ServerResponse contains the HTTP response code and headers from the
960	// server.
961	googleapi.ServerResponse `json:"-"`
962}
963
964// FileHashes: Container message for hashes of byte content of files,
965// used in SourceProvenance messages to verify integrity of source input
966// to the build.
967type FileHashes struct {
968	// FileHash: Collection of file hashes.
969	FileHash []*Hash `json:"fileHash,omitempty"`
970
971	// ForceSendFields is a list of field names (e.g. "FileHash") to
972	// unconditionally include in API requests. By default, fields with
973	// empty values are omitted from API requests. However, any non-pointer,
974	// non-interface field appearing in ForceSendFields will be sent to the
975	// server regardless of whether the field is empty or not. This may be
976	// used to include empty fields in Patch requests.
977	ForceSendFields []string `json:"-"`
978
979	// NullFields is a list of field names (e.g. "FileHash") to include in
980	// API requests with the JSON null value. By default, fields with empty
981	// values are omitted from API requests. However, any field with an
982	// empty value appearing in NullFields will be sent to the server as
983	// null. It is an error if a field in this list has a non-empty value.
984	// This may be used to include null fields in Patch requests.
985	NullFields []string `json:"-"`
986}
987
988func (s *FileHashes) MarshalJSON() ([]byte, error) {
989	type NoMethod FileHashes
990	raw := NoMethod(*s)
991	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
992}
993
994// GitHubEventsConfig: GitHubEventsConfig describes the configuration of
995// a trigger that creates a build whenever a GitHub event is received.
996// This message is experimental.
997type GitHubEventsConfig struct {
998	// InstallationId: The installationID that emits the GitHub event.
999	InstallationId int64 `json:"installationId,omitempty,string"`
1000
1001	// Name: Name of the repository. For example: The name for
1002	// https://github.com/googlecloudplatform/cloud-builders is
1003	// "cloud-builders".
1004	Name string `json:"name,omitempty"`
1005
1006	// Owner: Owner of the repository. For example: The owner for
1007	// https://github.com/googlecloudplatform/cloud-builders is
1008	// "googlecloudplatform".
1009	Owner string `json:"owner,omitempty"`
1010
1011	// PullRequest: filter to match changes in pull requests.
1012	PullRequest *PullRequestFilter `json:"pullRequest,omitempty"`
1013
1014	// Push: filter to match changes in refs like branches, tags.
1015	Push *PushFilter `json:"push,omitempty"`
1016
1017	// ForceSendFields is a list of field names (e.g. "InstallationId") to
1018	// unconditionally include in API requests. By default, fields with
1019	// empty values are omitted from API requests. However, any non-pointer,
1020	// non-interface field appearing in ForceSendFields will be sent to the
1021	// server regardless of whether the field is empty or not. This may be
1022	// used to include empty fields in Patch requests.
1023	ForceSendFields []string `json:"-"`
1024
1025	// NullFields is a list of field names (e.g. "InstallationId") to
1026	// include in API requests with the JSON null value. By default, fields
1027	// with empty values are omitted from API requests. However, any field
1028	// with an empty value appearing in NullFields will be sent to the
1029	// server as null. It is an error if a field in this list has a
1030	// non-empty value. This may be used to include null fields in Patch
1031	// requests.
1032	NullFields []string `json:"-"`
1033}
1034
1035func (s *GitHubEventsConfig) MarshalJSON() ([]byte, error) {
1036	type NoMethod GitHubEventsConfig
1037	raw := NoMethod(*s)
1038	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1039}
1040
1041// HTTPDelivery: HTTPDelivery is the delivery configuration for an HTTP
1042// notification.
1043type HTTPDelivery struct {
1044	// Uri: The URI to which JSON-containing HTTP POST requests should be
1045	// sent.
1046	Uri string `json:"uri,omitempty"`
1047
1048	// ForceSendFields is a list of field names (e.g. "Uri") to
1049	// unconditionally include in API requests. By default, fields with
1050	// empty values are omitted from API requests. However, any non-pointer,
1051	// non-interface field appearing in ForceSendFields will be sent to the
1052	// server regardless of whether the field is empty or not. This may be
1053	// used to include empty fields in Patch requests.
1054	ForceSendFields []string `json:"-"`
1055
1056	// NullFields is a list of field names (e.g. "Uri") to include in API
1057	// requests with the JSON null value. By default, fields with empty
1058	// values are omitted from API requests. However, any field with an
1059	// empty value appearing in NullFields will be sent to the server as
1060	// null. It is an error if a field in this list has a non-empty value.
1061	// This may be used to include null fields in Patch requests.
1062	NullFields []string `json:"-"`
1063}
1064
1065func (s *HTTPDelivery) MarshalJSON() ([]byte, error) {
1066	type NoMethod HTTPDelivery
1067	raw := NoMethod(*s)
1068	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1069}
1070
1071// Hash: Container message for hash values.
1072type Hash struct {
1073	// Type: The type of hash that was performed.
1074	//
1075	// Possible values:
1076	//   "NONE" - No hash requested.
1077	//   "SHA256" - Use a sha256 hash.
1078	//   "MD5" - Use a md5 hash.
1079	Type string `json:"type,omitempty"`
1080
1081	// Value: The hash value.
1082	Value string `json:"value,omitempty"`
1083
1084	// ForceSendFields is a list of field names (e.g. "Type") to
1085	// unconditionally include in API requests. By default, fields with
1086	// empty values are omitted from API requests. However, any non-pointer,
1087	// non-interface field appearing in ForceSendFields will be sent to the
1088	// server regardless of whether the field is empty or not. This may be
1089	// used to include empty fields in Patch requests.
1090	ForceSendFields []string `json:"-"`
1091
1092	// NullFields is a list of field names (e.g. "Type") to include in API
1093	// requests with the JSON null value. By default, fields with empty
1094	// values are omitted from API requests. However, any field with an
1095	// empty value appearing in NullFields will be sent to the server as
1096	// null. It is an error if a field in this list has a non-empty value.
1097	// This may be used to include null fields in Patch requests.
1098	NullFields []string `json:"-"`
1099}
1100
1101func (s *Hash) MarshalJSON() ([]byte, error) {
1102	type NoMethod Hash
1103	raw := NoMethod(*s)
1104	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1105}
1106
1107// HttpBody: Message that represents an arbitrary HTTP body. It should
1108// only be used for payload formats that can't be represented as JSON,
1109// such as raw binary or an HTML page. This message can be used both in
1110// streaming and non-streaming API methods in the request as well as the
1111// response. It can be used as a top-level request field, which is
1112// convenient if one wants to extract parameters from either the URL or
1113// HTTP template into the request fields and also want access to the raw
1114// HTTP body. Example: message GetResourceRequest { // A unique request
1115// id. string request_id = 1; // The raw HTTP body is bound to this
1116// field. google.api.HttpBody http_body = 2; } service ResourceService {
1117// rpc GetResource(GetResourceRequest) returns (google.api.HttpBody);
1118// rpc UpdateResource(google.api.HttpBody) returns
1119// (google.protobuf.Empty); } Example with streaming methods: service
1120// CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns
1121// (stream google.api.HttpBody); rpc UpdateCalendar(stream
1122// google.api.HttpBody) returns (stream google.api.HttpBody); } Use of
1123// this type only changes how the request and response bodies are
1124// handled, all other features will continue to work unchanged.
1125type HttpBody struct {
1126	// ContentType: The HTTP Content-Type header value specifying the
1127	// content type of the body.
1128	ContentType string `json:"contentType,omitempty"`
1129
1130	// Data: The HTTP request/response body as raw binary.
1131	Data string `json:"data,omitempty"`
1132
1133	// Extensions: Application specific response metadata. Must be set in
1134	// the first response for streaming APIs.
1135	Extensions []googleapi.RawMessage `json:"extensions,omitempty"`
1136
1137	// ForceSendFields is a list of field names (e.g. "ContentType") to
1138	// unconditionally include in API requests. By default, fields with
1139	// empty values are omitted from API requests. However, any non-pointer,
1140	// non-interface field appearing in ForceSendFields will be sent to the
1141	// server regardless of whether the field is empty or not. This may be
1142	// used to include empty fields in Patch requests.
1143	ForceSendFields []string `json:"-"`
1144
1145	// NullFields is a list of field names (e.g. "ContentType") to include
1146	// in API requests with the JSON null value. By default, fields with
1147	// empty values are omitted from API requests. However, any field with
1148	// an empty value appearing in NullFields will be sent to the server as
1149	// null. It is an error if a field in this list has a non-empty value.
1150	// This may be used to include null fields in Patch requests.
1151	NullFields []string `json:"-"`
1152}
1153
1154func (s *HttpBody) MarshalJSON() ([]byte, error) {
1155	type NoMethod HttpBody
1156	raw := NoMethod(*s)
1157	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1158}
1159
1160// InlineSecret: Pairs a set of secret environment variables mapped to
1161// encrypted values with the Cloud KMS key to use to decrypt the value.
1162type InlineSecret struct {
1163	// EnvMap: Map of environment variable name to its encrypted value.
1164	// Secret environment variables must be unique across all of a build's
1165	// secrets, and must be used by at least one build step. Values can be
1166	// at most 64 KB in size. There can be at most 100 secret values across
1167	// all of a build's secrets.
1168	EnvMap map[string]string `json:"envMap,omitempty"`
1169
1170	// KmsKeyName: Resource name of Cloud KMS crypto key to decrypt the
1171	// encrypted value. In format:
1172	// projects/*/locations/*/keyRings/*/cryptoKeys/*
1173	KmsKeyName string `json:"kmsKeyName,omitempty"`
1174
1175	// ForceSendFields is a list of field names (e.g. "EnvMap") to
1176	// unconditionally include in API requests. By default, fields with
1177	// empty values are omitted from API requests. However, any non-pointer,
1178	// non-interface field appearing in ForceSendFields will be sent to the
1179	// server regardless of whether the field is empty or not. This may be
1180	// used to include empty fields in Patch requests.
1181	ForceSendFields []string `json:"-"`
1182
1183	// NullFields is a list of field names (e.g. "EnvMap") to include in API
1184	// requests with the JSON null value. By default, fields with empty
1185	// values are omitted from API requests. However, any field with an
1186	// empty value appearing in NullFields will be sent to the server as
1187	// null. It is an error if a field in this list has a non-empty value.
1188	// This may be used to include null fields in Patch requests.
1189	NullFields []string `json:"-"`
1190}
1191
1192func (s *InlineSecret) MarshalJSON() ([]byte, error) {
1193	type NoMethod InlineSecret
1194	raw := NoMethod(*s)
1195	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1196}
1197
1198// ListBuildTriggersResponse: Response containing existing
1199// `BuildTriggers`.
1200type ListBuildTriggersResponse struct {
1201	// NextPageToken: Token to receive the next page of results.
1202	NextPageToken string `json:"nextPageToken,omitempty"`
1203
1204	// Triggers: `BuildTriggers` for the project, sorted by `create_time`
1205	// descending.
1206	Triggers []*BuildTrigger `json:"triggers,omitempty"`
1207
1208	// ServerResponse contains the HTTP response code and headers from the
1209	// server.
1210	googleapi.ServerResponse `json:"-"`
1211
1212	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
1213	// unconditionally include in API requests. By default, fields with
1214	// empty values are omitted from API requests. However, any non-pointer,
1215	// non-interface field appearing in ForceSendFields will be sent to the
1216	// server regardless of whether the field is empty or not. This may be
1217	// used to include empty fields in Patch requests.
1218	ForceSendFields []string `json:"-"`
1219
1220	// NullFields is a list of field names (e.g. "NextPageToken") to include
1221	// in API requests with the JSON null value. By default, fields with
1222	// empty values are omitted from API requests. However, any field with
1223	// an empty value appearing in NullFields will be sent to the server as
1224	// null. It is an error if a field in this list has a non-empty value.
1225	// This may be used to include null fields in Patch requests.
1226	NullFields []string `json:"-"`
1227}
1228
1229func (s *ListBuildTriggersResponse) MarshalJSON() ([]byte, error) {
1230	type NoMethod ListBuildTriggersResponse
1231	raw := NoMethod(*s)
1232	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1233}
1234
1235// ListBuildsResponse: Response including listed builds.
1236type ListBuildsResponse struct {
1237	// Builds: Builds will be sorted by `create_time`, descending.
1238	Builds []*Build `json:"builds,omitempty"`
1239
1240	// NextPageToken: Token to receive the next page of results. This will
1241	// be absent if the end of the response list has been reached.
1242	NextPageToken string `json:"nextPageToken,omitempty"`
1243
1244	// ServerResponse contains the HTTP response code and headers from the
1245	// server.
1246	googleapi.ServerResponse `json:"-"`
1247
1248	// ForceSendFields is a list of field names (e.g. "Builds") to
1249	// unconditionally include in API requests. By default, fields with
1250	// empty values are omitted from API requests. However, any non-pointer,
1251	// non-interface field appearing in ForceSendFields will be sent to the
1252	// server regardless of whether the field is empty or not. This may be
1253	// used to include empty fields in Patch requests.
1254	ForceSendFields []string `json:"-"`
1255
1256	// NullFields is a list of field names (e.g. "Builds") to include in API
1257	// requests with the JSON null value. By default, fields with empty
1258	// values are omitted from API requests. However, any field with an
1259	// empty value appearing in NullFields will be sent to the server as
1260	// null. It is an error if a field in this list has a non-empty value.
1261	// This may be used to include null fields in Patch requests.
1262	NullFields []string `json:"-"`
1263}
1264
1265func (s *ListBuildsResponse) MarshalJSON() ([]byte, error) {
1266	type NoMethod ListBuildsResponse
1267	raw := NoMethod(*s)
1268	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1269}
1270
1271// Notification: Notification is the container which holds the data that
1272// is relevant to this particular notification.
1273type Notification struct {
1274	// Filter: The filter string to use for notification filtering.
1275	// Currently, this is assumed to be a CEL program. See
1276	// https://opensource.google/projects/cel for more.
1277	Filter string `json:"filter,omitempty"`
1278
1279	// HttpDelivery: Configuration for HTTP delivery.
1280	HttpDelivery *HTTPDelivery `json:"httpDelivery,omitempty"`
1281
1282	// SlackDelivery: Configuration for Slack delivery.
1283	SlackDelivery *SlackDelivery `json:"slackDelivery,omitempty"`
1284
1285	// SmtpDelivery: Configuration for SMTP (email) delivery.
1286	SmtpDelivery *SMTPDelivery `json:"smtpDelivery,omitempty"`
1287
1288	// StructDelivery: Escape hatch for users to supply custom delivery
1289	// configs.
1290	StructDelivery googleapi.RawMessage `json:"structDelivery,omitempty"`
1291
1292	// ForceSendFields is a list of field names (e.g. "Filter") to
1293	// unconditionally include in API requests. By default, fields with
1294	// empty values are omitted from API requests. However, any non-pointer,
1295	// non-interface field appearing in ForceSendFields will be sent to the
1296	// server regardless of whether the field is empty or not. This may be
1297	// used to include empty fields in Patch requests.
1298	ForceSendFields []string `json:"-"`
1299
1300	// NullFields is a list of field names (e.g. "Filter") to include in API
1301	// requests with the JSON null value. By default, fields with empty
1302	// values are omitted from API requests. However, any field with an
1303	// empty value appearing in NullFields will be sent to the server as
1304	// null. It is an error if a field in this list has a non-empty value.
1305	// This may be used to include null fields in Patch requests.
1306	NullFields []string `json:"-"`
1307}
1308
1309func (s *Notification) MarshalJSON() ([]byte, error) {
1310	type NoMethod Notification
1311	raw := NoMethod(*s)
1312	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1313}
1314
1315// NotifierConfig: NotifierConfig is the top-level configuration
1316// message.
1317type NotifierConfig struct {
1318	// ApiVersion: The API version of this configuration format.
1319	ApiVersion string `json:"apiVersion,omitempty"`
1320
1321	// Kind: The type of notifier to use (e.g. SMTPNotifier).
1322	Kind string `json:"kind,omitempty"`
1323
1324	// Metadata: Metadata for referring to/handling/deploying this notifier.
1325	Metadata *NotifierMetadata `json:"metadata,omitempty"`
1326
1327	// Spec: The actual configuration for this notifier.
1328	Spec *NotifierSpec `json:"spec,omitempty"`
1329
1330	// ForceSendFields is a list of field names (e.g. "ApiVersion") to
1331	// unconditionally include in API requests. By default, fields with
1332	// empty values are omitted from API requests. However, any non-pointer,
1333	// non-interface field appearing in ForceSendFields will be sent to the
1334	// server regardless of whether the field is empty or not. This may be
1335	// used to include empty fields in Patch requests.
1336	ForceSendFields []string `json:"-"`
1337
1338	// NullFields is a list of field names (e.g. "ApiVersion") to include in
1339	// API requests with the JSON null value. By default, fields with empty
1340	// values are omitted from API requests. However, any field with an
1341	// empty value appearing in NullFields will be sent to the server as
1342	// null. It is an error if a field in this list has a non-empty value.
1343	// This may be used to include null fields in Patch requests.
1344	NullFields []string `json:"-"`
1345}
1346
1347func (s *NotifierConfig) MarshalJSON() ([]byte, error) {
1348	type NoMethod NotifierConfig
1349	raw := NoMethod(*s)
1350	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1351}
1352
1353// NotifierMetadata: NotifierMetadata contains the data which can be
1354// used to reference or describe this notifier.
1355type NotifierMetadata struct {
1356	// Name: The human-readable and user-given name for the notifier. For
1357	// example: "repo-merge-email-notifier".
1358	Name string `json:"name,omitempty"`
1359
1360	// Notifier: The string representing the name and version of notifier to
1361	// deploy. Expected to be of the form of "/:". For example:
1362	// "gcr.io/my-project/notifiers/smtp:1.2.34".
1363	Notifier string `json:"notifier,omitempty"`
1364
1365	// ForceSendFields is a list of field names (e.g. "Name") to
1366	// unconditionally include in API requests. By default, fields with
1367	// empty values are omitted from API requests. However, any non-pointer,
1368	// non-interface field appearing in ForceSendFields will be sent to the
1369	// server regardless of whether the field is empty or not. This may be
1370	// used to include empty fields in Patch requests.
1371	ForceSendFields []string `json:"-"`
1372
1373	// NullFields is a list of field names (e.g. "Name") to include in API
1374	// requests with the JSON null value. By default, fields with empty
1375	// values are omitted from API requests. However, any field with an
1376	// empty value appearing in NullFields will be sent to the server as
1377	// null. It is an error if a field in this list has a non-empty value.
1378	// This may be used to include null fields in Patch requests.
1379	NullFields []string `json:"-"`
1380}
1381
1382func (s *NotifierMetadata) MarshalJSON() ([]byte, error) {
1383	type NoMethod NotifierMetadata
1384	raw := NoMethod(*s)
1385	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1386}
1387
1388// NotifierSecret: NotifierSecret is the container that maps a secret
1389// name (reference) to its Google Cloud Secret Manager resource path.
1390type NotifierSecret struct {
1391	// Name: Name is the local name of the secret, such as the verbatim
1392	// string "my-smtp-password".
1393	Name string `json:"name,omitempty"`
1394
1395	// Value: Value is interpreted to be a resource path for fetching the
1396	// actual (versioned) secret data for this secret. For example, this
1397	// would be a Google Cloud Secret Manager secret version resource path
1398	// like: "projects/my-project/secrets/my-secret/versions/latest".
1399	Value string `json:"value,omitempty"`
1400
1401	// ForceSendFields is a list of field names (e.g. "Name") to
1402	// unconditionally include in API requests. By default, fields with
1403	// empty values are omitted from API requests. However, any non-pointer,
1404	// non-interface field appearing in ForceSendFields will be sent to the
1405	// server regardless of whether the field is empty or not. This may be
1406	// used to include empty fields in Patch requests.
1407	ForceSendFields []string `json:"-"`
1408
1409	// NullFields is a list of field names (e.g. "Name") to include in API
1410	// requests with the JSON null value. By default, fields with empty
1411	// values are omitted from API requests. However, any field with an
1412	// empty value appearing in NullFields will be sent to the server as
1413	// null. It is an error if a field in this list has a non-empty value.
1414	// This may be used to include null fields in Patch requests.
1415	NullFields []string `json:"-"`
1416}
1417
1418func (s *NotifierSecret) MarshalJSON() ([]byte, error) {
1419	type NoMethod NotifierSecret
1420	raw := NoMethod(*s)
1421	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1422}
1423
1424// NotifierSecretRef: NotifierSecretRef contains the reference to a
1425// secret stored in the corresponding NotifierSpec.
1426type NotifierSecretRef struct {
1427	// SecretRef: The value of `secret_ref` should be a `name` that is
1428	// registered in a `Secret` in the `secrets` list of the `Spec`.
1429	SecretRef string `json:"secretRef,omitempty"`
1430
1431	// ForceSendFields is a list of field names (e.g. "SecretRef") to
1432	// unconditionally include in API requests. By default, fields with
1433	// empty values are omitted from API requests. However, any non-pointer,
1434	// non-interface field appearing in ForceSendFields will be sent to the
1435	// server regardless of whether the field is empty or not. This may be
1436	// used to include empty fields in Patch requests.
1437	ForceSendFields []string `json:"-"`
1438
1439	// NullFields is a list of field names (e.g. "SecretRef") to include in
1440	// API requests with the JSON null value. By default, fields with empty
1441	// values are omitted from API requests. However, any field with an
1442	// empty value appearing in NullFields will be sent to the server as
1443	// null. It is an error if a field in this list has a non-empty value.
1444	// This may be used to include null fields in Patch requests.
1445	NullFields []string `json:"-"`
1446}
1447
1448func (s *NotifierSecretRef) MarshalJSON() ([]byte, error) {
1449	type NoMethod NotifierSecretRef
1450	raw := NoMethod(*s)
1451	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1452}
1453
1454// NotifierSpec: NotifierSpec is the configuration container for
1455// notifications.
1456type NotifierSpec struct {
1457	// Notification: The configuration of this particular notifier.
1458	Notification *Notification `json:"notification,omitempty"`
1459
1460	// Secrets: Configurations for secret resources used by this particular
1461	// notifier.
1462	Secrets []*NotifierSecret `json:"secrets,omitempty"`
1463
1464	// ForceSendFields is a list of field names (e.g. "Notification") to
1465	// unconditionally include in API requests. By default, fields with
1466	// empty values are omitted from API requests. However, any non-pointer,
1467	// non-interface field appearing in ForceSendFields will be sent to the
1468	// server regardless of whether the field is empty or not. This may be
1469	// used to include empty fields in Patch requests.
1470	ForceSendFields []string `json:"-"`
1471
1472	// NullFields is a list of field names (e.g. "Notification") to include
1473	// in API requests with the JSON null value. By default, fields with
1474	// empty values are omitted from API requests. However, any field with
1475	// an empty value appearing in NullFields will be sent to the server as
1476	// null. It is an error if a field in this list has a non-empty value.
1477	// This may be used to include null fields in Patch requests.
1478	NullFields []string `json:"-"`
1479}
1480
1481func (s *NotifierSpec) MarshalJSON() ([]byte, error) {
1482	type NoMethod NotifierSpec
1483	raw := NoMethod(*s)
1484	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1485}
1486
1487// Operation: This resource represents a long-running operation that is
1488// the result of a network API call.
1489type Operation struct {
1490	// Done: If the value is `false`, it means the operation is still in
1491	// progress. If `true`, the operation is completed, and either `error`
1492	// or `response` is available.
1493	Done bool `json:"done,omitempty"`
1494
1495	// Error: The error result of the operation in case of failure or
1496	// cancellation.
1497	Error *Status `json:"error,omitempty"`
1498
1499	// Metadata: Service-specific metadata associated with the operation. It
1500	// typically contains progress information and common metadata such as
1501	// create time. Some services might not provide such metadata. Any
1502	// method that returns a long-running operation should document the
1503	// metadata type, if any.
1504	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
1505
1506	// Name: The server-assigned name, which is only unique within the same
1507	// service that originally returns it. If you use the default HTTP
1508	// mapping, the `name` should be a resource name ending with
1509	// `operations/{unique_id}`.
1510	Name string `json:"name,omitempty"`
1511
1512	// Response: The normal response of the operation in case of success. If
1513	// the original method returns no data on success, such as `Delete`, the
1514	// response is `google.protobuf.Empty`. If the original method is
1515	// standard `Get`/`Create`/`Update`, the response should be the
1516	// resource. For other methods, the response should have the type
1517	// `XxxResponse`, where `Xxx` is the original method name. For example,
1518	// if the original method name is `TakeSnapshot()`, the inferred
1519	// response type is `TakeSnapshotResponse`.
1520	Response googleapi.RawMessage `json:"response,omitempty"`
1521
1522	// ServerResponse contains the HTTP response code and headers from the
1523	// server.
1524	googleapi.ServerResponse `json:"-"`
1525
1526	// ForceSendFields is a list of field names (e.g. "Done") to
1527	// unconditionally include in API requests. By default, fields with
1528	// empty values are omitted from API requests. However, any non-pointer,
1529	// non-interface field appearing in ForceSendFields will be sent to the
1530	// server regardless of whether the field is empty or not. This may be
1531	// used to include empty fields in Patch requests.
1532	ForceSendFields []string `json:"-"`
1533
1534	// NullFields is a list of field names (e.g. "Done") to include in API
1535	// requests with the JSON null value. By default, fields with empty
1536	// values are omitted from API requests. However, any field with an
1537	// empty value appearing in NullFields will be sent to the server as
1538	// null. It is an error if a field in this list has a non-empty value.
1539	// This may be used to include null fields in Patch requests.
1540	NullFields []string `json:"-"`
1541}
1542
1543func (s *Operation) MarshalJSON() ([]byte, error) {
1544	type NoMethod Operation
1545	raw := NoMethod(*s)
1546	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1547}
1548
1549// PullRequestFilter: PullRequestFilter contains filter properties for
1550// matching GitHub Pull Requests.
1551type PullRequestFilter struct {
1552	// Branch: Regex of branches to match. The syntax of the regular
1553	// expressions accepted is the syntax accepted by RE2 and described at
1554	// https://github.com/google/re2/wiki/Syntax
1555	Branch string `json:"branch,omitempty"`
1556
1557	// CommentControl: Configure builds to run whether a repository owner or
1558	// collaborator need to comment `/gcbrun`.
1559	//
1560	// Possible values:
1561	//   "COMMENTS_DISABLED" - Do not require comments on Pull Requests
1562	// before builds are triggered.
1563	//   "COMMENTS_ENABLED" - Enforce that repository owners or
1564	// collaborators must comment on Pull Requests before builds are
1565	// triggered.
1566	//   "COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY" - Enforce that
1567	// repository owners or collaborators must comment on external
1568	// contributors' Pull Requests before builds are triggered.
1569	CommentControl string `json:"commentControl,omitempty"`
1570
1571	// InvertRegex: If true, branches that do NOT match the git_ref will
1572	// trigger a build.
1573	InvertRegex bool `json:"invertRegex,omitempty"`
1574
1575	// ForceSendFields is a list of field names (e.g. "Branch") to
1576	// unconditionally include in API requests. By default, fields with
1577	// empty values are omitted from API requests. However, any non-pointer,
1578	// non-interface field appearing in ForceSendFields will be sent to the
1579	// server regardless of whether the field is empty or not. This may be
1580	// used to include empty fields in Patch requests.
1581	ForceSendFields []string `json:"-"`
1582
1583	// NullFields is a list of field names (e.g. "Branch") to include in API
1584	// requests with the JSON null value. By default, fields with empty
1585	// values are omitted from API requests. However, any field with an
1586	// empty value appearing in NullFields will be sent to the server as
1587	// null. It is an error if a field in this list has a non-empty value.
1588	// This may be used to include null fields in Patch requests.
1589	NullFields []string `json:"-"`
1590}
1591
1592func (s *PullRequestFilter) MarshalJSON() ([]byte, error) {
1593	type NoMethod PullRequestFilter
1594	raw := NoMethod(*s)
1595	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1596}
1597
1598// PushFilter: Push contains filter properties for matching GitHub git
1599// pushes.
1600type PushFilter struct {
1601	// Branch: Regexes matching branches to build. The syntax of the regular
1602	// expressions accepted is the syntax accepted by RE2 and described at
1603	// https://github.com/google/re2/wiki/Syntax
1604	Branch string `json:"branch,omitempty"`
1605
1606	// InvertRegex: When true, only trigger a build if the revision regex
1607	// does NOT match the git_ref regex.
1608	InvertRegex bool `json:"invertRegex,omitempty"`
1609
1610	// Tag: Regexes matching tags to build. The syntax of the regular
1611	// expressions accepted is the syntax accepted by RE2 and described at
1612	// https://github.com/google/re2/wiki/Syntax
1613	Tag string `json:"tag,omitempty"`
1614
1615	// ForceSendFields is a list of field names (e.g. "Branch") to
1616	// unconditionally include in API requests. By default, fields with
1617	// empty values are omitted from API requests. However, any non-pointer,
1618	// non-interface field appearing in ForceSendFields will be sent to the
1619	// server regardless of whether the field is empty or not. This may be
1620	// used to include empty fields in Patch requests.
1621	ForceSendFields []string `json:"-"`
1622
1623	// NullFields is a list of field names (e.g. "Branch") to include in API
1624	// requests with the JSON null value. By default, fields with empty
1625	// values are omitted from API requests. However, any field with an
1626	// empty value appearing in NullFields will be sent to the server as
1627	// null. It is an error if a field in this list has a non-empty value.
1628	// This may be used to include null fields in Patch requests.
1629	NullFields []string `json:"-"`
1630}
1631
1632func (s *PushFilter) MarshalJSON() ([]byte, error) {
1633	type NoMethod PushFilter
1634	raw := NoMethod(*s)
1635	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1636}
1637
1638// ReceiveTriggerWebhookResponse: ReceiveTriggerWebhookResponse
1639// [Experimental] is the response object for the ReceiveTriggerWebhook
1640// method.
1641type ReceiveTriggerWebhookResponse struct {
1642	// ServerResponse contains the HTTP response code and headers from the
1643	// server.
1644	googleapi.ServerResponse `json:"-"`
1645}
1646
1647// RepoSource: Location of the source in a Google Cloud Source
1648// Repository.
1649type RepoSource struct {
1650	// BranchName: Regex matching branches to build. The syntax of the
1651	// regular expressions accepted is the syntax accepted by RE2 and
1652	// described at https://github.com/google/re2/wiki/Syntax
1653	BranchName string `json:"branchName,omitempty"`
1654
1655	// CommitSha: Explicit commit SHA to build.
1656	CommitSha string `json:"commitSha,omitempty"`
1657
1658	// Dir: Directory, relative to the source root, in which to run the
1659	// build. This must be a relative path. If a step's `dir` is specified
1660	// and is an absolute path, this value is ignored for that step's
1661	// execution.
1662	Dir string `json:"dir,omitempty"`
1663
1664	// InvertRegex: Only trigger a build if the revision regex does NOT
1665	// match the revision regex.
1666	InvertRegex bool `json:"invertRegex,omitempty"`
1667
1668	// ProjectId: ID of the project that owns the Cloud Source Repository.
1669	// If omitted, the project ID requesting the build is assumed.
1670	ProjectId string `json:"projectId,omitempty"`
1671
1672	// RepoName: Name of the Cloud Source Repository.
1673	RepoName string `json:"repoName,omitempty"`
1674
1675	// Substitutions: Substitutions to use in a triggered build. Should only
1676	// be used with RunBuildTrigger
1677	Substitutions map[string]string `json:"substitutions,omitempty"`
1678
1679	// TagName: Regex matching tags to build. The syntax of the regular
1680	// expressions accepted is the syntax accepted by RE2 and described at
1681	// https://github.com/google/re2/wiki/Syntax
1682	TagName string `json:"tagName,omitempty"`
1683
1684	// ForceSendFields is a list of field names (e.g. "BranchName") to
1685	// unconditionally include in API requests. By default, fields with
1686	// empty values are omitted from API requests. However, any non-pointer,
1687	// non-interface field appearing in ForceSendFields will be sent to the
1688	// server regardless of whether the field is empty or not. This may be
1689	// used to include empty fields in Patch requests.
1690	ForceSendFields []string `json:"-"`
1691
1692	// NullFields is a list of field names (e.g. "BranchName") to include in
1693	// API requests with the JSON null value. By default, fields with empty
1694	// values are omitted from API requests. However, any field with an
1695	// empty value appearing in NullFields will be sent to the server as
1696	// null. It is an error if a field in this list has a non-empty value.
1697	// This may be used to include null fields in Patch requests.
1698	NullFields []string `json:"-"`
1699}
1700
1701func (s *RepoSource) MarshalJSON() ([]byte, error) {
1702	type NoMethod RepoSource
1703	raw := NoMethod(*s)
1704	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1705}
1706
1707// Results: Artifacts created by the build pipeline.
1708type Results struct {
1709	// ArtifactManifest: Path to the artifact manifest. Only populated when
1710	// artifacts are uploaded.
1711	ArtifactManifest string `json:"artifactManifest,omitempty"`
1712
1713	// ArtifactTiming: Time to push all non-container artifacts.
1714	ArtifactTiming *TimeSpan `json:"artifactTiming,omitempty"`
1715
1716	// BuildStepImages: List of build step digests, in the order
1717	// corresponding to build step indices.
1718	BuildStepImages []string `json:"buildStepImages,omitempty"`
1719
1720	// BuildStepOutputs: List of build step outputs, produced by builder
1721	// images, in the order corresponding to build step indices. Cloud
1722	// Builders (https://cloud.google.com/cloud-build/docs/cloud-builders)
1723	// can produce this output by writing to `$BUILDER_OUTPUT/output`. Only
1724	// the first 4KB of data is stored.
1725	BuildStepOutputs []string `json:"buildStepOutputs,omitempty"`
1726
1727	// Images: Container images that were built as a part of the build.
1728	Images []*BuiltImage `json:"images,omitempty"`
1729
1730	// NumArtifacts: Number of artifacts uploaded. Only populated when
1731	// artifacts are uploaded.
1732	NumArtifacts int64 `json:"numArtifacts,omitempty,string"`
1733
1734	// ForceSendFields is a list of field names (e.g. "ArtifactManifest") to
1735	// unconditionally include in API requests. By default, fields with
1736	// empty values are omitted from API requests. However, any non-pointer,
1737	// non-interface field appearing in ForceSendFields will be sent to the
1738	// server regardless of whether the field is empty or not. This may be
1739	// used to include empty fields in Patch requests.
1740	ForceSendFields []string `json:"-"`
1741
1742	// NullFields is a list of field names (e.g. "ArtifactManifest") to
1743	// include in API requests with the JSON null value. By default, fields
1744	// with empty values are omitted from API requests. However, any field
1745	// with an empty value appearing in NullFields will be sent to the
1746	// server as null. It is an error if a field in this list has a
1747	// non-empty value. This may be used to include null fields in Patch
1748	// requests.
1749	NullFields []string `json:"-"`
1750}
1751
1752func (s *Results) MarshalJSON() ([]byte, error) {
1753	type NoMethod Results
1754	raw := NoMethod(*s)
1755	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1756}
1757
1758// RetryBuildRequest: Specifies a build to retry.
1759type RetryBuildRequest struct {
1760	// Id: Required. Build ID of the original build.
1761	Id string `json:"id,omitempty"`
1762
1763	// Name: The name of the `Build` to retry. Format:
1764	// `projects/{project}/locations/{location}/builds/{build}`
1765	Name string `json:"name,omitempty"`
1766
1767	// ProjectId: Required. ID of the project.
1768	ProjectId string `json:"projectId,omitempty"`
1769
1770	// ForceSendFields is a list of field names (e.g. "Id") to
1771	// unconditionally include in API requests. By default, fields with
1772	// empty values are omitted from API requests. However, any non-pointer,
1773	// non-interface field appearing in ForceSendFields will be sent to the
1774	// server regardless of whether the field is empty or not. This may be
1775	// used to include empty fields in Patch requests.
1776	ForceSendFields []string `json:"-"`
1777
1778	// NullFields is a list of field names (e.g. "Id") to include in API
1779	// requests with the JSON null value. By default, fields with empty
1780	// values are omitted from API requests. However, any field with an
1781	// 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 *RetryBuildRequest) MarshalJSON() ([]byte, error) {
1788	type NoMethod RetryBuildRequest
1789	raw := NoMethod(*s)
1790	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1791}
1792
1793// SMTPDelivery: SMTPDelivery is the delivery configuration for an SMTP
1794// (email) notification.
1795type SMTPDelivery struct {
1796	// FromAddress: This is the SMTP account/email that appears in the
1797	// `From:` of the email. If empty, it is assumed to be sender.
1798	FromAddress string `json:"fromAddress,omitempty"`
1799
1800	// Password: The SMTP sender's password.
1801	Password *NotifierSecretRef `json:"password,omitempty"`
1802
1803	// Port: The SMTP port of the server.
1804	Port string `json:"port,omitempty"`
1805
1806	// RecipientAddresses: This is the list of addresses to which we send
1807	// the email (i.e. in the `To:` of the email).
1808	RecipientAddresses []string `json:"recipientAddresses,omitempty"`
1809
1810	// SenderAddress: This is the SMTP account/email that is used to send
1811	// the message.
1812	SenderAddress string `json:"senderAddress,omitempty"`
1813
1814	// Server: The address of the SMTP server.
1815	Server string `json:"server,omitempty"`
1816
1817	// ForceSendFields is a list of field names (e.g. "FromAddress") to
1818	// unconditionally include in API requests. By default, fields with
1819	// empty values are omitted from API requests. However, any non-pointer,
1820	// non-interface field appearing in ForceSendFields will be sent to the
1821	// server regardless of whether the field is empty or not. This may be
1822	// used to include empty fields in Patch requests.
1823	ForceSendFields []string `json:"-"`
1824
1825	// NullFields is a list of field names (e.g. "FromAddress") to include
1826	// in API requests with the JSON null value. By default, fields with
1827	// empty values are omitted from API requests. However, any field with
1828	// an empty value appearing in NullFields will be sent to the server as
1829	// null. It is an error if a field in this list has a non-empty value.
1830	// This may be used to include null fields in Patch requests.
1831	NullFields []string `json:"-"`
1832}
1833
1834func (s *SMTPDelivery) MarshalJSON() ([]byte, error) {
1835	type NoMethod SMTPDelivery
1836	raw := NoMethod(*s)
1837	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1838}
1839
1840// Secret: Pairs a set of secret environment variables containing
1841// encrypted values with the Cloud KMS key to use to decrypt the value.
1842// Note: Use `kmsKeyName` with `available_secrets` instead of using
1843// `kmsKeyName` with `secret`. For instructions see:
1844// https://cloud.google.com/cloud-build/docs/securing-builds/use-encrypted-credentials.
1845type Secret struct {
1846	// KmsKeyName: Cloud KMS key name to use to decrypt these envs.
1847	KmsKeyName string `json:"kmsKeyName,omitempty"`
1848
1849	// SecretEnv: Map of environment variable name to its encrypted value.
1850	// Secret environment variables must be unique across all of a build's
1851	// secrets, and must be used by at least one build step. Values can be
1852	// at most 64 KB in size. There can be at most 100 secret values across
1853	// all of a build's secrets.
1854	SecretEnv map[string]string `json:"secretEnv,omitempty"`
1855
1856	// ForceSendFields is a list of field names (e.g. "KmsKeyName") to
1857	// unconditionally include in API requests. By default, fields with
1858	// empty values are omitted from API requests. However, any non-pointer,
1859	// non-interface field appearing in ForceSendFields will be sent to the
1860	// server regardless of whether the field is empty or not. This may be
1861	// used to include empty fields in Patch requests.
1862	ForceSendFields []string `json:"-"`
1863
1864	// NullFields is a list of field names (e.g. "KmsKeyName") to include in
1865	// API requests with the JSON null value. By default, fields with empty
1866	// values are omitted from API requests. However, any field with an
1867	// empty value appearing in NullFields will be sent to the server as
1868	// null. It is an error if a field in this list has a non-empty value.
1869	// This may be used to include null fields in Patch requests.
1870	NullFields []string `json:"-"`
1871}
1872
1873func (s *Secret) MarshalJSON() ([]byte, error) {
1874	type NoMethod Secret
1875	raw := NoMethod(*s)
1876	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1877}
1878
1879// SecretManagerSecret: Pairs a secret environment variable with a
1880// SecretVersion in Secret Manager.
1881type SecretManagerSecret struct {
1882	// Env: Environment variable name to associate with the secret. Secret
1883	// environment variables must be unique across all of a build's secrets,
1884	// and must be used by at least one build step.
1885	Env string `json:"env,omitempty"`
1886
1887	// VersionName: Resource name of the SecretVersion. In format:
1888	// projects/*/secrets/*/versions/*
1889	VersionName string `json:"versionName,omitempty"`
1890
1891	// ForceSendFields is a list of field names (e.g. "Env") to
1892	// unconditionally include in API requests. By default, fields with
1893	// empty values are omitted from API requests. However, any non-pointer,
1894	// non-interface field appearing in ForceSendFields will be sent to the
1895	// server regardless of whether the field is empty or not. This may be
1896	// used to include empty fields in Patch requests.
1897	ForceSendFields []string `json:"-"`
1898
1899	// NullFields is a list of field names (e.g. "Env") to include in API
1900	// requests with the JSON null value. By default, fields with empty
1901	// values are omitted from API requests. However, any field with an
1902	// empty value appearing in NullFields will be sent to the server as
1903	// null. It is an error if a field in this list has a non-empty value.
1904	// This may be used to include null fields in Patch requests.
1905	NullFields []string `json:"-"`
1906}
1907
1908func (s *SecretManagerSecret) MarshalJSON() ([]byte, error) {
1909	type NoMethod SecretManagerSecret
1910	raw := NoMethod(*s)
1911	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1912}
1913
1914// Secrets: Secrets and secret environment variables.
1915type Secrets struct {
1916	// Inline: Secrets encrypted with KMS key and the associated secret
1917	// environment variable.
1918	Inline []*InlineSecret `json:"inline,omitempty"`
1919
1920	// SecretManager: Secrets in Secret Manager and associated secret
1921	// environment variable.
1922	SecretManager []*SecretManagerSecret `json:"secretManager,omitempty"`
1923
1924	// ForceSendFields is a list of field names (e.g. "Inline") to
1925	// unconditionally include in API requests. By default, fields with
1926	// empty values are omitted from API requests. However, any non-pointer,
1927	// non-interface field appearing in ForceSendFields will be sent to the
1928	// server regardless of whether the field is empty or not. This may be
1929	// used to include empty fields in Patch requests.
1930	ForceSendFields []string `json:"-"`
1931
1932	// NullFields is a list of field names (e.g. "Inline") to include in API
1933	// requests with the JSON null value. By default, fields with empty
1934	// values are omitted from API requests. However, any field with an
1935	// empty value appearing in NullFields will be sent to the server as
1936	// null. It is an error if a field in this list has a non-empty value.
1937	// This may be used to include null fields in Patch requests.
1938	NullFields []string `json:"-"`
1939}
1940
1941func (s *Secrets) MarshalJSON() ([]byte, error) {
1942	type NoMethod Secrets
1943	raw := NoMethod(*s)
1944	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1945}
1946
1947// SlackDelivery: SlackDelivery is the delivery configuration for
1948// delivering Slack messages via webhooks. See Slack webhook
1949// documentation at: https://api.slack.com/messaging/webhooks.
1950type SlackDelivery struct {
1951	// WebhookUri: The secret reference for the Slack webhook URI for
1952	// sending messages to a channel.
1953	WebhookUri *NotifierSecretRef `json:"webhookUri,omitempty"`
1954
1955	// ForceSendFields is a list of field names (e.g. "WebhookUri") to
1956	// unconditionally include in API requests. By default, fields with
1957	// empty values are omitted from API requests. However, any non-pointer,
1958	// non-interface field appearing in ForceSendFields will be sent to the
1959	// server regardless of whether the field is empty or not. This may be
1960	// used to include empty fields in Patch requests.
1961	ForceSendFields []string `json:"-"`
1962
1963	// NullFields is a list of field names (e.g. "WebhookUri") to include in
1964	// API requests with the JSON null value. By default, fields with empty
1965	// values are omitted from API requests. However, any field with an
1966	// empty value appearing in NullFields will be sent to the server as
1967	// null. It is an error if a field in this list has a non-empty value.
1968	// This may be used to include null fields in Patch requests.
1969	NullFields []string `json:"-"`
1970}
1971
1972func (s *SlackDelivery) MarshalJSON() ([]byte, error) {
1973	type NoMethod SlackDelivery
1974	raw := NoMethod(*s)
1975	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1976}
1977
1978// Source: Location of the source in a supported storage service.
1979type Source struct {
1980	// RepoSource: If provided, get the source from this location in a Cloud
1981	// Source Repository.
1982	RepoSource *RepoSource `json:"repoSource,omitempty"`
1983
1984	// StorageSource: If provided, get the source from this location in
1985	// Google Cloud Storage.
1986	StorageSource *StorageSource `json:"storageSource,omitempty"`
1987
1988	// StorageSourceManifest: If provided, get the source from this manifest
1989	// in Google Cloud Storage. This feature is in Preview.
1990	StorageSourceManifest *StorageSourceManifest `json:"storageSourceManifest,omitempty"`
1991
1992	// ForceSendFields is a list of field names (e.g. "RepoSource") to
1993	// unconditionally include in API requests. By default, fields with
1994	// empty values are omitted from API requests. However, any non-pointer,
1995	// non-interface field appearing in ForceSendFields will be sent to the
1996	// server regardless of whether the field is empty or not. This may be
1997	// used to include empty fields in Patch requests.
1998	ForceSendFields []string `json:"-"`
1999
2000	// NullFields is a list of field names (e.g. "RepoSource") to include in
2001	// API requests with the JSON null value. By default, fields with empty
2002	// values are omitted from API requests. However, any field with an
2003	// empty value appearing in NullFields will be sent to the server as
2004	// null. It is an error if a field in this list has a non-empty value.
2005	// This may be used to include null fields in Patch requests.
2006	NullFields []string `json:"-"`
2007}
2008
2009func (s *Source) MarshalJSON() ([]byte, error) {
2010	type NoMethod Source
2011	raw := NoMethod(*s)
2012	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2013}
2014
2015// SourceProvenance: Provenance of the source. Ways to find the original
2016// source, or verify that some source was used for this build.
2017type SourceProvenance struct {
2018	// FileHashes: Output only. Hash(es) of the build source, which can be
2019	// used to verify that the original source integrity was maintained in
2020	// the build. Note that `FileHashes` will only be populated if
2021	// `BuildOptions` has requested a `SourceProvenanceHash`. The keys to
2022	// this map are file paths used as build source and the values contain
2023	// the hash values for those files. If the build source came in a single
2024	// package such as a gzipped tarfile (`.tar.gz`), the `FileHash` will be
2025	// for the single path to that file.
2026	FileHashes map[string]FileHashes `json:"fileHashes,omitempty"`
2027
2028	// ResolvedRepoSource: A copy of the build's `source.repo_source`, if
2029	// exists, with any revisions resolved.
2030	ResolvedRepoSource *RepoSource `json:"resolvedRepoSource,omitempty"`
2031
2032	// ResolvedStorageSource: A copy of the build's `source.storage_source`,
2033	// if exists, with any generations resolved.
2034	ResolvedStorageSource *StorageSource `json:"resolvedStorageSource,omitempty"`
2035
2036	// ResolvedStorageSourceManifest: A copy of the build's
2037	// `source.storage_source_manifest`, if exists, with any revisions
2038	// resolved. This feature is in Preview.
2039	ResolvedStorageSourceManifest *StorageSourceManifest `json:"resolvedStorageSourceManifest,omitempty"`
2040
2041	// ForceSendFields is a list of field names (e.g. "FileHashes") to
2042	// unconditionally include in API requests. By default, fields with
2043	// empty values are omitted from API requests. However, any non-pointer,
2044	// non-interface field appearing in ForceSendFields will be sent to the
2045	// server regardless of whether the field is empty or not. This may be
2046	// used to include empty fields in Patch requests.
2047	ForceSendFields []string `json:"-"`
2048
2049	// NullFields is a list of field names (e.g. "FileHashes") to include in
2050	// API requests with the JSON null value. By default, fields with empty
2051	// values are omitted from API requests. However, any field with an
2052	// empty value appearing in NullFields will be sent to the server as
2053	// null. It is an error if a field in this list has a non-empty value.
2054	// This may be used to include null fields in Patch requests.
2055	NullFields []string `json:"-"`
2056}
2057
2058func (s *SourceProvenance) MarshalJSON() ([]byte, error) {
2059	type NoMethod SourceProvenance
2060	raw := NoMethod(*s)
2061	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2062}
2063
2064// Status: The `Status` type defines a logical error model that is
2065// suitable for different programming environments, including REST APIs
2066// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each
2067// `Status` message contains three pieces of data: error code, error
2068// message, and error details. You can find out more about this error
2069// model and how to work with it in the API Design Guide
2070// (https://cloud.google.com/apis/design/errors).
2071type Status struct {
2072	// Code: The status code, which should be an enum value of
2073	// google.rpc.Code.
2074	Code int64 `json:"code,omitempty"`
2075
2076	// Details: A list of messages that carry the error details. There is a
2077	// common set of message types for APIs to use.
2078	Details []googleapi.RawMessage `json:"details,omitempty"`
2079
2080	// Message: A developer-facing error message, which should be in
2081	// English. Any user-facing error message should be localized and sent
2082	// in the google.rpc.Status.details field, or localized by the client.
2083	Message string `json:"message,omitempty"`
2084
2085	// ForceSendFields is a list of field names (e.g. "Code") to
2086	// unconditionally include in API requests. By default, fields with
2087	// empty values are omitted from API requests. However, any non-pointer,
2088	// non-interface field appearing in ForceSendFields will be sent to the
2089	// server regardless of whether the field is empty or not. This may be
2090	// used to include empty fields in Patch requests.
2091	ForceSendFields []string `json:"-"`
2092
2093	// NullFields is a list of field names (e.g. "Code") to include in API
2094	// requests with the JSON null value. By default, fields with empty
2095	// values are omitted from API requests. However, any field with an
2096	// empty value appearing in NullFields will be sent to the server as
2097	// null. It is an error if a field in this list has a non-empty value.
2098	// This may be used to include null fields in Patch requests.
2099	NullFields []string `json:"-"`
2100}
2101
2102func (s *Status) MarshalJSON() ([]byte, error) {
2103	type NoMethod Status
2104	raw := NoMethod(*s)
2105	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2106}
2107
2108// StorageSource: Location of the source in an archive file in Google
2109// Cloud Storage.
2110type StorageSource struct {
2111	// Bucket: Google Cloud Storage bucket containing the source (see Bucket
2112	// Name Requirements
2113	// (https://cloud.google.com/storage/docs/bucket-naming#requirements)).
2114	Bucket string `json:"bucket,omitempty"`
2115
2116	// Generation: Google Cloud Storage generation for the object. If the
2117	// generation is omitted, the latest generation will be used.
2118	Generation int64 `json:"generation,omitempty,string"`
2119
2120	// Object: Google Cloud Storage object containing the source. This
2121	// object must be a gzipped archive file (`.tar.gz`) containing source
2122	// to build.
2123	Object string `json:"object,omitempty"`
2124
2125	// ForceSendFields is a list of field names (e.g. "Bucket") to
2126	// unconditionally include in API requests. By default, fields with
2127	// empty values are omitted from API requests. However, any non-pointer,
2128	// non-interface field appearing in ForceSendFields will be sent to the
2129	// server regardless of whether the field is empty or not. This may be
2130	// used to include empty fields in Patch requests.
2131	ForceSendFields []string `json:"-"`
2132
2133	// NullFields is a list of field names (e.g. "Bucket") to include in API
2134	// requests with the JSON null value. By default, fields with empty
2135	// values are omitted from API requests. However, any field with an
2136	// empty value appearing in NullFields will be sent to the server as
2137	// null. It is an error if a field in this list has a non-empty value.
2138	// This may be used to include null fields in Patch requests.
2139	NullFields []string `json:"-"`
2140}
2141
2142func (s *StorageSource) MarshalJSON() ([]byte, error) {
2143	type NoMethod StorageSource
2144	raw := NoMethod(*s)
2145	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2146}
2147
2148// StorageSourceManifest: Location of the source manifest in Google
2149// Cloud Storage. This feature is in Preview.
2150type StorageSourceManifest struct {
2151	// Bucket: Google Cloud Storage bucket containing the source manifest
2152	// (see Bucket Name Requirements
2153	// (https://cloud.google.com/storage/docs/bucket-naming#requirements)).
2154	Bucket string `json:"bucket,omitempty"`
2155
2156	// Generation: Google Cloud Storage generation for the object. If the
2157	// generation is omitted, the latest generation will be used.
2158	Generation int64 `json:"generation,omitempty,string"`
2159
2160	// Object: Google Cloud Storage object containing the source manifest.
2161	// This object must be a JSON file.
2162	Object string `json:"object,omitempty"`
2163
2164	// ForceSendFields is a list of field names (e.g. "Bucket") to
2165	// unconditionally include in API requests. By default, fields with
2166	// empty values are omitted from API requests. However, any non-pointer,
2167	// non-interface field appearing in ForceSendFields will be sent to the
2168	// server regardless of whether the field is empty or not. This may be
2169	// used to include empty fields in Patch requests.
2170	ForceSendFields []string `json:"-"`
2171
2172	// NullFields is a list of field names (e.g. "Bucket") to include in API
2173	// requests with the JSON null value. By default, fields with empty
2174	// values are omitted from API requests. However, any field with an
2175	// empty value appearing in NullFields will be sent to the server as
2176	// null. It is an error if a field in this list has a non-empty value.
2177	// This may be used to include null fields in Patch requests.
2178	NullFields []string `json:"-"`
2179}
2180
2181func (s *StorageSourceManifest) MarshalJSON() ([]byte, error) {
2182	type NoMethod StorageSourceManifest
2183	raw := NoMethod(*s)
2184	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2185}
2186
2187// TimeSpan: Start and end times for a build execution phase.
2188type TimeSpan struct {
2189	// EndTime: End of time span.
2190	EndTime string `json:"endTime,omitempty"`
2191
2192	// StartTime: Start of time span.
2193	StartTime string `json:"startTime,omitempty"`
2194
2195	// ForceSendFields is a list of field names (e.g. "EndTime") to
2196	// unconditionally include in API requests. By default, fields with
2197	// empty values are omitted from API requests. However, any non-pointer,
2198	// non-interface field appearing in ForceSendFields will be sent to the
2199	// server regardless of whether the field is empty or not. This may be
2200	// used to include empty fields in Patch requests.
2201	ForceSendFields []string `json:"-"`
2202
2203	// NullFields is a list of field names (e.g. "EndTime") to include in
2204	// API requests with the JSON null value. By default, fields with empty
2205	// values are omitted from API requests. However, any field with an
2206	// empty value appearing in NullFields will be sent to the server as
2207	// null. It is an error if a field in this list has a non-empty value.
2208	// This may be used to include null fields in Patch requests.
2209	NullFields []string `json:"-"`
2210}
2211
2212func (s *TimeSpan) MarshalJSON() ([]byte, error) {
2213	type NoMethod TimeSpan
2214	raw := NoMethod(*s)
2215	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2216}
2217
2218// Volume: Volume describes a Docker container volume which is mounted
2219// into build steps in order to persist files across build step
2220// execution.
2221type Volume struct {
2222	// Name: Name of the volume to mount. Volume names must be unique per
2223	// build step and must be valid names for Docker volumes. Each named
2224	// volume must be used by at least two build steps.
2225	Name string `json:"name,omitempty"`
2226
2227	// Path: Path at which to mount the volume. Paths must be absolute and
2228	// cannot conflict with other volume paths on the same build step or
2229	// with certain reserved volume paths.
2230	Path string `json:"path,omitempty"`
2231
2232	// ForceSendFields is a list of field names (e.g. "Name") to
2233	// unconditionally include in API requests. By default, fields with
2234	// empty values are omitted from API requests. However, any non-pointer,
2235	// non-interface field appearing in ForceSendFields will be sent to the
2236	// server regardless of whether the field is empty or not. This may be
2237	// used to include empty fields in Patch requests.
2238	ForceSendFields []string `json:"-"`
2239
2240	// NullFields is a list of field names (e.g. "Name") to include in API
2241	// requests with the JSON null value. By default, fields with empty
2242	// values are omitted from API requests. However, any field with an
2243	// empty value appearing in NullFields will be sent to the server as
2244	// null. It is an error if a field in this list has a non-empty value.
2245	// This may be used to include null fields in Patch requests.
2246	NullFields []string `json:"-"`
2247}
2248
2249func (s *Volume) MarshalJSON() ([]byte, error) {
2250	type NoMethod Volume
2251	raw := NoMethod(*s)
2252	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2253}
2254
2255// method id "cloudbuild.operations.cancel":
2256
2257type OperationsCancelCall struct {
2258	s                      *Service
2259	name                   string
2260	canceloperationrequest *CancelOperationRequest
2261	urlParams_             gensupport.URLParams
2262	ctx_                   context.Context
2263	header_                http.Header
2264}
2265
2266// Cancel: Starts asynchronous cancellation on a long-running operation.
2267// The server makes a best effort to cancel the operation, but success
2268// is not guaranteed. If the server doesn't support this method, it
2269// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use
2270// Operations.GetOperation or other methods to check whether the
2271// cancellation succeeded or whether the operation completed despite
2272// cancellation. On successful cancellation, the operation is not
2273// deleted; instead, it becomes an operation with an Operation.error
2274// value with a google.rpc.Status.code of 1, corresponding to
2275// `Code.CANCELLED`.
2276func (r *OperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *OperationsCancelCall {
2277	c := &OperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2278	c.name = name
2279	c.canceloperationrequest = canceloperationrequest
2280	return c
2281}
2282
2283// Fields allows partial responses to be retrieved. See
2284// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2285// for more information.
2286func (c *OperationsCancelCall) Fields(s ...googleapi.Field) *OperationsCancelCall {
2287	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2288	return c
2289}
2290
2291// Context sets the context to be used in this call's Do method. Any
2292// pending HTTP request will be aborted if the provided context is
2293// canceled.
2294func (c *OperationsCancelCall) Context(ctx context.Context) *OperationsCancelCall {
2295	c.ctx_ = ctx
2296	return c
2297}
2298
2299// Header returns an http.Header that can be modified by the caller to
2300// add HTTP headers to the request.
2301func (c *OperationsCancelCall) Header() http.Header {
2302	if c.header_ == nil {
2303		c.header_ = make(http.Header)
2304	}
2305	return c.header_
2306}
2307
2308func (c *OperationsCancelCall) doRequest(alt string) (*http.Response, error) {
2309	reqHeaders := make(http.Header)
2310	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
2311	for k, v := range c.header_ {
2312		reqHeaders[k] = v
2313	}
2314	reqHeaders.Set("User-Agent", c.s.userAgent())
2315	var body io.Reader = nil
2316	body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
2317	if err != nil {
2318		return nil, err
2319	}
2320	reqHeaders.Set("Content-Type", "application/json")
2321	c.urlParams_.Set("alt", alt)
2322	c.urlParams_.Set("prettyPrint", "false")
2323	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
2324	urls += "?" + c.urlParams_.Encode()
2325	req, err := http.NewRequest("POST", urls, body)
2326	if err != nil {
2327		return nil, err
2328	}
2329	req.Header = reqHeaders
2330	googleapi.Expand(req.URL, map[string]string{
2331		"name": c.name,
2332	})
2333	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2334}
2335
2336// Do executes the "cloudbuild.operations.cancel" call.
2337// Exactly one of *Empty or error will be non-nil. Any non-2xx status
2338// code is an error. Response headers are in either
2339// *Empty.ServerResponse.Header or (if a response was returned at all)
2340// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
2341// check whether the returned error was because http.StatusNotModified
2342// was returned.
2343func (c *OperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
2344	gensupport.SetOptions(c.urlParams_, opts...)
2345	res, err := c.doRequest("json")
2346	if res != nil && res.StatusCode == http.StatusNotModified {
2347		if res.Body != nil {
2348			res.Body.Close()
2349		}
2350		return nil, &googleapi.Error{
2351			Code:   res.StatusCode,
2352			Header: res.Header,
2353		}
2354	}
2355	if err != nil {
2356		return nil, err
2357	}
2358	defer googleapi.CloseBody(res)
2359	if err := googleapi.CheckResponse(res); err != nil {
2360		return nil, err
2361	}
2362	ret := &Empty{
2363		ServerResponse: googleapi.ServerResponse{
2364			Header:         res.Header,
2365			HTTPStatusCode: res.StatusCode,
2366		},
2367	}
2368	target := &ret
2369	if err := gensupport.DecodeResponse(target, res); err != nil {
2370		return nil, err
2371	}
2372	return ret, nil
2373	// {
2374	//   "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`.",
2375	//   "flatPath": "v1/operations/{operationsId}:cancel",
2376	//   "httpMethod": "POST",
2377	//   "id": "cloudbuild.operations.cancel",
2378	//   "parameterOrder": [
2379	//     "name"
2380	//   ],
2381	//   "parameters": {
2382	//     "name": {
2383	//       "description": "The name of the operation resource to be cancelled.",
2384	//       "location": "path",
2385	//       "pattern": "^operations/.*$",
2386	//       "required": true,
2387	//       "type": "string"
2388	//     }
2389	//   },
2390	//   "path": "v1/{+name}:cancel",
2391	//   "request": {
2392	//     "$ref": "CancelOperationRequest"
2393	//   },
2394	//   "response": {
2395	//     "$ref": "Empty"
2396	//   },
2397	//   "scopes": [
2398	//     "https://www.googleapis.com/auth/cloud-platform"
2399	//   ]
2400	// }
2401
2402}
2403
2404// method id "cloudbuild.operations.get":
2405
2406type OperationsGetCall struct {
2407	s            *Service
2408	name         string
2409	urlParams_   gensupport.URLParams
2410	ifNoneMatch_ string
2411	ctx_         context.Context
2412	header_      http.Header
2413}
2414
2415// Get: Gets the latest state of a long-running operation. Clients can
2416// use this method to poll the operation result at intervals as
2417// recommended by the API service.
2418func (r *OperationsService) Get(name string) *OperationsGetCall {
2419	c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2420	c.name = name
2421	return c
2422}
2423
2424// Fields allows partial responses to be retrieved. See
2425// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2426// for more information.
2427func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall {
2428	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2429	return c
2430}
2431
2432// IfNoneMatch sets the optional parameter which makes the operation
2433// fail if the object's ETag matches the given value. This is useful for
2434// getting updates only after the object has changed since the last
2435// request. Use googleapi.IsNotModified to check whether the response
2436// error from Do is the result of In-None-Match.
2437func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall {
2438	c.ifNoneMatch_ = entityTag
2439	return c
2440}
2441
2442// Context sets the context to be used in this call's Do method. Any
2443// pending HTTP request will be aborted if the provided context is
2444// canceled.
2445func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall {
2446	c.ctx_ = ctx
2447	return c
2448}
2449
2450// Header returns an http.Header that can be modified by the caller to
2451// add HTTP headers to the request.
2452func (c *OperationsGetCall) Header() http.Header {
2453	if c.header_ == nil {
2454		c.header_ = make(http.Header)
2455	}
2456	return c.header_
2457}
2458
2459func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) {
2460	reqHeaders := make(http.Header)
2461	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
2462	for k, v := range c.header_ {
2463		reqHeaders[k] = v
2464	}
2465	reqHeaders.Set("User-Agent", c.s.userAgent())
2466	if c.ifNoneMatch_ != "" {
2467		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2468	}
2469	var body io.Reader = nil
2470	c.urlParams_.Set("alt", alt)
2471	c.urlParams_.Set("prettyPrint", "false")
2472	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
2473	urls += "?" + c.urlParams_.Encode()
2474	req, err := http.NewRequest("GET", urls, body)
2475	if err != nil {
2476		return nil, err
2477	}
2478	req.Header = reqHeaders
2479	googleapi.Expand(req.URL, map[string]string{
2480		"name": c.name,
2481	})
2482	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2483}
2484
2485// Do executes the "cloudbuild.operations.get" call.
2486// Exactly one of *Operation or error will be non-nil. Any non-2xx
2487// status code is an error. Response headers are in either
2488// *Operation.ServerResponse.Header or (if a response was returned at
2489// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
2490// to check whether the returned error was because
2491// http.StatusNotModified was returned.
2492func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
2493	gensupport.SetOptions(c.urlParams_, opts...)
2494	res, err := c.doRequest("json")
2495	if res != nil && res.StatusCode == http.StatusNotModified {
2496		if res.Body != nil {
2497			res.Body.Close()
2498		}
2499		return nil, &googleapi.Error{
2500			Code:   res.StatusCode,
2501			Header: res.Header,
2502		}
2503	}
2504	if err != nil {
2505		return nil, err
2506	}
2507	defer googleapi.CloseBody(res)
2508	if err := googleapi.CheckResponse(res); err != nil {
2509		return nil, err
2510	}
2511	ret := &Operation{
2512		ServerResponse: googleapi.ServerResponse{
2513			Header:         res.Header,
2514			HTTPStatusCode: res.StatusCode,
2515		},
2516	}
2517	target := &ret
2518	if err := gensupport.DecodeResponse(target, res); err != nil {
2519		return nil, err
2520	}
2521	return ret, nil
2522	// {
2523	//   "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.",
2524	//   "flatPath": "v1/operations/{operationsId}",
2525	//   "httpMethod": "GET",
2526	//   "id": "cloudbuild.operations.get",
2527	//   "parameterOrder": [
2528	//     "name"
2529	//   ],
2530	//   "parameters": {
2531	//     "name": {
2532	//       "description": "The name of the operation resource.",
2533	//       "location": "path",
2534	//       "pattern": "^operations/.*$",
2535	//       "required": true,
2536	//       "type": "string"
2537	//     }
2538	//   },
2539	//   "path": "v1/{+name}",
2540	//   "response": {
2541	//     "$ref": "Operation"
2542	//   },
2543	//   "scopes": [
2544	//     "https://www.googleapis.com/auth/cloud-platform"
2545	//   ]
2546	// }
2547
2548}
2549
2550// method id "cloudbuild.projects.builds.cancel":
2551
2552type ProjectsBuildsCancelCall struct {
2553	s                  *Service
2554	projectId          string
2555	id                 string
2556	cancelbuildrequest *CancelBuildRequest
2557	urlParams_         gensupport.URLParams
2558	ctx_               context.Context
2559	header_            http.Header
2560}
2561
2562// Cancel: Cancels a build in progress.
2563func (r *ProjectsBuildsService) Cancel(projectId string, id string, cancelbuildrequest *CancelBuildRequest) *ProjectsBuildsCancelCall {
2564	c := &ProjectsBuildsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2565	c.projectId = projectId
2566	c.id = id
2567	c.cancelbuildrequest = cancelbuildrequest
2568	return c
2569}
2570
2571// Fields allows partial responses to be retrieved. See
2572// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2573// for more information.
2574func (c *ProjectsBuildsCancelCall) Fields(s ...googleapi.Field) *ProjectsBuildsCancelCall {
2575	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2576	return c
2577}
2578
2579// Context sets the context to be used in this call's Do method. Any
2580// pending HTTP request will be aborted if the provided context is
2581// canceled.
2582func (c *ProjectsBuildsCancelCall) Context(ctx context.Context) *ProjectsBuildsCancelCall {
2583	c.ctx_ = ctx
2584	return c
2585}
2586
2587// Header returns an http.Header that can be modified by the caller to
2588// add HTTP headers to the request.
2589func (c *ProjectsBuildsCancelCall) Header() http.Header {
2590	if c.header_ == nil {
2591		c.header_ = make(http.Header)
2592	}
2593	return c.header_
2594}
2595
2596func (c *ProjectsBuildsCancelCall) doRequest(alt string) (*http.Response, error) {
2597	reqHeaders := make(http.Header)
2598	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
2599	for k, v := range c.header_ {
2600		reqHeaders[k] = v
2601	}
2602	reqHeaders.Set("User-Agent", c.s.userAgent())
2603	var body io.Reader = nil
2604	body, err := googleapi.WithoutDataWrapper.JSONReader(c.cancelbuildrequest)
2605	if err != nil {
2606		return nil, err
2607	}
2608	reqHeaders.Set("Content-Type", "application/json")
2609	c.urlParams_.Set("alt", alt)
2610	c.urlParams_.Set("prettyPrint", "false")
2611	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/builds/{id}:cancel")
2612	urls += "?" + c.urlParams_.Encode()
2613	req, err := http.NewRequest("POST", urls, body)
2614	if err != nil {
2615		return nil, err
2616	}
2617	req.Header = reqHeaders
2618	googleapi.Expand(req.URL, map[string]string{
2619		"projectId": c.projectId,
2620		"id":        c.id,
2621	})
2622	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2623}
2624
2625// Do executes the "cloudbuild.projects.builds.cancel" call.
2626// Exactly one of *Build or error will be non-nil. Any non-2xx status
2627// code is an error. Response headers are in either
2628// *Build.ServerResponse.Header or (if a response was returned at all)
2629// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
2630// check whether the returned error was because http.StatusNotModified
2631// was returned.
2632func (c *ProjectsBuildsCancelCall) Do(opts ...googleapi.CallOption) (*Build, error) {
2633	gensupport.SetOptions(c.urlParams_, opts...)
2634	res, err := c.doRequest("json")
2635	if res != nil && res.StatusCode == http.StatusNotModified {
2636		if res.Body != nil {
2637			res.Body.Close()
2638		}
2639		return nil, &googleapi.Error{
2640			Code:   res.StatusCode,
2641			Header: res.Header,
2642		}
2643	}
2644	if err != nil {
2645		return nil, err
2646	}
2647	defer googleapi.CloseBody(res)
2648	if err := googleapi.CheckResponse(res); err != nil {
2649		return nil, err
2650	}
2651	ret := &Build{
2652		ServerResponse: googleapi.ServerResponse{
2653			Header:         res.Header,
2654			HTTPStatusCode: res.StatusCode,
2655		},
2656	}
2657	target := &ret
2658	if err := gensupport.DecodeResponse(target, res); err != nil {
2659		return nil, err
2660	}
2661	return ret, nil
2662	// {
2663	//   "description": "Cancels a build in progress.",
2664	//   "flatPath": "v1/projects/{projectId}/builds/{id}:cancel",
2665	//   "httpMethod": "POST",
2666	//   "id": "cloudbuild.projects.builds.cancel",
2667	//   "parameterOrder": [
2668	//     "projectId",
2669	//     "id"
2670	//   ],
2671	//   "parameters": {
2672	//     "id": {
2673	//       "description": "Required. ID of the build.",
2674	//       "location": "path",
2675	//       "required": true,
2676	//       "type": "string"
2677	//     },
2678	//     "projectId": {
2679	//       "description": "Required. ID of the project.",
2680	//       "location": "path",
2681	//       "required": true,
2682	//       "type": "string"
2683	//     }
2684	//   },
2685	//   "path": "v1/projects/{projectId}/builds/{id}:cancel",
2686	//   "request": {
2687	//     "$ref": "CancelBuildRequest"
2688	//   },
2689	//   "response": {
2690	//     "$ref": "Build"
2691	//   },
2692	//   "scopes": [
2693	//     "https://www.googleapis.com/auth/cloud-platform"
2694	//   ]
2695	// }
2696
2697}
2698
2699// method id "cloudbuild.projects.builds.create":
2700
2701type ProjectsBuildsCreateCall struct {
2702	s          *Service
2703	projectId  string
2704	build      *Build
2705	urlParams_ gensupport.URLParams
2706	ctx_       context.Context
2707	header_    http.Header
2708}
2709
2710// Create: Starts a build with the specified configuration. This method
2711// returns a long-running `Operation`, which includes the build ID. Pass
2712// the build ID to `GetBuild` to determine the build status (such as
2713// `SUCCESS` or `FAILURE`).
2714func (r *ProjectsBuildsService) Create(projectId string, build *Build) *ProjectsBuildsCreateCall {
2715	c := &ProjectsBuildsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2716	c.projectId = projectId
2717	c.build = build
2718	return c
2719}
2720
2721// Parent sets the optional parameter "parent": The parent resource
2722// where this build will be created. Format:
2723// `projects/{project}/locations/{location}`
2724func (c *ProjectsBuildsCreateCall) Parent(parent string) *ProjectsBuildsCreateCall {
2725	c.urlParams_.Set("parent", parent)
2726	return c
2727}
2728
2729// Fields allows partial responses to be retrieved. See
2730// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2731// for more information.
2732func (c *ProjectsBuildsCreateCall) Fields(s ...googleapi.Field) *ProjectsBuildsCreateCall {
2733	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2734	return c
2735}
2736
2737// Context sets the context to be used in this call's Do method. Any
2738// pending HTTP request will be aborted if the provided context is
2739// canceled.
2740func (c *ProjectsBuildsCreateCall) Context(ctx context.Context) *ProjectsBuildsCreateCall {
2741	c.ctx_ = ctx
2742	return c
2743}
2744
2745// Header returns an http.Header that can be modified by the caller to
2746// add HTTP headers to the request.
2747func (c *ProjectsBuildsCreateCall) Header() http.Header {
2748	if c.header_ == nil {
2749		c.header_ = make(http.Header)
2750	}
2751	return c.header_
2752}
2753
2754func (c *ProjectsBuildsCreateCall) doRequest(alt string) (*http.Response, error) {
2755	reqHeaders := make(http.Header)
2756	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
2757	for k, v := range c.header_ {
2758		reqHeaders[k] = v
2759	}
2760	reqHeaders.Set("User-Agent", c.s.userAgent())
2761	var body io.Reader = nil
2762	body, err := googleapi.WithoutDataWrapper.JSONReader(c.build)
2763	if err != nil {
2764		return nil, err
2765	}
2766	reqHeaders.Set("Content-Type", "application/json")
2767	c.urlParams_.Set("alt", alt)
2768	c.urlParams_.Set("prettyPrint", "false")
2769	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/builds")
2770	urls += "?" + c.urlParams_.Encode()
2771	req, err := http.NewRequest("POST", urls, body)
2772	if err != nil {
2773		return nil, err
2774	}
2775	req.Header = reqHeaders
2776	googleapi.Expand(req.URL, map[string]string{
2777		"projectId": c.projectId,
2778	})
2779	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2780}
2781
2782// Do executes the "cloudbuild.projects.builds.create" call.
2783// Exactly one of *Operation or error will be non-nil. Any non-2xx
2784// status code is an error. Response headers are in either
2785// *Operation.ServerResponse.Header or (if a response was returned at
2786// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
2787// to check whether the returned error was because
2788// http.StatusNotModified was returned.
2789func (c *ProjectsBuildsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
2790	gensupport.SetOptions(c.urlParams_, opts...)
2791	res, err := c.doRequest("json")
2792	if res != nil && res.StatusCode == http.StatusNotModified {
2793		if res.Body != nil {
2794			res.Body.Close()
2795		}
2796		return nil, &googleapi.Error{
2797			Code:   res.StatusCode,
2798			Header: res.Header,
2799		}
2800	}
2801	if err != nil {
2802		return nil, err
2803	}
2804	defer googleapi.CloseBody(res)
2805	if err := googleapi.CheckResponse(res); err != nil {
2806		return nil, err
2807	}
2808	ret := &Operation{
2809		ServerResponse: googleapi.ServerResponse{
2810			Header:         res.Header,
2811			HTTPStatusCode: res.StatusCode,
2812		},
2813	}
2814	target := &ret
2815	if err := gensupport.DecodeResponse(target, res); err != nil {
2816		return nil, err
2817	}
2818	return ret, nil
2819	// {
2820	//   "description": "Starts a build with the specified configuration. This method returns a long-running `Operation`, which includes the build ID. Pass the build ID to `GetBuild` to determine the build status (such as `SUCCESS` or `FAILURE`).",
2821	//   "flatPath": "v1/projects/{projectId}/builds",
2822	//   "httpMethod": "POST",
2823	//   "id": "cloudbuild.projects.builds.create",
2824	//   "parameterOrder": [
2825	//     "projectId"
2826	//   ],
2827	//   "parameters": {
2828	//     "parent": {
2829	//       "description": "The parent resource where this build will be created. Format: `projects/{project}/locations/{location}`",
2830	//       "location": "query",
2831	//       "type": "string"
2832	//     },
2833	//     "projectId": {
2834	//       "description": "Required. ID of the project.",
2835	//       "location": "path",
2836	//       "required": true,
2837	//       "type": "string"
2838	//     }
2839	//   },
2840	//   "path": "v1/projects/{projectId}/builds",
2841	//   "request": {
2842	//     "$ref": "Build"
2843	//   },
2844	//   "response": {
2845	//     "$ref": "Operation"
2846	//   },
2847	//   "scopes": [
2848	//     "https://www.googleapis.com/auth/cloud-platform"
2849	//   ]
2850	// }
2851
2852}
2853
2854// method id "cloudbuild.projects.builds.get":
2855
2856type ProjectsBuildsGetCall struct {
2857	s            *Service
2858	projectId    string
2859	id           string
2860	urlParams_   gensupport.URLParams
2861	ifNoneMatch_ string
2862	ctx_         context.Context
2863	header_      http.Header
2864}
2865
2866// Get: Returns information about a previously requested build. The
2867// `Build` that is returned includes its status (such as `SUCCESS`,
2868// `FAILURE`, or `WORKING`), and timing information.
2869func (r *ProjectsBuildsService) Get(projectId string, id string) *ProjectsBuildsGetCall {
2870	c := &ProjectsBuildsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2871	c.projectId = projectId
2872	c.id = id
2873	return c
2874}
2875
2876// Name sets the optional parameter "name": The name of the `Build` to
2877// retrieve. Format:
2878// `projects/{project}/locations/{location}/builds/{build}`
2879func (c *ProjectsBuildsGetCall) Name(name string) *ProjectsBuildsGetCall {
2880	c.urlParams_.Set("name", name)
2881	return c
2882}
2883
2884// Fields allows partial responses to be retrieved. See
2885// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2886// for more information.
2887func (c *ProjectsBuildsGetCall) Fields(s ...googleapi.Field) *ProjectsBuildsGetCall {
2888	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2889	return c
2890}
2891
2892// IfNoneMatch sets the optional parameter which makes the operation
2893// fail if the object's ETag matches the given value. This is useful for
2894// getting updates only after the object has changed since the last
2895// request. Use googleapi.IsNotModified to check whether the response
2896// error from Do is the result of In-None-Match.
2897func (c *ProjectsBuildsGetCall) IfNoneMatch(entityTag string) *ProjectsBuildsGetCall {
2898	c.ifNoneMatch_ = entityTag
2899	return c
2900}
2901
2902// Context sets the context to be used in this call's Do method. Any
2903// pending HTTP request will be aborted if the provided context is
2904// canceled.
2905func (c *ProjectsBuildsGetCall) Context(ctx context.Context) *ProjectsBuildsGetCall {
2906	c.ctx_ = ctx
2907	return c
2908}
2909
2910// Header returns an http.Header that can be modified by the caller to
2911// add HTTP headers to the request.
2912func (c *ProjectsBuildsGetCall) Header() http.Header {
2913	if c.header_ == nil {
2914		c.header_ = make(http.Header)
2915	}
2916	return c.header_
2917}
2918
2919func (c *ProjectsBuildsGetCall) doRequest(alt string) (*http.Response, error) {
2920	reqHeaders := make(http.Header)
2921	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
2922	for k, v := range c.header_ {
2923		reqHeaders[k] = v
2924	}
2925	reqHeaders.Set("User-Agent", c.s.userAgent())
2926	if c.ifNoneMatch_ != "" {
2927		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2928	}
2929	var body io.Reader = nil
2930	c.urlParams_.Set("alt", alt)
2931	c.urlParams_.Set("prettyPrint", "false")
2932	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/builds/{id}")
2933	urls += "?" + c.urlParams_.Encode()
2934	req, err := http.NewRequest("GET", urls, body)
2935	if err != nil {
2936		return nil, err
2937	}
2938	req.Header = reqHeaders
2939	googleapi.Expand(req.URL, map[string]string{
2940		"projectId": c.projectId,
2941		"id":        c.id,
2942	})
2943	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2944}
2945
2946// Do executes the "cloudbuild.projects.builds.get" call.
2947// Exactly one of *Build or error will be non-nil. Any non-2xx status
2948// code is an error. Response headers are in either
2949// *Build.ServerResponse.Header or (if a response was returned at all)
2950// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
2951// check whether the returned error was because http.StatusNotModified
2952// was returned.
2953func (c *ProjectsBuildsGetCall) Do(opts ...googleapi.CallOption) (*Build, error) {
2954	gensupport.SetOptions(c.urlParams_, opts...)
2955	res, err := c.doRequest("json")
2956	if res != nil && res.StatusCode == http.StatusNotModified {
2957		if res.Body != nil {
2958			res.Body.Close()
2959		}
2960		return nil, &googleapi.Error{
2961			Code:   res.StatusCode,
2962			Header: res.Header,
2963		}
2964	}
2965	if err != nil {
2966		return nil, err
2967	}
2968	defer googleapi.CloseBody(res)
2969	if err := googleapi.CheckResponse(res); err != nil {
2970		return nil, err
2971	}
2972	ret := &Build{
2973		ServerResponse: googleapi.ServerResponse{
2974			Header:         res.Header,
2975			HTTPStatusCode: res.StatusCode,
2976		},
2977	}
2978	target := &ret
2979	if err := gensupport.DecodeResponse(target, res); err != nil {
2980		return nil, err
2981	}
2982	return ret, nil
2983	// {
2984	//   "description": "Returns information about a previously requested build. The `Build` that is returned includes its status (such as `SUCCESS`, `FAILURE`, or `WORKING`), and timing information.",
2985	//   "flatPath": "v1/projects/{projectId}/builds/{id}",
2986	//   "httpMethod": "GET",
2987	//   "id": "cloudbuild.projects.builds.get",
2988	//   "parameterOrder": [
2989	//     "projectId",
2990	//     "id"
2991	//   ],
2992	//   "parameters": {
2993	//     "id": {
2994	//       "description": "Required. ID of the build.",
2995	//       "location": "path",
2996	//       "required": true,
2997	//       "type": "string"
2998	//     },
2999	//     "name": {
3000	//       "description": "The name of the `Build` to retrieve. Format: `projects/{project}/locations/{location}/builds/{build}`",
3001	//       "location": "query",
3002	//       "type": "string"
3003	//     },
3004	//     "projectId": {
3005	//       "description": "Required. ID of the project.",
3006	//       "location": "path",
3007	//       "required": true,
3008	//       "type": "string"
3009	//     }
3010	//   },
3011	//   "path": "v1/projects/{projectId}/builds/{id}",
3012	//   "response": {
3013	//     "$ref": "Build"
3014	//   },
3015	//   "scopes": [
3016	//     "https://www.googleapis.com/auth/cloud-platform"
3017	//   ]
3018	// }
3019
3020}
3021
3022// method id "cloudbuild.projects.builds.list":
3023
3024type ProjectsBuildsListCall struct {
3025	s            *Service
3026	projectId    string
3027	urlParams_   gensupport.URLParams
3028	ifNoneMatch_ string
3029	ctx_         context.Context
3030	header_      http.Header
3031}
3032
3033// List: Lists previously requested builds. Previously requested builds
3034// may still be in-progress, or may have finished successfully or
3035// unsuccessfully.
3036func (r *ProjectsBuildsService) List(projectId string) *ProjectsBuildsListCall {
3037	c := &ProjectsBuildsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3038	c.projectId = projectId
3039	return c
3040}
3041
3042// Filter sets the optional parameter "filter": The raw filter text to
3043// constrain the results.
3044func (c *ProjectsBuildsListCall) Filter(filter string) *ProjectsBuildsListCall {
3045	c.urlParams_.Set("filter", filter)
3046	return c
3047}
3048
3049// PageSize sets the optional parameter "pageSize": Number of results to
3050// return in the list.
3051func (c *ProjectsBuildsListCall) PageSize(pageSize int64) *ProjectsBuildsListCall {
3052	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3053	return c
3054}
3055
3056// PageToken sets the optional parameter "pageToken": The page token for
3057// the next page of Builds. If unspecified, the first page of results is
3058// returned. If the token is rejected for any reason, INVALID_ARGUMENT
3059// will be thrown. In this case, the token should be discarded, and
3060// pagination should be restarted from the first page of results. See
3061// https://google.aip.dev/158 for more.
3062func (c *ProjectsBuildsListCall) PageToken(pageToken string) *ProjectsBuildsListCall {
3063	c.urlParams_.Set("pageToken", pageToken)
3064	return c
3065}
3066
3067// Parent sets the optional parameter "parent": The parent of the
3068// collection of `Builds`. Format:
3069// `projects/{project}/locations/location`
3070func (c *ProjectsBuildsListCall) Parent(parent string) *ProjectsBuildsListCall {
3071	c.urlParams_.Set("parent", parent)
3072	return c
3073}
3074
3075// Fields allows partial responses to be retrieved. See
3076// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3077// for more information.
3078func (c *ProjectsBuildsListCall) Fields(s ...googleapi.Field) *ProjectsBuildsListCall {
3079	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3080	return c
3081}
3082
3083// IfNoneMatch sets the optional parameter which makes the operation
3084// fail if the object's ETag matches the given value. This is useful for
3085// getting updates only after the object has changed since the last
3086// request. Use googleapi.IsNotModified to check whether the response
3087// error from Do is the result of In-None-Match.
3088func (c *ProjectsBuildsListCall) IfNoneMatch(entityTag string) *ProjectsBuildsListCall {
3089	c.ifNoneMatch_ = entityTag
3090	return c
3091}
3092
3093// Context sets the context to be used in this call's Do method. Any
3094// pending HTTP request will be aborted if the provided context is
3095// canceled.
3096func (c *ProjectsBuildsListCall) Context(ctx context.Context) *ProjectsBuildsListCall {
3097	c.ctx_ = ctx
3098	return c
3099}
3100
3101// Header returns an http.Header that can be modified by the caller to
3102// add HTTP headers to the request.
3103func (c *ProjectsBuildsListCall) Header() http.Header {
3104	if c.header_ == nil {
3105		c.header_ = make(http.Header)
3106	}
3107	return c.header_
3108}
3109
3110func (c *ProjectsBuildsListCall) doRequest(alt string) (*http.Response, error) {
3111	reqHeaders := make(http.Header)
3112	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
3113	for k, v := range c.header_ {
3114		reqHeaders[k] = v
3115	}
3116	reqHeaders.Set("User-Agent", c.s.userAgent())
3117	if c.ifNoneMatch_ != "" {
3118		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3119	}
3120	var body io.Reader = nil
3121	c.urlParams_.Set("alt", alt)
3122	c.urlParams_.Set("prettyPrint", "false")
3123	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/builds")
3124	urls += "?" + c.urlParams_.Encode()
3125	req, err := http.NewRequest("GET", urls, body)
3126	if err != nil {
3127		return nil, err
3128	}
3129	req.Header = reqHeaders
3130	googleapi.Expand(req.URL, map[string]string{
3131		"projectId": c.projectId,
3132	})
3133	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3134}
3135
3136// Do executes the "cloudbuild.projects.builds.list" call.
3137// Exactly one of *ListBuildsResponse or error will be non-nil. Any
3138// non-2xx status code is an error. Response headers are in either
3139// *ListBuildsResponse.ServerResponse.Header or (if a response was
3140// returned at all) in error.(*googleapi.Error).Header. Use
3141// googleapi.IsNotModified to check whether the returned error was
3142// because http.StatusNotModified was returned.
3143func (c *ProjectsBuildsListCall) Do(opts ...googleapi.CallOption) (*ListBuildsResponse, error) {
3144	gensupport.SetOptions(c.urlParams_, opts...)
3145	res, err := c.doRequest("json")
3146	if res != nil && res.StatusCode == http.StatusNotModified {
3147		if res.Body != nil {
3148			res.Body.Close()
3149		}
3150		return nil, &googleapi.Error{
3151			Code:   res.StatusCode,
3152			Header: res.Header,
3153		}
3154	}
3155	if err != nil {
3156		return nil, err
3157	}
3158	defer googleapi.CloseBody(res)
3159	if err := googleapi.CheckResponse(res); err != nil {
3160		return nil, err
3161	}
3162	ret := &ListBuildsResponse{
3163		ServerResponse: googleapi.ServerResponse{
3164			Header:         res.Header,
3165			HTTPStatusCode: res.StatusCode,
3166		},
3167	}
3168	target := &ret
3169	if err := gensupport.DecodeResponse(target, res); err != nil {
3170		return nil, err
3171	}
3172	return ret, nil
3173	// {
3174	//   "description": "Lists previously requested builds. Previously requested builds may still be in-progress, or may have finished successfully or unsuccessfully.",
3175	//   "flatPath": "v1/projects/{projectId}/builds",
3176	//   "httpMethod": "GET",
3177	//   "id": "cloudbuild.projects.builds.list",
3178	//   "parameterOrder": [
3179	//     "projectId"
3180	//   ],
3181	//   "parameters": {
3182	//     "filter": {
3183	//       "description": "The raw filter text to constrain the results.",
3184	//       "location": "query",
3185	//       "type": "string"
3186	//     },
3187	//     "pageSize": {
3188	//       "description": "Number of results to return in the list.",
3189	//       "format": "int32",
3190	//       "location": "query",
3191	//       "type": "integer"
3192	//     },
3193	//     "pageToken": {
3194	//       "description": "The page token for the next page of Builds. If unspecified, the first page of results is returned. If the token is rejected for any reason, INVALID_ARGUMENT will be thrown. In this case, the token should be discarded, and pagination should be restarted from the first page of results. See https://google.aip.dev/158 for more.",
3195	//       "location": "query",
3196	//       "type": "string"
3197	//     },
3198	//     "parent": {
3199	//       "description": "The parent of the collection of `Builds`. Format: `projects/{project}/locations/location`",
3200	//       "location": "query",
3201	//       "type": "string"
3202	//     },
3203	//     "projectId": {
3204	//       "description": "Required. ID of the project.",
3205	//       "location": "path",
3206	//       "required": true,
3207	//       "type": "string"
3208	//     }
3209	//   },
3210	//   "path": "v1/projects/{projectId}/builds",
3211	//   "response": {
3212	//     "$ref": "ListBuildsResponse"
3213	//   },
3214	//   "scopes": [
3215	//     "https://www.googleapis.com/auth/cloud-platform"
3216	//   ]
3217	// }
3218
3219}
3220
3221// Pages invokes f for each page of results.
3222// A non-nil error returned from f will halt the iteration.
3223// The provided context supersedes any context provided to the Context method.
3224func (c *ProjectsBuildsListCall) Pages(ctx context.Context, f func(*ListBuildsResponse) error) error {
3225	c.ctx_ = ctx
3226	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
3227	for {
3228		x, err := c.Do()
3229		if err != nil {
3230			return err
3231		}
3232		if err := f(x); err != nil {
3233			return err
3234		}
3235		if x.NextPageToken == "" {
3236			return nil
3237		}
3238		c.PageToken(x.NextPageToken)
3239	}
3240}
3241
3242// method id "cloudbuild.projects.builds.retry":
3243
3244type ProjectsBuildsRetryCall struct {
3245	s                 *Service
3246	projectId         string
3247	id                string
3248	retrybuildrequest *RetryBuildRequest
3249	urlParams_        gensupport.URLParams
3250	ctx_              context.Context
3251	header_           http.Header
3252}
3253
3254// Retry: Creates a new build based on the specified build. This method
3255// creates a new build using the original build request, which may or
3256// may not result in an identical build. For triggered builds: *
3257// Triggered builds resolve to a precise revision; therefore a retry of
3258// a triggered build will result in a build that uses the same revision.
3259// For non-triggered builds that specify `RepoSource`: * If the original
3260// build built from the tip of a branch, the retried build will build
3261// from the tip of that branch, which may not be the same revision as
3262// the original build. * If the original build specified a commit sha or
3263// revision ID, the retried build will use the identical source. For
3264// builds that specify `StorageSource`: * If the original build pulled
3265// source from Google Cloud Storage without specifying the generation of
3266// the object, the new build will use the current object, which may be
3267// different from the original build source. * If the original build
3268// pulled source from Cloud Storage and specified the generation of the
3269// object, the new build will attempt to use the same object, which may
3270// or may not be available depending on the bucket's lifecycle
3271// management settings.
3272func (r *ProjectsBuildsService) Retry(projectId string, id string, retrybuildrequest *RetryBuildRequest) *ProjectsBuildsRetryCall {
3273	c := &ProjectsBuildsRetryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3274	c.projectId = projectId
3275	c.id = id
3276	c.retrybuildrequest = retrybuildrequest
3277	return c
3278}
3279
3280// Fields allows partial responses to be retrieved. See
3281// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3282// for more information.
3283func (c *ProjectsBuildsRetryCall) Fields(s ...googleapi.Field) *ProjectsBuildsRetryCall {
3284	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3285	return c
3286}
3287
3288// Context sets the context to be used in this call's Do method. Any
3289// pending HTTP request will be aborted if the provided context is
3290// canceled.
3291func (c *ProjectsBuildsRetryCall) Context(ctx context.Context) *ProjectsBuildsRetryCall {
3292	c.ctx_ = ctx
3293	return c
3294}
3295
3296// Header returns an http.Header that can be modified by the caller to
3297// add HTTP headers to the request.
3298func (c *ProjectsBuildsRetryCall) Header() http.Header {
3299	if c.header_ == nil {
3300		c.header_ = make(http.Header)
3301	}
3302	return c.header_
3303}
3304
3305func (c *ProjectsBuildsRetryCall) doRequest(alt string) (*http.Response, error) {
3306	reqHeaders := make(http.Header)
3307	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
3308	for k, v := range c.header_ {
3309		reqHeaders[k] = v
3310	}
3311	reqHeaders.Set("User-Agent", c.s.userAgent())
3312	var body io.Reader = nil
3313	body, err := googleapi.WithoutDataWrapper.JSONReader(c.retrybuildrequest)
3314	if err != nil {
3315		return nil, err
3316	}
3317	reqHeaders.Set("Content-Type", "application/json")
3318	c.urlParams_.Set("alt", alt)
3319	c.urlParams_.Set("prettyPrint", "false")
3320	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/builds/{id}:retry")
3321	urls += "?" + c.urlParams_.Encode()
3322	req, err := http.NewRequest("POST", urls, body)
3323	if err != nil {
3324		return nil, err
3325	}
3326	req.Header = reqHeaders
3327	googleapi.Expand(req.URL, map[string]string{
3328		"projectId": c.projectId,
3329		"id":        c.id,
3330	})
3331	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3332}
3333
3334// Do executes the "cloudbuild.projects.builds.retry" call.
3335// Exactly one of *Operation or error will be non-nil. Any non-2xx
3336// status code is an error. Response headers are in either
3337// *Operation.ServerResponse.Header or (if a response was returned at
3338// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
3339// to check whether the returned error was because
3340// http.StatusNotModified was returned.
3341func (c *ProjectsBuildsRetryCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3342	gensupport.SetOptions(c.urlParams_, opts...)
3343	res, err := c.doRequest("json")
3344	if res != nil && res.StatusCode == http.StatusNotModified {
3345		if res.Body != nil {
3346			res.Body.Close()
3347		}
3348		return nil, &googleapi.Error{
3349			Code:   res.StatusCode,
3350			Header: res.Header,
3351		}
3352	}
3353	if err != nil {
3354		return nil, err
3355	}
3356	defer googleapi.CloseBody(res)
3357	if err := googleapi.CheckResponse(res); err != nil {
3358		return nil, err
3359	}
3360	ret := &Operation{
3361		ServerResponse: googleapi.ServerResponse{
3362			Header:         res.Header,
3363			HTTPStatusCode: res.StatusCode,
3364		},
3365	}
3366	target := &ret
3367	if err := gensupport.DecodeResponse(target, res); err != nil {
3368		return nil, err
3369	}
3370	return ret, nil
3371	// {
3372	//   "description": "Creates a new build based on the specified build. This method creates a new build using the original build request, which may or may not result in an identical build. For triggered builds: * Triggered builds resolve to a precise revision; therefore a retry of a triggered build will result in a build that uses the same revision. For non-triggered builds that specify `RepoSource`: * If the original build built from the tip of a branch, the retried build will build from the tip of that branch, which may not be the same revision as the original build. * If the original build specified a commit sha or revision ID, the retried build will use the identical source. For builds that specify `StorageSource`: * If the original build pulled source from Google Cloud Storage without specifying the generation of the object, the new build will use the current object, which may be different from the original build source. * If the original build pulled source from Cloud Storage and specified the generation of the object, the new build will attempt to use the same object, which may or may not be available depending on the bucket's lifecycle management settings.",
3373	//   "flatPath": "v1/projects/{projectId}/builds/{id}:retry",
3374	//   "httpMethod": "POST",
3375	//   "id": "cloudbuild.projects.builds.retry",
3376	//   "parameterOrder": [
3377	//     "projectId",
3378	//     "id"
3379	//   ],
3380	//   "parameters": {
3381	//     "id": {
3382	//       "description": "Required. Build ID of the original build.",
3383	//       "location": "path",
3384	//       "required": true,
3385	//       "type": "string"
3386	//     },
3387	//     "projectId": {
3388	//       "description": "Required. ID of the project.",
3389	//       "location": "path",
3390	//       "required": true,
3391	//       "type": "string"
3392	//     }
3393	//   },
3394	//   "path": "v1/projects/{projectId}/builds/{id}:retry",
3395	//   "request": {
3396	//     "$ref": "RetryBuildRequest"
3397	//   },
3398	//   "response": {
3399	//     "$ref": "Operation"
3400	//   },
3401	//   "scopes": [
3402	//     "https://www.googleapis.com/auth/cloud-platform"
3403	//   ]
3404	// }
3405
3406}
3407
3408// method id "cloudbuild.projects.locations.builds.cancel":
3409
3410type ProjectsLocationsBuildsCancelCall struct {
3411	s                  *Service
3412	name               string
3413	cancelbuildrequest *CancelBuildRequest
3414	urlParams_         gensupport.URLParams
3415	ctx_               context.Context
3416	header_            http.Header
3417}
3418
3419// Cancel: Cancels a build in progress.
3420func (r *ProjectsLocationsBuildsService) Cancel(name string, cancelbuildrequest *CancelBuildRequest) *ProjectsLocationsBuildsCancelCall {
3421	c := &ProjectsLocationsBuildsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3422	c.name = name
3423	c.cancelbuildrequest = cancelbuildrequest
3424	return c
3425}
3426
3427// Fields allows partial responses to be retrieved. See
3428// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3429// for more information.
3430func (c *ProjectsLocationsBuildsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsBuildsCancelCall {
3431	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3432	return c
3433}
3434
3435// Context sets the context to be used in this call's Do method. Any
3436// pending HTTP request will be aborted if the provided context is
3437// canceled.
3438func (c *ProjectsLocationsBuildsCancelCall) Context(ctx context.Context) *ProjectsLocationsBuildsCancelCall {
3439	c.ctx_ = ctx
3440	return c
3441}
3442
3443// Header returns an http.Header that can be modified by the caller to
3444// add HTTP headers to the request.
3445func (c *ProjectsLocationsBuildsCancelCall) Header() http.Header {
3446	if c.header_ == nil {
3447		c.header_ = make(http.Header)
3448	}
3449	return c.header_
3450}
3451
3452func (c *ProjectsLocationsBuildsCancelCall) doRequest(alt string) (*http.Response, error) {
3453	reqHeaders := make(http.Header)
3454	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
3455	for k, v := range c.header_ {
3456		reqHeaders[k] = v
3457	}
3458	reqHeaders.Set("User-Agent", c.s.userAgent())
3459	var body io.Reader = nil
3460	body, err := googleapi.WithoutDataWrapper.JSONReader(c.cancelbuildrequest)
3461	if err != nil {
3462		return nil, err
3463	}
3464	reqHeaders.Set("Content-Type", "application/json")
3465	c.urlParams_.Set("alt", alt)
3466	c.urlParams_.Set("prettyPrint", "false")
3467	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
3468	urls += "?" + c.urlParams_.Encode()
3469	req, err := http.NewRequest("POST", urls, body)
3470	if err != nil {
3471		return nil, err
3472	}
3473	req.Header = reqHeaders
3474	googleapi.Expand(req.URL, map[string]string{
3475		"name": c.name,
3476	})
3477	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3478}
3479
3480// Do executes the "cloudbuild.projects.locations.builds.cancel" call.
3481// Exactly one of *Build or error will be non-nil. Any non-2xx status
3482// code is an error. Response headers are in either
3483// *Build.ServerResponse.Header or (if a response was returned at all)
3484// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
3485// check whether the returned error was because http.StatusNotModified
3486// was returned.
3487func (c *ProjectsLocationsBuildsCancelCall) Do(opts ...googleapi.CallOption) (*Build, error) {
3488	gensupport.SetOptions(c.urlParams_, opts...)
3489	res, err := c.doRequest("json")
3490	if res != nil && res.StatusCode == http.StatusNotModified {
3491		if res.Body != nil {
3492			res.Body.Close()
3493		}
3494		return nil, &googleapi.Error{
3495			Code:   res.StatusCode,
3496			Header: res.Header,
3497		}
3498	}
3499	if err != nil {
3500		return nil, err
3501	}
3502	defer googleapi.CloseBody(res)
3503	if err := googleapi.CheckResponse(res); err != nil {
3504		return nil, err
3505	}
3506	ret := &Build{
3507		ServerResponse: googleapi.ServerResponse{
3508			Header:         res.Header,
3509			HTTPStatusCode: res.StatusCode,
3510		},
3511	}
3512	target := &ret
3513	if err := gensupport.DecodeResponse(target, res); err != nil {
3514		return nil, err
3515	}
3516	return ret, nil
3517	// {
3518	//   "description": "Cancels a build in progress.",
3519	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/builds/{buildsId}:cancel",
3520	//   "httpMethod": "POST",
3521	//   "id": "cloudbuild.projects.locations.builds.cancel",
3522	//   "parameterOrder": [
3523	//     "name"
3524	//   ],
3525	//   "parameters": {
3526	//     "name": {
3527	//       "description": "The name of the `Build` to cancel. Format: `projects/{project}/locations/{location}/builds/{build}`",
3528	//       "location": "path",
3529	//       "pattern": "^projects/[^/]+/locations/[^/]+/builds/[^/]+$",
3530	//       "required": true,
3531	//       "type": "string"
3532	//     }
3533	//   },
3534	//   "path": "v1/{+name}:cancel",
3535	//   "request": {
3536	//     "$ref": "CancelBuildRequest"
3537	//   },
3538	//   "response": {
3539	//     "$ref": "Build"
3540	//   },
3541	//   "scopes": [
3542	//     "https://www.googleapis.com/auth/cloud-platform"
3543	//   ]
3544	// }
3545
3546}
3547
3548// method id "cloudbuild.projects.locations.builds.create":
3549
3550type ProjectsLocationsBuildsCreateCall struct {
3551	s          *Service
3552	parent     string
3553	build      *Build
3554	urlParams_ gensupport.URLParams
3555	ctx_       context.Context
3556	header_    http.Header
3557}
3558
3559// Create: Starts a build with the specified configuration. This method
3560// returns a long-running `Operation`, which includes the build ID. Pass
3561// the build ID to `GetBuild` to determine the build status (such as
3562// `SUCCESS` or `FAILURE`).
3563func (r *ProjectsLocationsBuildsService) Create(parent string, build *Build) *ProjectsLocationsBuildsCreateCall {
3564	c := &ProjectsLocationsBuildsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3565	c.parent = parent
3566	c.build = build
3567	return c
3568}
3569
3570// ProjectId sets the optional parameter "projectId": Required. ID of
3571// the project.
3572func (c *ProjectsLocationsBuildsCreateCall) ProjectId(projectId string) *ProjectsLocationsBuildsCreateCall {
3573	c.urlParams_.Set("projectId", projectId)
3574	return c
3575}
3576
3577// Fields allows partial responses to be retrieved. See
3578// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3579// for more information.
3580func (c *ProjectsLocationsBuildsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsBuildsCreateCall {
3581	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3582	return c
3583}
3584
3585// Context sets the context to be used in this call's Do method. Any
3586// pending HTTP request will be aborted if the provided context is
3587// canceled.
3588func (c *ProjectsLocationsBuildsCreateCall) Context(ctx context.Context) *ProjectsLocationsBuildsCreateCall {
3589	c.ctx_ = ctx
3590	return c
3591}
3592
3593// Header returns an http.Header that can be modified by the caller to
3594// add HTTP headers to the request.
3595func (c *ProjectsLocationsBuildsCreateCall) Header() http.Header {
3596	if c.header_ == nil {
3597		c.header_ = make(http.Header)
3598	}
3599	return c.header_
3600}
3601
3602func (c *ProjectsLocationsBuildsCreateCall) doRequest(alt string) (*http.Response, error) {
3603	reqHeaders := make(http.Header)
3604	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
3605	for k, v := range c.header_ {
3606		reqHeaders[k] = v
3607	}
3608	reqHeaders.Set("User-Agent", c.s.userAgent())
3609	var body io.Reader = nil
3610	body, err := googleapi.WithoutDataWrapper.JSONReader(c.build)
3611	if err != nil {
3612		return nil, err
3613	}
3614	reqHeaders.Set("Content-Type", "application/json")
3615	c.urlParams_.Set("alt", alt)
3616	c.urlParams_.Set("prettyPrint", "false")
3617	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/builds")
3618	urls += "?" + c.urlParams_.Encode()
3619	req, err := http.NewRequest("POST", urls, body)
3620	if err != nil {
3621		return nil, err
3622	}
3623	req.Header = reqHeaders
3624	googleapi.Expand(req.URL, map[string]string{
3625		"parent": c.parent,
3626	})
3627	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3628}
3629
3630// Do executes the "cloudbuild.projects.locations.builds.create" call.
3631// Exactly one of *Operation or error will be non-nil. Any non-2xx
3632// status code is an error. Response headers are in either
3633// *Operation.ServerResponse.Header or (if a response was returned at
3634// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
3635// to check whether the returned error was because
3636// http.StatusNotModified was returned.
3637func (c *ProjectsLocationsBuildsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3638	gensupport.SetOptions(c.urlParams_, opts...)
3639	res, err := c.doRequest("json")
3640	if res != nil && res.StatusCode == http.StatusNotModified {
3641		if res.Body != nil {
3642			res.Body.Close()
3643		}
3644		return nil, &googleapi.Error{
3645			Code:   res.StatusCode,
3646			Header: res.Header,
3647		}
3648	}
3649	if err != nil {
3650		return nil, err
3651	}
3652	defer googleapi.CloseBody(res)
3653	if err := googleapi.CheckResponse(res); err != nil {
3654		return nil, err
3655	}
3656	ret := &Operation{
3657		ServerResponse: googleapi.ServerResponse{
3658			Header:         res.Header,
3659			HTTPStatusCode: res.StatusCode,
3660		},
3661	}
3662	target := &ret
3663	if err := gensupport.DecodeResponse(target, res); err != nil {
3664		return nil, err
3665	}
3666	return ret, nil
3667	// {
3668	//   "description": "Starts a build with the specified configuration. This method returns a long-running `Operation`, which includes the build ID. Pass the build ID to `GetBuild` to determine the build status (such as `SUCCESS` or `FAILURE`).",
3669	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/builds",
3670	//   "httpMethod": "POST",
3671	//   "id": "cloudbuild.projects.locations.builds.create",
3672	//   "parameterOrder": [
3673	//     "parent"
3674	//   ],
3675	//   "parameters": {
3676	//     "parent": {
3677	//       "description": "The parent resource where this build will be created. Format: `projects/{project}/locations/{location}`",
3678	//       "location": "path",
3679	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
3680	//       "required": true,
3681	//       "type": "string"
3682	//     },
3683	//     "projectId": {
3684	//       "description": "Required. ID of the project.",
3685	//       "location": "query",
3686	//       "type": "string"
3687	//     }
3688	//   },
3689	//   "path": "v1/{+parent}/builds",
3690	//   "request": {
3691	//     "$ref": "Build"
3692	//   },
3693	//   "response": {
3694	//     "$ref": "Operation"
3695	//   },
3696	//   "scopes": [
3697	//     "https://www.googleapis.com/auth/cloud-platform"
3698	//   ]
3699	// }
3700
3701}
3702
3703// method id "cloudbuild.projects.locations.builds.get":
3704
3705type ProjectsLocationsBuildsGetCall struct {
3706	s            *Service
3707	name         string
3708	urlParams_   gensupport.URLParams
3709	ifNoneMatch_ string
3710	ctx_         context.Context
3711	header_      http.Header
3712}
3713
3714// Get: Returns information about a previously requested build. The
3715// `Build` that is returned includes its status (such as `SUCCESS`,
3716// `FAILURE`, or `WORKING`), and timing information.
3717func (r *ProjectsLocationsBuildsService) Get(name string) *ProjectsLocationsBuildsGetCall {
3718	c := &ProjectsLocationsBuildsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3719	c.name = name
3720	return c
3721}
3722
3723// Id sets the optional parameter "id": Required. ID of the build.
3724func (c *ProjectsLocationsBuildsGetCall) Id(id string) *ProjectsLocationsBuildsGetCall {
3725	c.urlParams_.Set("id", id)
3726	return c
3727}
3728
3729// ProjectId sets the optional parameter "projectId": Required. ID of
3730// the project.
3731func (c *ProjectsLocationsBuildsGetCall) ProjectId(projectId string) *ProjectsLocationsBuildsGetCall {
3732	c.urlParams_.Set("projectId", projectId)
3733	return c
3734}
3735
3736// Fields allows partial responses to be retrieved. See
3737// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3738// for more information.
3739func (c *ProjectsLocationsBuildsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsBuildsGetCall {
3740	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3741	return c
3742}
3743
3744// IfNoneMatch sets the optional parameter which makes the operation
3745// fail if the object's ETag matches the given value. This is useful for
3746// getting updates only after the object has changed since the last
3747// request. Use googleapi.IsNotModified to check whether the response
3748// error from Do is the result of In-None-Match.
3749func (c *ProjectsLocationsBuildsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsBuildsGetCall {
3750	c.ifNoneMatch_ = entityTag
3751	return c
3752}
3753
3754// Context sets the context to be used in this call's Do method. Any
3755// pending HTTP request will be aborted if the provided context is
3756// canceled.
3757func (c *ProjectsLocationsBuildsGetCall) Context(ctx context.Context) *ProjectsLocationsBuildsGetCall {
3758	c.ctx_ = ctx
3759	return c
3760}
3761
3762// Header returns an http.Header that can be modified by the caller to
3763// add HTTP headers to the request.
3764func (c *ProjectsLocationsBuildsGetCall) Header() http.Header {
3765	if c.header_ == nil {
3766		c.header_ = make(http.Header)
3767	}
3768	return c.header_
3769}
3770
3771func (c *ProjectsLocationsBuildsGetCall) doRequest(alt string) (*http.Response, error) {
3772	reqHeaders := make(http.Header)
3773	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
3774	for k, v := range c.header_ {
3775		reqHeaders[k] = v
3776	}
3777	reqHeaders.Set("User-Agent", c.s.userAgent())
3778	if c.ifNoneMatch_ != "" {
3779		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3780	}
3781	var body io.Reader = nil
3782	c.urlParams_.Set("alt", alt)
3783	c.urlParams_.Set("prettyPrint", "false")
3784	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
3785	urls += "?" + c.urlParams_.Encode()
3786	req, err := http.NewRequest("GET", urls, body)
3787	if err != nil {
3788		return nil, err
3789	}
3790	req.Header = reqHeaders
3791	googleapi.Expand(req.URL, map[string]string{
3792		"name": c.name,
3793	})
3794	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3795}
3796
3797// Do executes the "cloudbuild.projects.locations.builds.get" call.
3798// Exactly one of *Build or error will be non-nil. Any non-2xx status
3799// code is an error. Response headers are in either
3800// *Build.ServerResponse.Header or (if a response was returned at all)
3801// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
3802// check whether the returned error was because http.StatusNotModified
3803// was returned.
3804func (c *ProjectsLocationsBuildsGetCall) Do(opts ...googleapi.CallOption) (*Build, error) {
3805	gensupport.SetOptions(c.urlParams_, opts...)
3806	res, err := c.doRequest("json")
3807	if res != nil && res.StatusCode == http.StatusNotModified {
3808		if res.Body != nil {
3809			res.Body.Close()
3810		}
3811		return nil, &googleapi.Error{
3812			Code:   res.StatusCode,
3813			Header: res.Header,
3814		}
3815	}
3816	if err != nil {
3817		return nil, err
3818	}
3819	defer googleapi.CloseBody(res)
3820	if err := googleapi.CheckResponse(res); err != nil {
3821		return nil, err
3822	}
3823	ret := &Build{
3824		ServerResponse: googleapi.ServerResponse{
3825			Header:         res.Header,
3826			HTTPStatusCode: res.StatusCode,
3827		},
3828	}
3829	target := &ret
3830	if err := gensupport.DecodeResponse(target, res); err != nil {
3831		return nil, err
3832	}
3833	return ret, nil
3834	// {
3835	//   "description": "Returns information about a previously requested build. The `Build` that is returned includes its status (such as `SUCCESS`, `FAILURE`, or `WORKING`), and timing information.",
3836	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/builds/{buildsId}",
3837	//   "httpMethod": "GET",
3838	//   "id": "cloudbuild.projects.locations.builds.get",
3839	//   "parameterOrder": [
3840	//     "name"
3841	//   ],
3842	//   "parameters": {
3843	//     "id": {
3844	//       "description": "Required. ID of the build.",
3845	//       "location": "query",
3846	//       "type": "string"
3847	//     },
3848	//     "name": {
3849	//       "description": "The name of the `Build` to retrieve. Format: `projects/{project}/locations/{location}/builds/{build}`",
3850	//       "location": "path",
3851	//       "pattern": "^projects/[^/]+/locations/[^/]+/builds/[^/]+$",
3852	//       "required": true,
3853	//       "type": "string"
3854	//     },
3855	//     "projectId": {
3856	//       "description": "Required. ID of the project.",
3857	//       "location": "query",
3858	//       "type": "string"
3859	//     }
3860	//   },
3861	//   "path": "v1/{+name}",
3862	//   "response": {
3863	//     "$ref": "Build"
3864	//   },
3865	//   "scopes": [
3866	//     "https://www.googleapis.com/auth/cloud-platform"
3867	//   ]
3868	// }
3869
3870}
3871
3872// method id "cloudbuild.projects.locations.builds.list":
3873
3874type ProjectsLocationsBuildsListCall struct {
3875	s            *Service
3876	parent       string
3877	urlParams_   gensupport.URLParams
3878	ifNoneMatch_ string
3879	ctx_         context.Context
3880	header_      http.Header
3881}
3882
3883// List: Lists previously requested builds. Previously requested builds
3884// may still be in-progress, or may have finished successfully or
3885// unsuccessfully.
3886func (r *ProjectsLocationsBuildsService) List(parent string) *ProjectsLocationsBuildsListCall {
3887	c := &ProjectsLocationsBuildsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3888	c.parent = parent
3889	return c
3890}
3891
3892// Filter sets the optional parameter "filter": The raw filter text to
3893// constrain the results.
3894func (c *ProjectsLocationsBuildsListCall) Filter(filter string) *ProjectsLocationsBuildsListCall {
3895	c.urlParams_.Set("filter", filter)
3896	return c
3897}
3898
3899// PageSize sets the optional parameter "pageSize": Number of results to
3900// return in the list.
3901func (c *ProjectsLocationsBuildsListCall) PageSize(pageSize int64) *ProjectsLocationsBuildsListCall {
3902	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3903	return c
3904}
3905
3906// PageToken sets the optional parameter "pageToken": The page token for
3907// the next page of Builds. If unspecified, the first page of results is
3908// returned. If the token is rejected for any reason, INVALID_ARGUMENT
3909// will be thrown. In this case, the token should be discarded, and
3910// pagination should be restarted from the first page of results. See
3911// https://google.aip.dev/158 for more.
3912func (c *ProjectsLocationsBuildsListCall) PageToken(pageToken string) *ProjectsLocationsBuildsListCall {
3913	c.urlParams_.Set("pageToken", pageToken)
3914	return c
3915}
3916
3917// ProjectId sets the optional parameter "projectId": Required. ID of
3918// the project.
3919func (c *ProjectsLocationsBuildsListCall) ProjectId(projectId string) *ProjectsLocationsBuildsListCall {
3920	c.urlParams_.Set("projectId", projectId)
3921	return c
3922}
3923
3924// Fields allows partial responses to be retrieved. See
3925// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3926// for more information.
3927func (c *ProjectsLocationsBuildsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBuildsListCall {
3928	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3929	return c
3930}
3931
3932// IfNoneMatch sets the optional parameter which makes the operation
3933// fail if the object's ETag matches the given value. This is useful for
3934// getting updates only after the object has changed since the last
3935// request. Use googleapi.IsNotModified to check whether the response
3936// error from Do is the result of In-None-Match.
3937func (c *ProjectsLocationsBuildsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBuildsListCall {
3938	c.ifNoneMatch_ = entityTag
3939	return c
3940}
3941
3942// Context sets the context to be used in this call's Do method. Any
3943// pending HTTP request will be aborted if the provided context is
3944// canceled.
3945func (c *ProjectsLocationsBuildsListCall) Context(ctx context.Context) *ProjectsLocationsBuildsListCall {
3946	c.ctx_ = ctx
3947	return c
3948}
3949
3950// Header returns an http.Header that can be modified by the caller to
3951// add HTTP headers to the request.
3952func (c *ProjectsLocationsBuildsListCall) Header() http.Header {
3953	if c.header_ == nil {
3954		c.header_ = make(http.Header)
3955	}
3956	return c.header_
3957}
3958
3959func (c *ProjectsLocationsBuildsListCall) doRequest(alt string) (*http.Response, error) {
3960	reqHeaders := make(http.Header)
3961	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
3962	for k, v := range c.header_ {
3963		reqHeaders[k] = v
3964	}
3965	reqHeaders.Set("User-Agent", c.s.userAgent())
3966	if c.ifNoneMatch_ != "" {
3967		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3968	}
3969	var body io.Reader = nil
3970	c.urlParams_.Set("alt", alt)
3971	c.urlParams_.Set("prettyPrint", "false")
3972	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/builds")
3973	urls += "?" + c.urlParams_.Encode()
3974	req, err := http.NewRequest("GET", urls, body)
3975	if err != nil {
3976		return nil, err
3977	}
3978	req.Header = reqHeaders
3979	googleapi.Expand(req.URL, map[string]string{
3980		"parent": c.parent,
3981	})
3982	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3983}
3984
3985// Do executes the "cloudbuild.projects.locations.builds.list" call.
3986// Exactly one of *ListBuildsResponse or error will be non-nil. Any
3987// non-2xx status code is an error. Response headers are in either
3988// *ListBuildsResponse.ServerResponse.Header or (if a response was
3989// returned at all) in error.(*googleapi.Error).Header. Use
3990// googleapi.IsNotModified to check whether the returned error was
3991// because http.StatusNotModified was returned.
3992func (c *ProjectsLocationsBuildsListCall) Do(opts ...googleapi.CallOption) (*ListBuildsResponse, error) {
3993	gensupport.SetOptions(c.urlParams_, opts...)
3994	res, err := c.doRequest("json")
3995	if res != nil && res.StatusCode == http.StatusNotModified {
3996		if res.Body != nil {
3997			res.Body.Close()
3998		}
3999		return nil, &googleapi.Error{
4000			Code:   res.StatusCode,
4001			Header: res.Header,
4002		}
4003	}
4004	if err != nil {
4005		return nil, err
4006	}
4007	defer googleapi.CloseBody(res)
4008	if err := googleapi.CheckResponse(res); err != nil {
4009		return nil, err
4010	}
4011	ret := &ListBuildsResponse{
4012		ServerResponse: googleapi.ServerResponse{
4013			Header:         res.Header,
4014			HTTPStatusCode: res.StatusCode,
4015		},
4016	}
4017	target := &ret
4018	if err := gensupport.DecodeResponse(target, res); err != nil {
4019		return nil, err
4020	}
4021	return ret, nil
4022	// {
4023	//   "description": "Lists previously requested builds. Previously requested builds may still be in-progress, or may have finished successfully or unsuccessfully.",
4024	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/builds",
4025	//   "httpMethod": "GET",
4026	//   "id": "cloudbuild.projects.locations.builds.list",
4027	//   "parameterOrder": [
4028	//     "parent"
4029	//   ],
4030	//   "parameters": {
4031	//     "filter": {
4032	//       "description": "The raw filter text to constrain the results.",
4033	//       "location": "query",
4034	//       "type": "string"
4035	//     },
4036	//     "pageSize": {
4037	//       "description": "Number of results to return in the list.",
4038	//       "format": "int32",
4039	//       "location": "query",
4040	//       "type": "integer"
4041	//     },
4042	//     "pageToken": {
4043	//       "description": "The page token for the next page of Builds. If unspecified, the first page of results is returned. If the token is rejected for any reason, INVALID_ARGUMENT will be thrown. In this case, the token should be discarded, and pagination should be restarted from the first page of results. See https://google.aip.dev/158 for more.",
4044	//       "location": "query",
4045	//       "type": "string"
4046	//     },
4047	//     "parent": {
4048	//       "description": "The parent of the collection of `Builds`. Format: `projects/{project}/locations/location`",
4049	//       "location": "path",
4050	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
4051	//       "required": true,
4052	//       "type": "string"
4053	//     },
4054	//     "projectId": {
4055	//       "description": "Required. ID of the project.",
4056	//       "location": "query",
4057	//       "type": "string"
4058	//     }
4059	//   },
4060	//   "path": "v1/{+parent}/builds",
4061	//   "response": {
4062	//     "$ref": "ListBuildsResponse"
4063	//   },
4064	//   "scopes": [
4065	//     "https://www.googleapis.com/auth/cloud-platform"
4066	//   ]
4067	// }
4068
4069}
4070
4071// Pages invokes f for each page of results.
4072// A non-nil error returned from f will halt the iteration.
4073// The provided context supersedes any context provided to the Context method.
4074func (c *ProjectsLocationsBuildsListCall) Pages(ctx context.Context, f func(*ListBuildsResponse) error) error {
4075	c.ctx_ = ctx
4076	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
4077	for {
4078		x, err := c.Do()
4079		if err != nil {
4080			return err
4081		}
4082		if err := f(x); err != nil {
4083			return err
4084		}
4085		if x.NextPageToken == "" {
4086			return nil
4087		}
4088		c.PageToken(x.NextPageToken)
4089	}
4090}
4091
4092// method id "cloudbuild.projects.locations.builds.retry":
4093
4094type ProjectsLocationsBuildsRetryCall struct {
4095	s                 *Service
4096	name              string
4097	retrybuildrequest *RetryBuildRequest
4098	urlParams_        gensupport.URLParams
4099	ctx_              context.Context
4100	header_           http.Header
4101}
4102
4103// Retry: Creates a new build based on the specified build. This method
4104// creates a new build using the original build request, which may or
4105// may not result in an identical build. For triggered builds: *
4106// Triggered builds resolve to a precise revision; therefore a retry of
4107// a triggered build will result in a build that uses the same revision.
4108// For non-triggered builds that specify `RepoSource`: * If the original
4109// build built from the tip of a branch, the retried build will build
4110// from the tip of that branch, which may not be the same revision as
4111// the original build. * If the original build specified a commit sha or
4112// revision ID, the retried build will use the identical source. For
4113// builds that specify `StorageSource`: * If the original build pulled
4114// source from Google Cloud Storage without specifying the generation of
4115// the object, the new build will use the current object, which may be
4116// different from the original build source. * If the original build
4117// pulled source from Cloud Storage and specified the generation of the
4118// object, the new build will attempt to use the same object, which may
4119// or may not be available depending on the bucket's lifecycle
4120// management settings.
4121func (r *ProjectsLocationsBuildsService) Retry(name string, retrybuildrequest *RetryBuildRequest) *ProjectsLocationsBuildsRetryCall {
4122	c := &ProjectsLocationsBuildsRetryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4123	c.name = name
4124	c.retrybuildrequest = retrybuildrequest
4125	return c
4126}
4127
4128// Fields allows partial responses to be retrieved. See
4129// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4130// for more information.
4131func (c *ProjectsLocationsBuildsRetryCall) Fields(s ...googleapi.Field) *ProjectsLocationsBuildsRetryCall {
4132	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4133	return c
4134}
4135
4136// Context sets the context to be used in this call's Do method. Any
4137// pending HTTP request will be aborted if the provided context is
4138// canceled.
4139func (c *ProjectsLocationsBuildsRetryCall) Context(ctx context.Context) *ProjectsLocationsBuildsRetryCall {
4140	c.ctx_ = ctx
4141	return c
4142}
4143
4144// Header returns an http.Header that can be modified by the caller to
4145// add HTTP headers to the request.
4146func (c *ProjectsLocationsBuildsRetryCall) Header() http.Header {
4147	if c.header_ == nil {
4148		c.header_ = make(http.Header)
4149	}
4150	return c.header_
4151}
4152
4153func (c *ProjectsLocationsBuildsRetryCall) doRequest(alt string) (*http.Response, error) {
4154	reqHeaders := make(http.Header)
4155	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
4156	for k, v := range c.header_ {
4157		reqHeaders[k] = v
4158	}
4159	reqHeaders.Set("User-Agent", c.s.userAgent())
4160	var body io.Reader = nil
4161	body, err := googleapi.WithoutDataWrapper.JSONReader(c.retrybuildrequest)
4162	if err != nil {
4163		return nil, err
4164	}
4165	reqHeaders.Set("Content-Type", "application/json")
4166	c.urlParams_.Set("alt", alt)
4167	c.urlParams_.Set("prettyPrint", "false")
4168	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:retry")
4169	urls += "?" + c.urlParams_.Encode()
4170	req, err := http.NewRequest("POST", urls, body)
4171	if err != nil {
4172		return nil, err
4173	}
4174	req.Header = reqHeaders
4175	googleapi.Expand(req.URL, map[string]string{
4176		"name": c.name,
4177	})
4178	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4179}
4180
4181// Do executes the "cloudbuild.projects.locations.builds.retry" call.
4182// Exactly one of *Operation or error will be non-nil. Any non-2xx
4183// status code is an error. Response headers are in either
4184// *Operation.ServerResponse.Header or (if a response was returned at
4185// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4186// to check whether the returned error was because
4187// http.StatusNotModified was returned.
4188func (c *ProjectsLocationsBuildsRetryCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4189	gensupport.SetOptions(c.urlParams_, opts...)
4190	res, err := c.doRequest("json")
4191	if res != nil && res.StatusCode == http.StatusNotModified {
4192		if res.Body != nil {
4193			res.Body.Close()
4194		}
4195		return nil, &googleapi.Error{
4196			Code:   res.StatusCode,
4197			Header: res.Header,
4198		}
4199	}
4200	if err != nil {
4201		return nil, err
4202	}
4203	defer googleapi.CloseBody(res)
4204	if err := googleapi.CheckResponse(res); err != nil {
4205		return nil, err
4206	}
4207	ret := &Operation{
4208		ServerResponse: googleapi.ServerResponse{
4209			Header:         res.Header,
4210			HTTPStatusCode: res.StatusCode,
4211		},
4212	}
4213	target := &ret
4214	if err := gensupport.DecodeResponse(target, res); err != nil {
4215		return nil, err
4216	}
4217	return ret, nil
4218	// {
4219	//   "description": "Creates a new build based on the specified build. This method creates a new build using the original build request, which may or may not result in an identical build. For triggered builds: * Triggered builds resolve to a precise revision; therefore a retry of a triggered build will result in a build that uses the same revision. For non-triggered builds that specify `RepoSource`: * If the original build built from the tip of a branch, the retried build will build from the tip of that branch, which may not be the same revision as the original build. * If the original build specified a commit sha or revision ID, the retried build will use the identical source. For builds that specify `StorageSource`: * If the original build pulled source from Google Cloud Storage without specifying the generation of the object, the new build will use the current object, which may be different from the original build source. * If the original build pulled source from Cloud Storage and specified the generation of the object, the new build will attempt to use the same object, which may or may not be available depending on the bucket's lifecycle management settings.",
4220	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/builds/{buildsId}:retry",
4221	//   "httpMethod": "POST",
4222	//   "id": "cloudbuild.projects.locations.builds.retry",
4223	//   "parameterOrder": [
4224	//     "name"
4225	//   ],
4226	//   "parameters": {
4227	//     "name": {
4228	//       "description": "The name of the `Build` to retry. Format: `projects/{project}/locations/{location}/builds/{build}`",
4229	//       "location": "path",
4230	//       "pattern": "^projects/[^/]+/locations/[^/]+/builds/[^/]+$",
4231	//       "required": true,
4232	//       "type": "string"
4233	//     }
4234	//   },
4235	//   "path": "v1/{+name}:retry",
4236	//   "request": {
4237	//     "$ref": "RetryBuildRequest"
4238	//   },
4239	//   "response": {
4240	//     "$ref": "Operation"
4241	//   },
4242	//   "scopes": [
4243	//     "https://www.googleapis.com/auth/cloud-platform"
4244	//   ]
4245	// }
4246
4247}
4248
4249// method id "cloudbuild.projects.locations.operations.cancel":
4250
4251type ProjectsLocationsOperationsCancelCall struct {
4252	s                      *Service
4253	name                   string
4254	canceloperationrequest *CancelOperationRequest
4255	urlParams_             gensupport.URLParams
4256	ctx_                   context.Context
4257	header_                http.Header
4258}
4259
4260// Cancel: Starts asynchronous cancellation on a long-running operation.
4261// The server makes a best effort to cancel the operation, but success
4262// is not guaranteed. If the server doesn't support this method, it
4263// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use
4264// Operations.GetOperation or other methods to check whether the
4265// cancellation succeeded or whether the operation completed despite
4266// cancellation. On successful cancellation, the operation is not
4267// deleted; instead, it becomes an operation with an Operation.error
4268// value with a google.rpc.Status.code of 1, corresponding to
4269// `Code.CANCELLED`.
4270func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall {
4271	c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4272	c.name = name
4273	c.canceloperationrequest = canceloperationrequest
4274	return c
4275}
4276
4277// Fields allows partial responses to be retrieved. See
4278// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4279// for more information.
4280func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
4281	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4282	return c
4283}
4284
4285// Context sets the context to be used in this call's Do method. Any
4286// pending HTTP request will be aborted if the provided context is
4287// canceled.
4288func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
4289	c.ctx_ = ctx
4290	return c
4291}
4292
4293// Header returns an http.Header that can be modified by the caller to
4294// add HTTP headers to the request.
4295func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
4296	if c.header_ == nil {
4297		c.header_ = make(http.Header)
4298	}
4299	return c.header_
4300}
4301
4302func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
4303	reqHeaders := make(http.Header)
4304	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
4305	for k, v := range c.header_ {
4306		reqHeaders[k] = v
4307	}
4308	reqHeaders.Set("User-Agent", c.s.userAgent())
4309	var body io.Reader = nil
4310	body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
4311	if err != nil {
4312		return nil, err
4313	}
4314	reqHeaders.Set("Content-Type", "application/json")
4315	c.urlParams_.Set("alt", alt)
4316	c.urlParams_.Set("prettyPrint", "false")
4317	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
4318	urls += "?" + c.urlParams_.Encode()
4319	req, err := http.NewRequest("POST", urls, body)
4320	if err != nil {
4321		return nil, err
4322	}
4323	req.Header = reqHeaders
4324	googleapi.Expand(req.URL, map[string]string{
4325		"name": c.name,
4326	})
4327	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4328}
4329
4330// Do executes the "cloudbuild.projects.locations.operations.cancel" call.
4331// Exactly one of *Empty or error will be non-nil. Any non-2xx status
4332// code is an error. Response headers are in either
4333// *Empty.ServerResponse.Header or (if a response was returned at all)
4334// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
4335// check whether the returned error was because http.StatusNotModified
4336// was returned.
4337func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
4338	gensupport.SetOptions(c.urlParams_, opts...)
4339	res, err := c.doRequest("json")
4340	if res != nil && res.StatusCode == http.StatusNotModified {
4341		if res.Body != nil {
4342			res.Body.Close()
4343		}
4344		return nil, &googleapi.Error{
4345			Code:   res.StatusCode,
4346			Header: res.Header,
4347		}
4348	}
4349	if err != nil {
4350		return nil, err
4351	}
4352	defer googleapi.CloseBody(res)
4353	if err := googleapi.CheckResponse(res); err != nil {
4354		return nil, err
4355	}
4356	ret := &Empty{
4357		ServerResponse: googleapi.ServerResponse{
4358			Header:         res.Header,
4359			HTTPStatusCode: res.StatusCode,
4360		},
4361	}
4362	target := &ret
4363	if err := gensupport.DecodeResponse(target, res); err != nil {
4364		return nil, err
4365	}
4366	return ret, nil
4367	// {
4368	//   "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`.",
4369	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel",
4370	//   "httpMethod": "POST",
4371	//   "id": "cloudbuild.projects.locations.operations.cancel",
4372	//   "parameterOrder": [
4373	//     "name"
4374	//   ],
4375	//   "parameters": {
4376	//     "name": {
4377	//       "description": "The name of the operation resource to be cancelled.",
4378	//       "location": "path",
4379	//       "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$",
4380	//       "required": true,
4381	//       "type": "string"
4382	//     }
4383	//   },
4384	//   "path": "v1/{+name}:cancel",
4385	//   "request": {
4386	//     "$ref": "CancelOperationRequest"
4387	//   },
4388	//   "response": {
4389	//     "$ref": "Empty"
4390	//   },
4391	//   "scopes": [
4392	//     "https://www.googleapis.com/auth/cloud-platform"
4393	//   ]
4394	// }
4395
4396}
4397
4398// method id "cloudbuild.projects.locations.operations.get":
4399
4400type ProjectsLocationsOperationsGetCall struct {
4401	s            *Service
4402	name         string
4403	urlParams_   gensupport.URLParams
4404	ifNoneMatch_ string
4405	ctx_         context.Context
4406	header_      http.Header
4407}
4408
4409// Get: Gets the latest state of a long-running operation. Clients can
4410// use this method to poll the operation result at intervals as
4411// recommended by the API service.
4412func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
4413	c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4414	c.name = name
4415	return c
4416}
4417
4418// Fields allows partial responses to be retrieved. See
4419// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4420// for more information.
4421func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
4422	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4423	return c
4424}
4425
4426// IfNoneMatch sets the optional parameter which makes the operation
4427// fail if the object's ETag matches the given value. This is useful for
4428// getting updates only after the object has changed since the last
4429// request. Use googleapi.IsNotModified to check whether the response
4430// error from Do is the result of In-None-Match.
4431func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
4432	c.ifNoneMatch_ = entityTag
4433	return c
4434}
4435
4436// Context sets the context to be used in this call's Do method. Any
4437// pending HTTP request will be aborted if the provided context is
4438// canceled.
4439func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
4440	c.ctx_ = ctx
4441	return c
4442}
4443
4444// Header returns an http.Header that can be modified by the caller to
4445// add HTTP headers to the request.
4446func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
4447	if c.header_ == nil {
4448		c.header_ = make(http.Header)
4449	}
4450	return c.header_
4451}
4452
4453func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
4454	reqHeaders := make(http.Header)
4455	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
4456	for k, v := range c.header_ {
4457		reqHeaders[k] = v
4458	}
4459	reqHeaders.Set("User-Agent", c.s.userAgent())
4460	if c.ifNoneMatch_ != "" {
4461		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4462	}
4463	var body io.Reader = nil
4464	c.urlParams_.Set("alt", alt)
4465	c.urlParams_.Set("prettyPrint", "false")
4466	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4467	urls += "?" + c.urlParams_.Encode()
4468	req, err := http.NewRequest("GET", urls, body)
4469	if err != nil {
4470		return nil, err
4471	}
4472	req.Header = reqHeaders
4473	googleapi.Expand(req.URL, map[string]string{
4474		"name": c.name,
4475	})
4476	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4477}
4478
4479// Do executes the "cloudbuild.projects.locations.operations.get" call.
4480// Exactly one of *Operation or error will be non-nil. Any non-2xx
4481// status code is an error. Response headers are in either
4482// *Operation.ServerResponse.Header or (if a response was returned at
4483// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4484// to check whether the returned error was because
4485// http.StatusNotModified was returned.
4486func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4487	gensupport.SetOptions(c.urlParams_, opts...)
4488	res, err := c.doRequest("json")
4489	if res != nil && res.StatusCode == http.StatusNotModified {
4490		if res.Body != nil {
4491			res.Body.Close()
4492		}
4493		return nil, &googleapi.Error{
4494			Code:   res.StatusCode,
4495			Header: res.Header,
4496		}
4497	}
4498	if err != nil {
4499		return nil, err
4500	}
4501	defer googleapi.CloseBody(res)
4502	if err := googleapi.CheckResponse(res); err != nil {
4503		return nil, err
4504	}
4505	ret := &Operation{
4506		ServerResponse: googleapi.ServerResponse{
4507			Header:         res.Header,
4508			HTTPStatusCode: res.StatusCode,
4509		},
4510	}
4511	target := &ret
4512	if err := gensupport.DecodeResponse(target, res); err != nil {
4513		return nil, err
4514	}
4515	return ret, nil
4516	// {
4517	//   "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.",
4518	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}",
4519	//   "httpMethod": "GET",
4520	//   "id": "cloudbuild.projects.locations.operations.get",
4521	//   "parameterOrder": [
4522	//     "name"
4523	//   ],
4524	//   "parameters": {
4525	//     "name": {
4526	//       "description": "The name of the operation resource.",
4527	//       "location": "path",
4528	//       "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$",
4529	//       "required": true,
4530	//       "type": "string"
4531	//     }
4532	//   },
4533	//   "path": "v1/{+name}",
4534	//   "response": {
4535	//     "$ref": "Operation"
4536	//   },
4537	//   "scopes": [
4538	//     "https://www.googleapis.com/auth/cloud-platform"
4539	//   ]
4540	// }
4541
4542}
4543
4544// method id "cloudbuild.projects.triggers.create":
4545
4546type ProjectsTriggersCreateCall struct {
4547	s            *Service
4548	projectId    string
4549	buildtrigger *BuildTrigger
4550	urlParams_   gensupport.URLParams
4551	ctx_         context.Context
4552	header_      http.Header
4553}
4554
4555// Create: Creates a new `BuildTrigger`. This API is experimental.
4556func (r *ProjectsTriggersService) Create(projectId string, buildtrigger *BuildTrigger) *ProjectsTriggersCreateCall {
4557	c := &ProjectsTriggersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4558	c.projectId = projectId
4559	c.buildtrigger = buildtrigger
4560	return c
4561}
4562
4563// Fields allows partial responses to be retrieved. See
4564// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4565// for more information.
4566func (c *ProjectsTriggersCreateCall) Fields(s ...googleapi.Field) *ProjectsTriggersCreateCall {
4567	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4568	return c
4569}
4570
4571// Context sets the context to be used in this call's Do method. Any
4572// pending HTTP request will be aborted if the provided context is
4573// canceled.
4574func (c *ProjectsTriggersCreateCall) Context(ctx context.Context) *ProjectsTriggersCreateCall {
4575	c.ctx_ = ctx
4576	return c
4577}
4578
4579// Header returns an http.Header that can be modified by the caller to
4580// add HTTP headers to the request.
4581func (c *ProjectsTriggersCreateCall) Header() http.Header {
4582	if c.header_ == nil {
4583		c.header_ = make(http.Header)
4584	}
4585	return c.header_
4586}
4587
4588func (c *ProjectsTriggersCreateCall) doRequest(alt string) (*http.Response, error) {
4589	reqHeaders := make(http.Header)
4590	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
4591	for k, v := range c.header_ {
4592		reqHeaders[k] = v
4593	}
4594	reqHeaders.Set("User-Agent", c.s.userAgent())
4595	var body io.Reader = nil
4596	body, err := googleapi.WithoutDataWrapper.JSONReader(c.buildtrigger)
4597	if err != nil {
4598		return nil, err
4599	}
4600	reqHeaders.Set("Content-Type", "application/json")
4601	c.urlParams_.Set("alt", alt)
4602	c.urlParams_.Set("prettyPrint", "false")
4603	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/triggers")
4604	urls += "?" + c.urlParams_.Encode()
4605	req, err := http.NewRequest("POST", urls, body)
4606	if err != nil {
4607		return nil, err
4608	}
4609	req.Header = reqHeaders
4610	googleapi.Expand(req.URL, map[string]string{
4611		"projectId": c.projectId,
4612	})
4613	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4614}
4615
4616// Do executes the "cloudbuild.projects.triggers.create" call.
4617// Exactly one of *BuildTrigger or error will be non-nil. Any non-2xx
4618// status code is an error. Response headers are in either
4619// *BuildTrigger.ServerResponse.Header or (if a response was returned at
4620// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4621// to check whether the returned error was because
4622// http.StatusNotModified was returned.
4623func (c *ProjectsTriggersCreateCall) Do(opts ...googleapi.CallOption) (*BuildTrigger, error) {
4624	gensupport.SetOptions(c.urlParams_, opts...)
4625	res, err := c.doRequest("json")
4626	if res != nil && res.StatusCode == http.StatusNotModified {
4627		if res.Body != nil {
4628			res.Body.Close()
4629		}
4630		return nil, &googleapi.Error{
4631			Code:   res.StatusCode,
4632			Header: res.Header,
4633		}
4634	}
4635	if err != nil {
4636		return nil, err
4637	}
4638	defer googleapi.CloseBody(res)
4639	if err := googleapi.CheckResponse(res); err != nil {
4640		return nil, err
4641	}
4642	ret := &BuildTrigger{
4643		ServerResponse: googleapi.ServerResponse{
4644			Header:         res.Header,
4645			HTTPStatusCode: res.StatusCode,
4646		},
4647	}
4648	target := &ret
4649	if err := gensupport.DecodeResponse(target, res); err != nil {
4650		return nil, err
4651	}
4652	return ret, nil
4653	// {
4654	//   "description": "Creates a new `BuildTrigger`. This API is experimental.",
4655	//   "flatPath": "v1/projects/{projectId}/triggers",
4656	//   "httpMethod": "POST",
4657	//   "id": "cloudbuild.projects.triggers.create",
4658	//   "parameterOrder": [
4659	//     "projectId"
4660	//   ],
4661	//   "parameters": {
4662	//     "projectId": {
4663	//       "description": "Required. ID of the project for which to configure automatic builds.",
4664	//       "location": "path",
4665	//       "required": true,
4666	//       "type": "string"
4667	//     }
4668	//   },
4669	//   "path": "v1/projects/{projectId}/triggers",
4670	//   "request": {
4671	//     "$ref": "BuildTrigger"
4672	//   },
4673	//   "response": {
4674	//     "$ref": "BuildTrigger"
4675	//   },
4676	//   "scopes": [
4677	//     "https://www.googleapis.com/auth/cloud-platform"
4678	//   ]
4679	// }
4680
4681}
4682
4683// method id "cloudbuild.projects.triggers.delete":
4684
4685type ProjectsTriggersDeleteCall struct {
4686	s          *Service
4687	projectId  string
4688	triggerId  string
4689	urlParams_ gensupport.URLParams
4690	ctx_       context.Context
4691	header_    http.Header
4692}
4693
4694// Delete: Deletes a `BuildTrigger` by its project ID and trigger ID.
4695// This API is experimental.
4696func (r *ProjectsTriggersService) Delete(projectId string, triggerId string) *ProjectsTriggersDeleteCall {
4697	c := &ProjectsTriggersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4698	c.projectId = projectId
4699	c.triggerId = triggerId
4700	return c
4701}
4702
4703// Fields allows partial responses to be retrieved. See
4704// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4705// for more information.
4706func (c *ProjectsTriggersDeleteCall) Fields(s ...googleapi.Field) *ProjectsTriggersDeleteCall {
4707	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4708	return c
4709}
4710
4711// Context sets the context to be used in this call's Do method. Any
4712// pending HTTP request will be aborted if the provided context is
4713// canceled.
4714func (c *ProjectsTriggersDeleteCall) Context(ctx context.Context) *ProjectsTriggersDeleteCall {
4715	c.ctx_ = ctx
4716	return c
4717}
4718
4719// Header returns an http.Header that can be modified by the caller to
4720// add HTTP headers to the request.
4721func (c *ProjectsTriggersDeleteCall) Header() http.Header {
4722	if c.header_ == nil {
4723		c.header_ = make(http.Header)
4724	}
4725	return c.header_
4726}
4727
4728func (c *ProjectsTriggersDeleteCall) doRequest(alt string) (*http.Response, error) {
4729	reqHeaders := make(http.Header)
4730	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
4731	for k, v := range c.header_ {
4732		reqHeaders[k] = v
4733	}
4734	reqHeaders.Set("User-Agent", c.s.userAgent())
4735	var body io.Reader = nil
4736	c.urlParams_.Set("alt", alt)
4737	c.urlParams_.Set("prettyPrint", "false")
4738	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/triggers/{triggerId}")
4739	urls += "?" + c.urlParams_.Encode()
4740	req, err := http.NewRequest("DELETE", urls, body)
4741	if err != nil {
4742		return nil, err
4743	}
4744	req.Header = reqHeaders
4745	googleapi.Expand(req.URL, map[string]string{
4746		"projectId": c.projectId,
4747		"triggerId": c.triggerId,
4748	})
4749	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4750}
4751
4752// Do executes the "cloudbuild.projects.triggers.delete" call.
4753// Exactly one of *Empty or error will be non-nil. Any non-2xx status
4754// code is an error. Response headers are in either
4755// *Empty.ServerResponse.Header or (if a response was returned at all)
4756// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
4757// check whether the returned error was because http.StatusNotModified
4758// was returned.
4759func (c *ProjectsTriggersDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
4760	gensupport.SetOptions(c.urlParams_, opts...)
4761	res, err := c.doRequest("json")
4762	if res != nil && res.StatusCode == http.StatusNotModified {
4763		if res.Body != nil {
4764			res.Body.Close()
4765		}
4766		return nil, &googleapi.Error{
4767			Code:   res.StatusCode,
4768			Header: res.Header,
4769		}
4770	}
4771	if err != nil {
4772		return nil, err
4773	}
4774	defer googleapi.CloseBody(res)
4775	if err := googleapi.CheckResponse(res); err != nil {
4776		return nil, err
4777	}
4778	ret := &Empty{
4779		ServerResponse: googleapi.ServerResponse{
4780			Header:         res.Header,
4781			HTTPStatusCode: res.StatusCode,
4782		},
4783	}
4784	target := &ret
4785	if err := gensupport.DecodeResponse(target, res); err != nil {
4786		return nil, err
4787	}
4788	return ret, nil
4789	// {
4790	//   "description": "Deletes a `BuildTrigger` by its project ID and trigger ID. This API is experimental.",
4791	//   "flatPath": "v1/projects/{projectId}/triggers/{triggerId}",
4792	//   "httpMethod": "DELETE",
4793	//   "id": "cloudbuild.projects.triggers.delete",
4794	//   "parameterOrder": [
4795	//     "projectId",
4796	//     "triggerId"
4797	//   ],
4798	//   "parameters": {
4799	//     "projectId": {
4800	//       "description": "Required. ID of the project that owns the trigger.",
4801	//       "location": "path",
4802	//       "required": true,
4803	//       "type": "string"
4804	//     },
4805	//     "triggerId": {
4806	//       "description": "Required. ID of the `BuildTrigger` to delete.",
4807	//       "location": "path",
4808	//       "required": true,
4809	//       "type": "string"
4810	//     }
4811	//   },
4812	//   "path": "v1/projects/{projectId}/triggers/{triggerId}",
4813	//   "response": {
4814	//     "$ref": "Empty"
4815	//   },
4816	//   "scopes": [
4817	//     "https://www.googleapis.com/auth/cloud-platform"
4818	//   ]
4819	// }
4820
4821}
4822
4823// method id "cloudbuild.projects.triggers.get":
4824
4825type ProjectsTriggersGetCall struct {
4826	s            *Service
4827	projectId    string
4828	triggerId    string
4829	urlParams_   gensupport.URLParams
4830	ifNoneMatch_ string
4831	ctx_         context.Context
4832	header_      http.Header
4833}
4834
4835// Get: Returns information about a `BuildTrigger`. This API is
4836// experimental.
4837func (r *ProjectsTriggersService) Get(projectId string, triggerId string) *ProjectsTriggersGetCall {
4838	c := &ProjectsTriggersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4839	c.projectId = projectId
4840	c.triggerId = triggerId
4841	return c
4842}
4843
4844// Fields allows partial responses to be retrieved. See
4845// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4846// for more information.
4847func (c *ProjectsTriggersGetCall) Fields(s ...googleapi.Field) *ProjectsTriggersGetCall {
4848	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4849	return c
4850}
4851
4852// IfNoneMatch sets the optional parameter which makes the operation
4853// fail if the object's ETag matches the given value. This is useful for
4854// getting updates only after the object has changed since the last
4855// request. Use googleapi.IsNotModified to check whether the response
4856// error from Do is the result of In-None-Match.
4857func (c *ProjectsTriggersGetCall) IfNoneMatch(entityTag string) *ProjectsTriggersGetCall {
4858	c.ifNoneMatch_ = entityTag
4859	return c
4860}
4861
4862// Context sets the context to be used in this call's Do method. Any
4863// pending HTTP request will be aborted if the provided context is
4864// canceled.
4865func (c *ProjectsTriggersGetCall) Context(ctx context.Context) *ProjectsTriggersGetCall {
4866	c.ctx_ = ctx
4867	return c
4868}
4869
4870// Header returns an http.Header that can be modified by the caller to
4871// add HTTP headers to the request.
4872func (c *ProjectsTriggersGetCall) Header() http.Header {
4873	if c.header_ == nil {
4874		c.header_ = make(http.Header)
4875	}
4876	return c.header_
4877}
4878
4879func (c *ProjectsTriggersGetCall) doRequest(alt string) (*http.Response, error) {
4880	reqHeaders := make(http.Header)
4881	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
4882	for k, v := range c.header_ {
4883		reqHeaders[k] = v
4884	}
4885	reqHeaders.Set("User-Agent", c.s.userAgent())
4886	if c.ifNoneMatch_ != "" {
4887		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4888	}
4889	var body io.Reader = nil
4890	c.urlParams_.Set("alt", alt)
4891	c.urlParams_.Set("prettyPrint", "false")
4892	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/triggers/{triggerId}")
4893	urls += "?" + c.urlParams_.Encode()
4894	req, err := http.NewRequest("GET", urls, body)
4895	if err != nil {
4896		return nil, err
4897	}
4898	req.Header = reqHeaders
4899	googleapi.Expand(req.URL, map[string]string{
4900		"projectId": c.projectId,
4901		"triggerId": c.triggerId,
4902	})
4903	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4904}
4905
4906// Do executes the "cloudbuild.projects.triggers.get" call.
4907// Exactly one of *BuildTrigger or error will be non-nil. Any non-2xx
4908// status code is an error. Response headers are in either
4909// *BuildTrigger.ServerResponse.Header or (if a response was returned at
4910// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4911// to check whether the returned error was because
4912// http.StatusNotModified was returned.
4913func (c *ProjectsTriggersGetCall) Do(opts ...googleapi.CallOption) (*BuildTrigger, error) {
4914	gensupport.SetOptions(c.urlParams_, opts...)
4915	res, err := c.doRequest("json")
4916	if res != nil && res.StatusCode == http.StatusNotModified {
4917		if res.Body != nil {
4918			res.Body.Close()
4919		}
4920		return nil, &googleapi.Error{
4921			Code:   res.StatusCode,
4922			Header: res.Header,
4923		}
4924	}
4925	if err != nil {
4926		return nil, err
4927	}
4928	defer googleapi.CloseBody(res)
4929	if err := googleapi.CheckResponse(res); err != nil {
4930		return nil, err
4931	}
4932	ret := &BuildTrigger{
4933		ServerResponse: googleapi.ServerResponse{
4934			Header:         res.Header,
4935			HTTPStatusCode: res.StatusCode,
4936		},
4937	}
4938	target := &ret
4939	if err := gensupport.DecodeResponse(target, res); err != nil {
4940		return nil, err
4941	}
4942	return ret, nil
4943	// {
4944	//   "description": "Returns information about a `BuildTrigger`. This API is experimental.",
4945	//   "flatPath": "v1/projects/{projectId}/triggers/{triggerId}",
4946	//   "httpMethod": "GET",
4947	//   "id": "cloudbuild.projects.triggers.get",
4948	//   "parameterOrder": [
4949	//     "projectId",
4950	//     "triggerId"
4951	//   ],
4952	//   "parameters": {
4953	//     "projectId": {
4954	//       "description": "Required. ID of the project that owns the trigger.",
4955	//       "location": "path",
4956	//       "required": true,
4957	//       "type": "string"
4958	//     },
4959	//     "triggerId": {
4960	//       "description": "Required. Identifier (`id` or `name`) of the `BuildTrigger` to get.",
4961	//       "location": "path",
4962	//       "required": true,
4963	//       "type": "string"
4964	//     }
4965	//   },
4966	//   "path": "v1/projects/{projectId}/triggers/{triggerId}",
4967	//   "response": {
4968	//     "$ref": "BuildTrigger"
4969	//   },
4970	//   "scopes": [
4971	//     "https://www.googleapis.com/auth/cloud-platform"
4972	//   ]
4973	// }
4974
4975}
4976
4977// method id "cloudbuild.projects.triggers.list":
4978
4979type ProjectsTriggersListCall struct {
4980	s            *Service
4981	projectId    string
4982	urlParams_   gensupport.URLParams
4983	ifNoneMatch_ string
4984	ctx_         context.Context
4985	header_      http.Header
4986}
4987
4988// List: Lists existing `BuildTrigger`s. This API is experimental.
4989func (r *ProjectsTriggersService) List(projectId string) *ProjectsTriggersListCall {
4990	c := &ProjectsTriggersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4991	c.projectId = projectId
4992	return c
4993}
4994
4995// PageSize sets the optional parameter "pageSize": Number of results to
4996// return in the list.
4997func (c *ProjectsTriggersListCall) PageSize(pageSize int64) *ProjectsTriggersListCall {
4998	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4999	return c
5000}
5001
5002// PageToken sets the optional parameter "pageToken": Token to provide
5003// to skip to a particular spot in the list.
5004func (c *ProjectsTriggersListCall) PageToken(pageToken string) *ProjectsTriggersListCall {
5005	c.urlParams_.Set("pageToken", pageToken)
5006	return c
5007}
5008
5009// Fields allows partial responses to be retrieved. See
5010// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5011// for more information.
5012func (c *ProjectsTriggersListCall) Fields(s ...googleapi.Field) *ProjectsTriggersListCall {
5013	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5014	return c
5015}
5016
5017// IfNoneMatch sets the optional parameter which makes the operation
5018// fail if the object's ETag matches the given value. This is useful for
5019// getting updates only after the object has changed since the last
5020// request. Use googleapi.IsNotModified to check whether the response
5021// error from Do is the result of In-None-Match.
5022func (c *ProjectsTriggersListCall) IfNoneMatch(entityTag string) *ProjectsTriggersListCall {
5023	c.ifNoneMatch_ = entityTag
5024	return c
5025}
5026
5027// Context sets the context to be used in this call's Do method. Any
5028// pending HTTP request will be aborted if the provided context is
5029// canceled.
5030func (c *ProjectsTriggersListCall) Context(ctx context.Context) *ProjectsTriggersListCall {
5031	c.ctx_ = ctx
5032	return c
5033}
5034
5035// Header returns an http.Header that can be modified by the caller to
5036// add HTTP headers to the request.
5037func (c *ProjectsTriggersListCall) Header() http.Header {
5038	if c.header_ == nil {
5039		c.header_ = make(http.Header)
5040	}
5041	return c.header_
5042}
5043
5044func (c *ProjectsTriggersListCall) doRequest(alt string) (*http.Response, error) {
5045	reqHeaders := make(http.Header)
5046	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
5047	for k, v := range c.header_ {
5048		reqHeaders[k] = v
5049	}
5050	reqHeaders.Set("User-Agent", c.s.userAgent())
5051	if c.ifNoneMatch_ != "" {
5052		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5053	}
5054	var body io.Reader = nil
5055	c.urlParams_.Set("alt", alt)
5056	c.urlParams_.Set("prettyPrint", "false")
5057	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/triggers")
5058	urls += "?" + c.urlParams_.Encode()
5059	req, err := http.NewRequest("GET", urls, body)
5060	if err != nil {
5061		return nil, err
5062	}
5063	req.Header = reqHeaders
5064	googleapi.Expand(req.URL, map[string]string{
5065		"projectId": c.projectId,
5066	})
5067	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5068}
5069
5070// Do executes the "cloudbuild.projects.triggers.list" call.
5071// Exactly one of *ListBuildTriggersResponse or error will be non-nil.
5072// Any non-2xx status code is an error. Response headers are in either
5073// *ListBuildTriggersResponse.ServerResponse.Header or (if a response
5074// was returned at all) in error.(*googleapi.Error).Header. Use
5075// googleapi.IsNotModified to check whether the returned error was
5076// because http.StatusNotModified was returned.
5077func (c *ProjectsTriggersListCall) Do(opts ...googleapi.CallOption) (*ListBuildTriggersResponse, error) {
5078	gensupport.SetOptions(c.urlParams_, opts...)
5079	res, err := c.doRequest("json")
5080	if res != nil && res.StatusCode == http.StatusNotModified {
5081		if res.Body != nil {
5082			res.Body.Close()
5083		}
5084		return nil, &googleapi.Error{
5085			Code:   res.StatusCode,
5086			Header: res.Header,
5087		}
5088	}
5089	if err != nil {
5090		return nil, err
5091	}
5092	defer googleapi.CloseBody(res)
5093	if err := googleapi.CheckResponse(res); err != nil {
5094		return nil, err
5095	}
5096	ret := &ListBuildTriggersResponse{
5097		ServerResponse: googleapi.ServerResponse{
5098			Header:         res.Header,
5099			HTTPStatusCode: res.StatusCode,
5100		},
5101	}
5102	target := &ret
5103	if err := gensupport.DecodeResponse(target, res); err != nil {
5104		return nil, err
5105	}
5106	return ret, nil
5107	// {
5108	//   "description": "Lists existing `BuildTrigger`s. This API is experimental.",
5109	//   "flatPath": "v1/projects/{projectId}/triggers",
5110	//   "httpMethod": "GET",
5111	//   "id": "cloudbuild.projects.triggers.list",
5112	//   "parameterOrder": [
5113	//     "projectId"
5114	//   ],
5115	//   "parameters": {
5116	//     "pageSize": {
5117	//       "description": "Number of results to return in the list.",
5118	//       "format": "int32",
5119	//       "location": "query",
5120	//       "type": "integer"
5121	//     },
5122	//     "pageToken": {
5123	//       "description": "Token to provide to skip to a particular spot in the list.",
5124	//       "location": "query",
5125	//       "type": "string"
5126	//     },
5127	//     "projectId": {
5128	//       "description": "Required. ID of the project for which to list BuildTriggers.",
5129	//       "location": "path",
5130	//       "required": true,
5131	//       "type": "string"
5132	//     }
5133	//   },
5134	//   "path": "v1/projects/{projectId}/triggers",
5135	//   "response": {
5136	//     "$ref": "ListBuildTriggersResponse"
5137	//   },
5138	//   "scopes": [
5139	//     "https://www.googleapis.com/auth/cloud-platform"
5140	//   ]
5141	// }
5142
5143}
5144
5145// Pages invokes f for each page of results.
5146// A non-nil error returned from f will halt the iteration.
5147// The provided context supersedes any context provided to the Context method.
5148func (c *ProjectsTriggersListCall) Pages(ctx context.Context, f func(*ListBuildTriggersResponse) error) error {
5149	c.ctx_ = ctx
5150	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
5151	for {
5152		x, err := c.Do()
5153		if err != nil {
5154			return err
5155		}
5156		if err := f(x); err != nil {
5157			return err
5158		}
5159		if x.NextPageToken == "" {
5160			return nil
5161		}
5162		c.PageToken(x.NextPageToken)
5163	}
5164}
5165
5166// method id "cloudbuild.projects.triggers.patch":
5167
5168type ProjectsTriggersPatchCall struct {
5169	s            *Service
5170	projectId    string
5171	triggerId    string
5172	buildtrigger *BuildTrigger
5173	urlParams_   gensupport.URLParams
5174	ctx_         context.Context
5175	header_      http.Header
5176}
5177
5178// Patch: Updates a `BuildTrigger` by its project ID and trigger ID.
5179// This API is experimental.
5180func (r *ProjectsTriggersService) Patch(projectId string, triggerId string, buildtrigger *BuildTrigger) *ProjectsTriggersPatchCall {
5181	c := &ProjectsTriggersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5182	c.projectId = projectId
5183	c.triggerId = triggerId
5184	c.buildtrigger = buildtrigger
5185	return c
5186}
5187
5188// Fields allows partial responses to be retrieved. See
5189// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5190// for more information.
5191func (c *ProjectsTriggersPatchCall) Fields(s ...googleapi.Field) *ProjectsTriggersPatchCall {
5192	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5193	return c
5194}
5195
5196// Context sets the context to be used in this call's Do method. Any
5197// pending HTTP request will be aborted if the provided context is
5198// canceled.
5199func (c *ProjectsTriggersPatchCall) Context(ctx context.Context) *ProjectsTriggersPatchCall {
5200	c.ctx_ = ctx
5201	return c
5202}
5203
5204// Header returns an http.Header that can be modified by the caller to
5205// add HTTP headers to the request.
5206func (c *ProjectsTriggersPatchCall) Header() http.Header {
5207	if c.header_ == nil {
5208		c.header_ = make(http.Header)
5209	}
5210	return c.header_
5211}
5212
5213func (c *ProjectsTriggersPatchCall) doRequest(alt string) (*http.Response, error) {
5214	reqHeaders := make(http.Header)
5215	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
5216	for k, v := range c.header_ {
5217		reqHeaders[k] = v
5218	}
5219	reqHeaders.Set("User-Agent", c.s.userAgent())
5220	var body io.Reader = nil
5221	body, err := googleapi.WithoutDataWrapper.JSONReader(c.buildtrigger)
5222	if err != nil {
5223		return nil, err
5224	}
5225	reqHeaders.Set("Content-Type", "application/json")
5226	c.urlParams_.Set("alt", alt)
5227	c.urlParams_.Set("prettyPrint", "false")
5228	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/triggers/{triggerId}")
5229	urls += "?" + c.urlParams_.Encode()
5230	req, err := http.NewRequest("PATCH", urls, body)
5231	if err != nil {
5232		return nil, err
5233	}
5234	req.Header = reqHeaders
5235	googleapi.Expand(req.URL, map[string]string{
5236		"projectId": c.projectId,
5237		"triggerId": c.triggerId,
5238	})
5239	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5240}
5241
5242// Do executes the "cloudbuild.projects.triggers.patch" call.
5243// Exactly one of *BuildTrigger or error will be non-nil. Any non-2xx
5244// status code is an error. Response headers are in either
5245// *BuildTrigger.ServerResponse.Header or (if a response was returned at
5246// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
5247// to check whether the returned error was because
5248// http.StatusNotModified was returned.
5249func (c *ProjectsTriggersPatchCall) Do(opts ...googleapi.CallOption) (*BuildTrigger, error) {
5250	gensupport.SetOptions(c.urlParams_, opts...)
5251	res, err := c.doRequest("json")
5252	if res != nil && res.StatusCode == http.StatusNotModified {
5253		if res.Body != nil {
5254			res.Body.Close()
5255		}
5256		return nil, &googleapi.Error{
5257			Code:   res.StatusCode,
5258			Header: res.Header,
5259		}
5260	}
5261	if err != nil {
5262		return nil, err
5263	}
5264	defer googleapi.CloseBody(res)
5265	if err := googleapi.CheckResponse(res); err != nil {
5266		return nil, err
5267	}
5268	ret := &BuildTrigger{
5269		ServerResponse: googleapi.ServerResponse{
5270			Header:         res.Header,
5271			HTTPStatusCode: res.StatusCode,
5272		},
5273	}
5274	target := &ret
5275	if err := gensupport.DecodeResponse(target, res); err != nil {
5276		return nil, err
5277	}
5278	return ret, nil
5279	// {
5280	//   "description": "Updates a `BuildTrigger` by its project ID and trigger ID. This API is experimental.",
5281	//   "flatPath": "v1/projects/{projectId}/triggers/{triggerId}",
5282	//   "httpMethod": "PATCH",
5283	//   "id": "cloudbuild.projects.triggers.patch",
5284	//   "parameterOrder": [
5285	//     "projectId",
5286	//     "triggerId"
5287	//   ],
5288	//   "parameters": {
5289	//     "projectId": {
5290	//       "description": "Required. ID of the project that owns the trigger.",
5291	//       "location": "path",
5292	//       "required": true,
5293	//       "type": "string"
5294	//     },
5295	//     "triggerId": {
5296	//       "description": "Required. ID of the `BuildTrigger` to update.",
5297	//       "location": "path",
5298	//       "required": true,
5299	//       "type": "string"
5300	//     }
5301	//   },
5302	//   "path": "v1/projects/{projectId}/triggers/{triggerId}",
5303	//   "request": {
5304	//     "$ref": "BuildTrigger"
5305	//   },
5306	//   "response": {
5307	//     "$ref": "BuildTrigger"
5308	//   },
5309	//   "scopes": [
5310	//     "https://www.googleapis.com/auth/cloud-platform"
5311	//   ]
5312	// }
5313
5314}
5315
5316// method id "cloudbuild.projects.triggers.run":
5317
5318type ProjectsTriggersRunCall struct {
5319	s          *Service
5320	projectId  string
5321	triggerId  string
5322	reposource *RepoSource
5323	urlParams_ gensupport.URLParams
5324	ctx_       context.Context
5325	header_    http.Header
5326}
5327
5328// Run: Runs a `BuildTrigger` at a particular source revision.
5329func (r *ProjectsTriggersService) Run(projectId string, triggerId string, reposource *RepoSource) *ProjectsTriggersRunCall {
5330	c := &ProjectsTriggersRunCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5331	c.projectId = projectId
5332	c.triggerId = triggerId
5333	c.reposource = reposource
5334	return c
5335}
5336
5337// Fields allows partial responses to be retrieved. See
5338// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5339// for more information.
5340func (c *ProjectsTriggersRunCall) Fields(s ...googleapi.Field) *ProjectsTriggersRunCall {
5341	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5342	return c
5343}
5344
5345// Context sets the context to be used in this call's Do method. Any
5346// pending HTTP request will be aborted if the provided context is
5347// canceled.
5348func (c *ProjectsTriggersRunCall) Context(ctx context.Context) *ProjectsTriggersRunCall {
5349	c.ctx_ = ctx
5350	return c
5351}
5352
5353// Header returns an http.Header that can be modified by the caller to
5354// add HTTP headers to the request.
5355func (c *ProjectsTriggersRunCall) Header() http.Header {
5356	if c.header_ == nil {
5357		c.header_ = make(http.Header)
5358	}
5359	return c.header_
5360}
5361
5362func (c *ProjectsTriggersRunCall) doRequest(alt string) (*http.Response, error) {
5363	reqHeaders := make(http.Header)
5364	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
5365	for k, v := range c.header_ {
5366		reqHeaders[k] = v
5367	}
5368	reqHeaders.Set("User-Agent", c.s.userAgent())
5369	var body io.Reader = nil
5370	body, err := googleapi.WithoutDataWrapper.JSONReader(c.reposource)
5371	if err != nil {
5372		return nil, err
5373	}
5374	reqHeaders.Set("Content-Type", "application/json")
5375	c.urlParams_.Set("alt", alt)
5376	c.urlParams_.Set("prettyPrint", "false")
5377	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/triggers/{triggerId}:run")
5378	urls += "?" + c.urlParams_.Encode()
5379	req, err := http.NewRequest("POST", urls, body)
5380	if err != nil {
5381		return nil, err
5382	}
5383	req.Header = reqHeaders
5384	googleapi.Expand(req.URL, map[string]string{
5385		"projectId": c.projectId,
5386		"triggerId": c.triggerId,
5387	})
5388	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5389}
5390
5391// Do executes the "cloudbuild.projects.triggers.run" call.
5392// Exactly one of *Operation or error will be non-nil. Any non-2xx
5393// status code is an error. Response headers are in either
5394// *Operation.ServerResponse.Header or (if a response was returned at
5395// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
5396// to check whether the returned error was because
5397// http.StatusNotModified was returned.
5398func (c *ProjectsTriggersRunCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5399	gensupport.SetOptions(c.urlParams_, opts...)
5400	res, err := c.doRequest("json")
5401	if res != nil && res.StatusCode == http.StatusNotModified {
5402		if res.Body != nil {
5403			res.Body.Close()
5404		}
5405		return nil, &googleapi.Error{
5406			Code:   res.StatusCode,
5407			Header: res.Header,
5408		}
5409	}
5410	if err != nil {
5411		return nil, err
5412	}
5413	defer googleapi.CloseBody(res)
5414	if err := googleapi.CheckResponse(res); err != nil {
5415		return nil, err
5416	}
5417	ret := &Operation{
5418		ServerResponse: googleapi.ServerResponse{
5419			Header:         res.Header,
5420			HTTPStatusCode: res.StatusCode,
5421		},
5422	}
5423	target := &ret
5424	if err := gensupport.DecodeResponse(target, res); err != nil {
5425		return nil, err
5426	}
5427	return ret, nil
5428	// {
5429	//   "description": "Runs a `BuildTrigger` at a particular source revision.",
5430	//   "flatPath": "v1/projects/{projectId}/triggers/{triggerId}:run",
5431	//   "httpMethod": "POST",
5432	//   "id": "cloudbuild.projects.triggers.run",
5433	//   "parameterOrder": [
5434	//     "projectId",
5435	//     "triggerId"
5436	//   ],
5437	//   "parameters": {
5438	//     "projectId": {
5439	//       "description": "Required. ID of the project.",
5440	//       "location": "path",
5441	//       "required": true,
5442	//       "type": "string"
5443	//     },
5444	//     "triggerId": {
5445	//       "description": "Required. ID of the trigger.",
5446	//       "location": "path",
5447	//       "required": true,
5448	//       "type": "string"
5449	//     }
5450	//   },
5451	//   "path": "v1/projects/{projectId}/triggers/{triggerId}:run",
5452	//   "request": {
5453	//     "$ref": "RepoSource"
5454	//   },
5455	//   "response": {
5456	//     "$ref": "Operation"
5457	//   },
5458	//   "scopes": [
5459	//     "https://www.googleapis.com/auth/cloud-platform"
5460	//   ]
5461	// }
5462
5463}
5464
5465// method id "cloudbuild.projects.triggers.webhook":
5466
5467type ProjectsTriggersWebhookCall struct {
5468	s          *Service
5469	projectId  string
5470	trigger    string
5471	httpbody   *HttpBody
5472	urlParams_ gensupport.URLParams
5473	ctx_       context.Context
5474	header_    http.Header
5475}
5476
5477// Webhook: ReceiveTriggerWebhook [Experimental] is called when the API
5478// receives a webhook request targeted at a specific trigger.
5479func (r *ProjectsTriggersService) Webhook(projectId string, trigger string, httpbody *HttpBody) *ProjectsTriggersWebhookCall {
5480	c := &ProjectsTriggersWebhookCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5481	c.projectId = projectId
5482	c.trigger = trigger
5483	c.httpbody = httpbody
5484	return c
5485}
5486
5487// Secret sets the optional parameter "secret": Secret token used for
5488// authorization if an OAuth token isn't provided.
5489func (c *ProjectsTriggersWebhookCall) Secret(secret string) *ProjectsTriggersWebhookCall {
5490	c.urlParams_.Set("secret", secret)
5491	return c
5492}
5493
5494// Fields allows partial responses to be retrieved. See
5495// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5496// for more information.
5497func (c *ProjectsTriggersWebhookCall) Fields(s ...googleapi.Field) *ProjectsTriggersWebhookCall {
5498	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5499	return c
5500}
5501
5502// Context sets the context to be used in this call's Do method. Any
5503// pending HTTP request will be aborted if the provided context is
5504// canceled.
5505func (c *ProjectsTriggersWebhookCall) Context(ctx context.Context) *ProjectsTriggersWebhookCall {
5506	c.ctx_ = ctx
5507	return c
5508}
5509
5510// Header returns an http.Header that can be modified by the caller to
5511// add HTTP headers to the request.
5512func (c *ProjectsTriggersWebhookCall) Header() http.Header {
5513	if c.header_ == nil {
5514		c.header_ = make(http.Header)
5515	}
5516	return c.header_
5517}
5518
5519func (c *ProjectsTriggersWebhookCall) doRequest(alt string) (*http.Response, error) {
5520	reqHeaders := make(http.Header)
5521	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
5522	for k, v := range c.header_ {
5523		reqHeaders[k] = v
5524	}
5525	reqHeaders.Set("User-Agent", c.s.userAgent())
5526	var body io.Reader = nil
5527	body, err := googleapi.WithoutDataWrapper.JSONReader(c.httpbody)
5528	if err != nil {
5529		return nil, err
5530	}
5531	reqHeaders.Set("Content-Type", "application/json")
5532	c.urlParams_.Set("alt", alt)
5533	c.urlParams_.Set("prettyPrint", "false")
5534	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/triggers/{trigger}:webhook")
5535	urls += "?" + c.urlParams_.Encode()
5536	req, err := http.NewRequest("POST", urls, body)
5537	if err != nil {
5538		return nil, err
5539	}
5540	req.Header = reqHeaders
5541	googleapi.Expand(req.URL, map[string]string{
5542		"projectId": c.projectId,
5543		"trigger":   c.trigger,
5544	})
5545	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5546}
5547
5548// Do executes the "cloudbuild.projects.triggers.webhook" call.
5549// Exactly one of *ReceiveTriggerWebhookResponse or error will be
5550// non-nil. Any non-2xx status code is an error. Response headers are in
5551// either *ReceiveTriggerWebhookResponse.ServerResponse.Header or (if a
5552// response was returned at all) in error.(*googleapi.Error).Header. Use
5553// googleapi.IsNotModified to check whether the returned error was
5554// because http.StatusNotModified was returned.
5555func (c *ProjectsTriggersWebhookCall) Do(opts ...googleapi.CallOption) (*ReceiveTriggerWebhookResponse, error) {
5556	gensupport.SetOptions(c.urlParams_, opts...)
5557	res, err := c.doRequest("json")
5558	if res != nil && res.StatusCode == http.StatusNotModified {
5559		if res.Body != nil {
5560			res.Body.Close()
5561		}
5562		return nil, &googleapi.Error{
5563			Code:   res.StatusCode,
5564			Header: res.Header,
5565		}
5566	}
5567	if err != nil {
5568		return nil, err
5569	}
5570	defer googleapi.CloseBody(res)
5571	if err := googleapi.CheckResponse(res); err != nil {
5572		return nil, err
5573	}
5574	ret := &ReceiveTriggerWebhookResponse{
5575		ServerResponse: googleapi.ServerResponse{
5576			Header:         res.Header,
5577			HTTPStatusCode: res.StatusCode,
5578		},
5579	}
5580	target := &ret
5581	if err := gensupport.DecodeResponse(target, res); err != nil {
5582		return nil, err
5583	}
5584	return ret, nil
5585	// {
5586	//   "description": "ReceiveTriggerWebhook [Experimental] is called when the API receives a webhook request targeted at a specific trigger.",
5587	//   "flatPath": "v1/projects/{projectId}/triggers/{trigger}:webhook",
5588	//   "httpMethod": "POST",
5589	//   "id": "cloudbuild.projects.triggers.webhook",
5590	//   "parameterOrder": [
5591	//     "projectId",
5592	//     "trigger"
5593	//   ],
5594	//   "parameters": {
5595	//     "projectId": {
5596	//       "description": "Project in which the specified trigger lives",
5597	//       "location": "path",
5598	//       "required": true,
5599	//       "type": "string"
5600	//     },
5601	//     "secret": {
5602	//       "description": "Secret token used for authorization if an OAuth token isn't provided.",
5603	//       "location": "query",
5604	//       "type": "string"
5605	//     },
5606	//     "trigger": {
5607	//       "description": "Name of the trigger to run the payload against",
5608	//       "location": "path",
5609	//       "required": true,
5610	//       "type": "string"
5611	//     }
5612	//   },
5613	//   "path": "v1/projects/{projectId}/triggers/{trigger}:webhook",
5614	//   "request": {
5615	//     "$ref": "HttpBody"
5616	//   },
5617	//   "response": {
5618	//     "$ref": "ReceiveTriggerWebhookResponse"
5619	//   }
5620	// }
5621
5622}
5623