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 package cloudbuild
52
53 import (
54 "bytes"
55 "context"
56 "encoding/json"
57 "errors"
58 "fmt"
59 "io"
60 "net/http"
61 "net/url"
62 "strconv"
63 "strings"
64
65 googleapi "google.golang.org/api/googleapi"
66 internal "google.golang.org/api/internal"
67 gensupport "google.golang.org/api/internal/gensupport"
68 option "google.golang.org/api/option"
69 internaloption "google.golang.org/api/option/internaloption"
70 htransport "google.golang.org/api/transport/http"
71 )
72
73
74
75 var _ = bytes.NewBuffer
76 var _ = strconv.Itoa
77 var _ = fmt.Sprintf
78 var _ = json.NewDecoder
79 var _ = io.Copy
80 var _ = url.Parse
81 var _ = gensupport.MarshalJSON
82 var _ = googleapi.Version
83 var _ = errors.New
84 var _ = strings.Replace
85 var _ = context.Canceled
86 var _ = internaloption.WithDefaultEndpoint
87 var _ = internal.Version
88
89 const apiId = "cloudbuild:v1"
90 const apiName = "cloudbuild"
91 const apiVersion = "v1"
92 const basePath = "https://cloudbuild.googleapis.com/"
93 const basePathTemplate = "https://cloudbuild.UNIVERSE_DOMAIN/"
94 const mtlsBasePath = "https://cloudbuild.mtls.googleapis.com/"
95
96
97 const (
98
99
100 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
101 )
102
103
104 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
105 scopesOption := internaloption.WithDefaultScopes(
106 "https://www.googleapis.com/auth/cloud-platform",
107 )
108
109 opts = append([]option.ClientOption{scopesOption}, opts...)
110 opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
111 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
112 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
113 opts = append(opts, internaloption.EnableNewAuthLibrary())
114 client, endpoint, err := htransport.NewClient(ctx, opts...)
115 if err != nil {
116 return nil, err
117 }
118 s, err := New(client)
119 if err != nil {
120 return nil, err
121 }
122 if endpoint != "" {
123 s.BasePath = endpoint
124 }
125 return s, nil
126 }
127
128
129
130
131
132
133 func New(client *http.Client) (*Service, error) {
134 if client == nil {
135 return nil, errors.New("client is nil")
136 }
137 s := &Service{client: client, BasePath: basePath}
138 s.GithubDotComWebhook = NewGithubDotComWebhookService(s)
139 s.Locations = NewLocationsService(s)
140 s.Operations = NewOperationsService(s)
141 s.Projects = NewProjectsService(s)
142 s.V1 = NewV1Service(s)
143 return s, nil
144 }
145
146 type Service struct {
147 client *http.Client
148 BasePath string
149 UserAgent string
150
151 GithubDotComWebhook *GithubDotComWebhookService
152
153 Locations *LocationsService
154
155 Operations *OperationsService
156
157 Projects *ProjectsService
158
159 V1 *V1Service
160 }
161
162 func (s *Service) userAgent() string {
163 if s.UserAgent == "" {
164 return googleapi.UserAgent
165 }
166 return googleapi.UserAgent + " " + s.UserAgent
167 }
168
169 func NewGithubDotComWebhookService(s *Service) *GithubDotComWebhookService {
170 rs := &GithubDotComWebhookService{s: s}
171 return rs
172 }
173
174 type GithubDotComWebhookService struct {
175 s *Service
176 }
177
178 func NewLocationsService(s *Service) *LocationsService {
179 rs := &LocationsService{s: s}
180 return rs
181 }
182
183 type LocationsService struct {
184 s *Service
185 }
186
187 func NewOperationsService(s *Service) *OperationsService {
188 rs := &OperationsService{s: s}
189 return rs
190 }
191
192 type OperationsService struct {
193 s *Service
194 }
195
196 func NewProjectsService(s *Service) *ProjectsService {
197 rs := &ProjectsService{s: s}
198 rs.Builds = NewProjectsBuildsService(s)
199 rs.GithubEnterpriseConfigs = NewProjectsGithubEnterpriseConfigsService(s)
200 rs.Locations = NewProjectsLocationsService(s)
201 rs.Triggers = NewProjectsTriggersService(s)
202 return rs
203 }
204
205 type ProjectsService struct {
206 s *Service
207
208 Builds *ProjectsBuildsService
209
210 GithubEnterpriseConfigs *ProjectsGithubEnterpriseConfigsService
211
212 Locations *ProjectsLocationsService
213
214 Triggers *ProjectsTriggersService
215 }
216
217 func NewProjectsBuildsService(s *Service) *ProjectsBuildsService {
218 rs := &ProjectsBuildsService{s: s}
219 return rs
220 }
221
222 type ProjectsBuildsService struct {
223 s *Service
224 }
225
226 func NewProjectsGithubEnterpriseConfigsService(s *Service) *ProjectsGithubEnterpriseConfigsService {
227 rs := &ProjectsGithubEnterpriseConfigsService{s: s}
228 return rs
229 }
230
231 type ProjectsGithubEnterpriseConfigsService struct {
232 s *Service
233 }
234
235 func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
236 rs := &ProjectsLocationsService{s: s}
237 rs.BitbucketServerConfigs = NewProjectsLocationsBitbucketServerConfigsService(s)
238 rs.Builds = NewProjectsLocationsBuildsService(s)
239 rs.GitLabConfigs = NewProjectsLocationsGitLabConfigsService(s)
240 rs.GithubEnterpriseConfigs = NewProjectsLocationsGithubEnterpriseConfigsService(s)
241 rs.Operations = NewProjectsLocationsOperationsService(s)
242 rs.Triggers = NewProjectsLocationsTriggersService(s)
243 rs.WorkerPools = NewProjectsLocationsWorkerPoolsService(s)
244 return rs
245 }
246
247 type ProjectsLocationsService struct {
248 s *Service
249
250 BitbucketServerConfigs *ProjectsLocationsBitbucketServerConfigsService
251
252 Builds *ProjectsLocationsBuildsService
253
254 GitLabConfigs *ProjectsLocationsGitLabConfigsService
255
256 GithubEnterpriseConfigs *ProjectsLocationsGithubEnterpriseConfigsService
257
258 Operations *ProjectsLocationsOperationsService
259
260 Triggers *ProjectsLocationsTriggersService
261
262 WorkerPools *ProjectsLocationsWorkerPoolsService
263 }
264
265 func NewProjectsLocationsBitbucketServerConfigsService(s *Service) *ProjectsLocationsBitbucketServerConfigsService {
266 rs := &ProjectsLocationsBitbucketServerConfigsService{s: s}
267 rs.ConnectedRepositories = NewProjectsLocationsBitbucketServerConfigsConnectedRepositoriesService(s)
268 rs.Repos = NewProjectsLocationsBitbucketServerConfigsReposService(s)
269 return rs
270 }
271
272 type ProjectsLocationsBitbucketServerConfigsService struct {
273 s *Service
274
275 ConnectedRepositories *ProjectsLocationsBitbucketServerConfigsConnectedRepositoriesService
276
277 Repos *ProjectsLocationsBitbucketServerConfigsReposService
278 }
279
280 func NewProjectsLocationsBitbucketServerConfigsConnectedRepositoriesService(s *Service) *ProjectsLocationsBitbucketServerConfigsConnectedRepositoriesService {
281 rs := &ProjectsLocationsBitbucketServerConfigsConnectedRepositoriesService{s: s}
282 return rs
283 }
284
285 type ProjectsLocationsBitbucketServerConfigsConnectedRepositoriesService struct {
286 s *Service
287 }
288
289 func NewProjectsLocationsBitbucketServerConfigsReposService(s *Service) *ProjectsLocationsBitbucketServerConfigsReposService {
290 rs := &ProjectsLocationsBitbucketServerConfigsReposService{s: s}
291 return rs
292 }
293
294 type ProjectsLocationsBitbucketServerConfigsReposService struct {
295 s *Service
296 }
297
298 func NewProjectsLocationsBuildsService(s *Service) *ProjectsLocationsBuildsService {
299 rs := &ProjectsLocationsBuildsService{s: s}
300 return rs
301 }
302
303 type ProjectsLocationsBuildsService struct {
304 s *Service
305 }
306
307 func NewProjectsLocationsGitLabConfigsService(s *Service) *ProjectsLocationsGitLabConfigsService {
308 rs := &ProjectsLocationsGitLabConfigsService{s: s}
309 rs.ConnectedRepositories = NewProjectsLocationsGitLabConfigsConnectedRepositoriesService(s)
310 rs.Repos = NewProjectsLocationsGitLabConfigsReposService(s)
311 return rs
312 }
313
314 type ProjectsLocationsGitLabConfigsService struct {
315 s *Service
316
317 ConnectedRepositories *ProjectsLocationsGitLabConfigsConnectedRepositoriesService
318
319 Repos *ProjectsLocationsGitLabConfigsReposService
320 }
321
322 func NewProjectsLocationsGitLabConfigsConnectedRepositoriesService(s *Service) *ProjectsLocationsGitLabConfigsConnectedRepositoriesService {
323 rs := &ProjectsLocationsGitLabConfigsConnectedRepositoriesService{s: s}
324 return rs
325 }
326
327 type ProjectsLocationsGitLabConfigsConnectedRepositoriesService struct {
328 s *Service
329 }
330
331 func NewProjectsLocationsGitLabConfigsReposService(s *Service) *ProjectsLocationsGitLabConfigsReposService {
332 rs := &ProjectsLocationsGitLabConfigsReposService{s: s}
333 return rs
334 }
335
336 type ProjectsLocationsGitLabConfigsReposService struct {
337 s *Service
338 }
339
340 func NewProjectsLocationsGithubEnterpriseConfigsService(s *Service) *ProjectsLocationsGithubEnterpriseConfigsService {
341 rs := &ProjectsLocationsGithubEnterpriseConfigsService{s: s}
342 return rs
343 }
344
345 type ProjectsLocationsGithubEnterpriseConfigsService struct {
346 s *Service
347 }
348
349 func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
350 rs := &ProjectsLocationsOperationsService{s: s}
351 return rs
352 }
353
354 type ProjectsLocationsOperationsService struct {
355 s *Service
356 }
357
358 func NewProjectsLocationsTriggersService(s *Service) *ProjectsLocationsTriggersService {
359 rs := &ProjectsLocationsTriggersService{s: s}
360 return rs
361 }
362
363 type ProjectsLocationsTriggersService struct {
364 s *Service
365 }
366
367 func NewProjectsLocationsWorkerPoolsService(s *Service) *ProjectsLocationsWorkerPoolsService {
368 rs := &ProjectsLocationsWorkerPoolsService{s: s}
369 return rs
370 }
371
372 type ProjectsLocationsWorkerPoolsService struct {
373 s *Service
374 }
375
376 func NewProjectsTriggersService(s *Service) *ProjectsTriggersService {
377 rs := &ProjectsTriggersService{s: s}
378 return rs
379 }
380
381 type ProjectsTriggersService struct {
382 s *Service
383 }
384
385 func NewV1Service(s *Service) *V1Service {
386 rs := &V1Service{s: s}
387 return rs
388 }
389
390 type V1Service struct {
391 s *Service
392 }
393
394
395
396 type ApprovalConfig struct {
397
398
399
400 ApprovalRequired bool `json:"approvalRequired,omitempty"`
401
402
403
404
405
406 ForceSendFields []string `json:"-"`
407
408
409
410
411 NullFields []string `json:"-"`
412 }
413
414 func (s *ApprovalConfig) MarshalJSON() ([]byte, error) {
415 type NoMethod ApprovalConfig
416 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
417 }
418
419
420
421 type ApprovalResult struct {
422
423 ApprovalTime string `json:"approvalTime,omitempty"`
424
425
426 ApproverAccount string `json:"approverAccount,omitempty"`
427
428 Comment string `json:"comment,omitempty"`
429
430
431
432
433
434
435 Decision string `json:"decision,omitempty"`
436
437
438
439
440 Url string `json:"url,omitempty"`
441
442
443
444
445
446 ForceSendFields []string `json:"-"`
447
448
449
450
451 NullFields []string `json:"-"`
452 }
453
454 func (s *ApprovalResult) MarshalJSON() ([]byte, error) {
455 type NoMethod ApprovalResult
456 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
457 }
458
459
460 type ApproveBuildRequest struct {
461
462 ApprovalResult *ApprovalResult `json:"approvalResult,omitempty"`
463
464
465
466
467
468 ForceSendFields []string `json:"-"`
469
470
471
472
473 NullFields []string `json:"-"`
474 }
475
476 func (s *ApproveBuildRequest) MarshalJSON() ([]byte, error) {
477 type NoMethod ApproveBuildRequest
478 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
479 }
480
481
482
483 type ArtifactObjects struct {
484
485
486
487
488
489 Location string `json:"location,omitempty"`
490
491 Paths []string `json:"paths,omitempty"`
492
493
494 Timing *TimeSpan `json:"timing,omitempty"`
495
496
497
498
499
500 ForceSendFields []string `json:"-"`
501
502
503
504
505 NullFields []string `json:"-"`
506 }
507
508 func (s *ArtifactObjects) MarshalJSON() ([]byte, error) {
509 type NoMethod ArtifactObjects
510 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
511 }
512
513
514
515 type ArtifactResult struct {
516
517 FileHash []*FileHashes `json:"fileHash,omitempty"`
518
519
520
521 Location string `json:"location,omitempty"`
522
523
524
525
526
527 ForceSendFields []string `json:"-"`
528
529
530
531
532 NullFields []string `json:"-"`
533 }
534
535 func (s *ArtifactResult) MarshalJSON() ([]byte, error) {
536 type NoMethod ArtifactResult
537 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
538 }
539
540
541
542 type Artifacts struct {
543
544
545
546
547
548 Images []string `json:"images,omitempty"`
549
550
551
552
553
554
555 MavenArtifacts []*MavenArtifact `json:"mavenArtifacts,omitempty"`
556
557
558
559
560
561 NpmPackages []*NpmPackage `json:"npmPackages,omitempty"`
562
563
564
565
566
567
568 Objects *ArtifactObjects `json:"objects,omitempty"`
569
570
571
572
573 PythonPackages []*PythonPackage `json:"pythonPackages,omitempty"`
574
575
576
577
578
579 ForceSendFields []string `json:"-"`
580
581
582
583
584 NullFields []string `json:"-"`
585 }
586
587 func (s *Artifacts) MarshalJSON() ([]byte, error) {
588 type NoMethod Artifacts
589 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
590 }
591
592
593
594 type BatchCreateBitbucketServerConnectedRepositoriesRequest struct {
595
596 Requests []*CreateBitbucketServerConnectedRepositoryRequest `json:"requests,omitempty"`
597
598
599
600
601
602 ForceSendFields []string `json:"-"`
603
604
605
606
607 NullFields []string `json:"-"`
608 }
609
610 func (s *BatchCreateBitbucketServerConnectedRepositoriesRequest) MarshalJSON() ([]byte, error) {
611 type NoMethod BatchCreateBitbucketServerConnectedRepositoriesRequest
612 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
613 }
614
615
616
617
618 type BatchCreateBitbucketServerConnectedRepositoriesResponse struct {
619
620
621 BitbucketServerConnectedRepositories []*BitbucketServerConnectedRepository `json:"bitbucketServerConnectedRepositories,omitempty"`
622
623
624
625
626
627
628 ForceSendFields []string `json:"-"`
629
630
631
632
633
634 NullFields []string `json:"-"`
635 }
636
637 func (s *BatchCreateBitbucketServerConnectedRepositoriesResponse) MarshalJSON() ([]byte, error) {
638 type NoMethod BatchCreateBitbucketServerConnectedRepositoriesResponse
639 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
640 }
641
642
643
644 type BatchCreateBitbucketServerConnectedRepositoriesResponseMetadata struct {
645
646 CompleteTime string `json:"completeTime,omitempty"`
647
648
649
650 Config string `json:"config,omitempty"`
651
652 CreateTime string `json:"createTime,omitempty"`
653
654
655
656
657
658 ForceSendFields []string `json:"-"`
659
660
661
662
663 NullFields []string `json:"-"`
664 }
665
666 func (s *BatchCreateBitbucketServerConnectedRepositoriesResponseMetadata) MarshalJSON() ([]byte, error) {
667 type NoMethod BatchCreateBitbucketServerConnectedRepositoriesResponseMetadata
668 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
669 }
670
671
672
673 type BatchCreateGitLabConnectedRepositoriesRequest struct {
674
675 Requests []*CreateGitLabConnectedRepositoryRequest `json:"requests,omitempty"`
676
677
678
679
680
681 ForceSendFields []string `json:"-"`
682
683
684
685
686 NullFields []string `json:"-"`
687 }
688
689 func (s *BatchCreateGitLabConnectedRepositoriesRequest) MarshalJSON() ([]byte, error) {
690 type NoMethod BatchCreateGitLabConnectedRepositoriesRequest
691 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
692 }
693
694
695
696 type BatchCreateGitLabConnectedRepositoriesResponse struct {
697
698
699 GitlabConnectedRepositories []*GitLabConnectedRepository `json:"gitlabConnectedRepositories,omitempty"`
700
701
702
703
704
705 ForceSendFields []string `json:"-"`
706
707
708
709
710 NullFields []string `json:"-"`
711 }
712
713 func (s *BatchCreateGitLabConnectedRepositoriesResponse) MarshalJSON() ([]byte, error) {
714 type NoMethod BatchCreateGitLabConnectedRepositoriesResponse
715 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
716 }
717
718
719
720 type BatchCreateGitLabConnectedRepositoriesResponseMetadata struct {
721
722 CompleteTime string `json:"completeTime,omitempty"`
723
724
725 Config string `json:"config,omitempty"`
726
727 CreateTime string `json:"createTime,omitempty"`
728
729
730
731
732
733 ForceSendFields []string `json:"-"`
734
735
736
737
738 NullFields []string `json:"-"`
739 }
740
741 func (s *BatchCreateGitLabConnectedRepositoriesResponseMetadata) MarshalJSON() ([]byte, error) {
742 type NoMethod BatchCreateGitLabConnectedRepositoriesResponseMetadata
743 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
744 }
745
746
747
748 type BitbucketServerConfig struct {
749
750
751
752 ApiKey string `json:"apiKey,omitempty"`
753
754
755 ConnectedRepositories []*BitbucketServerRepositoryId `json:"connectedRepositories,omitempty"`
756
757 CreateTime string `json:"createTime,omitempty"`
758
759
760
761 HostUri string `json:"hostUri,omitempty"`
762
763 Name string `json:"name,omitempty"`
764
765
766
767
768
769
770
771
772 PeeredNetwork string `json:"peeredNetwork,omitempty"`
773
774
775
776
777
778
779
780
781 PeeredNetworkIpRange string `json:"peeredNetworkIpRange,omitempty"`
782
783 Secrets *BitbucketServerSecrets `json:"secrets,omitempty"`
784
785
786
787 SslCa string `json:"sslCa,omitempty"`
788
789 Username string `json:"username,omitempty"`
790
791
792 WebhookKey string `json:"webhookKey,omitempty"`
793
794
795 googleapi.ServerResponse `json:"-"`
796
797
798
799
800
801 ForceSendFields []string `json:"-"`
802
803
804
805
806 NullFields []string `json:"-"`
807 }
808
809 func (s *BitbucketServerConfig) MarshalJSON() ([]byte, error) {
810 type NoMethod BitbucketServerConfig
811 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
812 }
813
814
815
816 type BitbucketServerConnectedRepository struct {
817
818
819
820 Parent string `json:"parent,omitempty"`
821
822 Repo *BitbucketServerRepositoryId `json:"repo,omitempty"`
823
824 Status *Status `json:"status,omitempty"`
825
826
827
828
829
830 ForceSendFields []string `json:"-"`
831
832
833
834
835 NullFields []string `json:"-"`
836 }
837
838 func (s *BitbucketServerConnectedRepository) MarshalJSON() ([]byte, error) {
839 type NoMethod BitbucketServerConnectedRepository
840 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
841 }
842
843
844
845 type BitbucketServerRepository struct {
846
847 BrowseUri string `json:"browseUri,omitempty"`
848
849 Description string `json:"description,omitempty"`
850
851 DisplayName string `json:"displayName,omitempty"`
852
853 Name string `json:"name,omitempty"`
854
855 RepoId *BitbucketServerRepositoryId `json:"repoId,omitempty"`
856
857
858
859
860
861 ForceSendFields []string `json:"-"`
862
863
864
865
866 NullFields []string `json:"-"`
867 }
868
869 func (s *BitbucketServerRepository) MarshalJSON() ([]byte, error) {
870 type NoMethod BitbucketServerRepository
871 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
872 }
873
874
875
876 type BitbucketServerRepositoryId struct {
877
878 ProjectKey string `json:"projectKey,omitempty"`
879
880 RepoSlug string `json:"repoSlug,omitempty"`
881
882
883
884 WebhookId int64 `json:"webhookId,omitempty"`
885
886
887
888
889
890 ForceSendFields []string `json:"-"`
891
892
893
894
895 NullFields []string `json:"-"`
896 }
897
898 func (s *BitbucketServerRepositoryId) MarshalJSON() ([]byte, error) {
899 type NoMethod BitbucketServerRepositoryId
900 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
901 }
902
903
904
905 type BitbucketServerSecrets struct {
906
907
908 AdminAccessTokenVersionName string `json:"adminAccessTokenVersionName,omitempty"`
909
910
911 ReadAccessTokenVersionName string `json:"readAccessTokenVersionName,omitempty"`
912
913
914
915
916 WebhookSecretVersionName string `json:"webhookSecretVersionName,omitempty"`
917
918
919
920
921
922 ForceSendFields []string `json:"-"`
923
924
925
926
927 NullFields []string `json:"-"`
928 }
929
930 func (s *BitbucketServerSecrets) MarshalJSON() ([]byte, error) {
931 type NoMethod BitbucketServerSecrets
932 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
933 }
934
935
936
937
938 type BitbucketServerTriggerConfig struct {
939
940
941 BitbucketServerConfig *BitbucketServerConfig `json:"bitbucketServerConfig,omitempty"`
942
943
944 BitbucketServerConfigResource string `json:"bitbucketServerConfigResource,omitempty"`
945
946
947
948 ProjectKey string `json:"projectKey,omitempty"`
949
950 PullRequest *PullRequestFilter `json:"pullRequest,omitempty"`
951
952 Push *PushFilter `json:"push,omitempty"`
953
954
955
956
957
958 RepoSlug string `json:"repoSlug,omitempty"`
959
960
961
962
963
964 ForceSendFields []string `json:"-"`
965
966
967
968
969 NullFields []string `json:"-"`
970 }
971
972 func (s *BitbucketServerTriggerConfig) MarshalJSON() ([]byte, error) {
973 type NoMethod BitbucketServerTriggerConfig
974 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
975 }
976
977
978
979
980
981
982
983
984
985
986
987
988
989 type Build struct {
990
991
992 Approval *BuildApproval `json:"approval,omitempty"`
993
994
995 Artifacts *Artifacts `json:"artifacts,omitempty"`
996
997 AvailableSecrets *Secrets `json:"availableSecrets,omitempty"`
998
999
1000 BuildTriggerId string `json:"buildTriggerId,omitempty"`
1001
1002
1003 CreateTime string `json:"createTime,omitempty"`
1004
1005
1006 FailureInfo *FailureInfo `json:"failureInfo,omitempty"`
1007
1008
1009
1010 FinishTime string `json:"finishTime,omitempty"`
1011
1012 GitConfig *GitConfig `json:"gitConfig,omitempty"`
1013
1014 Id string `json:"id,omitempty"`
1015
1016
1017
1018
1019
1020 Images []string `json:"images,omitempty"`
1021
1022 LogUrl string `json:"logUrl,omitempty"`
1023
1024
1025
1026
1027 LogsBucket string `json:"logsBucket,omitempty"`
1028
1029
1030
1031 Name string `json:"name,omitempty"`
1032
1033 Options *BuildOptions `json:"options,omitempty"`
1034
1035 ProjectId string `json:"projectId,omitempty"`
1036
1037
1038
1039 QueueTtl string `json:"queueTtl,omitempty"`
1040
1041 Results *Results `json:"results,omitempty"`
1042
1043
1044
1045
1046
1047 Secrets []*Secret `json:"secrets,omitempty"`
1048
1049
1050
1051
1052 ServiceAccount string `json:"serviceAccount,omitempty"`
1053
1054 Source *Source `json:"source,omitempty"`
1055
1056 SourceProvenance *SourceProvenance `json:"sourceProvenance,omitempty"`
1057
1058 StartTime string `json:"startTime,omitempty"`
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073 Status string `json:"status,omitempty"`
1074
1075
1076 StatusDetail string `json:"statusDetail,omitempty"`
1077
1078 Steps []*BuildStep `json:"steps,omitempty"`
1079
1080 Substitutions map[string]string `json:"substitutions,omitempty"`
1081
1082 Tags []string `json:"tags,omitempty"`
1083
1084
1085
1086
1087 Timeout string `json:"timeout,omitempty"`
1088
1089
1090
1091
1092
1093
1094 Timing map[string]TimeSpan `json:"timing,omitempty"`
1095
1096
1097 Warnings []*Warning `json:"warnings,omitempty"`
1098
1099
1100 googleapi.ServerResponse `json:"-"`
1101
1102
1103
1104
1105
1106 ForceSendFields []string `json:"-"`
1107
1108
1109
1110
1111 NullFields []string `json:"-"`
1112 }
1113
1114 func (s *Build) MarshalJSON() ([]byte, error) {
1115 type NoMethod Build
1116 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1117 }
1118
1119
1120
1121 type BuildApproval struct {
1122
1123 Config *ApprovalConfig `json:"config,omitempty"`
1124
1125 Result *ApprovalResult `json:"result,omitempty"`
1126
1127
1128
1129
1130
1131
1132
1133
1134 State string `json:"state,omitempty"`
1135
1136
1137
1138
1139
1140 ForceSendFields []string `json:"-"`
1141
1142
1143
1144
1145 NullFields []string `json:"-"`
1146 }
1147
1148 func (s *BuildApproval) MarshalJSON() ([]byte, error) {
1149 type NoMethod BuildApproval
1150 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1151 }
1152
1153
1154 type BuildOperationMetadata struct {
1155
1156 Build *Build `json:"build,omitempty"`
1157
1158
1159
1160
1161
1162 ForceSendFields []string `json:"-"`
1163
1164
1165
1166
1167 NullFields []string `json:"-"`
1168 }
1169
1170 func (s *BuildOperationMetadata) MarshalJSON() ([]byte, error) {
1171 type NoMethod BuildOperationMetadata
1172 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1173 }
1174
1175
1176 type BuildOptions struct {
1177
1178
1179 AutomapSubstitutions bool `json:"automapSubstitutions,omitempty"`
1180
1181
1182
1183
1184
1185
1186
1187
1188 DefaultLogsBucketBehavior string `json:"defaultLogsBucketBehavior,omitempty"`
1189
1190
1191
1192
1193
1194
1195 DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"`
1196
1197
1198
1199 DynamicSubstitutions bool `json:"dynamicSubstitutions,omitempty"`
1200
1201
1202
1203
1204
1205 Env []string `json:"env,omitempty"`
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215 LogStreamingOption string `json:"logStreamingOption,omitempty"`
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230 Logging string `json:"logging,omitempty"`
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240 MachineType string `json:"machineType,omitempty"`
1241
1242
1243
1244
1245 Pool *PoolOption `json:"pool,omitempty"`
1246
1247
1248
1249
1250
1251 RequestedVerifyOption string `json:"requestedVerifyOption,omitempty"`
1252
1253
1254
1255
1256 SecretEnv []string `json:"secretEnv,omitempty"`
1257
1258
1259
1260
1261
1262
1263
1264 SourceProvenanceHash []string `json:"sourceProvenanceHash,omitempty"`
1265
1266
1267
1268
1269
1270
1271
1272
1273 SubstitutionOption string `json:"substitutionOption,omitempty"`
1274
1275
1276
1277
1278
1279
1280 Volumes []*Volume `json:"volumes,omitempty"`
1281
1282 WorkerPool string `json:"workerPool,omitempty"`
1283
1284
1285
1286
1287
1288 ForceSendFields []string `json:"-"`
1289
1290
1291
1292
1293 NullFields []string `json:"-"`
1294 }
1295
1296 func (s *BuildOptions) MarshalJSON() ([]byte, error) {
1297 type NoMethod BuildOptions
1298 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1299 }
1300
1301
1302 type BuildStep struct {
1303
1304
1305
1306 AllowExitCodes []int64 `json:"allowExitCodes,omitempty"`
1307
1308
1309
1310
1311 AllowFailure bool `json:"allowFailure,omitempty"`
1312
1313
1314
1315
1316
1317 Args []string `json:"args,omitempty"`
1318
1319
1320
1321 AutomapSubstitutions bool `json:"automapSubstitutions,omitempty"`
1322
1323
1324
1325
1326
1327
1328
1329
1330 Dir string `json:"dir,omitempty"`
1331
1332
1333 Entrypoint string `json:"entrypoint,omitempty"`
1334
1335
1336
1337 Env []string `json:"env,omitempty"`
1338
1339 ExitCode int64 `json:"exitCode,omitempty"`
1340
1341
1342 Id string `json:"id,omitempty"`
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356 Name string `json:"name,omitempty"`
1357
1358
1359 PullTiming *TimeSpan `json:"pullTiming,omitempty"`
1360
1361
1362 Script string `json:"script,omitempty"`
1363
1364
1365
1366 SecretEnv []string `json:"secretEnv,omitempty"`
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383 Status string `json:"status,omitempty"`
1384
1385
1386
1387 Timeout string `json:"timeout,omitempty"`
1388
1389
1390 Timing *TimeSpan `json:"timing,omitempty"`
1391
1392
1393
1394
1395
1396 Volumes []*Volume `json:"volumes,omitempty"`
1397
1398
1399
1400
1401
1402 WaitFor []string `json:"waitFor,omitempty"`
1403
1404
1405
1406
1407
1408 ForceSendFields []string `json:"-"`
1409
1410
1411
1412
1413 NullFields []string `json:"-"`
1414 }
1415
1416 func (s *BuildStep) MarshalJSON() ([]byte, error) {
1417 type NoMethod BuildStep
1418 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1419 }
1420
1421
1422
1423 type BuildTrigger struct {
1424
1425
1426 ApprovalConfig *ApprovalConfig `json:"approvalConfig,omitempty"`
1427
1428
1429
1430 Autodetect bool `json:"autodetect,omitempty"`
1431
1432
1433
1434 BitbucketServerTriggerConfig *BitbucketServerTriggerConfig `json:"bitbucketServerTriggerConfig,omitempty"`
1435
1436 Build *Build `json:"build,omitempty"`
1437
1438 CreateTime string `json:"createTime,omitempty"`
1439
1440 Description string `json:"description,omitempty"`
1441
1442 Disabled bool `json:"disabled,omitempty"`
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453 EventType string `json:"eventType,omitempty"`
1454
1455
1456 Filename string `json:"filename,omitempty"`
1457
1458 Filter string `json:"filter,omitempty"`
1459
1460
1461 GitFileSource *GitFileSource `json:"gitFileSource,omitempty"`
1462
1463
1464
1465 Github *GitHubEventsConfig `json:"github,omitempty"`
1466
1467
1468
1469 GitlabEnterpriseEventsConfig *GitLabEventsConfig `json:"gitlabEnterpriseEventsConfig,omitempty"`
1470
1471 Id string `json:"id,omitempty"`
1472
1473
1474
1475
1476
1477
1478
1479 IgnoredFiles []string `json:"ignoredFiles,omitempty"`
1480
1481
1482
1483
1484
1485
1486
1487
1488 IncludeBuildLogs string `json:"includeBuildLogs,omitempty"`
1489
1490
1491
1492
1493
1494
1495 IncludedFiles []string `json:"includedFiles,omitempty"`
1496
1497
1498
1499
1500 Name string `json:"name,omitempty"`
1501
1502
1503 PubsubConfig *PubsubConfig `json:"pubsubConfig,omitempty"`
1504
1505
1506 RepositoryEventConfig *RepositoryEventConfig `json:"repositoryEventConfig,omitempty"`
1507
1508
1509
1510 ResourceName string `json:"resourceName,omitempty"`
1511
1512
1513
1514
1515
1516 ServiceAccount string `json:"serviceAccount,omitempty"`
1517
1518
1519
1520
1521
1522 SourceToBuild *GitRepoSource `json:"sourceToBuild,omitempty"`
1523
1524
1525 Substitutions map[string]string `json:"substitutions,omitempty"`
1526
1527 Tags []string `json:"tags,omitempty"`
1528
1529
1530
1531
1532 TriggerTemplate *RepoSource `json:"triggerTemplate,omitempty"`
1533
1534
1535 WebhookConfig *WebhookConfig `json:"webhookConfig,omitempty"`
1536
1537
1538 googleapi.ServerResponse `json:"-"`
1539
1540
1541
1542
1543
1544 ForceSendFields []string `json:"-"`
1545
1546
1547
1548
1549 NullFields []string `json:"-"`
1550 }
1551
1552 func (s *BuildTrigger) MarshalJSON() ([]byte, error) {
1553 type NoMethod BuildTrigger
1554 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1555 }
1556
1557
1558 type BuiltImage struct {
1559
1560 Digest string `json:"digest,omitempty"`
1561
1562
1563 Name string `json:"name,omitempty"`
1564
1565
1566 PushTiming *TimeSpan `json:"pushTiming,omitempty"`
1567
1568
1569
1570
1571
1572 ForceSendFields []string `json:"-"`
1573
1574
1575
1576
1577 NullFields []string `json:"-"`
1578 }
1579
1580 func (s *BuiltImage) MarshalJSON() ([]byte, error) {
1581 type NoMethod BuiltImage
1582 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1583 }
1584
1585
1586 type CancelBuildRequest struct {
1587
1588 Id string `json:"id,omitempty"`
1589
1590
1591 Name string `json:"name,omitempty"`
1592
1593 ProjectId string `json:"projectId,omitempty"`
1594
1595
1596
1597
1598
1599 ForceSendFields []string `json:"-"`
1600
1601
1602
1603
1604 NullFields []string `json:"-"`
1605 }
1606
1607 func (s *CancelBuildRequest) MarshalJSON() ([]byte, error) {
1608 type NoMethod CancelBuildRequest
1609 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1610 }
1611
1612
1613 type CancelOperationRequest struct {
1614 }
1615
1616
1617
1618 type ConnectedRepository struct {
1619
1620 Dir string `json:"dir,omitempty"`
1621
1622
1623 Repository string `json:"repository,omitempty"`
1624
1625
1626 Revision string `json:"revision,omitempty"`
1627
1628
1629
1630
1631
1632 ForceSendFields []string `json:"-"`
1633
1634
1635
1636
1637 NullFields []string `json:"-"`
1638 }
1639
1640 func (s *ConnectedRepository) MarshalJSON() ([]byte, error) {
1641 type NoMethod ConnectedRepository
1642 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1643 }
1644
1645
1646
1647 type CreateBitbucketServerConfigOperationMetadata struct {
1648
1649
1650
1651 BitbucketServerConfig string `json:"bitbucketServerConfig,omitempty"`
1652
1653 CompleteTime string `json:"completeTime,omitempty"`
1654
1655 CreateTime string `json:"createTime,omitempty"`
1656
1657
1658
1659
1660
1661 ForceSendFields []string `json:"-"`
1662
1663
1664
1665
1666 NullFields []string `json:"-"`
1667 }
1668
1669 func (s *CreateBitbucketServerConfigOperationMetadata) MarshalJSON() ([]byte, error) {
1670 type NoMethod CreateBitbucketServerConfigOperationMetadata
1671 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1672 }
1673
1674
1675
1676 type CreateBitbucketServerConnectedRepositoryRequest struct {
1677
1678
1679 BitbucketServerConnectedRepository *BitbucketServerConnectedRepository `json:"bitbucketServerConnectedRepository,omitempty"`
1680
1681
1682
1683 Parent string `json:"parent,omitempty"`
1684
1685
1686
1687
1688
1689
1690 ForceSendFields []string `json:"-"`
1691
1692
1693
1694
1695
1696 NullFields []string `json:"-"`
1697 }
1698
1699 func (s *CreateBitbucketServerConnectedRepositoryRequest) MarshalJSON() ([]byte, error) {
1700 type NoMethod CreateBitbucketServerConnectedRepositoryRequest
1701 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1702 }
1703
1704
1705
1706 type CreateGitHubEnterpriseConfigOperationMetadata struct {
1707
1708 CompleteTime string `json:"completeTime,omitempty"`
1709
1710 CreateTime string `json:"createTime,omitempty"`
1711
1712
1713
1714 GithubEnterpriseConfig string `json:"githubEnterpriseConfig,omitempty"`
1715
1716
1717
1718
1719
1720 ForceSendFields []string `json:"-"`
1721
1722
1723
1724
1725 NullFields []string `json:"-"`
1726 }
1727
1728 func (s *CreateGitHubEnterpriseConfigOperationMetadata) MarshalJSON() ([]byte, error) {
1729 type NoMethod CreateGitHubEnterpriseConfigOperationMetadata
1730 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1731 }
1732
1733
1734
1735 type CreateGitLabConfigOperationMetadata struct {
1736
1737 CompleteTime string `json:"completeTime,omitempty"`
1738
1739 CreateTime string `json:"createTime,omitempty"`
1740
1741
1742 GitlabConfig string `json:"gitlabConfig,omitempty"`
1743
1744
1745
1746
1747
1748 ForceSendFields []string `json:"-"`
1749
1750
1751
1752
1753 NullFields []string `json:"-"`
1754 }
1755
1756 func (s *CreateGitLabConfigOperationMetadata) MarshalJSON() ([]byte, error) {
1757 type NoMethod CreateGitLabConfigOperationMetadata
1758 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1759 }
1760
1761
1762
1763 type CreateGitLabConnectedRepositoryRequest struct {
1764
1765 GitlabConnectedRepository *GitLabConnectedRepository `json:"gitlabConnectedRepository,omitempty"`
1766
1767
1768
1769 Parent string `json:"parent,omitempty"`
1770
1771
1772
1773
1774
1775 ForceSendFields []string `json:"-"`
1776
1777
1778
1779
1780 NullFields []string `json:"-"`
1781 }
1782
1783 func (s *CreateGitLabConnectedRepositoryRequest) MarshalJSON() ([]byte, error) {
1784 type NoMethod CreateGitLabConnectedRepositoryRequest
1785 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1786 }
1787
1788
1789
1790 type CreateWorkerPoolOperationMetadata struct {
1791
1792 CompleteTime string `json:"completeTime,omitempty"`
1793
1794 CreateTime string `json:"createTime,omitempty"`
1795
1796
1797 WorkerPool string `json:"workerPool,omitempty"`
1798
1799
1800
1801
1802
1803 ForceSendFields []string `json:"-"`
1804
1805
1806
1807
1808 NullFields []string `json:"-"`
1809 }
1810
1811 func (s *CreateWorkerPoolOperationMetadata) MarshalJSON() ([]byte, error) {
1812 type NoMethod CreateWorkerPoolOperationMetadata
1813 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1814 }
1815
1816
1817 type DefaultServiceAccount struct {
1818
1819
1820 Name string `json:"name,omitempty"`
1821
1822
1823
1824
1825
1826
1827
1828 ServiceAccountEmail string `json:"serviceAccountEmail,omitempty"`
1829
1830
1831 googleapi.ServerResponse `json:"-"`
1832
1833
1834
1835
1836
1837 ForceSendFields []string `json:"-"`
1838
1839
1840
1841
1842 NullFields []string `json:"-"`
1843 }
1844
1845 func (s *DefaultServiceAccount) MarshalJSON() ([]byte, error) {
1846 type NoMethod DefaultServiceAccount
1847 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1848 }
1849
1850
1851
1852 type DeleteBitbucketServerConfigOperationMetadata struct {
1853
1854
1855
1856 BitbucketServerConfig string `json:"bitbucketServerConfig,omitempty"`
1857
1858 CompleteTime string `json:"completeTime,omitempty"`
1859
1860 CreateTime string `json:"createTime,omitempty"`
1861
1862
1863
1864
1865
1866 ForceSendFields []string `json:"-"`
1867
1868
1869
1870
1871 NullFields []string `json:"-"`
1872 }
1873
1874 func (s *DeleteBitbucketServerConfigOperationMetadata) MarshalJSON() ([]byte, error) {
1875 type NoMethod DeleteBitbucketServerConfigOperationMetadata
1876 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1877 }
1878
1879
1880
1881 type DeleteGitHubEnterpriseConfigOperationMetadata struct {
1882
1883 CompleteTime string `json:"completeTime,omitempty"`
1884
1885 CreateTime string `json:"createTime,omitempty"`
1886
1887
1888
1889 GithubEnterpriseConfig string `json:"githubEnterpriseConfig,omitempty"`
1890
1891
1892
1893
1894
1895 ForceSendFields []string `json:"-"`
1896
1897
1898
1899
1900 NullFields []string `json:"-"`
1901 }
1902
1903 func (s *DeleteGitHubEnterpriseConfigOperationMetadata) MarshalJSON() ([]byte, error) {
1904 type NoMethod DeleteGitHubEnterpriseConfigOperationMetadata
1905 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1906 }
1907
1908
1909
1910 type DeleteGitLabConfigOperationMetadata struct {
1911
1912 CompleteTime string `json:"completeTime,omitempty"`
1913
1914 CreateTime string `json:"createTime,omitempty"`
1915
1916
1917 GitlabConfig string `json:"gitlabConfig,omitempty"`
1918
1919
1920
1921
1922
1923 ForceSendFields []string `json:"-"`
1924
1925
1926
1927
1928 NullFields []string `json:"-"`
1929 }
1930
1931 func (s *DeleteGitLabConfigOperationMetadata) MarshalJSON() ([]byte, error) {
1932 type NoMethod DeleteGitLabConfigOperationMetadata
1933 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1934 }
1935
1936
1937
1938 type DeleteWorkerPoolOperationMetadata struct {
1939
1940 CompleteTime string `json:"completeTime,omitempty"`
1941
1942 CreateTime string `json:"createTime,omitempty"`
1943
1944
1945 WorkerPool string `json:"workerPool,omitempty"`
1946
1947
1948
1949
1950
1951 ForceSendFields []string `json:"-"`
1952
1953
1954
1955
1956 NullFields []string `json:"-"`
1957 }
1958
1959 func (s *DeleteWorkerPoolOperationMetadata) MarshalJSON() ([]byte, error) {
1960 type NoMethod DeleteWorkerPoolOperationMetadata
1961 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1962 }
1963
1964
1965
1966 type DeveloperConnectConfig struct {
1967
1968
1969 Dir string `json:"dir,omitempty"`
1970
1971
1972 GitRepositoryLink string `json:"gitRepositoryLink,omitempty"`
1973
1974
1975 Revision string `json:"revision,omitempty"`
1976
1977
1978
1979
1980
1981 ForceSendFields []string `json:"-"`
1982
1983
1984
1985
1986 NullFields []string `json:"-"`
1987 }
1988
1989 func (s *DeveloperConnectConfig) MarshalJSON() ([]byte, error) {
1990 type NoMethod DeveloperConnectConfig
1991 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1992 }
1993
1994
1995
1996
1997
1998 type Empty struct {
1999
2000 googleapi.ServerResponse `json:"-"`
2001 }
2002
2003
2004 type FailureInfo struct {
2005
2006 Detail string `json:"detail,omitempty"`
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017 Type string `json:"type,omitempty"`
2018
2019
2020
2021
2022
2023 ForceSendFields []string `json:"-"`
2024
2025
2026
2027
2028 NullFields []string `json:"-"`
2029 }
2030
2031 func (s *FailureInfo) MarshalJSON() ([]byte, error) {
2032 type NoMethod FailureInfo
2033 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2034 }
2035
2036
2037
2038 type FileHashes struct {
2039
2040 FileHash []*Hash `json:"fileHash,omitempty"`
2041
2042
2043
2044
2045
2046 ForceSendFields []string `json:"-"`
2047
2048
2049
2050
2051 NullFields []string `json:"-"`
2052 }
2053
2054 func (s *FileHashes) MarshalJSON() ([]byte, error) {
2055 type NoMethod FileHashes
2056 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2057 }
2058
2059
2060 type GitConfig struct {
2061
2062 Http *HttpConfig `json:"http,omitempty"`
2063
2064
2065
2066
2067
2068 ForceSendFields []string `json:"-"`
2069
2070
2071
2072
2073 NullFields []string `json:"-"`
2074 }
2075
2076 func (s *GitConfig) MarshalJSON() ([]byte, error) {
2077 type NoMethod GitConfig
2078 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2079 }
2080
2081
2082
2083 type GitFileSource struct {
2084
2085
2086
2087 BitbucketServerConfig string `json:"bitbucketServerConfig,omitempty"`
2088
2089
2090
2091
2092 GithubEnterpriseConfig string `json:"githubEnterpriseConfig,omitempty"`
2093
2094 Path string `json:"path,omitempty"`
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107 RepoType string `json:"repoType,omitempty"`
2108
2109
2110
2111
2112 Repository string `json:"repository,omitempty"`
2113
2114
2115
2116
2117
2118 Revision string `json:"revision,omitempty"`
2119
2120
2121
2122 Uri string `json:"uri,omitempty"`
2123
2124
2125
2126
2127
2128 ForceSendFields []string `json:"-"`
2129
2130
2131
2132
2133 NullFields []string `json:"-"`
2134 }
2135
2136 func (s *GitFileSource) MarshalJSON() ([]byte, error) {
2137 type NoMethod GitFileSource
2138 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2139 }
2140
2141
2142
2143 type GitHubEnterpriseConfig struct {
2144
2145
2146 AppId int64 `json:"appId,omitempty,string"`
2147
2148
2149 CreateTime string `json:"createTime,omitempty"`
2150
2151 DisplayName string `json:"displayName,omitempty"`
2152
2153 HostUrl string `json:"hostUrl,omitempty"`
2154
2155
2156
2157
2158 Name string `json:"name,omitempty"`
2159
2160
2161
2162
2163
2164
2165
2166
2167 PeeredNetwork string `json:"peeredNetwork,omitempty"`
2168
2169 Secrets *GitHubEnterpriseSecrets `json:"secrets,omitempty"`
2170
2171 SslCa string `json:"sslCa,omitempty"`
2172
2173
2174 WebhookKey string `json:"webhookKey,omitempty"`
2175
2176
2177 googleapi.ServerResponse `json:"-"`
2178
2179
2180
2181
2182
2183 ForceSendFields []string `json:"-"`
2184
2185
2186
2187
2188 NullFields []string `json:"-"`
2189 }
2190
2191 func (s *GitHubEnterpriseConfig) MarshalJSON() ([]byte, error) {
2192 type NoMethod GitHubEnterpriseConfig
2193 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2194 }
2195
2196
2197
2198
2199 type GitHubEnterpriseSecrets struct {
2200
2201
2202 OauthClientIdName string `json:"oauthClientIdName,omitempty"`
2203
2204
2205 OauthClientIdVersionName string `json:"oauthClientIdVersionName,omitempty"`
2206
2207 OauthSecretName string `json:"oauthSecretName,omitempty"`
2208
2209
2210 OauthSecretVersionName string `json:"oauthSecretVersionName,omitempty"`
2211
2212 PrivateKeyName string `json:"privateKeyName,omitempty"`
2213
2214 PrivateKeyVersionName string `json:"privateKeyVersionName,omitempty"`
2215
2216
2217 WebhookSecretName string `json:"webhookSecretName,omitempty"`
2218
2219
2220 WebhookSecretVersionName string `json:"webhookSecretVersionName,omitempty"`
2221
2222
2223
2224
2225
2226 ForceSendFields []string `json:"-"`
2227
2228
2229
2230
2231 NullFields []string `json:"-"`
2232 }
2233
2234 func (s *GitHubEnterpriseSecrets) MarshalJSON() ([]byte, error) {
2235 type NoMethod GitHubEnterpriseSecrets
2236 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2237 }
2238
2239
2240
2241 type GitHubEventsConfig struct {
2242
2243
2244
2245
2246 EnterpriseConfigResourceName string `json:"enterpriseConfigResourceName,omitempty"`
2247
2248 InstallationId int64 `json:"installationId,omitempty,string"`
2249
2250
2251 Name string `json:"name,omitempty"`
2252
2253
2254
2255 Owner string `json:"owner,omitempty"`
2256
2257 PullRequest *PullRequestFilter `json:"pullRequest,omitempty"`
2258
2259 Push *PushFilter `json:"push,omitempty"`
2260
2261
2262
2263
2264
2265 ForceSendFields []string `json:"-"`
2266
2267
2268
2269
2270 NullFields []string `json:"-"`
2271 }
2272
2273 func (s *GitHubEventsConfig) MarshalJSON() ([]byte, error) {
2274 type NoMethod GitHubEventsConfig
2275 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2276 }
2277
2278
2279
2280 type GitLabConfig struct {
2281
2282
2283 ConnectedRepositories []*GitLabRepositoryId `json:"connectedRepositories,omitempty"`
2284
2285 CreateTime string `json:"createTime,omitempty"`
2286
2287 EnterpriseConfig *GitLabEnterpriseConfig `json:"enterpriseConfig,omitempty"`
2288
2289 Name string `json:"name,omitempty"`
2290
2291 Secrets *GitLabSecrets `json:"secrets,omitempty"`
2292
2293
2294 Username string `json:"username,omitempty"`
2295
2296
2297 WebhookKey string `json:"webhookKey,omitempty"`
2298
2299
2300 googleapi.ServerResponse `json:"-"`
2301
2302
2303
2304
2305
2306 ForceSendFields []string `json:"-"`
2307
2308
2309
2310
2311 NullFields []string `json:"-"`
2312 }
2313
2314 func (s *GitLabConfig) MarshalJSON() ([]byte, error) {
2315 type NoMethod GitLabConfig
2316 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2317 }
2318
2319
2320
2321 type GitLabConnectedRepository struct {
2322
2323
2324 Parent string `json:"parent,omitempty"`
2325
2326 Repo *GitLabRepositoryId `json:"repo,omitempty"`
2327
2328 Status *Status `json:"status,omitempty"`
2329
2330
2331
2332
2333
2334 ForceSendFields []string `json:"-"`
2335
2336
2337
2338
2339 NullFields []string `json:"-"`
2340 }
2341
2342 func (s *GitLabConnectedRepository) MarshalJSON() ([]byte, error) {
2343 type NoMethod GitLabConnectedRepository
2344 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2345 }
2346
2347
2348
2349 type GitLabEnterpriseConfig struct {
2350
2351 HostUri string `json:"hostUri,omitempty"`
2352
2353
2354 ServiceDirectoryConfig *ServiceDirectoryConfig `json:"serviceDirectoryConfig,omitempty"`
2355
2356
2357 SslCa string `json:"sslCa,omitempty"`
2358
2359
2360
2361
2362
2363 ForceSendFields []string `json:"-"`
2364
2365
2366
2367
2368 NullFields []string `json:"-"`
2369 }
2370
2371 func (s *GitLabEnterpriseConfig) MarshalJSON() ([]byte, error) {
2372 type NoMethod GitLabEnterpriseConfig
2373 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2374 }
2375
2376
2377
2378 type GitLabEventsConfig struct {
2379
2380
2381 GitlabConfig *GitLabConfig `json:"gitlabConfig,omitempty"`
2382
2383
2384 GitlabConfigResource string `json:"gitlabConfigResource,omitempty"`
2385
2386 ProjectNamespace string `json:"projectNamespace,omitempty"`
2387
2388 PullRequest *PullRequestFilter `json:"pullRequest,omitempty"`
2389
2390 Push *PushFilter `json:"push,omitempty"`
2391
2392
2393
2394
2395
2396 ForceSendFields []string `json:"-"`
2397
2398
2399
2400
2401 NullFields []string `json:"-"`
2402 }
2403
2404 func (s *GitLabEventsConfig) MarshalJSON() ([]byte, error) {
2405 type NoMethod GitLabEventsConfig
2406 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2407 }
2408
2409
2410 type GitLabRepository struct {
2411
2412 BrowseUri string `json:"browseUri,omitempty"`
2413
2414 Description string `json:"description,omitempty"`
2415
2416 DisplayName string `json:"displayName,omitempty"`
2417
2418 Name string `json:"name,omitempty"`
2419
2420 RepositoryId *GitLabRepositoryId `json:"repositoryId,omitempty"`
2421
2422
2423
2424
2425
2426 ForceSendFields []string `json:"-"`
2427
2428
2429
2430
2431 NullFields []string `json:"-"`
2432 }
2433
2434 func (s *GitLabRepository) MarshalJSON() ([]byte, error) {
2435 type NoMethod GitLabRepository
2436 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2437 }
2438
2439
2440
2441 type GitLabRepositoryId struct {
2442
2443
2444 Id string `json:"id,omitempty"`
2445
2446
2447
2448 WebhookId int64 `json:"webhookId,omitempty"`
2449
2450
2451
2452
2453
2454 ForceSendFields []string `json:"-"`
2455
2456
2457
2458
2459 NullFields []string `json:"-"`
2460 }
2461
2462 func (s *GitLabRepositoryId) MarshalJSON() ([]byte, error) {
2463 type NoMethod GitLabRepositoryId
2464 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2465 }
2466
2467
2468
2469 type GitLabSecrets struct {
2470
2471
2472 ApiAccessTokenVersion string `json:"apiAccessTokenVersion,omitempty"`
2473
2474
2475 ApiKeyVersion string `json:"apiKeyVersion,omitempty"`
2476
2477
2478 ReadAccessTokenVersion string `json:"readAccessTokenVersion,omitempty"`
2479
2480
2481
2482 WebhookSecretVersion string `json:"webhookSecretVersion,omitempty"`
2483
2484
2485
2486
2487
2488 ForceSendFields []string `json:"-"`
2489
2490
2491
2492
2493 NullFields []string `json:"-"`
2494 }
2495
2496 func (s *GitLabSecrets) MarshalJSON() ([]byte, error) {
2497 type NoMethod GitLabSecrets
2498 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2499 }
2500
2501
2502 type GitRepoSource struct {
2503
2504
2505
2506 BitbucketServerConfig string `json:"bitbucketServerConfig,omitempty"`
2507
2508
2509
2510
2511 GithubEnterpriseConfig string `json:"githubEnterpriseConfig,omitempty"`
2512
2513 Ref string `json:"ref,omitempty"`
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526 RepoType string `json:"repoType,omitempty"`
2527
2528
2529
2530 Repository string `json:"repository,omitempty"`
2531
2532
2533 Uri string `json:"uri,omitempty"`
2534
2535
2536
2537
2538
2539 ForceSendFields []string `json:"-"`
2540
2541
2542
2543
2544 NullFields []string `json:"-"`
2545 }
2546
2547 func (s *GitRepoSource) MarshalJSON() ([]byte, error) {
2548 type NoMethod GitRepoSource
2549 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2550 }
2551
2552
2553 type GitSource struct {
2554
2555
2556
2557 Dir string `json:"dir,omitempty"`
2558
2559
2560
2561
2562
2563
2564
2565 Revision string `json:"revision,omitempty"`
2566
2567
2568 Url string `json:"url,omitempty"`
2569
2570
2571
2572
2573
2574 ForceSendFields []string `json:"-"`
2575
2576
2577
2578
2579 NullFields []string `json:"-"`
2580 }
2581
2582 func (s *GitSource) MarshalJSON() ([]byte, error) {
2583 type NoMethod GitSource
2584 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2585 }
2586
2587
2588 type Hash struct {
2589
2590
2591
2592
2593
2594
2595
2596 Type string `json:"type,omitempty"`
2597
2598 Value string `json:"value,omitempty"`
2599
2600
2601
2602
2603
2604 ForceSendFields []string `json:"-"`
2605
2606
2607
2608
2609 NullFields []string `json:"-"`
2610 }
2611
2612 func (s *Hash) MarshalJSON() ([]byte, error) {
2613 type NoMethod Hash
2614 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2615 }
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634 type HttpBody struct {
2635
2636
2637 ContentType string `json:"contentType,omitempty"`
2638
2639 Data string `json:"data,omitempty"`
2640
2641
2642 Extensions []googleapi.RawMessage `json:"extensions,omitempty"`
2643
2644
2645
2646
2647
2648 ForceSendFields []string `json:"-"`
2649
2650
2651
2652
2653 NullFields []string `json:"-"`
2654 }
2655
2656 func (s *HttpBody) MarshalJSON() ([]byte, error) {
2657 type NoMethod HttpBody
2658 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2659 }
2660
2661
2662 type HttpConfig struct {
2663
2664
2665 ProxySecretVersionName string `json:"proxySecretVersionName,omitempty"`
2666
2667
2668
2669
2670
2671 ForceSendFields []string `json:"-"`
2672
2673
2674
2675
2676 NullFields []string `json:"-"`
2677 }
2678
2679 func (s *HttpConfig) MarshalJSON() ([]byte, error) {
2680 type NoMethod HttpConfig
2681 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2682 }
2683
2684
2685
2686 type InlineSecret struct {
2687
2688
2689
2690
2691
2692 EnvMap map[string]string `json:"envMap,omitempty"`
2693
2694
2695 KmsKeyName string `json:"kmsKeyName,omitempty"`
2696
2697
2698
2699
2700
2701 ForceSendFields []string `json:"-"`
2702
2703
2704
2705
2706 NullFields []string `json:"-"`
2707 }
2708
2709 func (s *InlineSecret) MarshalJSON() ([]byte, error) {
2710 type NoMethod InlineSecret
2711 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2712 }
2713
2714
2715
2716 type ListBitbucketServerConfigsResponse struct {
2717
2718 BitbucketServerConfigs []*BitbucketServerConfig `json:"bitbucketServerConfigs,omitempty"`
2719
2720
2721 NextPageToken string `json:"nextPageToken,omitempty"`
2722
2723
2724 googleapi.ServerResponse `json:"-"`
2725
2726
2727
2728
2729
2730 ForceSendFields []string `json:"-"`
2731
2732
2733
2734
2735 NullFields []string `json:"-"`
2736 }
2737
2738 func (s *ListBitbucketServerConfigsResponse) MarshalJSON() ([]byte, error) {
2739 type NoMethod ListBitbucketServerConfigsResponse
2740 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2741 }
2742
2743
2744
2745 type ListBitbucketServerRepositoriesResponse struct {
2746
2747 BitbucketServerRepositories []*BitbucketServerRepository `json:"bitbucketServerRepositories,omitempty"`
2748
2749
2750 NextPageToken string `json:"nextPageToken,omitempty"`
2751
2752
2753 googleapi.ServerResponse `json:"-"`
2754
2755
2756
2757
2758
2759 ForceSendFields []string `json:"-"`
2760
2761
2762
2763
2764 NullFields []string `json:"-"`
2765 }
2766
2767 func (s *ListBitbucketServerRepositoriesResponse) MarshalJSON() ([]byte, error) {
2768 type NoMethod ListBitbucketServerRepositoriesResponse
2769 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2770 }
2771
2772
2773 type ListBuildTriggersResponse struct {
2774
2775 NextPageToken string `json:"nextPageToken,omitempty"`
2776
2777
2778 Triggers []*BuildTrigger `json:"triggers,omitempty"`
2779
2780
2781 googleapi.ServerResponse `json:"-"`
2782
2783
2784
2785
2786
2787 ForceSendFields []string `json:"-"`
2788
2789
2790
2791
2792 NullFields []string `json:"-"`
2793 }
2794
2795 func (s *ListBuildTriggersResponse) MarshalJSON() ([]byte, error) {
2796 type NoMethod ListBuildTriggersResponse
2797 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2798 }
2799
2800
2801 type ListBuildsResponse struct {
2802
2803 Builds []*Build `json:"builds,omitempty"`
2804
2805
2806 NextPageToken string `json:"nextPageToken,omitempty"`
2807
2808
2809 googleapi.ServerResponse `json:"-"`
2810
2811
2812
2813
2814
2815 ForceSendFields []string `json:"-"`
2816
2817
2818
2819
2820 NullFields []string `json:"-"`
2821 }
2822
2823 func (s *ListBuildsResponse) MarshalJSON() ([]byte, error) {
2824 type NoMethod ListBuildsResponse
2825 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2826 }
2827
2828
2829
2830 type ListGitLabConfigsResponse struct {
2831
2832 GitlabConfigs []*GitLabConfig `json:"gitlabConfigs,omitempty"`
2833
2834
2835 NextPageToken string `json:"nextPageToken,omitempty"`
2836
2837
2838 googleapi.ServerResponse `json:"-"`
2839
2840
2841
2842
2843
2844 ForceSendFields []string `json:"-"`
2845
2846
2847
2848
2849 NullFields []string `json:"-"`
2850 }
2851
2852 func (s *ListGitLabConfigsResponse) MarshalJSON() ([]byte, error) {
2853 type NoMethod ListGitLabConfigsResponse
2854 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2855 }
2856
2857
2858
2859 type ListGitLabRepositoriesResponse struct {
2860
2861 GitlabRepositories []*GitLabRepository `json:"gitlabRepositories,omitempty"`
2862
2863
2864 NextPageToken string `json:"nextPageToken,omitempty"`
2865
2866
2867 googleapi.ServerResponse `json:"-"`
2868
2869
2870
2871
2872
2873 ForceSendFields []string `json:"-"`
2874
2875
2876
2877
2878 NullFields []string `json:"-"`
2879 }
2880
2881 func (s *ListGitLabRepositoriesResponse) MarshalJSON() ([]byte, error) {
2882 type NoMethod ListGitLabRepositoriesResponse
2883 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2884 }
2885
2886
2887
2888 type ListGithubEnterpriseConfigsResponse struct {
2889
2890 Configs []*GitHubEnterpriseConfig `json:"configs,omitempty"`
2891
2892
2893 googleapi.ServerResponse `json:"-"`
2894
2895
2896
2897
2898
2899 ForceSendFields []string `json:"-"`
2900
2901
2902
2903
2904 NullFields []string `json:"-"`
2905 }
2906
2907 func (s *ListGithubEnterpriseConfigsResponse) MarshalJSON() ([]byte, error) {
2908 type NoMethod ListGithubEnterpriseConfigsResponse
2909 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2910 }
2911
2912
2913 type ListWorkerPoolsResponse struct {
2914
2915
2916
2917 NextPageToken string `json:"nextPageToken,omitempty"`
2918
2919 WorkerPools []*WorkerPool `json:"workerPools,omitempty"`
2920
2921
2922 googleapi.ServerResponse `json:"-"`
2923
2924
2925
2926
2927
2928 ForceSendFields []string `json:"-"`
2929
2930
2931
2932
2933 NullFields []string `json:"-"`
2934 }
2935
2936 func (s *ListWorkerPoolsResponse) MarshalJSON() ([]byte, error) {
2937 type NoMethod ListWorkerPoolsResponse
2938 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2939 }
2940
2941
2942
2943 type MavenArtifact struct {
2944
2945
2946 ArtifactId string `json:"artifactId,omitempty"`
2947
2948
2949 GroupId string `json:"groupId,omitempty"`
2950
2951
2952
2953
2954 Path string `json:"path,omitempty"`
2955
2956
2957
2958
2959 Repository string `json:"repository,omitempty"`
2960
2961
2962 Version string `json:"version,omitempty"`
2963
2964
2965
2966
2967
2968 ForceSendFields []string `json:"-"`
2969
2970
2971
2972
2973 NullFields []string `json:"-"`
2974 }
2975
2976 func (s *MavenArtifact) MarshalJSON() ([]byte, error) {
2977 type NoMethod MavenArtifact
2978 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2979 }
2980
2981
2982 type NetworkConfig struct {
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992 EgressOption string `json:"egressOption,omitempty"`
2993
2994
2995
2996
2997
2998
2999
3000 PeeredNetwork string `json:"peeredNetwork,omitempty"`
3001
3002
3003
3004
3005
3006
3007
3008 PeeredNetworkIpRange string `json:"peeredNetworkIpRange,omitempty"`
3009
3010
3011
3012
3013
3014 ForceSendFields []string `json:"-"`
3015
3016
3017
3018
3019 NullFields []string `json:"-"`
3020 }
3021
3022 func (s *NetworkConfig) MarshalJSON() ([]byte, error) {
3023 type NoMethod NetworkConfig
3024 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3025 }
3026
3027
3028
3029 type NpmPackage struct {
3030
3031 PackagePath string `json:"packagePath,omitempty"`
3032
3033
3034
3035
3036 Repository string `json:"repository,omitempty"`
3037
3038
3039
3040
3041
3042 ForceSendFields []string `json:"-"`
3043
3044
3045
3046
3047 NullFields []string `json:"-"`
3048 }
3049
3050 func (s *NpmPackage) MarshalJSON() ([]byte, error) {
3051 type NoMethod NpmPackage
3052 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3053 }
3054
3055
3056
3057 type Operation struct {
3058
3059
3060
3061 Done bool `json:"done,omitempty"`
3062
3063 Error *Status `json:"error,omitempty"`
3064
3065
3066
3067
3068 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
3069
3070
3071
3072 Name string `json:"name,omitempty"`
3073
3074
3075
3076
3077
3078
3079
3080 Response googleapi.RawMessage `json:"response,omitempty"`
3081
3082
3083 googleapi.ServerResponse `json:"-"`
3084
3085
3086
3087
3088
3089 ForceSendFields []string `json:"-"`
3090
3091
3092
3093
3094 NullFields []string `json:"-"`
3095 }
3096
3097 func (s *Operation) MarshalJSON() ([]byte, error) {
3098 type NoMethod Operation
3099 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3100 }
3101
3102
3103 type OperationMetadata struct {
3104
3105 ApiVersion string `json:"apiVersion,omitempty"`
3106
3107
3108
3109
3110 CancelRequested bool `json:"cancelRequested,omitempty"`
3111
3112 CreateTime string `json:"createTime,omitempty"`
3113
3114 EndTime string `json:"endTime,omitempty"`
3115
3116 StatusDetail string `json:"statusDetail,omitempty"`
3117
3118
3119 Target string `json:"target,omitempty"`
3120
3121 Verb string `json:"verb,omitempty"`
3122
3123
3124
3125
3126
3127 ForceSendFields []string `json:"-"`
3128
3129
3130
3131
3132 NullFields []string `json:"-"`
3133 }
3134
3135 func (s *OperationMetadata) MarshalJSON() ([]byte, error) {
3136 type NoMethod OperationMetadata
3137 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3138 }
3139
3140
3141
3142
3143
3144 type PoolOption struct {
3145
3146
3147
3148 Name string `json:"name,omitempty"`
3149
3150
3151
3152
3153
3154 ForceSendFields []string `json:"-"`
3155
3156
3157
3158
3159 NullFields []string `json:"-"`
3160 }
3161
3162 func (s *PoolOption) MarshalJSON() ([]byte, error) {
3163 type NoMethod PoolOption
3164 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3165 }
3166
3167
3168 type PrivatePoolV1Config struct {
3169
3170 NetworkConfig *NetworkConfig `json:"networkConfig,omitempty"`
3171
3172 WorkerConfig *WorkerConfig `json:"workerConfig,omitempty"`
3173
3174
3175
3176
3177
3178 ForceSendFields []string `json:"-"`
3179
3180
3181
3182
3183 NullFields []string `json:"-"`
3184 }
3185
3186 func (s *PrivatePoolV1Config) MarshalJSON() ([]byte, error) {
3187 type NoMethod PrivatePoolV1Config
3188 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3189 }
3190
3191
3192
3193 type ProcessAppManifestCallbackOperationMetadata struct {
3194
3195 CompleteTime string `json:"completeTime,omitempty"`
3196
3197 CreateTime string `json:"createTime,omitempty"`
3198
3199
3200
3201 GithubEnterpriseConfig string `json:"githubEnterpriseConfig,omitempty"`
3202
3203
3204
3205
3206
3207 ForceSendFields []string `json:"-"`
3208
3209
3210
3211
3212 NullFields []string `json:"-"`
3213 }
3214
3215 func (s *ProcessAppManifestCallbackOperationMetadata) MarshalJSON() ([]byte, error) {
3216 type NoMethod ProcessAppManifestCallbackOperationMetadata
3217 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3218 }
3219
3220
3221
3222 type PubsubConfig struct {
3223
3224 ServiceAccountEmail string `json:"serviceAccountEmail,omitempty"`
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235 State string `json:"state,omitempty"`
3236
3237
3238 Subscription string `json:"subscription,omitempty"`
3239
3240
3241 Topic string `json:"topic,omitempty"`
3242
3243
3244
3245
3246
3247 ForceSendFields []string `json:"-"`
3248
3249
3250
3251
3252 NullFields []string `json:"-"`
3253 }
3254
3255 func (s *PubsubConfig) MarshalJSON() ([]byte, error) {
3256 type NoMethod PubsubConfig
3257 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3258 }
3259
3260
3261
3262 type PullRequestFilter struct {
3263
3264
3265
3266 Branch string `json:"branch,omitempty"`
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289 CommentControl string `json:"commentControl,omitempty"`
3290
3291
3292 InvertRegex bool `json:"invertRegex,omitempty"`
3293
3294
3295
3296
3297
3298 ForceSendFields []string `json:"-"`
3299
3300
3301
3302
3303 NullFields []string `json:"-"`
3304 }
3305
3306 func (s *PullRequestFilter) MarshalJSON() ([]byte, error) {
3307 type NoMethod PullRequestFilter
3308 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3309 }
3310
3311
3312 type PushFilter struct {
3313
3314
3315
3316 Branch string `json:"branch,omitempty"`
3317
3318
3319 InvertRegex bool `json:"invertRegex,omitempty"`
3320
3321
3322
3323 Tag string `json:"tag,omitempty"`
3324
3325
3326
3327
3328
3329 ForceSendFields []string `json:"-"`
3330
3331
3332
3333
3334 NullFields []string `json:"-"`
3335 }
3336
3337 func (s *PushFilter) MarshalJSON() ([]byte, error) {
3338 type NoMethod PushFilter
3339 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3340 }
3341
3342
3343
3344
3345 type PythonPackage struct {
3346
3347
3348 Paths []string `json:"paths,omitempty"`
3349
3350
3351
3352
3353 Repository string `json:"repository,omitempty"`
3354
3355
3356
3357
3358
3359 ForceSendFields []string `json:"-"`
3360
3361
3362
3363
3364 NullFields []string `json:"-"`
3365 }
3366
3367 func (s *PythonPackage) MarshalJSON() ([]byte, error) {
3368 type NoMethod PythonPackage
3369 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3370 }
3371
3372
3373
3374 type ReceiveTriggerWebhookResponse struct {
3375
3376 googleapi.ServerResponse `json:"-"`
3377 }
3378
3379
3380
3381 type RemoveBitbucketServerConnectedRepositoryRequest struct {
3382
3383 ConnectedRepository *BitbucketServerRepositoryId `json:"connectedRepository,omitempty"`
3384
3385
3386
3387
3388
3389 ForceSendFields []string `json:"-"`
3390
3391
3392
3393
3394 NullFields []string `json:"-"`
3395 }
3396
3397 func (s *RemoveBitbucketServerConnectedRepositoryRequest) MarshalJSON() ([]byte, error) {
3398 type NoMethod RemoveBitbucketServerConnectedRepositoryRequest
3399 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3400 }
3401
3402
3403
3404 type RemoveGitLabConnectedRepositoryRequest struct {
3405
3406 ConnectedRepository *GitLabRepositoryId `json:"connectedRepository,omitempty"`
3407
3408
3409
3410
3411
3412 ForceSendFields []string `json:"-"`
3413
3414
3415
3416
3417 NullFields []string `json:"-"`
3418 }
3419
3420 func (s *RemoveGitLabConnectedRepositoryRequest) MarshalJSON() ([]byte, error) {
3421 type NoMethod RemoveGitLabConnectedRepositoryRequest
3422 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3423 }
3424
3425
3426 type RepoSource struct {
3427
3428
3429
3430 BranchName string `json:"branchName,omitempty"`
3431
3432 CommitSha string `json:"commitSha,omitempty"`
3433
3434
3435
3436 Dir string `json:"dir,omitempty"`
3437
3438
3439 InvertRegex bool `json:"invertRegex,omitempty"`
3440
3441
3442 ProjectId string `json:"projectId,omitempty"`
3443
3444 RepoName string `json:"repoName,omitempty"`
3445
3446
3447 Substitutions map[string]string `json:"substitutions,omitempty"`
3448
3449
3450
3451 TagName string `json:"tagName,omitempty"`
3452
3453
3454
3455
3456
3457 ForceSendFields []string `json:"-"`
3458
3459
3460
3461
3462 NullFields []string `json:"-"`
3463 }
3464
3465 func (s *RepoSource) MarshalJSON() ([]byte, error) {
3466 type NoMethod RepoSource
3467 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3468 }
3469
3470
3471
3472 type RepositoryEventConfig struct {
3473
3474 PullRequest *PullRequestFilter `json:"pullRequest,omitempty"`
3475
3476 Push *PushFilter `json:"push,omitempty"`
3477
3478 Repository string `json:"repository,omitempty"`
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490 RepositoryType string `json:"repositoryType,omitempty"`
3491
3492
3493
3494
3495
3496 ForceSendFields []string `json:"-"`
3497
3498
3499
3500
3501 NullFields []string `json:"-"`
3502 }
3503
3504 func (s *RepositoryEventConfig) MarshalJSON() ([]byte, error) {
3505 type NoMethod RepositoryEventConfig
3506 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3507 }
3508
3509
3510 type Results struct {
3511
3512
3513
3514 ArtifactManifest string `json:"artifactManifest,omitempty"`
3515
3516 ArtifactTiming *TimeSpan `json:"artifactTiming,omitempty"`
3517
3518
3519 BuildStepImages []string `json:"buildStepImages,omitempty"`
3520
3521
3522
3523
3524
3525 BuildStepOutputs []string `json:"buildStepOutputs,omitempty"`
3526
3527 Images []*BuiltImage `json:"images,omitempty"`
3528
3529
3530 MavenArtifacts []*UploadedMavenArtifact `json:"mavenArtifacts,omitempty"`
3531
3532
3533 NpmPackages []*UploadedNpmPackage `json:"npmPackages,omitempty"`
3534
3535
3536 NumArtifacts int64 `json:"numArtifacts,omitempty,string"`
3537
3538
3539 PythonPackages []*UploadedPythonPackage `json:"pythonPackages,omitempty"`
3540
3541
3542
3543
3544
3545 ForceSendFields []string `json:"-"`
3546
3547
3548
3549
3550 NullFields []string `json:"-"`
3551 }
3552
3553 func (s *Results) MarshalJSON() ([]byte, error) {
3554 type NoMethod Results
3555 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3556 }
3557
3558
3559 type RetryBuildRequest struct {
3560
3561 Id string `json:"id,omitempty"`
3562
3563
3564 Name string `json:"name,omitempty"`
3565
3566 ProjectId string `json:"projectId,omitempty"`
3567
3568
3569
3570
3571
3572 ForceSendFields []string `json:"-"`
3573
3574
3575
3576
3577 NullFields []string `json:"-"`
3578 }
3579
3580 func (s *RetryBuildRequest) MarshalJSON() ([]byte, error) {
3581 type NoMethod RetryBuildRequest
3582 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3583 }
3584
3585
3586
3587 type RunBuildTriggerRequest struct {
3588
3589 ProjectId string `json:"projectId,omitempty"`
3590
3591
3592 Source *RepoSource `json:"source,omitempty"`
3593
3594 TriggerId string `json:"triggerId,omitempty"`
3595
3596
3597
3598
3599
3600 ForceSendFields []string `json:"-"`
3601
3602
3603
3604
3605 NullFields []string `json:"-"`
3606 }
3607
3608 func (s *RunBuildTriggerRequest) MarshalJSON() ([]byte, error) {
3609 type NoMethod RunBuildTriggerRequest
3610 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3611 }
3612
3613
3614
3615
3616
3617
3618 type Secret struct {
3619
3620 KmsKeyName string `json:"kmsKeyName,omitempty"`
3621
3622
3623
3624
3625
3626 SecretEnv map[string]string `json:"secretEnv,omitempty"`
3627
3628
3629
3630
3631
3632 ForceSendFields []string `json:"-"`
3633
3634
3635
3636
3637 NullFields []string `json:"-"`
3638 }
3639
3640 func (s *Secret) MarshalJSON() ([]byte, error) {
3641 type NoMethod Secret
3642 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3643 }
3644
3645
3646
3647 type SecretManagerSecret struct {
3648
3649
3650
3651 Env string `json:"env,omitempty"`
3652
3653
3654 VersionName string `json:"versionName,omitempty"`
3655
3656
3657
3658
3659
3660 ForceSendFields []string `json:"-"`
3661
3662
3663
3664
3665 NullFields []string `json:"-"`
3666 }
3667
3668 func (s *SecretManagerSecret) MarshalJSON() ([]byte, error) {
3669 type NoMethod SecretManagerSecret
3670 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3671 }
3672
3673
3674 type Secrets struct {
3675
3676
3677 Inline []*InlineSecret `json:"inline,omitempty"`
3678
3679
3680 SecretManager []*SecretManagerSecret `json:"secretManager,omitempty"`
3681
3682
3683
3684
3685
3686 ForceSendFields []string `json:"-"`
3687
3688
3689
3690
3691 NullFields []string `json:"-"`
3692 }
3693
3694 func (s *Secrets) MarshalJSON() ([]byte, error) {
3695 type NoMethod Secrets
3696 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3697 }
3698
3699
3700
3701 type ServiceDirectoryConfig struct {
3702
3703
3704
3705 Service string `json:"service,omitempty"`
3706
3707
3708
3709
3710
3711 ForceSendFields []string `json:"-"`
3712
3713
3714
3715
3716 NullFields []string `json:"-"`
3717 }
3718
3719 func (s *ServiceDirectoryConfig) MarshalJSON() ([]byte, error) {
3720 type NoMethod ServiceDirectoryConfig
3721 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3722 }
3723
3724
3725 type Source struct {
3726
3727
3728 ConnectedRepository *ConnectedRepository `json:"connectedRepository,omitempty"`
3729
3730
3731 DeveloperConnectConfig *DeveloperConnectConfig `json:"developerConnectConfig,omitempty"`
3732
3733 GitSource *GitSource `json:"gitSource,omitempty"`
3734
3735
3736 RepoSource *RepoSource `json:"repoSource,omitempty"`
3737
3738
3739 StorageSource *StorageSource `json:"storageSource,omitempty"`
3740
3741
3742
3743 StorageSourceManifest *StorageSourceManifest `json:"storageSourceManifest,omitempty"`
3744
3745
3746
3747
3748
3749 ForceSendFields []string `json:"-"`
3750
3751
3752
3753
3754 NullFields []string `json:"-"`
3755 }
3756
3757 func (s *Source) MarshalJSON() ([]byte, error) {
3758 type NoMethod Source
3759 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3760 }
3761
3762
3763
3764 type SourceProvenance struct {
3765
3766
3767
3768
3769
3770
3771
3772 FileHashes map[string]FileHashes `json:"fileHashes,omitempty"`
3773
3774
3775 ResolvedConnectedRepository *ConnectedRepository `json:"resolvedConnectedRepository,omitempty"`
3776
3777
3778 ResolvedGitSource *GitSource `json:"resolvedGitSource,omitempty"`
3779
3780
3781 ResolvedRepoSource *RepoSource `json:"resolvedRepoSource,omitempty"`
3782
3783
3784 ResolvedStorageSource *StorageSource `json:"resolvedStorageSource,omitempty"`
3785
3786
3787
3788 ResolvedStorageSourceManifest *StorageSourceManifest `json:"resolvedStorageSourceManifest,omitempty"`
3789
3790
3791
3792
3793
3794 ForceSendFields []string `json:"-"`
3795
3796
3797
3798
3799 NullFields []string `json:"-"`
3800 }
3801
3802 func (s *SourceProvenance) MarshalJSON() ([]byte, error) {
3803 type NoMethod SourceProvenance
3804 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3805 }
3806
3807
3808
3809
3810
3811
3812
3813 type Status struct {
3814
3815 Code int64 `json:"code,omitempty"`
3816
3817
3818 Details []googleapi.RawMessage `json:"details,omitempty"`
3819
3820
3821
3822 Message string `json:"message,omitempty"`
3823
3824
3825
3826
3827
3828 ForceSendFields []string `json:"-"`
3829
3830
3831
3832
3833 NullFields []string `json:"-"`
3834 }
3835
3836 func (s *Status) MarshalJSON() ([]byte, error) {
3837 type NoMethod Status
3838 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3839 }
3840
3841
3842 type StorageSource struct {
3843
3844
3845
3846 Bucket string `json:"bucket,omitempty"`
3847
3848
3849 Generation int64 `json:"generation,omitempty,string"`
3850
3851
3852
3853 Object string `json:"object,omitempty"`
3854
3855
3856
3857
3858
3859
3860
3861
3862 SourceFetcher string `json:"sourceFetcher,omitempty"`
3863
3864
3865
3866
3867
3868 ForceSendFields []string `json:"-"`
3869
3870
3871
3872
3873 NullFields []string `json:"-"`
3874 }
3875
3876 func (s *StorageSource) MarshalJSON() ([]byte, error) {
3877 type NoMethod StorageSource
3878 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3879 }
3880
3881
3882
3883
3884 type StorageSourceManifest struct {
3885
3886
3887
3888 Bucket string `json:"bucket,omitempty"`
3889
3890
3891 Generation int64 `json:"generation,omitempty,string"`
3892
3893
3894 Object string `json:"object,omitempty"`
3895
3896
3897
3898
3899
3900 ForceSendFields []string `json:"-"`
3901
3902
3903
3904
3905 NullFields []string `json:"-"`
3906 }
3907
3908 func (s *StorageSourceManifest) MarshalJSON() ([]byte, error) {
3909 type NoMethod StorageSourceManifest
3910 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3911 }
3912
3913
3914 type TimeSpan struct {
3915
3916 EndTime string `json:"endTime,omitempty"`
3917
3918 StartTime string `json:"startTime,omitempty"`
3919
3920
3921
3922
3923
3924 ForceSendFields []string `json:"-"`
3925
3926
3927
3928
3929 NullFields []string `json:"-"`
3930 }
3931
3932 func (s *TimeSpan) MarshalJSON() ([]byte, error) {
3933 type NoMethod TimeSpan
3934 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3935 }
3936
3937
3938
3939 type UpdateBitbucketServerConfigOperationMetadata struct {
3940
3941
3942
3943 BitbucketServerConfig string `json:"bitbucketServerConfig,omitempty"`
3944
3945 CompleteTime string `json:"completeTime,omitempty"`
3946
3947 CreateTime string `json:"createTime,omitempty"`
3948
3949
3950
3951
3952
3953 ForceSendFields []string `json:"-"`
3954
3955
3956
3957
3958 NullFields []string `json:"-"`
3959 }
3960
3961 func (s *UpdateBitbucketServerConfigOperationMetadata) MarshalJSON() ([]byte, error) {
3962 type NoMethod UpdateBitbucketServerConfigOperationMetadata
3963 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3964 }
3965
3966
3967
3968 type UpdateGitHubEnterpriseConfigOperationMetadata struct {
3969
3970 CompleteTime string `json:"completeTime,omitempty"`
3971
3972 CreateTime string `json:"createTime,omitempty"`
3973
3974
3975
3976 GithubEnterpriseConfig string `json:"githubEnterpriseConfig,omitempty"`
3977
3978
3979
3980
3981
3982 ForceSendFields []string `json:"-"`
3983
3984
3985
3986
3987 NullFields []string `json:"-"`
3988 }
3989
3990 func (s *UpdateGitHubEnterpriseConfigOperationMetadata) MarshalJSON() ([]byte, error) {
3991 type NoMethod UpdateGitHubEnterpriseConfigOperationMetadata
3992 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3993 }
3994
3995
3996
3997 type UpdateGitLabConfigOperationMetadata struct {
3998
3999 CompleteTime string `json:"completeTime,omitempty"`
4000
4001 CreateTime string `json:"createTime,omitempty"`
4002
4003
4004 GitlabConfig string `json:"gitlabConfig,omitempty"`
4005
4006
4007
4008
4009
4010 ForceSendFields []string `json:"-"`
4011
4012
4013
4014
4015 NullFields []string `json:"-"`
4016 }
4017
4018 func (s *UpdateGitLabConfigOperationMetadata) MarshalJSON() ([]byte, error) {
4019 type NoMethod UpdateGitLabConfigOperationMetadata
4020 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4021 }
4022
4023
4024
4025 type UpdateWorkerPoolOperationMetadata struct {
4026
4027 CompleteTime string `json:"completeTime,omitempty"`
4028
4029 CreateTime string `json:"createTime,omitempty"`
4030
4031
4032 WorkerPool string `json:"workerPool,omitempty"`
4033
4034
4035
4036
4037
4038 ForceSendFields []string `json:"-"`
4039
4040
4041
4042
4043 NullFields []string `json:"-"`
4044 }
4045
4046 func (s *UpdateWorkerPoolOperationMetadata) MarshalJSON() ([]byte, error) {
4047 type NoMethod UpdateWorkerPoolOperationMetadata
4048 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4049 }
4050
4051
4052
4053 type UploadedMavenArtifact struct {
4054
4055 FileHashes *FileHashes `json:"fileHashes,omitempty"`
4056
4057
4058 PushTiming *TimeSpan `json:"pushTiming,omitempty"`
4059
4060 Uri string `json:"uri,omitempty"`
4061
4062
4063
4064
4065
4066 ForceSendFields []string `json:"-"`
4067
4068
4069
4070
4071 NullFields []string `json:"-"`
4072 }
4073
4074 func (s *UploadedMavenArtifact) MarshalJSON() ([]byte, error) {
4075 type NoMethod UploadedMavenArtifact
4076 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4077 }
4078
4079
4080
4081 type UploadedNpmPackage struct {
4082
4083 FileHashes *FileHashes `json:"fileHashes,omitempty"`
4084
4085
4086 PushTiming *TimeSpan `json:"pushTiming,omitempty"`
4087
4088 Uri string `json:"uri,omitempty"`
4089
4090
4091
4092
4093
4094 ForceSendFields []string `json:"-"`
4095
4096
4097
4098
4099 NullFields []string `json:"-"`
4100 }
4101
4102 func (s *UploadedNpmPackage) MarshalJSON() ([]byte, error) {
4103 type NoMethod UploadedNpmPackage
4104 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4105 }
4106
4107
4108 type UploadedPythonPackage struct {
4109
4110 FileHashes *FileHashes `json:"fileHashes,omitempty"`
4111
4112
4113 PushTiming *TimeSpan `json:"pushTiming,omitempty"`
4114
4115 Uri string `json:"uri,omitempty"`
4116
4117
4118
4119
4120
4121 ForceSendFields []string `json:"-"`
4122
4123
4124
4125
4126 NullFields []string `json:"-"`
4127 }
4128
4129 func (s *UploadedPythonPackage) MarshalJSON() ([]byte, error) {
4130 type NoMethod UploadedPythonPackage
4131 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4132 }
4133
4134
4135
4136 type Volume struct {
4137
4138
4139
4140 Name string `json:"name,omitempty"`
4141
4142
4143
4144 Path string `json:"path,omitempty"`
4145
4146
4147
4148
4149
4150 ForceSendFields []string `json:"-"`
4151
4152
4153
4154
4155 NullFields []string `json:"-"`
4156 }
4157
4158 func (s *Volume) MarshalJSON() ([]byte, error) {
4159 type NoMethod Volume
4160 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4161 }
4162
4163
4164 type Warning struct {
4165
4166
4167
4168
4169
4170
4171
4172 Priority string `json:"priority,omitempty"`
4173
4174 Text string `json:"text,omitempty"`
4175
4176
4177
4178
4179
4180 ForceSendFields []string `json:"-"`
4181
4182
4183
4184
4185 NullFields []string `json:"-"`
4186 }
4187
4188 func (s *Warning) MarshalJSON() ([]byte, error) {
4189 type NoMethod Warning
4190 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4191 }
4192
4193
4194
4195 type WebhookConfig struct {
4196
4197 Secret string `json:"secret,omitempty"`
4198
4199
4200
4201
4202
4203
4204
4205 State string `json:"state,omitempty"`
4206
4207
4208
4209
4210
4211 ForceSendFields []string `json:"-"`
4212
4213
4214
4215
4216 NullFields []string `json:"-"`
4217 }
4218
4219 func (s *WebhookConfig) MarshalJSON() ([]byte, error) {
4220 type NoMethod WebhookConfig
4221 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4222 }
4223
4224
4225
4226 type WorkerConfig struct {
4227
4228
4229
4230
4231
4232 DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"`
4233
4234
4235
4236
4237 MachineType string `json:"machineType,omitempty"`
4238
4239
4240
4241
4242
4243 ForceSendFields []string `json:"-"`
4244
4245
4246
4247
4248 NullFields []string `json:"-"`
4249 }
4250
4251 func (s *WorkerConfig) MarshalJSON() ([]byte, error) {
4252 type NoMethod WorkerConfig
4253 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4254 }
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265 type WorkerPool struct {
4266
4267
4268
4269 Annotations map[string]string `json:"annotations,omitempty"`
4270
4271
4272 CreateTime string `json:"createTime,omitempty"`
4273
4274
4275 DeleteTime string `json:"deleteTime,omitempty"`
4276
4277
4278 DisplayName string `json:"displayName,omitempty"`
4279
4280
4281
4282 Etag string `json:"etag,omitempty"`
4283
4284
4285
4286
4287
4288 Name string `json:"name,omitempty"`
4289
4290 PrivatePoolV1Config *PrivatePoolV1Config `json:"privatePoolV1Config,omitempty"`
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301 State string `json:"state,omitempty"`
4302
4303 Uid string `json:"uid,omitempty"`
4304
4305
4306 UpdateTime string `json:"updateTime,omitempty"`
4307
4308
4309 googleapi.ServerResponse `json:"-"`
4310
4311
4312
4313
4314
4315 ForceSendFields []string `json:"-"`
4316
4317
4318
4319
4320 NullFields []string `json:"-"`
4321 }
4322
4323 func (s *WorkerPool) MarshalJSON() ([]byte, error) {
4324 type NoMethod WorkerPool
4325 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4326 }
4327
4328 type GithubDotComWebhookReceiveCall struct {
4329 s *Service
4330 httpbody *HttpBody
4331 urlParams_ gensupport.URLParams
4332 ctx_ context.Context
4333 header_ http.Header
4334 }
4335
4336
4337
4338 func (r *GithubDotComWebhookService) Receive(httpbody *HttpBody) *GithubDotComWebhookReceiveCall {
4339 c := &GithubDotComWebhookReceiveCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4340 c.httpbody = httpbody
4341 return c
4342 }
4343
4344
4345
4346
4347 func (c *GithubDotComWebhookReceiveCall) WebhookKey(webhookKey string) *GithubDotComWebhookReceiveCall {
4348 c.urlParams_.Set("webhookKey", webhookKey)
4349 return c
4350 }
4351
4352
4353
4354
4355 func (c *GithubDotComWebhookReceiveCall) Fields(s ...googleapi.Field) *GithubDotComWebhookReceiveCall {
4356 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4357 return c
4358 }
4359
4360
4361 func (c *GithubDotComWebhookReceiveCall) Context(ctx context.Context) *GithubDotComWebhookReceiveCall {
4362 c.ctx_ = ctx
4363 return c
4364 }
4365
4366
4367
4368 func (c *GithubDotComWebhookReceiveCall) Header() http.Header {
4369 if c.header_ == nil {
4370 c.header_ = make(http.Header)
4371 }
4372 return c.header_
4373 }
4374
4375 func (c *GithubDotComWebhookReceiveCall) doRequest(alt string) (*http.Response, error) {
4376 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4377 var body io.Reader = nil
4378 body, err := googleapi.WithoutDataWrapper.JSONReader(c.httpbody)
4379 if err != nil {
4380 return nil, err
4381 }
4382 c.urlParams_.Set("alt", alt)
4383 c.urlParams_.Set("prettyPrint", "false")
4384 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/githubDotComWebhook:receive")
4385 urls += "?" + c.urlParams_.Encode()
4386 req, err := http.NewRequest("POST", urls, body)
4387 if err != nil {
4388 return nil, err
4389 }
4390 req.Header = reqHeaders
4391 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4392 }
4393
4394
4395
4396
4397
4398
4399 func (c *GithubDotComWebhookReceiveCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
4400 gensupport.SetOptions(c.urlParams_, opts...)
4401 res, err := c.doRequest("json")
4402 if res != nil && res.StatusCode == http.StatusNotModified {
4403 if res.Body != nil {
4404 res.Body.Close()
4405 }
4406 return nil, gensupport.WrapError(&googleapi.Error{
4407 Code: res.StatusCode,
4408 Header: res.Header,
4409 })
4410 }
4411 if err != nil {
4412 return nil, err
4413 }
4414 defer googleapi.CloseBody(res)
4415 if err := googleapi.CheckResponse(res); err != nil {
4416 return nil, gensupport.WrapError(err)
4417 }
4418 ret := &Empty{
4419 ServerResponse: googleapi.ServerResponse{
4420 Header: res.Header,
4421 HTTPStatusCode: res.StatusCode,
4422 },
4423 }
4424 target := &ret
4425 if err := gensupport.DecodeResponse(target, res); err != nil {
4426 return nil, err
4427 }
4428 return ret, nil
4429 }
4430
4431 type LocationsRegionalWebhookCall struct {
4432 s *Service
4433 location string
4434 httpbody *HttpBody
4435 urlParams_ gensupport.URLParams
4436 ctx_ context.Context
4437 header_ http.Header
4438 }
4439
4440
4441
4442
4443
4444 func (r *LocationsService) RegionalWebhook(location string, httpbody *HttpBody) *LocationsRegionalWebhookCall {
4445 c := &LocationsRegionalWebhookCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4446 c.location = location
4447 c.httpbody = httpbody
4448 return c
4449 }
4450
4451
4452
4453
4454 func (c *LocationsRegionalWebhookCall) WebhookKey(webhookKey string) *LocationsRegionalWebhookCall {
4455 c.urlParams_.Set("webhookKey", webhookKey)
4456 return c
4457 }
4458
4459
4460
4461
4462 func (c *LocationsRegionalWebhookCall) Fields(s ...googleapi.Field) *LocationsRegionalWebhookCall {
4463 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4464 return c
4465 }
4466
4467
4468 func (c *LocationsRegionalWebhookCall) Context(ctx context.Context) *LocationsRegionalWebhookCall {
4469 c.ctx_ = ctx
4470 return c
4471 }
4472
4473
4474
4475 func (c *LocationsRegionalWebhookCall) Header() http.Header {
4476 if c.header_ == nil {
4477 c.header_ = make(http.Header)
4478 }
4479 return c.header_
4480 }
4481
4482 func (c *LocationsRegionalWebhookCall) doRequest(alt string) (*http.Response, error) {
4483 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4484 var body io.Reader = nil
4485 body, err := googleapi.WithoutDataWrapper.JSONReader(c.httpbody)
4486 if err != nil {
4487 return nil, err
4488 }
4489 c.urlParams_.Set("alt", alt)
4490 c.urlParams_.Set("prettyPrint", "false")
4491 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+location}/regionalWebhook")
4492 urls += "?" + c.urlParams_.Encode()
4493 req, err := http.NewRequest("POST", urls, body)
4494 if err != nil {
4495 return nil, err
4496 }
4497 req.Header = reqHeaders
4498 googleapi.Expand(req.URL, map[string]string{
4499 "location": c.location,
4500 })
4501 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4502 }
4503
4504
4505
4506
4507
4508
4509 func (c *LocationsRegionalWebhookCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
4510 gensupport.SetOptions(c.urlParams_, opts...)
4511 res, err := c.doRequest("json")
4512 if res != nil && res.StatusCode == http.StatusNotModified {
4513 if res.Body != nil {
4514 res.Body.Close()
4515 }
4516 return nil, gensupport.WrapError(&googleapi.Error{
4517 Code: res.StatusCode,
4518 Header: res.Header,
4519 })
4520 }
4521 if err != nil {
4522 return nil, err
4523 }
4524 defer googleapi.CloseBody(res)
4525 if err := googleapi.CheckResponse(res); err != nil {
4526 return nil, gensupport.WrapError(err)
4527 }
4528 ret := &Empty{
4529 ServerResponse: googleapi.ServerResponse{
4530 Header: res.Header,
4531 HTTPStatusCode: res.StatusCode,
4532 },
4533 }
4534 target := &ret
4535 if err := gensupport.DecodeResponse(target, res); err != nil {
4536 return nil, err
4537 }
4538 return ret, nil
4539 }
4540
4541 type OperationsCancelCall struct {
4542 s *Service
4543 name string
4544 canceloperationrequest *CancelOperationRequest
4545 urlParams_ gensupport.URLParams
4546 ctx_ context.Context
4547 header_ http.Header
4548 }
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561 func (r *OperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *OperationsCancelCall {
4562 c := &OperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4563 c.name = name
4564 c.canceloperationrequest = canceloperationrequest
4565 return c
4566 }
4567
4568
4569
4570
4571 func (c *OperationsCancelCall) Fields(s ...googleapi.Field) *OperationsCancelCall {
4572 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4573 return c
4574 }
4575
4576
4577 func (c *OperationsCancelCall) Context(ctx context.Context) *OperationsCancelCall {
4578 c.ctx_ = ctx
4579 return c
4580 }
4581
4582
4583
4584 func (c *OperationsCancelCall) Header() http.Header {
4585 if c.header_ == nil {
4586 c.header_ = make(http.Header)
4587 }
4588 return c.header_
4589 }
4590
4591 func (c *OperationsCancelCall) doRequest(alt string) (*http.Response, error) {
4592 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4593 var body io.Reader = nil
4594 body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
4595 if err != nil {
4596 return nil, err
4597 }
4598 c.urlParams_.Set("alt", alt)
4599 c.urlParams_.Set("prettyPrint", "false")
4600 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
4601 urls += "?" + c.urlParams_.Encode()
4602 req, err := http.NewRequest("POST", urls, body)
4603 if err != nil {
4604 return nil, err
4605 }
4606 req.Header = reqHeaders
4607 googleapi.Expand(req.URL, map[string]string{
4608 "name": c.name,
4609 })
4610 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4611 }
4612
4613
4614
4615
4616
4617
4618 func (c *OperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
4619 gensupport.SetOptions(c.urlParams_, opts...)
4620 res, err := c.doRequest("json")
4621 if res != nil && res.StatusCode == http.StatusNotModified {
4622 if res.Body != nil {
4623 res.Body.Close()
4624 }
4625 return nil, gensupport.WrapError(&googleapi.Error{
4626 Code: res.StatusCode,
4627 Header: res.Header,
4628 })
4629 }
4630 if err != nil {
4631 return nil, err
4632 }
4633 defer googleapi.CloseBody(res)
4634 if err := googleapi.CheckResponse(res); err != nil {
4635 return nil, gensupport.WrapError(err)
4636 }
4637 ret := &Empty{
4638 ServerResponse: googleapi.ServerResponse{
4639 Header: res.Header,
4640 HTTPStatusCode: res.StatusCode,
4641 },
4642 }
4643 target := &ret
4644 if err := gensupport.DecodeResponse(target, res); err != nil {
4645 return nil, err
4646 }
4647 return ret, nil
4648 }
4649
4650 type OperationsGetCall struct {
4651 s *Service
4652 name string
4653 urlParams_ gensupport.URLParams
4654 ifNoneMatch_ string
4655 ctx_ context.Context
4656 header_ http.Header
4657 }
4658
4659
4660
4661
4662
4663
4664 func (r *OperationsService) Get(name string) *OperationsGetCall {
4665 c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4666 c.name = name
4667 return c
4668 }
4669
4670
4671
4672
4673 func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall {
4674 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4675 return c
4676 }
4677
4678
4679
4680
4681 func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall {
4682 c.ifNoneMatch_ = entityTag
4683 return c
4684 }
4685
4686
4687 func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall {
4688 c.ctx_ = ctx
4689 return c
4690 }
4691
4692
4693
4694 func (c *OperationsGetCall) Header() http.Header {
4695 if c.header_ == nil {
4696 c.header_ = make(http.Header)
4697 }
4698 return c.header_
4699 }
4700
4701 func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) {
4702 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4703 if c.ifNoneMatch_ != "" {
4704 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4705 }
4706 var body io.Reader = nil
4707 c.urlParams_.Set("alt", alt)
4708 c.urlParams_.Set("prettyPrint", "false")
4709 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4710 urls += "?" + c.urlParams_.Encode()
4711 req, err := http.NewRequest("GET", urls, body)
4712 if err != nil {
4713 return nil, err
4714 }
4715 req.Header = reqHeaders
4716 googleapi.Expand(req.URL, map[string]string{
4717 "name": c.name,
4718 })
4719 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4720 }
4721
4722
4723
4724
4725
4726
4727 func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4728 gensupport.SetOptions(c.urlParams_, opts...)
4729 res, err := c.doRequest("json")
4730 if res != nil && res.StatusCode == http.StatusNotModified {
4731 if res.Body != nil {
4732 res.Body.Close()
4733 }
4734 return nil, gensupport.WrapError(&googleapi.Error{
4735 Code: res.StatusCode,
4736 Header: res.Header,
4737 })
4738 }
4739 if err != nil {
4740 return nil, err
4741 }
4742 defer googleapi.CloseBody(res)
4743 if err := googleapi.CheckResponse(res); err != nil {
4744 return nil, gensupport.WrapError(err)
4745 }
4746 ret := &Operation{
4747 ServerResponse: googleapi.ServerResponse{
4748 Header: res.Header,
4749 HTTPStatusCode: res.StatusCode,
4750 },
4751 }
4752 target := &ret
4753 if err := gensupport.DecodeResponse(target, res); err != nil {
4754 return nil, err
4755 }
4756 return ret, nil
4757 }
4758
4759 type ProjectsBuildsApproveCall struct {
4760 s *Service
4761 name string
4762 approvebuildrequest *ApproveBuildRequest
4763 urlParams_ gensupport.URLParams
4764 ctx_ context.Context
4765 header_ http.Header
4766 }
4767
4768
4769
4770
4771
4772
4773
4774 func (r *ProjectsBuildsService) Approve(name string, approvebuildrequest *ApproveBuildRequest) *ProjectsBuildsApproveCall {
4775 c := &ProjectsBuildsApproveCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4776 c.name = name
4777 c.approvebuildrequest = approvebuildrequest
4778 return c
4779 }
4780
4781
4782
4783
4784 func (c *ProjectsBuildsApproveCall) Fields(s ...googleapi.Field) *ProjectsBuildsApproveCall {
4785 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4786 return c
4787 }
4788
4789
4790 func (c *ProjectsBuildsApproveCall) Context(ctx context.Context) *ProjectsBuildsApproveCall {
4791 c.ctx_ = ctx
4792 return c
4793 }
4794
4795
4796
4797 func (c *ProjectsBuildsApproveCall) Header() http.Header {
4798 if c.header_ == nil {
4799 c.header_ = make(http.Header)
4800 }
4801 return c.header_
4802 }
4803
4804 func (c *ProjectsBuildsApproveCall) doRequest(alt string) (*http.Response, error) {
4805 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4806 var body io.Reader = nil
4807 body, err := googleapi.WithoutDataWrapper.JSONReader(c.approvebuildrequest)
4808 if err != nil {
4809 return nil, err
4810 }
4811 c.urlParams_.Set("alt", alt)
4812 c.urlParams_.Set("prettyPrint", "false")
4813 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:approve")
4814 urls += "?" + c.urlParams_.Encode()
4815 req, err := http.NewRequest("POST", urls, body)
4816 if err != nil {
4817 return nil, err
4818 }
4819 req.Header = reqHeaders
4820 googleapi.Expand(req.URL, map[string]string{
4821 "name": c.name,
4822 })
4823 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4824 }
4825
4826
4827
4828
4829
4830
4831 func (c *ProjectsBuildsApproveCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4832 gensupport.SetOptions(c.urlParams_, opts...)
4833 res, err := c.doRequest("json")
4834 if res != nil && res.StatusCode == http.StatusNotModified {
4835 if res.Body != nil {
4836 res.Body.Close()
4837 }
4838 return nil, gensupport.WrapError(&googleapi.Error{
4839 Code: res.StatusCode,
4840 Header: res.Header,
4841 })
4842 }
4843 if err != nil {
4844 return nil, err
4845 }
4846 defer googleapi.CloseBody(res)
4847 if err := googleapi.CheckResponse(res); err != nil {
4848 return nil, gensupport.WrapError(err)
4849 }
4850 ret := &Operation{
4851 ServerResponse: googleapi.ServerResponse{
4852 Header: res.Header,
4853 HTTPStatusCode: res.StatusCode,
4854 },
4855 }
4856 target := &ret
4857 if err := gensupport.DecodeResponse(target, res); err != nil {
4858 return nil, err
4859 }
4860 return ret, nil
4861 }
4862
4863 type ProjectsBuildsCancelCall struct {
4864 s *Service
4865 projectId string
4866 id string
4867 cancelbuildrequest *CancelBuildRequest
4868 urlParams_ gensupport.URLParams
4869 ctx_ context.Context
4870 header_ http.Header
4871 }
4872
4873
4874
4875
4876
4877 func (r *ProjectsBuildsService) Cancel(projectId string, id string, cancelbuildrequest *CancelBuildRequest) *ProjectsBuildsCancelCall {
4878 c := &ProjectsBuildsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4879 c.projectId = projectId
4880 c.id = id
4881 c.cancelbuildrequest = cancelbuildrequest
4882 return c
4883 }
4884
4885
4886
4887
4888 func (c *ProjectsBuildsCancelCall) Fields(s ...googleapi.Field) *ProjectsBuildsCancelCall {
4889 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4890 return c
4891 }
4892
4893
4894 func (c *ProjectsBuildsCancelCall) Context(ctx context.Context) *ProjectsBuildsCancelCall {
4895 c.ctx_ = ctx
4896 return c
4897 }
4898
4899
4900
4901 func (c *ProjectsBuildsCancelCall) Header() http.Header {
4902 if c.header_ == nil {
4903 c.header_ = make(http.Header)
4904 }
4905 return c.header_
4906 }
4907
4908 func (c *ProjectsBuildsCancelCall) doRequest(alt string) (*http.Response, error) {
4909 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4910 var body io.Reader = nil
4911 body, err := googleapi.WithoutDataWrapper.JSONReader(c.cancelbuildrequest)
4912 if err != nil {
4913 return nil, err
4914 }
4915 c.urlParams_.Set("alt", alt)
4916 c.urlParams_.Set("prettyPrint", "false")
4917 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/builds/{id}:cancel")
4918 urls += "?" + c.urlParams_.Encode()
4919 req, err := http.NewRequest("POST", urls, body)
4920 if err != nil {
4921 return nil, err
4922 }
4923 req.Header = reqHeaders
4924 googleapi.Expand(req.URL, map[string]string{
4925 "projectId": c.projectId,
4926 "id": c.id,
4927 })
4928 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4929 }
4930
4931
4932
4933
4934
4935
4936 func (c *ProjectsBuildsCancelCall) Do(opts ...googleapi.CallOption) (*Build, error) {
4937 gensupport.SetOptions(c.urlParams_, opts...)
4938 res, err := c.doRequest("json")
4939 if res != nil && res.StatusCode == http.StatusNotModified {
4940 if res.Body != nil {
4941 res.Body.Close()
4942 }
4943 return nil, gensupport.WrapError(&googleapi.Error{
4944 Code: res.StatusCode,
4945 Header: res.Header,
4946 })
4947 }
4948 if err != nil {
4949 return nil, err
4950 }
4951 defer googleapi.CloseBody(res)
4952 if err := googleapi.CheckResponse(res); err != nil {
4953 return nil, gensupport.WrapError(err)
4954 }
4955 ret := &Build{
4956 ServerResponse: googleapi.ServerResponse{
4957 Header: res.Header,
4958 HTTPStatusCode: res.StatusCode,
4959 },
4960 }
4961 target := &ret
4962 if err := gensupport.DecodeResponse(target, res); err != nil {
4963 return nil, err
4964 }
4965 return ret, nil
4966 }
4967
4968 type ProjectsBuildsCreateCall struct {
4969 s *Service
4970 projectId string
4971 build *Build
4972 urlParams_ gensupport.URLParams
4973 ctx_ context.Context
4974 header_ http.Header
4975 }
4976
4977
4978
4979
4980
4981
4982
4983 func (r *ProjectsBuildsService) Create(projectId string, build *Build) *ProjectsBuildsCreateCall {
4984 c := &ProjectsBuildsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4985 c.projectId = projectId
4986 c.build = build
4987 return c
4988 }
4989
4990
4991
4992 func (c *ProjectsBuildsCreateCall) Parent(parent string) *ProjectsBuildsCreateCall {
4993 c.urlParams_.Set("parent", parent)
4994 return c
4995 }
4996
4997
4998
4999
5000 func (c *ProjectsBuildsCreateCall) Fields(s ...googleapi.Field) *ProjectsBuildsCreateCall {
5001 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5002 return c
5003 }
5004
5005
5006 func (c *ProjectsBuildsCreateCall) Context(ctx context.Context) *ProjectsBuildsCreateCall {
5007 c.ctx_ = ctx
5008 return c
5009 }
5010
5011
5012
5013 func (c *ProjectsBuildsCreateCall) Header() http.Header {
5014 if c.header_ == nil {
5015 c.header_ = make(http.Header)
5016 }
5017 return c.header_
5018 }
5019
5020 func (c *ProjectsBuildsCreateCall) doRequest(alt string) (*http.Response, error) {
5021 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5022 var body io.Reader = nil
5023 body, err := googleapi.WithoutDataWrapper.JSONReader(c.build)
5024 if err != nil {
5025 return nil, err
5026 }
5027 c.urlParams_.Set("alt", alt)
5028 c.urlParams_.Set("prettyPrint", "false")
5029 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/builds")
5030 urls += "?" + c.urlParams_.Encode()
5031 req, err := http.NewRequest("POST", urls, body)
5032 if err != nil {
5033 return nil, err
5034 }
5035 req.Header = reqHeaders
5036 googleapi.Expand(req.URL, map[string]string{
5037 "projectId": c.projectId,
5038 })
5039 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5040 }
5041
5042
5043
5044
5045
5046
5047 func (c *ProjectsBuildsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5048 gensupport.SetOptions(c.urlParams_, opts...)
5049 res, err := c.doRequest("json")
5050 if res != nil && res.StatusCode == http.StatusNotModified {
5051 if res.Body != nil {
5052 res.Body.Close()
5053 }
5054 return nil, gensupport.WrapError(&googleapi.Error{
5055 Code: res.StatusCode,
5056 Header: res.Header,
5057 })
5058 }
5059 if err != nil {
5060 return nil, err
5061 }
5062 defer googleapi.CloseBody(res)
5063 if err := googleapi.CheckResponse(res); err != nil {
5064 return nil, gensupport.WrapError(err)
5065 }
5066 ret := &Operation{
5067 ServerResponse: googleapi.ServerResponse{
5068 Header: res.Header,
5069 HTTPStatusCode: res.StatusCode,
5070 },
5071 }
5072 target := &ret
5073 if err := gensupport.DecodeResponse(target, res); err != nil {
5074 return nil, err
5075 }
5076 return ret, nil
5077 }
5078
5079 type ProjectsBuildsGetCall struct {
5080 s *Service
5081 projectId string
5082 id string
5083 urlParams_ gensupport.URLParams
5084 ifNoneMatch_ string
5085 ctx_ context.Context
5086 header_ http.Header
5087 }
5088
5089
5090
5091
5092
5093
5094
5095 func (r *ProjectsBuildsService) Get(projectId string, id string) *ProjectsBuildsGetCall {
5096 c := &ProjectsBuildsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5097 c.projectId = projectId
5098 c.id = id
5099 return c
5100 }
5101
5102
5103
5104 func (c *ProjectsBuildsGetCall) Name(name string) *ProjectsBuildsGetCall {
5105 c.urlParams_.Set("name", name)
5106 return c
5107 }
5108
5109
5110
5111
5112 func (c *ProjectsBuildsGetCall) Fields(s ...googleapi.Field) *ProjectsBuildsGetCall {
5113 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5114 return c
5115 }
5116
5117
5118
5119
5120 func (c *ProjectsBuildsGetCall) IfNoneMatch(entityTag string) *ProjectsBuildsGetCall {
5121 c.ifNoneMatch_ = entityTag
5122 return c
5123 }
5124
5125
5126 func (c *ProjectsBuildsGetCall) Context(ctx context.Context) *ProjectsBuildsGetCall {
5127 c.ctx_ = ctx
5128 return c
5129 }
5130
5131
5132
5133 func (c *ProjectsBuildsGetCall) Header() http.Header {
5134 if c.header_ == nil {
5135 c.header_ = make(http.Header)
5136 }
5137 return c.header_
5138 }
5139
5140 func (c *ProjectsBuildsGetCall) doRequest(alt string) (*http.Response, error) {
5141 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5142 if c.ifNoneMatch_ != "" {
5143 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5144 }
5145 var body io.Reader = nil
5146 c.urlParams_.Set("alt", alt)
5147 c.urlParams_.Set("prettyPrint", "false")
5148 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/builds/{id}")
5149 urls += "?" + c.urlParams_.Encode()
5150 req, err := http.NewRequest("GET", urls, body)
5151 if err != nil {
5152 return nil, err
5153 }
5154 req.Header = reqHeaders
5155 googleapi.Expand(req.URL, map[string]string{
5156 "projectId": c.projectId,
5157 "id": c.id,
5158 })
5159 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5160 }
5161
5162
5163
5164
5165
5166
5167 func (c *ProjectsBuildsGetCall) Do(opts ...googleapi.CallOption) (*Build, error) {
5168 gensupport.SetOptions(c.urlParams_, opts...)
5169 res, err := c.doRequest("json")
5170 if res != nil && res.StatusCode == http.StatusNotModified {
5171 if res.Body != nil {
5172 res.Body.Close()
5173 }
5174 return nil, gensupport.WrapError(&googleapi.Error{
5175 Code: res.StatusCode,
5176 Header: res.Header,
5177 })
5178 }
5179 if err != nil {
5180 return nil, err
5181 }
5182 defer googleapi.CloseBody(res)
5183 if err := googleapi.CheckResponse(res); err != nil {
5184 return nil, gensupport.WrapError(err)
5185 }
5186 ret := &Build{
5187 ServerResponse: googleapi.ServerResponse{
5188 Header: res.Header,
5189 HTTPStatusCode: res.StatusCode,
5190 },
5191 }
5192 target := &ret
5193 if err := gensupport.DecodeResponse(target, res); err != nil {
5194 return nil, err
5195 }
5196 return ret, nil
5197 }
5198
5199 type ProjectsBuildsListCall struct {
5200 s *Service
5201 projectId string
5202 urlParams_ gensupport.URLParams
5203 ifNoneMatch_ string
5204 ctx_ context.Context
5205 header_ http.Header
5206 }
5207
5208
5209
5210
5211
5212 func (r *ProjectsBuildsService) List(projectId string) *ProjectsBuildsListCall {
5213 c := &ProjectsBuildsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5214 c.projectId = projectId
5215 return c
5216 }
5217
5218
5219
5220 func (c *ProjectsBuildsListCall) Filter(filter string) *ProjectsBuildsListCall {
5221 c.urlParams_.Set("filter", filter)
5222 return c
5223 }
5224
5225
5226
5227 func (c *ProjectsBuildsListCall) PageSize(pageSize int64) *ProjectsBuildsListCall {
5228 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5229 return c
5230 }
5231
5232
5233
5234
5235
5236
5237 func (c *ProjectsBuildsListCall) PageToken(pageToken string) *ProjectsBuildsListCall {
5238 c.urlParams_.Set("pageToken", pageToken)
5239 return c
5240 }
5241
5242
5243
5244 func (c *ProjectsBuildsListCall) Parent(parent string) *ProjectsBuildsListCall {
5245 c.urlParams_.Set("parent", parent)
5246 return c
5247 }
5248
5249
5250
5251
5252 func (c *ProjectsBuildsListCall) Fields(s ...googleapi.Field) *ProjectsBuildsListCall {
5253 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5254 return c
5255 }
5256
5257
5258
5259
5260 func (c *ProjectsBuildsListCall) IfNoneMatch(entityTag string) *ProjectsBuildsListCall {
5261 c.ifNoneMatch_ = entityTag
5262 return c
5263 }
5264
5265
5266 func (c *ProjectsBuildsListCall) Context(ctx context.Context) *ProjectsBuildsListCall {
5267 c.ctx_ = ctx
5268 return c
5269 }
5270
5271
5272
5273 func (c *ProjectsBuildsListCall) Header() http.Header {
5274 if c.header_ == nil {
5275 c.header_ = make(http.Header)
5276 }
5277 return c.header_
5278 }
5279
5280 func (c *ProjectsBuildsListCall) doRequest(alt string) (*http.Response, error) {
5281 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5282 if c.ifNoneMatch_ != "" {
5283 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5284 }
5285 var body io.Reader = nil
5286 c.urlParams_.Set("alt", alt)
5287 c.urlParams_.Set("prettyPrint", "false")
5288 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/builds")
5289 urls += "?" + c.urlParams_.Encode()
5290 req, err := http.NewRequest("GET", urls, body)
5291 if err != nil {
5292 return nil, err
5293 }
5294 req.Header = reqHeaders
5295 googleapi.Expand(req.URL, map[string]string{
5296 "projectId": c.projectId,
5297 })
5298 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5299 }
5300
5301
5302
5303
5304
5305
5306
5307 func (c *ProjectsBuildsListCall) Do(opts ...googleapi.CallOption) (*ListBuildsResponse, error) {
5308 gensupport.SetOptions(c.urlParams_, opts...)
5309 res, err := c.doRequest("json")
5310 if res != nil && res.StatusCode == http.StatusNotModified {
5311 if res.Body != nil {
5312 res.Body.Close()
5313 }
5314 return nil, gensupport.WrapError(&googleapi.Error{
5315 Code: res.StatusCode,
5316 Header: res.Header,
5317 })
5318 }
5319 if err != nil {
5320 return nil, err
5321 }
5322 defer googleapi.CloseBody(res)
5323 if err := googleapi.CheckResponse(res); err != nil {
5324 return nil, gensupport.WrapError(err)
5325 }
5326 ret := &ListBuildsResponse{
5327 ServerResponse: googleapi.ServerResponse{
5328 Header: res.Header,
5329 HTTPStatusCode: res.StatusCode,
5330 },
5331 }
5332 target := &ret
5333 if err := gensupport.DecodeResponse(target, res); err != nil {
5334 return nil, err
5335 }
5336 return ret, nil
5337 }
5338
5339
5340
5341
5342 func (c *ProjectsBuildsListCall) Pages(ctx context.Context, f func(*ListBuildsResponse) error) error {
5343 c.ctx_ = ctx
5344 defer c.PageToken(c.urlParams_.Get("pageToken"))
5345 for {
5346 x, err := c.Do()
5347 if err != nil {
5348 return err
5349 }
5350 if err := f(x); err != nil {
5351 return err
5352 }
5353 if x.NextPageToken == "" {
5354 return nil
5355 }
5356 c.PageToken(x.NextPageToken)
5357 }
5358 }
5359
5360 type ProjectsBuildsRetryCall struct {
5361 s *Service
5362 projectId string
5363 id string
5364 retrybuildrequest *RetryBuildRequest
5365 urlParams_ gensupport.URLParams
5366 ctx_ context.Context
5367 header_ http.Header
5368 }
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389 func (r *ProjectsBuildsService) Retry(projectId string, id string, retrybuildrequest *RetryBuildRequest) *ProjectsBuildsRetryCall {
5390 c := &ProjectsBuildsRetryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5391 c.projectId = projectId
5392 c.id = id
5393 c.retrybuildrequest = retrybuildrequest
5394 return c
5395 }
5396
5397
5398
5399
5400 func (c *ProjectsBuildsRetryCall) Fields(s ...googleapi.Field) *ProjectsBuildsRetryCall {
5401 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5402 return c
5403 }
5404
5405
5406 func (c *ProjectsBuildsRetryCall) Context(ctx context.Context) *ProjectsBuildsRetryCall {
5407 c.ctx_ = ctx
5408 return c
5409 }
5410
5411
5412
5413 func (c *ProjectsBuildsRetryCall) Header() http.Header {
5414 if c.header_ == nil {
5415 c.header_ = make(http.Header)
5416 }
5417 return c.header_
5418 }
5419
5420 func (c *ProjectsBuildsRetryCall) doRequest(alt string) (*http.Response, error) {
5421 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5422 var body io.Reader = nil
5423 body, err := googleapi.WithoutDataWrapper.JSONReader(c.retrybuildrequest)
5424 if err != nil {
5425 return nil, err
5426 }
5427 c.urlParams_.Set("alt", alt)
5428 c.urlParams_.Set("prettyPrint", "false")
5429 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/builds/{id}:retry")
5430 urls += "?" + c.urlParams_.Encode()
5431 req, err := http.NewRequest("POST", urls, body)
5432 if err != nil {
5433 return nil, err
5434 }
5435 req.Header = reqHeaders
5436 googleapi.Expand(req.URL, map[string]string{
5437 "projectId": c.projectId,
5438 "id": c.id,
5439 })
5440 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5441 }
5442
5443
5444
5445
5446
5447
5448 func (c *ProjectsBuildsRetryCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5449 gensupport.SetOptions(c.urlParams_, opts...)
5450 res, err := c.doRequest("json")
5451 if res != nil && res.StatusCode == http.StatusNotModified {
5452 if res.Body != nil {
5453 res.Body.Close()
5454 }
5455 return nil, gensupport.WrapError(&googleapi.Error{
5456 Code: res.StatusCode,
5457 Header: res.Header,
5458 })
5459 }
5460 if err != nil {
5461 return nil, err
5462 }
5463 defer googleapi.CloseBody(res)
5464 if err := googleapi.CheckResponse(res); err != nil {
5465 return nil, gensupport.WrapError(err)
5466 }
5467 ret := &Operation{
5468 ServerResponse: googleapi.ServerResponse{
5469 Header: res.Header,
5470 HTTPStatusCode: res.StatusCode,
5471 },
5472 }
5473 target := &ret
5474 if err := gensupport.DecodeResponse(target, res); err != nil {
5475 return nil, err
5476 }
5477 return ret, nil
5478 }
5479
5480 type ProjectsGithubEnterpriseConfigsCreateCall struct {
5481 s *Service
5482 parent string
5483 githubenterpriseconfig *GitHubEnterpriseConfig
5484 urlParams_ gensupport.URLParams
5485 ctx_ context.Context
5486 header_ http.Header
5487 }
5488
5489
5490
5491
5492
5493
5494 func (r *ProjectsGithubEnterpriseConfigsService) Create(parent string, githubenterpriseconfig *GitHubEnterpriseConfig) *ProjectsGithubEnterpriseConfigsCreateCall {
5495 c := &ProjectsGithubEnterpriseConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5496 c.parent = parent
5497 c.githubenterpriseconfig = githubenterpriseconfig
5498 return c
5499 }
5500
5501
5502
5503
5504
5505
5506
5507 func (c *ProjectsGithubEnterpriseConfigsCreateCall) GheConfigId(gheConfigId string) *ProjectsGithubEnterpriseConfigsCreateCall {
5508 c.urlParams_.Set("gheConfigId", gheConfigId)
5509 return c
5510 }
5511
5512
5513 func (c *ProjectsGithubEnterpriseConfigsCreateCall) ProjectId(projectId string) *ProjectsGithubEnterpriseConfigsCreateCall {
5514 c.urlParams_.Set("projectId", projectId)
5515 return c
5516 }
5517
5518
5519
5520
5521 func (c *ProjectsGithubEnterpriseConfigsCreateCall) Fields(s ...googleapi.Field) *ProjectsGithubEnterpriseConfigsCreateCall {
5522 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5523 return c
5524 }
5525
5526
5527 func (c *ProjectsGithubEnterpriseConfigsCreateCall) Context(ctx context.Context) *ProjectsGithubEnterpriseConfigsCreateCall {
5528 c.ctx_ = ctx
5529 return c
5530 }
5531
5532
5533
5534 func (c *ProjectsGithubEnterpriseConfigsCreateCall) Header() http.Header {
5535 if c.header_ == nil {
5536 c.header_ = make(http.Header)
5537 }
5538 return c.header_
5539 }
5540
5541 func (c *ProjectsGithubEnterpriseConfigsCreateCall) doRequest(alt string) (*http.Response, error) {
5542 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5543 var body io.Reader = nil
5544 body, err := googleapi.WithoutDataWrapper.JSONReader(c.githubenterpriseconfig)
5545 if err != nil {
5546 return nil, err
5547 }
5548 c.urlParams_.Set("alt", alt)
5549 c.urlParams_.Set("prettyPrint", "false")
5550 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/githubEnterpriseConfigs")
5551 urls += "?" + c.urlParams_.Encode()
5552 req, err := http.NewRequest("POST", urls, body)
5553 if err != nil {
5554 return nil, err
5555 }
5556 req.Header = reqHeaders
5557 googleapi.Expand(req.URL, map[string]string{
5558 "parent": c.parent,
5559 })
5560 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5561 }
5562
5563
5564
5565
5566
5567
5568 func (c *ProjectsGithubEnterpriseConfigsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5569 gensupport.SetOptions(c.urlParams_, opts...)
5570 res, err := c.doRequest("json")
5571 if res != nil && res.StatusCode == http.StatusNotModified {
5572 if res.Body != nil {
5573 res.Body.Close()
5574 }
5575 return nil, gensupport.WrapError(&googleapi.Error{
5576 Code: res.StatusCode,
5577 Header: res.Header,
5578 })
5579 }
5580 if err != nil {
5581 return nil, err
5582 }
5583 defer googleapi.CloseBody(res)
5584 if err := googleapi.CheckResponse(res); err != nil {
5585 return nil, gensupport.WrapError(err)
5586 }
5587 ret := &Operation{
5588 ServerResponse: googleapi.ServerResponse{
5589 Header: res.Header,
5590 HTTPStatusCode: res.StatusCode,
5591 },
5592 }
5593 target := &ret
5594 if err := gensupport.DecodeResponse(target, res); err != nil {
5595 return nil, err
5596 }
5597 return ret, nil
5598 }
5599
5600 type ProjectsGithubEnterpriseConfigsDeleteCall struct {
5601 s *Service
5602 name string
5603 urlParams_ gensupport.URLParams
5604 ctx_ context.Context
5605 header_ http.Header
5606 }
5607
5608
5609
5610
5611
5612
5613
5614
5615 func (r *ProjectsGithubEnterpriseConfigsService) Delete(name string) *ProjectsGithubEnterpriseConfigsDeleteCall {
5616 c := &ProjectsGithubEnterpriseConfigsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5617 c.name = name
5618 return c
5619 }
5620
5621
5622
5623 func (c *ProjectsGithubEnterpriseConfigsDeleteCall) ConfigId(configId string) *ProjectsGithubEnterpriseConfigsDeleteCall {
5624 c.urlParams_.Set("configId", configId)
5625 return c
5626 }
5627
5628
5629 func (c *ProjectsGithubEnterpriseConfigsDeleteCall) ProjectId(projectId string) *ProjectsGithubEnterpriseConfigsDeleteCall {
5630 c.urlParams_.Set("projectId", projectId)
5631 return c
5632 }
5633
5634
5635
5636
5637 func (c *ProjectsGithubEnterpriseConfigsDeleteCall) Fields(s ...googleapi.Field) *ProjectsGithubEnterpriseConfigsDeleteCall {
5638 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5639 return c
5640 }
5641
5642
5643 func (c *ProjectsGithubEnterpriseConfigsDeleteCall) Context(ctx context.Context) *ProjectsGithubEnterpriseConfigsDeleteCall {
5644 c.ctx_ = ctx
5645 return c
5646 }
5647
5648
5649
5650 func (c *ProjectsGithubEnterpriseConfigsDeleteCall) Header() http.Header {
5651 if c.header_ == nil {
5652 c.header_ = make(http.Header)
5653 }
5654 return c.header_
5655 }
5656
5657 func (c *ProjectsGithubEnterpriseConfigsDeleteCall) doRequest(alt string) (*http.Response, error) {
5658 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5659 var body io.Reader = nil
5660 c.urlParams_.Set("alt", alt)
5661 c.urlParams_.Set("prettyPrint", "false")
5662 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
5663 urls += "?" + c.urlParams_.Encode()
5664 req, err := http.NewRequest("DELETE", urls, body)
5665 if err != nil {
5666 return nil, err
5667 }
5668 req.Header = reqHeaders
5669 googleapi.Expand(req.URL, map[string]string{
5670 "name": c.name,
5671 })
5672 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5673 }
5674
5675
5676
5677
5678
5679
5680 func (c *ProjectsGithubEnterpriseConfigsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5681 gensupport.SetOptions(c.urlParams_, opts...)
5682 res, err := c.doRequest("json")
5683 if res != nil && res.StatusCode == http.StatusNotModified {
5684 if res.Body != nil {
5685 res.Body.Close()
5686 }
5687 return nil, gensupport.WrapError(&googleapi.Error{
5688 Code: res.StatusCode,
5689 Header: res.Header,
5690 })
5691 }
5692 if err != nil {
5693 return nil, err
5694 }
5695 defer googleapi.CloseBody(res)
5696 if err := googleapi.CheckResponse(res); err != nil {
5697 return nil, gensupport.WrapError(err)
5698 }
5699 ret := &Operation{
5700 ServerResponse: googleapi.ServerResponse{
5701 Header: res.Header,
5702 HTTPStatusCode: res.StatusCode,
5703 },
5704 }
5705 target := &ret
5706 if err := gensupport.DecodeResponse(target, res); err != nil {
5707 return nil, err
5708 }
5709 return ret, nil
5710 }
5711
5712 type ProjectsGithubEnterpriseConfigsGetCall struct {
5713 s *Service
5714 name string
5715 urlParams_ gensupport.URLParams
5716 ifNoneMatch_ string
5717 ctx_ context.Context
5718 header_ http.Header
5719 }
5720
5721
5722
5723
5724
5725
5726
5727 func (r *ProjectsGithubEnterpriseConfigsService) Get(name string) *ProjectsGithubEnterpriseConfigsGetCall {
5728 c := &ProjectsGithubEnterpriseConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5729 c.name = name
5730 return c
5731 }
5732
5733
5734
5735 func (c *ProjectsGithubEnterpriseConfigsGetCall) ConfigId(configId string) *ProjectsGithubEnterpriseConfigsGetCall {
5736 c.urlParams_.Set("configId", configId)
5737 return c
5738 }
5739
5740
5741 func (c *ProjectsGithubEnterpriseConfigsGetCall) ProjectId(projectId string) *ProjectsGithubEnterpriseConfigsGetCall {
5742 c.urlParams_.Set("projectId", projectId)
5743 return c
5744 }
5745
5746
5747
5748
5749 func (c *ProjectsGithubEnterpriseConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsGithubEnterpriseConfigsGetCall {
5750 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5751 return c
5752 }
5753
5754
5755
5756
5757 func (c *ProjectsGithubEnterpriseConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsGithubEnterpriseConfigsGetCall {
5758 c.ifNoneMatch_ = entityTag
5759 return c
5760 }
5761
5762
5763 func (c *ProjectsGithubEnterpriseConfigsGetCall) Context(ctx context.Context) *ProjectsGithubEnterpriseConfigsGetCall {
5764 c.ctx_ = ctx
5765 return c
5766 }
5767
5768
5769
5770 func (c *ProjectsGithubEnterpriseConfigsGetCall) Header() http.Header {
5771 if c.header_ == nil {
5772 c.header_ = make(http.Header)
5773 }
5774 return c.header_
5775 }
5776
5777 func (c *ProjectsGithubEnterpriseConfigsGetCall) doRequest(alt string) (*http.Response, error) {
5778 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5779 if c.ifNoneMatch_ != "" {
5780 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5781 }
5782 var body io.Reader = nil
5783 c.urlParams_.Set("alt", alt)
5784 c.urlParams_.Set("prettyPrint", "false")
5785 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
5786 urls += "?" + c.urlParams_.Encode()
5787 req, err := http.NewRequest("GET", urls, body)
5788 if err != nil {
5789 return nil, err
5790 }
5791 req.Header = reqHeaders
5792 googleapi.Expand(req.URL, map[string]string{
5793 "name": c.name,
5794 })
5795 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5796 }
5797
5798
5799
5800
5801
5802
5803
5804 func (c *ProjectsGithubEnterpriseConfigsGetCall) Do(opts ...googleapi.CallOption) (*GitHubEnterpriseConfig, error) {
5805 gensupport.SetOptions(c.urlParams_, opts...)
5806 res, err := c.doRequest("json")
5807 if res != nil && res.StatusCode == http.StatusNotModified {
5808 if res.Body != nil {
5809 res.Body.Close()
5810 }
5811 return nil, gensupport.WrapError(&googleapi.Error{
5812 Code: res.StatusCode,
5813 Header: res.Header,
5814 })
5815 }
5816 if err != nil {
5817 return nil, err
5818 }
5819 defer googleapi.CloseBody(res)
5820 if err := googleapi.CheckResponse(res); err != nil {
5821 return nil, gensupport.WrapError(err)
5822 }
5823 ret := &GitHubEnterpriseConfig{
5824 ServerResponse: googleapi.ServerResponse{
5825 Header: res.Header,
5826 HTTPStatusCode: res.StatusCode,
5827 },
5828 }
5829 target := &ret
5830 if err := gensupport.DecodeResponse(target, res); err != nil {
5831 return nil, err
5832 }
5833 return ret, nil
5834 }
5835
5836 type ProjectsGithubEnterpriseConfigsListCall struct {
5837 s *Service
5838 parent string
5839 urlParams_ gensupport.URLParams
5840 ifNoneMatch_ string
5841 ctx_ context.Context
5842 header_ http.Header
5843 }
5844
5845
5846
5847
5848
5849 func (r *ProjectsGithubEnterpriseConfigsService) List(parent string) *ProjectsGithubEnterpriseConfigsListCall {
5850 c := &ProjectsGithubEnterpriseConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5851 c.parent = parent
5852 return c
5853 }
5854
5855
5856 func (c *ProjectsGithubEnterpriseConfigsListCall) ProjectId(projectId string) *ProjectsGithubEnterpriseConfigsListCall {
5857 c.urlParams_.Set("projectId", projectId)
5858 return c
5859 }
5860
5861
5862
5863
5864 func (c *ProjectsGithubEnterpriseConfigsListCall) Fields(s ...googleapi.Field) *ProjectsGithubEnterpriseConfigsListCall {
5865 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5866 return c
5867 }
5868
5869
5870
5871
5872 func (c *ProjectsGithubEnterpriseConfigsListCall) IfNoneMatch(entityTag string) *ProjectsGithubEnterpriseConfigsListCall {
5873 c.ifNoneMatch_ = entityTag
5874 return c
5875 }
5876
5877
5878 func (c *ProjectsGithubEnterpriseConfigsListCall) Context(ctx context.Context) *ProjectsGithubEnterpriseConfigsListCall {
5879 c.ctx_ = ctx
5880 return c
5881 }
5882
5883
5884
5885 func (c *ProjectsGithubEnterpriseConfigsListCall) Header() http.Header {
5886 if c.header_ == nil {
5887 c.header_ = make(http.Header)
5888 }
5889 return c.header_
5890 }
5891
5892 func (c *ProjectsGithubEnterpriseConfigsListCall) doRequest(alt string) (*http.Response, error) {
5893 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5894 if c.ifNoneMatch_ != "" {
5895 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5896 }
5897 var body io.Reader = nil
5898 c.urlParams_.Set("alt", alt)
5899 c.urlParams_.Set("prettyPrint", "false")
5900 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/githubEnterpriseConfigs")
5901 urls += "?" + c.urlParams_.Encode()
5902 req, err := http.NewRequest("GET", urls, body)
5903 if err != nil {
5904 return nil, err
5905 }
5906 req.Header = reqHeaders
5907 googleapi.Expand(req.URL, map[string]string{
5908 "parent": c.parent,
5909 })
5910 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5911 }
5912
5913
5914
5915
5916
5917
5918
5919 func (c *ProjectsGithubEnterpriseConfigsListCall) Do(opts ...googleapi.CallOption) (*ListGithubEnterpriseConfigsResponse, error) {
5920 gensupport.SetOptions(c.urlParams_, opts...)
5921 res, err := c.doRequest("json")
5922 if res != nil && res.StatusCode == http.StatusNotModified {
5923 if res.Body != nil {
5924 res.Body.Close()
5925 }
5926 return nil, gensupport.WrapError(&googleapi.Error{
5927 Code: res.StatusCode,
5928 Header: res.Header,
5929 })
5930 }
5931 if err != nil {
5932 return nil, err
5933 }
5934 defer googleapi.CloseBody(res)
5935 if err := googleapi.CheckResponse(res); err != nil {
5936 return nil, gensupport.WrapError(err)
5937 }
5938 ret := &ListGithubEnterpriseConfigsResponse{
5939 ServerResponse: googleapi.ServerResponse{
5940 Header: res.Header,
5941 HTTPStatusCode: res.StatusCode,
5942 },
5943 }
5944 target := &ret
5945 if err := gensupport.DecodeResponse(target, res); err != nil {
5946 return nil, err
5947 }
5948 return ret, nil
5949 }
5950
5951 type ProjectsGithubEnterpriseConfigsPatchCall struct {
5952 s *Service
5953 name string
5954 githubenterpriseconfig *GitHubEnterpriseConfig
5955 urlParams_ gensupport.URLParams
5956 ctx_ context.Context
5957 header_ http.Header
5958 }
5959
5960
5961
5962
5963
5964
5965
5966
5967 func (r *ProjectsGithubEnterpriseConfigsService) Patch(name string, githubenterpriseconfig *GitHubEnterpriseConfig) *ProjectsGithubEnterpriseConfigsPatchCall {
5968 c := &ProjectsGithubEnterpriseConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5969 c.name = name
5970 c.githubenterpriseconfig = githubenterpriseconfig
5971 return c
5972 }
5973
5974
5975
5976
5977
5978 func (c *ProjectsGithubEnterpriseConfigsPatchCall) UpdateMask(updateMask string) *ProjectsGithubEnterpriseConfigsPatchCall {
5979 c.urlParams_.Set("updateMask", updateMask)
5980 return c
5981 }
5982
5983
5984
5985
5986 func (c *ProjectsGithubEnterpriseConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsGithubEnterpriseConfigsPatchCall {
5987 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5988 return c
5989 }
5990
5991
5992 func (c *ProjectsGithubEnterpriseConfigsPatchCall) Context(ctx context.Context) *ProjectsGithubEnterpriseConfigsPatchCall {
5993 c.ctx_ = ctx
5994 return c
5995 }
5996
5997
5998
5999 func (c *ProjectsGithubEnterpriseConfigsPatchCall) Header() http.Header {
6000 if c.header_ == nil {
6001 c.header_ = make(http.Header)
6002 }
6003 return c.header_
6004 }
6005
6006 func (c *ProjectsGithubEnterpriseConfigsPatchCall) doRequest(alt string) (*http.Response, error) {
6007 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6008 var body io.Reader = nil
6009 body, err := googleapi.WithoutDataWrapper.JSONReader(c.githubenterpriseconfig)
6010 if err != nil {
6011 return nil, err
6012 }
6013 c.urlParams_.Set("alt", alt)
6014 c.urlParams_.Set("prettyPrint", "false")
6015 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6016 urls += "?" + c.urlParams_.Encode()
6017 req, err := http.NewRequest("PATCH", urls, body)
6018 if err != nil {
6019 return nil, err
6020 }
6021 req.Header = reqHeaders
6022 googleapi.Expand(req.URL, map[string]string{
6023 "name": c.name,
6024 })
6025 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6026 }
6027
6028
6029
6030
6031
6032
6033 func (c *ProjectsGithubEnterpriseConfigsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6034 gensupport.SetOptions(c.urlParams_, opts...)
6035 res, err := c.doRequest("json")
6036 if res != nil && res.StatusCode == http.StatusNotModified {
6037 if res.Body != nil {
6038 res.Body.Close()
6039 }
6040 return nil, gensupport.WrapError(&googleapi.Error{
6041 Code: res.StatusCode,
6042 Header: res.Header,
6043 })
6044 }
6045 if err != nil {
6046 return nil, err
6047 }
6048 defer googleapi.CloseBody(res)
6049 if err := googleapi.CheckResponse(res); err != nil {
6050 return nil, gensupport.WrapError(err)
6051 }
6052 ret := &Operation{
6053 ServerResponse: googleapi.ServerResponse{
6054 Header: res.Header,
6055 HTTPStatusCode: res.StatusCode,
6056 },
6057 }
6058 target := &ret
6059 if err := gensupport.DecodeResponse(target, res); err != nil {
6060 return nil, err
6061 }
6062 return ret, nil
6063 }
6064
6065 type ProjectsLocationsGetDefaultServiceAccountCall struct {
6066 s *Service
6067 name string
6068 urlParams_ gensupport.URLParams
6069 ifNoneMatch_ string
6070 ctx_ context.Context
6071 header_ http.Header
6072 }
6073
6074
6075
6076
6077
6078
6079 func (r *ProjectsLocationsService) GetDefaultServiceAccount(name string) *ProjectsLocationsGetDefaultServiceAccountCall {
6080 c := &ProjectsLocationsGetDefaultServiceAccountCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6081 c.name = name
6082 return c
6083 }
6084
6085
6086
6087
6088 func (c *ProjectsLocationsGetDefaultServiceAccountCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetDefaultServiceAccountCall {
6089 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6090 return c
6091 }
6092
6093
6094
6095
6096 func (c *ProjectsLocationsGetDefaultServiceAccountCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetDefaultServiceAccountCall {
6097 c.ifNoneMatch_ = entityTag
6098 return c
6099 }
6100
6101
6102 func (c *ProjectsLocationsGetDefaultServiceAccountCall) Context(ctx context.Context) *ProjectsLocationsGetDefaultServiceAccountCall {
6103 c.ctx_ = ctx
6104 return c
6105 }
6106
6107
6108
6109 func (c *ProjectsLocationsGetDefaultServiceAccountCall) Header() http.Header {
6110 if c.header_ == nil {
6111 c.header_ = make(http.Header)
6112 }
6113 return c.header_
6114 }
6115
6116 func (c *ProjectsLocationsGetDefaultServiceAccountCall) doRequest(alt string) (*http.Response, error) {
6117 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6118 if c.ifNoneMatch_ != "" {
6119 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6120 }
6121 var body io.Reader = nil
6122 c.urlParams_.Set("alt", alt)
6123 c.urlParams_.Set("prettyPrint", "false")
6124 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6125 urls += "?" + c.urlParams_.Encode()
6126 req, err := http.NewRequest("GET", urls, body)
6127 if err != nil {
6128 return nil, err
6129 }
6130 req.Header = reqHeaders
6131 googleapi.Expand(req.URL, map[string]string{
6132 "name": c.name,
6133 })
6134 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6135 }
6136
6137
6138
6139
6140
6141
6142
6143 func (c *ProjectsLocationsGetDefaultServiceAccountCall) Do(opts ...googleapi.CallOption) (*DefaultServiceAccount, error) {
6144 gensupport.SetOptions(c.urlParams_, opts...)
6145 res, err := c.doRequest("json")
6146 if res != nil && res.StatusCode == http.StatusNotModified {
6147 if res.Body != nil {
6148 res.Body.Close()
6149 }
6150 return nil, gensupport.WrapError(&googleapi.Error{
6151 Code: res.StatusCode,
6152 Header: res.Header,
6153 })
6154 }
6155 if err != nil {
6156 return nil, err
6157 }
6158 defer googleapi.CloseBody(res)
6159 if err := googleapi.CheckResponse(res); err != nil {
6160 return nil, gensupport.WrapError(err)
6161 }
6162 ret := &DefaultServiceAccount{
6163 ServerResponse: googleapi.ServerResponse{
6164 Header: res.Header,
6165 HTTPStatusCode: res.StatusCode,
6166 },
6167 }
6168 target := &ret
6169 if err := gensupport.DecodeResponse(target, res); err != nil {
6170 return nil, err
6171 }
6172 return ret, nil
6173 }
6174
6175 type ProjectsLocationsBitbucketServerConfigsCreateCall struct {
6176 s *Service
6177 parent string
6178 bitbucketserverconfig *BitbucketServerConfig
6179 urlParams_ gensupport.URLParams
6180 ctx_ context.Context
6181 header_ http.Header
6182 }
6183
6184
6185
6186
6187 func (r *ProjectsLocationsBitbucketServerConfigsService) Create(parent string, bitbucketserverconfig *BitbucketServerConfig) *ProjectsLocationsBitbucketServerConfigsCreateCall {
6188 c := &ProjectsLocationsBitbucketServerConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6189 c.parent = parent
6190 c.bitbucketserverconfig = bitbucketserverconfig
6191 return c
6192 }
6193
6194
6195
6196
6197
6198
6199
6200
6201 func (c *ProjectsLocationsBitbucketServerConfigsCreateCall) BitbucketServerConfigId(bitbucketServerConfigId string) *ProjectsLocationsBitbucketServerConfigsCreateCall {
6202 c.urlParams_.Set("bitbucketServerConfigId", bitbucketServerConfigId)
6203 return c
6204 }
6205
6206
6207
6208
6209 func (c *ProjectsLocationsBitbucketServerConfigsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsBitbucketServerConfigsCreateCall {
6210 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6211 return c
6212 }
6213
6214
6215 func (c *ProjectsLocationsBitbucketServerConfigsCreateCall) Context(ctx context.Context) *ProjectsLocationsBitbucketServerConfigsCreateCall {
6216 c.ctx_ = ctx
6217 return c
6218 }
6219
6220
6221
6222 func (c *ProjectsLocationsBitbucketServerConfigsCreateCall) Header() http.Header {
6223 if c.header_ == nil {
6224 c.header_ = make(http.Header)
6225 }
6226 return c.header_
6227 }
6228
6229 func (c *ProjectsLocationsBitbucketServerConfigsCreateCall) doRequest(alt string) (*http.Response, error) {
6230 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6231 var body io.Reader = nil
6232 body, err := googleapi.WithoutDataWrapper.JSONReader(c.bitbucketserverconfig)
6233 if err != nil {
6234 return nil, err
6235 }
6236 c.urlParams_.Set("alt", alt)
6237 c.urlParams_.Set("prettyPrint", "false")
6238 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/bitbucketServerConfigs")
6239 urls += "?" + c.urlParams_.Encode()
6240 req, err := http.NewRequest("POST", urls, body)
6241 if err != nil {
6242 return nil, err
6243 }
6244 req.Header = reqHeaders
6245 googleapi.Expand(req.URL, map[string]string{
6246 "parent": c.parent,
6247 })
6248 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6249 }
6250
6251
6252
6253
6254
6255
6256 func (c *ProjectsLocationsBitbucketServerConfigsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6257 gensupport.SetOptions(c.urlParams_, opts...)
6258 res, err := c.doRequest("json")
6259 if res != nil && res.StatusCode == http.StatusNotModified {
6260 if res.Body != nil {
6261 res.Body.Close()
6262 }
6263 return nil, gensupport.WrapError(&googleapi.Error{
6264 Code: res.StatusCode,
6265 Header: res.Header,
6266 })
6267 }
6268 if err != nil {
6269 return nil, err
6270 }
6271 defer googleapi.CloseBody(res)
6272 if err := googleapi.CheckResponse(res); err != nil {
6273 return nil, gensupport.WrapError(err)
6274 }
6275 ret := &Operation{
6276 ServerResponse: googleapi.ServerResponse{
6277 Header: res.Header,
6278 HTTPStatusCode: res.StatusCode,
6279 },
6280 }
6281 target := &ret
6282 if err := gensupport.DecodeResponse(target, res); err != nil {
6283 return nil, err
6284 }
6285 return ret, nil
6286 }
6287
6288 type ProjectsLocationsBitbucketServerConfigsDeleteCall struct {
6289 s *Service
6290 name string
6291 urlParams_ gensupport.URLParams
6292 ctx_ context.Context
6293 header_ http.Header
6294 }
6295
6296
6297
6298
6299 func (r *ProjectsLocationsBitbucketServerConfigsService) Delete(name string) *ProjectsLocationsBitbucketServerConfigsDeleteCall {
6300 c := &ProjectsLocationsBitbucketServerConfigsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6301 c.name = name
6302 return c
6303 }
6304
6305
6306
6307
6308 func (c *ProjectsLocationsBitbucketServerConfigsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsBitbucketServerConfigsDeleteCall {
6309 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6310 return c
6311 }
6312
6313
6314 func (c *ProjectsLocationsBitbucketServerConfigsDeleteCall) Context(ctx context.Context) *ProjectsLocationsBitbucketServerConfigsDeleteCall {
6315 c.ctx_ = ctx
6316 return c
6317 }
6318
6319
6320
6321 func (c *ProjectsLocationsBitbucketServerConfigsDeleteCall) Header() http.Header {
6322 if c.header_ == nil {
6323 c.header_ = make(http.Header)
6324 }
6325 return c.header_
6326 }
6327
6328 func (c *ProjectsLocationsBitbucketServerConfigsDeleteCall) doRequest(alt string) (*http.Response, error) {
6329 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6330 var body io.Reader = nil
6331 c.urlParams_.Set("alt", alt)
6332 c.urlParams_.Set("prettyPrint", "false")
6333 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6334 urls += "?" + c.urlParams_.Encode()
6335 req, err := http.NewRequest("DELETE", urls, body)
6336 if err != nil {
6337 return nil, err
6338 }
6339 req.Header = reqHeaders
6340 googleapi.Expand(req.URL, map[string]string{
6341 "name": c.name,
6342 })
6343 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6344 }
6345
6346
6347
6348
6349
6350
6351 func (c *ProjectsLocationsBitbucketServerConfigsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6352 gensupport.SetOptions(c.urlParams_, opts...)
6353 res, err := c.doRequest("json")
6354 if res != nil && res.StatusCode == http.StatusNotModified {
6355 if res.Body != nil {
6356 res.Body.Close()
6357 }
6358 return nil, gensupport.WrapError(&googleapi.Error{
6359 Code: res.StatusCode,
6360 Header: res.Header,
6361 })
6362 }
6363 if err != nil {
6364 return nil, err
6365 }
6366 defer googleapi.CloseBody(res)
6367 if err := googleapi.CheckResponse(res); err != nil {
6368 return nil, gensupport.WrapError(err)
6369 }
6370 ret := &Operation{
6371 ServerResponse: googleapi.ServerResponse{
6372 Header: res.Header,
6373 HTTPStatusCode: res.StatusCode,
6374 },
6375 }
6376 target := &ret
6377 if err := gensupport.DecodeResponse(target, res); err != nil {
6378 return nil, err
6379 }
6380 return ret, nil
6381 }
6382
6383 type ProjectsLocationsBitbucketServerConfigsGetCall struct {
6384 s *Service
6385 name string
6386 urlParams_ gensupport.URLParams
6387 ifNoneMatch_ string
6388 ctx_ context.Context
6389 header_ http.Header
6390 }
6391
6392
6393
6394
6395 func (r *ProjectsLocationsBitbucketServerConfigsService) Get(name string) *ProjectsLocationsBitbucketServerConfigsGetCall {
6396 c := &ProjectsLocationsBitbucketServerConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6397 c.name = name
6398 return c
6399 }
6400
6401
6402
6403
6404 func (c *ProjectsLocationsBitbucketServerConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsBitbucketServerConfigsGetCall {
6405 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6406 return c
6407 }
6408
6409
6410
6411
6412 func (c *ProjectsLocationsBitbucketServerConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsBitbucketServerConfigsGetCall {
6413 c.ifNoneMatch_ = entityTag
6414 return c
6415 }
6416
6417
6418 func (c *ProjectsLocationsBitbucketServerConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsBitbucketServerConfigsGetCall {
6419 c.ctx_ = ctx
6420 return c
6421 }
6422
6423
6424
6425 func (c *ProjectsLocationsBitbucketServerConfigsGetCall) Header() http.Header {
6426 if c.header_ == nil {
6427 c.header_ = make(http.Header)
6428 }
6429 return c.header_
6430 }
6431
6432 func (c *ProjectsLocationsBitbucketServerConfigsGetCall) doRequest(alt string) (*http.Response, error) {
6433 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6434 if c.ifNoneMatch_ != "" {
6435 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6436 }
6437 var body io.Reader = nil
6438 c.urlParams_.Set("alt", alt)
6439 c.urlParams_.Set("prettyPrint", "false")
6440 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6441 urls += "?" + c.urlParams_.Encode()
6442 req, err := http.NewRequest("GET", urls, body)
6443 if err != nil {
6444 return nil, err
6445 }
6446 req.Header = reqHeaders
6447 googleapi.Expand(req.URL, map[string]string{
6448 "name": c.name,
6449 })
6450 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6451 }
6452
6453
6454
6455
6456
6457
6458
6459 func (c *ProjectsLocationsBitbucketServerConfigsGetCall) Do(opts ...googleapi.CallOption) (*BitbucketServerConfig, error) {
6460 gensupport.SetOptions(c.urlParams_, opts...)
6461 res, err := c.doRequest("json")
6462 if res != nil && res.StatusCode == http.StatusNotModified {
6463 if res.Body != nil {
6464 res.Body.Close()
6465 }
6466 return nil, gensupport.WrapError(&googleapi.Error{
6467 Code: res.StatusCode,
6468 Header: res.Header,
6469 })
6470 }
6471 if err != nil {
6472 return nil, err
6473 }
6474 defer googleapi.CloseBody(res)
6475 if err := googleapi.CheckResponse(res); err != nil {
6476 return nil, gensupport.WrapError(err)
6477 }
6478 ret := &BitbucketServerConfig{
6479 ServerResponse: googleapi.ServerResponse{
6480 Header: res.Header,
6481 HTTPStatusCode: res.StatusCode,
6482 },
6483 }
6484 target := &ret
6485 if err := gensupport.DecodeResponse(target, res); err != nil {
6486 return nil, err
6487 }
6488 return ret, nil
6489 }
6490
6491 type ProjectsLocationsBitbucketServerConfigsListCall struct {
6492 s *Service
6493 parent string
6494 urlParams_ gensupport.URLParams
6495 ifNoneMatch_ string
6496 ctx_ context.Context
6497 header_ http.Header
6498 }
6499
6500
6501
6502
6503
6504 func (r *ProjectsLocationsBitbucketServerConfigsService) List(parent string) *ProjectsLocationsBitbucketServerConfigsListCall {
6505 c := &ProjectsLocationsBitbucketServerConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6506 c.parent = parent
6507 return c
6508 }
6509
6510
6511
6512
6513
6514 func (c *ProjectsLocationsBitbucketServerConfigsListCall) PageSize(pageSize int64) *ProjectsLocationsBitbucketServerConfigsListCall {
6515 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
6516 return c
6517 }
6518
6519
6520
6521
6522
6523
6524 func (c *ProjectsLocationsBitbucketServerConfigsListCall) PageToken(pageToken string) *ProjectsLocationsBitbucketServerConfigsListCall {
6525 c.urlParams_.Set("pageToken", pageToken)
6526 return c
6527 }
6528
6529
6530
6531
6532 func (c *ProjectsLocationsBitbucketServerConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBitbucketServerConfigsListCall {
6533 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6534 return c
6535 }
6536
6537
6538
6539
6540 func (c *ProjectsLocationsBitbucketServerConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBitbucketServerConfigsListCall {
6541 c.ifNoneMatch_ = entityTag
6542 return c
6543 }
6544
6545
6546 func (c *ProjectsLocationsBitbucketServerConfigsListCall) Context(ctx context.Context) *ProjectsLocationsBitbucketServerConfigsListCall {
6547 c.ctx_ = ctx
6548 return c
6549 }
6550
6551
6552
6553 func (c *ProjectsLocationsBitbucketServerConfigsListCall) Header() http.Header {
6554 if c.header_ == nil {
6555 c.header_ = make(http.Header)
6556 }
6557 return c.header_
6558 }
6559
6560 func (c *ProjectsLocationsBitbucketServerConfigsListCall) doRequest(alt string) (*http.Response, error) {
6561 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6562 if c.ifNoneMatch_ != "" {
6563 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6564 }
6565 var body io.Reader = nil
6566 c.urlParams_.Set("alt", alt)
6567 c.urlParams_.Set("prettyPrint", "false")
6568 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/bitbucketServerConfigs")
6569 urls += "?" + c.urlParams_.Encode()
6570 req, err := http.NewRequest("GET", urls, body)
6571 if err != nil {
6572 return nil, err
6573 }
6574 req.Header = reqHeaders
6575 googleapi.Expand(req.URL, map[string]string{
6576 "parent": c.parent,
6577 })
6578 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6579 }
6580
6581
6582
6583
6584
6585
6586
6587 func (c *ProjectsLocationsBitbucketServerConfigsListCall) Do(opts ...googleapi.CallOption) (*ListBitbucketServerConfigsResponse, error) {
6588 gensupport.SetOptions(c.urlParams_, opts...)
6589 res, err := c.doRequest("json")
6590 if res != nil && res.StatusCode == http.StatusNotModified {
6591 if res.Body != nil {
6592 res.Body.Close()
6593 }
6594 return nil, gensupport.WrapError(&googleapi.Error{
6595 Code: res.StatusCode,
6596 Header: res.Header,
6597 })
6598 }
6599 if err != nil {
6600 return nil, err
6601 }
6602 defer googleapi.CloseBody(res)
6603 if err := googleapi.CheckResponse(res); err != nil {
6604 return nil, gensupport.WrapError(err)
6605 }
6606 ret := &ListBitbucketServerConfigsResponse{
6607 ServerResponse: googleapi.ServerResponse{
6608 Header: res.Header,
6609 HTTPStatusCode: res.StatusCode,
6610 },
6611 }
6612 target := &ret
6613 if err := gensupport.DecodeResponse(target, res); err != nil {
6614 return nil, err
6615 }
6616 return ret, nil
6617 }
6618
6619
6620
6621
6622 func (c *ProjectsLocationsBitbucketServerConfigsListCall) Pages(ctx context.Context, f func(*ListBitbucketServerConfigsResponse) error) error {
6623 c.ctx_ = ctx
6624 defer c.PageToken(c.urlParams_.Get("pageToken"))
6625 for {
6626 x, err := c.Do()
6627 if err != nil {
6628 return err
6629 }
6630 if err := f(x); err != nil {
6631 return err
6632 }
6633 if x.NextPageToken == "" {
6634 return nil
6635 }
6636 c.PageToken(x.NextPageToken)
6637 }
6638 }
6639
6640 type ProjectsLocationsBitbucketServerConfigsPatchCall struct {
6641 s *Service
6642 name string
6643 bitbucketserverconfig *BitbucketServerConfig
6644 urlParams_ gensupport.URLParams
6645 ctx_ context.Context
6646 header_ http.Header
6647 }
6648
6649
6650
6651
6652
6653 func (r *ProjectsLocationsBitbucketServerConfigsService) Patch(name string, bitbucketserverconfig *BitbucketServerConfig) *ProjectsLocationsBitbucketServerConfigsPatchCall {
6654 c := &ProjectsLocationsBitbucketServerConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6655 c.name = name
6656 c.bitbucketserverconfig = bitbucketserverconfig
6657 return c
6658 }
6659
6660
6661
6662
6663
6664 func (c *ProjectsLocationsBitbucketServerConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsBitbucketServerConfigsPatchCall {
6665 c.urlParams_.Set("updateMask", updateMask)
6666 return c
6667 }
6668
6669
6670
6671
6672 func (c *ProjectsLocationsBitbucketServerConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsBitbucketServerConfigsPatchCall {
6673 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6674 return c
6675 }
6676
6677
6678 func (c *ProjectsLocationsBitbucketServerConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsBitbucketServerConfigsPatchCall {
6679 c.ctx_ = ctx
6680 return c
6681 }
6682
6683
6684
6685 func (c *ProjectsLocationsBitbucketServerConfigsPatchCall) Header() http.Header {
6686 if c.header_ == nil {
6687 c.header_ = make(http.Header)
6688 }
6689 return c.header_
6690 }
6691
6692 func (c *ProjectsLocationsBitbucketServerConfigsPatchCall) doRequest(alt string) (*http.Response, error) {
6693 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6694 var body io.Reader = nil
6695 body, err := googleapi.WithoutDataWrapper.JSONReader(c.bitbucketserverconfig)
6696 if err != nil {
6697 return nil, err
6698 }
6699 c.urlParams_.Set("alt", alt)
6700 c.urlParams_.Set("prettyPrint", "false")
6701 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6702 urls += "?" + c.urlParams_.Encode()
6703 req, err := http.NewRequest("PATCH", urls, body)
6704 if err != nil {
6705 return nil, err
6706 }
6707 req.Header = reqHeaders
6708 googleapi.Expand(req.URL, map[string]string{
6709 "name": c.name,
6710 })
6711 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6712 }
6713
6714
6715
6716
6717
6718
6719 func (c *ProjectsLocationsBitbucketServerConfigsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6720 gensupport.SetOptions(c.urlParams_, opts...)
6721 res, err := c.doRequest("json")
6722 if res != nil && res.StatusCode == http.StatusNotModified {
6723 if res.Body != nil {
6724 res.Body.Close()
6725 }
6726 return nil, gensupport.WrapError(&googleapi.Error{
6727 Code: res.StatusCode,
6728 Header: res.Header,
6729 })
6730 }
6731 if err != nil {
6732 return nil, err
6733 }
6734 defer googleapi.CloseBody(res)
6735 if err := googleapi.CheckResponse(res); err != nil {
6736 return nil, gensupport.WrapError(err)
6737 }
6738 ret := &Operation{
6739 ServerResponse: googleapi.ServerResponse{
6740 Header: res.Header,
6741 HTTPStatusCode: res.StatusCode,
6742 },
6743 }
6744 target := &ret
6745 if err := gensupport.DecodeResponse(target, res); err != nil {
6746 return nil, err
6747 }
6748 return ret, nil
6749 }
6750
6751 type ProjectsLocationsBitbucketServerConfigsRemoveBitbucketServerConnectedRepositoryCall struct {
6752 s *Service
6753 config string
6754 removebitbucketserverconnectedrepositoryrequest *RemoveBitbucketServerConnectedRepositoryRequest
6755 urlParams_ gensupport.URLParams
6756 ctx_ context.Context
6757 header_ http.Header
6758 }
6759
6760
6761
6762
6763
6764
6765
6766
6767 func (r *ProjectsLocationsBitbucketServerConfigsService) RemoveBitbucketServerConnectedRepository(config string, removebitbucketserverconnectedrepositoryrequest *RemoveBitbucketServerConnectedRepositoryRequest) *ProjectsLocationsBitbucketServerConfigsRemoveBitbucketServerConnectedRepositoryCall {
6768 c := &ProjectsLocationsBitbucketServerConfigsRemoveBitbucketServerConnectedRepositoryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6769 c.config = config
6770 c.removebitbucketserverconnectedrepositoryrequest = removebitbucketserverconnectedrepositoryrequest
6771 return c
6772 }
6773
6774
6775
6776
6777 func (c *ProjectsLocationsBitbucketServerConfigsRemoveBitbucketServerConnectedRepositoryCall) Fields(s ...googleapi.Field) *ProjectsLocationsBitbucketServerConfigsRemoveBitbucketServerConnectedRepositoryCall {
6778 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6779 return c
6780 }
6781
6782
6783 func (c *ProjectsLocationsBitbucketServerConfigsRemoveBitbucketServerConnectedRepositoryCall) Context(ctx context.Context) *ProjectsLocationsBitbucketServerConfigsRemoveBitbucketServerConnectedRepositoryCall {
6784 c.ctx_ = ctx
6785 return c
6786 }
6787
6788
6789
6790 func (c *ProjectsLocationsBitbucketServerConfigsRemoveBitbucketServerConnectedRepositoryCall) Header() http.Header {
6791 if c.header_ == nil {
6792 c.header_ = make(http.Header)
6793 }
6794 return c.header_
6795 }
6796
6797 func (c *ProjectsLocationsBitbucketServerConfigsRemoveBitbucketServerConnectedRepositoryCall) doRequest(alt string) (*http.Response, error) {
6798 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6799 var body io.Reader = nil
6800 body, err := googleapi.WithoutDataWrapper.JSONReader(c.removebitbucketserverconnectedrepositoryrequest)
6801 if err != nil {
6802 return nil, err
6803 }
6804 c.urlParams_.Set("alt", alt)
6805 c.urlParams_.Set("prettyPrint", "false")
6806 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+config}:removeBitbucketServerConnectedRepository")
6807 urls += "?" + c.urlParams_.Encode()
6808 req, err := http.NewRequest("POST", urls, body)
6809 if err != nil {
6810 return nil, err
6811 }
6812 req.Header = reqHeaders
6813 googleapi.Expand(req.URL, map[string]string{
6814 "config": c.config,
6815 })
6816 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6817 }
6818
6819
6820
6821
6822
6823
6824 func (c *ProjectsLocationsBitbucketServerConfigsRemoveBitbucketServerConnectedRepositoryCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
6825 gensupport.SetOptions(c.urlParams_, opts...)
6826 res, err := c.doRequest("json")
6827 if res != nil && res.StatusCode == http.StatusNotModified {
6828 if res.Body != nil {
6829 res.Body.Close()
6830 }
6831 return nil, gensupport.WrapError(&googleapi.Error{
6832 Code: res.StatusCode,
6833 Header: res.Header,
6834 })
6835 }
6836 if err != nil {
6837 return nil, err
6838 }
6839 defer googleapi.CloseBody(res)
6840 if err := googleapi.CheckResponse(res); err != nil {
6841 return nil, gensupport.WrapError(err)
6842 }
6843 ret := &Empty{
6844 ServerResponse: googleapi.ServerResponse{
6845 Header: res.Header,
6846 HTTPStatusCode: res.StatusCode,
6847 },
6848 }
6849 target := &ret
6850 if err := gensupport.DecodeResponse(target, res); err != nil {
6851 return nil, err
6852 }
6853 return ret, nil
6854 }
6855
6856 type ProjectsLocationsBitbucketServerConfigsConnectedRepositoriesBatchCreateCall struct {
6857 s *Service
6858 parent string
6859 batchcreatebitbucketserverconnectedrepositoriesrequest *BatchCreateBitbucketServerConnectedRepositoriesRequest
6860 urlParams_ gensupport.URLParams
6861 ctx_ context.Context
6862 header_ http.Header
6863 }
6864
6865
6866
6867
6868
6869
6870 func (r *ProjectsLocationsBitbucketServerConfigsConnectedRepositoriesService) BatchCreate(parent string, batchcreatebitbucketserverconnectedrepositoriesrequest *BatchCreateBitbucketServerConnectedRepositoriesRequest) *ProjectsLocationsBitbucketServerConfigsConnectedRepositoriesBatchCreateCall {
6871 c := &ProjectsLocationsBitbucketServerConfigsConnectedRepositoriesBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6872 c.parent = parent
6873 c.batchcreatebitbucketserverconnectedrepositoriesrequest = batchcreatebitbucketserverconnectedrepositoriesrequest
6874 return c
6875 }
6876
6877
6878
6879
6880 func (c *ProjectsLocationsBitbucketServerConfigsConnectedRepositoriesBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsBitbucketServerConfigsConnectedRepositoriesBatchCreateCall {
6881 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6882 return c
6883 }
6884
6885
6886 func (c *ProjectsLocationsBitbucketServerConfigsConnectedRepositoriesBatchCreateCall) Context(ctx context.Context) *ProjectsLocationsBitbucketServerConfigsConnectedRepositoriesBatchCreateCall {
6887 c.ctx_ = ctx
6888 return c
6889 }
6890
6891
6892
6893 func (c *ProjectsLocationsBitbucketServerConfigsConnectedRepositoriesBatchCreateCall) Header() http.Header {
6894 if c.header_ == nil {
6895 c.header_ = make(http.Header)
6896 }
6897 return c.header_
6898 }
6899
6900 func (c *ProjectsLocationsBitbucketServerConfigsConnectedRepositoriesBatchCreateCall) doRequest(alt string) (*http.Response, error) {
6901 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6902 var body io.Reader = nil
6903 body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchcreatebitbucketserverconnectedrepositoriesrequest)
6904 if err != nil {
6905 return nil, err
6906 }
6907 c.urlParams_.Set("alt", alt)
6908 c.urlParams_.Set("prettyPrint", "false")
6909 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/connectedRepositories:batchCreate")
6910 urls += "?" + c.urlParams_.Encode()
6911 req, err := http.NewRequest("POST", urls, body)
6912 if err != nil {
6913 return nil, err
6914 }
6915 req.Header = reqHeaders
6916 googleapi.Expand(req.URL, map[string]string{
6917 "parent": c.parent,
6918 })
6919 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6920 }
6921
6922
6923
6924
6925
6926
6927 func (c *ProjectsLocationsBitbucketServerConfigsConnectedRepositoriesBatchCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6928 gensupport.SetOptions(c.urlParams_, opts...)
6929 res, err := c.doRequest("json")
6930 if res != nil && res.StatusCode == http.StatusNotModified {
6931 if res.Body != nil {
6932 res.Body.Close()
6933 }
6934 return nil, gensupport.WrapError(&googleapi.Error{
6935 Code: res.StatusCode,
6936 Header: res.Header,
6937 })
6938 }
6939 if err != nil {
6940 return nil, err
6941 }
6942 defer googleapi.CloseBody(res)
6943 if err := googleapi.CheckResponse(res); err != nil {
6944 return nil, gensupport.WrapError(err)
6945 }
6946 ret := &Operation{
6947 ServerResponse: googleapi.ServerResponse{
6948 Header: res.Header,
6949 HTTPStatusCode: res.StatusCode,
6950 },
6951 }
6952 target := &ret
6953 if err := gensupport.DecodeResponse(target, res); err != nil {
6954 return nil, err
6955 }
6956 return ret, nil
6957 }
6958
6959 type ProjectsLocationsBitbucketServerConfigsReposListCall struct {
6960 s *Service
6961 parent string
6962 urlParams_ gensupport.URLParams
6963 ifNoneMatch_ string
6964 ctx_ context.Context
6965 header_ http.Header
6966 }
6967
6968
6969
6970
6971
6972 func (r *ProjectsLocationsBitbucketServerConfigsReposService) List(parent string) *ProjectsLocationsBitbucketServerConfigsReposListCall {
6973 c := &ProjectsLocationsBitbucketServerConfigsReposListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6974 c.parent = parent
6975 return c
6976 }
6977
6978
6979
6980
6981 func (c *ProjectsLocationsBitbucketServerConfigsReposListCall) PageSize(pageSize int64) *ProjectsLocationsBitbucketServerConfigsReposListCall {
6982 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
6983 return c
6984 }
6985
6986
6987
6988
6989
6990
6991 func (c *ProjectsLocationsBitbucketServerConfigsReposListCall) PageToken(pageToken string) *ProjectsLocationsBitbucketServerConfigsReposListCall {
6992 c.urlParams_.Set("pageToken", pageToken)
6993 return c
6994 }
6995
6996
6997
6998
6999 func (c *ProjectsLocationsBitbucketServerConfigsReposListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBitbucketServerConfigsReposListCall {
7000 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7001 return c
7002 }
7003
7004
7005
7006
7007 func (c *ProjectsLocationsBitbucketServerConfigsReposListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBitbucketServerConfigsReposListCall {
7008 c.ifNoneMatch_ = entityTag
7009 return c
7010 }
7011
7012
7013 func (c *ProjectsLocationsBitbucketServerConfigsReposListCall) Context(ctx context.Context) *ProjectsLocationsBitbucketServerConfigsReposListCall {
7014 c.ctx_ = ctx
7015 return c
7016 }
7017
7018
7019
7020 func (c *ProjectsLocationsBitbucketServerConfigsReposListCall) Header() http.Header {
7021 if c.header_ == nil {
7022 c.header_ = make(http.Header)
7023 }
7024 return c.header_
7025 }
7026
7027 func (c *ProjectsLocationsBitbucketServerConfigsReposListCall) doRequest(alt string) (*http.Response, error) {
7028 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7029 if c.ifNoneMatch_ != "" {
7030 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7031 }
7032 var body io.Reader = nil
7033 c.urlParams_.Set("alt", alt)
7034 c.urlParams_.Set("prettyPrint", "false")
7035 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/repos")
7036 urls += "?" + c.urlParams_.Encode()
7037 req, err := http.NewRequest("GET", urls, body)
7038 if err != nil {
7039 return nil, err
7040 }
7041 req.Header = reqHeaders
7042 googleapi.Expand(req.URL, map[string]string{
7043 "parent": c.parent,
7044 })
7045 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7046 }
7047
7048
7049
7050
7051
7052
7053
7054 func (c *ProjectsLocationsBitbucketServerConfigsReposListCall) Do(opts ...googleapi.CallOption) (*ListBitbucketServerRepositoriesResponse, error) {
7055 gensupport.SetOptions(c.urlParams_, opts...)
7056 res, err := c.doRequest("json")
7057 if res != nil && res.StatusCode == http.StatusNotModified {
7058 if res.Body != nil {
7059 res.Body.Close()
7060 }
7061 return nil, gensupport.WrapError(&googleapi.Error{
7062 Code: res.StatusCode,
7063 Header: res.Header,
7064 })
7065 }
7066 if err != nil {
7067 return nil, err
7068 }
7069 defer googleapi.CloseBody(res)
7070 if err := googleapi.CheckResponse(res); err != nil {
7071 return nil, gensupport.WrapError(err)
7072 }
7073 ret := &ListBitbucketServerRepositoriesResponse{
7074 ServerResponse: googleapi.ServerResponse{
7075 Header: res.Header,
7076 HTTPStatusCode: res.StatusCode,
7077 },
7078 }
7079 target := &ret
7080 if err := gensupport.DecodeResponse(target, res); err != nil {
7081 return nil, err
7082 }
7083 return ret, nil
7084 }
7085
7086
7087
7088
7089 func (c *ProjectsLocationsBitbucketServerConfigsReposListCall) Pages(ctx context.Context, f func(*ListBitbucketServerRepositoriesResponse) error) error {
7090 c.ctx_ = ctx
7091 defer c.PageToken(c.urlParams_.Get("pageToken"))
7092 for {
7093 x, err := c.Do()
7094 if err != nil {
7095 return err
7096 }
7097 if err := f(x); err != nil {
7098 return err
7099 }
7100 if x.NextPageToken == "" {
7101 return nil
7102 }
7103 c.PageToken(x.NextPageToken)
7104 }
7105 }
7106
7107 type ProjectsLocationsBuildsApproveCall struct {
7108 s *Service
7109 name string
7110 approvebuildrequest *ApproveBuildRequest
7111 urlParams_ gensupport.URLParams
7112 ctx_ context.Context
7113 header_ http.Header
7114 }
7115
7116
7117
7118
7119
7120
7121
7122 func (r *ProjectsLocationsBuildsService) Approve(name string, approvebuildrequest *ApproveBuildRequest) *ProjectsLocationsBuildsApproveCall {
7123 c := &ProjectsLocationsBuildsApproveCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7124 c.name = name
7125 c.approvebuildrequest = approvebuildrequest
7126 return c
7127 }
7128
7129
7130
7131
7132 func (c *ProjectsLocationsBuildsApproveCall) Fields(s ...googleapi.Field) *ProjectsLocationsBuildsApproveCall {
7133 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7134 return c
7135 }
7136
7137
7138 func (c *ProjectsLocationsBuildsApproveCall) Context(ctx context.Context) *ProjectsLocationsBuildsApproveCall {
7139 c.ctx_ = ctx
7140 return c
7141 }
7142
7143
7144
7145 func (c *ProjectsLocationsBuildsApproveCall) Header() http.Header {
7146 if c.header_ == nil {
7147 c.header_ = make(http.Header)
7148 }
7149 return c.header_
7150 }
7151
7152 func (c *ProjectsLocationsBuildsApproveCall) doRequest(alt string) (*http.Response, error) {
7153 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7154 var body io.Reader = nil
7155 body, err := googleapi.WithoutDataWrapper.JSONReader(c.approvebuildrequest)
7156 if err != nil {
7157 return nil, err
7158 }
7159 c.urlParams_.Set("alt", alt)
7160 c.urlParams_.Set("prettyPrint", "false")
7161 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:approve")
7162 urls += "?" + c.urlParams_.Encode()
7163 req, err := http.NewRequest("POST", urls, body)
7164 if err != nil {
7165 return nil, err
7166 }
7167 req.Header = reqHeaders
7168 googleapi.Expand(req.URL, map[string]string{
7169 "name": c.name,
7170 })
7171 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7172 }
7173
7174
7175
7176
7177
7178
7179 func (c *ProjectsLocationsBuildsApproveCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7180 gensupport.SetOptions(c.urlParams_, opts...)
7181 res, err := c.doRequest("json")
7182 if res != nil && res.StatusCode == http.StatusNotModified {
7183 if res.Body != nil {
7184 res.Body.Close()
7185 }
7186 return nil, gensupport.WrapError(&googleapi.Error{
7187 Code: res.StatusCode,
7188 Header: res.Header,
7189 })
7190 }
7191 if err != nil {
7192 return nil, err
7193 }
7194 defer googleapi.CloseBody(res)
7195 if err := googleapi.CheckResponse(res); err != nil {
7196 return nil, gensupport.WrapError(err)
7197 }
7198 ret := &Operation{
7199 ServerResponse: googleapi.ServerResponse{
7200 Header: res.Header,
7201 HTTPStatusCode: res.StatusCode,
7202 },
7203 }
7204 target := &ret
7205 if err := gensupport.DecodeResponse(target, res); err != nil {
7206 return nil, err
7207 }
7208 return ret, nil
7209 }
7210
7211 type ProjectsLocationsBuildsCancelCall struct {
7212 s *Service
7213 name string
7214 cancelbuildrequest *CancelBuildRequest
7215 urlParams_ gensupport.URLParams
7216 ctx_ context.Context
7217 header_ http.Header
7218 }
7219
7220
7221
7222
7223
7224 func (r *ProjectsLocationsBuildsService) Cancel(name string, cancelbuildrequest *CancelBuildRequest) *ProjectsLocationsBuildsCancelCall {
7225 c := &ProjectsLocationsBuildsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7226 c.name = name
7227 c.cancelbuildrequest = cancelbuildrequest
7228 return c
7229 }
7230
7231
7232
7233
7234 func (c *ProjectsLocationsBuildsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsBuildsCancelCall {
7235 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7236 return c
7237 }
7238
7239
7240 func (c *ProjectsLocationsBuildsCancelCall) Context(ctx context.Context) *ProjectsLocationsBuildsCancelCall {
7241 c.ctx_ = ctx
7242 return c
7243 }
7244
7245
7246
7247 func (c *ProjectsLocationsBuildsCancelCall) Header() http.Header {
7248 if c.header_ == nil {
7249 c.header_ = make(http.Header)
7250 }
7251 return c.header_
7252 }
7253
7254 func (c *ProjectsLocationsBuildsCancelCall) doRequest(alt string) (*http.Response, error) {
7255 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7256 var body io.Reader = nil
7257 body, err := googleapi.WithoutDataWrapper.JSONReader(c.cancelbuildrequest)
7258 if err != nil {
7259 return nil, err
7260 }
7261 c.urlParams_.Set("alt", alt)
7262 c.urlParams_.Set("prettyPrint", "false")
7263 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
7264 urls += "?" + c.urlParams_.Encode()
7265 req, err := http.NewRequest("POST", urls, body)
7266 if err != nil {
7267 return nil, err
7268 }
7269 req.Header = reqHeaders
7270 googleapi.Expand(req.URL, map[string]string{
7271 "name": c.name,
7272 })
7273 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7274 }
7275
7276
7277
7278
7279
7280
7281 func (c *ProjectsLocationsBuildsCancelCall) Do(opts ...googleapi.CallOption) (*Build, error) {
7282 gensupport.SetOptions(c.urlParams_, opts...)
7283 res, err := c.doRequest("json")
7284 if res != nil && res.StatusCode == http.StatusNotModified {
7285 if res.Body != nil {
7286 res.Body.Close()
7287 }
7288 return nil, gensupport.WrapError(&googleapi.Error{
7289 Code: res.StatusCode,
7290 Header: res.Header,
7291 })
7292 }
7293 if err != nil {
7294 return nil, err
7295 }
7296 defer googleapi.CloseBody(res)
7297 if err := googleapi.CheckResponse(res); err != nil {
7298 return nil, gensupport.WrapError(err)
7299 }
7300 ret := &Build{
7301 ServerResponse: googleapi.ServerResponse{
7302 Header: res.Header,
7303 HTTPStatusCode: res.StatusCode,
7304 },
7305 }
7306 target := &ret
7307 if err := gensupport.DecodeResponse(target, res); err != nil {
7308 return nil, err
7309 }
7310 return ret, nil
7311 }
7312
7313 type ProjectsLocationsBuildsCreateCall struct {
7314 s *Service
7315 parent string
7316 build *Build
7317 urlParams_ gensupport.URLParams
7318 ctx_ context.Context
7319 header_ http.Header
7320 }
7321
7322
7323
7324
7325
7326
7327
7328
7329 func (r *ProjectsLocationsBuildsService) Create(parent string, build *Build) *ProjectsLocationsBuildsCreateCall {
7330 c := &ProjectsLocationsBuildsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7331 c.parent = parent
7332 c.build = build
7333 return c
7334 }
7335
7336
7337
7338 func (c *ProjectsLocationsBuildsCreateCall) ProjectId(projectId string) *ProjectsLocationsBuildsCreateCall {
7339 c.urlParams_.Set("projectId", projectId)
7340 return c
7341 }
7342
7343
7344
7345
7346 func (c *ProjectsLocationsBuildsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsBuildsCreateCall {
7347 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7348 return c
7349 }
7350
7351
7352 func (c *ProjectsLocationsBuildsCreateCall) Context(ctx context.Context) *ProjectsLocationsBuildsCreateCall {
7353 c.ctx_ = ctx
7354 return c
7355 }
7356
7357
7358
7359 func (c *ProjectsLocationsBuildsCreateCall) Header() http.Header {
7360 if c.header_ == nil {
7361 c.header_ = make(http.Header)
7362 }
7363 return c.header_
7364 }
7365
7366 func (c *ProjectsLocationsBuildsCreateCall) doRequest(alt string) (*http.Response, error) {
7367 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7368 var body io.Reader = nil
7369 body, err := googleapi.WithoutDataWrapper.JSONReader(c.build)
7370 if err != nil {
7371 return nil, err
7372 }
7373 c.urlParams_.Set("alt", alt)
7374 c.urlParams_.Set("prettyPrint", "false")
7375 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/builds")
7376 urls += "?" + c.urlParams_.Encode()
7377 req, err := http.NewRequest("POST", urls, body)
7378 if err != nil {
7379 return nil, err
7380 }
7381 req.Header = reqHeaders
7382 googleapi.Expand(req.URL, map[string]string{
7383 "parent": c.parent,
7384 })
7385 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7386 }
7387
7388
7389
7390
7391
7392
7393 func (c *ProjectsLocationsBuildsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7394 gensupport.SetOptions(c.urlParams_, opts...)
7395 res, err := c.doRequest("json")
7396 if res != nil && res.StatusCode == http.StatusNotModified {
7397 if res.Body != nil {
7398 res.Body.Close()
7399 }
7400 return nil, gensupport.WrapError(&googleapi.Error{
7401 Code: res.StatusCode,
7402 Header: res.Header,
7403 })
7404 }
7405 if err != nil {
7406 return nil, err
7407 }
7408 defer googleapi.CloseBody(res)
7409 if err := googleapi.CheckResponse(res); err != nil {
7410 return nil, gensupport.WrapError(err)
7411 }
7412 ret := &Operation{
7413 ServerResponse: googleapi.ServerResponse{
7414 Header: res.Header,
7415 HTTPStatusCode: res.StatusCode,
7416 },
7417 }
7418 target := &ret
7419 if err := gensupport.DecodeResponse(target, res); err != nil {
7420 return nil, err
7421 }
7422 return ret, nil
7423 }
7424
7425 type ProjectsLocationsBuildsGetCall struct {
7426 s *Service
7427 name string
7428 urlParams_ gensupport.URLParams
7429 ifNoneMatch_ string
7430 ctx_ context.Context
7431 header_ http.Header
7432 }
7433
7434
7435
7436
7437
7438
7439
7440 func (r *ProjectsLocationsBuildsService) Get(name string) *ProjectsLocationsBuildsGetCall {
7441 c := &ProjectsLocationsBuildsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7442 c.name = name
7443 return c
7444 }
7445
7446
7447 func (c *ProjectsLocationsBuildsGetCall) Id(id string) *ProjectsLocationsBuildsGetCall {
7448 c.urlParams_.Set("id", id)
7449 return c
7450 }
7451
7452
7453
7454 func (c *ProjectsLocationsBuildsGetCall) ProjectId(projectId string) *ProjectsLocationsBuildsGetCall {
7455 c.urlParams_.Set("projectId", projectId)
7456 return c
7457 }
7458
7459
7460
7461
7462 func (c *ProjectsLocationsBuildsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsBuildsGetCall {
7463 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7464 return c
7465 }
7466
7467
7468
7469
7470 func (c *ProjectsLocationsBuildsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsBuildsGetCall {
7471 c.ifNoneMatch_ = entityTag
7472 return c
7473 }
7474
7475
7476 func (c *ProjectsLocationsBuildsGetCall) Context(ctx context.Context) *ProjectsLocationsBuildsGetCall {
7477 c.ctx_ = ctx
7478 return c
7479 }
7480
7481
7482
7483 func (c *ProjectsLocationsBuildsGetCall) Header() http.Header {
7484 if c.header_ == nil {
7485 c.header_ = make(http.Header)
7486 }
7487 return c.header_
7488 }
7489
7490 func (c *ProjectsLocationsBuildsGetCall) doRequest(alt string) (*http.Response, error) {
7491 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7492 if c.ifNoneMatch_ != "" {
7493 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7494 }
7495 var body io.Reader = nil
7496 c.urlParams_.Set("alt", alt)
7497 c.urlParams_.Set("prettyPrint", "false")
7498 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7499 urls += "?" + c.urlParams_.Encode()
7500 req, err := http.NewRequest("GET", urls, body)
7501 if err != nil {
7502 return nil, err
7503 }
7504 req.Header = reqHeaders
7505 googleapi.Expand(req.URL, map[string]string{
7506 "name": c.name,
7507 })
7508 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7509 }
7510
7511
7512
7513
7514
7515
7516 func (c *ProjectsLocationsBuildsGetCall) Do(opts ...googleapi.CallOption) (*Build, error) {
7517 gensupport.SetOptions(c.urlParams_, opts...)
7518 res, err := c.doRequest("json")
7519 if res != nil && res.StatusCode == http.StatusNotModified {
7520 if res.Body != nil {
7521 res.Body.Close()
7522 }
7523 return nil, gensupport.WrapError(&googleapi.Error{
7524 Code: res.StatusCode,
7525 Header: res.Header,
7526 })
7527 }
7528 if err != nil {
7529 return nil, err
7530 }
7531 defer googleapi.CloseBody(res)
7532 if err := googleapi.CheckResponse(res); err != nil {
7533 return nil, gensupport.WrapError(err)
7534 }
7535 ret := &Build{
7536 ServerResponse: googleapi.ServerResponse{
7537 Header: res.Header,
7538 HTTPStatusCode: res.StatusCode,
7539 },
7540 }
7541 target := &ret
7542 if err := gensupport.DecodeResponse(target, res); err != nil {
7543 return nil, err
7544 }
7545 return ret, nil
7546 }
7547
7548 type ProjectsLocationsBuildsListCall struct {
7549 s *Service
7550 parent string
7551 urlParams_ gensupport.URLParams
7552 ifNoneMatch_ string
7553 ctx_ context.Context
7554 header_ http.Header
7555 }
7556
7557
7558
7559
7560
7561
7562 func (r *ProjectsLocationsBuildsService) List(parent string) *ProjectsLocationsBuildsListCall {
7563 c := &ProjectsLocationsBuildsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7564 c.parent = parent
7565 return c
7566 }
7567
7568
7569
7570 func (c *ProjectsLocationsBuildsListCall) Filter(filter string) *ProjectsLocationsBuildsListCall {
7571 c.urlParams_.Set("filter", filter)
7572 return c
7573 }
7574
7575
7576
7577 func (c *ProjectsLocationsBuildsListCall) PageSize(pageSize int64) *ProjectsLocationsBuildsListCall {
7578 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
7579 return c
7580 }
7581
7582
7583
7584
7585
7586
7587 func (c *ProjectsLocationsBuildsListCall) PageToken(pageToken string) *ProjectsLocationsBuildsListCall {
7588 c.urlParams_.Set("pageToken", pageToken)
7589 return c
7590 }
7591
7592
7593
7594 func (c *ProjectsLocationsBuildsListCall) ProjectId(projectId string) *ProjectsLocationsBuildsListCall {
7595 c.urlParams_.Set("projectId", projectId)
7596 return c
7597 }
7598
7599
7600
7601
7602 func (c *ProjectsLocationsBuildsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBuildsListCall {
7603 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7604 return c
7605 }
7606
7607
7608
7609
7610 func (c *ProjectsLocationsBuildsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBuildsListCall {
7611 c.ifNoneMatch_ = entityTag
7612 return c
7613 }
7614
7615
7616 func (c *ProjectsLocationsBuildsListCall) Context(ctx context.Context) *ProjectsLocationsBuildsListCall {
7617 c.ctx_ = ctx
7618 return c
7619 }
7620
7621
7622
7623 func (c *ProjectsLocationsBuildsListCall) Header() http.Header {
7624 if c.header_ == nil {
7625 c.header_ = make(http.Header)
7626 }
7627 return c.header_
7628 }
7629
7630 func (c *ProjectsLocationsBuildsListCall) doRequest(alt string) (*http.Response, error) {
7631 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7632 if c.ifNoneMatch_ != "" {
7633 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7634 }
7635 var body io.Reader = nil
7636 c.urlParams_.Set("alt", alt)
7637 c.urlParams_.Set("prettyPrint", "false")
7638 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/builds")
7639 urls += "?" + c.urlParams_.Encode()
7640 req, err := http.NewRequest("GET", urls, body)
7641 if err != nil {
7642 return nil, err
7643 }
7644 req.Header = reqHeaders
7645 googleapi.Expand(req.URL, map[string]string{
7646 "parent": c.parent,
7647 })
7648 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7649 }
7650
7651
7652
7653
7654
7655
7656
7657 func (c *ProjectsLocationsBuildsListCall) Do(opts ...googleapi.CallOption) (*ListBuildsResponse, error) {
7658 gensupport.SetOptions(c.urlParams_, opts...)
7659 res, err := c.doRequest("json")
7660 if res != nil && res.StatusCode == http.StatusNotModified {
7661 if res.Body != nil {
7662 res.Body.Close()
7663 }
7664 return nil, gensupport.WrapError(&googleapi.Error{
7665 Code: res.StatusCode,
7666 Header: res.Header,
7667 })
7668 }
7669 if err != nil {
7670 return nil, err
7671 }
7672 defer googleapi.CloseBody(res)
7673 if err := googleapi.CheckResponse(res); err != nil {
7674 return nil, gensupport.WrapError(err)
7675 }
7676 ret := &ListBuildsResponse{
7677 ServerResponse: googleapi.ServerResponse{
7678 Header: res.Header,
7679 HTTPStatusCode: res.StatusCode,
7680 },
7681 }
7682 target := &ret
7683 if err := gensupport.DecodeResponse(target, res); err != nil {
7684 return nil, err
7685 }
7686 return ret, nil
7687 }
7688
7689
7690
7691
7692 func (c *ProjectsLocationsBuildsListCall) Pages(ctx context.Context, f func(*ListBuildsResponse) error) error {
7693 c.ctx_ = ctx
7694 defer c.PageToken(c.urlParams_.Get("pageToken"))
7695 for {
7696 x, err := c.Do()
7697 if err != nil {
7698 return err
7699 }
7700 if err := f(x); err != nil {
7701 return err
7702 }
7703 if x.NextPageToken == "" {
7704 return nil
7705 }
7706 c.PageToken(x.NextPageToken)
7707 }
7708 }
7709
7710 type ProjectsLocationsBuildsRetryCall struct {
7711 s *Service
7712 name string
7713 retrybuildrequest *RetryBuildRequest
7714 urlParams_ gensupport.URLParams
7715 ctx_ context.Context
7716 header_ http.Header
7717 }
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738 func (r *ProjectsLocationsBuildsService) Retry(name string, retrybuildrequest *RetryBuildRequest) *ProjectsLocationsBuildsRetryCall {
7739 c := &ProjectsLocationsBuildsRetryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7740 c.name = name
7741 c.retrybuildrequest = retrybuildrequest
7742 return c
7743 }
7744
7745
7746
7747
7748 func (c *ProjectsLocationsBuildsRetryCall) Fields(s ...googleapi.Field) *ProjectsLocationsBuildsRetryCall {
7749 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7750 return c
7751 }
7752
7753
7754 func (c *ProjectsLocationsBuildsRetryCall) Context(ctx context.Context) *ProjectsLocationsBuildsRetryCall {
7755 c.ctx_ = ctx
7756 return c
7757 }
7758
7759
7760
7761 func (c *ProjectsLocationsBuildsRetryCall) Header() http.Header {
7762 if c.header_ == nil {
7763 c.header_ = make(http.Header)
7764 }
7765 return c.header_
7766 }
7767
7768 func (c *ProjectsLocationsBuildsRetryCall) doRequest(alt string) (*http.Response, error) {
7769 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7770 var body io.Reader = nil
7771 body, err := googleapi.WithoutDataWrapper.JSONReader(c.retrybuildrequest)
7772 if err != nil {
7773 return nil, err
7774 }
7775 c.urlParams_.Set("alt", alt)
7776 c.urlParams_.Set("prettyPrint", "false")
7777 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:retry")
7778 urls += "?" + c.urlParams_.Encode()
7779 req, err := http.NewRequest("POST", urls, body)
7780 if err != nil {
7781 return nil, err
7782 }
7783 req.Header = reqHeaders
7784 googleapi.Expand(req.URL, map[string]string{
7785 "name": c.name,
7786 })
7787 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7788 }
7789
7790
7791
7792
7793
7794
7795 func (c *ProjectsLocationsBuildsRetryCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7796 gensupport.SetOptions(c.urlParams_, opts...)
7797 res, err := c.doRequest("json")
7798 if res != nil && res.StatusCode == http.StatusNotModified {
7799 if res.Body != nil {
7800 res.Body.Close()
7801 }
7802 return nil, gensupport.WrapError(&googleapi.Error{
7803 Code: res.StatusCode,
7804 Header: res.Header,
7805 })
7806 }
7807 if err != nil {
7808 return nil, err
7809 }
7810 defer googleapi.CloseBody(res)
7811 if err := googleapi.CheckResponse(res); err != nil {
7812 return nil, gensupport.WrapError(err)
7813 }
7814 ret := &Operation{
7815 ServerResponse: googleapi.ServerResponse{
7816 Header: res.Header,
7817 HTTPStatusCode: res.StatusCode,
7818 },
7819 }
7820 target := &ret
7821 if err := gensupport.DecodeResponse(target, res); err != nil {
7822 return nil, err
7823 }
7824 return ret, nil
7825 }
7826
7827 type ProjectsLocationsGitLabConfigsCreateCall struct {
7828 s *Service
7829 parent string
7830 gitlabconfig *GitLabConfig
7831 urlParams_ gensupport.URLParams
7832 ctx_ context.Context
7833 header_ http.Header
7834 }
7835
7836
7837
7838
7839 func (r *ProjectsLocationsGitLabConfigsService) Create(parent string, gitlabconfig *GitLabConfig) *ProjectsLocationsGitLabConfigsCreateCall {
7840 c := &ProjectsLocationsGitLabConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7841 c.parent = parent
7842 c.gitlabconfig = gitlabconfig
7843 return c
7844 }
7845
7846
7847
7848
7849
7850
7851
7852 func (c *ProjectsLocationsGitLabConfigsCreateCall) GitlabConfigId(gitlabConfigId string) *ProjectsLocationsGitLabConfigsCreateCall {
7853 c.urlParams_.Set("gitlabConfigId", gitlabConfigId)
7854 return c
7855 }
7856
7857
7858
7859
7860 func (c *ProjectsLocationsGitLabConfigsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGitLabConfigsCreateCall {
7861 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7862 return c
7863 }
7864
7865
7866 func (c *ProjectsLocationsGitLabConfigsCreateCall) Context(ctx context.Context) *ProjectsLocationsGitLabConfigsCreateCall {
7867 c.ctx_ = ctx
7868 return c
7869 }
7870
7871
7872
7873 func (c *ProjectsLocationsGitLabConfigsCreateCall) Header() http.Header {
7874 if c.header_ == nil {
7875 c.header_ = make(http.Header)
7876 }
7877 return c.header_
7878 }
7879
7880 func (c *ProjectsLocationsGitLabConfigsCreateCall) doRequest(alt string) (*http.Response, error) {
7881 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7882 var body io.Reader = nil
7883 body, err := googleapi.WithoutDataWrapper.JSONReader(c.gitlabconfig)
7884 if err != nil {
7885 return nil, err
7886 }
7887 c.urlParams_.Set("alt", alt)
7888 c.urlParams_.Set("prettyPrint", "false")
7889 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/gitLabConfigs")
7890 urls += "?" + c.urlParams_.Encode()
7891 req, err := http.NewRequest("POST", urls, body)
7892 if err != nil {
7893 return nil, err
7894 }
7895 req.Header = reqHeaders
7896 googleapi.Expand(req.URL, map[string]string{
7897 "parent": c.parent,
7898 })
7899 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7900 }
7901
7902
7903
7904
7905
7906
7907 func (c *ProjectsLocationsGitLabConfigsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7908 gensupport.SetOptions(c.urlParams_, opts...)
7909 res, err := c.doRequest("json")
7910 if res != nil && res.StatusCode == http.StatusNotModified {
7911 if res.Body != nil {
7912 res.Body.Close()
7913 }
7914 return nil, gensupport.WrapError(&googleapi.Error{
7915 Code: res.StatusCode,
7916 Header: res.Header,
7917 })
7918 }
7919 if err != nil {
7920 return nil, err
7921 }
7922 defer googleapi.CloseBody(res)
7923 if err := googleapi.CheckResponse(res); err != nil {
7924 return nil, gensupport.WrapError(err)
7925 }
7926 ret := &Operation{
7927 ServerResponse: googleapi.ServerResponse{
7928 Header: res.Header,
7929 HTTPStatusCode: res.StatusCode,
7930 },
7931 }
7932 target := &ret
7933 if err := gensupport.DecodeResponse(target, res); err != nil {
7934 return nil, err
7935 }
7936 return ret, nil
7937 }
7938
7939 type ProjectsLocationsGitLabConfigsDeleteCall struct {
7940 s *Service
7941 name string
7942 urlParams_ gensupport.URLParams
7943 ctx_ context.Context
7944 header_ http.Header
7945 }
7946
7947
7948
7949
7950 func (r *ProjectsLocationsGitLabConfigsService) Delete(name string) *ProjectsLocationsGitLabConfigsDeleteCall {
7951 c := &ProjectsLocationsGitLabConfigsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7952 c.name = name
7953 return c
7954 }
7955
7956
7957
7958
7959 func (c *ProjectsLocationsGitLabConfigsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGitLabConfigsDeleteCall {
7960 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7961 return c
7962 }
7963
7964
7965 func (c *ProjectsLocationsGitLabConfigsDeleteCall) Context(ctx context.Context) *ProjectsLocationsGitLabConfigsDeleteCall {
7966 c.ctx_ = ctx
7967 return c
7968 }
7969
7970
7971
7972 func (c *ProjectsLocationsGitLabConfigsDeleteCall) Header() http.Header {
7973 if c.header_ == nil {
7974 c.header_ = make(http.Header)
7975 }
7976 return c.header_
7977 }
7978
7979 func (c *ProjectsLocationsGitLabConfigsDeleteCall) doRequest(alt string) (*http.Response, error) {
7980 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7981 var body io.Reader = nil
7982 c.urlParams_.Set("alt", alt)
7983 c.urlParams_.Set("prettyPrint", "false")
7984 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7985 urls += "?" + c.urlParams_.Encode()
7986 req, err := http.NewRequest("DELETE", urls, body)
7987 if err != nil {
7988 return nil, err
7989 }
7990 req.Header = reqHeaders
7991 googleapi.Expand(req.URL, map[string]string{
7992 "name": c.name,
7993 })
7994 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7995 }
7996
7997
7998
7999
8000
8001
8002 func (c *ProjectsLocationsGitLabConfigsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8003 gensupport.SetOptions(c.urlParams_, opts...)
8004 res, err := c.doRequest("json")
8005 if res != nil && res.StatusCode == http.StatusNotModified {
8006 if res.Body != nil {
8007 res.Body.Close()
8008 }
8009 return nil, gensupport.WrapError(&googleapi.Error{
8010 Code: res.StatusCode,
8011 Header: res.Header,
8012 })
8013 }
8014 if err != nil {
8015 return nil, err
8016 }
8017 defer googleapi.CloseBody(res)
8018 if err := googleapi.CheckResponse(res); err != nil {
8019 return nil, gensupport.WrapError(err)
8020 }
8021 ret := &Operation{
8022 ServerResponse: googleapi.ServerResponse{
8023 Header: res.Header,
8024 HTTPStatusCode: res.StatusCode,
8025 },
8026 }
8027 target := &ret
8028 if err := gensupport.DecodeResponse(target, res); err != nil {
8029 return nil, err
8030 }
8031 return ret, nil
8032 }
8033
8034 type ProjectsLocationsGitLabConfigsGetCall struct {
8035 s *Service
8036 name string
8037 urlParams_ gensupport.URLParams
8038 ifNoneMatch_ string
8039 ctx_ context.Context
8040 header_ http.Header
8041 }
8042
8043
8044
8045
8046 func (r *ProjectsLocationsGitLabConfigsService) Get(name string) *ProjectsLocationsGitLabConfigsGetCall {
8047 c := &ProjectsLocationsGitLabConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8048 c.name = name
8049 return c
8050 }
8051
8052
8053
8054
8055 func (c *ProjectsLocationsGitLabConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGitLabConfigsGetCall {
8056 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8057 return c
8058 }
8059
8060
8061
8062
8063 func (c *ProjectsLocationsGitLabConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGitLabConfigsGetCall {
8064 c.ifNoneMatch_ = entityTag
8065 return c
8066 }
8067
8068
8069 func (c *ProjectsLocationsGitLabConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsGitLabConfigsGetCall {
8070 c.ctx_ = ctx
8071 return c
8072 }
8073
8074
8075
8076 func (c *ProjectsLocationsGitLabConfigsGetCall) Header() http.Header {
8077 if c.header_ == nil {
8078 c.header_ = make(http.Header)
8079 }
8080 return c.header_
8081 }
8082
8083 func (c *ProjectsLocationsGitLabConfigsGetCall) doRequest(alt string) (*http.Response, error) {
8084 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8085 if c.ifNoneMatch_ != "" {
8086 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8087 }
8088 var body io.Reader = nil
8089 c.urlParams_.Set("alt", alt)
8090 c.urlParams_.Set("prettyPrint", "false")
8091 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
8092 urls += "?" + c.urlParams_.Encode()
8093 req, err := http.NewRequest("GET", urls, body)
8094 if err != nil {
8095 return nil, err
8096 }
8097 req.Header = reqHeaders
8098 googleapi.Expand(req.URL, map[string]string{
8099 "name": c.name,
8100 })
8101 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8102 }
8103
8104
8105
8106
8107
8108
8109 func (c *ProjectsLocationsGitLabConfigsGetCall) Do(opts ...googleapi.CallOption) (*GitLabConfig, error) {
8110 gensupport.SetOptions(c.urlParams_, opts...)
8111 res, err := c.doRequest("json")
8112 if res != nil && res.StatusCode == http.StatusNotModified {
8113 if res.Body != nil {
8114 res.Body.Close()
8115 }
8116 return nil, gensupport.WrapError(&googleapi.Error{
8117 Code: res.StatusCode,
8118 Header: res.Header,
8119 })
8120 }
8121 if err != nil {
8122 return nil, err
8123 }
8124 defer googleapi.CloseBody(res)
8125 if err := googleapi.CheckResponse(res); err != nil {
8126 return nil, gensupport.WrapError(err)
8127 }
8128 ret := &GitLabConfig{
8129 ServerResponse: googleapi.ServerResponse{
8130 Header: res.Header,
8131 HTTPStatusCode: res.StatusCode,
8132 },
8133 }
8134 target := &ret
8135 if err := gensupport.DecodeResponse(target, res); err != nil {
8136 return nil, err
8137 }
8138 return ret, nil
8139 }
8140
8141 type ProjectsLocationsGitLabConfigsListCall struct {
8142 s *Service
8143 parent string
8144 urlParams_ gensupport.URLParams
8145 ifNoneMatch_ string
8146 ctx_ context.Context
8147 header_ http.Header
8148 }
8149
8150
8151
8152
8153 func (r *ProjectsLocationsGitLabConfigsService) List(parent string) *ProjectsLocationsGitLabConfigsListCall {
8154 c := &ProjectsLocationsGitLabConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8155 c.parent = parent
8156 return c
8157 }
8158
8159
8160
8161
8162
8163 func (c *ProjectsLocationsGitLabConfigsListCall) PageSize(pageSize int64) *ProjectsLocationsGitLabConfigsListCall {
8164 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
8165 return c
8166 }
8167
8168
8169
8170
8171
8172
8173 func (c *ProjectsLocationsGitLabConfigsListCall) PageToken(pageToken string) *ProjectsLocationsGitLabConfigsListCall {
8174 c.urlParams_.Set("pageToken", pageToken)
8175 return c
8176 }
8177
8178
8179
8180
8181 func (c *ProjectsLocationsGitLabConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGitLabConfigsListCall {
8182 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8183 return c
8184 }
8185
8186
8187
8188
8189 func (c *ProjectsLocationsGitLabConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGitLabConfigsListCall {
8190 c.ifNoneMatch_ = entityTag
8191 return c
8192 }
8193
8194
8195 func (c *ProjectsLocationsGitLabConfigsListCall) Context(ctx context.Context) *ProjectsLocationsGitLabConfigsListCall {
8196 c.ctx_ = ctx
8197 return c
8198 }
8199
8200
8201
8202 func (c *ProjectsLocationsGitLabConfigsListCall) Header() http.Header {
8203 if c.header_ == nil {
8204 c.header_ = make(http.Header)
8205 }
8206 return c.header_
8207 }
8208
8209 func (c *ProjectsLocationsGitLabConfigsListCall) doRequest(alt string) (*http.Response, error) {
8210 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8211 if c.ifNoneMatch_ != "" {
8212 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8213 }
8214 var body io.Reader = nil
8215 c.urlParams_.Set("alt", alt)
8216 c.urlParams_.Set("prettyPrint", "false")
8217 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/gitLabConfigs")
8218 urls += "?" + c.urlParams_.Encode()
8219 req, err := http.NewRequest("GET", urls, body)
8220 if err != nil {
8221 return nil, err
8222 }
8223 req.Header = reqHeaders
8224 googleapi.Expand(req.URL, map[string]string{
8225 "parent": c.parent,
8226 })
8227 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8228 }
8229
8230
8231
8232
8233
8234
8235
8236 func (c *ProjectsLocationsGitLabConfigsListCall) Do(opts ...googleapi.CallOption) (*ListGitLabConfigsResponse, error) {
8237 gensupport.SetOptions(c.urlParams_, opts...)
8238 res, err := c.doRequest("json")
8239 if res != nil && res.StatusCode == http.StatusNotModified {
8240 if res.Body != nil {
8241 res.Body.Close()
8242 }
8243 return nil, gensupport.WrapError(&googleapi.Error{
8244 Code: res.StatusCode,
8245 Header: res.Header,
8246 })
8247 }
8248 if err != nil {
8249 return nil, err
8250 }
8251 defer googleapi.CloseBody(res)
8252 if err := googleapi.CheckResponse(res); err != nil {
8253 return nil, gensupport.WrapError(err)
8254 }
8255 ret := &ListGitLabConfigsResponse{
8256 ServerResponse: googleapi.ServerResponse{
8257 Header: res.Header,
8258 HTTPStatusCode: res.StatusCode,
8259 },
8260 }
8261 target := &ret
8262 if err := gensupport.DecodeResponse(target, res); err != nil {
8263 return nil, err
8264 }
8265 return ret, nil
8266 }
8267
8268
8269
8270
8271 func (c *ProjectsLocationsGitLabConfigsListCall) Pages(ctx context.Context, f func(*ListGitLabConfigsResponse) error) error {
8272 c.ctx_ = ctx
8273 defer c.PageToken(c.urlParams_.Get("pageToken"))
8274 for {
8275 x, err := c.Do()
8276 if err != nil {
8277 return err
8278 }
8279 if err := f(x); err != nil {
8280 return err
8281 }
8282 if x.NextPageToken == "" {
8283 return nil
8284 }
8285 c.PageToken(x.NextPageToken)
8286 }
8287 }
8288
8289 type ProjectsLocationsGitLabConfigsPatchCall struct {
8290 s *Service
8291 name string
8292 gitlabconfig *GitLabConfig
8293 urlParams_ gensupport.URLParams
8294 ctx_ context.Context
8295 header_ http.Header
8296 }
8297
8298
8299
8300
8301 func (r *ProjectsLocationsGitLabConfigsService) Patch(name string, gitlabconfig *GitLabConfig) *ProjectsLocationsGitLabConfigsPatchCall {
8302 c := &ProjectsLocationsGitLabConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8303 c.name = name
8304 c.gitlabconfig = gitlabconfig
8305 return c
8306 }
8307
8308
8309
8310
8311
8312 func (c *ProjectsLocationsGitLabConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsGitLabConfigsPatchCall {
8313 c.urlParams_.Set("updateMask", updateMask)
8314 return c
8315 }
8316
8317
8318
8319
8320 func (c *ProjectsLocationsGitLabConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGitLabConfigsPatchCall {
8321 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8322 return c
8323 }
8324
8325
8326 func (c *ProjectsLocationsGitLabConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsGitLabConfigsPatchCall {
8327 c.ctx_ = ctx
8328 return c
8329 }
8330
8331
8332
8333 func (c *ProjectsLocationsGitLabConfigsPatchCall) Header() http.Header {
8334 if c.header_ == nil {
8335 c.header_ = make(http.Header)
8336 }
8337 return c.header_
8338 }
8339
8340 func (c *ProjectsLocationsGitLabConfigsPatchCall) doRequest(alt string) (*http.Response, error) {
8341 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8342 var body io.Reader = nil
8343 body, err := googleapi.WithoutDataWrapper.JSONReader(c.gitlabconfig)
8344 if err != nil {
8345 return nil, err
8346 }
8347 c.urlParams_.Set("alt", alt)
8348 c.urlParams_.Set("prettyPrint", "false")
8349 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
8350 urls += "?" + c.urlParams_.Encode()
8351 req, err := http.NewRequest("PATCH", urls, body)
8352 if err != nil {
8353 return nil, err
8354 }
8355 req.Header = reqHeaders
8356 googleapi.Expand(req.URL, map[string]string{
8357 "name": c.name,
8358 })
8359 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8360 }
8361
8362
8363
8364
8365
8366
8367 func (c *ProjectsLocationsGitLabConfigsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8368 gensupport.SetOptions(c.urlParams_, opts...)
8369 res, err := c.doRequest("json")
8370 if res != nil && res.StatusCode == http.StatusNotModified {
8371 if res.Body != nil {
8372 res.Body.Close()
8373 }
8374 return nil, gensupport.WrapError(&googleapi.Error{
8375 Code: res.StatusCode,
8376 Header: res.Header,
8377 })
8378 }
8379 if err != nil {
8380 return nil, err
8381 }
8382 defer googleapi.CloseBody(res)
8383 if err := googleapi.CheckResponse(res); err != nil {
8384 return nil, gensupport.WrapError(err)
8385 }
8386 ret := &Operation{
8387 ServerResponse: googleapi.ServerResponse{
8388 Header: res.Header,
8389 HTTPStatusCode: res.StatusCode,
8390 },
8391 }
8392 target := &ret
8393 if err := gensupport.DecodeResponse(target, res); err != nil {
8394 return nil, err
8395 }
8396 return ret, nil
8397 }
8398
8399 type ProjectsLocationsGitLabConfigsRemoveGitLabConnectedRepositoryCall struct {
8400 s *Service
8401 config string
8402 removegitlabconnectedrepositoryrequest *RemoveGitLabConnectedRepositoryRequest
8403 urlParams_ gensupport.URLParams
8404 ctx_ context.Context
8405 header_ http.Header
8406 }
8407
8408
8409
8410
8411
8412
8413 func (r *ProjectsLocationsGitLabConfigsService) RemoveGitLabConnectedRepository(config string, removegitlabconnectedrepositoryrequest *RemoveGitLabConnectedRepositoryRequest) *ProjectsLocationsGitLabConfigsRemoveGitLabConnectedRepositoryCall {
8414 c := &ProjectsLocationsGitLabConfigsRemoveGitLabConnectedRepositoryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8415 c.config = config
8416 c.removegitlabconnectedrepositoryrequest = removegitlabconnectedrepositoryrequest
8417 return c
8418 }
8419
8420
8421
8422
8423 func (c *ProjectsLocationsGitLabConfigsRemoveGitLabConnectedRepositoryCall) Fields(s ...googleapi.Field) *ProjectsLocationsGitLabConfigsRemoveGitLabConnectedRepositoryCall {
8424 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8425 return c
8426 }
8427
8428
8429 func (c *ProjectsLocationsGitLabConfigsRemoveGitLabConnectedRepositoryCall) Context(ctx context.Context) *ProjectsLocationsGitLabConfigsRemoveGitLabConnectedRepositoryCall {
8430 c.ctx_ = ctx
8431 return c
8432 }
8433
8434
8435
8436 func (c *ProjectsLocationsGitLabConfigsRemoveGitLabConnectedRepositoryCall) Header() http.Header {
8437 if c.header_ == nil {
8438 c.header_ = make(http.Header)
8439 }
8440 return c.header_
8441 }
8442
8443 func (c *ProjectsLocationsGitLabConfigsRemoveGitLabConnectedRepositoryCall) doRequest(alt string) (*http.Response, error) {
8444 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8445 var body io.Reader = nil
8446 body, err := googleapi.WithoutDataWrapper.JSONReader(c.removegitlabconnectedrepositoryrequest)
8447 if err != nil {
8448 return nil, err
8449 }
8450 c.urlParams_.Set("alt", alt)
8451 c.urlParams_.Set("prettyPrint", "false")
8452 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+config}:removeGitLabConnectedRepository")
8453 urls += "?" + c.urlParams_.Encode()
8454 req, err := http.NewRequest("POST", urls, body)
8455 if err != nil {
8456 return nil, err
8457 }
8458 req.Header = reqHeaders
8459 googleapi.Expand(req.URL, map[string]string{
8460 "config": c.config,
8461 })
8462 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8463 }
8464
8465
8466
8467
8468
8469
8470 func (c *ProjectsLocationsGitLabConfigsRemoveGitLabConnectedRepositoryCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
8471 gensupport.SetOptions(c.urlParams_, opts...)
8472 res, err := c.doRequest("json")
8473 if res != nil && res.StatusCode == http.StatusNotModified {
8474 if res.Body != nil {
8475 res.Body.Close()
8476 }
8477 return nil, gensupport.WrapError(&googleapi.Error{
8478 Code: res.StatusCode,
8479 Header: res.Header,
8480 })
8481 }
8482 if err != nil {
8483 return nil, err
8484 }
8485 defer googleapi.CloseBody(res)
8486 if err := googleapi.CheckResponse(res); err != nil {
8487 return nil, gensupport.WrapError(err)
8488 }
8489 ret := &Empty{
8490 ServerResponse: googleapi.ServerResponse{
8491 Header: res.Header,
8492 HTTPStatusCode: res.StatusCode,
8493 },
8494 }
8495 target := &ret
8496 if err := gensupport.DecodeResponse(target, res); err != nil {
8497 return nil, err
8498 }
8499 return ret, nil
8500 }
8501
8502 type ProjectsLocationsGitLabConfigsConnectedRepositoriesBatchCreateCall struct {
8503 s *Service
8504 parent string
8505 batchcreategitlabconnectedrepositoriesrequest *BatchCreateGitLabConnectedRepositoriesRequest
8506 urlParams_ gensupport.URLParams
8507 ctx_ context.Context
8508 header_ http.Header
8509 }
8510
8511
8512
8513
8514
8515
8516 func (r *ProjectsLocationsGitLabConfigsConnectedRepositoriesService) BatchCreate(parent string, batchcreategitlabconnectedrepositoriesrequest *BatchCreateGitLabConnectedRepositoriesRequest) *ProjectsLocationsGitLabConfigsConnectedRepositoriesBatchCreateCall {
8517 c := &ProjectsLocationsGitLabConfigsConnectedRepositoriesBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8518 c.parent = parent
8519 c.batchcreategitlabconnectedrepositoriesrequest = batchcreategitlabconnectedrepositoriesrequest
8520 return c
8521 }
8522
8523
8524
8525
8526 func (c *ProjectsLocationsGitLabConfigsConnectedRepositoriesBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGitLabConfigsConnectedRepositoriesBatchCreateCall {
8527 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8528 return c
8529 }
8530
8531
8532 func (c *ProjectsLocationsGitLabConfigsConnectedRepositoriesBatchCreateCall) Context(ctx context.Context) *ProjectsLocationsGitLabConfigsConnectedRepositoriesBatchCreateCall {
8533 c.ctx_ = ctx
8534 return c
8535 }
8536
8537
8538
8539 func (c *ProjectsLocationsGitLabConfigsConnectedRepositoriesBatchCreateCall) Header() http.Header {
8540 if c.header_ == nil {
8541 c.header_ = make(http.Header)
8542 }
8543 return c.header_
8544 }
8545
8546 func (c *ProjectsLocationsGitLabConfigsConnectedRepositoriesBatchCreateCall) doRequest(alt string) (*http.Response, error) {
8547 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8548 var body io.Reader = nil
8549 body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchcreategitlabconnectedrepositoriesrequest)
8550 if err != nil {
8551 return nil, err
8552 }
8553 c.urlParams_.Set("alt", alt)
8554 c.urlParams_.Set("prettyPrint", "false")
8555 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/connectedRepositories:batchCreate")
8556 urls += "?" + c.urlParams_.Encode()
8557 req, err := http.NewRequest("POST", urls, body)
8558 if err != nil {
8559 return nil, err
8560 }
8561 req.Header = reqHeaders
8562 googleapi.Expand(req.URL, map[string]string{
8563 "parent": c.parent,
8564 })
8565 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8566 }
8567
8568
8569
8570
8571
8572
8573 func (c *ProjectsLocationsGitLabConfigsConnectedRepositoriesBatchCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8574 gensupport.SetOptions(c.urlParams_, opts...)
8575 res, err := c.doRequest("json")
8576 if res != nil && res.StatusCode == http.StatusNotModified {
8577 if res.Body != nil {
8578 res.Body.Close()
8579 }
8580 return nil, gensupport.WrapError(&googleapi.Error{
8581 Code: res.StatusCode,
8582 Header: res.Header,
8583 })
8584 }
8585 if err != nil {
8586 return nil, err
8587 }
8588 defer googleapi.CloseBody(res)
8589 if err := googleapi.CheckResponse(res); err != nil {
8590 return nil, gensupport.WrapError(err)
8591 }
8592 ret := &Operation{
8593 ServerResponse: googleapi.ServerResponse{
8594 Header: res.Header,
8595 HTTPStatusCode: res.StatusCode,
8596 },
8597 }
8598 target := &ret
8599 if err := gensupport.DecodeResponse(target, res); err != nil {
8600 return nil, err
8601 }
8602 return ret, nil
8603 }
8604
8605 type ProjectsLocationsGitLabConfigsReposListCall struct {
8606 s *Service
8607 parent string
8608 urlParams_ gensupport.URLParams
8609 ifNoneMatch_ string
8610 ctx_ context.Context
8611 header_ http.Header
8612 }
8613
8614
8615
8616
8617
8618 func (r *ProjectsLocationsGitLabConfigsReposService) List(parent string) *ProjectsLocationsGitLabConfigsReposListCall {
8619 c := &ProjectsLocationsGitLabConfigsReposListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8620 c.parent = parent
8621 return c
8622 }
8623
8624
8625
8626 func (c *ProjectsLocationsGitLabConfigsReposListCall) PageSize(pageSize int64) *ProjectsLocationsGitLabConfigsReposListCall {
8627 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
8628 return c
8629 }
8630
8631
8632
8633
8634
8635
8636 func (c *ProjectsLocationsGitLabConfigsReposListCall) PageToken(pageToken string) *ProjectsLocationsGitLabConfigsReposListCall {
8637 c.urlParams_.Set("pageToken", pageToken)
8638 return c
8639 }
8640
8641
8642
8643
8644 func (c *ProjectsLocationsGitLabConfigsReposListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGitLabConfigsReposListCall {
8645 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8646 return c
8647 }
8648
8649
8650
8651
8652 func (c *ProjectsLocationsGitLabConfigsReposListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGitLabConfigsReposListCall {
8653 c.ifNoneMatch_ = entityTag
8654 return c
8655 }
8656
8657
8658 func (c *ProjectsLocationsGitLabConfigsReposListCall) Context(ctx context.Context) *ProjectsLocationsGitLabConfigsReposListCall {
8659 c.ctx_ = ctx
8660 return c
8661 }
8662
8663
8664
8665 func (c *ProjectsLocationsGitLabConfigsReposListCall) Header() http.Header {
8666 if c.header_ == nil {
8667 c.header_ = make(http.Header)
8668 }
8669 return c.header_
8670 }
8671
8672 func (c *ProjectsLocationsGitLabConfigsReposListCall) doRequest(alt string) (*http.Response, error) {
8673 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8674 if c.ifNoneMatch_ != "" {
8675 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8676 }
8677 var body io.Reader = nil
8678 c.urlParams_.Set("alt", alt)
8679 c.urlParams_.Set("prettyPrint", "false")
8680 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/repos")
8681 urls += "?" + c.urlParams_.Encode()
8682 req, err := http.NewRequest("GET", urls, body)
8683 if err != nil {
8684 return nil, err
8685 }
8686 req.Header = reqHeaders
8687 googleapi.Expand(req.URL, map[string]string{
8688 "parent": c.parent,
8689 })
8690 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8691 }
8692
8693
8694
8695
8696
8697
8698
8699 func (c *ProjectsLocationsGitLabConfigsReposListCall) Do(opts ...googleapi.CallOption) (*ListGitLabRepositoriesResponse, error) {
8700 gensupport.SetOptions(c.urlParams_, opts...)
8701 res, err := c.doRequest("json")
8702 if res != nil && res.StatusCode == http.StatusNotModified {
8703 if res.Body != nil {
8704 res.Body.Close()
8705 }
8706 return nil, gensupport.WrapError(&googleapi.Error{
8707 Code: res.StatusCode,
8708 Header: res.Header,
8709 })
8710 }
8711 if err != nil {
8712 return nil, err
8713 }
8714 defer googleapi.CloseBody(res)
8715 if err := googleapi.CheckResponse(res); err != nil {
8716 return nil, gensupport.WrapError(err)
8717 }
8718 ret := &ListGitLabRepositoriesResponse{
8719 ServerResponse: googleapi.ServerResponse{
8720 Header: res.Header,
8721 HTTPStatusCode: res.StatusCode,
8722 },
8723 }
8724 target := &ret
8725 if err := gensupport.DecodeResponse(target, res); err != nil {
8726 return nil, err
8727 }
8728 return ret, nil
8729 }
8730
8731
8732
8733
8734 func (c *ProjectsLocationsGitLabConfigsReposListCall) Pages(ctx context.Context, f func(*ListGitLabRepositoriesResponse) error) error {
8735 c.ctx_ = ctx
8736 defer c.PageToken(c.urlParams_.Get("pageToken"))
8737 for {
8738 x, err := c.Do()
8739 if err != nil {
8740 return err
8741 }
8742 if err := f(x); err != nil {
8743 return err
8744 }
8745 if x.NextPageToken == "" {
8746 return nil
8747 }
8748 c.PageToken(x.NextPageToken)
8749 }
8750 }
8751
8752 type ProjectsLocationsGithubEnterpriseConfigsCreateCall struct {
8753 s *Service
8754 parent string
8755 githubenterpriseconfig *GitHubEnterpriseConfig
8756 urlParams_ gensupport.URLParams
8757 ctx_ context.Context
8758 header_ http.Header
8759 }
8760
8761
8762
8763
8764
8765
8766 func (r *ProjectsLocationsGithubEnterpriseConfigsService) Create(parent string, githubenterpriseconfig *GitHubEnterpriseConfig) *ProjectsLocationsGithubEnterpriseConfigsCreateCall {
8767 c := &ProjectsLocationsGithubEnterpriseConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8768 c.parent = parent
8769 c.githubenterpriseconfig = githubenterpriseconfig
8770 return c
8771 }
8772
8773
8774
8775
8776
8777
8778
8779 func (c *ProjectsLocationsGithubEnterpriseConfigsCreateCall) GheConfigId(gheConfigId string) *ProjectsLocationsGithubEnterpriseConfigsCreateCall {
8780 c.urlParams_.Set("gheConfigId", gheConfigId)
8781 return c
8782 }
8783
8784
8785 func (c *ProjectsLocationsGithubEnterpriseConfigsCreateCall) ProjectId(projectId string) *ProjectsLocationsGithubEnterpriseConfigsCreateCall {
8786 c.urlParams_.Set("projectId", projectId)
8787 return c
8788 }
8789
8790
8791
8792
8793 func (c *ProjectsLocationsGithubEnterpriseConfigsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGithubEnterpriseConfigsCreateCall {
8794 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8795 return c
8796 }
8797
8798
8799 func (c *ProjectsLocationsGithubEnterpriseConfigsCreateCall) Context(ctx context.Context) *ProjectsLocationsGithubEnterpriseConfigsCreateCall {
8800 c.ctx_ = ctx
8801 return c
8802 }
8803
8804
8805
8806 func (c *ProjectsLocationsGithubEnterpriseConfigsCreateCall) Header() http.Header {
8807 if c.header_ == nil {
8808 c.header_ = make(http.Header)
8809 }
8810 return c.header_
8811 }
8812
8813 func (c *ProjectsLocationsGithubEnterpriseConfigsCreateCall) doRequest(alt string) (*http.Response, error) {
8814 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8815 var body io.Reader = nil
8816 body, err := googleapi.WithoutDataWrapper.JSONReader(c.githubenterpriseconfig)
8817 if err != nil {
8818 return nil, err
8819 }
8820 c.urlParams_.Set("alt", alt)
8821 c.urlParams_.Set("prettyPrint", "false")
8822 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/githubEnterpriseConfigs")
8823 urls += "?" + c.urlParams_.Encode()
8824 req, err := http.NewRequest("POST", urls, body)
8825 if err != nil {
8826 return nil, err
8827 }
8828 req.Header = reqHeaders
8829 googleapi.Expand(req.URL, map[string]string{
8830 "parent": c.parent,
8831 })
8832 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8833 }
8834
8835
8836
8837
8838
8839
8840 func (c *ProjectsLocationsGithubEnterpriseConfigsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8841 gensupport.SetOptions(c.urlParams_, opts...)
8842 res, err := c.doRequest("json")
8843 if res != nil && res.StatusCode == http.StatusNotModified {
8844 if res.Body != nil {
8845 res.Body.Close()
8846 }
8847 return nil, gensupport.WrapError(&googleapi.Error{
8848 Code: res.StatusCode,
8849 Header: res.Header,
8850 })
8851 }
8852 if err != nil {
8853 return nil, err
8854 }
8855 defer googleapi.CloseBody(res)
8856 if err := googleapi.CheckResponse(res); err != nil {
8857 return nil, gensupport.WrapError(err)
8858 }
8859 ret := &Operation{
8860 ServerResponse: googleapi.ServerResponse{
8861 Header: res.Header,
8862 HTTPStatusCode: res.StatusCode,
8863 },
8864 }
8865 target := &ret
8866 if err := gensupport.DecodeResponse(target, res); err != nil {
8867 return nil, err
8868 }
8869 return ret, nil
8870 }
8871
8872 type ProjectsLocationsGithubEnterpriseConfigsDeleteCall struct {
8873 s *Service
8874 name string
8875 urlParams_ gensupport.URLParams
8876 ctx_ context.Context
8877 header_ http.Header
8878 }
8879
8880
8881
8882
8883
8884
8885
8886
8887 func (r *ProjectsLocationsGithubEnterpriseConfigsService) Delete(name string) *ProjectsLocationsGithubEnterpriseConfigsDeleteCall {
8888 c := &ProjectsLocationsGithubEnterpriseConfigsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8889 c.name = name
8890 return c
8891 }
8892
8893
8894
8895 func (c *ProjectsLocationsGithubEnterpriseConfigsDeleteCall) ConfigId(configId string) *ProjectsLocationsGithubEnterpriseConfigsDeleteCall {
8896 c.urlParams_.Set("configId", configId)
8897 return c
8898 }
8899
8900
8901 func (c *ProjectsLocationsGithubEnterpriseConfigsDeleteCall) ProjectId(projectId string) *ProjectsLocationsGithubEnterpriseConfigsDeleteCall {
8902 c.urlParams_.Set("projectId", projectId)
8903 return c
8904 }
8905
8906
8907
8908
8909 func (c *ProjectsLocationsGithubEnterpriseConfigsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGithubEnterpriseConfigsDeleteCall {
8910 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8911 return c
8912 }
8913
8914
8915 func (c *ProjectsLocationsGithubEnterpriseConfigsDeleteCall) Context(ctx context.Context) *ProjectsLocationsGithubEnterpriseConfigsDeleteCall {
8916 c.ctx_ = ctx
8917 return c
8918 }
8919
8920
8921
8922 func (c *ProjectsLocationsGithubEnterpriseConfigsDeleteCall) Header() http.Header {
8923 if c.header_ == nil {
8924 c.header_ = make(http.Header)
8925 }
8926 return c.header_
8927 }
8928
8929 func (c *ProjectsLocationsGithubEnterpriseConfigsDeleteCall) doRequest(alt string) (*http.Response, error) {
8930 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8931 var body io.Reader = nil
8932 c.urlParams_.Set("alt", alt)
8933 c.urlParams_.Set("prettyPrint", "false")
8934 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
8935 urls += "?" + c.urlParams_.Encode()
8936 req, err := http.NewRequest("DELETE", urls, body)
8937 if err != nil {
8938 return nil, err
8939 }
8940 req.Header = reqHeaders
8941 googleapi.Expand(req.URL, map[string]string{
8942 "name": c.name,
8943 })
8944 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8945 }
8946
8947
8948
8949
8950
8951
8952 func (c *ProjectsLocationsGithubEnterpriseConfigsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8953 gensupport.SetOptions(c.urlParams_, opts...)
8954 res, err := c.doRequest("json")
8955 if res != nil && res.StatusCode == http.StatusNotModified {
8956 if res.Body != nil {
8957 res.Body.Close()
8958 }
8959 return nil, gensupport.WrapError(&googleapi.Error{
8960 Code: res.StatusCode,
8961 Header: res.Header,
8962 })
8963 }
8964 if err != nil {
8965 return nil, err
8966 }
8967 defer googleapi.CloseBody(res)
8968 if err := googleapi.CheckResponse(res); err != nil {
8969 return nil, gensupport.WrapError(err)
8970 }
8971 ret := &Operation{
8972 ServerResponse: googleapi.ServerResponse{
8973 Header: res.Header,
8974 HTTPStatusCode: res.StatusCode,
8975 },
8976 }
8977 target := &ret
8978 if err := gensupport.DecodeResponse(target, res); err != nil {
8979 return nil, err
8980 }
8981 return ret, nil
8982 }
8983
8984 type ProjectsLocationsGithubEnterpriseConfigsGetCall struct {
8985 s *Service
8986 name string
8987 urlParams_ gensupport.URLParams
8988 ifNoneMatch_ string
8989 ctx_ context.Context
8990 header_ http.Header
8991 }
8992
8993
8994
8995
8996
8997
8998
8999 func (r *ProjectsLocationsGithubEnterpriseConfigsService) Get(name string) *ProjectsLocationsGithubEnterpriseConfigsGetCall {
9000 c := &ProjectsLocationsGithubEnterpriseConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9001 c.name = name
9002 return c
9003 }
9004
9005
9006
9007 func (c *ProjectsLocationsGithubEnterpriseConfigsGetCall) ConfigId(configId string) *ProjectsLocationsGithubEnterpriseConfigsGetCall {
9008 c.urlParams_.Set("configId", configId)
9009 return c
9010 }
9011
9012
9013 func (c *ProjectsLocationsGithubEnterpriseConfigsGetCall) ProjectId(projectId string) *ProjectsLocationsGithubEnterpriseConfigsGetCall {
9014 c.urlParams_.Set("projectId", projectId)
9015 return c
9016 }
9017
9018
9019
9020
9021 func (c *ProjectsLocationsGithubEnterpriseConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGithubEnterpriseConfigsGetCall {
9022 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9023 return c
9024 }
9025
9026
9027
9028
9029 func (c *ProjectsLocationsGithubEnterpriseConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGithubEnterpriseConfigsGetCall {
9030 c.ifNoneMatch_ = entityTag
9031 return c
9032 }
9033
9034
9035 func (c *ProjectsLocationsGithubEnterpriseConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsGithubEnterpriseConfigsGetCall {
9036 c.ctx_ = ctx
9037 return c
9038 }
9039
9040
9041
9042 func (c *ProjectsLocationsGithubEnterpriseConfigsGetCall) Header() http.Header {
9043 if c.header_ == nil {
9044 c.header_ = make(http.Header)
9045 }
9046 return c.header_
9047 }
9048
9049 func (c *ProjectsLocationsGithubEnterpriseConfigsGetCall) doRequest(alt string) (*http.Response, error) {
9050 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9051 if c.ifNoneMatch_ != "" {
9052 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9053 }
9054 var body io.Reader = nil
9055 c.urlParams_.Set("alt", alt)
9056 c.urlParams_.Set("prettyPrint", "false")
9057 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
9058 urls += "?" + c.urlParams_.Encode()
9059 req, err := http.NewRequest("GET", urls, body)
9060 if err != nil {
9061 return nil, err
9062 }
9063 req.Header = reqHeaders
9064 googleapi.Expand(req.URL, map[string]string{
9065 "name": c.name,
9066 })
9067 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9068 }
9069
9070
9071
9072
9073
9074
9075
9076 func (c *ProjectsLocationsGithubEnterpriseConfigsGetCall) Do(opts ...googleapi.CallOption) (*GitHubEnterpriseConfig, error) {
9077 gensupport.SetOptions(c.urlParams_, opts...)
9078 res, err := c.doRequest("json")
9079 if res != nil && res.StatusCode == http.StatusNotModified {
9080 if res.Body != nil {
9081 res.Body.Close()
9082 }
9083 return nil, gensupport.WrapError(&googleapi.Error{
9084 Code: res.StatusCode,
9085 Header: res.Header,
9086 })
9087 }
9088 if err != nil {
9089 return nil, err
9090 }
9091 defer googleapi.CloseBody(res)
9092 if err := googleapi.CheckResponse(res); err != nil {
9093 return nil, gensupport.WrapError(err)
9094 }
9095 ret := &GitHubEnterpriseConfig{
9096 ServerResponse: googleapi.ServerResponse{
9097 Header: res.Header,
9098 HTTPStatusCode: res.StatusCode,
9099 },
9100 }
9101 target := &ret
9102 if err := gensupport.DecodeResponse(target, res); err != nil {
9103 return nil, err
9104 }
9105 return ret, nil
9106 }
9107
9108 type ProjectsLocationsGithubEnterpriseConfigsListCall struct {
9109 s *Service
9110 parent string
9111 urlParams_ gensupport.URLParams
9112 ifNoneMatch_ string
9113 ctx_ context.Context
9114 header_ http.Header
9115 }
9116
9117
9118
9119
9120
9121 func (r *ProjectsLocationsGithubEnterpriseConfigsService) List(parent string) *ProjectsLocationsGithubEnterpriseConfigsListCall {
9122 c := &ProjectsLocationsGithubEnterpriseConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9123 c.parent = parent
9124 return c
9125 }
9126
9127
9128 func (c *ProjectsLocationsGithubEnterpriseConfigsListCall) ProjectId(projectId string) *ProjectsLocationsGithubEnterpriseConfigsListCall {
9129 c.urlParams_.Set("projectId", projectId)
9130 return c
9131 }
9132
9133
9134
9135
9136 func (c *ProjectsLocationsGithubEnterpriseConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGithubEnterpriseConfigsListCall {
9137 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9138 return c
9139 }
9140
9141
9142
9143
9144 func (c *ProjectsLocationsGithubEnterpriseConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGithubEnterpriseConfigsListCall {
9145 c.ifNoneMatch_ = entityTag
9146 return c
9147 }
9148
9149
9150 func (c *ProjectsLocationsGithubEnterpriseConfigsListCall) Context(ctx context.Context) *ProjectsLocationsGithubEnterpriseConfigsListCall {
9151 c.ctx_ = ctx
9152 return c
9153 }
9154
9155
9156
9157 func (c *ProjectsLocationsGithubEnterpriseConfigsListCall) Header() http.Header {
9158 if c.header_ == nil {
9159 c.header_ = make(http.Header)
9160 }
9161 return c.header_
9162 }
9163
9164 func (c *ProjectsLocationsGithubEnterpriseConfigsListCall) doRequest(alt string) (*http.Response, error) {
9165 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9166 if c.ifNoneMatch_ != "" {
9167 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9168 }
9169 var body io.Reader = nil
9170 c.urlParams_.Set("alt", alt)
9171 c.urlParams_.Set("prettyPrint", "false")
9172 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/githubEnterpriseConfigs")
9173 urls += "?" + c.urlParams_.Encode()
9174 req, err := http.NewRequest("GET", urls, body)
9175 if err != nil {
9176 return nil, err
9177 }
9178 req.Header = reqHeaders
9179 googleapi.Expand(req.URL, map[string]string{
9180 "parent": c.parent,
9181 })
9182 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9183 }
9184
9185
9186
9187
9188
9189
9190
9191 func (c *ProjectsLocationsGithubEnterpriseConfigsListCall) Do(opts ...googleapi.CallOption) (*ListGithubEnterpriseConfigsResponse, error) {
9192 gensupport.SetOptions(c.urlParams_, opts...)
9193 res, err := c.doRequest("json")
9194 if res != nil && res.StatusCode == http.StatusNotModified {
9195 if res.Body != nil {
9196 res.Body.Close()
9197 }
9198 return nil, gensupport.WrapError(&googleapi.Error{
9199 Code: res.StatusCode,
9200 Header: res.Header,
9201 })
9202 }
9203 if err != nil {
9204 return nil, err
9205 }
9206 defer googleapi.CloseBody(res)
9207 if err := googleapi.CheckResponse(res); err != nil {
9208 return nil, gensupport.WrapError(err)
9209 }
9210 ret := &ListGithubEnterpriseConfigsResponse{
9211 ServerResponse: googleapi.ServerResponse{
9212 Header: res.Header,
9213 HTTPStatusCode: res.StatusCode,
9214 },
9215 }
9216 target := &ret
9217 if err := gensupport.DecodeResponse(target, res); err != nil {
9218 return nil, err
9219 }
9220 return ret, nil
9221 }
9222
9223 type ProjectsLocationsGithubEnterpriseConfigsPatchCall struct {
9224 s *Service
9225 name string
9226 githubenterpriseconfig *GitHubEnterpriseConfig
9227 urlParams_ gensupport.URLParams
9228 ctx_ context.Context
9229 header_ http.Header
9230 }
9231
9232
9233
9234
9235
9236
9237
9238
9239 func (r *ProjectsLocationsGithubEnterpriseConfigsService) Patch(name string, githubenterpriseconfig *GitHubEnterpriseConfig) *ProjectsLocationsGithubEnterpriseConfigsPatchCall {
9240 c := &ProjectsLocationsGithubEnterpriseConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9241 c.name = name
9242 c.githubenterpriseconfig = githubenterpriseconfig
9243 return c
9244 }
9245
9246
9247
9248
9249
9250 func (c *ProjectsLocationsGithubEnterpriseConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsGithubEnterpriseConfigsPatchCall {
9251 c.urlParams_.Set("updateMask", updateMask)
9252 return c
9253 }
9254
9255
9256
9257
9258 func (c *ProjectsLocationsGithubEnterpriseConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGithubEnterpriseConfigsPatchCall {
9259 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9260 return c
9261 }
9262
9263
9264 func (c *ProjectsLocationsGithubEnterpriseConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsGithubEnterpriseConfigsPatchCall {
9265 c.ctx_ = ctx
9266 return c
9267 }
9268
9269
9270
9271 func (c *ProjectsLocationsGithubEnterpriseConfigsPatchCall) Header() http.Header {
9272 if c.header_ == nil {
9273 c.header_ = make(http.Header)
9274 }
9275 return c.header_
9276 }
9277
9278 func (c *ProjectsLocationsGithubEnterpriseConfigsPatchCall) doRequest(alt string) (*http.Response, error) {
9279 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9280 var body io.Reader = nil
9281 body, err := googleapi.WithoutDataWrapper.JSONReader(c.githubenterpriseconfig)
9282 if err != nil {
9283 return nil, err
9284 }
9285 c.urlParams_.Set("alt", alt)
9286 c.urlParams_.Set("prettyPrint", "false")
9287 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
9288 urls += "?" + c.urlParams_.Encode()
9289 req, err := http.NewRequest("PATCH", urls, body)
9290 if err != nil {
9291 return nil, err
9292 }
9293 req.Header = reqHeaders
9294 googleapi.Expand(req.URL, map[string]string{
9295 "name": c.name,
9296 })
9297 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9298 }
9299
9300
9301
9302
9303
9304
9305 func (c *ProjectsLocationsGithubEnterpriseConfigsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9306 gensupport.SetOptions(c.urlParams_, opts...)
9307 res, err := c.doRequest("json")
9308 if res != nil && res.StatusCode == http.StatusNotModified {
9309 if res.Body != nil {
9310 res.Body.Close()
9311 }
9312 return nil, gensupport.WrapError(&googleapi.Error{
9313 Code: res.StatusCode,
9314 Header: res.Header,
9315 })
9316 }
9317 if err != nil {
9318 return nil, err
9319 }
9320 defer googleapi.CloseBody(res)
9321 if err := googleapi.CheckResponse(res); err != nil {
9322 return nil, gensupport.WrapError(err)
9323 }
9324 ret := &Operation{
9325 ServerResponse: googleapi.ServerResponse{
9326 Header: res.Header,
9327 HTTPStatusCode: res.StatusCode,
9328 },
9329 }
9330 target := &ret
9331 if err := gensupport.DecodeResponse(target, res); err != nil {
9332 return nil, err
9333 }
9334 return ret, nil
9335 }
9336
9337 type ProjectsLocationsOperationsCancelCall struct {
9338 s *Service
9339 name string
9340 canceloperationrequest *CancelOperationRequest
9341 urlParams_ gensupport.URLParams
9342 ctx_ context.Context
9343 header_ http.Header
9344 }
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357 func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall {
9358 c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9359 c.name = name
9360 c.canceloperationrequest = canceloperationrequest
9361 return c
9362 }
9363
9364
9365
9366
9367 func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
9368 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9369 return c
9370 }
9371
9372
9373 func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
9374 c.ctx_ = ctx
9375 return c
9376 }
9377
9378
9379
9380 func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
9381 if c.header_ == nil {
9382 c.header_ = make(http.Header)
9383 }
9384 return c.header_
9385 }
9386
9387 func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
9388 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9389 var body io.Reader = nil
9390 body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
9391 if err != nil {
9392 return nil, err
9393 }
9394 c.urlParams_.Set("alt", alt)
9395 c.urlParams_.Set("prettyPrint", "false")
9396 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
9397 urls += "?" + c.urlParams_.Encode()
9398 req, err := http.NewRequest("POST", urls, body)
9399 if err != nil {
9400 return nil, err
9401 }
9402 req.Header = reqHeaders
9403 googleapi.Expand(req.URL, map[string]string{
9404 "name": c.name,
9405 })
9406 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9407 }
9408
9409
9410
9411
9412
9413
9414 func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
9415 gensupport.SetOptions(c.urlParams_, opts...)
9416 res, err := c.doRequest("json")
9417 if res != nil && res.StatusCode == http.StatusNotModified {
9418 if res.Body != nil {
9419 res.Body.Close()
9420 }
9421 return nil, gensupport.WrapError(&googleapi.Error{
9422 Code: res.StatusCode,
9423 Header: res.Header,
9424 })
9425 }
9426 if err != nil {
9427 return nil, err
9428 }
9429 defer googleapi.CloseBody(res)
9430 if err := googleapi.CheckResponse(res); err != nil {
9431 return nil, gensupport.WrapError(err)
9432 }
9433 ret := &Empty{
9434 ServerResponse: googleapi.ServerResponse{
9435 Header: res.Header,
9436 HTTPStatusCode: res.StatusCode,
9437 },
9438 }
9439 target := &ret
9440 if err := gensupport.DecodeResponse(target, res); err != nil {
9441 return nil, err
9442 }
9443 return ret, nil
9444 }
9445
9446 type ProjectsLocationsOperationsGetCall struct {
9447 s *Service
9448 name string
9449 urlParams_ gensupport.URLParams
9450 ifNoneMatch_ string
9451 ctx_ context.Context
9452 header_ http.Header
9453 }
9454
9455
9456
9457
9458
9459
9460 func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
9461 c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9462 c.name = name
9463 return c
9464 }
9465
9466
9467
9468
9469 func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
9470 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9471 return c
9472 }
9473
9474
9475
9476
9477 func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
9478 c.ifNoneMatch_ = entityTag
9479 return c
9480 }
9481
9482
9483 func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
9484 c.ctx_ = ctx
9485 return c
9486 }
9487
9488
9489
9490 func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
9491 if c.header_ == nil {
9492 c.header_ = make(http.Header)
9493 }
9494 return c.header_
9495 }
9496
9497 func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
9498 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9499 if c.ifNoneMatch_ != "" {
9500 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9501 }
9502 var body io.Reader = nil
9503 c.urlParams_.Set("alt", alt)
9504 c.urlParams_.Set("prettyPrint", "false")
9505 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
9506 urls += "?" + c.urlParams_.Encode()
9507 req, err := http.NewRequest("GET", urls, body)
9508 if err != nil {
9509 return nil, err
9510 }
9511 req.Header = reqHeaders
9512 googleapi.Expand(req.URL, map[string]string{
9513 "name": c.name,
9514 })
9515 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9516 }
9517
9518
9519
9520
9521
9522
9523 func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9524 gensupport.SetOptions(c.urlParams_, opts...)
9525 res, err := c.doRequest("json")
9526 if res != nil && res.StatusCode == http.StatusNotModified {
9527 if res.Body != nil {
9528 res.Body.Close()
9529 }
9530 return nil, gensupport.WrapError(&googleapi.Error{
9531 Code: res.StatusCode,
9532 Header: res.Header,
9533 })
9534 }
9535 if err != nil {
9536 return nil, err
9537 }
9538 defer googleapi.CloseBody(res)
9539 if err := googleapi.CheckResponse(res); err != nil {
9540 return nil, gensupport.WrapError(err)
9541 }
9542 ret := &Operation{
9543 ServerResponse: googleapi.ServerResponse{
9544 Header: res.Header,
9545 HTTPStatusCode: res.StatusCode,
9546 },
9547 }
9548 target := &ret
9549 if err := gensupport.DecodeResponse(target, res); err != nil {
9550 return nil, err
9551 }
9552 return ret, nil
9553 }
9554
9555 type ProjectsLocationsTriggersCreateCall struct {
9556 s *Service
9557 parent string
9558 buildtrigger *BuildTrigger
9559 urlParams_ gensupport.URLParams
9560 ctx_ context.Context
9561 header_ http.Header
9562 }
9563
9564
9565
9566
9567
9568 func (r *ProjectsLocationsTriggersService) Create(parent string, buildtrigger *BuildTrigger) *ProjectsLocationsTriggersCreateCall {
9569 c := &ProjectsLocationsTriggersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9570 c.parent = parent
9571 c.buildtrigger = buildtrigger
9572 return c
9573 }
9574
9575
9576
9577 func (c *ProjectsLocationsTriggersCreateCall) ProjectId(projectId string) *ProjectsLocationsTriggersCreateCall {
9578 c.urlParams_.Set("projectId", projectId)
9579 return c
9580 }
9581
9582
9583
9584
9585 func (c *ProjectsLocationsTriggersCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsTriggersCreateCall {
9586 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9587 return c
9588 }
9589
9590
9591 func (c *ProjectsLocationsTriggersCreateCall) Context(ctx context.Context) *ProjectsLocationsTriggersCreateCall {
9592 c.ctx_ = ctx
9593 return c
9594 }
9595
9596
9597
9598 func (c *ProjectsLocationsTriggersCreateCall) Header() http.Header {
9599 if c.header_ == nil {
9600 c.header_ = make(http.Header)
9601 }
9602 return c.header_
9603 }
9604
9605 func (c *ProjectsLocationsTriggersCreateCall) doRequest(alt string) (*http.Response, error) {
9606 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9607 var body io.Reader = nil
9608 body, err := googleapi.WithoutDataWrapper.JSONReader(c.buildtrigger)
9609 if err != nil {
9610 return nil, err
9611 }
9612 c.urlParams_.Set("alt", alt)
9613 c.urlParams_.Set("prettyPrint", "false")
9614 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/triggers")
9615 urls += "?" + c.urlParams_.Encode()
9616 req, err := http.NewRequest("POST", urls, body)
9617 if err != nil {
9618 return nil, err
9619 }
9620 req.Header = reqHeaders
9621 googleapi.Expand(req.URL, map[string]string{
9622 "parent": c.parent,
9623 })
9624 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9625 }
9626
9627
9628
9629
9630
9631
9632 func (c *ProjectsLocationsTriggersCreateCall) Do(opts ...googleapi.CallOption) (*BuildTrigger, error) {
9633 gensupport.SetOptions(c.urlParams_, opts...)
9634 res, err := c.doRequest("json")
9635 if res != nil && res.StatusCode == http.StatusNotModified {
9636 if res.Body != nil {
9637 res.Body.Close()
9638 }
9639 return nil, gensupport.WrapError(&googleapi.Error{
9640 Code: res.StatusCode,
9641 Header: res.Header,
9642 })
9643 }
9644 if err != nil {
9645 return nil, err
9646 }
9647 defer googleapi.CloseBody(res)
9648 if err := googleapi.CheckResponse(res); err != nil {
9649 return nil, gensupport.WrapError(err)
9650 }
9651 ret := &BuildTrigger{
9652 ServerResponse: googleapi.ServerResponse{
9653 Header: res.Header,
9654 HTTPStatusCode: res.StatusCode,
9655 },
9656 }
9657 target := &ret
9658 if err := gensupport.DecodeResponse(target, res); err != nil {
9659 return nil, err
9660 }
9661 return ret, nil
9662 }
9663
9664 type ProjectsLocationsTriggersDeleteCall struct {
9665 s *Service
9666 name string
9667 urlParams_ gensupport.URLParams
9668 ctx_ context.Context
9669 header_ http.Header
9670 }
9671
9672
9673
9674
9675
9676 func (r *ProjectsLocationsTriggersService) Delete(name string) *ProjectsLocationsTriggersDeleteCall {
9677 c := &ProjectsLocationsTriggersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9678 c.name = name
9679 return c
9680 }
9681
9682
9683
9684 func (c *ProjectsLocationsTriggersDeleteCall) ProjectId(projectId string) *ProjectsLocationsTriggersDeleteCall {
9685 c.urlParams_.Set("projectId", projectId)
9686 return c
9687 }
9688
9689
9690
9691 func (c *ProjectsLocationsTriggersDeleteCall) TriggerId(triggerId string) *ProjectsLocationsTriggersDeleteCall {
9692 c.urlParams_.Set("triggerId", triggerId)
9693 return c
9694 }
9695
9696
9697
9698
9699 func (c *ProjectsLocationsTriggersDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsTriggersDeleteCall {
9700 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9701 return c
9702 }
9703
9704
9705 func (c *ProjectsLocationsTriggersDeleteCall) Context(ctx context.Context) *ProjectsLocationsTriggersDeleteCall {
9706 c.ctx_ = ctx
9707 return c
9708 }
9709
9710
9711
9712 func (c *ProjectsLocationsTriggersDeleteCall) Header() http.Header {
9713 if c.header_ == nil {
9714 c.header_ = make(http.Header)
9715 }
9716 return c.header_
9717 }
9718
9719 func (c *ProjectsLocationsTriggersDeleteCall) doRequest(alt string) (*http.Response, error) {
9720 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9721 var body io.Reader = nil
9722 c.urlParams_.Set("alt", alt)
9723 c.urlParams_.Set("prettyPrint", "false")
9724 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
9725 urls += "?" + c.urlParams_.Encode()
9726 req, err := http.NewRequest("DELETE", urls, body)
9727 if err != nil {
9728 return nil, err
9729 }
9730 req.Header = reqHeaders
9731 googleapi.Expand(req.URL, map[string]string{
9732 "name": c.name,
9733 })
9734 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9735 }
9736
9737
9738
9739
9740
9741
9742 func (c *ProjectsLocationsTriggersDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
9743 gensupport.SetOptions(c.urlParams_, opts...)
9744 res, err := c.doRequest("json")
9745 if res != nil && res.StatusCode == http.StatusNotModified {
9746 if res.Body != nil {
9747 res.Body.Close()
9748 }
9749 return nil, gensupport.WrapError(&googleapi.Error{
9750 Code: res.StatusCode,
9751 Header: res.Header,
9752 })
9753 }
9754 if err != nil {
9755 return nil, err
9756 }
9757 defer googleapi.CloseBody(res)
9758 if err := googleapi.CheckResponse(res); err != nil {
9759 return nil, gensupport.WrapError(err)
9760 }
9761 ret := &Empty{
9762 ServerResponse: googleapi.ServerResponse{
9763 Header: res.Header,
9764 HTTPStatusCode: res.StatusCode,
9765 },
9766 }
9767 target := &ret
9768 if err := gensupport.DecodeResponse(target, res); err != nil {
9769 return nil, err
9770 }
9771 return ret, nil
9772 }
9773
9774 type ProjectsLocationsTriggersGetCall struct {
9775 s *Service
9776 name string
9777 urlParams_ gensupport.URLParams
9778 ifNoneMatch_ string
9779 ctx_ context.Context
9780 header_ http.Header
9781 }
9782
9783
9784
9785
9786
9787 func (r *ProjectsLocationsTriggersService) Get(name string) *ProjectsLocationsTriggersGetCall {
9788 c := &ProjectsLocationsTriggersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9789 c.name = name
9790 return c
9791 }
9792
9793
9794
9795 func (c *ProjectsLocationsTriggersGetCall) ProjectId(projectId string) *ProjectsLocationsTriggersGetCall {
9796 c.urlParams_.Set("projectId", projectId)
9797 return c
9798 }
9799
9800
9801
9802 func (c *ProjectsLocationsTriggersGetCall) TriggerId(triggerId string) *ProjectsLocationsTriggersGetCall {
9803 c.urlParams_.Set("triggerId", triggerId)
9804 return c
9805 }
9806
9807
9808
9809
9810 func (c *ProjectsLocationsTriggersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsTriggersGetCall {
9811 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9812 return c
9813 }
9814
9815
9816
9817
9818 func (c *ProjectsLocationsTriggersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsTriggersGetCall {
9819 c.ifNoneMatch_ = entityTag
9820 return c
9821 }
9822
9823
9824 func (c *ProjectsLocationsTriggersGetCall) Context(ctx context.Context) *ProjectsLocationsTriggersGetCall {
9825 c.ctx_ = ctx
9826 return c
9827 }
9828
9829
9830
9831 func (c *ProjectsLocationsTriggersGetCall) Header() http.Header {
9832 if c.header_ == nil {
9833 c.header_ = make(http.Header)
9834 }
9835 return c.header_
9836 }
9837
9838 func (c *ProjectsLocationsTriggersGetCall) doRequest(alt string) (*http.Response, error) {
9839 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9840 if c.ifNoneMatch_ != "" {
9841 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9842 }
9843 var body io.Reader = nil
9844 c.urlParams_.Set("alt", alt)
9845 c.urlParams_.Set("prettyPrint", "false")
9846 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
9847 urls += "?" + c.urlParams_.Encode()
9848 req, err := http.NewRequest("GET", urls, body)
9849 if err != nil {
9850 return nil, err
9851 }
9852 req.Header = reqHeaders
9853 googleapi.Expand(req.URL, map[string]string{
9854 "name": c.name,
9855 })
9856 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9857 }
9858
9859
9860
9861
9862
9863
9864 func (c *ProjectsLocationsTriggersGetCall) Do(opts ...googleapi.CallOption) (*BuildTrigger, error) {
9865 gensupport.SetOptions(c.urlParams_, opts...)
9866 res, err := c.doRequest("json")
9867 if res != nil && res.StatusCode == http.StatusNotModified {
9868 if res.Body != nil {
9869 res.Body.Close()
9870 }
9871 return nil, gensupport.WrapError(&googleapi.Error{
9872 Code: res.StatusCode,
9873 Header: res.Header,
9874 })
9875 }
9876 if err != nil {
9877 return nil, err
9878 }
9879 defer googleapi.CloseBody(res)
9880 if err := googleapi.CheckResponse(res); err != nil {
9881 return nil, gensupport.WrapError(err)
9882 }
9883 ret := &BuildTrigger{
9884 ServerResponse: googleapi.ServerResponse{
9885 Header: res.Header,
9886 HTTPStatusCode: res.StatusCode,
9887 },
9888 }
9889 target := &ret
9890 if err := gensupport.DecodeResponse(target, res); err != nil {
9891 return nil, err
9892 }
9893 return ret, nil
9894 }
9895
9896 type ProjectsLocationsTriggersListCall struct {
9897 s *Service
9898 parent string
9899 urlParams_ gensupport.URLParams
9900 ifNoneMatch_ string
9901 ctx_ context.Context
9902 header_ http.Header
9903 }
9904
9905
9906
9907
9908
9909 func (r *ProjectsLocationsTriggersService) List(parent string) *ProjectsLocationsTriggersListCall {
9910 c := &ProjectsLocationsTriggersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9911 c.parent = parent
9912 return c
9913 }
9914
9915
9916
9917 func (c *ProjectsLocationsTriggersListCall) PageSize(pageSize int64) *ProjectsLocationsTriggersListCall {
9918 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
9919 return c
9920 }
9921
9922
9923
9924 func (c *ProjectsLocationsTriggersListCall) PageToken(pageToken string) *ProjectsLocationsTriggersListCall {
9925 c.urlParams_.Set("pageToken", pageToken)
9926 return c
9927 }
9928
9929
9930
9931 func (c *ProjectsLocationsTriggersListCall) ProjectId(projectId string) *ProjectsLocationsTriggersListCall {
9932 c.urlParams_.Set("projectId", projectId)
9933 return c
9934 }
9935
9936
9937
9938
9939 func (c *ProjectsLocationsTriggersListCall) Fields(s ...googleapi.Field) *ProjectsLocationsTriggersListCall {
9940 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9941 return c
9942 }
9943
9944
9945
9946
9947 func (c *ProjectsLocationsTriggersListCall) IfNoneMatch(entityTag string) *ProjectsLocationsTriggersListCall {
9948 c.ifNoneMatch_ = entityTag
9949 return c
9950 }
9951
9952
9953 func (c *ProjectsLocationsTriggersListCall) Context(ctx context.Context) *ProjectsLocationsTriggersListCall {
9954 c.ctx_ = ctx
9955 return c
9956 }
9957
9958
9959
9960 func (c *ProjectsLocationsTriggersListCall) Header() http.Header {
9961 if c.header_ == nil {
9962 c.header_ = make(http.Header)
9963 }
9964 return c.header_
9965 }
9966
9967 func (c *ProjectsLocationsTriggersListCall) doRequest(alt string) (*http.Response, error) {
9968 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9969 if c.ifNoneMatch_ != "" {
9970 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9971 }
9972 var body io.Reader = nil
9973 c.urlParams_.Set("alt", alt)
9974 c.urlParams_.Set("prettyPrint", "false")
9975 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/triggers")
9976 urls += "?" + c.urlParams_.Encode()
9977 req, err := http.NewRequest("GET", urls, body)
9978 if err != nil {
9979 return nil, err
9980 }
9981 req.Header = reqHeaders
9982 googleapi.Expand(req.URL, map[string]string{
9983 "parent": c.parent,
9984 })
9985 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9986 }
9987
9988
9989
9990
9991
9992
9993
9994 func (c *ProjectsLocationsTriggersListCall) Do(opts ...googleapi.CallOption) (*ListBuildTriggersResponse, error) {
9995 gensupport.SetOptions(c.urlParams_, opts...)
9996 res, err := c.doRequest("json")
9997 if res != nil && res.StatusCode == http.StatusNotModified {
9998 if res.Body != nil {
9999 res.Body.Close()
10000 }
10001 return nil, gensupport.WrapError(&googleapi.Error{
10002 Code: res.StatusCode,
10003 Header: res.Header,
10004 })
10005 }
10006 if err != nil {
10007 return nil, err
10008 }
10009 defer googleapi.CloseBody(res)
10010 if err := googleapi.CheckResponse(res); err != nil {
10011 return nil, gensupport.WrapError(err)
10012 }
10013 ret := &ListBuildTriggersResponse{
10014 ServerResponse: googleapi.ServerResponse{
10015 Header: res.Header,
10016 HTTPStatusCode: res.StatusCode,
10017 },
10018 }
10019 target := &ret
10020 if err := gensupport.DecodeResponse(target, res); err != nil {
10021 return nil, err
10022 }
10023 return ret, nil
10024 }
10025
10026
10027
10028
10029 func (c *ProjectsLocationsTriggersListCall) Pages(ctx context.Context, f func(*ListBuildTriggersResponse) error) error {
10030 c.ctx_ = ctx
10031 defer c.PageToken(c.urlParams_.Get("pageToken"))
10032 for {
10033 x, err := c.Do()
10034 if err != nil {
10035 return err
10036 }
10037 if err := f(x); err != nil {
10038 return err
10039 }
10040 if x.NextPageToken == "" {
10041 return nil
10042 }
10043 c.PageToken(x.NextPageToken)
10044 }
10045 }
10046
10047 type ProjectsLocationsTriggersPatchCall struct {
10048 s *Service
10049 resourceNameid string
10050 buildtrigger *BuildTrigger
10051 urlParams_ gensupport.URLParams
10052 ctx_ context.Context
10053 header_ http.Header
10054 }
10055
10056
10057
10058
10059
10060
10061 func (r *ProjectsLocationsTriggersService) Patch(resourceNameid string, buildtrigger *BuildTrigger) *ProjectsLocationsTriggersPatchCall {
10062 c := &ProjectsLocationsTriggersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10063 c.resourceNameid = resourceNameid
10064 c.buildtrigger = buildtrigger
10065 return c
10066 }
10067
10068
10069
10070 func (c *ProjectsLocationsTriggersPatchCall) ProjectId(projectId string) *ProjectsLocationsTriggersPatchCall {
10071 c.urlParams_.Set("projectId", projectId)
10072 return c
10073 }
10074
10075
10076
10077 func (c *ProjectsLocationsTriggersPatchCall) TriggerId(triggerId string) *ProjectsLocationsTriggersPatchCall {
10078 c.urlParams_.Set("triggerId", triggerId)
10079 return c
10080 }
10081
10082
10083
10084
10085
10086 func (c *ProjectsLocationsTriggersPatchCall) UpdateMask(updateMask string) *ProjectsLocationsTriggersPatchCall {
10087 c.urlParams_.Set("updateMask", updateMask)
10088 return c
10089 }
10090
10091
10092
10093
10094 func (c *ProjectsLocationsTriggersPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsTriggersPatchCall {
10095 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10096 return c
10097 }
10098
10099
10100 func (c *ProjectsLocationsTriggersPatchCall) Context(ctx context.Context) *ProjectsLocationsTriggersPatchCall {
10101 c.ctx_ = ctx
10102 return c
10103 }
10104
10105
10106
10107 func (c *ProjectsLocationsTriggersPatchCall) Header() http.Header {
10108 if c.header_ == nil {
10109 c.header_ = make(http.Header)
10110 }
10111 return c.header_
10112 }
10113
10114 func (c *ProjectsLocationsTriggersPatchCall) doRequest(alt string) (*http.Response, error) {
10115 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10116 var body io.Reader = nil
10117 body, err := googleapi.WithoutDataWrapper.JSONReader(c.buildtrigger)
10118 if err != nil {
10119 return nil, err
10120 }
10121 c.urlParams_.Set("alt", alt)
10122 c.urlParams_.Set("prettyPrint", "false")
10123 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resourceName}")
10124 urls += "?" + c.urlParams_.Encode()
10125 req, err := http.NewRequest("PATCH", urls, body)
10126 if err != nil {
10127 return nil, err
10128 }
10129 req.Header = reqHeaders
10130 googleapi.Expand(req.URL, map[string]string{
10131 "resourceName": c.resourceNameid,
10132 })
10133 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10134 }
10135
10136
10137
10138
10139
10140
10141 func (c *ProjectsLocationsTriggersPatchCall) Do(opts ...googleapi.CallOption) (*BuildTrigger, error) {
10142 gensupport.SetOptions(c.urlParams_, opts...)
10143 res, err := c.doRequest("json")
10144 if res != nil && res.StatusCode == http.StatusNotModified {
10145 if res.Body != nil {
10146 res.Body.Close()
10147 }
10148 return nil, gensupport.WrapError(&googleapi.Error{
10149 Code: res.StatusCode,
10150 Header: res.Header,
10151 })
10152 }
10153 if err != nil {
10154 return nil, err
10155 }
10156 defer googleapi.CloseBody(res)
10157 if err := googleapi.CheckResponse(res); err != nil {
10158 return nil, gensupport.WrapError(err)
10159 }
10160 ret := &BuildTrigger{
10161 ServerResponse: googleapi.ServerResponse{
10162 Header: res.Header,
10163 HTTPStatusCode: res.StatusCode,
10164 },
10165 }
10166 target := &ret
10167 if err := gensupport.DecodeResponse(target, res); err != nil {
10168 return nil, err
10169 }
10170 return ret, nil
10171 }
10172
10173 type ProjectsLocationsTriggersRunCall struct {
10174 s *Service
10175 name string
10176 runbuildtriggerrequest *RunBuildTriggerRequest
10177 urlParams_ gensupport.URLParams
10178 ctx_ context.Context
10179 header_ http.Header
10180 }
10181
10182
10183
10184
10185
10186
10187
10188
10189
10190
10191 func (r *ProjectsLocationsTriggersService) Run(name string, runbuildtriggerrequest *RunBuildTriggerRequest) *ProjectsLocationsTriggersRunCall {
10192 c := &ProjectsLocationsTriggersRunCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10193 c.name = name
10194 c.runbuildtriggerrequest = runbuildtriggerrequest
10195 return c
10196 }
10197
10198
10199
10200
10201 func (c *ProjectsLocationsTriggersRunCall) Fields(s ...googleapi.Field) *ProjectsLocationsTriggersRunCall {
10202 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10203 return c
10204 }
10205
10206
10207 func (c *ProjectsLocationsTriggersRunCall) Context(ctx context.Context) *ProjectsLocationsTriggersRunCall {
10208 c.ctx_ = ctx
10209 return c
10210 }
10211
10212
10213
10214 func (c *ProjectsLocationsTriggersRunCall) Header() http.Header {
10215 if c.header_ == nil {
10216 c.header_ = make(http.Header)
10217 }
10218 return c.header_
10219 }
10220
10221 func (c *ProjectsLocationsTriggersRunCall) doRequest(alt string) (*http.Response, error) {
10222 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10223 var body io.Reader = nil
10224 body, err := googleapi.WithoutDataWrapper.JSONReader(c.runbuildtriggerrequest)
10225 if err != nil {
10226 return nil, err
10227 }
10228 c.urlParams_.Set("alt", alt)
10229 c.urlParams_.Set("prettyPrint", "false")
10230 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:run")
10231 urls += "?" + c.urlParams_.Encode()
10232 req, err := http.NewRequest("POST", urls, body)
10233 if err != nil {
10234 return nil, err
10235 }
10236 req.Header = reqHeaders
10237 googleapi.Expand(req.URL, map[string]string{
10238 "name": c.name,
10239 })
10240 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10241 }
10242
10243
10244
10245
10246
10247
10248 func (c *ProjectsLocationsTriggersRunCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10249 gensupport.SetOptions(c.urlParams_, opts...)
10250 res, err := c.doRequest("json")
10251 if res != nil && res.StatusCode == http.StatusNotModified {
10252 if res.Body != nil {
10253 res.Body.Close()
10254 }
10255 return nil, gensupport.WrapError(&googleapi.Error{
10256 Code: res.StatusCode,
10257 Header: res.Header,
10258 })
10259 }
10260 if err != nil {
10261 return nil, err
10262 }
10263 defer googleapi.CloseBody(res)
10264 if err := googleapi.CheckResponse(res); err != nil {
10265 return nil, gensupport.WrapError(err)
10266 }
10267 ret := &Operation{
10268 ServerResponse: googleapi.ServerResponse{
10269 Header: res.Header,
10270 HTTPStatusCode: res.StatusCode,
10271 },
10272 }
10273 target := &ret
10274 if err := gensupport.DecodeResponse(target, res); err != nil {
10275 return nil, err
10276 }
10277 return ret, nil
10278 }
10279
10280 type ProjectsLocationsTriggersWebhookCall struct {
10281 s *Service
10282 name string
10283 httpbody *HttpBody
10284 urlParams_ gensupport.URLParams
10285 ctx_ context.Context
10286 header_ http.Header
10287 }
10288
10289
10290
10291
10292
10293
10294 func (r *ProjectsLocationsTriggersService) Webhook(name string, httpbody *HttpBody) *ProjectsLocationsTriggersWebhookCall {
10295 c := &ProjectsLocationsTriggersWebhookCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10296 c.name = name
10297 c.httpbody = httpbody
10298 return c
10299 }
10300
10301
10302
10303 func (c *ProjectsLocationsTriggersWebhookCall) ProjectId(projectId string) *ProjectsLocationsTriggersWebhookCall {
10304 c.urlParams_.Set("projectId", projectId)
10305 return c
10306 }
10307
10308
10309
10310 func (c *ProjectsLocationsTriggersWebhookCall) Secret(secret string) *ProjectsLocationsTriggersWebhookCall {
10311 c.urlParams_.Set("secret", secret)
10312 return c
10313 }
10314
10315
10316
10317 func (c *ProjectsLocationsTriggersWebhookCall) Trigger(trigger string) *ProjectsLocationsTriggersWebhookCall {
10318 c.urlParams_.Set("trigger", trigger)
10319 return c
10320 }
10321
10322
10323
10324
10325 func (c *ProjectsLocationsTriggersWebhookCall) Fields(s ...googleapi.Field) *ProjectsLocationsTriggersWebhookCall {
10326 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10327 return c
10328 }
10329
10330
10331 func (c *ProjectsLocationsTriggersWebhookCall) Context(ctx context.Context) *ProjectsLocationsTriggersWebhookCall {
10332 c.ctx_ = ctx
10333 return c
10334 }
10335
10336
10337
10338 func (c *ProjectsLocationsTriggersWebhookCall) Header() http.Header {
10339 if c.header_ == nil {
10340 c.header_ = make(http.Header)
10341 }
10342 return c.header_
10343 }
10344
10345 func (c *ProjectsLocationsTriggersWebhookCall) doRequest(alt string) (*http.Response, error) {
10346 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10347 var body io.Reader = nil
10348 body, err := googleapi.WithoutDataWrapper.JSONReader(c.httpbody)
10349 if err != nil {
10350 return nil, err
10351 }
10352 c.urlParams_.Set("alt", alt)
10353 c.urlParams_.Set("prettyPrint", "false")
10354 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:webhook")
10355 urls += "?" + c.urlParams_.Encode()
10356 req, err := http.NewRequest("POST", urls, body)
10357 if err != nil {
10358 return nil, err
10359 }
10360 req.Header = reqHeaders
10361 googleapi.Expand(req.URL, map[string]string{
10362 "name": c.name,
10363 })
10364 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10365 }
10366
10367
10368
10369
10370
10371
10372
10373 func (c *ProjectsLocationsTriggersWebhookCall) Do(opts ...googleapi.CallOption) (*ReceiveTriggerWebhookResponse, error) {
10374 gensupport.SetOptions(c.urlParams_, opts...)
10375 res, err := c.doRequest("json")
10376 if res != nil && res.StatusCode == http.StatusNotModified {
10377 if res.Body != nil {
10378 res.Body.Close()
10379 }
10380 return nil, gensupport.WrapError(&googleapi.Error{
10381 Code: res.StatusCode,
10382 Header: res.Header,
10383 })
10384 }
10385 if err != nil {
10386 return nil, err
10387 }
10388 defer googleapi.CloseBody(res)
10389 if err := googleapi.CheckResponse(res); err != nil {
10390 return nil, gensupport.WrapError(err)
10391 }
10392 ret := &ReceiveTriggerWebhookResponse{
10393 ServerResponse: googleapi.ServerResponse{
10394 Header: res.Header,
10395 HTTPStatusCode: res.StatusCode,
10396 },
10397 }
10398 target := &ret
10399 if err := gensupport.DecodeResponse(target, res); err != nil {
10400 return nil, err
10401 }
10402 return ret, nil
10403 }
10404
10405 type ProjectsLocationsWorkerPoolsCreateCall struct {
10406 s *Service
10407 parent string
10408 workerpool *WorkerPool
10409 urlParams_ gensupport.URLParams
10410 ctx_ context.Context
10411 header_ http.Header
10412 }
10413
10414
10415
10416
10417
10418 func (r *ProjectsLocationsWorkerPoolsService) Create(parent string, workerpool *WorkerPool) *ProjectsLocationsWorkerPoolsCreateCall {
10419 c := &ProjectsLocationsWorkerPoolsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10420 c.parent = parent
10421 c.workerpool = workerpool
10422 return c
10423 }
10424
10425
10426
10427 func (c *ProjectsLocationsWorkerPoolsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsWorkerPoolsCreateCall {
10428 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
10429 return c
10430 }
10431
10432
10433
10434
10435
10436 func (c *ProjectsLocationsWorkerPoolsCreateCall) WorkerPoolId(workerPoolId string) *ProjectsLocationsWorkerPoolsCreateCall {
10437 c.urlParams_.Set("workerPoolId", workerPoolId)
10438 return c
10439 }
10440
10441
10442
10443
10444 func (c *ProjectsLocationsWorkerPoolsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkerPoolsCreateCall {
10445 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10446 return c
10447 }
10448
10449
10450 func (c *ProjectsLocationsWorkerPoolsCreateCall) Context(ctx context.Context) *ProjectsLocationsWorkerPoolsCreateCall {
10451 c.ctx_ = ctx
10452 return c
10453 }
10454
10455
10456
10457 func (c *ProjectsLocationsWorkerPoolsCreateCall) Header() http.Header {
10458 if c.header_ == nil {
10459 c.header_ = make(http.Header)
10460 }
10461 return c.header_
10462 }
10463
10464 func (c *ProjectsLocationsWorkerPoolsCreateCall) doRequest(alt string) (*http.Response, error) {
10465 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10466 var body io.Reader = nil
10467 body, err := googleapi.WithoutDataWrapper.JSONReader(c.workerpool)
10468 if err != nil {
10469 return nil, err
10470 }
10471 c.urlParams_.Set("alt", alt)
10472 c.urlParams_.Set("prettyPrint", "false")
10473 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/workerPools")
10474 urls += "?" + c.urlParams_.Encode()
10475 req, err := http.NewRequest("POST", urls, body)
10476 if err != nil {
10477 return nil, err
10478 }
10479 req.Header = reqHeaders
10480 googleapi.Expand(req.URL, map[string]string{
10481 "parent": c.parent,
10482 })
10483 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10484 }
10485
10486
10487
10488
10489
10490
10491 func (c *ProjectsLocationsWorkerPoolsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10492 gensupport.SetOptions(c.urlParams_, opts...)
10493 res, err := c.doRequest("json")
10494 if res != nil && res.StatusCode == http.StatusNotModified {
10495 if res.Body != nil {
10496 res.Body.Close()
10497 }
10498 return nil, gensupport.WrapError(&googleapi.Error{
10499 Code: res.StatusCode,
10500 Header: res.Header,
10501 })
10502 }
10503 if err != nil {
10504 return nil, err
10505 }
10506 defer googleapi.CloseBody(res)
10507 if err := googleapi.CheckResponse(res); err != nil {
10508 return nil, gensupport.WrapError(err)
10509 }
10510 ret := &Operation{
10511 ServerResponse: googleapi.ServerResponse{
10512 Header: res.Header,
10513 HTTPStatusCode: res.StatusCode,
10514 },
10515 }
10516 target := &ret
10517 if err := gensupport.DecodeResponse(target, res); err != nil {
10518 return nil, err
10519 }
10520 return ret, nil
10521 }
10522
10523 type ProjectsLocationsWorkerPoolsDeleteCall struct {
10524 s *Service
10525 name string
10526 urlParams_ gensupport.URLParams
10527 ctx_ context.Context
10528 header_ http.Header
10529 }
10530
10531
10532
10533
10534
10535 func (r *ProjectsLocationsWorkerPoolsService) Delete(name string) *ProjectsLocationsWorkerPoolsDeleteCall {
10536 c := &ProjectsLocationsWorkerPoolsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10537 c.name = name
10538 return c
10539 }
10540
10541
10542
10543
10544 func (c *ProjectsLocationsWorkerPoolsDeleteCall) AllowMissing(allowMissing bool) *ProjectsLocationsWorkerPoolsDeleteCall {
10545 c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing))
10546 return c
10547 }
10548
10549
10550
10551 func (c *ProjectsLocationsWorkerPoolsDeleteCall) Etag(etag string) *ProjectsLocationsWorkerPoolsDeleteCall {
10552 c.urlParams_.Set("etag", etag)
10553 return c
10554 }
10555
10556
10557
10558 func (c *ProjectsLocationsWorkerPoolsDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsWorkerPoolsDeleteCall {
10559 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
10560 return c
10561 }
10562
10563
10564
10565
10566 func (c *ProjectsLocationsWorkerPoolsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkerPoolsDeleteCall {
10567 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10568 return c
10569 }
10570
10571
10572 func (c *ProjectsLocationsWorkerPoolsDeleteCall) Context(ctx context.Context) *ProjectsLocationsWorkerPoolsDeleteCall {
10573 c.ctx_ = ctx
10574 return c
10575 }
10576
10577
10578
10579 func (c *ProjectsLocationsWorkerPoolsDeleteCall) Header() http.Header {
10580 if c.header_ == nil {
10581 c.header_ = make(http.Header)
10582 }
10583 return c.header_
10584 }
10585
10586 func (c *ProjectsLocationsWorkerPoolsDeleteCall) doRequest(alt string) (*http.Response, error) {
10587 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10588 var body io.Reader = nil
10589 c.urlParams_.Set("alt", alt)
10590 c.urlParams_.Set("prettyPrint", "false")
10591 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
10592 urls += "?" + c.urlParams_.Encode()
10593 req, err := http.NewRequest("DELETE", urls, body)
10594 if err != nil {
10595 return nil, err
10596 }
10597 req.Header = reqHeaders
10598 googleapi.Expand(req.URL, map[string]string{
10599 "name": c.name,
10600 })
10601 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10602 }
10603
10604
10605
10606
10607
10608
10609 func (c *ProjectsLocationsWorkerPoolsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10610 gensupport.SetOptions(c.urlParams_, opts...)
10611 res, err := c.doRequest("json")
10612 if res != nil && res.StatusCode == http.StatusNotModified {
10613 if res.Body != nil {
10614 res.Body.Close()
10615 }
10616 return nil, gensupport.WrapError(&googleapi.Error{
10617 Code: res.StatusCode,
10618 Header: res.Header,
10619 })
10620 }
10621 if err != nil {
10622 return nil, err
10623 }
10624 defer googleapi.CloseBody(res)
10625 if err := googleapi.CheckResponse(res); err != nil {
10626 return nil, gensupport.WrapError(err)
10627 }
10628 ret := &Operation{
10629 ServerResponse: googleapi.ServerResponse{
10630 Header: res.Header,
10631 HTTPStatusCode: res.StatusCode,
10632 },
10633 }
10634 target := &ret
10635 if err := gensupport.DecodeResponse(target, res); err != nil {
10636 return nil, err
10637 }
10638 return ret, nil
10639 }
10640
10641 type ProjectsLocationsWorkerPoolsGetCall struct {
10642 s *Service
10643 name string
10644 urlParams_ gensupport.URLParams
10645 ifNoneMatch_ string
10646 ctx_ context.Context
10647 header_ http.Header
10648 }
10649
10650
10651
10652
10653
10654 func (r *ProjectsLocationsWorkerPoolsService) Get(name string) *ProjectsLocationsWorkerPoolsGetCall {
10655 c := &ProjectsLocationsWorkerPoolsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10656 c.name = name
10657 return c
10658 }
10659
10660
10661
10662
10663 func (c *ProjectsLocationsWorkerPoolsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkerPoolsGetCall {
10664 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10665 return c
10666 }
10667
10668
10669
10670
10671 func (c *ProjectsLocationsWorkerPoolsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkerPoolsGetCall {
10672 c.ifNoneMatch_ = entityTag
10673 return c
10674 }
10675
10676
10677 func (c *ProjectsLocationsWorkerPoolsGetCall) Context(ctx context.Context) *ProjectsLocationsWorkerPoolsGetCall {
10678 c.ctx_ = ctx
10679 return c
10680 }
10681
10682
10683
10684 func (c *ProjectsLocationsWorkerPoolsGetCall) Header() http.Header {
10685 if c.header_ == nil {
10686 c.header_ = make(http.Header)
10687 }
10688 return c.header_
10689 }
10690
10691 func (c *ProjectsLocationsWorkerPoolsGetCall) doRequest(alt string) (*http.Response, error) {
10692 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10693 if c.ifNoneMatch_ != "" {
10694 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10695 }
10696 var body io.Reader = nil
10697 c.urlParams_.Set("alt", alt)
10698 c.urlParams_.Set("prettyPrint", "false")
10699 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
10700 urls += "?" + c.urlParams_.Encode()
10701 req, err := http.NewRequest("GET", urls, body)
10702 if err != nil {
10703 return nil, err
10704 }
10705 req.Header = reqHeaders
10706 googleapi.Expand(req.URL, map[string]string{
10707 "name": c.name,
10708 })
10709 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10710 }
10711
10712
10713
10714
10715
10716
10717 func (c *ProjectsLocationsWorkerPoolsGetCall) Do(opts ...googleapi.CallOption) (*WorkerPool, error) {
10718 gensupport.SetOptions(c.urlParams_, opts...)
10719 res, err := c.doRequest("json")
10720 if res != nil && res.StatusCode == http.StatusNotModified {
10721 if res.Body != nil {
10722 res.Body.Close()
10723 }
10724 return nil, gensupport.WrapError(&googleapi.Error{
10725 Code: res.StatusCode,
10726 Header: res.Header,
10727 })
10728 }
10729 if err != nil {
10730 return nil, err
10731 }
10732 defer googleapi.CloseBody(res)
10733 if err := googleapi.CheckResponse(res); err != nil {
10734 return nil, gensupport.WrapError(err)
10735 }
10736 ret := &WorkerPool{
10737 ServerResponse: googleapi.ServerResponse{
10738 Header: res.Header,
10739 HTTPStatusCode: res.StatusCode,
10740 },
10741 }
10742 target := &ret
10743 if err := gensupport.DecodeResponse(target, res); err != nil {
10744 return nil, err
10745 }
10746 return ret, nil
10747 }
10748
10749 type ProjectsLocationsWorkerPoolsListCall struct {
10750 s *Service
10751 parent string
10752 urlParams_ gensupport.URLParams
10753 ifNoneMatch_ string
10754 ctx_ context.Context
10755 header_ http.Header
10756 }
10757
10758
10759
10760
10761
10762 func (r *ProjectsLocationsWorkerPoolsService) List(parent string) *ProjectsLocationsWorkerPoolsListCall {
10763 c := &ProjectsLocationsWorkerPoolsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10764 c.parent = parent
10765 return c
10766 }
10767
10768
10769
10770
10771 func (c *ProjectsLocationsWorkerPoolsListCall) PageSize(pageSize int64) *ProjectsLocationsWorkerPoolsListCall {
10772 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
10773 return c
10774 }
10775
10776
10777
10778
10779 func (c *ProjectsLocationsWorkerPoolsListCall) PageToken(pageToken string) *ProjectsLocationsWorkerPoolsListCall {
10780 c.urlParams_.Set("pageToken", pageToken)
10781 return c
10782 }
10783
10784
10785
10786
10787 func (c *ProjectsLocationsWorkerPoolsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkerPoolsListCall {
10788 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10789 return c
10790 }
10791
10792
10793
10794
10795 func (c *ProjectsLocationsWorkerPoolsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkerPoolsListCall {
10796 c.ifNoneMatch_ = entityTag
10797 return c
10798 }
10799
10800
10801 func (c *ProjectsLocationsWorkerPoolsListCall) Context(ctx context.Context) *ProjectsLocationsWorkerPoolsListCall {
10802 c.ctx_ = ctx
10803 return c
10804 }
10805
10806
10807
10808 func (c *ProjectsLocationsWorkerPoolsListCall) Header() http.Header {
10809 if c.header_ == nil {
10810 c.header_ = make(http.Header)
10811 }
10812 return c.header_
10813 }
10814
10815 func (c *ProjectsLocationsWorkerPoolsListCall) doRequest(alt string) (*http.Response, error) {
10816 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10817 if c.ifNoneMatch_ != "" {
10818 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10819 }
10820 var body io.Reader = nil
10821 c.urlParams_.Set("alt", alt)
10822 c.urlParams_.Set("prettyPrint", "false")
10823 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/workerPools")
10824 urls += "?" + c.urlParams_.Encode()
10825 req, err := http.NewRequest("GET", urls, body)
10826 if err != nil {
10827 return nil, err
10828 }
10829 req.Header = reqHeaders
10830 googleapi.Expand(req.URL, map[string]string{
10831 "parent": c.parent,
10832 })
10833 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10834 }
10835
10836
10837
10838
10839
10840
10841
10842 func (c *ProjectsLocationsWorkerPoolsListCall) Do(opts ...googleapi.CallOption) (*ListWorkerPoolsResponse, error) {
10843 gensupport.SetOptions(c.urlParams_, opts...)
10844 res, err := c.doRequest("json")
10845 if res != nil && res.StatusCode == http.StatusNotModified {
10846 if res.Body != nil {
10847 res.Body.Close()
10848 }
10849 return nil, gensupport.WrapError(&googleapi.Error{
10850 Code: res.StatusCode,
10851 Header: res.Header,
10852 })
10853 }
10854 if err != nil {
10855 return nil, err
10856 }
10857 defer googleapi.CloseBody(res)
10858 if err := googleapi.CheckResponse(res); err != nil {
10859 return nil, gensupport.WrapError(err)
10860 }
10861 ret := &ListWorkerPoolsResponse{
10862 ServerResponse: googleapi.ServerResponse{
10863 Header: res.Header,
10864 HTTPStatusCode: res.StatusCode,
10865 },
10866 }
10867 target := &ret
10868 if err := gensupport.DecodeResponse(target, res); err != nil {
10869 return nil, err
10870 }
10871 return ret, nil
10872 }
10873
10874
10875
10876
10877 func (c *ProjectsLocationsWorkerPoolsListCall) Pages(ctx context.Context, f func(*ListWorkerPoolsResponse) error) error {
10878 c.ctx_ = ctx
10879 defer c.PageToken(c.urlParams_.Get("pageToken"))
10880 for {
10881 x, err := c.Do()
10882 if err != nil {
10883 return err
10884 }
10885 if err := f(x); err != nil {
10886 return err
10887 }
10888 if x.NextPageToken == "" {
10889 return nil
10890 }
10891 c.PageToken(x.NextPageToken)
10892 }
10893 }
10894
10895 type ProjectsLocationsWorkerPoolsPatchCall struct {
10896 s *Service
10897 name string
10898 workerpool *WorkerPool
10899 urlParams_ gensupport.URLParams
10900 ctx_ context.Context
10901 header_ http.Header
10902 }
10903
10904
10905
10906
10907
10908
10909
10910
10911 func (r *ProjectsLocationsWorkerPoolsService) Patch(name string, workerpool *WorkerPool) *ProjectsLocationsWorkerPoolsPatchCall {
10912 c := &ProjectsLocationsWorkerPoolsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10913 c.name = name
10914 c.workerpool = workerpool
10915 return c
10916 }
10917
10918
10919
10920 func (c *ProjectsLocationsWorkerPoolsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsWorkerPoolsPatchCall {
10921 c.urlParams_.Set("updateMask", updateMask)
10922 return c
10923 }
10924
10925
10926
10927 func (c *ProjectsLocationsWorkerPoolsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsWorkerPoolsPatchCall {
10928 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
10929 return c
10930 }
10931
10932
10933
10934
10935 func (c *ProjectsLocationsWorkerPoolsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkerPoolsPatchCall {
10936 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10937 return c
10938 }
10939
10940
10941 func (c *ProjectsLocationsWorkerPoolsPatchCall) Context(ctx context.Context) *ProjectsLocationsWorkerPoolsPatchCall {
10942 c.ctx_ = ctx
10943 return c
10944 }
10945
10946
10947
10948 func (c *ProjectsLocationsWorkerPoolsPatchCall) Header() http.Header {
10949 if c.header_ == nil {
10950 c.header_ = make(http.Header)
10951 }
10952 return c.header_
10953 }
10954
10955 func (c *ProjectsLocationsWorkerPoolsPatchCall) doRequest(alt string) (*http.Response, error) {
10956 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10957 var body io.Reader = nil
10958 body, err := googleapi.WithoutDataWrapper.JSONReader(c.workerpool)
10959 if err != nil {
10960 return nil, err
10961 }
10962 c.urlParams_.Set("alt", alt)
10963 c.urlParams_.Set("prettyPrint", "false")
10964 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
10965 urls += "?" + c.urlParams_.Encode()
10966 req, err := http.NewRequest("PATCH", urls, body)
10967 if err != nil {
10968 return nil, err
10969 }
10970 req.Header = reqHeaders
10971 googleapi.Expand(req.URL, map[string]string{
10972 "name": c.name,
10973 })
10974 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10975 }
10976
10977
10978
10979
10980
10981
10982 func (c *ProjectsLocationsWorkerPoolsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10983 gensupport.SetOptions(c.urlParams_, opts...)
10984 res, err := c.doRequest("json")
10985 if res != nil && res.StatusCode == http.StatusNotModified {
10986 if res.Body != nil {
10987 res.Body.Close()
10988 }
10989 return nil, gensupport.WrapError(&googleapi.Error{
10990 Code: res.StatusCode,
10991 Header: res.Header,
10992 })
10993 }
10994 if err != nil {
10995 return nil, err
10996 }
10997 defer googleapi.CloseBody(res)
10998 if err := googleapi.CheckResponse(res); err != nil {
10999 return nil, gensupport.WrapError(err)
11000 }
11001 ret := &Operation{
11002 ServerResponse: googleapi.ServerResponse{
11003 Header: res.Header,
11004 HTTPStatusCode: res.StatusCode,
11005 },
11006 }
11007 target := &ret
11008 if err := gensupport.DecodeResponse(target, res); err != nil {
11009 return nil, err
11010 }
11011 return ret, nil
11012 }
11013
11014 type ProjectsTriggersCreateCall struct {
11015 s *Service
11016 projectId string
11017 buildtrigger *BuildTrigger
11018 urlParams_ gensupport.URLParams
11019 ctx_ context.Context
11020 header_ http.Header
11021 }
11022
11023
11024
11025
11026 func (r *ProjectsTriggersService) Create(projectId string, buildtrigger *BuildTrigger) *ProjectsTriggersCreateCall {
11027 c := &ProjectsTriggersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11028 c.projectId = projectId
11029 c.buildtrigger = buildtrigger
11030 return c
11031 }
11032
11033
11034
11035 func (c *ProjectsTriggersCreateCall) Parent(parent string) *ProjectsTriggersCreateCall {
11036 c.urlParams_.Set("parent", parent)
11037 return c
11038 }
11039
11040
11041
11042
11043 func (c *ProjectsTriggersCreateCall) Fields(s ...googleapi.Field) *ProjectsTriggersCreateCall {
11044 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11045 return c
11046 }
11047
11048
11049 func (c *ProjectsTriggersCreateCall) Context(ctx context.Context) *ProjectsTriggersCreateCall {
11050 c.ctx_ = ctx
11051 return c
11052 }
11053
11054
11055
11056 func (c *ProjectsTriggersCreateCall) Header() http.Header {
11057 if c.header_ == nil {
11058 c.header_ = make(http.Header)
11059 }
11060 return c.header_
11061 }
11062
11063 func (c *ProjectsTriggersCreateCall) doRequest(alt string) (*http.Response, error) {
11064 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11065 var body io.Reader = nil
11066 body, err := googleapi.WithoutDataWrapper.JSONReader(c.buildtrigger)
11067 if err != nil {
11068 return nil, err
11069 }
11070 c.urlParams_.Set("alt", alt)
11071 c.urlParams_.Set("prettyPrint", "false")
11072 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/triggers")
11073 urls += "?" + c.urlParams_.Encode()
11074 req, err := http.NewRequest("POST", urls, body)
11075 if err != nil {
11076 return nil, err
11077 }
11078 req.Header = reqHeaders
11079 googleapi.Expand(req.URL, map[string]string{
11080 "projectId": c.projectId,
11081 })
11082 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11083 }
11084
11085
11086
11087
11088
11089
11090 func (c *ProjectsTriggersCreateCall) Do(opts ...googleapi.CallOption) (*BuildTrigger, error) {
11091 gensupport.SetOptions(c.urlParams_, opts...)
11092 res, err := c.doRequest("json")
11093 if res != nil && res.StatusCode == http.StatusNotModified {
11094 if res.Body != nil {
11095 res.Body.Close()
11096 }
11097 return nil, gensupport.WrapError(&googleapi.Error{
11098 Code: res.StatusCode,
11099 Header: res.Header,
11100 })
11101 }
11102 if err != nil {
11103 return nil, err
11104 }
11105 defer googleapi.CloseBody(res)
11106 if err := googleapi.CheckResponse(res); err != nil {
11107 return nil, gensupport.WrapError(err)
11108 }
11109 ret := &BuildTrigger{
11110 ServerResponse: googleapi.ServerResponse{
11111 Header: res.Header,
11112 HTTPStatusCode: res.StatusCode,
11113 },
11114 }
11115 target := &ret
11116 if err := gensupport.DecodeResponse(target, res); err != nil {
11117 return nil, err
11118 }
11119 return ret, nil
11120 }
11121
11122 type ProjectsTriggersDeleteCall struct {
11123 s *Service
11124 projectId string
11125 triggerId string
11126 urlParams_ gensupport.URLParams
11127 ctx_ context.Context
11128 header_ http.Header
11129 }
11130
11131
11132
11133
11134
11135 func (r *ProjectsTriggersService) Delete(projectId string, triggerId string) *ProjectsTriggersDeleteCall {
11136 c := &ProjectsTriggersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11137 c.projectId = projectId
11138 c.triggerId = triggerId
11139 return c
11140 }
11141
11142
11143
11144 func (c *ProjectsTriggersDeleteCall) Name(name string) *ProjectsTriggersDeleteCall {
11145 c.urlParams_.Set("name", name)
11146 return c
11147 }
11148
11149
11150
11151
11152 func (c *ProjectsTriggersDeleteCall) Fields(s ...googleapi.Field) *ProjectsTriggersDeleteCall {
11153 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11154 return c
11155 }
11156
11157
11158 func (c *ProjectsTriggersDeleteCall) Context(ctx context.Context) *ProjectsTriggersDeleteCall {
11159 c.ctx_ = ctx
11160 return c
11161 }
11162
11163
11164
11165 func (c *ProjectsTriggersDeleteCall) Header() http.Header {
11166 if c.header_ == nil {
11167 c.header_ = make(http.Header)
11168 }
11169 return c.header_
11170 }
11171
11172 func (c *ProjectsTriggersDeleteCall) doRequest(alt string) (*http.Response, error) {
11173 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11174 var body io.Reader = nil
11175 c.urlParams_.Set("alt", alt)
11176 c.urlParams_.Set("prettyPrint", "false")
11177 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/triggers/{triggerId}")
11178 urls += "?" + c.urlParams_.Encode()
11179 req, err := http.NewRequest("DELETE", urls, body)
11180 if err != nil {
11181 return nil, err
11182 }
11183 req.Header = reqHeaders
11184 googleapi.Expand(req.URL, map[string]string{
11185 "projectId": c.projectId,
11186 "triggerId": c.triggerId,
11187 })
11188 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11189 }
11190
11191
11192
11193
11194
11195
11196 func (c *ProjectsTriggersDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
11197 gensupport.SetOptions(c.urlParams_, opts...)
11198 res, err := c.doRequest("json")
11199 if res != nil && res.StatusCode == http.StatusNotModified {
11200 if res.Body != nil {
11201 res.Body.Close()
11202 }
11203 return nil, gensupport.WrapError(&googleapi.Error{
11204 Code: res.StatusCode,
11205 Header: res.Header,
11206 })
11207 }
11208 if err != nil {
11209 return nil, err
11210 }
11211 defer googleapi.CloseBody(res)
11212 if err := googleapi.CheckResponse(res); err != nil {
11213 return nil, gensupport.WrapError(err)
11214 }
11215 ret := &Empty{
11216 ServerResponse: googleapi.ServerResponse{
11217 Header: res.Header,
11218 HTTPStatusCode: res.StatusCode,
11219 },
11220 }
11221 target := &ret
11222 if err := gensupport.DecodeResponse(target, res); err != nil {
11223 return nil, err
11224 }
11225 return ret, nil
11226 }
11227
11228 type ProjectsTriggersGetCall struct {
11229 s *Service
11230 projectId string
11231 triggerId string
11232 urlParams_ gensupport.URLParams
11233 ifNoneMatch_ string
11234 ctx_ context.Context
11235 header_ http.Header
11236 }
11237
11238
11239
11240
11241
11242 func (r *ProjectsTriggersService) Get(projectId string, triggerId string) *ProjectsTriggersGetCall {
11243 c := &ProjectsTriggersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11244 c.projectId = projectId
11245 c.triggerId = triggerId
11246 return c
11247 }
11248
11249
11250
11251
11252 func (c *ProjectsTriggersGetCall) Name(name string) *ProjectsTriggersGetCall {
11253 c.urlParams_.Set("name", name)
11254 return c
11255 }
11256
11257
11258
11259
11260 func (c *ProjectsTriggersGetCall) Fields(s ...googleapi.Field) *ProjectsTriggersGetCall {
11261 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11262 return c
11263 }
11264
11265
11266
11267
11268 func (c *ProjectsTriggersGetCall) IfNoneMatch(entityTag string) *ProjectsTriggersGetCall {
11269 c.ifNoneMatch_ = entityTag
11270 return c
11271 }
11272
11273
11274 func (c *ProjectsTriggersGetCall) Context(ctx context.Context) *ProjectsTriggersGetCall {
11275 c.ctx_ = ctx
11276 return c
11277 }
11278
11279
11280
11281 func (c *ProjectsTriggersGetCall) Header() http.Header {
11282 if c.header_ == nil {
11283 c.header_ = make(http.Header)
11284 }
11285 return c.header_
11286 }
11287
11288 func (c *ProjectsTriggersGetCall) doRequest(alt string) (*http.Response, error) {
11289 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11290 if c.ifNoneMatch_ != "" {
11291 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11292 }
11293 var body io.Reader = nil
11294 c.urlParams_.Set("alt", alt)
11295 c.urlParams_.Set("prettyPrint", "false")
11296 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/triggers/{triggerId}")
11297 urls += "?" + c.urlParams_.Encode()
11298 req, err := http.NewRequest("GET", urls, body)
11299 if err != nil {
11300 return nil, err
11301 }
11302 req.Header = reqHeaders
11303 googleapi.Expand(req.URL, map[string]string{
11304 "projectId": c.projectId,
11305 "triggerId": c.triggerId,
11306 })
11307 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11308 }
11309
11310
11311
11312
11313
11314
11315 func (c *ProjectsTriggersGetCall) Do(opts ...googleapi.CallOption) (*BuildTrigger, error) {
11316 gensupport.SetOptions(c.urlParams_, opts...)
11317 res, err := c.doRequest("json")
11318 if res != nil && res.StatusCode == http.StatusNotModified {
11319 if res.Body != nil {
11320 res.Body.Close()
11321 }
11322 return nil, gensupport.WrapError(&googleapi.Error{
11323 Code: res.StatusCode,
11324 Header: res.Header,
11325 })
11326 }
11327 if err != nil {
11328 return nil, err
11329 }
11330 defer googleapi.CloseBody(res)
11331 if err := googleapi.CheckResponse(res); err != nil {
11332 return nil, gensupport.WrapError(err)
11333 }
11334 ret := &BuildTrigger{
11335 ServerResponse: googleapi.ServerResponse{
11336 Header: res.Header,
11337 HTTPStatusCode: res.StatusCode,
11338 },
11339 }
11340 target := &ret
11341 if err := gensupport.DecodeResponse(target, res); err != nil {
11342 return nil, err
11343 }
11344 return ret, nil
11345 }
11346
11347 type ProjectsTriggersListCall struct {
11348 s *Service
11349 projectId string
11350 urlParams_ gensupport.URLParams
11351 ifNoneMatch_ string
11352 ctx_ context.Context
11353 header_ http.Header
11354 }
11355
11356
11357
11358
11359 func (r *ProjectsTriggersService) List(projectId string) *ProjectsTriggersListCall {
11360 c := &ProjectsTriggersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11361 c.projectId = projectId
11362 return c
11363 }
11364
11365
11366
11367 func (c *ProjectsTriggersListCall) PageSize(pageSize int64) *ProjectsTriggersListCall {
11368 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
11369 return c
11370 }
11371
11372
11373
11374 func (c *ProjectsTriggersListCall) PageToken(pageToken string) *ProjectsTriggersListCall {
11375 c.urlParams_.Set("pageToken", pageToken)
11376 return c
11377 }
11378
11379
11380
11381 func (c *ProjectsTriggersListCall) Parent(parent string) *ProjectsTriggersListCall {
11382 c.urlParams_.Set("parent", parent)
11383 return c
11384 }
11385
11386
11387
11388
11389 func (c *ProjectsTriggersListCall) Fields(s ...googleapi.Field) *ProjectsTriggersListCall {
11390 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11391 return c
11392 }
11393
11394
11395
11396
11397 func (c *ProjectsTriggersListCall) IfNoneMatch(entityTag string) *ProjectsTriggersListCall {
11398 c.ifNoneMatch_ = entityTag
11399 return c
11400 }
11401
11402
11403 func (c *ProjectsTriggersListCall) Context(ctx context.Context) *ProjectsTriggersListCall {
11404 c.ctx_ = ctx
11405 return c
11406 }
11407
11408
11409
11410 func (c *ProjectsTriggersListCall) Header() http.Header {
11411 if c.header_ == nil {
11412 c.header_ = make(http.Header)
11413 }
11414 return c.header_
11415 }
11416
11417 func (c *ProjectsTriggersListCall) doRequest(alt string) (*http.Response, error) {
11418 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11419 if c.ifNoneMatch_ != "" {
11420 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11421 }
11422 var body io.Reader = nil
11423 c.urlParams_.Set("alt", alt)
11424 c.urlParams_.Set("prettyPrint", "false")
11425 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/triggers")
11426 urls += "?" + c.urlParams_.Encode()
11427 req, err := http.NewRequest("GET", urls, body)
11428 if err != nil {
11429 return nil, err
11430 }
11431 req.Header = reqHeaders
11432 googleapi.Expand(req.URL, map[string]string{
11433 "projectId": c.projectId,
11434 })
11435 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11436 }
11437
11438
11439
11440
11441
11442
11443
11444 func (c *ProjectsTriggersListCall) Do(opts ...googleapi.CallOption) (*ListBuildTriggersResponse, error) {
11445 gensupport.SetOptions(c.urlParams_, opts...)
11446 res, err := c.doRequest("json")
11447 if res != nil && res.StatusCode == http.StatusNotModified {
11448 if res.Body != nil {
11449 res.Body.Close()
11450 }
11451 return nil, gensupport.WrapError(&googleapi.Error{
11452 Code: res.StatusCode,
11453 Header: res.Header,
11454 })
11455 }
11456 if err != nil {
11457 return nil, err
11458 }
11459 defer googleapi.CloseBody(res)
11460 if err := googleapi.CheckResponse(res); err != nil {
11461 return nil, gensupport.WrapError(err)
11462 }
11463 ret := &ListBuildTriggersResponse{
11464 ServerResponse: googleapi.ServerResponse{
11465 Header: res.Header,
11466 HTTPStatusCode: res.StatusCode,
11467 },
11468 }
11469 target := &ret
11470 if err := gensupport.DecodeResponse(target, res); err != nil {
11471 return nil, err
11472 }
11473 return ret, nil
11474 }
11475
11476
11477
11478
11479 func (c *ProjectsTriggersListCall) Pages(ctx context.Context, f func(*ListBuildTriggersResponse) error) error {
11480 c.ctx_ = ctx
11481 defer c.PageToken(c.urlParams_.Get("pageToken"))
11482 for {
11483 x, err := c.Do()
11484 if err != nil {
11485 return err
11486 }
11487 if err := f(x); err != nil {
11488 return err
11489 }
11490 if x.NextPageToken == "" {
11491 return nil
11492 }
11493 c.PageToken(x.NextPageToken)
11494 }
11495 }
11496
11497 type ProjectsTriggersPatchCall struct {
11498 s *Service
11499 projectId string
11500 triggerId string
11501 buildtrigger *BuildTrigger
11502 urlParams_ gensupport.URLParams
11503 ctx_ context.Context
11504 header_ http.Header
11505 }
11506
11507
11508
11509
11510
11511 func (r *ProjectsTriggersService) Patch(projectId string, triggerId string, buildtrigger *BuildTrigger) *ProjectsTriggersPatchCall {
11512 c := &ProjectsTriggersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11513 c.projectId = projectId
11514 c.triggerId = triggerId
11515 c.buildtrigger = buildtrigger
11516 return c
11517 }
11518
11519
11520
11521
11522
11523 func (c *ProjectsTriggersPatchCall) UpdateMask(updateMask string) *ProjectsTriggersPatchCall {
11524 c.urlParams_.Set("updateMask", updateMask)
11525 return c
11526 }
11527
11528
11529
11530
11531 func (c *ProjectsTriggersPatchCall) Fields(s ...googleapi.Field) *ProjectsTriggersPatchCall {
11532 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11533 return c
11534 }
11535
11536
11537 func (c *ProjectsTriggersPatchCall) Context(ctx context.Context) *ProjectsTriggersPatchCall {
11538 c.ctx_ = ctx
11539 return c
11540 }
11541
11542
11543
11544 func (c *ProjectsTriggersPatchCall) Header() http.Header {
11545 if c.header_ == nil {
11546 c.header_ = make(http.Header)
11547 }
11548 return c.header_
11549 }
11550
11551 func (c *ProjectsTriggersPatchCall) doRequest(alt string) (*http.Response, error) {
11552 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11553 var body io.Reader = nil
11554 body, err := googleapi.WithoutDataWrapper.JSONReader(c.buildtrigger)
11555 if err != nil {
11556 return nil, err
11557 }
11558 c.urlParams_.Set("alt", alt)
11559 c.urlParams_.Set("prettyPrint", "false")
11560 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/triggers/{triggerId}")
11561 urls += "?" + c.urlParams_.Encode()
11562 req, err := http.NewRequest("PATCH", urls, body)
11563 if err != nil {
11564 return nil, err
11565 }
11566 req.Header = reqHeaders
11567 googleapi.Expand(req.URL, map[string]string{
11568 "projectId": c.projectId,
11569 "triggerId": c.triggerId,
11570 })
11571 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11572 }
11573
11574
11575
11576
11577
11578
11579 func (c *ProjectsTriggersPatchCall) Do(opts ...googleapi.CallOption) (*BuildTrigger, error) {
11580 gensupport.SetOptions(c.urlParams_, opts...)
11581 res, err := c.doRequest("json")
11582 if res != nil && res.StatusCode == http.StatusNotModified {
11583 if res.Body != nil {
11584 res.Body.Close()
11585 }
11586 return nil, gensupport.WrapError(&googleapi.Error{
11587 Code: res.StatusCode,
11588 Header: res.Header,
11589 })
11590 }
11591 if err != nil {
11592 return nil, err
11593 }
11594 defer googleapi.CloseBody(res)
11595 if err := googleapi.CheckResponse(res); err != nil {
11596 return nil, gensupport.WrapError(err)
11597 }
11598 ret := &BuildTrigger{
11599 ServerResponse: googleapi.ServerResponse{
11600 Header: res.Header,
11601 HTTPStatusCode: res.StatusCode,
11602 },
11603 }
11604 target := &ret
11605 if err := gensupport.DecodeResponse(target, res); err != nil {
11606 return nil, err
11607 }
11608 return ret, nil
11609 }
11610
11611 type ProjectsTriggersRunCall struct {
11612 s *Service
11613 projectId string
11614 triggerId string
11615 reposource *RepoSource
11616 urlParams_ gensupport.URLParams
11617 ctx_ context.Context
11618 header_ http.Header
11619 }
11620
11621
11622
11623
11624
11625
11626
11627
11628
11629
11630 func (r *ProjectsTriggersService) Run(projectId string, triggerId string, reposource *RepoSource) *ProjectsTriggersRunCall {
11631 c := &ProjectsTriggersRunCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11632 c.projectId = projectId
11633 c.triggerId = triggerId
11634 c.reposource = reposource
11635 return c
11636 }
11637
11638
11639
11640 func (c *ProjectsTriggersRunCall) Name(name string) *ProjectsTriggersRunCall {
11641 c.urlParams_.Set("name", name)
11642 return c
11643 }
11644
11645
11646
11647
11648 func (c *ProjectsTriggersRunCall) Fields(s ...googleapi.Field) *ProjectsTriggersRunCall {
11649 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11650 return c
11651 }
11652
11653
11654 func (c *ProjectsTriggersRunCall) Context(ctx context.Context) *ProjectsTriggersRunCall {
11655 c.ctx_ = ctx
11656 return c
11657 }
11658
11659
11660
11661 func (c *ProjectsTriggersRunCall) Header() http.Header {
11662 if c.header_ == nil {
11663 c.header_ = make(http.Header)
11664 }
11665 return c.header_
11666 }
11667
11668 func (c *ProjectsTriggersRunCall) doRequest(alt string) (*http.Response, error) {
11669 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11670 var body io.Reader = nil
11671 body, err := googleapi.WithoutDataWrapper.JSONReader(c.reposource)
11672 if err != nil {
11673 return nil, err
11674 }
11675 c.urlParams_.Set("alt", alt)
11676 c.urlParams_.Set("prettyPrint", "false")
11677 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/triggers/{triggerId}:run")
11678 urls += "?" + c.urlParams_.Encode()
11679 req, err := http.NewRequest("POST", urls, body)
11680 if err != nil {
11681 return nil, err
11682 }
11683 req.Header = reqHeaders
11684 googleapi.Expand(req.URL, map[string]string{
11685 "projectId": c.projectId,
11686 "triggerId": c.triggerId,
11687 })
11688 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11689 }
11690
11691
11692
11693
11694
11695
11696 func (c *ProjectsTriggersRunCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
11697 gensupport.SetOptions(c.urlParams_, opts...)
11698 res, err := c.doRequest("json")
11699 if res != nil && res.StatusCode == http.StatusNotModified {
11700 if res.Body != nil {
11701 res.Body.Close()
11702 }
11703 return nil, gensupport.WrapError(&googleapi.Error{
11704 Code: res.StatusCode,
11705 Header: res.Header,
11706 })
11707 }
11708 if err != nil {
11709 return nil, err
11710 }
11711 defer googleapi.CloseBody(res)
11712 if err := googleapi.CheckResponse(res); err != nil {
11713 return nil, gensupport.WrapError(err)
11714 }
11715 ret := &Operation{
11716 ServerResponse: googleapi.ServerResponse{
11717 Header: res.Header,
11718 HTTPStatusCode: res.StatusCode,
11719 },
11720 }
11721 target := &ret
11722 if err := gensupport.DecodeResponse(target, res); err != nil {
11723 return nil, err
11724 }
11725 return ret, nil
11726 }
11727
11728 type ProjectsTriggersWebhookCall struct {
11729 s *Service
11730 projectId string
11731 trigger string
11732 httpbody *HttpBody
11733 urlParams_ gensupport.URLParams
11734 ctx_ context.Context
11735 header_ http.Header
11736 }
11737
11738
11739
11740
11741
11742
11743 func (r *ProjectsTriggersService) Webhook(projectId string, trigger string, httpbody *HttpBody) *ProjectsTriggersWebhookCall {
11744 c := &ProjectsTriggersWebhookCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11745 c.projectId = projectId
11746 c.trigger = trigger
11747 c.httpbody = httpbody
11748 return c
11749 }
11750
11751
11752
11753
11754 func (c *ProjectsTriggersWebhookCall) Name(name string) *ProjectsTriggersWebhookCall {
11755 c.urlParams_.Set("name", name)
11756 return c
11757 }
11758
11759
11760
11761 func (c *ProjectsTriggersWebhookCall) Secret(secret string) *ProjectsTriggersWebhookCall {
11762 c.urlParams_.Set("secret", secret)
11763 return c
11764 }
11765
11766
11767
11768
11769 func (c *ProjectsTriggersWebhookCall) Fields(s ...googleapi.Field) *ProjectsTriggersWebhookCall {
11770 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11771 return c
11772 }
11773
11774
11775 func (c *ProjectsTriggersWebhookCall) Context(ctx context.Context) *ProjectsTriggersWebhookCall {
11776 c.ctx_ = ctx
11777 return c
11778 }
11779
11780
11781
11782 func (c *ProjectsTriggersWebhookCall) Header() http.Header {
11783 if c.header_ == nil {
11784 c.header_ = make(http.Header)
11785 }
11786 return c.header_
11787 }
11788
11789 func (c *ProjectsTriggersWebhookCall) doRequest(alt string) (*http.Response, error) {
11790 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11791 var body io.Reader = nil
11792 body, err := googleapi.WithoutDataWrapper.JSONReader(c.httpbody)
11793 if err != nil {
11794 return nil, err
11795 }
11796 c.urlParams_.Set("alt", alt)
11797 c.urlParams_.Set("prettyPrint", "false")
11798 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/triggers/{trigger}:webhook")
11799 urls += "?" + c.urlParams_.Encode()
11800 req, err := http.NewRequest("POST", urls, body)
11801 if err != nil {
11802 return nil, err
11803 }
11804 req.Header = reqHeaders
11805 googleapi.Expand(req.URL, map[string]string{
11806 "projectId": c.projectId,
11807 "trigger": c.trigger,
11808 })
11809 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11810 }
11811
11812
11813
11814
11815
11816
11817
11818 func (c *ProjectsTriggersWebhookCall) Do(opts ...googleapi.CallOption) (*ReceiveTriggerWebhookResponse, error) {
11819 gensupport.SetOptions(c.urlParams_, opts...)
11820 res, err := c.doRequest("json")
11821 if res != nil && res.StatusCode == http.StatusNotModified {
11822 if res.Body != nil {
11823 res.Body.Close()
11824 }
11825 return nil, gensupport.WrapError(&googleapi.Error{
11826 Code: res.StatusCode,
11827 Header: res.Header,
11828 })
11829 }
11830 if err != nil {
11831 return nil, err
11832 }
11833 defer googleapi.CloseBody(res)
11834 if err := googleapi.CheckResponse(res); err != nil {
11835 return nil, gensupport.WrapError(err)
11836 }
11837 ret := &ReceiveTriggerWebhookResponse{
11838 ServerResponse: googleapi.ServerResponse{
11839 Header: res.Header,
11840 HTTPStatusCode: res.StatusCode,
11841 },
11842 }
11843 target := &ret
11844 if err := gensupport.DecodeResponse(target, res); err != nil {
11845 return nil, err
11846 }
11847 return ret, nil
11848 }
11849
11850 type V1WebhookCall struct {
11851 s *Service
11852 httpbody *HttpBody
11853 urlParams_ gensupport.URLParams
11854 ctx_ context.Context
11855 header_ http.Header
11856 }
11857
11858
11859 func (r *V1Service) Webhook(httpbody *HttpBody) *V1WebhookCall {
11860 c := &V1WebhookCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11861 c.httpbody = httpbody
11862 return c
11863 }
11864
11865
11866
11867
11868 func (c *V1WebhookCall) WebhookKey(webhookKey string) *V1WebhookCall {
11869 c.urlParams_.Set("webhookKey", webhookKey)
11870 return c
11871 }
11872
11873
11874
11875
11876 func (c *V1WebhookCall) Fields(s ...googleapi.Field) *V1WebhookCall {
11877 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11878 return c
11879 }
11880
11881
11882 func (c *V1WebhookCall) Context(ctx context.Context) *V1WebhookCall {
11883 c.ctx_ = ctx
11884 return c
11885 }
11886
11887
11888
11889 func (c *V1WebhookCall) Header() http.Header {
11890 if c.header_ == nil {
11891 c.header_ = make(http.Header)
11892 }
11893 return c.header_
11894 }
11895
11896 func (c *V1WebhookCall) doRequest(alt string) (*http.Response, error) {
11897 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11898 var body io.Reader = nil
11899 body, err := googleapi.WithoutDataWrapper.JSONReader(c.httpbody)
11900 if err != nil {
11901 return nil, err
11902 }
11903 c.urlParams_.Set("alt", alt)
11904 c.urlParams_.Set("prettyPrint", "false")
11905 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/webhook")
11906 urls += "?" + c.urlParams_.Encode()
11907 req, err := http.NewRequest("POST", urls, body)
11908 if err != nil {
11909 return nil, err
11910 }
11911 req.Header = reqHeaders
11912 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11913 }
11914
11915
11916
11917
11918
11919
11920 func (c *V1WebhookCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
11921 gensupport.SetOptions(c.urlParams_, opts...)
11922 res, err := c.doRequest("json")
11923 if res != nil && res.StatusCode == http.StatusNotModified {
11924 if res.Body != nil {
11925 res.Body.Close()
11926 }
11927 return nil, gensupport.WrapError(&googleapi.Error{
11928 Code: res.StatusCode,
11929 Header: res.Header,
11930 })
11931 }
11932 if err != nil {
11933 return nil, err
11934 }
11935 defer googleapi.CloseBody(res)
11936 if err := googleapi.CheckResponse(res); err != nil {
11937 return nil, gensupport.WrapError(err)
11938 }
11939 ret := &Empty{
11940 ServerResponse: googleapi.ServerResponse{
11941 Header: res.Header,
11942 HTTPStatusCode: res.StatusCode,
11943 },
11944 }
11945 target := &ret
11946 if err := gensupport.DecodeResponse(target, res); err != nil {
11947 return nil, err
11948 }
11949 return ret, nil
11950 }
11951
View as plain text