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 config
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 = "config:v1"
90 const apiName = "config"
91 const apiVersion = "v1"
92 const basePath = "https://config.googleapis.com/"
93 const basePathTemplate = "https://config.UNIVERSE_DOMAIN/"
94 const mtlsBasePath = "https://config.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.Deployments = NewProjectsLocationsDeploymentsService(s)
172 rs.Operations = NewProjectsLocationsOperationsService(s)
173 rs.Previews = NewProjectsLocationsPreviewsService(s)
174 rs.TerraformVersions = NewProjectsLocationsTerraformVersionsService(s)
175 return rs
176 }
177
178 type ProjectsLocationsService struct {
179 s *Service
180
181 Deployments *ProjectsLocationsDeploymentsService
182
183 Operations *ProjectsLocationsOperationsService
184
185 Previews *ProjectsLocationsPreviewsService
186
187 TerraformVersions *ProjectsLocationsTerraformVersionsService
188 }
189
190 func NewProjectsLocationsDeploymentsService(s *Service) *ProjectsLocationsDeploymentsService {
191 rs := &ProjectsLocationsDeploymentsService{s: s}
192 rs.Revisions = NewProjectsLocationsDeploymentsRevisionsService(s)
193 return rs
194 }
195
196 type ProjectsLocationsDeploymentsService struct {
197 s *Service
198
199 Revisions *ProjectsLocationsDeploymentsRevisionsService
200 }
201
202 func NewProjectsLocationsDeploymentsRevisionsService(s *Service) *ProjectsLocationsDeploymentsRevisionsService {
203 rs := &ProjectsLocationsDeploymentsRevisionsService{s: s}
204 rs.Resources = NewProjectsLocationsDeploymentsRevisionsResourcesService(s)
205 return rs
206 }
207
208 type ProjectsLocationsDeploymentsRevisionsService struct {
209 s *Service
210
211 Resources *ProjectsLocationsDeploymentsRevisionsResourcesService
212 }
213
214 func NewProjectsLocationsDeploymentsRevisionsResourcesService(s *Service) *ProjectsLocationsDeploymentsRevisionsResourcesService {
215 rs := &ProjectsLocationsDeploymentsRevisionsResourcesService{s: s}
216 return rs
217 }
218
219 type ProjectsLocationsDeploymentsRevisionsResourcesService struct {
220 s *Service
221 }
222
223 func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
224 rs := &ProjectsLocationsOperationsService{s: s}
225 return rs
226 }
227
228 type ProjectsLocationsOperationsService struct {
229 s *Service
230 }
231
232 func NewProjectsLocationsPreviewsService(s *Service) *ProjectsLocationsPreviewsService {
233 rs := &ProjectsLocationsPreviewsService{s: s}
234 return rs
235 }
236
237 type ProjectsLocationsPreviewsService struct {
238 s *Service
239 }
240
241 func NewProjectsLocationsTerraformVersionsService(s *Service) *ProjectsLocationsTerraformVersionsService {
242 rs := &ProjectsLocationsTerraformVersionsService{s: s}
243 return rs
244 }
245
246 type ProjectsLocationsTerraformVersionsService struct {
247 s *Service
248 }
249
250
251 type ApplyResults struct {
252
253
254 Artifacts string `json:"artifacts,omitempty"`
255
256
257 Content string `json:"content,omitempty"`
258
259 Outputs map[string]TerraformOutput `json:"outputs,omitempty"`
260
261
262
263
264
265 ForceSendFields []string `json:"-"`
266
267
268
269
270 NullFields []string `json:"-"`
271 }
272
273 func (s *ApplyResults) MarshalJSON() ([]byte, error) {
274 type NoMethod ApplyResults
275 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
276 }
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294 type AuditConfig struct {
295
296 AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"`
297
298
299
300 Service string `json:"service,omitempty"`
301
302
303
304
305
306 ForceSendFields []string `json:"-"`
307
308
309
310
311 NullFields []string `json:"-"`
312 }
313
314 func (s *AuditConfig) MarshalJSON() ([]byte, error) {
315 type NoMethod AuditConfig
316 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
317 }
318
319
320
321
322
323
324 type AuditLogConfig struct {
325
326
327 ExemptedMembers []string `json:"exemptedMembers,omitempty"`
328
329
330
331
332
333
334
335 LogType string `json:"logType,omitempty"`
336
337
338
339
340
341 ForceSendFields []string `json:"-"`
342
343
344
345
346 NullFields []string `json:"-"`
347 }
348
349 func (s *AuditLogConfig) MarshalJSON() ([]byte, error) {
350 type NoMethod AuditLogConfig
351 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
352 }
353
354
355 type Binding struct {
356
357
358
359
360
361
362
363
364 Condition *Expr `json:"condition,omitempty"`
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427 Members []string `json:"members,omitempty"`
428
429
430
431
432
433
434 Role string `json:"role,omitempty"`
435
436
437
438
439
440 ForceSendFields []string `json:"-"`
441
442
443
444
445 NullFields []string `json:"-"`
446 }
447
448 func (s *Binding) MarshalJSON() ([]byte, error) {
449 type NoMethod Binding
450 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
451 }
452
453
454 type CancelOperationRequest struct {
455 }
456
457
458
459 type DeleteStatefileRequest struct {
460
461
462 LockId int64 `json:"lockId,omitempty,string"`
463
464
465
466
467
468 ForceSendFields []string `json:"-"`
469
470
471
472
473 NullFields []string `json:"-"`
474 }
475
476 func (s *DeleteStatefileRequest) MarshalJSON() ([]byte, error) {
477 type NoMethod DeleteStatefileRequest
478 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
479 }
480
481
482
483 type Deployment struct {
484
485
486
487
488 Annotations map[string]string `json:"annotations,omitempty"`
489
490
491
492
493
494
495
496 ArtifactsGcsBucket string `json:"artifactsGcsBucket,omitempty"`
497
498 CreateTime string `json:"createTime,omitempty"`
499
500
501 DeleteBuild string `json:"deleteBuild,omitempty"`
502
503
504
505 DeleteLogs string `json:"deleteLogs,omitempty"`
506
507
508 DeleteResults *ApplyResults `json:"deleteResults,omitempty"`
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524 ErrorCode string `json:"errorCode,omitempty"`
525
526
527 ErrorLogs string `json:"errorLogs,omitempty"`
528
529
530
531
532
533
534 ImportExistingResources bool `json:"importExistingResources,omitempty"`
535
536 Labels map[string]string `json:"labels,omitempty"`
537
538
539
540 LatestRevision string `json:"latestRevision,omitempty"`
541
542
543
544
545
546
547
548
549
550
551
552 LockState string `json:"lockState,omitempty"`
553
554
555 Name string `json:"name,omitempty"`
556
557
558
559
560
561
562
563
564
565
566
567
568 QuotaValidation string `json:"quotaValidation,omitempty"`
569
570
571
572 ServiceAccount string `json:"serviceAccount,omitempty"`
573
574
575
576
577
578
579
580
581
582
583
584
585
586 State string `json:"state,omitempty"`
587
588
589 StateDetail string `json:"stateDetail,omitempty"`
590
591
592 TerraformBlueprint *TerraformBlueprint `json:"terraformBlueprint,omitempty"`
593
594
595
596 TfErrors []*TerraformError `json:"tfErrors,omitempty"`
597
598
599 TfVersion string `json:"tfVersion,omitempty"`
600
601
602 TfVersionConstraint string `json:"tfVersionConstraint,omitempty"`
603
604 UpdateTime string `json:"updateTime,omitempty"`
605
606
607
608
609 WorkerPool string `json:"workerPool,omitempty"`
610
611
612 googleapi.ServerResponse `json:"-"`
613
614
615
616
617
618 ForceSendFields []string `json:"-"`
619
620
621
622
623 NullFields []string `json:"-"`
624 }
625
626 func (s *Deployment) MarshalJSON() ([]byte, error) {
627 type NoMethod Deployment
628 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
629 }
630
631
632
633 type DeploymentOperationMetadata struct {
634
635 ApplyResults *ApplyResults `json:"applyResults,omitempty"`
636
637
638 Build string `json:"build,omitempty"`
639
640
641 Logs string `json:"logs,omitempty"`
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664 Step string `json:"step,omitempty"`
665
666
667
668
669
670 ForceSendFields []string `json:"-"`
671
672
673
674
675 NullFields []string `json:"-"`
676 }
677
678 func (s *DeploymentOperationMetadata) MarshalJSON() ([]byte, error) {
679 type NoMethod DeploymentOperationMetadata
680 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
681 }
682
683
684
685
686
687 type Empty struct {
688
689 googleapi.ServerResponse `json:"-"`
690 }
691
692
693
694 type ExportDeploymentStatefileRequest struct {
695
696
697
698 Draft bool `json:"draft,omitempty"`
699
700
701
702
703
704 ForceSendFields []string `json:"-"`
705
706
707
708
709 NullFields []string `json:"-"`
710 }
711
712 func (s *ExportDeploymentStatefileRequest) MarshalJSON() ([]byte, error) {
713 type NoMethod ExportDeploymentStatefileRequest
714 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
715 }
716
717
718 type ExportPreviewResultRequest struct {
719 }
720
721
722
723 type ExportPreviewResultResponse struct {
724
725 Result *PreviewResult `json:"result,omitempty"`
726
727
728 googleapi.ServerResponse `json:"-"`
729
730
731
732
733
734 ForceSendFields []string `json:"-"`
735
736
737
738
739 NullFields []string `json:"-"`
740 }
741
742 func (s *ExportPreviewResultResponse) MarshalJSON() ([]byte, error) {
743 type NoMethod ExportPreviewResultResponse
744 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
745 }
746
747
748
749 type ExportRevisionStatefileRequest struct {
750 }
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768 type Expr struct {
769
770
771 Description string `json:"description,omitempty"`
772
773
774 Expression string `json:"expression,omitempty"`
775
776
777 Location string `json:"location,omitempty"`
778
779
780
781 Title string `json:"title,omitempty"`
782
783
784
785
786
787 ForceSendFields []string `json:"-"`
788
789
790
791
792 NullFields []string `json:"-"`
793 }
794
795 func (s *Expr) MarshalJSON() ([]byte, error) {
796 type NoMethod Expr
797 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
798 }
799
800
801 type GitSource struct {
802
803
804 Directory string `json:"directory,omitempty"`
805
806 Ref string `json:"ref,omitempty"`
807
808
809 Repo string `json:"repo,omitempty"`
810
811
812
813
814
815 ForceSendFields []string `json:"-"`
816
817
818
819
820 NullFields []string `json:"-"`
821 }
822
823 func (s *GitSource) MarshalJSON() ([]byte, error) {
824 type NoMethod GitSource
825 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
826 }
827
828
829
830 type ImportStatefileRequest struct {
831
832
833 LockId int64 `json:"lockId,omitempty,string"`
834
835
836
837
838
839 ForceSendFields []string `json:"-"`
840
841
842
843
844 NullFields []string `json:"-"`
845 }
846
847 func (s *ImportStatefileRequest) MarshalJSON() ([]byte, error) {
848 type NoMethod ImportStatefileRequest
849 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
850 }
851
852 type ListDeploymentsResponse struct {
853
854 Deployments []*Deployment `json:"deployments,omitempty"`
855
856
857 NextPageToken string `json:"nextPageToken,omitempty"`
858
859 Unreachable []string `json:"unreachable,omitempty"`
860
861
862 googleapi.ServerResponse `json:"-"`
863
864
865
866
867
868 ForceSendFields []string `json:"-"`
869
870
871
872
873 NullFields []string `json:"-"`
874 }
875
876 func (s *ListDeploymentsResponse) MarshalJSON() ([]byte, error) {
877 type NoMethod ListDeploymentsResponse
878 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
879 }
880
881
882 type ListLocationsResponse struct {
883
884
885 Locations []*Location `json:"locations,omitempty"`
886
887 NextPageToken string `json:"nextPageToken,omitempty"`
888
889
890 googleapi.ServerResponse `json:"-"`
891
892
893
894
895
896 ForceSendFields []string `json:"-"`
897
898
899
900
901 NullFields []string `json:"-"`
902 }
903
904 func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
905 type NoMethod ListLocationsResponse
906 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
907 }
908
909
910 type ListOperationsResponse struct {
911
912 NextPageToken string `json:"nextPageToken,omitempty"`
913
914
915 Operations []*Operation `json:"operations,omitempty"`
916
917
918 googleapi.ServerResponse `json:"-"`
919
920
921
922
923
924 ForceSendFields []string `json:"-"`
925
926
927
928
929 NullFields []string `json:"-"`
930 }
931
932 func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
933 type NoMethod ListOperationsResponse
934 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
935 }
936
937
938
939 type ListPreviewsResponse struct {
940
941
942 NextPageToken string `json:"nextPageToken,omitempty"`
943
944 Previews []*Preview `json:"previews,omitempty"`
945
946 Unreachable []string `json:"unreachable,omitempty"`
947
948
949 googleapi.ServerResponse `json:"-"`
950
951
952
953
954
955 ForceSendFields []string `json:"-"`
956
957
958
959
960 NullFields []string `json:"-"`
961 }
962
963 func (s *ListPreviewsResponse) MarshalJSON() ([]byte, error) {
964 type NoMethod ListPreviewsResponse
965 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
966 }
967
968
969
970 type ListResourcesResponse struct {
971
972
973
974 NextPageToken string `json:"nextPageToken,omitempty"`
975
976 Resources []*Resource `json:"resources,omitempty"`
977
978 Unreachable []string `json:"unreachable,omitempty"`
979
980
981 googleapi.ServerResponse `json:"-"`
982
983
984
985
986
987 ForceSendFields []string `json:"-"`
988
989
990
991
992 NullFields []string `json:"-"`
993 }
994
995 func (s *ListResourcesResponse) MarshalJSON() ([]byte, error) {
996 type NoMethod ListResourcesResponse
997 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
998 }
999
1000
1001
1002 type ListRevisionsResponse struct {
1003
1004
1005
1006 NextPageToken string `json:"nextPageToken,omitempty"`
1007
1008 Revisions []*Revision `json:"revisions,omitempty"`
1009
1010 Unreachable []string `json:"unreachable,omitempty"`
1011
1012
1013 googleapi.ServerResponse `json:"-"`
1014
1015
1016
1017
1018
1019 ForceSendFields []string `json:"-"`
1020
1021
1022
1023
1024 NullFields []string `json:"-"`
1025 }
1026
1027 func (s *ListRevisionsResponse) MarshalJSON() ([]byte, error) {
1028 type NoMethod ListRevisionsResponse
1029 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1030 }
1031
1032
1033
1034 type ListTerraformVersionsResponse struct {
1035
1036
1037 NextPageToken string `json:"nextPageToken,omitempty"`
1038
1039 TerraformVersions []*TerraformVersion `json:"terraformVersions,omitempty"`
1040
1041 Unreachable []string `json:"unreachable,omitempty"`
1042
1043
1044 googleapi.ServerResponse `json:"-"`
1045
1046
1047
1048
1049
1050 ForceSendFields []string `json:"-"`
1051
1052
1053
1054
1055 NullFields []string `json:"-"`
1056 }
1057
1058 func (s *ListTerraformVersionsResponse) MarshalJSON() ([]byte, error) {
1059 type NoMethod ListTerraformVersionsResponse
1060 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1061 }
1062
1063
1064 type Location struct {
1065
1066
1067 DisplayName string `json:"displayName,omitempty"`
1068
1069
1070 Labels map[string]string `json:"labels,omitempty"`
1071
1072 LocationId string `json:"locationId,omitempty"`
1073
1074
1075 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
1076
1077
1078
1079 Name string `json:"name,omitempty"`
1080
1081
1082 googleapi.ServerResponse `json:"-"`
1083
1084
1085
1086
1087
1088 ForceSendFields []string `json:"-"`
1089
1090
1091
1092
1093 NullFields []string `json:"-"`
1094 }
1095
1096 func (s *Location) MarshalJSON() ([]byte, error) {
1097 type NoMethod Location
1098 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1099 }
1100
1101
1102
1103 type LockDeploymentRequest struct {
1104 }
1105
1106
1107 type LockInfo struct {
1108
1109 CreateTime string `json:"createTime,omitempty"`
1110
1111 Info string `json:"info,omitempty"`
1112
1113
1114 LockId int64 `json:"lockId,omitempty,string"`
1115
1116 Operation string `json:"operation,omitempty"`
1117
1118 Version string `json:"version,omitempty"`
1119
1120 Who string `json:"who,omitempty"`
1121
1122
1123 googleapi.ServerResponse `json:"-"`
1124
1125
1126
1127
1128
1129 ForceSendFields []string `json:"-"`
1130
1131
1132
1133
1134 NullFields []string `json:"-"`
1135 }
1136
1137 func (s *LockInfo) MarshalJSON() ([]byte, error) {
1138 type NoMethod LockInfo
1139 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1140 }
1141
1142
1143
1144 type Operation struct {
1145
1146
1147
1148 Done bool `json:"done,omitempty"`
1149
1150 Error *Status `json:"error,omitempty"`
1151
1152
1153
1154
1155 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
1156
1157
1158
1159 Name string `json:"name,omitempty"`
1160
1161
1162
1163
1164
1165
1166
1167 Response googleapi.RawMessage `json:"response,omitempty"`
1168
1169
1170 googleapi.ServerResponse `json:"-"`
1171
1172
1173
1174
1175
1176 ForceSendFields []string `json:"-"`
1177
1178
1179
1180
1181 NullFields []string `json:"-"`
1182 }
1183
1184 func (s *Operation) MarshalJSON() ([]byte, error) {
1185 type NoMethod Operation
1186 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1187 }
1188
1189
1190 type OperationMetadata struct {
1191
1192 ApiVersion string `json:"apiVersion,omitempty"`
1193
1194 CreateTime string `json:"createTime,omitempty"`
1195
1196
1197 DeploymentMetadata *DeploymentOperationMetadata `json:"deploymentMetadata,omitempty"`
1198
1199 EndTime string `json:"endTime,omitempty"`
1200
1201 PreviewMetadata *PreviewOperationMetadata `json:"previewMetadata,omitempty"`
1202
1203
1204
1205
1206 RequestedCancellation bool `json:"requestedCancellation,omitempty"`
1207
1208 StatusMessage string `json:"statusMessage,omitempty"`
1209
1210
1211 Target string `json:"target,omitempty"`
1212
1213 Verb string `json:"verb,omitempty"`
1214
1215
1216
1217
1218
1219 ForceSendFields []string `json:"-"`
1220
1221
1222
1223
1224 NullFields []string `json:"-"`
1225 }
1226
1227 func (s *OperationMetadata) MarshalJSON() ([]byte, error) {
1228 type NoMethod OperationMetadata
1229 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1230 }
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262 type Policy struct {
1263
1264 AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"`
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274 Bindings []*Binding `json:"bindings,omitempty"`
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286 Etag string `json:"etag,omitempty"`
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302 Version int64 `json:"version,omitempty"`
1303
1304
1305 googleapi.ServerResponse `json:"-"`
1306
1307
1308
1309
1310
1311 ForceSendFields []string `json:"-"`
1312
1313
1314
1315
1316 NullFields []string `json:"-"`
1317 }
1318
1319 func (s *Policy) MarshalJSON() ([]byte, error) {
1320 type NoMethod Policy
1321 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1322 }
1323
1324
1325
1326
1327 type Preview struct {
1328
1329
1330
1331
1332 Annotations map[string]string `json:"annotations,omitempty"`
1333
1334
1335
1336
1337
1338
1339
1340 ArtifactsGcsBucket string `json:"artifactsGcsBucket,omitempty"`
1341
1342 Build string `json:"build,omitempty"`
1343
1344 CreateTime string `json:"createTime,omitempty"`
1345
1346
1347
1348
1349 Deployment string `json:"deployment,omitempty"`
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366 ErrorCode string `json:"errorCode,omitempty"`
1367
1368
1369
1370 ErrorLogs string `json:"errorLogs,omitempty"`
1371
1372
1373 ErrorStatus *Status `json:"errorStatus,omitempty"`
1374
1375 Labels map[string]string `json:"labels,omitempty"`
1376
1377
1378 Logs string `json:"logs,omitempty"`
1379
1380
1381
1382 Name string `json:"name,omitempty"`
1383
1384 PreviewArtifacts *PreviewArtifacts `json:"previewArtifacts,omitempty"`
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394 PreviewMode string `json:"previewMode,omitempty"`
1395
1396
1397
1398 ServiceAccount string `json:"serviceAccount,omitempty"`
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412 State string `json:"state,omitempty"`
1413
1414 TerraformBlueprint *TerraformBlueprint `json:"terraformBlueprint,omitempty"`
1415
1416
1417
1418 TfErrors []*TerraformError `json:"tfErrors,omitempty"`
1419
1420
1421 TfVersion string `json:"tfVersion,omitempty"`
1422
1423
1424 TfVersionConstraint string `json:"tfVersionConstraint,omitempty"`
1425
1426
1427
1428
1429
1430
1431 WorkerPool string `json:"workerPool,omitempty"`
1432
1433
1434 googleapi.ServerResponse `json:"-"`
1435
1436
1437
1438
1439
1440 ForceSendFields []string `json:"-"`
1441
1442
1443
1444
1445 NullFields []string `json:"-"`
1446 }
1447
1448 func (s *Preview) MarshalJSON() ([]byte, error) {
1449 type NoMethod Preview
1450 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1451 }
1452
1453
1454 type PreviewArtifacts struct {
1455
1456
1457 Artifacts string `json:"artifacts,omitempty"`
1458
1459
1460 Content string `json:"content,omitempty"`
1461
1462
1463
1464
1465
1466 ForceSendFields []string `json:"-"`
1467
1468
1469
1470
1471 NullFields []string `json:"-"`
1472 }
1473
1474 func (s *PreviewArtifacts) MarshalJSON() ([]byte, error) {
1475 type NoMethod PreviewArtifacts
1476 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1477 }
1478
1479
1480
1481 type PreviewOperationMetadata struct {
1482
1483 Build string `json:"build,omitempty"`
1484
1485
1486 Logs string `json:"logs,omitempty"`
1487
1488 PreviewArtifacts *PreviewArtifacts `json:"previewArtifacts,omitempty"`
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505 Step string `json:"step,omitempty"`
1506
1507
1508
1509
1510
1511 ForceSendFields []string `json:"-"`
1512
1513
1514
1515
1516 NullFields []string `json:"-"`
1517 }
1518
1519 func (s *PreviewOperationMetadata) MarshalJSON() ([]byte, error) {
1520 type NoMethod PreviewOperationMetadata
1521 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1522 }
1523
1524
1525 type PreviewResult struct {
1526
1527 BinarySignedUri string `json:"binarySignedUri,omitempty"`
1528
1529 JsonSignedUri string `json:"jsonSignedUri,omitempty"`
1530
1531
1532
1533
1534
1535 ForceSendFields []string `json:"-"`
1536
1537
1538
1539
1540 NullFields []string `json:"-"`
1541 }
1542
1543 func (s *PreviewResult) MarshalJSON() ([]byte, error) {
1544 type NoMethod PreviewResult
1545 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1546 }
1547
1548
1549
1550 type Resource struct {
1551
1552
1553
1554 CaiAssets map[string]ResourceCAIInfo `json:"caiAssets,omitempty"`
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565 Intent string `json:"intent,omitempty"`
1566
1567
1568
1569 Name string `json:"name,omitempty"`
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579 State string `json:"state,omitempty"`
1580
1581
1582 TerraformInfo *ResourceTerraformInfo `json:"terraformInfo,omitempty"`
1583
1584
1585 googleapi.ServerResponse `json:"-"`
1586
1587
1588
1589
1590
1591 ForceSendFields []string `json:"-"`
1592
1593
1594
1595
1596 NullFields []string `json:"-"`
1597 }
1598
1599 func (s *Resource) MarshalJSON() ([]byte, error) {
1600 type NoMethod Resource
1601 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1602 }
1603
1604
1605 type ResourceCAIInfo struct {
1606
1607
1608 FullResourceName string `json:"fullResourceName,omitempty"`
1609
1610
1611
1612
1613
1614 ForceSendFields []string `json:"-"`
1615
1616
1617
1618
1619 NullFields []string `json:"-"`
1620 }
1621
1622 func (s *ResourceCAIInfo) MarshalJSON() ([]byte, error) {
1623 type NoMethod ResourceCAIInfo
1624 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1625 }
1626
1627
1628 type ResourceTerraformInfo struct {
1629
1630
1631 Address string `json:"address,omitempty"`
1632
1633 Id string `json:"id,omitempty"`
1634
1635 Type string `json:"type,omitempty"`
1636
1637
1638
1639
1640
1641 ForceSendFields []string `json:"-"`
1642
1643
1644
1645
1646 NullFields []string `json:"-"`
1647 }
1648
1649 func (s *ResourceTerraformInfo) MarshalJSON() ([]byte, error) {
1650 type NoMethod ResourceTerraformInfo
1651 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1652 }
1653
1654
1655
1656
1657 type Revision struct {
1658
1659
1660
1661
1662
1663
1664
1665
1666 Action string `json:"action,omitempty"`
1667
1668 ApplyResults *ApplyResults `json:"applyResults,omitempty"`
1669
1670 Build string `json:"build,omitempty"`
1671
1672 CreateTime string `json:"createTime,omitempty"`
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685 ErrorCode string `json:"errorCode,omitempty"`
1686
1687
1688 ErrorLogs string `json:"errorLogs,omitempty"`
1689
1690
1691
1692
1693
1694
1695 ImportExistingResources bool `json:"importExistingResources,omitempty"`
1696
1697
1698 Logs string `json:"logs,omitempty"`
1699
1700
1701
1702 Name string `json:"name,omitempty"`
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715 QuotaValidation string `json:"quotaValidation,omitempty"`
1716
1717
1718
1719
1720 QuotaValidationResults string `json:"quotaValidationResults,omitempty"`
1721
1722
1723
1724 ServiceAccount string `json:"serviceAccount,omitempty"`
1725
1726
1727
1728
1729
1730
1731
1732
1733 State string `json:"state,omitempty"`
1734
1735 StateDetail string `json:"stateDetail,omitempty"`
1736
1737
1738 TerraformBlueprint *TerraformBlueprint `json:"terraformBlueprint,omitempty"`
1739
1740
1741
1742 TfErrors []*TerraformError `json:"tfErrors,omitempty"`
1743
1744
1745 TfVersion string `json:"tfVersion,omitempty"`
1746
1747
1748 TfVersionConstraint string `json:"tfVersionConstraint,omitempty"`
1749
1750 UpdateTime string `json:"updateTime,omitempty"`
1751
1752
1753
1754
1755 WorkerPool string `json:"workerPool,omitempty"`
1756
1757
1758 googleapi.ServerResponse `json:"-"`
1759
1760
1761
1762
1763
1764 ForceSendFields []string `json:"-"`
1765
1766
1767
1768
1769 NullFields []string `json:"-"`
1770 }
1771
1772 func (s *Revision) MarshalJSON() ([]byte, error) {
1773 type NoMethod Revision
1774 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1775 }
1776
1777
1778 type SetIamPolicyRequest struct {
1779
1780
1781
1782
1783 Policy *Policy `json:"policy,omitempty"`
1784
1785
1786
1787 UpdateMask string `json:"updateMask,omitempty"`
1788
1789
1790
1791
1792
1793 ForceSendFields []string `json:"-"`
1794
1795
1796
1797
1798 NullFields []string `json:"-"`
1799 }
1800
1801 func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
1802 type NoMethod SetIamPolicyRequest
1803 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1804 }
1805
1806
1807 type Statefile struct {
1808
1809
1810 SignedUri string `json:"signedUri,omitempty"`
1811
1812
1813 googleapi.ServerResponse `json:"-"`
1814
1815
1816
1817
1818
1819 ForceSendFields []string `json:"-"`
1820
1821
1822
1823
1824 NullFields []string `json:"-"`
1825 }
1826
1827 func (s *Statefile) MarshalJSON() ([]byte, error) {
1828 type NoMethod Statefile
1829 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1830 }
1831
1832
1833
1834
1835
1836
1837
1838 type Status struct {
1839
1840 Code int64 `json:"code,omitempty"`
1841
1842
1843 Details []googleapi.RawMessage `json:"details,omitempty"`
1844
1845
1846
1847 Message string `json:"message,omitempty"`
1848
1849
1850
1851
1852
1853 ForceSendFields []string `json:"-"`
1854
1855
1856
1857
1858 NullFields []string `json:"-"`
1859 }
1860
1861 func (s *Status) MarshalJSON() ([]byte, error) {
1862 type NoMethod Status
1863 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1864 }
1865
1866
1867
1868 type TerraformBlueprint struct {
1869
1870
1871
1872 GcsSource string `json:"gcsSource,omitempty"`
1873
1874 GitSource *GitSource `json:"gitSource,omitempty"`
1875
1876 InputValues map[string]TerraformVariable `json:"inputValues,omitempty"`
1877
1878
1879
1880
1881
1882 ForceSendFields []string `json:"-"`
1883
1884
1885
1886
1887 NullFields []string `json:"-"`
1888 }
1889
1890 func (s *TerraformBlueprint) MarshalJSON() ([]byte, error) {
1891 type NoMethod TerraformBlueprint
1892 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1893 }
1894
1895
1896 type TerraformError struct {
1897
1898 Error *Status `json:"error,omitempty"`
1899
1900 ErrorDescription string `json:"errorDescription,omitempty"`
1901
1902
1903
1904 HttpResponseCode int64 `json:"httpResponseCode,omitempty"`
1905
1906
1907 ResourceAddress string `json:"resourceAddress,omitempty"`
1908
1909
1910
1911
1912
1913 ForceSendFields []string `json:"-"`
1914
1915
1916
1917
1918 NullFields []string `json:"-"`
1919 }
1920
1921 func (s *TerraformError) MarshalJSON() ([]byte, error) {
1922 type NoMethod TerraformError
1923 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1924 }
1925
1926
1927 type TerraformOutput struct {
1928
1929
1930 Sensitive bool `json:"sensitive,omitempty"`
1931
1932 Value interface{} `json:"value,omitempty"`
1933
1934
1935
1936
1937
1938 ForceSendFields []string `json:"-"`
1939
1940
1941
1942
1943 NullFields []string `json:"-"`
1944 }
1945
1946 func (s *TerraformOutput) MarshalJSON() ([]byte, error) {
1947 type NoMethod TerraformOutput
1948 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1949 }
1950
1951
1952 type TerraformVariable struct {
1953
1954 InputValue interface{} `json:"inputValue,omitempty"`
1955
1956
1957
1958
1959
1960 ForceSendFields []string `json:"-"`
1961
1962
1963
1964
1965 NullFields []string `json:"-"`
1966 }
1967
1968 func (s *TerraformVariable) MarshalJSON() ([]byte, error) {
1969 type NoMethod TerraformVariable
1970 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1971 }
1972
1973
1974
1975 type TerraformVersion struct {
1976
1977 DeprecateTime string `json:"deprecateTime,omitempty"`
1978
1979
1980
1981 Name string `json:"name,omitempty"`
1982
1983 ObsoleteTime string `json:"obsoleteTime,omitempty"`
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993 State string `json:"state,omitempty"`
1994
1995 SupportTime string `json:"supportTime,omitempty"`
1996
1997
1998 googleapi.ServerResponse `json:"-"`
1999
2000
2001
2002
2003
2004 ForceSendFields []string `json:"-"`
2005
2006
2007
2008
2009 NullFields []string `json:"-"`
2010 }
2011
2012 func (s *TerraformVersion) MarshalJSON() ([]byte, error) {
2013 type NoMethod TerraformVersion
2014 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2015 }
2016
2017
2018 type TestIamPermissionsRequest struct {
2019
2020
2021
2022
2023 Permissions []string `json:"permissions,omitempty"`
2024
2025
2026
2027
2028
2029 ForceSendFields []string `json:"-"`
2030
2031
2032
2033
2034 NullFields []string `json:"-"`
2035 }
2036
2037 func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
2038 type NoMethod TestIamPermissionsRequest
2039 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2040 }
2041
2042
2043
2044 type TestIamPermissionsResponse struct {
2045
2046
2047 Permissions []string `json:"permissions,omitempty"`
2048
2049
2050 googleapi.ServerResponse `json:"-"`
2051
2052
2053
2054
2055
2056 ForceSendFields []string `json:"-"`
2057
2058
2059
2060
2061 NullFields []string `json:"-"`
2062 }
2063
2064 func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
2065 type NoMethod TestIamPermissionsResponse
2066 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2067 }
2068
2069
2070
2071 type UnlockDeploymentRequest struct {
2072
2073 LockId int64 `json:"lockId,omitempty,string"`
2074
2075
2076
2077
2078
2079 ForceSendFields []string `json:"-"`
2080
2081
2082
2083
2084 NullFields []string `json:"-"`
2085 }
2086
2087 func (s *UnlockDeploymentRequest) MarshalJSON() ([]byte, error) {
2088 type NoMethod UnlockDeploymentRequest
2089 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2090 }
2091
2092 type ProjectsLocationsGetCall struct {
2093 s *Service
2094 name string
2095 urlParams_ gensupport.URLParams
2096 ifNoneMatch_ string
2097 ctx_ context.Context
2098 header_ http.Header
2099 }
2100
2101
2102
2103
2104 func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
2105 c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2106 c.name = name
2107 return c
2108 }
2109
2110
2111
2112
2113 func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
2114 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2115 return c
2116 }
2117
2118
2119
2120
2121 func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
2122 c.ifNoneMatch_ = entityTag
2123 return c
2124 }
2125
2126
2127 func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
2128 c.ctx_ = ctx
2129 return c
2130 }
2131
2132
2133
2134 func (c *ProjectsLocationsGetCall) Header() http.Header {
2135 if c.header_ == nil {
2136 c.header_ = make(http.Header)
2137 }
2138 return c.header_
2139 }
2140
2141 func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
2142 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2143 if c.ifNoneMatch_ != "" {
2144 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2145 }
2146 var body io.Reader = nil
2147 c.urlParams_.Set("alt", alt)
2148 c.urlParams_.Set("prettyPrint", "false")
2149 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
2150 urls += "?" + c.urlParams_.Encode()
2151 req, err := http.NewRequest("GET", urls, body)
2152 if err != nil {
2153 return nil, err
2154 }
2155 req.Header = reqHeaders
2156 googleapi.Expand(req.URL, map[string]string{
2157 "name": c.name,
2158 })
2159 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2160 }
2161
2162
2163
2164
2165
2166
2167 func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
2168 gensupport.SetOptions(c.urlParams_, opts...)
2169 res, err := c.doRequest("json")
2170 if res != nil && res.StatusCode == http.StatusNotModified {
2171 if res.Body != nil {
2172 res.Body.Close()
2173 }
2174 return nil, gensupport.WrapError(&googleapi.Error{
2175 Code: res.StatusCode,
2176 Header: res.Header,
2177 })
2178 }
2179 if err != nil {
2180 return nil, err
2181 }
2182 defer googleapi.CloseBody(res)
2183 if err := googleapi.CheckResponse(res); err != nil {
2184 return nil, gensupport.WrapError(err)
2185 }
2186 ret := &Location{
2187 ServerResponse: googleapi.ServerResponse{
2188 Header: res.Header,
2189 HTTPStatusCode: res.StatusCode,
2190 },
2191 }
2192 target := &ret
2193 if err := gensupport.DecodeResponse(target, res); err != nil {
2194 return nil, err
2195 }
2196 return ret, nil
2197 }
2198
2199 type ProjectsLocationsListCall struct {
2200 s *Service
2201 name string
2202 urlParams_ gensupport.URLParams
2203 ifNoneMatch_ string
2204 ctx_ context.Context
2205 header_ http.Header
2206 }
2207
2208
2209
2210
2211 func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
2212 c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2213 c.name = name
2214 return c
2215 }
2216
2217
2218
2219
2220
2221 func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
2222 c.urlParams_.Set("filter", filter)
2223 return c
2224 }
2225
2226
2227
2228 func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
2229 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
2230 return c
2231 }
2232
2233
2234
2235
2236 func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
2237 c.urlParams_.Set("pageToken", pageToken)
2238 return c
2239 }
2240
2241
2242
2243
2244 func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
2245 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2246 return c
2247 }
2248
2249
2250
2251
2252 func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
2253 c.ifNoneMatch_ = entityTag
2254 return c
2255 }
2256
2257
2258 func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
2259 c.ctx_ = ctx
2260 return c
2261 }
2262
2263
2264
2265 func (c *ProjectsLocationsListCall) Header() http.Header {
2266 if c.header_ == nil {
2267 c.header_ = make(http.Header)
2268 }
2269 return c.header_
2270 }
2271
2272 func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
2273 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2274 if c.ifNoneMatch_ != "" {
2275 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2276 }
2277 var body io.Reader = nil
2278 c.urlParams_.Set("alt", alt)
2279 c.urlParams_.Set("prettyPrint", "false")
2280 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations")
2281 urls += "?" + c.urlParams_.Encode()
2282 req, err := http.NewRequest("GET", urls, body)
2283 if err != nil {
2284 return nil, err
2285 }
2286 req.Header = reqHeaders
2287 googleapi.Expand(req.URL, map[string]string{
2288 "name": c.name,
2289 })
2290 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2291 }
2292
2293
2294
2295
2296
2297
2298
2299 func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
2300 gensupport.SetOptions(c.urlParams_, opts...)
2301 res, err := c.doRequest("json")
2302 if res != nil && res.StatusCode == http.StatusNotModified {
2303 if res.Body != nil {
2304 res.Body.Close()
2305 }
2306 return nil, gensupport.WrapError(&googleapi.Error{
2307 Code: res.StatusCode,
2308 Header: res.Header,
2309 })
2310 }
2311 if err != nil {
2312 return nil, err
2313 }
2314 defer googleapi.CloseBody(res)
2315 if err := googleapi.CheckResponse(res); err != nil {
2316 return nil, gensupport.WrapError(err)
2317 }
2318 ret := &ListLocationsResponse{
2319 ServerResponse: googleapi.ServerResponse{
2320 Header: res.Header,
2321 HTTPStatusCode: res.StatusCode,
2322 },
2323 }
2324 target := &ret
2325 if err := gensupport.DecodeResponse(target, res); err != nil {
2326 return nil, err
2327 }
2328 return ret, nil
2329 }
2330
2331
2332
2333
2334 func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
2335 c.ctx_ = ctx
2336 defer c.PageToken(c.urlParams_.Get("pageToken"))
2337 for {
2338 x, err := c.Do()
2339 if err != nil {
2340 return err
2341 }
2342 if err := f(x); err != nil {
2343 return err
2344 }
2345 if x.NextPageToken == "" {
2346 return nil
2347 }
2348 c.PageToken(x.NextPageToken)
2349 }
2350 }
2351
2352 type ProjectsLocationsDeploymentsCreateCall struct {
2353 s *Service
2354 parent string
2355 deployment *Deployment
2356 urlParams_ gensupport.URLParams
2357 ctx_ context.Context
2358 header_ http.Header
2359 }
2360
2361
2362
2363
2364
2365 func (r *ProjectsLocationsDeploymentsService) Create(parent string, deployment *Deployment) *ProjectsLocationsDeploymentsCreateCall {
2366 c := &ProjectsLocationsDeploymentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2367 c.parent = parent
2368 c.deployment = deployment
2369 return c
2370 }
2371
2372
2373
2374 func (c *ProjectsLocationsDeploymentsCreateCall) DeploymentId(deploymentId string) *ProjectsLocationsDeploymentsCreateCall {
2375 c.urlParams_.Set("deploymentId", deploymentId)
2376 return c
2377 }
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390 func (c *ProjectsLocationsDeploymentsCreateCall) RequestId(requestId string) *ProjectsLocationsDeploymentsCreateCall {
2391 c.urlParams_.Set("requestId", requestId)
2392 return c
2393 }
2394
2395
2396
2397
2398 func (c *ProjectsLocationsDeploymentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsCreateCall {
2399 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2400 return c
2401 }
2402
2403
2404 func (c *ProjectsLocationsDeploymentsCreateCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsCreateCall {
2405 c.ctx_ = ctx
2406 return c
2407 }
2408
2409
2410
2411 func (c *ProjectsLocationsDeploymentsCreateCall) Header() http.Header {
2412 if c.header_ == nil {
2413 c.header_ = make(http.Header)
2414 }
2415 return c.header_
2416 }
2417
2418 func (c *ProjectsLocationsDeploymentsCreateCall) doRequest(alt string) (*http.Response, error) {
2419 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2420 var body io.Reader = nil
2421 body, err := googleapi.WithoutDataWrapper.JSONReader(c.deployment)
2422 if err != nil {
2423 return nil, err
2424 }
2425 c.urlParams_.Set("alt", alt)
2426 c.urlParams_.Set("prettyPrint", "false")
2427 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/deployments")
2428 urls += "?" + c.urlParams_.Encode()
2429 req, err := http.NewRequest("POST", urls, body)
2430 if err != nil {
2431 return nil, err
2432 }
2433 req.Header = reqHeaders
2434 googleapi.Expand(req.URL, map[string]string{
2435 "parent": c.parent,
2436 })
2437 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2438 }
2439
2440
2441
2442
2443
2444
2445 func (c *ProjectsLocationsDeploymentsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
2446 gensupport.SetOptions(c.urlParams_, opts...)
2447 res, err := c.doRequest("json")
2448 if res != nil && res.StatusCode == http.StatusNotModified {
2449 if res.Body != nil {
2450 res.Body.Close()
2451 }
2452 return nil, gensupport.WrapError(&googleapi.Error{
2453 Code: res.StatusCode,
2454 Header: res.Header,
2455 })
2456 }
2457 if err != nil {
2458 return nil, err
2459 }
2460 defer googleapi.CloseBody(res)
2461 if err := googleapi.CheckResponse(res); err != nil {
2462 return nil, gensupport.WrapError(err)
2463 }
2464 ret := &Operation{
2465 ServerResponse: googleapi.ServerResponse{
2466 Header: res.Header,
2467 HTTPStatusCode: res.StatusCode,
2468 },
2469 }
2470 target := &ret
2471 if err := gensupport.DecodeResponse(target, res); err != nil {
2472 return nil, err
2473 }
2474 return ret, nil
2475 }
2476
2477 type ProjectsLocationsDeploymentsDeleteCall struct {
2478 s *Service
2479 name string
2480 urlParams_ gensupport.URLParams
2481 ctx_ context.Context
2482 header_ http.Header
2483 }
2484
2485
2486
2487
2488
2489 func (r *ProjectsLocationsDeploymentsService) Delete(name string) *ProjectsLocationsDeploymentsDeleteCall {
2490 c := &ProjectsLocationsDeploymentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2491 c.name = name
2492 return c
2493 }
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509 func (c *ProjectsLocationsDeploymentsDeleteCall) DeletePolicy(deletePolicy string) *ProjectsLocationsDeploymentsDeleteCall {
2510 c.urlParams_.Set("deletePolicy", deletePolicy)
2511 return c
2512 }
2513
2514
2515
2516
2517 func (c *ProjectsLocationsDeploymentsDeleteCall) Force(force bool) *ProjectsLocationsDeploymentsDeleteCall {
2518 c.urlParams_.Set("force", fmt.Sprint(force))
2519 return c
2520 }
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533 func (c *ProjectsLocationsDeploymentsDeleteCall) RequestId(requestId string) *ProjectsLocationsDeploymentsDeleteCall {
2534 c.urlParams_.Set("requestId", requestId)
2535 return c
2536 }
2537
2538
2539
2540
2541 func (c *ProjectsLocationsDeploymentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsDeleteCall {
2542 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2543 return c
2544 }
2545
2546
2547 func (c *ProjectsLocationsDeploymentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsDeleteCall {
2548 c.ctx_ = ctx
2549 return c
2550 }
2551
2552
2553
2554 func (c *ProjectsLocationsDeploymentsDeleteCall) Header() http.Header {
2555 if c.header_ == nil {
2556 c.header_ = make(http.Header)
2557 }
2558 return c.header_
2559 }
2560
2561 func (c *ProjectsLocationsDeploymentsDeleteCall) doRequest(alt string) (*http.Response, error) {
2562 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2563 var body io.Reader = nil
2564 c.urlParams_.Set("alt", alt)
2565 c.urlParams_.Set("prettyPrint", "false")
2566 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
2567 urls += "?" + c.urlParams_.Encode()
2568 req, err := http.NewRequest("DELETE", urls, body)
2569 if err != nil {
2570 return nil, err
2571 }
2572 req.Header = reqHeaders
2573 googleapi.Expand(req.URL, map[string]string{
2574 "name": c.name,
2575 })
2576 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2577 }
2578
2579
2580
2581
2582
2583
2584 func (c *ProjectsLocationsDeploymentsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
2585 gensupport.SetOptions(c.urlParams_, opts...)
2586 res, err := c.doRequest("json")
2587 if res != nil && res.StatusCode == http.StatusNotModified {
2588 if res.Body != nil {
2589 res.Body.Close()
2590 }
2591 return nil, gensupport.WrapError(&googleapi.Error{
2592 Code: res.StatusCode,
2593 Header: res.Header,
2594 })
2595 }
2596 if err != nil {
2597 return nil, err
2598 }
2599 defer googleapi.CloseBody(res)
2600 if err := googleapi.CheckResponse(res); err != nil {
2601 return nil, gensupport.WrapError(err)
2602 }
2603 ret := &Operation{
2604 ServerResponse: googleapi.ServerResponse{
2605 Header: res.Header,
2606 HTTPStatusCode: res.StatusCode,
2607 },
2608 }
2609 target := &ret
2610 if err := gensupport.DecodeResponse(target, res); err != nil {
2611 return nil, err
2612 }
2613 return ret, nil
2614 }
2615
2616 type ProjectsLocationsDeploymentsDeleteStateCall struct {
2617 s *Service
2618 name string
2619 deletestatefilerequest *DeleteStatefileRequest
2620 urlParams_ gensupport.URLParams
2621 ctx_ context.Context
2622 header_ http.Header
2623 }
2624
2625
2626
2627
2628
2629 func (r *ProjectsLocationsDeploymentsService) DeleteState(name string, deletestatefilerequest *DeleteStatefileRequest) *ProjectsLocationsDeploymentsDeleteStateCall {
2630 c := &ProjectsLocationsDeploymentsDeleteStateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2631 c.name = name
2632 c.deletestatefilerequest = deletestatefilerequest
2633 return c
2634 }
2635
2636
2637
2638
2639 func (c *ProjectsLocationsDeploymentsDeleteStateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsDeleteStateCall {
2640 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2641 return c
2642 }
2643
2644
2645 func (c *ProjectsLocationsDeploymentsDeleteStateCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsDeleteStateCall {
2646 c.ctx_ = ctx
2647 return c
2648 }
2649
2650
2651
2652 func (c *ProjectsLocationsDeploymentsDeleteStateCall) Header() http.Header {
2653 if c.header_ == nil {
2654 c.header_ = make(http.Header)
2655 }
2656 return c.header_
2657 }
2658
2659 func (c *ProjectsLocationsDeploymentsDeleteStateCall) doRequest(alt string) (*http.Response, error) {
2660 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2661 var body io.Reader = nil
2662 body, err := googleapi.WithoutDataWrapper.JSONReader(c.deletestatefilerequest)
2663 if err != nil {
2664 return nil, err
2665 }
2666 c.urlParams_.Set("alt", alt)
2667 c.urlParams_.Set("prettyPrint", "false")
2668 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:deleteState")
2669 urls += "?" + c.urlParams_.Encode()
2670 req, err := http.NewRequest("POST", urls, body)
2671 if err != nil {
2672 return nil, err
2673 }
2674 req.Header = reqHeaders
2675 googleapi.Expand(req.URL, map[string]string{
2676 "name": c.name,
2677 })
2678 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2679 }
2680
2681
2682
2683
2684
2685
2686 func (c *ProjectsLocationsDeploymentsDeleteStateCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
2687 gensupport.SetOptions(c.urlParams_, opts...)
2688 res, err := c.doRequest("json")
2689 if res != nil && res.StatusCode == http.StatusNotModified {
2690 if res.Body != nil {
2691 res.Body.Close()
2692 }
2693 return nil, gensupport.WrapError(&googleapi.Error{
2694 Code: res.StatusCode,
2695 Header: res.Header,
2696 })
2697 }
2698 if err != nil {
2699 return nil, err
2700 }
2701 defer googleapi.CloseBody(res)
2702 if err := googleapi.CheckResponse(res); err != nil {
2703 return nil, gensupport.WrapError(err)
2704 }
2705 ret := &Empty{
2706 ServerResponse: googleapi.ServerResponse{
2707 Header: res.Header,
2708 HTTPStatusCode: res.StatusCode,
2709 },
2710 }
2711 target := &ret
2712 if err := gensupport.DecodeResponse(target, res); err != nil {
2713 return nil, err
2714 }
2715 return ret, nil
2716 }
2717
2718 type ProjectsLocationsDeploymentsExportLockCall struct {
2719 s *Service
2720 name string
2721 urlParams_ gensupport.URLParams
2722 ifNoneMatch_ string
2723 ctx_ context.Context
2724 header_ http.Header
2725 }
2726
2727
2728
2729
2730
2731 func (r *ProjectsLocationsDeploymentsService) ExportLock(name string) *ProjectsLocationsDeploymentsExportLockCall {
2732 c := &ProjectsLocationsDeploymentsExportLockCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2733 c.name = name
2734 return c
2735 }
2736
2737
2738
2739
2740 func (c *ProjectsLocationsDeploymentsExportLockCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsExportLockCall {
2741 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2742 return c
2743 }
2744
2745
2746
2747
2748 func (c *ProjectsLocationsDeploymentsExportLockCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeploymentsExportLockCall {
2749 c.ifNoneMatch_ = entityTag
2750 return c
2751 }
2752
2753
2754 func (c *ProjectsLocationsDeploymentsExportLockCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsExportLockCall {
2755 c.ctx_ = ctx
2756 return c
2757 }
2758
2759
2760
2761 func (c *ProjectsLocationsDeploymentsExportLockCall) Header() http.Header {
2762 if c.header_ == nil {
2763 c.header_ = make(http.Header)
2764 }
2765 return c.header_
2766 }
2767
2768 func (c *ProjectsLocationsDeploymentsExportLockCall) doRequest(alt string) (*http.Response, error) {
2769 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2770 if c.ifNoneMatch_ != "" {
2771 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2772 }
2773 var body io.Reader = nil
2774 c.urlParams_.Set("alt", alt)
2775 c.urlParams_.Set("prettyPrint", "false")
2776 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:exportLock")
2777 urls += "?" + c.urlParams_.Encode()
2778 req, err := http.NewRequest("GET", urls, body)
2779 if err != nil {
2780 return nil, err
2781 }
2782 req.Header = reqHeaders
2783 googleapi.Expand(req.URL, map[string]string{
2784 "name": c.name,
2785 })
2786 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2787 }
2788
2789
2790
2791
2792
2793
2794 func (c *ProjectsLocationsDeploymentsExportLockCall) Do(opts ...googleapi.CallOption) (*LockInfo, error) {
2795 gensupport.SetOptions(c.urlParams_, opts...)
2796 res, err := c.doRequest("json")
2797 if res != nil && res.StatusCode == http.StatusNotModified {
2798 if res.Body != nil {
2799 res.Body.Close()
2800 }
2801 return nil, gensupport.WrapError(&googleapi.Error{
2802 Code: res.StatusCode,
2803 Header: res.Header,
2804 })
2805 }
2806 if err != nil {
2807 return nil, err
2808 }
2809 defer googleapi.CloseBody(res)
2810 if err := googleapi.CheckResponse(res); err != nil {
2811 return nil, gensupport.WrapError(err)
2812 }
2813 ret := &LockInfo{
2814 ServerResponse: googleapi.ServerResponse{
2815 Header: res.Header,
2816 HTTPStatusCode: res.StatusCode,
2817 },
2818 }
2819 target := &ret
2820 if err := gensupport.DecodeResponse(target, res); err != nil {
2821 return nil, err
2822 }
2823 return ret, nil
2824 }
2825
2826 type ProjectsLocationsDeploymentsExportStateCall struct {
2827 s *Service
2828 parent string
2829 exportdeploymentstatefilerequest *ExportDeploymentStatefileRequest
2830 urlParams_ gensupport.URLParams
2831 ctx_ context.Context
2832 header_ http.Header
2833 }
2834
2835
2836
2837
2838
2839
2840 func (r *ProjectsLocationsDeploymentsService) ExportState(parent string, exportdeploymentstatefilerequest *ExportDeploymentStatefileRequest) *ProjectsLocationsDeploymentsExportStateCall {
2841 c := &ProjectsLocationsDeploymentsExportStateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2842 c.parent = parent
2843 c.exportdeploymentstatefilerequest = exportdeploymentstatefilerequest
2844 return c
2845 }
2846
2847
2848
2849
2850 func (c *ProjectsLocationsDeploymentsExportStateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsExportStateCall {
2851 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2852 return c
2853 }
2854
2855
2856 func (c *ProjectsLocationsDeploymentsExportStateCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsExportStateCall {
2857 c.ctx_ = ctx
2858 return c
2859 }
2860
2861
2862
2863 func (c *ProjectsLocationsDeploymentsExportStateCall) Header() http.Header {
2864 if c.header_ == nil {
2865 c.header_ = make(http.Header)
2866 }
2867 return c.header_
2868 }
2869
2870 func (c *ProjectsLocationsDeploymentsExportStateCall) doRequest(alt string) (*http.Response, error) {
2871 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2872 var body io.Reader = nil
2873 body, err := googleapi.WithoutDataWrapper.JSONReader(c.exportdeploymentstatefilerequest)
2874 if err != nil {
2875 return nil, err
2876 }
2877 c.urlParams_.Set("alt", alt)
2878 c.urlParams_.Set("prettyPrint", "false")
2879 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:exportState")
2880 urls += "?" + c.urlParams_.Encode()
2881 req, err := http.NewRequest("POST", urls, body)
2882 if err != nil {
2883 return nil, err
2884 }
2885 req.Header = reqHeaders
2886 googleapi.Expand(req.URL, map[string]string{
2887 "parent": c.parent,
2888 })
2889 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2890 }
2891
2892
2893
2894
2895
2896
2897 func (c *ProjectsLocationsDeploymentsExportStateCall) Do(opts ...googleapi.CallOption) (*Statefile, error) {
2898 gensupport.SetOptions(c.urlParams_, opts...)
2899 res, err := c.doRequest("json")
2900 if res != nil && res.StatusCode == http.StatusNotModified {
2901 if res.Body != nil {
2902 res.Body.Close()
2903 }
2904 return nil, gensupport.WrapError(&googleapi.Error{
2905 Code: res.StatusCode,
2906 Header: res.Header,
2907 })
2908 }
2909 if err != nil {
2910 return nil, err
2911 }
2912 defer googleapi.CloseBody(res)
2913 if err := googleapi.CheckResponse(res); err != nil {
2914 return nil, gensupport.WrapError(err)
2915 }
2916 ret := &Statefile{
2917 ServerResponse: googleapi.ServerResponse{
2918 Header: res.Header,
2919 HTTPStatusCode: res.StatusCode,
2920 },
2921 }
2922 target := &ret
2923 if err := gensupport.DecodeResponse(target, res); err != nil {
2924 return nil, err
2925 }
2926 return ret, nil
2927 }
2928
2929 type ProjectsLocationsDeploymentsGetCall struct {
2930 s *Service
2931 name string
2932 urlParams_ gensupport.URLParams
2933 ifNoneMatch_ string
2934 ctx_ context.Context
2935 header_ http.Header
2936 }
2937
2938
2939
2940
2941
2942 func (r *ProjectsLocationsDeploymentsService) Get(name string) *ProjectsLocationsDeploymentsGetCall {
2943 c := &ProjectsLocationsDeploymentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2944 c.name = name
2945 return c
2946 }
2947
2948
2949
2950
2951 func (c *ProjectsLocationsDeploymentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsGetCall {
2952 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2953 return c
2954 }
2955
2956
2957
2958
2959 func (c *ProjectsLocationsDeploymentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeploymentsGetCall {
2960 c.ifNoneMatch_ = entityTag
2961 return c
2962 }
2963
2964
2965 func (c *ProjectsLocationsDeploymentsGetCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsGetCall {
2966 c.ctx_ = ctx
2967 return c
2968 }
2969
2970
2971
2972 func (c *ProjectsLocationsDeploymentsGetCall) Header() http.Header {
2973 if c.header_ == nil {
2974 c.header_ = make(http.Header)
2975 }
2976 return c.header_
2977 }
2978
2979 func (c *ProjectsLocationsDeploymentsGetCall) doRequest(alt string) (*http.Response, error) {
2980 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2981 if c.ifNoneMatch_ != "" {
2982 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2983 }
2984 var body io.Reader = nil
2985 c.urlParams_.Set("alt", alt)
2986 c.urlParams_.Set("prettyPrint", "false")
2987 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
2988 urls += "?" + c.urlParams_.Encode()
2989 req, err := http.NewRequest("GET", urls, body)
2990 if err != nil {
2991 return nil, err
2992 }
2993 req.Header = reqHeaders
2994 googleapi.Expand(req.URL, map[string]string{
2995 "name": c.name,
2996 })
2997 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2998 }
2999
3000
3001
3002
3003
3004
3005 func (c *ProjectsLocationsDeploymentsGetCall) Do(opts ...googleapi.CallOption) (*Deployment, error) {
3006 gensupport.SetOptions(c.urlParams_, opts...)
3007 res, err := c.doRequest("json")
3008 if res != nil && res.StatusCode == http.StatusNotModified {
3009 if res.Body != nil {
3010 res.Body.Close()
3011 }
3012 return nil, gensupport.WrapError(&googleapi.Error{
3013 Code: res.StatusCode,
3014 Header: res.Header,
3015 })
3016 }
3017 if err != nil {
3018 return nil, err
3019 }
3020 defer googleapi.CloseBody(res)
3021 if err := googleapi.CheckResponse(res); err != nil {
3022 return nil, gensupport.WrapError(err)
3023 }
3024 ret := &Deployment{
3025 ServerResponse: googleapi.ServerResponse{
3026 Header: res.Header,
3027 HTTPStatusCode: res.StatusCode,
3028 },
3029 }
3030 target := &ret
3031 if err := gensupport.DecodeResponse(target, res); err != nil {
3032 return nil, err
3033 }
3034 return ret, nil
3035 }
3036
3037 type ProjectsLocationsDeploymentsGetIamPolicyCall struct {
3038 s *Service
3039 resource string
3040 urlParams_ gensupport.URLParams
3041 ifNoneMatch_ string
3042 ctx_ context.Context
3043 header_ http.Header
3044 }
3045
3046
3047
3048
3049
3050
3051
3052 func (r *ProjectsLocationsDeploymentsService) GetIamPolicy(resource string) *ProjectsLocationsDeploymentsGetIamPolicyCall {
3053 c := &ProjectsLocationsDeploymentsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3054 c.resource = resource
3055 return c
3056 }
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070 func (c *ProjectsLocationsDeploymentsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsDeploymentsGetIamPolicyCall {
3071 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
3072 return c
3073 }
3074
3075
3076
3077
3078 func (c *ProjectsLocationsDeploymentsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsGetIamPolicyCall {
3079 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3080 return c
3081 }
3082
3083
3084
3085
3086 func (c *ProjectsLocationsDeploymentsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeploymentsGetIamPolicyCall {
3087 c.ifNoneMatch_ = entityTag
3088 return c
3089 }
3090
3091
3092 func (c *ProjectsLocationsDeploymentsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsGetIamPolicyCall {
3093 c.ctx_ = ctx
3094 return c
3095 }
3096
3097
3098
3099 func (c *ProjectsLocationsDeploymentsGetIamPolicyCall) Header() http.Header {
3100 if c.header_ == nil {
3101 c.header_ = make(http.Header)
3102 }
3103 return c.header_
3104 }
3105
3106 func (c *ProjectsLocationsDeploymentsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
3107 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3108 if c.ifNoneMatch_ != "" {
3109 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3110 }
3111 var body io.Reader = nil
3112 c.urlParams_.Set("alt", alt)
3113 c.urlParams_.Set("prettyPrint", "false")
3114 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
3115 urls += "?" + c.urlParams_.Encode()
3116 req, err := http.NewRequest("GET", urls, body)
3117 if err != nil {
3118 return nil, err
3119 }
3120 req.Header = reqHeaders
3121 googleapi.Expand(req.URL, map[string]string{
3122 "resource": c.resource,
3123 })
3124 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3125 }
3126
3127
3128
3129
3130
3131
3132 func (c *ProjectsLocationsDeploymentsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
3133 gensupport.SetOptions(c.urlParams_, opts...)
3134 res, err := c.doRequest("json")
3135 if res != nil && res.StatusCode == http.StatusNotModified {
3136 if res.Body != nil {
3137 res.Body.Close()
3138 }
3139 return nil, gensupport.WrapError(&googleapi.Error{
3140 Code: res.StatusCode,
3141 Header: res.Header,
3142 })
3143 }
3144 if err != nil {
3145 return nil, err
3146 }
3147 defer googleapi.CloseBody(res)
3148 if err := googleapi.CheckResponse(res); err != nil {
3149 return nil, gensupport.WrapError(err)
3150 }
3151 ret := &Policy{
3152 ServerResponse: googleapi.ServerResponse{
3153 Header: res.Header,
3154 HTTPStatusCode: res.StatusCode,
3155 },
3156 }
3157 target := &ret
3158 if err := gensupport.DecodeResponse(target, res); err != nil {
3159 return nil, err
3160 }
3161 return ret, nil
3162 }
3163
3164 type ProjectsLocationsDeploymentsImportStateCall struct {
3165 s *Service
3166 parent string
3167 importstatefilerequest *ImportStatefileRequest
3168 urlParams_ gensupport.URLParams
3169 ctx_ context.Context
3170 header_ http.Header
3171 }
3172
3173
3174
3175
3176
3177
3178
3179 func (r *ProjectsLocationsDeploymentsService) ImportState(parent string, importstatefilerequest *ImportStatefileRequest) *ProjectsLocationsDeploymentsImportStateCall {
3180 c := &ProjectsLocationsDeploymentsImportStateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3181 c.parent = parent
3182 c.importstatefilerequest = importstatefilerequest
3183 return c
3184 }
3185
3186
3187
3188
3189 func (c *ProjectsLocationsDeploymentsImportStateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsImportStateCall {
3190 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3191 return c
3192 }
3193
3194
3195 func (c *ProjectsLocationsDeploymentsImportStateCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsImportStateCall {
3196 c.ctx_ = ctx
3197 return c
3198 }
3199
3200
3201
3202 func (c *ProjectsLocationsDeploymentsImportStateCall) Header() http.Header {
3203 if c.header_ == nil {
3204 c.header_ = make(http.Header)
3205 }
3206 return c.header_
3207 }
3208
3209 func (c *ProjectsLocationsDeploymentsImportStateCall) doRequest(alt string) (*http.Response, error) {
3210 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3211 var body io.Reader = nil
3212 body, err := googleapi.WithoutDataWrapper.JSONReader(c.importstatefilerequest)
3213 if err != nil {
3214 return nil, err
3215 }
3216 c.urlParams_.Set("alt", alt)
3217 c.urlParams_.Set("prettyPrint", "false")
3218 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:importState")
3219 urls += "?" + c.urlParams_.Encode()
3220 req, err := http.NewRequest("POST", urls, body)
3221 if err != nil {
3222 return nil, err
3223 }
3224 req.Header = reqHeaders
3225 googleapi.Expand(req.URL, map[string]string{
3226 "parent": c.parent,
3227 })
3228 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3229 }
3230
3231
3232
3233
3234
3235
3236 func (c *ProjectsLocationsDeploymentsImportStateCall) Do(opts ...googleapi.CallOption) (*Statefile, error) {
3237 gensupport.SetOptions(c.urlParams_, opts...)
3238 res, err := c.doRequest("json")
3239 if res != nil && res.StatusCode == http.StatusNotModified {
3240 if res.Body != nil {
3241 res.Body.Close()
3242 }
3243 return nil, gensupport.WrapError(&googleapi.Error{
3244 Code: res.StatusCode,
3245 Header: res.Header,
3246 })
3247 }
3248 if err != nil {
3249 return nil, err
3250 }
3251 defer googleapi.CloseBody(res)
3252 if err := googleapi.CheckResponse(res); err != nil {
3253 return nil, gensupport.WrapError(err)
3254 }
3255 ret := &Statefile{
3256 ServerResponse: googleapi.ServerResponse{
3257 Header: res.Header,
3258 HTTPStatusCode: res.StatusCode,
3259 },
3260 }
3261 target := &ret
3262 if err := gensupport.DecodeResponse(target, res); err != nil {
3263 return nil, err
3264 }
3265 return ret, nil
3266 }
3267
3268 type ProjectsLocationsDeploymentsListCall struct {
3269 s *Service
3270 parent string
3271 urlParams_ gensupport.URLParams
3272 ifNoneMatch_ string
3273 ctx_ context.Context
3274 header_ http.Header
3275 }
3276
3277
3278
3279
3280
3281 func (r *ProjectsLocationsDeploymentsService) List(parent string) *ProjectsLocationsDeploymentsListCall {
3282 c := &ProjectsLocationsDeploymentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3283 c.parent = parent
3284 return c
3285 }
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298 func (c *ProjectsLocationsDeploymentsListCall) Filter(filter string) *ProjectsLocationsDeploymentsListCall {
3299 c.urlParams_.Set("filter", filter)
3300 return c
3301 }
3302
3303
3304
3305 func (c *ProjectsLocationsDeploymentsListCall) OrderBy(orderBy string) *ProjectsLocationsDeploymentsListCall {
3306 c.urlParams_.Set("orderBy", orderBy)
3307 return c
3308 }
3309
3310
3311
3312
3313 func (c *ProjectsLocationsDeploymentsListCall) PageSize(pageSize int64) *ProjectsLocationsDeploymentsListCall {
3314 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3315 return c
3316 }
3317
3318
3319
3320
3321 func (c *ProjectsLocationsDeploymentsListCall) PageToken(pageToken string) *ProjectsLocationsDeploymentsListCall {
3322 c.urlParams_.Set("pageToken", pageToken)
3323 return c
3324 }
3325
3326
3327
3328
3329 func (c *ProjectsLocationsDeploymentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsListCall {
3330 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3331 return c
3332 }
3333
3334
3335
3336
3337 func (c *ProjectsLocationsDeploymentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeploymentsListCall {
3338 c.ifNoneMatch_ = entityTag
3339 return c
3340 }
3341
3342
3343 func (c *ProjectsLocationsDeploymentsListCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsListCall {
3344 c.ctx_ = ctx
3345 return c
3346 }
3347
3348
3349
3350 func (c *ProjectsLocationsDeploymentsListCall) Header() http.Header {
3351 if c.header_ == nil {
3352 c.header_ = make(http.Header)
3353 }
3354 return c.header_
3355 }
3356
3357 func (c *ProjectsLocationsDeploymentsListCall) doRequest(alt string) (*http.Response, error) {
3358 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3359 if c.ifNoneMatch_ != "" {
3360 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3361 }
3362 var body io.Reader = nil
3363 c.urlParams_.Set("alt", alt)
3364 c.urlParams_.Set("prettyPrint", "false")
3365 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/deployments")
3366 urls += "?" + c.urlParams_.Encode()
3367 req, err := http.NewRequest("GET", urls, body)
3368 if err != nil {
3369 return nil, err
3370 }
3371 req.Header = reqHeaders
3372 googleapi.Expand(req.URL, map[string]string{
3373 "parent": c.parent,
3374 })
3375 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3376 }
3377
3378
3379
3380
3381
3382
3383
3384 func (c *ProjectsLocationsDeploymentsListCall) Do(opts ...googleapi.CallOption) (*ListDeploymentsResponse, error) {
3385 gensupport.SetOptions(c.urlParams_, opts...)
3386 res, err := c.doRequest("json")
3387 if res != nil && res.StatusCode == http.StatusNotModified {
3388 if res.Body != nil {
3389 res.Body.Close()
3390 }
3391 return nil, gensupport.WrapError(&googleapi.Error{
3392 Code: res.StatusCode,
3393 Header: res.Header,
3394 })
3395 }
3396 if err != nil {
3397 return nil, err
3398 }
3399 defer googleapi.CloseBody(res)
3400 if err := googleapi.CheckResponse(res); err != nil {
3401 return nil, gensupport.WrapError(err)
3402 }
3403 ret := &ListDeploymentsResponse{
3404 ServerResponse: googleapi.ServerResponse{
3405 Header: res.Header,
3406 HTTPStatusCode: res.StatusCode,
3407 },
3408 }
3409 target := &ret
3410 if err := gensupport.DecodeResponse(target, res); err != nil {
3411 return nil, err
3412 }
3413 return ret, nil
3414 }
3415
3416
3417
3418
3419 func (c *ProjectsLocationsDeploymentsListCall) Pages(ctx context.Context, f func(*ListDeploymentsResponse) error) error {
3420 c.ctx_ = ctx
3421 defer c.PageToken(c.urlParams_.Get("pageToken"))
3422 for {
3423 x, err := c.Do()
3424 if err != nil {
3425 return err
3426 }
3427 if err := f(x); err != nil {
3428 return err
3429 }
3430 if x.NextPageToken == "" {
3431 return nil
3432 }
3433 c.PageToken(x.NextPageToken)
3434 }
3435 }
3436
3437 type ProjectsLocationsDeploymentsLockCall struct {
3438 s *Service
3439 name string
3440 lockdeploymentrequest *LockDeploymentRequest
3441 urlParams_ gensupport.URLParams
3442 ctx_ context.Context
3443 header_ http.Header
3444 }
3445
3446
3447
3448
3449
3450 func (r *ProjectsLocationsDeploymentsService) Lock(name string, lockdeploymentrequest *LockDeploymentRequest) *ProjectsLocationsDeploymentsLockCall {
3451 c := &ProjectsLocationsDeploymentsLockCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3452 c.name = name
3453 c.lockdeploymentrequest = lockdeploymentrequest
3454 return c
3455 }
3456
3457
3458
3459
3460 func (c *ProjectsLocationsDeploymentsLockCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsLockCall {
3461 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3462 return c
3463 }
3464
3465
3466 func (c *ProjectsLocationsDeploymentsLockCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsLockCall {
3467 c.ctx_ = ctx
3468 return c
3469 }
3470
3471
3472
3473 func (c *ProjectsLocationsDeploymentsLockCall) Header() http.Header {
3474 if c.header_ == nil {
3475 c.header_ = make(http.Header)
3476 }
3477 return c.header_
3478 }
3479
3480 func (c *ProjectsLocationsDeploymentsLockCall) doRequest(alt string) (*http.Response, error) {
3481 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3482 var body io.Reader = nil
3483 body, err := googleapi.WithoutDataWrapper.JSONReader(c.lockdeploymentrequest)
3484 if err != nil {
3485 return nil, err
3486 }
3487 c.urlParams_.Set("alt", alt)
3488 c.urlParams_.Set("prettyPrint", "false")
3489 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:lock")
3490 urls += "?" + c.urlParams_.Encode()
3491 req, err := http.NewRequest("POST", urls, body)
3492 if err != nil {
3493 return nil, err
3494 }
3495 req.Header = reqHeaders
3496 googleapi.Expand(req.URL, map[string]string{
3497 "name": c.name,
3498 })
3499 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3500 }
3501
3502
3503
3504
3505
3506
3507 func (c *ProjectsLocationsDeploymentsLockCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3508 gensupport.SetOptions(c.urlParams_, opts...)
3509 res, err := c.doRequest("json")
3510 if res != nil && res.StatusCode == http.StatusNotModified {
3511 if res.Body != nil {
3512 res.Body.Close()
3513 }
3514 return nil, gensupport.WrapError(&googleapi.Error{
3515 Code: res.StatusCode,
3516 Header: res.Header,
3517 })
3518 }
3519 if err != nil {
3520 return nil, err
3521 }
3522 defer googleapi.CloseBody(res)
3523 if err := googleapi.CheckResponse(res); err != nil {
3524 return nil, gensupport.WrapError(err)
3525 }
3526 ret := &Operation{
3527 ServerResponse: googleapi.ServerResponse{
3528 Header: res.Header,
3529 HTTPStatusCode: res.StatusCode,
3530 },
3531 }
3532 target := &ret
3533 if err := gensupport.DecodeResponse(target, res); err != nil {
3534 return nil, err
3535 }
3536 return ret, nil
3537 }
3538
3539 type ProjectsLocationsDeploymentsPatchCall struct {
3540 s *Service
3541 name string
3542 deployment *Deployment
3543 urlParams_ gensupport.URLParams
3544 ctx_ context.Context
3545 header_ http.Header
3546 }
3547
3548
3549
3550
3551
3552 func (r *ProjectsLocationsDeploymentsService) Patch(name string, deployment *Deployment) *ProjectsLocationsDeploymentsPatchCall {
3553 c := &ProjectsLocationsDeploymentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3554 c.name = name
3555 c.deployment = deployment
3556 return c
3557 }
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570 func (c *ProjectsLocationsDeploymentsPatchCall) RequestId(requestId string) *ProjectsLocationsDeploymentsPatchCall {
3571 c.urlParams_.Set("requestId", requestId)
3572 return c
3573 }
3574
3575
3576
3577
3578
3579
3580
3581 func (c *ProjectsLocationsDeploymentsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDeploymentsPatchCall {
3582 c.urlParams_.Set("updateMask", updateMask)
3583 return c
3584 }
3585
3586
3587
3588
3589 func (c *ProjectsLocationsDeploymentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsPatchCall {
3590 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3591 return c
3592 }
3593
3594
3595 func (c *ProjectsLocationsDeploymentsPatchCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsPatchCall {
3596 c.ctx_ = ctx
3597 return c
3598 }
3599
3600
3601
3602 func (c *ProjectsLocationsDeploymentsPatchCall) Header() http.Header {
3603 if c.header_ == nil {
3604 c.header_ = make(http.Header)
3605 }
3606 return c.header_
3607 }
3608
3609 func (c *ProjectsLocationsDeploymentsPatchCall) doRequest(alt string) (*http.Response, error) {
3610 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3611 var body io.Reader = nil
3612 body, err := googleapi.WithoutDataWrapper.JSONReader(c.deployment)
3613 if err != nil {
3614 return nil, err
3615 }
3616 c.urlParams_.Set("alt", alt)
3617 c.urlParams_.Set("prettyPrint", "false")
3618 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
3619 urls += "?" + c.urlParams_.Encode()
3620 req, err := http.NewRequest("PATCH", urls, body)
3621 if err != nil {
3622 return nil, err
3623 }
3624 req.Header = reqHeaders
3625 googleapi.Expand(req.URL, map[string]string{
3626 "name": c.name,
3627 })
3628 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3629 }
3630
3631
3632
3633
3634
3635
3636 func (c *ProjectsLocationsDeploymentsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3637 gensupport.SetOptions(c.urlParams_, opts...)
3638 res, err := c.doRequest("json")
3639 if res != nil && res.StatusCode == http.StatusNotModified {
3640 if res.Body != nil {
3641 res.Body.Close()
3642 }
3643 return nil, gensupport.WrapError(&googleapi.Error{
3644 Code: res.StatusCode,
3645 Header: res.Header,
3646 })
3647 }
3648 if err != nil {
3649 return nil, err
3650 }
3651 defer googleapi.CloseBody(res)
3652 if err := googleapi.CheckResponse(res); err != nil {
3653 return nil, gensupport.WrapError(err)
3654 }
3655 ret := &Operation{
3656 ServerResponse: googleapi.ServerResponse{
3657 Header: res.Header,
3658 HTTPStatusCode: res.StatusCode,
3659 },
3660 }
3661 target := &ret
3662 if err := gensupport.DecodeResponse(target, res); err != nil {
3663 return nil, err
3664 }
3665 return ret, nil
3666 }
3667
3668 type ProjectsLocationsDeploymentsSetIamPolicyCall struct {
3669 s *Service
3670 resource string
3671 setiampolicyrequest *SetIamPolicyRequest
3672 urlParams_ gensupport.URLParams
3673 ctx_ context.Context
3674 header_ http.Header
3675 }
3676
3677
3678
3679
3680
3681
3682
3683
3684 func (r *ProjectsLocationsDeploymentsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsDeploymentsSetIamPolicyCall {
3685 c := &ProjectsLocationsDeploymentsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3686 c.resource = resource
3687 c.setiampolicyrequest = setiampolicyrequest
3688 return c
3689 }
3690
3691
3692
3693
3694 func (c *ProjectsLocationsDeploymentsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsSetIamPolicyCall {
3695 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3696 return c
3697 }
3698
3699
3700 func (c *ProjectsLocationsDeploymentsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsSetIamPolicyCall {
3701 c.ctx_ = ctx
3702 return c
3703 }
3704
3705
3706
3707 func (c *ProjectsLocationsDeploymentsSetIamPolicyCall) Header() http.Header {
3708 if c.header_ == nil {
3709 c.header_ = make(http.Header)
3710 }
3711 return c.header_
3712 }
3713
3714 func (c *ProjectsLocationsDeploymentsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
3715 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3716 var body io.Reader = nil
3717 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
3718 if err != nil {
3719 return nil, err
3720 }
3721 c.urlParams_.Set("alt", alt)
3722 c.urlParams_.Set("prettyPrint", "false")
3723 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
3724 urls += "?" + c.urlParams_.Encode()
3725 req, err := http.NewRequest("POST", urls, body)
3726 if err != nil {
3727 return nil, err
3728 }
3729 req.Header = reqHeaders
3730 googleapi.Expand(req.URL, map[string]string{
3731 "resource": c.resource,
3732 })
3733 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3734 }
3735
3736
3737
3738
3739
3740
3741 func (c *ProjectsLocationsDeploymentsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
3742 gensupport.SetOptions(c.urlParams_, opts...)
3743 res, err := c.doRequest("json")
3744 if res != nil && res.StatusCode == http.StatusNotModified {
3745 if res.Body != nil {
3746 res.Body.Close()
3747 }
3748 return nil, gensupport.WrapError(&googleapi.Error{
3749 Code: res.StatusCode,
3750 Header: res.Header,
3751 })
3752 }
3753 if err != nil {
3754 return nil, err
3755 }
3756 defer googleapi.CloseBody(res)
3757 if err := googleapi.CheckResponse(res); err != nil {
3758 return nil, gensupport.WrapError(err)
3759 }
3760 ret := &Policy{
3761 ServerResponse: googleapi.ServerResponse{
3762 Header: res.Header,
3763 HTTPStatusCode: res.StatusCode,
3764 },
3765 }
3766 target := &ret
3767 if err := gensupport.DecodeResponse(target, res); err != nil {
3768 return nil, err
3769 }
3770 return ret, nil
3771 }
3772
3773 type ProjectsLocationsDeploymentsTestIamPermissionsCall struct {
3774 s *Service
3775 resource string
3776 testiampermissionsrequest *TestIamPermissionsRequest
3777 urlParams_ gensupport.URLParams
3778 ctx_ context.Context
3779 header_ http.Header
3780 }
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792 func (r *ProjectsLocationsDeploymentsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsDeploymentsTestIamPermissionsCall {
3793 c := &ProjectsLocationsDeploymentsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3794 c.resource = resource
3795 c.testiampermissionsrequest = testiampermissionsrequest
3796 return c
3797 }
3798
3799
3800
3801
3802 func (c *ProjectsLocationsDeploymentsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsTestIamPermissionsCall {
3803 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3804 return c
3805 }
3806
3807
3808 func (c *ProjectsLocationsDeploymentsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsTestIamPermissionsCall {
3809 c.ctx_ = ctx
3810 return c
3811 }
3812
3813
3814
3815 func (c *ProjectsLocationsDeploymentsTestIamPermissionsCall) Header() http.Header {
3816 if c.header_ == nil {
3817 c.header_ = make(http.Header)
3818 }
3819 return c.header_
3820 }
3821
3822 func (c *ProjectsLocationsDeploymentsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
3823 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3824 var body io.Reader = nil
3825 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
3826 if err != nil {
3827 return nil, err
3828 }
3829 c.urlParams_.Set("alt", alt)
3830 c.urlParams_.Set("prettyPrint", "false")
3831 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
3832 urls += "?" + c.urlParams_.Encode()
3833 req, err := http.NewRequest("POST", urls, body)
3834 if err != nil {
3835 return nil, err
3836 }
3837 req.Header = reqHeaders
3838 googleapi.Expand(req.URL, map[string]string{
3839 "resource": c.resource,
3840 })
3841 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3842 }
3843
3844
3845
3846
3847
3848
3849
3850 func (c *ProjectsLocationsDeploymentsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
3851 gensupport.SetOptions(c.urlParams_, opts...)
3852 res, err := c.doRequest("json")
3853 if res != nil && res.StatusCode == http.StatusNotModified {
3854 if res.Body != nil {
3855 res.Body.Close()
3856 }
3857 return nil, gensupport.WrapError(&googleapi.Error{
3858 Code: res.StatusCode,
3859 Header: res.Header,
3860 })
3861 }
3862 if err != nil {
3863 return nil, err
3864 }
3865 defer googleapi.CloseBody(res)
3866 if err := googleapi.CheckResponse(res); err != nil {
3867 return nil, gensupport.WrapError(err)
3868 }
3869 ret := &TestIamPermissionsResponse{
3870 ServerResponse: googleapi.ServerResponse{
3871 Header: res.Header,
3872 HTTPStatusCode: res.StatusCode,
3873 },
3874 }
3875 target := &ret
3876 if err := gensupport.DecodeResponse(target, res); err != nil {
3877 return nil, err
3878 }
3879 return ret, nil
3880 }
3881
3882 type ProjectsLocationsDeploymentsUnlockCall struct {
3883 s *Service
3884 name string
3885 unlockdeploymentrequest *UnlockDeploymentRequest
3886 urlParams_ gensupport.URLParams
3887 ctx_ context.Context
3888 header_ http.Header
3889 }
3890
3891
3892
3893
3894
3895 func (r *ProjectsLocationsDeploymentsService) Unlock(name string, unlockdeploymentrequest *UnlockDeploymentRequest) *ProjectsLocationsDeploymentsUnlockCall {
3896 c := &ProjectsLocationsDeploymentsUnlockCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3897 c.name = name
3898 c.unlockdeploymentrequest = unlockdeploymentrequest
3899 return c
3900 }
3901
3902
3903
3904
3905 func (c *ProjectsLocationsDeploymentsUnlockCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsUnlockCall {
3906 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3907 return c
3908 }
3909
3910
3911 func (c *ProjectsLocationsDeploymentsUnlockCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsUnlockCall {
3912 c.ctx_ = ctx
3913 return c
3914 }
3915
3916
3917
3918 func (c *ProjectsLocationsDeploymentsUnlockCall) Header() http.Header {
3919 if c.header_ == nil {
3920 c.header_ = make(http.Header)
3921 }
3922 return c.header_
3923 }
3924
3925 func (c *ProjectsLocationsDeploymentsUnlockCall) doRequest(alt string) (*http.Response, error) {
3926 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3927 var body io.Reader = nil
3928 body, err := googleapi.WithoutDataWrapper.JSONReader(c.unlockdeploymentrequest)
3929 if err != nil {
3930 return nil, err
3931 }
3932 c.urlParams_.Set("alt", alt)
3933 c.urlParams_.Set("prettyPrint", "false")
3934 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:unlock")
3935 urls += "?" + c.urlParams_.Encode()
3936 req, err := http.NewRequest("POST", urls, body)
3937 if err != nil {
3938 return nil, err
3939 }
3940 req.Header = reqHeaders
3941 googleapi.Expand(req.URL, map[string]string{
3942 "name": c.name,
3943 })
3944 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3945 }
3946
3947
3948
3949
3950
3951
3952 func (c *ProjectsLocationsDeploymentsUnlockCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3953 gensupport.SetOptions(c.urlParams_, opts...)
3954 res, err := c.doRequest("json")
3955 if res != nil && res.StatusCode == http.StatusNotModified {
3956 if res.Body != nil {
3957 res.Body.Close()
3958 }
3959 return nil, gensupport.WrapError(&googleapi.Error{
3960 Code: res.StatusCode,
3961 Header: res.Header,
3962 })
3963 }
3964 if err != nil {
3965 return nil, err
3966 }
3967 defer googleapi.CloseBody(res)
3968 if err := googleapi.CheckResponse(res); err != nil {
3969 return nil, gensupport.WrapError(err)
3970 }
3971 ret := &Operation{
3972 ServerResponse: googleapi.ServerResponse{
3973 Header: res.Header,
3974 HTTPStatusCode: res.StatusCode,
3975 },
3976 }
3977 target := &ret
3978 if err := gensupport.DecodeResponse(target, res); err != nil {
3979 return nil, err
3980 }
3981 return ret, nil
3982 }
3983
3984 type ProjectsLocationsDeploymentsRevisionsExportStateCall struct {
3985 s *Service
3986 parent string
3987 exportrevisionstatefilerequest *ExportRevisionStatefileRequest
3988 urlParams_ gensupport.URLParams
3989 ctx_ context.Context
3990 header_ http.Header
3991 }
3992
3993
3994
3995
3996
3997
3998
3999 func (r *ProjectsLocationsDeploymentsRevisionsService) ExportState(parent string, exportrevisionstatefilerequest *ExportRevisionStatefileRequest) *ProjectsLocationsDeploymentsRevisionsExportStateCall {
4000 c := &ProjectsLocationsDeploymentsRevisionsExportStateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4001 c.parent = parent
4002 c.exportrevisionstatefilerequest = exportrevisionstatefilerequest
4003 return c
4004 }
4005
4006
4007
4008
4009 func (c *ProjectsLocationsDeploymentsRevisionsExportStateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsRevisionsExportStateCall {
4010 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4011 return c
4012 }
4013
4014
4015 func (c *ProjectsLocationsDeploymentsRevisionsExportStateCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsRevisionsExportStateCall {
4016 c.ctx_ = ctx
4017 return c
4018 }
4019
4020
4021
4022 func (c *ProjectsLocationsDeploymentsRevisionsExportStateCall) Header() http.Header {
4023 if c.header_ == nil {
4024 c.header_ = make(http.Header)
4025 }
4026 return c.header_
4027 }
4028
4029 func (c *ProjectsLocationsDeploymentsRevisionsExportStateCall) doRequest(alt string) (*http.Response, error) {
4030 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4031 var body io.Reader = nil
4032 body, err := googleapi.WithoutDataWrapper.JSONReader(c.exportrevisionstatefilerequest)
4033 if err != nil {
4034 return nil, err
4035 }
4036 c.urlParams_.Set("alt", alt)
4037 c.urlParams_.Set("prettyPrint", "false")
4038 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:exportState")
4039 urls += "?" + c.urlParams_.Encode()
4040 req, err := http.NewRequest("POST", urls, body)
4041 if err != nil {
4042 return nil, err
4043 }
4044 req.Header = reqHeaders
4045 googleapi.Expand(req.URL, map[string]string{
4046 "parent": c.parent,
4047 })
4048 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4049 }
4050
4051
4052
4053
4054
4055
4056 func (c *ProjectsLocationsDeploymentsRevisionsExportStateCall) Do(opts ...googleapi.CallOption) (*Statefile, error) {
4057 gensupport.SetOptions(c.urlParams_, opts...)
4058 res, err := c.doRequest("json")
4059 if res != nil && res.StatusCode == http.StatusNotModified {
4060 if res.Body != nil {
4061 res.Body.Close()
4062 }
4063 return nil, gensupport.WrapError(&googleapi.Error{
4064 Code: res.StatusCode,
4065 Header: res.Header,
4066 })
4067 }
4068 if err != nil {
4069 return nil, err
4070 }
4071 defer googleapi.CloseBody(res)
4072 if err := googleapi.CheckResponse(res); err != nil {
4073 return nil, gensupport.WrapError(err)
4074 }
4075 ret := &Statefile{
4076 ServerResponse: googleapi.ServerResponse{
4077 Header: res.Header,
4078 HTTPStatusCode: res.StatusCode,
4079 },
4080 }
4081 target := &ret
4082 if err := gensupport.DecodeResponse(target, res); err != nil {
4083 return nil, err
4084 }
4085 return ret, nil
4086 }
4087
4088 type ProjectsLocationsDeploymentsRevisionsGetCall struct {
4089 s *Service
4090 name string
4091 urlParams_ gensupport.URLParams
4092 ifNoneMatch_ string
4093 ctx_ context.Context
4094 header_ http.Header
4095 }
4096
4097
4098
4099
4100
4101
4102 func (r *ProjectsLocationsDeploymentsRevisionsService) Get(name string) *ProjectsLocationsDeploymentsRevisionsGetCall {
4103 c := &ProjectsLocationsDeploymentsRevisionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4104 c.name = name
4105 return c
4106 }
4107
4108
4109
4110
4111 func (c *ProjectsLocationsDeploymentsRevisionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsRevisionsGetCall {
4112 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4113 return c
4114 }
4115
4116
4117
4118
4119 func (c *ProjectsLocationsDeploymentsRevisionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeploymentsRevisionsGetCall {
4120 c.ifNoneMatch_ = entityTag
4121 return c
4122 }
4123
4124
4125 func (c *ProjectsLocationsDeploymentsRevisionsGetCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsRevisionsGetCall {
4126 c.ctx_ = ctx
4127 return c
4128 }
4129
4130
4131
4132 func (c *ProjectsLocationsDeploymentsRevisionsGetCall) Header() http.Header {
4133 if c.header_ == nil {
4134 c.header_ = make(http.Header)
4135 }
4136 return c.header_
4137 }
4138
4139 func (c *ProjectsLocationsDeploymentsRevisionsGetCall) doRequest(alt string) (*http.Response, error) {
4140 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4141 if c.ifNoneMatch_ != "" {
4142 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4143 }
4144 var body io.Reader = nil
4145 c.urlParams_.Set("alt", alt)
4146 c.urlParams_.Set("prettyPrint", "false")
4147 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4148 urls += "?" + c.urlParams_.Encode()
4149 req, err := http.NewRequest("GET", urls, body)
4150 if err != nil {
4151 return nil, err
4152 }
4153 req.Header = reqHeaders
4154 googleapi.Expand(req.URL, map[string]string{
4155 "name": c.name,
4156 })
4157 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4158 }
4159
4160
4161
4162
4163
4164
4165 func (c *ProjectsLocationsDeploymentsRevisionsGetCall) Do(opts ...googleapi.CallOption) (*Revision, error) {
4166 gensupport.SetOptions(c.urlParams_, opts...)
4167 res, err := c.doRequest("json")
4168 if res != nil && res.StatusCode == http.StatusNotModified {
4169 if res.Body != nil {
4170 res.Body.Close()
4171 }
4172 return nil, gensupport.WrapError(&googleapi.Error{
4173 Code: res.StatusCode,
4174 Header: res.Header,
4175 })
4176 }
4177 if err != nil {
4178 return nil, err
4179 }
4180 defer googleapi.CloseBody(res)
4181 if err := googleapi.CheckResponse(res); err != nil {
4182 return nil, gensupport.WrapError(err)
4183 }
4184 ret := &Revision{
4185 ServerResponse: googleapi.ServerResponse{
4186 Header: res.Header,
4187 HTTPStatusCode: res.StatusCode,
4188 },
4189 }
4190 target := &ret
4191 if err := gensupport.DecodeResponse(target, res); err != nil {
4192 return nil, err
4193 }
4194 return ret, nil
4195 }
4196
4197 type ProjectsLocationsDeploymentsRevisionsListCall struct {
4198 s *Service
4199 parent string
4200 urlParams_ gensupport.URLParams
4201 ifNoneMatch_ string
4202 ctx_ context.Context
4203 header_ http.Header
4204 }
4205
4206
4207
4208
4209
4210
4211 func (r *ProjectsLocationsDeploymentsRevisionsService) List(parent string) *ProjectsLocationsDeploymentsRevisionsListCall {
4212 c := &ProjectsLocationsDeploymentsRevisionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4213 c.parent = parent
4214 return c
4215 }
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228 func (c *ProjectsLocationsDeploymentsRevisionsListCall) Filter(filter string) *ProjectsLocationsDeploymentsRevisionsListCall {
4229 c.urlParams_.Set("filter", filter)
4230 return c
4231 }
4232
4233
4234
4235 func (c *ProjectsLocationsDeploymentsRevisionsListCall) OrderBy(orderBy string) *ProjectsLocationsDeploymentsRevisionsListCall {
4236 c.urlParams_.Set("orderBy", orderBy)
4237 return c
4238 }
4239
4240
4241
4242
4243 func (c *ProjectsLocationsDeploymentsRevisionsListCall) PageSize(pageSize int64) *ProjectsLocationsDeploymentsRevisionsListCall {
4244 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4245 return c
4246 }
4247
4248
4249
4250
4251 func (c *ProjectsLocationsDeploymentsRevisionsListCall) PageToken(pageToken string) *ProjectsLocationsDeploymentsRevisionsListCall {
4252 c.urlParams_.Set("pageToken", pageToken)
4253 return c
4254 }
4255
4256
4257
4258
4259 func (c *ProjectsLocationsDeploymentsRevisionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsRevisionsListCall {
4260 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4261 return c
4262 }
4263
4264
4265
4266
4267 func (c *ProjectsLocationsDeploymentsRevisionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeploymentsRevisionsListCall {
4268 c.ifNoneMatch_ = entityTag
4269 return c
4270 }
4271
4272
4273 func (c *ProjectsLocationsDeploymentsRevisionsListCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsRevisionsListCall {
4274 c.ctx_ = ctx
4275 return c
4276 }
4277
4278
4279
4280 func (c *ProjectsLocationsDeploymentsRevisionsListCall) Header() http.Header {
4281 if c.header_ == nil {
4282 c.header_ = make(http.Header)
4283 }
4284 return c.header_
4285 }
4286
4287 func (c *ProjectsLocationsDeploymentsRevisionsListCall) doRequest(alt string) (*http.Response, error) {
4288 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4289 if c.ifNoneMatch_ != "" {
4290 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4291 }
4292 var body io.Reader = nil
4293 c.urlParams_.Set("alt", alt)
4294 c.urlParams_.Set("prettyPrint", "false")
4295 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/revisions")
4296 urls += "?" + c.urlParams_.Encode()
4297 req, err := http.NewRequest("GET", urls, body)
4298 if err != nil {
4299 return nil, err
4300 }
4301 req.Header = reqHeaders
4302 googleapi.Expand(req.URL, map[string]string{
4303 "parent": c.parent,
4304 })
4305 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4306 }
4307
4308
4309
4310
4311
4312
4313
4314 func (c *ProjectsLocationsDeploymentsRevisionsListCall) Do(opts ...googleapi.CallOption) (*ListRevisionsResponse, error) {
4315 gensupport.SetOptions(c.urlParams_, opts...)
4316 res, err := c.doRequest("json")
4317 if res != nil && res.StatusCode == http.StatusNotModified {
4318 if res.Body != nil {
4319 res.Body.Close()
4320 }
4321 return nil, gensupport.WrapError(&googleapi.Error{
4322 Code: res.StatusCode,
4323 Header: res.Header,
4324 })
4325 }
4326 if err != nil {
4327 return nil, err
4328 }
4329 defer googleapi.CloseBody(res)
4330 if err := googleapi.CheckResponse(res); err != nil {
4331 return nil, gensupport.WrapError(err)
4332 }
4333 ret := &ListRevisionsResponse{
4334 ServerResponse: googleapi.ServerResponse{
4335 Header: res.Header,
4336 HTTPStatusCode: res.StatusCode,
4337 },
4338 }
4339 target := &ret
4340 if err := gensupport.DecodeResponse(target, res); err != nil {
4341 return nil, err
4342 }
4343 return ret, nil
4344 }
4345
4346
4347
4348
4349 func (c *ProjectsLocationsDeploymentsRevisionsListCall) Pages(ctx context.Context, f func(*ListRevisionsResponse) error) error {
4350 c.ctx_ = ctx
4351 defer c.PageToken(c.urlParams_.Get("pageToken"))
4352 for {
4353 x, err := c.Do()
4354 if err != nil {
4355 return err
4356 }
4357 if err := f(x); err != nil {
4358 return err
4359 }
4360 if x.NextPageToken == "" {
4361 return nil
4362 }
4363 c.PageToken(x.NextPageToken)
4364 }
4365 }
4366
4367 type ProjectsLocationsDeploymentsRevisionsResourcesGetCall struct {
4368 s *Service
4369 name string
4370 urlParams_ gensupport.URLParams
4371 ifNoneMatch_ string
4372 ctx_ context.Context
4373 header_ http.Header
4374 }
4375
4376
4377
4378
4379
4380
4381 func (r *ProjectsLocationsDeploymentsRevisionsResourcesService) Get(name string) *ProjectsLocationsDeploymentsRevisionsResourcesGetCall {
4382 c := &ProjectsLocationsDeploymentsRevisionsResourcesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4383 c.name = name
4384 return c
4385 }
4386
4387
4388
4389
4390 func (c *ProjectsLocationsDeploymentsRevisionsResourcesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsRevisionsResourcesGetCall {
4391 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4392 return c
4393 }
4394
4395
4396
4397
4398 func (c *ProjectsLocationsDeploymentsRevisionsResourcesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeploymentsRevisionsResourcesGetCall {
4399 c.ifNoneMatch_ = entityTag
4400 return c
4401 }
4402
4403
4404 func (c *ProjectsLocationsDeploymentsRevisionsResourcesGetCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsRevisionsResourcesGetCall {
4405 c.ctx_ = ctx
4406 return c
4407 }
4408
4409
4410
4411 func (c *ProjectsLocationsDeploymentsRevisionsResourcesGetCall) Header() http.Header {
4412 if c.header_ == nil {
4413 c.header_ = make(http.Header)
4414 }
4415 return c.header_
4416 }
4417
4418 func (c *ProjectsLocationsDeploymentsRevisionsResourcesGetCall) doRequest(alt string) (*http.Response, error) {
4419 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4420 if c.ifNoneMatch_ != "" {
4421 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4422 }
4423 var body io.Reader = nil
4424 c.urlParams_.Set("alt", alt)
4425 c.urlParams_.Set("prettyPrint", "false")
4426 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4427 urls += "?" + c.urlParams_.Encode()
4428 req, err := http.NewRequest("GET", urls, body)
4429 if err != nil {
4430 return nil, err
4431 }
4432 req.Header = reqHeaders
4433 googleapi.Expand(req.URL, map[string]string{
4434 "name": c.name,
4435 })
4436 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4437 }
4438
4439
4440
4441
4442
4443
4444 func (c *ProjectsLocationsDeploymentsRevisionsResourcesGetCall) Do(opts ...googleapi.CallOption) (*Resource, error) {
4445 gensupport.SetOptions(c.urlParams_, opts...)
4446 res, err := c.doRequest("json")
4447 if res != nil && res.StatusCode == http.StatusNotModified {
4448 if res.Body != nil {
4449 res.Body.Close()
4450 }
4451 return nil, gensupport.WrapError(&googleapi.Error{
4452 Code: res.StatusCode,
4453 Header: res.Header,
4454 })
4455 }
4456 if err != nil {
4457 return nil, err
4458 }
4459 defer googleapi.CloseBody(res)
4460 if err := googleapi.CheckResponse(res); err != nil {
4461 return nil, gensupport.WrapError(err)
4462 }
4463 ret := &Resource{
4464 ServerResponse: googleapi.ServerResponse{
4465 Header: res.Header,
4466 HTTPStatusCode: res.StatusCode,
4467 },
4468 }
4469 target := &ret
4470 if err := gensupport.DecodeResponse(target, res); err != nil {
4471 return nil, err
4472 }
4473 return ret, nil
4474 }
4475
4476 type ProjectsLocationsDeploymentsRevisionsResourcesListCall struct {
4477 s *Service
4478 parent string
4479 urlParams_ gensupport.URLParams
4480 ifNoneMatch_ string
4481 ctx_ context.Context
4482 header_ http.Header
4483 }
4484
4485
4486
4487
4488
4489
4490
4491 func (r *ProjectsLocationsDeploymentsRevisionsResourcesService) List(parent string) *ProjectsLocationsDeploymentsRevisionsResourcesListCall {
4492 c := &ProjectsLocationsDeploymentsRevisionsResourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4493 c.parent = parent
4494 return c
4495 }
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507 func (c *ProjectsLocationsDeploymentsRevisionsResourcesListCall) Filter(filter string) *ProjectsLocationsDeploymentsRevisionsResourcesListCall {
4508 c.urlParams_.Set("filter", filter)
4509 return c
4510 }
4511
4512
4513
4514 func (c *ProjectsLocationsDeploymentsRevisionsResourcesListCall) OrderBy(orderBy string) *ProjectsLocationsDeploymentsRevisionsResourcesListCall {
4515 c.urlParams_.Set("orderBy", orderBy)
4516 return c
4517 }
4518
4519
4520
4521
4522 func (c *ProjectsLocationsDeploymentsRevisionsResourcesListCall) PageSize(pageSize int64) *ProjectsLocationsDeploymentsRevisionsResourcesListCall {
4523 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4524 return c
4525 }
4526
4527
4528
4529
4530 func (c *ProjectsLocationsDeploymentsRevisionsResourcesListCall) PageToken(pageToken string) *ProjectsLocationsDeploymentsRevisionsResourcesListCall {
4531 c.urlParams_.Set("pageToken", pageToken)
4532 return c
4533 }
4534
4535
4536
4537
4538 func (c *ProjectsLocationsDeploymentsRevisionsResourcesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentsRevisionsResourcesListCall {
4539 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4540 return c
4541 }
4542
4543
4544
4545
4546 func (c *ProjectsLocationsDeploymentsRevisionsResourcesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeploymentsRevisionsResourcesListCall {
4547 c.ifNoneMatch_ = entityTag
4548 return c
4549 }
4550
4551
4552 func (c *ProjectsLocationsDeploymentsRevisionsResourcesListCall) Context(ctx context.Context) *ProjectsLocationsDeploymentsRevisionsResourcesListCall {
4553 c.ctx_ = ctx
4554 return c
4555 }
4556
4557
4558
4559 func (c *ProjectsLocationsDeploymentsRevisionsResourcesListCall) Header() http.Header {
4560 if c.header_ == nil {
4561 c.header_ = make(http.Header)
4562 }
4563 return c.header_
4564 }
4565
4566 func (c *ProjectsLocationsDeploymentsRevisionsResourcesListCall) doRequest(alt string) (*http.Response, error) {
4567 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4568 if c.ifNoneMatch_ != "" {
4569 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4570 }
4571 var body io.Reader = nil
4572 c.urlParams_.Set("alt", alt)
4573 c.urlParams_.Set("prettyPrint", "false")
4574 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/resources")
4575 urls += "?" + c.urlParams_.Encode()
4576 req, err := http.NewRequest("GET", urls, body)
4577 if err != nil {
4578 return nil, err
4579 }
4580 req.Header = reqHeaders
4581 googleapi.Expand(req.URL, map[string]string{
4582 "parent": c.parent,
4583 })
4584 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4585 }
4586
4587
4588
4589
4590
4591
4592
4593 func (c *ProjectsLocationsDeploymentsRevisionsResourcesListCall) Do(opts ...googleapi.CallOption) (*ListResourcesResponse, error) {
4594 gensupport.SetOptions(c.urlParams_, opts...)
4595 res, err := c.doRequest("json")
4596 if res != nil && res.StatusCode == http.StatusNotModified {
4597 if res.Body != nil {
4598 res.Body.Close()
4599 }
4600 return nil, gensupport.WrapError(&googleapi.Error{
4601 Code: res.StatusCode,
4602 Header: res.Header,
4603 })
4604 }
4605 if err != nil {
4606 return nil, err
4607 }
4608 defer googleapi.CloseBody(res)
4609 if err := googleapi.CheckResponse(res); err != nil {
4610 return nil, gensupport.WrapError(err)
4611 }
4612 ret := &ListResourcesResponse{
4613 ServerResponse: googleapi.ServerResponse{
4614 Header: res.Header,
4615 HTTPStatusCode: res.StatusCode,
4616 },
4617 }
4618 target := &ret
4619 if err := gensupport.DecodeResponse(target, res); err != nil {
4620 return nil, err
4621 }
4622 return ret, nil
4623 }
4624
4625
4626
4627
4628 func (c *ProjectsLocationsDeploymentsRevisionsResourcesListCall) Pages(ctx context.Context, f func(*ListResourcesResponse) error) error {
4629 c.ctx_ = ctx
4630 defer c.PageToken(c.urlParams_.Get("pageToken"))
4631 for {
4632 x, err := c.Do()
4633 if err != nil {
4634 return err
4635 }
4636 if err := f(x); err != nil {
4637 return err
4638 }
4639 if x.NextPageToken == "" {
4640 return nil
4641 }
4642 c.PageToken(x.NextPageToken)
4643 }
4644 }
4645
4646 type ProjectsLocationsOperationsCancelCall struct {
4647 s *Service
4648 name string
4649 canceloperationrequest *CancelOperationRequest
4650 urlParams_ gensupport.URLParams
4651 ctx_ context.Context
4652 header_ http.Header
4653 }
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666 func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall {
4667 c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4668 c.name = name
4669 c.canceloperationrequest = canceloperationrequest
4670 return c
4671 }
4672
4673
4674
4675
4676 func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
4677 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4678 return c
4679 }
4680
4681
4682 func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
4683 c.ctx_ = ctx
4684 return c
4685 }
4686
4687
4688
4689 func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
4690 if c.header_ == nil {
4691 c.header_ = make(http.Header)
4692 }
4693 return c.header_
4694 }
4695
4696 func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
4697 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4698 var body io.Reader = nil
4699 body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
4700 if err != nil {
4701 return nil, err
4702 }
4703 c.urlParams_.Set("alt", alt)
4704 c.urlParams_.Set("prettyPrint", "false")
4705 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
4706 urls += "?" + c.urlParams_.Encode()
4707 req, err := http.NewRequest("POST", urls, body)
4708 if err != nil {
4709 return nil, err
4710 }
4711 req.Header = reqHeaders
4712 googleapi.Expand(req.URL, map[string]string{
4713 "name": c.name,
4714 })
4715 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4716 }
4717
4718
4719
4720
4721
4722
4723 func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
4724 gensupport.SetOptions(c.urlParams_, opts...)
4725 res, err := c.doRequest("json")
4726 if res != nil && res.StatusCode == http.StatusNotModified {
4727 if res.Body != nil {
4728 res.Body.Close()
4729 }
4730 return nil, gensupport.WrapError(&googleapi.Error{
4731 Code: res.StatusCode,
4732 Header: res.Header,
4733 })
4734 }
4735 if err != nil {
4736 return nil, err
4737 }
4738 defer googleapi.CloseBody(res)
4739 if err := googleapi.CheckResponse(res); err != nil {
4740 return nil, gensupport.WrapError(err)
4741 }
4742 ret := &Empty{
4743 ServerResponse: googleapi.ServerResponse{
4744 Header: res.Header,
4745 HTTPStatusCode: res.StatusCode,
4746 },
4747 }
4748 target := &ret
4749 if err := gensupport.DecodeResponse(target, res); err != nil {
4750 return nil, err
4751 }
4752 return ret, nil
4753 }
4754
4755 type ProjectsLocationsOperationsDeleteCall struct {
4756 s *Service
4757 name string
4758 urlParams_ gensupport.URLParams
4759 ctx_ context.Context
4760 header_ http.Header
4761 }
4762
4763
4764
4765
4766
4767
4768
4769 func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall {
4770 c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4771 c.name = name
4772 return c
4773 }
4774
4775
4776
4777
4778 func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall {
4779 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4780 return c
4781 }
4782
4783
4784 func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall {
4785 c.ctx_ = ctx
4786 return c
4787 }
4788
4789
4790
4791 func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header {
4792 if c.header_ == nil {
4793 c.header_ = make(http.Header)
4794 }
4795 return c.header_
4796 }
4797
4798 func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
4799 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4800 var body io.Reader = nil
4801 c.urlParams_.Set("alt", alt)
4802 c.urlParams_.Set("prettyPrint", "false")
4803 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4804 urls += "?" + c.urlParams_.Encode()
4805 req, err := http.NewRequest("DELETE", urls, body)
4806 if err != nil {
4807 return nil, err
4808 }
4809 req.Header = reqHeaders
4810 googleapi.Expand(req.URL, map[string]string{
4811 "name": c.name,
4812 })
4813 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4814 }
4815
4816
4817
4818
4819
4820
4821 func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
4822 gensupport.SetOptions(c.urlParams_, opts...)
4823 res, err := c.doRequest("json")
4824 if res != nil && res.StatusCode == http.StatusNotModified {
4825 if res.Body != nil {
4826 res.Body.Close()
4827 }
4828 return nil, gensupport.WrapError(&googleapi.Error{
4829 Code: res.StatusCode,
4830 Header: res.Header,
4831 })
4832 }
4833 if err != nil {
4834 return nil, err
4835 }
4836 defer googleapi.CloseBody(res)
4837 if err := googleapi.CheckResponse(res); err != nil {
4838 return nil, gensupport.WrapError(err)
4839 }
4840 ret := &Empty{
4841 ServerResponse: googleapi.ServerResponse{
4842 Header: res.Header,
4843 HTTPStatusCode: res.StatusCode,
4844 },
4845 }
4846 target := &ret
4847 if err := gensupport.DecodeResponse(target, res); err != nil {
4848 return nil, err
4849 }
4850 return ret, nil
4851 }
4852
4853 type ProjectsLocationsOperationsGetCall struct {
4854 s *Service
4855 name string
4856 urlParams_ gensupport.URLParams
4857 ifNoneMatch_ string
4858 ctx_ context.Context
4859 header_ http.Header
4860 }
4861
4862
4863
4864
4865
4866
4867 func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
4868 c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4869 c.name = name
4870 return c
4871 }
4872
4873
4874
4875
4876 func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
4877 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4878 return c
4879 }
4880
4881
4882
4883
4884 func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
4885 c.ifNoneMatch_ = entityTag
4886 return c
4887 }
4888
4889
4890 func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
4891 c.ctx_ = ctx
4892 return c
4893 }
4894
4895
4896
4897 func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
4898 if c.header_ == nil {
4899 c.header_ = make(http.Header)
4900 }
4901 return c.header_
4902 }
4903
4904 func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
4905 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4906 if c.ifNoneMatch_ != "" {
4907 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4908 }
4909 var body io.Reader = nil
4910 c.urlParams_.Set("alt", alt)
4911 c.urlParams_.Set("prettyPrint", "false")
4912 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4913 urls += "?" + c.urlParams_.Encode()
4914 req, err := http.NewRequest("GET", urls, body)
4915 if err != nil {
4916 return nil, err
4917 }
4918 req.Header = reqHeaders
4919 googleapi.Expand(req.URL, map[string]string{
4920 "name": c.name,
4921 })
4922 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4923 }
4924
4925
4926
4927
4928
4929
4930 func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4931 gensupport.SetOptions(c.urlParams_, opts...)
4932 res, err := c.doRequest("json")
4933 if res != nil && res.StatusCode == http.StatusNotModified {
4934 if res.Body != nil {
4935 res.Body.Close()
4936 }
4937 return nil, gensupport.WrapError(&googleapi.Error{
4938 Code: res.StatusCode,
4939 Header: res.Header,
4940 })
4941 }
4942 if err != nil {
4943 return nil, err
4944 }
4945 defer googleapi.CloseBody(res)
4946 if err := googleapi.CheckResponse(res); err != nil {
4947 return nil, gensupport.WrapError(err)
4948 }
4949 ret := &Operation{
4950 ServerResponse: googleapi.ServerResponse{
4951 Header: res.Header,
4952 HTTPStatusCode: res.StatusCode,
4953 },
4954 }
4955 target := &ret
4956 if err := gensupport.DecodeResponse(target, res); err != nil {
4957 return nil, err
4958 }
4959 return ret, nil
4960 }
4961
4962 type ProjectsLocationsOperationsListCall struct {
4963 s *Service
4964 name string
4965 urlParams_ gensupport.URLParams
4966 ifNoneMatch_ string
4967 ctx_ context.Context
4968 header_ http.Header
4969 }
4970
4971
4972
4973
4974
4975 func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
4976 c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4977 c.name = name
4978 return c
4979 }
4980
4981
4982 func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
4983 c.urlParams_.Set("filter", filter)
4984 return c
4985 }
4986
4987
4988
4989 func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
4990 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4991 return c
4992 }
4993
4994
4995
4996 func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
4997 c.urlParams_.Set("pageToken", pageToken)
4998 return c
4999 }
5000
5001
5002
5003
5004 func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
5005 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5006 return c
5007 }
5008
5009
5010
5011
5012 func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
5013 c.ifNoneMatch_ = entityTag
5014 return c
5015 }
5016
5017
5018 func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
5019 c.ctx_ = ctx
5020 return c
5021 }
5022
5023
5024
5025 func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
5026 if c.header_ == nil {
5027 c.header_ = make(http.Header)
5028 }
5029 return c.header_
5030 }
5031
5032 func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
5033 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5034 if c.ifNoneMatch_ != "" {
5035 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5036 }
5037 var body io.Reader = nil
5038 c.urlParams_.Set("alt", alt)
5039 c.urlParams_.Set("prettyPrint", "false")
5040 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations")
5041 urls += "?" + c.urlParams_.Encode()
5042 req, err := http.NewRequest("GET", urls, body)
5043 if err != nil {
5044 return nil, err
5045 }
5046 req.Header = reqHeaders
5047 googleapi.Expand(req.URL, map[string]string{
5048 "name": c.name,
5049 })
5050 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5051 }
5052
5053
5054
5055
5056
5057
5058
5059 func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
5060 gensupport.SetOptions(c.urlParams_, opts...)
5061 res, err := c.doRequest("json")
5062 if res != nil && res.StatusCode == http.StatusNotModified {
5063 if res.Body != nil {
5064 res.Body.Close()
5065 }
5066 return nil, gensupport.WrapError(&googleapi.Error{
5067 Code: res.StatusCode,
5068 Header: res.Header,
5069 })
5070 }
5071 if err != nil {
5072 return nil, err
5073 }
5074 defer googleapi.CloseBody(res)
5075 if err := googleapi.CheckResponse(res); err != nil {
5076 return nil, gensupport.WrapError(err)
5077 }
5078 ret := &ListOperationsResponse{
5079 ServerResponse: googleapi.ServerResponse{
5080 Header: res.Header,
5081 HTTPStatusCode: res.StatusCode,
5082 },
5083 }
5084 target := &ret
5085 if err := gensupport.DecodeResponse(target, res); err != nil {
5086 return nil, err
5087 }
5088 return ret, nil
5089 }
5090
5091
5092
5093
5094 func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
5095 c.ctx_ = ctx
5096 defer c.PageToken(c.urlParams_.Get("pageToken"))
5097 for {
5098 x, err := c.Do()
5099 if err != nil {
5100 return err
5101 }
5102 if err := f(x); err != nil {
5103 return err
5104 }
5105 if x.NextPageToken == "" {
5106 return nil
5107 }
5108 c.PageToken(x.NextPageToken)
5109 }
5110 }
5111
5112 type ProjectsLocationsPreviewsCreateCall struct {
5113 s *Service
5114 parent string
5115 preview *Preview
5116 urlParams_ gensupport.URLParams
5117 ctx_ context.Context
5118 header_ http.Header
5119 }
5120
5121
5122
5123
5124
5125 func (r *ProjectsLocationsPreviewsService) Create(parent string, preview *Preview) *ProjectsLocationsPreviewsCreateCall {
5126 c := &ProjectsLocationsPreviewsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5127 c.parent = parent
5128 c.preview = preview
5129 return c
5130 }
5131
5132
5133 func (c *ProjectsLocationsPreviewsCreateCall) PreviewId(previewId string) *ProjectsLocationsPreviewsCreateCall {
5134 c.urlParams_.Set("previewId", previewId)
5135 return c
5136 }
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149 func (c *ProjectsLocationsPreviewsCreateCall) RequestId(requestId string) *ProjectsLocationsPreviewsCreateCall {
5150 c.urlParams_.Set("requestId", requestId)
5151 return c
5152 }
5153
5154
5155
5156
5157 func (c *ProjectsLocationsPreviewsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsPreviewsCreateCall {
5158 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5159 return c
5160 }
5161
5162
5163 func (c *ProjectsLocationsPreviewsCreateCall) Context(ctx context.Context) *ProjectsLocationsPreviewsCreateCall {
5164 c.ctx_ = ctx
5165 return c
5166 }
5167
5168
5169
5170 func (c *ProjectsLocationsPreviewsCreateCall) Header() http.Header {
5171 if c.header_ == nil {
5172 c.header_ = make(http.Header)
5173 }
5174 return c.header_
5175 }
5176
5177 func (c *ProjectsLocationsPreviewsCreateCall) doRequest(alt string) (*http.Response, error) {
5178 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5179 var body io.Reader = nil
5180 body, err := googleapi.WithoutDataWrapper.JSONReader(c.preview)
5181 if err != nil {
5182 return nil, err
5183 }
5184 c.urlParams_.Set("alt", alt)
5185 c.urlParams_.Set("prettyPrint", "false")
5186 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/previews")
5187 urls += "?" + c.urlParams_.Encode()
5188 req, err := http.NewRequest("POST", urls, body)
5189 if err != nil {
5190 return nil, err
5191 }
5192 req.Header = reqHeaders
5193 googleapi.Expand(req.URL, map[string]string{
5194 "parent": c.parent,
5195 })
5196 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5197 }
5198
5199
5200
5201
5202
5203
5204 func (c *ProjectsLocationsPreviewsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5205 gensupport.SetOptions(c.urlParams_, opts...)
5206 res, err := c.doRequest("json")
5207 if res != nil && res.StatusCode == http.StatusNotModified {
5208 if res.Body != nil {
5209 res.Body.Close()
5210 }
5211 return nil, gensupport.WrapError(&googleapi.Error{
5212 Code: res.StatusCode,
5213 Header: res.Header,
5214 })
5215 }
5216 if err != nil {
5217 return nil, err
5218 }
5219 defer googleapi.CloseBody(res)
5220 if err := googleapi.CheckResponse(res); err != nil {
5221 return nil, gensupport.WrapError(err)
5222 }
5223 ret := &Operation{
5224 ServerResponse: googleapi.ServerResponse{
5225 Header: res.Header,
5226 HTTPStatusCode: res.StatusCode,
5227 },
5228 }
5229 target := &ret
5230 if err := gensupport.DecodeResponse(target, res); err != nil {
5231 return nil, err
5232 }
5233 return ret, nil
5234 }
5235
5236 type ProjectsLocationsPreviewsDeleteCall struct {
5237 s *Service
5238 name string
5239 urlParams_ gensupport.URLParams
5240 ctx_ context.Context
5241 header_ http.Header
5242 }
5243
5244
5245
5246
5247
5248 func (r *ProjectsLocationsPreviewsService) Delete(name string) *ProjectsLocationsPreviewsDeleteCall {
5249 c := &ProjectsLocationsPreviewsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5250 c.name = name
5251 return c
5252 }
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265 func (c *ProjectsLocationsPreviewsDeleteCall) RequestId(requestId string) *ProjectsLocationsPreviewsDeleteCall {
5266 c.urlParams_.Set("requestId", requestId)
5267 return c
5268 }
5269
5270
5271
5272
5273 func (c *ProjectsLocationsPreviewsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsPreviewsDeleteCall {
5274 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5275 return c
5276 }
5277
5278
5279 func (c *ProjectsLocationsPreviewsDeleteCall) Context(ctx context.Context) *ProjectsLocationsPreviewsDeleteCall {
5280 c.ctx_ = ctx
5281 return c
5282 }
5283
5284
5285
5286 func (c *ProjectsLocationsPreviewsDeleteCall) Header() http.Header {
5287 if c.header_ == nil {
5288 c.header_ = make(http.Header)
5289 }
5290 return c.header_
5291 }
5292
5293 func (c *ProjectsLocationsPreviewsDeleteCall) doRequest(alt string) (*http.Response, error) {
5294 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5295 var body io.Reader = nil
5296 c.urlParams_.Set("alt", alt)
5297 c.urlParams_.Set("prettyPrint", "false")
5298 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
5299 urls += "?" + c.urlParams_.Encode()
5300 req, err := http.NewRequest("DELETE", urls, body)
5301 if err != nil {
5302 return nil, err
5303 }
5304 req.Header = reqHeaders
5305 googleapi.Expand(req.URL, map[string]string{
5306 "name": c.name,
5307 })
5308 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5309 }
5310
5311
5312
5313
5314
5315
5316 func (c *ProjectsLocationsPreviewsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5317 gensupport.SetOptions(c.urlParams_, opts...)
5318 res, err := c.doRequest("json")
5319 if res != nil && res.StatusCode == http.StatusNotModified {
5320 if res.Body != nil {
5321 res.Body.Close()
5322 }
5323 return nil, gensupport.WrapError(&googleapi.Error{
5324 Code: res.StatusCode,
5325 Header: res.Header,
5326 })
5327 }
5328 if err != nil {
5329 return nil, err
5330 }
5331 defer googleapi.CloseBody(res)
5332 if err := googleapi.CheckResponse(res); err != nil {
5333 return nil, gensupport.WrapError(err)
5334 }
5335 ret := &Operation{
5336 ServerResponse: googleapi.ServerResponse{
5337 Header: res.Header,
5338 HTTPStatusCode: res.StatusCode,
5339 },
5340 }
5341 target := &ret
5342 if err := gensupport.DecodeResponse(target, res); err != nil {
5343 return nil, err
5344 }
5345 return ret, nil
5346 }
5347
5348 type ProjectsLocationsPreviewsExportCall struct {
5349 s *Service
5350 parent string
5351 exportpreviewresultrequest *ExportPreviewResultRequest
5352 urlParams_ gensupport.URLParams
5353 ctx_ context.Context
5354 header_ http.Header
5355 }
5356
5357
5358
5359
5360
5361
5362 func (r *ProjectsLocationsPreviewsService) Export(parent string, exportpreviewresultrequest *ExportPreviewResultRequest) *ProjectsLocationsPreviewsExportCall {
5363 c := &ProjectsLocationsPreviewsExportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5364 c.parent = parent
5365 c.exportpreviewresultrequest = exportpreviewresultrequest
5366 return c
5367 }
5368
5369
5370
5371
5372 func (c *ProjectsLocationsPreviewsExportCall) Fields(s ...googleapi.Field) *ProjectsLocationsPreviewsExportCall {
5373 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5374 return c
5375 }
5376
5377
5378 func (c *ProjectsLocationsPreviewsExportCall) Context(ctx context.Context) *ProjectsLocationsPreviewsExportCall {
5379 c.ctx_ = ctx
5380 return c
5381 }
5382
5383
5384
5385 func (c *ProjectsLocationsPreviewsExportCall) Header() http.Header {
5386 if c.header_ == nil {
5387 c.header_ = make(http.Header)
5388 }
5389 return c.header_
5390 }
5391
5392 func (c *ProjectsLocationsPreviewsExportCall) doRequest(alt string) (*http.Response, error) {
5393 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5394 var body io.Reader = nil
5395 body, err := googleapi.WithoutDataWrapper.JSONReader(c.exportpreviewresultrequest)
5396 if err != nil {
5397 return nil, err
5398 }
5399 c.urlParams_.Set("alt", alt)
5400 c.urlParams_.Set("prettyPrint", "false")
5401 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:export")
5402 urls += "?" + c.urlParams_.Encode()
5403 req, err := http.NewRequest("POST", urls, body)
5404 if err != nil {
5405 return nil, err
5406 }
5407 req.Header = reqHeaders
5408 googleapi.Expand(req.URL, map[string]string{
5409 "parent": c.parent,
5410 })
5411 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5412 }
5413
5414
5415
5416
5417
5418
5419
5420 func (c *ProjectsLocationsPreviewsExportCall) Do(opts ...googleapi.CallOption) (*ExportPreviewResultResponse, error) {
5421 gensupport.SetOptions(c.urlParams_, opts...)
5422 res, err := c.doRequest("json")
5423 if res != nil && res.StatusCode == http.StatusNotModified {
5424 if res.Body != nil {
5425 res.Body.Close()
5426 }
5427 return nil, gensupport.WrapError(&googleapi.Error{
5428 Code: res.StatusCode,
5429 Header: res.Header,
5430 })
5431 }
5432 if err != nil {
5433 return nil, err
5434 }
5435 defer googleapi.CloseBody(res)
5436 if err := googleapi.CheckResponse(res); err != nil {
5437 return nil, gensupport.WrapError(err)
5438 }
5439 ret := &ExportPreviewResultResponse{
5440 ServerResponse: googleapi.ServerResponse{
5441 Header: res.Header,
5442 HTTPStatusCode: res.StatusCode,
5443 },
5444 }
5445 target := &ret
5446 if err := gensupport.DecodeResponse(target, res); err != nil {
5447 return nil, err
5448 }
5449 return ret, nil
5450 }
5451
5452 type ProjectsLocationsPreviewsGetCall struct {
5453 s *Service
5454 name string
5455 urlParams_ gensupport.URLParams
5456 ifNoneMatch_ string
5457 ctx_ context.Context
5458 header_ http.Header
5459 }
5460
5461
5462
5463
5464
5465 func (r *ProjectsLocationsPreviewsService) Get(name string) *ProjectsLocationsPreviewsGetCall {
5466 c := &ProjectsLocationsPreviewsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5467 c.name = name
5468 return c
5469 }
5470
5471
5472
5473
5474 func (c *ProjectsLocationsPreviewsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsPreviewsGetCall {
5475 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5476 return c
5477 }
5478
5479
5480
5481
5482 func (c *ProjectsLocationsPreviewsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsPreviewsGetCall {
5483 c.ifNoneMatch_ = entityTag
5484 return c
5485 }
5486
5487
5488 func (c *ProjectsLocationsPreviewsGetCall) Context(ctx context.Context) *ProjectsLocationsPreviewsGetCall {
5489 c.ctx_ = ctx
5490 return c
5491 }
5492
5493
5494
5495 func (c *ProjectsLocationsPreviewsGetCall) Header() http.Header {
5496 if c.header_ == nil {
5497 c.header_ = make(http.Header)
5498 }
5499 return c.header_
5500 }
5501
5502 func (c *ProjectsLocationsPreviewsGetCall) doRequest(alt string) (*http.Response, error) {
5503 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5504 if c.ifNoneMatch_ != "" {
5505 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5506 }
5507 var body io.Reader = nil
5508 c.urlParams_.Set("alt", alt)
5509 c.urlParams_.Set("prettyPrint", "false")
5510 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
5511 urls += "?" + c.urlParams_.Encode()
5512 req, err := http.NewRequest("GET", urls, body)
5513 if err != nil {
5514 return nil, err
5515 }
5516 req.Header = reqHeaders
5517 googleapi.Expand(req.URL, map[string]string{
5518 "name": c.name,
5519 })
5520 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5521 }
5522
5523
5524
5525
5526
5527
5528 func (c *ProjectsLocationsPreviewsGetCall) Do(opts ...googleapi.CallOption) (*Preview, error) {
5529 gensupport.SetOptions(c.urlParams_, opts...)
5530 res, err := c.doRequest("json")
5531 if res != nil && res.StatusCode == http.StatusNotModified {
5532 if res.Body != nil {
5533 res.Body.Close()
5534 }
5535 return nil, gensupport.WrapError(&googleapi.Error{
5536 Code: res.StatusCode,
5537 Header: res.Header,
5538 })
5539 }
5540 if err != nil {
5541 return nil, err
5542 }
5543 defer googleapi.CloseBody(res)
5544 if err := googleapi.CheckResponse(res); err != nil {
5545 return nil, gensupport.WrapError(err)
5546 }
5547 ret := &Preview{
5548 ServerResponse: googleapi.ServerResponse{
5549 Header: res.Header,
5550 HTTPStatusCode: res.StatusCode,
5551 },
5552 }
5553 target := &ret
5554 if err := gensupport.DecodeResponse(target, res); err != nil {
5555 return nil, err
5556 }
5557 return ret, nil
5558 }
5559
5560 type ProjectsLocationsPreviewsListCall struct {
5561 s *Service
5562 parent string
5563 urlParams_ gensupport.URLParams
5564 ifNoneMatch_ string
5565 ctx_ context.Context
5566 header_ http.Header
5567 }
5568
5569
5570
5571
5572
5573 func (r *ProjectsLocationsPreviewsService) List(parent string) *ProjectsLocationsPreviewsListCall {
5574 c := &ProjectsLocationsPreviewsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5575 c.parent = parent
5576 return c
5577 }
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590 func (c *ProjectsLocationsPreviewsListCall) Filter(filter string) *ProjectsLocationsPreviewsListCall {
5591 c.urlParams_.Set("filter", filter)
5592 return c
5593 }
5594
5595
5596
5597 func (c *ProjectsLocationsPreviewsListCall) OrderBy(orderBy string) *ProjectsLocationsPreviewsListCall {
5598 c.urlParams_.Set("orderBy", orderBy)
5599 return c
5600 }
5601
5602
5603
5604
5605 func (c *ProjectsLocationsPreviewsListCall) PageSize(pageSize int64) *ProjectsLocationsPreviewsListCall {
5606 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5607 return c
5608 }
5609
5610
5611
5612
5613 func (c *ProjectsLocationsPreviewsListCall) PageToken(pageToken string) *ProjectsLocationsPreviewsListCall {
5614 c.urlParams_.Set("pageToken", pageToken)
5615 return c
5616 }
5617
5618
5619
5620
5621 func (c *ProjectsLocationsPreviewsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsPreviewsListCall {
5622 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5623 return c
5624 }
5625
5626
5627
5628
5629 func (c *ProjectsLocationsPreviewsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsPreviewsListCall {
5630 c.ifNoneMatch_ = entityTag
5631 return c
5632 }
5633
5634
5635 func (c *ProjectsLocationsPreviewsListCall) Context(ctx context.Context) *ProjectsLocationsPreviewsListCall {
5636 c.ctx_ = ctx
5637 return c
5638 }
5639
5640
5641
5642 func (c *ProjectsLocationsPreviewsListCall) Header() http.Header {
5643 if c.header_ == nil {
5644 c.header_ = make(http.Header)
5645 }
5646 return c.header_
5647 }
5648
5649 func (c *ProjectsLocationsPreviewsListCall) doRequest(alt string) (*http.Response, error) {
5650 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5651 if c.ifNoneMatch_ != "" {
5652 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5653 }
5654 var body io.Reader = nil
5655 c.urlParams_.Set("alt", alt)
5656 c.urlParams_.Set("prettyPrint", "false")
5657 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/previews")
5658 urls += "?" + c.urlParams_.Encode()
5659 req, err := http.NewRequest("GET", urls, body)
5660 if err != nil {
5661 return nil, err
5662 }
5663 req.Header = reqHeaders
5664 googleapi.Expand(req.URL, map[string]string{
5665 "parent": c.parent,
5666 })
5667 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5668 }
5669
5670
5671
5672
5673
5674
5675
5676 func (c *ProjectsLocationsPreviewsListCall) Do(opts ...googleapi.CallOption) (*ListPreviewsResponse, error) {
5677 gensupport.SetOptions(c.urlParams_, opts...)
5678 res, err := c.doRequest("json")
5679 if res != nil && res.StatusCode == http.StatusNotModified {
5680 if res.Body != nil {
5681 res.Body.Close()
5682 }
5683 return nil, gensupport.WrapError(&googleapi.Error{
5684 Code: res.StatusCode,
5685 Header: res.Header,
5686 })
5687 }
5688 if err != nil {
5689 return nil, err
5690 }
5691 defer googleapi.CloseBody(res)
5692 if err := googleapi.CheckResponse(res); err != nil {
5693 return nil, gensupport.WrapError(err)
5694 }
5695 ret := &ListPreviewsResponse{
5696 ServerResponse: googleapi.ServerResponse{
5697 Header: res.Header,
5698 HTTPStatusCode: res.StatusCode,
5699 },
5700 }
5701 target := &ret
5702 if err := gensupport.DecodeResponse(target, res); err != nil {
5703 return nil, err
5704 }
5705 return ret, nil
5706 }
5707
5708
5709
5710
5711 func (c *ProjectsLocationsPreviewsListCall) Pages(ctx context.Context, f func(*ListPreviewsResponse) error) error {
5712 c.ctx_ = ctx
5713 defer c.PageToken(c.urlParams_.Get("pageToken"))
5714 for {
5715 x, err := c.Do()
5716 if err != nil {
5717 return err
5718 }
5719 if err := f(x); err != nil {
5720 return err
5721 }
5722 if x.NextPageToken == "" {
5723 return nil
5724 }
5725 c.PageToken(x.NextPageToken)
5726 }
5727 }
5728
5729 type ProjectsLocationsTerraformVersionsGetCall struct {
5730 s *Service
5731 name string
5732 urlParams_ gensupport.URLParams
5733 ifNoneMatch_ string
5734 ctx_ context.Context
5735 header_ http.Header
5736 }
5737
5738
5739
5740
5741
5742
5743 func (r *ProjectsLocationsTerraformVersionsService) Get(name string) *ProjectsLocationsTerraformVersionsGetCall {
5744 c := &ProjectsLocationsTerraformVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5745 c.name = name
5746 return c
5747 }
5748
5749
5750
5751
5752 func (c *ProjectsLocationsTerraformVersionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsTerraformVersionsGetCall {
5753 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5754 return c
5755 }
5756
5757
5758
5759
5760 func (c *ProjectsLocationsTerraformVersionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsTerraformVersionsGetCall {
5761 c.ifNoneMatch_ = entityTag
5762 return c
5763 }
5764
5765
5766 func (c *ProjectsLocationsTerraformVersionsGetCall) Context(ctx context.Context) *ProjectsLocationsTerraformVersionsGetCall {
5767 c.ctx_ = ctx
5768 return c
5769 }
5770
5771
5772
5773 func (c *ProjectsLocationsTerraformVersionsGetCall) Header() http.Header {
5774 if c.header_ == nil {
5775 c.header_ = make(http.Header)
5776 }
5777 return c.header_
5778 }
5779
5780 func (c *ProjectsLocationsTerraformVersionsGetCall) doRequest(alt string) (*http.Response, error) {
5781 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5782 if c.ifNoneMatch_ != "" {
5783 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5784 }
5785 var body io.Reader = nil
5786 c.urlParams_.Set("alt", alt)
5787 c.urlParams_.Set("prettyPrint", "false")
5788 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
5789 urls += "?" + c.urlParams_.Encode()
5790 req, err := http.NewRequest("GET", urls, body)
5791 if err != nil {
5792 return nil, err
5793 }
5794 req.Header = reqHeaders
5795 googleapi.Expand(req.URL, map[string]string{
5796 "name": c.name,
5797 })
5798 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5799 }
5800
5801
5802
5803
5804
5805
5806
5807 func (c *ProjectsLocationsTerraformVersionsGetCall) Do(opts ...googleapi.CallOption) (*TerraformVersion, error) {
5808 gensupport.SetOptions(c.urlParams_, opts...)
5809 res, err := c.doRequest("json")
5810 if res != nil && res.StatusCode == http.StatusNotModified {
5811 if res.Body != nil {
5812 res.Body.Close()
5813 }
5814 return nil, gensupport.WrapError(&googleapi.Error{
5815 Code: res.StatusCode,
5816 Header: res.Header,
5817 })
5818 }
5819 if err != nil {
5820 return nil, err
5821 }
5822 defer googleapi.CloseBody(res)
5823 if err := googleapi.CheckResponse(res); err != nil {
5824 return nil, gensupport.WrapError(err)
5825 }
5826 ret := &TerraformVersion{
5827 ServerResponse: googleapi.ServerResponse{
5828 Header: res.Header,
5829 HTTPStatusCode: res.StatusCode,
5830 },
5831 }
5832 target := &ret
5833 if err := gensupport.DecodeResponse(target, res); err != nil {
5834 return nil, err
5835 }
5836 return ret, nil
5837 }
5838
5839 type ProjectsLocationsTerraformVersionsListCall struct {
5840 s *Service
5841 parent string
5842 urlParams_ gensupport.URLParams
5843 ifNoneMatch_ string
5844 ctx_ context.Context
5845 header_ http.Header
5846 }
5847
5848
5849
5850
5851
5852
5853 func (r *ProjectsLocationsTerraformVersionsService) List(parent string) *ProjectsLocationsTerraformVersionsListCall {
5854 c := &ProjectsLocationsTerraformVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5855 c.parent = parent
5856 return c
5857 }
5858
5859
5860
5861
5862
5863
5864
5865
5866 func (c *ProjectsLocationsTerraformVersionsListCall) Filter(filter string) *ProjectsLocationsTerraformVersionsListCall {
5867 c.urlParams_.Set("filter", filter)
5868 return c
5869 }
5870
5871
5872
5873 func (c *ProjectsLocationsTerraformVersionsListCall) OrderBy(orderBy string) *ProjectsLocationsTerraformVersionsListCall {
5874 c.urlParams_.Set("orderBy", orderBy)
5875 return c
5876 }
5877
5878
5879
5880
5881 func (c *ProjectsLocationsTerraformVersionsListCall) PageSize(pageSize int64) *ProjectsLocationsTerraformVersionsListCall {
5882 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5883 return c
5884 }
5885
5886
5887
5888
5889 func (c *ProjectsLocationsTerraformVersionsListCall) PageToken(pageToken string) *ProjectsLocationsTerraformVersionsListCall {
5890 c.urlParams_.Set("pageToken", pageToken)
5891 return c
5892 }
5893
5894
5895
5896
5897 func (c *ProjectsLocationsTerraformVersionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsTerraformVersionsListCall {
5898 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5899 return c
5900 }
5901
5902
5903
5904
5905 func (c *ProjectsLocationsTerraformVersionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsTerraformVersionsListCall {
5906 c.ifNoneMatch_ = entityTag
5907 return c
5908 }
5909
5910
5911 func (c *ProjectsLocationsTerraformVersionsListCall) Context(ctx context.Context) *ProjectsLocationsTerraformVersionsListCall {
5912 c.ctx_ = ctx
5913 return c
5914 }
5915
5916
5917
5918 func (c *ProjectsLocationsTerraformVersionsListCall) Header() http.Header {
5919 if c.header_ == nil {
5920 c.header_ = make(http.Header)
5921 }
5922 return c.header_
5923 }
5924
5925 func (c *ProjectsLocationsTerraformVersionsListCall) doRequest(alt string) (*http.Response, error) {
5926 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5927 if c.ifNoneMatch_ != "" {
5928 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5929 }
5930 var body io.Reader = nil
5931 c.urlParams_.Set("alt", alt)
5932 c.urlParams_.Set("prettyPrint", "false")
5933 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/terraformVersions")
5934 urls += "?" + c.urlParams_.Encode()
5935 req, err := http.NewRequest("GET", urls, body)
5936 if err != nil {
5937 return nil, err
5938 }
5939 req.Header = reqHeaders
5940 googleapi.Expand(req.URL, map[string]string{
5941 "parent": c.parent,
5942 })
5943 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5944 }
5945
5946
5947
5948
5949
5950
5951
5952 func (c *ProjectsLocationsTerraformVersionsListCall) Do(opts ...googleapi.CallOption) (*ListTerraformVersionsResponse, error) {
5953 gensupport.SetOptions(c.urlParams_, opts...)
5954 res, err := c.doRequest("json")
5955 if res != nil && res.StatusCode == http.StatusNotModified {
5956 if res.Body != nil {
5957 res.Body.Close()
5958 }
5959 return nil, gensupport.WrapError(&googleapi.Error{
5960 Code: res.StatusCode,
5961 Header: res.Header,
5962 })
5963 }
5964 if err != nil {
5965 return nil, err
5966 }
5967 defer googleapi.CloseBody(res)
5968 if err := googleapi.CheckResponse(res); err != nil {
5969 return nil, gensupport.WrapError(err)
5970 }
5971 ret := &ListTerraformVersionsResponse{
5972 ServerResponse: googleapi.ServerResponse{
5973 Header: res.Header,
5974 HTTPStatusCode: res.StatusCode,
5975 },
5976 }
5977 target := &ret
5978 if err := gensupport.DecodeResponse(target, res); err != nil {
5979 return nil, err
5980 }
5981 return ret, nil
5982 }
5983
5984
5985
5986
5987 func (c *ProjectsLocationsTerraformVersionsListCall) Pages(ctx context.Context, f func(*ListTerraformVersionsResponse) error) error {
5988 c.ctx_ = ctx
5989 defer c.PageToken(c.urlParams_.Get("pageToken"))
5990 for {
5991 x, err := c.Do()
5992 if err != nil {
5993 return err
5994 }
5995 if err := f(x); err != nil {
5996 return err
5997 }
5998 if x.NextPageToken == "" {
5999 return nil
6000 }
6001 c.PageToken(x.NextPageToken)
6002 }
6003 }
6004
View as plain text