-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
cloudbuild-gen.go
4496 lines (3904 loc) · 186 KB
/
cloudbuild-gen.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright 2023 Google LLC.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Code generated file. DO NOT EDIT.
// Package cloudbuild provides access to the Cloud Build API.
//
// For product documentation, see: https://cloud.google.com/cloud-build/docs/
//
// # Creating a client
//
// Usage example:
//
// import "google.golang.org/api/cloudbuild/v1alpha1"
// ...
// ctx := context.Background()
// cloudbuildService, err := cloudbuild.NewService(ctx)
//
// In this example, Google Application Default Credentials are used for authentication.
//
// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
//
// # Other authentication options
//
// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
//
// cloudbuildService, err := cloudbuild.NewService(ctx, option.WithAPIKey("AIza..."))
//
// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
//
// config := &oauth2.Config{...}
// // ...
// token, err := config.Exchange(ctx, ...)
// cloudbuildService, err := cloudbuild.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
//
// See https://godoc.org/google.golang.org/api/option/ for details on options.
package cloudbuild // import "google.golang.org/api/cloudbuild/v1alpha1"
import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
"io"
"net/http"
"net/url"
"strconv"
"strings"
googleapi "google.golang.org/api/googleapi"
internal "google.golang.org/api/internal"
gensupport "google.golang.org/api/internal/gensupport"
option "google.golang.org/api/option"
internaloption "google.golang.org/api/option/internaloption"
htransport "google.golang.org/api/transport/http"
)
// Always reference these packages, just in case the auto-generated code
// below doesn't.
var _ = bytes.NewBuffer
var _ = strconv.Itoa
var _ = fmt.Sprintf
var _ = json.NewDecoder
var _ = io.Copy
var _ = url.Parse
var _ = gensupport.MarshalJSON
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
var _ = context.Canceled
var _ = internaloption.WithDefaultEndpoint
const apiId = "cloudbuild:v1alpha1"
const apiName = "cloudbuild"
const apiVersion = "v1alpha1"
const basePath = "https://cloudbuild.googleapis.com/"
const mtlsBasePath = "https://cloudbuild.mtls.googleapis.com/"
// OAuth2 scopes used by this API.
const (
// See, edit, configure, and delete your Google Cloud data and see the
// email address for your Google Account.
CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
)
// NewService creates a new Service.
func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
scopesOption := internaloption.WithDefaultScopes(
"https://www.googleapis.com/auth/cloud-platform",
)
// NOTE: prepend, so we don't override user-specified scopes.
opts = append([]option.ClientOption{scopesOption}, opts...)
opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
client, endpoint, err := htransport.NewClient(ctx, opts...)
if err != nil {
return nil, err
}
s, err := New(client)
if err != nil {
return nil, err
}
if endpoint != "" {
s.BasePath = endpoint
}
return s, nil
}
// New creates a new Service. It uses the provided http.Client for requests.
//
// Deprecated: please use NewService instead.
// To provide a custom HTTP client, use option.WithHTTPClient.
// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
func New(client *http.Client) (*Service, error) {
if client == nil {
return nil, errors.New("client is nil")
}
s := &Service{client: client, BasePath: basePath}
s.Projects = NewProjectsService(s)
return s, nil
}
type Service struct {
client *http.Client
BasePath string // API endpoint base URL
UserAgent string // optional additional User-Agent fragment
Projects *ProjectsService
}
func (s *Service) userAgent() string {
if s.UserAgent == "" {
return googleapi.UserAgent
}
return googleapi.UserAgent + " " + s.UserAgent
}
func NewProjectsService(s *Service) *ProjectsService {
rs := &ProjectsService{s: s}
rs.Locations = NewProjectsLocationsService(s)
rs.WorkerPools = NewProjectsWorkerPoolsService(s)
return rs
}
type ProjectsService struct {
s *Service
Locations *ProjectsLocationsService
WorkerPools *ProjectsWorkerPoolsService
}
func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
rs := &ProjectsLocationsService{s: s}
rs.Operations = NewProjectsLocationsOperationsService(s)
return rs
}
type ProjectsLocationsService struct {
s *Service
Operations *ProjectsLocationsOperationsService
}
func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
rs := &ProjectsLocationsOperationsService{s: s}
return rs
}
type ProjectsLocationsOperationsService struct {
s *Service
}
func NewProjectsWorkerPoolsService(s *Service) *ProjectsWorkerPoolsService {
rs := &ProjectsWorkerPoolsService{s: s}
return rs
}
type ProjectsWorkerPoolsService struct {
s *Service
}
// ApprovalConfig: ApprovalConfig describes configuration for manual
// approval of a build.
type ApprovalConfig struct {
// ApprovalRequired: Whether or not approval is needed. If this is set
// on a build, it will become pending when created, and will need to be
// explicitly approved to start.
ApprovalRequired bool `json:"approvalRequired,omitempty"`
// ForceSendFields is a list of field names (e.g. "ApprovalRequired") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ApprovalRequired") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *ApprovalConfig) MarshalJSON() ([]byte, error) {
type NoMethod ApprovalConfig
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ApprovalResult: ApprovalResult describes the decision and associated
// metadata of a manual approval of a build.
type ApprovalResult struct {
// ApprovalTime: Output only. The time when the approval decision was
// made.
ApprovalTime string `json:"approvalTime,omitempty"`
// ApproverAccount: Output only. Email of the user that called the
// ApproveBuild API to approve or reject a build at the time that the
// API was called.
ApproverAccount string `json:"approverAccount,omitempty"`
// Comment: Optional. An optional comment for this manual approval
// result.
Comment string `json:"comment,omitempty"`
// Decision: Required. The decision of this manual approval.
//
// Possible values:
// "DECISION_UNSPECIFIED" - Default enum type. This should not be
// used.
// "APPROVED" - Build is approved.
// "REJECTED" - Build is rejected.
Decision string `json:"decision,omitempty"`
// Url: Optional. An optional URL tied to this manual approval result.
// This field is essentially the same as comment, except that it will be
// rendered by the UI differently. An example use case is a link to an
// external job that approved this Build.
Url string `json:"url,omitempty"`
// ForceSendFields is a list of field names (e.g. "ApprovalTime") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ApprovalTime") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ApprovalResult) MarshalJSON() ([]byte, error) {
type NoMethod ApprovalResult
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ArtifactObjects: Files in the workspace to upload to Cloud Storage
// upon successful completion of all build steps.
type ArtifactObjects struct {
// Location: Cloud Storage bucket and optional object path, in the form
// "gs://bucket/path/to/somewhere/". (see Bucket Name Requirements
// (https://cloud.google.com/storage/docs/bucket-naming#requirements)).
// Files in the workspace matching any path pattern will be uploaded to
// Cloud Storage with this location as a prefix.
Location string `json:"location,omitempty"`
// Paths: Path globs used to match files in the build's workspace.
Paths []string `json:"paths,omitempty"`
// Timing: Output only. Stores timing information for pushing all
// artifact objects.
Timing *TimeSpan `json:"timing,omitempty"`
// ForceSendFields is a list of field names (e.g. "Location") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Location") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ArtifactObjects) MarshalJSON() ([]byte, error) {
type NoMethod ArtifactObjects
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ArtifactResult: An artifact that was uploaded during a build. This is
// a single record in the artifact manifest JSON file.
type ArtifactResult struct {
// FileHash: The file hash of the artifact.
FileHash []*FileHashes `json:"fileHash,omitempty"`
// Location: The path of an artifact in a Google Cloud Storage bucket,
// with the generation number. For example,
// `gs://mybucket/path/to/output.jar#generation`.
Location string `json:"location,omitempty"`
// ForceSendFields is a list of field names (e.g. "FileHash") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "FileHash") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ArtifactResult) MarshalJSON() ([]byte, error) {
type NoMethod ArtifactResult
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Artifacts: Artifacts produced by a build that should be uploaded upon
// successful completion of all build steps.
type Artifacts struct {
// Images: A list of images to be pushed upon the successful completion
// of all build steps. The images will be pushed using the builder
// service account's credentials. The digests of the pushed images will
// be stored in the Build resource's results field. If any of the images
// fail to be pushed, the build is marked FAILURE.
Images []string `json:"images,omitempty"`
// MavenArtifacts: A list of Maven artifacts to be uploaded to Artifact
// Registry upon successful completion of all build steps. Artifacts in
// the workspace matching specified paths globs will be uploaded to the
// specified Artifact Registry repository using the builder service
// account's credentials. If any artifacts fail to be pushed, the build
// is marked FAILURE.
MavenArtifacts []*MavenArtifact `json:"mavenArtifacts,omitempty"`
// Objects: A list of objects to be uploaded to Cloud Storage upon
// successful completion of all build steps. Files in the workspace
// matching specified paths globs will be uploaded to the specified
// Cloud Storage location using the builder service account's
// credentials. The location and generation of the uploaded objects will
// be stored in the Build resource's results field. If any objects fail
// to be pushed, the build is marked FAILURE.
Objects *ArtifactObjects `json:"objects,omitempty"`
// PythonPackages: A list of Python packages to be uploaded to Artifact
// Registry upon successful completion of all build steps. The build
// service account credentials will be used to perform the upload. If
// any objects fail to be pushed, the build is marked FAILURE.
PythonPackages []*PythonPackage `json:"pythonPackages,omitempty"`
// ForceSendFields is a list of field names (e.g. "Images") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Images") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Artifacts) MarshalJSON() ([]byte, error) {
type NoMethod Artifacts
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// BatchCreateBitbucketServerConnectedRepositoriesResponse: Response of
// BatchCreateBitbucketServerConnectedRepositories RPC method including
// all successfully connected Bitbucket Server repositories.
type BatchCreateBitbucketServerConnectedRepositoriesResponse struct {
// BitbucketServerConnectedRepositories: The connected Bitbucket Server
// repositories.
BitbucketServerConnectedRepositories []*BitbucketServerConnectedRepository `json:"bitbucketServerConnectedRepositories,omitempty"`
// ForceSendFields is a list of field names (e.g.
// "BitbucketServerConnectedRepositories") to unconditionally include in
// API requests. By default, fields with empty or default values are
// omitted from API requests. However, any non-pointer, non-interface
// field appearing in ForceSendFields will be sent to the server
// regardless of whether the field is empty or not. This may be used to
// include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g.
// "BitbucketServerConnectedRepositories") to include in API requests
// with the JSON null value. By default, fields with empty values are
// omitted from API requests. However, any field with an empty value
// appearing in NullFields will be sent to the server as null. It is an
// error if a field in this list has a non-empty value. This may be used
// to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *BatchCreateBitbucketServerConnectedRepositoriesResponse) MarshalJSON() ([]byte, error) {
type NoMethod BatchCreateBitbucketServerConnectedRepositoriesResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// BatchCreateBitbucketServerConnectedRepositoriesResponseMetadata:
// Metadata for `BatchCreateBitbucketServerConnectedRepositories`
// operation.
type BatchCreateBitbucketServerConnectedRepositoriesResponseMetadata struct {
// CompleteTime: Time the operation was completed.
CompleteTime string `json:"completeTime,omitempty"`
// Config: The name of the `BitbucketServerConfig` that added connected
// repositories. Format:
// `projects/{project}/locations/{location}/bitbucketServerConfigs/{confi
// g}`
Config string `json:"config,omitempty"`
// CreateTime: Time the operation was created.
CreateTime string `json:"createTime,omitempty"`
// ForceSendFields is a list of field names (e.g. "CompleteTime") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CompleteTime") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *BatchCreateBitbucketServerConnectedRepositoriesResponseMetadata) MarshalJSON() ([]byte, error) {
type NoMethod BatchCreateBitbucketServerConnectedRepositoriesResponseMetadata
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// BatchCreateGitLabConnectedRepositoriesResponse: Response of
// BatchCreateGitLabConnectedRepositories RPC method.
type BatchCreateGitLabConnectedRepositoriesResponse struct {
// GitlabConnectedRepositories: The GitLab connected repository
// requests' responses.
GitlabConnectedRepositories []*GitLabConnectedRepository `json:"gitlabConnectedRepositories,omitempty"`
// ForceSendFields is a list of field names (e.g.
// "GitlabConnectedRepositories") to unconditionally include in API
// requests. By default, fields with empty or default values are omitted
// from API requests. However, any non-pointer, non-interface field
// appearing in ForceSendFields will be sent to the server regardless of
// whether the field is empty or not. This may be used to include empty
// fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g.
// "GitlabConnectedRepositories") to include in API requests with the
// JSON null value. By default, fields with empty values are omitted
// from API requests. However, any field with an empty value appearing
// in NullFields will be sent to the server as null. It is an error if a
// field in this list has a non-empty value. This may be used to include
// null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *BatchCreateGitLabConnectedRepositoriesResponse) MarshalJSON() ([]byte, error) {
type NoMethod BatchCreateGitLabConnectedRepositoriesResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// BatchCreateGitLabConnectedRepositoriesResponseMetadata: Metadata for
// `BatchCreateGitLabConnectedRepositories` operation.
type BatchCreateGitLabConnectedRepositoriesResponseMetadata struct {
// CompleteTime: Time the operation was completed.
CompleteTime string `json:"completeTime,omitempty"`
// Config: The name of the `GitLabConfig` that added connected
// repositories. Format:
// `projects/{project}/locations/{location}/gitLabConfigs/{config}`
Config string `json:"config,omitempty"`
// CreateTime: Time the operation was created.
CreateTime string `json:"createTime,omitempty"`
// ForceSendFields is a list of field names (e.g. "CompleteTime") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CompleteTime") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *BatchCreateGitLabConnectedRepositoriesResponseMetadata) MarshalJSON() ([]byte, error) {
type NoMethod BatchCreateGitLabConnectedRepositoriesResponseMetadata
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// BatchCreateRepositoriesResponse: Message for response of creating
// repositories in batch.
type BatchCreateRepositoriesResponse struct {
// Repositories: Repository resources created.
Repositories []*Repository `json:"repositories,omitempty"`
// ForceSendFields is a list of field names (e.g. "Repositories") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Repositories") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *BatchCreateRepositoriesResponse) MarshalJSON() ([]byte, error) {
type NoMethod BatchCreateRepositoriesResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// BitbucketServerConnectedRepository: /
// BitbucketServerConnectedRepository represents a connected Bitbucket
// Server / repository.
type BitbucketServerConnectedRepository struct {
// Parent: The name of the `BitbucketServerConfig` that added connected
// repository. Format:
// `projects/{project}/locations/{location}/bitbucketServerConfigs/{confi
// g}`
Parent string `json:"parent,omitempty"`
// Repo: The Bitbucket Server repositories to connect.
Repo *BitbucketServerRepositoryId `json:"repo,omitempty"`
// Status: Output only. The status of the repo connection request.
Status *Status `json:"status,omitempty"`
// ForceSendFields is a list of field names (e.g. "Parent") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Parent") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *BitbucketServerConnectedRepository) MarshalJSON() ([]byte, error) {
type NoMethod BitbucketServerConnectedRepository
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// BitbucketServerRepositoryId: BitbucketServerRepositoryId identifies a
// specific repository hosted on a Bitbucket Server.
type BitbucketServerRepositoryId struct {
// ProjectKey: Required. Identifier for the project storing the
// repository.
ProjectKey string `json:"projectKey,omitempty"`
// RepoSlug: Required. Identifier for the repository.
RepoSlug string `json:"repoSlug,omitempty"`
// WebhookId: Output only. The ID of the webhook that was created for
// receiving events from this repo. We only create and manage a single
// webhook for each repo.
WebhookId int64 `json:"webhookId,omitempty"`
// ForceSendFields is a list of field names (e.g. "ProjectKey") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ProjectKey") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *BitbucketServerRepositoryId) MarshalJSON() ([]byte, error) {
type NoMethod BitbucketServerRepositoryId
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Build: A build resource in the Cloud Build API. At a high level, a
// `Build` describes where to find source code, how to build it (for
// example, the builder image to run on the source), and where to store
// the built artifacts. Fields can include the following variables,
// which will be expanded when the build is created: - $PROJECT_ID: the
// project ID of the build. - $PROJECT_NUMBER: the project number of the
// build. - $LOCATION: the location/region of the build. - $BUILD_ID:
// the autogenerated ID of the build. - $REPO_NAME: the source
// repository name specified by RepoSource. - $BRANCH_NAME: the branch
// name specified by RepoSource. - $TAG_NAME: the tag name specified by
// RepoSource. - $REVISION_ID or $COMMIT_SHA: the commit SHA specified
// by RepoSource or resolved from the specified branch or tag. -
// $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.
type Build struct {
// Approval: Output only. Describes this build's approval configuration,
// status, and result.
Approval *BuildApproval `json:"approval,omitempty"`
// Artifacts: Artifacts produced by the build that should be uploaded
// upon successful completion of all build steps.
Artifacts *Artifacts `json:"artifacts,omitempty"`
// AvailableSecrets: Secrets and secret environment variables.
AvailableSecrets *Secrets `json:"availableSecrets,omitempty"`
// BuildTriggerId: Output only. The ID of the `BuildTrigger` that
// triggered this build, if it was triggered automatically.
BuildTriggerId string `json:"buildTriggerId,omitempty"`
// CreateTime: Output only. Time at which the request to create the
// build was received.
CreateTime string `json:"createTime,omitempty"`
// FailureInfo: Output only. Contains information about the build when
// status=FAILURE.
FailureInfo *FailureInfo `json:"failureInfo,omitempty"`
// FinishTime: Output only. Time at which execution of the build was
// finished. The difference between finish_time and start_time is the
// duration of the build's execution.
FinishTime string `json:"finishTime,omitempty"`
// Id: Output only. Unique identifier of the build.
Id string `json:"id,omitempty"`
// Images: A list of images to be pushed upon the successful completion
// of all build steps. The images are pushed using the builder service
// account's credentials. The digests of the pushed images will be
// stored in the `Build` resource's results field. If any of the images
// fail to be pushed, the build status is marked `FAILURE`.
Images []string `json:"images,omitempty"`
// LogUrl: Output only. URL to logs for this build in Google Cloud
// Console.
LogUrl string `json:"logUrl,omitempty"`
// LogsBucket: Google Cloud Storage bucket where logs should be written
// (see Bucket Name Requirements
// (https://cloud.google.com/storage/docs/bucket-naming#requirements)).
// Logs file names will be of the format
// `${logs_bucket}/log-${build_id}.txt`.
LogsBucket string `json:"logsBucket,omitempty"`
// Name: Output only. The 'Build' name with format:
// `projects/{project}/locations/{location}/builds/{build}`, where
// {build} is a unique identifier generated by the service.
Name string `json:"name,omitempty"`
// Options: Special options for this build.
Options *BuildOptions `json:"options,omitempty"`
// ProjectId: Output only. ID of the project.
ProjectId string `json:"projectId,omitempty"`
// QueueTtl: TTL in queue for this build. If provided and the build is
// enqueued longer than this value, the build will expire and the build
// status will be `EXPIRED`. The TTL starts ticking from create_time.
QueueTtl string `json:"queueTtl,omitempty"`
// Results: Output only. Results of the build.
Results *Results `json:"results,omitempty"`
// Secrets: Secrets to decrypt using Cloud Key Management Service. Note:
// Secret Manager is the recommended technique for managing sensitive
// data with Cloud Build. Use `available_secrets` to configure builds to
// access secrets from Secret Manager. For instructions, see:
// https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets
Secrets []*Secret `json:"secrets,omitempty"`
// ServiceAccount: IAM service account whose credentials will be used at
// build runtime. Must be of the format
// `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. ACCOUNT can be
// email address or uniqueId of the service account.
ServiceAccount string `json:"serviceAccount,omitempty"`
// Source: The location of the source files to build.
Source *Source `json:"source,omitempty"`
// SourceProvenance: Output only. A permanent fixed identifier for
// source.
SourceProvenance *SourceProvenance `json:"sourceProvenance,omitempty"`
// StartTime: Output only. Time at which execution of the build was
// started.
StartTime string `json:"startTime,omitempty"`
// Status: Output only. Status of the build.
//
// Possible values:
// "STATUS_UNKNOWN" - Status of the build is unknown.
// "PENDING" - Build has been created and is pending execution and
// queuing. It has not been queued.
// "QUEUED" - Build or step is queued; work has not yet begun.
// "WORKING" - Build or step is being executed.
// "SUCCESS" - Build or step finished successfully.
// "FAILURE" - Build or step failed to complete successfully.
// "INTERNAL_ERROR" - Build or step failed due to an internal cause.
// "TIMEOUT" - Build or step took longer than was allowed.
// "CANCELLED" - Build or step was canceled by a user.
// "EXPIRED" - Build was enqueued for longer than the value of
// `queue_ttl`.
Status string `json:"status,omitempty"`
// StatusDetail: Output only. Customer-readable message about the
// current status.
StatusDetail string `json:"statusDetail,omitempty"`
// Steps: Required. The operations to be performed on the workspace.
Steps []*BuildStep `json:"steps,omitempty"`
// Substitutions: Substitutions data for `Build` resource.
Substitutions map[string]string `json:"substitutions,omitempty"`
// Tags: Tags for annotation of a `Build`. These are not docker tags.
Tags []string `json:"tags,omitempty"`
// Timeout: Amount of time that this build should be allowed to run, to
// second granularity. If this amount of time elapses, work on the build
// will cease and the build status will be `TIMEOUT`. `timeout` starts
// ticking from `startTime`. Default time is ten minutes.
Timeout string `json:"timeout,omitempty"`
// Timing: Output only. Stores timing information for phases of the
// build. Valid keys are: * BUILD: time to execute all build steps. *
// PUSH: time to push all artifacts including docker images and non
// docker artifacts. * FETCHSOURCE: time to fetch source. * SETUPBUILD:
// time to set up build. If the build does not specify source or images,
// these keys will not be included.
Timing map[string]TimeSpan `json:"timing,omitempty"`
// Warnings: Output only. Non-fatal problems encountered during the
// execution of the build.
Warnings []*Warning `json:"warnings,omitempty"`
// ForceSendFields is a list of field names (e.g. "Approval") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Approval") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Build) MarshalJSON() ([]byte, error) {
type NoMethod Build
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// BuildApproval: BuildApproval describes a build's approval
// configuration, state, and result.
type BuildApproval struct {
// Config: Output only. Configuration for manual approval of this build.
Config *ApprovalConfig `json:"config,omitempty"`
// Result: Output only. Result of manual approval for this Build.
Result *ApprovalResult `json:"result,omitempty"`
// State: Output only. The state of this build's approval.
//
// Possible values:
// "STATE_UNSPECIFIED" - Default enum type. This should not be used.
// "PENDING" - Build approval is pending.
// "APPROVED" - Build approval has been approved.
// "REJECTED" - Build approval has been rejected.
// "CANCELLED" - Build was cancelled while it was still pending
// approval.
State string `json:"state,omitempty"`
// ForceSendFields is a list of field names (e.g. "Config") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Config") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *BuildApproval) MarshalJSON() ([]byte, error) {
type NoMethod BuildApproval
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// BuildOperationMetadata: Metadata for build operations.
type BuildOperationMetadata struct {
// Build: The build that the operation is tracking.
Build *Build `json:"build,omitempty"`
// ForceSendFields is a list of field names (e.g. "Build") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Build") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *BuildOperationMetadata) MarshalJSON() ([]byte, error) {
type NoMethod BuildOperationMetadata
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// BuildOptions: Optional arguments to enable specific features of
// builds.
type BuildOptions struct {
// DiskSizeGb: Requested disk size for the VM that runs the build. Note
// that this is *NOT* "disk free"; some of the space will be used by the
// operating system and build utilities. Also note that this is the
// minimum disk size that will be allocated for the build -- the build
// may run with a larger disk than requested. At present, the maximum
// disk size is 2000GB; builds that request more than the maximum are
// rejected with an error.
DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"`
// DynamicSubstitutions: Option to specify whether or not to apply bash
// style string operations to the substitutions. NOTE: this is always
// enabled for triggered builds and cannot be overridden in the build
// configuration file.
DynamicSubstitutions bool `json:"dynamicSubstitutions,omitempty"`
// Env: A list of global environment variable definitions that will
// exist for all build steps in this build. If a variable is defined in
// both globally and in a build step, the variable will use the build
// step value. The elements are of the form "KEY=VALUE" for the
// environment variable "KEY" being given the value "VALUE".
Env []string `json:"env,omitempty"`
// LogStreamingOption: Option to define build log streaming behavior to
// Google Cloud Storage.
//
// Possible values:
// "STREAM_DEFAULT" - Service may automatically determine build log
// streaming behavior.
// "STREAM_ON" - Build logs should be streamed to Google Cloud
// Storage.
// "STREAM_OFF" - Build logs should not be streamed to Google Cloud
// Storage; they will be written when the build is completed.
LogStreamingOption string `json:"logStreamingOption,omitempty"`
// Logging: Option to specify the logging mode, which determines if and
// where build logs are stored.
//
// Possible values:
// "LOGGING_UNSPECIFIED" - The service determines the logging mode.
// The default is `LEGACY`. Do not rely on the default logging behavior
// as it may change in the future.
// "LEGACY" - Build logs are stored in Cloud Logging and Cloud
// Storage.
// "GCS_ONLY" - Build logs are stored in Cloud Storage.
// "STACKDRIVER_ONLY" - This option is the same as CLOUD_LOGGING_ONLY.
// "CLOUD_LOGGING_ONLY" - Build logs are stored in Cloud Logging.
// Selecting this option will not allow [logs
// streaming](https://cloud.google.com/sdk/gcloud/reference/builds/log).
// "NONE" - Turn off all logging. No build logs will be captured.
Logging string `json:"logging,omitempty"`
// MachineType: Compute Engine machine type on which to run the build.
//
// Possible values:
// "UNSPECIFIED" - Standard machine type.
// "N1_HIGHCPU_8" - Highcpu machine with 8 CPUs.
// "N1_HIGHCPU_32" - Highcpu machine with 32 CPUs.
// "E2_HIGHCPU_8" - Highcpu e2 machine with 8 CPUs.
// "E2_HIGHCPU_32" - Highcpu e2 machine with 32 CPUs.
MachineType string `json:"machineType,omitempty"`
// Pool: Optional. Specification for execution on a `WorkerPool`. See
// running builds in a private pool
// (https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool)
// for more information.
Pool *PoolOption `json:"pool,omitempty"`
// RequestedVerifyOption: Requested verifiability options.
//
// Possible values:
// "NOT_VERIFIED" - Not a verifiable build (the default).
// "VERIFIED" - Build must be verified.
RequestedVerifyOption string `json:"requestedVerifyOption,omitempty"`
// SecretEnv: A list of global environment variables, which are
// encrypted using a Cloud Key Management Service crypto key. These
// values must be specified in the build's `Secret`. These variables
// will be available to all build steps in this build.
SecretEnv []string `json:"secretEnv,omitempty"`
// SourceProvenanceHash: Requested hash for SourceProvenance.
//
// Possible values:
// "NONE" - No hash requested.
// "SHA256" - Use a sha256 hash.
// "MD5" - Use a md5 hash.
SourceProvenanceHash []string `json:"sourceProvenanceHash,omitempty"`
// SubstitutionOption: Option to specify behavior when there is an error
// in the substitution checks. NOTE: this is always set to ALLOW_LOOSE
// for triggered builds and cannot be overridden in the build
// configuration file.
//
// Possible values:
// "MUST_MATCH" - Fails the build if error in substitutions checks,
// like missing a substitution in the template or in the map.
// "ALLOW_LOOSE" - Do not fail the build if error in substitutions
// checks.
SubstitutionOption string `json:"substitutionOption,omitempty"`
// Volumes: Global list of volumes to mount for ALL build steps Each
// volume is created as an empty volume prior to starting the build