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 data and see the
83	// email address for your Google Account.
84	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
85)
86
87// NewService creates a new Service.
88func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
89	scopesOption := option.WithScopes(
90		"https://www.googleapis.com/auth/cloud-platform",
91	)
92	// NOTE: prepend, so we don't override user-specified scopes.
93	opts = append([]option.ClientOption{scopesOption}, opts...)
94	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
95	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
96	client, endpoint, err := htransport.NewClient(ctx, opts...)
97	if err != nil {
98		return nil, err
99	}
100	s, err := New(client)
101	if err != nil {
102		return nil, err
103	}
104	if endpoint != "" {
105		s.BasePath = endpoint
106	}
107	return s, nil
108}
109
110// New creates a new Service. It uses the provided http.Client for requests.
111//
112// Deprecated: please use NewService instead.
113// To provide a custom HTTP client, use option.WithHTTPClient.
114// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
115func New(client *http.Client) (*Service, error) {
116	if client == nil {
117		return nil, errors.New("client is nil")
118	}
119	s := &Service{client: client, BasePath: basePath}
120	s.Operations = NewOperationsService(s)
121	s.Projects = NewProjectsService(s)
122	s.V1 = NewV1Service(s)
123	return s, nil
124}
125
126type Service struct {
127	client    *http.Client
128	BasePath  string // API endpoint base URL
129	UserAgent string // optional additional User-Agent fragment
130
131	Operations *OperationsService
132
133	Projects *ProjectsService
134
135	V1 *V1Service
136}
137
138func (s *Service) userAgent() string {
139	if s.UserAgent == "" {
140		return googleapi.UserAgent
141	}
142	return googleapi.UserAgent + " " + s.UserAgent
143}
144
145func NewOperationsService(s *Service) *OperationsService {
146	rs := &OperationsService{s: s}
147	return rs
148}
149
150type OperationsService struct {
151	s *Service
152}
153
154func NewProjectsService(s *Service) *ProjectsService {
155	rs := &ProjectsService{s: s}
156	rs.Builds = NewProjectsBuildsService(s)
157	rs.GithubEnterpriseConfigs = NewProjectsGithubEnterpriseConfigsService(s)
158	rs.Locations = NewProjectsLocationsService(s)
159	rs.Triggers = NewProjectsTriggersService(s)
160	return rs
161}
162
163type ProjectsService struct {
164	s *Service
165
166	Builds *ProjectsBuildsService
167
168	GithubEnterpriseConfigs *ProjectsGithubEnterpriseConfigsService
169
170	Locations *ProjectsLocationsService
171
172	Triggers *ProjectsTriggersService
173}
174
175func NewProjectsBuildsService(s *Service) *ProjectsBuildsService {
176	rs := &ProjectsBuildsService{s: s}
177	return rs
178}
179
180type ProjectsBuildsService struct {
181	s *Service
182}
183
184func NewProjectsGithubEnterpriseConfigsService(s *Service) *ProjectsGithubEnterpriseConfigsService {
185	rs := &ProjectsGithubEnterpriseConfigsService{s: s}
186	return rs
187}
188
189type ProjectsGithubEnterpriseConfigsService struct {
190	s *Service
191}
192
193func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
194	rs := &ProjectsLocationsService{s: s}
195	rs.Builds = NewProjectsLocationsBuildsService(s)
196	rs.GithubEnterpriseConfigs = NewProjectsLocationsGithubEnterpriseConfigsService(s)
197	rs.Operations = NewProjectsLocationsOperationsService(s)
198	rs.Triggers = NewProjectsLocationsTriggersService(s)
199	rs.WorkerPools = NewProjectsLocationsWorkerPoolsService(s)
200	return rs
201}
202
203type ProjectsLocationsService struct {
204	s *Service
205
206	Builds *ProjectsLocationsBuildsService
207
208	GithubEnterpriseConfigs *ProjectsLocationsGithubEnterpriseConfigsService
209
210	Operations *ProjectsLocationsOperationsService
211
212	Triggers *ProjectsLocationsTriggersService
213
214	WorkerPools *ProjectsLocationsWorkerPoolsService
215}
216
217func NewProjectsLocationsBuildsService(s *Service) *ProjectsLocationsBuildsService {
218	rs := &ProjectsLocationsBuildsService{s: s}
219	return rs
220}
221
222type ProjectsLocationsBuildsService struct {
223	s *Service
224}
225
226func NewProjectsLocationsGithubEnterpriseConfigsService(s *Service) *ProjectsLocationsGithubEnterpriseConfigsService {
227	rs := &ProjectsLocationsGithubEnterpriseConfigsService{s: s}
228	return rs
229}
230
231type ProjectsLocationsGithubEnterpriseConfigsService struct {
232	s *Service
233}
234
235func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
236	rs := &ProjectsLocationsOperationsService{s: s}
237	return rs
238}
239
240type ProjectsLocationsOperationsService struct {
241	s *Service
242}
243
244func NewProjectsLocationsTriggersService(s *Service) *ProjectsLocationsTriggersService {
245	rs := &ProjectsLocationsTriggersService{s: s}
246	return rs
247}
248
249type ProjectsLocationsTriggersService struct {
250	s *Service
251}
252
253func NewProjectsLocationsWorkerPoolsService(s *Service) *ProjectsLocationsWorkerPoolsService {
254	rs := &ProjectsLocationsWorkerPoolsService{s: s}
255	return rs
256}
257
258type ProjectsLocationsWorkerPoolsService struct {
259	s *Service
260}
261
262func NewProjectsTriggersService(s *Service) *ProjectsTriggersService {
263	rs := &ProjectsTriggersService{s: s}
264	return rs
265}
266
267type ProjectsTriggersService struct {
268	s *Service
269}
270
271func NewV1Service(s *Service) *V1Service {
272	rs := &V1Service{s: s}
273	return rs
274}
275
276type V1Service struct {
277	s *Service
278}
279
280// ApprovalConfig: ApprovalConfig describes configuration for manual
281// approval of a build.
282type ApprovalConfig struct {
283	// ApprovalRequired: Whether or not approval is needed. If this is set
284	// on a build, it will become pending when created, and will need to be
285	// explicitly approved to start.
286	ApprovalRequired bool `json:"approvalRequired,omitempty"`
287
288	// ForceSendFields is a list of field names (e.g. "ApprovalRequired") to
289	// unconditionally include in API requests. By default, fields with
290	// empty or default values are omitted from API requests. However, any
291	// non-pointer, non-interface field appearing in ForceSendFields will be
292	// sent to the server regardless of whether the field is empty or not.
293	// This may be used to include empty fields in Patch requests.
294	ForceSendFields []string `json:"-"`
295
296	// NullFields is a list of field names (e.g. "ApprovalRequired") to
297	// include in API requests with the JSON null value. By default, fields
298	// with empty values are omitted from API requests. However, any field
299	// with an empty value appearing in NullFields will be sent to the
300	// server as null. It is an error if a field in this list has a
301	// non-empty value. This may be used to include null fields in Patch
302	// requests.
303	NullFields []string `json:"-"`
304}
305
306func (s *ApprovalConfig) MarshalJSON() ([]byte, error) {
307	type NoMethod ApprovalConfig
308	raw := NoMethod(*s)
309	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
310}
311
312// ApprovalResult: ApprovalResult describes the decision and associated
313// metadata of a manual approval of a build.
314type ApprovalResult struct {
315	// ApprovalTime: Output only. The time when the approval decision was
316	// made.
317	ApprovalTime string `json:"approvalTime,omitempty"`
318
319	// ApproverAccount: Output only. Email of the user that called the
320	// ApproveBuild API to approve or reject a build at the time that the
321	// API was called.
322	ApproverAccount string `json:"approverAccount,omitempty"`
323
324	// Comment: Optional. An optional comment for this manual approval
325	// result.
326	Comment string `json:"comment,omitempty"`
327
328	// Decision: Required. The decision of this manual approval.
329	//
330	// Possible values:
331	//   "DECISION_UNSPECIFIED" - Default enum type. This should not be
332	// used.
333	//   "APPROVED" - Build is approved.
334	//   "REJECTED" - Build is rejected.
335	Decision string `json:"decision,omitempty"`
336
337	// Url: Optional. An optional URL tied to this manual approval result.
338	// This field is essentially the same as comment, except that it will be
339	// rendered by the UI differently. An example use case is a link to an
340	// external job that approved this Build.
341	Url string `json:"url,omitempty"`
342
343	// ForceSendFields is a list of field names (e.g. "ApprovalTime") to
344	// unconditionally include in API requests. By default, fields with
345	// empty or default values are omitted from API requests. However, any
346	// non-pointer, non-interface field appearing in ForceSendFields will be
347	// sent to the server regardless of whether the field is empty or not.
348	// This may be used to include empty fields in Patch requests.
349	ForceSendFields []string `json:"-"`
350
351	// NullFields is a list of field names (e.g. "ApprovalTime") to include
352	// in API requests with the JSON null value. By default, fields with
353	// empty values are omitted from API requests. However, any field with
354	// an empty value appearing in NullFields will be sent to the server as
355	// null. It is an error if a field in this list has a non-empty value.
356	// This may be used to include null fields in Patch requests.
357	NullFields []string `json:"-"`
358}
359
360func (s *ApprovalResult) MarshalJSON() ([]byte, error) {
361	type NoMethod ApprovalResult
362	raw := NoMethod(*s)
363	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
364}
365
366// ApproveBuildRequest: Request to approve or reject a pending build.
367type ApproveBuildRequest struct {
368	// ApprovalResult: Approval decision and metadata.
369	ApprovalResult *ApprovalResult `json:"approvalResult,omitempty"`
370
371	// ForceSendFields is a list of field names (e.g. "ApprovalResult") to
372	// unconditionally include in API requests. By default, fields with
373	// empty or default values are omitted from API requests. However, any
374	// non-pointer, non-interface field appearing in ForceSendFields will be
375	// sent to the server regardless of whether the field is empty or not.
376	// This may be used to include empty fields in Patch requests.
377	ForceSendFields []string `json:"-"`
378
379	// NullFields is a list of field names (e.g. "ApprovalResult") to
380	// include in API requests with the JSON null value. By default, fields
381	// with empty values are omitted from API requests. However, any field
382	// with an empty value appearing in NullFields will be sent to the
383	// server as null. It is an error if a field in this list has a
384	// non-empty value. This may be used to include null fields in Patch
385	// requests.
386	NullFields []string `json:"-"`
387}
388
389func (s *ApproveBuildRequest) MarshalJSON() ([]byte, error) {
390	type NoMethod ApproveBuildRequest
391	raw := NoMethod(*s)
392	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
393}
394
395// ArtifactObjects: Files in the workspace to upload to Cloud Storage
396// upon successful completion of all build steps.
397type ArtifactObjects struct {
398	// Location: Cloud Storage bucket and optional object path, in the form
399	// "gs://bucket/path/to/somewhere/". (see Bucket Name Requirements
400	// (https://cloud.google.com/storage/docs/bucket-naming#requirements)).
401	// Files in the workspace matching any path pattern will be uploaded to
402	// Cloud Storage with this location as a prefix.
403	Location string `json:"location,omitempty"`
404
405	// Paths: Path globs used to match files in the build's workspace.
406	Paths []string `json:"paths,omitempty"`
407
408	// Timing: Output only. Stores timing information for pushing all
409	// artifact objects.
410	Timing *TimeSpan `json:"timing,omitempty"`
411
412	// ForceSendFields is a list of field names (e.g. "Location") to
413	// unconditionally include in API requests. By default, fields with
414	// empty or default values are omitted from API requests. However, any
415	// non-pointer, non-interface field appearing in ForceSendFields will be
416	// sent to the server regardless of whether the field is empty or not.
417	// This may be used to include empty fields in Patch requests.
418	ForceSendFields []string `json:"-"`
419
420	// NullFields is a list of field names (e.g. "Location") to include in
421	// API requests with the JSON null value. By default, fields with empty
422	// values are omitted from API requests. However, any field with an
423	// empty value appearing in NullFields will be sent to the server as
424	// null. It is an error if a field in this list has a non-empty value.
425	// This may be used to include null fields in Patch requests.
426	NullFields []string `json:"-"`
427}
428
429func (s *ArtifactObjects) MarshalJSON() ([]byte, error) {
430	type NoMethod ArtifactObjects
431	raw := NoMethod(*s)
432	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
433}
434
435// ArtifactResult: An artifact that was uploaded during a build. This is
436// a single record in the artifact manifest JSON file.
437type ArtifactResult struct {
438	// FileHash: The file hash of the artifact.
439	FileHash []*FileHashes `json:"fileHash,omitempty"`
440
441	// Location: The path of an artifact in a Google Cloud Storage bucket,
442	// with the generation number. For example,
443	// `gs://mybucket/path/to/output.jar#generation`.
444	Location string `json:"location,omitempty"`
445
446	// ForceSendFields is a list of field names (e.g. "FileHash") to
447	// unconditionally include in API requests. By default, fields with
448	// empty or default values are omitted from API requests. However, any
449	// non-pointer, non-interface field appearing in ForceSendFields will be
450	// sent to the server regardless of whether the field is empty or not.
451	// This may be used to include empty fields in Patch requests.
452	ForceSendFields []string `json:"-"`
453
454	// NullFields is a list of field names (e.g. "FileHash") to include in
455	// API requests with the JSON null value. By default, fields with empty
456	// values are omitted from API requests. However, any field with an
457	// empty value appearing in NullFields will be sent to the server as
458	// null. It is an error if a field in this list has a non-empty value.
459	// This may be used to include null fields in Patch requests.
460	NullFields []string `json:"-"`
461}
462
463func (s *ArtifactResult) MarshalJSON() ([]byte, error) {
464	type NoMethod ArtifactResult
465	raw := NoMethod(*s)
466	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
467}
468
469// Artifacts: Artifacts produced by a build that should be uploaded upon
470// successful completion of all build steps.
471type Artifacts struct {
472	// Images: A list of images to be pushed upon the successful completion
473	// of all build steps. The images will be pushed using the builder
474	// service account's credentials. The digests of the pushed images will
475	// be stored in the Build resource's results field. If any of the images
476	// fail to be pushed, the build is marked FAILURE.
477	Images []string `json:"images,omitempty"`
478
479	// Objects: A list of objects to be uploaded to Cloud Storage upon
480	// successful completion of all build steps. Files in the workspace
481	// matching specified paths globs will be uploaded to the specified
482	// Cloud Storage location using the builder service account's
483	// credentials. The location and generation of the uploaded objects will
484	// be stored in the Build resource's results field. If any objects fail
485	// to be pushed, the build is marked FAILURE.
486	Objects *ArtifactObjects `json:"objects,omitempty"`
487
488	// ForceSendFields is a list of field names (e.g. "Images") to
489	// unconditionally include in API requests. By default, fields with
490	// empty or default values are omitted from API requests. However, any
491	// non-pointer, non-interface field appearing in ForceSendFields will be
492	// sent to the server regardless of whether the field is empty or not.
493	// This may be used to include empty fields in Patch requests.
494	ForceSendFields []string `json:"-"`
495
496	// NullFields is a list of field names (e.g. "Images") to include in API
497	// requests with the JSON null value. By default, fields with empty
498	// values are omitted from API requests. However, any field with an
499	// empty value appearing in NullFields will be sent to the server as
500	// null. It is an error if a field in this list has a non-empty value.
501	// This may be used to include null fields in Patch requests.
502	NullFields []string `json:"-"`
503}
504
505func (s *Artifacts) MarshalJSON() ([]byte, error) {
506	type NoMethod Artifacts
507	raw := NoMethod(*s)
508	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
509}
510
511// Build: A build resource in the Cloud Build API. At a high level, a
512// `Build` describes where to find source code, how to build it (for
513// example, the builder image to run on the source), and where to store
514// the built artifacts. Fields can include the following variables,
515// which will be expanded when the build is created: - $PROJECT_ID: the
516// project ID of the build. - $PROJECT_NUMBER: the project number of the
517// build. - $LOCATION: the location/region of the build. - $BUILD_ID:
518// the autogenerated ID of the build. - $REPO_NAME: the source
519// repository name specified by RepoSource. - $BRANCH_NAME: the branch
520// name specified by RepoSource. - $TAG_NAME: the tag name specified by
521// RepoSource. - $REVISION_ID or $COMMIT_SHA: the commit SHA specified
522// by RepoSource or resolved from the specified branch or tag. -
523// $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.
524type Build struct {
525	// Approval: Output only. Describes this build's approval configuration,
526	// status, and result.
527	Approval *BuildApproval `json:"approval,omitempty"`
528
529	// Artifacts: Artifacts produced by the build that should be uploaded
530	// upon successful completion of all build steps.
531	Artifacts *Artifacts `json:"artifacts,omitempty"`
532
533	// AvailableSecrets: Secrets and secret environment variables.
534	AvailableSecrets *Secrets `json:"availableSecrets,omitempty"`
535
536	// BuildTriggerId: Output only. The ID of the `BuildTrigger` that
537	// triggered this build, if it was triggered automatically.
538	BuildTriggerId string `json:"buildTriggerId,omitempty"`
539
540	// CreateTime: Output only. Time at which the request to create the
541	// build was received.
542	CreateTime string `json:"createTime,omitempty"`
543
544	// FailureInfo: Output only. Contains information about the build when
545	// status=FAILURE.
546	FailureInfo *FailureInfo `json:"failureInfo,omitempty"`
547
548	// FinishTime: Output only. Time at which execution of the build was
549	// finished. The difference between finish_time and start_time is the
550	// duration of the build's execution.
551	FinishTime string `json:"finishTime,omitempty"`
552
553	// Id: Output only. Unique identifier of the build.
554	Id string `json:"id,omitempty"`
555
556	// Images: A list of images to be pushed upon the successful completion
557	// of all build steps. The images are pushed using the builder service
558	// account's credentials. The digests of the pushed images will be
559	// stored in the `Build` resource's results field. If any of the images
560	// fail to be pushed, the build status is marked `FAILURE`.
561	Images []string `json:"images,omitempty"`
562
563	// LogUrl: Output only. URL to logs for this build in Google Cloud
564	// Console.
565	LogUrl string `json:"logUrl,omitempty"`
566
567	// LogsBucket: Google Cloud Storage bucket where logs should be written
568	// (see Bucket Name Requirements
569	// (https://cloud.google.com/storage/docs/bucket-naming#requirements)).
570	// Logs file names will be of the format
571	// `${logs_bucket}/log-${build_id}.txt`.
572	LogsBucket string `json:"logsBucket,omitempty"`
573
574	// Name: Output only. The 'Build' name with format:
575	// `projects/{project}/locations/{location}/builds/{build}`, where
576	// {build} is a unique identifier generated by the service.
577	Name string `json:"name,omitempty"`
578
579	// Options: Special options for this build.
580	Options *BuildOptions `json:"options,omitempty"`
581
582	// ProjectId: Output only. ID of the project.
583	ProjectId string `json:"projectId,omitempty"`
584
585	// QueueTtl: TTL in queue for this build. If provided and the build is
586	// enqueued longer than this value, the build will expire and the build
587	// status will be `EXPIRED`. The TTL starts ticking from create_time.
588	QueueTtl string `json:"queueTtl,omitempty"`
589
590	// Results: Output only. Results of the build.
591	Results *Results `json:"results,omitempty"`
592
593	// Secrets: Secrets to decrypt using Cloud Key Management Service. Note:
594	// Secret Manager is the recommended technique for managing sensitive
595	// data with Cloud Build. Use `available_secrets` to configure builds to
596	// access secrets from Secret Manager. For instructions, see:
597	// https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets
598	Secrets []*Secret `json:"secrets,omitempty"`
599
600	// ServiceAccount: IAM service account whose credentials will be used at
601	// build runtime. Must be of the format
602	// `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. ACCOUNT can be
603	// email address or uniqueId of the service account.
604	ServiceAccount string `json:"serviceAccount,omitempty"`
605
606	// Source: The location of the source files to build.
607	Source *Source `json:"source,omitempty"`
608
609	// SourceProvenance: Output only. A permanent fixed identifier for
610	// source.
611	SourceProvenance *SourceProvenance `json:"sourceProvenance,omitempty"`
612
613	// StartTime: Output only. Time at which execution of the build was
614	// started.
615	StartTime string `json:"startTime,omitempty"`
616
617	// Status: Output only. Status of the build.
618	//
619	// Possible values:
620	//   "STATUS_UNKNOWN" - Status of the build is unknown.
621	//   "PENDING" - Build has been created and is pending execution and
622	// queuing. It has not been queued.
623	//   "QUEUED" - Build or step is queued; work has not yet begun.
624	//   "WORKING" - Build or step is being executed.
625	//   "SUCCESS" - Build or step finished successfully.
626	//   "FAILURE" - Build or step failed to complete successfully.
627	//   "INTERNAL_ERROR" - Build or step failed due to an internal cause.
628	//   "TIMEOUT" - Build or step took longer than was allowed.
629	//   "CANCELLED" - Build or step was canceled by a user.
630	//   "EXPIRED" - Build was enqueued for longer than the value of
631	// `queue_ttl`.
632	Status string `json:"status,omitempty"`
633
634	// StatusDetail: Output only. Customer-readable message about the
635	// current status.
636	StatusDetail string `json:"statusDetail,omitempty"`
637
638	// Steps: Required. The operations to be performed on the workspace.
639	Steps []*BuildStep `json:"steps,omitempty"`
640
641	// Substitutions: Substitutions data for `Build` resource.
642	Substitutions map[string]string `json:"substitutions,omitempty"`
643
644	// Tags: Tags for annotation of a `Build`. These are not docker tags.
645	Tags []string `json:"tags,omitempty"`
646
647	// Timeout: Amount of time that this build should be allowed to run, to
648	// second granularity. If this amount of time elapses, work on the build
649	// will cease and the build status will be `TIMEOUT`. `timeout` starts
650	// ticking from `startTime`. Default time is ten minutes.
651	Timeout string `json:"timeout,omitempty"`
652
653	// Timing: Output only. Stores timing information for phases of the
654	// build. Valid keys are: * BUILD: time to execute all build steps. *
655	// PUSH: time to push all specified images. * FETCHSOURCE: time to fetch
656	// source. * SETUPBUILD: time to set up build. If the build does not
657	// specify source or images, these keys will not be included.
658	Timing map[string]TimeSpan `json:"timing,omitempty"`
659
660	// Warnings: Output only. Non-fatal problems encountered during the
661	// execution of the build.
662	Warnings []*Warning `json:"warnings,omitempty"`
663
664	// ServerResponse contains the HTTP response code and headers from the
665	// server.
666	googleapi.ServerResponse `json:"-"`
667
668	// ForceSendFields is a list of field names (e.g. "Approval") to
669	// unconditionally include in API requests. By default, fields with
670	// empty or default values are omitted from API requests. However, any
671	// non-pointer, non-interface field appearing in ForceSendFields will be
672	// sent to the server regardless of whether the field is empty or not.
673	// This may be used to include empty fields in Patch requests.
674	ForceSendFields []string `json:"-"`
675
676	// NullFields is a list of field names (e.g. "Approval") to include in
677	// API requests with the JSON null value. By default, fields with empty
678	// values are omitted from API requests. However, any field with an
679	// empty value appearing in NullFields will be sent to the server as
680	// null. It is an error if a field in this list has a non-empty value.
681	// This may be used to include null fields in Patch requests.
682	NullFields []string `json:"-"`
683}
684
685func (s *Build) MarshalJSON() ([]byte, error) {
686	type NoMethod Build
687	raw := NoMethod(*s)
688	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
689}
690
691// BuildApproval: BuildApproval describes a build's approval
692// configuration, state, and result.
693type BuildApproval struct {
694	// Config: Output only. Configuration for manual approval of this build.
695	Config *ApprovalConfig `json:"config,omitempty"`
696
697	// Result: Output only. Result of manual approval for this Build.
698	Result *ApprovalResult `json:"result,omitempty"`
699
700	// State: Output only. The state of this build's approval.
701	//
702	// Possible values:
703	//   "STATE_UNSPECIFIED" - Default enum type. This should not be used.
704	//   "PENDING" - Build approval is pending.
705	//   "APPROVED" - Build approval has been approved.
706	//   "REJECTED" - Build approval has been rejected.
707	//   "CANCELLED" - Build was cancelled while it was still pending
708	// approval.
709	State string `json:"state,omitempty"`
710
711	// ForceSendFields is a list of field names (e.g. "Config") to
712	// unconditionally include in API requests. By default, fields with
713	// empty or default values are omitted from API requests. However, any
714	// non-pointer, non-interface field appearing in ForceSendFields will be
715	// sent to the server regardless of whether the field is empty or not.
716	// This may be used to include empty fields in Patch requests.
717	ForceSendFields []string `json:"-"`
718
719	// NullFields is a list of field names (e.g. "Config") to include in API
720	// requests with the JSON null value. By default, fields with empty
721	// values are omitted from API requests. However, any field with an
722	// empty value appearing in NullFields will be sent to the server as
723	// null. It is an error if a field in this list has a non-empty value.
724	// This may be used to include null fields in Patch requests.
725	NullFields []string `json:"-"`
726}
727
728func (s *BuildApproval) MarshalJSON() ([]byte, error) {
729	type NoMethod BuildApproval
730	raw := NoMethod(*s)
731	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
732}
733
734// BuildOperationMetadata: Metadata for build operations.
735type BuildOperationMetadata struct {
736	// Build: The build that the operation is tracking.
737	Build *Build `json:"build,omitempty"`
738
739	// ForceSendFields is a list of field names (e.g. "Build") to
740	// unconditionally include in API requests. By default, fields with
741	// empty or default values are omitted from API requests. However, any
742	// non-pointer, non-interface field appearing in ForceSendFields will be
743	// sent to the server regardless of whether the field is empty or not.
744	// This may be used to include empty fields in Patch requests.
745	ForceSendFields []string `json:"-"`
746
747	// NullFields is a list of field names (e.g. "Build") to include in API
748	// requests with the JSON null value. By default, fields with empty
749	// values are omitted from API requests. However, any field with an
750	// empty value appearing in NullFields will be sent to the server as
751	// null. It is an error if a field in this list has a non-empty value.
752	// This may be used to include null fields in Patch requests.
753	NullFields []string `json:"-"`
754}
755
756func (s *BuildOperationMetadata) MarshalJSON() ([]byte, error) {
757	type NoMethod BuildOperationMetadata
758	raw := NoMethod(*s)
759	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
760}
761
762// BuildOptions: Optional arguments to enable specific features of
763// builds.
764type BuildOptions struct {
765	// DiskSizeGb: Requested disk size for the VM that runs the build. Note
766	// that this is *NOT* "disk free"; some of the space will be used by the
767	// operating system and build utilities. Also note that this is the
768	// minimum disk size that will be allocated for the build -- the build
769	// may run with a larger disk than requested. At present, the maximum
770	// disk size is 1000GB; builds that request more than the maximum are
771	// rejected with an error.
772	DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"`
773
774	// DynamicSubstitutions: Option to specify whether or not to apply bash
775	// style string operations to the substitutions. NOTE: this is always
776	// enabled for triggered builds and cannot be overridden in the build
777	// configuration file.
778	DynamicSubstitutions bool `json:"dynamicSubstitutions,omitempty"`
779
780	// Env: A list of global environment variable definitions that will
781	// exist for all build steps in this build. If a variable is defined in
782	// both globally and in a build step, the variable will use the build
783	// step value. The elements are of the form "KEY=VALUE" for the
784	// environment variable "KEY" being given the value "VALUE".
785	Env []string `json:"env,omitempty"`
786
787	// LogStreamingOption: Option to define build log streaming behavior to
788	// Google Cloud Storage.
789	//
790	// Possible values:
791	//   "STREAM_DEFAULT" - Service may automatically determine build log
792	// streaming behavior.
793	//   "STREAM_ON" - Build logs should be streamed to Google Cloud
794	// Storage.
795	//   "STREAM_OFF" - Build logs should not be streamed to Google Cloud
796	// Storage; they will be written when the build is completed.
797	LogStreamingOption string `json:"logStreamingOption,omitempty"`
798
799	// Logging: Option to specify the logging mode, which determines if and
800	// where build logs are stored.
801	//
802	// Possible values:
803	//   "LOGGING_UNSPECIFIED" - The service determines the logging mode.
804	// The default is `LEGACY`. Do not rely on the default logging behavior
805	// as it may change in the future.
806	//   "LEGACY" - Cloud Logging and Cloud Storage logging are enabled.
807	//   "GCS_ONLY" - Only Cloud Storage logging is enabled.
808	//   "STACKDRIVER_ONLY" - This option is the same as CLOUD_LOGGING_ONLY.
809	//   "CLOUD_LOGGING_ONLY" - Only Cloud Logging is enabled. Note that
810	// logs for both the Cloud Console UI and Cloud SDK are based on Cloud
811	// Storage logs, so neither will provide logs if this option is chosen.
812	//   "NONE" - Turn off all logging. No build logs will be captured.
813	Logging string `json:"logging,omitempty"`
814
815	// MachineType: Compute Engine machine type on which to run the build.
816	//
817	// Possible values:
818	//   "UNSPECIFIED" - Standard machine type.
819	//   "N1_HIGHCPU_8" - Highcpu machine with 8 CPUs.
820	//   "N1_HIGHCPU_32" - Highcpu machine with 32 CPUs.
821	//   "E2_HIGHCPU_8" - Highcpu e2 machine with 8 CPUs.
822	//   "E2_HIGHCPU_32" - Highcpu e2 machine with 32 CPUs.
823	MachineType string `json:"machineType,omitempty"`
824
825	// Pool: Optional. Specification for execution on a `WorkerPool`. See
826	// running builds in a private pool
827	// (https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool)
828	// for more information.
829	Pool *PoolOption `json:"pool,omitempty"`
830
831	// RequestedVerifyOption: Requested verifiability options.
832	//
833	// Possible values:
834	//   "NOT_VERIFIED" - Not a verifiable build. (default)
835	//   "VERIFIED" - Verified build.
836	RequestedVerifyOption string `json:"requestedVerifyOption,omitempty"`
837
838	// SecretEnv: A list of global environment variables, which are
839	// encrypted using a Cloud Key Management Service crypto key. These
840	// values must be specified in the build's `Secret`. These variables
841	// will be available to all build steps in this build.
842	SecretEnv []string `json:"secretEnv,omitempty"`
843
844	// SourceProvenanceHash: Requested hash for SourceProvenance.
845	//
846	// Possible values:
847	//   "NONE" - No hash requested.
848	//   "SHA256" - Use a sha256 hash.
849	//   "MD5" - Use a md5 hash.
850	SourceProvenanceHash []string `json:"sourceProvenanceHash,omitempty"`
851
852	// SubstitutionOption: Option to specify behavior when there is an error
853	// in the substitution checks. NOTE: this is always set to ALLOW_LOOSE
854	// for triggered builds and cannot be overridden in the build
855	// configuration file.
856	//
857	// Possible values:
858	//   "MUST_MATCH" - Fails the build if error in substitutions checks,
859	// like missing a substitution in the template or in the map.
860	//   "ALLOW_LOOSE" - Do not fail the build if error in substitutions
861	// checks.
862	SubstitutionOption string `json:"substitutionOption,omitempty"`
863
864	// Volumes: Global list of volumes to mount for ALL build steps Each
865	// volume is created as an empty volume prior to starting the build
866	// process. Upon completion of the build, volumes and their contents are
867	// discarded. Global volume names and paths cannot conflict with the
868	// volumes defined a build step. Using a global volume in a build with
869	// only one step is not valid as it is indicative of a build request
870	// with an incorrect configuration.
871	Volumes []*Volume `json:"volumes,omitempty"`
872
873	// WorkerPool: This field deprecated; please use `pool.name` instead.
874	WorkerPool string `json:"workerPool,omitempty"`
875
876	// ForceSendFields is a list of field names (e.g. "DiskSizeGb") to
877	// unconditionally include in API requests. By default, fields with
878	// empty or default values are omitted from API requests. However, any
879	// non-pointer, non-interface field appearing in ForceSendFields will be
880	// sent to the server regardless of whether the field is empty or not.
881	// This may be used to include empty fields in Patch requests.
882	ForceSendFields []string `json:"-"`
883
884	// NullFields is a list of field names (e.g. "DiskSizeGb") to include in
885	// API requests with the JSON null value. By default, fields with empty
886	// values are omitted from API requests. However, any field with an
887	// empty value appearing in NullFields will be sent to the server as
888	// null. It is an error if a field in this list has a non-empty value.
889	// This may be used to include null fields in Patch requests.
890	NullFields []string `json:"-"`
891}
892
893func (s *BuildOptions) MarshalJSON() ([]byte, error) {
894	type NoMethod BuildOptions
895	raw := NoMethod(*s)
896	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
897}
898
899// BuildStep: A step in the build pipeline.
900type BuildStep struct {
901	// Args: A list of arguments that will be presented to the step when it
902	// is started. If the image used to run the step's container has an
903	// entrypoint, the `args` are used as arguments to that entrypoint. If
904	// the image does not define an entrypoint, the first element in args is
905	// used as the entrypoint, and the remainder will be used as arguments.
906	Args []string `json:"args,omitempty"`
907
908	// Dir: Working directory to use when running this step's container. If
909	// this value is a relative path, it is relative to the build's working
910	// directory. If this value is absolute, it may be outside the build's
911	// working directory, in which case the contents of the path may not be
912	// persisted across build step executions, unless a `volume` for that
913	// path is specified. If the build specifies a `RepoSource` with `dir`
914	// and a step with a `dir`, which specifies an absolute path, the
915	// `RepoSource` `dir` is ignored for the step's execution.
916	Dir string `json:"dir,omitempty"`
917
918	// Entrypoint: Entrypoint to be used instead of the build step image's
919	// default entrypoint. If unset, the image's default entrypoint is used.
920	Entrypoint string `json:"entrypoint,omitempty"`
921
922	// Env: A list of environment variable definitions to be used when
923	// running a step. The elements are of the form "KEY=VALUE" for the
924	// environment variable "KEY" being given the value "VALUE".
925	Env []string `json:"env,omitempty"`
926
927	// Id: Unique identifier for this build step, used in `wait_for` to
928	// reference this build step as a dependency.
929	Id string `json:"id,omitempty"`
930
931	// Name: Required. The name of the container image that will run this
932	// particular build step. If the image is available in the host's Docker
933	// daemon's cache, it will be run directly. If not, the host will
934	// attempt to pull the image first, using the builder service account's
935	// credentials if necessary. The Docker daemon's cache will already have
936	// the latest versions of all of the officially supported build steps
937	// (https://github.com/GoogleCloudPlatform/cloud-builders
938	// (https://github.com/GoogleCloudPlatform/cloud-builders)). The Docker
939	// daemon will also have cached many of the layers for some popular
940	// images, like "ubuntu", "debian", but they will be refreshed at the
941	// time you attempt to use them. If you built an image in a previous
942	// build step, it will be stored in the host's Docker daemon's cache and
943	// is available to use as the name for a later build step.
944	Name string `json:"name,omitempty"`
945
946	// PullTiming: Output only. Stores timing information for pulling this
947	// build step's builder image only.
948	PullTiming *TimeSpan `json:"pullTiming,omitempty"`
949
950	// Script: A shell script to be executed in the step. When script is
951	// provided, the user cannot specify the entrypoint or args.
952	Script string `json:"script,omitempty"`
953
954	// SecretEnv: A list of environment variables which are encrypted using
955	// a Cloud Key Management Service crypto key. These values must be
956	// specified in the build's `Secret`.
957	SecretEnv []string `json:"secretEnv,omitempty"`
958
959	// Status: Output only. Status of the build step. At this time, build
960	// step status is only updated on build completion; step status is not
961	// updated in real-time as the build progresses.
962	//
963	// Possible values:
964	//   "STATUS_UNKNOWN" - Status of the build is unknown.
965	//   "PENDING" - Build has been created and is pending execution and
966	// queuing. It has not been queued.
967	//   "QUEUED" - Build or step is queued; work has not yet begun.
968	//   "WORKING" - Build or step is being executed.
969	//   "SUCCESS" - Build or step finished successfully.
970	//   "FAILURE" - Build or step failed to complete successfully.
971	//   "INTERNAL_ERROR" - Build or step failed due to an internal cause.
972	//   "TIMEOUT" - Build or step took longer than was allowed.
973	//   "CANCELLED" - Build or step was canceled by a user.
974	//   "EXPIRED" - Build was enqueued for longer than the value of
975	// `queue_ttl`.
976	Status string `json:"status,omitempty"`
977
978	// Timeout: Time limit for executing this build step. If not defined,
979	// the step has no time limit and will be allowed to continue to run
980	// until either it completes or the build itself times out.
981	Timeout string `json:"timeout,omitempty"`
982
983	// Timing: Output only. Stores timing information for executing this
984	// build step.
985	Timing *TimeSpan `json:"timing,omitempty"`
986
987	// Volumes: List of volumes to mount into the build step. Each volume is
988	// created as an empty volume prior to execution of the build step. Upon
989	// completion of the build, volumes and their contents are discarded.
990	// Using a named volume in only one step is not valid as it is
991	// indicative of a build request with an incorrect configuration.
992	Volumes []*Volume `json:"volumes,omitempty"`
993
994	// WaitFor: The ID(s) of the step(s) that this build step depends on.
995	// This build step will not start until all the build steps in
996	// `wait_for` have completed successfully. If `wait_for` is empty, this
997	// build step will start when all previous build steps in the
998	// `Build.Steps` list have completed successfully.
999	WaitFor []string `json:"waitFor,omitempty"`
1000
1001	// ForceSendFields is a list of field names (e.g. "Args") to
1002	// unconditionally include in API requests. By default, fields with
1003	// empty or default values are omitted from API requests. However, any
1004	// non-pointer, non-interface field appearing in ForceSendFields will be
1005	// sent to the server regardless of whether the field is empty or not.
1006	// This may be used to include empty fields in Patch requests.
1007	ForceSendFields []string `json:"-"`
1008
1009	// NullFields is a list of field names (e.g. "Args") to include in API
1010	// requests with the JSON null value. By default, fields with empty
1011	// values are omitted from API requests. However, any field with an
1012	// empty value appearing in NullFields will be sent to the server as
1013	// null. It is an error if a field in this list has a non-empty value.
1014	// This may be used to include null fields in Patch requests.
1015	NullFields []string `json:"-"`
1016}
1017
1018func (s *BuildStep) MarshalJSON() ([]byte, error) {
1019	type NoMethod BuildStep
1020	raw := NoMethod(*s)
1021	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1022}
1023
1024// BuildTrigger: Configuration for an automated build in response to
1025// source repository changes.
1026type BuildTrigger struct {
1027	// ApprovalConfig: Configuration for manual approval to start a build
1028	// invocation of this BuildTrigger.
1029	ApprovalConfig *ApprovalConfig `json:"approvalConfig,omitempty"`
1030
1031	// Autodetect: Autodetect build configuration. The following precedence
1032	// is used (case insensitive): 1. cloudbuild.yaml 2. cloudbuild.yml 3.
1033	// cloudbuild.json 4. Dockerfile Currently only available for GitHub App
1034	// Triggers.
1035	Autodetect bool `json:"autodetect,omitempty"`
1036
1037	// Build: Contents of the build template.
1038	Build *Build `json:"build,omitempty"`
1039
1040	// CreateTime: Output only. Time when the trigger was created.
1041	CreateTime string `json:"createTime,omitempty"`
1042
1043	// Description: Human-readable description of this trigger.
1044	Description string `json:"description,omitempty"`
1045
1046	// Disabled: If true, the trigger will never automatically execute a
1047	// build.
1048	Disabled bool `json:"disabled,omitempty"`
1049
1050	// Filename: Path, from the source root, to the build configuration file
1051	// (i.e. cloudbuild.yaml).
1052	Filename string `json:"filename,omitempty"`
1053
1054	// Filter: A Common Expression Language string.
1055	Filter string `json:"filter,omitempty"`
1056
1057	// GitFileSource: The file source describing the local or remote Build
1058	// template.
1059	GitFileSource *GitFileSource `json:"gitFileSource,omitempty"`
1060
1061	// Github: GitHubEventsConfig describes the configuration of a trigger
1062	// that creates a build whenever a GitHub event is received. Mutually
1063	// exclusive with `trigger_template`.
1064	Github *GitHubEventsConfig `json:"github,omitempty"`
1065
1066	// Id: Output only. Unique identifier of the trigger.
1067	Id string `json:"id,omitempty"`
1068
1069	// IgnoredFiles: ignored_files and included_files are file glob matches
1070	// using https://golang.org/pkg/path/filepath/#Match extended with
1071	// support for "**". If ignored_files and changed files are both empty,
1072	// then they are not used to determine whether or not to trigger a
1073	// build. If ignored_files is not empty, then we ignore any files that
1074	// match any of the ignored_file globs. If the change has no files that
1075	// are outside of the ignored_files globs, then we do not trigger a
1076	// build.
1077	IgnoredFiles []string `json:"ignoredFiles,omitempty"`
1078
1079	// IncludedFiles: If any of the files altered in the commit pass the
1080	// ignored_files filter and included_files is empty, then as far as this
1081	// filter is concerned, we should trigger the build. If any of the files
1082	// altered in the commit pass the ignored_files filter and
1083	// included_files is not empty, then we make sure that at least one of
1084	// those files matches a included_files glob. If not, then we do not
1085	// trigger a build.
1086	IncludedFiles []string `json:"includedFiles,omitempty"`
1087
1088	// Name: User-assigned name of the trigger. Must be unique within the
1089	// project. Trigger names must meet the following requirements: + They
1090	// must contain only alphanumeric characters and dashes. + They can be
1091	// 1-64 characters long. + They must begin and end with an alphanumeric
1092	// character.
1093	Name string `json:"name,omitempty"`
1094
1095	// PubsubConfig: PubsubConfig describes the configuration of a trigger
1096	// that creates a build whenever a Pub/Sub message is published.
1097	PubsubConfig *PubsubConfig `json:"pubsubConfig,omitempty"`
1098
1099	// ResourceName: The `Trigger` name with format:
1100	// `projects/{project}/locations/{location}/triggers/{trigger}`, where
1101	// {trigger} is a unique identifier generated by the service.
1102	ResourceName string `json:"resourceName,omitempty"`
1103
1104	// ServiceAccount: The service account used for all user-controlled
1105	// operations including UpdateBuildTrigger, RunBuildTrigger,
1106	// CreateBuild, and CancelBuild. If no service account is set, then the
1107	// standard Cloud Build service account
1108	// ([PROJECT_NUM]@system.gserviceaccount.com) will be used instead.
1109	// Format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}`
1110	ServiceAccount string `json:"serviceAccount,omitempty"`
1111
1112	// SourceToBuild: The repo and ref of the repository from which to
1113	// build. This field is used only for those triggers that do not respond
1114	// to SCM events. Triggers that respond to such events build source at
1115	// whatever commit caused the event. This field is currently only used
1116	// by Webhook, Pub/Sub, Manual, and Cron triggers.
1117	SourceToBuild *GitRepoSource `json:"sourceToBuild,omitempty"`
1118
1119	// Substitutions: Substitutions for Build resource. The keys must match
1120	// the following regular expression: `^_[A-Z0-9_]+$`.
1121	Substitutions map[string]string `json:"substitutions,omitempty"`
1122
1123	// Tags: Tags for annotation of a `BuildTrigger`
1124	Tags []string `json:"tags,omitempty"`
1125
1126	// TriggerTemplate: Template describing the types of source changes to
1127	// trigger a build. Branch and tag names in trigger templates are
1128	// interpreted as regular expressions. Any branch or tag change that
1129	// matches that regular expression will trigger a build. Mutually
1130	// exclusive with `github`.
1131	TriggerTemplate *RepoSource `json:"triggerTemplate,omitempty"`
1132
1133	// WebhookConfig: WebhookConfig describes the configuration of a trigger
1134	// that creates a build whenever a webhook is sent to a trigger's
1135	// webhook URL.
1136	WebhookConfig *WebhookConfig `json:"webhookConfig,omitempty"`
1137
1138	// ServerResponse contains the HTTP response code and headers from the
1139	// server.
1140	googleapi.ServerResponse `json:"-"`
1141
1142	// ForceSendFields is a list of field names (e.g. "ApprovalConfig") to
1143	// unconditionally include in API requests. By default, fields with
1144	// empty or default values are omitted from API requests. However, any
1145	// non-pointer, non-interface field appearing in ForceSendFields will be
1146	// sent to the server regardless of whether the field is empty or not.
1147	// This may be used to include empty fields in Patch requests.
1148	ForceSendFields []string `json:"-"`
1149
1150	// NullFields is a list of field names (e.g. "ApprovalConfig") to
1151	// include in API requests with the JSON null value. By default, fields
1152	// with empty values are omitted from API requests. However, any field
1153	// with an empty value appearing in NullFields will be sent to the
1154	// server as null. It is an error if a field in this list has a
1155	// non-empty value. This may be used to include null fields in Patch
1156	// requests.
1157	NullFields []string `json:"-"`
1158}
1159
1160func (s *BuildTrigger) MarshalJSON() ([]byte, error) {
1161	type NoMethod BuildTrigger
1162	raw := NoMethod(*s)
1163	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1164}
1165
1166// BuiltImage: An image built by the pipeline.
1167type BuiltImage struct {
1168	// Digest: Docker Registry 2.0 digest.
1169	Digest string `json:"digest,omitempty"`
1170
1171	// Name: Name used to push the container image to Google Container
1172	// Registry, as presented to `docker push`.
1173	Name string `json:"name,omitempty"`
1174
1175	// PushTiming: Output only. Stores timing information for pushing the
1176	// specified image.
1177	PushTiming *TimeSpan `json:"pushTiming,omitempty"`
1178
1179	// ForceSendFields is a list of field names (e.g. "Digest") to
1180	// unconditionally include in API requests. By default, fields with
1181	// empty or default values are omitted from API requests. However, any
1182	// non-pointer, non-interface field appearing in ForceSendFields will be
1183	// sent to the server regardless of whether the field is empty or not.
1184	// This may be used to include empty fields in Patch requests.
1185	ForceSendFields []string `json:"-"`
1186
1187	// NullFields is a list of field names (e.g. "Digest") to include in API
1188	// requests with the JSON null value. By default, fields with empty
1189	// values are omitted from API requests. However, any field with an
1190	// empty value appearing in NullFields will be sent to the server as
1191	// null. It is an error if a field in this list has a non-empty value.
1192	// This may be used to include null fields in Patch requests.
1193	NullFields []string `json:"-"`
1194}
1195
1196func (s *BuiltImage) MarshalJSON() ([]byte, error) {
1197	type NoMethod BuiltImage
1198	raw := NoMethod(*s)
1199	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1200}
1201
1202// CancelBuildRequest: Request to cancel an ongoing build.
1203type CancelBuildRequest struct {
1204	// Id: Required. ID of the build.
1205	Id string `json:"id,omitempty"`
1206
1207	// Name: The name of the `Build` to cancel. Format:
1208	// `projects/{project}/locations/{location}/builds/{build}`
1209	Name string `json:"name,omitempty"`
1210
1211	// ProjectId: Required. ID of the project.
1212	ProjectId string `json:"projectId,omitempty"`
1213
1214	// ForceSendFields is a list of field names (e.g. "Id") to
1215	// unconditionally include in API requests. By default, fields with
1216	// empty or default values are omitted from API requests. However, any
1217	// non-pointer, non-interface field appearing in ForceSendFields will be
1218	// sent to the server regardless of whether the field is empty or not.
1219	// This may be used to include empty fields in Patch requests.
1220	ForceSendFields []string `json:"-"`
1221
1222	// NullFields is a list of field names (e.g. "Id") to include in API
1223	// requests with the JSON null value. By default, fields with empty
1224	// values are omitted from API requests. However, any field with an
1225	// empty value appearing in NullFields will be sent to the server as
1226	// null. It is an error if a field in this list has a non-empty value.
1227	// This may be used to include null fields in Patch requests.
1228	NullFields []string `json:"-"`
1229}
1230
1231func (s *CancelBuildRequest) MarshalJSON() ([]byte, error) {
1232	type NoMethod CancelBuildRequest
1233	raw := NoMethod(*s)
1234	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1235}
1236
1237// CancelOperationRequest: The request message for
1238// Operations.CancelOperation.
1239type CancelOperationRequest struct {
1240}
1241
1242// CreateGitHubEnterpriseConfigOperationMetadata: Metadata for
1243// `CreateGithubEnterpriseConfig` operation.
1244type CreateGitHubEnterpriseConfigOperationMetadata struct {
1245	// CompleteTime: Time the operation was completed.
1246	CompleteTime string `json:"completeTime,omitempty"`
1247
1248	// CreateTime: Time the operation was created.
1249	CreateTime string `json:"createTime,omitempty"`
1250
1251	// GithubEnterpriseConfig: The resource name of the GitHubEnterprise to
1252	// be created. Format:
1253	// `projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}`
1254	// .
1255	GithubEnterpriseConfig string `json:"githubEnterpriseConfig,omitempty"`
1256
1257	// ForceSendFields is a list of field names (e.g. "CompleteTime") to
1258	// unconditionally include in API requests. By default, fields with
1259	// empty or default values are omitted from API requests. However, any
1260	// non-pointer, non-interface field appearing in ForceSendFields will be
1261	// sent to the server regardless of whether the field is empty or not.
1262	// This may be used to include empty fields in Patch requests.
1263	ForceSendFields []string `json:"-"`
1264
1265	// NullFields is a list of field names (e.g. "CompleteTime") to include
1266	// in API requests with the JSON null value. By default, fields with
1267	// empty values are omitted from API requests. However, any field with
1268	// an empty value appearing in NullFields will be sent to the server as
1269	// null. It is an error if a field in this list has a non-empty value.
1270	// This may be used to include null fields in Patch requests.
1271	NullFields []string `json:"-"`
1272}
1273
1274func (s *CreateGitHubEnterpriseConfigOperationMetadata) MarshalJSON() ([]byte, error) {
1275	type NoMethod CreateGitHubEnterpriseConfigOperationMetadata
1276	raw := NoMethod(*s)
1277	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1278}
1279
1280// CreateWorkerPoolOperationMetadata: Metadata for the
1281// `CreateWorkerPool` operation.
1282type CreateWorkerPoolOperationMetadata struct {
1283	// CompleteTime: Time the operation was completed.
1284	CompleteTime string `json:"completeTime,omitempty"`
1285
1286	// CreateTime: Time the operation was created.
1287	CreateTime string `json:"createTime,omitempty"`
1288
1289	// WorkerPool: The resource name of the `WorkerPool` to create. Format:
1290	// `projects/{project}/locations/{location}/workerPools/{worker_pool}`.
1291	WorkerPool string `json:"workerPool,omitempty"`
1292
1293	// ForceSendFields is a list of field names (e.g. "CompleteTime") to
1294	// unconditionally include in API requests. By default, fields with
1295	// empty or default values are omitted from API requests. However, any
1296	// non-pointer, non-interface field appearing in ForceSendFields will be
1297	// sent to the server regardless of whether the field is empty or not.
1298	// This may be used to include empty fields in Patch requests.
1299	ForceSendFields []string `json:"-"`
1300
1301	// NullFields is a list of field names (e.g. "CompleteTime") to include
1302	// in API requests with the JSON null value. By default, fields with
1303	// empty values are omitted from API requests. However, any field with
1304	// an empty value appearing in NullFields will be sent to the server as
1305	// null. It is an error if a field in this list has a non-empty value.
1306	// This may be used to include null fields in Patch requests.
1307	NullFields []string `json:"-"`
1308}
1309
1310func (s *CreateWorkerPoolOperationMetadata) MarshalJSON() ([]byte, error) {
1311	type NoMethod CreateWorkerPoolOperationMetadata
1312	raw := NoMethod(*s)
1313	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1314}
1315
1316// DeleteGitHubEnterpriseConfigOperationMetadata: Metadata for
1317// `DeleteGitHubEnterpriseConfig` operation.
1318type DeleteGitHubEnterpriseConfigOperationMetadata struct {
1319	// CompleteTime: Time the operation was completed.
1320	CompleteTime string `json:"completeTime,omitempty"`
1321
1322	// CreateTime: Time the operation was created.
1323	CreateTime string `json:"createTime,omitempty"`
1324
1325	// GithubEnterpriseConfig: The resource name of the GitHubEnterprise to
1326	// be deleted. Format:
1327	// `projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}`
1328	// .
1329	GithubEnterpriseConfig string `json:"githubEnterpriseConfig,omitempty"`
1330
1331	// ForceSendFields is a list of field names (e.g. "CompleteTime") to
1332	// unconditionally include in API requests. By default, fields with
1333	// empty or default values are omitted from API requests. However, any
1334	// non-pointer, non-interface field appearing in ForceSendFields will be
1335	// sent to the server regardless of whether the field is empty or not.
1336	// This may be used to include empty fields in Patch requests.
1337	ForceSendFields []string `json:"-"`
1338
1339	// NullFields is a list of field names (e.g. "CompleteTime") to include
1340	// in API requests with the JSON null value. By default, fields with
1341	// empty values are omitted from API requests. However, any field with
1342	// an empty value appearing in NullFields will be sent to the server as
1343	// null. It is an error if a field in this list has a non-empty value.
1344	// This may be used to include null fields in Patch requests.
1345	NullFields []string `json:"-"`
1346}
1347
1348func (s *DeleteGitHubEnterpriseConfigOperationMetadata) MarshalJSON() ([]byte, error) {
1349	type NoMethod DeleteGitHubEnterpriseConfigOperationMetadata
1350	raw := NoMethod(*s)
1351	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1352}
1353
1354// DeleteWorkerPoolOperationMetadata: Metadata for the
1355// `DeleteWorkerPool` operation.
1356type DeleteWorkerPoolOperationMetadata struct {
1357	// CompleteTime: Time the operation was completed.
1358	CompleteTime string `json:"completeTime,omitempty"`
1359
1360	// CreateTime: Time the operation was created.
1361	CreateTime string `json:"createTime,omitempty"`
1362
1363	// WorkerPool: The resource name of the `WorkerPool` being deleted.
1364	// Format:
1365	// `projects/{project}/locations/{location}/workerPools/{worker_pool}`.
1366	WorkerPool string `json:"workerPool,omitempty"`
1367
1368	// ForceSendFields is a list of field names (e.g. "CompleteTime") to
1369	// unconditionally include in API requests. By default, fields with
1370	// empty or default values are omitted from API requests. However, any
1371	// non-pointer, non-interface field appearing in ForceSendFields will be
1372	// sent to the server regardless of whether the field is empty or not.
1373	// This may be used to include empty fields in Patch requests.
1374	ForceSendFields []string `json:"-"`
1375
1376	// NullFields is a list of field names (e.g. "CompleteTime") to include
1377	// in API requests with the JSON null value. By default, fields with
1378	// empty values are omitted from API requests. However, any field with
1379	// an empty value appearing in NullFields will be sent to the server as
1380	// null. It is an error if a field in this list has a non-empty value.
1381	// This may be used to include null fields in Patch requests.
1382	NullFields []string `json:"-"`
1383}
1384
1385func (s *DeleteWorkerPoolOperationMetadata) MarshalJSON() ([]byte, error) {
1386	type NoMethod DeleteWorkerPoolOperationMetadata
1387	raw := NoMethod(*s)
1388	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1389}
1390
1391// Empty: A generic empty message that you can re-use to avoid defining
1392// duplicated empty messages in your APIs. A typical example is to use
1393// it as the request or the response type of an API method. For
1394// instance: service Foo { rpc Bar(google.protobuf.Empty) returns
1395// (google.protobuf.Empty); } The JSON representation for `Empty` is
1396// empty JSON object `{}`.
1397type Empty struct {
1398	// ServerResponse contains the HTTP response code and headers from the
1399	// server.
1400	googleapi.ServerResponse `json:"-"`
1401}
1402
1403// FailureInfo: A fatal problem encountered during the execution of the
1404// build.
1405type FailureInfo struct {
1406	// Detail: Explains the failure issue in more detail using hard-coded
1407	// text.
1408	Detail string `json:"detail,omitempty"`
1409
1410	// Type: The name of the failure.
1411	//
1412	// Possible values:
1413	//   "FAILURE_TYPE_UNSPECIFIED" - Type unspecified
1414	//   "PUSH_FAILED" - Unable to push the image to the repository.
1415	//   "PUSH_IMAGE_NOT_FOUND" - Final image not found.
1416	//   "PUSH_NOT_AUTHORIZED" - Unauthorized push of the final image.
1417	//   "LOGGING_FAILURE" - Backend logging failures. Should retry.
1418	//   "USER_BUILD_STEP" - A build step has failed.
1419	//   "FETCH_SOURCE_FAILED" - The source fetching has failed.
1420	Type string `json:"type,omitempty"`
1421
1422	// ForceSendFields is a list of field names (e.g. "Detail") to
1423	// unconditionally include in API requests. By default, fields with
1424	// empty or default values are omitted from API requests. However, any
1425	// non-pointer, non-interface field appearing in ForceSendFields will be
1426	// sent to the server regardless of whether the field is empty or not.
1427	// This may be used to include empty fields in Patch requests.
1428	ForceSendFields []string `json:"-"`
1429
1430	// NullFields is a list of field names (e.g. "Detail") to include in API
1431	// requests with the JSON null value. By default, fields with empty
1432	// values are omitted from API requests. However, any field with an
1433	// empty value appearing in NullFields will be sent to the server as
1434	// null. It is an error if a field in this list has a non-empty value.
1435	// This may be used to include null fields in Patch requests.
1436	NullFields []string `json:"-"`
1437}
1438
1439func (s *FailureInfo) MarshalJSON() ([]byte, error) {
1440	type NoMethod FailureInfo
1441	raw := NoMethod(*s)
1442	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1443}
1444
1445// FileHashes: Container message for hashes of byte content of files,
1446// used in SourceProvenance messages to verify integrity of source input
1447// to the build.
1448type FileHashes struct {
1449	// FileHash: Collection of file hashes.
1450	FileHash []*Hash `json:"fileHash,omitempty"`
1451
1452	// ForceSendFields is a list of field names (e.g. "FileHash") to
1453	// unconditionally include in API requests. By default, fields with
1454	// empty or default values are omitted from API requests. However, any
1455	// non-pointer, non-interface field appearing in ForceSendFields will be
1456	// sent to the server regardless of whether the field is empty or not.
1457	// This may be used to include empty fields in Patch requests.
1458	ForceSendFields []string `json:"-"`
1459
1460	// NullFields is a list of field names (e.g. "FileHash") to include in
1461	// API requests with the JSON null value. By default, fields with empty
1462	// values are omitted from API requests. However, any field with an
1463	// empty value appearing in NullFields will be sent to the server as
1464	// null. It is an error if a field in this list has a non-empty value.
1465	// This may be used to include null fields in Patch requests.
1466	NullFields []string `json:"-"`
1467}
1468
1469func (s *FileHashes) MarshalJSON() ([]byte, error) {
1470	type NoMethod FileHashes
1471	raw := NoMethod(*s)
1472	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1473}
1474
1475// GitFileSource: GitFileSource describes a file within a (possibly
1476// remote) code repository.
1477type GitFileSource struct {
1478	// Path: The path of the file, with the repo root as the root of the
1479	// path.
1480	Path string `json:"path,omitempty"`
1481
1482	// RepoType: See RepoType above.
1483	//
1484	// Possible values:
1485	//   "UNKNOWN" - The default, unknown repo type.
1486	//   "CLOUD_SOURCE_REPOSITORIES" - A Google Cloud Source
1487	// Repositories-hosted repo.
1488	//   "GITHUB" - A GitHub-hosted repo not necessarily on "github.com"
1489	// (i.e. GitHub Enterprise).
1490	RepoType string `json:"repoType,omitempty"`
1491
1492	// Revision: The branch, tag, arbitrary ref, or SHA version of the repo
1493	// to use when resolving the filename (optional). This field respects
1494	// the same syntax/resolution as described here:
1495	// https://git-scm.com/docs/gitrevisions If unspecified, the revision
1496	// from which the trigger invocation originated is assumed to be the
1497	// revision from which to read the specified path.
1498	Revision string `json:"revision,omitempty"`
1499
1500	// Uri: The URI of the repo (optional). If unspecified, the repo from
1501	// which the trigger invocation originated is assumed to be the repo
1502	// from which to read the specified path.
1503	Uri string `json:"uri,omitempty"`
1504
1505	// ForceSendFields is a list of field names (e.g. "Path") to
1506	// unconditionally include in API requests. By default, fields with
1507	// empty or default values are omitted from API requests. However, any
1508	// non-pointer, non-interface field appearing in ForceSendFields will be
1509	// sent to the server regardless of whether the field is empty or not.
1510	// This may be used to include empty fields in Patch requests.
1511	ForceSendFields []string `json:"-"`
1512
1513	// NullFields is a list of field names (e.g. "Path") to include in API
1514	// requests with the JSON null value. By default, fields with empty
1515	// values are omitted from API requests. However, any field with an
1516	// empty value appearing in NullFields will be sent to the server as
1517	// null. It is an error if a field in this list has a non-empty value.
1518	// This may be used to include null fields in Patch requests.
1519	NullFields []string `json:"-"`
1520}
1521
1522func (s *GitFileSource) MarshalJSON() ([]byte, error) {
1523	type NoMethod GitFileSource
1524	raw := NoMethod(*s)
1525	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1526}
1527
1528// GitHubEnterpriseConfig: GitHubEnterpriseConfig represents a
1529// configuration for a GitHub Enterprise server.
1530type GitHubEnterpriseConfig struct {
1531	// AppId: Required. The GitHub app id of the Cloud Build app on the
1532	// GitHub Enterprise server.
1533	AppId int64 `json:"appId,omitempty,string"`
1534
1535	// CreateTime: Output only. Time when the installation was associated
1536	// with the project.
1537	CreateTime string `json:"createTime,omitempty"`
1538
1539	// DisplayName: Name to display for this config.
1540	DisplayName string `json:"displayName,omitempty"`
1541
1542	// HostUrl: The URL of the github enterprise host the configuration is
1543	// for.
1544	HostUrl string `json:"hostUrl,omitempty"`
1545
1546	// Name: Optional. The full resource name for the GitHubEnterpriseConfig
1547	// For example:
1548	// "projects/{$project_id}/githubEnterpriseConfigs/{$config_id}"
1549	Name string `json:"name,omitempty"`
1550
1551	// PeeredNetwork: Optional. The network to be used when reaching out to
1552	// the GitHub Enterprise server. The VPC network must be enabled for
1553	// private service connection. This should be set if the GitHub
1554	// Enterprise server is hosted on-premises and not reachable by public
1555	// internet. If this field is left empty, no network peering will occur
1556	// and calls to the GitHub Enterprise server will be made over the
1557	// public internet. Must be in the format
1558	// `projects/{project}/global/networks/{network}`, where {project} is a
1559	// project number or id and {network} is the name of a VPC network in
1560	// the project.
1561	PeeredNetwork string `json:"peeredNetwork,omitempty"`
1562
1563	// Secrets: Names of secrets in Secret Manager.
1564	Secrets *GitHubEnterpriseSecrets `json:"secrets,omitempty"`
1565
1566	// SslCa: Optional. SSL certificate to use for requests to GitHub
1567	// Enterprise.
1568	SslCa string `json:"sslCa,omitempty"`
1569
1570	// WebhookKey: The key that should be attached to webhook calls to the
1571	// ReceiveWebhook endpoint.
1572	WebhookKey string `json:"webhookKey,omitempty"`
1573
1574	// ServerResponse contains the HTTP response code and headers from the
1575	// server.
1576	googleapi.ServerResponse `json:"-"`
1577
1578	// ForceSendFields is a list of field names (e.g. "AppId") to
1579	// unconditionally include in API requests. By default, fields with
1580	// empty or default values are omitted from API requests. However, any
1581	// non-pointer, non-interface field appearing in ForceSendFields will be
1582	// sent to the server regardless of whether the field is empty or not.
1583	// This may be used to include empty fields in Patch requests.
1584	ForceSendFields []string `json:"-"`
1585
1586	// NullFields is a list of field names (e.g. "AppId") to include in API
1587	// requests with the JSON null value. By default, fields with empty
1588	// values are omitted from API requests. However, any field with an
1589	// empty value appearing in NullFields will be sent to the server as
1590	// null. It is an error if a field in this list has a non-empty value.
1591	// This may be used to include null fields in Patch requests.
1592	NullFields []string `json:"-"`
1593}
1594
1595func (s *GitHubEnterpriseConfig) MarshalJSON() ([]byte, error) {
1596	type NoMethod GitHubEnterpriseConfig
1597	raw := NoMethod(*s)
1598	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1599}
1600
1601// GitHubEnterpriseSecrets: GitHubEnterpriseSecrets represents the names
1602// of all necessary secrets in Secret Manager for a GitHub Enterprise
1603// server. Format is: projects//secrets/.
1604type GitHubEnterpriseSecrets struct {
1605	// OauthClientIdName: The resource name for the OAuth client ID secret
1606	// in Secret Manager.
1607	OauthClientIdName string `json:"oauthClientIdName,omitempty"`
1608
1609	// OauthClientIdVersionName: The resource name for the OAuth client ID
1610	// secret version in Secret Manager.
1611	OauthClientIdVersionName string `json:"oauthClientIdVersionName,omitempty"`
1612
1613	// OauthSecretName: The resource name for the OAuth secret in Secret
1614	// Manager.
1615	OauthSecretName string `json:"oauthSecretName,omitempty"`
1616
1617	// OauthSecretVersionName: The resource name for the OAuth secret secret
1618	// version in Secret Manager.
1619	OauthSecretVersionName string `json:"oauthSecretVersionName,omitempty"`
1620
1621	// PrivateKeyName: The resource name for the private key secret.
1622	PrivateKeyName string `json:"privateKeyName,omitempty"`
1623
1624	// PrivateKeyVersionName: The resource name for the private key secret
1625	// version.
1626	PrivateKeyVersionName string `json:"privateKeyVersionName,omitempty"`
1627
1628	// WebhookSecretName: The resource name for the webhook secret in Secret
1629	// Manager.
1630	WebhookSecretName string `json:"webhookSecretName,omitempty"`
1631
1632	// WebhookSecretVersionName: The resource name for the webhook secret
1633	// secret version in Secret Manager.
1634	WebhookSecretVersionName string `json:"webhookSecretVersionName,omitempty"`
1635
1636	// ForceSendFields is a list of field names (e.g. "OauthClientIdName")
1637	// to unconditionally include in API requests. By default, fields with
1638	// empty or default values are omitted from API requests. However, any
1639	// non-pointer, non-interface field appearing in ForceSendFields will be
1640	// sent to the server regardless of whether the field is empty or not.
1641	// This may be used to include empty fields in Patch requests.
1642	ForceSendFields []string `json:"-"`
1643
1644	// NullFields is a list of field names (e.g. "OauthClientIdName") to
1645	// include in API requests with the JSON null value. By default, fields
1646	// with empty values are omitted from API requests. However, any field
1647	// with an empty value appearing in NullFields will be sent to the
1648	// server as null. It is an error if a field in this list has a
1649	// non-empty value. This may be used to include null fields in Patch
1650	// requests.
1651	NullFields []string `json:"-"`
1652}
1653
1654func (s *GitHubEnterpriseSecrets) MarshalJSON() ([]byte, error) {
1655	type NoMethod GitHubEnterpriseSecrets
1656	raw := NoMethod(*s)
1657	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1658}
1659
1660// GitHubEventsConfig: GitHubEventsConfig describes the configuration of
1661// a trigger that creates a build whenever a GitHub event is received.
1662type GitHubEventsConfig struct {
1663	// EnterpriseConfigResourceName: Optional. The resource name of the
1664	// github enterprise config that should be applied to this installation.
1665	// For example:
1666	// "projects/{$project_id}/githubEnterpriseConfigs/{$config_id}"
1667	EnterpriseConfigResourceName string `json:"enterpriseConfigResourceName,omitempty"`
1668
1669	// InstallationId: The installationID that emits the GitHub event.
1670	InstallationId int64 `json:"installationId,omitempty,string"`
1671
1672	// Name: Name of the repository. For example: The name for
1673	// https://github.com/googlecloudplatform/cloud-builders is
1674	// "cloud-builders".
1675	Name string `json:"name,omitempty"`
1676
1677	// Owner: Owner of the repository. For example: The owner for
1678	// https://github.com/googlecloudplatform/cloud-builders is
1679	// "googlecloudplatform".
1680	Owner string `json:"owner,omitempty"`
1681
1682	// PullRequest: filter to match changes in pull requests.
1683	PullRequest *PullRequestFilter `json:"pullRequest,omitempty"`
1684
1685	// Push: filter to match changes in refs like branches, tags.
1686	Push *PushFilter `json:"push,omitempty"`
1687
1688	// ForceSendFields is a list of field names (e.g.
1689	// "EnterpriseConfigResourceName") to unconditionally include in API
1690	// requests. By default, fields with empty or default values are omitted
1691	// from API requests. However, any non-pointer, non-interface field
1692	// appearing in ForceSendFields will be sent to the server regardless of
1693	// whether the field is empty or not. This may be used to include empty
1694	// fields in Patch requests.
1695	ForceSendFields []string `json:"-"`
1696
1697	// NullFields is a list of field names (e.g.
1698	// "EnterpriseConfigResourceName") to include in API requests with the
1699	// JSON null value. By default, fields with empty values are omitted
1700	// from API requests. However, any field with an empty value appearing
1701	// in NullFields will be sent to the server as null. It is an error if a
1702	// field in this list has a non-empty value. This may be used to include
1703	// null fields in Patch requests.
1704	NullFields []string `json:"-"`
1705}
1706
1707func (s *GitHubEventsConfig) MarshalJSON() ([]byte, error) {
1708	type NoMethod GitHubEventsConfig
1709	raw := NoMethod(*s)
1710	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1711}
1712
1713// GitRepoSource: GitRepoSource describes a repo and ref of a code
1714// repository.
1715type GitRepoSource struct {
1716	// Ref: The branch or tag to use. Must start with "refs/" (required).
1717	Ref string `json:"ref,omitempty"`
1718
1719	// RepoType: See RepoType below.
1720	//
1721	// Possible values:
1722	//   "UNKNOWN" - The default, unknown repo type.
1723	//   "CLOUD_SOURCE_REPOSITORIES" - A Google Cloud Source
1724	// Repositories-hosted repo.
1725	//   "GITHUB" - A GitHub-hosted repo not necessarily on "github.com"
1726	// (i.e. GitHub Enterprise).
1727	RepoType string `json:"repoType,omitempty"`
1728
1729	// Uri: The URI of the repo (required).
1730	Uri string `json:"uri,omitempty"`
1731
1732	// ForceSendFields is a list of field names (e.g. "Ref") to
1733	// unconditionally include in API requests. By default, fields with
1734	// empty or default values are omitted from API requests. However, any
1735	// non-pointer, non-interface field appearing in ForceSendFields will be
1736	// sent to the server regardless of whether the field is empty or not.
1737	// This may be used to include empty fields in Patch requests.
1738	ForceSendFields []string `json:"-"`
1739
1740	// NullFields is a list of field names (e.g. "Ref") to include in API
1741	// requests with the JSON null value. By default, fields with empty
1742	// values are omitted from API requests. However, any field with an
1743	// empty value appearing in NullFields will be sent to the server as
1744	// null. It is an error if a field in this list has a non-empty value.
1745	// This may be used to include null fields in Patch requests.
1746	NullFields []string `json:"-"`
1747}
1748
1749func (s *GitRepoSource) MarshalJSON() ([]byte, error) {
1750	type NoMethod GitRepoSource
1751	raw := NoMethod(*s)
1752	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1753}
1754
1755// GoogleDevtoolsCloudbuildV2OperationMetadata: Represents the metadata
1756// of the long-running operation.
1757type GoogleDevtoolsCloudbuildV2OperationMetadata struct {
1758	// ApiVersion: Output only. API version used to start the operation.
1759	ApiVersion string `json:"apiVersion,omitempty"`
1760
1761	// CreateTime: Output only. The time the operation was created.
1762	CreateTime string `json:"createTime,omitempty"`
1763
1764	// EndTime: Output only. The time the operation finished running.
1765	EndTime string `json:"endTime,omitempty"`
1766
1767	// RequestedCancellation: Output only. Identifies whether the user has
1768	// requested cancellation of the operation. Operations that have
1769	// successfully been cancelled have Operation.error value with a
1770	// google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
1771	RequestedCancellation bool `json:"requestedCancellation,omitempty"`
1772
1773	// StatusMessage: Output only. Human-readable status of the operation,
1774	// if any.
1775	StatusMessage string `json:"statusMessage,omitempty"`
1776
1777	// Target: Output only. Server-defined resource path for the target of
1778	// the operation.
1779	Target string `json:"target,omitempty"`
1780
1781	// Verb: Output only. Name of the verb executed by the operation.
1782	Verb string `json:"verb,omitempty"`
1783
1784	// ForceSendFields is a list of field names (e.g. "ApiVersion") to
1785	// unconditionally include in API requests. By default, fields with
1786	// empty or default values are omitted from API requests. However, any
1787	// non-pointer, non-interface field appearing in ForceSendFields will be
1788	// sent to the server regardless of whether the field is empty or not.
1789	// This may be used to include empty fields in Patch requests.
1790	ForceSendFields []string `json:"-"`
1791
1792	// NullFields is a list of field names (e.g. "ApiVersion") to include in
1793	// API requests with the JSON null value. By default, fields with empty
1794	// values are omitted from API requests. However, any field with an
1795	// empty value appearing in NullFields will be sent to the server as
1796	// null. It is an error if a field in this list has a non-empty value.
1797	// This may be used to include null fields in Patch requests.
1798	NullFields []string `json:"-"`
1799}
1800
1801func (s *GoogleDevtoolsCloudbuildV2OperationMetadata) MarshalJSON() ([]byte, error) {
1802	type NoMethod GoogleDevtoolsCloudbuildV2OperationMetadata
1803	raw := NoMethod(*s)
1804	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1805}
1806
1807// HTTPDelivery: HTTPDelivery is the delivery configuration for an HTTP
1808// notification.
1809type HTTPDelivery struct {
1810	// Uri: The URI to which JSON-containing HTTP POST requests should be
1811	// sent.
1812	Uri string `json:"uri,omitempty"`
1813
1814	// ForceSendFields is a list of field names (e.g. "Uri") to
1815	// unconditionally include in API requests. By default, fields with
1816	// empty or default values are omitted from API requests. However, any
1817	// non-pointer, non-interface field appearing in ForceSendFields will be
1818	// sent to the server regardless of whether the field is empty or not.
1819	// This may be used to include empty fields in Patch requests.
1820	ForceSendFields []string `json:"-"`
1821
1822	// NullFields is a list of field names (e.g. "Uri") to include in API
1823	// requests with the JSON null value. By default, fields with empty
1824	// values are omitted from API requests. However, any field with an
1825	// empty value appearing in NullFields will be sent to the server as
1826	// null. It is an error if a field in this list has a non-empty value.
1827	// This may be used to include null fields in Patch requests.
1828	NullFields []string `json:"-"`
1829}
1830
1831func (s *HTTPDelivery) MarshalJSON() ([]byte, error) {
1832	type NoMethod HTTPDelivery
1833	raw := NoMethod(*s)
1834	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1835}
1836
1837// Hash: Container message for hash values.
1838type Hash struct {
1839	// Type: The type of hash that was performed.
1840	//
1841	// Possible values:
1842	//   "NONE" - No hash requested.
1843	//   "SHA256" - Use a sha256 hash.
1844	//   "MD5" - Use a md5 hash.
1845	Type string `json:"type,omitempty"`
1846
1847	// Value: The hash value.
1848	Value string `json:"value,omitempty"`
1849
1850	// ForceSendFields is a list of field names (e.g. "Type") to
1851	// unconditionally include in API requests. By default, fields with
1852	// empty or default values are omitted from API requests. However, any
1853	// non-pointer, non-interface field appearing in ForceSendFields will be
1854	// sent to the server regardless of whether the field is empty or not.
1855	// This may be used to include empty fields in Patch requests.
1856	ForceSendFields []string `json:"-"`
1857
1858	// NullFields is a list of field names (e.g. "Type") to include in API
1859	// requests with the JSON null value. By default, fields with empty
1860	// values are omitted from API requests. However, any field with an
1861	// empty value appearing in NullFields will be sent to the server as
1862	// null. It is an error if a field in this list has a non-empty value.
1863	// This may be used to include null fields in Patch requests.
1864	NullFields []string `json:"-"`
1865}
1866
1867func (s *Hash) MarshalJSON() ([]byte, error) {
1868	type NoMethod Hash
1869	raw := NoMethod(*s)
1870	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1871}
1872
1873// HttpBody: Message that represents an arbitrary HTTP body. It should
1874// only be used for payload formats that can't be represented as JSON,
1875// such as raw binary or an HTML page. This message can be used both in
1876// streaming and non-streaming API methods in the request as well as the
1877// response. It can be used as a top-level request field, which is
1878// convenient if one wants to extract parameters from either the URL or
1879// HTTP template into the request fields and also want access to the raw
1880// HTTP body. Example: message GetResourceRequest { // A unique request
1881// id. string request_id = 1; // The raw HTTP body is bound to this
1882// field. google.api.HttpBody http_body = 2; } service ResourceService {
1883// rpc GetResource(GetResourceRequest) returns (google.api.HttpBody);
1884// rpc UpdateResource(google.api.HttpBody) returns
1885// (google.protobuf.Empty); } Example with streaming methods: service
1886// CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns
1887// (stream google.api.HttpBody); rpc UpdateCalendar(stream
1888// google.api.HttpBody) returns (stream google.api.HttpBody); } Use of
1889// this type only changes how the request and response bodies are
1890// handled, all other features will continue to work unchanged.
1891type HttpBody struct {
1892	// ContentType: The HTTP Content-Type header value specifying the
1893	// content type of the body.
1894	ContentType string `json:"contentType,omitempty"`
1895
1896	// Data: The HTTP request/response body as raw binary.
1897	Data string `json:"data,omitempty"`
1898
1899	// Extensions: Application specific response metadata. Must be set in
1900	// the first response for streaming APIs.
1901	Extensions []googleapi.RawMessage `json:"extensions,omitempty"`
1902
1903	// ForceSendFields is a list of field names (e.g. "ContentType") to
1904	// unconditionally include in API requests. By default, fields with
1905	// empty or default values are omitted from API requests. However, any
1906	// non-pointer, non-interface field appearing in ForceSendFields will be
1907	// sent to the server regardless of whether the field is empty or not.
1908	// This may be used to include empty fields in Patch requests.
1909	ForceSendFields []string `json:"-"`
1910
1911	// NullFields is a list of field names (e.g. "ContentType") to include
1912	// in API requests with the JSON null value. By default, fields with
1913	// empty values are omitted from API requests. However, any field with
1914	// an empty value appearing in NullFields will be sent to the server as
1915	// null. It is an error if a field in this list has a non-empty value.
1916	// This may be used to include null fields in Patch requests.
1917	NullFields []string `json:"-"`
1918}
1919
1920func (s *HttpBody) MarshalJSON() ([]byte, error) {
1921	type NoMethod HttpBody
1922	raw := NoMethod(*s)
1923	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1924}
1925
1926// InlineSecret: Pairs a set of secret environment variables mapped to
1927// encrypted values with the Cloud KMS key to use to decrypt the value.
1928type InlineSecret struct {
1929	// EnvMap: Map of environment variable name to its encrypted value.
1930	// Secret environment variables must be unique across all of a build's
1931	// secrets, and must be used by at least one build step. Values can be
1932	// at most 64 KB in size. There can be at most 100 secret values across
1933	// all of a build's secrets.
1934	EnvMap map[string]string `json:"envMap,omitempty"`
1935
1936	// KmsKeyName: Resource name of Cloud KMS crypto key to decrypt the
1937	// encrypted value. In format:
1938	// projects/*/locations/*/keyRings/*/cryptoKeys/*
1939	KmsKeyName string `json:"kmsKeyName,omitempty"`
1940
1941	// ForceSendFields is a list of field names (e.g. "EnvMap") to
1942	// unconditionally include in API requests. By default, fields with
1943	// empty or default values are omitted from API requests. However, any
1944	// non-pointer, non-interface field appearing in ForceSendFields will be
1945	// sent to the server regardless of whether the field is empty or not.
1946	// This may be used to include empty fields in Patch requests.
1947	ForceSendFields []string `json:"-"`
1948
1949	// NullFields is a list of field names (e.g. "EnvMap") to include in API
1950	// requests with the JSON null value. By default, fields with empty
1951	// values are omitted from API requests. However, any field with an
1952	// empty value appearing in NullFields will be sent to the server as
1953	// null. It is an error if a field in this list has a non-empty value.
1954	// This may be used to include null fields in Patch requests.
1955	NullFields []string `json:"-"`
1956}
1957
1958func (s *InlineSecret) MarshalJSON() ([]byte, error) {
1959	type NoMethod InlineSecret
1960	raw := NoMethod(*s)
1961	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1962}
1963
1964// ListBuildTriggersResponse: Response containing existing
1965// `BuildTriggers`.
1966type ListBuildTriggersResponse struct {
1967	// NextPageToken: Token to receive the next page of results.
1968	NextPageToken string `json:"nextPageToken,omitempty"`
1969
1970	// Triggers: `BuildTriggers` for the project, sorted by `create_time`
1971	// descending.
1972	Triggers []*BuildTrigger `json:"triggers,omitempty"`
1973
1974	// ServerResponse contains the HTTP response code and headers from the
1975	// server.
1976	googleapi.ServerResponse `json:"-"`
1977
1978	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
1979	// unconditionally include in API requests. By default, fields with
1980	// empty or default values are omitted from API requests. However, any
1981	// non-pointer, non-interface field appearing in ForceSendFields will be
1982	// sent to the server regardless of whether the field is empty or not.
1983	// This may be used to include empty fields in Patch requests.
1984	ForceSendFields []string `json:"-"`
1985
1986	// NullFields is a list of field names (e.g. "NextPageToken") to include
1987	// in API requests with the JSON null value. By default, fields with
1988	// empty values are omitted from API requests. However, any field with
1989	// an empty value appearing in NullFields will be sent to the server as
1990	// null. It is an error if a field in this list has a non-empty value.
1991	// This may be used to include null fields in Patch requests.
1992	NullFields []string `json:"-"`
1993}
1994
1995func (s *ListBuildTriggersResponse) MarshalJSON() ([]byte, error) {
1996	type NoMethod ListBuildTriggersResponse
1997	raw := NoMethod(*s)
1998	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1999}
2000
2001// ListBuildsResponse: Response including listed builds.
2002type ListBuildsResponse struct {
2003	// Builds: Builds will be sorted by `create_time`, descending.
2004	Builds []*Build `json:"builds,omitempty"`
2005
2006	// NextPageToken: Token to receive the next page of results. This will
2007	// be absent if the end of the response list has been reached.
2008	NextPageToken string `json:"nextPageToken,omitempty"`
2009
2010	// ServerResponse contains the HTTP response code and headers from the
2011	// server.
2012	googleapi.ServerResponse `json:"-"`
2013
2014	// ForceSendFields is a list of field names (e.g. "Builds") to
2015	// unconditionally include in API requests. By default, fields with
2016	// empty or default values are omitted from API requests. However, any
2017	// non-pointer, non-interface field appearing in ForceSendFields will be
2018	// sent to the server regardless of whether the field is empty or not.
2019	// This may be used to include empty fields in Patch requests.
2020	ForceSendFields []string `json:"-"`
2021
2022	// NullFields is a list of field names (e.g. "Builds") to include in API
2023	// requests with the JSON null value. By default, fields with empty
2024	// values are omitted from API requests. However, any field with an
2025	// empty value appearing in NullFields will be sent to the server as
2026	// null. It is an error if a field in this list has a non-empty value.
2027	// This may be used to include null fields in Patch requests.
2028	NullFields []string `json:"-"`
2029}
2030
2031func (s *ListBuildsResponse) MarshalJSON() ([]byte, error) {
2032	type NoMethod ListBuildsResponse
2033	raw := NoMethod(*s)
2034	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2035}
2036
2037// ListGithubEnterpriseConfigsResponse: RPC response object returned by
2038// ListGithubEnterpriseConfigs RPC method.
2039type ListGithubEnterpriseConfigsResponse struct {
2040	// Configs: A list of GitHubEnterpriseConfigs
2041	Configs []*GitHubEnterpriseConfig `json:"configs,omitempty"`
2042
2043	// ServerResponse contains the HTTP response code and headers from the
2044	// server.
2045	googleapi.ServerResponse `json:"-"`
2046
2047	// ForceSendFields is a list of field names (e.g. "Configs") to
2048	// unconditionally include in API requests. By default, fields with
2049	// empty or default values are omitted from API requests. However, any
2050	// non-pointer, non-interface field appearing in ForceSendFields will be
2051	// sent to the server regardless of whether the field is empty or not.
2052	// This may be used to include empty fields in Patch requests.
2053	ForceSendFields []string `json:"-"`
2054
2055	// NullFields is a list of field names (e.g. "Configs") to include in
2056	// API requests with the JSON null value. By default, fields with empty
2057	// values are omitted from API requests. However, any field with an
2058	// empty value appearing in NullFields will be sent to the server as
2059	// null. It is an error if a field in this list has a non-empty value.
2060	// This may be used to include null fields in Patch requests.
2061	NullFields []string `json:"-"`
2062}
2063
2064func (s *ListGithubEnterpriseConfigsResponse) MarshalJSON() ([]byte, error) {
2065	type NoMethod ListGithubEnterpriseConfigsResponse
2066	raw := NoMethod(*s)
2067	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2068}
2069
2070// ListWorkerPoolsResponse: Response containing existing `WorkerPools`.
2071type ListWorkerPoolsResponse struct {
2072	// NextPageToken: Continuation token used to page through large result
2073	// sets. Provide this value in a subsequent ListWorkerPoolsRequest to
2074	// return the next page of results.
2075	NextPageToken string `json:"nextPageToken,omitempty"`
2076
2077	// WorkerPools: `WorkerPools` for the specified project.
2078	WorkerPools []*WorkerPool `json:"workerPools,omitempty"`
2079
2080	// ServerResponse contains the HTTP response code and headers from the
2081	// server.
2082	googleapi.ServerResponse `json:"-"`
2083
2084	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
2085	// unconditionally include in API requests. By default, fields with
2086	// empty or default values are omitted from API requests. However, any
2087	// non-pointer, non-interface field appearing in ForceSendFields will be
2088	// sent to the server regardless of whether the field is empty or not.
2089	// This may be used to include empty fields in Patch requests.
2090	ForceSendFields []string `json:"-"`
2091
2092	// NullFields is a list of field names (e.g. "NextPageToken") to include
2093	// in API requests with the JSON null value. By default, fields with
2094	// empty values are omitted from API requests. However, any field with
2095	// an empty value appearing in NullFields will be sent to the server as
2096	// null. It is an error if a field in this list has a non-empty value.
2097	// This may be used to include null fields in Patch requests.
2098	NullFields []string `json:"-"`
2099}
2100
2101func (s *ListWorkerPoolsResponse) MarshalJSON() ([]byte, error) {
2102	type NoMethod ListWorkerPoolsResponse
2103	raw := NoMethod(*s)
2104	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2105}
2106
2107// NetworkConfig: Defines the network configuration for the pool.
2108type NetworkConfig struct {
2109	// EgressOption: Option to configure network egress for the workers.
2110	//
2111	// Possible values:
2112	//   "EGRESS_OPTION_UNSPECIFIED" - If set, defaults to PUBLIC_EGRESS.
2113	//   "NO_PUBLIC_EGRESS" - If set, workers are created without any public
2114	// address, which prevents network egress to public IPs unless a network
2115	// proxy is configured.
2116	//   "PUBLIC_EGRESS" - If set, workers are created with a public address
2117	// which allows for public internet egress.
2118	EgressOption string `json:"egressOption,omitempty"`
2119
2120	// PeeredNetwork: Required. Immutable. The network definition that the
2121	// workers are peered to. If this section is left empty, the workers
2122	// will be peered to `WorkerPool.project_id` on the service producer
2123	// network. Must be in the format
2124	// `projects/{project}/global/networks/{network}`, where `{project}` is
2125	// a project number, such as `12345`, and `{network}` is the name of a
2126	// VPC network in the project. See Understanding network configuration
2127	// options
2128	// (https://cloud.google.com/build/docs/private-pools/set-up-private-pool-environment)
2129	PeeredNetwork string `json:"peeredNetwork,omitempty"`
2130
2131	// ForceSendFields is a list of field names (e.g. "EgressOption") to
2132	// unconditionally include in API requests. By default, fields with
2133	// empty or default values are omitted from API requests. However, any
2134	// non-pointer, non-interface field appearing in ForceSendFields will be
2135	// sent to the server regardless of whether the field is empty or not.
2136	// This may be used to include empty fields in Patch requests.
2137	ForceSendFields []string `json:"-"`
2138
2139	// NullFields is a list of field names (e.g. "EgressOption") to include
2140	// in API requests with the JSON null value. By default, fields with
2141	// empty values are omitted from API requests. However, any field with
2142	// an empty value appearing in NullFields will be sent to the server as
2143	// null. It is an error if a field in this list has a non-empty value.
2144	// This may be used to include null fields in Patch requests.
2145	NullFields []string `json:"-"`
2146}
2147
2148func (s *NetworkConfig) MarshalJSON() ([]byte, error) {
2149	type NoMethod NetworkConfig
2150	raw := NoMethod(*s)
2151	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2152}
2153
2154// Notification: Notification is the container which holds the data that
2155// is relevant to this particular notification.
2156type Notification struct {
2157	// Filter: The filter string to use for notification filtering.
2158	// Currently, this is assumed to be a CEL program. See
2159	// https://opensource.google/projects/cel for more.
2160	Filter string `json:"filter,omitempty"`
2161
2162	// HttpDelivery: Configuration for HTTP delivery.
2163	HttpDelivery *HTTPDelivery `json:"httpDelivery,omitempty"`
2164
2165	// SlackDelivery: Configuration for Slack delivery.
2166	SlackDelivery *SlackDelivery `json:"slackDelivery,omitempty"`
2167
2168	// SmtpDelivery: Configuration for SMTP (email) delivery.
2169	SmtpDelivery *SMTPDelivery `json:"smtpDelivery,omitempty"`
2170
2171	// StructDelivery: Escape hatch for users to supply custom delivery
2172	// configs.
2173	StructDelivery googleapi.RawMessage `json:"structDelivery,omitempty"`
2174
2175	// ForceSendFields is a list of field names (e.g. "Filter") to
2176	// unconditionally include in API requests. By default, fields with
2177	// empty or default values are omitted from API requests. However, any
2178	// non-pointer, non-interface field appearing in ForceSendFields will be
2179	// sent to the server regardless of whether the field is empty or not.
2180	// This may be used to include empty fields in Patch requests.
2181	ForceSendFields []string `json:"-"`
2182
2183	// NullFields is a list of field names (e.g. "Filter") to include in API
2184	// requests with the JSON null value. By default, fields with empty
2185	// values are omitted from API requests. However, any field with an
2186	// empty value appearing in NullFields will be sent to the server as
2187	// null. It is an error if a field in this list has a non-empty value.
2188	// This may be used to include null fields in Patch requests.
2189	NullFields []string `json:"-"`
2190}
2191
2192func (s *Notification) MarshalJSON() ([]byte, error) {
2193	type NoMethod Notification
2194	raw := NoMethod(*s)
2195	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2196}
2197
2198// NotifierConfig: NotifierConfig is the top-level configuration
2199// message.
2200type NotifierConfig struct {
2201	// ApiVersion: The API version of this configuration format.
2202	ApiVersion string `json:"apiVersion,omitempty"`
2203
2204	// Kind: The type of notifier to use (e.g. SMTPNotifier).
2205	Kind string `json:"kind,omitempty"`
2206
2207	// Metadata: Metadata for referring to/handling/deploying this notifier.
2208	Metadata *NotifierMetadata `json:"metadata,omitempty"`
2209
2210	// Spec: The actual configuration for this notifier.
2211	Spec *NotifierSpec `json:"spec,omitempty"`
2212
2213	// ForceSendFields is a list of field names (e.g. "ApiVersion") to
2214	// unconditionally include in API requests. By default, fields with
2215	// empty or default values are omitted from API requests. However, any
2216	// non-pointer, non-interface field appearing in ForceSendFields will be
2217	// sent to the server regardless of whether the field is empty or not.
2218	// This may be used to include empty fields in Patch requests.
2219	ForceSendFields []string `json:"-"`
2220
2221	// NullFields is a list of field names (e.g. "ApiVersion") to include in
2222	// API requests with the JSON null value. By default, fields with empty
2223	// values are omitted from API requests. However, any field with an
2224	// empty value appearing in NullFields will be sent to the server as
2225	// null. It is an error if a field in this list has a non-empty value.
2226	// This may be used to include null fields in Patch requests.
2227	NullFields []string `json:"-"`
2228}
2229
2230func (s *NotifierConfig) MarshalJSON() ([]byte, error) {
2231	type NoMethod NotifierConfig
2232	raw := NoMethod(*s)
2233	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2234}
2235
2236// NotifierMetadata: NotifierMetadata contains the data which can be
2237// used to reference or describe this notifier.
2238type NotifierMetadata struct {
2239	// Name: The human-readable and user-given name for the notifier. For
2240	// example: "repo-merge-email-notifier".
2241	Name string `json:"name,omitempty"`
2242
2243	// Notifier: The string representing the name and version of notifier to
2244	// deploy. Expected to be of the form of "/:". For example:
2245	// "gcr.io/my-project/notifiers/smtp:1.2.34".
2246	Notifier string `json:"notifier,omitempty"`
2247
2248	// ForceSendFields is a list of field names (e.g. "Name") to
2249	// unconditionally include in API requests. By default, fields with
2250	// empty or default values are omitted from API requests. However, any
2251	// non-pointer, non-interface field appearing in ForceSendFields will be
2252	// sent to the server regardless of whether the field is empty or not.
2253	// This may be used to include empty fields in Patch requests.
2254	ForceSendFields []string `json:"-"`
2255
2256	// NullFields is a list of field names (e.g. "Name") to include in API
2257	// requests with the JSON null value. By default, fields with empty
2258	// values are omitted from API requests. However, any field with an
2259	// empty value appearing in NullFields will be sent to the server as
2260	// null. It is an error if a field in this list has a non-empty value.
2261	// This may be used to include null fields in Patch requests.
2262	NullFields []string `json:"-"`
2263}
2264
2265func (s *NotifierMetadata) MarshalJSON() ([]byte, error) {
2266	type NoMethod NotifierMetadata
2267	raw := NoMethod(*s)
2268	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2269}
2270
2271// NotifierSecret: NotifierSecret is the container that maps a secret
2272// name (reference) to its Google Cloud Secret Manager resource path.
2273type NotifierSecret struct {
2274	// Name: Name is the local name of the secret, such as the verbatim
2275	// string "my-smtp-password".
2276	Name string `json:"name,omitempty"`
2277
2278	// Value: Value is interpreted to be a resource path for fetching the
2279	// actual (versioned) secret data for this secret. For example, this
2280	// would be a Google Cloud Secret Manager secret version resource path
2281	// like: "projects/my-project/secrets/my-secret/versions/latest".
2282	Value string `json:"value,omitempty"`
2283
2284	// ForceSendFields is a list of field names (e.g. "Name") to
2285	// unconditionally include in API requests. By default, fields with
2286	// empty or default values are omitted from API requests. However, any
2287	// non-pointer, non-interface field appearing in ForceSendFields will be
2288	// sent to the server regardless of whether the field is empty or not.
2289	// This may be used to include empty fields in Patch requests.
2290	ForceSendFields []string `json:"-"`
2291
2292	// NullFields is a list of field names (e.g. "Name") to include in API
2293	// requests with the JSON null value. By default, fields with empty
2294	// values are omitted from API requests. However, any field with an
2295	// empty value appearing in NullFields will be sent to the server as
2296	// null. It is an error if a field in this list has a non-empty value.
2297	// This may be used to include null fields in Patch requests.
2298	NullFields []string `json:"-"`
2299}
2300
2301func (s *NotifierSecret) MarshalJSON() ([]byte, error) {
2302	type NoMethod NotifierSecret
2303	raw := NoMethod(*s)
2304	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2305}
2306
2307// NotifierSecretRef: NotifierSecretRef contains the reference to a
2308// secret stored in the corresponding NotifierSpec.
2309type NotifierSecretRef struct {
2310	// SecretRef: The value of `secret_ref` should be a `name` that is
2311	// registered in a `Secret` in the `secrets` list of the `Spec`.
2312	SecretRef string `json:"secretRef,omitempty"`
2313
2314	// ForceSendFields is a list of field names (e.g. "SecretRef") to
2315	// unconditionally include in API requests. By default, fields with
2316	// empty or default values are omitted from API requests. However, any
2317	// non-pointer, non-interface field appearing in ForceSendFields will be
2318	// sent to the server regardless of whether the field is empty or not.
2319	// This may be used to include empty fields in Patch requests.
2320	ForceSendFields []string `json:"-"`
2321
2322	// NullFields is a list of field names (e.g. "SecretRef") to include in
2323	// API requests with the JSON null value. By default, fields with empty
2324	// values are omitted from API requests. However, any field with an
2325	// empty value appearing in NullFields will be sent to the server as
2326	// null. It is an error if a field in this list has a non-empty value.
2327	// This may be used to include null fields in Patch requests.
2328	NullFields []string `json:"-"`
2329}
2330
2331func (s *NotifierSecretRef) MarshalJSON() ([]byte, error) {
2332	type NoMethod NotifierSecretRef
2333	raw := NoMethod(*s)
2334	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2335}
2336
2337// NotifierSpec: NotifierSpec is the configuration container for
2338// notifications.
2339type NotifierSpec struct {
2340	// Notification: The configuration of this particular notifier.
2341	Notification *Notification `json:"notification,omitempty"`
2342
2343	// Secrets: Configurations for secret resources used by this particular
2344	// notifier.
2345	Secrets []*NotifierSecret `json:"secrets,omitempty"`
2346
2347	// ForceSendFields is a list of field names (e.g. "Notification") to
2348	// unconditionally include in API requests. By default, fields with
2349	// empty or default values are omitted from API requests. However, any
2350	// non-pointer, non-interface field appearing in ForceSendFields will be
2351	// sent to the server regardless of whether the field is empty or not.
2352	// This may be used to include empty fields in Patch requests.
2353	ForceSendFields []string `json:"-"`
2354
2355	// NullFields is a list of field names (e.g. "Notification") to include
2356	// in API requests with the JSON null value. By default, fields with
2357	// empty values are omitted from API requests. However, any field with
2358	// an empty value appearing in NullFields will be sent to the server as
2359	// null. It is an error if a field in this list has a non-empty value.
2360	// This may be used to include null fields in Patch requests.
2361	NullFields []string `json:"-"`
2362}
2363
2364func (s *NotifierSpec) MarshalJSON() ([]byte, error) {
2365	type NoMethod NotifierSpec
2366	raw := NoMethod(*s)
2367	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2368}
2369
2370// Operation: This resource represents a long-running operation that is
2371// the result of a network API call.
2372type Operation struct {
2373	// Done: If the value is `false`, it means the operation is still in
2374	// progress. If `true`, the operation is completed, and either `error`
2375	// or `response` is available.
2376	Done bool `json:"done,omitempty"`
2377
2378	// Error: The error result of the operation in case of failure or
2379	// cancellation.
2380	Error *Status `json:"error,omitempty"`
2381
2382	// Metadata: Service-specific metadata associated with the operation. It
2383	// typically contains progress information and common metadata such as
2384	// create time. Some services might not provide such metadata. Any
2385	// method that returns a long-running operation should document the
2386	// metadata type, if any.
2387	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
2388
2389	// Name: The server-assigned name, which is only unique within the same
2390	// service that originally returns it. If you use the default HTTP
2391	// mapping, the `name` should be a resource name ending with
2392	// `operations/{unique_id}`.
2393	Name string `json:"name,omitempty"`
2394
2395	// Response: The normal response of the operation in case of success. If
2396	// the original method returns no data on success, such as `Delete`, the
2397	// response is `google.protobuf.Empty`. If the original method is
2398	// standard `Get`/`Create`/`Update`, the response should be the
2399	// resource. For other methods, the response should have the type
2400	// `XxxResponse`, where `Xxx` is the original method name. For example,
2401	// if the original method name is `TakeSnapshot()`, the inferred
2402	// response type is `TakeSnapshotResponse`.
2403	Response googleapi.RawMessage `json:"response,omitempty"`
2404
2405	// ServerResponse contains the HTTP response code and headers from the
2406	// server.
2407	googleapi.ServerResponse `json:"-"`
2408
2409	// ForceSendFields is a list of field names (e.g. "Done") to
2410	// unconditionally include in API requests. By default, fields with
2411	// empty or default values are omitted from API requests. However, any
2412	// non-pointer, non-interface field appearing in ForceSendFields will be
2413	// sent to the server regardless of whether the field is empty or not.
2414	// This may be used to include empty fields in Patch requests.
2415	ForceSendFields []string `json:"-"`
2416
2417	// NullFields is a list of field names (e.g. "Done") to include in API
2418	// requests with the JSON null value. By default, fields with empty
2419	// values are omitted from API requests. However, any field with an
2420	// empty value appearing in NullFields will be sent to the server as
2421	// null. It is an error if a field in this list has a non-empty value.
2422	// This may be used to include null fields in Patch requests.
2423	NullFields []string `json:"-"`
2424}
2425
2426func (s *Operation) MarshalJSON() ([]byte, error) {
2427	type NoMethod Operation
2428	raw := NoMethod(*s)
2429	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2430}
2431
2432// OperationMetadata: Represents the metadata of the long-running
2433// operation.
2434type OperationMetadata struct {
2435	// ApiVersion: Output only. API version used to start the operation.
2436	ApiVersion string `json:"apiVersion,omitempty"`
2437
2438	// CancelRequested: Output only. Identifies whether the user has
2439	// requested cancellation of the operation. Operations that have been
2440	// cancelled successfully have Operation.error value with a
2441	// google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
2442	CancelRequested bool `json:"cancelRequested,omitempty"`
2443
2444	// CreateTime: Output only. The time the operation was created.
2445	CreateTime string `json:"createTime,omitempty"`
2446
2447	// EndTime: Output only. The time the operation finished running.
2448	EndTime string `json:"endTime,omitempty"`
2449
2450	// StatusDetail: Output only. Human-readable status of the operation, if
2451	// any.
2452	StatusDetail string `json:"statusDetail,omitempty"`
2453
2454	// Target: Output only. Server-defined resource path for the target of
2455	// the operation.
2456	Target string `json:"target,omitempty"`
2457
2458	// Verb: Output only. Name of the verb executed by the operation.
2459	Verb string `json:"verb,omitempty"`
2460
2461	// ForceSendFields is a list of field names (e.g. "ApiVersion") to
2462	// unconditionally include in API requests. By default, fields with
2463	// empty or default values are omitted from API requests. However, any
2464	// non-pointer, non-interface field appearing in ForceSendFields will be
2465	// sent to the server regardless of whether the field is empty or not.
2466	// This may be used to include empty fields in Patch requests.
2467	ForceSendFields []string `json:"-"`
2468
2469	// NullFields is a list of field names (e.g. "ApiVersion") to include in
2470	// API requests with the JSON null value. By default, fields with empty
2471	// values are omitted from API requests. However, any field with an
2472	// empty value appearing in NullFields will be sent to the server as
2473	// null. It is an error if a field in this list has a non-empty value.
2474	// This may be used to include null fields in Patch requests.
2475	NullFields []string `json:"-"`
2476}
2477
2478func (s *OperationMetadata) MarshalJSON() ([]byte, error) {
2479	type NoMethod OperationMetadata
2480	raw := NoMethod(*s)
2481	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2482}
2483
2484// PoolOption: Details about how a build should be executed on a
2485// `WorkerPool`. See running builds in a private pool
2486// (https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool)
2487// for more information.
2488type PoolOption struct {
2489	// Name: The `WorkerPool` resource to execute the build on. You must
2490	// have `cloudbuild.workerpools.use` on the project hosting the
2491	// WorkerPool. Format
2492	// projects/{project}/locations/{location}/workerPools/{workerPoolId}
2493	Name string `json:"name,omitempty"`
2494
2495	// ForceSendFields is a list of field names (e.g. "Name") to
2496	// unconditionally include in API requests. By default, fields with
2497	// empty or default values are omitted from API requests. However, any
2498	// non-pointer, non-interface field appearing in ForceSendFields will be
2499	// sent to the server regardless of whether the field is empty or not.
2500	// This may be used to include empty fields in Patch requests.
2501	ForceSendFields []string `json:"-"`
2502
2503	// NullFields is a list of field names (e.g. "Name") to include in API
2504	// requests with the JSON null value. By default, fields with empty
2505	// values are omitted from API requests. However, any field with an
2506	// empty value appearing in NullFields will be sent to the server as
2507	// null. It is an error if a field in this list has a non-empty value.
2508	// This may be used to include null fields in Patch requests.
2509	NullFields []string `json:"-"`
2510}
2511
2512func (s *PoolOption) MarshalJSON() ([]byte, error) {
2513	type NoMethod PoolOption
2514	raw := NoMethod(*s)
2515	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2516}
2517
2518// PrivatePoolV1Config: Configuration for a V1 `PrivatePool`.
2519type PrivatePoolV1Config struct {
2520	// NetworkConfig: Network configuration for the pool.
2521	NetworkConfig *NetworkConfig `json:"networkConfig,omitempty"`
2522
2523	// WorkerConfig: Machine configuration for the workers in the pool.
2524	WorkerConfig *WorkerConfig `json:"workerConfig,omitempty"`
2525
2526	// ForceSendFields is a list of field names (e.g. "NetworkConfig") to
2527	// unconditionally include in API requests. By default, fields with
2528	// empty or default values are omitted from API requests. However, any
2529	// non-pointer, non-interface field appearing in ForceSendFields will be
2530	// sent to the server regardless of whether the field is empty or not.
2531	// This may be used to include empty fields in Patch requests.
2532	ForceSendFields []string `json:"-"`
2533
2534	// NullFields is a list of field names (e.g. "NetworkConfig") to include
2535	// in API requests with the JSON null value. By default, fields with
2536	// empty values are omitted from API requests. However, any field with
2537	// an empty value appearing in NullFields will be sent to the server as
2538	// null. It is an error if a field in this list has a non-empty value.
2539	// This may be used to include null fields in Patch requests.
2540	NullFields []string `json:"-"`
2541}
2542
2543func (s *PrivatePoolV1Config) MarshalJSON() ([]byte, error) {
2544	type NoMethod PrivatePoolV1Config
2545	raw := NoMethod(*s)
2546	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2547}
2548
2549// ProcessAppManifestCallbackOperationMetadata: Metadata for
2550// `ProcessAppManifestCallback` operation.
2551type ProcessAppManifestCallbackOperationMetadata struct {
2552	// CompleteTime: Time the operation was completed.
2553	CompleteTime string `json:"completeTime,omitempty"`
2554
2555	// CreateTime: Time the operation was created.
2556	CreateTime string `json:"createTime,omitempty"`
2557
2558	// GithubEnterpriseConfig: The resource name of the GitHubEnterprise to
2559	// be created. Format:
2560	// `projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}`
2561	// .
2562	GithubEnterpriseConfig string `json:"githubEnterpriseConfig,omitempty"`
2563
2564	// ForceSendFields is a list of field names (e.g. "CompleteTime") to
2565	// unconditionally include in API requests. By default, fields with
2566	// empty or default values are omitted from API requests. However, any
2567	// non-pointer, non-interface field appearing in ForceSendFields will be
2568	// sent to the server regardless of whether the field is empty or not.
2569	// This may be used to include empty fields in Patch requests.
2570	ForceSendFields []string `json:"-"`
2571
2572	// NullFields is a list of field names (e.g. "CompleteTime") to include
2573	// in API requests with the JSON null value. By default, fields with
2574	// empty values are omitted from API requests. However, any field with
2575	// an empty value appearing in NullFields will be sent to the server as
2576	// null. It is an error if a field in this list has a non-empty value.
2577	// This may be used to include null fields in Patch requests.
2578	NullFields []string `json:"-"`
2579}
2580
2581func (s *ProcessAppManifestCallbackOperationMetadata) MarshalJSON() ([]byte, error) {
2582	type NoMethod ProcessAppManifestCallbackOperationMetadata
2583	raw := NoMethod(*s)
2584	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2585}
2586
2587// PubsubConfig: PubsubConfig describes the configuration of a trigger
2588// that creates a build whenever a Pub/Sub message is published.
2589type PubsubConfig struct {
2590	// ServiceAccountEmail: Service account that will make the push request.
2591	ServiceAccountEmail string `json:"serviceAccountEmail,omitempty"`
2592
2593	// State: Potential issues with the underlying Pub/Sub subscription
2594	// configuration. Only populated on get requests.
2595	//
2596	// Possible values:
2597	//   "STATE_UNSPECIFIED" - The subscription configuration has not been
2598	// checked.
2599	//   "OK" - The Pub/Sub subscription is properly configured.
2600	//   "SUBSCRIPTION_DELETED" - The subscription has been deleted.
2601	//   "TOPIC_DELETED" - The topic has been deleted.
2602	//   "SUBSCRIPTION_MISCONFIGURED" - Some of the subscription's field are
2603	// misconfigured.
2604	State string `json:"state,omitempty"`
2605
2606	// Subscription: Output only. Name of the subscription. Format is
2607	// `projects/{project}/subscriptions/{subscription}`.
2608	Subscription string `json:"subscription,omitempty"`
2609
2610	// Topic: The name of the topic from which this subscription is
2611	// receiving messages. Format is `projects/{project}/topics/{topic}`.
2612	Topic string `json:"topic,omitempty"`
2613
2614	// ForceSendFields is a list of field names (e.g. "ServiceAccountEmail")
2615	// to unconditionally include in API requests. By default, fields with
2616	// empty or default values are omitted from API requests. However, any
2617	// non-pointer, non-interface field appearing in ForceSendFields will be
2618	// sent to the server regardless of whether the field is empty or not.
2619	// This may be used to include empty fields in Patch requests.
2620	ForceSendFields []string `json:"-"`
2621
2622	// NullFields is a list of field names (e.g. "ServiceAccountEmail") to
2623	// include in API requests with the JSON null value. By default, fields
2624	// with empty values are omitted from API requests. However, any field
2625	// with an empty value appearing in NullFields will be sent to the
2626	// server as null. It is an error if a field in this list has a
2627	// non-empty value. This may be used to include null fields in Patch
2628	// requests.
2629	NullFields []string `json:"-"`
2630}
2631
2632func (s *PubsubConfig) MarshalJSON() ([]byte, error) {
2633	type NoMethod PubsubConfig
2634	raw := NoMethod(*s)
2635	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2636}
2637
2638// PullRequestFilter: PullRequestFilter contains filter properties for
2639// matching GitHub Pull Requests.
2640type PullRequestFilter struct {
2641	// Branch: Regex of branches to match. The syntax of the regular
2642	// expressions accepted is the syntax accepted by RE2 and described at
2643	// https://github.com/google/re2/wiki/Syntax
2644	Branch string `json:"branch,omitempty"`
2645
2646	// CommentControl: Configure builds to run whether a repository owner or
2647	// collaborator need to comment `/gcbrun`.
2648	//
2649	// Possible values:
2650	//   "COMMENTS_DISABLED" - Do not require comments on Pull Requests
2651	// before builds are triggered.
2652	//   "COMMENTS_ENABLED" - Enforce that repository owners or
2653	// collaborators must comment on Pull Requests before builds are
2654	// triggered.
2655	//   "COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY" - Enforce that
2656	// repository owners or collaborators must comment on external
2657	// contributors' Pull Requests before builds are triggered.
2658	CommentControl string `json:"commentControl,omitempty"`
2659
2660	// InvertRegex: If true, branches that do NOT match the git_ref will
2661	// trigger a build.
2662	InvertRegex bool `json:"invertRegex,omitempty"`
2663
2664	// ForceSendFields is a list of field names (e.g. "Branch") to
2665	// unconditionally include in API requests. By default, fields with
2666	// empty or default values are omitted from API requests. However, any
2667	// non-pointer, non-interface field appearing in ForceSendFields will be
2668	// sent to the server regardless of whether the field is empty or not.
2669	// This may be used to include empty fields in Patch requests.
2670	ForceSendFields []string `json:"-"`
2671
2672	// NullFields is a list of field names (e.g. "Branch") to include in API
2673	// requests with the JSON null value. By default, fields with empty
2674	// values are omitted from API requests. However, any field with an
2675	// empty value appearing in NullFields will be sent to the server as
2676	// null. It is an error if a field in this list has a non-empty value.
2677	// This may be used to include null fields in Patch requests.
2678	NullFields []string `json:"-"`
2679}
2680
2681func (s *PullRequestFilter) MarshalJSON() ([]byte, error) {
2682	type NoMethod PullRequestFilter
2683	raw := NoMethod(*s)
2684	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2685}
2686
2687// PushFilter: Push contains filter properties for matching GitHub git
2688// pushes.
2689type PushFilter struct {
2690	// Branch: Regexes matching branches to build. The syntax of the regular
2691	// expressions accepted is the syntax accepted by RE2 and described at
2692	// https://github.com/google/re2/wiki/Syntax
2693	Branch string `json:"branch,omitempty"`
2694
2695	// InvertRegex: When true, only trigger a build if the revision regex
2696	// does NOT match the git_ref regex.
2697	InvertRegex bool `json:"invertRegex,omitempty"`
2698
2699	// Tag: Regexes matching tags to build. The syntax of the regular
2700	// expressions accepted is the syntax accepted by RE2 and described at
2701	// https://github.com/google/re2/wiki/Syntax
2702	Tag string `json:"tag,omitempty"`
2703
2704	// ForceSendFields is a list of field names (e.g. "Branch") to
2705	// unconditionally include in API requests. By default, fields with
2706	// empty or default values are omitted from API requests. However, any
2707	// non-pointer, non-interface field appearing in ForceSendFields will be
2708	// sent to the server regardless of whether the field is empty or not.
2709	// This may be used to include empty fields in Patch requests.
2710	ForceSendFields []string `json:"-"`
2711
2712	// NullFields is a list of field names (e.g. "Branch") to include in API
2713	// requests with the JSON null value. By default, fields with empty
2714	// values are omitted from API requests. However, any field with an
2715	// empty value appearing in NullFields will be sent to the server as
2716	// null. It is an error if a field in this list has a non-empty value.
2717	// This may be used to include null fields in Patch requests.
2718	NullFields []string `json:"-"`
2719}
2720
2721func (s *PushFilter) MarshalJSON() ([]byte, error) {
2722	type NoMethod PushFilter
2723	raw := NoMethod(*s)
2724	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2725}
2726
2727// ReceiveTriggerWebhookResponse: ReceiveTriggerWebhookResponse
2728// [Experimental] is the response object for the ReceiveTriggerWebhook
2729// method.
2730type ReceiveTriggerWebhookResponse struct {
2731	// ServerResponse contains the HTTP response code and headers from the
2732	// server.
2733	googleapi.ServerResponse `json:"-"`
2734}
2735
2736// RepoSource: Location of the source in a Google Cloud Source
2737// Repository.
2738type RepoSource struct {
2739	// BranchName: Regex matching branches to build. The syntax of the
2740	// regular expressions accepted is the syntax accepted by RE2 and
2741	// described at https://github.com/google/re2/wiki/Syntax
2742	BranchName string `json:"branchName,omitempty"`
2743
2744	// CommitSha: Explicit commit SHA to build.
2745	CommitSha string `json:"commitSha,omitempty"`
2746
2747	// Dir: Directory, relative to the source root, in which to run the
2748	// build. This must be a relative path. If a step's `dir` is specified
2749	// and is an absolute path, this value is ignored for that step's
2750	// execution.
2751	Dir string `json:"dir,omitempty"`
2752
2753	// InvertRegex: Only trigger a build if the revision regex does NOT
2754	// match the revision regex.
2755	InvertRegex bool `json:"invertRegex,omitempty"`
2756
2757	// ProjectId: ID of the project that owns the Cloud Source Repository.
2758	// If omitted, the project ID requesting the build is assumed.
2759	ProjectId string `json:"projectId,omitempty"`
2760
2761	// RepoName: Name of the Cloud Source Repository.
2762	RepoName string `json:"repoName,omitempty"`
2763
2764	// Substitutions: Substitutions to use in a triggered build. Should only
2765	// be used with RunBuildTrigger
2766	Substitutions map[string]string `json:"substitutions,omitempty"`
2767
2768	// TagName: Regex matching tags to build. The syntax of the regular
2769	// expressions accepted is the syntax accepted by RE2 and described at
2770	// https://github.com/google/re2/wiki/Syntax
2771	TagName string `json:"tagName,omitempty"`
2772
2773	// ForceSendFields is a list of field names (e.g. "BranchName") to
2774	// unconditionally include in API requests. By default, fields with
2775	// empty or default values are omitted from API requests. However, any
2776	// non-pointer, non-interface field appearing in ForceSendFields will be
2777	// sent to the server regardless of whether the field is empty or not.
2778	// This may be used to include empty fields in Patch requests.
2779	ForceSendFields []string `json:"-"`
2780
2781	// NullFields is a list of field names (e.g. "BranchName") to include in
2782	// API requests with the JSON null value. By default, fields with empty
2783	// values are omitted from API requests. However, any field with an
2784	// empty value appearing in NullFields will be sent to the server as
2785	// null. It is an error if a field in this list has a non-empty value.
2786	// This may be used to include null fields in Patch requests.
2787	NullFields []string `json:"-"`
2788}
2789
2790func (s *RepoSource) MarshalJSON() ([]byte, error) {
2791	type NoMethod RepoSource
2792	raw := NoMethod(*s)
2793	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2794}
2795
2796// Results: Artifacts created by the build pipeline.
2797type Results struct {
2798	// ArtifactManifest: Path to the artifact manifest. Only populated when
2799	// artifacts are uploaded.
2800	ArtifactManifest string `json:"artifactManifest,omitempty"`
2801
2802	// ArtifactTiming: Time to push all non-container artifacts.
2803	ArtifactTiming *TimeSpan `json:"artifactTiming,omitempty"`
2804
2805	// BuildStepImages: List of build step digests, in the order
2806	// corresponding to build step indices.
2807	BuildStepImages []string `json:"buildStepImages,omitempty"`
2808
2809	// BuildStepOutputs: List of build step outputs, produced by builder
2810	// images, in the order corresponding to build step indices. Cloud
2811	// Builders (https://cloud.google.com/cloud-build/docs/cloud-builders)
2812	// can produce this output by writing to `$BUILDER_OUTPUT/output`. Only
2813	// the first 4KB of data is stored.
2814	BuildStepOutputs []string `json:"buildStepOutputs,omitempty"`
2815
2816	// Images: Container images that were built as a part of the build.
2817	Images []*BuiltImage `json:"images,omitempty"`
2818
2819	// NumArtifacts: Number of artifacts uploaded. Only populated when
2820	// artifacts are uploaded.
2821	NumArtifacts int64 `json:"numArtifacts,omitempty,string"`
2822
2823	// ForceSendFields is a list of field names (e.g. "ArtifactManifest") to
2824	// unconditionally include in API requests. By default, fields with
2825	// empty or default values are omitted from API requests. However, any
2826	// non-pointer, non-interface field appearing in ForceSendFields will be
2827	// sent to the server regardless of whether the field is empty or not.
2828	// This may be used to include empty fields in Patch requests.
2829	ForceSendFields []string `json:"-"`
2830
2831	// NullFields is a list of field names (e.g. "ArtifactManifest") to
2832	// include in API requests with the JSON null value. By default, fields
2833	// with empty values are omitted from API requests. However, any field
2834	// with an empty value appearing in NullFields will be sent to the
2835	// server as null. It is an error if a field in this list has a
2836	// non-empty value. This may be used to include null fields in Patch
2837	// requests.
2838	NullFields []string `json:"-"`
2839}
2840
2841func (s *Results) MarshalJSON() ([]byte, error) {
2842	type NoMethod Results
2843	raw := NoMethod(*s)
2844	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2845}
2846
2847// RetryBuildRequest: Specifies a build to retry.
2848type RetryBuildRequest struct {
2849	// Id: Required. Build ID of the original build.
2850	Id string `json:"id,omitempty"`
2851
2852	// Name: The name of the `Build` to retry. Format:
2853	// `projects/{project}/locations/{location}/builds/{build}`
2854	Name string `json:"name,omitempty"`
2855
2856	// ProjectId: Required. ID of the project.
2857	ProjectId string `json:"projectId,omitempty"`
2858
2859	// ForceSendFields is a list of field names (e.g. "Id") to
2860	// unconditionally include in API requests. By default, fields with
2861	// empty or default values are omitted from API requests. However, any
2862	// non-pointer, non-interface field appearing in ForceSendFields will be
2863	// sent to the server regardless of whether the field is empty or not.
2864	// This may be used to include empty fields in Patch requests.
2865	ForceSendFields []string `json:"-"`
2866
2867	// NullFields is a list of field names (e.g. "Id") to include in API
2868	// requests with the JSON null value. By default, fields with empty
2869	// values are omitted from API requests. However, any field with an
2870	// empty value appearing in NullFields will be sent to the server as
2871	// null. It is an error if a field in this list has a non-empty value.
2872	// This may be used to include null fields in Patch requests.
2873	NullFields []string `json:"-"`
2874}
2875
2876func (s *RetryBuildRequest) MarshalJSON() ([]byte, error) {
2877	type NoMethod RetryBuildRequest
2878	raw := NoMethod(*s)
2879	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2880}
2881
2882// RunBuildTriggerRequest: Specifies a build trigger to run and the
2883// source to use.
2884type RunBuildTriggerRequest struct {
2885	// ProjectId: Required. ID of the project.
2886	ProjectId string `json:"projectId,omitempty"`
2887
2888	// Source: Source to build against this trigger.
2889	Source *RepoSource `json:"source,omitempty"`
2890
2891	// TriggerId: Required. ID of the trigger.
2892	TriggerId string `json:"triggerId,omitempty"`
2893
2894	// ForceSendFields is a list of field names (e.g. "ProjectId") to
2895	// unconditionally include in API requests. By default, fields with
2896	// empty or default values are omitted from API requests. However, any
2897	// non-pointer, non-interface field appearing in ForceSendFields will be
2898	// sent to the server regardless of whether the field is empty or not.
2899	// This may be used to include empty fields in Patch requests.
2900	ForceSendFields []string `json:"-"`
2901
2902	// NullFields is a list of field names (e.g. "ProjectId") to include in
2903	// API requests with the JSON null value. By default, fields with empty
2904	// values are omitted from API requests. However, any field with an
2905	// empty value appearing in NullFields will be sent to the server as
2906	// null. It is an error if a field in this list has a non-empty value.
2907	// This may be used to include null fields in Patch requests.
2908	NullFields []string `json:"-"`
2909}
2910
2911func (s *RunBuildTriggerRequest) MarshalJSON() ([]byte, error) {
2912	type NoMethod RunBuildTriggerRequest
2913	raw := NoMethod(*s)
2914	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2915}
2916
2917// SMTPDelivery: SMTPDelivery is the delivery configuration for an SMTP
2918// (email) notification.
2919type SMTPDelivery struct {
2920	// FromAddress: This is the SMTP account/email that appears in the
2921	// `From:` of the email. If empty, it is assumed to be sender.
2922	FromAddress string `json:"fromAddress,omitempty"`
2923
2924	// Password: The SMTP sender's password.
2925	Password *NotifierSecretRef `json:"password,omitempty"`
2926
2927	// Port: The SMTP port of the server.
2928	Port string `json:"port,omitempty"`
2929
2930	// RecipientAddresses: This is the list of addresses to which we send
2931	// the email (i.e. in the `To:` of the email).
2932	RecipientAddresses []string `json:"recipientAddresses,omitempty"`
2933
2934	// SenderAddress: This is the SMTP account/email that is used to send
2935	// the message.
2936	SenderAddress string `json:"senderAddress,omitempty"`
2937
2938	// Server: The address of the SMTP server.
2939	Server string `json:"server,omitempty"`
2940
2941	// ForceSendFields is a list of field names (e.g. "FromAddress") to
2942	// unconditionally include in API requests. By default, fields with
2943	// empty or default values are omitted from API requests. However, any
2944	// non-pointer, non-interface field appearing in ForceSendFields will be
2945	// sent to the server regardless of whether the field is empty or not.
2946	// This may be used to include empty fields in Patch requests.
2947	ForceSendFields []string `json:"-"`
2948
2949	// NullFields is a list of field names (e.g. "FromAddress") to include
2950	// in API requests with the JSON null value. By default, fields with
2951	// empty values are omitted from API requests. However, any field with
2952	// an empty value appearing in NullFields will be sent to the server as
2953	// null. It is an error if a field in this list has a non-empty value.
2954	// This may be used to include null fields in Patch requests.
2955	NullFields []string `json:"-"`
2956}
2957
2958func (s *SMTPDelivery) MarshalJSON() ([]byte, error) {
2959	type NoMethod SMTPDelivery
2960	raw := NoMethod(*s)
2961	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2962}
2963
2964// Secret: Pairs a set of secret environment variables containing
2965// encrypted values with the Cloud KMS key to use to decrypt the value.
2966// Note: Use `kmsKeyName` with `available_secrets` instead of using
2967// `kmsKeyName` with `secret`. For instructions see:
2968// https://cloud.google.com/cloud-build/docs/securing-builds/use-encrypted-credentials.
2969type Secret struct {
2970	// KmsKeyName: Cloud KMS key name to use to decrypt these envs.
2971	KmsKeyName string `json:"kmsKeyName,omitempty"`
2972
2973	// SecretEnv: Map of environment variable name to its encrypted value.
2974	// Secret environment variables must be unique across all of a build's
2975	// secrets, and must be used by at least one build step. Values can be
2976	// at most 64 KB in size. There can be at most 100 secret values across
2977	// all of a build's secrets.
2978	SecretEnv map[string]string `json:"secretEnv,omitempty"`
2979
2980	// ForceSendFields is a list of field names (e.g. "KmsKeyName") to
2981	// unconditionally include in API requests. By default, fields with
2982	// empty or default values are omitted from API requests. However, any
2983	// non-pointer, non-interface field appearing in ForceSendFields will be
2984	// sent to the server regardless of whether the field is empty or not.
2985	// This may be used to include empty fields in Patch requests.
2986	ForceSendFields []string `json:"-"`
2987
2988	// NullFields is a list of field names (e.g. "KmsKeyName") to include in
2989	// API requests with the JSON null value. By default, fields with empty
2990	// values are omitted from API requests. However, any field with an
2991	// empty value appearing in NullFields will be sent to the server as
2992	// null. It is an error if a field in this list has a non-empty value.
2993	// This may be used to include null fields in Patch requests.
2994	NullFields []string `json:"-"`
2995}
2996
2997func (s *Secret) MarshalJSON() ([]byte, error) {
2998	type NoMethod Secret
2999	raw := NoMethod(*s)
3000	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3001}
3002
3003// SecretManagerSecret: Pairs a secret environment variable with a
3004// SecretVersion in Secret Manager.
3005type SecretManagerSecret struct {
3006	// Env: Environment variable name to associate with the secret. Secret
3007	// environment variables must be unique across all of a build's secrets,
3008	// and must be used by at least one build step.
3009	Env string `json:"env,omitempty"`
3010
3011	// VersionName: Resource name of the SecretVersion. In format:
3012	// projects/*/secrets/*/versions/*
3013	VersionName string `json:"versionName,omitempty"`
3014
3015	// ForceSendFields is a list of field names (e.g. "Env") to
3016	// unconditionally include in API requests. By default, fields with
3017	// empty or default values are omitted from API requests. However, any
3018	// non-pointer, non-interface field appearing in ForceSendFields will be
3019	// sent to the server regardless of whether the field is empty or not.
3020	// This may be used to include empty fields in Patch requests.
3021	ForceSendFields []string `json:"-"`
3022
3023	// NullFields is a list of field names (e.g. "Env") to include in API
3024	// requests with the JSON null value. By default, fields with empty
3025	// values are omitted from API requests. However, any field with an
3026	// empty value appearing in NullFields will be sent to the server as
3027	// null. It is an error if a field in this list has a non-empty value.
3028	// This may be used to include null fields in Patch requests.
3029	NullFields []string `json:"-"`
3030}
3031
3032func (s *SecretManagerSecret) MarshalJSON() ([]byte, error) {
3033	type NoMethod SecretManagerSecret
3034	raw := NoMethod(*s)
3035	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3036}
3037
3038// Secrets: Secrets and secret environment variables.
3039type Secrets struct {
3040	// Inline: Secrets encrypted with KMS key and the associated secret
3041	// environment variable.
3042	Inline []*InlineSecret `json:"inline,omitempty"`
3043
3044	// SecretManager: Secrets in Secret Manager and associated secret
3045	// environment variable.
3046	SecretManager []*SecretManagerSecret `json:"secretManager,omitempty"`
3047
3048	// ForceSendFields is a list of field names (e.g. "Inline") to
3049	// unconditionally include in API requests. By default, fields with
3050	// empty or default values are omitted from API requests. However, any
3051	// non-pointer, non-interface field appearing in ForceSendFields will be
3052	// sent to the server regardless of whether the field is empty or not.
3053	// This may be used to include empty fields in Patch requests.
3054	ForceSendFields []string `json:"-"`
3055
3056	// NullFields is a list of field names (e.g. "Inline") to include in API
3057	// requests with the JSON null value. By default, fields with empty
3058	// values are omitted from API requests. However, any field with an
3059	// empty value appearing in NullFields will be sent to the server as
3060	// null. It is an error if a field in this list has a non-empty value.
3061	// This may be used to include null fields in Patch requests.
3062	NullFields []string `json:"-"`
3063}
3064
3065func (s *Secrets) MarshalJSON() ([]byte, error) {
3066	type NoMethod Secrets
3067	raw := NoMethod(*s)
3068	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3069}
3070
3071// SlackDelivery: SlackDelivery is the delivery configuration for
3072// delivering Slack messages via webhooks. See Slack webhook
3073// documentation at: https://api.slack.com/messaging/webhooks.
3074type SlackDelivery struct {
3075	// WebhookUri: The secret reference for the Slack webhook URI for
3076	// sending messages to a channel.
3077	WebhookUri *NotifierSecretRef `json:"webhookUri,omitempty"`
3078
3079	// ForceSendFields is a list of field names (e.g. "WebhookUri") to
3080	// unconditionally include in API requests. By default, fields with
3081	// empty or default values are omitted from API requests. However, any
3082	// non-pointer, non-interface field appearing in ForceSendFields will be
3083	// sent to the server regardless of whether the field is empty or not.
3084	// This may be used to include empty fields in Patch requests.
3085	ForceSendFields []string `json:"-"`
3086
3087	// NullFields is a list of field names (e.g. "WebhookUri") to include in
3088	// API requests with the JSON null value. By default, fields with empty
3089	// values are omitted from API requests. However, any field with an
3090	// empty value appearing in NullFields will be sent to the server as
3091	// null. It is an error if a field in this list has a non-empty value.
3092	// This may be used to include null fields in Patch requests.
3093	NullFields []string `json:"-"`
3094}
3095
3096func (s *SlackDelivery) MarshalJSON() ([]byte, error) {
3097	type NoMethod SlackDelivery
3098	raw := NoMethod(*s)
3099	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3100}
3101
3102// Source: Location of the source in a supported storage service.
3103type Source struct {
3104	// RepoSource: If provided, get the source from this location in a Cloud
3105	// Source Repository.
3106	RepoSource *RepoSource `json:"repoSource,omitempty"`
3107
3108	// StorageSource: If provided, get the source from this location in
3109	// Google Cloud Storage.
3110	StorageSource *StorageSource `json:"storageSource,omitempty"`
3111
3112	// StorageSourceManifest: If provided, get the source from this manifest
3113	// in Google Cloud Storage. This feature is in Preview; see description
3114	// here
3115	// (https://github.com/GoogleCloudPlatform/cloud-builders/tree/master/gcs-fetcher).
3116	StorageSourceManifest *StorageSourceManifest `json:"storageSourceManifest,omitempty"`
3117
3118	// ForceSendFields is a list of field names (e.g. "RepoSource") to
3119	// unconditionally include in API requests. By default, fields with
3120	// empty or default values are omitted from API requests. However, any
3121	// non-pointer, non-interface field appearing in ForceSendFields will be
3122	// sent to the server regardless of whether the field is empty or not.
3123	// This may be used to include empty fields in Patch requests.
3124	ForceSendFields []string `json:"-"`
3125
3126	// NullFields is a list of field names (e.g. "RepoSource") to include in
3127	// API requests with the JSON null value. By default, fields with empty
3128	// values are omitted from API requests. However, any field with an
3129	// empty value appearing in NullFields will be sent to the server as
3130	// null. It is an error if a field in this list has a non-empty value.
3131	// This may be used to include null fields in Patch requests.
3132	NullFields []string `json:"-"`
3133}
3134
3135func (s *Source) MarshalJSON() ([]byte, error) {
3136	type NoMethod Source
3137	raw := NoMethod(*s)
3138	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3139}
3140
3141// SourceProvenance: Provenance of the source. Ways to find the original
3142// source, or verify that some source was used for this build.
3143type SourceProvenance struct {
3144	// FileHashes: Output only. Hash(es) of the build source, which can be
3145	// used to verify that the original source integrity was maintained in
3146	// the build. Note that `FileHashes` will only be populated if
3147	// `BuildOptions` has requested a `SourceProvenanceHash`. The keys to
3148	// this map are file paths used as build source and the values contain
3149	// the hash values for those files. If the build source came in a single
3150	// package such as a gzipped tarfile (`.tar.gz`), the `FileHash` will be
3151	// for the single path to that file.
3152	FileHashes map[string]FileHashes `json:"fileHashes,omitempty"`
3153
3154	// ResolvedRepoSource: A copy of the build's `source.repo_source`, if
3155	// exists, with any revisions resolved.
3156	ResolvedRepoSource *RepoSource `json:"resolvedRepoSource,omitempty"`
3157
3158	// ResolvedStorageSource: A copy of the build's `source.storage_source`,
3159	// if exists, with any generations resolved.
3160	ResolvedStorageSource *StorageSource `json:"resolvedStorageSource,omitempty"`
3161
3162	// ResolvedStorageSourceManifest: A copy of the build's
3163	// `source.storage_source_manifest`, if exists, with any revisions
3164	// resolved. This feature is in Preview.
3165	ResolvedStorageSourceManifest *StorageSourceManifest `json:"resolvedStorageSourceManifest,omitempty"`
3166
3167	// ForceSendFields is a list of field names (e.g. "FileHashes") to
3168	// unconditionally include in API requests. By default, fields with
3169	// empty or default values are omitted from API requests. However, any
3170	// non-pointer, non-interface field appearing in ForceSendFields will be
3171	// sent to the server regardless of whether the field is empty or not.
3172	// This may be used to include empty fields in Patch requests.
3173	ForceSendFields []string `json:"-"`
3174
3175	// NullFields is a list of field names (e.g. "FileHashes") to include in
3176	// API requests with the JSON null value. By default, fields with empty
3177	// values are omitted from API requests. However, any field with an
3178	// empty value appearing in NullFields will be sent to the server as
3179	// null. It is an error if a field in this list has a non-empty value.
3180	// This may be used to include null fields in Patch requests.
3181	NullFields []string `json:"-"`
3182}
3183
3184func (s *SourceProvenance) MarshalJSON() ([]byte, error) {
3185	type NoMethod SourceProvenance
3186	raw := NoMethod(*s)
3187	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3188}
3189
3190// Status: The `Status` type defines a logical error model that is
3191// suitable for different programming environments, including REST APIs
3192// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each
3193// `Status` message contains three pieces of data: error code, error
3194// message, and error details. You can find out more about this error
3195// model and how to work with it in the API Design Guide
3196// (https://cloud.google.com/apis/design/errors).
3197type Status struct {
3198	// Code: The status code, which should be an enum value of
3199	// google.rpc.Code.
3200	Code int64 `json:"code,omitempty"`
3201
3202	// Details: A list of messages that carry the error details. There is a
3203	// common set of message types for APIs to use.
3204	Details []googleapi.RawMessage `json:"details,omitempty"`
3205
3206	// Message: A developer-facing error message, which should be in
3207	// English. Any user-facing error message should be localized and sent
3208	// in the google.rpc.Status.details field, or localized by the client.
3209	Message string `json:"message,omitempty"`
3210
3211	// ForceSendFields is a list of field names (e.g. "Code") to
3212	// unconditionally include in API requests. By default, fields with
3213	// empty or default values are omitted from API requests. However, any
3214	// non-pointer, non-interface field appearing in ForceSendFields will be
3215	// sent to the server regardless of whether the field is empty or not.
3216	// This may be used to include empty fields in Patch requests.
3217	ForceSendFields []string `json:"-"`
3218
3219	// NullFields is a list of field names (e.g. "Code") to include in API
3220	// requests with the JSON null value. By default, fields with empty
3221	// values are omitted from API requests. However, any field with an
3222	// empty value appearing in NullFields will be sent to the server as
3223	// null. It is an error if a field in this list has a non-empty value.
3224	// This may be used to include null fields in Patch requests.
3225	NullFields []string `json:"-"`
3226}
3227
3228func (s *Status) MarshalJSON() ([]byte, error) {
3229	type NoMethod Status
3230	raw := NoMethod(*s)
3231	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3232}
3233
3234// StorageSource: Location of the source in an archive file in Google
3235// Cloud Storage.
3236type StorageSource struct {
3237	// Bucket: Google Cloud Storage bucket containing the source (see Bucket
3238	// Name Requirements
3239	// (https://cloud.google.com/storage/docs/bucket-naming#requirements)).
3240	Bucket string `json:"bucket,omitempty"`
3241
3242	// Generation: Google Cloud Storage generation for the object. If the
3243	// generation is omitted, the latest generation will be used.
3244	Generation int64 `json:"generation,omitempty,string"`
3245
3246	// Object: Google Cloud Storage object containing the source. This
3247	// object must be a zipped (`.zip`) or gzipped archive file (`.tar.gz`)
3248	// containing source to build.
3249	Object string `json:"object,omitempty"`
3250
3251	// ForceSendFields is a list of field names (e.g. "Bucket") to
3252	// unconditionally include in API requests. By default, fields with
3253	// empty or default values are omitted from API requests. However, any
3254	// non-pointer, non-interface field appearing in ForceSendFields will be
3255	// sent to the server regardless of whether the field is empty or not.
3256	// This may be used to include empty fields in Patch requests.
3257	ForceSendFields []string `json:"-"`
3258
3259	// NullFields is a list of field names (e.g. "Bucket") to include in API
3260	// requests with the JSON null value. By default, fields with empty
3261	// values are omitted from API requests. However, any field with an
3262	// empty value appearing in NullFields will be sent to the server as
3263	// null. It is an error if a field in this list has a non-empty value.
3264	// This may be used to include null fields in Patch requests.
3265	NullFields []string `json:"-"`
3266}
3267
3268func (s *StorageSource) MarshalJSON() ([]byte, error) {
3269	type NoMethod StorageSource
3270	raw := NoMethod(*s)
3271	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3272}
3273
3274// StorageSourceManifest: Location of the source manifest in Google
3275// Cloud Storage. This feature is in Preview; see description here
3276// (https://github.com/GoogleCloudPlatform/cloud-builders/tree/master/gcs-fetcher).
3277type StorageSourceManifest struct {
3278	// Bucket: Google Cloud Storage bucket containing the source manifest
3279	// (see Bucket Name Requirements
3280	// (https://cloud.google.com/storage/docs/bucket-naming#requirements)).
3281	Bucket string `json:"bucket,omitempty"`
3282
3283	// Generation: Google Cloud Storage generation for the object. If the
3284	// generation is omitted, the latest generation will be used.
3285	Generation int64 `json:"generation,omitempty,string"`
3286
3287	// Object: Google Cloud Storage object containing the source manifest.
3288	// This object must be a JSON file.
3289	Object string `json:"object,omitempty"`
3290
3291	// ForceSendFields is a list of field names (e.g. "Bucket") to
3292	// unconditionally include in API requests. By default, fields with
3293	// empty or default values are omitted from API requests. However, any
3294	// non-pointer, non-interface field appearing in ForceSendFields will be
3295	// sent to the server regardless of whether the field is empty or not.
3296	// This may be used to include empty fields in Patch requests.
3297	ForceSendFields []string `json:"-"`
3298
3299	// NullFields is a list of field names (e.g. "Bucket") to include in API
3300	// requests with the JSON null value. By default, fields with empty
3301	// values are omitted from API requests. However, any field with an
3302	// empty value appearing in NullFields will be sent to the server as
3303	// null. It is an error if a field in this list has a non-empty value.
3304	// This may be used to include null fields in Patch requests.
3305	NullFields []string `json:"-"`
3306}
3307
3308func (s *StorageSourceManifest) MarshalJSON() ([]byte, error) {
3309	type NoMethod StorageSourceManifest
3310	raw := NoMethod(*s)
3311	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3312}
3313
3314// TimeSpan: Start and end times for a build execution phase.
3315type TimeSpan struct {
3316	// EndTime: End of time span.
3317	EndTime string `json:"endTime,omitempty"`
3318
3319	// StartTime: Start of time span.
3320	StartTime string `json:"startTime,omitempty"`
3321
3322	// ForceSendFields is a list of field names (e.g. "EndTime") to
3323	// unconditionally include in API requests. By default, fields with
3324	// empty or default values are omitted from API requests. However, any
3325	// non-pointer, non-interface field appearing in ForceSendFields will be
3326	// sent to the server regardless of whether the field is empty or not.
3327	// This may be used to include empty fields in Patch requests.
3328	ForceSendFields []string `json:"-"`
3329
3330	// NullFields is a list of field names (e.g. "EndTime") to include in
3331	// API requests with the JSON null value. By default, fields with empty
3332	// values are omitted from API requests. However, any field with an
3333	// empty value appearing in NullFields will be sent to the server as
3334	// null. It is an error if a field in this list has a non-empty value.
3335	// This may be used to include null fields in Patch requests.
3336	NullFields []string `json:"-"`
3337}
3338
3339func (s *TimeSpan) MarshalJSON() ([]byte, error) {
3340	type NoMethod TimeSpan
3341	raw := NoMethod(*s)
3342	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3343}
3344
3345// UpdateGitHubEnterpriseConfigOperationMetadata: Metadata for
3346// `UpdateGitHubEnterpriseConfig` operation.
3347type UpdateGitHubEnterpriseConfigOperationMetadata struct {
3348	// CompleteTime: Time the operation was completed.
3349	CompleteTime string `json:"completeTime,omitempty"`
3350
3351	// CreateTime: Time the operation was created.
3352	CreateTime string `json:"createTime,omitempty"`
3353
3354	// GithubEnterpriseConfig: The resource name of the GitHubEnterprise to
3355	// be updated. Format:
3356	// `projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}`
3357	// .
3358	GithubEnterpriseConfig string `json:"githubEnterpriseConfig,omitempty"`
3359
3360	// ForceSendFields is a list of field names (e.g. "CompleteTime") to
3361	// unconditionally include in API requests. By default, fields with
3362	// empty or default values are omitted from API requests. However, any
3363	// non-pointer, non-interface field appearing in ForceSendFields will be
3364	// sent to the server regardless of whether the field is empty or not.
3365	// This may be used to include empty fields in Patch requests.
3366	ForceSendFields []string `json:"-"`
3367
3368	// NullFields is a list of field names (e.g. "CompleteTime") to include
3369	// in API requests with the JSON null value. By default, fields with
3370	// empty values are omitted from API requests. However, any field with
3371	// an empty value appearing in NullFields will be sent to the server as
3372	// null. It is an error if a field in this list has a non-empty value.
3373	// This may be used to include null fields in Patch requests.
3374	NullFields []string `json:"-"`
3375}
3376
3377func (s *UpdateGitHubEnterpriseConfigOperationMetadata) MarshalJSON() ([]byte, error) {
3378	type NoMethod UpdateGitHubEnterpriseConfigOperationMetadata
3379	raw := NoMethod(*s)
3380	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3381}
3382
3383// UpdateWorkerPoolOperationMetadata: Metadata for the
3384// `UpdateWorkerPool` operation.
3385type UpdateWorkerPoolOperationMetadata struct {
3386	// CompleteTime: Time the operation was completed.
3387	CompleteTime string `json:"completeTime,omitempty"`
3388
3389	// CreateTime: Time the operation was created.
3390	CreateTime string `json:"createTime,omitempty"`
3391
3392	// WorkerPool: The resource name of the `WorkerPool` being updated.
3393	// Format:
3394	// `projects/{project}/locations/{location}/workerPools/{worker_pool}`.
3395	WorkerPool string `json:"workerPool,omitempty"`
3396
3397	// ForceSendFields is a list of field names (e.g. "CompleteTime") to
3398	// unconditionally include in API requests. By default, fields with
3399	// empty or default values are omitted from API requests. However, any
3400	// non-pointer, non-interface field appearing in ForceSendFields will be
3401	// sent to the server regardless of whether the field is empty or not.
3402	// This may be used to include empty fields in Patch requests.
3403	ForceSendFields []string `json:"-"`
3404
3405	// NullFields is a list of field names (e.g. "CompleteTime") to include
3406	// in API requests with the JSON null value. By default, fields with
3407	// empty values are omitted from API requests. However, any field with
3408	// an empty value appearing in NullFields will be sent to the server as
3409	// null. It is an error if a field in this list has a non-empty value.
3410	// This may be used to include null fields in Patch requests.
3411	NullFields []string `json:"-"`
3412}
3413
3414func (s *UpdateWorkerPoolOperationMetadata) MarshalJSON() ([]byte, error) {
3415	type NoMethod UpdateWorkerPoolOperationMetadata
3416	raw := NoMethod(*s)
3417	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3418}
3419
3420// Volume: Volume describes a Docker container volume which is mounted
3421// into build steps in order to persist files across build step
3422// execution.
3423type Volume struct {
3424	// Name: Name of the volume to mount. Volume names must be unique per
3425	// build step and must be valid names for Docker volumes. Each named
3426	// volume must be used by at least two build steps.
3427	Name string `json:"name,omitempty"`
3428
3429	// Path: Path at which to mount the volume. Paths must be absolute and
3430	// cannot conflict with other volume paths on the same build step or
3431	// with certain reserved volume paths.
3432	Path string `json:"path,omitempty"`
3433
3434	// ForceSendFields is a list of field names (e.g. "Name") to
3435	// unconditionally include in API requests. By default, fields with
3436	// empty or default values are omitted from API requests. However, any
3437	// non-pointer, non-interface field appearing in ForceSendFields will be
3438	// sent to the server regardless of whether the field is empty or not.
3439	// This may be used to include empty fields in Patch requests.
3440	ForceSendFields []string `json:"-"`
3441
3442	// NullFields is a list of field names (e.g. "Name") to include in API
3443	// requests with the JSON null value. By default, fields with empty
3444	// values are omitted from API requests. However, any field with an
3445	// empty value appearing in NullFields will be sent to the server as
3446	// null. It is an error if a field in this list has a non-empty value.
3447	// This may be used to include null fields in Patch requests.
3448	NullFields []string `json:"-"`
3449}
3450
3451func (s *Volume) MarshalJSON() ([]byte, error) {
3452	type NoMethod Volume
3453	raw := NoMethod(*s)
3454	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3455}
3456
3457// Warning: A non-fatal problem encountered during the execution of the
3458// build.
3459type Warning struct {
3460	// Priority: The priority for this warning.
3461	//
3462	// Possible values:
3463	//   "PRIORITY_UNSPECIFIED" - Should not be used.
3464	//   "INFO" - e.g. deprecation warnings and alternative feature
3465	// highlights.
3466	//   "WARNING" - e.g. automated detection of possible issues with the
3467	// build.
3468	//   "ALERT" - e.g. alerts that a feature used in the build is pending
3469	// removal
3470	Priority string `json:"priority,omitempty"`
3471
3472	// Text: Explanation of the warning generated.
3473	Text string `json:"text,omitempty"`
3474
3475	// ForceSendFields is a list of field names (e.g. "Priority") to
3476	// unconditionally include in API requests. By default, fields with
3477	// empty or default values are omitted from API requests. However, any
3478	// non-pointer, non-interface field appearing in ForceSendFields will be
3479	// sent to the server regardless of whether the field is empty or not.
3480	// This may be used to include empty fields in Patch requests.
3481	ForceSendFields []string `json:"-"`
3482
3483	// NullFields is a list of field names (e.g. "Priority") to include in
3484	// API requests with the JSON null value. By default, fields with empty
3485	// values are omitted from API requests. However, any field with an
3486	// empty value appearing in NullFields will be sent to the server as
3487	// null. It is an error if a field in this list has a non-empty value.
3488	// This may be used to include null fields in Patch requests.
3489	NullFields []string `json:"-"`
3490}
3491
3492func (s *Warning) MarshalJSON() ([]byte, error) {
3493	type NoMethod Warning
3494	raw := NoMethod(*s)
3495	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3496}
3497
3498// WebhookConfig: WebhookConfig describes the configuration of a trigger
3499// that creates a build whenever a webhook is sent to a trigger's
3500// webhook URL.
3501type WebhookConfig struct {
3502	// Secret: Required. Resource name for the secret required as a URL
3503	// parameter.
3504	Secret string `json:"secret,omitempty"`
3505
3506	// State: Potential issues with the underlying Pub/Sub subscription
3507	// configuration. Only populated on get requests.
3508	//
3509	// Possible values:
3510	//   "STATE_UNSPECIFIED" - The webhook auth configuration not been
3511	// checked.
3512	//   "OK" - The auth configuration is properly setup.
3513	//   "SECRET_DELETED" - The secret provided in auth_method has been
3514	// deleted.
3515	State string `json:"state,omitempty"`
3516
3517	// ForceSendFields is a list of field names (e.g. "Secret") to
3518	// unconditionally include in API requests. By default, fields with
3519	// empty or default values are omitted from API requests. However, any
3520	// non-pointer, non-interface field appearing in ForceSendFields will be
3521	// sent to the server regardless of whether the field is empty or not.
3522	// This may be used to include empty fields in Patch requests.
3523	ForceSendFields []string `json:"-"`
3524
3525	// NullFields is a list of field names (e.g. "Secret") to include in API
3526	// requests with the JSON null value. By default, fields with empty
3527	// values are omitted from API requests. However, any field with an
3528	// empty value appearing in NullFields will be sent to the server as
3529	// null. It is an error if a field in this list has a non-empty value.
3530	// This may be used to include null fields in Patch requests.
3531	NullFields []string `json:"-"`
3532}
3533
3534func (s *WebhookConfig) MarshalJSON() ([]byte, error) {
3535	type NoMethod WebhookConfig
3536	raw := NoMethod(*s)
3537	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3538}
3539
3540// WorkerConfig: Defines the configuration to be used for creating
3541// workers in the pool.
3542type WorkerConfig struct {
3543	// DiskSizeGb: Size of the disk attached to the worker, in GB. See
3544	// Worker pool config file
3545	// (https://cloud.google.com/build/docs/private-pools/worker-pool-config-file-schema).
3546	// Specify a value of up to 1000. If `0` is specified, Cloud Build will
3547	// use a standard disk size.
3548	DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"`
3549
3550	// MachineType: Machine type of a worker, such as `e2-medium`. See
3551	// Worker pool config file
3552	// (https://cloud.google.com/build/docs/private-pools/worker-pool-config-file-schema).
3553	// If left blank, Cloud Build will use a sensible default.
3554	MachineType string `json:"machineType,omitempty"`
3555
3556	// ForceSendFields is a list of field names (e.g. "DiskSizeGb") to
3557	// unconditionally include in API requests. By default, fields with
3558	// empty or default values are omitted from API requests. However, any
3559	// non-pointer, non-interface field appearing in ForceSendFields will be
3560	// sent to the server regardless of whether the field is empty or not.
3561	// This may be used to include empty fields in Patch requests.
3562	ForceSendFields []string `json:"-"`
3563
3564	// NullFields is a list of field names (e.g. "DiskSizeGb") to include in
3565	// API requests with the JSON null value. By default, fields with empty
3566	// values are omitted from API requests. However, any field with an
3567	// empty value appearing in NullFields will be sent to the server as
3568	// null. It is an error if a field in this list has a non-empty value.
3569	// This may be used to include null fields in Patch requests.
3570	NullFields []string `json:"-"`
3571}
3572
3573func (s *WorkerConfig) MarshalJSON() ([]byte, error) {
3574	type NoMethod WorkerConfig
3575	raw := NoMethod(*s)
3576	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3577}
3578
3579// WorkerPool: Configuration for a `WorkerPool`. Cloud Build owns and
3580// maintains a pool of workers for general use and have no access to a
3581// project's private network. By default, builds submitted to Cloud
3582// Build will use a worker from this pool. If your build needs access to
3583// resources on a private network, create and use a `WorkerPool` to run
3584// your builds. Private `WorkerPool`s give your builds access to any
3585// single VPC network that you administer, including any on-prem
3586// resources connected to that VPC network. For an overview of private
3587// pools, see Private pools overview
3588// (https://cloud.google.com/build/docs/private-pools/private-pools-overview).
3589type WorkerPool struct {
3590	// Annotations: User specified annotations. See
3591	// https://google.aip.dev/128#annotations for more details such as
3592	// format and size limitations.
3593	Annotations map[string]string `json:"annotations,omitempty"`
3594
3595	// CreateTime: Output only. Time at which the request to create the
3596	// `WorkerPool` was received.
3597	CreateTime string `json:"createTime,omitempty"`
3598
3599	// DeleteTime: Output only. Time at which the request to delete the
3600	// `WorkerPool` was received.
3601	DeleteTime string `json:"deleteTime,omitempty"`
3602
3603	// DisplayName: A user-specified, human-readable name for the
3604	// `WorkerPool`. If provided, this value must be 1-63 characters.
3605	DisplayName string `json:"displayName,omitempty"`
3606
3607	// Etag: Output only. Checksum computed by the server. May be sent on
3608	// update and delete requests to ensure that the client has an
3609	// up-to-date value before proceeding.
3610	Etag string `json:"etag,omitempty"`
3611
3612	// Name: Output only. The resource name of the `WorkerPool`, with format
3613	// `projects/{project}/locations/{location}/workerPools/{worker_pool}`.
3614	// The value of `{worker_pool}` is provided by `worker_pool_id` in
3615	// `CreateWorkerPool` request and the value of `{location}` is
3616	// determined by the endpoint accessed.
3617	Name string `json:"name,omitempty"`
3618
3619	// PrivatePoolV1Config: Private Pool using a v1 configuration.
3620	PrivatePoolV1Config *PrivatePoolV1Config `json:"privatePoolV1Config,omitempty"`
3621
3622	// State: Output only. `WorkerPool` state.
3623	//
3624	// Possible values:
3625	//   "STATE_UNSPECIFIED" - State of the `WorkerPool` is unknown.
3626	//   "CREATING" - `WorkerPool` is being created.
3627	//   "RUNNING" - `WorkerPool` is running.
3628	//   "DELETING" - `WorkerPool` is being deleted: cancelling builds and
3629	// draining workers.
3630	//   "DELETED" - `WorkerPool` is deleted.
3631	State string `json:"state,omitempty"`
3632
3633	// Uid: Output only. A unique identifier for the `WorkerPool`.
3634	Uid string `json:"uid,omitempty"`
3635
3636	// UpdateTime: Output only. Time at which the request to update the
3637	// `WorkerPool` was received.
3638	UpdateTime string `json:"updateTime,omitempty"`
3639
3640	// ServerResponse contains the HTTP response code and headers from the
3641	// server.
3642	googleapi.ServerResponse `json:"-"`
3643
3644	// ForceSendFields is a list of field names (e.g. "Annotations") to
3645	// unconditionally include in API requests. By default, fields with
3646	// empty or default values are omitted from API requests. However, any
3647	// non-pointer, non-interface field appearing in ForceSendFields will be
3648	// sent to the server regardless of whether the field is empty or not.
3649	// This may be used to include empty fields in Patch requests.
3650	ForceSendFields []string `json:"-"`
3651
3652	// NullFields is a list of field names (e.g. "Annotations") to include
3653	// in API requests with the JSON null value. By default, fields with
3654	// empty values are omitted from API requests. However, any field with
3655	// an empty value appearing in NullFields will be sent to the server as
3656	// null. It is an error if a field in this list has a non-empty value.
3657	// This may be used to include null fields in Patch requests.
3658	NullFields []string `json:"-"`
3659}
3660
3661func (s *WorkerPool) MarshalJSON() ([]byte, error) {
3662	type NoMethod WorkerPool
3663	raw := NoMethod(*s)
3664	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3665}
3666
3667// method id "cloudbuild.operations.cancel":
3668
3669type OperationsCancelCall struct {
3670	s                      *Service
3671	name                   string
3672	canceloperationrequest *CancelOperationRequest
3673	urlParams_             gensupport.URLParams
3674	ctx_                   context.Context
3675	header_                http.Header
3676}
3677
3678// Cancel: Starts asynchronous cancellation on a long-running operation.
3679// The server makes a best effort to cancel the operation, but success
3680// is not guaranteed. If the server doesn't support this method, it
3681// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use
3682// Operations.GetOperation or other methods to check whether the
3683// cancellation succeeded or whether the operation completed despite
3684// cancellation. On successful cancellation, the operation is not
3685// deleted; instead, it becomes an operation with an Operation.error
3686// value with a google.rpc.Status.code of 1, corresponding to
3687// `Code.CANCELLED`.
3688//
3689// - name: The name of the operation resource to be cancelled.
3690func (r *OperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *OperationsCancelCall {
3691	c := &OperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3692	c.name = name
3693	c.canceloperationrequest = canceloperationrequest
3694	return c
3695}
3696
3697// Fields allows partial responses to be retrieved. See
3698// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3699// for more information.
3700func (c *OperationsCancelCall) Fields(s ...googleapi.Field) *OperationsCancelCall {
3701	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3702	return c
3703}
3704
3705// Context sets the context to be used in this call's Do method. Any
3706// pending HTTP request will be aborted if the provided context is
3707// canceled.
3708func (c *OperationsCancelCall) Context(ctx context.Context) *OperationsCancelCall {
3709	c.ctx_ = ctx
3710	return c
3711}
3712
3713// Header returns an http.Header that can be modified by the caller to
3714// add HTTP headers to the request.
3715func (c *OperationsCancelCall) Header() http.Header {
3716	if c.header_ == nil {
3717		c.header_ = make(http.Header)
3718	}
3719	return c.header_
3720}
3721
3722func (c *OperationsCancelCall) doRequest(alt string) (*http.Response, error) {
3723	reqHeaders := make(http.Header)
3724	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
3725	for k, v := range c.header_ {
3726		reqHeaders[k] = v
3727	}
3728	reqHeaders.Set("User-Agent", c.s.userAgent())
3729	var body io.Reader = nil
3730	body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
3731	if err != nil {
3732		return nil, err
3733	}
3734	reqHeaders.Set("Content-Type", "application/json")
3735	c.urlParams_.Set("alt", alt)
3736	c.urlParams_.Set("prettyPrint", "false")
3737	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
3738	urls += "?" + c.urlParams_.Encode()
3739	req, err := http.NewRequest("POST", urls, body)
3740	if err != nil {
3741		return nil, err
3742	}
3743	req.Header = reqHeaders
3744	googleapi.Expand(req.URL, map[string]string{
3745		"name": c.name,
3746	})
3747	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3748}
3749
3750// Do executes the "cloudbuild.operations.cancel" call.
3751// Exactly one of *Empty or error will be non-nil. Any non-2xx status
3752// code is an error. Response headers are in either
3753// *Empty.ServerResponse.Header or (if a response was returned at all)
3754// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
3755// check whether the returned error was because http.StatusNotModified
3756// was returned.
3757func (c *OperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
3758	gensupport.SetOptions(c.urlParams_, opts...)
3759	res, err := c.doRequest("json")
3760	if res != nil && res.StatusCode == http.StatusNotModified {
3761		if res.Body != nil {
3762			res.Body.Close()
3763		}
3764		return nil, &googleapi.Error{
3765			Code:   res.StatusCode,
3766			Header: res.Header,
3767		}
3768	}
3769	if err != nil {
3770		return nil, err
3771	}
3772	defer googleapi.CloseBody(res)
3773	if err := googleapi.CheckResponse(res); err != nil {
3774		return nil, err
3775	}
3776	ret := &Empty{
3777		ServerResponse: googleapi.ServerResponse{
3778			Header:         res.Header,
3779			HTTPStatusCode: res.StatusCode,
3780		},
3781	}
3782	target := &ret
3783	if err := gensupport.DecodeResponse(target, res); err != nil {
3784		return nil, err
3785	}
3786	return ret, nil
3787	// {
3788	//   "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`.",
3789	//   "flatPath": "v1/operations/{operationsId}:cancel",
3790	//   "httpMethod": "POST",
3791	//   "id": "cloudbuild.operations.cancel",
3792	//   "parameterOrder": [
3793	//     "name"
3794	//   ],
3795	//   "parameters": {
3796	//     "name": {
3797	//       "description": "The name of the operation resource to be cancelled.",
3798	//       "location": "path",
3799	//       "pattern": "^operations/.*$",
3800	//       "required": true,
3801	//       "type": "string"
3802	//     }
3803	//   },
3804	//   "path": "v1/{+name}:cancel",
3805	//   "request": {
3806	//     "$ref": "CancelOperationRequest"
3807	//   },
3808	//   "response": {
3809	//     "$ref": "Empty"
3810	//   },
3811	//   "scopes": [
3812	//     "https://www.googleapis.com/auth/cloud-platform"
3813	//   ]
3814	// }
3815
3816}
3817
3818// method id "cloudbuild.operations.get":
3819
3820type OperationsGetCall struct {
3821	s            *Service
3822	name         string
3823	urlParams_   gensupport.URLParams
3824	ifNoneMatch_ string
3825	ctx_         context.Context
3826	header_      http.Header
3827}
3828
3829// Get: Gets the latest state of a long-running operation. Clients can
3830// use this method to poll the operation result at intervals as
3831// recommended by the API service.
3832//
3833// - name: The name of the operation resource.
3834func (r *OperationsService) Get(name string) *OperationsGetCall {
3835	c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3836	c.name = name
3837	return c
3838}
3839
3840// Fields allows partial responses to be retrieved. See
3841// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3842// for more information.
3843func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall {
3844	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3845	return c
3846}
3847
3848// IfNoneMatch sets the optional parameter which makes the operation
3849// fail if the object's ETag matches the given value. This is useful for
3850// getting updates only after the object has changed since the last
3851// request. Use googleapi.IsNotModified to check whether the response
3852// error from Do is the result of In-None-Match.
3853func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall {
3854	c.ifNoneMatch_ = entityTag
3855	return c
3856}
3857
3858// Context sets the context to be used in this call's Do method. Any
3859// pending HTTP request will be aborted if the provided context is
3860// canceled.
3861func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall {
3862	c.ctx_ = ctx
3863	return c
3864}
3865
3866// Header returns an http.Header that can be modified by the caller to
3867// add HTTP headers to the request.
3868func (c *OperationsGetCall) Header() http.Header {
3869	if c.header_ == nil {
3870		c.header_ = make(http.Header)
3871	}
3872	return c.header_
3873}
3874
3875func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) {
3876	reqHeaders := make(http.Header)
3877	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
3878	for k, v := range c.header_ {
3879		reqHeaders[k] = v
3880	}
3881	reqHeaders.Set("User-Agent", c.s.userAgent())
3882	if c.ifNoneMatch_ != "" {
3883		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3884	}
3885	var body io.Reader = nil
3886	c.urlParams_.Set("alt", alt)
3887	c.urlParams_.Set("prettyPrint", "false")
3888	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
3889	urls += "?" + c.urlParams_.Encode()
3890	req, err := http.NewRequest("GET", urls, body)
3891	if err != nil {
3892		return nil, err
3893	}
3894	req.Header = reqHeaders
3895	googleapi.Expand(req.URL, map[string]string{
3896		"name": c.name,
3897	})
3898	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3899}
3900
3901// Do executes the "cloudbuild.operations.get" call.
3902// Exactly one of *Operation or error will be non-nil. Any non-2xx
3903// status code is an error. Response headers are in either
3904// *Operation.ServerResponse.Header or (if a response was returned at
3905// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
3906// to check whether the returned error was because
3907// http.StatusNotModified was returned.
3908func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3909	gensupport.SetOptions(c.urlParams_, opts...)
3910	res, err := c.doRequest("json")
3911	if res != nil && res.StatusCode == http.StatusNotModified {
3912		if res.Body != nil {
3913			res.Body.Close()
3914		}
3915		return nil, &googleapi.Error{
3916			Code:   res.StatusCode,
3917			Header: res.Header,
3918		}
3919	}
3920	if err != nil {
3921		return nil, err
3922	}
3923	defer googleapi.CloseBody(res)
3924	if err := googleapi.CheckResponse(res); err != nil {
3925		return nil, err
3926	}
3927	ret := &Operation{
3928		ServerResponse: googleapi.ServerResponse{
3929			Header:         res.Header,
3930			HTTPStatusCode: res.StatusCode,
3931		},
3932	}
3933	target := &ret
3934	if err := gensupport.DecodeResponse(target, res); err != nil {
3935		return nil, err
3936	}
3937	return ret, nil
3938	// {
3939	//   "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.",
3940	//   "flatPath": "v1/operations/{operationsId}",
3941	//   "httpMethod": "GET",
3942	//   "id": "cloudbuild.operations.get",
3943	//   "parameterOrder": [
3944	//     "name"
3945	//   ],
3946	//   "parameters": {
3947	//     "name": {
3948	//       "description": "The name of the operation resource.",
3949	//       "location": "path",
3950	//       "pattern": "^operations/.*$",
3951	//       "required": true,
3952	//       "type": "string"
3953	//     }
3954	//   },
3955	//   "path": "v1/{+name}",
3956	//   "response": {
3957	//     "$ref": "Operation"
3958	//   },
3959	//   "scopes": [
3960	//     "https://www.googleapis.com/auth/cloud-platform"
3961	//   ]
3962	// }
3963
3964}
3965
3966// method id "cloudbuild.projects.builds.approve":
3967
3968type ProjectsBuildsApproveCall struct {
3969	s                   *Service
3970	name                string
3971	approvebuildrequest *ApproveBuildRequest
3972	urlParams_          gensupport.URLParams
3973	ctx_                context.Context
3974	header_             http.Header
3975}
3976
3977// Approve: Approves or rejects a pending build. If approved, the
3978// returned LRO will be analogous to the LRO returned from a CreateBuild
3979// call. If rejected, the returned LRO will be immediately done.
3980//
3981// - name: Name of the target build. For example:
3982//   "projects/{$project_id}/builds/{$build_id}".
3983func (r *ProjectsBuildsService) Approve(name string, approvebuildrequest *ApproveBuildRequest) *ProjectsBuildsApproveCall {
3984	c := &ProjectsBuildsApproveCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3985	c.name = name
3986	c.approvebuildrequest = approvebuildrequest
3987	return c
3988}
3989
3990// Fields allows partial responses to be retrieved. See
3991// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3992// for more information.
3993func (c *ProjectsBuildsApproveCall) Fields(s ...googleapi.Field) *ProjectsBuildsApproveCall {
3994	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3995	return c
3996}
3997
3998// Context sets the context to be used in this call's Do method. Any
3999// pending HTTP request will be aborted if the provided context is
4000// canceled.
4001func (c *ProjectsBuildsApproveCall) Context(ctx context.Context) *ProjectsBuildsApproveCall {
4002	c.ctx_ = ctx
4003	return c
4004}
4005
4006// Header returns an http.Header that can be modified by the caller to
4007// add HTTP headers to the request.
4008func (c *ProjectsBuildsApproveCall) Header() http.Header {
4009	if c.header_ == nil {
4010		c.header_ = make(http.Header)
4011	}
4012	return c.header_
4013}
4014
4015func (c *ProjectsBuildsApproveCall) doRequest(alt string) (*http.Response, error) {
4016	reqHeaders := make(http.Header)
4017	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
4018	for k, v := range c.header_ {
4019		reqHeaders[k] = v
4020	}
4021	reqHeaders.Set("User-Agent", c.s.userAgent())
4022	var body io.Reader = nil
4023	body, err := googleapi.WithoutDataWrapper.JSONReader(c.approvebuildrequest)
4024	if err != nil {
4025		return nil, err
4026	}
4027	reqHeaders.Set("Content-Type", "application/json")
4028	c.urlParams_.Set("alt", alt)
4029	c.urlParams_.Set("prettyPrint", "false")
4030	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:approve")
4031	urls += "?" + c.urlParams_.Encode()
4032	req, err := http.NewRequest("POST", urls, body)
4033	if err != nil {
4034		return nil, err
4035	}
4036	req.Header = reqHeaders
4037	googleapi.Expand(req.URL, map[string]string{
4038		"name": c.name,
4039	})
4040	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4041}
4042
4043// Do executes the "cloudbuild.projects.builds.approve" call.
4044// Exactly one of *Operation or error will be non-nil. Any non-2xx
4045// status code is an error. Response headers are in either
4046// *Operation.ServerResponse.Header or (if a response was returned at
4047// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4048// to check whether the returned error was because
4049// http.StatusNotModified was returned.
4050func (c *ProjectsBuildsApproveCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4051	gensupport.SetOptions(c.urlParams_, opts...)
4052	res, err := c.doRequest("json")
4053	if res != nil && res.StatusCode == http.StatusNotModified {
4054		if res.Body != nil {
4055			res.Body.Close()
4056		}
4057		return nil, &googleapi.Error{
4058			Code:   res.StatusCode,
4059			Header: res.Header,
4060		}
4061	}
4062	if err != nil {
4063		return nil, err
4064	}
4065	defer googleapi.CloseBody(res)
4066	if err := googleapi.CheckResponse(res); err != nil {
4067		return nil, err
4068	}
4069	ret := &Operation{
4070		ServerResponse: googleapi.ServerResponse{
4071			Header:         res.Header,
4072			HTTPStatusCode: res.StatusCode,
4073		},
4074	}
4075	target := &ret
4076	if err := gensupport.DecodeResponse(target, res); err != nil {
4077		return nil, err
4078	}
4079	return ret, nil
4080	// {
4081	//   "description": "Approves or rejects a pending build. If approved, the returned LRO will be analogous to the LRO returned from a CreateBuild call. If rejected, the returned LRO will be immediately done.",
4082	//   "flatPath": "v1/projects/{projectsId}/builds/{buildsId}:approve",
4083	//   "httpMethod": "POST",
4084	//   "id": "cloudbuild.projects.builds.approve",
4085	//   "parameterOrder": [
4086	//     "name"
4087	//   ],
4088	//   "parameters": {
4089	//     "name": {
4090	//       "description": "Required. Name of the target build. For example: \"projects/{$project_id}/builds/{$build_id}\"",
4091	//       "location": "path",
4092	//       "pattern": "^projects/[^/]+/builds/[^/]+$",
4093	//       "required": true,
4094	//       "type": "string"
4095	//     }
4096	//   },
4097	//   "path": "v1/{+name}:approve",
4098	//   "request": {
4099	//     "$ref": "ApproveBuildRequest"
4100	//   },
4101	//   "response": {
4102	//     "$ref": "Operation"
4103	//   },
4104	//   "scopes": [
4105	//     "https://www.googleapis.com/auth/cloud-platform"
4106	//   ]
4107	// }
4108
4109}
4110
4111// method id "cloudbuild.projects.builds.cancel":
4112
4113type ProjectsBuildsCancelCall struct {
4114	s                  *Service
4115	projectId          string
4116	id                 string
4117	cancelbuildrequest *CancelBuildRequest
4118	urlParams_         gensupport.URLParams
4119	ctx_               context.Context
4120	header_            http.Header
4121}
4122
4123// Cancel: Cancels a build in progress.
4124//
4125// - id: ID of the build.
4126// - projectId: ID of the project.
4127func (r *ProjectsBuildsService) Cancel(projectId string, id string, cancelbuildrequest *CancelBuildRequest) *ProjectsBuildsCancelCall {
4128	c := &ProjectsBuildsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4129	c.projectId = projectId
4130	c.id = id
4131	c.cancelbuildrequest = cancelbuildrequest
4132	return c
4133}
4134
4135// Fields allows partial responses to be retrieved. See
4136// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4137// for more information.
4138func (c *ProjectsBuildsCancelCall) Fields(s ...googleapi.Field) *ProjectsBuildsCancelCall {
4139	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4140	return c
4141}
4142
4143// Context sets the context to be used in this call's Do method. Any
4144// pending HTTP request will be aborted if the provided context is
4145// canceled.
4146func (c *ProjectsBuildsCancelCall) Context(ctx context.Context) *ProjectsBuildsCancelCall {
4147	c.ctx_ = ctx
4148	return c
4149}
4150
4151// Header returns an http.Header that can be modified by the caller to
4152// add HTTP headers to the request.
4153func (c *ProjectsBuildsCancelCall) Header() http.Header {
4154	if c.header_ == nil {
4155		c.header_ = make(http.Header)
4156	}
4157	return c.header_
4158}
4159
4160func (c *ProjectsBuildsCancelCall) doRequest(alt string) (*http.Response, error) {
4161	reqHeaders := make(http.Header)
4162	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
4163	for k, v := range c.header_ {
4164		reqHeaders[k] = v
4165	}
4166	reqHeaders.Set("User-Agent", c.s.userAgent())
4167	var body io.Reader = nil
4168	body, err := googleapi.WithoutDataWrapper.JSONReader(c.cancelbuildrequest)
4169	if err != nil {
4170		return nil, err
4171	}
4172	reqHeaders.Set("Content-Type", "application/json")
4173	c.urlParams_.Set("alt", alt)
4174	c.urlParams_.Set("prettyPrint", "false")
4175	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/builds/{id}:cancel")
4176	urls += "?" + c.urlParams_.Encode()
4177	req, err := http.NewRequest("POST", urls, body)
4178	if err != nil {
4179		return nil, err
4180	}
4181	req.Header = reqHeaders
4182	googleapi.Expand(req.URL, map[string]string{
4183		"projectId": c.projectId,
4184		"id":        c.id,
4185	})
4186	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4187}
4188
4189// Do executes the "cloudbuild.projects.builds.cancel" call.
4190// Exactly one of *Build or error will be non-nil. Any non-2xx status
4191// code is an error. Response headers are in either
4192// *Build.ServerResponse.Header or (if a response was returned at all)
4193// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
4194// check whether the returned error was because http.StatusNotModified
4195// was returned.
4196func (c *ProjectsBuildsCancelCall) Do(opts ...googleapi.CallOption) (*Build, error) {
4197	gensupport.SetOptions(c.urlParams_, opts...)
4198	res, err := c.doRequest("json")
4199	if res != nil && res.StatusCode == http.StatusNotModified {
4200		if res.Body != nil {
4201			res.Body.Close()
4202		}
4203		return nil, &googleapi.Error{
4204			Code:   res.StatusCode,
4205			Header: res.Header,
4206		}
4207	}
4208	if err != nil {
4209		return nil, err
4210	}
4211	defer googleapi.CloseBody(res)
4212	if err := googleapi.CheckResponse(res); err != nil {
4213		return nil, err
4214	}
4215	ret := &Build{
4216		ServerResponse: googleapi.ServerResponse{
4217			Header:         res.Header,
4218			HTTPStatusCode: res.StatusCode,
4219		},
4220	}
4221	target := &ret
4222	if err := gensupport.DecodeResponse(target, res); err != nil {
4223		return nil, err
4224	}
4225	return ret, nil
4226	// {
4227	//   "description": "Cancels a build in progress.",
4228	//   "flatPath": "v1/projects/{projectId}/builds/{id}:cancel",
4229	//   "httpMethod": "POST",
4230	//   "id": "cloudbuild.projects.builds.cancel",
4231	//   "parameterOrder": [
4232	//     "projectId",
4233	//     "id"
4234	//   ],
4235	//   "parameters": {
4236	//     "id": {
4237	//       "description": "Required. ID of the build.",
4238	//       "location": "path",
4239	//       "required": true,
4240	//       "type": "string"
4241	//     },
4242	//     "projectId": {
4243	//       "description": "Required. ID of the project.",
4244	//       "location": "path",
4245	//       "required": true,
4246	//       "type": "string"
4247	//     }
4248	//   },
4249	//   "path": "v1/projects/{projectId}/builds/{id}:cancel",
4250	//   "request": {
4251	//     "$ref": "CancelBuildRequest"
4252	//   },
4253	//   "response": {
4254	//     "$ref": "Build"
4255	//   },
4256	//   "scopes": [
4257	//     "https://www.googleapis.com/auth/cloud-platform"
4258	//   ]
4259	// }
4260
4261}
4262
4263// method id "cloudbuild.projects.builds.create":
4264
4265type ProjectsBuildsCreateCall struct {
4266	s          *Service
4267	projectId  string
4268	build      *Build
4269	urlParams_ gensupport.URLParams
4270	ctx_       context.Context
4271	header_    http.Header
4272}
4273
4274// Create: Starts a build with the specified configuration. This method
4275// returns a long-running `Operation`, which includes the build ID. Pass
4276// the build ID to `GetBuild` to determine the build status (such as
4277// `SUCCESS` or `FAILURE`).
4278//
4279// - projectId: ID of the project.
4280func (r *ProjectsBuildsService) Create(projectId string, build *Build) *ProjectsBuildsCreateCall {
4281	c := &ProjectsBuildsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4282	c.projectId = projectId
4283	c.build = build
4284	return c
4285}
4286
4287// Parent sets the optional parameter "parent": The parent resource
4288// where this build will be created. Format:
4289// `projects/{project}/locations/{location}`
4290func (c *ProjectsBuildsCreateCall) Parent(parent string) *ProjectsBuildsCreateCall {
4291	c.urlParams_.Set("parent", parent)
4292	return c
4293}
4294
4295// Fields allows partial responses to be retrieved. See
4296// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4297// for more information.
4298func (c *ProjectsBuildsCreateCall) Fields(s ...googleapi.Field) *ProjectsBuildsCreateCall {
4299	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4300	return c
4301}
4302
4303// Context sets the context to be used in this call's Do method. Any
4304// pending HTTP request will be aborted if the provided context is
4305// canceled.
4306func (c *ProjectsBuildsCreateCall) Context(ctx context.Context) *ProjectsBuildsCreateCall {
4307	c.ctx_ = ctx
4308	return c
4309}
4310
4311// Header returns an http.Header that can be modified by the caller to
4312// add HTTP headers to the request.
4313func (c *ProjectsBuildsCreateCall) Header() http.Header {
4314	if c.header_ == nil {
4315		c.header_ = make(http.Header)
4316	}
4317	return c.header_
4318}
4319
4320func (c *ProjectsBuildsCreateCall) doRequest(alt string) (*http.Response, error) {
4321	reqHeaders := make(http.Header)
4322	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
4323	for k, v := range c.header_ {
4324		reqHeaders[k] = v
4325	}
4326	reqHeaders.Set("User-Agent", c.s.userAgent())
4327	var body io.Reader = nil
4328	body, err := googleapi.WithoutDataWrapper.JSONReader(c.build)
4329	if err != nil {
4330		return nil, err
4331	}
4332	reqHeaders.Set("Content-Type", "application/json")
4333	c.urlParams_.Set("alt", alt)
4334	c.urlParams_.Set("prettyPrint", "false")
4335	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/builds")
4336	urls += "?" + c.urlParams_.Encode()
4337	req, err := http.NewRequest("POST", urls, body)
4338	if err != nil {
4339		return nil, err
4340	}
4341	req.Header = reqHeaders
4342	googleapi.Expand(req.URL, map[string]string{
4343		"projectId": c.projectId,
4344	})
4345	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4346}
4347
4348// Do executes the "cloudbuild.projects.builds.create" call.
4349// Exactly one of *Operation or error will be non-nil. Any non-2xx
4350// status code is an error. Response headers are in either
4351// *Operation.ServerResponse.Header or (if a response was returned at
4352// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4353// to check whether the returned error was because
4354// http.StatusNotModified was returned.
4355func (c *ProjectsBuildsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4356	gensupport.SetOptions(c.urlParams_, opts...)
4357	res, err := c.doRequest("json")
4358	if res != nil && res.StatusCode == http.StatusNotModified {
4359		if res.Body != nil {
4360			res.Body.Close()
4361		}
4362		return nil, &googleapi.Error{
4363			Code:   res.StatusCode,
4364			Header: res.Header,
4365		}
4366	}
4367	if err != nil {
4368		return nil, err
4369	}
4370	defer googleapi.CloseBody(res)
4371	if err := googleapi.CheckResponse(res); err != nil {
4372		return nil, err
4373	}
4374	ret := &Operation{
4375		ServerResponse: googleapi.ServerResponse{
4376			Header:         res.Header,
4377			HTTPStatusCode: res.StatusCode,
4378		},
4379	}
4380	target := &ret
4381	if err := gensupport.DecodeResponse(target, res); err != nil {
4382		return nil, err
4383	}
4384	return ret, nil
4385	// {
4386	//   "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`).",
4387	//   "flatPath": "v1/projects/{projectId}/builds",
4388	//   "httpMethod": "POST",
4389	//   "id": "cloudbuild.projects.builds.create",
4390	//   "parameterOrder": [
4391	//     "projectId"
4392	//   ],
4393	//   "parameters": {
4394	//     "parent": {
4395	//       "description": "The parent resource where this build will be created. Format: `projects/{project}/locations/{location}`",
4396	//       "location": "query",
4397	//       "type": "string"
4398	//     },
4399	//     "projectId": {
4400	//       "description": "Required. ID of the project.",
4401	//       "location": "path",
4402	//       "required": true,
4403	//       "type": "string"
4404	//     }
4405	//   },
4406	//   "path": "v1/projects/{projectId}/builds",
4407	//   "request": {
4408	//     "$ref": "Build"
4409	//   },
4410	//   "response": {
4411	//     "$ref": "Operation"
4412	//   },
4413	//   "scopes": [
4414	//     "https://www.googleapis.com/auth/cloud-platform"
4415	//   ]
4416	// }
4417
4418}
4419
4420// method id "cloudbuild.projects.builds.get":
4421
4422type ProjectsBuildsGetCall struct {
4423	s            *Service
4424	projectId    string
4425	id           string
4426	urlParams_   gensupport.URLParams
4427	ifNoneMatch_ string
4428	ctx_         context.Context
4429	header_      http.Header
4430}
4431
4432// Get: Returns information about a previously requested build. The
4433// `Build` that is returned includes its status (such as `SUCCESS`,
4434// `FAILURE`, or `WORKING`), and timing information.
4435//
4436// - id: ID of the build.
4437// - projectId: ID of the project.
4438func (r *ProjectsBuildsService) Get(projectId string, id string) *ProjectsBuildsGetCall {
4439	c := &ProjectsBuildsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4440	c.projectId = projectId
4441	c.id = id
4442	return c
4443}
4444
4445// Name sets the optional parameter "name": The name of the `Build` to
4446// retrieve. Format:
4447// `projects/{project}/locations/{location}/builds/{build}`
4448func (c *ProjectsBuildsGetCall) Name(name string) *ProjectsBuildsGetCall {
4449	c.urlParams_.Set("name", name)
4450	return c
4451}
4452
4453// Fields allows partial responses to be retrieved. See
4454// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4455// for more information.
4456func (c *ProjectsBuildsGetCall) Fields(s ...googleapi.Field) *ProjectsBuildsGetCall {
4457	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4458	return c
4459}
4460
4461// IfNoneMatch sets the optional parameter which makes the operation
4462// fail if the object's ETag matches the given value. This is useful for
4463// getting updates only after the object has changed since the last
4464// request. Use googleapi.IsNotModified to check whether the response
4465// error from Do is the result of In-None-Match.
4466func (c *ProjectsBuildsGetCall) IfNoneMatch(entityTag string) *ProjectsBuildsGetCall {
4467	c.ifNoneMatch_ = entityTag
4468	return c
4469}
4470
4471// Context sets the context to be used in this call's Do method. Any
4472// pending HTTP request will be aborted if the provided context is
4473// canceled.
4474func (c *ProjectsBuildsGetCall) Context(ctx context.Context) *ProjectsBuildsGetCall {
4475	c.ctx_ = ctx
4476	return c
4477}
4478
4479// Header returns an http.Header that can be modified by the caller to
4480// add HTTP headers to the request.
4481func (c *ProjectsBuildsGetCall) Header() http.Header {
4482	if c.header_ == nil {
4483		c.header_ = make(http.Header)
4484	}
4485	return c.header_
4486}
4487
4488func (c *ProjectsBuildsGetCall) doRequest(alt string) (*http.Response, error) {
4489	reqHeaders := make(http.Header)
4490	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
4491	for k, v := range c.header_ {
4492		reqHeaders[k] = v
4493	}
4494	reqHeaders.Set("User-Agent", c.s.userAgent())
4495	if c.ifNoneMatch_ != "" {
4496		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4497	}
4498	var body io.Reader = nil
4499	c.urlParams_.Set("alt", alt)
4500	c.urlParams_.Set("prettyPrint", "false")
4501	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/builds/{id}")
4502	urls += "?" + c.urlParams_.Encode()
4503	req, err := http.NewRequest("GET", urls, body)
4504	if err != nil {
4505		return nil, err
4506	}
4507	req.Header = reqHeaders
4508	googleapi.Expand(req.URL, map[string]string{
4509		"projectId": c.projectId,
4510		"id":        c.id,
4511	})
4512	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4513}
4514
4515// Do executes the "cloudbuild.projects.builds.get" call.
4516// Exactly one of *Build or error will be non-nil. Any non-2xx status
4517// code is an error. Response headers are in either
4518// *Build.ServerResponse.Header or (if a response was returned at all)
4519// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
4520// check whether the returned error was because http.StatusNotModified
4521// was returned.
4522func (c *ProjectsBuildsGetCall) Do(opts ...googleapi.CallOption) (*Build, error) {
4523	gensupport.SetOptions(c.urlParams_, opts...)
4524	res, err := c.doRequest("json")
4525	if res != nil && res.StatusCode == http.StatusNotModified {
4526		if res.Body != nil {
4527			res.Body.Close()
4528		}
4529		return nil, &googleapi.Error{
4530			Code:   res.StatusCode,
4531			Header: res.Header,
4532		}
4533	}
4534	if err != nil {
4535		return nil, err
4536	}
4537	defer googleapi.CloseBody(res)
4538	if err := googleapi.CheckResponse(res); err != nil {
4539		return nil, err
4540	}
4541	ret := &Build{
4542		ServerResponse: googleapi.ServerResponse{
4543			Header:         res.Header,
4544			HTTPStatusCode: res.StatusCode,
4545		},
4546	}
4547	target := &ret
4548	if err := gensupport.DecodeResponse(target, res); err != nil {
4549		return nil, err
4550	}
4551	return ret, nil
4552	// {
4553	//   "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.",
4554	//   "flatPath": "v1/projects/{projectId}/builds/{id}",
4555	//   "httpMethod": "GET",
4556	//   "id": "cloudbuild.projects.builds.get",
4557	//   "parameterOrder": [
4558	//     "projectId",
4559	//     "id"
4560	//   ],
4561	//   "parameters": {
4562	//     "id": {
4563	//       "description": "Required. ID of the build.",
4564	//       "location": "path",
4565	//       "required": true,
4566	//       "type": "string"
4567	//     },
4568	//     "name": {
4569	//       "description": "The name of the `Build` to retrieve. Format: `projects/{project}/locations/{location}/builds/{build}`",
4570	//       "location": "query",
4571	//       "type": "string"
4572	//     },
4573	//     "projectId": {
4574	//       "description": "Required. ID of the project.",
4575	//       "location": "path",
4576	//       "required": true,
4577	//       "type": "string"
4578	//     }
4579	//   },
4580	//   "path": "v1/projects/{projectId}/builds/{id}",
4581	//   "response": {
4582	//     "$ref": "Build"
4583	//   },
4584	//   "scopes": [
4585	//     "https://www.googleapis.com/auth/cloud-platform"
4586	//   ]
4587	// }
4588
4589}
4590
4591// method id "cloudbuild.projects.builds.list":
4592
4593type ProjectsBuildsListCall struct {
4594	s            *Service
4595	projectId    string
4596	urlParams_   gensupport.URLParams
4597	ifNoneMatch_ string
4598	ctx_         context.Context
4599	header_      http.Header
4600}
4601
4602// List: Lists previously requested builds. Previously requested builds
4603// may still be in-progress, or may have finished successfully or
4604// unsuccessfully.
4605//
4606// - projectId: ID of the project.
4607func (r *ProjectsBuildsService) List(projectId string) *ProjectsBuildsListCall {
4608	c := &ProjectsBuildsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4609	c.projectId = projectId
4610	return c
4611}
4612
4613// Filter sets the optional parameter "filter": The raw filter text to
4614// constrain the results.
4615func (c *ProjectsBuildsListCall) Filter(filter string) *ProjectsBuildsListCall {
4616	c.urlParams_.Set("filter", filter)
4617	return c
4618}
4619
4620// PageSize sets the optional parameter "pageSize": Number of results to
4621// return in the list.
4622func (c *ProjectsBuildsListCall) PageSize(pageSize int64) *ProjectsBuildsListCall {
4623	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4624	return c
4625}
4626
4627// PageToken sets the optional parameter "pageToken": The page token for
4628// the next page of Builds. If unspecified, the first page of results is
4629// returned. If the token is rejected for any reason, INVALID_ARGUMENT
4630// will be thrown. In this case, the token should be discarded, and
4631// pagination should be restarted from the first page of results. See
4632// https://google.aip.dev/158 for more.
4633func (c *ProjectsBuildsListCall) PageToken(pageToken string) *ProjectsBuildsListCall {
4634	c.urlParams_.Set("pageToken", pageToken)
4635	return c
4636}
4637
4638// Parent sets the optional parameter "parent": The parent of the
4639// collection of `Builds`. Format:
4640// `projects/{project}/locations/location`
4641func (c *ProjectsBuildsListCall) Parent(parent string) *ProjectsBuildsListCall {
4642	c.urlParams_.Set("parent", parent)
4643	return c
4644}
4645
4646// Fields allows partial responses to be retrieved. See
4647// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4648// for more information.
4649func (c *ProjectsBuildsListCall) Fields(s ...googleapi.Field) *ProjectsBuildsListCall {
4650	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4651	return c
4652}
4653
4654// IfNoneMatch sets the optional parameter which makes the operation
4655// fail if the object's ETag matches the given value. This is useful for
4656// getting updates only after the object has changed since the last
4657// request. Use googleapi.IsNotModified to check whether the response
4658// error from Do is the result of In-None-Match.
4659func (c *ProjectsBuildsListCall) IfNoneMatch(entityTag string) *ProjectsBuildsListCall {
4660	c.ifNoneMatch_ = entityTag
4661	return c
4662}
4663
4664// Context sets the context to be used in this call's Do method. Any
4665// pending HTTP request will be aborted if the provided context is
4666// canceled.
4667func (c *ProjectsBuildsListCall) Context(ctx context.Context) *ProjectsBuildsListCall {
4668	c.ctx_ = ctx
4669	return c
4670}
4671
4672// Header returns an http.Header that can be modified by the caller to
4673// add HTTP headers to the request.
4674func (c *ProjectsBuildsListCall) Header() http.Header {
4675	if c.header_ == nil {
4676		c.header_ = make(http.Header)
4677	}
4678	return c.header_
4679}
4680
4681func (c *ProjectsBuildsListCall) doRequest(alt string) (*http.Response, error) {
4682	reqHeaders := make(http.Header)
4683	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
4684	for k, v := range c.header_ {
4685		reqHeaders[k] = v
4686	}
4687	reqHeaders.Set("User-Agent", c.s.userAgent())
4688	if c.ifNoneMatch_ != "" {
4689		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4690	}
4691	var body io.Reader = nil
4692	c.urlParams_.Set("alt", alt)
4693	c.urlParams_.Set("prettyPrint", "false")
4694	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/builds")
4695	urls += "?" + c.urlParams_.Encode()
4696	req, err := http.NewRequest("GET", urls, body)
4697	if err != nil {
4698		return nil, err
4699	}
4700	req.Header = reqHeaders
4701	googleapi.Expand(req.URL, map[string]string{
4702		"projectId": c.projectId,
4703	})
4704	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4705}
4706
4707// Do executes the "cloudbuild.projects.builds.list" call.
4708// Exactly one of *ListBuildsResponse or error will be non-nil. Any
4709// non-2xx status code is an error. Response headers are in either
4710// *ListBuildsResponse.ServerResponse.Header or (if a response was
4711// returned at all) in error.(*googleapi.Error).Header. Use
4712// googleapi.IsNotModified to check whether the returned error was
4713// because http.StatusNotModified was returned.
4714func (c *ProjectsBuildsListCall) Do(opts ...googleapi.CallOption) (*ListBuildsResponse, error) {
4715	gensupport.SetOptions(c.urlParams_, opts...)
4716	res, err := c.doRequest("json")
4717	if res != nil && res.StatusCode == http.StatusNotModified {
4718		if res.Body != nil {
4719			res.Body.Close()
4720		}
4721		return nil, &googleapi.Error{
4722			Code:   res.StatusCode,
4723			Header: res.Header,
4724		}
4725	}
4726	if err != nil {
4727		return nil, err
4728	}
4729	defer googleapi.CloseBody(res)
4730	if err := googleapi.CheckResponse(res); err != nil {
4731		return nil, err
4732	}
4733	ret := &ListBuildsResponse{
4734		ServerResponse: googleapi.ServerResponse{
4735			Header:         res.Header,
4736			HTTPStatusCode: res.StatusCode,
4737		},
4738	}
4739	target := &ret
4740	if err := gensupport.DecodeResponse(target, res); err != nil {
4741		return nil, err
4742	}
4743	return ret, nil
4744	// {
4745	//   "description": "Lists previously requested builds. Previously requested builds may still be in-progress, or may have finished successfully or unsuccessfully.",
4746	//   "flatPath": "v1/projects/{projectId}/builds",
4747	//   "httpMethod": "GET",
4748	//   "id": "cloudbuild.projects.builds.list",
4749	//   "parameterOrder": [
4750	//     "projectId"
4751	//   ],
4752	//   "parameters": {
4753	//     "filter": {
4754	//       "description": "The raw filter text to constrain the results.",
4755	//       "location": "query",
4756	//       "type": "string"
4757	//     },
4758	//     "pageSize": {
4759	//       "description": "Number of results to return in the list.",
4760	//       "format": "int32",
4761	//       "location": "query",
4762	//       "type": "integer"
4763	//     },
4764	//     "pageToken": {
4765	//       "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.",
4766	//       "location": "query",
4767	//       "type": "string"
4768	//     },
4769	//     "parent": {
4770	//       "description": "The parent of the collection of `Builds`. Format: `projects/{project}/locations/location`",
4771	//       "location": "query",
4772	//       "type": "string"
4773	//     },
4774	//     "projectId": {
4775	//       "description": "Required. ID of the project.",
4776	//       "location": "path",
4777	//       "required": true,
4778	//       "type": "string"
4779	//     }
4780	//   },
4781	//   "path": "v1/projects/{projectId}/builds",
4782	//   "response": {
4783	//     "$ref": "ListBuildsResponse"
4784	//   },
4785	//   "scopes": [
4786	//     "https://www.googleapis.com/auth/cloud-platform"
4787	//   ]
4788	// }
4789
4790}
4791
4792// Pages invokes f for each page of results.
4793// A non-nil error returned from f will halt the iteration.
4794// The provided context supersedes any context provided to the Context method.
4795func (c *ProjectsBuildsListCall) Pages(ctx context.Context, f func(*ListBuildsResponse) error) error {
4796	c.ctx_ = ctx
4797	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
4798	for {
4799		x, err := c.Do()
4800		if err != nil {
4801			return err
4802		}
4803		if err := f(x); err != nil {
4804			return err
4805		}
4806		if x.NextPageToken == "" {
4807			return nil
4808		}
4809		c.PageToken(x.NextPageToken)
4810	}
4811}
4812
4813// method id "cloudbuild.projects.builds.retry":
4814
4815type ProjectsBuildsRetryCall struct {
4816	s                 *Service
4817	projectId         string
4818	id                string
4819	retrybuildrequest *RetryBuildRequest
4820	urlParams_        gensupport.URLParams
4821	ctx_              context.Context
4822	header_           http.Header
4823}
4824
4825// Retry: Creates a new build based on the specified build. This method
4826// creates a new build using the original build request, which may or
4827// may not result in an identical build. For triggered builds: *
4828// Triggered builds resolve to a precise revision; therefore a retry of
4829// a triggered build will result in a build that uses the same revision.
4830// For non-triggered builds that specify `RepoSource`: * If the original
4831// build built from the tip of a branch, the retried build will build
4832// from the tip of that branch, which may not be the same revision as
4833// the original build. * If the original build specified a commit sha or
4834// revision ID, the retried build will use the identical source. For
4835// builds that specify `StorageSource`: * If the original build pulled
4836// source from Google Cloud Storage without specifying the generation of
4837// the object, the new build will use the current object, which may be
4838// different from the original build source. * If the original build
4839// pulled source from Cloud Storage and specified the generation of the
4840// object, the new build will attempt to use the same object, which may
4841// or may not be available depending on the bucket's lifecycle
4842// management settings.
4843//
4844// - id: Build ID of the original build.
4845// - projectId: ID of the project.
4846func (r *ProjectsBuildsService) Retry(projectId string, id string, retrybuildrequest *RetryBuildRequest) *ProjectsBuildsRetryCall {
4847	c := &ProjectsBuildsRetryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4848	c.projectId = projectId
4849	c.id = id
4850	c.retrybuildrequest = retrybuildrequest
4851	return c
4852}
4853
4854// Fields allows partial responses to be retrieved. See
4855// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4856// for more information.
4857func (c *ProjectsBuildsRetryCall) Fields(s ...googleapi.Field) *ProjectsBuildsRetryCall {
4858	c.urlParams_.Set("fields", googleapi.CombineFields(s))
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 *ProjectsBuildsRetryCall) Context(ctx context.Context) *ProjectsBuildsRetryCall {
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 *ProjectsBuildsRetryCall) Header() http.Header {
4873	if c.header_ == nil {
4874		c.header_ = make(http.Header)
4875	}
4876	return c.header_
4877}
4878
4879func (c *ProjectsBuildsRetryCall) doRequest(alt string) (*http.Response, error) {
4880	reqHeaders := make(http.Header)
4881	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
4882	for k, v := range c.header_ {
4883		reqHeaders[k] = v
4884	}
4885	reqHeaders.Set("User-Agent", c.s.userAgent())
4886	var body io.Reader = nil
4887	body, err := googleapi.WithoutDataWrapper.JSONReader(c.retrybuildrequest)
4888	if err != nil {
4889		return nil, err
4890	}
4891	reqHeaders.Set("Content-Type", "application/json")
4892	c.urlParams_.Set("alt", alt)
4893	c.urlParams_.Set("prettyPrint", "false")
4894	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/builds/{id}:retry")
4895	urls += "?" + c.urlParams_.Encode()
4896	req, err := http.NewRequest("POST", urls, body)
4897	if err != nil {
4898		return nil, err
4899	}
4900	req.Header = reqHeaders
4901	googleapi.Expand(req.URL, map[string]string{
4902		"projectId": c.projectId,
4903		"id":        c.id,
4904	})
4905	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4906}
4907
4908// Do executes the "cloudbuild.projects.builds.retry" call.
4909// Exactly one of *Operation or error will be non-nil. Any non-2xx
4910// status code is an error. Response headers are in either
4911// *Operation.ServerResponse.Header or (if a response was returned at
4912// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4913// to check whether the returned error was because
4914// http.StatusNotModified was returned.
4915func (c *ProjectsBuildsRetryCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4916	gensupport.SetOptions(c.urlParams_, opts...)
4917	res, err := c.doRequest("json")
4918	if res != nil && res.StatusCode == http.StatusNotModified {
4919		if res.Body != nil {
4920			res.Body.Close()
4921		}
4922		return nil, &googleapi.Error{
4923			Code:   res.StatusCode,
4924			Header: res.Header,
4925		}
4926	}
4927	if err != nil {
4928		return nil, err
4929	}
4930	defer googleapi.CloseBody(res)
4931	if err := googleapi.CheckResponse(res); err != nil {
4932		return nil, err
4933	}
4934	ret := &Operation{
4935		ServerResponse: googleapi.ServerResponse{
4936			Header:         res.Header,
4937			HTTPStatusCode: res.StatusCode,
4938		},
4939	}
4940	target := &ret
4941	if err := gensupport.DecodeResponse(target, res); err != nil {
4942		return nil, err
4943	}
4944	return ret, nil
4945	// {
4946	//   "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.",
4947	//   "flatPath": "v1/projects/{projectId}/builds/{id}:retry",
4948	//   "httpMethod": "POST",
4949	//   "id": "cloudbuild.projects.builds.retry",
4950	//   "parameterOrder": [
4951	//     "projectId",
4952	//     "id"
4953	//   ],
4954	//   "parameters": {
4955	//     "id": {
4956	//       "description": "Required. Build ID of the original build.",
4957	//       "location": "path",
4958	//       "required": true,
4959	//       "type": "string"
4960	//     },
4961	//     "projectId": {
4962	//       "description": "Required. ID of the project.",
4963	//       "location": "path",
4964	//       "required": true,
4965	//       "type": "string"
4966	//     }
4967	//   },
4968	//   "path": "v1/projects/{projectId}/builds/{id}:retry",
4969	//   "request": {
4970	//     "$ref": "RetryBuildRequest"
4971	//   },
4972	//   "response": {
4973	//     "$ref": "Operation"
4974	//   },
4975	//   "scopes": [
4976	//     "https://www.googleapis.com/auth/cloud-platform"
4977	//   ]
4978	// }
4979
4980}
4981
4982// method id "cloudbuild.projects.githubEnterpriseConfigs.create":
4983
4984type ProjectsGithubEnterpriseConfigsCreateCall struct {
4985	s                      *Service
4986	parent                 string
4987	githubenterpriseconfig *GitHubEnterpriseConfig
4988	urlParams_             gensupport.URLParams
4989	ctx_                   context.Context
4990	header_                http.Header
4991}
4992
4993// Create: Create an association between a GCP project and a GitHub
4994// Enterprise server.
4995//
4996// - parent: Name of the parent project. For example:
4997//   projects/{$project_number} or projects/{$project_id}.
4998func (r *ProjectsGithubEnterpriseConfigsService) Create(parent string, githubenterpriseconfig *GitHubEnterpriseConfig) *ProjectsGithubEnterpriseConfigsCreateCall {
4999	c := &ProjectsGithubEnterpriseConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5000	c.parent = parent
5001	c.githubenterpriseconfig = githubenterpriseconfig
5002	return c
5003}
5004
5005// ProjectId sets the optional parameter "projectId": ID of the project.
5006func (c *ProjectsGithubEnterpriseConfigsCreateCall) ProjectId(projectId string) *ProjectsGithubEnterpriseConfigsCreateCall {
5007	c.urlParams_.Set("projectId", projectId)
5008	return c
5009}
5010
5011// Fields allows partial responses to be retrieved. See
5012// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5013// for more information.
5014func (c *ProjectsGithubEnterpriseConfigsCreateCall) Fields(s ...googleapi.Field) *ProjectsGithubEnterpriseConfigsCreateCall {
5015	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5016	return c
5017}
5018
5019// Context sets the context to be used in this call's Do method. Any
5020// pending HTTP request will be aborted if the provided context is
5021// canceled.
5022func (c *ProjectsGithubEnterpriseConfigsCreateCall) Context(ctx context.Context) *ProjectsGithubEnterpriseConfigsCreateCall {
5023	c.ctx_ = ctx
5024	return c
5025}
5026
5027// Header returns an http.Header that can be modified by the caller to
5028// add HTTP headers to the request.
5029func (c *ProjectsGithubEnterpriseConfigsCreateCall) Header() http.Header {
5030	if c.header_ == nil {
5031		c.header_ = make(http.Header)
5032	}
5033	return c.header_
5034}
5035
5036func (c *ProjectsGithubEnterpriseConfigsCreateCall) doRequest(alt string) (*http.Response, error) {
5037	reqHeaders := make(http.Header)
5038	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
5039	for k, v := range c.header_ {
5040		reqHeaders[k] = v
5041	}
5042	reqHeaders.Set("User-Agent", c.s.userAgent())
5043	var body io.Reader = nil
5044	body, err := googleapi.WithoutDataWrapper.JSONReader(c.githubenterpriseconfig)
5045	if err != nil {
5046		return nil, err
5047	}
5048	reqHeaders.Set("Content-Type", "application/json")
5049	c.urlParams_.Set("alt", alt)
5050	c.urlParams_.Set("prettyPrint", "false")
5051	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/githubEnterpriseConfigs")
5052	urls += "?" + c.urlParams_.Encode()
5053	req, err := http.NewRequest("POST", urls, body)
5054	if err != nil {
5055		return nil, err
5056	}
5057	req.Header = reqHeaders
5058	googleapi.Expand(req.URL, map[string]string{
5059		"parent": c.parent,
5060	})
5061	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5062}
5063
5064// Do executes the "cloudbuild.projects.githubEnterpriseConfigs.create" call.
5065// Exactly one of *Operation or error will be non-nil. Any non-2xx
5066// status code is an error. Response headers are in either
5067// *Operation.ServerResponse.Header or (if a response was returned at
5068// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
5069// to check whether the returned error was because
5070// http.StatusNotModified was returned.
5071func (c *ProjectsGithubEnterpriseConfigsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5072	gensupport.SetOptions(c.urlParams_, opts...)
5073	res, err := c.doRequest("json")
5074	if res != nil && res.StatusCode == http.StatusNotModified {
5075		if res.Body != nil {
5076			res.Body.Close()
5077		}
5078		return nil, &googleapi.Error{
5079			Code:   res.StatusCode,
5080			Header: res.Header,
5081		}
5082	}
5083	if err != nil {
5084		return nil, err
5085	}
5086	defer googleapi.CloseBody(res)
5087	if err := googleapi.CheckResponse(res); err != nil {
5088		return nil, err
5089	}
5090	ret := &Operation{
5091		ServerResponse: googleapi.ServerResponse{
5092			Header:         res.Header,
5093			HTTPStatusCode: res.StatusCode,
5094		},
5095	}
5096	target := &ret
5097	if err := gensupport.DecodeResponse(target, res); err != nil {
5098		return nil, err
5099	}
5100	return ret, nil
5101	// {
5102	//   "description": "Create an association between a GCP project and a GitHub Enterprise server.",
5103	//   "flatPath": "v1/projects/{projectsId}/githubEnterpriseConfigs",
5104	//   "httpMethod": "POST",
5105	//   "id": "cloudbuild.projects.githubEnterpriseConfigs.create",
5106	//   "parameterOrder": [
5107	//     "parent"
5108	//   ],
5109	//   "parameters": {
5110	//     "parent": {
5111	//       "description": "Name of the parent project. For example: projects/{$project_number} or projects/{$project_id}",
5112	//       "location": "path",
5113	//       "pattern": "^projects/[^/]+$",
5114	//       "required": true,
5115	//       "type": "string"
5116	//     },
5117	//     "projectId": {
5118	//       "description": "ID of the project.",
5119	//       "location": "query",
5120	//       "type": "string"
5121	//     }
5122	//   },
5123	//   "path": "v1/{+parent}/githubEnterpriseConfigs",
5124	//   "request": {
5125	//     "$ref": "GitHubEnterpriseConfig"
5126	//   },
5127	//   "response": {
5128	//     "$ref": "Operation"
5129	//   },
5130	//   "scopes": [
5131	//     "https://www.googleapis.com/auth/cloud-platform"
5132	//   ]
5133	// }
5134
5135}
5136
5137// method id "cloudbuild.projects.githubEnterpriseConfigs.delete":
5138
5139type ProjectsGithubEnterpriseConfigsDeleteCall struct {
5140	s          *Service
5141	name       string
5142	urlParams_ gensupport.URLParams
5143	ctx_       context.Context
5144	header_    http.Header
5145}
5146
5147// Delete: Delete an association between a GCP project and a GitHub
5148// Enterprise server.
5149//
5150// - name: This field should contain the name of the enterprise config
5151//   resource. For example:
5152//   "projects/{$project_id}/githubEnterpriseConfigs/{$config_id}".
5153func (r *ProjectsGithubEnterpriseConfigsService) Delete(name string) *ProjectsGithubEnterpriseConfigsDeleteCall {
5154	c := &ProjectsGithubEnterpriseConfigsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5155	c.name = name
5156	return c
5157}
5158
5159// ConfigId sets the optional parameter "configId": Unique identifier of
5160// the `GitHubEnterpriseConfig`
5161func (c *ProjectsGithubEnterpriseConfigsDeleteCall) ConfigId(configId string) *ProjectsGithubEnterpriseConfigsDeleteCall {
5162	c.urlParams_.Set("configId", configId)
5163	return c
5164}
5165
5166// ProjectId sets the optional parameter "projectId": ID of the project
5167func (c *ProjectsGithubEnterpriseConfigsDeleteCall) ProjectId(projectId string) *ProjectsGithubEnterpriseConfigsDeleteCall {
5168	c.urlParams_.Set("projectId", projectId)
5169	return c
5170}
5171
5172// Fields allows partial responses to be retrieved. See
5173// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5174// for more information.
5175func (c *ProjectsGithubEnterpriseConfigsDeleteCall) Fields(s ...googleapi.Field) *ProjectsGithubEnterpriseConfigsDeleteCall {
5176	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5177	return c
5178}
5179
5180// Context sets the context to be used in this call's Do method. Any
5181// pending HTTP request will be aborted if the provided context is
5182// canceled.
5183func (c *ProjectsGithubEnterpriseConfigsDeleteCall) Context(ctx context.Context) *ProjectsGithubEnterpriseConfigsDeleteCall {
5184	c.ctx_ = ctx
5185	return c
5186}
5187
5188// Header returns an http.Header that can be modified by the caller to
5189// add HTTP headers to the request.
5190func (c *ProjectsGithubEnterpriseConfigsDeleteCall) Header() http.Header {
5191	if c.header_ == nil {
5192		c.header_ = make(http.Header)
5193	}
5194	return c.header_
5195}
5196
5197func (c *ProjectsGithubEnterpriseConfigsDeleteCall) doRequest(alt string) (*http.Response, error) {
5198	reqHeaders := make(http.Header)
5199	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
5200	for k, v := range c.header_ {
5201		reqHeaders[k] = v
5202	}
5203	reqHeaders.Set("User-Agent", c.s.userAgent())
5204	var body io.Reader = nil
5205	c.urlParams_.Set("alt", alt)
5206	c.urlParams_.Set("prettyPrint", "false")
5207	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
5208	urls += "?" + c.urlParams_.Encode()
5209	req, err := http.NewRequest("DELETE", urls, body)
5210	if err != nil {
5211		return nil, err
5212	}
5213	req.Header = reqHeaders
5214	googleapi.Expand(req.URL, map[string]string{
5215		"name": c.name,
5216	})
5217	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5218}
5219
5220// Do executes the "cloudbuild.projects.githubEnterpriseConfigs.delete" call.
5221// Exactly one of *Operation or error will be non-nil. Any non-2xx
5222// status code is an error. Response headers are in either
5223// *Operation.ServerResponse.Header or (if a response was returned at
5224// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
5225// to check whether the returned error was because
5226// http.StatusNotModified was returned.
5227func (c *ProjectsGithubEnterpriseConfigsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5228	gensupport.SetOptions(c.urlParams_, opts...)
5229	res, err := c.doRequest("json")
5230	if res != nil && res.StatusCode == http.StatusNotModified {
5231		if res.Body != nil {
5232			res.Body.Close()
5233		}
5234		return nil, &googleapi.Error{
5235			Code:   res.StatusCode,
5236			Header: res.Header,
5237		}
5238	}
5239	if err != nil {
5240		return nil, err
5241	}
5242	defer googleapi.CloseBody(res)
5243	if err := googleapi.CheckResponse(res); err != nil {
5244		return nil, err
5245	}
5246	ret := &Operation{
5247		ServerResponse: googleapi.ServerResponse{
5248			Header:         res.Header,
5249			HTTPStatusCode: res.StatusCode,
5250		},
5251	}
5252	target := &ret
5253	if err := gensupport.DecodeResponse(target, res); err != nil {
5254		return nil, err
5255	}
5256	return ret, nil
5257	// {
5258	//   "description": "Delete an association between a GCP project and a GitHub Enterprise server.",
5259	//   "flatPath": "v1/projects/{projectsId}/githubEnterpriseConfigs/{githubEnterpriseConfigsId}",
5260	//   "httpMethod": "DELETE",
5261	//   "id": "cloudbuild.projects.githubEnterpriseConfigs.delete",
5262	//   "parameterOrder": [
5263	//     "name"
5264	//   ],
5265	//   "parameters": {
5266	//     "configId": {
5267	//       "description": "Unique identifier of the `GitHubEnterpriseConfig`",
5268	//       "location": "query",
5269	//       "type": "string"
5270	//     },
5271	//     "name": {
5272	//       "description": "This field should contain the name of the enterprise config resource. For example: \"projects/{$project_id}/githubEnterpriseConfigs/{$config_id}\"",
5273	//       "location": "path",
5274	//       "pattern": "^projects/[^/]+/githubEnterpriseConfigs/[^/]+$",
5275	//       "required": true,
5276	//       "type": "string"
5277	//     },
5278	//     "projectId": {
5279	//       "description": "ID of the project",
5280	//       "location": "query",
5281	//       "type": "string"
5282	//     }
5283	//   },
5284	//   "path": "v1/{+name}",
5285	//   "response": {
5286	//     "$ref": "Operation"
5287	//   },
5288	//   "scopes": [
5289	//     "https://www.googleapis.com/auth/cloud-platform"
5290	//   ]
5291	// }
5292
5293}
5294
5295// method id "cloudbuild.projects.githubEnterpriseConfigs.get":
5296
5297type ProjectsGithubEnterpriseConfigsGetCall struct {
5298	s            *Service
5299	name         string
5300	urlParams_   gensupport.URLParams
5301	ifNoneMatch_ string
5302	ctx_         context.Context
5303	header_      http.Header
5304}
5305
5306// Get: Retrieve a GitHubEnterpriseConfig.
5307//
5308// - name: This field should contain the name of the enterprise config
5309//   resource. For example:
5310//   "projects/{$project_id}/githubEnterpriseConfigs/{$config_id}".
5311func (r *ProjectsGithubEnterpriseConfigsService) Get(name string) *ProjectsGithubEnterpriseConfigsGetCall {
5312	c := &ProjectsGithubEnterpriseConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5313	c.name = name
5314	return c
5315}
5316
5317// ConfigId sets the optional parameter "configId": Unique identifier of
5318// the `GitHubEnterpriseConfig`
5319func (c *ProjectsGithubEnterpriseConfigsGetCall) ConfigId(configId string) *ProjectsGithubEnterpriseConfigsGetCall {
5320	c.urlParams_.Set("configId", configId)
5321	return c
5322}
5323
5324// ProjectId sets the optional parameter "projectId": ID of the project
5325func (c *ProjectsGithubEnterpriseConfigsGetCall) ProjectId(projectId string) *ProjectsGithubEnterpriseConfigsGetCall {
5326	c.urlParams_.Set("projectId", projectId)
5327	return c
5328}
5329
5330// Fields allows partial responses to be retrieved. See
5331// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5332// for more information.
5333func (c *ProjectsGithubEnterpriseConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsGithubEnterpriseConfigsGetCall {
5334	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5335	return c
5336}
5337
5338// IfNoneMatch sets the optional parameter which makes the operation
5339// fail if the object's ETag matches the given value. This is useful for
5340// getting updates only after the object has changed since the last
5341// request. Use googleapi.IsNotModified to check whether the response
5342// error from Do is the result of In-None-Match.
5343func (c *ProjectsGithubEnterpriseConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsGithubEnterpriseConfigsGetCall {
5344	c.ifNoneMatch_ = entityTag
5345	return c
5346}
5347
5348// Context sets the context to be used in this call's Do method. Any
5349// pending HTTP request will be aborted if the provided context is
5350// canceled.
5351func (c *ProjectsGithubEnterpriseConfigsGetCall) Context(ctx context.Context) *ProjectsGithubEnterpriseConfigsGetCall {
5352	c.ctx_ = ctx
5353	return c
5354}
5355
5356// Header returns an http.Header that can be modified by the caller to
5357// add HTTP headers to the request.
5358func (c *ProjectsGithubEnterpriseConfigsGetCall) Header() http.Header {
5359	if c.header_ == nil {
5360		c.header_ = make(http.Header)
5361	}
5362	return c.header_
5363}
5364
5365func (c *ProjectsGithubEnterpriseConfigsGetCall) doRequest(alt string) (*http.Response, error) {
5366	reqHeaders := make(http.Header)
5367	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
5368	for k, v := range c.header_ {
5369		reqHeaders[k] = v
5370	}
5371	reqHeaders.Set("User-Agent", c.s.userAgent())
5372	if c.ifNoneMatch_ != "" {
5373		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5374	}
5375	var body io.Reader = nil
5376	c.urlParams_.Set("alt", alt)
5377	c.urlParams_.Set("prettyPrint", "false")
5378	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
5379	urls += "?" + c.urlParams_.Encode()
5380	req, err := http.NewRequest("GET", urls, body)
5381	if err != nil {
5382		return nil, err
5383	}
5384	req.Header = reqHeaders
5385	googleapi.Expand(req.URL, map[string]string{
5386		"name": c.name,
5387	})
5388	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5389}
5390
5391// Do executes the "cloudbuild.projects.githubEnterpriseConfigs.get" call.
5392// Exactly one of *GitHubEnterpriseConfig or error will be non-nil. Any
5393// non-2xx status code is an error. Response headers are in either
5394// *GitHubEnterpriseConfig.ServerResponse.Header or (if a response was
5395// returned at all) in error.(*googleapi.Error).Header. Use
5396// googleapi.IsNotModified to check whether the returned error was
5397// because http.StatusNotModified was returned.
5398func (c *ProjectsGithubEnterpriseConfigsGetCall) Do(opts ...googleapi.CallOption) (*GitHubEnterpriseConfig, 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 := &GitHubEnterpriseConfig{
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": "Retrieve a GitHubEnterpriseConfig.",
5430	//   "flatPath": "v1/projects/{projectsId}/githubEnterpriseConfigs/{githubEnterpriseConfigsId}",
5431	//   "httpMethod": "GET",
5432	//   "id": "cloudbuild.projects.githubEnterpriseConfigs.get",
5433	//   "parameterOrder": [
5434	//     "name"
5435	//   ],
5436	//   "parameters": {
5437	//     "configId": {
5438	//       "description": "Unique identifier of the `GitHubEnterpriseConfig`",
5439	//       "location": "query",
5440	//       "type": "string"
5441	//     },
5442	//     "name": {
5443	//       "description": "This field should contain the name of the enterprise config resource. For example: \"projects/{$project_id}/githubEnterpriseConfigs/{$config_id}\"",
5444	//       "location": "path",
5445	//       "pattern": "^projects/[^/]+/githubEnterpriseConfigs/[^/]+$",
5446	//       "required": true,
5447	//       "type": "string"
5448	//     },
5449	//     "projectId": {
5450	//       "description": "ID of the project",
5451	//       "location": "query",
5452	//       "type": "string"
5453	//     }
5454	//   },
5455	//   "path": "v1/{+name}",
5456	//   "response": {
5457	//     "$ref": "GitHubEnterpriseConfig"
5458	//   },
5459	//   "scopes": [
5460	//     "https://www.googleapis.com/auth/cloud-platform"
5461	//   ]
5462	// }
5463
5464}
5465
5466// method id "cloudbuild.projects.githubEnterpriseConfigs.list":
5467
5468type ProjectsGithubEnterpriseConfigsListCall struct {
5469	s            *Service
5470	parent       string
5471	urlParams_   gensupport.URLParams
5472	ifNoneMatch_ string
5473	ctx_         context.Context
5474	header_      http.Header
5475}
5476
5477// List: List all GitHubEnterpriseConfigs for a given project.
5478//
5479// - parent: Name of the parent project. For example:
5480//   projects/{$project_number} or projects/{$project_id}.
5481func (r *ProjectsGithubEnterpriseConfigsService) List(parent string) *ProjectsGithubEnterpriseConfigsListCall {
5482	c := &ProjectsGithubEnterpriseConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5483	c.parent = parent
5484	return c
5485}
5486
5487// ProjectId sets the optional parameter "projectId": ID of the project
5488func (c *ProjectsGithubEnterpriseConfigsListCall) ProjectId(projectId string) *ProjectsGithubEnterpriseConfigsListCall {
5489	c.urlParams_.Set("projectId", projectId)
5490	return c
5491}
5492
5493// Fields allows partial responses to be retrieved. See
5494// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5495// for more information.
5496func (c *ProjectsGithubEnterpriseConfigsListCall) Fields(s ...googleapi.Field) *ProjectsGithubEnterpriseConfigsListCall {
5497	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5498	return c
5499}
5500
5501// IfNoneMatch sets the optional parameter which makes the operation
5502// fail if the object's ETag matches the given value. This is useful for
5503// getting updates only after the object has changed since the last
5504// request. Use googleapi.IsNotModified to check whether the response
5505// error from Do is the result of In-None-Match.
5506func (c *ProjectsGithubEnterpriseConfigsListCall) IfNoneMatch(entityTag string) *ProjectsGithubEnterpriseConfigsListCall {
5507	c.ifNoneMatch_ = entityTag
5508	return c
5509}
5510
5511// Context sets the context to be used in this call's Do method. Any
5512// pending HTTP request will be aborted if the provided context is
5513// canceled.
5514func (c *ProjectsGithubEnterpriseConfigsListCall) Context(ctx context.Context) *ProjectsGithubEnterpriseConfigsListCall {
5515	c.ctx_ = ctx
5516	return c
5517}
5518
5519// Header returns an http.Header that can be modified by the caller to
5520// add HTTP headers to the request.
5521func (c *ProjectsGithubEnterpriseConfigsListCall) Header() http.Header {
5522	if c.header_ == nil {
5523		c.header_ = make(http.Header)
5524	}
5525	return c.header_
5526}
5527
5528func (c *ProjectsGithubEnterpriseConfigsListCall) doRequest(alt string) (*http.Response, error) {
5529	reqHeaders := make(http.Header)
5530	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
5531	for k, v := range c.header_ {
5532		reqHeaders[k] = v
5533	}
5534	reqHeaders.Set("User-Agent", c.s.userAgent())
5535	if c.ifNoneMatch_ != "" {
5536		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5537	}
5538	var body io.Reader = nil
5539	c.urlParams_.Set("alt", alt)
5540	c.urlParams_.Set("prettyPrint", "false")
5541	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/githubEnterpriseConfigs")
5542	urls += "?" + c.urlParams_.Encode()
5543	req, err := http.NewRequest("GET", urls, body)
5544	if err != nil {
5545		return nil, err
5546	}
5547	req.Header = reqHeaders
5548	googleapi.Expand(req.URL, map[string]string{
5549		"parent": c.parent,
5550	})
5551	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5552}
5553
5554// Do executes the "cloudbuild.projects.githubEnterpriseConfigs.list" call.
5555// Exactly one of *ListGithubEnterpriseConfigsResponse or error will be
5556// non-nil. Any non-2xx status code is an error. Response headers are in
5557// either *ListGithubEnterpriseConfigsResponse.ServerResponse.Header or
5558// (if a response was returned at all) in
5559// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
5560// whether the returned error was because http.StatusNotModified was
5561// returned.
5562func (c *ProjectsGithubEnterpriseConfigsListCall) Do(opts ...googleapi.CallOption) (*ListGithubEnterpriseConfigsResponse, error) {
5563	gensupport.SetOptions(c.urlParams_, opts...)
5564	res, err := c.doRequest("json")
5565	if res != nil && res.StatusCode == http.StatusNotModified {
5566		if res.Body != nil {
5567			res.Body.Close()
5568		}
5569		return nil, &googleapi.Error{
5570			Code:   res.StatusCode,
5571			Header: res.Header,
5572		}
5573	}
5574	if err != nil {
5575		return nil, err
5576	}
5577	defer googleapi.CloseBody(res)
5578	if err := googleapi.CheckResponse(res); err != nil {
5579		return nil, err
5580	}
5581	ret := &ListGithubEnterpriseConfigsResponse{
5582		ServerResponse: googleapi.ServerResponse{
5583			Header:         res.Header,
5584			HTTPStatusCode: res.StatusCode,
5585		},
5586	}
5587	target := &ret
5588	if err := gensupport.DecodeResponse(target, res); err != nil {
5589		return nil, err
5590	}
5591	return ret, nil
5592	// {
5593	//   "description": "List all GitHubEnterpriseConfigs for a given project.",
5594	//   "flatPath": "v1/projects/{projectsId}/githubEnterpriseConfigs",
5595	//   "httpMethod": "GET",
5596	//   "id": "cloudbuild.projects.githubEnterpriseConfigs.list",
5597	//   "parameterOrder": [
5598	//     "parent"
5599	//   ],
5600	//   "parameters": {
5601	//     "parent": {
5602	//       "description": "Name of the parent project. For example: projects/{$project_number} or projects/{$project_id}",
5603	//       "location": "path",
5604	//       "pattern": "^projects/[^/]+$",
5605	//       "required": true,
5606	//       "type": "string"
5607	//     },
5608	//     "projectId": {
5609	//       "description": "ID of the project",
5610	//       "location": "query",
5611	//       "type": "string"
5612	//     }
5613	//   },
5614	//   "path": "v1/{+parent}/githubEnterpriseConfigs",
5615	//   "response": {
5616	//     "$ref": "ListGithubEnterpriseConfigsResponse"
5617	//   },
5618	//   "scopes": [
5619	//     "https://www.googleapis.com/auth/cloud-platform"
5620	//   ]
5621	// }
5622
5623}
5624
5625// method id "cloudbuild.projects.githubEnterpriseConfigs.patch":
5626
5627type ProjectsGithubEnterpriseConfigsPatchCall struct {
5628	s                      *Service
5629	name                   string
5630	githubenterpriseconfig *GitHubEnterpriseConfig
5631	urlParams_             gensupport.URLParams
5632	ctx_                   context.Context
5633	header_                http.Header
5634}
5635
5636// Patch: Update an association between a GCP project and a GitHub
5637// Enterprise server.
5638//
5639// - name: Optional. The full resource name for the
5640//   GitHubEnterpriseConfig For example:
5641//   "projects/{$project_id}/githubEnterpriseConfigs/{$config_id}".
5642func (r *ProjectsGithubEnterpriseConfigsService) Patch(name string, githubenterpriseconfig *GitHubEnterpriseConfig) *ProjectsGithubEnterpriseConfigsPatchCall {
5643	c := &ProjectsGithubEnterpriseConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5644	c.name = name
5645	c.githubenterpriseconfig = githubenterpriseconfig
5646	return c
5647}
5648
5649// UpdateMask sets the optional parameter "updateMask": Update mask for
5650// the resource. If this is set, the server will only update the fields
5651// specified in the field mask. Otherwise, a full update of the mutable
5652// resource fields will be performed.
5653func (c *ProjectsGithubEnterpriseConfigsPatchCall) UpdateMask(updateMask string) *ProjectsGithubEnterpriseConfigsPatchCall {
5654	c.urlParams_.Set("updateMask", updateMask)
5655	return c
5656}
5657
5658// Fields allows partial responses to be retrieved. See
5659// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5660// for more information.
5661func (c *ProjectsGithubEnterpriseConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsGithubEnterpriseConfigsPatchCall {
5662	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5663	return c
5664}
5665
5666// Context sets the context to be used in this call's Do method. Any
5667// pending HTTP request will be aborted if the provided context is
5668// canceled.
5669func (c *ProjectsGithubEnterpriseConfigsPatchCall) Context(ctx context.Context) *ProjectsGithubEnterpriseConfigsPatchCall {
5670	c.ctx_ = ctx
5671	return c
5672}
5673
5674// Header returns an http.Header that can be modified by the caller to
5675// add HTTP headers to the request.
5676func (c *ProjectsGithubEnterpriseConfigsPatchCall) Header() http.Header {
5677	if c.header_ == nil {
5678		c.header_ = make(http.Header)
5679	}
5680	return c.header_
5681}
5682
5683func (c *ProjectsGithubEnterpriseConfigsPatchCall) doRequest(alt string) (*http.Response, error) {
5684	reqHeaders := make(http.Header)
5685	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
5686	for k, v := range c.header_ {
5687		reqHeaders[k] = v
5688	}
5689	reqHeaders.Set("User-Agent", c.s.userAgent())
5690	var body io.Reader = nil
5691	body, err := googleapi.WithoutDataWrapper.JSONReader(c.githubenterpriseconfig)
5692	if err != nil {
5693		return nil, err
5694	}
5695	reqHeaders.Set("Content-Type", "application/json")
5696	c.urlParams_.Set("alt", alt)
5697	c.urlParams_.Set("prettyPrint", "false")
5698	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
5699	urls += "?" + c.urlParams_.Encode()
5700	req, err := http.NewRequest("PATCH", urls, body)
5701	if err != nil {
5702		return nil, err
5703	}
5704	req.Header = reqHeaders
5705	googleapi.Expand(req.URL, map[string]string{
5706		"name": c.name,
5707	})
5708	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5709}
5710
5711// Do executes the "cloudbuild.projects.githubEnterpriseConfigs.patch" call.
5712// Exactly one of *Operation or error will be non-nil. Any non-2xx
5713// status code is an error. Response headers are in either
5714// *Operation.ServerResponse.Header or (if a response was returned at
5715// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
5716// to check whether the returned error was because
5717// http.StatusNotModified was returned.
5718func (c *ProjectsGithubEnterpriseConfigsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5719	gensupport.SetOptions(c.urlParams_, opts...)
5720	res, err := c.doRequest("json")
5721	if res != nil && res.StatusCode == http.StatusNotModified {
5722		if res.Body != nil {
5723			res.Body.Close()
5724		}
5725		return nil, &googleapi.Error{
5726			Code:   res.StatusCode,
5727			Header: res.Header,
5728		}
5729	}
5730	if err != nil {
5731		return nil, err
5732	}
5733	defer googleapi.CloseBody(res)
5734	if err := googleapi.CheckResponse(res); err != nil {
5735		return nil, err
5736	}
5737	ret := &Operation{
5738		ServerResponse: googleapi.ServerResponse{
5739			Header:         res.Header,
5740			HTTPStatusCode: res.StatusCode,
5741		},
5742	}
5743	target := &ret
5744	if err := gensupport.DecodeResponse(target, res); err != nil {
5745		return nil, err
5746	}
5747	return ret, nil
5748	// {
5749	//   "description": "Update an association between a GCP project and a GitHub Enterprise server.",
5750	//   "flatPath": "v1/projects/{projectsId}/githubEnterpriseConfigs/{githubEnterpriseConfigsId}",
5751	//   "httpMethod": "PATCH",
5752	//   "id": "cloudbuild.projects.githubEnterpriseConfigs.patch",
5753	//   "parameterOrder": [
5754	//     "name"
5755	//   ],
5756	//   "parameters": {
5757	//     "name": {
5758	//       "description": "Optional. The full resource name for the GitHubEnterpriseConfig For example: \"projects/{$project_id}/githubEnterpriseConfigs/{$config_id}\"",
5759	//       "location": "path",
5760	//       "pattern": "^projects/[^/]+/githubEnterpriseConfigs/[^/]+$",
5761	//       "required": true,
5762	//       "type": "string"
5763	//     },
5764	//     "updateMask": {
5765	//       "description": "Update mask for the resource. If this is set, the server will only update the fields specified in the field mask. Otherwise, a full update of the mutable resource fields will be performed.",
5766	//       "format": "google-fieldmask",
5767	//       "location": "query",
5768	//       "type": "string"
5769	//     }
5770	//   },
5771	//   "path": "v1/{+name}",
5772	//   "request": {
5773	//     "$ref": "GitHubEnterpriseConfig"
5774	//   },
5775	//   "response": {
5776	//     "$ref": "Operation"
5777	//   },
5778	//   "scopes": [
5779	//     "https://www.googleapis.com/auth/cloud-platform"
5780	//   ]
5781	// }
5782
5783}
5784
5785// method id "cloudbuild.projects.locations.builds.approve":
5786
5787type ProjectsLocationsBuildsApproveCall struct {
5788	s                   *Service
5789	name                string
5790	approvebuildrequest *ApproveBuildRequest
5791	urlParams_          gensupport.URLParams
5792	ctx_                context.Context
5793	header_             http.Header
5794}
5795
5796// Approve: Approves or rejects a pending build. If approved, the
5797// returned LRO will be analogous to the LRO returned from a CreateBuild
5798// call. If rejected, the returned LRO will be immediately done.
5799//
5800// - name: Name of the target build. For example:
5801//   "projects/{$project_id}/builds/{$build_id}".
5802func (r *ProjectsLocationsBuildsService) Approve(name string, approvebuildrequest *ApproveBuildRequest) *ProjectsLocationsBuildsApproveCall {
5803	c := &ProjectsLocationsBuildsApproveCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5804	c.name = name
5805	c.approvebuildrequest = approvebuildrequest
5806	return c
5807}
5808
5809// Fields allows partial responses to be retrieved. See
5810// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5811// for more information.
5812func (c *ProjectsLocationsBuildsApproveCall) Fields(s ...googleapi.Field) *ProjectsLocationsBuildsApproveCall {
5813	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5814	return c
5815}
5816
5817// Context sets the context to be used in this call's Do method. Any
5818// pending HTTP request will be aborted if the provided context is
5819// canceled.
5820func (c *ProjectsLocationsBuildsApproveCall) Context(ctx context.Context) *ProjectsLocationsBuildsApproveCall {
5821	c.ctx_ = ctx
5822	return c
5823}
5824
5825// Header returns an http.Header that can be modified by the caller to
5826// add HTTP headers to the request.
5827func (c *ProjectsLocationsBuildsApproveCall) Header() http.Header {
5828	if c.header_ == nil {
5829		c.header_ = make(http.Header)
5830	}
5831	return c.header_
5832}
5833
5834func (c *ProjectsLocationsBuildsApproveCall) doRequest(alt string) (*http.Response, error) {
5835	reqHeaders := make(http.Header)
5836	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
5837	for k, v := range c.header_ {
5838		reqHeaders[k] = v
5839	}
5840	reqHeaders.Set("User-Agent", c.s.userAgent())
5841	var body io.Reader = nil
5842	body, err := googleapi.WithoutDataWrapper.JSONReader(c.approvebuildrequest)
5843	if err != nil {
5844		return nil, err
5845	}
5846	reqHeaders.Set("Content-Type", "application/json")
5847	c.urlParams_.Set("alt", alt)
5848	c.urlParams_.Set("prettyPrint", "false")
5849	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:approve")
5850	urls += "?" + c.urlParams_.Encode()
5851	req, err := http.NewRequest("POST", urls, body)
5852	if err != nil {
5853		return nil, err
5854	}
5855	req.Header = reqHeaders
5856	googleapi.Expand(req.URL, map[string]string{
5857		"name": c.name,
5858	})
5859	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5860}
5861
5862// Do executes the "cloudbuild.projects.locations.builds.approve" call.
5863// Exactly one of *Operation or error will be non-nil. Any non-2xx
5864// status code is an error. Response headers are in either
5865// *Operation.ServerResponse.Header or (if a response was returned at
5866// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
5867// to check whether the returned error was because
5868// http.StatusNotModified was returned.
5869func (c *ProjectsLocationsBuildsApproveCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5870	gensupport.SetOptions(c.urlParams_, opts...)
5871	res, err := c.doRequest("json")
5872	if res != nil && res.StatusCode == http.StatusNotModified {
5873		if res.Body != nil {
5874			res.Body.Close()
5875		}
5876		return nil, &googleapi.Error{
5877			Code:   res.StatusCode,
5878			Header: res.Header,
5879		}
5880	}
5881	if err != nil {
5882		return nil, err
5883	}
5884	defer googleapi.CloseBody(res)
5885	if err := googleapi.CheckResponse(res); err != nil {
5886		return nil, err
5887	}
5888	ret := &Operation{
5889		ServerResponse: googleapi.ServerResponse{
5890			Header:         res.Header,
5891			HTTPStatusCode: res.StatusCode,
5892		},
5893	}
5894	target := &ret
5895	if err := gensupport.DecodeResponse(target, res); err != nil {
5896		return nil, err
5897	}
5898	return ret, nil
5899	// {
5900	//   "description": "Approves or rejects a pending build. If approved, the returned LRO will be analogous to the LRO returned from a CreateBuild call. If rejected, the returned LRO will be immediately done.",
5901	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/builds/{buildsId}:approve",
5902	//   "httpMethod": "POST",
5903	//   "id": "cloudbuild.projects.locations.builds.approve",
5904	//   "parameterOrder": [
5905	//     "name"
5906	//   ],
5907	//   "parameters": {
5908	//     "name": {
5909	//       "description": "Required. Name of the target build. For example: \"projects/{$project_id}/builds/{$build_id}\"",
5910	//       "location": "path",
5911	//       "pattern": "^projects/[^/]+/locations/[^/]+/builds/[^/]+$",
5912	//       "required": true,
5913	//       "type": "string"
5914	//     }
5915	//   },
5916	//   "path": "v1/{+name}:approve",
5917	//   "request": {
5918	//     "$ref": "ApproveBuildRequest"
5919	//   },
5920	//   "response": {
5921	//     "$ref": "Operation"
5922	//   },
5923	//   "scopes": [
5924	//     "https://www.googleapis.com/auth/cloud-platform"
5925	//   ]
5926	// }
5927
5928}
5929
5930// method id "cloudbuild.projects.locations.builds.cancel":
5931
5932type ProjectsLocationsBuildsCancelCall struct {
5933	s                  *Service
5934	name               string
5935	cancelbuildrequest *CancelBuildRequest
5936	urlParams_         gensupport.URLParams
5937	ctx_               context.Context
5938	header_            http.Header
5939}
5940
5941// Cancel: Cancels a build in progress.
5942//
5943// - name: The name of the `Build` to cancel. Format:
5944//   `projects/{project}/locations/{location}/builds/{build}`.
5945func (r *ProjectsLocationsBuildsService) Cancel(name string, cancelbuildrequest *CancelBuildRequest) *ProjectsLocationsBuildsCancelCall {
5946	c := &ProjectsLocationsBuildsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5947	c.name = name
5948	c.cancelbuildrequest = cancelbuildrequest
5949	return c
5950}
5951
5952// Fields allows partial responses to be retrieved. See
5953// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5954// for more information.
5955func (c *ProjectsLocationsBuildsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsBuildsCancelCall {
5956	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5957	return c
5958}
5959
5960// Context sets the context to be used in this call's Do method. Any
5961// pending HTTP request will be aborted if the provided context is
5962// canceled.
5963func (c *ProjectsLocationsBuildsCancelCall) Context(ctx context.Context) *ProjectsLocationsBuildsCancelCall {
5964	c.ctx_ = ctx
5965	return c
5966}
5967
5968// Header returns an http.Header that can be modified by the caller to
5969// add HTTP headers to the request.
5970func (c *ProjectsLocationsBuildsCancelCall) Header() http.Header {
5971	if c.header_ == nil {
5972		c.header_ = make(http.Header)
5973	}
5974	return c.header_
5975}
5976
5977func (c *ProjectsLocationsBuildsCancelCall) doRequest(alt string) (*http.Response, error) {
5978	reqHeaders := make(http.Header)
5979	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
5980	for k, v := range c.header_ {
5981		reqHeaders[k] = v
5982	}
5983	reqHeaders.Set("User-Agent", c.s.userAgent())
5984	var body io.Reader = nil
5985	body, err := googleapi.WithoutDataWrapper.JSONReader(c.cancelbuildrequest)
5986	if err != nil {
5987		return nil, err
5988	}
5989	reqHeaders.Set("Content-Type", "application/json")
5990	c.urlParams_.Set("alt", alt)
5991	c.urlParams_.Set("prettyPrint", "false")
5992	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
5993	urls += "?" + c.urlParams_.Encode()
5994	req, err := http.NewRequest("POST", urls, body)
5995	if err != nil {
5996		return nil, err
5997	}
5998	req.Header = reqHeaders
5999	googleapi.Expand(req.URL, map[string]string{
6000		"name": c.name,
6001	})
6002	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6003}
6004
6005// Do executes the "cloudbuild.projects.locations.builds.cancel" call.
6006// Exactly one of *Build or error will be non-nil. Any non-2xx status
6007// code is an error. Response headers are in either
6008// *Build.ServerResponse.Header or (if a response was returned at all)
6009// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
6010// check whether the returned error was because http.StatusNotModified
6011// was returned.
6012func (c *ProjectsLocationsBuildsCancelCall) Do(opts ...googleapi.CallOption) (*Build, error) {
6013	gensupport.SetOptions(c.urlParams_, opts...)
6014	res, err := c.doRequest("json")
6015	if res != nil && res.StatusCode == http.StatusNotModified {
6016		if res.Body != nil {
6017			res.Body.Close()
6018		}
6019		return nil, &googleapi.Error{
6020			Code:   res.StatusCode,
6021			Header: res.Header,
6022		}
6023	}
6024	if err != nil {
6025		return nil, err
6026	}
6027	defer googleapi.CloseBody(res)
6028	if err := googleapi.CheckResponse(res); err != nil {
6029		return nil, err
6030	}
6031	ret := &Build{
6032		ServerResponse: googleapi.ServerResponse{
6033			Header:         res.Header,
6034			HTTPStatusCode: res.StatusCode,
6035		},
6036	}
6037	target := &ret
6038	if err := gensupport.DecodeResponse(target, res); err != nil {
6039		return nil, err
6040	}
6041	return ret, nil
6042	// {
6043	//   "description": "Cancels a build in progress.",
6044	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/builds/{buildsId}:cancel",
6045	//   "httpMethod": "POST",
6046	//   "id": "cloudbuild.projects.locations.builds.cancel",
6047	//   "parameterOrder": [
6048	//     "name"
6049	//   ],
6050	//   "parameters": {
6051	//     "name": {
6052	//       "description": "The name of the `Build` to cancel. Format: `projects/{project}/locations/{location}/builds/{build}`",
6053	//       "location": "path",
6054	//       "pattern": "^projects/[^/]+/locations/[^/]+/builds/[^/]+$",
6055	//       "required": true,
6056	//       "type": "string"
6057	//     }
6058	//   },
6059	//   "path": "v1/{+name}:cancel",
6060	//   "request": {
6061	//     "$ref": "CancelBuildRequest"
6062	//   },
6063	//   "response": {
6064	//     "$ref": "Build"
6065	//   },
6066	//   "scopes": [
6067	//     "https://www.googleapis.com/auth/cloud-platform"
6068	//   ]
6069	// }
6070
6071}
6072
6073// method id "cloudbuild.projects.locations.builds.create":
6074
6075type ProjectsLocationsBuildsCreateCall struct {
6076	s          *Service
6077	parent     string
6078	build      *Build
6079	urlParams_ gensupport.URLParams
6080	ctx_       context.Context
6081	header_    http.Header
6082}
6083
6084// Create: Starts a build with the specified configuration. This method
6085// returns a long-running `Operation`, which includes the build ID. Pass
6086// the build ID to `GetBuild` to determine the build status (such as
6087// `SUCCESS` or `FAILURE`).
6088//
6089// - parent: The parent resource where this build will be created.
6090//   Format: `projects/{project}/locations/{location}`.
6091func (r *ProjectsLocationsBuildsService) Create(parent string, build *Build) *ProjectsLocationsBuildsCreateCall {
6092	c := &ProjectsLocationsBuildsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6093	c.parent = parent
6094	c.build = build
6095	return c
6096}
6097
6098// ProjectId sets the optional parameter "projectId": Required. ID of
6099// the project.
6100func (c *ProjectsLocationsBuildsCreateCall) ProjectId(projectId string) *ProjectsLocationsBuildsCreateCall {
6101	c.urlParams_.Set("projectId", projectId)
6102	return c
6103}
6104
6105// Fields allows partial responses to be retrieved. See
6106// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6107// for more information.
6108func (c *ProjectsLocationsBuildsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsBuildsCreateCall {
6109	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6110	return c
6111}
6112
6113// Context sets the context to be used in this call's Do method. Any
6114// pending HTTP request will be aborted if the provided context is
6115// canceled.
6116func (c *ProjectsLocationsBuildsCreateCall) Context(ctx context.Context) *ProjectsLocationsBuildsCreateCall {
6117	c.ctx_ = ctx
6118	return c
6119}
6120
6121// Header returns an http.Header that can be modified by the caller to
6122// add HTTP headers to the request.
6123func (c *ProjectsLocationsBuildsCreateCall) Header() http.Header {
6124	if c.header_ == nil {
6125		c.header_ = make(http.Header)
6126	}
6127	return c.header_
6128}
6129
6130func (c *ProjectsLocationsBuildsCreateCall) doRequest(alt string) (*http.Response, error) {
6131	reqHeaders := make(http.Header)
6132	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
6133	for k, v := range c.header_ {
6134		reqHeaders[k] = v
6135	}
6136	reqHeaders.Set("User-Agent", c.s.userAgent())
6137	var body io.Reader = nil
6138	body, err := googleapi.WithoutDataWrapper.JSONReader(c.build)
6139	if err != nil {
6140		return nil, err
6141	}
6142	reqHeaders.Set("Content-Type", "application/json")
6143	c.urlParams_.Set("alt", alt)
6144	c.urlParams_.Set("prettyPrint", "false")
6145	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/builds")
6146	urls += "?" + c.urlParams_.Encode()
6147	req, err := http.NewRequest("POST", urls, body)
6148	if err != nil {
6149		return nil, err
6150	}
6151	req.Header = reqHeaders
6152	googleapi.Expand(req.URL, map[string]string{
6153		"parent": c.parent,
6154	})
6155	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6156}
6157
6158// Do executes the "cloudbuild.projects.locations.builds.create" call.
6159// Exactly one of *Operation or error will be non-nil. Any non-2xx
6160// status code is an error. Response headers are in either
6161// *Operation.ServerResponse.Header or (if a response was returned at
6162// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6163// to check whether the returned error was because
6164// http.StatusNotModified was returned.
6165func (c *ProjectsLocationsBuildsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6166	gensupport.SetOptions(c.urlParams_, opts...)
6167	res, err := c.doRequest("json")
6168	if res != nil && res.StatusCode == http.StatusNotModified {
6169		if res.Body != nil {
6170			res.Body.Close()
6171		}
6172		return nil, &googleapi.Error{
6173			Code:   res.StatusCode,
6174			Header: res.Header,
6175		}
6176	}
6177	if err != nil {
6178		return nil, err
6179	}
6180	defer googleapi.CloseBody(res)
6181	if err := googleapi.CheckResponse(res); err != nil {
6182		return nil, err
6183	}
6184	ret := &Operation{
6185		ServerResponse: googleapi.ServerResponse{
6186			Header:         res.Header,
6187			HTTPStatusCode: res.StatusCode,
6188		},
6189	}
6190	target := &ret
6191	if err := gensupport.DecodeResponse(target, res); err != nil {
6192		return nil, err
6193	}
6194	return ret, nil
6195	// {
6196	//   "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`).",
6197	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/builds",
6198	//   "httpMethod": "POST",
6199	//   "id": "cloudbuild.projects.locations.builds.create",
6200	//   "parameterOrder": [
6201	//     "parent"
6202	//   ],
6203	//   "parameters": {
6204	//     "parent": {
6205	//       "description": "The parent resource where this build will be created. Format: `projects/{project}/locations/{location}`",
6206	//       "location": "path",
6207	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
6208	//       "required": true,
6209	//       "type": "string"
6210	//     },
6211	//     "projectId": {
6212	//       "description": "Required. ID of the project.",
6213	//       "location": "query",
6214	//       "type": "string"
6215	//     }
6216	//   },
6217	//   "path": "v1/{+parent}/builds",
6218	//   "request": {
6219	//     "$ref": "Build"
6220	//   },
6221	//   "response": {
6222	//     "$ref": "Operation"
6223	//   },
6224	//   "scopes": [
6225	//     "https://www.googleapis.com/auth/cloud-platform"
6226	//   ]
6227	// }
6228
6229}
6230
6231// method id "cloudbuild.projects.locations.builds.get":
6232
6233type ProjectsLocationsBuildsGetCall struct {
6234	s            *Service
6235	name         string
6236	urlParams_   gensupport.URLParams
6237	ifNoneMatch_ string
6238	ctx_         context.Context
6239	header_      http.Header
6240}
6241
6242// Get: Returns information about a previously requested build. The
6243// `Build` that is returned includes its status (such as `SUCCESS`,
6244// `FAILURE`, or `WORKING`), and timing information.
6245//
6246// - name: The name of the `Build` to retrieve. Format:
6247//   `projects/{project}/locations/{location}/builds/{build}`.
6248func (r *ProjectsLocationsBuildsService) Get(name string) *ProjectsLocationsBuildsGetCall {
6249	c := &ProjectsLocationsBuildsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6250	c.name = name
6251	return c
6252}
6253
6254// Id sets the optional parameter "id": Required. ID of the build.
6255func (c *ProjectsLocationsBuildsGetCall) Id(id string) *ProjectsLocationsBuildsGetCall {
6256	c.urlParams_.Set("id", id)
6257	return c
6258}
6259
6260// ProjectId sets the optional parameter "projectId": Required. ID of
6261// the project.
6262func (c *ProjectsLocationsBuildsGetCall) ProjectId(projectId string) *ProjectsLocationsBuildsGetCall {
6263	c.urlParams_.Set("projectId", projectId)
6264	return c
6265}
6266
6267// Fields allows partial responses to be retrieved. See
6268// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6269// for more information.
6270func (c *ProjectsLocationsBuildsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsBuildsGetCall {
6271	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6272	return c
6273}
6274
6275// IfNoneMatch sets the optional parameter which makes the operation
6276// fail if the object's ETag matches the given value. This is useful for
6277// getting updates only after the object has changed since the last
6278// request. Use googleapi.IsNotModified to check whether the response
6279// error from Do is the result of In-None-Match.
6280func (c *ProjectsLocationsBuildsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsBuildsGetCall {
6281	c.ifNoneMatch_ = entityTag
6282	return c
6283}
6284
6285// Context sets the context to be used in this call's Do method. Any
6286// pending HTTP request will be aborted if the provided context is
6287// canceled.
6288func (c *ProjectsLocationsBuildsGetCall) Context(ctx context.Context) *ProjectsLocationsBuildsGetCall {
6289	c.ctx_ = ctx
6290	return c
6291}
6292
6293// Header returns an http.Header that can be modified by the caller to
6294// add HTTP headers to the request.
6295func (c *ProjectsLocationsBuildsGetCall) Header() http.Header {
6296	if c.header_ == nil {
6297		c.header_ = make(http.Header)
6298	}
6299	return c.header_
6300}
6301
6302func (c *ProjectsLocationsBuildsGetCall) doRequest(alt string) (*http.Response, error) {
6303	reqHeaders := make(http.Header)
6304	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
6305	for k, v := range c.header_ {
6306		reqHeaders[k] = v
6307	}
6308	reqHeaders.Set("User-Agent", c.s.userAgent())
6309	if c.ifNoneMatch_ != "" {
6310		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6311	}
6312	var body io.Reader = nil
6313	c.urlParams_.Set("alt", alt)
6314	c.urlParams_.Set("prettyPrint", "false")
6315	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6316	urls += "?" + c.urlParams_.Encode()
6317	req, err := http.NewRequest("GET", urls, body)
6318	if err != nil {
6319		return nil, err
6320	}
6321	req.Header = reqHeaders
6322	googleapi.Expand(req.URL, map[string]string{
6323		"name": c.name,
6324	})
6325	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6326}
6327
6328// Do executes the "cloudbuild.projects.locations.builds.get" call.
6329// Exactly one of *Build or error will be non-nil. Any non-2xx status
6330// code is an error. Response headers are in either
6331// *Build.ServerResponse.Header or (if a response was returned at all)
6332// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
6333// check whether the returned error was because http.StatusNotModified
6334// was returned.
6335func (c *ProjectsLocationsBuildsGetCall) Do(opts ...googleapi.CallOption) (*Build, error) {
6336	gensupport.SetOptions(c.urlParams_, opts...)
6337	res, err := c.doRequest("json")
6338	if res != nil && res.StatusCode == http.StatusNotModified {
6339		if res.Body != nil {
6340			res.Body.Close()
6341		}
6342		return nil, &googleapi.Error{
6343			Code:   res.StatusCode,
6344			Header: res.Header,
6345		}
6346	}
6347	if err != nil {
6348		return nil, err
6349	}
6350	defer googleapi.CloseBody(res)
6351	if err := googleapi.CheckResponse(res); err != nil {
6352		return nil, err
6353	}
6354	ret := &Build{
6355		ServerResponse: googleapi.ServerResponse{
6356			Header:         res.Header,
6357			HTTPStatusCode: res.StatusCode,
6358		},
6359	}
6360	target := &ret
6361	if err := gensupport.DecodeResponse(target, res); err != nil {
6362		return nil, err
6363	}
6364	return ret, nil
6365	// {
6366	//   "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.",
6367	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/builds/{buildsId}",
6368	//   "httpMethod": "GET",
6369	//   "id": "cloudbuild.projects.locations.builds.get",
6370	//   "parameterOrder": [
6371	//     "name"
6372	//   ],
6373	//   "parameters": {
6374	//     "id": {
6375	//       "description": "Required. ID of the build.",
6376	//       "location": "query",
6377	//       "type": "string"
6378	//     },
6379	//     "name": {
6380	//       "description": "The name of the `Build` to retrieve. Format: `projects/{project}/locations/{location}/builds/{build}`",
6381	//       "location": "path",
6382	//       "pattern": "^projects/[^/]+/locations/[^/]+/builds/[^/]+$",
6383	//       "required": true,
6384	//       "type": "string"
6385	//     },
6386	//     "projectId": {
6387	//       "description": "Required. ID of the project.",
6388	//       "location": "query",
6389	//       "type": "string"
6390	//     }
6391	//   },
6392	//   "path": "v1/{+name}",
6393	//   "response": {
6394	//     "$ref": "Build"
6395	//   },
6396	//   "scopes": [
6397	//     "https://www.googleapis.com/auth/cloud-platform"
6398	//   ]
6399	// }
6400
6401}
6402
6403// method id "cloudbuild.projects.locations.builds.list":
6404
6405type ProjectsLocationsBuildsListCall struct {
6406	s            *Service
6407	parent       string
6408	urlParams_   gensupport.URLParams
6409	ifNoneMatch_ string
6410	ctx_         context.Context
6411	header_      http.Header
6412}
6413
6414// List: Lists previously requested builds. Previously requested builds
6415// may still be in-progress, or may have finished successfully or
6416// unsuccessfully.
6417//
6418// - parent: The parent of the collection of `Builds`. Format:
6419//   `projects/{project}/locations/location`.
6420func (r *ProjectsLocationsBuildsService) List(parent string) *ProjectsLocationsBuildsListCall {
6421	c := &ProjectsLocationsBuildsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6422	c.parent = parent
6423	return c
6424}
6425
6426// Filter sets the optional parameter "filter": The raw filter text to
6427// constrain the results.
6428func (c *ProjectsLocationsBuildsListCall) Filter(filter string) *ProjectsLocationsBuildsListCall {
6429	c.urlParams_.Set("filter", filter)
6430	return c
6431}
6432
6433// PageSize sets the optional parameter "pageSize": Number of results to
6434// return in the list.
6435func (c *ProjectsLocationsBuildsListCall) PageSize(pageSize int64) *ProjectsLocationsBuildsListCall {
6436	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
6437	return c
6438}
6439
6440// PageToken sets the optional parameter "pageToken": The page token for
6441// the next page of Builds. If unspecified, the first page of results is
6442// returned. If the token is rejected for any reason, INVALID_ARGUMENT
6443// will be thrown. In this case, the token should be discarded, and
6444// pagination should be restarted from the first page of results. See
6445// https://google.aip.dev/158 for more.
6446func (c *ProjectsLocationsBuildsListCall) PageToken(pageToken string) *ProjectsLocationsBuildsListCall {
6447	c.urlParams_.Set("pageToken", pageToken)
6448	return c
6449}
6450
6451// ProjectId sets the optional parameter "projectId": Required. ID of
6452// the project.
6453func (c *ProjectsLocationsBuildsListCall) ProjectId(projectId string) *ProjectsLocationsBuildsListCall {
6454	c.urlParams_.Set("projectId", projectId)
6455	return c
6456}
6457
6458// Fields allows partial responses to be retrieved. See
6459// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6460// for more information.
6461func (c *ProjectsLocationsBuildsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBuildsListCall {
6462	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6463	return c
6464}
6465
6466// IfNoneMatch sets the optional parameter which makes the operation
6467// fail if the object's ETag matches the given value. This is useful for
6468// getting updates only after the object has changed since the last
6469// request. Use googleapi.IsNotModified to check whether the response
6470// error from Do is the result of In-None-Match.
6471func (c *ProjectsLocationsBuildsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBuildsListCall {
6472	c.ifNoneMatch_ = entityTag
6473	return c
6474}
6475
6476// Context sets the context to be used in this call's Do method. Any
6477// pending HTTP request will be aborted if the provided context is
6478// canceled.
6479func (c *ProjectsLocationsBuildsListCall) Context(ctx context.Context) *ProjectsLocationsBuildsListCall {
6480	c.ctx_ = ctx
6481	return c
6482}
6483
6484// Header returns an http.Header that can be modified by the caller to
6485// add HTTP headers to the request.
6486func (c *ProjectsLocationsBuildsListCall) Header() http.Header {
6487	if c.header_ == nil {
6488		c.header_ = make(http.Header)
6489	}
6490	return c.header_
6491}
6492
6493func (c *ProjectsLocationsBuildsListCall) doRequest(alt string) (*http.Response, error) {
6494	reqHeaders := make(http.Header)
6495	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
6496	for k, v := range c.header_ {
6497		reqHeaders[k] = v
6498	}
6499	reqHeaders.Set("User-Agent", c.s.userAgent())
6500	if c.ifNoneMatch_ != "" {
6501		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6502	}
6503	var body io.Reader = nil
6504	c.urlParams_.Set("alt", alt)
6505	c.urlParams_.Set("prettyPrint", "false")
6506	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/builds")
6507	urls += "?" + c.urlParams_.Encode()
6508	req, err := http.NewRequest("GET", urls, body)
6509	if err != nil {
6510		return nil, err
6511	}
6512	req.Header = reqHeaders
6513	googleapi.Expand(req.URL, map[string]string{
6514		"parent": c.parent,
6515	})
6516	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6517}
6518
6519// Do executes the "cloudbuild.projects.locations.builds.list" call.
6520// Exactly one of *ListBuildsResponse or error will be non-nil. Any
6521// non-2xx status code is an error. Response headers are in either
6522// *ListBuildsResponse.ServerResponse.Header or (if a response was
6523// returned at all) in error.(*googleapi.Error).Header. Use
6524// googleapi.IsNotModified to check whether the returned error was
6525// because http.StatusNotModified was returned.
6526func (c *ProjectsLocationsBuildsListCall) Do(opts ...googleapi.CallOption) (*ListBuildsResponse, error) {
6527	gensupport.SetOptions(c.urlParams_, opts...)
6528	res, err := c.doRequest("json")
6529	if res != nil && res.StatusCode == http.StatusNotModified {
6530		if res.Body != nil {
6531			res.Body.Close()
6532		}
6533		return nil, &googleapi.Error{
6534			Code:   res.StatusCode,
6535			Header: res.Header,
6536		}
6537	}
6538	if err != nil {
6539		return nil, err
6540	}
6541	defer googleapi.CloseBody(res)
6542	if err := googleapi.CheckResponse(res); err != nil {
6543		return nil, err
6544	}
6545	ret := &ListBuildsResponse{
6546		ServerResponse: googleapi.ServerResponse{
6547			Header:         res.Header,
6548			HTTPStatusCode: res.StatusCode,
6549		},
6550	}
6551	target := &ret
6552	if err := gensupport.DecodeResponse(target, res); err != nil {
6553		return nil, err
6554	}
6555	return ret, nil
6556	// {
6557	//   "description": "Lists previously requested builds. Previously requested builds may still be in-progress, or may have finished successfully or unsuccessfully.",
6558	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/builds",
6559	//   "httpMethod": "GET",
6560	//   "id": "cloudbuild.projects.locations.builds.list",
6561	//   "parameterOrder": [
6562	//     "parent"
6563	//   ],
6564	//   "parameters": {
6565	//     "filter": {
6566	//       "description": "The raw filter text to constrain the results.",
6567	//       "location": "query",
6568	//       "type": "string"
6569	//     },
6570	//     "pageSize": {
6571	//       "description": "Number of results to return in the list.",
6572	//       "format": "int32",
6573	//       "location": "query",
6574	//       "type": "integer"
6575	//     },
6576	//     "pageToken": {
6577	//       "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.",
6578	//       "location": "query",
6579	//       "type": "string"
6580	//     },
6581	//     "parent": {
6582	//       "description": "The parent of the collection of `Builds`. Format: `projects/{project}/locations/location`",
6583	//       "location": "path",
6584	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
6585	//       "required": true,
6586	//       "type": "string"
6587	//     },
6588	//     "projectId": {
6589	//       "description": "Required. ID of the project.",
6590	//       "location": "query",
6591	//       "type": "string"
6592	//     }
6593	//   },
6594	//   "path": "v1/{+parent}/builds",
6595	//   "response": {
6596	//     "$ref": "ListBuildsResponse"
6597	//   },
6598	//   "scopes": [
6599	//     "https://www.googleapis.com/auth/cloud-platform"
6600	//   ]
6601	// }
6602
6603}
6604
6605// Pages invokes f for each page of results.
6606// A non-nil error returned from f will halt the iteration.
6607// The provided context supersedes any context provided to the Context method.
6608func (c *ProjectsLocationsBuildsListCall) Pages(ctx context.Context, f func(*ListBuildsResponse) error) error {
6609	c.ctx_ = ctx
6610	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
6611	for {
6612		x, err := c.Do()
6613		if err != nil {
6614			return err
6615		}
6616		if err := f(x); err != nil {
6617			return err
6618		}
6619		if x.NextPageToken == "" {
6620			return nil
6621		}
6622		c.PageToken(x.NextPageToken)
6623	}
6624}
6625
6626// method id "cloudbuild.projects.locations.builds.retry":
6627
6628type ProjectsLocationsBuildsRetryCall struct {
6629	s                 *Service
6630	name              string
6631	retrybuildrequest *RetryBuildRequest
6632	urlParams_        gensupport.URLParams
6633	ctx_              context.Context
6634	header_           http.Header
6635}
6636
6637// Retry: Creates a new build based on the specified build. This method
6638// creates a new build using the original build request, which may or
6639// may not result in an identical build. For triggered builds: *
6640// Triggered builds resolve to a precise revision; therefore a retry of
6641// a triggered build will result in a build that uses the same revision.
6642// For non-triggered builds that specify `RepoSource`: * If the original
6643// build built from the tip of a branch, the retried build will build
6644// from the tip of that branch, which may not be the same revision as
6645// the original build. * If the original build specified a commit sha or
6646// revision ID, the retried build will use the identical source. For
6647// builds that specify `StorageSource`: * If the original build pulled
6648// source from Google Cloud Storage without specifying the generation of
6649// the object, the new build will use the current object, which may be
6650// different from the original build source. * If the original build
6651// pulled source from Cloud Storage and specified the generation of the
6652// object, the new build will attempt to use the same object, which may
6653// or may not be available depending on the bucket's lifecycle
6654// management settings.
6655//
6656// - name: The name of the `Build` to retry. Format:
6657//   `projects/{project}/locations/{location}/builds/{build}`.
6658func (r *ProjectsLocationsBuildsService) Retry(name string, retrybuildrequest *RetryBuildRequest) *ProjectsLocationsBuildsRetryCall {
6659	c := &ProjectsLocationsBuildsRetryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6660	c.name = name
6661	c.retrybuildrequest = retrybuildrequest
6662	return c
6663}
6664
6665// Fields allows partial responses to be retrieved. See
6666// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6667// for more information.
6668func (c *ProjectsLocationsBuildsRetryCall) Fields(s ...googleapi.Field) *ProjectsLocationsBuildsRetryCall {
6669	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6670	return c
6671}
6672
6673// Context sets the context to be used in this call's Do method. Any
6674// pending HTTP request will be aborted if the provided context is
6675// canceled.
6676func (c *ProjectsLocationsBuildsRetryCall) Context(ctx context.Context) *ProjectsLocationsBuildsRetryCall {
6677	c.ctx_ = ctx
6678	return c
6679}
6680
6681// Header returns an http.Header that can be modified by the caller to
6682// add HTTP headers to the request.
6683func (c *ProjectsLocationsBuildsRetryCall) Header() http.Header {
6684	if c.header_ == nil {
6685		c.header_ = make(http.Header)
6686	}
6687	return c.header_
6688}
6689
6690func (c *ProjectsLocationsBuildsRetryCall) doRequest(alt string) (*http.Response, error) {
6691	reqHeaders := make(http.Header)
6692	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
6693	for k, v := range c.header_ {
6694		reqHeaders[k] = v
6695	}
6696	reqHeaders.Set("User-Agent", c.s.userAgent())
6697	var body io.Reader = nil
6698	body, err := googleapi.WithoutDataWrapper.JSONReader(c.retrybuildrequest)
6699	if err != nil {
6700		return nil, err
6701	}
6702	reqHeaders.Set("Content-Type", "application/json")
6703	c.urlParams_.Set("alt", alt)
6704	c.urlParams_.Set("prettyPrint", "false")
6705	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:retry")
6706	urls += "?" + c.urlParams_.Encode()
6707	req, err := http.NewRequest("POST", urls, body)
6708	if err != nil {
6709		return nil, err
6710	}
6711	req.Header = reqHeaders
6712	googleapi.Expand(req.URL, map[string]string{
6713		"name": c.name,
6714	})
6715	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6716}
6717
6718// Do executes the "cloudbuild.projects.locations.builds.retry" call.
6719// Exactly one of *Operation or error will be non-nil. Any non-2xx
6720// status code is an error. Response headers are in either
6721// *Operation.ServerResponse.Header or (if a response was returned at
6722// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6723// to check whether the returned error was because
6724// http.StatusNotModified was returned.
6725func (c *ProjectsLocationsBuildsRetryCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6726	gensupport.SetOptions(c.urlParams_, opts...)
6727	res, err := c.doRequest("json")
6728	if res != nil && res.StatusCode == http.StatusNotModified {
6729		if res.Body != nil {
6730			res.Body.Close()
6731		}
6732		return nil, &googleapi.Error{
6733			Code:   res.StatusCode,
6734			Header: res.Header,
6735		}
6736	}
6737	if err != nil {
6738		return nil, err
6739	}
6740	defer googleapi.CloseBody(res)
6741	if err := googleapi.CheckResponse(res); err != nil {
6742		return nil, err
6743	}
6744	ret := &Operation{
6745		ServerResponse: googleapi.ServerResponse{
6746			Header:         res.Header,
6747			HTTPStatusCode: res.StatusCode,
6748		},
6749	}
6750	target := &ret
6751	if err := gensupport.DecodeResponse(target, res); err != nil {
6752		return nil, err
6753	}
6754	return ret, nil
6755	// {
6756	//   "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.",
6757	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/builds/{buildsId}:retry",
6758	//   "httpMethod": "POST",
6759	//   "id": "cloudbuild.projects.locations.builds.retry",
6760	//   "parameterOrder": [
6761	//     "name"
6762	//   ],
6763	//   "parameters": {
6764	//     "name": {
6765	//       "description": "The name of the `Build` to retry. Format: `projects/{project}/locations/{location}/builds/{build}`",
6766	//       "location": "path",
6767	//       "pattern": "^projects/[^/]+/locations/[^/]+/builds/[^/]+$",
6768	//       "required": true,
6769	//       "type": "string"
6770	//     }
6771	//   },
6772	//   "path": "v1/{+name}:retry",
6773	//   "request": {
6774	//     "$ref": "RetryBuildRequest"
6775	//   },
6776	//   "response": {
6777	//     "$ref": "Operation"
6778	//   },
6779	//   "scopes": [
6780	//     "https://www.googleapis.com/auth/cloud-platform"
6781	//   ]
6782	// }
6783
6784}
6785
6786// method id "cloudbuild.projects.locations.githubEnterpriseConfigs.create":
6787
6788type ProjectsLocationsGithubEnterpriseConfigsCreateCall struct {
6789	s                      *Service
6790	parent                 string
6791	githubenterpriseconfig *GitHubEnterpriseConfig
6792	urlParams_             gensupport.URLParams
6793	ctx_                   context.Context
6794	header_                http.Header
6795}
6796
6797// Create: Create an association between a GCP project and a GitHub
6798// Enterprise server.
6799//
6800// - parent: Name of the parent project. For example:
6801//   projects/{$project_number} or projects/{$project_id}.
6802func (r *ProjectsLocationsGithubEnterpriseConfigsService) Create(parent string, githubenterpriseconfig *GitHubEnterpriseConfig) *ProjectsLocationsGithubEnterpriseConfigsCreateCall {
6803	c := &ProjectsLocationsGithubEnterpriseConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6804	c.parent = parent
6805	c.githubenterpriseconfig = githubenterpriseconfig
6806	return c
6807}
6808
6809// ProjectId sets the optional parameter "projectId": ID of the project.
6810func (c *ProjectsLocationsGithubEnterpriseConfigsCreateCall) ProjectId(projectId string) *ProjectsLocationsGithubEnterpriseConfigsCreateCall {
6811	c.urlParams_.Set("projectId", projectId)
6812	return c
6813}
6814
6815// Fields allows partial responses to be retrieved. See
6816// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6817// for more information.
6818func (c *ProjectsLocationsGithubEnterpriseConfigsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGithubEnterpriseConfigsCreateCall {
6819	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6820	return c
6821}
6822
6823// Context sets the context to be used in this call's Do method. Any
6824// pending HTTP request will be aborted if the provided context is
6825// canceled.
6826func (c *ProjectsLocationsGithubEnterpriseConfigsCreateCall) Context(ctx context.Context) *ProjectsLocationsGithubEnterpriseConfigsCreateCall {
6827	c.ctx_ = ctx
6828	return c
6829}
6830
6831// Header returns an http.Header that can be modified by the caller to
6832// add HTTP headers to the request.
6833func (c *ProjectsLocationsGithubEnterpriseConfigsCreateCall) Header() http.Header {
6834	if c.header_ == nil {
6835		c.header_ = make(http.Header)
6836	}
6837	return c.header_
6838}
6839
6840func (c *ProjectsLocationsGithubEnterpriseConfigsCreateCall) doRequest(alt string) (*http.Response, error) {
6841	reqHeaders := make(http.Header)
6842	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
6843	for k, v := range c.header_ {
6844		reqHeaders[k] = v
6845	}
6846	reqHeaders.Set("User-Agent", c.s.userAgent())
6847	var body io.Reader = nil
6848	body, err := googleapi.WithoutDataWrapper.JSONReader(c.githubenterpriseconfig)
6849	if err != nil {
6850		return nil, err
6851	}
6852	reqHeaders.Set("Content-Type", "application/json")
6853	c.urlParams_.Set("alt", alt)
6854	c.urlParams_.Set("prettyPrint", "false")
6855	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/githubEnterpriseConfigs")
6856	urls += "?" + c.urlParams_.Encode()
6857	req, err := http.NewRequest("POST", urls, body)
6858	if err != nil {
6859		return nil, err
6860	}
6861	req.Header = reqHeaders
6862	googleapi.Expand(req.URL, map[string]string{
6863		"parent": c.parent,
6864	})
6865	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6866}
6867
6868// Do executes the "cloudbuild.projects.locations.githubEnterpriseConfigs.create" call.
6869// Exactly one of *Operation or error will be non-nil. Any non-2xx
6870// status code is an error. Response headers are in either
6871// *Operation.ServerResponse.Header or (if a response was returned at
6872// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6873// to check whether the returned error was because
6874// http.StatusNotModified was returned.
6875func (c *ProjectsLocationsGithubEnterpriseConfigsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6876	gensupport.SetOptions(c.urlParams_, opts...)
6877	res, err := c.doRequest("json")
6878	if res != nil && res.StatusCode == http.StatusNotModified {
6879		if res.Body != nil {
6880			res.Body.Close()
6881		}
6882		return nil, &googleapi.Error{
6883			Code:   res.StatusCode,
6884			Header: res.Header,
6885		}
6886	}
6887	if err != nil {
6888		return nil, err
6889	}
6890	defer googleapi.CloseBody(res)
6891	if err := googleapi.CheckResponse(res); err != nil {
6892		return nil, err
6893	}
6894	ret := &Operation{
6895		ServerResponse: googleapi.ServerResponse{
6896			Header:         res.Header,
6897			HTTPStatusCode: res.StatusCode,
6898		},
6899	}
6900	target := &ret
6901	if err := gensupport.DecodeResponse(target, res); err != nil {
6902		return nil, err
6903	}
6904	return ret, nil
6905	// {
6906	//   "description": "Create an association between a GCP project and a GitHub Enterprise server.",
6907	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/githubEnterpriseConfigs",
6908	//   "httpMethod": "POST",
6909	//   "id": "cloudbuild.projects.locations.githubEnterpriseConfigs.create",
6910	//   "parameterOrder": [
6911	//     "parent"
6912	//   ],
6913	//   "parameters": {
6914	//     "parent": {
6915	//       "description": "Name of the parent project. For example: projects/{$project_number} or projects/{$project_id}",
6916	//       "location": "path",
6917	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
6918	//       "required": true,
6919	//       "type": "string"
6920	//     },
6921	//     "projectId": {
6922	//       "description": "ID of the project.",
6923	//       "location": "query",
6924	//       "type": "string"
6925	//     }
6926	//   },
6927	//   "path": "v1/{+parent}/githubEnterpriseConfigs",
6928	//   "request": {
6929	//     "$ref": "GitHubEnterpriseConfig"
6930	//   },
6931	//   "response": {
6932	//     "$ref": "Operation"
6933	//   },
6934	//   "scopes": [
6935	//     "https://www.googleapis.com/auth/cloud-platform"
6936	//   ]
6937	// }
6938
6939}
6940
6941// method id "cloudbuild.projects.locations.githubEnterpriseConfigs.delete":
6942
6943type ProjectsLocationsGithubEnterpriseConfigsDeleteCall struct {
6944	s          *Service
6945	name       string
6946	urlParams_ gensupport.URLParams
6947	ctx_       context.Context
6948	header_    http.Header
6949}
6950
6951// Delete: Delete an association between a GCP project and a GitHub
6952// Enterprise server.
6953//
6954// - name: This field should contain the name of the enterprise config
6955//   resource. For example:
6956//   "projects/{$project_id}/githubEnterpriseConfigs/{$config_id}".
6957func (r *ProjectsLocationsGithubEnterpriseConfigsService) Delete(name string) *ProjectsLocationsGithubEnterpriseConfigsDeleteCall {
6958	c := &ProjectsLocationsGithubEnterpriseConfigsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6959	c.name = name
6960	return c
6961}
6962
6963// ConfigId sets the optional parameter "configId": Unique identifier of
6964// the `GitHubEnterpriseConfig`
6965func (c *ProjectsLocationsGithubEnterpriseConfigsDeleteCall) ConfigId(configId string) *ProjectsLocationsGithubEnterpriseConfigsDeleteCall {
6966	c.urlParams_.Set("configId", configId)
6967	return c
6968}
6969
6970// ProjectId sets the optional parameter "projectId": ID of the project
6971func (c *ProjectsLocationsGithubEnterpriseConfigsDeleteCall) ProjectId(projectId string) *ProjectsLocationsGithubEnterpriseConfigsDeleteCall {
6972	c.urlParams_.Set("projectId", projectId)
6973	return c
6974}
6975
6976// Fields allows partial responses to be retrieved. See
6977// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6978// for more information.
6979func (c *ProjectsLocationsGithubEnterpriseConfigsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGithubEnterpriseConfigsDeleteCall {
6980	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6981	return c
6982}
6983
6984// Context sets the context to be used in this call's Do method. Any
6985// pending HTTP request will be aborted if the provided context is
6986// canceled.
6987func (c *ProjectsLocationsGithubEnterpriseConfigsDeleteCall) Context(ctx context.Context) *ProjectsLocationsGithubEnterpriseConfigsDeleteCall {
6988	c.ctx_ = ctx
6989	return c
6990}
6991
6992// Header returns an http.Header that can be modified by the caller to
6993// add HTTP headers to the request.
6994func (c *ProjectsLocationsGithubEnterpriseConfigsDeleteCall) Header() http.Header {
6995	if c.header_ == nil {
6996		c.header_ = make(http.Header)
6997	}
6998	return c.header_
6999}
7000
7001func (c *ProjectsLocationsGithubEnterpriseConfigsDeleteCall) doRequest(alt string) (*http.Response, error) {
7002	reqHeaders := make(http.Header)
7003	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
7004	for k, v := range c.header_ {
7005		reqHeaders[k] = v
7006	}
7007	reqHeaders.Set("User-Agent", c.s.userAgent())
7008	var body io.Reader = nil
7009	c.urlParams_.Set("alt", alt)
7010	c.urlParams_.Set("prettyPrint", "false")
7011	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7012	urls += "?" + c.urlParams_.Encode()
7013	req, err := http.NewRequest("DELETE", urls, body)
7014	if err != nil {
7015		return nil, err
7016	}
7017	req.Header = reqHeaders
7018	googleapi.Expand(req.URL, map[string]string{
7019		"name": c.name,
7020	})
7021	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7022}
7023
7024// Do executes the "cloudbuild.projects.locations.githubEnterpriseConfigs.delete" call.
7025// Exactly one of *Operation or error will be non-nil. Any non-2xx
7026// status code is an error. Response headers are in either
7027// *Operation.ServerResponse.Header or (if a response was returned at
7028// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7029// to check whether the returned error was because
7030// http.StatusNotModified was returned.
7031func (c *ProjectsLocationsGithubEnterpriseConfigsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7032	gensupport.SetOptions(c.urlParams_, opts...)
7033	res, err := c.doRequest("json")
7034	if res != nil && res.StatusCode == http.StatusNotModified {
7035		if res.Body != nil {
7036			res.Body.Close()
7037		}
7038		return nil, &googleapi.Error{
7039			Code:   res.StatusCode,
7040			Header: res.Header,
7041		}
7042	}
7043	if err != nil {
7044		return nil, err
7045	}
7046	defer googleapi.CloseBody(res)
7047	if err := googleapi.CheckResponse(res); err != nil {
7048		return nil, err
7049	}
7050	ret := &Operation{
7051		ServerResponse: googleapi.ServerResponse{
7052			Header:         res.Header,
7053			HTTPStatusCode: res.StatusCode,
7054		},
7055	}
7056	target := &ret
7057	if err := gensupport.DecodeResponse(target, res); err != nil {
7058		return nil, err
7059	}
7060	return ret, nil
7061	// {
7062	//   "description": "Delete an association between a GCP project and a GitHub Enterprise server.",
7063	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/githubEnterpriseConfigs/{githubEnterpriseConfigsId}",
7064	//   "httpMethod": "DELETE",
7065	//   "id": "cloudbuild.projects.locations.githubEnterpriseConfigs.delete",
7066	//   "parameterOrder": [
7067	//     "name"
7068	//   ],
7069	//   "parameters": {
7070	//     "configId": {
7071	//       "description": "Unique identifier of the `GitHubEnterpriseConfig`",
7072	//       "location": "query",
7073	//       "type": "string"
7074	//     },
7075	//     "name": {
7076	//       "description": "This field should contain the name of the enterprise config resource. For example: \"projects/{$project_id}/githubEnterpriseConfigs/{$config_id}\"",
7077	//       "location": "path",
7078	//       "pattern": "^projects/[^/]+/locations/[^/]+/githubEnterpriseConfigs/[^/]+$",
7079	//       "required": true,
7080	//       "type": "string"
7081	//     },
7082	//     "projectId": {
7083	//       "description": "ID of the project",
7084	//       "location": "query",
7085	//       "type": "string"
7086	//     }
7087	//   },
7088	//   "path": "v1/{+name}",
7089	//   "response": {
7090	//     "$ref": "Operation"
7091	//   },
7092	//   "scopes": [
7093	//     "https://www.googleapis.com/auth/cloud-platform"
7094	//   ]
7095	// }
7096
7097}
7098
7099// method id "cloudbuild.projects.locations.githubEnterpriseConfigs.get":
7100
7101type ProjectsLocationsGithubEnterpriseConfigsGetCall struct {
7102	s            *Service
7103	name         string
7104	urlParams_   gensupport.URLParams
7105	ifNoneMatch_ string
7106	ctx_         context.Context
7107	header_      http.Header
7108}
7109
7110// Get: Retrieve a GitHubEnterpriseConfig.
7111//
7112// - name: This field should contain the name of the enterprise config
7113//   resource. For example:
7114//   "projects/{$project_id}/githubEnterpriseConfigs/{$config_id}".
7115func (r *ProjectsLocationsGithubEnterpriseConfigsService) Get(name string) *ProjectsLocationsGithubEnterpriseConfigsGetCall {
7116	c := &ProjectsLocationsGithubEnterpriseConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7117	c.name = name
7118	return c
7119}
7120
7121// ConfigId sets the optional parameter "configId": Unique identifier of
7122// the `GitHubEnterpriseConfig`
7123func (c *ProjectsLocationsGithubEnterpriseConfigsGetCall) ConfigId(configId string) *ProjectsLocationsGithubEnterpriseConfigsGetCall {
7124	c.urlParams_.Set("configId", configId)
7125	return c
7126}
7127
7128// ProjectId sets the optional parameter "projectId": ID of the project
7129func (c *ProjectsLocationsGithubEnterpriseConfigsGetCall) ProjectId(projectId string) *ProjectsLocationsGithubEnterpriseConfigsGetCall {
7130	c.urlParams_.Set("projectId", projectId)
7131	return c
7132}
7133
7134// Fields allows partial responses to be retrieved. See
7135// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7136// for more information.
7137func (c *ProjectsLocationsGithubEnterpriseConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGithubEnterpriseConfigsGetCall {
7138	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7139	return c
7140}
7141
7142// IfNoneMatch sets the optional parameter which makes the operation
7143// fail if the object's ETag matches the given value. This is useful for
7144// getting updates only after the object has changed since the last
7145// request. Use googleapi.IsNotModified to check whether the response
7146// error from Do is the result of In-None-Match.
7147func (c *ProjectsLocationsGithubEnterpriseConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGithubEnterpriseConfigsGetCall {
7148	c.ifNoneMatch_ = entityTag
7149	return c
7150}
7151
7152// Context sets the context to be used in this call's Do method. Any
7153// pending HTTP request will be aborted if the provided context is
7154// canceled.
7155func (c *ProjectsLocationsGithubEnterpriseConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsGithubEnterpriseConfigsGetCall {
7156	c.ctx_ = ctx
7157	return c
7158}
7159
7160// Header returns an http.Header that can be modified by the caller to
7161// add HTTP headers to the request.
7162func (c *ProjectsLocationsGithubEnterpriseConfigsGetCall) Header() http.Header {
7163	if c.header_ == nil {
7164		c.header_ = make(http.Header)
7165	}
7166	return c.header_
7167}
7168
7169func (c *ProjectsLocationsGithubEnterpriseConfigsGetCall) doRequest(alt string) (*http.Response, error) {
7170	reqHeaders := make(http.Header)
7171	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
7172	for k, v := range c.header_ {
7173		reqHeaders[k] = v
7174	}
7175	reqHeaders.Set("User-Agent", c.s.userAgent())
7176	if c.ifNoneMatch_ != "" {
7177		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7178	}
7179	var body io.Reader = nil
7180	c.urlParams_.Set("alt", alt)
7181	c.urlParams_.Set("prettyPrint", "false")
7182	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7183	urls += "?" + c.urlParams_.Encode()
7184	req, err := http.NewRequest("GET", urls, body)
7185	if err != nil {
7186		return nil, err
7187	}
7188	req.Header = reqHeaders
7189	googleapi.Expand(req.URL, map[string]string{
7190		"name": c.name,
7191	})
7192	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7193}
7194
7195// Do executes the "cloudbuild.projects.locations.githubEnterpriseConfigs.get" call.
7196// Exactly one of *GitHubEnterpriseConfig or error will be non-nil. Any
7197// non-2xx status code is an error. Response headers are in either
7198// *GitHubEnterpriseConfig.ServerResponse.Header or (if a response was
7199// returned at all) in error.(*googleapi.Error).Header. Use
7200// googleapi.IsNotModified to check whether the returned error was
7201// because http.StatusNotModified was returned.
7202func (c *ProjectsLocationsGithubEnterpriseConfigsGetCall) Do(opts ...googleapi.CallOption) (*GitHubEnterpriseConfig, error) {
7203	gensupport.SetOptions(c.urlParams_, opts...)
7204	res, err := c.doRequest("json")
7205	if res != nil && res.StatusCode == http.StatusNotModified {
7206		if res.Body != nil {
7207			res.Body.Close()
7208		}
7209		return nil, &googleapi.Error{
7210			Code:   res.StatusCode,
7211			Header: res.Header,
7212		}
7213	}
7214	if err != nil {
7215		return nil, err
7216	}
7217	defer googleapi.CloseBody(res)
7218	if err := googleapi.CheckResponse(res); err != nil {
7219		return nil, err
7220	}
7221	ret := &GitHubEnterpriseConfig{
7222		ServerResponse: googleapi.ServerResponse{
7223			Header:         res.Header,
7224			HTTPStatusCode: res.StatusCode,
7225		},
7226	}
7227	target := &ret
7228	if err := gensupport.DecodeResponse(target, res); err != nil {
7229		return nil, err
7230	}
7231	return ret, nil
7232	// {
7233	//   "description": "Retrieve a GitHubEnterpriseConfig.",
7234	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/githubEnterpriseConfigs/{githubEnterpriseConfigsId}",
7235	//   "httpMethod": "GET",
7236	//   "id": "cloudbuild.projects.locations.githubEnterpriseConfigs.get",
7237	//   "parameterOrder": [
7238	//     "name"
7239	//   ],
7240	//   "parameters": {
7241	//     "configId": {
7242	//       "description": "Unique identifier of the `GitHubEnterpriseConfig`",
7243	//       "location": "query",
7244	//       "type": "string"
7245	//     },
7246	//     "name": {
7247	//       "description": "This field should contain the name of the enterprise config resource. For example: \"projects/{$project_id}/githubEnterpriseConfigs/{$config_id}\"",
7248	//       "location": "path",
7249	//       "pattern": "^projects/[^/]+/locations/[^/]+/githubEnterpriseConfigs/[^/]+$",
7250	//       "required": true,
7251	//       "type": "string"
7252	//     },
7253	//     "projectId": {
7254	//       "description": "ID of the project",
7255	//       "location": "query",
7256	//       "type": "string"
7257	//     }
7258	//   },
7259	//   "path": "v1/{+name}",
7260	//   "response": {
7261	//     "$ref": "GitHubEnterpriseConfig"
7262	//   },
7263	//   "scopes": [
7264	//     "https://www.googleapis.com/auth/cloud-platform"
7265	//   ]
7266	// }
7267
7268}
7269
7270// method id "cloudbuild.projects.locations.githubEnterpriseConfigs.list":
7271
7272type ProjectsLocationsGithubEnterpriseConfigsListCall struct {
7273	s            *Service
7274	parent       string
7275	urlParams_   gensupport.URLParams
7276	ifNoneMatch_ string
7277	ctx_         context.Context
7278	header_      http.Header
7279}
7280
7281// List: List all GitHubEnterpriseConfigs for a given project.
7282//
7283// - parent: Name of the parent project. For example:
7284//   projects/{$project_number} or projects/{$project_id}.
7285func (r *ProjectsLocationsGithubEnterpriseConfigsService) List(parent string) *ProjectsLocationsGithubEnterpriseConfigsListCall {
7286	c := &ProjectsLocationsGithubEnterpriseConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7287	c.parent = parent
7288	return c
7289}
7290
7291// ProjectId sets the optional parameter "projectId": ID of the project
7292func (c *ProjectsLocationsGithubEnterpriseConfigsListCall) ProjectId(projectId string) *ProjectsLocationsGithubEnterpriseConfigsListCall {
7293	c.urlParams_.Set("projectId", projectId)
7294	return c
7295}
7296
7297// Fields allows partial responses to be retrieved. See
7298// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7299// for more information.
7300func (c *ProjectsLocationsGithubEnterpriseConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGithubEnterpriseConfigsListCall {
7301	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7302	return c
7303}
7304
7305// IfNoneMatch sets the optional parameter which makes the operation
7306// fail if the object's ETag matches the given value. This is useful for
7307// getting updates only after the object has changed since the last
7308// request. Use googleapi.IsNotModified to check whether the response
7309// error from Do is the result of In-None-Match.
7310func (c *ProjectsLocationsGithubEnterpriseConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGithubEnterpriseConfigsListCall {
7311	c.ifNoneMatch_ = entityTag
7312	return c
7313}
7314
7315// Context sets the context to be used in this call's Do method. Any
7316// pending HTTP request will be aborted if the provided context is
7317// canceled.
7318func (c *ProjectsLocationsGithubEnterpriseConfigsListCall) Context(ctx context.Context) *ProjectsLocationsGithubEnterpriseConfigsListCall {
7319	c.ctx_ = ctx
7320	return c
7321}
7322
7323// Header returns an http.Header that can be modified by the caller to
7324// add HTTP headers to the request.
7325func (c *ProjectsLocationsGithubEnterpriseConfigsListCall) Header() http.Header {
7326	if c.header_ == nil {
7327		c.header_ = make(http.Header)
7328	}
7329	return c.header_
7330}
7331
7332func (c *ProjectsLocationsGithubEnterpriseConfigsListCall) doRequest(alt string) (*http.Response, error) {
7333	reqHeaders := make(http.Header)
7334	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
7335	for k, v := range c.header_ {
7336		reqHeaders[k] = v
7337	}
7338	reqHeaders.Set("User-Agent", c.s.userAgent())
7339	if c.ifNoneMatch_ != "" {
7340		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7341	}
7342	var body io.Reader = nil
7343	c.urlParams_.Set("alt", alt)
7344	c.urlParams_.Set("prettyPrint", "false")
7345	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/githubEnterpriseConfigs")
7346	urls += "?" + c.urlParams_.Encode()
7347	req, err := http.NewRequest("GET", urls, body)
7348	if err != nil {
7349		return nil, err
7350	}
7351	req.Header = reqHeaders
7352	googleapi.Expand(req.URL, map[string]string{
7353		"parent": c.parent,
7354	})
7355	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7356}
7357
7358// Do executes the "cloudbuild.projects.locations.githubEnterpriseConfigs.list" call.
7359// Exactly one of *ListGithubEnterpriseConfigsResponse or error will be
7360// non-nil. Any non-2xx status code is an error. Response headers are in
7361// either *ListGithubEnterpriseConfigsResponse.ServerResponse.Header or
7362// (if a response was returned at all) in
7363// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
7364// whether the returned error was because http.StatusNotModified was
7365// returned.
7366func (c *ProjectsLocationsGithubEnterpriseConfigsListCall) Do(opts ...googleapi.CallOption) (*ListGithubEnterpriseConfigsResponse, error) {
7367	gensupport.SetOptions(c.urlParams_, opts...)
7368	res, err := c.doRequest("json")
7369	if res != nil && res.StatusCode == http.StatusNotModified {
7370		if res.Body != nil {
7371			res.Body.Close()
7372		}
7373		return nil, &googleapi.Error{
7374			Code:   res.StatusCode,
7375			Header: res.Header,
7376		}
7377	}
7378	if err != nil {
7379		return nil, err
7380	}
7381	defer googleapi.CloseBody(res)
7382	if err := googleapi.CheckResponse(res); err != nil {
7383		return nil, err
7384	}
7385	ret := &ListGithubEnterpriseConfigsResponse{
7386		ServerResponse: googleapi.ServerResponse{
7387			Header:         res.Header,
7388			HTTPStatusCode: res.StatusCode,
7389		},
7390	}
7391	target := &ret
7392	if err := gensupport.DecodeResponse(target, res); err != nil {
7393		return nil, err
7394	}
7395	return ret, nil
7396	// {
7397	//   "description": "List all GitHubEnterpriseConfigs for a given project.",
7398	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/githubEnterpriseConfigs",
7399	//   "httpMethod": "GET",
7400	//   "id": "cloudbuild.projects.locations.githubEnterpriseConfigs.list",
7401	//   "parameterOrder": [
7402	//     "parent"
7403	//   ],
7404	//   "parameters": {
7405	//     "parent": {
7406	//       "description": "Name of the parent project. For example: projects/{$project_number} or projects/{$project_id}",
7407	//       "location": "path",
7408	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
7409	//       "required": true,
7410	//       "type": "string"
7411	//     },
7412	//     "projectId": {
7413	//       "description": "ID of the project",
7414	//       "location": "query",
7415	//       "type": "string"
7416	//     }
7417	//   },
7418	//   "path": "v1/{+parent}/githubEnterpriseConfigs",
7419	//   "response": {
7420	//     "$ref": "ListGithubEnterpriseConfigsResponse"
7421	//   },
7422	//   "scopes": [
7423	//     "https://www.googleapis.com/auth/cloud-platform"
7424	//   ]
7425	// }
7426
7427}
7428
7429// method id "cloudbuild.projects.locations.githubEnterpriseConfigs.patch":
7430
7431type ProjectsLocationsGithubEnterpriseConfigsPatchCall struct {
7432	s                      *Service
7433	name                   string
7434	githubenterpriseconfig *GitHubEnterpriseConfig
7435	urlParams_             gensupport.URLParams
7436	ctx_                   context.Context
7437	header_                http.Header
7438}
7439
7440// Patch: Update an association between a GCP project and a GitHub
7441// Enterprise server.
7442//
7443// - name: Optional. The full resource name for the
7444//   GitHubEnterpriseConfig For example:
7445//   "projects/{$project_id}/githubEnterpriseConfigs/{$config_id}".
7446func (r *ProjectsLocationsGithubEnterpriseConfigsService) Patch(name string, githubenterpriseconfig *GitHubEnterpriseConfig) *ProjectsLocationsGithubEnterpriseConfigsPatchCall {
7447	c := &ProjectsLocationsGithubEnterpriseConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7448	c.name = name
7449	c.githubenterpriseconfig = githubenterpriseconfig
7450	return c
7451}
7452
7453// UpdateMask sets the optional parameter "updateMask": Update mask for
7454// the resource. If this is set, the server will only update the fields
7455// specified in the field mask. Otherwise, a full update of the mutable
7456// resource fields will be performed.
7457func (c *ProjectsLocationsGithubEnterpriseConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsGithubEnterpriseConfigsPatchCall {
7458	c.urlParams_.Set("updateMask", updateMask)
7459	return c
7460}
7461
7462// Fields allows partial responses to be retrieved. See
7463// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7464// for more information.
7465func (c *ProjectsLocationsGithubEnterpriseConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGithubEnterpriseConfigsPatchCall {
7466	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7467	return c
7468}
7469
7470// Context sets the context to be used in this call's Do method. Any
7471// pending HTTP request will be aborted if the provided context is
7472// canceled.
7473func (c *ProjectsLocationsGithubEnterpriseConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsGithubEnterpriseConfigsPatchCall {
7474	c.ctx_ = ctx
7475	return c
7476}
7477
7478// Header returns an http.Header that can be modified by the caller to
7479// add HTTP headers to the request.
7480func (c *ProjectsLocationsGithubEnterpriseConfigsPatchCall) Header() http.Header {
7481	if c.header_ == nil {
7482		c.header_ = make(http.Header)
7483	}
7484	return c.header_
7485}
7486
7487func (c *ProjectsLocationsGithubEnterpriseConfigsPatchCall) doRequest(alt string) (*http.Response, error) {
7488	reqHeaders := make(http.Header)
7489	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
7490	for k, v := range c.header_ {
7491		reqHeaders[k] = v
7492	}
7493	reqHeaders.Set("User-Agent", c.s.userAgent())
7494	var body io.Reader = nil
7495	body, err := googleapi.WithoutDataWrapper.JSONReader(c.githubenterpriseconfig)
7496	if err != nil {
7497		return nil, err
7498	}
7499	reqHeaders.Set("Content-Type", "application/json")
7500	c.urlParams_.Set("alt", alt)
7501	c.urlParams_.Set("prettyPrint", "false")
7502	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7503	urls += "?" + c.urlParams_.Encode()
7504	req, err := http.NewRequest("PATCH", urls, body)
7505	if err != nil {
7506		return nil, err
7507	}
7508	req.Header = reqHeaders
7509	googleapi.Expand(req.URL, map[string]string{
7510		"name": c.name,
7511	})
7512	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7513}
7514
7515// Do executes the "cloudbuild.projects.locations.githubEnterpriseConfigs.patch" call.
7516// Exactly one of *Operation or error will be non-nil. Any non-2xx
7517// status code is an error. Response headers are in either
7518// *Operation.ServerResponse.Header or (if a response was returned at
7519// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7520// to check whether the returned error was because
7521// http.StatusNotModified was returned.
7522func (c *ProjectsLocationsGithubEnterpriseConfigsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7523	gensupport.SetOptions(c.urlParams_, opts...)
7524	res, err := c.doRequest("json")
7525	if res != nil && res.StatusCode == http.StatusNotModified {
7526		if res.Body != nil {
7527			res.Body.Close()
7528		}
7529		return nil, &googleapi.Error{
7530			Code:   res.StatusCode,
7531			Header: res.Header,
7532		}
7533	}
7534	if err != nil {
7535		return nil, err
7536	}
7537	defer googleapi.CloseBody(res)
7538	if err := googleapi.CheckResponse(res); err != nil {
7539		return nil, err
7540	}
7541	ret := &Operation{
7542		ServerResponse: googleapi.ServerResponse{
7543			Header:         res.Header,
7544			HTTPStatusCode: res.StatusCode,
7545		},
7546	}
7547	target := &ret
7548	if err := gensupport.DecodeResponse(target, res); err != nil {
7549		return nil, err
7550	}
7551	return ret, nil
7552	// {
7553	//   "description": "Update an association between a GCP project and a GitHub Enterprise server.",
7554	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/githubEnterpriseConfigs/{githubEnterpriseConfigsId}",
7555	//   "httpMethod": "PATCH",
7556	//   "id": "cloudbuild.projects.locations.githubEnterpriseConfigs.patch",
7557	//   "parameterOrder": [
7558	//     "name"
7559	//   ],
7560	//   "parameters": {
7561	//     "name": {
7562	//       "description": "Optional. The full resource name for the GitHubEnterpriseConfig For example: \"projects/{$project_id}/githubEnterpriseConfigs/{$config_id}\"",
7563	//       "location": "path",
7564	//       "pattern": "^projects/[^/]+/locations/[^/]+/githubEnterpriseConfigs/[^/]+$",
7565	//       "required": true,
7566	//       "type": "string"
7567	//     },
7568	//     "updateMask": {
7569	//       "description": "Update mask for the resource. If this is set, the server will only update the fields specified in the field mask. Otherwise, a full update of the mutable resource fields will be performed.",
7570	//       "format": "google-fieldmask",
7571	//       "location": "query",
7572	//       "type": "string"
7573	//     }
7574	//   },
7575	//   "path": "v1/{+name}",
7576	//   "request": {
7577	//     "$ref": "GitHubEnterpriseConfig"
7578	//   },
7579	//   "response": {
7580	//     "$ref": "Operation"
7581	//   },
7582	//   "scopes": [
7583	//     "https://www.googleapis.com/auth/cloud-platform"
7584	//   ]
7585	// }
7586
7587}
7588
7589// method id "cloudbuild.projects.locations.operations.cancel":
7590
7591type ProjectsLocationsOperationsCancelCall struct {
7592	s                      *Service
7593	name                   string
7594	canceloperationrequest *CancelOperationRequest
7595	urlParams_             gensupport.URLParams
7596	ctx_                   context.Context
7597	header_                http.Header
7598}
7599
7600// Cancel: Starts asynchronous cancellation on a long-running operation.
7601// The server makes a best effort to cancel the operation, but success
7602// is not guaranteed. If the server doesn't support this method, it
7603// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use
7604// Operations.GetOperation or other methods to check whether the
7605// cancellation succeeded or whether the operation completed despite
7606// cancellation. On successful cancellation, the operation is not
7607// deleted; instead, it becomes an operation with an Operation.error
7608// value with a google.rpc.Status.code of 1, corresponding to
7609// `Code.CANCELLED`.
7610//
7611// - name: The name of the operation resource to be cancelled.
7612func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall {
7613	c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7614	c.name = name
7615	c.canceloperationrequest = canceloperationrequest
7616	return c
7617}
7618
7619// Fields allows partial responses to be retrieved. See
7620// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7621// for more information.
7622func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
7623	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7624	return c
7625}
7626
7627// Context sets the context to be used in this call's Do method. Any
7628// pending HTTP request will be aborted if the provided context is
7629// canceled.
7630func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
7631	c.ctx_ = ctx
7632	return c
7633}
7634
7635// Header returns an http.Header that can be modified by the caller to
7636// add HTTP headers to the request.
7637func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
7638	if c.header_ == nil {
7639		c.header_ = make(http.Header)
7640	}
7641	return c.header_
7642}
7643
7644func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
7645	reqHeaders := make(http.Header)
7646	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
7647	for k, v := range c.header_ {
7648		reqHeaders[k] = v
7649	}
7650	reqHeaders.Set("User-Agent", c.s.userAgent())
7651	var body io.Reader = nil
7652	body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
7653	if err != nil {
7654		return nil, err
7655	}
7656	reqHeaders.Set("Content-Type", "application/json")
7657	c.urlParams_.Set("alt", alt)
7658	c.urlParams_.Set("prettyPrint", "false")
7659	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
7660	urls += "?" + c.urlParams_.Encode()
7661	req, err := http.NewRequest("POST", urls, body)
7662	if err != nil {
7663		return nil, err
7664	}
7665	req.Header = reqHeaders
7666	googleapi.Expand(req.URL, map[string]string{
7667		"name": c.name,
7668	})
7669	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7670}
7671
7672// Do executes the "cloudbuild.projects.locations.operations.cancel" call.
7673// Exactly one of *Empty or error will be non-nil. Any non-2xx status
7674// code is an error. Response headers are in either
7675// *Empty.ServerResponse.Header or (if a response was returned at all)
7676// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
7677// check whether the returned error was because http.StatusNotModified
7678// was returned.
7679func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
7680	gensupport.SetOptions(c.urlParams_, opts...)
7681	res, err := c.doRequest("json")
7682	if res != nil && res.StatusCode == http.StatusNotModified {
7683		if res.Body != nil {
7684			res.Body.Close()
7685		}
7686		return nil, &googleapi.Error{
7687			Code:   res.StatusCode,
7688			Header: res.Header,
7689		}
7690	}
7691	if err != nil {
7692		return nil, err
7693	}
7694	defer googleapi.CloseBody(res)
7695	if err := googleapi.CheckResponse(res); err != nil {
7696		return nil, err
7697	}
7698	ret := &Empty{
7699		ServerResponse: googleapi.ServerResponse{
7700			Header:         res.Header,
7701			HTTPStatusCode: res.StatusCode,
7702		},
7703	}
7704	target := &ret
7705	if err := gensupport.DecodeResponse(target, res); err != nil {
7706		return nil, err
7707	}
7708	return ret, nil
7709	// {
7710	//   "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`.",
7711	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel",
7712	//   "httpMethod": "POST",
7713	//   "id": "cloudbuild.projects.locations.operations.cancel",
7714	//   "parameterOrder": [
7715	//     "name"
7716	//   ],
7717	//   "parameters": {
7718	//     "name": {
7719	//       "description": "The name of the operation resource to be cancelled.",
7720	//       "location": "path",
7721	//       "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$",
7722	//       "required": true,
7723	//       "type": "string"
7724	//     }
7725	//   },
7726	//   "path": "v1/{+name}:cancel",
7727	//   "request": {
7728	//     "$ref": "CancelOperationRequest"
7729	//   },
7730	//   "response": {
7731	//     "$ref": "Empty"
7732	//   },
7733	//   "scopes": [
7734	//     "https://www.googleapis.com/auth/cloud-platform"
7735	//   ]
7736	// }
7737
7738}
7739
7740// method id "cloudbuild.projects.locations.operations.get":
7741
7742type ProjectsLocationsOperationsGetCall struct {
7743	s            *Service
7744	name         string
7745	urlParams_   gensupport.URLParams
7746	ifNoneMatch_ string
7747	ctx_         context.Context
7748	header_      http.Header
7749}
7750
7751// Get: Gets the latest state of a long-running operation. Clients can
7752// use this method to poll the operation result at intervals as
7753// recommended by the API service.
7754//
7755// - name: The name of the operation resource.
7756func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
7757	c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7758	c.name = name
7759	return c
7760}
7761
7762// Fields allows partial responses to be retrieved. See
7763// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7764// for more information.
7765func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
7766	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7767	return c
7768}
7769
7770// IfNoneMatch sets the optional parameter which makes the operation
7771// fail if the object's ETag matches the given value. This is useful for
7772// getting updates only after the object has changed since the last
7773// request. Use googleapi.IsNotModified to check whether the response
7774// error from Do is the result of In-None-Match.
7775func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
7776	c.ifNoneMatch_ = entityTag
7777	return c
7778}
7779
7780// Context sets the context to be used in this call's Do method. Any
7781// pending HTTP request will be aborted if the provided context is
7782// canceled.
7783func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
7784	c.ctx_ = ctx
7785	return c
7786}
7787
7788// Header returns an http.Header that can be modified by the caller to
7789// add HTTP headers to the request.
7790func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
7791	if c.header_ == nil {
7792		c.header_ = make(http.Header)
7793	}
7794	return c.header_
7795}
7796
7797func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
7798	reqHeaders := make(http.Header)
7799	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
7800	for k, v := range c.header_ {
7801		reqHeaders[k] = v
7802	}
7803	reqHeaders.Set("User-Agent", c.s.userAgent())
7804	if c.ifNoneMatch_ != "" {
7805		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7806	}
7807	var body io.Reader = nil
7808	c.urlParams_.Set("alt", alt)
7809	c.urlParams_.Set("prettyPrint", "false")
7810	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7811	urls += "?" + c.urlParams_.Encode()
7812	req, err := http.NewRequest("GET", urls, body)
7813	if err != nil {
7814		return nil, err
7815	}
7816	req.Header = reqHeaders
7817	googleapi.Expand(req.URL, map[string]string{
7818		"name": c.name,
7819	})
7820	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7821}
7822
7823// Do executes the "cloudbuild.projects.locations.operations.get" call.
7824// Exactly one of *Operation or error will be non-nil. Any non-2xx
7825// status code is an error. Response headers are in either
7826// *Operation.ServerResponse.Header or (if a response was returned at
7827// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7828// to check whether the returned error was because
7829// http.StatusNotModified was returned.
7830func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7831	gensupport.SetOptions(c.urlParams_, opts...)
7832	res, err := c.doRequest("json")
7833	if res != nil && res.StatusCode == http.StatusNotModified {
7834		if res.Body != nil {
7835			res.Body.Close()
7836		}
7837		return nil, &googleapi.Error{
7838			Code:   res.StatusCode,
7839			Header: res.Header,
7840		}
7841	}
7842	if err != nil {
7843		return nil, err
7844	}
7845	defer googleapi.CloseBody(res)
7846	if err := googleapi.CheckResponse(res); err != nil {
7847		return nil, err
7848	}
7849	ret := &Operation{
7850		ServerResponse: googleapi.ServerResponse{
7851			Header:         res.Header,
7852			HTTPStatusCode: res.StatusCode,
7853		},
7854	}
7855	target := &ret
7856	if err := gensupport.DecodeResponse(target, res); err != nil {
7857		return nil, err
7858	}
7859	return ret, nil
7860	// {
7861	//   "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.",
7862	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}",
7863	//   "httpMethod": "GET",
7864	//   "id": "cloudbuild.projects.locations.operations.get",
7865	//   "parameterOrder": [
7866	//     "name"
7867	//   ],
7868	//   "parameters": {
7869	//     "name": {
7870	//       "description": "The name of the operation resource.",
7871	//       "location": "path",
7872	//       "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$",
7873	//       "required": true,
7874	//       "type": "string"
7875	//     }
7876	//   },
7877	//   "path": "v1/{+name}",
7878	//   "response": {
7879	//     "$ref": "Operation"
7880	//   },
7881	//   "scopes": [
7882	//     "https://www.googleapis.com/auth/cloud-platform"
7883	//   ]
7884	// }
7885
7886}
7887
7888// method id "cloudbuild.projects.locations.triggers.create":
7889
7890type ProjectsLocationsTriggersCreateCall struct {
7891	s            *Service
7892	parent       string
7893	buildtrigger *BuildTrigger
7894	urlParams_   gensupport.URLParams
7895	ctx_         context.Context
7896	header_      http.Header
7897}
7898
7899// Create: Creates a new `BuildTrigger`. This API is experimental.
7900//
7901// - parent: The parent resource where this trigger will be created.
7902//   Format: `projects/{project}/locations/{location}`.
7903func (r *ProjectsLocationsTriggersService) Create(parent string, buildtrigger *BuildTrigger) *ProjectsLocationsTriggersCreateCall {
7904	c := &ProjectsLocationsTriggersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7905	c.parent = parent
7906	c.buildtrigger = buildtrigger
7907	return c
7908}
7909
7910// ProjectId sets the optional parameter "projectId": Required. ID of
7911// the project for which to configure automatic builds.
7912func (c *ProjectsLocationsTriggersCreateCall) ProjectId(projectId string) *ProjectsLocationsTriggersCreateCall {
7913	c.urlParams_.Set("projectId", projectId)
7914	return c
7915}
7916
7917// Fields allows partial responses to be retrieved. See
7918// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7919// for more information.
7920func (c *ProjectsLocationsTriggersCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsTriggersCreateCall {
7921	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7922	return c
7923}
7924
7925// Context sets the context to be used in this call's Do method. Any
7926// pending HTTP request will be aborted if the provided context is
7927// canceled.
7928func (c *ProjectsLocationsTriggersCreateCall) Context(ctx context.Context) *ProjectsLocationsTriggersCreateCall {
7929	c.ctx_ = ctx
7930	return c
7931}
7932
7933// Header returns an http.Header that can be modified by the caller to
7934// add HTTP headers to the request.
7935func (c *ProjectsLocationsTriggersCreateCall) Header() http.Header {
7936	if c.header_ == nil {
7937		c.header_ = make(http.Header)
7938	}
7939	return c.header_
7940}
7941
7942func (c *ProjectsLocationsTriggersCreateCall) doRequest(alt string) (*http.Response, error) {
7943	reqHeaders := make(http.Header)
7944	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
7945	for k, v := range c.header_ {
7946		reqHeaders[k] = v
7947	}
7948	reqHeaders.Set("User-Agent", c.s.userAgent())
7949	var body io.Reader = nil
7950	body, err := googleapi.WithoutDataWrapper.JSONReader(c.buildtrigger)
7951	if err != nil {
7952		return nil, err
7953	}
7954	reqHeaders.Set("Content-Type", "application/json")
7955	c.urlParams_.Set("alt", alt)
7956	c.urlParams_.Set("prettyPrint", "false")
7957	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/triggers")
7958	urls += "?" + c.urlParams_.Encode()
7959	req, err := http.NewRequest("POST", urls, body)
7960	if err != nil {
7961		return nil, err
7962	}
7963	req.Header = reqHeaders
7964	googleapi.Expand(req.URL, map[string]string{
7965		"parent": c.parent,
7966	})
7967	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7968}
7969
7970// Do executes the "cloudbuild.projects.locations.triggers.create" call.
7971// Exactly one of *BuildTrigger or error will be non-nil. Any non-2xx
7972// status code is an error. Response headers are in either
7973// *BuildTrigger.ServerResponse.Header or (if a response was returned at
7974// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7975// to check whether the returned error was because
7976// http.StatusNotModified was returned.
7977func (c *ProjectsLocationsTriggersCreateCall) Do(opts ...googleapi.CallOption) (*BuildTrigger, error) {
7978	gensupport.SetOptions(c.urlParams_, opts...)
7979	res, err := c.doRequest("json")
7980	if res != nil && res.StatusCode == http.StatusNotModified {
7981		if res.Body != nil {
7982			res.Body.Close()
7983		}
7984		return nil, &googleapi.Error{
7985			Code:   res.StatusCode,
7986			Header: res.Header,
7987		}
7988	}
7989	if err != nil {
7990		return nil, err
7991	}
7992	defer googleapi.CloseBody(res)
7993	if err := googleapi.CheckResponse(res); err != nil {
7994		return nil, err
7995	}
7996	ret := &BuildTrigger{
7997		ServerResponse: googleapi.ServerResponse{
7998			Header:         res.Header,
7999			HTTPStatusCode: res.StatusCode,
8000		},
8001	}
8002	target := &ret
8003	if err := gensupport.DecodeResponse(target, res); err != nil {
8004		return nil, err
8005	}
8006	return ret, nil
8007	// {
8008	//   "description": "Creates a new `BuildTrigger`. This API is experimental.",
8009	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/triggers",
8010	//   "httpMethod": "POST",
8011	//   "id": "cloudbuild.projects.locations.triggers.create",
8012	//   "parameterOrder": [
8013	//     "parent"
8014	//   ],
8015	//   "parameters": {
8016	//     "parent": {
8017	//       "description": "The parent resource where this trigger will be created. Format: `projects/{project}/locations/{location}`",
8018	//       "location": "path",
8019	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
8020	//       "required": true,
8021	//       "type": "string"
8022	//     },
8023	//     "projectId": {
8024	//       "description": "Required. ID of the project for which to configure automatic builds.",
8025	//       "location": "query",
8026	//       "type": "string"
8027	//     }
8028	//   },
8029	//   "path": "v1/{+parent}/triggers",
8030	//   "request": {
8031	//     "$ref": "BuildTrigger"
8032	//   },
8033	//   "response": {
8034	//     "$ref": "BuildTrigger"
8035	//   },
8036	//   "scopes": [
8037	//     "https://www.googleapis.com/auth/cloud-platform"
8038	//   ]
8039	// }
8040
8041}
8042
8043// method id "cloudbuild.projects.locations.triggers.delete":
8044
8045type ProjectsLocationsTriggersDeleteCall struct {
8046	s          *Service
8047	name       string
8048	urlParams_ gensupport.URLParams
8049	ctx_       context.Context
8050	header_    http.Header
8051}
8052
8053// Delete: Deletes a `BuildTrigger` by its project ID and trigger ID.
8054// This API is experimental.
8055//
8056// - name: The name of the `Trigger` to delete. Format:
8057//   `projects/{project}/locations/{location}/triggers/{trigger}`.
8058func (r *ProjectsLocationsTriggersService) Delete(name string) *ProjectsLocationsTriggersDeleteCall {
8059	c := &ProjectsLocationsTriggersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8060	c.name = name
8061	return c
8062}
8063
8064// ProjectId sets the optional parameter "projectId": Required. ID of
8065// the project that owns the trigger.
8066func (c *ProjectsLocationsTriggersDeleteCall) ProjectId(projectId string) *ProjectsLocationsTriggersDeleteCall {
8067	c.urlParams_.Set("projectId", projectId)
8068	return c
8069}
8070
8071// TriggerId sets the optional parameter "triggerId": Required. ID of
8072// the `BuildTrigger` to delete.
8073func (c *ProjectsLocationsTriggersDeleteCall) TriggerId(triggerId string) *ProjectsLocationsTriggersDeleteCall {
8074	c.urlParams_.Set("triggerId", triggerId)
8075	return c
8076}
8077
8078// Fields allows partial responses to be retrieved. See
8079// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8080// for more information.
8081func (c *ProjectsLocationsTriggersDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsTriggersDeleteCall {
8082	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8083	return c
8084}
8085
8086// Context sets the context to be used in this call's Do method. Any
8087// pending HTTP request will be aborted if the provided context is
8088// canceled.
8089func (c *ProjectsLocationsTriggersDeleteCall) Context(ctx context.Context) *ProjectsLocationsTriggersDeleteCall {
8090	c.ctx_ = ctx
8091	return c
8092}
8093
8094// Header returns an http.Header that can be modified by the caller to
8095// add HTTP headers to the request.
8096func (c *ProjectsLocationsTriggersDeleteCall) Header() http.Header {
8097	if c.header_ == nil {
8098		c.header_ = make(http.Header)
8099	}
8100	return c.header_
8101}
8102
8103func (c *ProjectsLocationsTriggersDeleteCall) doRequest(alt string) (*http.Response, error) {
8104	reqHeaders := make(http.Header)
8105	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
8106	for k, v := range c.header_ {
8107		reqHeaders[k] = v
8108	}
8109	reqHeaders.Set("User-Agent", c.s.userAgent())
8110	var body io.Reader = nil
8111	c.urlParams_.Set("alt", alt)
8112	c.urlParams_.Set("prettyPrint", "false")
8113	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
8114	urls += "?" + c.urlParams_.Encode()
8115	req, err := http.NewRequest("DELETE", urls, body)
8116	if err != nil {
8117		return nil, err
8118	}
8119	req.Header = reqHeaders
8120	googleapi.Expand(req.URL, map[string]string{
8121		"name": c.name,
8122	})
8123	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8124}
8125
8126// Do executes the "cloudbuild.projects.locations.triggers.delete" call.
8127// Exactly one of *Empty or error will be non-nil. Any non-2xx status
8128// code is an error. Response headers are in either
8129// *Empty.ServerResponse.Header or (if a response was returned at all)
8130// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
8131// check whether the returned error was because http.StatusNotModified
8132// was returned.
8133func (c *ProjectsLocationsTriggersDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
8134	gensupport.SetOptions(c.urlParams_, opts...)
8135	res, err := c.doRequest("json")
8136	if res != nil && res.StatusCode == http.StatusNotModified {
8137		if res.Body != nil {
8138			res.Body.Close()
8139		}
8140		return nil, &googleapi.Error{
8141			Code:   res.StatusCode,
8142			Header: res.Header,
8143		}
8144	}
8145	if err != nil {
8146		return nil, err
8147	}
8148	defer googleapi.CloseBody(res)
8149	if err := googleapi.CheckResponse(res); err != nil {
8150		return nil, err
8151	}
8152	ret := &Empty{
8153		ServerResponse: googleapi.ServerResponse{
8154			Header:         res.Header,
8155			HTTPStatusCode: res.StatusCode,
8156		},
8157	}
8158	target := &ret
8159	if err := gensupport.DecodeResponse(target, res); err != nil {
8160		return nil, err
8161	}
8162	return ret, nil
8163	// {
8164	//   "description": "Deletes a `BuildTrigger` by its project ID and trigger ID. This API is experimental.",
8165	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/triggers/{triggersId}",
8166	//   "httpMethod": "DELETE",
8167	//   "id": "cloudbuild.projects.locations.triggers.delete",
8168	//   "parameterOrder": [
8169	//     "name"
8170	//   ],
8171	//   "parameters": {
8172	//     "name": {
8173	//       "description": "The name of the `Trigger` to delete. Format: `projects/{project}/locations/{location}/triggers/{trigger}`",
8174	//       "location": "path",
8175	//       "pattern": "^projects/[^/]+/locations/[^/]+/triggers/[^/]+$",
8176	//       "required": true,
8177	//       "type": "string"
8178	//     },
8179	//     "projectId": {
8180	//       "description": "Required. ID of the project that owns the trigger.",
8181	//       "location": "query",
8182	//       "type": "string"
8183	//     },
8184	//     "triggerId": {
8185	//       "description": "Required. ID of the `BuildTrigger` to delete.",
8186	//       "location": "query",
8187	//       "type": "string"
8188	//     }
8189	//   },
8190	//   "path": "v1/{+name}",
8191	//   "response": {
8192	//     "$ref": "Empty"
8193	//   },
8194	//   "scopes": [
8195	//     "https://www.googleapis.com/auth/cloud-platform"
8196	//   ]
8197	// }
8198
8199}
8200
8201// method id "cloudbuild.projects.locations.triggers.get":
8202
8203type ProjectsLocationsTriggersGetCall struct {
8204	s            *Service
8205	name         string
8206	urlParams_   gensupport.URLParams
8207	ifNoneMatch_ string
8208	ctx_         context.Context
8209	header_      http.Header
8210}
8211
8212// Get: Returns information about a `BuildTrigger`. This API is
8213// experimental.
8214//
8215// - name: The name of the `Trigger` to retrieve. Format:
8216//   `projects/{project}/locations/{location}/triggers/{trigger}`.
8217func (r *ProjectsLocationsTriggersService) Get(name string) *ProjectsLocationsTriggersGetCall {
8218	c := &ProjectsLocationsTriggersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8219	c.name = name
8220	return c
8221}
8222
8223// ProjectId sets the optional parameter "projectId": Required. ID of
8224// the project that owns the trigger.
8225func (c *ProjectsLocationsTriggersGetCall) ProjectId(projectId string) *ProjectsLocationsTriggersGetCall {
8226	c.urlParams_.Set("projectId", projectId)
8227	return c
8228}
8229
8230// TriggerId sets the optional parameter "triggerId": Required.
8231// Identifier (`id` or `name`) of the `BuildTrigger` to get.
8232func (c *ProjectsLocationsTriggersGetCall) TriggerId(triggerId string) *ProjectsLocationsTriggersGetCall {
8233	c.urlParams_.Set("triggerId", triggerId)
8234	return c
8235}
8236
8237// Fields allows partial responses to be retrieved. See
8238// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8239// for more information.
8240func (c *ProjectsLocationsTriggersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsTriggersGetCall {
8241	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8242	return c
8243}
8244
8245// IfNoneMatch sets the optional parameter which makes the operation
8246// fail if the object's ETag matches the given value. This is useful for
8247// getting updates only after the object has changed since the last
8248// request. Use googleapi.IsNotModified to check whether the response
8249// error from Do is the result of In-None-Match.
8250func (c *ProjectsLocationsTriggersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsTriggersGetCall {
8251	c.ifNoneMatch_ = entityTag
8252	return c
8253}
8254
8255// Context sets the context to be used in this call's Do method. Any
8256// pending HTTP request will be aborted if the provided context is
8257// canceled.
8258func (c *ProjectsLocationsTriggersGetCall) Context(ctx context.Context) *ProjectsLocationsTriggersGetCall {
8259	c.ctx_ = ctx
8260	return c
8261}
8262
8263// Header returns an http.Header that can be modified by the caller to
8264// add HTTP headers to the request.
8265func (c *ProjectsLocationsTriggersGetCall) Header() http.Header {
8266	if c.header_ == nil {
8267		c.header_ = make(http.Header)
8268	}
8269	return c.header_
8270}
8271
8272func (c *ProjectsLocationsTriggersGetCall) doRequest(alt string) (*http.Response, error) {
8273	reqHeaders := make(http.Header)
8274	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
8275	for k, v := range c.header_ {
8276		reqHeaders[k] = v
8277	}
8278	reqHeaders.Set("User-Agent", c.s.userAgent())
8279	if c.ifNoneMatch_ != "" {
8280		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8281	}
8282	var body io.Reader = nil
8283	c.urlParams_.Set("alt", alt)
8284	c.urlParams_.Set("prettyPrint", "false")
8285	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
8286	urls += "?" + c.urlParams_.Encode()
8287	req, err := http.NewRequest("GET", urls, body)
8288	if err != nil {
8289		return nil, err
8290	}
8291	req.Header = reqHeaders
8292	googleapi.Expand(req.URL, map[string]string{
8293		"name": c.name,
8294	})
8295	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8296}
8297
8298// Do executes the "cloudbuild.projects.locations.triggers.get" call.
8299// Exactly one of *BuildTrigger or error will be non-nil. Any non-2xx
8300// status code is an error. Response headers are in either
8301// *BuildTrigger.ServerResponse.Header or (if a response was returned at
8302// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
8303// to check whether the returned error was because
8304// http.StatusNotModified was returned.
8305func (c *ProjectsLocationsTriggersGetCall) Do(opts ...googleapi.CallOption) (*BuildTrigger, error) {
8306	gensupport.SetOptions(c.urlParams_, opts...)
8307	res, err := c.doRequest("json")
8308	if res != nil && res.StatusCode == http.StatusNotModified {
8309		if res.Body != nil {
8310			res.Body.Close()
8311		}
8312		return nil, &googleapi.Error{
8313			Code:   res.StatusCode,
8314			Header: res.Header,
8315		}
8316	}
8317	if err != nil {
8318		return nil, err
8319	}
8320	defer googleapi.CloseBody(res)
8321	if err := googleapi.CheckResponse(res); err != nil {
8322		return nil, err
8323	}
8324	ret := &BuildTrigger{
8325		ServerResponse: googleapi.ServerResponse{
8326			Header:         res.Header,
8327			HTTPStatusCode: res.StatusCode,
8328		},
8329	}
8330	target := &ret
8331	if err := gensupport.DecodeResponse(target, res); err != nil {
8332		return nil, err
8333	}
8334	return ret, nil
8335	// {
8336	//   "description": "Returns information about a `BuildTrigger`. This API is experimental.",
8337	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/triggers/{triggersId}",
8338	//   "httpMethod": "GET",
8339	//   "id": "cloudbuild.projects.locations.triggers.get",
8340	//   "parameterOrder": [
8341	//     "name"
8342	//   ],
8343	//   "parameters": {
8344	//     "name": {
8345	//       "description": "The name of the `Trigger` to retrieve. Format: `projects/{project}/locations/{location}/triggers/{trigger}`",
8346	//       "location": "path",
8347	//       "pattern": "^projects/[^/]+/locations/[^/]+/triggers/[^/]+$",
8348	//       "required": true,
8349	//       "type": "string"
8350	//     },
8351	//     "projectId": {
8352	//       "description": "Required. ID of the project that owns the trigger.",
8353	//       "location": "query",
8354	//       "type": "string"
8355	//     },
8356	//     "triggerId": {
8357	//       "description": "Required. Identifier (`id` or `name`) of the `BuildTrigger` to get.",
8358	//       "location": "query",
8359	//       "type": "string"
8360	//     }
8361	//   },
8362	//   "path": "v1/{+name}",
8363	//   "response": {
8364	//     "$ref": "BuildTrigger"
8365	//   },
8366	//   "scopes": [
8367	//     "https://www.googleapis.com/auth/cloud-platform"
8368	//   ]
8369	// }
8370
8371}
8372
8373// method id "cloudbuild.projects.locations.triggers.list":
8374
8375type ProjectsLocationsTriggersListCall struct {
8376	s            *Service
8377	parent       string
8378	urlParams_   gensupport.URLParams
8379	ifNoneMatch_ string
8380	ctx_         context.Context
8381	header_      http.Header
8382}
8383
8384// List: Lists existing `BuildTrigger`s. This API is experimental.
8385//
8386// - parent: The parent of the collection of `Triggers`. Format:
8387//   `projects/{project}/locations/{location}`.
8388func (r *ProjectsLocationsTriggersService) List(parent string) *ProjectsLocationsTriggersListCall {
8389	c := &ProjectsLocationsTriggersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8390	c.parent = parent
8391	return c
8392}
8393
8394// PageSize sets the optional parameter "pageSize": Number of results to
8395// return in the list.
8396func (c *ProjectsLocationsTriggersListCall) PageSize(pageSize int64) *ProjectsLocationsTriggersListCall {
8397	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
8398	return c
8399}
8400
8401// PageToken sets the optional parameter "pageToken": Token to provide
8402// to skip to a particular spot in the list.
8403func (c *ProjectsLocationsTriggersListCall) PageToken(pageToken string) *ProjectsLocationsTriggersListCall {
8404	c.urlParams_.Set("pageToken", pageToken)
8405	return c
8406}
8407
8408// ProjectId sets the optional parameter "projectId": Required. ID of
8409// the project for which to list BuildTriggers.
8410func (c *ProjectsLocationsTriggersListCall) ProjectId(projectId string) *ProjectsLocationsTriggersListCall {
8411	c.urlParams_.Set("projectId", projectId)
8412	return c
8413}
8414
8415// Fields allows partial responses to be retrieved. See
8416// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8417// for more information.
8418func (c *ProjectsLocationsTriggersListCall) Fields(s ...googleapi.Field) *ProjectsLocationsTriggersListCall {
8419	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8420	return c
8421}
8422
8423// IfNoneMatch sets the optional parameter which makes the operation
8424// fail if the object's ETag matches the given value. This is useful for
8425// getting updates only after the object has changed since the last
8426// request. Use googleapi.IsNotModified to check whether the response
8427// error from Do is the result of In-None-Match.
8428func (c *ProjectsLocationsTriggersListCall) IfNoneMatch(entityTag string) *ProjectsLocationsTriggersListCall {
8429	c.ifNoneMatch_ = entityTag
8430	return c
8431}
8432
8433// Context sets the context to be used in this call's Do method. Any
8434// pending HTTP request will be aborted if the provided context is
8435// canceled.
8436func (c *ProjectsLocationsTriggersListCall) Context(ctx context.Context) *ProjectsLocationsTriggersListCall {
8437	c.ctx_ = ctx
8438	return c
8439}
8440
8441// Header returns an http.Header that can be modified by the caller to
8442// add HTTP headers to the request.
8443func (c *ProjectsLocationsTriggersListCall) Header() http.Header {
8444	if c.header_ == nil {
8445		c.header_ = make(http.Header)
8446	}
8447	return c.header_
8448}
8449
8450func (c *ProjectsLocationsTriggersListCall) doRequest(alt string) (*http.Response, error) {
8451	reqHeaders := make(http.Header)
8452	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
8453	for k, v := range c.header_ {
8454		reqHeaders[k] = v
8455	}
8456	reqHeaders.Set("User-Agent", c.s.userAgent())
8457	if c.ifNoneMatch_ != "" {
8458		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8459	}
8460	var body io.Reader = nil
8461	c.urlParams_.Set("alt", alt)
8462	c.urlParams_.Set("prettyPrint", "false")
8463	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/triggers")
8464	urls += "?" + c.urlParams_.Encode()
8465	req, err := http.NewRequest("GET", urls, body)
8466	if err != nil {
8467		return nil, err
8468	}
8469	req.Header = reqHeaders
8470	googleapi.Expand(req.URL, map[string]string{
8471		"parent": c.parent,
8472	})
8473	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8474}
8475
8476// Do executes the "cloudbuild.projects.locations.triggers.list" call.
8477// Exactly one of *ListBuildTriggersResponse or error will be non-nil.
8478// Any non-2xx status code is an error. Response headers are in either
8479// *ListBuildTriggersResponse.ServerResponse.Header or (if a response
8480// was returned at all) in error.(*googleapi.Error).Header. Use
8481// googleapi.IsNotModified to check whether the returned error was
8482// because http.StatusNotModified was returned.
8483func (c *ProjectsLocationsTriggersListCall) Do(opts ...googleapi.CallOption) (*ListBuildTriggersResponse, error) {
8484	gensupport.SetOptions(c.urlParams_, opts...)
8485	res, err := c.doRequest("json")
8486	if res != nil && res.StatusCode == http.StatusNotModified {
8487		if res.Body != nil {
8488			res.Body.Close()
8489		}
8490		return nil, &googleapi.Error{
8491			Code:   res.StatusCode,
8492			Header: res.Header,
8493		}
8494	}
8495	if err != nil {
8496		return nil, err
8497	}
8498	defer googleapi.CloseBody(res)
8499	if err := googleapi.CheckResponse(res); err != nil {
8500		return nil, err
8501	}
8502	ret := &ListBuildTriggersResponse{
8503		ServerResponse: googleapi.ServerResponse{
8504			Header:         res.Header,
8505			HTTPStatusCode: res.StatusCode,
8506		},
8507	}
8508	target := &ret
8509	if err := gensupport.DecodeResponse(target, res); err != nil {
8510		return nil, err
8511	}
8512	return ret, nil
8513	// {
8514	//   "description": "Lists existing `BuildTrigger`s. This API is experimental.",
8515	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/triggers",
8516	//   "httpMethod": "GET",
8517	//   "id": "cloudbuild.projects.locations.triggers.list",
8518	//   "parameterOrder": [
8519	//     "parent"
8520	//   ],
8521	//   "parameters": {
8522	//     "pageSize": {
8523	//       "description": "Number of results to return in the list.",
8524	//       "format": "int32",
8525	//       "location": "query",
8526	//       "type": "integer"
8527	//     },
8528	//     "pageToken": {
8529	//       "description": "Token to provide to skip to a particular spot in the list.",
8530	//       "location": "query",
8531	//       "type": "string"
8532	//     },
8533	//     "parent": {
8534	//       "description": "The parent of the collection of `Triggers`. Format: `projects/{project}/locations/{location}`",
8535	//       "location": "path",
8536	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
8537	//       "required": true,
8538	//       "type": "string"
8539	//     },
8540	//     "projectId": {
8541	//       "description": "Required. ID of the project for which to list BuildTriggers.",
8542	//       "location": "query",
8543	//       "type": "string"
8544	//     }
8545	//   },
8546	//   "path": "v1/{+parent}/triggers",
8547	//   "response": {
8548	//     "$ref": "ListBuildTriggersResponse"
8549	//   },
8550	//   "scopes": [
8551	//     "https://www.googleapis.com/auth/cloud-platform"
8552	//   ]
8553	// }
8554
8555}
8556
8557// Pages invokes f for each page of results.
8558// A non-nil error returned from f will halt the iteration.
8559// The provided context supersedes any context provided to the Context method.
8560func (c *ProjectsLocationsTriggersListCall) Pages(ctx context.Context, f func(*ListBuildTriggersResponse) error) error {
8561	c.ctx_ = ctx
8562	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
8563	for {
8564		x, err := c.Do()
8565		if err != nil {
8566			return err
8567		}
8568		if err := f(x); err != nil {
8569			return err
8570		}
8571		if x.NextPageToken == "" {
8572			return nil
8573		}
8574		c.PageToken(x.NextPageToken)
8575	}
8576}
8577
8578// method id "cloudbuild.projects.locations.triggers.patch":
8579
8580type ProjectsLocationsTriggersPatchCall struct {
8581	s              *Service
8582	resourceNameid string
8583	buildtrigger   *BuildTrigger
8584	urlParams_     gensupport.URLParams
8585	ctx_           context.Context
8586	header_        http.Header
8587}
8588
8589// Patch: Updates a `BuildTrigger` by its project ID and trigger ID.
8590// This API is experimental.
8591//
8592// - resourceName: The `Trigger` name with format:
8593//   `projects/{project}/locations/{location}/triggers/{trigger}`, where
8594//   {trigger} is a unique identifier generated by the service.
8595func (r *ProjectsLocationsTriggersService) Patch(resourceNameid string, buildtrigger *BuildTrigger) *ProjectsLocationsTriggersPatchCall {
8596	c := &ProjectsLocationsTriggersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8597	c.resourceNameid = resourceNameid
8598	c.buildtrigger = buildtrigger
8599	return c
8600}
8601
8602// ProjectId sets the optional parameter "projectId": Required. ID of
8603// the project that owns the trigger.
8604func (c *ProjectsLocationsTriggersPatchCall) ProjectId(projectId string) *ProjectsLocationsTriggersPatchCall {
8605	c.urlParams_.Set("projectId", projectId)
8606	return c
8607}
8608
8609// TriggerId sets the optional parameter "triggerId": Required. ID of
8610// the `BuildTrigger` to update.
8611func (c *ProjectsLocationsTriggersPatchCall) TriggerId(triggerId string) *ProjectsLocationsTriggersPatchCall {
8612	c.urlParams_.Set("triggerId", triggerId)
8613	return c
8614}
8615
8616// Fields allows partial responses to be retrieved. See
8617// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8618// for more information.
8619func (c *ProjectsLocationsTriggersPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsTriggersPatchCall {
8620	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8621	return c
8622}
8623
8624// Context sets the context to be used in this call's Do method. Any
8625// pending HTTP request will be aborted if the provided context is
8626// canceled.
8627func (c *ProjectsLocationsTriggersPatchCall) Context(ctx context.Context) *ProjectsLocationsTriggersPatchCall {
8628	c.ctx_ = ctx
8629	return c
8630}
8631
8632// Header returns an http.Header that can be modified by the caller to
8633// add HTTP headers to the request.
8634func (c *ProjectsLocationsTriggersPatchCall) Header() http.Header {
8635	if c.header_ == nil {
8636		c.header_ = make(http.Header)
8637	}
8638	return c.header_
8639}
8640
8641func (c *ProjectsLocationsTriggersPatchCall) doRequest(alt string) (*http.Response, error) {
8642	reqHeaders := make(http.Header)
8643	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
8644	for k, v := range c.header_ {
8645		reqHeaders[k] = v
8646	}
8647	reqHeaders.Set("User-Agent", c.s.userAgent())
8648	var body io.Reader = nil
8649	body, err := googleapi.WithoutDataWrapper.JSONReader(c.buildtrigger)
8650	if err != nil {
8651		return nil, err
8652	}
8653	reqHeaders.Set("Content-Type", "application/json")
8654	c.urlParams_.Set("alt", alt)
8655	c.urlParams_.Set("prettyPrint", "false")
8656	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resourceName}")
8657	urls += "?" + c.urlParams_.Encode()
8658	req, err := http.NewRequest("PATCH", urls, body)
8659	if err != nil {
8660		return nil, err
8661	}
8662	req.Header = reqHeaders
8663	googleapi.Expand(req.URL, map[string]string{
8664		"resourceName": c.resourceNameid,
8665	})
8666	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8667}
8668
8669// Do executes the "cloudbuild.projects.locations.triggers.patch" call.
8670// Exactly one of *BuildTrigger or error will be non-nil. Any non-2xx
8671// status code is an error. Response headers are in either
8672// *BuildTrigger.ServerResponse.Header or (if a response was returned at
8673// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
8674// to check whether the returned error was because
8675// http.StatusNotModified was returned.
8676func (c *ProjectsLocationsTriggersPatchCall) Do(opts ...googleapi.CallOption) (*BuildTrigger, error) {
8677	gensupport.SetOptions(c.urlParams_, opts...)
8678	res, err := c.doRequest("json")
8679	if res != nil && res.StatusCode == http.StatusNotModified {
8680		if res.Body != nil {
8681			res.Body.Close()
8682		}
8683		return nil, &googleapi.Error{
8684			Code:   res.StatusCode,
8685			Header: res.Header,
8686		}
8687	}
8688	if err != nil {
8689		return nil, err
8690	}
8691	defer googleapi.CloseBody(res)
8692	if err := googleapi.CheckResponse(res); err != nil {
8693		return nil, err
8694	}
8695	ret := &BuildTrigger{
8696		ServerResponse: googleapi.ServerResponse{
8697			Header:         res.Header,
8698			HTTPStatusCode: res.StatusCode,
8699		},
8700	}
8701	target := &ret
8702	if err := gensupport.DecodeResponse(target, res); err != nil {
8703		return nil, err
8704	}
8705	return ret, nil
8706	// {
8707	//   "description": "Updates a `BuildTrigger` by its project ID and trigger ID. This API is experimental.",
8708	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/triggers/{triggersId}",
8709	//   "httpMethod": "PATCH",
8710	//   "id": "cloudbuild.projects.locations.triggers.patch",
8711	//   "parameterOrder": [
8712	//     "resourceName"
8713	//   ],
8714	//   "parameters": {
8715	//     "projectId": {
8716	//       "description": "Required. ID of the project that owns the trigger.",
8717	//       "location": "query",
8718	//       "type": "string"
8719	//     },
8720	//     "resourceName": {
8721	//       "description": "The `Trigger` name with format: `projects/{project}/locations/{location}/triggers/{trigger}`, where {trigger} is a unique identifier generated by the service.",
8722	//       "location": "path",
8723	//       "pattern": "^projects/[^/]+/locations/[^/]+/triggers/[^/]+$",
8724	//       "required": true,
8725	//       "type": "string"
8726	//     },
8727	//     "triggerId": {
8728	//       "description": "Required. ID of the `BuildTrigger` to update.",
8729	//       "location": "query",
8730	//       "type": "string"
8731	//     }
8732	//   },
8733	//   "path": "v1/{+resourceName}",
8734	//   "request": {
8735	//     "$ref": "BuildTrigger"
8736	//   },
8737	//   "response": {
8738	//     "$ref": "BuildTrigger"
8739	//   },
8740	//   "scopes": [
8741	//     "https://www.googleapis.com/auth/cloud-platform"
8742	//   ]
8743	// }
8744
8745}
8746
8747// method id "cloudbuild.projects.locations.triggers.run":
8748
8749type ProjectsLocationsTriggersRunCall struct {
8750	s                      *Service
8751	name                   string
8752	runbuildtriggerrequest *RunBuildTriggerRequest
8753	urlParams_             gensupport.URLParams
8754	ctx_                   context.Context
8755	header_                http.Header
8756}
8757
8758// Run: Runs a `BuildTrigger` at a particular source revision.
8759//
8760// - name: The name of the `Trigger` to run. Format:
8761//   `projects/{project}/locations/{location}/triggers/{trigger}`.
8762func (r *ProjectsLocationsTriggersService) Run(name string, runbuildtriggerrequest *RunBuildTriggerRequest) *ProjectsLocationsTriggersRunCall {
8763	c := &ProjectsLocationsTriggersRunCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8764	c.name = name
8765	c.runbuildtriggerrequest = runbuildtriggerrequest
8766	return c
8767}
8768
8769// Fields allows partial responses to be retrieved. See
8770// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8771// for more information.
8772func (c *ProjectsLocationsTriggersRunCall) Fields(s ...googleapi.Field) *ProjectsLocationsTriggersRunCall {
8773	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8774	return c
8775}
8776
8777// Context sets the context to be used in this call's Do method. Any
8778// pending HTTP request will be aborted if the provided context is
8779// canceled.
8780func (c *ProjectsLocationsTriggersRunCall) Context(ctx context.Context) *ProjectsLocationsTriggersRunCall {
8781	c.ctx_ = ctx
8782	return c
8783}
8784
8785// Header returns an http.Header that can be modified by the caller to
8786// add HTTP headers to the request.
8787func (c *ProjectsLocationsTriggersRunCall) Header() http.Header {
8788	if c.header_ == nil {
8789		c.header_ = make(http.Header)
8790	}
8791	return c.header_
8792}
8793
8794func (c *ProjectsLocationsTriggersRunCall) doRequest(alt string) (*http.Response, error) {
8795	reqHeaders := make(http.Header)
8796	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
8797	for k, v := range c.header_ {
8798		reqHeaders[k] = v
8799	}
8800	reqHeaders.Set("User-Agent", c.s.userAgent())
8801	var body io.Reader = nil
8802	body, err := googleapi.WithoutDataWrapper.JSONReader(c.runbuildtriggerrequest)
8803	if err != nil {
8804		return nil, err
8805	}
8806	reqHeaders.Set("Content-Type", "application/json")
8807	c.urlParams_.Set("alt", alt)
8808	c.urlParams_.Set("prettyPrint", "false")
8809	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:run")
8810	urls += "?" + c.urlParams_.Encode()
8811	req, err := http.NewRequest("POST", urls, body)
8812	if err != nil {
8813		return nil, err
8814	}
8815	req.Header = reqHeaders
8816	googleapi.Expand(req.URL, map[string]string{
8817		"name": c.name,
8818	})
8819	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8820}
8821
8822// Do executes the "cloudbuild.projects.locations.triggers.run" call.
8823// Exactly one of *Operation or error will be non-nil. Any non-2xx
8824// status code is an error. Response headers are in either
8825// *Operation.ServerResponse.Header or (if a response was returned at
8826// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
8827// to check whether the returned error was because
8828// http.StatusNotModified was returned.
8829func (c *ProjectsLocationsTriggersRunCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8830	gensupport.SetOptions(c.urlParams_, opts...)
8831	res, err := c.doRequest("json")
8832	if res != nil && res.StatusCode == http.StatusNotModified {
8833		if res.Body != nil {
8834			res.Body.Close()
8835		}
8836		return nil, &googleapi.Error{
8837			Code:   res.StatusCode,
8838			Header: res.Header,
8839		}
8840	}
8841	if err != nil {
8842		return nil, err
8843	}
8844	defer googleapi.CloseBody(res)
8845	if err := googleapi.CheckResponse(res); err != nil {
8846		return nil, err
8847	}
8848	ret := &Operation{
8849		ServerResponse: googleapi.ServerResponse{
8850			Header:         res.Header,
8851			HTTPStatusCode: res.StatusCode,
8852		},
8853	}
8854	target := &ret
8855	if err := gensupport.DecodeResponse(target, res); err != nil {
8856		return nil, err
8857	}
8858	return ret, nil
8859	// {
8860	//   "description": "Runs a `BuildTrigger` at a particular source revision.",
8861	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/triggers/{triggersId}:run",
8862	//   "httpMethod": "POST",
8863	//   "id": "cloudbuild.projects.locations.triggers.run",
8864	//   "parameterOrder": [
8865	//     "name"
8866	//   ],
8867	//   "parameters": {
8868	//     "name": {
8869	//       "description": "The name of the `Trigger` to run. Format: `projects/{project}/locations/{location}/triggers/{trigger}`",
8870	//       "location": "path",
8871	//       "pattern": "^projects/[^/]+/locations/[^/]+/triggers/[^/]+$",
8872	//       "required": true,
8873	//       "type": "string"
8874	//     }
8875	//   },
8876	//   "path": "v1/{+name}:run",
8877	//   "request": {
8878	//     "$ref": "RunBuildTriggerRequest"
8879	//   },
8880	//   "response": {
8881	//     "$ref": "Operation"
8882	//   },
8883	//   "scopes": [
8884	//     "https://www.googleapis.com/auth/cloud-platform"
8885	//   ]
8886	// }
8887
8888}
8889
8890// method id "cloudbuild.projects.locations.triggers.webhook":
8891
8892type ProjectsLocationsTriggersWebhookCall struct {
8893	s          *Service
8894	name       string
8895	httpbody   *HttpBody
8896	urlParams_ gensupport.URLParams
8897	ctx_       context.Context
8898	header_    http.Header
8899}
8900
8901// Webhook: ReceiveTriggerWebhook [Experimental] is called when the API
8902// receives a webhook request targeted at a specific trigger.
8903//
8904// - name: The name of the `ReceiveTriggerWebhook` to retrieve. Format:
8905//   `projects/{project}/locations/{location}/triggers/{trigger}`.
8906func (r *ProjectsLocationsTriggersService) Webhook(name string, httpbody *HttpBody) *ProjectsLocationsTriggersWebhookCall {
8907	c := &ProjectsLocationsTriggersWebhookCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8908	c.name = name
8909	c.httpbody = httpbody
8910	return c
8911}
8912
8913// ProjectId sets the optional parameter "projectId": Project in which
8914// the specified trigger lives
8915func (c *ProjectsLocationsTriggersWebhookCall) ProjectId(projectId string) *ProjectsLocationsTriggersWebhookCall {
8916	c.urlParams_.Set("projectId", projectId)
8917	return c
8918}
8919
8920// Secret sets the optional parameter "secret": Secret token used for
8921// authorization if an OAuth token isn't provided.
8922func (c *ProjectsLocationsTriggersWebhookCall) Secret(secret string) *ProjectsLocationsTriggersWebhookCall {
8923	c.urlParams_.Set("secret", secret)
8924	return c
8925}
8926
8927// Trigger sets the optional parameter "trigger": Name of the trigger to
8928// run the payload against
8929func (c *ProjectsLocationsTriggersWebhookCall) Trigger(trigger string) *ProjectsLocationsTriggersWebhookCall {
8930	c.urlParams_.Set("trigger", trigger)
8931	return c
8932}
8933
8934// Fields allows partial responses to be retrieved. See
8935// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8936// for more information.
8937func (c *ProjectsLocationsTriggersWebhookCall) Fields(s ...googleapi.Field) *ProjectsLocationsTriggersWebhookCall {
8938	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8939	return c
8940}
8941
8942// Context sets the context to be used in this call's Do method. Any
8943// pending HTTP request will be aborted if the provided context is
8944// canceled.
8945func (c *ProjectsLocationsTriggersWebhookCall) Context(ctx context.Context) *ProjectsLocationsTriggersWebhookCall {
8946	c.ctx_ = ctx
8947	return c
8948}
8949
8950// Header returns an http.Header that can be modified by the caller to
8951// add HTTP headers to the request.
8952func (c *ProjectsLocationsTriggersWebhookCall) Header() http.Header {
8953	if c.header_ == nil {
8954		c.header_ = make(http.Header)
8955	}
8956	return c.header_
8957}
8958
8959func (c *ProjectsLocationsTriggersWebhookCall) doRequest(alt string) (*http.Response, error) {
8960	reqHeaders := make(http.Header)
8961	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
8962	for k, v := range c.header_ {
8963		reqHeaders[k] = v
8964	}
8965	reqHeaders.Set("User-Agent", c.s.userAgent())
8966	var body io.Reader = nil
8967	body, err := googleapi.WithoutDataWrapper.JSONReader(c.httpbody)
8968	if err != nil {
8969		return nil, err
8970	}
8971	reqHeaders.Set("Content-Type", "application/json")
8972	c.urlParams_.Set("alt", alt)
8973	c.urlParams_.Set("prettyPrint", "false")
8974	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:webhook")
8975	urls += "?" + c.urlParams_.Encode()
8976	req, err := http.NewRequest("POST", urls, body)
8977	if err != nil {
8978		return nil, err
8979	}
8980	req.Header = reqHeaders
8981	googleapi.Expand(req.URL, map[string]string{
8982		"name": c.name,
8983	})
8984	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8985}
8986
8987// Do executes the "cloudbuild.projects.locations.triggers.webhook" call.
8988// Exactly one of *ReceiveTriggerWebhookResponse or error will be
8989// non-nil. Any non-2xx status code is an error. Response headers are in
8990// either *ReceiveTriggerWebhookResponse.ServerResponse.Header or (if a
8991// response was returned at all) in error.(*googleapi.Error).Header. Use
8992// googleapi.IsNotModified to check whether the returned error was
8993// because http.StatusNotModified was returned.
8994func (c *ProjectsLocationsTriggersWebhookCall) Do(opts ...googleapi.CallOption) (*ReceiveTriggerWebhookResponse, error) {
8995	gensupport.SetOptions(c.urlParams_, opts...)
8996	res, err := c.doRequest("json")
8997	if res != nil && res.StatusCode == http.StatusNotModified {
8998		if res.Body != nil {
8999			res.Body.Close()
9000		}
9001		return nil, &googleapi.Error{
9002			Code:   res.StatusCode,
9003			Header: res.Header,
9004		}
9005	}
9006	if err != nil {
9007		return nil, err
9008	}
9009	defer googleapi.CloseBody(res)
9010	if err := googleapi.CheckResponse(res); err != nil {
9011		return nil, err
9012	}
9013	ret := &ReceiveTriggerWebhookResponse{
9014		ServerResponse: googleapi.ServerResponse{
9015			Header:         res.Header,
9016			HTTPStatusCode: res.StatusCode,
9017		},
9018	}
9019	target := &ret
9020	if err := gensupport.DecodeResponse(target, res); err != nil {
9021		return nil, err
9022	}
9023	return ret, nil
9024	// {
9025	//   "description": "ReceiveTriggerWebhook [Experimental] is called when the API receives a webhook request targeted at a specific trigger.",
9026	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/triggers/{triggersId}:webhook",
9027	//   "httpMethod": "POST",
9028	//   "id": "cloudbuild.projects.locations.triggers.webhook",
9029	//   "parameterOrder": [
9030	//     "name"
9031	//   ],
9032	//   "parameters": {
9033	//     "name": {
9034	//       "description": "The name of the `ReceiveTriggerWebhook` to retrieve. Format: `projects/{project}/locations/{location}/triggers/{trigger}`",
9035	//       "location": "path",
9036	//       "pattern": "^projects/[^/]+/locations/[^/]+/triggers/[^/]+$",
9037	//       "required": true,
9038	//       "type": "string"
9039	//     },
9040	//     "projectId": {
9041	//       "description": "Project in which the specified trigger lives",
9042	//       "location": "query",
9043	//       "type": "string"
9044	//     },
9045	//     "secret": {
9046	//       "description": "Secret token used for authorization if an OAuth token isn't provided.",
9047	//       "location": "query",
9048	//       "type": "string"
9049	//     },
9050	//     "trigger": {
9051	//       "description": "Name of the trigger to run the payload against",
9052	//       "location": "query",
9053	//       "type": "string"
9054	//     }
9055	//   },
9056	//   "path": "v1/{+name}:webhook",
9057	//   "request": {
9058	//     "$ref": "HttpBody"
9059	//   },
9060	//   "response": {
9061	//     "$ref": "ReceiveTriggerWebhookResponse"
9062	//   }
9063	// }
9064
9065}
9066
9067// method id "cloudbuild.projects.locations.workerPools.create":
9068
9069type ProjectsLocationsWorkerPoolsCreateCall struct {
9070	s          *Service
9071	parent     string
9072	workerpool *WorkerPool
9073	urlParams_ gensupport.URLParams
9074	ctx_       context.Context
9075	header_    http.Header
9076}
9077
9078// Create: Creates a `WorkerPool`.
9079//
9080// - parent: The parent resource where this worker pool will be created.
9081//   Format: `projects/{project}/locations/{location}`.
9082func (r *ProjectsLocationsWorkerPoolsService) Create(parent string, workerpool *WorkerPool) *ProjectsLocationsWorkerPoolsCreateCall {
9083	c := &ProjectsLocationsWorkerPoolsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9084	c.parent = parent
9085	c.workerpool = workerpool
9086	return c
9087}
9088
9089// ValidateOnly sets the optional parameter "validateOnly": If set,
9090// validate the request and preview the response, but do not actually
9091// post it.
9092func (c *ProjectsLocationsWorkerPoolsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsWorkerPoolsCreateCall {
9093	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
9094	return c
9095}
9096
9097// WorkerPoolId sets the optional parameter "workerPoolId": Required.
9098// Immutable. The ID to use for the `WorkerPool`, which will become the
9099// final component of the resource name. This value should be 1-63
9100// characters, and valid characters are /a-z-/.
9101func (c *ProjectsLocationsWorkerPoolsCreateCall) WorkerPoolId(workerPoolId string) *ProjectsLocationsWorkerPoolsCreateCall {
9102	c.urlParams_.Set("workerPoolId", workerPoolId)
9103	return c
9104}
9105
9106// Fields allows partial responses to be retrieved. See
9107// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9108// for more information.
9109func (c *ProjectsLocationsWorkerPoolsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkerPoolsCreateCall {
9110	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9111	return c
9112}
9113
9114// Context sets the context to be used in this call's Do method. Any
9115// pending HTTP request will be aborted if the provided context is
9116// canceled.
9117func (c *ProjectsLocationsWorkerPoolsCreateCall) Context(ctx context.Context) *ProjectsLocationsWorkerPoolsCreateCall {
9118	c.ctx_ = ctx
9119	return c
9120}
9121
9122// Header returns an http.Header that can be modified by the caller to
9123// add HTTP headers to the request.
9124func (c *ProjectsLocationsWorkerPoolsCreateCall) Header() http.Header {
9125	if c.header_ == nil {
9126		c.header_ = make(http.Header)
9127	}
9128	return c.header_
9129}
9130
9131func (c *ProjectsLocationsWorkerPoolsCreateCall) doRequest(alt string) (*http.Response, error) {
9132	reqHeaders := make(http.Header)
9133	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
9134	for k, v := range c.header_ {
9135		reqHeaders[k] = v
9136	}
9137	reqHeaders.Set("User-Agent", c.s.userAgent())
9138	var body io.Reader = nil
9139	body, err := googleapi.WithoutDataWrapper.JSONReader(c.workerpool)
9140	if err != nil {
9141		return nil, err
9142	}
9143	reqHeaders.Set("Content-Type", "application/json")
9144	c.urlParams_.Set("alt", alt)
9145	c.urlParams_.Set("prettyPrint", "false")
9146	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/workerPools")
9147	urls += "?" + c.urlParams_.Encode()
9148	req, err := http.NewRequest("POST", urls, body)
9149	if err != nil {
9150		return nil, err
9151	}
9152	req.Header = reqHeaders
9153	googleapi.Expand(req.URL, map[string]string{
9154		"parent": c.parent,
9155	})
9156	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9157}
9158
9159// Do executes the "cloudbuild.projects.locations.workerPools.create" call.
9160// Exactly one of *Operation or error will be non-nil. Any non-2xx
9161// status code is an error. Response headers are in either
9162// *Operation.ServerResponse.Header or (if a response was returned at
9163// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9164// to check whether the returned error was because
9165// http.StatusNotModified was returned.
9166func (c *ProjectsLocationsWorkerPoolsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9167	gensupport.SetOptions(c.urlParams_, opts...)
9168	res, err := c.doRequest("json")
9169	if res != nil && res.StatusCode == http.StatusNotModified {
9170		if res.Body != nil {
9171			res.Body.Close()
9172		}
9173		return nil, &googleapi.Error{
9174			Code:   res.StatusCode,
9175			Header: res.Header,
9176		}
9177	}
9178	if err != nil {
9179		return nil, err
9180	}
9181	defer googleapi.CloseBody(res)
9182	if err := googleapi.CheckResponse(res); err != nil {
9183		return nil, err
9184	}
9185	ret := &Operation{
9186		ServerResponse: googleapi.ServerResponse{
9187			Header:         res.Header,
9188			HTTPStatusCode: res.StatusCode,
9189		},
9190	}
9191	target := &ret
9192	if err := gensupport.DecodeResponse(target, res); err != nil {
9193		return nil, err
9194	}
9195	return ret, nil
9196	// {
9197	//   "description": "Creates a `WorkerPool`.",
9198	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workerPools",
9199	//   "httpMethod": "POST",
9200	//   "id": "cloudbuild.projects.locations.workerPools.create",
9201	//   "parameterOrder": [
9202	//     "parent"
9203	//   ],
9204	//   "parameters": {
9205	//     "parent": {
9206	//       "description": "Required. The parent resource where this worker pool will be created. Format: `projects/{project}/locations/{location}`.",
9207	//       "location": "path",
9208	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
9209	//       "required": true,
9210	//       "type": "string"
9211	//     },
9212	//     "validateOnly": {
9213	//       "description": "If set, validate the request and preview the response, but do not actually post it.",
9214	//       "location": "query",
9215	//       "type": "boolean"
9216	//     },
9217	//     "workerPoolId": {
9218	//       "description": "Required. Immutable. The ID to use for the `WorkerPool`, which will become the final component of the resource name. This value should be 1-63 characters, and valid characters are /a-z-/.",
9219	//       "location": "query",
9220	//       "type": "string"
9221	//     }
9222	//   },
9223	//   "path": "v1/{+parent}/workerPools",
9224	//   "request": {
9225	//     "$ref": "WorkerPool"
9226	//   },
9227	//   "response": {
9228	//     "$ref": "Operation"
9229	//   },
9230	//   "scopes": [
9231	//     "https://www.googleapis.com/auth/cloud-platform"
9232	//   ]
9233	// }
9234
9235}
9236
9237// method id "cloudbuild.projects.locations.workerPools.delete":
9238
9239type ProjectsLocationsWorkerPoolsDeleteCall struct {
9240	s          *Service
9241	name       string
9242	urlParams_ gensupport.URLParams
9243	ctx_       context.Context
9244	header_    http.Header
9245}
9246
9247// Delete: Deletes a `WorkerPool`.
9248//
9249// - name: The name of the `WorkerPool` to delete. Format:
9250//   `projects/{project}/locations/{workerPool}/workerPools/{workerPool}`
9251//   .
9252func (r *ProjectsLocationsWorkerPoolsService) Delete(name string) *ProjectsLocationsWorkerPoolsDeleteCall {
9253	c := &ProjectsLocationsWorkerPoolsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9254	c.name = name
9255	return c
9256}
9257
9258// AllowMissing sets the optional parameter "allowMissing": If set to
9259// true, and the `WorkerPool` is not found, the request will succeed but
9260// no action will be taken on the server.
9261func (c *ProjectsLocationsWorkerPoolsDeleteCall) AllowMissing(allowMissing bool) *ProjectsLocationsWorkerPoolsDeleteCall {
9262	c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing))
9263	return c
9264}
9265
9266// Etag sets the optional parameter "etag": If this is provided, it must
9267// match the server's etag on the workerpool for the request to be
9268// processed.
9269func (c *ProjectsLocationsWorkerPoolsDeleteCall) Etag(etag string) *ProjectsLocationsWorkerPoolsDeleteCall {
9270	c.urlParams_.Set("etag", etag)
9271	return c
9272}
9273
9274// ValidateOnly sets the optional parameter "validateOnly": If set,
9275// validate the request and preview the response, but do not actually
9276// post it.
9277func (c *ProjectsLocationsWorkerPoolsDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsWorkerPoolsDeleteCall {
9278	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
9279	return c
9280}
9281
9282// Fields allows partial responses to be retrieved. See
9283// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9284// for more information.
9285func (c *ProjectsLocationsWorkerPoolsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkerPoolsDeleteCall {
9286	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9287	return c
9288}
9289
9290// Context sets the context to be used in this call's Do method. Any
9291// pending HTTP request will be aborted if the provided context is
9292// canceled.
9293func (c *ProjectsLocationsWorkerPoolsDeleteCall) Context(ctx context.Context) *ProjectsLocationsWorkerPoolsDeleteCall {
9294	c.ctx_ = ctx
9295	return c
9296}
9297
9298// Header returns an http.Header that can be modified by the caller to
9299// add HTTP headers to the request.
9300func (c *ProjectsLocationsWorkerPoolsDeleteCall) Header() http.Header {
9301	if c.header_ == nil {
9302		c.header_ = make(http.Header)
9303	}
9304	return c.header_
9305}
9306
9307func (c *ProjectsLocationsWorkerPoolsDeleteCall) doRequest(alt string) (*http.Response, error) {
9308	reqHeaders := make(http.Header)
9309	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
9310	for k, v := range c.header_ {
9311		reqHeaders[k] = v
9312	}
9313	reqHeaders.Set("User-Agent", c.s.userAgent())
9314	var body io.Reader = nil
9315	c.urlParams_.Set("alt", alt)
9316	c.urlParams_.Set("prettyPrint", "false")
9317	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
9318	urls += "?" + c.urlParams_.Encode()
9319	req, err := http.NewRequest("DELETE", urls, body)
9320	if err != nil {
9321		return nil, err
9322	}
9323	req.Header = reqHeaders
9324	googleapi.Expand(req.URL, map[string]string{
9325		"name": c.name,
9326	})
9327	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9328}
9329
9330// Do executes the "cloudbuild.projects.locations.workerPools.delete" call.
9331// Exactly one of *Operation or error will be non-nil. Any non-2xx
9332// status code is an error. Response headers are in either
9333// *Operation.ServerResponse.Header or (if a response was returned at
9334// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9335// to check whether the returned error was because
9336// http.StatusNotModified was returned.
9337func (c *ProjectsLocationsWorkerPoolsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9338	gensupport.SetOptions(c.urlParams_, opts...)
9339	res, err := c.doRequest("json")
9340	if res != nil && res.StatusCode == http.StatusNotModified {
9341		if res.Body != nil {
9342			res.Body.Close()
9343		}
9344		return nil, &googleapi.Error{
9345			Code:   res.StatusCode,
9346			Header: res.Header,
9347		}
9348	}
9349	if err != nil {
9350		return nil, err
9351	}
9352	defer googleapi.CloseBody(res)
9353	if err := googleapi.CheckResponse(res); err != nil {
9354		return nil, err
9355	}
9356	ret := &Operation{
9357		ServerResponse: googleapi.ServerResponse{
9358			Header:         res.Header,
9359			HTTPStatusCode: res.StatusCode,
9360		},
9361	}
9362	target := &ret
9363	if err := gensupport.DecodeResponse(target, res); err != nil {
9364		return nil, err
9365	}
9366	return ret, nil
9367	// {
9368	//   "description": "Deletes a `WorkerPool`.",
9369	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workerPools/{workerPoolsId}",
9370	//   "httpMethod": "DELETE",
9371	//   "id": "cloudbuild.projects.locations.workerPools.delete",
9372	//   "parameterOrder": [
9373	//     "name"
9374	//   ],
9375	//   "parameters": {
9376	//     "allowMissing": {
9377	//       "description": "If set to true, and the `WorkerPool` is not found, the request will succeed but no action will be taken on the server.",
9378	//       "location": "query",
9379	//       "type": "boolean"
9380	//     },
9381	//     "etag": {
9382	//       "description": "Optional. If this is provided, it must match the server's etag on the workerpool for the request to be processed.",
9383	//       "location": "query",
9384	//       "type": "string"
9385	//     },
9386	//     "name": {
9387	//       "description": "Required. The name of the `WorkerPool` to delete. Format: `projects/{project}/locations/{workerPool}/workerPools/{workerPool}`.",
9388	//       "location": "path",
9389	//       "pattern": "^projects/[^/]+/locations/[^/]+/workerPools/[^/]+$",
9390	//       "required": true,
9391	//       "type": "string"
9392	//     },
9393	//     "validateOnly": {
9394	//       "description": "If set, validate the request and preview the response, but do not actually post it.",
9395	//       "location": "query",
9396	//       "type": "boolean"
9397	//     }
9398	//   },
9399	//   "path": "v1/{+name}",
9400	//   "response": {
9401	//     "$ref": "Operation"
9402	//   },
9403	//   "scopes": [
9404	//     "https://www.googleapis.com/auth/cloud-platform"
9405	//   ]
9406	// }
9407
9408}
9409
9410// method id "cloudbuild.projects.locations.workerPools.get":
9411
9412type ProjectsLocationsWorkerPoolsGetCall struct {
9413	s            *Service
9414	name         string
9415	urlParams_   gensupport.URLParams
9416	ifNoneMatch_ string
9417	ctx_         context.Context
9418	header_      http.Header
9419}
9420
9421// Get: Returns details of a `WorkerPool`.
9422//
9423// - name: The name of the `WorkerPool` to retrieve. Format:
9424//   `projects/{project}/locations/{location}/workerPools/{workerPool}`.
9425func (r *ProjectsLocationsWorkerPoolsService) Get(name string) *ProjectsLocationsWorkerPoolsGetCall {
9426	c := &ProjectsLocationsWorkerPoolsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9427	c.name = name
9428	return c
9429}
9430
9431// Fields allows partial responses to be retrieved. See
9432// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9433// for more information.
9434func (c *ProjectsLocationsWorkerPoolsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkerPoolsGetCall {
9435	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9436	return c
9437}
9438
9439// IfNoneMatch sets the optional parameter which makes the operation
9440// fail if the object's ETag matches the given value. This is useful for
9441// getting updates only after the object has changed since the last
9442// request. Use googleapi.IsNotModified to check whether the response
9443// error from Do is the result of In-None-Match.
9444func (c *ProjectsLocationsWorkerPoolsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkerPoolsGetCall {
9445	c.ifNoneMatch_ = entityTag
9446	return c
9447}
9448
9449// Context sets the context to be used in this call's Do method. Any
9450// pending HTTP request will be aborted if the provided context is
9451// canceled.
9452func (c *ProjectsLocationsWorkerPoolsGetCall) Context(ctx context.Context) *ProjectsLocationsWorkerPoolsGetCall {
9453	c.ctx_ = ctx
9454	return c
9455}
9456
9457// Header returns an http.Header that can be modified by the caller to
9458// add HTTP headers to the request.
9459func (c *ProjectsLocationsWorkerPoolsGetCall) Header() http.Header {
9460	if c.header_ == nil {
9461		c.header_ = make(http.Header)
9462	}
9463	return c.header_
9464}
9465
9466func (c *ProjectsLocationsWorkerPoolsGetCall) doRequest(alt string) (*http.Response, error) {
9467	reqHeaders := make(http.Header)
9468	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
9469	for k, v := range c.header_ {
9470		reqHeaders[k] = v
9471	}
9472	reqHeaders.Set("User-Agent", c.s.userAgent())
9473	if c.ifNoneMatch_ != "" {
9474		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9475	}
9476	var body io.Reader = nil
9477	c.urlParams_.Set("alt", alt)
9478	c.urlParams_.Set("prettyPrint", "false")
9479	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
9480	urls += "?" + c.urlParams_.Encode()
9481	req, err := http.NewRequest("GET", urls, body)
9482	if err != nil {
9483		return nil, err
9484	}
9485	req.Header = reqHeaders
9486	googleapi.Expand(req.URL, map[string]string{
9487		"name": c.name,
9488	})
9489	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9490}
9491
9492// Do executes the "cloudbuild.projects.locations.workerPools.get" call.
9493// Exactly one of *WorkerPool or error will be non-nil. Any non-2xx
9494// status code is an error. Response headers are in either
9495// *WorkerPool.ServerResponse.Header or (if a response was returned at
9496// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9497// to check whether the returned error was because
9498// http.StatusNotModified was returned.
9499func (c *ProjectsLocationsWorkerPoolsGetCall) Do(opts ...googleapi.CallOption) (*WorkerPool, error) {
9500	gensupport.SetOptions(c.urlParams_, opts...)
9501	res, err := c.doRequest("json")
9502	if res != nil && res.StatusCode == http.StatusNotModified {
9503		if res.Body != nil {
9504			res.Body.Close()
9505		}
9506		return nil, &googleapi.Error{
9507			Code:   res.StatusCode,
9508			Header: res.Header,
9509		}
9510	}
9511	if err != nil {
9512		return nil, err
9513	}
9514	defer googleapi.CloseBody(res)
9515	if err := googleapi.CheckResponse(res); err != nil {
9516		return nil, err
9517	}
9518	ret := &WorkerPool{
9519		ServerResponse: googleapi.ServerResponse{
9520			Header:         res.Header,
9521			HTTPStatusCode: res.StatusCode,
9522		},
9523	}
9524	target := &ret
9525	if err := gensupport.DecodeResponse(target, res); err != nil {
9526		return nil, err
9527	}
9528	return ret, nil
9529	// {
9530	//   "description": "Returns details of a `WorkerPool`.",
9531	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workerPools/{workerPoolsId}",
9532	//   "httpMethod": "GET",
9533	//   "id": "cloudbuild.projects.locations.workerPools.get",
9534	//   "parameterOrder": [
9535	//     "name"
9536	//   ],
9537	//   "parameters": {
9538	//     "name": {
9539	//       "description": "Required. The name of the `WorkerPool` to retrieve. Format: `projects/{project}/locations/{location}/workerPools/{workerPool}`.",
9540	//       "location": "path",
9541	//       "pattern": "^projects/[^/]+/locations/[^/]+/workerPools/[^/]+$",
9542	//       "required": true,
9543	//       "type": "string"
9544	//     }
9545	//   },
9546	//   "path": "v1/{+name}",
9547	//   "response": {
9548	//     "$ref": "WorkerPool"
9549	//   },
9550	//   "scopes": [
9551	//     "https://www.googleapis.com/auth/cloud-platform"
9552	//   ]
9553	// }
9554
9555}
9556
9557// method id "cloudbuild.projects.locations.workerPools.list":
9558
9559type ProjectsLocationsWorkerPoolsListCall struct {
9560	s            *Service
9561	parent       string
9562	urlParams_   gensupport.URLParams
9563	ifNoneMatch_ string
9564	ctx_         context.Context
9565	header_      http.Header
9566}
9567
9568// List: Lists `WorkerPool`s.
9569//
9570// - parent: The parent of the collection of `WorkerPools`. Format:
9571//   `projects/{project}/locations/{location}`.
9572func (r *ProjectsLocationsWorkerPoolsService) List(parent string) *ProjectsLocationsWorkerPoolsListCall {
9573	c := &ProjectsLocationsWorkerPoolsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9574	c.parent = parent
9575	return c
9576}
9577
9578// PageSize sets the optional parameter "pageSize": The maximum number
9579// of `WorkerPool`s to return. The service may return fewer than this
9580// value. If omitted, the server will use a sensible default.
9581func (c *ProjectsLocationsWorkerPoolsListCall) PageSize(pageSize int64) *ProjectsLocationsWorkerPoolsListCall {
9582	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
9583	return c
9584}
9585
9586// PageToken sets the optional parameter "pageToken": A page token,
9587// received from a previous `ListWorkerPools` call. Provide this to
9588// retrieve the subsequent page.
9589func (c *ProjectsLocationsWorkerPoolsListCall) PageToken(pageToken string) *ProjectsLocationsWorkerPoolsListCall {
9590	c.urlParams_.Set("pageToken", pageToken)
9591	return c
9592}
9593
9594// Fields allows partial responses to be retrieved. See
9595// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9596// for more information.
9597func (c *ProjectsLocationsWorkerPoolsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkerPoolsListCall {
9598	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9599	return c
9600}
9601
9602// IfNoneMatch sets the optional parameter which makes the operation
9603// fail if the object's ETag matches the given value. This is useful for
9604// getting updates only after the object has changed since the last
9605// request. Use googleapi.IsNotModified to check whether the response
9606// error from Do is the result of In-None-Match.
9607func (c *ProjectsLocationsWorkerPoolsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkerPoolsListCall {
9608	c.ifNoneMatch_ = entityTag
9609	return c
9610}
9611
9612// Context sets the context to be used in this call's Do method. Any
9613// pending HTTP request will be aborted if the provided context is
9614// canceled.
9615func (c *ProjectsLocationsWorkerPoolsListCall) Context(ctx context.Context) *ProjectsLocationsWorkerPoolsListCall {
9616	c.ctx_ = ctx
9617	return c
9618}
9619
9620// Header returns an http.Header that can be modified by the caller to
9621// add HTTP headers to the request.
9622func (c *ProjectsLocationsWorkerPoolsListCall) Header() http.Header {
9623	if c.header_ == nil {
9624		c.header_ = make(http.Header)
9625	}
9626	return c.header_
9627}
9628
9629func (c *ProjectsLocationsWorkerPoolsListCall) doRequest(alt string) (*http.Response, error) {
9630	reqHeaders := make(http.Header)
9631	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
9632	for k, v := range c.header_ {
9633		reqHeaders[k] = v
9634	}
9635	reqHeaders.Set("User-Agent", c.s.userAgent())
9636	if c.ifNoneMatch_ != "" {
9637		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9638	}
9639	var body io.Reader = nil
9640	c.urlParams_.Set("alt", alt)
9641	c.urlParams_.Set("prettyPrint", "false")
9642	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/workerPools")
9643	urls += "?" + c.urlParams_.Encode()
9644	req, err := http.NewRequest("GET", urls, body)
9645	if err != nil {
9646		return nil, err
9647	}
9648	req.Header = reqHeaders
9649	googleapi.Expand(req.URL, map[string]string{
9650		"parent": c.parent,
9651	})
9652	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9653}
9654
9655// Do executes the "cloudbuild.projects.locations.workerPools.list" call.
9656// Exactly one of *ListWorkerPoolsResponse or error will be non-nil. Any
9657// non-2xx status code is an error. Response headers are in either
9658// *ListWorkerPoolsResponse.ServerResponse.Header or (if a response was
9659// returned at all) in error.(*googleapi.Error).Header. Use
9660// googleapi.IsNotModified to check whether the returned error was
9661// because http.StatusNotModified was returned.
9662func (c *ProjectsLocationsWorkerPoolsListCall) Do(opts ...googleapi.CallOption) (*ListWorkerPoolsResponse, error) {
9663	gensupport.SetOptions(c.urlParams_, opts...)
9664	res, err := c.doRequest("json")
9665	if res != nil && res.StatusCode == http.StatusNotModified {
9666		if res.Body != nil {
9667			res.Body.Close()
9668		}
9669		return nil, &googleapi.Error{
9670			Code:   res.StatusCode,
9671			Header: res.Header,
9672		}
9673	}
9674	if err != nil {
9675		return nil, err
9676	}
9677	defer googleapi.CloseBody(res)
9678	if err := googleapi.CheckResponse(res); err != nil {
9679		return nil, err
9680	}
9681	ret := &ListWorkerPoolsResponse{
9682		ServerResponse: googleapi.ServerResponse{
9683			Header:         res.Header,
9684			HTTPStatusCode: res.StatusCode,
9685		},
9686	}
9687	target := &ret
9688	if err := gensupport.DecodeResponse(target, res); err != nil {
9689		return nil, err
9690	}
9691	return ret, nil
9692	// {
9693	//   "description": "Lists `WorkerPool`s.",
9694	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workerPools",
9695	//   "httpMethod": "GET",
9696	//   "id": "cloudbuild.projects.locations.workerPools.list",
9697	//   "parameterOrder": [
9698	//     "parent"
9699	//   ],
9700	//   "parameters": {
9701	//     "pageSize": {
9702	//       "description": "The maximum number of `WorkerPool`s to return. The service may return fewer than this value. If omitted, the server will use a sensible default.",
9703	//       "format": "int32",
9704	//       "location": "query",
9705	//       "type": "integer"
9706	//     },
9707	//     "pageToken": {
9708	//       "description": "A page token, received from a previous `ListWorkerPools` call. Provide this to retrieve the subsequent page.",
9709	//       "location": "query",
9710	//       "type": "string"
9711	//     },
9712	//     "parent": {
9713	//       "description": "Required. The parent of the collection of `WorkerPools`. Format: `projects/{project}/locations/{location}`.",
9714	//       "location": "path",
9715	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
9716	//       "required": true,
9717	//       "type": "string"
9718	//     }
9719	//   },
9720	//   "path": "v1/{+parent}/workerPools",
9721	//   "response": {
9722	//     "$ref": "ListWorkerPoolsResponse"
9723	//   },
9724	//   "scopes": [
9725	//     "https://www.googleapis.com/auth/cloud-platform"
9726	//   ]
9727	// }
9728
9729}
9730
9731// Pages invokes f for each page of results.
9732// A non-nil error returned from f will halt the iteration.
9733// The provided context supersedes any context provided to the Context method.
9734func (c *ProjectsLocationsWorkerPoolsListCall) Pages(ctx context.Context, f func(*ListWorkerPoolsResponse) error) error {
9735	c.ctx_ = ctx
9736	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
9737	for {
9738		x, err := c.Do()
9739		if err != nil {
9740			return err
9741		}
9742		if err := f(x); err != nil {
9743			return err
9744		}
9745		if x.NextPageToken == "" {
9746			return nil
9747		}
9748		c.PageToken(x.NextPageToken)
9749	}
9750}
9751
9752// method id "cloudbuild.projects.locations.workerPools.patch":
9753
9754type ProjectsLocationsWorkerPoolsPatchCall struct {
9755	s          *Service
9756	name       string
9757	workerpool *WorkerPool
9758	urlParams_ gensupport.URLParams
9759	ctx_       context.Context
9760	header_    http.Header
9761}
9762
9763// Patch: Updates a `WorkerPool`.
9764//
9765// - name: Output only. The resource name of the `WorkerPool`, with
9766//   format
9767//   `projects/{project}/locations/{location}/workerPools/{worker_pool}`.
9768//    The value of `{worker_pool}` is provided by `worker_pool_id` in
9769//   `CreateWorkerPool` request and the value of `{location}` is
9770//   determined by the endpoint accessed.
9771func (r *ProjectsLocationsWorkerPoolsService) Patch(name string, workerpool *WorkerPool) *ProjectsLocationsWorkerPoolsPatchCall {
9772	c := &ProjectsLocationsWorkerPoolsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9773	c.name = name
9774	c.workerpool = workerpool
9775	return c
9776}
9777
9778// UpdateMask sets the optional parameter "updateMask": A mask
9779// specifying which fields in `worker_pool` to update.
9780func (c *ProjectsLocationsWorkerPoolsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsWorkerPoolsPatchCall {
9781	c.urlParams_.Set("updateMask", updateMask)
9782	return c
9783}
9784
9785// ValidateOnly sets the optional parameter "validateOnly": If set,
9786// validate the request and preview the response, but do not actually
9787// post it.
9788func (c *ProjectsLocationsWorkerPoolsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsWorkerPoolsPatchCall {
9789	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
9790	return c
9791}
9792
9793// Fields allows partial responses to be retrieved. See
9794// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9795// for more information.
9796func (c *ProjectsLocationsWorkerPoolsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkerPoolsPatchCall {
9797	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9798	return c
9799}
9800
9801// Context sets the context to be used in this call's Do method. Any
9802// pending HTTP request will be aborted if the provided context is
9803// canceled.
9804func (c *ProjectsLocationsWorkerPoolsPatchCall) Context(ctx context.Context) *ProjectsLocationsWorkerPoolsPatchCall {
9805	c.ctx_ = ctx
9806	return c
9807}
9808
9809// Header returns an http.Header that can be modified by the caller to
9810// add HTTP headers to the request.
9811func (c *ProjectsLocationsWorkerPoolsPatchCall) Header() http.Header {
9812	if c.header_ == nil {
9813		c.header_ = make(http.Header)
9814	}
9815	return c.header_
9816}
9817
9818func (c *ProjectsLocationsWorkerPoolsPatchCall) doRequest(alt string) (*http.Response, error) {
9819	reqHeaders := make(http.Header)
9820	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
9821	for k, v := range c.header_ {
9822		reqHeaders[k] = v
9823	}
9824	reqHeaders.Set("User-Agent", c.s.userAgent())
9825	var body io.Reader = nil
9826	body, err := googleapi.WithoutDataWrapper.JSONReader(c.workerpool)
9827	if err != nil {
9828		return nil, err
9829	}
9830	reqHeaders.Set("Content-Type", "application/json")
9831	c.urlParams_.Set("alt", alt)
9832	c.urlParams_.Set("prettyPrint", "false")
9833	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
9834	urls += "?" + c.urlParams_.Encode()
9835	req, err := http.NewRequest("PATCH", urls, body)
9836	if err != nil {
9837		return nil, err
9838	}
9839	req.Header = reqHeaders
9840	googleapi.Expand(req.URL, map[string]string{
9841		"name": c.name,
9842	})
9843	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9844}
9845
9846// Do executes the "cloudbuild.projects.locations.workerPools.patch" call.
9847// Exactly one of *Operation or error will be non-nil. Any non-2xx
9848// status code is an error. Response headers are in either
9849// *Operation.ServerResponse.Header or (if a response was returned at
9850// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9851// to check whether the returned error was because
9852// http.StatusNotModified was returned.
9853func (c *ProjectsLocationsWorkerPoolsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9854	gensupport.SetOptions(c.urlParams_, opts...)
9855	res, err := c.doRequest("json")
9856	if res != nil && res.StatusCode == http.StatusNotModified {
9857		if res.Body != nil {
9858			res.Body.Close()
9859		}
9860		return nil, &googleapi.Error{
9861			Code:   res.StatusCode,
9862			Header: res.Header,
9863		}
9864	}
9865	if err != nil {
9866		return nil, err
9867	}
9868	defer googleapi.CloseBody(res)
9869	if err := googleapi.CheckResponse(res); err != nil {
9870		return nil, err
9871	}
9872	ret := &Operation{
9873		ServerResponse: googleapi.ServerResponse{
9874			Header:         res.Header,
9875			HTTPStatusCode: res.StatusCode,
9876		},
9877	}
9878	target := &ret
9879	if err := gensupport.DecodeResponse(target, res); err != nil {
9880		return nil, err
9881	}
9882	return ret, nil
9883	// {
9884	//   "description": "Updates a `WorkerPool`.",
9885	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workerPools/{workerPoolsId}",
9886	//   "httpMethod": "PATCH",
9887	//   "id": "cloudbuild.projects.locations.workerPools.patch",
9888	//   "parameterOrder": [
9889	//     "name"
9890	//   ],
9891	//   "parameters": {
9892	//     "name": {
9893	//       "description": "Output only. The resource name of the `WorkerPool`, with format `projects/{project}/locations/{location}/workerPools/{worker_pool}`. The value of `{worker_pool}` is provided by `worker_pool_id` in `CreateWorkerPool` request and the value of `{location}` is determined by the endpoint accessed.",
9894	//       "location": "path",
9895	//       "pattern": "^projects/[^/]+/locations/[^/]+/workerPools/[^/]+$",
9896	//       "required": true,
9897	//       "type": "string"
9898	//     },
9899	//     "updateMask": {
9900	//       "description": "A mask specifying which fields in `worker_pool` to update.",
9901	//       "format": "google-fieldmask",
9902	//       "location": "query",
9903	//       "type": "string"
9904	//     },
9905	//     "validateOnly": {
9906	//       "description": "If set, validate the request and preview the response, but do not actually post it.",
9907	//       "location": "query",
9908	//       "type": "boolean"
9909	//     }
9910	//   },
9911	//   "path": "v1/{+name}",
9912	//   "request": {
9913	//     "$ref": "WorkerPool"
9914	//   },
9915	//   "response": {
9916	//     "$ref": "Operation"
9917	//   },
9918	//   "scopes": [
9919	//     "https://www.googleapis.com/auth/cloud-platform"
9920	//   ]
9921	// }
9922
9923}
9924
9925// method id "cloudbuild.projects.triggers.create":
9926
9927type ProjectsTriggersCreateCall struct {
9928	s            *Service
9929	projectId    string
9930	buildtrigger *BuildTrigger
9931	urlParams_   gensupport.URLParams
9932	ctx_         context.Context
9933	header_      http.Header
9934}
9935
9936// Create: Creates a new `BuildTrigger`. This API is experimental.
9937//
9938// - projectId: ID of the project for which to configure automatic
9939//   builds.
9940func (r *ProjectsTriggersService) Create(projectId string, buildtrigger *BuildTrigger) *ProjectsTriggersCreateCall {
9941	c := &ProjectsTriggersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9942	c.projectId = projectId
9943	c.buildtrigger = buildtrigger
9944	return c
9945}
9946
9947// Parent sets the optional parameter "parent": The parent resource
9948// where this trigger will be created. Format:
9949// `projects/{project}/locations/{location}`
9950func (c *ProjectsTriggersCreateCall) Parent(parent string) *ProjectsTriggersCreateCall {
9951	c.urlParams_.Set("parent", parent)
9952	return c
9953}
9954
9955// Fields allows partial responses to be retrieved. See
9956// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9957// for more information.
9958func (c *ProjectsTriggersCreateCall) Fields(s ...googleapi.Field) *ProjectsTriggersCreateCall {
9959	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9960	return c
9961}
9962
9963// Context sets the context to be used in this call's Do method. Any
9964// pending HTTP request will be aborted if the provided context is
9965// canceled.
9966func (c *ProjectsTriggersCreateCall) Context(ctx context.Context) *ProjectsTriggersCreateCall {
9967	c.ctx_ = ctx
9968	return c
9969}
9970
9971// Header returns an http.Header that can be modified by the caller to
9972// add HTTP headers to the request.
9973func (c *ProjectsTriggersCreateCall) Header() http.Header {
9974	if c.header_ == nil {
9975		c.header_ = make(http.Header)
9976	}
9977	return c.header_
9978}
9979
9980func (c *ProjectsTriggersCreateCall) doRequest(alt string) (*http.Response, error) {
9981	reqHeaders := make(http.Header)
9982	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
9983	for k, v := range c.header_ {
9984		reqHeaders[k] = v
9985	}
9986	reqHeaders.Set("User-Agent", c.s.userAgent())
9987	var body io.Reader = nil
9988	body, err := googleapi.WithoutDataWrapper.JSONReader(c.buildtrigger)
9989	if err != nil {
9990		return nil, err
9991	}
9992	reqHeaders.Set("Content-Type", "application/json")
9993	c.urlParams_.Set("alt", alt)
9994	c.urlParams_.Set("prettyPrint", "false")
9995	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/triggers")
9996	urls += "?" + c.urlParams_.Encode()
9997	req, err := http.NewRequest("POST", urls, body)
9998	if err != nil {
9999		return nil, err
10000	}
10001	req.Header = reqHeaders
10002	googleapi.Expand(req.URL, map[string]string{
10003		"projectId": c.projectId,
10004	})
10005	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10006}
10007
10008// Do executes the "cloudbuild.projects.triggers.create" call.
10009// Exactly one of *BuildTrigger or error will be non-nil. Any non-2xx
10010// status code is an error. Response headers are in either
10011// *BuildTrigger.ServerResponse.Header or (if a response was returned at
10012// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10013// to check whether the returned error was because
10014// http.StatusNotModified was returned.
10015func (c *ProjectsTriggersCreateCall) Do(opts ...googleapi.CallOption) (*BuildTrigger, error) {
10016	gensupport.SetOptions(c.urlParams_, opts...)
10017	res, err := c.doRequest("json")
10018	if res != nil && res.StatusCode == http.StatusNotModified {
10019		if res.Body != nil {
10020			res.Body.Close()
10021		}
10022		return nil, &googleapi.Error{
10023			Code:   res.StatusCode,
10024			Header: res.Header,
10025		}
10026	}
10027	if err != nil {
10028		return nil, err
10029	}
10030	defer googleapi.CloseBody(res)
10031	if err := googleapi.CheckResponse(res); err != nil {
10032		return nil, err
10033	}
10034	ret := &BuildTrigger{
10035		ServerResponse: googleapi.ServerResponse{
10036			Header:         res.Header,
10037			HTTPStatusCode: res.StatusCode,
10038		},
10039	}
10040	target := &ret
10041	if err := gensupport.DecodeResponse(target, res); err != nil {
10042		return nil, err
10043	}
10044	return ret, nil
10045	// {
10046	//   "description": "Creates a new `BuildTrigger`. This API is experimental.",
10047	//   "flatPath": "v1/projects/{projectId}/triggers",
10048	//   "httpMethod": "POST",
10049	//   "id": "cloudbuild.projects.triggers.create",
10050	//   "parameterOrder": [
10051	//     "projectId"
10052	//   ],
10053	//   "parameters": {
10054	//     "parent": {
10055	//       "description": "The parent resource where this trigger will be created. Format: `projects/{project}/locations/{location}`",
10056	//       "location": "query",
10057	//       "type": "string"
10058	//     },
10059	//     "projectId": {
10060	//       "description": "Required. ID of the project for which to configure automatic builds.",
10061	//       "location": "path",
10062	//       "required": true,
10063	//       "type": "string"
10064	//     }
10065	//   },
10066	//   "path": "v1/projects/{projectId}/triggers",
10067	//   "request": {
10068	//     "$ref": "BuildTrigger"
10069	//   },
10070	//   "response": {
10071	//     "$ref": "BuildTrigger"
10072	//   },
10073	//   "scopes": [
10074	//     "https://www.googleapis.com/auth/cloud-platform"
10075	//   ]
10076	// }
10077
10078}
10079
10080// method id "cloudbuild.projects.triggers.delete":
10081
10082type ProjectsTriggersDeleteCall struct {
10083	s          *Service
10084	projectId  string
10085	triggerId  string
10086	urlParams_ gensupport.URLParams
10087	ctx_       context.Context
10088	header_    http.Header
10089}
10090
10091// Delete: Deletes a `BuildTrigger` by its project ID and trigger ID.
10092// This API is experimental.
10093//
10094// - projectId: ID of the project that owns the trigger.
10095// - triggerId: ID of the `BuildTrigger` to delete.
10096func (r *ProjectsTriggersService) Delete(projectId string, triggerId string) *ProjectsTriggersDeleteCall {
10097	c := &ProjectsTriggersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10098	c.projectId = projectId
10099	c.triggerId = triggerId
10100	return c
10101}
10102
10103// Name sets the optional parameter "name": The name of the `Trigger` to
10104// delete. Format:
10105// `projects/{project}/locations/{location}/triggers/{trigger}`
10106func (c *ProjectsTriggersDeleteCall) Name(name string) *ProjectsTriggersDeleteCall {
10107	c.urlParams_.Set("name", name)
10108	return c
10109}
10110
10111// Fields allows partial responses to be retrieved. See
10112// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10113// for more information.
10114func (c *ProjectsTriggersDeleteCall) Fields(s ...googleapi.Field) *ProjectsTriggersDeleteCall {
10115	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10116	return c
10117}
10118
10119// Context sets the context to be used in this call's Do method. Any
10120// pending HTTP request will be aborted if the provided context is
10121// canceled.
10122func (c *ProjectsTriggersDeleteCall) Context(ctx context.Context) *ProjectsTriggersDeleteCall {
10123	c.ctx_ = ctx
10124	return c
10125}
10126
10127// Header returns an http.Header that can be modified by the caller to
10128// add HTTP headers to the request.
10129func (c *ProjectsTriggersDeleteCall) Header() http.Header {
10130	if c.header_ == nil {
10131		c.header_ = make(http.Header)
10132	}
10133	return c.header_
10134}
10135
10136func (c *ProjectsTriggersDeleteCall) doRequest(alt string) (*http.Response, error) {
10137	reqHeaders := make(http.Header)
10138	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
10139	for k, v := range c.header_ {
10140		reqHeaders[k] = v
10141	}
10142	reqHeaders.Set("User-Agent", c.s.userAgent())
10143	var body io.Reader = nil
10144	c.urlParams_.Set("alt", alt)
10145	c.urlParams_.Set("prettyPrint", "false")
10146	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/triggers/{triggerId}")
10147	urls += "?" + c.urlParams_.Encode()
10148	req, err := http.NewRequest("DELETE", urls, body)
10149	if err != nil {
10150		return nil, err
10151	}
10152	req.Header = reqHeaders
10153	googleapi.Expand(req.URL, map[string]string{
10154		"projectId": c.projectId,
10155		"triggerId": c.triggerId,
10156	})
10157	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10158}
10159
10160// Do executes the "cloudbuild.projects.triggers.delete" call.
10161// Exactly one of *Empty or error will be non-nil. Any non-2xx status
10162// code is an error. Response headers are in either
10163// *Empty.ServerResponse.Header or (if a response was returned at all)
10164// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
10165// check whether the returned error was because http.StatusNotModified
10166// was returned.
10167func (c *ProjectsTriggersDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
10168	gensupport.SetOptions(c.urlParams_, opts...)
10169	res, err := c.doRequest("json")
10170	if res != nil && res.StatusCode == http.StatusNotModified {
10171		if res.Body != nil {
10172			res.Body.Close()
10173		}
10174		return nil, &googleapi.Error{
10175			Code:   res.StatusCode,
10176			Header: res.Header,
10177		}
10178	}
10179	if err != nil {
10180		return nil, err
10181	}
10182	defer googleapi.CloseBody(res)
10183	if err := googleapi.CheckResponse(res); err != nil {
10184		return nil, err
10185	}
10186	ret := &Empty{
10187		ServerResponse: googleapi.ServerResponse{
10188			Header:         res.Header,
10189			HTTPStatusCode: res.StatusCode,
10190		},
10191	}
10192	target := &ret
10193	if err := gensupport.DecodeResponse(target, res); err != nil {
10194		return nil, err
10195	}
10196	return ret, nil
10197	// {
10198	//   "description": "Deletes a `BuildTrigger` by its project ID and trigger ID. This API is experimental.",
10199	//   "flatPath": "v1/projects/{projectId}/triggers/{triggerId}",
10200	//   "httpMethod": "DELETE",
10201	//   "id": "cloudbuild.projects.triggers.delete",
10202	//   "parameterOrder": [
10203	//     "projectId",
10204	//     "triggerId"
10205	//   ],
10206	//   "parameters": {
10207	//     "name": {
10208	//       "description": "The name of the `Trigger` to delete. Format: `projects/{project}/locations/{location}/triggers/{trigger}`",
10209	//       "location": "query",
10210	//       "type": "string"
10211	//     },
10212	//     "projectId": {
10213	//       "description": "Required. ID of the project that owns the trigger.",
10214	//       "location": "path",
10215	//       "required": true,
10216	//       "type": "string"
10217	//     },
10218	//     "triggerId": {
10219	//       "description": "Required. ID of the `BuildTrigger` to delete.",
10220	//       "location": "path",
10221	//       "required": true,
10222	//       "type": "string"
10223	//     }
10224	//   },
10225	//   "path": "v1/projects/{projectId}/triggers/{triggerId}",
10226	//   "response": {
10227	//     "$ref": "Empty"
10228	//   },
10229	//   "scopes": [
10230	//     "https://www.googleapis.com/auth/cloud-platform"
10231	//   ]
10232	// }
10233
10234}
10235
10236// method id "cloudbuild.projects.triggers.get":
10237
10238type ProjectsTriggersGetCall struct {
10239	s            *Service
10240	projectId    string
10241	triggerId    string
10242	urlParams_   gensupport.URLParams
10243	ifNoneMatch_ string
10244	ctx_         context.Context
10245	header_      http.Header
10246}
10247
10248// Get: Returns information about a `BuildTrigger`. This API is
10249// experimental.
10250//
10251// - projectId: ID of the project that owns the trigger.
10252// - triggerId: Identifier (`id` or `name`) of the `BuildTrigger` to
10253//   get.
10254func (r *ProjectsTriggersService) Get(projectId string, triggerId string) *ProjectsTriggersGetCall {
10255	c := &ProjectsTriggersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10256	c.projectId = projectId
10257	c.triggerId = triggerId
10258	return c
10259}
10260
10261// Name sets the optional parameter "name": The name of the `Trigger` to
10262// retrieve. Format:
10263// `projects/{project}/locations/{location}/triggers/{trigger}`
10264func (c *ProjectsTriggersGetCall) Name(name string) *ProjectsTriggersGetCall {
10265	c.urlParams_.Set("name", name)
10266	return c
10267}
10268
10269// Fields allows partial responses to be retrieved. See
10270// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10271// for more information.
10272func (c *ProjectsTriggersGetCall) Fields(s ...googleapi.Field) *ProjectsTriggersGetCall {
10273	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10274	return c
10275}
10276
10277// IfNoneMatch sets the optional parameter which makes the operation
10278// fail if the object's ETag matches the given value. This is useful for
10279// getting updates only after the object has changed since the last
10280// request. Use googleapi.IsNotModified to check whether the response
10281// error from Do is the result of In-None-Match.
10282func (c *ProjectsTriggersGetCall) IfNoneMatch(entityTag string) *ProjectsTriggersGetCall {
10283	c.ifNoneMatch_ = entityTag
10284	return c
10285}
10286
10287// Context sets the context to be used in this call's Do method. Any
10288// pending HTTP request will be aborted if the provided context is
10289// canceled.
10290func (c *ProjectsTriggersGetCall) Context(ctx context.Context) *ProjectsTriggersGetCall {
10291	c.ctx_ = ctx
10292	return c
10293}
10294
10295// Header returns an http.Header that can be modified by the caller to
10296// add HTTP headers to the request.
10297func (c *ProjectsTriggersGetCall) Header() http.Header {
10298	if c.header_ == nil {
10299		c.header_ = make(http.Header)
10300	}
10301	return c.header_
10302}
10303
10304func (c *ProjectsTriggersGetCall) doRequest(alt string) (*http.Response, error) {
10305	reqHeaders := make(http.Header)
10306	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
10307	for k, v := range c.header_ {
10308		reqHeaders[k] = v
10309	}
10310	reqHeaders.Set("User-Agent", c.s.userAgent())
10311	if c.ifNoneMatch_ != "" {
10312		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10313	}
10314	var body io.Reader = nil
10315	c.urlParams_.Set("alt", alt)
10316	c.urlParams_.Set("prettyPrint", "false")
10317	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/triggers/{triggerId}")
10318	urls += "?" + c.urlParams_.Encode()
10319	req, err := http.NewRequest("GET", urls, body)
10320	if err != nil {
10321		return nil, err
10322	}
10323	req.Header = reqHeaders
10324	googleapi.Expand(req.URL, map[string]string{
10325		"projectId": c.projectId,
10326		"triggerId": c.triggerId,
10327	})
10328	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10329}
10330
10331// Do executes the "cloudbuild.projects.triggers.get" call.
10332// Exactly one of *BuildTrigger or error will be non-nil. Any non-2xx
10333// status code is an error. Response headers are in either
10334// *BuildTrigger.ServerResponse.Header or (if a response was returned at
10335// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10336// to check whether the returned error was because
10337// http.StatusNotModified was returned.
10338func (c *ProjectsTriggersGetCall) Do(opts ...googleapi.CallOption) (*BuildTrigger, error) {
10339	gensupport.SetOptions(c.urlParams_, opts...)
10340	res, err := c.doRequest("json")
10341	if res != nil && res.StatusCode == http.StatusNotModified {
10342		if res.Body != nil {
10343			res.Body.Close()
10344		}
10345		return nil, &googleapi.Error{
10346			Code:   res.StatusCode,
10347			Header: res.Header,
10348		}
10349	}
10350	if err != nil {
10351		return nil, err
10352	}
10353	defer googleapi.CloseBody(res)
10354	if err := googleapi.CheckResponse(res); err != nil {
10355		return nil, err
10356	}
10357	ret := &BuildTrigger{
10358		ServerResponse: googleapi.ServerResponse{
10359			Header:         res.Header,
10360			HTTPStatusCode: res.StatusCode,
10361		},
10362	}
10363	target := &ret
10364	if err := gensupport.DecodeResponse(target, res); err != nil {
10365		return nil, err
10366	}
10367	return ret, nil
10368	// {
10369	//   "description": "Returns information about a `BuildTrigger`. This API is experimental.",
10370	//   "flatPath": "v1/projects/{projectId}/triggers/{triggerId}",
10371	//   "httpMethod": "GET",
10372	//   "id": "cloudbuild.projects.triggers.get",
10373	//   "parameterOrder": [
10374	//     "projectId",
10375	//     "triggerId"
10376	//   ],
10377	//   "parameters": {
10378	//     "name": {
10379	//       "description": "The name of the `Trigger` to retrieve. Format: `projects/{project}/locations/{location}/triggers/{trigger}`",
10380	//       "location": "query",
10381	//       "type": "string"
10382	//     },
10383	//     "projectId": {
10384	//       "description": "Required. ID of the project that owns the trigger.",
10385	//       "location": "path",
10386	//       "required": true,
10387	//       "type": "string"
10388	//     },
10389	//     "triggerId": {
10390	//       "description": "Required. Identifier (`id` or `name`) of the `BuildTrigger` to get.",
10391	//       "location": "path",
10392	//       "required": true,
10393	//       "type": "string"
10394	//     }
10395	//   },
10396	//   "path": "v1/projects/{projectId}/triggers/{triggerId}",
10397	//   "response": {
10398	//     "$ref": "BuildTrigger"
10399	//   },
10400	//   "scopes": [
10401	//     "https://www.googleapis.com/auth/cloud-platform"
10402	//   ]
10403	// }
10404
10405}
10406
10407// method id "cloudbuild.projects.triggers.list":
10408
10409type ProjectsTriggersListCall struct {
10410	s            *Service
10411	projectId    string
10412	urlParams_   gensupport.URLParams
10413	ifNoneMatch_ string
10414	ctx_         context.Context
10415	header_      http.Header
10416}
10417
10418// List: Lists existing `BuildTrigger`s. This API is experimental.
10419//
10420// - projectId: ID of the project for which to list BuildTriggers.
10421func (r *ProjectsTriggersService) List(projectId string) *ProjectsTriggersListCall {
10422	c := &ProjectsTriggersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10423	c.projectId = projectId
10424	return c
10425}
10426
10427// PageSize sets the optional parameter "pageSize": Number of results to
10428// return in the list.
10429func (c *ProjectsTriggersListCall) PageSize(pageSize int64) *ProjectsTriggersListCall {
10430	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
10431	return c
10432}
10433
10434// PageToken sets the optional parameter "pageToken": Token to provide
10435// to skip to a particular spot in the list.
10436func (c *ProjectsTriggersListCall) PageToken(pageToken string) *ProjectsTriggersListCall {
10437	c.urlParams_.Set("pageToken", pageToken)
10438	return c
10439}
10440
10441// Parent sets the optional parameter "parent": The parent of the
10442// collection of `Triggers`. Format:
10443// `projects/{project}/locations/{location}`
10444func (c *ProjectsTriggersListCall) Parent(parent string) *ProjectsTriggersListCall {
10445	c.urlParams_.Set("parent", parent)
10446	return c
10447}
10448
10449// Fields allows partial responses to be retrieved. See
10450// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10451// for more information.
10452func (c *ProjectsTriggersListCall) Fields(s ...googleapi.Field) *ProjectsTriggersListCall {
10453	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10454	return c
10455}
10456
10457// IfNoneMatch sets the optional parameter which makes the operation
10458// fail if the object's ETag matches the given value. This is useful for
10459// getting updates only after the object has changed since the last
10460// request. Use googleapi.IsNotModified to check whether the response
10461// error from Do is the result of In-None-Match.
10462func (c *ProjectsTriggersListCall) IfNoneMatch(entityTag string) *ProjectsTriggersListCall {
10463	c.ifNoneMatch_ = entityTag
10464	return c
10465}
10466
10467// Context sets the context to be used in this call's Do method. Any
10468// pending HTTP request will be aborted if the provided context is
10469// canceled.
10470func (c *ProjectsTriggersListCall) Context(ctx context.Context) *ProjectsTriggersListCall {
10471	c.ctx_ = ctx
10472	return c
10473}
10474
10475// Header returns an http.Header that can be modified by the caller to
10476// add HTTP headers to the request.
10477func (c *ProjectsTriggersListCall) Header() http.Header {
10478	if c.header_ == nil {
10479		c.header_ = make(http.Header)
10480	}
10481	return c.header_
10482}
10483
10484func (c *ProjectsTriggersListCall) doRequest(alt string) (*http.Response, error) {
10485	reqHeaders := make(http.Header)
10486	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
10487	for k, v := range c.header_ {
10488		reqHeaders[k] = v
10489	}
10490	reqHeaders.Set("User-Agent", c.s.userAgent())
10491	if c.ifNoneMatch_ != "" {
10492		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10493	}
10494	var body io.Reader = nil
10495	c.urlParams_.Set("alt", alt)
10496	c.urlParams_.Set("prettyPrint", "false")
10497	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/triggers")
10498	urls += "?" + c.urlParams_.Encode()
10499	req, err := http.NewRequest("GET", urls, body)
10500	if err != nil {
10501		return nil, err
10502	}
10503	req.Header = reqHeaders
10504	googleapi.Expand(req.URL, map[string]string{
10505		"projectId": c.projectId,
10506	})
10507	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10508}
10509
10510// Do executes the "cloudbuild.projects.triggers.list" call.
10511// Exactly one of *ListBuildTriggersResponse or error will be non-nil.
10512// Any non-2xx status code is an error. Response headers are in either
10513// *ListBuildTriggersResponse.ServerResponse.Header or (if a response
10514// was returned at all) in error.(*googleapi.Error).Header. Use
10515// googleapi.IsNotModified to check whether the returned error was
10516// because http.StatusNotModified was returned.
10517func (c *ProjectsTriggersListCall) Do(opts ...googleapi.CallOption) (*ListBuildTriggersResponse, error) {
10518	gensupport.SetOptions(c.urlParams_, opts...)
10519	res, err := c.doRequest("json")
10520	if res != nil && res.StatusCode == http.StatusNotModified {
10521		if res.Body != nil {
10522			res.Body.Close()
10523		}
10524		return nil, &googleapi.Error{
10525			Code:   res.StatusCode,
10526			Header: res.Header,
10527		}
10528	}
10529	if err != nil {
10530		return nil, err
10531	}
10532	defer googleapi.CloseBody(res)
10533	if err := googleapi.CheckResponse(res); err != nil {
10534		return nil, err
10535	}
10536	ret := &ListBuildTriggersResponse{
10537		ServerResponse: googleapi.ServerResponse{
10538			Header:         res.Header,
10539			HTTPStatusCode: res.StatusCode,
10540		},
10541	}
10542	target := &ret
10543	if err := gensupport.DecodeResponse(target, res); err != nil {
10544		return nil, err
10545	}
10546	return ret, nil
10547	// {
10548	//   "description": "Lists existing `BuildTrigger`s. This API is experimental.",
10549	//   "flatPath": "v1/projects/{projectId}/triggers",
10550	//   "httpMethod": "GET",
10551	//   "id": "cloudbuild.projects.triggers.list",
10552	//   "parameterOrder": [
10553	//     "projectId"
10554	//   ],
10555	//   "parameters": {
10556	//     "pageSize": {
10557	//       "description": "Number of results to return in the list.",
10558	//       "format": "int32",
10559	//       "location": "query",
10560	//       "type": "integer"
10561	//     },
10562	//     "pageToken": {
10563	//       "description": "Token to provide to skip to a particular spot in the list.",
10564	//       "location": "query",
10565	//       "type": "string"
10566	//     },
10567	//     "parent": {
10568	//       "description": "The parent of the collection of `Triggers`. Format: `projects/{project}/locations/{location}`",
10569	//       "location": "query",
10570	//       "type": "string"
10571	//     },
10572	//     "projectId": {
10573	//       "description": "Required. ID of the project for which to list BuildTriggers.",
10574	//       "location": "path",
10575	//       "required": true,
10576	//       "type": "string"
10577	//     }
10578	//   },
10579	//   "path": "v1/projects/{projectId}/triggers",
10580	//   "response": {
10581	//     "$ref": "ListBuildTriggersResponse"
10582	//   },
10583	//   "scopes": [
10584	//     "https://www.googleapis.com/auth/cloud-platform"
10585	//   ]
10586	// }
10587
10588}
10589
10590// Pages invokes f for each page of results.
10591// A non-nil error returned from f will halt the iteration.
10592// The provided context supersedes any context provided to the Context method.
10593func (c *ProjectsTriggersListCall) Pages(ctx context.Context, f func(*ListBuildTriggersResponse) error) error {
10594	c.ctx_ = ctx
10595	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
10596	for {
10597		x, err := c.Do()
10598		if err != nil {
10599			return err
10600		}
10601		if err := f(x); err != nil {
10602			return err
10603		}
10604		if x.NextPageToken == "" {
10605			return nil
10606		}
10607		c.PageToken(x.NextPageToken)
10608	}
10609}
10610
10611// method id "cloudbuild.projects.triggers.patch":
10612
10613type ProjectsTriggersPatchCall struct {
10614	s            *Service
10615	projectId    string
10616	triggerId    string
10617	buildtrigger *BuildTrigger
10618	urlParams_   gensupport.URLParams
10619	ctx_         context.Context
10620	header_      http.Header
10621}
10622
10623// Patch: Updates a `BuildTrigger` by its project ID and trigger ID.
10624// This API is experimental.
10625//
10626// - projectId: ID of the project that owns the trigger.
10627// - triggerId: ID of the `BuildTrigger` to update.
10628func (r *ProjectsTriggersService) Patch(projectId string, triggerId string, buildtrigger *BuildTrigger) *ProjectsTriggersPatchCall {
10629	c := &ProjectsTriggersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10630	c.projectId = projectId
10631	c.triggerId = triggerId
10632	c.buildtrigger = buildtrigger
10633	return c
10634}
10635
10636// Fields allows partial responses to be retrieved. See
10637// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10638// for more information.
10639func (c *ProjectsTriggersPatchCall) Fields(s ...googleapi.Field) *ProjectsTriggersPatchCall {
10640	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10641	return c
10642}
10643
10644// Context sets the context to be used in this call's Do method. Any
10645// pending HTTP request will be aborted if the provided context is
10646// canceled.
10647func (c *ProjectsTriggersPatchCall) Context(ctx context.Context) *ProjectsTriggersPatchCall {
10648	c.ctx_ = ctx
10649	return c
10650}
10651
10652// Header returns an http.Header that can be modified by the caller to
10653// add HTTP headers to the request.
10654func (c *ProjectsTriggersPatchCall) Header() http.Header {
10655	if c.header_ == nil {
10656		c.header_ = make(http.Header)
10657	}
10658	return c.header_
10659}
10660
10661func (c *ProjectsTriggersPatchCall) doRequest(alt string) (*http.Response, error) {
10662	reqHeaders := make(http.Header)
10663	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
10664	for k, v := range c.header_ {
10665		reqHeaders[k] = v
10666	}
10667	reqHeaders.Set("User-Agent", c.s.userAgent())
10668	var body io.Reader = nil
10669	body, err := googleapi.WithoutDataWrapper.JSONReader(c.buildtrigger)
10670	if err != nil {
10671		return nil, err
10672	}
10673	reqHeaders.Set("Content-Type", "application/json")
10674	c.urlParams_.Set("alt", alt)
10675	c.urlParams_.Set("prettyPrint", "false")
10676	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/triggers/{triggerId}")
10677	urls += "?" + c.urlParams_.Encode()
10678	req, err := http.NewRequest("PATCH", urls, body)
10679	if err != nil {
10680		return nil, err
10681	}
10682	req.Header = reqHeaders
10683	googleapi.Expand(req.URL, map[string]string{
10684		"projectId": c.projectId,
10685		"triggerId": c.triggerId,
10686	})
10687	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10688}
10689
10690// Do executes the "cloudbuild.projects.triggers.patch" call.
10691// Exactly one of *BuildTrigger or error will be non-nil. Any non-2xx
10692// status code is an error. Response headers are in either
10693// *BuildTrigger.ServerResponse.Header or (if a response was returned at
10694// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10695// to check whether the returned error was because
10696// http.StatusNotModified was returned.
10697func (c *ProjectsTriggersPatchCall) Do(opts ...googleapi.CallOption) (*BuildTrigger, error) {
10698	gensupport.SetOptions(c.urlParams_, opts...)
10699	res, err := c.doRequest("json")
10700	if res != nil && res.StatusCode == http.StatusNotModified {
10701		if res.Body != nil {
10702			res.Body.Close()
10703		}
10704		return nil, &googleapi.Error{
10705			Code:   res.StatusCode,
10706			Header: res.Header,
10707		}
10708	}
10709	if err != nil {
10710		return nil, err
10711	}
10712	defer googleapi.CloseBody(res)
10713	if err := googleapi.CheckResponse(res); err != nil {
10714		return nil, err
10715	}
10716	ret := &BuildTrigger{
10717		ServerResponse: googleapi.ServerResponse{
10718			Header:         res.Header,
10719			HTTPStatusCode: res.StatusCode,
10720		},
10721	}
10722	target := &ret
10723	if err := gensupport.DecodeResponse(target, res); err != nil {
10724		return nil, err
10725	}
10726	return ret, nil
10727	// {
10728	//   "description": "Updates a `BuildTrigger` by its project ID and trigger ID. This API is experimental.",
10729	//   "flatPath": "v1/projects/{projectId}/triggers/{triggerId}",
10730	//   "httpMethod": "PATCH",
10731	//   "id": "cloudbuild.projects.triggers.patch",
10732	//   "parameterOrder": [
10733	//     "projectId",
10734	//     "triggerId"
10735	//   ],
10736	//   "parameters": {
10737	//     "projectId": {
10738	//       "description": "Required. ID of the project that owns the trigger.",
10739	//       "location": "path",
10740	//       "required": true,
10741	//       "type": "string"
10742	//     },
10743	//     "triggerId": {
10744	//       "description": "Required. ID of the `BuildTrigger` to update.",
10745	//       "location": "path",
10746	//       "required": true,
10747	//       "type": "string"
10748	//     }
10749	//   },
10750	//   "path": "v1/projects/{projectId}/triggers/{triggerId}",
10751	//   "request": {
10752	//     "$ref": "BuildTrigger"
10753	//   },
10754	//   "response": {
10755	//     "$ref": "BuildTrigger"
10756	//   },
10757	//   "scopes": [
10758	//     "https://www.googleapis.com/auth/cloud-platform"
10759	//   ]
10760	// }
10761
10762}
10763
10764// method id "cloudbuild.projects.triggers.run":
10765
10766type ProjectsTriggersRunCall struct {
10767	s          *Service
10768	projectId  string
10769	triggerId  string
10770	reposource *RepoSource
10771	urlParams_ gensupport.URLParams
10772	ctx_       context.Context
10773	header_    http.Header
10774}
10775
10776// Run: Runs a `BuildTrigger` at a particular source revision.
10777//
10778// - projectId: ID of the project.
10779// - triggerId: ID of the trigger.
10780func (r *ProjectsTriggersService) Run(projectId string, triggerId string, reposource *RepoSource) *ProjectsTriggersRunCall {
10781	c := &ProjectsTriggersRunCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10782	c.projectId = projectId
10783	c.triggerId = triggerId
10784	c.reposource = reposource
10785	return c
10786}
10787
10788// Name sets the optional parameter "name": The name of the `Trigger` to
10789// run. Format:
10790// `projects/{project}/locations/{location}/triggers/{trigger}`
10791func (c *ProjectsTriggersRunCall) Name(name string) *ProjectsTriggersRunCall {
10792	c.urlParams_.Set("name", name)
10793	return c
10794}
10795
10796// Fields allows partial responses to be retrieved. See
10797// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10798// for more information.
10799func (c *ProjectsTriggersRunCall) Fields(s ...googleapi.Field) *ProjectsTriggersRunCall {
10800	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10801	return c
10802}
10803
10804// Context sets the context to be used in this call's Do method. Any
10805// pending HTTP request will be aborted if the provided context is
10806// canceled.
10807func (c *ProjectsTriggersRunCall) Context(ctx context.Context) *ProjectsTriggersRunCall {
10808	c.ctx_ = ctx
10809	return c
10810}
10811
10812// Header returns an http.Header that can be modified by the caller to
10813// add HTTP headers to the request.
10814func (c *ProjectsTriggersRunCall) Header() http.Header {
10815	if c.header_ == nil {
10816		c.header_ = make(http.Header)
10817	}
10818	return c.header_
10819}
10820
10821func (c *ProjectsTriggersRunCall) doRequest(alt string) (*http.Response, error) {
10822	reqHeaders := make(http.Header)
10823	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
10824	for k, v := range c.header_ {
10825		reqHeaders[k] = v
10826	}
10827	reqHeaders.Set("User-Agent", c.s.userAgent())
10828	var body io.Reader = nil
10829	body, err := googleapi.WithoutDataWrapper.JSONReader(c.reposource)
10830	if err != nil {
10831		return nil, err
10832	}
10833	reqHeaders.Set("Content-Type", "application/json")
10834	c.urlParams_.Set("alt", alt)
10835	c.urlParams_.Set("prettyPrint", "false")
10836	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/triggers/{triggerId}:run")
10837	urls += "?" + c.urlParams_.Encode()
10838	req, err := http.NewRequest("POST", urls, body)
10839	if err != nil {
10840		return nil, err
10841	}
10842	req.Header = reqHeaders
10843	googleapi.Expand(req.URL, map[string]string{
10844		"projectId": c.projectId,
10845		"triggerId": c.triggerId,
10846	})
10847	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10848}
10849
10850// Do executes the "cloudbuild.projects.triggers.run" call.
10851// Exactly one of *Operation or error will be non-nil. Any non-2xx
10852// status code is an error. Response headers are in either
10853// *Operation.ServerResponse.Header or (if a response was returned at
10854// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10855// to check whether the returned error was because
10856// http.StatusNotModified was returned.
10857func (c *ProjectsTriggersRunCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10858	gensupport.SetOptions(c.urlParams_, opts...)
10859	res, err := c.doRequest("json")
10860	if res != nil && res.StatusCode == http.StatusNotModified {
10861		if res.Body != nil {
10862			res.Body.Close()
10863		}
10864		return nil, &googleapi.Error{
10865			Code:   res.StatusCode,
10866			Header: res.Header,
10867		}
10868	}
10869	if err != nil {
10870		return nil, err
10871	}
10872	defer googleapi.CloseBody(res)
10873	if err := googleapi.CheckResponse(res); err != nil {
10874		return nil, err
10875	}
10876	ret := &Operation{
10877		ServerResponse: googleapi.ServerResponse{
10878			Header:         res.Header,
10879			HTTPStatusCode: res.StatusCode,
10880		},
10881	}
10882	target := &ret
10883	if err := gensupport.DecodeResponse(target, res); err != nil {
10884		return nil, err
10885	}
10886	return ret, nil
10887	// {
10888	//   "description": "Runs a `BuildTrigger` at a particular source revision.",
10889	//   "flatPath": "v1/projects/{projectId}/triggers/{triggerId}:run",
10890	//   "httpMethod": "POST",
10891	//   "id": "cloudbuild.projects.triggers.run",
10892	//   "parameterOrder": [
10893	//     "projectId",
10894	//     "triggerId"
10895	//   ],
10896	//   "parameters": {
10897	//     "name": {
10898	//       "description": "The name of the `Trigger` to run. Format: `projects/{project}/locations/{location}/triggers/{trigger}`",
10899	//       "location": "query",
10900	//       "type": "string"
10901	//     },
10902	//     "projectId": {
10903	//       "description": "Required. ID of the project.",
10904	//       "location": "path",
10905	//       "required": true,
10906	//       "type": "string"
10907	//     },
10908	//     "triggerId": {
10909	//       "description": "Required. ID of the trigger.",
10910	//       "location": "path",
10911	//       "required": true,
10912	//       "type": "string"
10913	//     }
10914	//   },
10915	//   "path": "v1/projects/{projectId}/triggers/{triggerId}:run",
10916	//   "request": {
10917	//     "$ref": "RepoSource"
10918	//   },
10919	//   "response": {
10920	//     "$ref": "Operation"
10921	//   },
10922	//   "scopes": [
10923	//     "https://www.googleapis.com/auth/cloud-platform"
10924	//   ]
10925	// }
10926
10927}
10928
10929// method id "cloudbuild.projects.triggers.webhook":
10930
10931type ProjectsTriggersWebhookCall struct {
10932	s          *Service
10933	projectId  string
10934	trigger    string
10935	httpbody   *HttpBody
10936	urlParams_ gensupport.URLParams
10937	ctx_       context.Context
10938	header_    http.Header
10939}
10940
10941// Webhook: ReceiveTriggerWebhook [Experimental] is called when the API
10942// receives a webhook request targeted at a specific trigger.
10943//
10944// - projectId: Project in which the specified trigger lives.
10945// - trigger: Name of the trigger to run the payload against.
10946func (r *ProjectsTriggersService) Webhook(projectId string, trigger string, httpbody *HttpBody) *ProjectsTriggersWebhookCall {
10947	c := &ProjectsTriggersWebhookCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10948	c.projectId = projectId
10949	c.trigger = trigger
10950	c.httpbody = httpbody
10951	return c
10952}
10953
10954// Name sets the optional parameter "name": The name of the
10955// `ReceiveTriggerWebhook` to retrieve. Format:
10956// `projects/{project}/locations/{location}/triggers/{trigger}`
10957func (c *ProjectsTriggersWebhookCall) Name(name string) *ProjectsTriggersWebhookCall {
10958	c.urlParams_.Set("name", name)
10959	return c
10960}
10961
10962// Secret sets the optional parameter "secret": Secret token used for
10963// authorization if an OAuth token isn't provided.
10964func (c *ProjectsTriggersWebhookCall) Secret(secret string) *ProjectsTriggersWebhookCall {
10965	c.urlParams_.Set("secret", secret)
10966	return c
10967}
10968
10969// Fields allows partial responses to be retrieved. See
10970// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10971// for more information.
10972func (c *ProjectsTriggersWebhookCall) Fields(s ...googleapi.Field) *ProjectsTriggersWebhookCall {
10973	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10974	return c
10975}
10976
10977// Context sets the context to be used in this call's Do method. Any
10978// pending HTTP request will be aborted if the provided context is
10979// canceled.
10980func (c *ProjectsTriggersWebhookCall) Context(ctx context.Context) *ProjectsTriggersWebhookCall {
10981	c.ctx_ = ctx
10982	return c
10983}
10984
10985// Header returns an http.Header that can be modified by the caller to
10986// add HTTP headers to the request.
10987func (c *ProjectsTriggersWebhookCall) Header() http.Header {
10988	if c.header_ == nil {
10989		c.header_ = make(http.Header)
10990	}
10991	return c.header_
10992}
10993
10994func (c *ProjectsTriggersWebhookCall) doRequest(alt string) (*http.Response, error) {
10995	reqHeaders := make(http.Header)
10996	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
10997	for k, v := range c.header_ {
10998		reqHeaders[k] = v
10999	}
11000	reqHeaders.Set("User-Agent", c.s.userAgent())
11001	var body io.Reader = nil
11002	body, err := googleapi.WithoutDataWrapper.JSONReader(c.httpbody)
11003	if err != nil {
11004		return nil, err
11005	}
11006	reqHeaders.Set("Content-Type", "application/json")
11007	c.urlParams_.Set("alt", alt)
11008	c.urlParams_.Set("prettyPrint", "false")
11009	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/triggers/{trigger}:webhook")
11010	urls += "?" + c.urlParams_.Encode()
11011	req, err := http.NewRequest("POST", urls, body)
11012	if err != nil {
11013		return nil, err
11014	}
11015	req.Header = reqHeaders
11016	googleapi.Expand(req.URL, map[string]string{
11017		"projectId": c.projectId,
11018		"trigger":   c.trigger,
11019	})
11020	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11021}
11022
11023// Do executes the "cloudbuild.projects.triggers.webhook" call.
11024// Exactly one of *ReceiveTriggerWebhookResponse or error will be
11025// non-nil. Any non-2xx status code is an error. Response headers are in
11026// either *ReceiveTriggerWebhookResponse.ServerResponse.Header or (if a
11027// response was returned at all) in error.(*googleapi.Error).Header. Use
11028// googleapi.IsNotModified to check whether the returned error was
11029// because http.StatusNotModified was returned.
11030func (c *ProjectsTriggersWebhookCall) Do(opts ...googleapi.CallOption) (*ReceiveTriggerWebhookResponse, error) {
11031	gensupport.SetOptions(c.urlParams_, opts...)
11032	res, err := c.doRequest("json")
11033	if res != nil && res.StatusCode == http.StatusNotModified {
11034		if res.Body != nil {
11035			res.Body.Close()
11036		}
11037		return nil, &googleapi.Error{
11038			Code:   res.StatusCode,
11039			Header: res.Header,
11040		}
11041	}
11042	if err != nil {
11043		return nil, err
11044	}
11045	defer googleapi.CloseBody(res)
11046	if err := googleapi.CheckResponse(res); err != nil {
11047		return nil, err
11048	}
11049	ret := &ReceiveTriggerWebhookResponse{
11050		ServerResponse: googleapi.ServerResponse{
11051			Header:         res.Header,
11052			HTTPStatusCode: res.StatusCode,
11053		},
11054	}
11055	target := &ret
11056	if err := gensupport.DecodeResponse(target, res); err != nil {
11057		return nil, err
11058	}
11059	return ret, nil
11060	// {
11061	//   "description": "ReceiveTriggerWebhook [Experimental] is called when the API receives a webhook request targeted at a specific trigger.",
11062	//   "flatPath": "v1/projects/{projectId}/triggers/{trigger}:webhook",
11063	//   "httpMethod": "POST",
11064	//   "id": "cloudbuild.projects.triggers.webhook",
11065	//   "parameterOrder": [
11066	//     "projectId",
11067	//     "trigger"
11068	//   ],
11069	//   "parameters": {
11070	//     "name": {
11071	//       "description": "The name of the `ReceiveTriggerWebhook` to retrieve. Format: `projects/{project}/locations/{location}/triggers/{trigger}`",
11072	//       "location": "query",
11073	//       "type": "string"
11074	//     },
11075	//     "projectId": {
11076	//       "description": "Project in which the specified trigger lives",
11077	//       "location": "path",
11078	//       "required": true,
11079	//       "type": "string"
11080	//     },
11081	//     "secret": {
11082	//       "description": "Secret token used for authorization if an OAuth token isn't provided.",
11083	//       "location": "query",
11084	//       "type": "string"
11085	//     },
11086	//     "trigger": {
11087	//       "description": "Name of the trigger to run the payload against",
11088	//       "location": "path",
11089	//       "required": true,
11090	//       "type": "string"
11091	//     }
11092	//   },
11093	//   "path": "v1/projects/{projectId}/triggers/{trigger}:webhook",
11094	//   "request": {
11095	//     "$ref": "HttpBody"
11096	//   },
11097	//   "response": {
11098	//     "$ref": "ReceiveTriggerWebhookResponse"
11099	//   }
11100	// }
11101
11102}
11103
11104// method id "cloudbuild.webhook":
11105
11106type V1WebhookCall struct {
11107	s          *Service
11108	httpbody   *HttpBody
11109	urlParams_ gensupport.URLParams
11110	ctx_       context.Context
11111	header_    http.Header
11112}
11113
11114// Webhook: ReceiveWebhook is called when the API receives a GitHub
11115// webhook.
11116func (r *V1Service) Webhook(httpbody *HttpBody) *V1WebhookCall {
11117	c := &V1WebhookCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11118	c.httpbody = httpbody
11119	return c
11120}
11121
11122// WebhookKey sets the optional parameter "webhookKey": For GitHub
11123// Enterprise webhooks, this key is used to associate the webhook
11124// request with the GitHubEnterpriseConfig to use for validation.
11125func (c *V1WebhookCall) WebhookKey(webhookKey string) *V1WebhookCall {
11126	c.urlParams_.Set("webhookKey", webhookKey)
11127	return c
11128}
11129
11130// Fields allows partial responses to be retrieved. See
11131// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11132// for more information.
11133func (c *V1WebhookCall) Fields(s ...googleapi.Field) *V1WebhookCall {
11134	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11135	return c
11136}
11137
11138// Context sets the context to be used in this call's Do method. Any
11139// pending HTTP request will be aborted if the provided context is
11140// canceled.
11141func (c *V1WebhookCall) Context(ctx context.Context) *V1WebhookCall {
11142	c.ctx_ = ctx
11143	return c
11144}
11145
11146// Header returns an http.Header that can be modified by the caller to
11147// add HTTP headers to the request.
11148func (c *V1WebhookCall) Header() http.Header {
11149	if c.header_ == nil {
11150		c.header_ = make(http.Header)
11151	}
11152	return c.header_
11153}
11154
11155func (c *V1WebhookCall) doRequest(alt string) (*http.Response, error) {
11156	reqHeaders := make(http.Header)
11157	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915")
11158	for k, v := range c.header_ {
11159		reqHeaders[k] = v
11160	}
11161	reqHeaders.Set("User-Agent", c.s.userAgent())
11162	var body io.Reader = nil
11163	body, err := googleapi.WithoutDataWrapper.JSONReader(c.httpbody)
11164	if err != nil {
11165		return nil, err
11166	}
11167	reqHeaders.Set("Content-Type", "application/json")
11168	c.urlParams_.Set("alt", alt)
11169	c.urlParams_.Set("prettyPrint", "false")
11170	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/webhook")
11171	urls += "?" + c.urlParams_.Encode()
11172	req, err := http.NewRequest("POST", urls, body)
11173	if err != nil {
11174		return nil, err
11175	}
11176	req.Header = reqHeaders
11177	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11178}
11179
11180// Do executes the "cloudbuild.webhook" call.
11181// Exactly one of *Empty or error will be non-nil. Any non-2xx status
11182// code is an error. Response headers are in either
11183// *Empty.ServerResponse.Header or (if a response was returned at all)
11184// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
11185// check whether the returned error was because http.StatusNotModified
11186// was returned.
11187func (c *V1WebhookCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
11188	gensupport.SetOptions(c.urlParams_, opts...)
11189	res, err := c.doRequest("json")
11190	if res != nil && res.StatusCode == http.StatusNotModified {
11191		if res.Body != nil {
11192			res.Body.Close()
11193		}
11194		return nil, &googleapi.Error{
11195			Code:   res.StatusCode,
11196			Header: res.Header,
11197		}
11198	}
11199	if err != nil {
11200		return nil, err
11201	}
11202	defer googleapi.CloseBody(res)
11203	if err := googleapi.CheckResponse(res); err != nil {
11204		return nil, err
11205	}
11206	ret := &Empty{
11207		ServerResponse: googleapi.ServerResponse{
11208			Header:         res.Header,
11209			HTTPStatusCode: res.StatusCode,
11210		},
11211	}
11212	target := &ret
11213	if err := gensupport.DecodeResponse(target, res); err != nil {
11214		return nil, err
11215	}
11216	return ret, nil
11217	// {
11218	//   "description": "ReceiveWebhook is called when the API receives a GitHub webhook.",
11219	//   "flatPath": "v1/webhook",
11220	//   "httpMethod": "POST",
11221	//   "id": "cloudbuild.webhook",
11222	//   "parameterOrder": [],
11223	//   "parameters": {
11224	//     "webhookKey": {
11225	//       "description": "For GitHub Enterprise webhooks, this key is used to associate the webhook request with the GitHubEnterpriseConfig to use for validation.",
11226	//       "location": "query",
11227	//       "type": "string"
11228	//     }
11229	//   },
11230	//   "path": "v1/webhook",
11231	//   "request": {
11232	//     "$ref": "HttpBody"
11233	//   },
11234	//   "response": {
11235	//     "$ref": "Empty"
11236	//   }
11237	// }
11238
11239}
11240