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