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