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 package servicebroker
39
40 import (
41 "bytes"
42 "context"
43 "encoding/json"
44 "errors"
45 "fmt"
46 "io"
47 "net/http"
48 "net/url"
49 "strconv"
50 "strings"
51
52 googleapi "google.golang.org/api/googleapi"
53 gensupport "google.golang.org/api/internal/gensupport"
54 option "google.golang.org/api/option"
55 htransport "google.golang.org/api/transport/http"
56 )
57
58
59
60 var _ = bytes.NewBuffer
61 var _ = strconv.Itoa
62 var _ = fmt.Sprintf
63 var _ = json.NewDecoder
64 var _ = io.Copy
65 var _ = url.Parse
66 var _ = gensupport.MarshalJSON
67 var _ = googleapi.Version
68 var _ = errors.New
69 var _ = strings.Replace
70 var _ = context.Canceled
71
72 const apiId = "servicebroker:v1beta1"
73 const apiName = "servicebroker"
74 const apiVersion = "v1beta1"
75 const basePath = "https://servicebroker.googleapis.com/"
76
77
78 const (
79
80 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
81 )
82
83
84 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
85 scopesOption := option.WithScopes(
86 "https://www.googleapis.com/auth/cloud-platform",
87 )
88
89 opts = append([]option.ClientOption{scopesOption}, opts...)
90 client, endpoint, err := htransport.NewClient(ctx, opts...)
91 if err != nil {
92 return nil, err
93 }
94 s, err := New(client)
95 if err != nil {
96 return nil, err
97 }
98 if endpoint != "" {
99 s.BasePath = endpoint
100 }
101 return s, nil
102 }
103
104
105
106
107
108
109 func New(client *http.Client) (*Service, error) {
110 if client == nil {
111 return nil, errors.New("client is nil")
112 }
113 s := &Service{client: client, BasePath: basePath}
114 s.Projects = NewProjectsService(s)
115 s.V1beta1 = NewV1beta1Service(s)
116 return s, nil
117 }
118
119 type Service struct {
120 client *http.Client
121 BasePath string
122 UserAgent string
123
124 Projects *ProjectsService
125
126 V1beta1 *V1beta1Service
127 }
128
129 func (s *Service) userAgent() string {
130 if s.UserAgent == "" {
131 return googleapi.UserAgent
132 }
133 return googleapi.UserAgent + " " + s.UserAgent
134 }
135
136 func NewProjectsService(s *Service) *ProjectsService {
137 rs := &ProjectsService{s: s}
138 rs.Brokers = NewProjectsBrokersService(s)
139 return rs
140 }
141
142 type ProjectsService struct {
143 s *Service
144
145 Brokers *ProjectsBrokersService
146 }
147
148 func NewProjectsBrokersService(s *Service) *ProjectsBrokersService {
149 rs := &ProjectsBrokersService{s: s}
150 rs.Instances = NewProjectsBrokersInstancesService(s)
151 rs.V2 = NewProjectsBrokersV2Service(s)
152 return rs
153 }
154
155 type ProjectsBrokersService struct {
156 s *Service
157
158 Instances *ProjectsBrokersInstancesService
159
160 V2 *ProjectsBrokersV2Service
161 }
162
163 func NewProjectsBrokersInstancesService(s *Service) *ProjectsBrokersInstancesService {
164 rs := &ProjectsBrokersInstancesService{s: s}
165 rs.Bindings = NewProjectsBrokersInstancesBindingsService(s)
166 return rs
167 }
168
169 type ProjectsBrokersInstancesService struct {
170 s *Service
171
172 Bindings *ProjectsBrokersInstancesBindingsService
173 }
174
175 func NewProjectsBrokersInstancesBindingsService(s *Service) *ProjectsBrokersInstancesBindingsService {
176 rs := &ProjectsBrokersInstancesBindingsService{s: s}
177 return rs
178 }
179
180 type ProjectsBrokersInstancesBindingsService struct {
181 s *Service
182 }
183
184 func NewProjectsBrokersV2Service(s *Service) *ProjectsBrokersV2Service {
185 rs := &ProjectsBrokersV2Service{s: s}
186 rs.Catalog = NewProjectsBrokersV2CatalogService(s)
187 rs.ServiceInstances = NewProjectsBrokersV2ServiceInstancesService(s)
188 return rs
189 }
190
191 type ProjectsBrokersV2Service struct {
192 s *Service
193
194 Catalog *ProjectsBrokersV2CatalogService
195
196 ServiceInstances *ProjectsBrokersV2ServiceInstancesService
197 }
198
199 func NewProjectsBrokersV2CatalogService(s *Service) *ProjectsBrokersV2CatalogService {
200 rs := &ProjectsBrokersV2CatalogService{s: s}
201 return rs
202 }
203
204 type ProjectsBrokersV2CatalogService struct {
205 s *Service
206 }
207
208 func NewProjectsBrokersV2ServiceInstancesService(s *Service) *ProjectsBrokersV2ServiceInstancesService {
209 rs := &ProjectsBrokersV2ServiceInstancesService{s: s}
210 rs.ServiceBindings = NewProjectsBrokersV2ServiceInstancesServiceBindingsService(s)
211 return rs
212 }
213
214 type ProjectsBrokersV2ServiceInstancesService struct {
215 s *Service
216
217 ServiceBindings *ProjectsBrokersV2ServiceInstancesServiceBindingsService
218 }
219
220 func NewProjectsBrokersV2ServiceInstancesServiceBindingsService(s *Service) *ProjectsBrokersV2ServiceInstancesServiceBindingsService {
221 rs := &ProjectsBrokersV2ServiceInstancesServiceBindingsService{s: s}
222 return rs
223 }
224
225 type ProjectsBrokersV2ServiceInstancesServiceBindingsService struct {
226 s *Service
227 }
228
229 func NewV1beta1Service(s *Service) *V1beta1Service {
230 rs := &V1beta1Service{s: s}
231 return rs
232 }
233
234 type V1beta1Service struct {
235 s *Service
236 }
237
238
239 type GoogleCloudServicebrokerV1beta1__Binding struct {
240
241
242
243 BindResource googleapi.RawMessage `json:"bind_resource,omitempty"`
244
245
246
247
248
249 BindingId string `json:"binding_id,omitempty"`
250
251
252 CreateTime string `json:"createTime,omitempty"`
253
254
255
256
257 DeploymentName string `json:"deploymentName,omitempty"`
258
259
260 Parameters googleapi.RawMessage `json:"parameters,omitempty"`
261
262
263
264
265
266 PlanId string `json:"plan_id,omitempty"`
267
268
269
270
271
272 ResourceName string `json:"resourceName,omitempty"`
273
274
275
276
277
278
279 ServiceId string `json:"service_id,omitempty"`
280
281
282
283
284
285
286
287 ForceSendFields []string `json:"-"`
288
289
290
291
292
293
294
295 NullFields []string `json:"-"`
296 }
297
298 func (s *GoogleCloudServicebrokerV1beta1__Binding) MarshalJSON() ([]byte, error) {
299 type NoMethod GoogleCloudServicebrokerV1beta1__Binding
300 raw := NoMethod(*s)
301 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
302 }
303
304
305
306
307 type GoogleCloudServicebrokerV1beta1__Broker struct {
308
309 CreateTime string `json:"createTime,omitempty"`
310
311
312
313
314
315
316
317 Name string `json:"name,omitempty"`
318
319
320
321
322 Title string `json:"title,omitempty"`
323
324
325
326
327
328 Url string `json:"url,omitempty"`
329
330
331
332 googleapi.ServerResponse `json:"-"`
333
334
335
336
337
338
339
340 ForceSendFields []string `json:"-"`
341
342
343
344
345
346
347
348 NullFields []string `json:"-"`
349 }
350
351 func (s *GoogleCloudServicebrokerV1beta1__Broker) MarshalJSON() ([]byte, error) {
352 type NoMethod GoogleCloudServicebrokerV1beta1__Broker
353 raw := NoMethod(*s)
354 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
355 }
356
357
358
359 type GoogleCloudServicebrokerV1beta1__CreateBindingResponse struct {
360
361 Credentials googleapi.RawMessage `json:"credentials,omitempty"`
362
363
364
365
366
367
368
369 Description string `json:"description,omitempty"`
370
371
372
373
374
375
376 Operation string `json:"operation,omitempty"`
377
378
379
380
381 RouteServiceUrl string `json:"route_service_url,omitempty"`
382
383
384 SyslogDrainUrl string `json:"syslog_drain_url,omitempty"`
385
386
387 VolumeMounts []googleapi.RawMessage `json:"volume_mounts,omitempty"`
388
389
390
391 googleapi.ServerResponse `json:"-"`
392
393
394
395
396
397
398
399 ForceSendFields []string `json:"-"`
400
401
402
403
404
405
406
407 NullFields []string `json:"-"`
408 }
409
410 func (s *GoogleCloudServicebrokerV1beta1__CreateBindingResponse) MarshalJSON() ([]byte, error) {
411 type NoMethod GoogleCloudServicebrokerV1beta1__CreateBindingResponse
412 raw := NoMethod(*s)
413 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
414 }
415
416
417
418 type GoogleCloudServicebrokerV1beta1__CreateServiceInstanceResponse struct {
419
420
421
422
423
424
425 Description string `json:"description,omitempty"`
426
427
428
429
430
431 Operation string `json:"operation,omitempty"`
432
433
434
435 googleapi.ServerResponse `json:"-"`
436
437
438
439
440
441
442
443 ForceSendFields []string `json:"-"`
444
445
446
447
448
449
450
451 NullFields []string `json:"-"`
452 }
453
454 func (s *GoogleCloudServicebrokerV1beta1__CreateServiceInstanceResponse) MarshalJSON() ([]byte, error) {
455 type NoMethod GoogleCloudServicebrokerV1beta1__CreateServiceInstanceResponse
456 raw := NoMethod(*s)
457 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
458 }
459
460
461
462 type GoogleCloudServicebrokerV1beta1__DashboardClient struct {
463
464 Id string `json:"id,omitempty"`
465
466
467
468
469 RedirectUri string `json:"redirect_uri,omitempty"`
470
471
472 Secret string `json:"secret,omitempty"`
473
474
475
476
477
478
479
480 ForceSendFields []string `json:"-"`
481
482
483
484
485
486
487
488 NullFields []string `json:"-"`
489 }
490
491 func (s *GoogleCloudServicebrokerV1beta1__DashboardClient) MarshalJSON() ([]byte, error) {
492 type NoMethod GoogleCloudServicebrokerV1beta1__DashboardClient
493 raw := NoMethod(*s)
494 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
495 }
496
497
498
499 type GoogleCloudServicebrokerV1beta1__DeleteBindingResponse struct {
500
501
502
503
504
505
506 Description string `json:"description,omitempty"`
507
508
509
510
511 Operation string `json:"operation,omitempty"`
512
513
514
515 googleapi.ServerResponse `json:"-"`
516
517
518
519
520
521
522
523 ForceSendFields []string `json:"-"`
524
525
526
527
528
529
530
531 NullFields []string `json:"-"`
532 }
533
534 func (s *GoogleCloudServicebrokerV1beta1__DeleteBindingResponse) MarshalJSON() ([]byte, error) {
535 type NoMethod GoogleCloudServicebrokerV1beta1__DeleteBindingResponse
536 raw := NoMethod(*s)
537 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
538 }
539
540
541
542 type GoogleCloudServicebrokerV1beta1__DeleteServiceInstanceResponse struct {
543
544
545
546
547
548
549 Description string `json:"description,omitempty"`
550
551
552
553
554 Operation string `json:"operation,omitempty"`
555
556
557
558 googleapi.ServerResponse `json:"-"`
559
560
561
562
563
564
565
566 ForceSendFields []string `json:"-"`
567
568
569
570
571
572
573
574 NullFields []string `json:"-"`
575 }
576
577 func (s *GoogleCloudServicebrokerV1beta1__DeleteServiceInstanceResponse) MarshalJSON() ([]byte, error) {
578 type NoMethod GoogleCloudServicebrokerV1beta1__DeleteServiceInstanceResponse
579 raw := NoMethod(*s)
580 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
581 }
582
583
584
585 type GoogleCloudServicebrokerV1beta1__GetBindingResponse struct {
586
587 Credentials googleapi.RawMessage `json:"credentials,omitempty"`
588
589
590
591
592 DeploymentName string `json:"deploymentName,omitempty"`
593
594
595
596
597
598
599
600 Description string `json:"description,omitempty"`
601
602
603
604
605
606 ResourceName string `json:"resourceName,omitempty"`
607
608
609
610
611 RouteServiceUrl string `json:"route_service_url,omitempty"`
612
613
614 SyslogDrainUrl string `json:"syslog_drain_url,omitempty"`
615
616
617 VolumeMounts []googleapi.RawMessage `json:"volume_mounts,omitempty"`
618
619
620
621 googleapi.ServerResponse `json:"-"`
622
623
624
625
626
627
628
629 ForceSendFields []string `json:"-"`
630
631
632
633
634
635
636
637 NullFields []string `json:"-"`
638 }
639
640 func (s *GoogleCloudServicebrokerV1beta1__GetBindingResponse) MarshalJSON() ([]byte, error) {
641 type NoMethod GoogleCloudServicebrokerV1beta1__GetBindingResponse
642 raw := NoMethod(*s)
643 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
644 }
645
646
647
648 type GoogleCloudServicebrokerV1beta1__ListBindingsResponse struct {
649
650 Bindings []*GoogleCloudServicebrokerV1beta1__Binding `json:"bindings,omitempty"`
651
652
653
654
655
656
657
658 Description string `json:"description,omitempty"`
659
660
661
662
663
664
665
666
667
668
669 NextPageToken string `json:"nextPageToken,omitempty"`
670
671
672
673 googleapi.ServerResponse `json:"-"`
674
675
676
677
678
679
680
681 ForceSendFields []string `json:"-"`
682
683
684
685
686
687
688
689 NullFields []string `json:"-"`
690 }
691
692 func (s *GoogleCloudServicebrokerV1beta1__ListBindingsResponse) MarshalJSON() ([]byte, error) {
693 type NoMethod GoogleCloudServicebrokerV1beta1__ListBindingsResponse
694 raw := NoMethod(*s)
695 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
696 }
697
698
699
700 type GoogleCloudServicebrokerV1beta1__ListBrokersResponse struct {
701
702 Brokers []*GoogleCloudServicebrokerV1beta1__Broker `json:"brokers,omitempty"`
703
704
705
706
707
708
709
710
711
712
713 NextPageToken string `json:"nextPageToken,omitempty"`
714
715
716
717 googleapi.ServerResponse `json:"-"`
718
719
720
721
722
723
724
725 ForceSendFields []string `json:"-"`
726
727
728
729
730
731
732
733 NullFields []string `json:"-"`
734 }
735
736 func (s *GoogleCloudServicebrokerV1beta1__ListBrokersResponse) MarshalJSON() ([]byte, error) {
737 type NoMethod GoogleCloudServicebrokerV1beta1__ListBrokersResponse
738 raw := NoMethod(*s)
739 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
740 }
741
742
743
744 type GoogleCloudServicebrokerV1beta1__ListCatalogResponse struct {
745
746
747
748
749
750
751 Description string `json:"description,omitempty"`
752
753
754
755
756
757
758
759
760
761
762 NextPageToken string `json:"nextPageToken,omitempty"`
763
764
765 Services []*GoogleCloudServicebrokerV1beta1__Service `json:"services,omitempty"`
766
767
768
769 googleapi.ServerResponse `json:"-"`
770
771
772
773
774
775
776
777 ForceSendFields []string `json:"-"`
778
779
780
781
782
783
784
785 NullFields []string `json:"-"`
786 }
787
788 func (s *GoogleCloudServicebrokerV1beta1__ListCatalogResponse) MarshalJSON() ([]byte, error) {
789 type NoMethod GoogleCloudServicebrokerV1beta1__ListCatalogResponse
790 raw := NoMethod(*s)
791 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
792 }
793
794
795
796 type GoogleCloudServicebrokerV1beta1__ListServiceInstancesResponse struct {
797
798
799
800
801
802
803 Description string `json:"description,omitempty"`
804
805
806 Instances []*GoogleCloudServicebrokerV1beta1__ServiceInstance `json:"instances,omitempty"`
807
808
809
810
811
812
813
814
815
816
817 NextPageToken string `json:"nextPageToken,omitempty"`
818
819
820
821 googleapi.ServerResponse `json:"-"`
822
823
824
825
826
827
828
829 ForceSendFields []string `json:"-"`
830
831
832
833
834
835
836
837 NullFields []string `json:"-"`
838 }
839
840 func (s *GoogleCloudServicebrokerV1beta1__ListServiceInstancesResponse) MarshalJSON() ([]byte, error) {
841 type NoMethod GoogleCloudServicebrokerV1beta1__ListServiceInstancesResponse
842 raw := NoMethod(*s)
843 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
844 }
845
846
847
848 type GoogleCloudServicebrokerV1beta1__Operation struct {
849
850 Description string `json:"description,omitempty"`
851
852
853
854 State string `json:"state,omitempty"`
855
856
857
858 googleapi.ServerResponse `json:"-"`
859
860
861
862
863
864
865
866 ForceSendFields []string `json:"-"`
867
868
869
870
871
872
873
874 NullFields []string `json:"-"`
875 }
876
877 func (s *GoogleCloudServicebrokerV1beta1__Operation) MarshalJSON() ([]byte, error) {
878 type NoMethod GoogleCloudServicebrokerV1beta1__Operation
879 raw := NoMethod(*s)
880 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
881 }
882
883
884
885 type GoogleCloudServicebrokerV1beta1__Plan struct {
886
887
888
889 Bindable bool `json:"bindable,omitempty"`
890
891
892 Description string `json:"description,omitempty"`
893
894
895 Free bool `json:"free,omitempty"`
896
897
898
899
900 Id string `json:"id,omitempty"`
901
902
903
904 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
905
906
907
908
909
910
911 Name string `json:"name,omitempty"`
912
913
914
915 Schemas googleapi.RawMessage `json:"schemas,omitempty"`
916
917
918
919
920
921
922
923 ForceSendFields []string `json:"-"`
924
925
926
927
928
929
930
931 NullFields []string `json:"-"`
932 }
933
934 func (s *GoogleCloudServicebrokerV1beta1__Plan) MarshalJSON() ([]byte, error) {
935 type NoMethod GoogleCloudServicebrokerV1beta1__Plan
936 raw := NoMethod(*s)
937 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
938 }
939
940
941
942
943
944
945
946
947 type GoogleCloudServicebrokerV1beta1__Service struct {
948
949
950
951 Bindable bool `json:"bindable,omitempty"`
952
953
954
955 BindingRetrievable bool `json:"binding_retrievable,omitempty"`
956
957
958
959 BindingsRetrievable bool `json:"bindings_retrievable,omitempty"`
960
961
962 DashboardClient *GoogleCloudServicebrokerV1beta1__DashboardClient `json:"dashboard_client,omitempty"`
963
964
965 Description string `json:"description,omitempty"`
966
967
968
969
970 Id string `json:"id,omitempty"`
971
972
973
974 InstancesRetrievable bool `json:"instances_retrievable,omitempty"`
975
976
977
978 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
979
980
981
982
983
984
985
986
987 Name string `json:"name,omitempty"`
988
989
990
991 PlanUpdateable bool `json:"plan_updateable,omitempty"`
992
993
994
995 Plans []*GoogleCloudServicebrokerV1beta1__Plan `json:"plans,omitempty"`
996
997
998
999
1000 Tags []string `json:"tags,omitempty"`
1001
1002
1003
1004
1005
1006
1007
1008 ForceSendFields []string `json:"-"`
1009
1010
1011
1012
1013
1014
1015
1016 NullFields []string `json:"-"`
1017 }
1018
1019 func (s *GoogleCloudServicebrokerV1beta1__Service) MarshalJSON() ([]byte, error) {
1020 type NoMethod GoogleCloudServicebrokerV1beta1__Service
1021 raw := NoMethod(*s)
1022 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1023 }
1024
1025
1026
1027 type GoogleCloudServicebrokerV1beta1__ServiceInstance struct {
1028
1029
1030
1031
1032
1033
1034 Context googleapi.RawMessage `json:"context,omitempty"`
1035
1036
1037 CreateTime string `json:"createTime,omitempty"`
1038
1039
1040
1041
1042 DeploymentName string `json:"deploymentName,omitempty"`
1043
1044
1045
1046
1047 Description string `json:"description,omitempty"`
1048
1049
1050
1051
1052
1053 InstanceId string `json:"instance_id,omitempty"`
1054
1055
1056
1057
1058
1059 OrganizationGuid string `json:"organization_guid,omitempty"`
1060
1061
1062
1063
1064 Parameters googleapi.RawMessage `json:"parameters,omitempty"`
1065
1066
1067
1068
1069
1070 PlanId string `json:"plan_id,omitempty"`
1071
1072
1073
1074
1075 PreviousValues googleapi.RawMessage `json:"previous_values,omitempty"`
1076
1077
1078
1079
1080
1081 ResourceName string `json:"resourceName,omitempty"`
1082
1083
1084
1085
1086
1087
1088 ServiceId string `json:"service_id,omitempty"`
1089
1090
1091
1092
1093 SpaceGuid string `json:"space_guid,omitempty"`
1094
1095
1096
1097 googleapi.ServerResponse `json:"-"`
1098
1099
1100
1101
1102
1103
1104
1105 ForceSendFields []string `json:"-"`
1106
1107
1108
1109
1110
1111
1112
1113 NullFields []string `json:"-"`
1114 }
1115
1116 func (s *GoogleCloudServicebrokerV1beta1__ServiceInstance) MarshalJSON() ([]byte, error) {
1117 type NoMethod GoogleCloudServicebrokerV1beta1__ServiceInstance
1118 raw := NoMethod(*s)
1119 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1120 }
1121
1122
1123
1124 type GoogleCloudServicebrokerV1beta1__UpdateServiceInstanceResponse struct {
1125
1126
1127
1128
1129
1130
1131 Description string `json:"description,omitempty"`
1132
1133
1134
1135
1136 Operation string `json:"operation,omitempty"`
1137
1138
1139
1140 googleapi.ServerResponse `json:"-"`
1141
1142
1143
1144
1145
1146
1147
1148 ForceSendFields []string `json:"-"`
1149
1150
1151
1152
1153
1154
1155
1156 NullFields []string `json:"-"`
1157 }
1158
1159 func (s *GoogleCloudServicebrokerV1beta1__UpdateServiceInstanceResponse) MarshalJSON() ([]byte, error) {
1160 type NoMethod GoogleCloudServicebrokerV1beta1__UpdateServiceInstanceResponse
1161 raw := NoMethod(*s)
1162 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1163 }
1164
1165
1166 type GoogleIamV1__Binding struct {
1167
1168
1169
1170
1171
1172
1173 Condition *GoogleType__Expr `json:"condition,omitempty"`
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240 Members []string `json:"members,omitempty"`
1241
1242
1243
1244 Role string `json:"role,omitempty"`
1245
1246
1247
1248
1249
1250
1251
1252 ForceSendFields []string `json:"-"`
1253
1254
1255
1256
1257
1258
1259
1260 NullFields []string `json:"-"`
1261 }
1262
1263 func (s *GoogleIamV1__Binding) MarshalJSON() ([]byte, error) {
1264 type NoMethod GoogleIamV1__Binding
1265 raw := NoMethod(*s)
1266 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1267 }
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346 type GoogleIamV1__Policy struct {
1347
1348
1349
1350
1351
1352 Bindings []*GoogleIamV1__Binding `json:"bindings,omitempty"`
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376 Etag string `json:"etag,omitempty"`
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406 Version int64 `json:"version,omitempty"`
1407
1408
1409
1410 googleapi.ServerResponse `json:"-"`
1411
1412
1413
1414
1415
1416
1417
1418 ForceSendFields []string `json:"-"`
1419
1420
1421
1422
1423
1424
1425
1426 NullFields []string `json:"-"`
1427 }
1428
1429 func (s *GoogleIamV1__Policy) MarshalJSON() ([]byte, error) {
1430 type NoMethod GoogleIamV1__Policy
1431 raw := NoMethod(*s)
1432 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1433 }
1434
1435
1436
1437 type GoogleIamV1__SetIamPolicyRequest struct {
1438
1439
1440
1441
1442
1443
1444 Policy *GoogleIamV1__Policy `json:"policy,omitempty"`
1445
1446
1447
1448
1449
1450
1451
1452 ForceSendFields []string `json:"-"`
1453
1454
1455
1456
1457
1458
1459
1460 NullFields []string `json:"-"`
1461 }
1462
1463 func (s *GoogleIamV1__SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
1464 type NoMethod GoogleIamV1__SetIamPolicyRequest
1465 raw := NoMethod(*s)
1466 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1467 }
1468
1469
1470
1471 type GoogleIamV1__TestIamPermissionsRequest struct {
1472
1473
1474
1475
1476
1477
1478
1479 Permissions []string `json:"permissions,omitempty"`
1480
1481
1482
1483
1484
1485
1486
1487 ForceSendFields []string `json:"-"`
1488
1489
1490
1491
1492
1493
1494
1495 NullFields []string `json:"-"`
1496 }
1497
1498 func (s *GoogleIamV1__TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
1499 type NoMethod GoogleIamV1__TestIamPermissionsRequest
1500 raw := NoMethod(*s)
1501 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1502 }
1503
1504
1505
1506 type GoogleIamV1__TestIamPermissionsResponse struct {
1507
1508
1509
1510 Permissions []string `json:"permissions,omitempty"`
1511
1512
1513
1514 googleapi.ServerResponse `json:"-"`
1515
1516
1517
1518
1519
1520
1521
1522 ForceSendFields []string `json:"-"`
1523
1524
1525
1526
1527
1528
1529
1530 NullFields []string `json:"-"`
1531 }
1532
1533 func (s *GoogleIamV1__TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
1534 type NoMethod GoogleIamV1__TestIamPermissionsResponse
1535 raw := NoMethod(*s)
1536 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1537 }
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553 type GoogleProtobuf__Empty struct {
1554
1555
1556 googleapi.ServerResponse `json:"-"`
1557 }
1558
1559
1560
1561
1562
1563
1564 type GoogleType__Expr struct {
1565
1566
1567
1568 Description string `json:"description,omitempty"`
1569
1570
1571
1572
1573
1574
1575
1576 Expression string `json:"expression,omitempty"`
1577
1578
1579
1580
1581 Location string `json:"location,omitempty"`
1582
1583
1584
1585
1586
1587
1588 Title string `json:"title,omitempty"`
1589
1590
1591
1592
1593
1594
1595
1596 ForceSendFields []string `json:"-"`
1597
1598
1599
1600
1601
1602
1603
1604 NullFields []string `json:"-"`
1605 }
1606
1607 func (s *GoogleType__Expr) MarshalJSON() ([]byte, error) {
1608 type NoMethod GoogleType__Expr
1609 raw := NoMethod(*s)
1610 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1611 }
1612
1613
1614
1615 type ProjectsBrokersCreateCall struct {
1616 s *Service
1617 parent string
1618 googlecloudservicebrokerv1beta1__broker *GoogleCloudServicebrokerV1beta1__Broker
1619 urlParams_ gensupport.URLParams
1620 ctx_ context.Context
1621 header_ http.Header
1622 }
1623
1624
1625 func (r *ProjectsBrokersService) Create(parent string, googlecloudservicebrokerv1beta1__broker *GoogleCloudServicebrokerV1beta1__Broker) *ProjectsBrokersCreateCall {
1626 c := &ProjectsBrokersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1627 c.parent = parent
1628 c.googlecloudservicebrokerv1beta1__broker = googlecloudservicebrokerv1beta1__broker
1629 return c
1630 }
1631
1632
1633
1634
1635 func (c *ProjectsBrokersCreateCall) Fields(s ...googleapi.Field) *ProjectsBrokersCreateCall {
1636 c.urlParams_.Set("fields", googleapi.CombineFields(s))
1637 return c
1638 }
1639
1640
1641
1642
1643 func (c *ProjectsBrokersCreateCall) Context(ctx context.Context) *ProjectsBrokersCreateCall {
1644 c.ctx_ = ctx
1645 return c
1646 }
1647
1648
1649
1650 func (c *ProjectsBrokersCreateCall) Header() http.Header {
1651 if c.header_ == nil {
1652 c.header_ = make(http.Header)
1653 }
1654 return c.header_
1655 }
1656
1657 func (c *ProjectsBrokersCreateCall) doRequest(alt string) (*http.Response, error) {
1658 reqHeaders := make(http.Header)
1659 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
1660 for k, v := range c.header_ {
1661 reqHeaders[k] = v
1662 }
1663 reqHeaders.Set("User-Agent", c.s.userAgent())
1664 var body io.Reader = nil
1665 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudservicebrokerv1beta1__broker)
1666 if err != nil {
1667 return nil, err
1668 }
1669 reqHeaders.Set("Content-Type", "application/json")
1670 c.urlParams_.Set("alt", alt)
1671 c.urlParams_.Set("prettyPrint", "false")
1672 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/brokers")
1673 urls += "?" + c.urlParams_.Encode()
1674 req, err := http.NewRequest("POST", urls, body)
1675 if err != nil {
1676 return nil, err
1677 }
1678 req.Header = reqHeaders
1679 googleapi.Expand(req.URL, map[string]string{
1680 "parent": c.parent,
1681 })
1682 return gensupport.SendRequest(c.ctx_, c.s.client, req)
1683 }
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693 func (c *ProjectsBrokersCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudServicebrokerV1beta1__Broker, error) {
1694 gensupport.SetOptions(c.urlParams_, opts...)
1695 res, err := c.doRequest("json")
1696 if res != nil && res.StatusCode == http.StatusNotModified {
1697 if res.Body != nil {
1698 res.Body.Close()
1699 }
1700 return nil, &googleapi.Error{
1701 Code: res.StatusCode,
1702 Header: res.Header,
1703 }
1704 }
1705 if err != nil {
1706 return nil, err
1707 }
1708 defer googleapi.CloseBody(res)
1709 if err := googleapi.CheckResponse(res); err != nil {
1710 return nil, err
1711 }
1712 ret := &GoogleCloudServicebrokerV1beta1__Broker{
1713 ServerResponse: googleapi.ServerResponse{
1714 Header: res.Header,
1715 HTTPStatusCode: res.StatusCode,
1716 },
1717 }
1718 target := &ret
1719 if err := gensupport.DecodeResponse(target, res); err != nil {
1720 return nil, err
1721 }
1722 return ret, nil
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752 }
1753
1754
1755
1756 type ProjectsBrokersDeleteCall struct {
1757 s *Service
1758 name string
1759 urlParams_ gensupport.URLParams
1760 ctx_ context.Context
1761 header_ http.Header
1762 }
1763
1764
1765 func (r *ProjectsBrokersService) Delete(name string) *ProjectsBrokersDeleteCall {
1766 c := &ProjectsBrokersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1767 c.name = name
1768 return c
1769 }
1770
1771
1772
1773
1774 func (c *ProjectsBrokersDeleteCall) Fields(s ...googleapi.Field) *ProjectsBrokersDeleteCall {
1775 c.urlParams_.Set("fields", googleapi.CombineFields(s))
1776 return c
1777 }
1778
1779
1780
1781
1782 func (c *ProjectsBrokersDeleteCall) Context(ctx context.Context) *ProjectsBrokersDeleteCall {
1783 c.ctx_ = ctx
1784 return c
1785 }
1786
1787
1788
1789 func (c *ProjectsBrokersDeleteCall) Header() http.Header {
1790 if c.header_ == nil {
1791 c.header_ = make(http.Header)
1792 }
1793 return c.header_
1794 }
1795
1796 func (c *ProjectsBrokersDeleteCall) doRequest(alt string) (*http.Response, error) {
1797 reqHeaders := make(http.Header)
1798 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
1799 for k, v := range c.header_ {
1800 reqHeaders[k] = v
1801 }
1802 reqHeaders.Set("User-Agent", c.s.userAgent())
1803 var body io.Reader = nil
1804 c.urlParams_.Set("alt", alt)
1805 c.urlParams_.Set("prettyPrint", "false")
1806 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
1807 urls += "?" + c.urlParams_.Encode()
1808 req, err := http.NewRequest("DELETE", urls, body)
1809 if err != nil {
1810 return nil, err
1811 }
1812 req.Header = reqHeaders
1813 googleapi.Expand(req.URL, map[string]string{
1814 "name": c.name,
1815 })
1816 return gensupport.SendRequest(c.ctx_, c.s.client, req)
1817 }
1818
1819
1820
1821
1822
1823
1824
1825
1826 func (c *ProjectsBrokersDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobuf__Empty, error) {
1827 gensupport.SetOptions(c.urlParams_, opts...)
1828 res, err := c.doRequest("json")
1829 if res != nil && res.StatusCode == http.StatusNotModified {
1830 if res.Body != nil {
1831 res.Body.Close()
1832 }
1833 return nil, &googleapi.Error{
1834 Code: res.StatusCode,
1835 Header: res.Header,
1836 }
1837 }
1838 if err != nil {
1839 return nil, err
1840 }
1841 defer googleapi.CloseBody(res)
1842 if err := googleapi.CheckResponse(res); err != nil {
1843 return nil, err
1844 }
1845 ret := &GoogleProtobuf__Empty{
1846 ServerResponse: googleapi.ServerResponse{
1847 Header: res.Header,
1848 HTTPStatusCode: res.StatusCode,
1849 },
1850 }
1851 target := &ret
1852 if err := gensupport.DecodeResponse(target, res); err != nil {
1853 return nil, err
1854 }
1855 return ret, nil
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882 }
1883
1884
1885
1886 type ProjectsBrokersListCall struct {
1887 s *Service
1888 parent string
1889 urlParams_ gensupport.URLParams
1890 ifNoneMatch_ string
1891 ctx_ context.Context
1892 header_ http.Header
1893 }
1894
1895
1896 func (r *ProjectsBrokersService) List(parent string) *ProjectsBrokersListCall {
1897 c := &ProjectsBrokersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1898 c.parent = parent
1899 return c
1900 }
1901
1902
1903
1904
1905
1906
1907 func (c *ProjectsBrokersListCall) PageSize(pageSize int64) *ProjectsBrokersListCall {
1908 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
1909 return c
1910 }
1911
1912
1913
1914
1915 func (c *ProjectsBrokersListCall) PageToken(pageToken string) *ProjectsBrokersListCall {
1916 c.urlParams_.Set("pageToken", pageToken)
1917 return c
1918 }
1919
1920
1921
1922
1923 func (c *ProjectsBrokersListCall) Fields(s ...googleapi.Field) *ProjectsBrokersListCall {
1924 c.urlParams_.Set("fields", googleapi.CombineFields(s))
1925 return c
1926 }
1927
1928
1929
1930
1931
1932
1933 func (c *ProjectsBrokersListCall) IfNoneMatch(entityTag string) *ProjectsBrokersListCall {
1934 c.ifNoneMatch_ = entityTag
1935 return c
1936 }
1937
1938
1939
1940
1941 func (c *ProjectsBrokersListCall) Context(ctx context.Context) *ProjectsBrokersListCall {
1942 c.ctx_ = ctx
1943 return c
1944 }
1945
1946
1947
1948 func (c *ProjectsBrokersListCall) Header() http.Header {
1949 if c.header_ == nil {
1950 c.header_ = make(http.Header)
1951 }
1952 return c.header_
1953 }
1954
1955 func (c *ProjectsBrokersListCall) doRequest(alt string) (*http.Response, error) {
1956 reqHeaders := make(http.Header)
1957 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
1958 for k, v := range c.header_ {
1959 reqHeaders[k] = v
1960 }
1961 reqHeaders.Set("User-Agent", c.s.userAgent())
1962 if c.ifNoneMatch_ != "" {
1963 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
1964 }
1965 var body io.Reader = nil
1966 c.urlParams_.Set("alt", alt)
1967 c.urlParams_.Set("prettyPrint", "false")
1968 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/brokers")
1969 urls += "?" + c.urlParams_.Encode()
1970 req, err := http.NewRequest("GET", urls, body)
1971 if err != nil {
1972 return nil, err
1973 }
1974 req.Header = reqHeaders
1975 googleapi.Expand(req.URL, map[string]string{
1976 "parent": c.parent,
1977 })
1978 return gensupport.SendRequest(c.ctx_, c.s.client, req)
1979 }
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990 func (c *ProjectsBrokersListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudServicebrokerV1beta1__ListBrokersResponse, error) {
1991 gensupport.SetOptions(c.urlParams_, opts...)
1992 res, err := c.doRequest("json")
1993 if res != nil && res.StatusCode == http.StatusNotModified {
1994 if res.Body != nil {
1995 res.Body.Close()
1996 }
1997 return nil, &googleapi.Error{
1998 Code: res.StatusCode,
1999 Header: res.Header,
2000 }
2001 }
2002 if err != nil {
2003 return nil, err
2004 }
2005 defer googleapi.CloseBody(res)
2006 if err := googleapi.CheckResponse(res); err != nil {
2007 return nil, err
2008 }
2009 ret := &GoogleCloudServicebrokerV1beta1__ListBrokersResponse{
2010 ServerResponse: googleapi.ServerResponse{
2011 Header: res.Header,
2012 HTTPStatusCode: res.StatusCode,
2013 },
2014 }
2015 target := &ret
2016 if err := gensupport.DecodeResponse(target, res); err != nil {
2017 return nil, err
2018 }
2019 return ret, nil
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057 }
2058
2059
2060
2061
2062 func (c *ProjectsBrokersListCall) Pages(ctx context.Context, f func(*GoogleCloudServicebrokerV1beta1__ListBrokersResponse) error) error {
2063 c.ctx_ = ctx
2064 defer c.PageToken(c.urlParams_.Get("pageToken"))
2065 for {
2066 x, err := c.Do()
2067 if err != nil {
2068 return err
2069 }
2070 if err := f(x); err != nil {
2071 return err
2072 }
2073 if x.NextPageToken == "" {
2074 return nil
2075 }
2076 c.PageToken(x.NextPageToken)
2077 }
2078 }
2079
2080
2081
2082 type ProjectsBrokersInstancesGetCall struct {
2083 s *Service
2084 name string
2085 urlParams_ gensupport.URLParams
2086 ifNoneMatch_ string
2087 ctx_ context.Context
2088 header_ http.Header
2089 }
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100 func (r *ProjectsBrokersInstancesService) Get(name string) *ProjectsBrokersInstancesGetCall {
2101 c := &ProjectsBrokersInstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2102 c.name = name
2103 return c
2104 }
2105
2106
2107
2108
2109 func (c *ProjectsBrokersInstancesGetCall) Fields(s ...googleapi.Field) *ProjectsBrokersInstancesGetCall {
2110 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2111 return c
2112 }
2113
2114
2115
2116
2117
2118
2119 func (c *ProjectsBrokersInstancesGetCall) IfNoneMatch(entityTag string) *ProjectsBrokersInstancesGetCall {
2120 c.ifNoneMatch_ = entityTag
2121 return c
2122 }
2123
2124
2125
2126
2127 func (c *ProjectsBrokersInstancesGetCall) Context(ctx context.Context) *ProjectsBrokersInstancesGetCall {
2128 c.ctx_ = ctx
2129 return c
2130 }
2131
2132
2133
2134 func (c *ProjectsBrokersInstancesGetCall) Header() http.Header {
2135 if c.header_ == nil {
2136 c.header_ = make(http.Header)
2137 }
2138 return c.header_
2139 }
2140
2141 func (c *ProjectsBrokersInstancesGetCall) doRequest(alt string) (*http.Response, error) {
2142 reqHeaders := make(http.Header)
2143 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
2144 for k, v := range c.header_ {
2145 reqHeaders[k] = v
2146 }
2147 reqHeaders.Set("User-Agent", c.s.userAgent())
2148 if c.ifNoneMatch_ != "" {
2149 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2150 }
2151 var body io.Reader = nil
2152 c.urlParams_.Set("alt", alt)
2153 c.urlParams_.Set("prettyPrint", "false")
2154 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
2155 urls += "?" + c.urlParams_.Encode()
2156 req, err := http.NewRequest("GET", urls, body)
2157 if err != nil {
2158 return nil, err
2159 }
2160 req.Header = reqHeaders
2161 googleapi.Expand(req.URL, map[string]string{
2162 "name": c.name,
2163 })
2164 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2165 }
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176 func (c *ProjectsBrokersInstancesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudServicebrokerV1beta1__ServiceInstance, error) {
2177 gensupport.SetOptions(c.urlParams_, opts...)
2178 res, err := c.doRequest("json")
2179 if res != nil && res.StatusCode == http.StatusNotModified {
2180 if res.Body != nil {
2181 res.Body.Close()
2182 }
2183 return nil, &googleapi.Error{
2184 Code: res.StatusCode,
2185 Header: res.Header,
2186 }
2187 }
2188 if err != nil {
2189 return nil, err
2190 }
2191 defer googleapi.CloseBody(res)
2192 if err := googleapi.CheckResponse(res); err != nil {
2193 return nil, err
2194 }
2195 ret := &GoogleCloudServicebrokerV1beta1__ServiceInstance{
2196 ServerResponse: googleapi.ServerResponse{
2197 Header: res.Header,
2198 HTTPStatusCode: res.StatusCode,
2199 },
2200 }
2201 target := &ret
2202 if err := gensupport.DecodeResponse(target, res); err != nil {
2203 return nil, err
2204 }
2205 return ret, nil
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232 }
2233
2234
2235
2236 type ProjectsBrokersInstancesGetLastOperationCall struct {
2237 s *Service
2238 name string
2239 urlParams_ gensupport.URLParams
2240 ifNoneMatch_ string
2241 ctx_ context.Context
2242 header_ http.Header
2243 }
2244
2245
2246
2247
2248 func (r *ProjectsBrokersInstancesService) GetLastOperation(name string) *ProjectsBrokersInstancesGetLastOperationCall {
2249 c := &ProjectsBrokersInstancesGetLastOperationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2250 c.name = name
2251 return c
2252 }
2253
2254
2255
2256
2257 func (c *ProjectsBrokersInstancesGetLastOperationCall) Operation(operation string) *ProjectsBrokersInstancesGetLastOperationCall {
2258 c.urlParams_.Set("operation", operation)
2259 return c
2260 }
2261
2262
2263 func (c *ProjectsBrokersInstancesGetLastOperationCall) PlanId(planId string) *ProjectsBrokersInstancesGetLastOperationCall {
2264 c.urlParams_.Set("planId", planId)
2265 return c
2266 }
2267
2268
2269 func (c *ProjectsBrokersInstancesGetLastOperationCall) ServiceId(serviceId string) *ProjectsBrokersInstancesGetLastOperationCall {
2270 c.urlParams_.Set("serviceId", serviceId)
2271 return c
2272 }
2273
2274
2275
2276
2277 func (c *ProjectsBrokersInstancesGetLastOperationCall) Fields(s ...googleapi.Field) *ProjectsBrokersInstancesGetLastOperationCall {
2278 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2279 return c
2280 }
2281
2282
2283
2284
2285
2286
2287 func (c *ProjectsBrokersInstancesGetLastOperationCall) IfNoneMatch(entityTag string) *ProjectsBrokersInstancesGetLastOperationCall {
2288 c.ifNoneMatch_ = entityTag
2289 return c
2290 }
2291
2292
2293
2294
2295 func (c *ProjectsBrokersInstancesGetLastOperationCall) Context(ctx context.Context) *ProjectsBrokersInstancesGetLastOperationCall {
2296 c.ctx_ = ctx
2297 return c
2298 }
2299
2300
2301
2302 func (c *ProjectsBrokersInstancesGetLastOperationCall) Header() http.Header {
2303 if c.header_ == nil {
2304 c.header_ = make(http.Header)
2305 }
2306 return c.header_
2307 }
2308
2309 func (c *ProjectsBrokersInstancesGetLastOperationCall) doRequest(alt string) (*http.Response, error) {
2310 reqHeaders := make(http.Header)
2311 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
2312 for k, v := range c.header_ {
2313 reqHeaders[k] = v
2314 }
2315 reqHeaders.Set("User-Agent", c.s.userAgent())
2316 if c.ifNoneMatch_ != "" {
2317 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2318 }
2319 var body io.Reader = nil
2320 c.urlParams_.Set("alt", alt)
2321 c.urlParams_.Set("prettyPrint", "false")
2322 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/last_operation")
2323 urls += "?" + c.urlParams_.Encode()
2324 req, err := http.NewRequest("GET", urls, body)
2325 if err != nil {
2326 return nil, err
2327 }
2328 req.Header = reqHeaders
2329 googleapi.Expand(req.URL, map[string]string{
2330 "name": c.name,
2331 })
2332 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2333 }
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344 func (c *ProjectsBrokersInstancesGetLastOperationCall) Do(opts ...googleapi.CallOption) (*GoogleCloudServicebrokerV1beta1__Operation, error) {
2345 gensupport.SetOptions(c.urlParams_, opts...)
2346 res, err := c.doRequest("json")
2347 if res != nil && res.StatusCode == http.StatusNotModified {
2348 if res.Body != nil {
2349 res.Body.Close()
2350 }
2351 return nil, &googleapi.Error{
2352 Code: res.StatusCode,
2353 Header: res.Header,
2354 }
2355 }
2356 if err != nil {
2357 return nil, err
2358 }
2359 defer googleapi.CloseBody(res)
2360 if err := googleapi.CheckResponse(res); err != nil {
2361 return nil, err
2362 }
2363 ret := &GoogleCloudServicebrokerV1beta1__Operation{
2364 ServerResponse: googleapi.ServerResponse{
2365 Header: res.Header,
2366 HTTPStatusCode: res.StatusCode,
2367 },
2368 }
2369 target := &ret
2370 if err := gensupport.DecodeResponse(target, res); err != nil {
2371 return nil, err
2372 }
2373 return ret, nil
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415 }
2416
2417
2418
2419 type ProjectsBrokersInstancesListCall struct {
2420 s *Service
2421 parent string
2422 urlParams_ gensupport.URLParams
2423 ifNoneMatch_ string
2424 ctx_ context.Context
2425 header_ http.Header
2426 }
2427
2428
2429
2430
2431 func (r *ProjectsBrokersInstancesService) List(parent string) *ProjectsBrokersInstancesListCall {
2432 c := &ProjectsBrokersInstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2433 c.parent = parent
2434 return c
2435 }
2436
2437
2438
2439
2440
2441
2442 func (c *ProjectsBrokersInstancesListCall) PageSize(pageSize int64) *ProjectsBrokersInstancesListCall {
2443 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
2444 return c
2445 }
2446
2447
2448
2449
2450 func (c *ProjectsBrokersInstancesListCall) PageToken(pageToken string) *ProjectsBrokersInstancesListCall {
2451 c.urlParams_.Set("pageToken", pageToken)
2452 return c
2453 }
2454
2455
2456
2457
2458 func (c *ProjectsBrokersInstancesListCall) Fields(s ...googleapi.Field) *ProjectsBrokersInstancesListCall {
2459 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2460 return c
2461 }
2462
2463
2464
2465
2466
2467
2468 func (c *ProjectsBrokersInstancesListCall) IfNoneMatch(entityTag string) *ProjectsBrokersInstancesListCall {
2469 c.ifNoneMatch_ = entityTag
2470 return c
2471 }
2472
2473
2474
2475
2476 func (c *ProjectsBrokersInstancesListCall) Context(ctx context.Context) *ProjectsBrokersInstancesListCall {
2477 c.ctx_ = ctx
2478 return c
2479 }
2480
2481
2482
2483 func (c *ProjectsBrokersInstancesListCall) Header() http.Header {
2484 if c.header_ == nil {
2485 c.header_ = make(http.Header)
2486 }
2487 return c.header_
2488 }
2489
2490 func (c *ProjectsBrokersInstancesListCall) doRequest(alt string) (*http.Response, error) {
2491 reqHeaders := make(http.Header)
2492 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
2493 for k, v := range c.header_ {
2494 reqHeaders[k] = v
2495 }
2496 reqHeaders.Set("User-Agent", c.s.userAgent())
2497 if c.ifNoneMatch_ != "" {
2498 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2499 }
2500 var body io.Reader = nil
2501 c.urlParams_.Set("alt", alt)
2502 c.urlParams_.Set("prettyPrint", "false")
2503 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/instances")
2504 urls += "?" + c.urlParams_.Encode()
2505 req, err := http.NewRequest("GET", urls, body)
2506 if err != nil {
2507 return nil, err
2508 }
2509 req.Header = reqHeaders
2510 googleapi.Expand(req.URL, map[string]string{
2511 "parent": c.parent,
2512 })
2513 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2514 }
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526 func (c *ProjectsBrokersInstancesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudServicebrokerV1beta1__ListServiceInstancesResponse, error) {
2527 gensupport.SetOptions(c.urlParams_, opts...)
2528 res, err := c.doRequest("json")
2529 if res != nil && res.StatusCode == http.StatusNotModified {
2530 if res.Body != nil {
2531 res.Body.Close()
2532 }
2533 return nil, &googleapi.Error{
2534 Code: res.StatusCode,
2535 Header: res.Header,
2536 }
2537 }
2538 if err != nil {
2539 return nil, err
2540 }
2541 defer googleapi.CloseBody(res)
2542 if err := googleapi.CheckResponse(res); err != nil {
2543 return nil, err
2544 }
2545 ret := &GoogleCloudServicebrokerV1beta1__ListServiceInstancesResponse{
2546 ServerResponse: googleapi.ServerResponse{
2547 Header: res.Header,
2548 HTTPStatusCode: res.StatusCode,
2549 },
2550 }
2551 target := &ret
2552 if err := gensupport.DecodeResponse(target, res); err != nil {
2553 return nil, err
2554 }
2555 return ret, nil
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593 }
2594
2595
2596
2597
2598 func (c *ProjectsBrokersInstancesListCall) Pages(ctx context.Context, f func(*GoogleCloudServicebrokerV1beta1__ListServiceInstancesResponse) error) error {
2599 c.ctx_ = ctx
2600 defer c.PageToken(c.urlParams_.Get("pageToken"))
2601 for {
2602 x, err := c.Do()
2603 if err != nil {
2604 return err
2605 }
2606 if err := f(x); err != nil {
2607 return err
2608 }
2609 if x.NextPageToken == "" {
2610 return nil
2611 }
2612 c.PageToken(x.NextPageToken)
2613 }
2614 }
2615
2616
2617
2618 type ProjectsBrokersInstancesBindingsGetLastOperationCall struct {
2619 s *Service
2620 name string
2621 urlParams_ gensupport.URLParams
2622 ifNoneMatch_ string
2623 ctx_ context.Context
2624 header_ http.Header
2625 }
2626
2627
2628
2629
2630 func (r *ProjectsBrokersInstancesBindingsService) GetLastOperation(name string) *ProjectsBrokersInstancesBindingsGetLastOperationCall {
2631 c := &ProjectsBrokersInstancesBindingsGetLastOperationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2632 c.name = name
2633 return c
2634 }
2635
2636
2637
2638
2639 func (c *ProjectsBrokersInstancesBindingsGetLastOperationCall) Operation(operation string) *ProjectsBrokersInstancesBindingsGetLastOperationCall {
2640 c.urlParams_.Set("operation", operation)
2641 return c
2642 }
2643
2644
2645 func (c *ProjectsBrokersInstancesBindingsGetLastOperationCall) PlanId(planId string) *ProjectsBrokersInstancesBindingsGetLastOperationCall {
2646 c.urlParams_.Set("planId", planId)
2647 return c
2648 }
2649
2650
2651 func (c *ProjectsBrokersInstancesBindingsGetLastOperationCall) ServiceId(serviceId string) *ProjectsBrokersInstancesBindingsGetLastOperationCall {
2652 c.urlParams_.Set("serviceId", serviceId)
2653 return c
2654 }
2655
2656
2657
2658
2659 func (c *ProjectsBrokersInstancesBindingsGetLastOperationCall) Fields(s ...googleapi.Field) *ProjectsBrokersInstancesBindingsGetLastOperationCall {
2660 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2661 return c
2662 }
2663
2664
2665
2666
2667
2668
2669 func (c *ProjectsBrokersInstancesBindingsGetLastOperationCall) IfNoneMatch(entityTag string) *ProjectsBrokersInstancesBindingsGetLastOperationCall {
2670 c.ifNoneMatch_ = entityTag
2671 return c
2672 }
2673
2674
2675
2676
2677 func (c *ProjectsBrokersInstancesBindingsGetLastOperationCall) Context(ctx context.Context) *ProjectsBrokersInstancesBindingsGetLastOperationCall {
2678 c.ctx_ = ctx
2679 return c
2680 }
2681
2682
2683
2684 func (c *ProjectsBrokersInstancesBindingsGetLastOperationCall) Header() http.Header {
2685 if c.header_ == nil {
2686 c.header_ = make(http.Header)
2687 }
2688 return c.header_
2689 }
2690
2691 func (c *ProjectsBrokersInstancesBindingsGetLastOperationCall) doRequest(alt string) (*http.Response, error) {
2692 reqHeaders := make(http.Header)
2693 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
2694 for k, v := range c.header_ {
2695 reqHeaders[k] = v
2696 }
2697 reqHeaders.Set("User-Agent", c.s.userAgent())
2698 if c.ifNoneMatch_ != "" {
2699 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2700 }
2701 var body io.Reader = nil
2702 c.urlParams_.Set("alt", alt)
2703 c.urlParams_.Set("prettyPrint", "false")
2704 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/last_operation")
2705 urls += "?" + c.urlParams_.Encode()
2706 req, err := http.NewRequest("GET", urls, body)
2707 if err != nil {
2708 return nil, err
2709 }
2710 req.Header = reqHeaders
2711 googleapi.Expand(req.URL, map[string]string{
2712 "name": c.name,
2713 })
2714 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2715 }
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726 func (c *ProjectsBrokersInstancesBindingsGetLastOperationCall) Do(opts ...googleapi.CallOption) (*GoogleCloudServicebrokerV1beta1__Operation, error) {
2727 gensupport.SetOptions(c.urlParams_, opts...)
2728 res, err := c.doRequest("json")
2729 if res != nil && res.StatusCode == http.StatusNotModified {
2730 if res.Body != nil {
2731 res.Body.Close()
2732 }
2733 return nil, &googleapi.Error{
2734 Code: res.StatusCode,
2735 Header: res.Header,
2736 }
2737 }
2738 if err != nil {
2739 return nil, err
2740 }
2741 defer googleapi.CloseBody(res)
2742 if err := googleapi.CheckResponse(res); err != nil {
2743 return nil, err
2744 }
2745 ret := &GoogleCloudServicebrokerV1beta1__Operation{
2746 ServerResponse: googleapi.ServerResponse{
2747 Header: res.Header,
2748 HTTPStatusCode: res.StatusCode,
2749 },
2750 }
2751 target := &ret
2752 if err := gensupport.DecodeResponse(target, res); err != nil {
2753 return nil, err
2754 }
2755 return ret, nil
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797 }
2798
2799
2800
2801 type ProjectsBrokersInstancesBindingsListCall struct {
2802 s *Service
2803 parent string
2804 urlParams_ gensupport.URLParams
2805 ifNoneMatch_ string
2806 ctx_ context.Context
2807 header_ http.Header
2808 }
2809
2810
2811 func (r *ProjectsBrokersInstancesBindingsService) List(parent string) *ProjectsBrokersInstancesBindingsListCall {
2812 c := &ProjectsBrokersInstancesBindingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2813 c.parent = parent
2814 return c
2815 }
2816
2817
2818
2819
2820
2821
2822 func (c *ProjectsBrokersInstancesBindingsListCall) PageSize(pageSize int64) *ProjectsBrokersInstancesBindingsListCall {
2823 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
2824 return c
2825 }
2826
2827
2828
2829
2830 func (c *ProjectsBrokersInstancesBindingsListCall) PageToken(pageToken string) *ProjectsBrokersInstancesBindingsListCall {
2831 c.urlParams_.Set("pageToken", pageToken)
2832 return c
2833 }
2834
2835
2836
2837
2838 func (c *ProjectsBrokersInstancesBindingsListCall) Fields(s ...googleapi.Field) *ProjectsBrokersInstancesBindingsListCall {
2839 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2840 return c
2841 }
2842
2843
2844
2845
2846
2847
2848 func (c *ProjectsBrokersInstancesBindingsListCall) IfNoneMatch(entityTag string) *ProjectsBrokersInstancesBindingsListCall {
2849 c.ifNoneMatch_ = entityTag
2850 return c
2851 }
2852
2853
2854
2855
2856 func (c *ProjectsBrokersInstancesBindingsListCall) Context(ctx context.Context) *ProjectsBrokersInstancesBindingsListCall {
2857 c.ctx_ = ctx
2858 return c
2859 }
2860
2861
2862
2863 func (c *ProjectsBrokersInstancesBindingsListCall) Header() http.Header {
2864 if c.header_ == nil {
2865 c.header_ = make(http.Header)
2866 }
2867 return c.header_
2868 }
2869
2870 func (c *ProjectsBrokersInstancesBindingsListCall) doRequest(alt string) (*http.Response, error) {
2871 reqHeaders := make(http.Header)
2872 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
2873 for k, v := range c.header_ {
2874 reqHeaders[k] = v
2875 }
2876 reqHeaders.Set("User-Agent", c.s.userAgent())
2877 if c.ifNoneMatch_ != "" {
2878 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2879 }
2880 var body io.Reader = nil
2881 c.urlParams_.Set("alt", alt)
2882 c.urlParams_.Set("prettyPrint", "false")
2883 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/bindings")
2884 urls += "?" + c.urlParams_.Encode()
2885 req, err := http.NewRequest("GET", urls, body)
2886 if err != nil {
2887 return nil, err
2888 }
2889 req.Header = reqHeaders
2890 googleapi.Expand(req.URL, map[string]string{
2891 "parent": c.parent,
2892 })
2893 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2894 }
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905 func (c *ProjectsBrokersInstancesBindingsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudServicebrokerV1beta1__ListBindingsResponse, error) {
2906 gensupport.SetOptions(c.urlParams_, opts...)
2907 res, err := c.doRequest("json")
2908 if res != nil && res.StatusCode == http.StatusNotModified {
2909 if res.Body != nil {
2910 res.Body.Close()
2911 }
2912 return nil, &googleapi.Error{
2913 Code: res.StatusCode,
2914 Header: res.Header,
2915 }
2916 }
2917 if err != nil {
2918 return nil, err
2919 }
2920 defer googleapi.CloseBody(res)
2921 if err := googleapi.CheckResponse(res); err != nil {
2922 return nil, err
2923 }
2924 ret := &GoogleCloudServicebrokerV1beta1__ListBindingsResponse{
2925 ServerResponse: googleapi.ServerResponse{
2926 Header: res.Header,
2927 HTTPStatusCode: res.StatusCode,
2928 },
2929 }
2930 target := &ret
2931 if err := gensupport.DecodeResponse(target, res); err != nil {
2932 return nil, err
2933 }
2934 return ret, nil
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972 }
2973
2974
2975
2976
2977 func (c *ProjectsBrokersInstancesBindingsListCall) Pages(ctx context.Context, f func(*GoogleCloudServicebrokerV1beta1__ListBindingsResponse) error) error {
2978 c.ctx_ = ctx
2979 defer c.PageToken(c.urlParams_.Get("pageToken"))
2980 for {
2981 x, err := c.Do()
2982 if err != nil {
2983 return err
2984 }
2985 if err := f(x); err != nil {
2986 return err
2987 }
2988 if x.NextPageToken == "" {
2989 return nil
2990 }
2991 c.PageToken(x.NextPageToken)
2992 }
2993 }
2994
2995
2996
2997 type ProjectsBrokersV2CatalogListCall struct {
2998 s *Service
2999 parent string
3000 urlParams_ gensupport.URLParams
3001 ifNoneMatch_ string
3002 ctx_ context.Context
3003 header_ http.Header
3004 }
3005
3006
3007
3008
3009
3010
3011 func (r *ProjectsBrokersV2CatalogService) List(parent string) *ProjectsBrokersV2CatalogListCall {
3012 c := &ProjectsBrokersV2CatalogListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3013 c.parent = parent
3014 return c
3015 }
3016
3017
3018
3019
3020
3021
3022 func (c *ProjectsBrokersV2CatalogListCall) PageSize(pageSize int64) *ProjectsBrokersV2CatalogListCall {
3023 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3024 return c
3025 }
3026
3027
3028
3029
3030 func (c *ProjectsBrokersV2CatalogListCall) PageToken(pageToken string) *ProjectsBrokersV2CatalogListCall {
3031 c.urlParams_.Set("pageToken", pageToken)
3032 return c
3033 }
3034
3035
3036
3037
3038 func (c *ProjectsBrokersV2CatalogListCall) Fields(s ...googleapi.Field) *ProjectsBrokersV2CatalogListCall {
3039 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3040 return c
3041 }
3042
3043
3044
3045
3046
3047
3048 func (c *ProjectsBrokersV2CatalogListCall) IfNoneMatch(entityTag string) *ProjectsBrokersV2CatalogListCall {
3049 c.ifNoneMatch_ = entityTag
3050 return c
3051 }
3052
3053
3054
3055
3056 func (c *ProjectsBrokersV2CatalogListCall) Context(ctx context.Context) *ProjectsBrokersV2CatalogListCall {
3057 c.ctx_ = ctx
3058 return c
3059 }
3060
3061
3062
3063 func (c *ProjectsBrokersV2CatalogListCall) Header() http.Header {
3064 if c.header_ == nil {
3065 c.header_ = make(http.Header)
3066 }
3067 return c.header_
3068 }
3069
3070 func (c *ProjectsBrokersV2CatalogListCall) doRequest(alt string) (*http.Response, error) {
3071 reqHeaders := make(http.Header)
3072 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
3073 for k, v := range c.header_ {
3074 reqHeaders[k] = v
3075 }
3076 reqHeaders.Set("User-Agent", c.s.userAgent())
3077 if c.ifNoneMatch_ != "" {
3078 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3079 }
3080 var body io.Reader = nil
3081 c.urlParams_.Set("alt", alt)
3082 c.urlParams_.Set("prettyPrint", "false")
3083 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/v2/catalog")
3084 urls += "?" + c.urlParams_.Encode()
3085 req, err := http.NewRequest("GET", urls, body)
3086 if err != nil {
3087 return nil, err
3088 }
3089 req.Header = reqHeaders
3090 googleapi.Expand(req.URL, map[string]string{
3091 "parent": c.parent,
3092 })
3093 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3094 }
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105 func (c *ProjectsBrokersV2CatalogListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudServicebrokerV1beta1__ListCatalogResponse, error) {
3106 gensupport.SetOptions(c.urlParams_, opts...)
3107 res, err := c.doRequest("json")
3108 if res != nil && res.StatusCode == http.StatusNotModified {
3109 if res.Body != nil {
3110 res.Body.Close()
3111 }
3112 return nil, &googleapi.Error{
3113 Code: res.StatusCode,
3114 Header: res.Header,
3115 }
3116 }
3117 if err != nil {
3118 return nil, err
3119 }
3120 defer googleapi.CloseBody(res)
3121 if err := googleapi.CheckResponse(res); err != nil {
3122 return nil, err
3123 }
3124 ret := &GoogleCloudServicebrokerV1beta1__ListCatalogResponse{
3125 ServerResponse: googleapi.ServerResponse{
3126 Header: res.Header,
3127 HTTPStatusCode: res.StatusCode,
3128 },
3129 }
3130 target := &ret
3131 if err := gensupport.DecodeResponse(target, res); err != nil {
3132 return nil, err
3133 }
3134 return ret, nil
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172 }
3173
3174
3175
3176
3177 func (c *ProjectsBrokersV2CatalogListCall) Pages(ctx context.Context, f func(*GoogleCloudServicebrokerV1beta1__ListCatalogResponse) error) error {
3178 c.ctx_ = ctx
3179 defer c.PageToken(c.urlParams_.Get("pageToken"))
3180 for {
3181 x, err := c.Do()
3182 if err != nil {
3183 return err
3184 }
3185 if err := f(x); err != nil {
3186 return err
3187 }
3188 if x.NextPageToken == "" {
3189 return nil
3190 }
3191 c.PageToken(x.NextPageToken)
3192 }
3193 }
3194
3195
3196
3197 type ProjectsBrokersV2ServiceInstancesCreateCall struct {
3198 s *Service
3199 parent string
3200 instanceId string
3201 googlecloudservicebrokerv1beta1__serviceinstance *GoogleCloudServicebrokerV1beta1__ServiceInstance
3202 urlParams_ gensupport.URLParams
3203 ctx_ context.Context
3204 header_ http.Header
3205 }
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226 func (r *ProjectsBrokersV2ServiceInstancesService) Create(parent string, instanceId string, googlecloudservicebrokerv1beta1__serviceinstance *GoogleCloudServicebrokerV1beta1__ServiceInstance) *ProjectsBrokersV2ServiceInstancesCreateCall {
3227 c := &ProjectsBrokersV2ServiceInstancesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3228 c.parent = parent
3229 c.instanceId = instanceId
3230 c.googlecloudservicebrokerv1beta1__serviceinstance = googlecloudservicebrokerv1beta1__serviceinstance
3231 return c
3232 }
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246 func (c *ProjectsBrokersV2ServiceInstancesCreateCall) AcceptsIncomplete(acceptsIncomplete bool) *ProjectsBrokersV2ServiceInstancesCreateCall {
3247 c.urlParams_.Set("acceptsIncomplete", fmt.Sprint(acceptsIncomplete))
3248 return c
3249 }
3250
3251
3252
3253
3254 func (c *ProjectsBrokersV2ServiceInstancesCreateCall) Fields(s ...googleapi.Field) *ProjectsBrokersV2ServiceInstancesCreateCall {
3255 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3256 return c
3257 }
3258
3259
3260
3261
3262 func (c *ProjectsBrokersV2ServiceInstancesCreateCall) Context(ctx context.Context) *ProjectsBrokersV2ServiceInstancesCreateCall {
3263 c.ctx_ = ctx
3264 return c
3265 }
3266
3267
3268
3269 func (c *ProjectsBrokersV2ServiceInstancesCreateCall) Header() http.Header {
3270 if c.header_ == nil {
3271 c.header_ = make(http.Header)
3272 }
3273 return c.header_
3274 }
3275
3276 func (c *ProjectsBrokersV2ServiceInstancesCreateCall) doRequest(alt string) (*http.Response, error) {
3277 reqHeaders := make(http.Header)
3278 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
3279 for k, v := range c.header_ {
3280 reqHeaders[k] = v
3281 }
3282 reqHeaders.Set("User-Agent", c.s.userAgent())
3283 var body io.Reader = nil
3284 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudservicebrokerv1beta1__serviceinstance)
3285 if err != nil {
3286 return nil, err
3287 }
3288 reqHeaders.Set("Content-Type", "application/json")
3289 c.urlParams_.Set("alt", alt)
3290 c.urlParams_.Set("prettyPrint", "false")
3291 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/v2/service_instances/{+instance_id}")
3292 urls += "?" + c.urlParams_.Encode()
3293 req, err := http.NewRequest("PUT", urls, body)
3294 if err != nil {
3295 return nil, err
3296 }
3297 req.Header = reqHeaders
3298 googleapi.Expand(req.URL, map[string]string{
3299 "parent": c.parent,
3300 "instance_id": c.instanceId,
3301 })
3302 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3303 }
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315 func (c *ProjectsBrokersV2ServiceInstancesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudServicebrokerV1beta1__CreateServiceInstanceResponse, error) {
3316 gensupport.SetOptions(c.urlParams_, opts...)
3317 res, err := c.doRequest("json")
3318 if res != nil && res.StatusCode == http.StatusNotModified {
3319 if res.Body != nil {
3320 res.Body.Close()
3321 }
3322 return nil, &googleapi.Error{
3323 Code: res.StatusCode,
3324 Header: res.Header,
3325 }
3326 }
3327 if err != nil {
3328 return nil, err
3329 }
3330 defer googleapi.CloseBody(res)
3331 if err := googleapi.CheckResponse(res); err != nil {
3332 return nil, err
3333 }
3334 ret := &GoogleCloudServicebrokerV1beta1__CreateServiceInstanceResponse{
3335 ServerResponse: googleapi.ServerResponse{
3336 Header: res.Header,
3337 HTTPStatusCode: res.StatusCode,
3338 },
3339 }
3340 target := &ret
3341 if err := gensupport.DecodeResponse(target, res); err != nil {
3342 return nil, err
3343 }
3344 return ret, nil
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387 }
3388
3389
3390
3391 type ProjectsBrokersV2ServiceInstancesDeleteCall struct {
3392 s *Service
3393 name string
3394 urlParams_ gensupport.URLParams
3395 ctx_ context.Context
3396 header_ http.Header
3397 }
3398
3399
3400
3401
3402
3403
3404 func (r *ProjectsBrokersV2ServiceInstancesService) Delete(name string) *ProjectsBrokersV2ServiceInstancesDeleteCall {
3405 c := &ProjectsBrokersV2ServiceInstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3406 c.name = name
3407 return c
3408 }
3409
3410
3411
3412 func (c *ProjectsBrokersV2ServiceInstancesDeleteCall) AcceptsIncomplete(acceptsIncomplete bool) *ProjectsBrokersV2ServiceInstancesDeleteCall {
3413 c.urlParams_.Set("acceptsIncomplete", fmt.Sprint(acceptsIncomplete))
3414 return c
3415 }
3416
3417
3418
3419 func (c *ProjectsBrokersV2ServiceInstancesDeleteCall) PlanId(planId string) *ProjectsBrokersV2ServiceInstancesDeleteCall {
3420 c.urlParams_.Set("planId", planId)
3421 return c
3422 }
3423
3424
3425
3426 func (c *ProjectsBrokersV2ServiceInstancesDeleteCall) ServiceId(serviceId string) *ProjectsBrokersV2ServiceInstancesDeleteCall {
3427 c.urlParams_.Set("serviceId", serviceId)
3428 return c
3429 }
3430
3431
3432
3433
3434 func (c *ProjectsBrokersV2ServiceInstancesDeleteCall) Fields(s ...googleapi.Field) *ProjectsBrokersV2ServiceInstancesDeleteCall {
3435 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3436 return c
3437 }
3438
3439
3440
3441
3442 func (c *ProjectsBrokersV2ServiceInstancesDeleteCall) Context(ctx context.Context) *ProjectsBrokersV2ServiceInstancesDeleteCall {
3443 c.ctx_ = ctx
3444 return c
3445 }
3446
3447
3448
3449 func (c *ProjectsBrokersV2ServiceInstancesDeleteCall) Header() http.Header {
3450 if c.header_ == nil {
3451 c.header_ = make(http.Header)
3452 }
3453 return c.header_
3454 }
3455
3456 func (c *ProjectsBrokersV2ServiceInstancesDeleteCall) doRequest(alt string) (*http.Response, error) {
3457 reqHeaders := make(http.Header)
3458 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
3459 for k, v := range c.header_ {
3460 reqHeaders[k] = v
3461 }
3462 reqHeaders.Set("User-Agent", c.s.userAgent())
3463 var body io.Reader = nil
3464 c.urlParams_.Set("alt", alt)
3465 c.urlParams_.Set("prettyPrint", "false")
3466 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
3467 urls += "?" + c.urlParams_.Encode()
3468 req, err := http.NewRequest("DELETE", urls, body)
3469 if err != nil {
3470 return nil, err
3471 }
3472 req.Header = reqHeaders
3473 googleapi.Expand(req.URL, map[string]string{
3474 "name": c.name,
3475 })
3476 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3477 }
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489 func (c *ProjectsBrokersV2ServiceInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudServicebrokerV1beta1__DeleteServiceInstanceResponse, error) {
3490 gensupport.SetOptions(c.urlParams_, opts...)
3491 res, err := c.doRequest("json")
3492 if res != nil && res.StatusCode == http.StatusNotModified {
3493 if res.Body != nil {
3494 res.Body.Close()
3495 }
3496 return nil, &googleapi.Error{
3497 Code: res.StatusCode,
3498 Header: res.Header,
3499 }
3500 }
3501 if err != nil {
3502 return nil, err
3503 }
3504 defer googleapi.CloseBody(res)
3505 if err := googleapi.CheckResponse(res); err != nil {
3506 return nil, err
3507 }
3508 ret := &GoogleCloudServicebrokerV1beta1__DeleteServiceInstanceResponse{
3509 ServerResponse: googleapi.ServerResponse{
3510 Header: res.Header,
3511 HTTPStatusCode: res.StatusCode,
3512 },
3513 }
3514 target := &ret
3515 if err := gensupport.DecodeResponse(target, res); err != nil {
3516 return nil, err
3517 }
3518 return ret, nil
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560 }
3561
3562
3563
3564 type ProjectsBrokersV2ServiceInstancesGetCall struct {
3565 s *Service
3566 name string
3567 urlParams_ gensupport.URLParams
3568 ifNoneMatch_ string
3569 ctx_ context.Context
3570 header_ http.Header
3571 }
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582 func (r *ProjectsBrokersV2ServiceInstancesService) Get(name string) *ProjectsBrokersV2ServiceInstancesGetCall {
3583 c := &ProjectsBrokersV2ServiceInstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3584 c.name = name
3585 return c
3586 }
3587
3588
3589
3590
3591 func (c *ProjectsBrokersV2ServiceInstancesGetCall) Fields(s ...googleapi.Field) *ProjectsBrokersV2ServiceInstancesGetCall {
3592 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3593 return c
3594 }
3595
3596
3597
3598
3599
3600
3601 func (c *ProjectsBrokersV2ServiceInstancesGetCall) IfNoneMatch(entityTag string) *ProjectsBrokersV2ServiceInstancesGetCall {
3602 c.ifNoneMatch_ = entityTag
3603 return c
3604 }
3605
3606
3607
3608
3609 func (c *ProjectsBrokersV2ServiceInstancesGetCall) Context(ctx context.Context) *ProjectsBrokersV2ServiceInstancesGetCall {
3610 c.ctx_ = ctx
3611 return c
3612 }
3613
3614
3615
3616 func (c *ProjectsBrokersV2ServiceInstancesGetCall) Header() http.Header {
3617 if c.header_ == nil {
3618 c.header_ = make(http.Header)
3619 }
3620 return c.header_
3621 }
3622
3623 func (c *ProjectsBrokersV2ServiceInstancesGetCall) doRequest(alt string) (*http.Response, error) {
3624 reqHeaders := make(http.Header)
3625 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
3626 for k, v := range c.header_ {
3627 reqHeaders[k] = v
3628 }
3629 reqHeaders.Set("User-Agent", c.s.userAgent())
3630 if c.ifNoneMatch_ != "" {
3631 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3632 }
3633 var body io.Reader = nil
3634 c.urlParams_.Set("alt", alt)
3635 c.urlParams_.Set("prettyPrint", "false")
3636 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
3637 urls += "?" + c.urlParams_.Encode()
3638 req, err := http.NewRequest("GET", urls, body)
3639 if err != nil {
3640 return nil, err
3641 }
3642 req.Header = reqHeaders
3643 googleapi.Expand(req.URL, map[string]string{
3644 "name": c.name,
3645 })
3646 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3647 }
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658 func (c *ProjectsBrokersV2ServiceInstancesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudServicebrokerV1beta1__ServiceInstance, error) {
3659 gensupport.SetOptions(c.urlParams_, opts...)
3660 res, err := c.doRequest("json")
3661 if res != nil && res.StatusCode == http.StatusNotModified {
3662 if res.Body != nil {
3663 res.Body.Close()
3664 }
3665 return nil, &googleapi.Error{
3666 Code: res.StatusCode,
3667 Header: res.Header,
3668 }
3669 }
3670 if err != nil {
3671 return nil, err
3672 }
3673 defer googleapi.CloseBody(res)
3674 if err := googleapi.CheckResponse(res); err != nil {
3675 return nil, err
3676 }
3677 ret := &GoogleCloudServicebrokerV1beta1__ServiceInstance{
3678 ServerResponse: googleapi.ServerResponse{
3679 Header: res.Header,
3680 HTTPStatusCode: res.StatusCode,
3681 },
3682 }
3683 target := &ret
3684 if err := gensupport.DecodeResponse(target, res); err != nil {
3685 return nil, err
3686 }
3687 return ret, nil
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714 }
3715
3716
3717
3718 type ProjectsBrokersV2ServiceInstancesGetLastOperationCall struct {
3719 s *Service
3720 name string
3721 urlParams_ gensupport.URLParams
3722 ifNoneMatch_ string
3723 ctx_ context.Context
3724 header_ http.Header
3725 }
3726
3727
3728
3729
3730 func (r *ProjectsBrokersV2ServiceInstancesService) GetLastOperation(name string) *ProjectsBrokersV2ServiceInstancesGetLastOperationCall {
3731 c := &ProjectsBrokersV2ServiceInstancesGetLastOperationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3732 c.name = name
3733 return c
3734 }
3735
3736
3737
3738
3739 func (c *ProjectsBrokersV2ServiceInstancesGetLastOperationCall) Operation(operation string) *ProjectsBrokersV2ServiceInstancesGetLastOperationCall {
3740 c.urlParams_.Set("operation", operation)
3741 return c
3742 }
3743
3744
3745 func (c *ProjectsBrokersV2ServiceInstancesGetLastOperationCall) PlanId(planId string) *ProjectsBrokersV2ServiceInstancesGetLastOperationCall {
3746 c.urlParams_.Set("planId", planId)
3747 return c
3748 }
3749
3750
3751 func (c *ProjectsBrokersV2ServiceInstancesGetLastOperationCall) ServiceId(serviceId string) *ProjectsBrokersV2ServiceInstancesGetLastOperationCall {
3752 c.urlParams_.Set("serviceId", serviceId)
3753 return c
3754 }
3755
3756
3757
3758
3759 func (c *ProjectsBrokersV2ServiceInstancesGetLastOperationCall) Fields(s ...googleapi.Field) *ProjectsBrokersV2ServiceInstancesGetLastOperationCall {
3760 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3761 return c
3762 }
3763
3764
3765
3766
3767
3768
3769 func (c *ProjectsBrokersV2ServiceInstancesGetLastOperationCall) IfNoneMatch(entityTag string) *ProjectsBrokersV2ServiceInstancesGetLastOperationCall {
3770 c.ifNoneMatch_ = entityTag
3771 return c
3772 }
3773
3774
3775
3776
3777 func (c *ProjectsBrokersV2ServiceInstancesGetLastOperationCall) Context(ctx context.Context) *ProjectsBrokersV2ServiceInstancesGetLastOperationCall {
3778 c.ctx_ = ctx
3779 return c
3780 }
3781
3782
3783
3784 func (c *ProjectsBrokersV2ServiceInstancesGetLastOperationCall) Header() http.Header {
3785 if c.header_ == nil {
3786 c.header_ = make(http.Header)
3787 }
3788 return c.header_
3789 }
3790
3791 func (c *ProjectsBrokersV2ServiceInstancesGetLastOperationCall) doRequest(alt string) (*http.Response, error) {
3792 reqHeaders := make(http.Header)
3793 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
3794 for k, v := range c.header_ {
3795 reqHeaders[k] = v
3796 }
3797 reqHeaders.Set("User-Agent", c.s.userAgent())
3798 if c.ifNoneMatch_ != "" {
3799 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3800 }
3801 var body io.Reader = nil
3802 c.urlParams_.Set("alt", alt)
3803 c.urlParams_.Set("prettyPrint", "false")
3804 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/last_operation")
3805 urls += "?" + c.urlParams_.Encode()
3806 req, err := http.NewRequest("GET", urls, body)
3807 if err != nil {
3808 return nil, err
3809 }
3810 req.Header = reqHeaders
3811 googleapi.Expand(req.URL, map[string]string{
3812 "name": c.name,
3813 })
3814 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3815 }
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826 func (c *ProjectsBrokersV2ServiceInstancesGetLastOperationCall) Do(opts ...googleapi.CallOption) (*GoogleCloudServicebrokerV1beta1__Operation, error) {
3827 gensupport.SetOptions(c.urlParams_, opts...)
3828 res, err := c.doRequest("json")
3829 if res != nil && res.StatusCode == http.StatusNotModified {
3830 if res.Body != nil {
3831 res.Body.Close()
3832 }
3833 return nil, &googleapi.Error{
3834 Code: res.StatusCode,
3835 Header: res.Header,
3836 }
3837 }
3838 if err != nil {
3839 return nil, err
3840 }
3841 defer googleapi.CloseBody(res)
3842 if err := googleapi.CheckResponse(res); err != nil {
3843 return nil, err
3844 }
3845 ret := &GoogleCloudServicebrokerV1beta1__Operation{
3846 ServerResponse: googleapi.ServerResponse{
3847 Header: res.Header,
3848 HTTPStatusCode: res.StatusCode,
3849 },
3850 }
3851 target := &ret
3852 if err := gensupport.DecodeResponse(target, res); err != nil {
3853 return nil, err
3854 }
3855 return ret, nil
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897 }
3898
3899
3900
3901 type ProjectsBrokersV2ServiceInstancesPatchCall struct {
3902 s *Service
3903 name string
3904 googlecloudservicebrokerv1beta1__serviceinstance *GoogleCloudServicebrokerV1beta1__ServiceInstance
3905 urlParams_ gensupport.URLParams
3906 ctx_ context.Context
3907 header_ http.Header
3908 }
3909
3910
3911
3912 func (r *ProjectsBrokersV2ServiceInstancesService) Patch(name string, googlecloudservicebrokerv1beta1__serviceinstance *GoogleCloudServicebrokerV1beta1__ServiceInstance) *ProjectsBrokersV2ServiceInstancesPatchCall {
3913 c := &ProjectsBrokersV2ServiceInstancesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3914 c.name = name
3915 c.googlecloudservicebrokerv1beta1__serviceinstance = googlecloudservicebrokerv1beta1__serviceinstance
3916 return c
3917 }
3918
3919
3920
3921 func (c *ProjectsBrokersV2ServiceInstancesPatchCall) AcceptsIncomplete(acceptsIncomplete bool) *ProjectsBrokersV2ServiceInstancesPatchCall {
3922 c.urlParams_.Set("acceptsIncomplete", fmt.Sprint(acceptsIncomplete))
3923 return c
3924 }
3925
3926
3927
3928
3929 func (c *ProjectsBrokersV2ServiceInstancesPatchCall) Fields(s ...googleapi.Field) *ProjectsBrokersV2ServiceInstancesPatchCall {
3930 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3931 return c
3932 }
3933
3934
3935
3936
3937 func (c *ProjectsBrokersV2ServiceInstancesPatchCall) Context(ctx context.Context) *ProjectsBrokersV2ServiceInstancesPatchCall {
3938 c.ctx_ = ctx
3939 return c
3940 }
3941
3942
3943
3944 func (c *ProjectsBrokersV2ServiceInstancesPatchCall) Header() http.Header {
3945 if c.header_ == nil {
3946 c.header_ = make(http.Header)
3947 }
3948 return c.header_
3949 }
3950
3951 func (c *ProjectsBrokersV2ServiceInstancesPatchCall) doRequest(alt string) (*http.Response, error) {
3952 reqHeaders := make(http.Header)
3953 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
3954 for k, v := range c.header_ {
3955 reqHeaders[k] = v
3956 }
3957 reqHeaders.Set("User-Agent", c.s.userAgent())
3958 var body io.Reader = nil
3959 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudservicebrokerv1beta1__serviceinstance)
3960 if err != nil {
3961 return nil, err
3962 }
3963 reqHeaders.Set("Content-Type", "application/json")
3964 c.urlParams_.Set("alt", alt)
3965 c.urlParams_.Set("prettyPrint", "false")
3966 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
3967 urls += "?" + c.urlParams_.Encode()
3968 req, err := http.NewRequest("PATCH", urls, body)
3969 if err != nil {
3970 return nil, err
3971 }
3972 req.Header = reqHeaders
3973 googleapi.Expand(req.URL, map[string]string{
3974 "name": c.name,
3975 })
3976 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3977 }
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989 func (c *ProjectsBrokersV2ServiceInstancesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudServicebrokerV1beta1__UpdateServiceInstanceResponse, error) {
3990 gensupport.SetOptions(c.urlParams_, opts...)
3991 res, err := c.doRequest("json")
3992 if res != nil && res.StatusCode == http.StatusNotModified {
3993 if res.Body != nil {
3994 res.Body.Close()
3995 }
3996 return nil, &googleapi.Error{
3997 Code: res.StatusCode,
3998 Header: res.Header,
3999 }
4000 }
4001 if err != nil {
4002 return nil, err
4003 }
4004 defer googleapi.CloseBody(res)
4005 if err := googleapi.CheckResponse(res); err != nil {
4006 return nil, err
4007 }
4008 ret := &GoogleCloudServicebrokerV1beta1__UpdateServiceInstanceResponse{
4009 ServerResponse: googleapi.ServerResponse{
4010 Header: res.Header,
4011 HTTPStatusCode: res.StatusCode,
4012 },
4013 }
4014 target := &ret
4015 if err := gensupport.DecodeResponse(target, res); err != nil {
4016 return nil, err
4017 }
4018 return ret, nil
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053 }
4054
4055
4056
4057 type ProjectsBrokersV2ServiceInstancesServiceBindingsCreateCall struct {
4058 s *Service
4059 parent string
4060 bindingId string
4061 googlecloudservicebrokerv1beta1__binding *GoogleCloudServicebrokerV1beta1__Binding
4062 urlParams_ gensupport.URLParams
4063 ctx_ context.Context
4064 header_ http.Header
4065 }
4066
4067
4068
4069
4070 func (r *ProjectsBrokersV2ServiceInstancesServiceBindingsService) Create(parent string, bindingId string, googlecloudservicebrokerv1beta1__binding *GoogleCloudServicebrokerV1beta1__Binding) *ProjectsBrokersV2ServiceInstancesServiceBindingsCreateCall {
4071 c := &ProjectsBrokersV2ServiceInstancesServiceBindingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4072 c.parent = parent
4073 c.bindingId = bindingId
4074 c.googlecloudservicebrokerv1beta1__binding = googlecloudservicebrokerv1beta1__binding
4075 return c
4076 }
4077
4078
4079
4080 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsCreateCall) AcceptsIncomplete(acceptsIncomplete bool) *ProjectsBrokersV2ServiceInstancesServiceBindingsCreateCall {
4081 c.urlParams_.Set("acceptsIncomplete", fmt.Sprint(acceptsIncomplete))
4082 return c
4083 }
4084
4085
4086
4087
4088 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsCreateCall) Fields(s ...googleapi.Field) *ProjectsBrokersV2ServiceInstancesServiceBindingsCreateCall {
4089 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4090 return c
4091 }
4092
4093
4094
4095
4096 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsCreateCall) Context(ctx context.Context) *ProjectsBrokersV2ServiceInstancesServiceBindingsCreateCall {
4097 c.ctx_ = ctx
4098 return c
4099 }
4100
4101
4102
4103 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsCreateCall) Header() http.Header {
4104 if c.header_ == nil {
4105 c.header_ = make(http.Header)
4106 }
4107 return c.header_
4108 }
4109
4110 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsCreateCall) doRequest(alt string) (*http.Response, error) {
4111 reqHeaders := make(http.Header)
4112 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
4113 for k, v := range c.header_ {
4114 reqHeaders[k] = v
4115 }
4116 reqHeaders.Set("User-Agent", c.s.userAgent())
4117 var body io.Reader = nil
4118 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudservicebrokerv1beta1__binding)
4119 if err != nil {
4120 return nil, err
4121 }
4122 reqHeaders.Set("Content-Type", "application/json")
4123 c.urlParams_.Set("alt", alt)
4124 c.urlParams_.Set("prettyPrint", "false")
4125 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/service_bindings/{+binding_id}")
4126 urls += "?" + c.urlParams_.Encode()
4127 req, err := http.NewRequest("PUT", urls, body)
4128 if err != nil {
4129 return nil, err
4130 }
4131 req.Header = reqHeaders
4132 googleapi.Expand(req.URL, map[string]string{
4133 "parent": c.parent,
4134 "binding_id": c.bindingId,
4135 })
4136 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4137 }
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudServicebrokerV1beta1__CreateBindingResponse, error) {
4150 gensupport.SetOptions(c.urlParams_, opts...)
4151 res, err := c.doRequest("json")
4152 if res != nil && res.StatusCode == http.StatusNotModified {
4153 if res.Body != nil {
4154 res.Body.Close()
4155 }
4156 return nil, &googleapi.Error{
4157 Code: res.StatusCode,
4158 Header: res.Header,
4159 }
4160 }
4161 if err != nil {
4162 return nil, err
4163 }
4164 defer googleapi.CloseBody(res)
4165 if err := googleapi.CheckResponse(res); err != nil {
4166 return nil, err
4167 }
4168 ret := &GoogleCloudServicebrokerV1beta1__CreateBindingResponse{
4169 ServerResponse: googleapi.ServerResponse{
4170 Header: res.Header,
4171 HTTPStatusCode: res.StatusCode,
4172 },
4173 }
4174 target := &ret
4175 if err := gensupport.DecodeResponse(target, res); err != nil {
4176 return nil, err
4177 }
4178 return ret, nil
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221 }
4222
4223
4224
4225 type ProjectsBrokersV2ServiceInstancesServiceBindingsDeleteCall struct {
4226 s *Service
4227 name string
4228 urlParams_ gensupport.URLParams
4229 ctx_ context.Context
4230 header_ http.Header
4231 }
4232
4233
4234
4235
4236
4237
4238 func (r *ProjectsBrokersV2ServiceInstancesServiceBindingsService) Delete(name string) *ProjectsBrokersV2ServiceInstancesServiceBindingsDeleteCall {
4239 c := &ProjectsBrokersV2ServiceInstancesServiceBindingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4240 c.name = name
4241 return c
4242 }
4243
4244
4245
4246 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsDeleteCall) AcceptsIncomplete(acceptsIncomplete bool) *ProjectsBrokersV2ServiceInstancesServiceBindingsDeleteCall {
4247 c.urlParams_.Set("acceptsIncomplete", fmt.Sprint(acceptsIncomplete))
4248 return c
4249 }
4250
4251
4252
4253 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsDeleteCall) PlanId(planId string) *ProjectsBrokersV2ServiceInstancesServiceBindingsDeleteCall {
4254 c.urlParams_.Set("planId", planId)
4255 return c
4256 }
4257
4258
4259
4260
4261 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsDeleteCall) ServiceId(serviceId string) *ProjectsBrokersV2ServiceInstancesServiceBindingsDeleteCall {
4262 c.urlParams_.Set("serviceId", serviceId)
4263 return c
4264 }
4265
4266
4267
4268
4269 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsDeleteCall) Fields(s ...googleapi.Field) *ProjectsBrokersV2ServiceInstancesServiceBindingsDeleteCall {
4270 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4271 return c
4272 }
4273
4274
4275
4276
4277 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsDeleteCall) Context(ctx context.Context) *ProjectsBrokersV2ServiceInstancesServiceBindingsDeleteCall {
4278 c.ctx_ = ctx
4279 return c
4280 }
4281
4282
4283
4284 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsDeleteCall) Header() http.Header {
4285 if c.header_ == nil {
4286 c.header_ = make(http.Header)
4287 }
4288 return c.header_
4289 }
4290
4291 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsDeleteCall) doRequest(alt string) (*http.Response, error) {
4292 reqHeaders := make(http.Header)
4293 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
4294 for k, v := range c.header_ {
4295 reqHeaders[k] = v
4296 }
4297 reqHeaders.Set("User-Agent", c.s.userAgent())
4298 var body io.Reader = nil
4299 c.urlParams_.Set("alt", alt)
4300 c.urlParams_.Set("prettyPrint", "false")
4301 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
4302 urls += "?" + c.urlParams_.Encode()
4303 req, err := http.NewRequest("DELETE", urls, body)
4304 if err != nil {
4305 return nil, err
4306 }
4307 req.Header = reqHeaders
4308 googleapi.Expand(req.URL, map[string]string{
4309 "name": c.name,
4310 })
4311 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4312 }
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudServicebrokerV1beta1__DeleteBindingResponse, error) {
4325 gensupport.SetOptions(c.urlParams_, opts...)
4326 res, err := c.doRequest("json")
4327 if res != nil && res.StatusCode == http.StatusNotModified {
4328 if res.Body != nil {
4329 res.Body.Close()
4330 }
4331 return nil, &googleapi.Error{
4332 Code: res.StatusCode,
4333 Header: res.Header,
4334 }
4335 }
4336 if err != nil {
4337 return nil, err
4338 }
4339 defer googleapi.CloseBody(res)
4340 if err := googleapi.CheckResponse(res); err != nil {
4341 return nil, err
4342 }
4343 ret := &GoogleCloudServicebrokerV1beta1__DeleteBindingResponse{
4344 ServerResponse: googleapi.ServerResponse{
4345 Header: res.Header,
4346 HTTPStatusCode: res.StatusCode,
4347 },
4348 }
4349 target := &ret
4350 if err := gensupport.DecodeResponse(target, res); err != nil {
4351 return nil, err
4352 }
4353 return ret, nil
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395 }
4396
4397
4398
4399 type ProjectsBrokersV2ServiceInstancesServiceBindingsGetCall struct {
4400 s *Service
4401 name string
4402 urlParams_ gensupport.URLParams
4403 ifNoneMatch_ string
4404 ctx_ context.Context
4405 header_ http.Header
4406 }
4407
4408
4409 func (r *ProjectsBrokersV2ServiceInstancesServiceBindingsService) Get(name string) *ProjectsBrokersV2ServiceInstancesServiceBindingsGetCall {
4410 c := &ProjectsBrokersV2ServiceInstancesServiceBindingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4411 c.name = name
4412 return c
4413 }
4414
4415
4416 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsGetCall) PlanId(planId string) *ProjectsBrokersV2ServiceInstancesServiceBindingsGetCall {
4417 c.urlParams_.Set("planId", planId)
4418 return c
4419 }
4420
4421
4422 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsGetCall) ServiceId(serviceId string) *ProjectsBrokersV2ServiceInstancesServiceBindingsGetCall {
4423 c.urlParams_.Set("serviceId", serviceId)
4424 return c
4425 }
4426
4427
4428
4429
4430 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsGetCall) Fields(s ...googleapi.Field) *ProjectsBrokersV2ServiceInstancesServiceBindingsGetCall {
4431 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4432 return c
4433 }
4434
4435
4436
4437
4438
4439
4440 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsGetCall) IfNoneMatch(entityTag string) *ProjectsBrokersV2ServiceInstancesServiceBindingsGetCall {
4441 c.ifNoneMatch_ = entityTag
4442 return c
4443 }
4444
4445
4446
4447
4448 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsGetCall) Context(ctx context.Context) *ProjectsBrokersV2ServiceInstancesServiceBindingsGetCall {
4449 c.ctx_ = ctx
4450 return c
4451 }
4452
4453
4454
4455 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsGetCall) Header() http.Header {
4456 if c.header_ == nil {
4457 c.header_ = make(http.Header)
4458 }
4459 return c.header_
4460 }
4461
4462 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsGetCall) doRequest(alt string) (*http.Response, error) {
4463 reqHeaders := make(http.Header)
4464 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
4465 for k, v := range c.header_ {
4466 reqHeaders[k] = v
4467 }
4468 reqHeaders.Set("User-Agent", c.s.userAgent())
4469 if c.ifNoneMatch_ != "" {
4470 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4471 }
4472 var body io.Reader = nil
4473 c.urlParams_.Set("alt", alt)
4474 c.urlParams_.Set("prettyPrint", "false")
4475 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
4476 urls += "?" + c.urlParams_.Encode()
4477 req, err := http.NewRequest("GET", urls, body)
4478 if err != nil {
4479 return nil, err
4480 }
4481 req.Header = reqHeaders
4482 googleapi.Expand(req.URL, map[string]string{
4483 "name": c.name,
4484 })
4485 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4486 }
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudServicebrokerV1beta1__GetBindingResponse, error) {
4498 gensupport.SetOptions(c.urlParams_, opts...)
4499 res, err := c.doRequest("json")
4500 if res != nil && res.StatusCode == http.StatusNotModified {
4501 if res.Body != nil {
4502 res.Body.Close()
4503 }
4504 return nil, &googleapi.Error{
4505 Code: res.StatusCode,
4506 Header: res.Header,
4507 }
4508 }
4509 if err != nil {
4510 return nil, err
4511 }
4512 defer googleapi.CloseBody(res)
4513 if err := googleapi.CheckResponse(res); err != nil {
4514 return nil, err
4515 }
4516 ret := &GoogleCloudServicebrokerV1beta1__GetBindingResponse{
4517 ServerResponse: googleapi.ServerResponse{
4518 Header: res.Header,
4519 HTTPStatusCode: res.StatusCode,
4520 },
4521 }
4522 target := &ret
4523 if err := gensupport.DecodeResponse(target, res); err != nil {
4524 return nil, err
4525 }
4526 return ret, nil
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563 }
4564
4565
4566
4567 type ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall struct {
4568 s *Service
4569 name string
4570 urlParams_ gensupport.URLParams
4571 ifNoneMatch_ string
4572 ctx_ context.Context
4573 header_ http.Header
4574 }
4575
4576
4577
4578
4579 func (r *ProjectsBrokersV2ServiceInstancesServiceBindingsService) GetLastOperation(name string) *ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall {
4580 c := &ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4581 c.name = name
4582 return c
4583 }
4584
4585
4586
4587
4588 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall) Operation(operation string) *ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall {
4589 c.urlParams_.Set("operation", operation)
4590 return c
4591 }
4592
4593
4594 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall) PlanId(planId string) *ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall {
4595 c.urlParams_.Set("planId", planId)
4596 return c
4597 }
4598
4599
4600 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall) ServiceId(serviceId string) *ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall {
4601 c.urlParams_.Set("serviceId", serviceId)
4602 return c
4603 }
4604
4605
4606
4607
4608 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall) Fields(s ...googleapi.Field) *ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall {
4609 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4610 return c
4611 }
4612
4613
4614
4615
4616
4617
4618 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall) IfNoneMatch(entityTag string) *ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall {
4619 c.ifNoneMatch_ = entityTag
4620 return c
4621 }
4622
4623
4624
4625
4626 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall) Context(ctx context.Context) *ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall {
4627 c.ctx_ = ctx
4628 return c
4629 }
4630
4631
4632
4633 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall) Header() http.Header {
4634 if c.header_ == nil {
4635 c.header_ = make(http.Header)
4636 }
4637 return c.header_
4638 }
4639
4640 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall) doRequest(alt string) (*http.Response, error) {
4641 reqHeaders := make(http.Header)
4642 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
4643 for k, v := range c.header_ {
4644 reqHeaders[k] = v
4645 }
4646 reqHeaders.Set("User-Agent", c.s.userAgent())
4647 if c.ifNoneMatch_ != "" {
4648 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4649 }
4650 var body io.Reader = nil
4651 c.urlParams_.Set("alt", alt)
4652 c.urlParams_.Set("prettyPrint", "false")
4653 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/last_operation")
4654 urls += "?" + c.urlParams_.Encode()
4655 req, err := http.NewRequest("GET", urls, body)
4656 if err != nil {
4657 return nil, err
4658 }
4659 req.Header = reqHeaders
4660 googleapi.Expand(req.URL, map[string]string{
4661 "name": c.name,
4662 })
4663 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4664 }
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675 func (c *ProjectsBrokersV2ServiceInstancesServiceBindingsGetLastOperationCall) Do(opts ...googleapi.CallOption) (*GoogleCloudServicebrokerV1beta1__Operation, error) {
4676 gensupport.SetOptions(c.urlParams_, opts...)
4677 res, err := c.doRequest("json")
4678 if res != nil && res.StatusCode == http.StatusNotModified {
4679 if res.Body != nil {
4680 res.Body.Close()
4681 }
4682 return nil, &googleapi.Error{
4683 Code: res.StatusCode,
4684 Header: res.Header,
4685 }
4686 }
4687 if err != nil {
4688 return nil, err
4689 }
4690 defer googleapi.CloseBody(res)
4691 if err := googleapi.CheckResponse(res); err != nil {
4692 return nil, err
4693 }
4694 ret := &GoogleCloudServicebrokerV1beta1__Operation{
4695 ServerResponse: googleapi.ServerResponse{
4696 Header: res.Header,
4697 HTTPStatusCode: res.StatusCode,
4698 },
4699 }
4700 target := &ret
4701 if err := gensupport.DecodeResponse(target, res); err != nil {
4702 return nil, err
4703 }
4704 return ret, nil
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746 }
4747
4748
4749
4750 type V1beta1GetIamPolicyCall struct {
4751 s *Service
4752 resource string
4753 urlParams_ gensupport.URLParams
4754 ifNoneMatch_ string
4755 ctx_ context.Context
4756 header_ http.Header
4757 }
4758
4759
4760
4761
4762
4763 func (r *V1beta1Service) GetIamPolicy(resource string) *V1beta1GetIamPolicyCall {
4764 c := &V1beta1GetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4765 c.resource = resource
4766 return c
4767 }
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782 func (c *V1beta1GetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *V1beta1GetIamPolicyCall {
4783 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
4784 return c
4785 }
4786
4787
4788
4789
4790 func (c *V1beta1GetIamPolicyCall) Fields(s ...googleapi.Field) *V1beta1GetIamPolicyCall {
4791 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4792 return c
4793 }
4794
4795
4796
4797
4798
4799
4800 func (c *V1beta1GetIamPolicyCall) IfNoneMatch(entityTag string) *V1beta1GetIamPolicyCall {
4801 c.ifNoneMatch_ = entityTag
4802 return c
4803 }
4804
4805
4806
4807
4808 func (c *V1beta1GetIamPolicyCall) Context(ctx context.Context) *V1beta1GetIamPolicyCall {
4809 c.ctx_ = ctx
4810 return c
4811 }
4812
4813
4814
4815 func (c *V1beta1GetIamPolicyCall) Header() http.Header {
4816 if c.header_ == nil {
4817 c.header_ = make(http.Header)
4818 }
4819 return c.header_
4820 }
4821
4822 func (c *V1beta1GetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
4823 reqHeaders := make(http.Header)
4824 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
4825 for k, v := range c.header_ {
4826 reqHeaders[k] = v
4827 }
4828 reqHeaders.Set("User-Agent", c.s.userAgent())
4829 if c.ifNoneMatch_ != "" {
4830 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4831 }
4832 var body io.Reader = nil
4833 c.urlParams_.Set("alt", alt)
4834 c.urlParams_.Set("prettyPrint", "false")
4835 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:getIamPolicy")
4836 urls += "?" + c.urlParams_.Encode()
4837 req, err := http.NewRequest("GET", urls, body)
4838 if err != nil {
4839 return nil, err
4840 }
4841 req.Header = reqHeaders
4842 googleapi.Expand(req.URL, map[string]string{
4843 "resource": c.resource,
4844 })
4845 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4846 }
4847
4848
4849
4850
4851
4852
4853
4854
4855 func (c *V1beta1GetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1__Policy, error) {
4856 gensupport.SetOptions(c.urlParams_, opts...)
4857 res, err := c.doRequest("json")
4858 if res != nil && res.StatusCode == http.StatusNotModified {
4859 if res.Body != nil {
4860 res.Body.Close()
4861 }
4862 return nil, &googleapi.Error{
4863 Code: res.StatusCode,
4864 Header: res.Header,
4865 }
4866 }
4867 if err != nil {
4868 return nil, err
4869 }
4870 defer googleapi.CloseBody(res)
4871 if err := googleapi.CheckResponse(res); err != nil {
4872 return nil, err
4873 }
4874 ret := &GoogleIamV1__Policy{
4875 ServerResponse: googleapi.ServerResponse{
4876 Header: res.Header,
4877 HTTPStatusCode: res.StatusCode,
4878 },
4879 }
4880 target := &ret
4881 if err := gensupport.DecodeResponse(target, res); err != nil {
4882 return nil, err
4883 }
4884 return ret, nil
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917 }
4918
4919
4920
4921 type V1beta1SetIamPolicyCall struct {
4922 s *Service
4923 resource string
4924 googleiamv1__setiampolicyrequest *GoogleIamV1__SetIamPolicyRequest
4925 urlParams_ gensupport.URLParams
4926 ctx_ context.Context
4927 header_ http.Header
4928 }
4929
4930
4931
4932
4933
4934
4935
4936 func (r *V1beta1Service) SetIamPolicy(resource string, googleiamv1__setiampolicyrequest *GoogleIamV1__SetIamPolicyRequest) *V1beta1SetIamPolicyCall {
4937 c := &V1beta1SetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4938 c.resource = resource
4939 c.googleiamv1__setiampolicyrequest = googleiamv1__setiampolicyrequest
4940 return c
4941 }
4942
4943
4944
4945
4946 func (c *V1beta1SetIamPolicyCall) Fields(s ...googleapi.Field) *V1beta1SetIamPolicyCall {
4947 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4948 return c
4949 }
4950
4951
4952
4953
4954 func (c *V1beta1SetIamPolicyCall) Context(ctx context.Context) *V1beta1SetIamPolicyCall {
4955 c.ctx_ = ctx
4956 return c
4957 }
4958
4959
4960
4961 func (c *V1beta1SetIamPolicyCall) Header() http.Header {
4962 if c.header_ == nil {
4963 c.header_ = make(http.Header)
4964 }
4965 return c.header_
4966 }
4967
4968 func (c *V1beta1SetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
4969 reqHeaders := make(http.Header)
4970 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
4971 for k, v := range c.header_ {
4972 reqHeaders[k] = v
4973 }
4974 reqHeaders.Set("User-Agent", c.s.userAgent())
4975 var body io.Reader = nil
4976 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1__setiampolicyrequest)
4977 if err != nil {
4978 return nil, err
4979 }
4980 reqHeaders.Set("Content-Type", "application/json")
4981 c.urlParams_.Set("alt", alt)
4982 c.urlParams_.Set("prettyPrint", "false")
4983 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:setIamPolicy")
4984 urls += "?" + c.urlParams_.Encode()
4985 req, err := http.NewRequest("POST", urls, body)
4986 if err != nil {
4987 return nil, err
4988 }
4989 req.Header = reqHeaders
4990 googleapi.Expand(req.URL, map[string]string{
4991 "resource": c.resource,
4992 })
4993 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4994 }
4995
4996
4997
4998
4999
5000
5001
5002
5003 func (c *V1beta1SetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1__Policy, error) {
5004 gensupport.SetOptions(c.urlParams_, opts...)
5005 res, err := c.doRequest("json")
5006 if res != nil && res.StatusCode == http.StatusNotModified {
5007 if res.Body != nil {
5008 res.Body.Close()
5009 }
5010 return nil, &googleapi.Error{
5011 Code: res.StatusCode,
5012 Header: res.Header,
5013 }
5014 }
5015 if err != nil {
5016 return nil, err
5017 }
5018 defer googleapi.CloseBody(res)
5019 if err := googleapi.CheckResponse(res); err != nil {
5020 return nil, err
5021 }
5022 ret := &GoogleIamV1__Policy{
5023 ServerResponse: googleapi.ServerResponse{
5024 Header: res.Header,
5025 HTTPStatusCode: res.StatusCode,
5026 },
5027 }
5028 target := &ret
5029 if err := gensupport.DecodeResponse(target, res); err != nil {
5030 return nil, err
5031 }
5032 return ret, nil
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062 }
5063
5064
5065
5066 type V1beta1TestIamPermissionsCall struct {
5067 s *Service
5068 resource string
5069 googleiamv1__testiampermissionsrequest *GoogleIamV1__TestIamPermissionsRequest
5070 urlParams_ gensupport.URLParams
5071 ctx_ context.Context
5072 header_ http.Header
5073 }
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086 func (r *V1beta1Service) TestIamPermissions(resource string, googleiamv1__testiampermissionsrequest *GoogleIamV1__TestIamPermissionsRequest) *V1beta1TestIamPermissionsCall {
5087 c := &V1beta1TestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5088 c.resource = resource
5089 c.googleiamv1__testiampermissionsrequest = googleiamv1__testiampermissionsrequest
5090 return c
5091 }
5092
5093
5094
5095
5096 func (c *V1beta1TestIamPermissionsCall) Fields(s ...googleapi.Field) *V1beta1TestIamPermissionsCall {
5097 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5098 return c
5099 }
5100
5101
5102
5103
5104 func (c *V1beta1TestIamPermissionsCall) Context(ctx context.Context) *V1beta1TestIamPermissionsCall {
5105 c.ctx_ = ctx
5106 return c
5107 }
5108
5109
5110
5111 func (c *V1beta1TestIamPermissionsCall) Header() http.Header {
5112 if c.header_ == nil {
5113 c.header_ = make(http.Header)
5114 }
5115 return c.header_
5116 }
5117
5118 func (c *V1beta1TestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
5119 reqHeaders := make(http.Header)
5120 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
5121 for k, v := range c.header_ {
5122 reqHeaders[k] = v
5123 }
5124 reqHeaders.Set("User-Agent", c.s.userAgent())
5125 var body io.Reader = nil
5126 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1__testiampermissionsrequest)
5127 if err != nil {
5128 return nil, err
5129 }
5130 reqHeaders.Set("Content-Type", "application/json")
5131 c.urlParams_.Set("alt", alt)
5132 c.urlParams_.Set("prettyPrint", "false")
5133 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:testIamPermissions")
5134 urls += "?" + c.urlParams_.Encode()
5135 req, err := http.NewRequest("POST", urls, body)
5136 if err != nil {
5137 return nil, err
5138 }
5139 req.Header = reqHeaders
5140 googleapi.Expand(req.URL, map[string]string{
5141 "resource": c.resource,
5142 })
5143 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5144 }
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154 func (c *V1beta1TestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1__TestIamPermissionsResponse, error) {
5155 gensupport.SetOptions(c.urlParams_, opts...)
5156 res, err := c.doRequest("json")
5157 if res != nil && res.StatusCode == http.StatusNotModified {
5158 if res.Body != nil {
5159 res.Body.Close()
5160 }
5161 return nil, &googleapi.Error{
5162 Code: res.StatusCode,
5163 Header: res.Header,
5164 }
5165 }
5166 if err != nil {
5167 return nil, err
5168 }
5169 defer googleapi.CloseBody(res)
5170 if err := googleapi.CheckResponse(res); err != nil {
5171 return nil, err
5172 }
5173 ret := &GoogleIamV1__TestIamPermissionsResponse{
5174 ServerResponse: googleapi.ServerResponse{
5175 Header: res.Header,
5176 HTTPStatusCode: res.StatusCode,
5177 },
5178 }
5179 target := &ret
5180 if err := gensupport.DecodeResponse(target, res); err != nil {
5181 return nil, err
5182 }
5183 return ret, nil
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213 }
5214
View as plain text