1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56 package cloudresourcemanager
57
58 import (
59 "bytes"
60 "context"
61 "encoding/json"
62 "errors"
63 "fmt"
64 "io"
65 "net/http"
66 "net/url"
67 "strconv"
68 "strings"
69
70 googleapi "google.golang.org/api/googleapi"
71 internal "google.golang.org/api/internal"
72 gensupport "google.golang.org/api/internal/gensupport"
73 option "google.golang.org/api/option"
74 internaloption "google.golang.org/api/option/internaloption"
75 htransport "google.golang.org/api/transport/http"
76 )
77
78
79
80 var _ = bytes.NewBuffer
81 var _ = strconv.Itoa
82 var _ = fmt.Sprintf
83 var _ = json.NewDecoder
84 var _ = io.Copy
85 var _ = url.Parse
86 var _ = gensupport.MarshalJSON
87 var _ = googleapi.Version
88 var _ = errors.New
89 var _ = strings.Replace
90 var _ = context.Canceled
91 var _ = internaloption.WithDefaultEndpoint
92 var _ = internal.Version
93
94 const apiId = "cloudresourcemanager:v3"
95 const apiName = "cloudresourcemanager"
96 const apiVersion = "v3"
97 const basePath = "https://cloudresourcemanager.googleapis.com/"
98 const basePathTemplate = "https://cloudresourcemanager.UNIVERSE_DOMAIN/"
99 const mtlsBasePath = "https://cloudresourcemanager.mtls.googleapis.com/"
100
101
102 const (
103
104
105 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
106
107
108
109 CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only"
110 )
111
112
113 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
114 scopesOption := internaloption.WithDefaultScopes(
115 "https://www.googleapis.com/auth/cloud-platform",
116 "https://www.googleapis.com/auth/cloud-platform.read-only",
117 )
118
119 opts = append([]option.ClientOption{scopesOption}, opts...)
120 opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
121 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
122 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
123 opts = append(opts, internaloption.EnableNewAuthLibrary())
124 client, endpoint, err := htransport.NewClient(ctx, opts...)
125 if err != nil {
126 return nil, err
127 }
128 s, err := New(client)
129 if err != nil {
130 return nil, err
131 }
132 if endpoint != "" {
133 s.BasePath = endpoint
134 }
135 return s, nil
136 }
137
138
139
140
141
142
143 func New(client *http.Client) (*Service, error) {
144 if client == nil {
145 return nil, errors.New("client is nil")
146 }
147 s := &Service{client: client, BasePath: basePath}
148 s.EffectiveTags = NewEffectiveTagsService(s)
149 s.Folders = NewFoldersService(s)
150 s.Liens = NewLiensService(s)
151 s.Operations = NewOperationsService(s)
152 s.Organizations = NewOrganizationsService(s)
153 s.Projects = NewProjectsService(s)
154 s.TagBindings = NewTagBindingsService(s)
155 s.TagKeys = NewTagKeysService(s)
156 s.TagValues = NewTagValuesService(s)
157 return s, nil
158 }
159
160 type Service struct {
161 client *http.Client
162 BasePath string
163 UserAgent string
164
165 EffectiveTags *EffectiveTagsService
166
167 Folders *FoldersService
168
169 Liens *LiensService
170
171 Operations *OperationsService
172
173 Organizations *OrganizationsService
174
175 Projects *ProjectsService
176
177 TagBindings *TagBindingsService
178
179 TagKeys *TagKeysService
180
181 TagValues *TagValuesService
182 }
183
184 func (s *Service) userAgent() string {
185 if s.UserAgent == "" {
186 return googleapi.UserAgent
187 }
188 return googleapi.UserAgent + " " + s.UserAgent
189 }
190
191 func NewEffectiveTagsService(s *Service) *EffectiveTagsService {
192 rs := &EffectiveTagsService{s: s}
193 return rs
194 }
195
196 type EffectiveTagsService struct {
197 s *Service
198 }
199
200 func NewFoldersService(s *Service) *FoldersService {
201 rs := &FoldersService{s: s}
202 return rs
203 }
204
205 type FoldersService struct {
206 s *Service
207 }
208
209 func NewLiensService(s *Service) *LiensService {
210 rs := &LiensService{s: s}
211 return rs
212 }
213
214 type LiensService struct {
215 s *Service
216 }
217
218 func NewOperationsService(s *Service) *OperationsService {
219 rs := &OperationsService{s: s}
220 return rs
221 }
222
223 type OperationsService struct {
224 s *Service
225 }
226
227 func NewOrganizationsService(s *Service) *OrganizationsService {
228 rs := &OrganizationsService{s: s}
229 return rs
230 }
231
232 type OrganizationsService struct {
233 s *Service
234 }
235
236 func NewProjectsService(s *Service) *ProjectsService {
237 rs := &ProjectsService{s: s}
238 return rs
239 }
240
241 type ProjectsService struct {
242 s *Service
243 }
244
245 func NewTagBindingsService(s *Service) *TagBindingsService {
246 rs := &TagBindingsService{s: s}
247 return rs
248 }
249
250 type TagBindingsService struct {
251 s *Service
252 }
253
254 func NewTagKeysService(s *Service) *TagKeysService {
255 rs := &TagKeysService{s: s}
256 return rs
257 }
258
259 type TagKeysService struct {
260 s *Service
261 }
262
263 func NewTagValuesService(s *Service) *TagValuesService {
264 rs := &TagValuesService{s: s}
265 rs.TagHolds = NewTagValuesTagHoldsService(s)
266 return rs
267 }
268
269 type TagValuesService struct {
270 s *Service
271
272 TagHolds *TagValuesTagHoldsService
273 }
274
275 func NewTagValuesTagHoldsService(s *Service) *TagValuesTagHoldsService {
276 rs := &TagValuesTagHoldsService{s: s}
277 return rs
278 }
279
280 type TagValuesTagHoldsService struct {
281 s *Service
282 }
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300 type AuditConfig struct {
301
302 AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"`
303
304
305
306 Service string `json:"service,omitempty"`
307
308
309
310
311
312 ForceSendFields []string `json:"-"`
313
314
315
316
317 NullFields []string `json:"-"`
318 }
319
320 func (s *AuditConfig) MarshalJSON() ([]byte, error) {
321 type NoMethod AuditConfig
322 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
323 }
324
325
326
327
328
329
330 type AuditLogConfig struct {
331
332
333 ExemptedMembers []string `json:"exemptedMembers,omitempty"`
334
335
336
337
338
339
340
341 LogType string `json:"logType,omitempty"`
342
343
344
345
346
347 ForceSendFields []string `json:"-"`
348
349
350
351
352 NullFields []string `json:"-"`
353 }
354
355 func (s *AuditLogConfig) MarshalJSON() ([]byte, error) {
356 type NoMethod AuditLogConfig
357 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
358 }
359
360
361 type Binding struct {
362
363
364
365
366
367
368
369
370 Condition *Expr `json:"condition,omitempty"`
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433 Members []string `json:"members,omitempty"`
434
435
436
437
438
439
440 Role string `json:"role,omitempty"`
441
442
443
444
445
446 ForceSendFields []string `json:"-"`
447
448
449
450
451 NullFields []string `json:"-"`
452 }
453
454 func (s *Binding) MarshalJSON() ([]byte, error) {
455 type NoMethod Binding
456 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
457 }
458
459
460
461 type CloudresourcemanagerGoogleCloudResourcemanagerV2alpha1FolderOperation struct {
462
463
464 DestinationParent string `json:"destinationParent,omitempty"`
465
466 DisplayName string `json:"displayName,omitempty"`
467
468
469
470
471
472
473 OperationType string `json:"operationType,omitempty"`
474
475
476 SourceParent string `json:"sourceParent,omitempty"`
477
478
479
480
481
482 ForceSendFields []string `json:"-"`
483
484
485
486
487 NullFields []string `json:"-"`
488 }
489
490 func (s *CloudresourcemanagerGoogleCloudResourcemanagerV2alpha1FolderOperation) MarshalJSON() ([]byte, error) {
491 type NoMethod CloudresourcemanagerGoogleCloudResourcemanagerV2alpha1FolderOperation
492 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
493 }
494
495
496
497 type CloudresourcemanagerGoogleCloudResourcemanagerV2beta1FolderOperation struct {
498
499
500 DestinationParent string `json:"destinationParent,omitempty"`
501
502 DisplayName string `json:"displayName,omitempty"`
503
504
505
506
507
508
509 OperationType string `json:"operationType,omitempty"`
510
511
512 SourceParent string `json:"sourceParent,omitempty"`
513
514
515
516
517
518 ForceSendFields []string `json:"-"`
519
520
521
522
523 NullFields []string `json:"-"`
524 }
525
526 func (s *CloudresourcemanagerGoogleCloudResourcemanagerV2beta1FolderOperation) MarshalJSON() ([]byte, error) {
527 type NoMethod CloudresourcemanagerGoogleCloudResourcemanagerV2beta1FolderOperation
528 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
529 }
530
531
532 type CreateFolderMetadata struct {
533
534 DisplayName string `json:"displayName,omitempty"`
535
536
537 Parent string `json:"parent,omitempty"`
538
539
540
541
542
543 ForceSendFields []string `json:"-"`
544
545
546
547
548 NullFields []string `json:"-"`
549 }
550
551 func (s *CreateFolderMetadata) MarshalJSON() ([]byte, error) {
552 type NoMethod CreateFolderMetadata
553 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
554 }
555
556
557
558
559 type CreateProjectMetadata struct {
560
561 CreateTime string `json:"createTime,omitempty"`
562
563
564
565 Gettable bool `json:"gettable,omitempty"`
566
567 Ready bool `json:"ready,omitempty"`
568
569
570
571
572
573 ForceSendFields []string `json:"-"`
574
575
576
577
578 NullFields []string `json:"-"`
579 }
580
581 func (s *CreateProjectMetadata) MarshalJSON() ([]byte, error) {
582 type NoMethod CreateProjectMetadata
583 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
584 }
585
586
587
588 type CreateTagBindingMetadata struct {
589 }
590
591
592 type CreateTagKeyMetadata struct {
593 }
594
595
596
597 type CreateTagValueMetadata struct {
598 }
599
600
601
602 type DeleteFolderMetadata struct {
603 }
604
605
606
607 type DeleteOrganizationMetadata struct {
608 }
609
610
611
612 type DeleteProjectMetadata struct {
613 }
614
615
616
617 type DeleteTagBindingMetadata struct {
618 }
619
620
621 type DeleteTagKeyMetadata struct {
622 }
623
624
625
626 type DeleteTagValueMetadata struct {
627 }
628
629
630
631
632
633
634 type EffectiveTag struct {
635
636
637
638
639 Inherited bool `json:"inherited,omitempty"`
640
641
642
643
644 NamespacedTagKey string `json:"namespacedTagKey,omitempty"`
645
646
647
648
649 NamespacedTagValue string `json:"namespacedTagValue,omitempty"`
650
651
652 TagKey string `json:"tagKey,omitempty"`
653
654
655 TagKeyParentName string `json:"tagKeyParentName,omitempty"`
656
657 TagValue string `json:"tagValue,omitempty"`
658
659
660
661
662
663 ForceSendFields []string `json:"-"`
664
665
666
667
668 NullFields []string `json:"-"`
669 }
670
671 func (s *EffectiveTag) MarshalJSON() ([]byte, error) {
672 type NoMethod EffectiveTag
673 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
674 }
675
676
677
678
679
680 type Empty struct {
681
682 googleapi.ServerResponse `json:"-"`
683 }
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701 type Expr struct {
702
703
704 Description string `json:"description,omitempty"`
705
706
707 Expression string `json:"expression,omitempty"`
708
709
710 Location string `json:"location,omitempty"`
711
712
713
714 Title string `json:"title,omitempty"`
715
716
717
718
719
720 ForceSendFields []string `json:"-"`
721
722
723
724
725 NullFields []string `json:"-"`
726 }
727
728 func (s *Expr) MarshalJSON() ([]byte, error) {
729 type NoMethod Expr
730 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
731 }
732
733
734
735 type Folder struct {
736
737 CreateTime string `json:"createTime,omitempty"`
738
739
740 DeleteTime string `json:"deleteTime,omitempty"`
741
742
743
744
745
746
747 DisplayName string `json:"displayName,omitempty"`
748
749
750
751 Etag string `json:"etag,omitempty"`
752
753
754 Name string `json:"name,omitempty"`
755
756
757 Parent string `json:"parent,omitempty"`
758
759
760
761
762
763
764
765 State string `json:"state,omitempty"`
766
767
768
769
770 Tags map[string]string `json:"tags,omitempty"`
771
772 UpdateTime string `json:"updateTime,omitempty"`
773
774
775 googleapi.ServerResponse `json:"-"`
776
777
778
779
780
781 ForceSendFields []string `json:"-"`
782
783
784
785
786 NullFields []string `json:"-"`
787 }
788
789 func (s *Folder) MarshalJSON() ([]byte, error) {
790 type NoMethod Folder
791 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
792 }
793
794
795 type FolderOperation struct {
796
797
798 DestinationParent string `json:"destinationParent,omitempty"`
799
800 DisplayName string `json:"displayName,omitempty"`
801
802
803
804
805
806
807 OperationType string `json:"operationType,omitempty"`
808
809
810 SourceParent string `json:"sourceParent,omitempty"`
811
812
813
814
815
816 ForceSendFields []string `json:"-"`
817
818
819
820
821 NullFields []string `json:"-"`
822 }
823
824 func (s *FolderOperation) MarshalJSON() ([]byte, error) {
825 type NoMethod FolderOperation
826 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
827 }
828
829
830 type FolderOperationError struct {
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852 ErrorMessageId string `json:"errorMessageId,omitempty"`
853
854
855
856
857
858 ForceSendFields []string `json:"-"`
859
860
861
862
863 NullFields []string `json:"-"`
864 }
865
866 func (s *FolderOperationError) MarshalJSON() ([]byte, error) {
867 type NoMethod FolderOperationError
868 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
869 }
870
871
872 type GetIamPolicyRequest struct {
873
874
875 Options *GetPolicyOptions `json:"options,omitempty"`
876
877
878
879
880
881 ForceSendFields []string `json:"-"`
882
883
884
885
886 NullFields []string `json:"-"`
887 }
888
889 func (s *GetIamPolicyRequest) MarshalJSON() ([]byte, error) {
890 type NoMethod GetIamPolicyRequest
891 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
892 }
893
894
895 type GetPolicyOptions struct {
896
897
898
899
900
901
902
903
904
905
906
907 RequestedPolicyVersion int64 `json:"requestedPolicyVersion,omitempty"`
908
909
910
911
912
913 ForceSendFields []string `json:"-"`
914
915
916
917
918 NullFields []string `json:"-"`
919 }
920
921 func (s *GetPolicyOptions) MarshalJSON() ([]byte, error) {
922 type NoMethod GetPolicyOptions
923 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
924 }
925
926
927
928 type Lien struct {
929
930 CreateTime string `json:"createTime,omitempty"`
931
932
933 Name string `json:"name,omitempty"`
934
935
936
937 Origin string `json:"origin,omitempty"`
938
939
940
941 Parent string `json:"parent,omitempty"`
942
943
944
945 Reason string `json:"reason,omitempty"`
946
947
948
949
950
951 Restrictions []string `json:"restrictions,omitempty"`
952
953
954 googleapi.ServerResponse `json:"-"`
955
956
957
958
959
960 ForceSendFields []string `json:"-"`
961
962
963
964
965 NullFields []string `json:"-"`
966 }
967
968 func (s *Lien) MarshalJSON() ([]byte, error) {
969 type NoMethod Lien
970 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
971 }
972
973
974 type ListEffectiveTagsResponse struct {
975
976
977 EffectiveTags []*EffectiveTag `json:"effectiveTags,omitempty"`
978
979
980
981
982
983
984
985 NextPageToken string `json:"nextPageToken,omitempty"`
986
987
988 googleapi.ServerResponse `json:"-"`
989
990
991
992
993
994 ForceSendFields []string `json:"-"`
995
996
997
998
999 NullFields []string `json:"-"`
1000 }
1001
1002 func (s *ListEffectiveTagsResponse) MarshalJSON() ([]byte, error) {
1003 type NoMethod ListEffectiveTagsResponse
1004 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1005 }
1006
1007
1008 type ListFoldersResponse struct {
1009
1010
1011 Folders []*Folder `json:"folders,omitempty"`
1012
1013
1014 NextPageToken string `json:"nextPageToken,omitempty"`
1015
1016
1017 googleapi.ServerResponse `json:"-"`
1018
1019
1020
1021
1022
1023 ForceSendFields []string `json:"-"`
1024
1025
1026
1027
1028 NullFields []string `json:"-"`
1029 }
1030
1031 func (s *ListFoldersResponse) MarshalJSON() ([]byte, error) {
1032 type NoMethod ListFoldersResponse
1033 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1034 }
1035
1036
1037 type ListLiensResponse struct {
1038
1039 Liens []*Lien `json:"liens,omitempty"`
1040
1041
1042 NextPageToken string `json:"nextPageToken,omitempty"`
1043
1044
1045 googleapi.ServerResponse `json:"-"`
1046
1047
1048
1049
1050
1051 ForceSendFields []string `json:"-"`
1052
1053
1054
1055
1056 NullFields []string `json:"-"`
1057 }
1058
1059 func (s *ListLiensResponse) MarshalJSON() ([]byte, error) {
1060 type NoMethod ListLiensResponse
1061 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1062 }
1063
1064
1065
1066
1067
1068
1069 type ListProjectsResponse struct {
1070
1071
1072
1073
1074
1075
1076
1077 NextPageToken string `json:"nextPageToken,omitempty"`
1078
1079 Projects []*Project `json:"projects,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 *ListProjectsResponse) MarshalJSON() ([]byte, error) {
1097 type NoMethod ListProjectsResponse
1098 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1099 }
1100
1101
1102 type ListTagBindingsResponse struct {
1103
1104
1105
1106
1107
1108
1109
1110 NextPageToken string `json:"nextPageToken,omitempty"`
1111
1112
1113 TagBindings []*TagBinding `json:"tagBindings,omitempty"`
1114
1115
1116 googleapi.ServerResponse `json:"-"`
1117
1118
1119
1120
1121
1122 ForceSendFields []string `json:"-"`
1123
1124
1125
1126
1127 NullFields []string `json:"-"`
1128 }
1129
1130 func (s *ListTagBindingsResponse) MarshalJSON() ([]byte, error) {
1131 type NoMethod ListTagBindingsResponse
1132 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1133 }
1134
1135
1136 type ListTagHoldsResponse struct {
1137
1138
1139
1140
1141
1142
1143
1144 NextPageToken string `json:"nextPageToken,omitempty"`
1145
1146 TagHolds []*TagHold `json:"tagHolds,omitempty"`
1147
1148
1149 googleapi.ServerResponse `json:"-"`
1150
1151
1152
1153
1154
1155 ForceSendFields []string `json:"-"`
1156
1157
1158
1159
1160 NullFields []string `json:"-"`
1161 }
1162
1163 func (s *ListTagHoldsResponse) MarshalJSON() ([]byte, error) {
1164 type NoMethod ListTagHoldsResponse
1165 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1166 }
1167
1168
1169 type ListTagKeysResponse struct {
1170
1171
1172 NextPageToken string `json:"nextPageToken,omitempty"`
1173
1174
1175 TagKeys []*TagKey `json:"tagKeys,omitempty"`
1176
1177
1178 googleapi.ServerResponse `json:"-"`
1179
1180
1181
1182
1183
1184 ForceSendFields []string `json:"-"`
1185
1186
1187
1188
1189 NullFields []string `json:"-"`
1190 }
1191
1192 func (s *ListTagKeysResponse) MarshalJSON() ([]byte, error) {
1193 type NoMethod ListTagKeysResponse
1194 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1195 }
1196
1197
1198 type ListTagValuesResponse struct {
1199
1200
1201
1202
1203 NextPageToken string `json:"nextPageToken,omitempty"`
1204
1205
1206 TagValues []*TagValue `json:"tagValues,omitempty"`
1207
1208
1209 googleapi.ServerResponse `json:"-"`
1210
1211
1212
1213
1214
1215 ForceSendFields []string `json:"-"`
1216
1217
1218
1219
1220 NullFields []string `json:"-"`
1221 }
1222
1223 func (s *ListTagValuesResponse) MarshalJSON() ([]byte, error) {
1224 type NoMethod ListTagValuesResponse
1225 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1226 }
1227
1228
1229 type MoveFolderMetadata struct {
1230
1231
1232 DestinationParent string `json:"destinationParent,omitempty"`
1233
1234 DisplayName string `json:"displayName,omitempty"`
1235
1236 SourceParent string `json:"sourceParent,omitempty"`
1237
1238
1239
1240
1241
1242 ForceSendFields []string `json:"-"`
1243
1244
1245
1246
1247 NullFields []string `json:"-"`
1248 }
1249
1250 func (s *MoveFolderMetadata) MarshalJSON() ([]byte, error) {
1251 type NoMethod MoveFolderMetadata
1252 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1253 }
1254
1255
1256 type MoveFolderRequest struct {
1257
1258
1259
1260 DestinationParent string `json:"destinationParent,omitempty"`
1261
1262
1263
1264
1265
1266 ForceSendFields []string `json:"-"`
1267
1268
1269
1270
1271 NullFields []string `json:"-"`
1272 }
1273
1274 func (s *MoveFolderRequest) MarshalJSON() ([]byte, error) {
1275 type NoMethod MoveFolderRequest
1276 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1277 }
1278
1279
1280
1281 type MoveProjectMetadata struct {
1282 }
1283
1284
1285 type MoveProjectRequest struct {
1286
1287 DestinationParent string `json:"destinationParent,omitempty"`
1288
1289
1290
1291
1292
1293 ForceSendFields []string `json:"-"`
1294
1295
1296
1297
1298 NullFields []string `json:"-"`
1299 }
1300
1301 func (s *MoveProjectRequest) MarshalJSON() ([]byte, error) {
1302 type NoMethod MoveProjectRequest
1303 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1304 }
1305
1306
1307
1308 type Operation struct {
1309
1310
1311
1312 Done bool `json:"done,omitempty"`
1313
1314 Error *Status `json:"error,omitempty"`
1315
1316
1317
1318
1319 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
1320
1321
1322
1323 Name string `json:"name,omitempty"`
1324
1325
1326
1327
1328
1329
1330
1331 Response googleapi.RawMessage `json:"response,omitempty"`
1332
1333
1334 googleapi.ServerResponse `json:"-"`
1335
1336
1337
1338
1339
1340 ForceSendFields []string `json:"-"`
1341
1342
1343
1344
1345 NullFields []string `json:"-"`
1346 }
1347
1348 func (s *Operation) MarshalJSON() ([]byte, error) {
1349 type NoMethod Operation
1350 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1351 }
1352
1353
1354
1355 type Organization struct {
1356
1357 CreateTime string `json:"createTime,omitempty"`
1358
1359
1360 DeleteTime string `json:"deleteTime,omitempty"`
1361
1362
1363 DirectoryCustomerId string `json:"directoryCustomerId,omitempty"`
1364
1365
1366
1367
1368
1369 DisplayName string `json:"displayName,omitempty"`
1370
1371
1372
1373 Etag string `json:"etag,omitempty"`
1374
1375
1376
1377 Name string `json:"name,omitempty"`
1378
1379
1380
1381
1382
1383
1384
1385
1386 State string `json:"state,omitempty"`
1387
1388 UpdateTime string `json:"updateTime,omitempty"`
1389
1390
1391 googleapi.ServerResponse `json:"-"`
1392
1393
1394
1395
1396
1397 ForceSendFields []string `json:"-"`
1398
1399
1400
1401
1402 NullFields []string `json:"-"`
1403 }
1404
1405 func (s *Organization) MarshalJSON() ([]byte, error) {
1406 type NoMethod Organization
1407 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1408 }
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440 type Policy struct {
1441
1442 AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"`
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452 Bindings []*Binding `json:"bindings,omitempty"`
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464 Etag string `json:"etag,omitempty"`
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480 Version int64 `json:"version,omitempty"`
1481
1482
1483 googleapi.ServerResponse `json:"-"`
1484
1485
1486
1487
1488
1489 ForceSendFields []string `json:"-"`
1490
1491
1492
1493
1494 NullFields []string `json:"-"`
1495 }
1496
1497 func (s *Policy) MarshalJSON() ([]byte, error) {
1498 type NoMethod Policy
1499 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1500 }
1501
1502
1503
1504
1505 type Project struct {
1506
1507 CreateTime string `json:"createTime,omitempty"`
1508
1509
1510 DeleteTime string `json:"deleteTime,omitempty"`
1511
1512
1513
1514
1515 DisplayName string `json:"displayName,omitempty"`
1516
1517
1518
1519 Etag string `json:"etag,omitempty"`
1520
1521
1522
1523
1524
1525
1526
1527
1528 Labels map[string]string `json:"labels,omitempty"`
1529
1530
1531 Name string `json:"name,omitempty"`
1532
1533
1534 Parent string `json:"parent,omitempty"`
1535
1536
1537
1538 ProjectId string `json:"projectId,omitempty"`
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548 State string `json:"state,omitempty"`
1549
1550
1551
1552
1553 Tags map[string]string `json:"tags,omitempty"`
1554
1555 UpdateTime string `json:"updateTime,omitempty"`
1556
1557
1558 googleapi.ServerResponse `json:"-"`
1559
1560
1561
1562
1563
1564 ForceSendFields []string `json:"-"`
1565
1566
1567
1568
1569 NullFields []string `json:"-"`
1570 }
1571
1572 func (s *Project) MarshalJSON() ([]byte, error) {
1573 type NoMethod Project
1574 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1575 }
1576
1577
1578
1579
1580 type ProjectCreationStatus struct {
1581
1582 CreateTime string `json:"createTime,omitempty"`
1583
1584
1585
1586 Gettable bool `json:"gettable,omitempty"`
1587
1588 Ready bool `json:"ready,omitempty"`
1589
1590
1591
1592
1593
1594 ForceSendFields []string `json:"-"`
1595
1596
1597
1598
1599 NullFields []string `json:"-"`
1600 }
1601
1602 func (s *ProjectCreationStatus) MarshalJSON() ([]byte, error) {
1603 type NoMethod ProjectCreationStatus
1604 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1605 }
1606
1607
1608 type SearchFoldersResponse struct {
1609
1610
1611 Folders []*Folder `json:"folders,omitempty"`
1612
1613
1614 NextPageToken string `json:"nextPageToken,omitempty"`
1615
1616
1617 googleapi.ServerResponse `json:"-"`
1618
1619
1620
1621
1622
1623 ForceSendFields []string `json:"-"`
1624
1625
1626
1627
1628 NullFields []string `json:"-"`
1629 }
1630
1631 func (s *SearchFoldersResponse) MarshalJSON() ([]byte, error) {
1632 type NoMethod SearchFoldersResponse
1633 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1634 }
1635
1636
1637
1638 type SearchOrganizationsResponse struct {
1639
1640
1641
1642
1643
1644 NextPageToken string `json:"nextPageToken,omitempty"`
1645
1646
1647 Organizations []*Organization `json:"organizations,omitempty"`
1648
1649
1650 googleapi.ServerResponse `json:"-"`
1651
1652
1653
1654
1655
1656 ForceSendFields []string `json:"-"`
1657
1658
1659
1660
1661 NullFields []string `json:"-"`
1662 }
1663
1664 func (s *SearchOrganizationsResponse) MarshalJSON() ([]byte, error) {
1665 type NoMethod SearchOrganizationsResponse
1666 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1667 }
1668
1669
1670
1671
1672
1673 type SearchProjectsResponse struct {
1674
1675
1676
1677
1678
1679
1680
1681 NextPageToken string `json:"nextPageToken,omitempty"`
1682
1683
1684 Projects []*Project `json:"projects,omitempty"`
1685
1686
1687 googleapi.ServerResponse `json:"-"`
1688
1689
1690
1691
1692
1693 ForceSendFields []string `json:"-"`
1694
1695
1696
1697
1698 NullFields []string `json:"-"`
1699 }
1700
1701 func (s *SearchProjectsResponse) MarshalJSON() ([]byte, error) {
1702 type NoMethod SearchProjectsResponse
1703 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1704 }
1705
1706
1707 type SetIamPolicyRequest struct {
1708
1709
1710
1711
1712 Policy *Policy `json:"policy,omitempty"`
1713
1714
1715
1716 UpdateMask string `json:"updateMask,omitempty"`
1717
1718
1719
1720
1721
1722 ForceSendFields []string `json:"-"`
1723
1724
1725
1726
1727 NullFields []string `json:"-"`
1728 }
1729
1730 func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
1731 type NoMethod SetIamPolicyRequest
1732 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1733 }
1734
1735
1736
1737
1738
1739
1740
1741 type Status struct {
1742
1743 Code int64 `json:"code,omitempty"`
1744
1745
1746 Details []googleapi.RawMessage `json:"details,omitempty"`
1747
1748
1749
1750 Message string `json:"message,omitempty"`
1751
1752
1753
1754
1755
1756 ForceSendFields []string `json:"-"`
1757
1758
1759
1760
1761 NullFields []string `json:"-"`
1762 }
1763
1764 func (s *Status) MarshalJSON() ([]byte, error) {
1765 type NoMethod Status
1766 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1767 }
1768
1769
1770
1771
1772 type TagBinding struct {
1773
1774
1775
1776
1777 Name string `json:"name,omitempty"`
1778
1779
1780 Parent string `json:"parent,omitempty"`
1781
1782
1783 TagValue string `json:"tagValue,omitempty"`
1784
1785
1786
1787
1788
1789 TagValueNamespacedName string `json:"tagValueNamespacedName,omitempty"`
1790
1791
1792
1793
1794
1795 ForceSendFields []string `json:"-"`
1796
1797
1798
1799
1800 NullFields []string `json:"-"`
1801 }
1802
1803 func (s *TagBinding) MarshalJSON() ([]byte, error) {
1804 type NoMethod TagBinding
1805 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1806 }
1807
1808
1809
1810
1811
1812 type TagHold struct {
1813
1814 CreateTime string `json:"createTime,omitempty"`
1815
1816
1817
1818
1819 HelpLink string `json:"helpLink,omitempty"`
1820
1821
1822
1823
1824 Holder string `json:"holder,omitempty"`
1825
1826
1827
1828
1829 Name string `json:"name,omitempty"`
1830
1831
1832
1833
1834 Origin string `json:"origin,omitempty"`
1835
1836
1837
1838
1839
1840 ForceSendFields []string `json:"-"`
1841
1842
1843
1844
1845 NullFields []string `json:"-"`
1846 }
1847
1848 func (s *TagHold) MarshalJSON() ([]byte, error) {
1849 type NoMethod TagHold
1850 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1851 }
1852
1853
1854 type TagKey struct {
1855
1856 CreateTime string `json:"createTime,omitempty"`
1857
1858
1859 Description string `json:"description,omitempty"`
1860
1861
1862
1863 Etag string `json:"etag,omitempty"`
1864
1865
1866
1867 Name string `json:"name,omitempty"`
1868
1869 NamespacedName string `json:"namespacedName,omitempty"`
1870
1871
1872
1873
1874
1875 Parent string `json:"parent,omitempty"`
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896 Purpose string `json:"purpose,omitempty"`
1897
1898
1899
1900 PurposeData map[string]string `json:"purposeData,omitempty"`
1901
1902
1903
1904
1905
1906 ShortName string `json:"shortName,omitempty"`
1907
1908 UpdateTime string `json:"updateTime,omitempty"`
1909
1910
1911 googleapi.ServerResponse `json:"-"`
1912
1913
1914
1915
1916
1917 ForceSendFields []string `json:"-"`
1918
1919
1920
1921
1922 NullFields []string `json:"-"`
1923 }
1924
1925 func (s *TagKey) MarshalJSON() ([]byte, error) {
1926 type NoMethod TagKey
1927 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1928 }
1929
1930
1931
1932 type TagValue struct {
1933
1934 CreateTime string `json:"createTime,omitempty"`
1935
1936
1937 Description string `json:"description,omitempty"`
1938
1939
1940
1941 Etag string `json:"etag,omitempty"`
1942
1943 Name string `json:"name,omitempty"`
1944
1945
1946
1947
1948 NamespacedName string `json:"namespacedName,omitempty"`
1949
1950
1951 Parent string `json:"parent,omitempty"`
1952
1953
1954
1955
1956
1957 ShortName string `json:"shortName,omitempty"`
1958
1959 UpdateTime string `json:"updateTime,omitempty"`
1960
1961
1962 googleapi.ServerResponse `json:"-"`
1963
1964
1965
1966
1967
1968 ForceSendFields []string `json:"-"`
1969
1970
1971
1972
1973 NullFields []string `json:"-"`
1974 }
1975
1976 func (s *TagValue) MarshalJSON() ([]byte, error) {
1977 type NoMethod TagValue
1978 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1979 }
1980
1981
1982 type TestIamPermissionsRequest struct {
1983
1984
1985
1986
1987 Permissions []string `json:"permissions,omitempty"`
1988
1989
1990
1991
1992
1993 ForceSendFields []string `json:"-"`
1994
1995
1996
1997
1998 NullFields []string `json:"-"`
1999 }
2000
2001 func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
2002 type NoMethod TestIamPermissionsRequest
2003 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2004 }
2005
2006
2007
2008 type TestIamPermissionsResponse struct {
2009
2010
2011 Permissions []string `json:"permissions,omitempty"`
2012
2013
2014 googleapi.ServerResponse `json:"-"`
2015
2016
2017
2018
2019
2020 ForceSendFields []string `json:"-"`
2021
2022
2023
2024
2025 NullFields []string `json:"-"`
2026 }
2027
2028 func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
2029 type NoMethod TestIamPermissionsResponse
2030 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2031 }
2032
2033
2034
2035 type UndeleteFolderMetadata struct {
2036 }
2037
2038
2039 type UndeleteFolderRequest struct {
2040 }
2041
2042
2043
2044 type UndeleteOrganizationMetadata struct {
2045 }
2046
2047
2048
2049 type UndeleteProjectMetadata struct {
2050 }
2051
2052
2053 type UndeleteProjectRequest struct {
2054 }
2055
2056
2057
2058 type UpdateFolderMetadata struct {
2059 }
2060
2061
2062
2063 type UpdateProjectMetadata struct {
2064 }
2065
2066
2067 type UpdateTagKeyMetadata struct {
2068 }
2069
2070
2071
2072 type UpdateTagValueMetadata struct {
2073 }
2074
2075 type EffectiveTagsListCall struct {
2076 s *Service
2077 urlParams_ gensupport.URLParams
2078 ifNoneMatch_ string
2079 ctx_ context.Context
2080 header_ http.Header
2081 }
2082
2083
2084
2085 func (r *EffectiveTagsService) List() *EffectiveTagsListCall {
2086 c := &EffectiveTagsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2087 return c
2088 }
2089
2090
2091
2092
2093
2094 func (c *EffectiveTagsListCall) PageSize(pageSize int64) *EffectiveTagsListCall {
2095 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
2096 return c
2097 }
2098
2099
2100
2101
2102 func (c *EffectiveTagsListCall) PageToken(pageToken string) *EffectiveTagsListCall {
2103 c.urlParams_.Set("pageToken", pageToken)
2104 return c
2105 }
2106
2107
2108
2109
2110 func (c *EffectiveTagsListCall) Parent(parent string) *EffectiveTagsListCall {
2111 c.urlParams_.Set("parent", parent)
2112 return c
2113 }
2114
2115
2116
2117
2118 func (c *EffectiveTagsListCall) Fields(s ...googleapi.Field) *EffectiveTagsListCall {
2119 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2120 return c
2121 }
2122
2123
2124
2125
2126 func (c *EffectiveTagsListCall) IfNoneMatch(entityTag string) *EffectiveTagsListCall {
2127 c.ifNoneMatch_ = entityTag
2128 return c
2129 }
2130
2131
2132 func (c *EffectiveTagsListCall) Context(ctx context.Context) *EffectiveTagsListCall {
2133 c.ctx_ = ctx
2134 return c
2135 }
2136
2137
2138
2139 func (c *EffectiveTagsListCall) Header() http.Header {
2140 if c.header_ == nil {
2141 c.header_ = make(http.Header)
2142 }
2143 return c.header_
2144 }
2145
2146 func (c *EffectiveTagsListCall) doRequest(alt string) (*http.Response, error) {
2147 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2148 if c.ifNoneMatch_ != "" {
2149 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2150 }
2151 var body io.Reader = nil
2152 c.urlParams_.Set("alt", alt)
2153 c.urlParams_.Set("prettyPrint", "false")
2154 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/effectiveTags")
2155 urls += "?" + c.urlParams_.Encode()
2156 req, err := http.NewRequest("GET", urls, body)
2157 if err != nil {
2158 return nil, err
2159 }
2160 req.Header = reqHeaders
2161 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2162 }
2163
2164
2165
2166
2167
2168
2169
2170 func (c *EffectiveTagsListCall) Do(opts ...googleapi.CallOption) (*ListEffectiveTagsResponse, error) {
2171 gensupport.SetOptions(c.urlParams_, opts...)
2172 res, err := c.doRequest("json")
2173 if res != nil && res.StatusCode == http.StatusNotModified {
2174 if res.Body != nil {
2175 res.Body.Close()
2176 }
2177 return nil, gensupport.WrapError(&googleapi.Error{
2178 Code: res.StatusCode,
2179 Header: res.Header,
2180 })
2181 }
2182 if err != nil {
2183 return nil, err
2184 }
2185 defer googleapi.CloseBody(res)
2186 if err := googleapi.CheckResponse(res); err != nil {
2187 return nil, gensupport.WrapError(err)
2188 }
2189 ret := &ListEffectiveTagsResponse{
2190 ServerResponse: googleapi.ServerResponse{
2191 Header: res.Header,
2192 HTTPStatusCode: res.StatusCode,
2193 },
2194 }
2195 target := &ret
2196 if err := gensupport.DecodeResponse(target, res); err != nil {
2197 return nil, err
2198 }
2199 return ret, nil
2200 }
2201
2202
2203
2204
2205 func (c *EffectiveTagsListCall) Pages(ctx context.Context, f func(*ListEffectiveTagsResponse) error) error {
2206 c.ctx_ = ctx
2207 defer c.PageToken(c.urlParams_.Get("pageToken"))
2208 for {
2209 x, err := c.Do()
2210 if err != nil {
2211 return err
2212 }
2213 if err := f(x); err != nil {
2214 return err
2215 }
2216 if x.NextPageToken == "" {
2217 return nil
2218 }
2219 c.PageToken(x.NextPageToken)
2220 }
2221 }
2222
2223 type FoldersCreateCall struct {
2224 s *Service
2225 folder *Folder
2226 urlParams_ gensupport.URLParams
2227 ctx_ context.Context
2228 header_ http.Header
2229 }
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249 func (r *FoldersService) Create(folder *Folder) *FoldersCreateCall {
2250 c := &FoldersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2251 c.folder = folder
2252 return c
2253 }
2254
2255
2256
2257
2258 func (c *FoldersCreateCall) Fields(s ...googleapi.Field) *FoldersCreateCall {
2259 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2260 return c
2261 }
2262
2263
2264 func (c *FoldersCreateCall) Context(ctx context.Context) *FoldersCreateCall {
2265 c.ctx_ = ctx
2266 return c
2267 }
2268
2269
2270
2271 func (c *FoldersCreateCall) Header() http.Header {
2272 if c.header_ == nil {
2273 c.header_ = make(http.Header)
2274 }
2275 return c.header_
2276 }
2277
2278 func (c *FoldersCreateCall) doRequest(alt string) (*http.Response, error) {
2279 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2280 var body io.Reader = nil
2281 body, err := googleapi.WithoutDataWrapper.JSONReader(c.folder)
2282 if err != nil {
2283 return nil, err
2284 }
2285 c.urlParams_.Set("alt", alt)
2286 c.urlParams_.Set("prettyPrint", "false")
2287 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/folders")
2288 urls += "?" + c.urlParams_.Encode()
2289 req, err := http.NewRequest("POST", urls, body)
2290 if err != nil {
2291 return nil, err
2292 }
2293 req.Header = reqHeaders
2294 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2295 }
2296
2297
2298
2299
2300
2301
2302 func (c *FoldersCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
2303 gensupport.SetOptions(c.urlParams_, opts...)
2304 res, err := c.doRequest("json")
2305 if res != nil && res.StatusCode == http.StatusNotModified {
2306 if res.Body != nil {
2307 res.Body.Close()
2308 }
2309 return nil, gensupport.WrapError(&googleapi.Error{
2310 Code: res.StatusCode,
2311 Header: res.Header,
2312 })
2313 }
2314 if err != nil {
2315 return nil, err
2316 }
2317 defer googleapi.CloseBody(res)
2318 if err := googleapi.CheckResponse(res); err != nil {
2319 return nil, gensupport.WrapError(err)
2320 }
2321 ret := &Operation{
2322 ServerResponse: googleapi.ServerResponse{
2323 Header: res.Header,
2324 HTTPStatusCode: res.StatusCode,
2325 },
2326 }
2327 target := &ret
2328 if err := gensupport.DecodeResponse(target, res); err != nil {
2329 return nil, err
2330 }
2331 return ret, nil
2332 }
2333
2334 type FoldersDeleteCall struct {
2335 s *Service
2336 name string
2337 urlParams_ gensupport.URLParams
2338 ctx_ context.Context
2339 header_ http.Header
2340 }
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352 func (r *FoldersService) Delete(name string) *FoldersDeleteCall {
2353 c := &FoldersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2354 c.name = name
2355 return c
2356 }
2357
2358
2359
2360
2361 func (c *FoldersDeleteCall) Fields(s ...googleapi.Field) *FoldersDeleteCall {
2362 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2363 return c
2364 }
2365
2366
2367 func (c *FoldersDeleteCall) Context(ctx context.Context) *FoldersDeleteCall {
2368 c.ctx_ = ctx
2369 return c
2370 }
2371
2372
2373
2374 func (c *FoldersDeleteCall) Header() http.Header {
2375 if c.header_ == nil {
2376 c.header_ = make(http.Header)
2377 }
2378 return c.header_
2379 }
2380
2381 func (c *FoldersDeleteCall) doRequest(alt string) (*http.Response, error) {
2382 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2383 var body io.Reader = nil
2384 c.urlParams_.Set("alt", alt)
2385 c.urlParams_.Set("prettyPrint", "false")
2386 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}")
2387 urls += "?" + c.urlParams_.Encode()
2388 req, err := http.NewRequest("DELETE", urls, body)
2389 if err != nil {
2390 return nil, err
2391 }
2392 req.Header = reqHeaders
2393 googleapi.Expand(req.URL, map[string]string{
2394 "name": c.name,
2395 })
2396 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2397 }
2398
2399
2400
2401
2402
2403
2404 func (c *FoldersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
2405 gensupport.SetOptions(c.urlParams_, opts...)
2406 res, err := c.doRequest("json")
2407 if res != nil && res.StatusCode == http.StatusNotModified {
2408 if res.Body != nil {
2409 res.Body.Close()
2410 }
2411 return nil, gensupport.WrapError(&googleapi.Error{
2412 Code: res.StatusCode,
2413 Header: res.Header,
2414 })
2415 }
2416 if err != nil {
2417 return nil, err
2418 }
2419 defer googleapi.CloseBody(res)
2420 if err := googleapi.CheckResponse(res); err != nil {
2421 return nil, gensupport.WrapError(err)
2422 }
2423 ret := &Operation{
2424 ServerResponse: googleapi.ServerResponse{
2425 Header: res.Header,
2426 HTTPStatusCode: res.StatusCode,
2427 },
2428 }
2429 target := &ret
2430 if err := gensupport.DecodeResponse(target, res); err != nil {
2431 return nil, err
2432 }
2433 return ret, nil
2434 }
2435
2436 type FoldersGetCall struct {
2437 s *Service
2438 name string
2439 urlParams_ gensupport.URLParams
2440 ifNoneMatch_ string
2441 ctx_ context.Context
2442 header_ http.Header
2443 }
2444
2445
2446
2447
2448
2449
2450
2451
2452 func (r *FoldersService) Get(name string) *FoldersGetCall {
2453 c := &FoldersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2454 c.name = name
2455 return c
2456 }
2457
2458
2459
2460
2461 func (c *FoldersGetCall) Fields(s ...googleapi.Field) *FoldersGetCall {
2462 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2463 return c
2464 }
2465
2466
2467
2468
2469 func (c *FoldersGetCall) IfNoneMatch(entityTag string) *FoldersGetCall {
2470 c.ifNoneMatch_ = entityTag
2471 return c
2472 }
2473
2474
2475 func (c *FoldersGetCall) Context(ctx context.Context) *FoldersGetCall {
2476 c.ctx_ = ctx
2477 return c
2478 }
2479
2480
2481
2482 func (c *FoldersGetCall) Header() http.Header {
2483 if c.header_ == nil {
2484 c.header_ = make(http.Header)
2485 }
2486 return c.header_
2487 }
2488
2489 func (c *FoldersGetCall) doRequest(alt string) (*http.Response, error) {
2490 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2491 if c.ifNoneMatch_ != "" {
2492 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2493 }
2494 var body io.Reader = nil
2495 c.urlParams_.Set("alt", alt)
2496 c.urlParams_.Set("prettyPrint", "false")
2497 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}")
2498 urls += "?" + c.urlParams_.Encode()
2499 req, err := http.NewRequest("GET", urls, body)
2500 if err != nil {
2501 return nil, err
2502 }
2503 req.Header = reqHeaders
2504 googleapi.Expand(req.URL, map[string]string{
2505 "name": c.name,
2506 })
2507 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2508 }
2509
2510
2511
2512
2513
2514
2515 func (c *FoldersGetCall) Do(opts ...googleapi.CallOption) (*Folder, error) {
2516 gensupport.SetOptions(c.urlParams_, opts...)
2517 res, err := c.doRequest("json")
2518 if res != nil && res.StatusCode == http.StatusNotModified {
2519 if res.Body != nil {
2520 res.Body.Close()
2521 }
2522 return nil, gensupport.WrapError(&googleapi.Error{
2523 Code: res.StatusCode,
2524 Header: res.Header,
2525 })
2526 }
2527 if err != nil {
2528 return nil, err
2529 }
2530 defer googleapi.CloseBody(res)
2531 if err := googleapi.CheckResponse(res); err != nil {
2532 return nil, gensupport.WrapError(err)
2533 }
2534 ret := &Folder{
2535 ServerResponse: googleapi.ServerResponse{
2536 Header: res.Header,
2537 HTTPStatusCode: res.StatusCode,
2538 },
2539 }
2540 target := &ret
2541 if err := gensupport.DecodeResponse(target, res); err != nil {
2542 return nil, err
2543 }
2544 return ret, nil
2545 }
2546
2547 type FoldersGetIamPolicyCall struct {
2548 s *Service
2549 resource string
2550 getiampolicyrequest *GetIamPolicyRequest
2551 urlParams_ gensupport.URLParams
2552 ctx_ context.Context
2553 header_ http.Header
2554 }
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565 func (r *FoldersService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *FoldersGetIamPolicyCall {
2566 c := &FoldersGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2567 c.resource = resource
2568 c.getiampolicyrequest = getiampolicyrequest
2569 return c
2570 }
2571
2572
2573
2574
2575 func (c *FoldersGetIamPolicyCall) Fields(s ...googleapi.Field) *FoldersGetIamPolicyCall {
2576 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2577 return c
2578 }
2579
2580
2581 func (c *FoldersGetIamPolicyCall) Context(ctx context.Context) *FoldersGetIamPolicyCall {
2582 c.ctx_ = ctx
2583 return c
2584 }
2585
2586
2587
2588 func (c *FoldersGetIamPolicyCall) Header() http.Header {
2589 if c.header_ == nil {
2590 c.header_ = make(http.Header)
2591 }
2592 return c.header_
2593 }
2594
2595 func (c *FoldersGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
2596 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2597 var body io.Reader = nil
2598 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
2599 if err != nil {
2600 return nil, err
2601 }
2602 c.urlParams_.Set("alt", alt)
2603 c.urlParams_.Set("prettyPrint", "false")
2604 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+resource}:getIamPolicy")
2605 urls += "?" + c.urlParams_.Encode()
2606 req, err := http.NewRequest("POST", urls, body)
2607 if err != nil {
2608 return nil, err
2609 }
2610 req.Header = reqHeaders
2611 googleapi.Expand(req.URL, map[string]string{
2612 "resource": c.resource,
2613 })
2614 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2615 }
2616
2617
2618
2619
2620
2621
2622 func (c *FoldersGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
2623 gensupport.SetOptions(c.urlParams_, opts...)
2624 res, err := c.doRequest("json")
2625 if res != nil && res.StatusCode == http.StatusNotModified {
2626 if res.Body != nil {
2627 res.Body.Close()
2628 }
2629 return nil, gensupport.WrapError(&googleapi.Error{
2630 Code: res.StatusCode,
2631 Header: res.Header,
2632 })
2633 }
2634 if err != nil {
2635 return nil, err
2636 }
2637 defer googleapi.CloseBody(res)
2638 if err := googleapi.CheckResponse(res); err != nil {
2639 return nil, gensupport.WrapError(err)
2640 }
2641 ret := &Policy{
2642 ServerResponse: googleapi.ServerResponse{
2643 Header: res.Header,
2644 HTTPStatusCode: res.StatusCode,
2645 },
2646 }
2647 target := &ret
2648 if err := gensupport.DecodeResponse(target, res); err != nil {
2649 return nil, err
2650 }
2651 return ret, nil
2652 }
2653
2654 type FoldersListCall struct {
2655 s *Service
2656 urlParams_ gensupport.URLParams
2657 ifNoneMatch_ string
2658 ctx_ context.Context
2659 header_ http.Header
2660 }
2661
2662
2663
2664
2665
2666
2667
2668 func (r *FoldersService) List() *FoldersListCall {
2669 c := &FoldersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2670 return c
2671 }
2672
2673
2674
2675
2676 func (c *FoldersListCall) PageSize(pageSize int64) *FoldersListCall {
2677 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
2678 return c
2679 }
2680
2681
2682
2683
2684 func (c *FoldersListCall) PageToken(pageToken string) *FoldersListCall {
2685 c.urlParams_.Set("pageToken", pageToken)
2686 return c
2687 }
2688
2689
2690
2691
2692
2693
2694
2695 func (c *FoldersListCall) Parent(parent string) *FoldersListCall {
2696 c.urlParams_.Set("parent", parent)
2697 return c
2698 }
2699
2700
2701
2702 func (c *FoldersListCall) ShowDeleted(showDeleted bool) *FoldersListCall {
2703 c.urlParams_.Set("showDeleted", fmt.Sprint(showDeleted))
2704 return c
2705 }
2706
2707
2708
2709
2710 func (c *FoldersListCall) Fields(s ...googleapi.Field) *FoldersListCall {
2711 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2712 return c
2713 }
2714
2715
2716
2717
2718 func (c *FoldersListCall) IfNoneMatch(entityTag string) *FoldersListCall {
2719 c.ifNoneMatch_ = entityTag
2720 return c
2721 }
2722
2723
2724 func (c *FoldersListCall) Context(ctx context.Context) *FoldersListCall {
2725 c.ctx_ = ctx
2726 return c
2727 }
2728
2729
2730
2731 func (c *FoldersListCall) Header() http.Header {
2732 if c.header_ == nil {
2733 c.header_ = make(http.Header)
2734 }
2735 return c.header_
2736 }
2737
2738 func (c *FoldersListCall) doRequest(alt string) (*http.Response, error) {
2739 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2740 if c.ifNoneMatch_ != "" {
2741 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2742 }
2743 var body io.Reader = nil
2744 c.urlParams_.Set("alt", alt)
2745 c.urlParams_.Set("prettyPrint", "false")
2746 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/folders")
2747 urls += "?" + c.urlParams_.Encode()
2748 req, err := http.NewRequest("GET", urls, body)
2749 if err != nil {
2750 return nil, err
2751 }
2752 req.Header = reqHeaders
2753 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2754 }
2755
2756
2757
2758
2759
2760
2761
2762 func (c *FoldersListCall) Do(opts ...googleapi.CallOption) (*ListFoldersResponse, error) {
2763 gensupport.SetOptions(c.urlParams_, opts...)
2764 res, err := c.doRequest("json")
2765 if res != nil && res.StatusCode == http.StatusNotModified {
2766 if res.Body != nil {
2767 res.Body.Close()
2768 }
2769 return nil, gensupport.WrapError(&googleapi.Error{
2770 Code: res.StatusCode,
2771 Header: res.Header,
2772 })
2773 }
2774 if err != nil {
2775 return nil, err
2776 }
2777 defer googleapi.CloseBody(res)
2778 if err := googleapi.CheckResponse(res); err != nil {
2779 return nil, gensupport.WrapError(err)
2780 }
2781 ret := &ListFoldersResponse{
2782 ServerResponse: googleapi.ServerResponse{
2783 Header: res.Header,
2784 HTTPStatusCode: res.StatusCode,
2785 },
2786 }
2787 target := &ret
2788 if err := gensupport.DecodeResponse(target, res); err != nil {
2789 return nil, err
2790 }
2791 return ret, nil
2792 }
2793
2794
2795
2796
2797 func (c *FoldersListCall) Pages(ctx context.Context, f func(*ListFoldersResponse) error) error {
2798 c.ctx_ = ctx
2799 defer c.PageToken(c.urlParams_.Get("pageToken"))
2800 for {
2801 x, err := c.Do()
2802 if err != nil {
2803 return err
2804 }
2805 if err := f(x); err != nil {
2806 return err
2807 }
2808 if x.NextPageToken == "" {
2809 return nil
2810 }
2811 c.PageToken(x.NextPageToken)
2812 }
2813 }
2814
2815 type FoldersMoveCall struct {
2816 s *Service
2817 name string
2818 movefolderrequest *MoveFolderRequest
2819 urlParams_ gensupport.URLParams
2820 ctx_ context.Context
2821 header_ http.Header
2822 }
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840 func (r *FoldersService) Move(name string, movefolderrequest *MoveFolderRequest) *FoldersMoveCall {
2841 c := &FoldersMoveCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2842 c.name = name
2843 c.movefolderrequest = movefolderrequest
2844 return c
2845 }
2846
2847
2848
2849
2850 func (c *FoldersMoveCall) Fields(s ...googleapi.Field) *FoldersMoveCall {
2851 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2852 return c
2853 }
2854
2855
2856 func (c *FoldersMoveCall) Context(ctx context.Context) *FoldersMoveCall {
2857 c.ctx_ = ctx
2858 return c
2859 }
2860
2861
2862
2863 func (c *FoldersMoveCall) Header() http.Header {
2864 if c.header_ == nil {
2865 c.header_ = make(http.Header)
2866 }
2867 return c.header_
2868 }
2869
2870 func (c *FoldersMoveCall) 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.movefolderrequest)
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, "v3/{+name}:move")
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 "name": c.name,
2888 })
2889 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2890 }
2891
2892
2893
2894
2895
2896
2897 func (c *FoldersMoveCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{
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 FoldersPatchCall struct {
2930 s *Service
2931 name string
2932 folder *Folder
2933 urlParams_ gensupport.URLParams
2934 ctx_ context.Context
2935 header_ http.Header
2936 }
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951 func (r *FoldersService) Patch(name string, folder *Folder) *FoldersPatchCall {
2952 c := &FoldersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2953 c.name = name
2954 c.folder = folder
2955 return c
2956 }
2957
2958
2959
2960 func (c *FoldersPatchCall) UpdateMask(updateMask string) *FoldersPatchCall {
2961 c.urlParams_.Set("updateMask", updateMask)
2962 return c
2963 }
2964
2965
2966
2967
2968 func (c *FoldersPatchCall) Fields(s ...googleapi.Field) *FoldersPatchCall {
2969 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2970 return c
2971 }
2972
2973
2974 func (c *FoldersPatchCall) Context(ctx context.Context) *FoldersPatchCall {
2975 c.ctx_ = ctx
2976 return c
2977 }
2978
2979
2980
2981 func (c *FoldersPatchCall) Header() http.Header {
2982 if c.header_ == nil {
2983 c.header_ = make(http.Header)
2984 }
2985 return c.header_
2986 }
2987
2988 func (c *FoldersPatchCall) doRequest(alt string) (*http.Response, error) {
2989 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2990 var body io.Reader = nil
2991 body, err := googleapi.WithoutDataWrapper.JSONReader(c.folder)
2992 if err != nil {
2993 return nil, err
2994 }
2995 c.urlParams_.Set("alt", alt)
2996 c.urlParams_.Set("prettyPrint", "false")
2997 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}")
2998 urls += "?" + c.urlParams_.Encode()
2999 req, err := http.NewRequest("PATCH", urls, body)
3000 if err != nil {
3001 return nil, err
3002 }
3003 req.Header = reqHeaders
3004 googleapi.Expand(req.URL, map[string]string{
3005 "name": c.name,
3006 })
3007 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3008 }
3009
3010
3011
3012
3013
3014
3015 func (c *FoldersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3016 gensupport.SetOptions(c.urlParams_, opts...)
3017 res, err := c.doRequest("json")
3018 if res != nil && res.StatusCode == http.StatusNotModified {
3019 if res.Body != nil {
3020 res.Body.Close()
3021 }
3022 return nil, gensupport.WrapError(&googleapi.Error{
3023 Code: res.StatusCode,
3024 Header: res.Header,
3025 })
3026 }
3027 if err != nil {
3028 return nil, err
3029 }
3030 defer googleapi.CloseBody(res)
3031 if err := googleapi.CheckResponse(res); err != nil {
3032 return nil, gensupport.WrapError(err)
3033 }
3034 ret := &Operation{
3035 ServerResponse: googleapi.ServerResponse{
3036 Header: res.Header,
3037 HTTPStatusCode: res.StatusCode,
3038 },
3039 }
3040 target := &ret
3041 if err := gensupport.DecodeResponse(target, res); err != nil {
3042 return nil, err
3043 }
3044 return ret, nil
3045 }
3046
3047 type FoldersSearchCall struct {
3048 s *Service
3049 urlParams_ gensupport.URLParams
3050 ifNoneMatch_ string
3051 ctx_ context.Context
3052 header_ http.Header
3053 }
3054
3055
3056
3057
3058
3059 func (r *FoldersService) Search() *FoldersSearchCall {
3060 c := &FoldersSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3061 return c
3062 }
3063
3064
3065
3066
3067 func (c *FoldersSearchCall) PageSize(pageSize int64) *FoldersSearchCall {
3068 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3069 return c
3070 }
3071
3072
3073
3074
3075 func (c *FoldersSearchCall) PageToken(pageToken string) *FoldersSearchCall {
3076 c.urlParams_.Set("pageToken", pageToken)
3077 return c
3078 }
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099 func (c *FoldersSearchCall) Query(query string) *FoldersSearchCall {
3100 c.urlParams_.Set("query", query)
3101 return c
3102 }
3103
3104
3105
3106
3107 func (c *FoldersSearchCall) Fields(s ...googleapi.Field) *FoldersSearchCall {
3108 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3109 return c
3110 }
3111
3112
3113
3114
3115 func (c *FoldersSearchCall) IfNoneMatch(entityTag string) *FoldersSearchCall {
3116 c.ifNoneMatch_ = entityTag
3117 return c
3118 }
3119
3120
3121 func (c *FoldersSearchCall) Context(ctx context.Context) *FoldersSearchCall {
3122 c.ctx_ = ctx
3123 return c
3124 }
3125
3126
3127
3128 func (c *FoldersSearchCall) Header() http.Header {
3129 if c.header_ == nil {
3130 c.header_ = make(http.Header)
3131 }
3132 return c.header_
3133 }
3134
3135 func (c *FoldersSearchCall) doRequest(alt string) (*http.Response, error) {
3136 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3137 if c.ifNoneMatch_ != "" {
3138 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3139 }
3140 var body io.Reader = nil
3141 c.urlParams_.Set("alt", alt)
3142 c.urlParams_.Set("prettyPrint", "false")
3143 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/folders:search")
3144 urls += "?" + c.urlParams_.Encode()
3145 req, err := http.NewRequest("GET", urls, body)
3146 if err != nil {
3147 return nil, err
3148 }
3149 req.Header = reqHeaders
3150 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3151 }
3152
3153
3154
3155
3156
3157
3158
3159 func (c *FoldersSearchCall) Do(opts ...googleapi.CallOption) (*SearchFoldersResponse, error) {
3160 gensupport.SetOptions(c.urlParams_, opts...)
3161 res, err := c.doRequest("json")
3162 if res != nil && res.StatusCode == http.StatusNotModified {
3163 if res.Body != nil {
3164 res.Body.Close()
3165 }
3166 return nil, gensupport.WrapError(&googleapi.Error{
3167 Code: res.StatusCode,
3168 Header: res.Header,
3169 })
3170 }
3171 if err != nil {
3172 return nil, err
3173 }
3174 defer googleapi.CloseBody(res)
3175 if err := googleapi.CheckResponse(res); err != nil {
3176 return nil, gensupport.WrapError(err)
3177 }
3178 ret := &SearchFoldersResponse{
3179 ServerResponse: googleapi.ServerResponse{
3180 Header: res.Header,
3181 HTTPStatusCode: res.StatusCode,
3182 },
3183 }
3184 target := &ret
3185 if err := gensupport.DecodeResponse(target, res); err != nil {
3186 return nil, err
3187 }
3188 return ret, nil
3189 }
3190
3191
3192
3193
3194 func (c *FoldersSearchCall) Pages(ctx context.Context, f func(*SearchFoldersResponse) error) error {
3195 c.ctx_ = ctx
3196 defer c.PageToken(c.urlParams_.Get("pageToken"))
3197 for {
3198 x, err := c.Do()
3199 if err != nil {
3200 return err
3201 }
3202 if err := f(x); err != nil {
3203 return err
3204 }
3205 if x.NextPageToken == "" {
3206 return nil
3207 }
3208 c.PageToken(x.NextPageToken)
3209 }
3210 }
3211
3212 type FoldersSetIamPolicyCall struct {
3213 s *Service
3214 resource string
3215 setiampolicyrequest *SetIamPolicyRequest
3216 urlParams_ gensupport.URLParams
3217 ctx_ context.Context
3218 header_ http.Header
3219 }
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229 func (r *FoldersService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *FoldersSetIamPolicyCall {
3230 c := &FoldersSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3231 c.resource = resource
3232 c.setiampolicyrequest = setiampolicyrequest
3233 return c
3234 }
3235
3236
3237
3238
3239 func (c *FoldersSetIamPolicyCall) Fields(s ...googleapi.Field) *FoldersSetIamPolicyCall {
3240 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3241 return c
3242 }
3243
3244
3245 func (c *FoldersSetIamPolicyCall) Context(ctx context.Context) *FoldersSetIamPolicyCall {
3246 c.ctx_ = ctx
3247 return c
3248 }
3249
3250
3251
3252 func (c *FoldersSetIamPolicyCall) Header() http.Header {
3253 if c.header_ == nil {
3254 c.header_ = make(http.Header)
3255 }
3256 return c.header_
3257 }
3258
3259 func (c *FoldersSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
3260 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3261 var body io.Reader = nil
3262 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
3263 if err != nil {
3264 return nil, err
3265 }
3266 c.urlParams_.Set("alt", alt)
3267 c.urlParams_.Set("prettyPrint", "false")
3268 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+resource}:setIamPolicy")
3269 urls += "?" + c.urlParams_.Encode()
3270 req, err := http.NewRequest("POST", urls, body)
3271 if err != nil {
3272 return nil, err
3273 }
3274 req.Header = reqHeaders
3275 googleapi.Expand(req.URL, map[string]string{
3276 "resource": c.resource,
3277 })
3278 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3279 }
3280
3281
3282
3283
3284
3285
3286 func (c *FoldersSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
3287 gensupport.SetOptions(c.urlParams_, opts...)
3288 res, err := c.doRequest("json")
3289 if res != nil && res.StatusCode == http.StatusNotModified {
3290 if res.Body != nil {
3291 res.Body.Close()
3292 }
3293 return nil, gensupport.WrapError(&googleapi.Error{
3294 Code: res.StatusCode,
3295 Header: res.Header,
3296 })
3297 }
3298 if err != nil {
3299 return nil, err
3300 }
3301 defer googleapi.CloseBody(res)
3302 if err := googleapi.CheckResponse(res); err != nil {
3303 return nil, gensupport.WrapError(err)
3304 }
3305 ret := &Policy{
3306 ServerResponse: googleapi.ServerResponse{
3307 Header: res.Header,
3308 HTTPStatusCode: res.StatusCode,
3309 },
3310 }
3311 target := &ret
3312 if err := gensupport.DecodeResponse(target, res); err != nil {
3313 return nil, err
3314 }
3315 return ret, nil
3316 }
3317
3318 type FoldersTestIamPermissionsCall struct {
3319 s *Service
3320 resource string
3321 testiampermissionsrequest *TestIamPermissionsRequest
3322 urlParams_ gensupport.URLParams
3323 ctx_ context.Context
3324 header_ http.Header
3325 }
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336 func (r *FoldersService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *FoldersTestIamPermissionsCall {
3337 c := &FoldersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3338 c.resource = resource
3339 c.testiampermissionsrequest = testiampermissionsrequest
3340 return c
3341 }
3342
3343
3344
3345
3346 func (c *FoldersTestIamPermissionsCall) Fields(s ...googleapi.Field) *FoldersTestIamPermissionsCall {
3347 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3348 return c
3349 }
3350
3351
3352 func (c *FoldersTestIamPermissionsCall) Context(ctx context.Context) *FoldersTestIamPermissionsCall {
3353 c.ctx_ = ctx
3354 return c
3355 }
3356
3357
3358
3359 func (c *FoldersTestIamPermissionsCall) Header() http.Header {
3360 if c.header_ == nil {
3361 c.header_ = make(http.Header)
3362 }
3363 return c.header_
3364 }
3365
3366 func (c *FoldersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
3367 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3368 var body io.Reader = nil
3369 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
3370 if err != nil {
3371 return nil, err
3372 }
3373 c.urlParams_.Set("alt", alt)
3374 c.urlParams_.Set("prettyPrint", "false")
3375 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+resource}:testIamPermissions")
3376 urls += "?" + c.urlParams_.Encode()
3377 req, err := http.NewRequest("POST", urls, body)
3378 if err != nil {
3379 return nil, err
3380 }
3381 req.Header = reqHeaders
3382 googleapi.Expand(req.URL, map[string]string{
3383 "resource": c.resource,
3384 })
3385 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3386 }
3387
3388
3389
3390
3391
3392
3393
3394 func (c *FoldersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
3395 gensupport.SetOptions(c.urlParams_, opts...)
3396 res, err := c.doRequest("json")
3397 if res != nil && res.StatusCode == http.StatusNotModified {
3398 if res.Body != nil {
3399 res.Body.Close()
3400 }
3401 return nil, gensupport.WrapError(&googleapi.Error{
3402 Code: res.StatusCode,
3403 Header: res.Header,
3404 })
3405 }
3406 if err != nil {
3407 return nil, err
3408 }
3409 defer googleapi.CloseBody(res)
3410 if err := googleapi.CheckResponse(res); err != nil {
3411 return nil, gensupport.WrapError(err)
3412 }
3413 ret := &TestIamPermissionsResponse{
3414 ServerResponse: googleapi.ServerResponse{
3415 Header: res.Header,
3416 HTTPStatusCode: res.StatusCode,
3417 },
3418 }
3419 target := &ret
3420 if err := gensupport.DecodeResponse(target, res); err != nil {
3421 return nil, err
3422 }
3423 return ret, nil
3424 }
3425
3426 type FoldersUndeleteCall struct {
3427 s *Service
3428 name string
3429 undeletefolderrequest *UndeleteFolderRequest
3430 urlParams_ gensupport.URLParams
3431 ctx_ context.Context
3432 header_ http.Header
3433 }
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445 func (r *FoldersService) Undelete(name string, undeletefolderrequest *UndeleteFolderRequest) *FoldersUndeleteCall {
3446 c := &FoldersUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3447 c.name = name
3448 c.undeletefolderrequest = undeletefolderrequest
3449 return c
3450 }
3451
3452
3453
3454
3455 func (c *FoldersUndeleteCall) Fields(s ...googleapi.Field) *FoldersUndeleteCall {
3456 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3457 return c
3458 }
3459
3460
3461 func (c *FoldersUndeleteCall) Context(ctx context.Context) *FoldersUndeleteCall {
3462 c.ctx_ = ctx
3463 return c
3464 }
3465
3466
3467
3468 func (c *FoldersUndeleteCall) Header() http.Header {
3469 if c.header_ == nil {
3470 c.header_ = make(http.Header)
3471 }
3472 return c.header_
3473 }
3474
3475 func (c *FoldersUndeleteCall) doRequest(alt string) (*http.Response, error) {
3476 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3477 var body io.Reader = nil
3478 body, err := googleapi.WithoutDataWrapper.JSONReader(c.undeletefolderrequest)
3479 if err != nil {
3480 return nil, err
3481 }
3482 c.urlParams_.Set("alt", alt)
3483 c.urlParams_.Set("prettyPrint", "false")
3484 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}:undelete")
3485 urls += "?" + c.urlParams_.Encode()
3486 req, err := http.NewRequest("POST", urls, body)
3487 if err != nil {
3488 return nil, err
3489 }
3490 req.Header = reqHeaders
3491 googleapi.Expand(req.URL, map[string]string{
3492 "name": c.name,
3493 })
3494 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3495 }
3496
3497
3498
3499
3500
3501
3502 func (c *FoldersUndeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3503 gensupport.SetOptions(c.urlParams_, opts...)
3504 res, err := c.doRequest("json")
3505 if res != nil && res.StatusCode == http.StatusNotModified {
3506 if res.Body != nil {
3507 res.Body.Close()
3508 }
3509 return nil, gensupport.WrapError(&googleapi.Error{
3510 Code: res.StatusCode,
3511 Header: res.Header,
3512 })
3513 }
3514 if err != nil {
3515 return nil, err
3516 }
3517 defer googleapi.CloseBody(res)
3518 if err := googleapi.CheckResponse(res); err != nil {
3519 return nil, gensupport.WrapError(err)
3520 }
3521 ret := &Operation{
3522 ServerResponse: googleapi.ServerResponse{
3523 Header: res.Header,
3524 HTTPStatusCode: res.StatusCode,
3525 },
3526 }
3527 target := &ret
3528 if err := gensupport.DecodeResponse(target, res); err != nil {
3529 return nil, err
3530 }
3531 return ret, nil
3532 }
3533
3534 type LiensCreateCall struct {
3535 s *Service
3536 lien *Lien
3537 urlParams_ gensupport.URLParams
3538 ctx_ context.Context
3539 header_ http.Header
3540 }
3541
3542
3543
3544
3545
3546
3547 func (r *LiensService) Create(lien *Lien) *LiensCreateCall {
3548 c := &LiensCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3549 c.lien = lien
3550 return c
3551 }
3552
3553
3554
3555
3556 func (c *LiensCreateCall) Fields(s ...googleapi.Field) *LiensCreateCall {
3557 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3558 return c
3559 }
3560
3561
3562 func (c *LiensCreateCall) Context(ctx context.Context) *LiensCreateCall {
3563 c.ctx_ = ctx
3564 return c
3565 }
3566
3567
3568
3569 func (c *LiensCreateCall) Header() http.Header {
3570 if c.header_ == nil {
3571 c.header_ = make(http.Header)
3572 }
3573 return c.header_
3574 }
3575
3576 func (c *LiensCreateCall) doRequest(alt string) (*http.Response, error) {
3577 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3578 var body io.Reader = nil
3579 body, err := googleapi.WithoutDataWrapper.JSONReader(c.lien)
3580 if err != nil {
3581 return nil, err
3582 }
3583 c.urlParams_.Set("alt", alt)
3584 c.urlParams_.Set("prettyPrint", "false")
3585 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/liens")
3586 urls += "?" + c.urlParams_.Encode()
3587 req, err := http.NewRequest("POST", urls, body)
3588 if err != nil {
3589 return nil, err
3590 }
3591 req.Header = reqHeaders
3592 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3593 }
3594
3595
3596
3597
3598
3599
3600 func (c *LiensCreateCall) Do(opts ...googleapi.CallOption) (*Lien, error) {
3601 gensupport.SetOptions(c.urlParams_, opts...)
3602 res, err := c.doRequest("json")
3603 if res != nil && res.StatusCode == http.StatusNotModified {
3604 if res.Body != nil {
3605 res.Body.Close()
3606 }
3607 return nil, gensupport.WrapError(&googleapi.Error{
3608 Code: res.StatusCode,
3609 Header: res.Header,
3610 })
3611 }
3612 if err != nil {
3613 return nil, err
3614 }
3615 defer googleapi.CloseBody(res)
3616 if err := googleapi.CheckResponse(res); err != nil {
3617 return nil, gensupport.WrapError(err)
3618 }
3619 ret := &Lien{
3620 ServerResponse: googleapi.ServerResponse{
3621 Header: res.Header,
3622 HTTPStatusCode: res.StatusCode,
3623 },
3624 }
3625 target := &ret
3626 if err := gensupport.DecodeResponse(target, res); err != nil {
3627 return nil, err
3628 }
3629 return ret, nil
3630 }
3631
3632 type LiensDeleteCall struct {
3633 s *Service
3634 nameid string
3635 urlParams_ gensupport.URLParams
3636 ctx_ context.Context
3637 header_ http.Header
3638 }
3639
3640
3641
3642
3643
3644
3645 func (r *LiensService) Delete(nameid string) *LiensDeleteCall {
3646 c := &LiensDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3647 c.nameid = nameid
3648 return c
3649 }
3650
3651
3652
3653
3654 func (c *LiensDeleteCall) Fields(s ...googleapi.Field) *LiensDeleteCall {
3655 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3656 return c
3657 }
3658
3659
3660 func (c *LiensDeleteCall) Context(ctx context.Context) *LiensDeleteCall {
3661 c.ctx_ = ctx
3662 return c
3663 }
3664
3665
3666
3667 func (c *LiensDeleteCall) Header() http.Header {
3668 if c.header_ == nil {
3669 c.header_ = make(http.Header)
3670 }
3671 return c.header_
3672 }
3673
3674 func (c *LiensDeleteCall) doRequest(alt string) (*http.Response, error) {
3675 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3676 var body io.Reader = nil
3677 c.urlParams_.Set("alt", alt)
3678 c.urlParams_.Set("prettyPrint", "false")
3679 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}")
3680 urls += "?" + c.urlParams_.Encode()
3681 req, err := http.NewRequest("DELETE", urls, body)
3682 if err != nil {
3683 return nil, err
3684 }
3685 req.Header = reqHeaders
3686 googleapi.Expand(req.URL, map[string]string{
3687 "name": c.nameid,
3688 })
3689 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3690 }
3691
3692
3693
3694
3695
3696
3697 func (c *LiensDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
3698 gensupport.SetOptions(c.urlParams_, opts...)
3699 res, err := c.doRequest("json")
3700 if res != nil && res.StatusCode == http.StatusNotModified {
3701 if res.Body != nil {
3702 res.Body.Close()
3703 }
3704 return nil, gensupport.WrapError(&googleapi.Error{
3705 Code: res.StatusCode,
3706 Header: res.Header,
3707 })
3708 }
3709 if err != nil {
3710 return nil, err
3711 }
3712 defer googleapi.CloseBody(res)
3713 if err := googleapi.CheckResponse(res); err != nil {
3714 return nil, gensupport.WrapError(err)
3715 }
3716 ret := &Empty{
3717 ServerResponse: googleapi.ServerResponse{
3718 Header: res.Header,
3719 HTTPStatusCode: res.StatusCode,
3720 },
3721 }
3722 target := &ret
3723 if err := gensupport.DecodeResponse(target, res); err != nil {
3724 return nil, err
3725 }
3726 return ret, nil
3727 }
3728
3729 type LiensGetCall struct {
3730 s *Service
3731 nameid string
3732 urlParams_ gensupport.URLParams
3733 ifNoneMatch_ string
3734 ctx_ context.Context
3735 header_ http.Header
3736 }
3737
3738
3739
3740
3741
3742
3743 func (r *LiensService) Get(nameid string) *LiensGetCall {
3744 c := &LiensGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3745 c.nameid = nameid
3746 return c
3747 }
3748
3749
3750
3751
3752 func (c *LiensGetCall) Fields(s ...googleapi.Field) *LiensGetCall {
3753 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3754 return c
3755 }
3756
3757
3758
3759
3760 func (c *LiensGetCall) IfNoneMatch(entityTag string) *LiensGetCall {
3761 c.ifNoneMatch_ = entityTag
3762 return c
3763 }
3764
3765
3766 func (c *LiensGetCall) Context(ctx context.Context) *LiensGetCall {
3767 c.ctx_ = ctx
3768 return c
3769 }
3770
3771
3772
3773 func (c *LiensGetCall) Header() http.Header {
3774 if c.header_ == nil {
3775 c.header_ = make(http.Header)
3776 }
3777 return c.header_
3778 }
3779
3780 func (c *LiensGetCall) doRequest(alt string) (*http.Response, error) {
3781 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3782 if c.ifNoneMatch_ != "" {
3783 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3784 }
3785 var body io.Reader = nil
3786 c.urlParams_.Set("alt", alt)
3787 c.urlParams_.Set("prettyPrint", "false")
3788 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}")
3789 urls += "?" + c.urlParams_.Encode()
3790 req, err := http.NewRequest("GET", urls, body)
3791 if err != nil {
3792 return nil, err
3793 }
3794 req.Header = reqHeaders
3795 googleapi.Expand(req.URL, map[string]string{
3796 "name": c.nameid,
3797 })
3798 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3799 }
3800
3801
3802
3803
3804
3805
3806 func (c *LiensGetCall) Do(opts ...googleapi.CallOption) (*Lien, error) {
3807 gensupport.SetOptions(c.urlParams_, opts...)
3808 res, err := c.doRequest("json")
3809 if res != nil && res.StatusCode == http.StatusNotModified {
3810 if res.Body != nil {
3811 res.Body.Close()
3812 }
3813 return nil, gensupport.WrapError(&googleapi.Error{
3814 Code: res.StatusCode,
3815 Header: res.Header,
3816 })
3817 }
3818 if err != nil {
3819 return nil, err
3820 }
3821 defer googleapi.CloseBody(res)
3822 if err := googleapi.CheckResponse(res); err != nil {
3823 return nil, gensupport.WrapError(err)
3824 }
3825 ret := &Lien{
3826 ServerResponse: googleapi.ServerResponse{
3827 Header: res.Header,
3828 HTTPStatusCode: res.StatusCode,
3829 },
3830 }
3831 target := &ret
3832 if err := gensupport.DecodeResponse(target, res); err != nil {
3833 return nil, err
3834 }
3835 return ret, nil
3836 }
3837
3838 type LiensListCall struct {
3839 s *Service
3840 urlParams_ gensupport.URLParams
3841 ifNoneMatch_ string
3842 ctx_ context.Context
3843 header_ http.Header
3844 }
3845
3846
3847
3848
3849
3850 func (r *LiensService) List() *LiensListCall {
3851 c := &LiensListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3852 return c
3853 }
3854
3855
3856
3857
3858 func (c *LiensListCall) PageSize(pageSize int64) *LiensListCall {
3859 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3860 return c
3861 }
3862
3863
3864
3865 func (c *LiensListCall) PageToken(pageToken string) *LiensListCall {
3866 c.urlParams_.Set("pageToken", pageToken)
3867 return c
3868 }
3869
3870
3871
3872
3873
3874
3875 func (c *LiensListCall) Parent(parent string) *LiensListCall {
3876 c.urlParams_.Set("parent", parent)
3877 return c
3878 }
3879
3880
3881
3882
3883 func (c *LiensListCall) Fields(s ...googleapi.Field) *LiensListCall {
3884 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3885 return c
3886 }
3887
3888
3889
3890
3891 func (c *LiensListCall) IfNoneMatch(entityTag string) *LiensListCall {
3892 c.ifNoneMatch_ = entityTag
3893 return c
3894 }
3895
3896
3897 func (c *LiensListCall) Context(ctx context.Context) *LiensListCall {
3898 c.ctx_ = ctx
3899 return c
3900 }
3901
3902
3903
3904 func (c *LiensListCall) Header() http.Header {
3905 if c.header_ == nil {
3906 c.header_ = make(http.Header)
3907 }
3908 return c.header_
3909 }
3910
3911 func (c *LiensListCall) doRequest(alt string) (*http.Response, error) {
3912 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3913 if c.ifNoneMatch_ != "" {
3914 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3915 }
3916 var body io.Reader = nil
3917 c.urlParams_.Set("alt", alt)
3918 c.urlParams_.Set("prettyPrint", "false")
3919 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/liens")
3920 urls += "?" + c.urlParams_.Encode()
3921 req, err := http.NewRequest("GET", urls, body)
3922 if err != nil {
3923 return nil, err
3924 }
3925 req.Header = reqHeaders
3926 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3927 }
3928
3929
3930
3931
3932
3933
3934
3935 func (c *LiensListCall) Do(opts ...googleapi.CallOption) (*ListLiensResponse, error) {
3936 gensupport.SetOptions(c.urlParams_, opts...)
3937 res, err := c.doRequest("json")
3938 if res != nil && res.StatusCode == http.StatusNotModified {
3939 if res.Body != nil {
3940 res.Body.Close()
3941 }
3942 return nil, gensupport.WrapError(&googleapi.Error{
3943 Code: res.StatusCode,
3944 Header: res.Header,
3945 })
3946 }
3947 if err != nil {
3948 return nil, err
3949 }
3950 defer googleapi.CloseBody(res)
3951 if err := googleapi.CheckResponse(res); err != nil {
3952 return nil, gensupport.WrapError(err)
3953 }
3954 ret := &ListLiensResponse{
3955 ServerResponse: googleapi.ServerResponse{
3956 Header: res.Header,
3957 HTTPStatusCode: res.StatusCode,
3958 },
3959 }
3960 target := &ret
3961 if err := gensupport.DecodeResponse(target, res); err != nil {
3962 return nil, err
3963 }
3964 return ret, nil
3965 }
3966
3967
3968
3969
3970 func (c *LiensListCall) Pages(ctx context.Context, f func(*ListLiensResponse) error) error {
3971 c.ctx_ = ctx
3972 defer c.PageToken(c.urlParams_.Get("pageToken"))
3973 for {
3974 x, err := c.Do()
3975 if err != nil {
3976 return err
3977 }
3978 if err := f(x); err != nil {
3979 return err
3980 }
3981 if x.NextPageToken == "" {
3982 return nil
3983 }
3984 c.PageToken(x.NextPageToken)
3985 }
3986 }
3987
3988 type OperationsGetCall struct {
3989 s *Service
3990 name string
3991 urlParams_ gensupport.URLParams
3992 ifNoneMatch_ string
3993 ctx_ context.Context
3994 header_ http.Header
3995 }
3996
3997
3998
3999
4000
4001
4002 func (r *OperationsService) Get(name string) *OperationsGetCall {
4003 c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4004 c.name = name
4005 return c
4006 }
4007
4008
4009
4010
4011 func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall {
4012 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4013 return c
4014 }
4015
4016
4017
4018
4019 func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall {
4020 c.ifNoneMatch_ = entityTag
4021 return c
4022 }
4023
4024
4025 func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall {
4026 c.ctx_ = ctx
4027 return c
4028 }
4029
4030
4031
4032 func (c *OperationsGetCall) Header() http.Header {
4033 if c.header_ == nil {
4034 c.header_ = make(http.Header)
4035 }
4036 return c.header_
4037 }
4038
4039 func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) {
4040 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4041 if c.ifNoneMatch_ != "" {
4042 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4043 }
4044 var body io.Reader = nil
4045 c.urlParams_.Set("alt", alt)
4046 c.urlParams_.Set("prettyPrint", "false")
4047 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}")
4048 urls += "?" + c.urlParams_.Encode()
4049 req, err := http.NewRequest("GET", urls, body)
4050 if err != nil {
4051 return nil, err
4052 }
4053 req.Header = reqHeaders
4054 googleapi.Expand(req.URL, map[string]string{
4055 "name": c.name,
4056 })
4057 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4058 }
4059
4060
4061
4062
4063
4064
4065 func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4066 gensupport.SetOptions(c.urlParams_, opts...)
4067 res, err := c.doRequest("json")
4068 if res != nil && res.StatusCode == http.StatusNotModified {
4069 if res.Body != nil {
4070 res.Body.Close()
4071 }
4072 return nil, gensupport.WrapError(&googleapi.Error{
4073 Code: res.StatusCode,
4074 Header: res.Header,
4075 })
4076 }
4077 if err != nil {
4078 return nil, err
4079 }
4080 defer googleapi.CloseBody(res)
4081 if err := googleapi.CheckResponse(res); err != nil {
4082 return nil, gensupport.WrapError(err)
4083 }
4084 ret := &Operation{
4085 ServerResponse: googleapi.ServerResponse{
4086 Header: res.Header,
4087 HTTPStatusCode: res.StatusCode,
4088 },
4089 }
4090 target := &ret
4091 if err := gensupport.DecodeResponse(target, res); err != nil {
4092 return nil, err
4093 }
4094 return ret, nil
4095 }
4096
4097 type OrganizationsGetCall struct {
4098 s *Service
4099 name string
4100 urlParams_ gensupport.URLParams
4101 ifNoneMatch_ string
4102 ctx_ context.Context
4103 header_ http.Header
4104 }
4105
4106
4107
4108
4109
4110
4111
4112 func (r *OrganizationsService) Get(name string) *OrganizationsGetCall {
4113 c := &OrganizationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4114 c.name = name
4115 return c
4116 }
4117
4118
4119
4120
4121 func (c *OrganizationsGetCall) Fields(s ...googleapi.Field) *OrganizationsGetCall {
4122 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4123 return c
4124 }
4125
4126
4127
4128
4129 func (c *OrganizationsGetCall) IfNoneMatch(entityTag string) *OrganizationsGetCall {
4130 c.ifNoneMatch_ = entityTag
4131 return c
4132 }
4133
4134
4135 func (c *OrganizationsGetCall) Context(ctx context.Context) *OrganizationsGetCall {
4136 c.ctx_ = ctx
4137 return c
4138 }
4139
4140
4141
4142 func (c *OrganizationsGetCall) Header() http.Header {
4143 if c.header_ == nil {
4144 c.header_ = make(http.Header)
4145 }
4146 return c.header_
4147 }
4148
4149 func (c *OrganizationsGetCall) doRequest(alt string) (*http.Response, error) {
4150 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4151 if c.ifNoneMatch_ != "" {
4152 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4153 }
4154 var body io.Reader = nil
4155 c.urlParams_.Set("alt", alt)
4156 c.urlParams_.Set("prettyPrint", "false")
4157 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}")
4158 urls += "?" + c.urlParams_.Encode()
4159 req, err := http.NewRequest("GET", urls, body)
4160 if err != nil {
4161 return nil, err
4162 }
4163 req.Header = reqHeaders
4164 googleapi.Expand(req.URL, map[string]string{
4165 "name": c.name,
4166 })
4167 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4168 }
4169
4170
4171
4172
4173
4174
4175 func (c *OrganizationsGetCall) Do(opts ...googleapi.CallOption) (*Organization, error) {
4176 gensupport.SetOptions(c.urlParams_, opts...)
4177 res, err := c.doRequest("json")
4178 if res != nil && res.StatusCode == http.StatusNotModified {
4179 if res.Body != nil {
4180 res.Body.Close()
4181 }
4182 return nil, gensupport.WrapError(&googleapi.Error{
4183 Code: res.StatusCode,
4184 Header: res.Header,
4185 })
4186 }
4187 if err != nil {
4188 return nil, err
4189 }
4190 defer googleapi.CloseBody(res)
4191 if err := googleapi.CheckResponse(res); err != nil {
4192 return nil, gensupport.WrapError(err)
4193 }
4194 ret := &Organization{
4195 ServerResponse: googleapi.ServerResponse{
4196 Header: res.Header,
4197 HTTPStatusCode: res.StatusCode,
4198 },
4199 }
4200 target := &ret
4201 if err := gensupport.DecodeResponse(target, res); err != nil {
4202 return nil, err
4203 }
4204 return ret, nil
4205 }
4206
4207 type OrganizationsGetIamPolicyCall struct {
4208 s *Service
4209 resource string
4210 getiampolicyrequest *GetIamPolicyRequest
4211 urlParams_ gensupport.URLParams
4212 ctx_ context.Context
4213 header_ http.Header
4214 }
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225 func (r *OrganizationsService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *OrganizationsGetIamPolicyCall {
4226 c := &OrganizationsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4227 c.resource = resource
4228 c.getiampolicyrequest = getiampolicyrequest
4229 return c
4230 }
4231
4232
4233
4234
4235 func (c *OrganizationsGetIamPolicyCall) Fields(s ...googleapi.Field) *OrganizationsGetIamPolicyCall {
4236 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4237 return c
4238 }
4239
4240
4241 func (c *OrganizationsGetIamPolicyCall) Context(ctx context.Context) *OrganizationsGetIamPolicyCall {
4242 c.ctx_ = ctx
4243 return c
4244 }
4245
4246
4247
4248 func (c *OrganizationsGetIamPolicyCall) Header() http.Header {
4249 if c.header_ == nil {
4250 c.header_ = make(http.Header)
4251 }
4252 return c.header_
4253 }
4254
4255 func (c *OrganizationsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
4256 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4257 var body io.Reader = nil
4258 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
4259 if err != nil {
4260 return nil, err
4261 }
4262 c.urlParams_.Set("alt", alt)
4263 c.urlParams_.Set("prettyPrint", "false")
4264 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+resource}:getIamPolicy")
4265 urls += "?" + c.urlParams_.Encode()
4266 req, err := http.NewRequest("POST", urls, body)
4267 if err != nil {
4268 return nil, err
4269 }
4270 req.Header = reqHeaders
4271 googleapi.Expand(req.URL, map[string]string{
4272 "resource": c.resource,
4273 })
4274 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4275 }
4276
4277
4278
4279
4280
4281
4282 func (c *OrganizationsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
4283 gensupport.SetOptions(c.urlParams_, opts...)
4284 res, err := c.doRequest("json")
4285 if res != nil && res.StatusCode == http.StatusNotModified {
4286 if res.Body != nil {
4287 res.Body.Close()
4288 }
4289 return nil, gensupport.WrapError(&googleapi.Error{
4290 Code: res.StatusCode,
4291 Header: res.Header,
4292 })
4293 }
4294 if err != nil {
4295 return nil, err
4296 }
4297 defer googleapi.CloseBody(res)
4298 if err := googleapi.CheckResponse(res); err != nil {
4299 return nil, gensupport.WrapError(err)
4300 }
4301 ret := &Policy{
4302 ServerResponse: googleapi.ServerResponse{
4303 Header: res.Header,
4304 HTTPStatusCode: res.StatusCode,
4305 },
4306 }
4307 target := &ret
4308 if err := gensupport.DecodeResponse(target, res); err != nil {
4309 return nil, err
4310 }
4311 return ret, nil
4312 }
4313
4314 type OrganizationsSearchCall struct {
4315 s *Service
4316 urlParams_ gensupport.URLParams
4317 ifNoneMatch_ string
4318 ctx_ context.Context
4319 header_ http.Header
4320 }
4321
4322
4323
4324
4325
4326
4327
4328 func (r *OrganizationsService) Search() *OrganizationsSearchCall {
4329 c := &OrganizationsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4330 return c
4331 }
4332
4333
4334
4335
4336
4337 func (c *OrganizationsSearchCall) PageSize(pageSize int64) *OrganizationsSearchCall {
4338 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4339 return c
4340 }
4341
4342
4343
4344
4345 func (c *OrganizationsSearchCall) PageToken(pageToken string) *OrganizationsSearchCall {
4346 c.urlParams_.Set("pageToken", pageToken)
4347 return c
4348 }
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361 func (c *OrganizationsSearchCall) Query(query string) *OrganizationsSearchCall {
4362 c.urlParams_.Set("query", query)
4363 return c
4364 }
4365
4366
4367
4368
4369 func (c *OrganizationsSearchCall) Fields(s ...googleapi.Field) *OrganizationsSearchCall {
4370 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4371 return c
4372 }
4373
4374
4375
4376
4377 func (c *OrganizationsSearchCall) IfNoneMatch(entityTag string) *OrganizationsSearchCall {
4378 c.ifNoneMatch_ = entityTag
4379 return c
4380 }
4381
4382
4383 func (c *OrganizationsSearchCall) Context(ctx context.Context) *OrganizationsSearchCall {
4384 c.ctx_ = ctx
4385 return c
4386 }
4387
4388
4389
4390 func (c *OrganizationsSearchCall) Header() http.Header {
4391 if c.header_ == nil {
4392 c.header_ = make(http.Header)
4393 }
4394 return c.header_
4395 }
4396
4397 func (c *OrganizationsSearchCall) doRequest(alt string) (*http.Response, error) {
4398 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4399 if c.ifNoneMatch_ != "" {
4400 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4401 }
4402 var body io.Reader = nil
4403 c.urlParams_.Set("alt", alt)
4404 c.urlParams_.Set("prettyPrint", "false")
4405 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/organizations:search")
4406 urls += "?" + c.urlParams_.Encode()
4407 req, err := http.NewRequest("GET", urls, body)
4408 if err != nil {
4409 return nil, err
4410 }
4411 req.Header = reqHeaders
4412 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4413 }
4414
4415
4416
4417
4418
4419
4420
4421 func (c *OrganizationsSearchCall) Do(opts ...googleapi.CallOption) (*SearchOrganizationsResponse, error) {
4422 gensupport.SetOptions(c.urlParams_, opts...)
4423 res, err := c.doRequest("json")
4424 if res != nil && res.StatusCode == http.StatusNotModified {
4425 if res.Body != nil {
4426 res.Body.Close()
4427 }
4428 return nil, gensupport.WrapError(&googleapi.Error{
4429 Code: res.StatusCode,
4430 Header: res.Header,
4431 })
4432 }
4433 if err != nil {
4434 return nil, err
4435 }
4436 defer googleapi.CloseBody(res)
4437 if err := googleapi.CheckResponse(res); err != nil {
4438 return nil, gensupport.WrapError(err)
4439 }
4440 ret := &SearchOrganizationsResponse{
4441 ServerResponse: googleapi.ServerResponse{
4442 Header: res.Header,
4443 HTTPStatusCode: res.StatusCode,
4444 },
4445 }
4446 target := &ret
4447 if err := gensupport.DecodeResponse(target, res); err != nil {
4448 return nil, err
4449 }
4450 return ret, nil
4451 }
4452
4453
4454
4455
4456 func (c *OrganizationsSearchCall) Pages(ctx context.Context, f func(*SearchOrganizationsResponse) error) error {
4457 c.ctx_ = ctx
4458 defer c.PageToken(c.urlParams_.Get("pageToken"))
4459 for {
4460 x, err := c.Do()
4461 if err != nil {
4462 return err
4463 }
4464 if err := f(x); err != nil {
4465 return err
4466 }
4467 if x.NextPageToken == "" {
4468 return nil
4469 }
4470 c.PageToken(x.NextPageToken)
4471 }
4472 }
4473
4474 type OrganizationsSetIamPolicyCall struct {
4475 s *Service
4476 resource string
4477 setiampolicyrequest *SetIamPolicyRequest
4478 urlParams_ gensupport.URLParams
4479 ctx_ context.Context
4480 header_ http.Header
4481 }
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492 func (r *OrganizationsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *OrganizationsSetIamPolicyCall {
4493 c := &OrganizationsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4494 c.resource = resource
4495 c.setiampolicyrequest = setiampolicyrequest
4496 return c
4497 }
4498
4499
4500
4501
4502 func (c *OrganizationsSetIamPolicyCall) Fields(s ...googleapi.Field) *OrganizationsSetIamPolicyCall {
4503 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4504 return c
4505 }
4506
4507
4508 func (c *OrganizationsSetIamPolicyCall) Context(ctx context.Context) *OrganizationsSetIamPolicyCall {
4509 c.ctx_ = ctx
4510 return c
4511 }
4512
4513
4514
4515 func (c *OrganizationsSetIamPolicyCall) Header() http.Header {
4516 if c.header_ == nil {
4517 c.header_ = make(http.Header)
4518 }
4519 return c.header_
4520 }
4521
4522 func (c *OrganizationsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
4523 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4524 var body io.Reader = nil
4525 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
4526 if err != nil {
4527 return nil, err
4528 }
4529 c.urlParams_.Set("alt", alt)
4530 c.urlParams_.Set("prettyPrint", "false")
4531 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+resource}:setIamPolicy")
4532 urls += "?" + c.urlParams_.Encode()
4533 req, err := http.NewRequest("POST", urls, body)
4534 if err != nil {
4535 return nil, err
4536 }
4537 req.Header = reqHeaders
4538 googleapi.Expand(req.URL, map[string]string{
4539 "resource": c.resource,
4540 })
4541 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4542 }
4543
4544
4545
4546
4547
4548
4549 func (c *OrganizationsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
4550 gensupport.SetOptions(c.urlParams_, opts...)
4551 res, err := c.doRequest("json")
4552 if res != nil && res.StatusCode == http.StatusNotModified {
4553 if res.Body != nil {
4554 res.Body.Close()
4555 }
4556 return nil, gensupport.WrapError(&googleapi.Error{
4557 Code: res.StatusCode,
4558 Header: res.Header,
4559 })
4560 }
4561 if err != nil {
4562 return nil, err
4563 }
4564 defer googleapi.CloseBody(res)
4565 if err := googleapi.CheckResponse(res); err != nil {
4566 return nil, gensupport.WrapError(err)
4567 }
4568 ret := &Policy{
4569 ServerResponse: googleapi.ServerResponse{
4570 Header: res.Header,
4571 HTTPStatusCode: res.StatusCode,
4572 },
4573 }
4574 target := &ret
4575 if err := gensupport.DecodeResponse(target, res); err != nil {
4576 return nil, err
4577 }
4578 return ret, nil
4579 }
4580
4581 type OrganizationsTestIamPermissionsCall struct {
4582 s *Service
4583 resource string
4584 testiampermissionsrequest *TestIamPermissionsRequest
4585 urlParams_ gensupport.URLParams
4586 ctx_ context.Context
4587 header_ http.Header
4588 }
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599 func (r *OrganizationsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *OrganizationsTestIamPermissionsCall {
4600 c := &OrganizationsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4601 c.resource = resource
4602 c.testiampermissionsrequest = testiampermissionsrequest
4603 return c
4604 }
4605
4606
4607
4608
4609 func (c *OrganizationsTestIamPermissionsCall) Fields(s ...googleapi.Field) *OrganizationsTestIamPermissionsCall {
4610 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4611 return c
4612 }
4613
4614
4615 func (c *OrganizationsTestIamPermissionsCall) Context(ctx context.Context) *OrganizationsTestIamPermissionsCall {
4616 c.ctx_ = ctx
4617 return c
4618 }
4619
4620
4621
4622 func (c *OrganizationsTestIamPermissionsCall) Header() http.Header {
4623 if c.header_ == nil {
4624 c.header_ = make(http.Header)
4625 }
4626 return c.header_
4627 }
4628
4629 func (c *OrganizationsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
4630 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4631 var body io.Reader = nil
4632 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
4633 if err != nil {
4634 return nil, err
4635 }
4636 c.urlParams_.Set("alt", alt)
4637 c.urlParams_.Set("prettyPrint", "false")
4638 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+resource}:testIamPermissions")
4639 urls += "?" + c.urlParams_.Encode()
4640 req, err := http.NewRequest("POST", urls, body)
4641 if err != nil {
4642 return nil, err
4643 }
4644 req.Header = reqHeaders
4645 googleapi.Expand(req.URL, map[string]string{
4646 "resource": c.resource,
4647 })
4648 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4649 }
4650
4651
4652
4653
4654
4655
4656
4657 func (c *OrganizationsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
4658 gensupport.SetOptions(c.urlParams_, opts...)
4659 res, err := c.doRequest("json")
4660 if res != nil && res.StatusCode == http.StatusNotModified {
4661 if res.Body != nil {
4662 res.Body.Close()
4663 }
4664 return nil, gensupport.WrapError(&googleapi.Error{
4665 Code: res.StatusCode,
4666 Header: res.Header,
4667 })
4668 }
4669 if err != nil {
4670 return nil, err
4671 }
4672 defer googleapi.CloseBody(res)
4673 if err := googleapi.CheckResponse(res); err != nil {
4674 return nil, gensupport.WrapError(err)
4675 }
4676 ret := &TestIamPermissionsResponse{
4677 ServerResponse: googleapi.ServerResponse{
4678 Header: res.Header,
4679 HTTPStatusCode: res.StatusCode,
4680 },
4681 }
4682 target := &ret
4683 if err := gensupport.DecodeResponse(target, res); err != nil {
4684 return nil, err
4685 }
4686 return ret, nil
4687 }
4688
4689 type ProjectsCreateCall struct {
4690 s *Service
4691 project *Project
4692 urlParams_ gensupport.URLParams
4693 ctx_ context.Context
4694 header_ http.Header
4695 }
4696
4697
4698
4699
4700
4701
4702 func (r *ProjectsService) Create(project *Project) *ProjectsCreateCall {
4703 c := &ProjectsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4704 c.project = project
4705 return c
4706 }
4707
4708
4709
4710
4711 func (c *ProjectsCreateCall) Fields(s ...googleapi.Field) *ProjectsCreateCall {
4712 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4713 return c
4714 }
4715
4716
4717 func (c *ProjectsCreateCall) Context(ctx context.Context) *ProjectsCreateCall {
4718 c.ctx_ = ctx
4719 return c
4720 }
4721
4722
4723
4724 func (c *ProjectsCreateCall) Header() http.Header {
4725 if c.header_ == nil {
4726 c.header_ = make(http.Header)
4727 }
4728 return c.header_
4729 }
4730
4731 func (c *ProjectsCreateCall) doRequest(alt string) (*http.Response, error) {
4732 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4733 var body io.Reader = nil
4734 body, err := googleapi.WithoutDataWrapper.JSONReader(c.project)
4735 if err != nil {
4736 return nil, err
4737 }
4738 c.urlParams_.Set("alt", alt)
4739 c.urlParams_.Set("prettyPrint", "false")
4740 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/projects")
4741 urls += "?" + c.urlParams_.Encode()
4742 req, err := http.NewRequest("POST", urls, body)
4743 if err != nil {
4744 return nil, err
4745 }
4746 req.Header = reqHeaders
4747 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4748 }
4749
4750
4751
4752
4753
4754
4755 func (c *ProjectsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4756 gensupport.SetOptions(c.urlParams_, opts...)
4757 res, err := c.doRequest("json")
4758 if res != nil && res.StatusCode == http.StatusNotModified {
4759 if res.Body != nil {
4760 res.Body.Close()
4761 }
4762 return nil, gensupport.WrapError(&googleapi.Error{
4763 Code: res.StatusCode,
4764 Header: res.Header,
4765 })
4766 }
4767 if err != nil {
4768 return nil, err
4769 }
4770 defer googleapi.CloseBody(res)
4771 if err := googleapi.CheckResponse(res); err != nil {
4772 return nil, gensupport.WrapError(err)
4773 }
4774 ret := &Operation{
4775 ServerResponse: googleapi.ServerResponse{
4776 Header: res.Header,
4777 HTTPStatusCode: res.StatusCode,
4778 },
4779 }
4780 target := &ret
4781 if err := gensupport.DecodeResponse(target, res); err != nil {
4782 return nil, err
4783 }
4784 return ret, nil
4785 }
4786
4787 type ProjectsDeleteCall struct {
4788 s *Service
4789 name string
4790 urlParams_ gensupport.URLParams
4791 ctx_ context.Context
4792 header_ http.Header
4793 }
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810 func (r *ProjectsService) Delete(name string) *ProjectsDeleteCall {
4811 c := &ProjectsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4812 c.name = name
4813 return c
4814 }
4815
4816
4817
4818
4819 func (c *ProjectsDeleteCall) Fields(s ...googleapi.Field) *ProjectsDeleteCall {
4820 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4821 return c
4822 }
4823
4824
4825 func (c *ProjectsDeleteCall) Context(ctx context.Context) *ProjectsDeleteCall {
4826 c.ctx_ = ctx
4827 return c
4828 }
4829
4830
4831
4832 func (c *ProjectsDeleteCall) Header() http.Header {
4833 if c.header_ == nil {
4834 c.header_ = make(http.Header)
4835 }
4836 return c.header_
4837 }
4838
4839 func (c *ProjectsDeleteCall) doRequest(alt string) (*http.Response, error) {
4840 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4841 var body io.Reader = nil
4842 c.urlParams_.Set("alt", alt)
4843 c.urlParams_.Set("prettyPrint", "false")
4844 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}")
4845 urls += "?" + c.urlParams_.Encode()
4846 req, err := http.NewRequest("DELETE", urls, body)
4847 if err != nil {
4848 return nil, err
4849 }
4850 req.Header = reqHeaders
4851 googleapi.Expand(req.URL, map[string]string{
4852 "name": c.name,
4853 })
4854 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4855 }
4856
4857
4858
4859
4860
4861
4862 func (c *ProjectsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4863 gensupport.SetOptions(c.urlParams_, opts...)
4864 res, err := c.doRequest("json")
4865 if res != nil && res.StatusCode == http.StatusNotModified {
4866 if res.Body != nil {
4867 res.Body.Close()
4868 }
4869 return nil, gensupport.WrapError(&googleapi.Error{
4870 Code: res.StatusCode,
4871 Header: res.Header,
4872 })
4873 }
4874 if err != nil {
4875 return nil, err
4876 }
4877 defer googleapi.CloseBody(res)
4878 if err := googleapi.CheckResponse(res); err != nil {
4879 return nil, gensupport.WrapError(err)
4880 }
4881 ret := &Operation{
4882 ServerResponse: googleapi.ServerResponse{
4883 Header: res.Header,
4884 HTTPStatusCode: res.StatusCode,
4885 },
4886 }
4887 target := &ret
4888 if err := gensupport.DecodeResponse(target, res); err != nil {
4889 return nil, err
4890 }
4891 return ret, nil
4892 }
4893
4894 type ProjectsGetCall struct {
4895 s *Service
4896 name string
4897 urlParams_ gensupport.URLParams
4898 ifNoneMatch_ string
4899 ctx_ context.Context
4900 header_ http.Header
4901 }
4902
4903
4904
4905
4906
4907
4908 func (r *ProjectsService) Get(name string) *ProjectsGetCall {
4909 c := &ProjectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4910 c.name = name
4911 return c
4912 }
4913
4914
4915
4916
4917 func (c *ProjectsGetCall) Fields(s ...googleapi.Field) *ProjectsGetCall {
4918 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4919 return c
4920 }
4921
4922
4923
4924
4925 func (c *ProjectsGetCall) IfNoneMatch(entityTag string) *ProjectsGetCall {
4926 c.ifNoneMatch_ = entityTag
4927 return c
4928 }
4929
4930
4931 func (c *ProjectsGetCall) Context(ctx context.Context) *ProjectsGetCall {
4932 c.ctx_ = ctx
4933 return c
4934 }
4935
4936
4937
4938 func (c *ProjectsGetCall) Header() http.Header {
4939 if c.header_ == nil {
4940 c.header_ = make(http.Header)
4941 }
4942 return c.header_
4943 }
4944
4945 func (c *ProjectsGetCall) doRequest(alt string) (*http.Response, error) {
4946 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4947 if c.ifNoneMatch_ != "" {
4948 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4949 }
4950 var body io.Reader = nil
4951 c.urlParams_.Set("alt", alt)
4952 c.urlParams_.Set("prettyPrint", "false")
4953 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}")
4954 urls += "?" + c.urlParams_.Encode()
4955 req, err := http.NewRequest("GET", urls, body)
4956 if err != nil {
4957 return nil, err
4958 }
4959 req.Header = reqHeaders
4960 googleapi.Expand(req.URL, map[string]string{
4961 "name": c.name,
4962 })
4963 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4964 }
4965
4966
4967
4968
4969
4970
4971 func (c *ProjectsGetCall) Do(opts ...googleapi.CallOption) (*Project, error) {
4972 gensupport.SetOptions(c.urlParams_, opts...)
4973 res, err := c.doRequest("json")
4974 if res != nil && res.StatusCode == http.StatusNotModified {
4975 if res.Body != nil {
4976 res.Body.Close()
4977 }
4978 return nil, gensupport.WrapError(&googleapi.Error{
4979 Code: res.StatusCode,
4980 Header: res.Header,
4981 })
4982 }
4983 if err != nil {
4984 return nil, err
4985 }
4986 defer googleapi.CloseBody(res)
4987 if err := googleapi.CheckResponse(res); err != nil {
4988 return nil, gensupport.WrapError(err)
4989 }
4990 ret := &Project{
4991 ServerResponse: googleapi.ServerResponse{
4992 Header: res.Header,
4993 HTTPStatusCode: res.StatusCode,
4994 },
4995 }
4996 target := &ret
4997 if err := gensupport.DecodeResponse(target, res); err != nil {
4998 return nil, err
4999 }
5000 return ret, nil
5001 }
5002
5003 type ProjectsGetIamPolicyCall struct {
5004 s *Service
5005 resource string
5006 getiampolicyrequest *GetIamPolicyRequest
5007 urlParams_ gensupport.URLParams
5008 ctx_ context.Context
5009 header_ http.Header
5010 }
5011
5012
5013
5014
5015
5016
5017
5018
5019 func (r *ProjectsService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsGetIamPolicyCall {
5020 c := &ProjectsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5021 c.resource = resource
5022 c.getiampolicyrequest = getiampolicyrequest
5023 return c
5024 }
5025
5026
5027
5028
5029 func (c *ProjectsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsGetIamPolicyCall {
5030 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5031 return c
5032 }
5033
5034
5035 func (c *ProjectsGetIamPolicyCall) Context(ctx context.Context) *ProjectsGetIamPolicyCall {
5036 c.ctx_ = ctx
5037 return c
5038 }
5039
5040
5041
5042 func (c *ProjectsGetIamPolicyCall) Header() http.Header {
5043 if c.header_ == nil {
5044 c.header_ = make(http.Header)
5045 }
5046 return c.header_
5047 }
5048
5049 func (c *ProjectsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
5050 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5051 var body io.Reader = nil
5052 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
5053 if err != nil {
5054 return nil, err
5055 }
5056 c.urlParams_.Set("alt", alt)
5057 c.urlParams_.Set("prettyPrint", "false")
5058 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+resource}:getIamPolicy")
5059 urls += "?" + c.urlParams_.Encode()
5060 req, err := http.NewRequest("POST", urls, body)
5061 if err != nil {
5062 return nil, err
5063 }
5064 req.Header = reqHeaders
5065 googleapi.Expand(req.URL, map[string]string{
5066 "resource": c.resource,
5067 })
5068 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5069 }
5070
5071
5072
5073
5074
5075
5076 func (c *ProjectsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
5077 gensupport.SetOptions(c.urlParams_, opts...)
5078 res, err := c.doRequest("json")
5079 if res != nil && res.StatusCode == http.StatusNotModified {
5080 if res.Body != nil {
5081 res.Body.Close()
5082 }
5083 return nil, gensupport.WrapError(&googleapi.Error{
5084 Code: res.StatusCode,
5085 Header: res.Header,
5086 })
5087 }
5088 if err != nil {
5089 return nil, err
5090 }
5091 defer googleapi.CloseBody(res)
5092 if err := googleapi.CheckResponse(res); err != nil {
5093 return nil, gensupport.WrapError(err)
5094 }
5095 ret := &Policy{
5096 ServerResponse: googleapi.ServerResponse{
5097 Header: res.Header,
5098 HTTPStatusCode: res.StatusCode,
5099 },
5100 }
5101 target := &ret
5102 if err := gensupport.DecodeResponse(target, res); err != nil {
5103 return nil, err
5104 }
5105 return ret, nil
5106 }
5107
5108 type ProjectsListCall struct {
5109 s *Service
5110 urlParams_ gensupport.URLParams
5111 ifNoneMatch_ string
5112 ctx_ context.Context
5113 header_ http.Header
5114 }
5115
5116
5117
5118
5119
5120
5121
5122 func (r *ProjectsService) List() *ProjectsListCall {
5123 c := &ProjectsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5124 return c
5125 }
5126
5127
5128
5129
5130 func (c *ProjectsListCall) PageSize(pageSize int64) *ProjectsListCall {
5131 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5132 return c
5133 }
5134
5135
5136
5137
5138 func (c *ProjectsListCall) PageToken(pageToken string) *ProjectsListCall {
5139 c.urlParams_.Set("pageToken", pageToken)
5140 return c
5141 }
5142
5143
5144
5145
5146
5147
5148 func (c *ProjectsListCall) Parent(parent string) *ProjectsListCall {
5149 c.urlParams_.Set("parent", parent)
5150 return c
5151 }
5152
5153
5154
5155
5156 func (c *ProjectsListCall) ShowDeleted(showDeleted bool) *ProjectsListCall {
5157 c.urlParams_.Set("showDeleted", fmt.Sprint(showDeleted))
5158 return c
5159 }
5160
5161
5162
5163
5164 func (c *ProjectsListCall) Fields(s ...googleapi.Field) *ProjectsListCall {
5165 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5166 return c
5167 }
5168
5169
5170
5171
5172 func (c *ProjectsListCall) IfNoneMatch(entityTag string) *ProjectsListCall {
5173 c.ifNoneMatch_ = entityTag
5174 return c
5175 }
5176
5177
5178 func (c *ProjectsListCall) Context(ctx context.Context) *ProjectsListCall {
5179 c.ctx_ = ctx
5180 return c
5181 }
5182
5183
5184
5185 func (c *ProjectsListCall) Header() http.Header {
5186 if c.header_ == nil {
5187 c.header_ = make(http.Header)
5188 }
5189 return c.header_
5190 }
5191
5192 func (c *ProjectsListCall) doRequest(alt string) (*http.Response, error) {
5193 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5194 if c.ifNoneMatch_ != "" {
5195 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5196 }
5197 var body io.Reader = nil
5198 c.urlParams_.Set("alt", alt)
5199 c.urlParams_.Set("prettyPrint", "false")
5200 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/projects")
5201 urls += "?" + c.urlParams_.Encode()
5202 req, err := http.NewRequest("GET", urls, body)
5203 if err != nil {
5204 return nil, err
5205 }
5206 req.Header = reqHeaders
5207 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5208 }
5209
5210
5211
5212
5213
5214
5215
5216 func (c *ProjectsListCall) Do(opts ...googleapi.CallOption) (*ListProjectsResponse, error) {
5217 gensupport.SetOptions(c.urlParams_, opts...)
5218 res, err := c.doRequest("json")
5219 if res != nil && res.StatusCode == http.StatusNotModified {
5220 if res.Body != nil {
5221 res.Body.Close()
5222 }
5223 return nil, gensupport.WrapError(&googleapi.Error{
5224 Code: res.StatusCode,
5225 Header: res.Header,
5226 })
5227 }
5228 if err != nil {
5229 return nil, err
5230 }
5231 defer googleapi.CloseBody(res)
5232 if err := googleapi.CheckResponse(res); err != nil {
5233 return nil, gensupport.WrapError(err)
5234 }
5235 ret := &ListProjectsResponse{
5236 ServerResponse: googleapi.ServerResponse{
5237 Header: res.Header,
5238 HTTPStatusCode: res.StatusCode,
5239 },
5240 }
5241 target := &ret
5242 if err := gensupport.DecodeResponse(target, res); err != nil {
5243 return nil, err
5244 }
5245 return ret, nil
5246 }
5247
5248
5249
5250
5251 func (c *ProjectsListCall) Pages(ctx context.Context, f func(*ListProjectsResponse) error) error {
5252 c.ctx_ = ctx
5253 defer c.PageToken(c.urlParams_.Get("pageToken"))
5254 for {
5255 x, err := c.Do()
5256 if err != nil {
5257 return err
5258 }
5259 if err := f(x); err != nil {
5260 return err
5261 }
5262 if x.NextPageToken == "" {
5263 return nil
5264 }
5265 c.PageToken(x.NextPageToken)
5266 }
5267 }
5268
5269 type ProjectsMoveCall struct {
5270 s *Service
5271 name string
5272 moveprojectrequest *MoveProjectRequest
5273 urlParams_ gensupport.URLParams
5274 ctx_ context.Context
5275 header_ http.Header
5276 }
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288 func (r *ProjectsService) Move(name string, moveprojectrequest *MoveProjectRequest) *ProjectsMoveCall {
5289 c := &ProjectsMoveCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5290 c.name = name
5291 c.moveprojectrequest = moveprojectrequest
5292 return c
5293 }
5294
5295
5296
5297
5298 func (c *ProjectsMoveCall) Fields(s ...googleapi.Field) *ProjectsMoveCall {
5299 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5300 return c
5301 }
5302
5303
5304 func (c *ProjectsMoveCall) Context(ctx context.Context) *ProjectsMoveCall {
5305 c.ctx_ = ctx
5306 return c
5307 }
5308
5309
5310
5311 func (c *ProjectsMoveCall) Header() http.Header {
5312 if c.header_ == nil {
5313 c.header_ = make(http.Header)
5314 }
5315 return c.header_
5316 }
5317
5318 func (c *ProjectsMoveCall) doRequest(alt string) (*http.Response, error) {
5319 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5320 var body io.Reader = nil
5321 body, err := googleapi.WithoutDataWrapper.JSONReader(c.moveprojectrequest)
5322 if err != nil {
5323 return nil, err
5324 }
5325 c.urlParams_.Set("alt", alt)
5326 c.urlParams_.Set("prettyPrint", "false")
5327 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}:move")
5328 urls += "?" + c.urlParams_.Encode()
5329 req, err := http.NewRequest("POST", urls, body)
5330 if err != nil {
5331 return nil, err
5332 }
5333 req.Header = reqHeaders
5334 googleapi.Expand(req.URL, map[string]string{
5335 "name": c.name,
5336 })
5337 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5338 }
5339
5340
5341
5342
5343
5344
5345 func (c *ProjectsMoveCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5346 gensupport.SetOptions(c.urlParams_, opts...)
5347 res, err := c.doRequest("json")
5348 if res != nil && res.StatusCode == http.StatusNotModified {
5349 if res.Body != nil {
5350 res.Body.Close()
5351 }
5352 return nil, gensupport.WrapError(&googleapi.Error{
5353 Code: res.StatusCode,
5354 Header: res.Header,
5355 })
5356 }
5357 if err != nil {
5358 return nil, err
5359 }
5360 defer googleapi.CloseBody(res)
5361 if err := googleapi.CheckResponse(res); err != nil {
5362 return nil, gensupport.WrapError(err)
5363 }
5364 ret := &Operation{
5365 ServerResponse: googleapi.ServerResponse{
5366 Header: res.Header,
5367 HTTPStatusCode: res.StatusCode,
5368 },
5369 }
5370 target := &ret
5371 if err := gensupport.DecodeResponse(target, res); err != nil {
5372 return nil, err
5373 }
5374 return ret, nil
5375 }
5376
5377 type ProjectsPatchCall struct {
5378 s *Service
5379 name string
5380 project *Project
5381 urlParams_ gensupport.URLParams
5382 ctx_ context.Context
5383 header_ http.Header
5384 }
5385
5386
5387
5388
5389
5390
5391
5392
5393 func (r *ProjectsService) Patch(name string, project *Project) *ProjectsPatchCall {
5394 c := &ProjectsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5395 c.name = name
5396 c.project = project
5397 return c
5398 }
5399
5400
5401
5402 func (c *ProjectsPatchCall) UpdateMask(updateMask string) *ProjectsPatchCall {
5403 c.urlParams_.Set("updateMask", updateMask)
5404 return c
5405 }
5406
5407
5408
5409
5410 func (c *ProjectsPatchCall) Fields(s ...googleapi.Field) *ProjectsPatchCall {
5411 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5412 return c
5413 }
5414
5415
5416 func (c *ProjectsPatchCall) Context(ctx context.Context) *ProjectsPatchCall {
5417 c.ctx_ = ctx
5418 return c
5419 }
5420
5421
5422
5423 func (c *ProjectsPatchCall) Header() http.Header {
5424 if c.header_ == nil {
5425 c.header_ = make(http.Header)
5426 }
5427 return c.header_
5428 }
5429
5430 func (c *ProjectsPatchCall) doRequest(alt string) (*http.Response, error) {
5431 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5432 var body io.Reader = nil
5433 body, err := googleapi.WithoutDataWrapper.JSONReader(c.project)
5434 if err != nil {
5435 return nil, err
5436 }
5437 c.urlParams_.Set("alt", alt)
5438 c.urlParams_.Set("prettyPrint", "false")
5439 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}")
5440 urls += "?" + c.urlParams_.Encode()
5441 req, err := http.NewRequest("PATCH", urls, body)
5442 if err != nil {
5443 return nil, err
5444 }
5445 req.Header = reqHeaders
5446 googleapi.Expand(req.URL, map[string]string{
5447 "name": c.name,
5448 })
5449 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5450 }
5451
5452
5453
5454
5455
5456
5457 func (c *ProjectsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5458 gensupport.SetOptions(c.urlParams_, opts...)
5459 res, err := c.doRequest("json")
5460 if res != nil && res.StatusCode == http.StatusNotModified {
5461 if res.Body != nil {
5462 res.Body.Close()
5463 }
5464 return nil, gensupport.WrapError(&googleapi.Error{
5465 Code: res.StatusCode,
5466 Header: res.Header,
5467 })
5468 }
5469 if err != nil {
5470 return nil, err
5471 }
5472 defer googleapi.CloseBody(res)
5473 if err := googleapi.CheckResponse(res); err != nil {
5474 return nil, gensupport.WrapError(err)
5475 }
5476 ret := &Operation{
5477 ServerResponse: googleapi.ServerResponse{
5478 Header: res.Header,
5479 HTTPStatusCode: res.StatusCode,
5480 },
5481 }
5482 target := &ret
5483 if err := gensupport.DecodeResponse(target, res); err != nil {
5484 return nil, err
5485 }
5486 return ret, nil
5487 }
5488
5489 type ProjectsSearchCall struct {
5490 s *Service
5491 urlParams_ gensupport.URLParams
5492 ifNoneMatch_ string
5493 ctx_ context.Context
5494 header_ http.Header
5495 }
5496
5497
5498
5499
5500
5501
5502
5503
5504 func (r *ProjectsService) Search() *ProjectsSearchCall {
5505 c := &ProjectsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5506 return c
5507 }
5508
5509
5510
5511
5512 func (c *ProjectsSearchCall) PageSize(pageSize int64) *ProjectsSearchCall {
5513 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5514 return c
5515 }
5516
5517
5518
5519
5520 func (c *ProjectsSearchCall) PageToken(pageToken string) *ProjectsSearchCall {
5521 c.urlParams_.Set("pageToken", pageToken)
5522 return c
5523 }
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549 func (c *ProjectsSearchCall) Query(query string) *ProjectsSearchCall {
5550 c.urlParams_.Set("query", query)
5551 return c
5552 }
5553
5554
5555
5556
5557 func (c *ProjectsSearchCall) Fields(s ...googleapi.Field) *ProjectsSearchCall {
5558 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5559 return c
5560 }
5561
5562
5563
5564
5565 func (c *ProjectsSearchCall) IfNoneMatch(entityTag string) *ProjectsSearchCall {
5566 c.ifNoneMatch_ = entityTag
5567 return c
5568 }
5569
5570
5571 func (c *ProjectsSearchCall) Context(ctx context.Context) *ProjectsSearchCall {
5572 c.ctx_ = ctx
5573 return c
5574 }
5575
5576
5577
5578 func (c *ProjectsSearchCall) Header() http.Header {
5579 if c.header_ == nil {
5580 c.header_ = make(http.Header)
5581 }
5582 return c.header_
5583 }
5584
5585 func (c *ProjectsSearchCall) doRequest(alt string) (*http.Response, error) {
5586 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5587 if c.ifNoneMatch_ != "" {
5588 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5589 }
5590 var body io.Reader = nil
5591 c.urlParams_.Set("alt", alt)
5592 c.urlParams_.Set("prettyPrint", "false")
5593 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/projects:search")
5594 urls += "?" + c.urlParams_.Encode()
5595 req, err := http.NewRequest("GET", urls, body)
5596 if err != nil {
5597 return nil, err
5598 }
5599 req.Header = reqHeaders
5600 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5601 }
5602
5603
5604
5605
5606
5607
5608
5609 func (c *ProjectsSearchCall) Do(opts ...googleapi.CallOption) (*SearchProjectsResponse, error) {
5610 gensupport.SetOptions(c.urlParams_, opts...)
5611 res, err := c.doRequest("json")
5612 if res != nil && res.StatusCode == http.StatusNotModified {
5613 if res.Body != nil {
5614 res.Body.Close()
5615 }
5616 return nil, gensupport.WrapError(&googleapi.Error{
5617 Code: res.StatusCode,
5618 Header: res.Header,
5619 })
5620 }
5621 if err != nil {
5622 return nil, err
5623 }
5624 defer googleapi.CloseBody(res)
5625 if err := googleapi.CheckResponse(res); err != nil {
5626 return nil, gensupport.WrapError(err)
5627 }
5628 ret := &SearchProjectsResponse{
5629 ServerResponse: googleapi.ServerResponse{
5630 Header: res.Header,
5631 HTTPStatusCode: res.StatusCode,
5632 },
5633 }
5634 target := &ret
5635 if err := gensupport.DecodeResponse(target, res); err != nil {
5636 return nil, err
5637 }
5638 return ret, nil
5639 }
5640
5641
5642
5643
5644 func (c *ProjectsSearchCall) Pages(ctx context.Context, f func(*SearchProjectsResponse) error) error {
5645 c.ctx_ = ctx
5646 defer c.PageToken(c.urlParams_.Get("pageToken"))
5647 for {
5648 x, err := c.Do()
5649 if err != nil {
5650 return err
5651 }
5652 if err := f(x); err != nil {
5653 return err
5654 }
5655 if x.NextPageToken == "" {
5656 return nil
5657 }
5658 c.PageToken(x.NextPageToken)
5659 }
5660 }
5661
5662 type ProjectsSetIamPolicyCall struct {
5663 s *Service
5664 resource string
5665 setiampolicyrequest *SetIamPolicyRequest
5666 urlParams_ gensupport.URLParams
5667 ctx_ context.Context
5668 header_ http.Header
5669 }
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702 func (r *ProjectsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsSetIamPolicyCall {
5703 c := &ProjectsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5704 c.resource = resource
5705 c.setiampolicyrequest = setiampolicyrequest
5706 return c
5707 }
5708
5709
5710
5711
5712 func (c *ProjectsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsSetIamPolicyCall {
5713 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5714 return c
5715 }
5716
5717
5718 func (c *ProjectsSetIamPolicyCall) Context(ctx context.Context) *ProjectsSetIamPolicyCall {
5719 c.ctx_ = ctx
5720 return c
5721 }
5722
5723
5724
5725 func (c *ProjectsSetIamPolicyCall) Header() http.Header {
5726 if c.header_ == nil {
5727 c.header_ = make(http.Header)
5728 }
5729 return c.header_
5730 }
5731
5732 func (c *ProjectsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
5733 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5734 var body io.Reader = nil
5735 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
5736 if err != nil {
5737 return nil, err
5738 }
5739 c.urlParams_.Set("alt", alt)
5740 c.urlParams_.Set("prettyPrint", "false")
5741 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+resource}:setIamPolicy")
5742 urls += "?" + c.urlParams_.Encode()
5743 req, err := http.NewRequest("POST", urls, body)
5744 if err != nil {
5745 return nil, err
5746 }
5747 req.Header = reqHeaders
5748 googleapi.Expand(req.URL, map[string]string{
5749 "resource": c.resource,
5750 })
5751 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5752 }
5753
5754
5755
5756
5757
5758
5759 func (c *ProjectsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
5760 gensupport.SetOptions(c.urlParams_, opts...)
5761 res, err := c.doRequest("json")
5762 if res != nil && res.StatusCode == http.StatusNotModified {
5763 if res.Body != nil {
5764 res.Body.Close()
5765 }
5766 return nil, gensupport.WrapError(&googleapi.Error{
5767 Code: res.StatusCode,
5768 Header: res.Header,
5769 })
5770 }
5771 if err != nil {
5772 return nil, err
5773 }
5774 defer googleapi.CloseBody(res)
5775 if err := googleapi.CheckResponse(res); err != nil {
5776 return nil, gensupport.WrapError(err)
5777 }
5778 ret := &Policy{
5779 ServerResponse: googleapi.ServerResponse{
5780 Header: res.Header,
5781 HTTPStatusCode: res.StatusCode,
5782 },
5783 }
5784 target := &ret
5785 if err := gensupport.DecodeResponse(target, res); err != nil {
5786 return nil, err
5787 }
5788 return ret, nil
5789 }
5790
5791 type ProjectsTestIamPermissionsCall struct {
5792 s *Service
5793 resource string
5794 testiampermissionsrequest *TestIamPermissionsRequest
5795 urlParams_ gensupport.URLParams
5796 ctx_ context.Context
5797 header_ http.Header
5798 }
5799
5800
5801
5802
5803
5804
5805
5806
5807 func (r *ProjectsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsTestIamPermissionsCall {
5808 c := &ProjectsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5809 c.resource = resource
5810 c.testiampermissionsrequest = testiampermissionsrequest
5811 return c
5812 }
5813
5814
5815
5816
5817 func (c *ProjectsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsTestIamPermissionsCall {
5818 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5819 return c
5820 }
5821
5822
5823 func (c *ProjectsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsTestIamPermissionsCall {
5824 c.ctx_ = ctx
5825 return c
5826 }
5827
5828
5829
5830 func (c *ProjectsTestIamPermissionsCall) Header() http.Header {
5831 if c.header_ == nil {
5832 c.header_ = make(http.Header)
5833 }
5834 return c.header_
5835 }
5836
5837 func (c *ProjectsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
5838 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5839 var body io.Reader = nil
5840 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
5841 if err != nil {
5842 return nil, err
5843 }
5844 c.urlParams_.Set("alt", alt)
5845 c.urlParams_.Set("prettyPrint", "false")
5846 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+resource}:testIamPermissions")
5847 urls += "?" + c.urlParams_.Encode()
5848 req, err := http.NewRequest("POST", urls, body)
5849 if err != nil {
5850 return nil, err
5851 }
5852 req.Header = reqHeaders
5853 googleapi.Expand(req.URL, map[string]string{
5854 "resource": c.resource,
5855 })
5856 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5857 }
5858
5859
5860
5861
5862
5863
5864
5865 func (c *ProjectsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
5866 gensupport.SetOptions(c.urlParams_, opts...)
5867 res, err := c.doRequest("json")
5868 if res != nil && res.StatusCode == http.StatusNotModified {
5869 if res.Body != nil {
5870 res.Body.Close()
5871 }
5872 return nil, gensupport.WrapError(&googleapi.Error{
5873 Code: res.StatusCode,
5874 Header: res.Header,
5875 })
5876 }
5877 if err != nil {
5878 return nil, err
5879 }
5880 defer googleapi.CloseBody(res)
5881 if err := googleapi.CheckResponse(res); err != nil {
5882 return nil, gensupport.WrapError(err)
5883 }
5884 ret := &TestIamPermissionsResponse{
5885 ServerResponse: googleapi.ServerResponse{
5886 Header: res.Header,
5887 HTTPStatusCode: res.StatusCode,
5888 },
5889 }
5890 target := &ret
5891 if err := gensupport.DecodeResponse(target, res); err != nil {
5892 return nil, err
5893 }
5894 return ret, nil
5895 }
5896
5897 type ProjectsUndeleteCall struct {
5898 s *Service
5899 name string
5900 undeleteprojectrequest *UndeleteProjectRequest
5901 urlParams_ gensupport.URLParams
5902 ctx_ context.Context
5903 header_ http.Header
5904 }
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914 func (r *ProjectsService) Undelete(name string, undeleteprojectrequest *UndeleteProjectRequest) *ProjectsUndeleteCall {
5915 c := &ProjectsUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5916 c.name = name
5917 c.undeleteprojectrequest = undeleteprojectrequest
5918 return c
5919 }
5920
5921
5922
5923
5924 func (c *ProjectsUndeleteCall) Fields(s ...googleapi.Field) *ProjectsUndeleteCall {
5925 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5926 return c
5927 }
5928
5929
5930 func (c *ProjectsUndeleteCall) Context(ctx context.Context) *ProjectsUndeleteCall {
5931 c.ctx_ = ctx
5932 return c
5933 }
5934
5935
5936
5937 func (c *ProjectsUndeleteCall) Header() http.Header {
5938 if c.header_ == nil {
5939 c.header_ = make(http.Header)
5940 }
5941 return c.header_
5942 }
5943
5944 func (c *ProjectsUndeleteCall) doRequest(alt string) (*http.Response, error) {
5945 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5946 var body io.Reader = nil
5947 body, err := googleapi.WithoutDataWrapper.JSONReader(c.undeleteprojectrequest)
5948 if err != nil {
5949 return nil, err
5950 }
5951 c.urlParams_.Set("alt", alt)
5952 c.urlParams_.Set("prettyPrint", "false")
5953 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}:undelete")
5954 urls += "?" + c.urlParams_.Encode()
5955 req, err := http.NewRequest("POST", urls, body)
5956 if err != nil {
5957 return nil, err
5958 }
5959 req.Header = reqHeaders
5960 googleapi.Expand(req.URL, map[string]string{
5961 "name": c.name,
5962 })
5963 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5964 }
5965
5966
5967
5968
5969
5970
5971 func (c *ProjectsUndeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5972 gensupport.SetOptions(c.urlParams_, opts...)
5973 res, err := c.doRequest("json")
5974 if res != nil && res.StatusCode == http.StatusNotModified {
5975 if res.Body != nil {
5976 res.Body.Close()
5977 }
5978 return nil, gensupport.WrapError(&googleapi.Error{
5979 Code: res.StatusCode,
5980 Header: res.Header,
5981 })
5982 }
5983 if err != nil {
5984 return nil, err
5985 }
5986 defer googleapi.CloseBody(res)
5987 if err := googleapi.CheckResponse(res); err != nil {
5988 return nil, gensupport.WrapError(err)
5989 }
5990 ret := &Operation{
5991 ServerResponse: googleapi.ServerResponse{
5992 Header: res.Header,
5993 HTTPStatusCode: res.StatusCode,
5994 },
5995 }
5996 target := &ret
5997 if err := gensupport.DecodeResponse(target, res); err != nil {
5998 return nil, err
5999 }
6000 return ret, nil
6001 }
6002
6003 type TagBindingsCreateCall struct {
6004 s *Service
6005 tagbinding *TagBinding
6006 urlParams_ gensupport.URLParams
6007 ctx_ context.Context
6008 header_ http.Header
6009 }
6010
6011
6012 func (r *TagBindingsService) Create(tagbinding *TagBinding) *TagBindingsCreateCall {
6013 c := &TagBindingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6014 c.tagbinding = tagbinding
6015 return c
6016 }
6017
6018
6019
6020
6021 func (c *TagBindingsCreateCall) ValidateOnly(validateOnly bool) *TagBindingsCreateCall {
6022 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
6023 return c
6024 }
6025
6026
6027
6028
6029 func (c *TagBindingsCreateCall) Fields(s ...googleapi.Field) *TagBindingsCreateCall {
6030 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6031 return c
6032 }
6033
6034
6035 func (c *TagBindingsCreateCall) Context(ctx context.Context) *TagBindingsCreateCall {
6036 c.ctx_ = ctx
6037 return c
6038 }
6039
6040
6041
6042 func (c *TagBindingsCreateCall) Header() http.Header {
6043 if c.header_ == nil {
6044 c.header_ = make(http.Header)
6045 }
6046 return c.header_
6047 }
6048
6049 func (c *TagBindingsCreateCall) doRequest(alt string) (*http.Response, error) {
6050 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6051 var body io.Reader = nil
6052 body, err := googleapi.WithoutDataWrapper.JSONReader(c.tagbinding)
6053 if err != nil {
6054 return nil, err
6055 }
6056 c.urlParams_.Set("alt", alt)
6057 c.urlParams_.Set("prettyPrint", "false")
6058 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/tagBindings")
6059 urls += "?" + c.urlParams_.Encode()
6060 req, err := http.NewRequest("POST", urls, body)
6061 if err != nil {
6062 return nil, err
6063 }
6064 req.Header = reqHeaders
6065 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6066 }
6067
6068
6069
6070
6071
6072
6073 func (c *TagBindingsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6074 gensupport.SetOptions(c.urlParams_, opts...)
6075 res, err := c.doRequest("json")
6076 if res != nil && res.StatusCode == http.StatusNotModified {
6077 if res.Body != nil {
6078 res.Body.Close()
6079 }
6080 return nil, gensupport.WrapError(&googleapi.Error{
6081 Code: res.StatusCode,
6082 Header: res.Header,
6083 })
6084 }
6085 if err != nil {
6086 return nil, err
6087 }
6088 defer googleapi.CloseBody(res)
6089 if err := googleapi.CheckResponse(res); err != nil {
6090 return nil, gensupport.WrapError(err)
6091 }
6092 ret := &Operation{
6093 ServerResponse: googleapi.ServerResponse{
6094 Header: res.Header,
6095 HTTPStatusCode: res.StatusCode,
6096 },
6097 }
6098 target := &ret
6099 if err := gensupport.DecodeResponse(target, res); err != nil {
6100 return nil, err
6101 }
6102 return ret, nil
6103 }
6104
6105 type TagBindingsDeleteCall struct {
6106 s *Service
6107 name string
6108 urlParams_ gensupport.URLParams
6109 ctx_ context.Context
6110 header_ http.Header
6111 }
6112
6113
6114
6115
6116
6117
6118
6119 func (r *TagBindingsService) Delete(name string) *TagBindingsDeleteCall {
6120 c := &TagBindingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6121 c.name = name
6122 return c
6123 }
6124
6125
6126
6127
6128 func (c *TagBindingsDeleteCall) Fields(s ...googleapi.Field) *TagBindingsDeleteCall {
6129 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6130 return c
6131 }
6132
6133
6134 func (c *TagBindingsDeleteCall) Context(ctx context.Context) *TagBindingsDeleteCall {
6135 c.ctx_ = ctx
6136 return c
6137 }
6138
6139
6140
6141 func (c *TagBindingsDeleteCall) Header() http.Header {
6142 if c.header_ == nil {
6143 c.header_ = make(http.Header)
6144 }
6145 return c.header_
6146 }
6147
6148 func (c *TagBindingsDeleteCall) doRequest(alt string) (*http.Response, error) {
6149 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6150 var body io.Reader = nil
6151 c.urlParams_.Set("alt", alt)
6152 c.urlParams_.Set("prettyPrint", "false")
6153 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}")
6154 urls += "?" + c.urlParams_.Encode()
6155 req, err := http.NewRequest("DELETE", urls, body)
6156 if err != nil {
6157 return nil, err
6158 }
6159 req.Header = reqHeaders
6160 googleapi.Expand(req.URL, map[string]string{
6161 "name": c.name,
6162 })
6163 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6164 }
6165
6166
6167
6168
6169
6170
6171 func (c *TagBindingsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6172 gensupport.SetOptions(c.urlParams_, opts...)
6173 res, err := c.doRequest("json")
6174 if res != nil && res.StatusCode == http.StatusNotModified {
6175 if res.Body != nil {
6176 res.Body.Close()
6177 }
6178 return nil, gensupport.WrapError(&googleapi.Error{
6179 Code: res.StatusCode,
6180 Header: res.Header,
6181 })
6182 }
6183 if err != nil {
6184 return nil, err
6185 }
6186 defer googleapi.CloseBody(res)
6187 if err := googleapi.CheckResponse(res); err != nil {
6188 return nil, gensupport.WrapError(err)
6189 }
6190 ret := &Operation{
6191 ServerResponse: googleapi.ServerResponse{
6192 Header: res.Header,
6193 HTTPStatusCode: res.StatusCode,
6194 },
6195 }
6196 target := &ret
6197 if err := gensupport.DecodeResponse(target, res); err != nil {
6198 return nil, err
6199 }
6200 return ret, nil
6201 }
6202
6203 type TagBindingsListCall struct {
6204 s *Service
6205 urlParams_ gensupport.URLParams
6206 ifNoneMatch_ string
6207 ctx_ context.Context
6208 header_ http.Header
6209 }
6210
6211
6212
6213
6214
6215 func (r *TagBindingsService) List() *TagBindingsListCall {
6216 c := &TagBindingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6217 return c
6218 }
6219
6220
6221
6222
6223
6224 func (c *TagBindingsListCall) PageSize(pageSize int64) *TagBindingsListCall {
6225 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
6226 return c
6227 }
6228
6229
6230
6231
6232 func (c *TagBindingsListCall) PageToken(pageToken string) *TagBindingsListCall {
6233 c.urlParams_.Set("pageToken", pageToken)
6234 return c
6235 }
6236
6237
6238
6239
6240 func (c *TagBindingsListCall) Parent(parent string) *TagBindingsListCall {
6241 c.urlParams_.Set("parent", parent)
6242 return c
6243 }
6244
6245
6246
6247
6248 func (c *TagBindingsListCall) Fields(s ...googleapi.Field) *TagBindingsListCall {
6249 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6250 return c
6251 }
6252
6253
6254
6255
6256 func (c *TagBindingsListCall) IfNoneMatch(entityTag string) *TagBindingsListCall {
6257 c.ifNoneMatch_ = entityTag
6258 return c
6259 }
6260
6261
6262 func (c *TagBindingsListCall) Context(ctx context.Context) *TagBindingsListCall {
6263 c.ctx_ = ctx
6264 return c
6265 }
6266
6267
6268
6269 func (c *TagBindingsListCall) Header() http.Header {
6270 if c.header_ == nil {
6271 c.header_ = make(http.Header)
6272 }
6273 return c.header_
6274 }
6275
6276 func (c *TagBindingsListCall) doRequest(alt string) (*http.Response, error) {
6277 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6278 if c.ifNoneMatch_ != "" {
6279 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6280 }
6281 var body io.Reader = nil
6282 c.urlParams_.Set("alt", alt)
6283 c.urlParams_.Set("prettyPrint", "false")
6284 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/tagBindings")
6285 urls += "?" + c.urlParams_.Encode()
6286 req, err := http.NewRequest("GET", urls, body)
6287 if err != nil {
6288 return nil, err
6289 }
6290 req.Header = reqHeaders
6291 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6292 }
6293
6294
6295
6296
6297
6298
6299
6300 func (c *TagBindingsListCall) Do(opts ...googleapi.CallOption) (*ListTagBindingsResponse, error) {
6301 gensupport.SetOptions(c.urlParams_, opts...)
6302 res, err := c.doRequest("json")
6303 if res != nil && res.StatusCode == http.StatusNotModified {
6304 if res.Body != nil {
6305 res.Body.Close()
6306 }
6307 return nil, gensupport.WrapError(&googleapi.Error{
6308 Code: res.StatusCode,
6309 Header: res.Header,
6310 })
6311 }
6312 if err != nil {
6313 return nil, err
6314 }
6315 defer googleapi.CloseBody(res)
6316 if err := googleapi.CheckResponse(res); err != nil {
6317 return nil, gensupport.WrapError(err)
6318 }
6319 ret := &ListTagBindingsResponse{
6320 ServerResponse: googleapi.ServerResponse{
6321 Header: res.Header,
6322 HTTPStatusCode: res.StatusCode,
6323 },
6324 }
6325 target := &ret
6326 if err := gensupport.DecodeResponse(target, res); err != nil {
6327 return nil, err
6328 }
6329 return ret, nil
6330 }
6331
6332
6333
6334
6335 func (c *TagBindingsListCall) Pages(ctx context.Context, f func(*ListTagBindingsResponse) error) error {
6336 c.ctx_ = ctx
6337 defer c.PageToken(c.urlParams_.Get("pageToken"))
6338 for {
6339 x, err := c.Do()
6340 if err != nil {
6341 return err
6342 }
6343 if err := f(x); err != nil {
6344 return err
6345 }
6346 if x.NextPageToken == "" {
6347 return nil
6348 }
6349 c.PageToken(x.NextPageToken)
6350 }
6351 }
6352
6353 type TagKeysCreateCall struct {
6354 s *Service
6355 tagkey *TagKey
6356 urlParams_ gensupport.URLParams
6357 ctx_ context.Context
6358 header_ http.Header
6359 }
6360
6361
6362
6363
6364
6365 func (r *TagKeysService) Create(tagkey *TagKey) *TagKeysCreateCall {
6366 c := &TagKeysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6367 c.tagkey = tagkey
6368 return c
6369 }
6370
6371
6372
6373
6374 func (c *TagKeysCreateCall) ValidateOnly(validateOnly bool) *TagKeysCreateCall {
6375 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
6376 return c
6377 }
6378
6379
6380
6381
6382 func (c *TagKeysCreateCall) Fields(s ...googleapi.Field) *TagKeysCreateCall {
6383 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6384 return c
6385 }
6386
6387
6388 func (c *TagKeysCreateCall) Context(ctx context.Context) *TagKeysCreateCall {
6389 c.ctx_ = ctx
6390 return c
6391 }
6392
6393
6394
6395 func (c *TagKeysCreateCall) Header() http.Header {
6396 if c.header_ == nil {
6397 c.header_ = make(http.Header)
6398 }
6399 return c.header_
6400 }
6401
6402 func (c *TagKeysCreateCall) doRequest(alt string) (*http.Response, error) {
6403 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6404 var body io.Reader = nil
6405 body, err := googleapi.WithoutDataWrapper.JSONReader(c.tagkey)
6406 if err != nil {
6407 return nil, err
6408 }
6409 c.urlParams_.Set("alt", alt)
6410 c.urlParams_.Set("prettyPrint", "false")
6411 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/tagKeys")
6412 urls += "?" + c.urlParams_.Encode()
6413 req, err := http.NewRequest("POST", urls, body)
6414 if err != nil {
6415 return nil, err
6416 }
6417 req.Header = reqHeaders
6418 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6419 }
6420
6421
6422
6423
6424
6425
6426 func (c *TagKeysCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6427 gensupport.SetOptions(c.urlParams_, opts...)
6428 res, err := c.doRequest("json")
6429 if res != nil && res.StatusCode == http.StatusNotModified {
6430 if res.Body != nil {
6431 res.Body.Close()
6432 }
6433 return nil, gensupport.WrapError(&googleapi.Error{
6434 Code: res.StatusCode,
6435 Header: res.Header,
6436 })
6437 }
6438 if err != nil {
6439 return nil, err
6440 }
6441 defer googleapi.CloseBody(res)
6442 if err := googleapi.CheckResponse(res); err != nil {
6443 return nil, gensupport.WrapError(err)
6444 }
6445 ret := &Operation{
6446 ServerResponse: googleapi.ServerResponse{
6447 Header: res.Header,
6448 HTTPStatusCode: res.StatusCode,
6449 },
6450 }
6451 target := &ret
6452 if err := gensupport.DecodeResponse(target, res); err != nil {
6453 return nil, err
6454 }
6455 return ret, nil
6456 }
6457
6458 type TagKeysDeleteCall struct {
6459 s *Service
6460 name string
6461 urlParams_ gensupport.URLParams
6462 ctx_ context.Context
6463 header_ http.Header
6464 }
6465
6466
6467
6468
6469
6470
6471
6472 func (r *TagKeysService) Delete(name string) *TagKeysDeleteCall {
6473 c := &TagKeysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6474 c.name = name
6475 return c
6476 }
6477
6478
6479
6480
6481 func (c *TagKeysDeleteCall) Etag(etag string) *TagKeysDeleteCall {
6482 c.urlParams_.Set("etag", etag)
6483 return c
6484 }
6485
6486
6487
6488
6489 func (c *TagKeysDeleteCall) ValidateOnly(validateOnly bool) *TagKeysDeleteCall {
6490 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
6491 return c
6492 }
6493
6494
6495
6496
6497 func (c *TagKeysDeleteCall) Fields(s ...googleapi.Field) *TagKeysDeleteCall {
6498 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6499 return c
6500 }
6501
6502
6503 func (c *TagKeysDeleteCall) Context(ctx context.Context) *TagKeysDeleteCall {
6504 c.ctx_ = ctx
6505 return c
6506 }
6507
6508
6509
6510 func (c *TagKeysDeleteCall) Header() http.Header {
6511 if c.header_ == nil {
6512 c.header_ = make(http.Header)
6513 }
6514 return c.header_
6515 }
6516
6517 func (c *TagKeysDeleteCall) doRequest(alt string) (*http.Response, error) {
6518 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6519 var body io.Reader = nil
6520 c.urlParams_.Set("alt", alt)
6521 c.urlParams_.Set("prettyPrint", "false")
6522 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}")
6523 urls += "?" + c.urlParams_.Encode()
6524 req, err := http.NewRequest("DELETE", urls, body)
6525 if err != nil {
6526 return nil, err
6527 }
6528 req.Header = reqHeaders
6529 googleapi.Expand(req.URL, map[string]string{
6530 "name": c.name,
6531 })
6532 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6533 }
6534
6535
6536
6537
6538
6539
6540 func (c *TagKeysDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6541 gensupport.SetOptions(c.urlParams_, opts...)
6542 res, err := c.doRequest("json")
6543 if res != nil && res.StatusCode == http.StatusNotModified {
6544 if res.Body != nil {
6545 res.Body.Close()
6546 }
6547 return nil, gensupport.WrapError(&googleapi.Error{
6548 Code: res.StatusCode,
6549 Header: res.Header,
6550 })
6551 }
6552 if err != nil {
6553 return nil, err
6554 }
6555 defer googleapi.CloseBody(res)
6556 if err := googleapi.CheckResponse(res); err != nil {
6557 return nil, gensupport.WrapError(err)
6558 }
6559 ret := &Operation{
6560 ServerResponse: googleapi.ServerResponse{
6561 Header: res.Header,
6562 HTTPStatusCode: res.StatusCode,
6563 },
6564 }
6565 target := &ret
6566 if err := gensupport.DecodeResponse(target, res); err != nil {
6567 return nil, err
6568 }
6569 return ret, nil
6570 }
6571
6572 type TagKeysGetCall struct {
6573 s *Service
6574 name string
6575 urlParams_ gensupport.URLParams
6576 ifNoneMatch_ string
6577 ctx_ context.Context
6578 header_ http.Header
6579 }
6580
6581
6582
6583
6584
6585 func (r *TagKeysService) Get(name string) *TagKeysGetCall {
6586 c := &TagKeysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6587 c.name = name
6588 return c
6589 }
6590
6591
6592
6593
6594 func (c *TagKeysGetCall) Fields(s ...googleapi.Field) *TagKeysGetCall {
6595 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6596 return c
6597 }
6598
6599
6600
6601
6602 func (c *TagKeysGetCall) IfNoneMatch(entityTag string) *TagKeysGetCall {
6603 c.ifNoneMatch_ = entityTag
6604 return c
6605 }
6606
6607
6608 func (c *TagKeysGetCall) Context(ctx context.Context) *TagKeysGetCall {
6609 c.ctx_ = ctx
6610 return c
6611 }
6612
6613
6614
6615 func (c *TagKeysGetCall) Header() http.Header {
6616 if c.header_ == nil {
6617 c.header_ = make(http.Header)
6618 }
6619 return c.header_
6620 }
6621
6622 func (c *TagKeysGetCall) doRequest(alt string) (*http.Response, error) {
6623 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6624 if c.ifNoneMatch_ != "" {
6625 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6626 }
6627 var body io.Reader = nil
6628 c.urlParams_.Set("alt", alt)
6629 c.urlParams_.Set("prettyPrint", "false")
6630 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}")
6631 urls += "?" + c.urlParams_.Encode()
6632 req, err := http.NewRequest("GET", urls, body)
6633 if err != nil {
6634 return nil, err
6635 }
6636 req.Header = reqHeaders
6637 googleapi.Expand(req.URL, map[string]string{
6638 "name": c.name,
6639 })
6640 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6641 }
6642
6643
6644
6645
6646
6647
6648 func (c *TagKeysGetCall) Do(opts ...googleapi.CallOption) (*TagKey, error) {
6649 gensupport.SetOptions(c.urlParams_, opts...)
6650 res, err := c.doRequest("json")
6651 if res != nil && res.StatusCode == http.StatusNotModified {
6652 if res.Body != nil {
6653 res.Body.Close()
6654 }
6655 return nil, gensupport.WrapError(&googleapi.Error{
6656 Code: res.StatusCode,
6657 Header: res.Header,
6658 })
6659 }
6660 if err != nil {
6661 return nil, err
6662 }
6663 defer googleapi.CloseBody(res)
6664 if err := googleapi.CheckResponse(res); err != nil {
6665 return nil, gensupport.WrapError(err)
6666 }
6667 ret := &TagKey{
6668 ServerResponse: googleapi.ServerResponse{
6669 Header: res.Header,
6670 HTTPStatusCode: res.StatusCode,
6671 },
6672 }
6673 target := &ret
6674 if err := gensupport.DecodeResponse(target, res); err != nil {
6675 return nil, err
6676 }
6677 return ret, nil
6678 }
6679
6680 type TagKeysGetIamPolicyCall struct {
6681 s *Service
6682 resource string
6683 getiampolicyrequest *GetIamPolicyRequest
6684 urlParams_ gensupport.URLParams
6685 ctx_ context.Context
6686 header_ http.Header
6687 }
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698 func (r *TagKeysService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *TagKeysGetIamPolicyCall {
6699 c := &TagKeysGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6700 c.resource = resource
6701 c.getiampolicyrequest = getiampolicyrequest
6702 return c
6703 }
6704
6705
6706
6707
6708 func (c *TagKeysGetIamPolicyCall) Fields(s ...googleapi.Field) *TagKeysGetIamPolicyCall {
6709 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6710 return c
6711 }
6712
6713
6714 func (c *TagKeysGetIamPolicyCall) Context(ctx context.Context) *TagKeysGetIamPolicyCall {
6715 c.ctx_ = ctx
6716 return c
6717 }
6718
6719
6720
6721 func (c *TagKeysGetIamPolicyCall) Header() http.Header {
6722 if c.header_ == nil {
6723 c.header_ = make(http.Header)
6724 }
6725 return c.header_
6726 }
6727
6728 func (c *TagKeysGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
6729 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6730 var body io.Reader = nil
6731 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
6732 if err != nil {
6733 return nil, err
6734 }
6735 c.urlParams_.Set("alt", alt)
6736 c.urlParams_.Set("prettyPrint", "false")
6737 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+resource}:getIamPolicy")
6738 urls += "?" + c.urlParams_.Encode()
6739 req, err := http.NewRequest("POST", urls, body)
6740 if err != nil {
6741 return nil, err
6742 }
6743 req.Header = reqHeaders
6744 googleapi.Expand(req.URL, map[string]string{
6745 "resource": c.resource,
6746 })
6747 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6748 }
6749
6750
6751
6752
6753
6754
6755 func (c *TagKeysGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
6756 gensupport.SetOptions(c.urlParams_, opts...)
6757 res, err := c.doRequest("json")
6758 if res != nil && res.StatusCode == http.StatusNotModified {
6759 if res.Body != nil {
6760 res.Body.Close()
6761 }
6762 return nil, gensupport.WrapError(&googleapi.Error{
6763 Code: res.StatusCode,
6764 Header: res.Header,
6765 })
6766 }
6767 if err != nil {
6768 return nil, err
6769 }
6770 defer googleapi.CloseBody(res)
6771 if err := googleapi.CheckResponse(res); err != nil {
6772 return nil, gensupport.WrapError(err)
6773 }
6774 ret := &Policy{
6775 ServerResponse: googleapi.ServerResponse{
6776 Header: res.Header,
6777 HTTPStatusCode: res.StatusCode,
6778 },
6779 }
6780 target := &ret
6781 if err := gensupport.DecodeResponse(target, res); err != nil {
6782 return nil, err
6783 }
6784 return ret, nil
6785 }
6786
6787 type TagKeysGetNamespacedCall struct {
6788 s *Service
6789 urlParams_ gensupport.URLParams
6790 ifNoneMatch_ string
6791 ctx_ context.Context
6792 header_ http.Header
6793 }
6794
6795
6796
6797
6798 func (r *TagKeysService) GetNamespaced() *TagKeysGetNamespacedCall {
6799 c := &TagKeysGetNamespacedCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6800 return c
6801 }
6802
6803
6804
6805
6806
6807 func (c *TagKeysGetNamespacedCall) Name(name string) *TagKeysGetNamespacedCall {
6808 c.urlParams_.Set("name", name)
6809 return c
6810 }
6811
6812
6813
6814
6815 func (c *TagKeysGetNamespacedCall) Fields(s ...googleapi.Field) *TagKeysGetNamespacedCall {
6816 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6817 return c
6818 }
6819
6820
6821
6822
6823 func (c *TagKeysGetNamespacedCall) IfNoneMatch(entityTag string) *TagKeysGetNamespacedCall {
6824 c.ifNoneMatch_ = entityTag
6825 return c
6826 }
6827
6828
6829 func (c *TagKeysGetNamespacedCall) Context(ctx context.Context) *TagKeysGetNamespacedCall {
6830 c.ctx_ = ctx
6831 return c
6832 }
6833
6834
6835
6836 func (c *TagKeysGetNamespacedCall) Header() http.Header {
6837 if c.header_ == nil {
6838 c.header_ = make(http.Header)
6839 }
6840 return c.header_
6841 }
6842
6843 func (c *TagKeysGetNamespacedCall) doRequest(alt string) (*http.Response, error) {
6844 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6845 if c.ifNoneMatch_ != "" {
6846 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6847 }
6848 var body io.Reader = nil
6849 c.urlParams_.Set("alt", alt)
6850 c.urlParams_.Set("prettyPrint", "false")
6851 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/tagKeys/namespaced")
6852 urls += "?" + c.urlParams_.Encode()
6853 req, err := http.NewRequest("GET", urls, body)
6854 if err != nil {
6855 return nil, err
6856 }
6857 req.Header = reqHeaders
6858 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6859 }
6860
6861
6862
6863
6864
6865
6866 func (c *TagKeysGetNamespacedCall) Do(opts ...googleapi.CallOption) (*TagKey, error) {
6867 gensupport.SetOptions(c.urlParams_, opts...)
6868 res, err := c.doRequest("json")
6869 if res != nil && res.StatusCode == http.StatusNotModified {
6870 if res.Body != nil {
6871 res.Body.Close()
6872 }
6873 return nil, gensupport.WrapError(&googleapi.Error{
6874 Code: res.StatusCode,
6875 Header: res.Header,
6876 })
6877 }
6878 if err != nil {
6879 return nil, err
6880 }
6881 defer googleapi.CloseBody(res)
6882 if err := googleapi.CheckResponse(res); err != nil {
6883 return nil, gensupport.WrapError(err)
6884 }
6885 ret := &TagKey{
6886 ServerResponse: googleapi.ServerResponse{
6887 Header: res.Header,
6888 HTTPStatusCode: res.StatusCode,
6889 },
6890 }
6891 target := &ret
6892 if err := gensupport.DecodeResponse(target, res); err != nil {
6893 return nil, err
6894 }
6895 return ret, nil
6896 }
6897
6898 type TagKeysListCall struct {
6899 s *Service
6900 urlParams_ gensupport.URLParams
6901 ifNoneMatch_ string
6902 ctx_ context.Context
6903 header_ http.Header
6904 }
6905
6906
6907 func (r *TagKeysService) List() *TagKeysListCall {
6908 c := &TagKeysListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6909 return c
6910 }
6911
6912
6913
6914
6915 func (c *TagKeysListCall) PageSize(pageSize int64) *TagKeysListCall {
6916 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
6917 return c
6918 }
6919
6920
6921
6922
6923 func (c *TagKeysListCall) PageToken(pageToken string) *TagKeysListCall {
6924 c.urlParams_.Set("pageToken", pageToken)
6925 return c
6926 }
6927
6928
6929
6930
6931 func (c *TagKeysListCall) Parent(parent string) *TagKeysListCall {
6932 c.urlParams_.Set("parent", parent)
6933 return c
6934 }
6935
6936
6937
6938
6939 func (c *TagKeysListCall) Fields(s ...googleapi.Field) *TagKeysListCall {
6940 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6941 return c
6942 }
6943
6944
6945
6946
6947 func (c *TagKeysListCall) IfNoneMatch(entityTag string) *TagKeysListCall {
6948 c.ifNoneMatch_ = entityTag
6949 return c
6950 }
6951
6952
6953 func (c *TagKeysListCall) Context(ctx context.Context) *TagKeysListCall {
6954 c.ctx_ = ctx
6955 return c
6956 }
6957
6958
6959
6960 func (c *TagKeysListCall) Header() http.Header {
6961 if c.header_ == nil {
6962 c.header_ = make(http.Header)
6963 }
6964 return c.header_
6965 }
6966
6967 func (c *TagKeysListCall) doRequest(alt string) (*http.Response, error) {
6968 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6969 if c.ifNoneMatch_ != "" {
6970 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6971 }
6972 var body io.Reader = nil
6973 c.urlParams_.Set("alt", alt)
6974 c.urlParams_.Set("prettyPrint", "false")
6975 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/tagKeys")
6976 urls += "?" + c.urlParams_.Encode()
6977 req, err := http.NewRequest("GET", urls, body)
6978 if err != nil {
6979 return nil, err
6980 }
6981 req.Header = reqHeaders
6982 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6983 }
6984
6985
6986
6987
6988
6989
6990
6991 func (c *TagKeysListCall) Do(opts ...googleapi.CallOption) (*ListTagKeysResponse, error) {
6992 gensupport.SetOptions(c.urlParams_, opts...)
6993 res, err := c.doRequest("json")
6994 if res != nil && res.StatusCode == http.StatusNotModified {
6995 if res.Body != nil {
6996 res.Body.Close()
6997 }
6998 return nil, gensupport.WrapError(&googleapi.Error{
6999 Code: res.StatusCode,
7000 Header: res.Header,
7001 })
7002 }
7003 if err != nil {
7004 return nil, err
7005 }
7006 defer googleapi.CloseBody(res)
7007 if err := googleapi.CheckResponse(res); err != nil {
7008 return nil, gensupport.WrapError(err)
7009 }
7010 ret := &ListTagKeysResponse{
7011 ServerResponse: googleapi.ServerResponse{
7012 Header: res.Header,
7013 HTTPStatusCode: res.StatusCode,
7014 },
7015 }
7016 target := &ret
7017 if err := gensupport.DecodeResponse(target, res); err != nil {
7018 return nil, err
7019 }
7020 return ret, nil
7021 }
7022
7023
7024
7025
7026 func (c *TagKeysListCall) Pages(ctx context.Context, f func(*ListTagKeysResponse) error) error {
7027 c.ctx_ = ctx
7028 defer c.PageToken(c.urlParams_.Get("pageToken"))
7029 for {
7030 x, err := c.Do()
7031 if err != nil {
7032 return err
7033 }
7034 if err := f(x); err != nil {
7035 return err
7036 }
7037 if x.NextPageToken == "" {
7038 return nil
7039 }
7040 c.PageToken(x.NextPageToken)
7041 }
7042 }
7043
7044 type TagKeysPatchCall struct {
7045 s *Service
7046 name string
7047 tagkey *TagKey
7048 urlParams_ gensupport.URLParams
7049 ctx_ context.Context
7050 header_ http.Header
7051 }
7052
7053
7054
7055
7056
7057
7058 func (r *TagKeysService) Patch(name string, tagkey *TagKey) *TagKeysPatchCall {
7059 c := &TagKeysPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7060 c.name = name
7061 c.tagkey = tagkey
7062 return c
7063 }
7064
7065
7066
7067
7068 func (c *TagKeysPatchCall) UpdateMask(updateMask string) *TagKeysPatchCall {
7069 c.urlParams_.Set("updateMask", updateMask)
7070 return c
7071 }
7072
7073
7074
7075
7076 func (c *TagKeysPatchCall) ValidateOnly(validateOnly bool) *TagKeysPatchCall {
7077 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
7078 return c
7079 }
7080
7081
7082
7083
7084 func (c *TagKeysPatchCall) Fields(s ...googleapi.Field) *TagKeysPatchCall {
7085 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7086 return c
7087 }
7088
7089
7090 func (c *TagKeysPatchCall) Context(ctx context.Context) *TagKeysPatchCall {
7091 c.ctx_ = ctx
7092 return c
7093 }
7094
7095
7096
7097 func (c *TagKeysPatchCall) Header() http.Header {
7098 if c.header_ == nil {
7099 c.header_ = make(http.Header)
7100 }
7101 return c.header_
7102 }
7103
7104 func (c *TagKeysPatchCall) doRequest(alt string) (*http.Response, error) {
7105 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7106 var body io.Reader = nil
7107 body, err := googleapi.WithoutDataWrapper.JSONReader(c.tagkey)
7108 if err != nil {
7109 return nil, err
7110 }
7111 c.urlParams_.Set("alt", alt)
7112 c.urlParams_.Set("prettyPrint", "false")
7113 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}")
7114 urls += "?" + c.urlParams_.Encode()
7115 req, err := http.NewRequest("PATCH", urls, body)
7116 if err != nil {
7117 return nil, err
7118 }
7119 req.Header = reqHeaders
7120 googleapi.Expand(req.URL, map[string]string{
7121 "name": c.name,
7122 })
7123 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7124 }
7125
7126
7127
7128
7129
7130
7131 func (c *TagKeysPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7132 gensupport.SetOptions(c.urlParams_, opts...)
7133 res, err := c.doRequest("json")
7134 if res != nil && res.StatusCode == http.StatusNotModified {
7135 if res.Body != nil {
7136 res.Body.Close()
7137 }
7138 return nil, gensupport.WrapError(&googleapi.Error{
7139 Code: res.StatusCode,
7140 Header: res.Header,
7141 })
7142 }
7143 if err != nil {
7144 return nil, err
7145 }
7146 defer googleapi.CloseBody(res)
7147 if err := googleapi.CheckResponse(res); err != nil {
7148 return nil, gensupport.WrapError(err)
7149 }
7150 ret := &Operation{
7151 ServerResponse: googleapi.ServerResponse{
7152 Header: res.Header,
7153 HTTPStatusCode: res.StatusCode,
7154 },
7155 }
7156 target := &ret
7157 if err := gensupport.DecodeResponse(target, res); err != nil {
7158 return nil, err
7159 }
7160 return ret, nil
7161 }
7162
7163 type TagKeysSetIamPolicyCall struct {
7164 s *Service
7165 resource string
7166 setiampolicyrequest *SetIamPolicyRequest
7167 urlParams_ gensupport.URLParams
7168 ctx_ context.Context
7169 header_ http.Header
7170 }
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181 func (r *TagKeysService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *TagKeysSetIamPolicyCall {
7182 c := &TagKeysSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7183 c.resource = resource
7184 c.setiampolicyrequest = setiampolicyrequest
7185 return c
7186 }
7187
7188
7189
7190
7191 func (c *TagKeysSetIamPolicyCall) Fields(s ...googleapi.Field) *TagKeysSetIamPolicyCall {
7192 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7193 return c
7194 }
7195
7196
7197 func (c *TagKeysSetIamPolicyCall) Context(ctx context.Context) *TagKeysSetIamPolicyCall {
7198 c.ctx_ = ctx
7199 return c
7200 }
7201
7202
7203
7204 func (c *TagKeysSetIamPolicyCall) Header() http.Header {
7205 if c.header_ == nil {
7206 c.header_ = make(http.Header)
7207 }
7208 return c.header_
7209 }
7210
7211 func (c *TagKeysSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
7212 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7213 var body io.Reader = nil
7214 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
7215 if err != nil {
7216 return nil, err
7217 }
7218 c.urlParams_.Set("alt", alt)
7219 c.urlParams_.Set("prettyPrint", "false")
7220 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+resource}:setIamPolicy")
7221 urls += "?" + c.urlParams_.Encode()
7222 req, err := http.NewRequest("POST", urls, body)
7223 if err != nil {
7224 return nil, err
7225 }
7226 req.Header = reqHeaders
7227 googleapi.Expand(req.URL, map[string]string{
7228 "resource": c.resource,
7229 })
7230 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7231 }
7232
7233
7234
7235
7236
7237
7238 func (c *TagKeysSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
7239 gensupport.SetOptions(c.urlParams_, opts...)
7240 res, err := c.doRequest("json")
7241 if res != nil && res.StatusCode == http.StatusNotModified {
7242 if res.Body != nil {
7243 res.Body.Close()
7244 }
7245 return nil, gensupport.WrapError(&googleapi.Error{
7246 Code: res.StatusCode,
7247 Header: res.Header,
7248 })
7249 }
7250 if err != nil {
7251 return nil, err
7252 }
7253 defer googleapi.CloseBody(res)
7254 if err := googleapi.CheckResponse(res); err != nil {
7255 return nil, gensupport.WrapError(err)
7256 }
7257 ret := &Policy{
7258 ServerResponse: googleapi.ServerResponse{
7259 Header: res.Header,
7260 HTTPStatusCode: res.StatusCode,
7261 },
7262 }
7263 target := &ret
7264 if err := gensupport.DecodeResponse(target, res); err != nil {
7265 return nil, err
7266 }
7267 return ret, nil
7268 }
7269
7270 type TagKeysTestIamPermissionsCall struct {
7271 s *Service
7272 resource string
7273 testiampermissionsrequest *TestIamPermissionsRequest
7274 urlParams_ gensupport.URLParams
7275 ctx_ context.Context
7276 header_ http.Header
7277 }
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288 func (r *TagKeysService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *TagKeysTestIamPermissionsCall {
7289 c := &TagKeysTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7290 c.resource = resource
7291 c.testiampermissionsrequest = testiampermissionsrequest
7292 return c
7293 }
7294
7295
7296
7297
7298 func (c *TagKeysTestIamPermissionsCall) Fields(s ...googleapi.Field) *TagKeysTestIamPermissionsCall {
7299 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7300 return c
7301 }
7302
7303
7304 func (c *TagKeysTestIamPermissionsCall) Context(ctx context.Context) *TagKeysTestIamPermissionsCall {
7305 c.ctx_ = ctx
7306 return c
7307 }
7308
7309
7310
7311 func (c *TagKeysTestIamPermissionsCall) Header() http.Header {
7312 if c.header_ == nil {
7313 c.header_ = make(http.Header)
7314 }
7315 return c.header_
7316 }
7317
7318 func (c *TagKeysTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
7319 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7320 var body io.Reader = nil
7321 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
7322 if err != nil {
7323 return nil, err
7324 }
7325 c.urlParams_.Set("alt", alt)
7326 c.urlParams_.Set("prettyPrint", "false")
7327 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+resource}:testIamPermissions")
7328 urls += "?" + c.urlParams_.Encode()
7329 req, err := http.NewRequest("POST", urls, body)
7330 if err != nil {
7331 return nil, err
7332 }
7333 req.Header = reqHeaders
7334 googleapi.Expand(req.URL, map[string]string{
7335 "resource": c.resource,
7336 })
7337 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7338 }
7339
7340
7341
7342
7343
7344
7345
7346 func (c *TagKeysTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
7347 gensupport.SetOptions(c.urlParams_, opts...)
7348 res, err := c.doRequest("json")
7349 if res != nil && res.StatusCode == http.StatusNotModified {
7350 if res.Body != nil {
7351 res.Body.Close()
7352 }
7353 return nil, gensupport.WrapError(&googleapi.Error{
7354 Code: res.StatusCode,
7355 Header: res.Header,
7356 })
7357 }
7358 if err != nil {
7359 return nil, err
7360 }
7361 defer googleapi.CloseBody(res)
7362 if err := googleapi.CheckResponse(res); err != nil {
7363 return nil, gensupport.WrapError(err)
7364 }
7365 ret := &TestIamPermissionsResponse{
7366 ServerResponse: googleapi.ServerResponse{
7367 Header: res.Header,
7368 HTTPStatusCode: res.StatusCode,
7369 },
7370 }
7371 target := &ret
7372 if err := gensupport.DecodeResponse(target, res); err != nil {
7373 return nil, err
7374 }
7375 return ret, nil
7376 }
7377
7378 type TagValuesCreateCall struct {
7379 s *Service
7380 tagvalue *TagValue
7381 urlParams_ gensupport.URLParams
7382 ctx_ context.Context
7383 header_ http.Header
7384 }
7385
7386
7387
7388
7389
7390 func (r *TagValuesService) Create(tagvalue *TagValue) *TagValuesCreateCall {
7391 c := &TagValuesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7392 c.tagvalue = tagvalue
7393 return c
7394 }
7395
7396
7397
7398
7399 func (c *TagValuesCreateCall) ValidateOnly(validateOnly bool) *TagValuesCreateCall {
7400 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
7401 return c
7402 }
7403
7404
7405
7406
7407 func (c *TagValuesCreateCall) Fields(s ...googleapi.Field) *TagValuesCreateCall {
7408 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7409 return c
7410 }
7411
7412
7413 func (c *TagValuesCreateCall) Context(ctx context.Context) *TagValuesCreateCall {
7414 c.ctx_ = ctx
7415 return c
7416 }
7417
7418
7419
7420 func (c *TagValuesCreateCall) Header() http.Header {
7421 if c.header_ == nil {
7422 c.header_ = make(http.Header)
7423 }
7424 return c.header_
7425 }
7426
7427 func (c *TagValuesCreateCall) doRequest(alt string) (*http.Response, error) {
7428 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7429 var body io.Reader = nil
7430 body, err := googleapi.WithoutDataWrapper.JSONReader(c.tagvalue)
7431 if err != nil {
7432 return nil, err
7433 }
7434 c.urlParams_.Set("alt", alt)
7435 c.urlParams_.Set("prettyPrint", "false")
7436 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/tagValues")
7437 urls += "?" + c.urlParams_.Encode()
7438 req, err := http.NewRequest("POST", urls, body)
7439 if err != nil {
7440 return nil, err
7441 }
7442 req.Header = reqHeaders
7443 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7444 }
7445
7446
7447
7448
7449
7450
7451 func (c *TagValuesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7452 gensupport.SetOptions(c.urlParams_, opts...)
7453 res, err := c.doRequest("json")
7454 if res != nil && res.StatusCode == http.StatusNotModified {
7455 if res.Body != nil {
7456 res.Body.Close()
7457 }
7458 return nil, gensupport.WrapError(&googleapi.Error{
7459 Code: res.StatusCode,
7460 Header: res.Header,
7461 })
7462 }
7463 if err != nil {
7464 return nil, err
7465 }
7466 defer googleapi.CloseBody(res)
7467 if err := googleapi.CheckResponse(res); err != nil {
7468 return nil, gensupport.WrapError(err)
7469 }
7470 ret := &Operation{
7471 ServerResponse: googleapi.ServerResponse{
7472 Header: res.Header,
7473 HTTPStatusCode: res.StatusCode,
7474 },
7475 }
7476 target := &ret
7477 if err := gensupport.DecodeResponse(target, res); err != nil {
7478 return nil, err
7479 }
7480 return ret, nil
7481 }
7482
7483 type TagValuesDeleteCall struct {
7484 s *Service
7485 name string
7486 urlParams_ gensupport.URLParams
7487 ctx_ context.Context
7488 header_ http.Header
7489 }
7490
7491
7492
7493
7494
7495
7496 func (r *TagValuesService) Delete(name string) *TagValuesDeleteCall {
7497 c := &TagValuesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7498 c.name = name
7499 return c
7500 }
7501
7502
7503
7504
7505 func (c *TagValuesDeleteCall) Etag(etag string) *TagValuesDeleteCall {
7506 c.urlParams_.Set("etag", etag)
7507 return c
7508 }
7509
7510
7511
7512
7513 func (c *TagValuesDeleteCall) ValidateOnly(validateOnly bool) *TagValuesDeleteCall {
7514 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
7515 return c
7516 }
7517
7518
7519
7520
7521 func (c *TagValuesDeleteCall) Fields(s ...googleapi.Field) *TagValuesDeleteCall {
7522 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7523 return c
7524 }
7525
7526
7527 func (c *TagValuesDeleteCall) Context(ctx context.Context) *TagValuesDeleteCall {
7528 c.ctx_ = ctx
7529 return c
7530 }
7531
7532
7533
7534 func (c *TagValuesDeleteCall) Header() http.Header {
7535 if c.header_ == nil {
7536 c.header_ = make(http.Header)
7537 }
7538 return c.header_
7539 }
7540
7541 func (c *TagValuesDeleteCall) doRequest(alt string) (*http.Response, error) {
7542 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7543 var body io.Reader = nil
7544 c.urlParams_.Set("alt", alt)
7545 c.urlParams_.Set("prettyPrint", "false")
7546 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}")
7547 urls += "?" + c.urlParams_.Encode()
7548 req, err := http.NewRequest("DELETE", urls, body)
7549 if err != nil {
7550 return nil, err
7551 }
7552 req.Header = reqHeaders
7553 googleapi.Expand(req.URL, map[string]string{
7554 "name": c.name,
7555 })
7556 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7557 }
7558
7559
7560
7561
7562
7563
7564 func (c *TagValuesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7565 gensupport.SetOptions(c.urlParams_, opts...)
7566 res, err := c.doRequest("json")
7567 if res != nil && res.StatusCode == http.StatusNotModified {
7568 if res.Body != nil {
7569 res.Body.Close()
7570 }
7571 return nil, gensupport.WrapError(&googleapi.Error{
7572 Code: res.StatusCode,
7573 Header: res.Header,
7574 })
7575 }
7576 if err != nil {
7577 return nil, err
7578 }
7579 defer googleapi.CloseBody(res)
7580 if err := googleapi.CheckResponse(res); err != nil {
7581 return nil, gensupport.WrapError(err)
7582 }
7583 ret := &Operation{
7584 ServerResponse: googleapi.ServerResponse{
7585 Header: res.Header,
7586 HTTPStatusCode: res.StatusCode,
7587 },
7588 }
7589 target := &ret
7590 if err := gensupport.DecodeResponse(target, res); err != nil {
7591 return nil, err
7592 }
7593 return ret, nil
7594 }
7595
7596 type TagValuesGetCall struct {
7597 s *Service
7598 name string
7599 urlParams_ gensupport.URLParams
7600 ifNoneMatch_ string
7601 ctx_ context.Context
7602 header_ http.Header
7603 }
7604
7605
7606
7607
7608
7609
7610 func (r *TagValuesService) Get(name string) *TagValuesGetCall {
7611 c := &TagValuesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7612 c.name = name
7613 return c
7614 }
7615
7616
7617
7618
7619 func (c *TagValuesGetCall) Fields(s ...googleapi.Field) *TagValuesGetCall {
7620 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7621 return c
7622 }
7623
7624
7625
7626
7627 func (c *TagValuesGetCall) IfNoneMatch(entityTag string) *TagValuesGetCall {
7628 c.ifNoneMatch_ = entityTag
7629 return c
7630 }
7631
7632
7633 func (c *TagValuesGetCall) Context(ctx context.Context) *TagValuesGetCall {
7634 c.ctx_ = ctx
7635 return c
7636 }
7637
7638
7639
7640 func (c *TagValuesGetCall) Header() http.Header {
7641 if c.header_ == nil {
7642 c.header_ = make(http.Header)
7643 }
7644 return c.header_
7645 }
7646
7647 func (c *TagValuesGetCall) doRequest(alt string) (*http.Response, error) {
7648 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7649 if c.ifNoneMatch_ != "" {
7650 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7651 }
7652 var body io.Reader = nil
7653 c.urlParams_.Set("alt", alt)
7654 c.urlParams_.Set("prettyPrint", "false")
7655 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}")
7656 urls += "?" + c.urlParams_.Encode()
7657 req, err := http.NewRequest("GET", urls, body)
7658 if err != nil {
7659 return nil, err
7660 }
7661 req.Header = reqHeaders
7662 googleapi.Expand(req.URL, map[string]string{
7663 "name": c.name,
7664 })
7665 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7666 }
7667
7668
7669
7670
7671
7672
7673 func (c *TagValuesGetCall) Do(opts ...googleapi.CallOption) (*TagValue, error) {
7674 gensupport.SetOptions(c.urlParams_, opts...)
7675 res, err := c.doRequest("json")
7676 if res != nil && res.StatusCode == http.StatusNotModified {
7677 if res.Body != nil {
7678 res.Body.Close()
7679 }
7680 return nil, gensupport.WrapError(&googleapi.Error{
7681 Code: res.StatusCode,
7682 Header: res.Header,
7683 })
7684 }
7685 if err != nil {
7686 return nil, err
7687 }
7688 defer googleapi.CloseBody(res)
7689 if err := googleapi.CheckResponse(res); err != nil {
7690 return nil, gensupport.WrapError(err)
7691 }
7692 ret := &TagValue{
7693 ServerResponse: googleapi.ServerResponse{
7694 Header: res.Header,
7695 HTTPStatusCode: res.StatusCode,
7696 },
7697 }
7698 target := &ret
7699 if err := gensupport.DecodeResponse(target, res); err != nil {
7700 return nil, err
7701 }
7702 return ret, nil
7703 }
7704
7705 type TagValuesGetIamPolicyCall struct {
7706 s *Service
7707 resource string
7708 getiampolicyrequest *GetIamPolicyRequest
7709 urlParams_ gensupport.URLParams
7710 ctx_ context.Context
7711 header_ http.Header
7712 }
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724 func (r *TagValuesService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *TagValuesGetIamPolicyCall {
7725 c := &TagValuesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7726 c.resource = resource
7727 c.getiampolicyrequest = getiampolicyrequest
7728 return c
7729 }
7730
7731
7732
7733
7734 func (c *TagValuesGetIamPolicyCall) Fields(s ...googleapi.Field) *TagValuesGetIamPolicyCall {
7735 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7736 return c
7737 }
7738
7739
7740 func (c *TagValuesGetIamPolicyCall) Context(ctx context.Context) *TagValuesGetIamPolicyCall {
7741 c.ctx_ = ctx
7742 return c
7743 }
7744
7745
7746
7747 func (c *TagValuesGetIamPolicyCall) Header() http.Header {
7748 if c.header_ == nil {
7749 c.header_ = make(http.Header)
7750 }
7751 return c.header_
7752 }
7753
7754 func (c *TagValuesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
7755 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7756 var body io.Reader = nil
7757 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
7758 if err != nil {
7759 return nil, err
7760 }
7761 c.urlParams_.Set("alt", alt)
7762 c.urlParams_.Set("prettyPrint", "false")
7763 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+resource}:getIamPolicy")
7764 urls += "?" + c.urlParams_.Encode()
7765 req, err := http.NewRequest("POST", urls, body)
7766 if err != nil {
7767 return nil, err
7768 }
7769 req.Header = reqHeaders
7770 googleapi.Expand(req.URL, map[string]string{
7771 "resource": c.resource,
7772 })
7773 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7774 }
7775
7776
7777
7778
7779
7780
7781 func (c *TagValuesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
7782 gensupport.SetOptions(c.urlParams_, opts...)
7783 res, err := c.doRequest("json")
7784 if res != nil && res.StatusCode == http.StatusNotModified {
7785 if res.Body != nil {
7786 res.Body.Close()
7787 }
7788 return nil, gensupport.WrapError(&googleapi.Error{
7789 Code: res.StatusCode,
7790 Header: res.Header,
7791 })
7792 }
7793 if err != nil {
7794 return nil, err
7795 }
7796 defer googleapi.CloseBody(res)
7797 if err := googleapi.CheckResponse(res); err != nil {
7798 return nil, gensupport.WrapError(err)
7799 }
7800 ret := &Policy{
7801 ServerResponse: googleapi.ServerResponse{
7802 Header: res.Header,
7803 HTTPStatusCode: res.StatusCode,
7804 },
7805 }
7806 target := &ret
7807 if err := gensupport.DecodeResponse(target, res); err != nil {
7808 return nil, err
7809 }
7810 return ret, nil
7811 }
7812
7813 type TagValuesGetNamespacedCall struct {
7814 s *Service
7815 urlParams_ gensupport.URLParams
7816 ifNoneMatch_ string
7817 ctx_ context.Context
7818 header_ http.Header
7819 }
7820
7821
7822
7823
7824 func (r *TagValuesService) GetNamespaced() *TagValuesGetNamespacedCall {
7825 c := &TagValuesGetNamespacedCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7826 return c
7827 }
7828
7829
7830
7831
7832
7833
7834
7835 func (c *TagValuesGetNamespacedCall) Name(name string) *TagValuesGetNamespacedCall {
7836 c.urlParams_.Set("name", name)
7837 return c
7838 }
7839
7840
7841
7842
7843 func (c *TagValuesGetNamespacedCall) Fields(s ...googleapi.Field) *TagValuesGetNamespacedCall {
7844 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7845 return c
7846 }
7847
7848
7849
7850
7851 func (c *TagValuesGetNamespacedCall) IfNoneMatch(entityTag string) *TagValuesGetNamespacedCall {
7852 c.ifNoneMatch_ = entityTag
7853 return c
7854 }
7855
7856
7857 func (c *TagValuesGetNamespacedCall) Context(ctx context.Context) *TagValuesGetNamespacedCall {
7858 c.ctx_ = ctx
7859 return c
7860 }
7861
7862
7863
7864 func (c *TagValuesGetNamespacedCall) Header() http.Header {
7865 if c.header_ == nil {
7866 c.header_ = make(http.Header)
7867 }
7868 return c.header_
7869 }
7870
7871 func (c *TagValuesGetNamespacedCall) doRequest(alt string) (*http.Response, error) {
7872 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7873 if c.ifNoneMatch_ != "" {
7874 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7875 }
7876 var body io.Reader = nil
7877 c.urlParams_.Set("alt", alt)
7878 c.urlParams_.Set("prettyPrint", "false")
7879 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/tagValues/namespaced")
7880 urls += "?" + c.urlParams_.Encode()
7881 req, err := http.NewRequest("GET", urls, body)
7882 if err != nil {
7883 return nil, err
7884 }
7885 req.Header = reqHeaders
7886 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7887 }
7888
7889
7890
7891
7892
7893
7894 func (c *TagValuesGetNamespacedCall) Do(opts ...googleapi.CallOption) (*TagValue, error) {
7895 gensupport.SetOptions(c.urlParams_, opts...)
7896 res, err := c.doRequest("json")
7897 if res != nil && res.StatusCode == http.StatusNotModified {
7898 if res.Body != nil {
7899 res.Body.Close()
7900 }
7901 return nil, gensupport.WrapError(&googleapi.Error{
7902 Code: res.StatusCode,
7903 Header: res.Header,
7904 })
7905 }
7906 if err != nil {
7907 return nil, err
7908 }
7909 defer googleapi.CloseBody(res)
7910 if err := googleapi.CheckResponse(res); err != nil {
7911 return nil, gensupport.WrapError(err)
7912 }
7913 ret := &TagValue{
7914 ServerResponse: googleapi.ServerResponse{
7915 Header: res.Header,
7916 HTTPStatusCode: res.StatusCode,
7917 },
7918 }
7919 target := &ret
7920 if err := gensupport.DecodeResponse(target, res); err != nil {
7921 return nil, err
7922 }
7923 return ret, nil
7924 }
7925
7926 type TagValuesListCall struct {
7927 s *Service
7928 urlParams_ gensupport.URLParams
7929 ifNoneMatch_ string
7930 ctx_ context.Context
7931 header_ http.Header
7932 }
7933
7934
7935 func (r *TagValuesService) List() *TagValuesListCall {
7936 c := &TagValuesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7937 return c
7938 }
7939
7940
7941
7942
7943 func (c *TagValuesListCall) PageSize(pageSize int64) *TagValuesListCall {
7944 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
7945 return c
7946 }
7947
7948
7949
7950
7951 func (c *TagValuesListCall) PageToken(pageToken string) *TagValuesListCall {
7952 c.urlParams_.Set("pageToken", pageToken)
7953 return c
7954 }
7955
7956
7957
7958
7959 func (c *TagValuesListCall) Parent(parent string) *TagValuesListCall {
7960 c.urlParams_.Set("parent", parent)
7961 return c
7962 }
7963
7964
7965
7966
7967 func (c *TagValuesListCall) Fields(s ...googleapi.Field) *TagValuesListCall {
7968 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7969 return c
7970 }
7971
7972
7973
7974
7975 func (c *TagValuesListCall) IfNoneMatch(entityTag string) *TagValuesListCall {
7976 c.ifNoneMatch_ = entityTag
7977 return c
7978 }
7979
7980
7981 func (c *TagValuesListCall) Context(ctx context.Context) *TagValuesListCall {
7982 c.ctx_ = ctx
7983 return c
7984 }
7985
7986
7987
7988 func (c *TagValuesListCall) Header() http.Header {
7989 if c.header_ == nil {
7990 c.header_ = make(http.Header)
7991 }
7992 return c.header_
7993 }
7994
7995 func (c *TagValuesListCall) doRequest(alt string) (*http.Response, error) {
7996 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7997 if c.ifNoneMatch_ != "" {
7998 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7999 }
8000 var body io.Reader = nil
8001 c.urlParams_.Set("alt", alt)
8002 c.urlParams_.Set("prettyPrint", "false")
8003 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/tagValues")
8004 urls += "?" + c.urlParams_.Encode()
8005 req, err := http.NewRequest("GET", urls, body)
8006 if err != nil {
8007 return nil, err
8008 }
8009 req.Header = reqHeaders
8010 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8011 }
8012
8013
8014
8015
8016
8017
8018
8019 func (c *TagValuesListCall) Do(opts ...googleapi.CallOption) (*ListTagValuesResponse, error) {
8020 gensupport.SetOptions(c.urlParams_, opts...)
8021 res, err := c.doRequest("json")
8022 if res != nil && res.StatusCode == http.StatusNotModified {
8023 if res.Body != nil {
8024 res.Body.Close()
8025 }
8026 return nil, gensupport.WrapError(&googleapi.Error{
8027 Code: res.StatusCode,
8028 Header: res.Header,
8029 })
8030 }
8031 if err != nil {
8032 return nil, err
8033 }
8034 defer googleapi.CloseBody(res)
8035 if err := googleapi.CheckResponse(res); err != nil {
8036 return nil, gensupport.WrapError(err)
8037 }
8038 ret := &ListTagValuesResponse{
8039 ServerResponse: googleapi.ServerResponse{
8040 Header: res.Header,
8041 HTTPStatusCode: res.StatusCode,
8042 },
8043 }
8044 target := &ret
8045 if err := gensupport.DecodeResponse(target, res); err != nil {
8046 return nil, err
8047 }
8048 return ret, nil
8049 }
8050
8051
8052
8053
8054 func (c *TagValuesListCall) Pages(ctx context.Context, f func(*ListTagValuesResponse) error) error {
8055 c.ctx_ = ctx
8056 defer c.PageToken(c.urlParams_.Get("pageToken"))
8057 for {
8058 x, err := c.Do()
8059 if err != nil {
8060 return err
8061 }
8062 if err := f(x); err != nil {
8063 return err
8064 }
8065 if x.NextPageToken == "" {
8066 return nil
8067 }
8068 c.PageToken(x.NextPageToken)
8069 }
8070 }
8071
8072 type TagValuesPatchCall struct {
8073 s *Service
8074 name string
8075 tagvalue *TagValue
8076 urlParams_ gensupport.URLParams
8077 ctx_ context.Context
8078 header_ http.Header
8079 }
8080
8081
8082
8083
8084 func (r *TagValuesService) Patch(name string, tagvalue *TagValue) *TagValuesPatchCall {
8085 c := &TagValuesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8086 c.name = name
8087 c.tagvalue = tagvalue
8088 return c
8089 }
8090
8091
8092 func (c *TagValuesPatchCall) UpdateMask(updateMask string) *TagValuesPatchCall {
8093 c.urlParams_.Set("updateMask", updateMask)
8094 return c
8095 }
8096
8097
8098
8099
8100 func (c *TagValuesPatchCall) ValidateOnly(validateOnly bool) *TagValuesPatchCall {
8101 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
8102 return c
8103 }
8104
8105
8106
8107
8108 func (c *TagValuesPatchCall) Fields(s ...googleapi.Field) *TagValuesPatchCall {
8109 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8110 return c
8111 }
8112
8113
8114 func (c *TagValuesPatchCall) Context(ctx context.Context) *TagValuesPatchCall {
8115 c.ctx_ = ctx
8116 return c
8117 }
8118
8119
8120
8121 func (c *TagValuesPatchCall) Header() http.Header {
8122 if c.header_ == nil {
8123 c.header_ = make(http.Header)
8124 }
8125 return c.header_
8126 }
8127
8128 func (c *TagValuesPatchCall) doRequest(alt string) (*http.Response, error) {
8129 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8130 var body io.Reader = nil
8131 body, err := googleapi.WithoutDataWrapper.JSONReader(c.tagvalue)
8132 if err != nil {
8133 return nil, err
8134 }
8135 c.urlParams_.Set("alt", alt)
8136 c.urlParams_.Set("prettyPrint", "false")
8137 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}")
8138 urls += "?" + c.urlParams_.Encode()
8139 req, err := http.NewRequest("PATCH", urls, body)
8140 if err != nil {
8141 return nil, err
8142 }
8143 req.Header = reqHeaders
8144 googleapi.Expand(req.URL, map[string]string{
8145 "name": c.name,
8146 })
8147 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8148 }
8149
8150
8151
8152
8153
8154
8155 func (c *TagValuesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8156 gensupport.SetOptions(c.urlParams_, opts...)
8157 res, err := c.doRequest("json")
8158 if res != nil && res.StatusCode == http.StatusNotModified {
8159 if res.Body != nil {
8160 res.Body.Close()
8161 }
8162 return nil, gensupport.WrapError(&googleapi.Error{
8163 Code: res.StatusCode,
8164 Header: res.Header,
8165 })
8166 }
8167 if err != nil {
8168 return nil, err
8169 }
8170 defer googleapi.CloseBody(res)
8171 if err := googleapi.CheckResponse(res); err != nil {
8172 return nil, gensupport.WrapError(err)
8173 }
8174 ret := &Operation{
8175 ServerResponse: googleapi.ServerResponse{
8176 Header: res.Header,
8177 HTTPStatusCode: res.StatusCode,
8178 },
8179 }
8180 target := &ret
8181 if err := gensupport.DecodeResponse(target, res); err != nil {
8182 return nil, err
8183 }
8184 return ret, nil
8185 }
8186
8187 type TagValuesSetIamPolicyCall struct {
8188 s *Service
8189 resource string
8190 setiampolicyrequest *SetIamPolicyRequest
8191 urlParams_ gensupport.URLParams
8192 ctx_ context.Context
8193 header_ http.Header
8194 }
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205 func (r *TagValuesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *TagValuesSetIamPolicyCall {
8206 c := &TagValuesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8207 c.resource = resource
8208 c.setiampolicyrequest = setiampolicyrequest
8209 return c
8210 }
8211
8212
8213
8214
8215 func (c *TagValuesSetIamPolicyCall) Fields(s ...googleapi.Field) *TagValuesSetIamPolicyCall {
8216 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8217 return c
8218 }
8219
8220
8221 func (c *TagValuesSetIamPolicyCall) Context(ctx context.Context) *TagValuesSetIamPolicyCall {
8222 c.ctx_ = ctx
8223 return c
8224 }
8225
8226
8227
8228 func (c *TagValuesSetIamPolicyCall) Header() http.Header {
8229 if c.header_ == nil {
8230 c.header_ = make(http.Header)
8231 }
8232 return c.header_
8233 }
8234
8235 func (c *TagValuesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
8236 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8237 var body io.Reader = nil
8238 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
8239 if err != nil {
8240 return nil, err
8241 }
8242 c.urlParams_.Set("alt", alt)
8243 c.urlParams_.Set("prettyPrint", "false")
8244 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+resource}:setIamPolicy")
8245 urls += "?" + c.urlParams_.Encode()
8246 req, err := http.NewRequest("POST", urls, body)
8247 if err != nil {
8248 return nil, err
8249 }
8250 req.Header = reqHeaders
8251 googleapi.Expand(req.URL, map[string]string{
8252 "resource": c.resource,
8253 })
8254 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8255 }
8256
8257
8258
8259
8260
8261
8262 func (c *TagValuesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
8263 gensupport.SetOptions(c.urlParams_, opts...)
8264 res, err := c.doRequest("json")
8265 if res != nil && res.StatusCode == http.StatusNotModified {
8266 if res.Body != nil {
8267 res.Body.Close()
8268 }
8269 return nil, gensupport.WrapError(&googleapi.Error{
8270 Code: res.StatusCode,
8271 Header: res.Header,
8272 })
8273 }
8274 if err != nil {
8275 return nil, err
8276 }
8277 defer googleapi.CloseBody(res)
8278 if err := googleapi.CheckResponse(res); err != nil {
8279 return nil, gensupport.WrapError(err)
8280 }
8281 ret := &Policy{
8282 ServerResponse: googleapi.ServerResponse{
8283 Header: res.Header,
8284 HTTPStatusCode: res.StatusCode,
8285 },
8286 }
8287 target := &ret
8288 if err := gensupport.DecodeResponse(target, res); err != nil {
8289 return nil, err
8290 }
8291 return ret, nil
8292 }
8293
8294 type TagValuesTestIamPermissionsCall struct {
8295 s *Service
8296 resource string
8297 testiampermissionsrequest *TestIamPermissionsRequest
8298 urlParams_ gensupport.URLParams
8299 ctx_ context.Context
8300 header_ http.Header
8301 }
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312 func (r *TagValuesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *TagValuesTestIamPermissionsCall {
8313 c := &TagValuesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8314 c.resource = resource
8315 c.testiampermissionsrequest = testiampermissionsrequest
8316 return c
8317 }
8318
8319
8320
8321
8322 func (c *TagValuesTestIamPermissionsCall) Fields(s ...googleapi.Field) *TagValuesTestIamPermissionsCall {
8323 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8324 return c
8325 }
8326
8327
8328 func (c *TagValuesTestIamPermissionsCall) Context(ctx context.Context) *TagValuesTestIamPermissionsCall {
8329 c.ctx_ = ctx
8330 return c
8331 }
8332
8333
8334
8335 func (c *TagValuesTestIamPermissionsCall) Header() http.Header {
8336 if c.header_ == nil {
8337 c.header_ = make(http.Header)
8338 }
8339 return c.header_
8340 }
8341
8342 func (c *TagValuesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
8343 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8344 var body io.Reader = nil
8345 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
8346 if err != nil {
8347 return nil, err
8348 }
8349 c.urlParams_.Set("alt", alt)
8350 c.urlParams_.Set("prettyPrint", "false")
8351 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+resource}:testIamPermissions")
8352 urls += "?" + c.urlParams_.Encode()
8353 req, err := http.NewRequest("POST", urls, body)
8354 if err != nil {
8355 return nil, err
8356 }
8357 req.Header = reqHeaders
8358 googleapi.Expand(req.URL, map[string]string{
8359 "resource": c.resource,
8360 })
8361 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8362 }
8363
8364
8365
8366
8367
8368
8369
8370 func (c *TagValuesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
8371 gensupport.SetOptions(c.urlParams_, opts...)
8372 res, err := c.doRequest("json")
8373 if res != nil && res.StatusCode == http.StatusNotModified {
8374 if res.Body != nil {
8375 res.Body.Close()
8376 }
8377 return nil, gensupport.WrapError(&googleapi.Error{
8378 Code: res.StatusCode,
8379 Header: res.Header,
8380 })
8381 }
8382 if err != nil {
8383 return nil, err
8384 }
8385 defer googleapi.CloseBody(res)
8386 if err := googleapi.CheckResponse(res); err != nil {
8387 return nil, gensupport.WrapError(err)
8388 }
8389 ret := &TestIamPermissionsResponse{
8390 ServerResponse: googleapi.ServerResponse{
8391 Header: res.Header,
8392 HTTPStatusCode: res.StatusCode,
8393 },
8394 }
8395 target := &ret
8396 if err := gensupport.DecodeResponse(target, res); err != nil {
8397 return nil, err
8398 }
8399 return ret, nil
8400 }
8401
8402 type TagValuesTagHoldsCreateCall struct {
8403 s *Service
8404 parent string
8405 taghold *TagHold
8406 urlParams_ gensupport.URLParams
8407 ctx_ context.Context
8408 header_ http.Header
8409 }
8410
8411
8412
8413
8414
8415
8416 func (r *TagValuesTagHoldsService) Create(parent string, taghold *TagHold) *TagValuesTagHoldsCreateCall {
8417 c := &TagValuesTagHoldsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8418 c.parent = parent
8419 c.taghold = taghold
8420 return c
8421 }
8422
8423
8424
8425
8426 func (c *TagValuesTagHoldsCreateCall) ValidateOnly(validateOnly bool) *TagValuesTagHoldsCreateCall {
8427 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
8428 return c
8429 }
8430
8431
8432
8433
8434 func (c *TagValuesTagHoldsCreateCall) Fields(s ...googleapi.Field) *TagValuesTagHoldsCreateCall {
8435 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8436 return c
8437 }
8438
8439
8440 func (c *TagValuesTagHoldsCreateCall) Context(ctx context.Context) *TagValuesTagHoldsCreateCall {
8441 c.ctx_ = ctx
8442 return c
8443 }
8444
8445
8446
8447 func (c *TagValuesTagHoldsCreateCall) Header() http.Header {
8448 if c.header_ == nil {
8449 c.header_ = make(http.Header)
8450 }
8451 return c.header_
8452 }
8453
8454 func (c *TagValuesTagHoldsCreateCall) doRequest(alt string) (*http.Response, error) {
8455 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8456 var body io.Reader = nil
8457 body, err := googleapi.WithoutDataWrapper.JSONReader(c.taghold)
8458 if err != nil {
8459 return nil, err
8460 }
8461 c.urlParams_.Set("alt", alt)
8462 c.urlParams_.Set("prettyPrint", "false")
8463 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+parent}/tagHolds")
8464 urls += "?" + c.urlParams_.Encode()
8465 req, err := http.NewRequest("POST", urls, body)
8466 if err != nil {
8467 return nil, err
8468 }
8469 req.Header = reqHeaders
8470 googleapi.Expand(req.URL, map[string]string{
8471 "parent": c.parent,
8472 })
8473 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8474 }
8475
8476
8477
8478
8479
8480
8481 func (c *TagValuesTagHoldsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8482 gensupport.SetOptions(c.urlParams_, opts...)
8483 res, err := c.doRequest("json")
8484 if res != nil && res.StatusCode == http.StatusNotModified {
8485 if res.Body != nil {
8486 res.Body.Close()
8487 }
8488 return nil, gensupport.WrapError(&googleapi.Error{
8489 Code: res.StatusCode,
8490 Header: res.Header,
8491 })
8492 }
8493 if err != nil {
8494 return nil, err
8495 }
8496 defer googleapi.CloseBody(res)
8497 if err := googleapi.CheckResponse(res); err != nil {
8498 return nil, gensupport.WrapError(err)
8499 }
8500 ret := &Operation{
8501 ServerResponse: googleapi.ServerResponse{
8502 Header: res.Header,
8503 HTTPStatusCode: res.StatusCode,
8504 },
8505 }
8506 target := &ret
8507 if err := gensupport.DecodeResponse(target, res); err != nil {
8508 return nil, err
8509 }
8510 return ret, nil
8511 }
8512
8513 type TagValuesTagHoldsDeleteCall struct {
8514 s *Service
8515 name string
8516 urlParams_ gensupport.URLParams
8517 ctx_ context.Context
8518 header_ http.Header
8519 }
8520
8521
8522
8523
8524
8525 func (r *TagValuesTagHoldsService) Delete(name string) *TagValuesTagHoldsDeleteCall {
8526 c := &TagValuesTagHoldsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8527 c.name = name
8528 return c
8529 }
8530
8531
8532
8533
8534 func (c *TagValuesTagHoldsDeleteCall) ValidateOnly(validateOnly bool) *TagValuesTagHoldsDeleteCall {
8535 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
8536 return c
8537 }
8538
8539
8540
8541
8542 func (c *TagValuesTagHoldsDeleteCall) Fields(s ...googleapi.Field) *TagValuesTagHoldsDeleteCall {
8543 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8544 return c
8545 }
8546
8547
8548 func (c *TagValuesTagHoldsDeleteCall) Context(ctx context.Context) *TagValuesTagHoldsDeleteCall {
8549 c.ctx_ = ctx
8550 return c
8551 }
8552
8553
8554
8555 func (c *TagValuesTagHoldsDeleteCall) Header() http.Header {
8556 if c.header_ == nil {
8557 c.header_ = make(http.Header)
8558 }
8559 return c.header_
8560 }
8561
8562 func (c *TagValuesTagHoldsDeleteCall) doRequest(alt string) (*http.Response, error) {
8563 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8564 var body io.Reader = nil
8565 c.urlParams_.Set("alt", alt)
8566 c.urlParams_.Set("prettyPrint", "false")
8567 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}")
8568 urls += "?" + c.urlParams_.Encode()
8569 req, err := http.NewRequest("DELETE", urls, body)
8570 if err != nil {
8571 return nil, err
8572 }
8573 req.Header = reqHeaders
8574 googleapi.Expand(req.URL, map[string]string{
8575 "name": c.name,
8576 })
8577 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8578 }
8579
8580
8581
8582
8583
8584
8585 func (c *TagValuesTagHoldsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8586 gensupport.SetOptions(c.urlParams_, opts...)
8587 res, err := c.doRequest("json")
8588 if res != nil && res.StatusCode == http.StatusNotModified {
8589 if res.Body != nil {
8590 res.Body.Close()
8591 }
8592 return nil, gensupport.WrapError(&googleapi.Error{
8593 Code: res.StatusCode,
8594 Header: res.Header,
8595 })
8596 }
8597 if err != nil {
8598 return nil, err
8599 }
8600 defer googleapi.CloseBody(res)
8601 if err := googleapi.CheckResponse(res); err != nil {
8602 return nil, gensupport.WrapError(err)
8603 }
8604 ret := &Operation{
8605 ServerResponse: googleapi.ServerResponse{
8606 Header: res.Header,
8607 HTTPStatusCode: res.StatusCode,
8608 },
8609 }
8610 target := &ret
8611 if err := gensupport.DecodeResponse(target, res); err != nil {
8612 return nil, err
8613 }
8614 return ret, nil
8615 }
8616
8617 type TagValuesTagHoldsListCall struct {
8618 s *Service
8619 parent string
8620 urlParams_ gensupport.URLParams
8621 ifNoneMatch_ string
8622 ctx_ context.Context
8623 header_ http.Header
8624 }
8625
8626
8627
8628
8629
8630 func (r *TagValuesTagHoldsService) List(parent string) *TagValuesTagHoldsListCall {
8631 c := &TagValuesTagHoldsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8632 c.parent = parent
8633 return c
8634 }
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645 func (c *TagValuesTagHoldsListCall) Filter(filter string) *TagValuesTagHoldsListCall {
8646 c.urlParams_.Set("filter", filter)
8647 return c
8648 }
8649
8650
8651
8652
8653 func (c *TagValuesTagHoldsListCall) PageSize(pageSize int64) *TagValuesTagHoldsListCall {
8654 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
8655 return c
8656 }
8657
8658
8659
8660
8661 func (c *TagValuesTagHoldsListCall) PageToken(pageToken string) *TagValuesTagHoldsListCall {
8662 c.urlParams_.Set("pageToken", pageToken)
8663 return c
8664 }
8665
8666
8667
8668
8669 func (c *TagValuesTagHoldsListCall) Fields(s ...googleapi.Field) *TagValuesTagHoldsListCall {
8670 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8671 return c
8672 }
8673
8674
8675
8676
8677 func (c *TagValuesTagHoldsListCall) IfNoneMatch(entityTag string) *TagValuesTagHoldsListCall {
8678 c.ifNoneMatch_ = entityTag
8679 return c
8680 }
8681
8682
8683 func (c *TagValuesTagHoldsListCall) Context(ctx context.Context) *TagValuesTagHoldsListCall {
8684 c.ctx_ = ctx
8685 return c
8686 }
8687
8688
8689
8690 func (c *TagValuesTagHoldsListCall) Header() http.Header {
8691 if c.header_ == nil {
8692 c.header_ = make(http.Header)
8693 }
8694 return c.header_
8695 }
8696
8697 func (c *TagValuesTagHoldsListCall) doRequest(alt string) (*http.Response, error) {
8698 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8699 if c.ifNoneMatch_ != "" {
8700 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8701 }
8702 var body io.Reader = nil
8703 c.urlParams_.Set("alt", alt)
8704 c.urlParams_.Set("prettyPrint", "false")
8705 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+parent}/tagHolds")
8706 urls += "?" + c.urlParams_.Encode()
8707 req, err := http.NewRequest("GET", urls, body)
8708 if err != nil {
8709 return nil, err
8710 }
8711 req.Header = reqHeaders
8712 googleapi.Expand(req.URL, map[string]string{
8713 "parent": c.parent,
8714 })
8715 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8716 }
8717
8718
8719
8720
8721
8722
8723
8724 func (c *TagValuesTagHoldsListCall) Do(opts ...googleapi.CallOption) (*ListTagHoldsResponse, error) {
8725 gensupport.SetOptions(c.urlParams_, opts...)
8726 res, err := c.doRequest("json")
8727 if res != nil && res.StatusCode == http.StatusNotModified {
8728 if res.Body != nil {
8729 res.Body.Close()
8730 }
8731 return nil, gensupport.WrapError(&googleapi.Error{
8732 Code: res.StatusCode,
8733 Header: res.Header,
8734 })
8735 }
8736 if err != nil {
8737 return nil, err
8738 }
8739 defer googleapi.CloseBody(res)
8740 if err := googleapi.CheckResponse(res); err != nil {
8741 return nil, gensupport.WrapError(err)
8742 }
8743 ret := &ListTagHoldsResponse{
8744 ServerResponse: googleapi.ServerResponse{
8745 Header: res.Header,
8746 HTTPStatusCode: res.StatusCode,
8747 },
8748 }
8749 target := &ret
8750 if err := gensupport.DecodeResponse(target, res); err != nil {
8751 return nil, err
8752 }
8753 return ret, nil
8754 }
8755
8756
8757
8758
8759 func (c *TagValuesTagHoldsListCall) Pages(ctx context.Context, f func(*ListTagHoldsResponse) error) error {
8760 c.ctx_ = ctx
8761 defer c.PageToken(c.urlParams_.Get("pageToken"))
8762 for {
8763 x, err := c.Do()
8764 if err != nil {
8765 return err
8766 }
8767 if err := f(x); err != nil {
8768 return err
8769 }
8770 if x.NextPageToken == "" {
8771 return nil
8772 }
8773 c.PageToken(x.NextPageToken)
8774 }
8775 }
8776
View as plain text