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