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 networkservices
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 = "networkservices:v1beta1"
90 const apiName = "networkservices"
91 const apiVersion = "v1beta1"
92 const basePath = "https://networkservices.googleapis.com/"
93 const basePathTemplate = "https://networkservices.UNIVERSE_DOMAIN/"
94 const mtlsBasePath = "https://networkservices.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.EndpointPolicies = NewProjectsLocationsEndpointPoliciesService(s)
172 rs.Gateways = NewProjectsLocationsGatewaysService(s)
173 rs.GrpcRoutes = NewProjectsLocationsGrpcRoutesService(s)
174 rs.HttpRoutes = NewProjectsLocationsHttpRoutesService(s)
175 rs.LbRouteExtensions = NewProjectsLocationsLbRouteExtensionsService(s)
176 rs.LbTrafficExtensions = NewProjectsLocationsLbTrafficExtensionsService(s)
177 rs.Meshes = NewProjectsLocationsMeshesService(s)
178 rs.Operations = NewProjectsLocationsOperationsService(s)
179 rs.ServiceBindings = NewProjectsLocationsServiceBindingsService(s)
180 rs.ServiceLbPolicies = NewProjectsLocationsServiceLbPoliciesService(s)
181 rs.TcpRoutes = NewProjectsLocationsTcpRoutesService(s)
182 rs.TlsRoutes = NewProjectsLocationsTlsRoutesService(s)
183 return rs
184 }
185
186 type ProjectsLocationsService struct {
187 s *Service
188
189 EndpointPolicies *ProjectsLocationsEndpointPoliciesService
190
191 Gateways *ProjectsLocationsGatewaysService
192
193 GrpcRoutes *ProjectsLocationsGrpcRoutesService
194
195 HttpRoutes *ProjectsLocationsHttpRoutesService
196
197 LbRouteExtensions *ProjectsLocationsLbRouteExtensionsService
198
199 LbTrafficExtensions *ProjectsLocationsLbTrafficExtensionsService
200
201 Meshes *ProjectsLocationsMeshesService
202
203 Operations *ProjectsLocationsOperationsService
204
205 ServiceBindings *ProjectsLocationsServiceBindingsService
206
207 ServiceLbPolicies *ProjectsLocationsServiceLbPoliciesService
208
209 TcpRoutes *ProjectsLocationsTcpRoutesService
210
211 TlsRoutes *ProjectsLocationsTlsRoutesService
212 }
213
214 func NewProjectsLocationsEndpointPoliciesService(s *Service) *ProjectsLocationsEndpointPoliciesService {
215 rs := &ProjectsLocationsEndpointPoliciesService{s: s}
216 return rs
217 }
218
219 type ProjectsLocationsEndpointPoliciesService struct {
220 s *Service
221 }
222
223 func NewProjectsLocationsGatewaysService(s *Service) *ProjectsLocationsGatewaysService {
224 rs := &ProjectsLocationsGatewaysService{s: s}
225 return rs
226 }
227
228 type ProjectsLocationsGatewaysService struct {
229 s *Service
230 }
231
232 func NewProjectsLocationsGrpcRoutesService(s *Service) *ProjectsLocationsGrpcRoutesService {
233 rs := &ProjectsLocationsGrpcRoutesService{s: s}
234 return rs
235 }
236
237 type ProjectsLocationsGrpcRoutesService struct {
238 s *Service
239 }
240
241 func NewProjectsLocationsHttpRoutesService(s *Service) *ProjectsLocationsHttpRoutesService {
242 rs := &ProjectsLocationsHttpRoutesService{s: s}
243 return rs
244 }
245
246 type ProjectsLocationsHttpRoutesService struct {
247 s *Service
248 }
249
250 func NewProjectsLocationsLbRouteExtensionsService(s *Service) *ProjectsLocationsLbRouteExtensionsService {
251 rs := &ProjectsLocationsLbRouteExtensionsService{s: s}
252 return rs
253 }
254
255 type ProjectsLocationsLbRouteExtensionsService struct {
256 s *Service
257 }
258
259 func NewProjectsLocationsLbTrafficExtensionsService(s *Service) *ProjectsLocationsLbTrafficExtensionsService {
260 rs := &ProjectsLocationsLbTrafficExtensionsService{s: s}
261 return rs
262 }
263
264 type ProjectsLocationsLbTrafficExtensionsService struct {
265 s *Service
266 }
267
268 func NewProjectsLocationsMeshesService(s *Service) *ProjectsLocationsMeshesService {
269 rs := &ProjectsLocationsMeshesService{s: s}
270 return rs
271 }
272
273 type ProjectsLocationsMeshesService struct {
274 s *Service
275 }
276
277 func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
278 rs := &ProjectsLocationsOperationsService{s: s}
279 return rs
280 }
281
282 type ProjectsLocationsOperationsService struct {
283 s *Service
284 }
285
286 func NewProjectsLocationsServiceBindingsService(s *Service) *ProjectsLocationsServiceBindingsService {
287 rs := &ProjectsLocationsServiceBindingsService{s: s}
288 return rs
289 }
290
291 type ProjectsLocationsServiceBindingsService struct {
292 s *Service
293 }
294
295 func NewProjectsLocationsServiceLbPoliciesService(s *Service) *ProjectsLocationsServiceLbPoliciesService {
296 rs := &ProjectsLocationsServiceLbPoliciesService{s: s}
297 return rs
298 }
299
300 type ProjectsLocationsServiceLbPoliciesService struct {
301 s *Service
302 }
303
304 func NewProjectsLocationsTcpRoutesService(s *Service) *ProjectsLocationsTcpRoutesService {
305 rs := &ProjectsLocationsTcpRoutesService{s: s}
306 return rs
307 }
308
309 type ProjectsLocationsTcpRoutesService struct {
310 s *Service
311 }
312
313 func NewProjectsLocationsTlsRoutesService(s *Service) *ProjectsLocationsTlsRoutesService {
314 rs := &ProjectsLocationsTlsRoutesService{s: s}
315 return rs
316 }
317
318 type ProjectsLocationsTlsRoutesService struct {
319 s *Service
320 }
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338 type AuditConfig struct {
339
340 AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"`
341
342
343
344 Service string `json:"service,omitempty"`
345
346
347
348
349
350 ForceSendFields []string `json:"-"`
351
352
353
354
355 NullFields []string `json:"-"`
356 }
357
358 func (s *AuditConfig) MarshalJSON() ([]byte, error) {
359 type NoMethod AuditConfig
360 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
361 }
362
363
364
365
366
367
368 type AuditLogConfig struct {
369
370
371 ExemptedMembers []string `json:"exemptedMembers,omitempty"`
372
373
374
375
376
377
378
379 LogType string `json:"logType,omitempty"`
380
381
382
383
384
385 ForceSendFields []string `json:"-"`
386
387
388
389
390 NullFields []string `json:"-"`
391 }
392
393 func (s *AuditLogConfig) MarshalJSON() ([]byte, error) {
394 type NoMethod AuditLogConfig
395 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
396 }
397
398
399 type Binding struct {
400
401
402
403
404
405
406
407
408 Condition *Expr `json:"condition,omitempty"`
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471 Members []string `json:"members,omitempty"`
472
473
474
475
476
477
478 Role string `json:"role,omitempty"`
479
480
481
482
483
484 ForceSendFields []string `json:"-"`
485
486
487
488
489 NullFields []string `json:"-"`
490 }
491
492 func (s *Binding) MarshalJSON() ([]byte, error) {
493 type NoMethod Binding
494 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
495 }
496
497
498 type CancelOperationRequest struct {
499 }
500
501
502
503
504
505 type Empty struct {
506
507 googleapi.ServerResponse `json:"-"`
508 }
509
510
511
512 type EndpointMatcher struct {
513
514
515 MetadataLabelMatcher *MetadataLabelMatcher `json:"metadataLabelMatcher,omitempty"`
516
517
518
519
520
521 ForceSendFields []string `json:"-"`
522
523
524
525
526 NullFields []string `json:"-"`
527 }
528
529 func (s *EndpointMatcher) MarshalJSON() ([]byte, error) {
530 type NoMethod EndpointMatcher
531 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
532 }
533
534
535
536
537
538 type EndpointPolicy struct {
539
540
541
542
543
544 AuthorizationPolicy string `json:"authorizationPolicy,omitempty"`
545
546
547
548
549
550
551
552
553 ClientTlsPolicy string `json:"clientTlsPolicy,omitempty"`
554
555 CreateTime string `json:"createTime,omitempty"`
556
557
558 Description string `json:"description,omitempty"`
559
560
561 EndpointMatcher *EndpointMatcher `json:"endpointMatcher,omitempty"`
562
563
564 Labels map[string]string `json:"labels,omitempty"`
565
566
567 Name string `json:"name,omitempty"`
568
569
570
571
572 ServerTlsPolicy string `json:"serverTlsPolicy,omitempty"`
573
574
575 TrafficPortSelector *TrafficPortSelector `json:"trafficPortSelector,omitempty"`
576
577
578
579
580
581
582
583 Type string `json:"type,omitempty"`
584
585 UpdateTime string `json:"updateTime,omitempty"`
586
587
588 googleapi.ServerResponse `json:"-"`
589
590
591
592
593
594 ForceSendFields []string `json:"-"`
595
596
597
598
599 NullFields []string `json:"-"`
600 }
601
602 func (s *EndpointPolicy) MarshalJSON() ([]byte, error) {
603 type NoMethod EndpointPolicy
604 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
605 }
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623 type Expr struct {
624
625
626 Description string `json:"description,omitempty"`
627
628
629 Expression string `json:"expression,omitempty"`
630
631
632 Location string `json:"location,omitempty"`
633
634
635
636 Title string `json:"title,omitempty"`
637
638
639
640
641
642 ForceSendFields []string `json:"-"`
643
644
645
646
647 NullFields []string `json:"-"`
648 }
649
650 func (s *Expr) MarshalJSON() ([]byte, error) {
651 type NoMethod Expr
652 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
653 }
654
655
656
657 type ExtensionChain struct {
658
659
660
661
662 Extensions []*ExtensionChainExtension `json:"extensions,omitempty"`
663
664
665 MatchCondition *ExtensionChainMatchCondition `json:"matchCondition,omitempty"`
666
667
668
669
670
671 Name string `json:"name,omitempty"`
672
673
674
675
676
677 ForceSendFields []string `json:"-"`
678
679
680
681
682 NullFields []string `json:"-"`
683 }
684
685 func (s *ExtensionChain) MarshalJSON() ([]byte, error) {
686 type NoMethod ExtensionChain
687 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
688 }
689
690
691
692 type ExtensionChainExtension struct {
693
694
695 Authority string `json:"authority,omitempty"`
696
697
698
699
700
701
702
703
704
705
706 FailOpen bool `json:"failOpen,omitempty"`
707
708
709
710 ForwardHeaders []string `json:"forwardHeaders,omitempty"`
711
712
713
714
715
716 Name string `json:"name,omitempty"`
717
718
719
720
721
722
723
724
725
726
727 Service string `json:"service,omitempty"`
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747 SupportedEvents []string `json:"supportedEvents,omitempty"`
748
749
750
751 Timeout string `json:"timeout,omitempty"`
752
753
754
755
756
757 ForceSendFields []string `json:"-"`
758
759
760
761
762 NullFields []string `json:"-"`
763 }
764
765 func (s *ExtensionChainExtension) MarshalJSON() ([]byte, error) {
766 type NoMethod ExtensionChainExtension
767 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
768 }
769
770
771
772 type ExtensionChainMatchCondition struct {
773
774
775
776
777 CelExpression string `json:"celExpression,omitempty"`
778
779
780
781
782
783 ForceSendFields []string `json:"-"`
784
785
786
787
788 NullFields []string `json:"-"`
789 }
790
791 func (s *ExtensionChainMatchCondition) MarshalJSON() ([]byte, error) {
792 type NoMethod ExtensionChainMatchCondition
793 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
794 }
795
796
797
798
799
800
801 type Gateway struct {
802
803
804
805
806
807 Addresses []string `json:"addresses,omitempty"`
808
809
810
811
812 CertificateUrls []string `json:"certificateUrls,omitempty"`
813
814 CreateTime string `json:"createTime,omitempty"`
815
816
817 Description string `json:"description,omitempty"`
818
819
820
821
822
823
824
825
826
827
828
829 EnvoyHeaders string `json:"envoyHeaders,omitempty"`
830
831
832
833
834
835 GatewaySecurityPolicy string `json:"gatewaySecurityPolicy,omitempty"`
836
837
838
839
840
841
842
843
844 IpVersion string `json:"ipVersion,omitempty"`
845
846 Labels map[string]string `json:"labels,omitempty"`
847
848
849 Name string `json:"name,omitempty"`
850
851
852
853
854 Network string `json:"network,omitempty"`
855
856
857
858
859
860 Ports []int64 `json:"ports,omitempty"`
861
862
863
864
865
866 Scope string `json:"scope,omitempty"`
867
868 SelfLink string `json:"selfLink,omitempty"`
869
870
871
872 ServerTlsPolicy string `json:"serverTlsPolicy,omitempty"`
873
874
875
876
877 Subnetwork string `json:"subnetwork,omitempty"`
878
879
880
881
882
883
884
885
886
887
888 Type string `json:"type,omitempty"`
889
890 UpdateTime string `json:"updateTime,omitempty"`
891
892
893 googleapi.ServerResponse `json:"-"`
894
895
896
897
898
899 ForceSendFields []string `json:"-"`
900
901
902
903
904 NullFields []string `json:"-"`
905 }
906
907 func (s *Gateway) MarshalJSON() ([]byte, error) {
908 type NoMethod Gateway
909 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
910 }
911
912
913
914 type GrpcRoute struct {
915
916 CreateTime string `json:"createTime,omitempty"`
917
918
919 Description string `json:"description,omitempty"`
920
921
922
923
924 Gateways []string `json:"gateways,omitempty"`
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944 Hostnames []string `json:"hostnames,omitempty"`
945
946 Labels map[string]string `json:"labels,omitempty"`
947
948
949
950
951 Meshes []string `json:"meshes,omitempty"`
952
953
954 Name string `json:"name,omitempty"`
955
956
957
958
959 Rules []*GrpcRouteRouteRule `json:"rules,omitempty"`
960
961 SelfLink string `json:"selfLink,omitempty"`
962
963 UpdateTime string `json:"updateTime,omitempty"`
964
965
966 googleapi.ServerResponse `json:"-"`
967
968
969
970
971
972 ForceSendFields []string `json:"-"`
973
974
975
976
977 NullFields []string `json:"-"`
978 }
979
980 func (s *GrpcRoute) MarshalJSON() ([]byte, error) {
981 type NoMethod GrpcRoute
982 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
983 }
984
985
986 type GrpcRouteDestination struct {
987
988
989 ServiceName string `json:"serviceName,omitempty"`
990
991
992
993
994
995
996
997
998
999 Weight int64 `json:"weight,omitempty"`
1000
1001
1002
1003
1004
1005 ForceSendFields []string `json:"-"`
1006
1007
1008
1009
1010 NullFields []string `json:"-"`
1011 }
1012
1013 func (s *GrpcRouteDestination) MarshalJSON() ([]byte, error) {
1014 type NoMethod GrpcRouteDestination
1015 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1016 }
1017
1018
1019
1020
1021
1022
1023
1024 type GrpcRouteFaultInjectionPolicy struct {
1025
1026 Abort *GrpcRouteFaultInjectionPolicyAbort `json:"abort,omitempty"`
1027
1028 Delay *GrpcRouteFaultInjectionPolicyDelay `json:"delay,omitempty"`
1029
1030
1031
1032
1033
1034 ForceSendFields []string `json:"-"`
1035
1036
1037
1038
1039 NullFields []string `json:"-"`
1040 }
1041
1042 func (s *GrpcRouteFaultInjectionPolicy) MarshalJSON() ([]byte, error) {
1043 type NoMethod GrpcRouteFaultInjectionPolicy
1044 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1045 }
1046
1047
1048
1049 type GrpcRouteFaultInjectionPolicyAbort struct {
1050
1051
1052 HttpStatus int64 `json:"httpStatus,omitempty"`
1053
1054
1055 Percentage int64 `json:"percentage,omitempty"`
1056
1057
1058
1059
1060
1061 ForceSendFields []string `json:"-"`
1062
1063
1064
1065
1066 NullFields []string `json:"-"`
1067 }
1068
1069 func (s *GrpcRouteFaultInjectionPolicyAbort) MarshalJSON() ([]byte, error) {
1070 type NoMethod GrpcRouteFaultInjectionPolicyAbort
1071 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1072 }
1073
1074
1075
1076 type GrpcRouteFaultInjectionPolicyDelay struct {
1077
1078 FixedDelay string `json:"fixedDelay,omitempty"`
1079
1080
1081 Percentage int64 `json:"percentage,omitempty"`
1082
1083
1084
1085
1086
1087 ForceSendFields []string `json:"-"`
1088
1089
1090
1091
1092 NullFields []string `json:"-"`
1093 }
1094
1095 func (s *GrpcRouteFaultInjectionPolicyDelay) MarshalJSON() ([]byte, error) {
1096 type NoMethod GrpcRouteFaultInjectionPolicyDelay
1097 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1098 }
1099
1100
1101 type GrpcRouteHeaderMatch struct {
1102
1103 Key string `json:"key,omitempty"`
1104
1105
1106
1107
1108
1109
1110
1111
1112 Type string `json:"type,omitempty"`
1113
1114 Value string `json:"value,omitempty"`
1115
1116
1117
1118
1119
1120 ForceSendFields []string `json:"-"`
1121
1122
1123
1124
1125 NullFields []string `json:"-"`
1126 }
1127
1128 func (s *GrpcRouteHeaderMatch) MarshalJSON() ([]byte, error) {
1129 type NoMethod GrpcRouteHeaderMatch
1130 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1131 }
1132
1133
1134 type GrpcRouteMethodMatch struct {
1135
1136
1137
1138 CaseSensitive bool `json:"caseSensitive,omitempty"`
1139
1140
1141 GrpcMethod string `json:"grpcMethod,omitempty"`
1142
1143
1144 GrpcService string `json:"grpcService,omitempty"`
1145
1146
1147
1148
1149
1150
1151
1152
1153 Type string `json:"type,omitempty"`
1154
1155
1156
1157
1158
1159 ForceSendFields []string `json:"-"`
1160
1161
1162
1163
1164 NullFields []string `json:"-"`
1165 }
1166
1167 func (s *GrpcRouteMethodMatch) MarshalJSON() ([]byte, error) {
1168 type NoMethod GrpcRouteMethodMatch
1169 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1170 }
1171
1172
1173 type GrpcRouteRetryPolicy struct {
1174
1175
1176 NumRetries int64 `json:"numRetries,omitempty"`
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187 RetryConditions []string `json:"retryConditions,omitempty"`
1188
1189
1190
1191
1192
1193 ForceSendFields []string `json:"-"`
1194
1195
1196
1197
1198 NullFields []string `json:"-"`
1199 }
1200
1201 func (s *GrpcRouteRetryPolicy) MarshalJSON() ([]byte, error) {
1202 type NoMethod GrpcRouteRetryPolicy
1203 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1204 }
1205
1206
1207 type GrpcRouteRouteAction struct {
1208
1209
1210
1211
1212 Destinations []*GrpcRouteDestination `json:"destinations,omitempty"`
1213
1214
1215
1216
1217
1218
1219
1220
1221 FaultInjectionPolicy *GrpcRouteFaultInjectionPolicy `json:"faultInjectionPolicy,omitempty"`
1222
1223
1224
1225
1226 IdleTimeout string `json:"idleTimeout,omitempty"`
1227
1228
1229 RetryPolicy *GrpcRouteRetryPolicy `json:"retryPolicy,omitempty"`
1230
1231
1232 StatefulSessionAffinity *GrpcRouteStatefulSessionAffinityPolicy `json:"statefulSessionAffinity,omitempty"`
1233
1234
1235
1236
1237 Timeout string `json:"timeout,omitempty"`
1238
1239
1240
1241
1242
1243 ForceSendFields []string `json:"-"`
1244
1245
1246
1247
1248 NullFields []string `json:"-"`
1249 }
1250
1251 func (s *GrpcRouteRouteAction) MarshalJSON() ([]byte, error) {
1252 type NoMethod GrpcRouteRouteAction
1253 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1254 }
1255
1256
1257
1258 type GrpcRouteRouteMatch struct {
1259
1260 Headers []*GrpcRouteHeaderMatch `json:"headers,omitempty"`
1261
1262
1263 Method *GrpcRouteMethodMatch `json:"method,omitempty"`
1264
1265
1266
1267
1268
1269 ForceSendFields []string `json:"-"`
1270
1271
1272
1273
1274 NullFields []string `json:"-"`
1275 }
1276
1277 func (s *GrpcRouteRouteMatch) MarshalJSON() ([]byte, error) {
1278 type NoMethod GrpcRouteRouteMatch
1279 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1280 }
1281
1282
1283 type GrpcRouteRouteRule struct {
1284
1285
1286 Action *GrpcRouteRouteAction `json:"action,omitempty"`
1287
1288
1289
1290
1291 Matches []*GrpcRouteRouteMatch `json:"matches,omitempty"`
1292
1293
1294
1295
1296
1297 ForceSendFields []string `json:"-"`
1298
1299
1300
1301
1302 NullFields []string `json:"-"`
1303 }
1304
1305 func (s *GrpcRouteRouteRule) MarshalJSON() ([]byte, error) {
1306 type NoMethod GrpcRouteRouteRule
1307 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1308 }
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318 type GrpcRouteStatefulSessionAffinityPolicy struct {
1319
1320
1321
1322 CookieTtl string `json:"cookieTtl,omitempty"`
1323
1324
1325
1326
1327
1328 ForceSendFields []string `json:"-"`
1329
1330
1331
1332
1333 NullFields []string `json:"-"`
1334 }
1335
1336 func (s *GrpcRouteStatefulSessionAffinityPolicy) MarshalJSON() ([]byte, error) {
1337 type NoMethod GrpcRouteStatefulSessionAffinityPolicy
1338 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1339 }
1340
1341
1342
1343 type HttpRoute struct {
1344
1345 CreateTime string `json:"createTime,omitempty"`
1346
1347
1348 Description string `json:"description,omitempty"`
1349
1350
1351
1352
1353 Gateways []string `json:"gateways,omitempty"`
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371 Hostnames []string `json:"hostnames,omitempty"`
1372
1373 Labels map[string]string `json:"labels,omitempty"`
1374
1375
1376
1377
1378
1379 Meshes []string `json:"meshes,omitempty"`
1380
1381
1382 Name string `json:"name,omitempty"`
1383
1384
1385 Rules []*HttpRouteRouteRule `json:"rules,omitempty"`
1386
1387 SelfLink string `json:"selfLink,omitempty"`
1388
1389 UpdateTime string `json:"updateTime,omitempty"`
1390
1391
1392 googleapi.ServerResponse `json:"-"`
1393
1394
1395
1396
1397
1398 ForceSendFields []string `json:"-"`
1399
1400
1401
1402
1403 NullFields []string `json:"-"`
1404 }
1405
1406 func (s *HttpRoute) MarshalJSON() ([]byte, error) {
1407 type NoMethod HttpRoute
1408 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1409 }
1410
1411
1412
1413 type HttpRouteCorsPolicy struct {
1414
1415
1416
1417
1418 AllowCredentials bool `json:"allowCredentials,omitempty"`
1419
1420 AllowHeaders []string `json:"allowHeaders,omitempty"`
1421
1422 AllowMethods []string `json:"allowMethods,omitempty"`
1423
1424
1425
1426 AllowOriginRegexes []string `json:"allowOriginRegexes,omitempty"`
1427
1428
1429
1430 AllowOrigins []string `json:"allowOrigins,omitempty"`
1431
1432
1433 Disabled bool `json:"disabled,omitempty"`
1434
1435
1436 ExposeHeaders []string `json:"exposeHeaders,omitempty"`
1437
1438
1439 MaxAge string `json:"maxAge,omitempty"`
1440
1441
1442
1443
1444
1445 ForceSendFields []string `json:"-"`
1446
1447
1448
1449
1450 NullFields []string `json:"-"`
1451 }
1452
1453 func (s *HttpRouteCorsPolicy) MarshalJSON() ([]byte, error) {
1454 type NoMethod HttpRouteCorsPolicy
1455 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1456 }
1457
1458
1459
1460 type HttpRouteDestination struct {
1461
1462
1463
1464
1465
1466 RequestHeaderModifier *HttpRouteHeaderModifier `json:"requestHeaderModifier,omitempty"`
1467
1468
1469
1470
1471
1472 ResponseHeaderModifier *HttpRouteHeaderModifier `json:"responseHeaderModifier,omitempty"`
1473
1474 ServiceName string `json:"serviceName,omitempty"`
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484 Weight int64 `json:"weight,omitempty"`
1485
1486
1487
1488
1489
1490 ForceSendFields []string `json:"-"`
1491
1492
1493
1494
1495 NullFields []string `json:"-"`
1496 }
1497
1498 func (s *HttpRouteDestination) MarshalJSON() ([]byte, error) {
1499 type NoMethod HttpRouteDestination
1500 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1501 }
1502
1503
1504
1505
1506
1507
1508
1509 type HttpRouteFaultInjectionPolicy struct {
1510
1511 Abort *HttpRouteFaultInjectionPolicyAbort `json:"abort,omitempty"`
1512
1513 Delay *HttpRouteFaultInjectionPolicyDelay `json:"delay,omitempty"`
1514
1515
1516
1517
1518
1519 ForceSendFields []string `json:"-"`
1520
1521
1522
1523
1524 NullFields []string `json:"-"`
1525 }
1526
1527 func (s *HttpRouteFaultInjectionPolicy) MarshalJSON() ([]byte, error) {
1528 type NoMethod HttpRouteFaultInjectionPolicy
1529 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1530 }
1531
1532
1533
1534 type HttpRouteFaultInjectionPolicyAbort struct {
1535
1536
1537 HttpStatus int64 `json:"httpStatus,omitempty"`
1538
1539
1540 Percentage int64 `json:"percentage,omitempty"`
1541
1542
1543
1544
1545
1546 ForceSendFields []string `json:"-"`
1547
1548
1549
1550
1551 NullFields []string `json:"-"`
1552 }
1553
1554 func (s *HttpRouteFaultInjectionPolicyAbort) MarshalJSON() ([]byte, error) {
1555 type NoMethod HttpRouteFaultInjectionPolicyAbort
1556 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1557 }
1558
1559
1560
1561 type HttpRouteFaultInjectionPolicyDelay struct {
1562
1563 FixedDelay string `json:"fixedDelay,omitempty"`
1564
1565
1566 Percentage int64 `json:"percentage,omitempty"`
1567
1568
1569
1570
1571
1572 ForceSendFields []string `json:"-"`
1573
1574
1575
1576
1577 NullFields []string `json:"-"`
1578 }
1579
1580 func (s *HttpRouteFaultInjectionPolicyDelay) MarshalJSON() ([]byte, error) {
1581 type NoMethod HttpRouteFaultInjectionPolicyDelay
1582 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1583 }
1584
1585
1586
1587 type HttpRouteHeaderMatch struct {
1588
1589
1590 ExactMatch string `json:"exactMatch,omitempty"`
1591
1592 Header string `json:"header,omitempty"`
1593
1594
1595 InvertMatch bool `json:"invertMatch,omitempty"`
1596
1597
1598 PrefixMatch string `json:"prefixMatch,omitempty"`
1599
1600
1601 PresentMatch bool `json:"presentMatch,omitempty"`
1602
1603
1604 RangeMatch *HttpRouteHeaderMatchIntegerRange `json:"rangeMatch,omitempty"`
1605
1606
1607
1608 RegexMatch string `json:"regexMatch,omitempty"`
1609
1610
1611 SuffixMatch string `json:"suffixMatch,omitempty"`
1612
1613
1614
1615
1616
1617 ForceSendFields []string `json:"-"`
1618
1619
1620
1621
1622 NullFields []string `json:"-"`
1623 }
1624
1625 func (s *HttpRouteHeaderMatch) MarshalJSON() ([]byte, error) {
1626 type NoMethod HttpRouteHeaderMatch
1627 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1628 }
1629
1630
1631 type HttpRouteHeaderMatchIntegerRange struct {
1632
1633 End int64 `json:"end,omitempty"`
1634
1635 Start int64 `json:"start,omitempty"`
1636
1637
1638
1639
1640
1641 ForceSendFields []string `json:"-"`
1642
1643
1644
1645
1646 NullFields []string `json:"-"`
1647 }
1648
1649 func (s *HttpRouteHeaderMatchIntegerRange) MarshalJSON() ([]byte, error) {
1650 type NoMethod HttpRouteHeaderMatchIntegerRange
1651 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1652 }
1653
1654
1655
1656 type HttpRouteHeaderModifier struct {
1657
1658
1659 Add map[string]string `json:"add,omitempty"`
1660
1661 Remove []string `json:"remove,omitempty"`
1662
1663
1664 Set map[string]string `json:"set,omitempty"`
1665
1666
1667
1668
1669
1670 ForceSendFields []string `json:"-"`
1671
1672
1673
1674
1675 NullFields []string `json:"-"`
1676 }
1677
1678 func (s *HttpRouteHeaderModifier) MarshalJSON() ([]byte, error) {
1679 type NoMethod HttpRouteHeaderModifier
1680 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1681 }
1682
1683
1684 type HttpRouteHttpDirectResponse struct {
1685
1686 BytesBody string `json:"bytesBody,omitempty"`
1687
1688
1689 Status int64 `json:"status,omitempty"`
1690
1691
1692 StringBody string `json:"stringBody,omitempty"`
1693
1694
1695
1696
1697
1698 ForceSendFields []string `json:"-"`
1699
1700
1701
1702
1703 NullFields []string `json:"-"`
1704 }
1705
1706 func (s *HttpRouteHttpDirectResponse) MarshalJSON() ([]byte, error) {
1707 type NoMethod HttpRouteHttpDirectResponse
1708 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1709 }
1710
1711
1712
1713 type HttpRouteQueryParameterMatch struct {
1714
1715
1716
1717 ExactMatch string `json:"exactMatch,omitempty"`
1718
1719
1720
1721 PresentMatch bool `json:"presentMatch,omitempty"`
1722
1723 QueryParameter string `json:"queryParameter,omitempty"`
1724
1725
1726
1727
1728 RegexMatch string `json:"regexMatch,omitempty"`
1729
1730
1731
1732
1733
1734 ForceSendFields []string `json:"-"`
1735
1736
1737
1738
1739 NullFields []string `json:"-"`
1740 }
1741
1742 func (s *HttpRouteQueryParameterMatch) MarshalJSON() ([]byte, error) {
1743 type NoMethod HttpRouteQueryParameterMatch
1744 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1745 }
1746
1747
1748 type HttpRouteRedirect struct {
1749
1750
1751 HostRedirect string `json:"hostRedirect,omitempty"`
1752
1753
1754
1755 HttpsRedirect bool `json:"httpsRedirect,omitempty"`
1756
1757
1758
1759
1760 PathRedirect string `json:"pathRedirect,omitempty"`
1761
1762
1763 PortRedirect int64 `json:"portRedirect,omitempty"`
1764
1765
1766
1767 PrefixRewrite string `json:"prefixRewrite,omitempty"`
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779 ResponseCode string `json:"responseCode,omitempty"`
1780
1781
1782
1783 StripQuery bool `json:"stripQuery,omitempty"`
1784
1785
1786
1787
1788
1789 ForceSendFields []string `json:"-"`
1790
1791
1792
1793
1794 NullFields []string `json:"-"`
1795 }
1796
1797 func (s *HttpRouteRedirect) MarshalJSON() ([]byte, error) {
1798 type NoMethod HttpRouteRedirect
1799 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1800 }
1801
1802
1803
1804
1805
1806 type HttpRouteRequestMirrorPolicy struct {
1807
1808
1809 Destination *HttpRouteDestination `json:"destination,omitempty"`
1810
1811
1812 MirrorPercent float64 `json:"mirrorPercent,omitempty"`
1813
1814
1815
1816
1817
1818 ForceSendFields []string `json:"-"`
1819
1820
1821
1822
1823 NullFields []string `json:"-"`
1824 }
1825
1826 func (s *HttpRouteRequestMirrorPolicy) MarshalJSON() ([]byte, error) {
1827 type NoMethod HttpRouteRequestMirrorPolicy
1828 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1829 }
1830
1831 func (s *HttpRouteRequestMirrorPolicy) UnmarshalJSON(data []byte) error {
1832 type NoMethod HttpRouteRequestMirrorPolicy
1833 var s1 struct {
1834 MirrorPercent gensupport.JSONFloat64 `json:"mirrorPercent"`
1835 *NoMethod
1836 }
1837 s1.NoMethod = (*NoMethod)(s)
1838 if err := json.Unmarshal(data, &s1); err != nil {
1839 return err
1840 }
1841 s.MirrorPercent = float64(s1.MirrorPercent)
1842 return nil
1843 }
1844
1845
1846 type HttpRouteRetryPolicy struct {
1847
1848
1849 NumRetries int64 `json:"numRetries,omitempty"`
1850
1851 PerTryTimeout string `json:"perTryTimeout,omitempty"`
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865 RetryConditions []string `json:"retryConditions,omitempty"`
1866
1867
1868
1869
1870
1871 ForceSendFields []string `json:"-"`
1872
1873
1874
1875
1876 NullFields []string `json:"-"`
1877 }
1878
1879 func (s *HttpRouteRetryPolicy) MarshalJSON() ([]byte, error) {
1880 type NoMethod HttpRouteRetryPolicy
1881 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1882 }
1883
1884
1885
1886 type HttpRouteRouteAction struct {
1887
1888
1889 CorsPolicy *HttpRouteCorsPolicy `json:"corsPolicy,omitempty"`
1890
1891 Destinations []*HttpRouteDestination `json:"destinations,omitempty"`
1892
1893
1894 DirectResponse *HttpRouteHttpDirectResponse `json:"directResponse,omitempty"`
1895
1896
1897
1898
1899
1900
1901
1902 FaultInjectionPolicy *HttpRouteFaultInjectionPolicy `json:"faultInjectionPolicy,omitempty"`
1903
1904
1905
1906
1907 IdleTimeout string `json:"idleTimeout,omitempty"`
1908
1909 Redirect *HttpRouteRedirect `json:"redirect,omitempty"`
1910
1911
1912
1913
1914
1915 RequestHeaderModifier *HttpRouteHeaderModifier `json:"requestHeaderModifier,omitempty"`
1916
1917
1918
1919
1920
1921 RequestMirrorPolicy *HttpRouteRequestMirrorPolicy `json:"requestMirrorPolicy,omitempty"`
1922
1923
1924
1925
1926
1927 ResponseHeaderModifier *HttpRouteHeaderModifier `json:"responseHeaderModifier,omitempty"`
1928
1929 RetryPolicy *HttpRouteRetryPolicy `json:"retryPolicy,omitempty"`
1930
1931
1932 StatefulSessionAffinity *HttpRouteStatefulSessionAffinityPolicy `json:"statefulSessionAffinity,omitempty"`
1933
1934
1935
1936 Timeout string `json:"timeout,omitempty"`
1937
1938
1939 UrlRewrite *HttpRouteURLRewrite `json:"urlRewrite,omitempty"`
1940
1941
1942
1943
1944
1945 ForceSendFields []string `json:"-"`
1946
1947
1948
1949
1950 NullFields []string `json:"-"`
1951 }
1952
1953 func (s *HttpRouteRouteAction) MarshalJSON() ([]byte, error) {
1954 type NoMethod HttpRouteRouteAction
1955 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1956 }
1957
1958
1959
1960
1961 type HttpRouteRouteMatch struct {
1962
1963
1964 FullPathMatch string `json:"fullPathMatch,omitempty"`
1965
1966
1967 Headers []*HttpRouteHeaderMatch `json:"headers,omitempty"`
1968
1969
1970 IgnoreCase bool `json:"ignoreCase,omitempty"`
1971
1972
1973
1974 PrefixMatch string `json:"prefixMatch,omitempty"`
1975
1976
1977 QueryParameters []*HttpRouteQueryParameterMatch `json:"queryParameters,omitempty"`
1978
1979
1980
1981
1982
1983 RegexMatch string `json:"regexMatch,omitempty"`
1984
1985
1986
1987
1988
1989 ForceSendFields []string `json:"-"`
1990
1991
1992
1993
1994 NullFields []string `json:"-"`
1995 }
1996
1997 func (s *HttpRouteRouteMatch) MarshalJSON() ([]byte, error) {
1998 type NoMethod HttpRouteRouteMatch
1999 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2000 }
2001
2002
2003
2004 type HttpRouteRouteRule struct {
2005
2006 Action *HttpRouteRouteAction `json:"action,omitempty"`
2007
2008
2009
2010
2011
2012
2013 Matches []*HttpRouteRouteMatch `json:"matches,omitempty"`
2014
2015
2016
2017
2018
2019 ForceSendFields []string `json:"-"`
2020
2021
2022
2023
2024 NullFields []string `json:"-"`
2025 }
2026
2027 func (s *HttpRouteRouteRule) MarshalJSON() ([]byte, error) {
2028 type NoMethod HttpRouteRouteRule
2029 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2030 }
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040 type HttpRouteStatefulSessionAffinityPolicy struct {
2041
2042
2043
2044 CookieTtl string `json:"cookieTtl,omitempty"`
2045
2046
2047
2048
2049
2050 ForceSendFields []string `json:"-"`
2051
2052
2053
2054
2055 NullFields []string `json:"-"`
2056 }
2057
2058 func (s *HttpRouteStatefulSessionAffinityPolicy) MarshalJSON() ([]byte, error) {
2059 type NoMethod HttpRouteStatefulSessionAffinityPolicy
2060 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2061 }
2062
2063
2064
2065 type HttpRouteURLRewrite struct {
2066
2067
2068 HostRewrite string `json:"hostRewrite,omitempty"`
2069
2070
2071
2072 PathPrefixRewrite string `json:"pathPrefixRewrite,omitempty"`
2073
2074
2075
2076
2077
2078 ForceSendFields []string `json:"-"`
2079
2080
2081
2082
2083 NullFields []string `json:"-"`
2084 }
2085
2086 func (s *HttpRouteURLRewrite) MarshalJSON() ([]byte, error) {
2087 type NoMethod HttpRouteURLRewrite
2088 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2089 }
2090
2091
2092
2093 type LbRouteExtension struct {
2094
2095 CreateTime string `json:"createTime,omitempty"`
2096
2097 Description string `json:"description,omitempty"`
2098
2099
2100
2101
2102
2103
2104 ExtensionChains []*ExtensionChain `json:"extensionChains,omitempty"`
2105
2106
2107
2108
2109 ForwardingRules []string `json:"forwardingRules,omitempty"`
2110
2111
2112
2113
2114 Labels map[string]string `json:"labels,omitempty"`
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127 LoadBalancingScheme string `json:"loadBalancingScheme,omitempty"`
2128
2129
2130
2131
2132 Name string `json:"name,omitempty"`
2133
2134 UpdateTime string `json:"updateTime,omitempty"`
2135
2136
2137 googleapi.ServerResponse `json:"-"`
2138
2139
2140
2141
2142
2143 ForceSendFields []string `json:"-"`
2144
2145
2146
2147
2148 NullFields []string `json:"-"`
2149 }
2150
2151 func (s *LbRouteExtension) MarshalJSON() ([]byte, error) {
2152 type NoMethod LbRouteExtension
2153 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2154 }
2155
2156
2157
2158
2159
2160 type LbTrafficExtension struct {
2161
2162 CreateTime string `json:"createTime,omitempty"`
2163
2164 Description string `json:"description,omitempty"`
2165
2166
2167
2168
2169
2170
2171 ExtensionChains []*ExtensionChain `json:"extensionChains,omitempty"`
2172
2173
2174
2175
2176 ForwardingRules []string `json:"forwardingRules,omitempty"`
2177
2178
2179
2180
2181 Labels map[string]string `json:"labels,omitempty"`
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194 LoadBalancingScheme string `json:"loadBalancingScheme,omitempty"`
2195
2196
2197
2198
2199 Name string `json:"name,omitempty"`
2200
2201 UpdateTime string `json:"updateTime,omitempty"`
2202
2203
2204 googleapi.ServerResponse `json:"-"`
2205
2206
2207
2208
2209
2210 ForceSendFields []string `json:"-"`
2211
2212
2213
2214
2215 NullFields []string `json:"-"`
2216 }
2217
2218 func (s *LbTrafficExtension) MarshalJSON() ([]byte, error) {
2219 type NoMethod LbTrafficExtension
2220 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2221 }
2222
2223
2224
2225 type ListEndpointPoliciesResponse struct {
2226
2227 EndpointPolicies []*EndpointPolicy `json:"endpointPolicies,omitempty"`
2228
2229
2230
2231
2232 NextPageToken string `json:"nextPageToken,omitempty"`
2233
2234
2235 googleapi.ServerResponse `json:"-"`
2236
2237
2238
2239
2240
2241 ForceSendFields []string `json:"-"`
2242
2243
2244
2245
2246 NullFields []string `json:"-"`
2247 }
2248
2249 func (s *ListEndpointPoliciesResponse) MarshalJSON() ([]byte, error) {
2250 type NoMethod ListEndpointPoliciesResponse
2251 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2252 }
2253
2254
2255 type ListGatewaysResponse struct {
2256
2257 Gateways []*Gateway `json:"gateways,omitempty"`
2258
2259
2260
2261
2262 NextPageToken string `json:"nextPageToken,omitempty"`
2263
2264 Unreachable []string `json:"unreachable,omitempty"`
2265
2266
2267 googleapi.ServerResponse `json:"-"`
2268
2269
2270
2271
2272
2273 ForceSendFields []string `json:"-"`
2274
2275
2276
2277
2278 NullFields []string `json:"-"`
2279 }
2280
2281 func (s *ListGatewaysResponse) MarshalJSON() ([]byte, error) {
2282 type NoMethod ListGatewaysResponse
2283 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2284 }
2285
2286
2287 type ListGrpcRoutesResponse struct {
2288
2289 GrpcRoutes []*GrpcRoute `json:"grpcRoutes,omitempty"`
2290
2291
2292
2293
2294 NextPageToken string `json:"nextPageToken,omitempty"`
2295
2296
2297 googleapi.ServerResponse `json:"-"`
2298
2299
2300
2301
2302
2303 ForceSendFields []string `json:"-"`
2304
2305
2306
2307
2308 NullFields []string `json:"-"`
2309 }
2310
2311 func (s *ListGrpcRoutesResponse) MarshalJSON() ([]byte, error) {
2312 type NoMethod ListGrpcRoutesResponse
2313 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2314 }
2315
2316
2317 type ListHttpRoutesResponse struct {
2318
2319 HttpRoutes []*HttpRoute `json:"httpRoutes,omitempty"`
2320
2321
2322
2323
2324 NextPageToken string `json:"nextPageToken,omitempty"`
2325
2326
2327 googleapi.ServerResponse `json:"-"`
2328
2329
2330
2331
2332
2333 ForceSendFields []string `json:"-"`
2334
2335
2336
2337
2338 NullFields []string `json:"-"`
2339 }
2340
2341 func (s *ListHttpRoutesResponse) MarshalJSON() ([]byte, error) {
2342 type NoMethod ListHttpRoutesResponse
2343 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2344 }
2345
2346
2347
2348 type ListLbRouteExtensionsResponse struct {
2349
2350 LbRouteExtensions []*LbRouteExtension `json:"lbRouteExtensions,omitempty"`
2351
2352
2353 NextPageToken string `json:"nextPageToken,omitempty"`
2354
2355 Unreachable []string `json:"unreachable,omitempty"`
2356
2357
2358 googleapi.ServerResponse `json:"-"`
2359
2360
2361
2362
2363
2364 ForceSendFields []string `json:"-"`
2365
2366
2367
2368
2369 NullFields []string `json:"-"`
2370 }
2371
2372 func (s *ListLbRouteExtensionsResponse) MarshalJSON() ([]byte, error) {
2373 type NoMethod ListLbRouteExtensionsResponse
2374 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2375 }
2376
2377
2378
2379 type ListLbTrafficExtensionsResponse struct {
2380
2381 LbTrafficExtensions []*LbTrafficExtension `json:"lbTrafficExtensions,omitempty"`
2382
2383
2384 NextPageToken string `json:"nextPageToken,omitempty"`
2385
2386 Unreachable []string `json:"unreachable,omitempty"`
2387
2388
2389 googleapi.ServerResponse `json:"-"`
2390
2391
2392
2393
2394
2395 ForceSendFields []string `json:"-"`
2396
2397
2398
2399
2400 NullFields []string `json:"-"`
2401 }
2402
2403 func (s *ListLbTrafficExtensionsResponse) MarshalJSON() ([]byte, error) {
2404 type NoMethod ListLbTrafficExtensionsResponse
2405 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2406 }
2407
2408
2409 type ListLocationsResponse struct {
2410
2411
2412 Locations []*Location `json:"locations,omitempty"`
2413
2414 NextPageToken string `json:"nextPageToken,omitempty"`
2415
2416
2417 googleapi.ServerResponse `json:"-"`
2418
2419
2420
2421
2422
2423 ForceSendFields []string `json:"-"`
2424
2425
2426
2427
2428 NullFields []string `json:"-"`
2429 }
2430
2431 func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
2432 type NoMethod ListLocationsResponse
2433 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2434 }
2435
2436
2437 type ListMeshesResponse struct {
2438
2439 Meshes []*Mesh `json:"meshes,omitempty"`
2440
2441
2442
2443
2444 NextPageToken string `json:"nextPageToken,omitempty"`
2445
2446
2447 googleapi.ServerResponse `json:"-"`
2448
2449
2450
2451
2452
2453 ForceSendFields []string `json:"-"`
2454
2455
2456
2457
2458 NullFields []string `json:"-"`
2459 }
2460
2461 func (s *ListMeshesResponse) MarshalJSON() ([]byte, error) {
2462 type NoMethod ListMeshesResponse
2463 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2464 }
2465
2466
2467 type ListOperationsResponse struct {
2468
2469 NextPageToken string `json:"nextPageToken,omitempty"`
2470
2471
2472 Operations []*Operation `json:"operations,omitempty"`
2473
2474
2475 googleapi.ServerResponse `json:"-"`
2476
2477
2478
2479
2480
2481 ForceSendFields []string `json:"-"`
2482
2483
2484
2485
2486 NullFields []string `json:"-"`
2487 }
2488
2489 func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
2490 type NoMethod ListOperationsResponse
2491 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2492 }
2493
2494
2495
2496 type ListServiceBindingsResponse struct {
2497
2498
2499
2500
2501 NextPageToken string `json:"nextPageToken,omitempty"`
2502
2503 ServiceBindings []*ServiceBinding `json:"serviceBindings,omitempty"`
2504
2505
2506 googleapi.ServerResponse `json:"-"`
2507
2508
2509
2510
2511
2512 ForceSendFields []string `json:"-"`
2513
2514
2515
2516
2517 NullFields []string `json:"-"`
2518 }
2519
2520 func (s *ListServiceBindingsResponse) MarshalJSON() ([]byte, error) {
2521 type NoMethod ListServiceBindingsResponse
2522 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2523 }
2524
2525
2526
2527 type ListServiceLbPoliciesResponse struct {
2528
2529
2530
2531
2532 NextPageToken string `json:"nextPageToken,omitempty"`
2533
2534 ServiceLbPolicies []*ServiceLbPolicy `json:"serviceLbPolicies,omitempty"`
2535
2536
2537 googleapi.ServerResponse `json:"-"`
2538
2539
2540
2541
2542
2543 ForceSendFields []string `json:"-"`
2544
2545
2546
2547
2548 NullFields []string `json:"-"`
2549 }
2550
2551 func (s *ListServiceLbPoliciesResponse) MarshalJSON() ([]byte, error) {
2552 type NoMethod ListServiceLbPoliciesResponse
2553 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2554 }
2555
2556
2557 type ListTcpRoutesResponse struct {
2558
2559
2560
2561
2562 NextPageToken string `json:"nextPageToken,omitempty"`
2563
2564 TcpRoutes []*TcpRoute `json:"tcpRoutes,omitempty"`
2565
2566
2567 googleapi.ServerResponse `json:"-"`
2568
2569
2570
2571
2572
2573 ForceSendFields []string `json:"-"`
2574
2575
2576
2577
2578 NullFields []string `json:"-"`
2579 }
2580
2581 func (s *ListTcpRoutesResponse) MarshalJSON() ([]byte, error) {
2582 type NoMethod ListTcpRoutesResponse
2583 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2584 }
2585
2586
2587 type ListTlsRoutesResponse struct {
2588
2589
2590
2591
2592 NextPageToken string `json:"nextPageToken,omitempty"`
2593
2594 TlsRoutes []*TlsRoute `json:"tlsRoutes,omitempty"`
2595
2596
2597 googleapi.ServerResponse `json:"-"`
2598
2599
2600
2601
2602
2603 ForceSendFields []string `json:"-"`
2604
2605
2606
2607
2608 NullFields []string `json:"-"`
2609 }
2610
2611 func (s *ListTlsRoutesResponse) MarshalJSON() ([]byte, error) {
2612 type NoMethod ListTlsRoutesResponse
2613 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2614 }
2615
2616
2617 type Location struct {
2618
2619
2620 DisplayName string `json:"displayName,omitempty"`
2621
2622
2623 Labels map[string]string `json:"labels,omitempty"`
2624
2625 LocationId string `json:"locationId,omitempty"`
2626
2627
2628 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
2629
2630
2631
2632 Name string `json:"name,omitempty"`
2633
2634
2635 googleapi.ServerResponse `json:"-"`
2636
2637
2638
2639
2640
2641 ForceSendFields []string `json:"-"`
2642
2643
2644
2645
2646 NullFields []string `json:"-"`
2647 }
2648
2649 func (s *Location) MarshalJSON() ([]byte, error) {
2650 type NoMethod Location
2651 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2652 }
2653
2654
2655
2656
2657 type Mesh struct {
2658
2659 CreateTime string `json:"createTime,omitempty"`
2660
2661
2662 Description string `json:"description,omitempty"`
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674 EnvoyHeaders string `json:"envoyHeaders,omitempty"`
2675
2676
2677
2678
2679
2680
2681 InterceptionPort int64 `json:"interceptionPort,omitempty"`
2682
2683 Labels map[string]string `json:"labels,omitempty"`
2684
2685
2686 Name string `json:"name,omitempty"`
2687
2688 SelfLink string `json:"selfLink,omitempty"`
2689
2690 UpdateTime string `json:"updateTime,omitempty"`
2691
2692
2693 googleapi.ServerResponse `json:"-"`
2694
2695
2696
2697
2698
2699 ForceSendFields []string `json:"-"`
2700
2701
2702
2703
2704 NullFields []string `json:"-"`
2705 }
2706
2707 func (s *Mesh) MarshalJSON() ([]byte, error) {
2708 type NoMethod Mesh
2709 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2710 }
2711
2712
2713
2714 type MetadataLabelMatcher struct {
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735 MetadataLabelMatchCriteria string `json:"metadataLabelMatchCriteria,omitempty"`
2736
2737
2738
2739
2740 MetadataLabels []*MetadataLabels `json:"metadataLabels,omitempty"`
2741
2742
2743
2744
2745
2746 ForceSendFields []string `json:"-"`
2747
2748
2749
2750
2751 NullFields []string `json:"-"`
2752 }
2753
2754 func (s *MetadataLabelMatcher) MarshalJSON() ([]byte, error) {
2755 type NoMethod MetadataLabelMatcher
2756 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2757 }
2758
2759
2760 type MetadataLabels struct {
2761
2762 LabelName string `json:"labelName,omitempty"`
2763
2764
2765 LabelValue string `json:"labelValue,omitempty"`
2766
2767
2768
2769
2770
2771 ForceSendFields []string `json:"-"`
2772
2773
2774
2775
2776 NullFields []string `json:"-"`
2777 }
2778
2779 func (s *MetadataLabels) MarshalJSON() ([]byte, error) {
2780 type NoMethod MetadataLabels
2781 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2782 }
2783
2784
2785
2786 type Operation struct {
2787
2788
2789
2790 Done bool `json:"done,omitempty"`
2791
2792 Error *Status `json:"error,omitempty"`
2793
2794
2795
2796
2797 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
2798
2799
2800
2801 Name string `json:"name,omitempty"`
2802
2803
2804
2805
2806
2807
2808
2809 Response googleapi.RawMessage `json:"response,omitempty"`
2810
2811
2812 googleapi.ServerResponse `json:"-"`
2813
2814
2815
2816
2817
2818 ForceSendFields []string `json:"-"`
2819
2820
2821
2822
2823 NullFields []string `json:"-"`
2824 }
2825
2826 func (s *Operation) MarshalJSON() ([]byte, error) {
2827 type NoMethod Operation
2828 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2829 }
2830
2831
2832 type OperationMetadata struct {
2833
2834 ApiVersion string `json:"apiVersion,omitempty"`
2835
2836 CreateTime string `json:"createTime,omitempty"`
2837
2838 EndTime string `json:"endTime,omitempty"`
2839
2840
2841
2842
2843 RequestedCancellation bool `json:"requestedCancellation,omitempty"`
2844
2845 StatusMessage string `json:"statusMessage,omitempty"`
2846
2847
2848 Target string `json:"target,omitempty"`
2849
2850 Verb string `json:"verb,omitempty"`
2851
2852
2853
2854
2855
2856 ForceSendFields []string `json:"-"`
2857
2858
2859
2860
2861 NullFields []string `json:"-"`
2862 }
2863
2864 func (s *OperationMetadata) MarshalJSON() ([]byte, error) {
2865 type NoMethod OperationMetadata
2866 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2867 }
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899 type Policy struct {
2900
2901 AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"`
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911 Bindings []*Binding `json:"bindings,omitempty"`
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923 Etag string `json:"etag,omitempty"`
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939 Version int64 `json:"version,omitempty"`
2940
2941
2942 googleapi.ServerResponse `json:"-"`
2943
2944
2945
2946
2947
2948 ForceSendFields []string `json:"-"`
2949
2950
2951
2952
2953 NullFields []string `json:"-"`
2954 }
2955
2956 func (s *Policy) MarshalJSON() ([]byte, error) {
2957 type NoMethod Policy
2958 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2959 }
2960
2961
2962
2963 type ServiceBinding struct {
2964
2965 CreateTime string `json:"createTime,omitempty"`
2966
2967
2968 Description string `json:"description,omitempty"`
2969
2970
2971 Labels map[string]string `json:"labels,omitempty"`
2972
2973
2974 Name string `json:"name,omitempty"`
2975
2976
2977 Service string `json:"service,omitempty"`
2978
2979
2980
2981
2982 ServiceId string `json:"serviceId,omitempty"`
2983
2984 UpdateTime string `json:"updateTime,omitempty"`
2985
2986
2987 googleapi.ServerResponse `json:"-"`
2988
2989
2990
2991
2992
2993 ForceSendFields []string `json:"-"`
2994
2995
2996
2997
2998 NullFields []string `json:"-"`
2999 }
3000
3001 func (s *ServiceBinding) MarshalJSON() ([]byte, error) {
3002 type NoMethod ServiceBinding
3003 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3004 }
3005
3006
3007
3008 type ServiceLbPolicy struct {
3009
3010
3011 AutoCapacityDrain *ServiceLbPolicyAutoCapacityDrain `json:"autoCapacityDrain,omitempty"`
3012
3013 CreateTime string `json:"createTime,omitempty"`
3014
3015
3016 Description string `json:"description,omitempty"`
3017
3018 FailoverConfig *ServiceLbPolicyFailoverConfig `json:"failoverConfig,omitempty"`
3019
3020
3021 Labels map[string]string `json:"labels,omitempty"`
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039 LoadBalancingAlgorithm string `json:"loadBalancingAlgorithm,omitempty"`
3040
3041
3042
3043 Name string `json:"name,omitempty"`
3044
3045 UpdateTime string `json:"updateTime,omitempty"`
3046
3047
3048 googleapi.ServerResponse `json:"-"`
3049
3050
3051
3052
3053
3054 ForceSendFields []string `json:"-"`
3055
3056
3057
3058
3059 NullFields []string `json:"-"`
3060 }
3061
3062 func (s *ServiceLbPolicy) MarshalJSON() ([]byte, error) {
3063 type NoMethod ServiceLbPolicy
3064 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3065 }
3066
3067
3068
3069 type ServiceLbPolicyAutoCapacityDrain struct {
3070
3071
3072
3073
3074
3075 Enable bool `json:"enable,omitempty"`
3076
3077
3078
3079
3080
3081 ForceSendFields []string `json:"-"`
3082
3083
3084
3085
3086 NullFields []string `json:"-"`
3087 }
3088
3089 func (s *ServiceLbPolicyAutoCapacityDrain) MarshalJSON() ([]byte, error) {
3090 type NoMethod ServiceLbPolicyAutoCapacityDrain
3091 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3092 }
3093
3094
3095
3096 type ServiceLbPolicyFailoverConfig struct {
3097
3098
3099
3100
3101
3102
3103 FailoverHealthThreshold int64 `json:"failoverHealthThreshold,omitempty"`
3104
3105
3106
3107
3108
3109 ForceSendFields []string `json:"-"`
3110
3111
3112
3113
3114 NullFields []string `json:"-"`
3115 }
3116
3117 func (s *ServiceLbPolicyFailoverConfig) MarshalJSON() ([]byte, error) {
3118 type NoMethod ServiceLbPolicyFailoverConfig
3119 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3120 }
3121
3122
3123 type SetIamPolicyRequest struct {
3124
3125
3126
3127
3128 Policy *Policy `json:"policy,omitempty"`
3129
3130
3131
3132 UpdateMask string `json:"updateMask,omitempty"`
3133
3134
3135
3136
3137
3138 ForceSendFields []string `json:"-"`
3139
3140
3141
3142
3143 NullFields []string `json:"-"`
3144 }
3145
3146 func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
3147 type NoMethod SetIamPolicyRequest
3148 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3149 }
3150
3151
3152
3153
3154
3155
3156
3157 type Status struct {
3158
3159 Code int64 `json:"code,omitempty"`
3160
3161
3162 Details []googleapi.RawMessage `json:"details,omitempty"`
3163
3164
3165
3166 Message string `json:"message,omitempty"`
3167
3168
3169
3170
3171
3172 ForceSendFields []string `json:"-"`
3173
3174
3175
3176
3177 NullFields []string `json:"-"`
3178 }
3179
3180 func (s *Status) MarshalJSON() ([]byte, error) {
3181 type NoMethod Status
3182 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3183 }
3184
3185
3186
3187 type TcpRoute struct {
3188
3189 CreateTime string `json:"createTime,omitempty"`
3190
3191
3192 Description string `json:"description,omitempty"`
3193
3194
3195
3196
3197 Gateways []string `json:"gateways,omitempty"`
3198
3199 Labels map[string]string `json:"labels,omitempty"`
3200
3201
3202
3203
3204
3205 Meshes []string `json:"meshes,omitempty"`
3206
3207
3208 Name string `json:"name,omitempty"`
3209
3210
3211
3212 Rules []*TcpRouteRouteRule `json:"rules,omitempty"`
3213
3214 SelfLink string `json:"selfLink,omitempty"`
3215
3216 UpdateTime string `json:"updateTime,omitempty"`
3217
3218
3219 googleapi.ServerResponse `json:"-"`
3220
3221
3222
3223
3224
3225 ForceSendFields []string `json:"-"`
3226
3227
3228
3229
3230 NullFields []string `json:"-"`
3231 }
3232
3233 func (s *TcpRoute) MarshalJSON() ([]byte, error) {
3234 type NoMethod TcpRoute
3235 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3236 }
3237
3238
3239
3240 type TcpRouteRouteAction struct {
3241
3242
3243
3244 Destinations []*TcpRouteRouteDestination `json:"destinations,omitempty"`
3245
3246
3247
3248
3249
3250 IdleTimeout string `json:"idleTimeout,omitempty"`
3251
3252
3253
3254
3255 OriginalDestination bool `json:"originalDestination,omitempty"`
3256
3257
3258
3259
3260
3261 ForceSendFields []string `json:"-"`
3262
3263
3264
3265
3266 NullFields []string `json:"-"`
3267 }
3268
3269 func (s *TcpRouteRouteAction) MarshalJSON() ([]byte, error) {
3270 type NoMethod TcpRouteRouteAction
3271 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3272 }
3273
3274
3275
3276 type TcpRouteRouteDestination struct {
3277
3278 ServiceName string `json:"serviceName,omitempty"`
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288 Weight int64 `json:"weight,omitempty"`
3289
3290
3291
3292
3293
3294 ForceSendFields []string `json:"-"`
3295
3296
3297
3298
3299 NullFields []string `json:"-"`
3300 }
3301
3302 func (s *TcpRouteRouteDestination) MarshalJSON() ([]byte, error) {
3303 type NoMethod TcpRouteRouteDestination
3304 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3305 }
3306
3307
3308
3309
3310 type TcpRouteRouteMatch struct {
3311
3312
3313
3314
3315
3316
3317
3318 Address string `json:"address,omitempty"`
3319
3320 Port string `json:"port,omitempty"`
3321
3322
3323
3324
3325
3326 ForceSendFields []string `json:"-"`
3327
3328
3329
3330
3331 NullFields []string `json:"-"`
3332 }
3333
3334 func (s *TcpRouteRouteMatch) MarshalJSON() ([]byte, error) {
3335 type NoMethod TcpRouteRouteMatch
3336 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3337 }
3338
3339
3340
3341 type TcpRouteRouteRule struct {
3342
3343 Action *TcpRouteRouteAction `json:"action,omitempty"`
3344
3345
3346
3347 Matches []*TcpRouteRouteMatch `json:"matches,omitempty"`
3348
3349
3350
3351
3352
3353 ForceSendFields []string `json:"-"`
3354
3355
3356
3357
3358 NullFields []string `json:"-"`
3359 }
3360
3361 func (s *TcpRouteRouteRule) MarshalJSON() ([]byte, error) {
3362 type NoMethod TcpRouteRouteRule
3363 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3364 }
3365
3366
3367 type TestIamPermissionsRequest struct {
3368
3369
3370
3371
3372 Permissions []string `json:"permissions,omitempty"`
3373
3374
3375
3376
3377
3378 ForceSendFields []string `json:"-"`
3379
3380
3381
3382
3383 NullFields []string `json:"-"`
3384 }
3385
3386 func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
3387 type NoMethod TestIamPermissionsRequest
3388 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3389 }
3390
3391
3392
3393 type TestIamPermissionsResponse struct {
3394
3395
3396 Permissions []string `json:"permissions,omitempty"`
3397
3398
3399 googleapi.ServerResponse `json:"-"`
3400
3401
3402
3403
3404
3405 ForceSendFields []string `json:"-"`
3406
3407
3408
3409
3410 NullFields []string `json:"-"`
3411 }
3412
3413 func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
3414 type NoMethod TestIamPermissionsResponse
3415 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3416 }
3417
3418
3419
3420 type TlsRoute struct {
3421
3422 CreateTime string `json:"createTime,omitempty"`
3423
3424
3425 Description string `json:"description,omitempty"`
3426
3427
3428
3429
3430 Gateways []string `json:"gateways,omitempty"`
3431
3432 Labels map[string]string `json:"labels,omitempty"`
3433
3434
3435
3436
3437
3438 Meshes []string `json:"meshes,omitempty"`
3439
3440
3441 Name string `json:"name,omitempty"`
3442
3443
3444
3445 Rules []*TlsRouteRouteRule `json:"rules,omitempty"`
3446
3447 SelfLink string `json:"selfLink,omitempty"`
3448
3449 UpdateTime string `json:"updateTime,omitempty"`
3450
3451
3452 googleapi.ServerResponse `json:"-"`
3453
3454
3455
3456
3457
3458 ForceSendFields []string `json:"-"`
3459
3460
3461
3462
3463 NullFields []string `json:"-"`
3464 }
3465
3466 func (s *TlsRoute) MarshalJSON() ([]byte, error) {
3467 type NoMethod TlsRoute
3468 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3469 }
3470
3471
3472
3473 type TlsRouteRouteAction struct {
3474
3475
3476 Destinations []*TlsRouteRouteDestination `json:"destinations,omitempty"`
3477
3478
3479
3480
3481 IdleTimeout string `json:"idleTimeout,omitempty"`
3482
3483
3484
3485
3486
3487 ForceSendFields []string `json:"-"`
3488
3489
3490
3491
3492 NullFields []string `json:"-"`
3493 }
3494
3495 func (s *TlsRouteRouteAction) MarshalJSON() ([]byte, error) {
3496 type NoMethod TlsRouteRouteAction
3497 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3498 }
3499
3500
3501
3502 type TlsRouteRouteDestination struct {
3503
3504 ServiceName string `json:"serviceName,omitempty"`
3505
3506
3507
3508
3509 Weight int64 `json:"weight,omitempty"`
3510
3511
3512
3513
3514
3515 ForceSendFields []string `json:"-"`
3516
3517
3518
3519
3520 NullFields []string `json:"-"`
3521 }
3522
3523 func (s *TlsRouteRouteDestination) MarshalJSON() ([]byte, error) {
3524 type NoMethod TlsRouteRouteDestination
3525 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3526 }
3527
3528
3529
3530
3531 type TlsRouteRouteMatch struct {
3532
3533
3534
3535 Alpn []string `json:"alpn,omitempty"`
3536
3537
3538
3539
3540
3541
3542 SniHost []string `json:"sniHost,omitempty"`
3543
3544
3545
3546
3547
3548 ForceSendFields []string `json:"-"`
3549
3550
3551
3552
3553 NullFields []string `json:"-"`
3554 }
3555
3556 func (s *TlsRouteRouteMatch) MarshalJSON() ([]byte, error) {
3557 type NoMethod TlsRouteRouteMatch
3558 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3559 }
3560
3561
3562
3563 type TlsRouteRouteRule struct {
3564
3565 Action *TlsRouteRouteAction `json:"action,omitempty"`
3566
3567
3568 Matches []*TlsRouteRouteMatch `json:"matches,omitempty"`
3569
3570
3571
3572
3573
3574 ForceSendFields []string `json:"-"`
3575
3576
3577
3578
3579 NullFields []string `json:"-"`
3580 }
3581
3582 func (s *TlsRouteRouteRule) MarshalJSON() ([]byte, error) {
3583 type NoMethod TlsRouteRouteRule
3584 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3585 }
3586
3587
3588 type TrafficPortSelector struct {
3589
3590
3591
3592
3593 Ports []string `json:"ports,omitempty"`
3594
3595
3596
3597
3598
3599 ForceSendFields []string `json:"-"`
3600
3601
3602
3603
3604 NullFields []string `json:"-"`
3605 }
3606
3607 func (s *TrafficPortSelector) MarshalJSON() ([]byte, error) {
3608 type NoMethod TrafficPortSelector
3609 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3610 }
3611
3612 type ProjectsLocationsGetCall struct {
3613 s *Service
3614 name string
3615 urlParams_ gensupport.URLParams
3616 ifNoneMatch_ string
3617 ctx_ context.Context
3618 header_ http.Header
3619 }
3620
3621
3622
3623
3624 func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
3625 c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3626 c.name = name
3627 return c
3628 }
3629
3630
3631
3632
3633 func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
3634 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3635 return c
3636 }
3637
3638
3639
3640
3641 func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
3642 c.ifNoneMatch_ = entityTag
3643 return c
3644 }
3645
3646
3647 func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
3648 c.ctx_ = ctx
3649 return c
3650 }
3651
3652
3653
3654 func (c *ProjectsLocationsGetCall) Header() http.Header {
3655 if c.header_ == nil {
3656 c.header_ = make(http.Header)
3657 }
3658 return c.header_
3659 }
3660
3661 func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
3662 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3663 if c.ifNoneMatch_ != "" {
3664 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3665 }
3666 var body io.Reader = nil
3667 c.urlParams_.Set("alt", alt)
3668 c.urlParams_.Set("prettyPrint", "false")
3669 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
3670 urls += "?" + c.urlParams_.Encode()
3671 req, err := http.NewRequest("GET", urls, body)
3672 if err != nil {
3673 return nil, err
3674 }
3675 req.Header = reqHeaders
3676 googleapi.Expand(req.URL, map[string]string{
3677 "name": c.name,
3678 })
3679 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3680 }
3681
3682
3683
3684
3685
3686
3687 func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
3688 gensupport.SetOptions(c.urlParams_, opts...)
3689 res, err := c.doRequest("json")
3690 if res != nil && res.StatusCode == http.StatusNotModified {
3691 if res.Body != nil {
3692 res.Body.Close()
3693 }
3694 return nil, gensupport.WrapError(&googleapi.Error{
3695 Code: res.StatusCode,
3696 Header: res.Header,
3697 })
3698 }
3699 if err != nil {
3700 return nil, err
3701 }
3702 defer googleapi.CloseBody(res)
3703 if err := googleapi.CheckResponse(res); err != nil {
3704 return nil, gensupport.WrapError(err)
3705 }
3706 ret := &Location{
3707 ServerResponse: googleapi.ServerResponse{
3708 Header: res.Header,
3709 HTTPStatusCode: res.StatusCode,
3710 },
3711 }
3712 target := &ret
3713 if err := gensupport.DecodeResponse(target, res); err != nil {
3714 return nil, err
3715 }
3716 return ret, nil
3717 }
3718
3719 type ProjectsLocationsListCall struct {
3720 s *Service
3721 name string
3722 urlParams_ gensupport.URLParams
3723 ifNoneMatch_ string
3724 ctx_ context.Context
3725 header_ http.Header
3726 }
3727
3728
3729
3730
3731 func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
3732 c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3733 c.name = name
3734 return c
3735 }
3736
3737
3738
3739
3740
3741 func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
3742 c.urlParams_.Set("filter", filter)
3743 return c
3744 }
3745
3746
3747
3748 func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
3749 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3750 return c
3751 }
3752
3753
3754
3755
3756 func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
3757 c.urlParams_.Set("pageToken", pageToken)
3758 return c
3759 }
3760
3761
3762
3763
3764 func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
3765 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3766 return c
3767 }
3768
3769
3770
3771
3772 func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
3773 c.ifNoneMatch_ = entityTag
3774 return c
3775 }
3776
3777
3778 func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
3779 c.ctx_ = ctx
3780 return c
3781 }
3782
3783
3784
3785 func (c *ProjectsLocationsListCall) Header() http.Header {
3786 if c.header_ == nil {
3787 c.header_ = make(http.Header)
3788 }
3789 return c.header_
3790 }
3791
3792 func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
3793 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3794 if c.ifNoneMatch_ != "" {
3795 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3796 }
3797 var body io.Reader = nil
3798 c.urlParams_.Set("alt", alt)
3799 c.urlParams_.Set("prettyPrint", "false")
3800 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/locations")
3801 urls += "?" + c.urlParams_.Encode()
3802 req, err := http.NewRequest("GET", urls, body)
3803 if err != nil {
3804 return nil, err
3805 }
3806 req.Header = reqHeaders
3807 googleapi.Expand(req.URL, map[string]string{
3808 "name": c.name,
3809 })
3810 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3811 }
3812
3813
3814
3815
3816
3817
3818
3819 func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
3820 gensupport.SetOptions(c.urlParams_, opts...)
3821 res, err := c.doRequest("json")
3822 if res != nil && res.StatusCode == http.StatusNotModified {
3823 if res.Body != nil {
3824 res.Body.Close()
3825 }
3826 return nil, gensupport.WrapError(&googleapi.Error{
3827 Code: res.StatusCode,
3828 Header: res.Header,
3829 })
3830 }
3831 if err != nil {
3832 return nil, err
3833 }
3834 defer googleapi.CloseBody(res)
3835 if err := googleapi.CheckResponse(res); err != nil {
3836 return nil, gensupport.WrapError(err)
3837 }
3838 ret := &ListLocationsResponse{
3839 ServerResponse: googleapi.ServerResponse{
3840 Header: res.Header,
3841 HTTPStatusCode: res.StatusCode,
3842 },
3843 }
3844 target := &ret
3845 if err := gensupport.DecodeResponse(target, res); err != nil {
3846 return nil, err
3847 }
3848 return ret, nil
3849 }
3850
3851
3852
3853
3854 func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
3855 c.ctx_ = ctx
3856 defer c.PageToken(c.urlParams_.Get("pageToken"))
3857 for {
3858 x, err := c.Do()
3859 if err != nil {
3860 return err
3861 }
3862 if err := f(x); err != nil {
3863 return err
3864 }
3865 if x.NextPageToken == "" {
3866 return nil
3867 }
3868 c.PageToken(x.NextPageToken)
3869 }
3870 }
3871
3872 type ProjectsLocationsEndpointPoliciesCreateCall struct {
3873 s *Service
3874 parent string
3875 endpointpolicy *EndpointPolicy
3876 urlParams_ gensupport.URLParams
3877 ctx_ context.Context
3878 header_ http.Header
3879 }
3880
3881
3882
3883
3884
3885 func (r *ProjectsLocationsEndpointPoliciesService) Create(parent string, endpointpolicy *EndpointPolicy) *ProjectsLocationsEndpointPoliciesCreateCall {
3886 c := &ProjectsLocationsEndpointPoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3887 c.parent = parent
3888 c.endpointpolicy = endpointpolicy
3889 return c
3890 }
3891
3892
3893
3894 func (c *ProjectsLocationsEndpointPoliciesCreateCall) EndpointPolicyId(endpointPolicyId string) *ProjectsLocationsEndpointPoliciesCreateCall {
3895 c.urlParams_.Set("endpointPolicyId", endpointPolicyId)
3896 return c
3897 }
3898
3899
3900
3901
3902 func (c *ProjectsLocationsEndpointPoliciesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointPoliciesCreateCall {
3903 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3904 return c
3905 }
3906
3907
3908 func (c *ProjectsLocationsEndpointPoliciesCreateCall) Context(ctx context.Context) *ProjectsLocationsEndpointPoliciesCreateCall {
3909 c.ctx_ = ctx
3910 return c
3911 }
3912
3913
3914
3915 func (c *ProjectsLocationsEndpointPoliciesCreateCall) Header() http.Header {
3916 if c.header_ == nil {
3917 c.header_ = make(http.Header)
3918 }
3919 return c.header_
3920 }
3921
3922 func (c *ProjectsLocationsEndpointPoliciesCreateCall) doRequest(alt string) (*http.Response, error) {
3923 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3924 var body io.Reader = nil
3925 body, err := googleapi.WithoutDataWrapper.JSONReader(c.endpointpolicy)
3926 if err != nil {
3927 return nil, err
3928 }
3929 c.urlParams_.Set("alt", alt)
3930 c.urlParams_.Set("prettyPrint", "false")
3931 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/endpointPolicies")
3932 urls += "?" + c.urlParams_.Encode()
3933 req, err := http.NewRequest("POST", urls, body)
3934 if err != nil {
3935 return nil, err
3936 }
3937 req.Header = reqHeaders
3938 googleapi.Expand(req.URL, map[string]string{
3939 "parent": c.parent,
3940 })
3941 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3942 }
3943
3944
3945
3946
3947
3948
3949 func (c *ProjectsLocationsEndpointPoliciesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3950 gensupport.SetOptions(c.urlParams_, opts...)
3951 res, err := c.doRequest("json")
3952 if res != nil && res.StatusCode == http.StatusNotModified {
3953 if res.Body != nil {
3954 res.Body.Close()
3955 }
3956 return nil, gensupport.WrapError(&googleapi.Error{
3957 Code: res.StatusCode,
3958 Header: res.Header,
3959 })
3960 }
3961 if err != nil {
3962 return nil, err
3963 }
3964 defer googleapi.CloseBody(res)
3965 if err := googleapi.CheckResponse(res); err != nil {
3966 return nil, gensupport.WrapError(err)
3967 }
3968 ret := &Operation{
3969 ServerResponse: googleapi.ServerResponse{
3970 Header: res.Header,
3971 HTTPStatusCode: res.StatusCode,
3972 },
3973 }
3974 target := &ret
3975 if err := gensupport.DecodeResponse(target, res); err != nil {
3976 return nil, err
3977 }
3978 return ret, nil
3979 }
3980
3981 type ProjectsLocationsEndpointPoliciesDeleteCall struct {
3982 s *Service
3983 name string
3984 urlParams_ gensupport.URLParams
3985 ctx_ context.Context
3986 header_ http.Header
3987 }
3988
3989
3990
3991
3992
3993 func (r *ProjectsLocationsEndpointPoliciesService) Delete(name string) *ProjectsLocationsEndpointPoliciesDeleteCall {
3994 c := &ProjectsLocationsEndpointPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3995 c.name = name
3996 return c
3997 }
3998
3999
4000
4001
4002 func (c *ProjectsLocationsEndpointPoliciesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointPoliciesDeleteCall {
4003 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4004 return c
4005 }
4006
4007
4008 func (c *ProjectsLocationsEndpointPoliciesDeleteCall) Context(ctx context.Context) *ProjectsLocationsEndpointPoliciesDeleteCall {
4009 c.ctx_ = ctx
4010 return c
4011 }
4012
4013
4014
4015 func (c *ProjectsLocationsEndpointPoliciesDeleteCall) Header() http.Header {
4016 if c.header_ == nil {
4017 c.header_ = make(http.Header)
4018 }
4019 return c.header_
4020 }
4021
4022 func (c *ProjectsLocationsEndpointPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) {
4023 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4024 var body io.Reader = nil
4025 c.urlParams_.Set("alt", alt)
4026 c.urlParams_.Set("prettyPrint", "false")
4027 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
4028 urls += "?" + c.urlParams_.Encode()
4029 req, err := http.NewRequest("DELETE", urls, body)
4030 if err != nil {
4031 return nil, err
4032 }
4033 req.Header = reqHeaders
4034 googleapi.Expand(req.URL, map[string]string{
4035 "name": c.name,
4036 })
4037 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4038 }
4039
4040
4041
4042
4043
4044
4045 func (c *ProjectsLocationsEndpointPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4046 gensupport.SetOptions(c.urlParams_, opts...)
4047 res, err := c.doRequest("json")
4048 if res != nil && res.StatusCode == http.StatusNotModified {
4049 if res.Body != nil {
4050 res.Body.Close()
4051 }
4052 return nil, gensupport.WrapError(&googleapi.Error{
4053 Code: res.StatusCode,
4054 Header: res.Header,
4055 })
4056 }
4057 if err != nil {
4058 return nil, err
4059 }
4060 defer googleapi.CloseBody(res)
4061 if err := googleapi.CheckResponse(res); err != nil {
4062 return nil, gensupport.WrapError(err)
4063 }
4064 ret := &Operation{
4065 ServerResponse: googleapi.ServerResponse{
4066 Header: res.Header,
4067 HTTPStatusCode: res.StatusCode,
4068 },
4069 }
4070 target := &ret
4071 if err := gensupport.DecodeResponse(target, res); err != nil {
4072 return nil, err
4073 }
4074 return ret, nil
4075 }
4076
4077 type ProjectsLocationsEndpointPoliciesGetCall struct {
4078 s *Service
4079 name string
4080 urlParams_ gensupport.URLParams
4081 ifNoneMatch_ string
4082 ctx_ context.Context
4083 header_ http.Header
4084 }
4085
4086
4087
4088
4089
4090 func (r *ProjectsLocationsEndpointPoliciesService) Get(name string) *ProjectsLocationsEndpointPoliciesGetCall {
4091 c := &ProjectsLocationsEndpointPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4092 c.name = name
4093 return c
4094 }
4095
4096
4097
4098
4099 func (c *ProjectsLocationsEndpointPoliciesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointPoliciesGetCall {
4100 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4101 return c
4102 }
4103
4104
4105
4106
4107 func (c *ProjectsLocationsEndpointPoliciesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEndpointPoliciesGetCall {
4108 c.ifNoneMatch_ = entityTag
4109 return c
4110 }
4111
4112
4113 func (c *ProjectsLocationsEndpointPoliciesGetCall) Context(ctx context.Context) *ProjectsLocationsEndpointPoliciesGetCall {
4114 c.ctx_ = ctx
4115 return c
4116 }
4117
4118
4119
4120 func (c *ProjectsLocationsEndpointPoliciesGetCall) Header() http.Header {
4121 if c.header_ == nil {
4122 c.header_ = make(http.Header)
4123 }
4124 return c.header_
4125 }
4126
4127 func (c *ProjectsLocationsEndpointPoliciesGetCall) doRequest(alt string) (*http.Response, error) {
4128 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4129 if c.ifNoneMatch_ != "" {
4130 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4131 }
4132 var body io.Reader = nil
4133 c.urlParams_.Set("alt", alt)
4134 c.urlParams_.Set("prettyPrint", "false")
4135 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
4136 urls += "?" + c.urlParams_.Encode()
4137 req, err := http.NewRequest("GET", urls, body)
4138 if err != nil {
4139 return nil, err
4140 }
4141 req.Header = reqHeaders
4142 googleapi.Expand(req.URL, map[string]string{
4143 "name": c.name,
4144 })
4145 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4146 }
4147
4148
4149
4150
4151
4152
4153 func (c *ProjectsLocationsEndpointPoliciesGetCall) Do(opts ...googleapi.CallOption) (*EndpointPolicy, error) {
4154 gensupport.SetOptions(c.urlParams_, opts...)
4155 res, err := c.doRequest("json")
4156 if res != nil && res.StatusCode == http.StatusNotModified {
4157 if res.Body != nil {
4158 res.Body.Close()
4159 }
4160 return nil, gensupport.WrapError(&googleapi.Error{
4161 Code: res.StatusCode,
4162 Header: res.Header,
4163 })
4164 }
4165 if err != nil {
4166 return nil, err
4167 }
4168 defer googleapi.CloseBody(res)
4169 if err := googleapi.CheckResponse(res); err != nil {
4170 return nil, gensupport.WrapError(err)
4171 }
4172 ret := &EndpointPolicy{
4173 ServerResponse: googleapi.ServerResponse{
4174 Header: res.Header,
4175 HTTPStatusCode: res.StatusCode,
4176 },
4177 }
4178 target := &ret
4179 if err := gensupport.DecodeResponse(target, res); err != nil {
4180 return nil, err
4181 }
4182 return ret, nil
4183 }
4184
4185 type ProjectsLocationsEndpointPoliciesGetIamPolicyCall struct {
4186 s *Service
4187 resource string
4188 urlParams_ gensupport.URLParams
4189 ifNoneMatch_ string
4190 ctx_ context.Context
4191 header_ http.Header
4192 }
4193
4194
4195
4196
4197
4198
4199
4200 func (r *ProjectsLocationsEndpointPoliciesService) GetIamPolicy(resource string) *ProjectsLocationsEndpointPoliciesGetIamPolicyCall {
4201 c := &ProjectsLocationsEndpointPoliciesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4202 c.resource = resource
4203 return c
4204 }
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218 func (c *ProjectsLocationsEndpointPoliciesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsEndpointPoliciesGetIamPolicyCall {
4219 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
4220 return c
4221 }
4222
4223
4224
4225
4226 func (c *ProjectsLocationsEndpointPoliciesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointPoliciesGetIamPolicyCall {
4227 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4228 return c
4229 }
4230
4231
4232
4233
4234 func (c *ProjectsLocationsEndpointPoliciesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsEndpointPoliciesGetIamPolicyCall {
4235 c.ifNoneMatch_ = entityTag
4236 return c
4237 }
4238
4239
4240 func (c *ProjectsLocationsEndpointPoliciesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEndpointPoliciesGetIamPolicyCall {
4241 c.ctx_ = ctx
4242 return c
4243 }
4244
4245
4246
4247 func (c *ProjectsLocationsEndpointPoliciesGetIamPolicyCall) Header() http.Header {
4248 if c.header_ == nil {
4249 c.header_ = make(http.Header)
4250 }
4251 return c.header_
4252 }
4253
4254 func (c *ProjectsLocationsEndpointPoliciesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
4255 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4256 if c.ifNoneMatch_ != "" {
4257 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4258 }
4259 var body io.Reader = nil
4260 c.urlParams_.Set("alt", alt)
4261 c.urlParams_.Set("prettyPrint", "false")
4262 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:getIamPolicy")
4263 urls += "?" + c.urlParams_.Encode()
4264 req, err := http.NewRequest("GET", urls, body)
4265 if err != nil {
4266 return nil, err
4267 }
4268 req.Header = reqHeaders
4269 googleapi.Expand(req.URL, map[string]string{
4270 "resource": c.resource,
4271 })
4272 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4273 }
4274
4275
4276
4277
4278
4279
4280 func (c *ProjectsLocationsEndpointPoliciesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
4281 gensupport.SetOptions(c.urlParams_, opts...)
4282 res, err := c.doRequest("json")
4283 if res != nil && res.StatusCode == http.StatusNotModified {
4284 if res.Body != nil {
4285 res.Body.Close()
4286 }
4287 return nil, gensupport.WrapError(&googleapi.Error{
4288 Code: res.StatusCode,
4289 Header: res.Header,
4290 })
4291 }
4292 if err != nil {
4293 return nil, err
4294 }
4295 defer googleapi.CloseBody(res)
4296 if err := googleapi.CheckResponse(res); err != nil {
4297 return nil, gensupport.WrapError(err)
4298 }
4299 ret := &Policy{
4300 ServerResponse: googleapi.ServerResponse{
4301 Header: res.Header,
4302 HTTPStatusCode: res.StatusCode,
4303 },
4304 }
4305 target := &ret
4306 if err := gensupport.DecodeResponse(target, res); err != nil {
4307 return nil, err
4308 }
4309 return ret, nil
4310 }
4311
4312 type ProjectsLocationsEndpointPoliciesListCall struct {
4313 s *Service
4314 parent string
4315 urlParams_ gensupport.URLParams
4316 ifNoneMatch_ string
4317 ctx_ context.Context
4318 header_ http.Header
4319 }
4320
4321
4322
4323
4324
4325 func (r *ProjectsLocationsEndpointPoliciesService) List(parent string) *ProjectsLocationsEndpointPoliciesListCall {
4326 c := &ProjectsLocationsEndpointPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4327 c.parent = parent
4328 return c
4329 }
4330
4331
4332
4333 func (c *ProjectsLocationsEndpointPoliciesListCall) PageSize(pageSize int64) *ProjectsLocationsEndpointPoliciesListCall {
4334 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4335 return c
4336 }
4337
4338
4339
4340
4341
4342 func (c *ProjectsLocationsEndpointPoliciesListCall) PageToken(pageToken string) *ProjectsLocationsEndpointPoliciesListCall {
4343 c.urlParams_.Set("pageToken", pageToken)
4344 return c
4345 }
4346
4347
4348
4349
4350 func (c *ProjectsLocationsEndpointPoliciesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointPoliciesListCall {
4351 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4352 return c
4353 }
4354
4355
4356
4357
4358 func (c *ProjectsLocationsEndpointPoliciesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEndpointPoliciesListCall {
4359 c.ifNoneMatch_ = entityTag
4360 return c
4361 }
4362
4363
4364 func (c *ProjectsLocationsEndpointPoliciesListCall) Context(ctx context.Context) *ProjectsLocationsEndpointPoliciesListCall {
4365 c.ctx_ = ctx
4366 return c
4367 }
4368
4369
4370
4371 func (c *ProjectsLocationsEndpointPoliciesListCall) Header() http.Header {
4372 if c.header_ == nil {
4373 c.header_ = make(http.Header)
4374 }
4375 return c.header_
4376 }
4377
4378 func (c *ProjectsLocationsEndpointPoliciesListCall) doRequest(alt string) (*http.Response, error) {
4379 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4380 if c.ifNoneMatch_ != "" {
4381 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4382 }
4383 var body io.Reader = nil
4384 c.urlParams_.Set("alt", alt)
4385 c.urlParams_.Set("prettyPrint", "false")
4386 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/endpointPolicies")
4387 urls += "?" + c.urlParams_.Encode()
4388 req, err := http.NewRequest("GET", urls, body)
4389 if err != nil {
4390 return nil, err
4391 }
4392 req.Header = reqHeaders
4393 googleapi.Expand(req.URL, map[string]string{
4394 "parent": c.parent,
4395 })
4396 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4397 }
4398
4399
4400
4401
4402
4403
4404
4405 func (c *ProjectsLocationsEndpointPoliciesListCall) Do(opts ...googleapi.CallOption) (*ListEndpointPoliciesResponse, error) {
4406 gensupport.SetOptions(c.urlParams_, opts...)
4407 res, err := c.doRequest("json")
4408 if res != nil && res.StatusCode == http.StatusNotModified {
4409 if res.Body != nil {
4410 res.Body.Close()
4411 }
4412 return nil, gensupport.WrapError(&googleapi.Error{
4413 Code: res.StatusCode,
4414 Header: res.Header,
4415 })
4416 }
4417 if err != nil {
4418 return nil, err
4419 }
4420 defer googleapi.CloseBody(res)
4421 if err := googleapi.CheckResponse(res); err != nil {
4422 return nil, gensupport.WrapError(err)
4423 }
4424 ret := &ListEndpointPoliciesResponse{
4425 ServerResponse: googleapi.ServerResponse{
4426 Header: res.Header,
4427 HTTPStatusCode: res.StatusCode,
4428 },
4429 }
4430 target := &ret
4431 if err := gensupport.DecodeResponse(target, res); err != nil {
4432 return nil, err
4433 }
4434 return ret, nil
4435 }
4436
4437
4438
4439
4440 func (c *ProjectsLocationsEndpointPoliciesListCall) Pages(ctx context.Context, f func(*ListEndpointPoliciesResponse) error) error {
4441 c.ctx_ = ctx
4442 defer c.PageToken(c.urlParams_.Get("pageToken"))
4443 for {
4444 x, err := c.Do()
4445 if err != nil {
4446 return err
4447 }
4448 if err := f(x); err != nil {
4449 return err
4450 }
4451 if x.NextPageToken == "" {
4452 return nil
4453 }
4454 c.PageToken(x.NextPageToken)
4455 }
4456 }
4457
4458 type ProjectsLocationsEndpointPoliciesPatchCall struct {
4459 s *Service
4460 name string
4461 endpointpolicy *EndpointPolicy
4462 urlParams_ gensupport.URLParams
4463 ctx_ context.Context
4464 header_ http.Header
4465 }
4466
4467
4468
4469
4470
4471 func (r *ProjectsLocationsEndpointPoliciesService) Patch(name string, endpointpolicy *EndpointPolicy) *ProjectsLocationsEndpointPoliciesPatchCall {
4472 c := &ProjectsLocationsEndpointPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4473 c.name = name
4474 c.endpointpolicy = endpointpolicy
4475 return c
4476 }
4477
4478
4479
4480
4481
4482
4483
4484 func (c *ProjectsLocationsEndpointPoliciesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsEndpointPoliciesPatchCall {
4485 c.urlParams_.Set("updateMask", updateMask)
4486 return c
4487 }
4488
4489
4490
4491
4492 func (c *ProjectsLocationsEndpointPoliciesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointPoliciesPatchCall {
4493 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4494 return c
4495 }
4496
4497
4498 func (c *ProjectsLocationsEndpointPoliciesPatchCall) Context(ctx context.Context) *ProjectsLocationsEndpointPoliciesPatchCall {
4499 c.ctx_ = ctx
4500 return c
4501 }
4502
4503
4504
4505 func (c *ProjectsLocationsEndpointPoliciesPatchCall) Header() http.Header {
4506 if c.header_ == nil {
4507 c.header_ = make(http.Header)
4508 }
4509 return c.header_
4510 }
4511
4512 func (c *ProjectsLocationsEndpointPoliciesPatchCall) doRequest(alt string) (*http.Response, error) {
4513 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4514 var body io.Reader = nil
4515 body, err := googleapi.WithoutDataWrapper.JSONReader(c.endpointpolicy)
4516 if err != nil {
4517 return nil, err
4518 }
4519 c.urlParams_.Set("alt", alt)
4520 c.urlParams_.Set("prettyPrint", "false")
4521 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
4522 urls += "?" + c.urlParams_.Encode()
4523 req, err := http.NewRequest("PATCH", urls, body)
4524 if err != nil {
4525 return nil, err
4526 }
4527 req.Header = reqHeaders
4528 googleapi.Expand(req.URL, map[string]string{
4529 "name": c.name,
4530 })
4531 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4532 }
4533
4534
4535
4536
4537
4538
4539 func (c *ProjectsLocationsEndpointPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4540 gensupport.SetOptions(c.urlParams_, opts...)
4541 res, err := c.doRequest("json")
4542 if res != nil && res.StatusCode == http.StatusNotModified {
4543 if res.Body != nil {
4544 res.Body.Close()
4545 }
4546 return nil, gensupport.WrapError(&googleapi.Error{
4547 Code: res.StatusCode,
4548 Header: res.Header,
4549 })
4550 }
4551 if err != nil {
4552 return nil, err
4553 }
4554 defer googleapi.CloseBody(res)
4555 if err := googleapi.CheckResponse(res); err != nil {
4556 return nil, gensupport.WrapError(err)
4557 }
4558 ret := &Operation{
4559 ServerResponse: googleapi.ServerResponse{
4560 Header: res.Header,
4561 HTTPStatusCode: res.StatusCode,
4562 },
4563 }
4564 target := &ret
4565 if err := gensupport.DecodeResponse(target, res); err != nil {
4566 return nil, err
4567 }
4568 return ret, nil
4569 }
4570
4571 type ProjectsLocationsEndpointPoliciesSetIamPolicyCall struct {
4572 s *Service
4573 resource string
4574 setiampolicyrequest *SetIamPolicyRequest
4575 urlParams_ gensupport.URLParams
4576 ctx_ context.Context
4577 header_ http.Header
4578 }
4579
4580
4581
4582
4583
4584
4585
4586
4587 func (r *ProjectsLocationsEndpointPoliciesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsEndpointPoliciesSetIamPolicyCall {
4588 c := &ProjectsLocationsEndpointPoliciesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4589 c.resource = resource
4590 c.setiampolicyrequest = setiampolicyrequest
4591 return c
4592 }
4593
4594
4595
4596
4597 func (c *ProjectsLocationsEndpointPoliciesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointPoliciesSetIamPolicyCall {
4598 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4599 return c
4600 }
4601
4602
4603 func (c *ProjectsLocationsEndpointPoliciesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEndpointPoliciesSetIamPolicyCall {
4604 c.ctx_ = ctx
4605 return c
4606 }
4607
4608
4609
4610 func (c *ProjectsLocationsEndpointPoliciesSetIamPolicyCall) Header() http.Header {
4611 if c.header_ == nil {
4612 c.header_ = make(http.Header)
4613 }
4614 return c.header_
4615 }
4616
4617 func (c *ProjectsLocationsEndpointPoliciesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
4618 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4619 var body io.Reader = nil
4620 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
4621 if err != nil {
4622 return nil, err
4623 }
4624 c.urlParams_.Set("alt", alt)
4625 c.urlParams_.Set("prettyPrint", "false")
4626 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:setIamPolicy")
4627 urls += "?" + c.urlParams_.Encode()
4628 req, err := http.NewRequest("POST", urls, body)
4629 if err != nil {
4630 return nil, err
4631 }
4632 req.Header = reqHeaders
4633 googleapi.Expand(req.URL, map[string]string{
4634 "resource": c.resource,
4635 })
4636 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4637 }
4638
4639
4640
4641
4642
4643
4644 func (c *ProjectsLocationsEndpointPoliciesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
4645 gensupport.SetOptions(c.urlParams_, opts...)
4646 res, err := c.doRequest("json")
4647 if res != nil && res.StatusCode == http.StatusNotModified {
4648 if res.Body != nil {
4649 res.Body.Close()
4650 }
4651 return nil, gensupport.WrapError(&googleapi.Error{
4652 Code: res.StatusCode,
4653 Header: res.Header,
4654 })
4655 }
4656 if err != nil {
4657 return nil, err
4658 }
4659 defer googleapi.CloseBody(res)
4660 if err := googleapi.CheckResponse(res); err != nil {
4661 return nil, gensupport.WrapError(err)
4662 }
4663 ret := &Policy{
4664 ServerResponse: googleapi.ServerResponse{
4665 Header: res.Header,
4666 HTTPStatusCode: res.StatusCode,
4667 },
4668 }
4669 target := &ret
4670 if err := gensupport.DecodeResponse(target, res); err != nil {
4671 return nil, err
4672 }
4673 return ret, nil
4674 }
4675
4676 type ProjectsLocationsEndpointPoliciesTestIamPermissionsCall struct {
4677 s *Service
4678 resource string
4679 testiampermissionsrequest *TestIamPermissionsRequest
4680 urlParams_ gensupport.URLParams
4681 ctx_ context.Context
4682 header_ http.Header
4683 }
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695 func (r *ProjectsLocationsEndpointPoliciesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsEndpointPoliciesTestIamPermissionsCall {
4696 c := &ProjectsLocationsEndpointPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4697 c.resource = resource
4698 c.testiampermissionsrequest = testiampermissionsrequest
4699 return c
4700 }
4701
4702
4703
4704
4705 func (c *ProjectsLocationsEndpointPoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointPoliciesTestIamPermissionsCall {
4706 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4707 return c
4708 }
4709
4710
4711 func (c *ProjectsLocationsEndpointPoliciesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsEndpointPoliciesTestIamPermissionsCall {
4712 c.ctx_ = ctx
4713 return c
4714 }
4715
4716
4717
4718 func (c *ProjectsLocationsEndpointPoliciesTestIamPermissionsCall) Header() http.Header {
4719 if c.header_ == nil {
4720 c.header_ = make(http.Header)
4721 }
4722 return c.header_
4723 }
4724
4725 func (c *ProjectsLocationsEndpointPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
4726 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4727 var body io.Reader = nil
4728 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
4729 if err != nil {
4730 return nil, err
4731 }
4732 c.urlParams_.Set("alt", alt)
4733 c.urlParams_.Set("prettyPrint", "false")
4734 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:testIamPermissions")
4735 urls += "?" + c.urlParams_.Encode()
4736 req, err := http.NewRequest("POST", urls, body)
4737 if err != nil {
4738 return nil, err
4739 }
4740 req.Header = reqHeaders
4741 googleapi.Expand(req.URL, map[string]string{
4742 "resource": c.resource,
4743 })
4744 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4745 }
4746
4747
4748
4749
4750
4751
4752
4753 func (c *ProjectsLocationsEndpointPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
4754 gensupport.SetOptions(c.urlParams_, opts...)
4755 res, err := c.doRequest("json")
4756 if res != nil && res.StatusCode == http.StatusNotModified {
4757 if res.Body != nil {
4758 res.Body.Close()
4759 }
4760 return nil, gensupport.WrapError(&googleapi.Error{
4761 Code: res.StatusCode,
4762 Header: res.Header,
4763 })
4764 }
4765 if err != nil {
4766 return nil, err
4767 }
4768 defer googleapi.CloseBody(res)
4769 if err := googleapi.CheckResponse(res); err != nil {
4770 return nil, gensupport.WrapError(err)
4771 }
4772 ret := &TestIamPermissionsResponse{
4773 ServerResponse: googleapi.ServerResponse{
4774 Header: res.Header,
4775 HTTPStatusCode: res.StatusCode,
4776 },
4777 }
4778 target := &ret
4779 if err := gensupport.DecodeResponse(target, res); err != nil {
4780 return nil, err
4781 }
4782 return ret, nil
4783 }
4784
4785 type ProjectsLocationsGatewaysCreateCall struct {
4786 s *Service
4787 parent string
4788 gateway *Gateway
4789 urlParams_ gensupport.URLParams
4790 ctx_ context.Context
4791 header_ http.Header
4792 }
4793
4794
4795
4796
4797
4798 func (r *ProjectsLocationsGatewaysService) Create(parent string, gateway *Gateway) *ProjectsLocationsGatewaysCreateCall {
4799 c := &ProjectsLocationsGatewaysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4800 c.parent = parent
4801 c.gateway = gateway
4802 return c
4803 }
4804
4805
4806
4807 func (c *ProjectsLocationsGatewaysCreateCall) GatewayId(gatewayId string) *ProjectsLocationsGatewaysCreateCall {
4808 c.urlParams_.Set("gatewayId", gatewayId)
4809 return c
4810 }
4811
4812
4813
4814
4815 func (c *ProjectsLocationsGatewaysCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysCreateCall {
4816 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4817 return c
4818 }
4819
4820
4821 func (c *ProjectsLocationsGatewaysCreateCall) Context(ctx context.Context) *ProjectsLocationsGatewaysCreateCall {
4822 c.ctx_ = ctx
4823 return c
4824 }
4825
4826
4827
4828 func (c *ProjectsLocationsGatewaysCreateCall) Header() http.Header {
4829 if c.header_ == nil {
4830 c.header_ = make(http.Header)
4831 }
4832 return c.header_
4833 }
4834
4835 func (c *ProjectsLocationsGatewaysCreateCall) doRequest(alt string) (*http.Response, error) {
4836 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4837 var body io.Reader = nil
4838 body, err := googleapi.WithoutDataWrapper.JSONReader(c.gateway)
4839 if err != nil {
4840 return nil, err
4841 }
4842 c.urlParams_.Set("alt", alt)
4843 c.urlParams_.Set("prettyPrint", "false")
4844 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/gateways")
4845 urls += "?" + c.urlParams_.Encode()
4846 req, err := http.NewRequest("POST", urls, body)
4847 if err != nil {
4848 return nil, err
4849 }
4850 req.Header = reqHeaders
4851 googleapi.Expand(req.URL, map[string]string{
4852 "parent": c.parent,
4853 })
4854 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4855 }
4856
4857
4858
4859
4860
4861
4862 func (c *ProjectsLocationsGatewaysCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4863 gensupport.SetOptions(c.urlParams_, opts...)
4864 res, err := c.doRequest("json")
4865 if res != nil && res.StatusCode == http.StatusNotModified {
4866 if res.Body != nil {
4867 res.Body.Close()
4868 }
4869 return nil, gensupport.WrapError(&googleapi.Error{
4870 Code: res.StatusCode,
4871 Header: res.Header,
4872 })
4873 }
4874 if err != nil {
4875 return nil, err
4876 }
4877 defer googleapi.CloseBody(res)
4878 if err := googleapi.CheckResponse(res); err != nil {
4879 return nil, gensupport.WrapError(err)
4880 }
4881 ret := &Operation{
4882 ServerResponse: googleapi.ServerResponse{
4883 Header: res.Header,
4884 HTTPStatusCode: res.StatusCode,
4885 },
4886 }
4887 target := &ret
4888 if err := gensupport.DecodeResponse(target, res); err != nil {
4889 return nil, err
4890 }
4891 return ret, nil
4892 }
4893
4894 type ProjectsLocationsGatewaysDeleteCall struct {
4895 s *Service
4896 name string
4897 urlParams_ gensupport.URLParams
4898 ctx_ context.Context
4899 header_ http.Header
4900 }
4901
4902
4903
4904
4905
4906 func (r *ProjectsLocationsGatewaysService) Delete(name string) *ProjectsLocationsGatewaysDeleteCall {
4907 c := &ProjectsLocationsGatewaysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4908 c.name = name
4909 return c
4910 }
4911
4912
4913
4914
4915 func (c *ProjectsLocationsGatewaysDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysDeleteCall {
4916 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4917 return c
4918 }
4919
4920
4921 func (c *ProjectsLocationsGatewaysDeleteCall) Context(ctx context.Context) *ProjectsLocationsGatewaysDeleteCall {
4922 c.ctx_ = ctx
4923 return c
4924 }
4925
4926
4927
4928 func (c *ProjectsLocationsGatewaysDeleteCall) Header() http.Header {
4929 if c.header_ == nil {
4930 c.header_ = make(http.Header)
4931 }
4932 return c.header_
4933 }
4934
4935 func (c *ProjectsLocationsGatewaysDeleteCall) doRequest(alt string) (*http.Response, error) {
4936 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4937 var body io.Reader = nil
4938 c.urlParams_.Set("alt", alt)
4939 c.urlParams_.Set("prettyPrint", "false")
4940 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
4941 urls += "?" + c.urlParams_.Encode()
4942 req, err := http.NewRequest("DELETE", urls, body)
4943 if err != nil {
4944 return nil, err
4945 }
4946 req.Header = reqHeaders
4947 googleapi.Expand(req.URL, map[string]string{
4948 "name": c.name,
4949 })
4950 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4951 }
4952
4953
4954
4955
4956
4957
4958 func (c *ProjectsLocationsGatewaysDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4959 gensupport.SetOptions(c.urlParams_, opts...)
4960 res, err := c.doRequest("json")
4961 if res != nil && res.StatusCode == http.StatusNotModified {
4962 if res.Body != nil {
4963 res.Body.Close()
4964 }
4965 return nil, gensupport.WrapError(&googleapi.Error{
4966 Code: res.StatusCode,
4967 Header: res.Header,
4968 })
4969 }
4970 if err != nil {
4971 return nil, err
4972 }
4973 defer googleapi.CloseBody(res)
4974 if err := googleapi.CheckResponse(res); err != nil {
4975 return nil, gensupport.WrapError(err)
4976 }
4977 ret := &Operation{
4978 ServerResponse: googleapi.ServerResponse{
4979 Header: res.Header,
4980 HTTPStatusCode: res.StatusCode,
4981 },
4982 }
4983 target := &ret
4984 if err := gensupport.DecodeResponse(target, res); err != nil {
4985 return nil, err
4986 }
4987 return ret, nil
4988 }
4989
4990 type ProjectsLocationsGatewaysGetCall struct {
4991 s *Service
4992 name string
4993 urlParams_ gensupport.URLParams
4994 ifNoneMatch_ string
4995 ctx_ context.Context
4996 header_ http.Header
4997 }
4998
4999
5000
5001
5002
5003 func (r *ProjectsLocationsGatewaysService) Get(name string) *ProjectsLocationsGatewaysGetCall {
5004 c := &ProjectsLocationsGatewaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5005 c.name = name
5006 return c
5007 }
5008
5009
5010
5011
5012 func (c *ProjectsLocationsGatewaysGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysGetCall {
5013 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5014 return c
5015 }
5016
5017
5018
5019
5020 func (c *ProjectsLocationsGatewaysGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGatewaysGetCall {
5021 c.ifNoneMatch_ = entityTag
5022 return c
5023 }
5024
5025
5026 func (c *ProjectsLocationsGatewaysGetCall) Context(ctx context.Context) *ProjectsLocationsGatewaysGetCall {
5027 c.ctx_ = ctx
5028 return c
5029 }
5030
5031
5032
5033 func (c *ProjectsLocationsGatewaysGetCall) Header() http.Header {
5034 if c.header_ == nil {
5035 c.header_ = make(http.Header)
5036 }
5037 return c.header_
5038 }
5039
5040 func (c *ProjectsLocationsGatewaysGetCall) doRequest(alt string) (*http.Response, error) {
5041 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5042 if c.ifNoneMatch_ != "" {
5043 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5044 }
5045 var body io.Reader = nil
5046 c.urlParams_.Set("alt", alt)
5047 c.urlParams_.Set("prettyPrint", "false")
5048 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
5049 urls += "?" + c.urlParams_.Encode()
5050 req, err := http.NewRequest("GET", urls, body)
5051 if err != nil {
5052 return nil, err
5053 }
5054 req.Header = reqHeaders
5055 googleapi.Expand(req.URL, map[string]string{
5056 "name": c.name,
5057 })
5058 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5059 }
5060
5061
5062
5063
5064
5065
5066 func (c *ProjectsLocationsGatewaysGetCall) Do(opts ...googleapi.CallOption) (*Gateway, error) {
5067 gensupport.SetOptions(c.urlParams_, opts...)
5068 res, err := c.doRequest("json")
5069 if res != nil && res.StatusCode == http.StatusNotModified {
5070 if res.Body != nil {
5071 res.Body.Close()
5072 }
5073 return nil, gensupport.WrapError(&googleapi.Error{
5074 Code: res.StatusCode,
5075 Header: res.Header,
5076 })
5077 }
5078 if err != nil {
5079 return nil, err
5080 }
5081 defer googleapi.CloseBody(res)
5082 if err := googleapi.CheckResponse(res); err != nil {
5083 return nil, gensupport.WrapError(err)
5084 }
5085 ret := &Gateway{
5086 ServerResponse: googleapi.ServerResponse{
5087 Header: res.Header,
5088 HTTPStatusCode: res.StatusCode,
5089 },
5090 }
5091 target := &ret
5092 if err := gensupport.DecodeResponse(target, res); err != nil {
5093 return nil, err
5094 }
5095 return ret, nil
5096 }
5097
5098 type ProjectsLocationsGatewaysGetIamPolicyCall struct {
5099 s *Service
5100 resource string
5101 urlParams_ gensupport.URLParams
5102 ifNoneMatch_ string
5103 ctx_ context.Context
5104 header_ http.Header
5105 }
5106
5107
5108
5109
5110
5111
5112
5113 func (r *ProjectsLocationsGatewaysService) GetIamPolicy(resource string) *ProjectsLocationsGatewaysGetIamPolicyCall {
5114 c := &ProjectsLocationsGatewaysGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5115 c.resource = resource
5116 return c
5117 }
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131 func (c *ProjectsLocationsGatewaysGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsGatewaysGetIamPolicyCall {
5132 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
5133 return c
5134 }
5135
5136
5137
5138
5139 func (c *ProjectsLocationsGatewaysGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysGetIamPolicyCall {
5140 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5141 return c
5142 }
5143
5144
5145
5146
5147 func (c *ProjectsLocationsGatewaysGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsGatewaysGetIamPolicyCall {
5148 c.ifNoneMatch_ = entityTag
5149 return c
5150 }
5151
5152
5153 func (c *ProjectsLocationsGatewaysGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGatewaysGetIamPolicyCall {
5154 c.ctx_ = ctx
5155 return c
5156 }
5157
5158
5159
5160 func (c *ProjectsLocationsGatewaysGetIamPolicyCall) Header() http.Header {
5161 if c.header_ == nil {
5162 c.header_ = make(http.Header)
5163 }
5164 return c.header_
5165 }
5166
5167 func (c *ProjectsLocationsGatewaysGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
5168 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5169 if c.ifNoneMatch_ != "" {
5170 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5171 }
5172 var body io.Reader = nil
5173 c.urlParams_.Set("alt", alt)
5174 c.urlParams_.Set("prettyPrint", "false")
5175 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:getIamPolicy")
5176 urls += "?" + c.urlParams_.Encode()
5177 req, err := http.NewRequest("GET", urls, body)
5178 if err != nil {
5179 return nil, err
5180 }
5181 req.Header = reqHeaders
5182 googleapi.Expand(req.URL, map[string]string{
5183 "resource": c.resource,
5184 })
5185 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5186 }
5187
5188
5189
5190
5191
5192
5193 func (c *ProjectsLocationsGatewaysGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
5194 gensupport.SetOptions(c.urlParams_, opts...)
5195 res, err := c.doRequest("json")
5196 if res != nil && res.StatusCode == http.StatusNotModified {
5197 if res.Body != nil {
5198 res.Body.Close()
5199 }
5200 return nil, gensupport.WrapError(&googleapi.Error{
5201 Code: res.StatusCode,
5202 Header: res.Header,
5203 })
5204 }
5205 if err != nil {
5206 return nil, err
5207 }
5208 defer googleapi.CloseBody(res)
5209 if err := googleapi.CheckResponse(res); err != nil {
5210 return nil, gensupport.WrapError(err)
5211 }
5212 ret := &Policy{
5213 ServerResponse: googleapi.ServerResponse{
5214 Header: res.Header,
5215 HTTPStatusCode: res.StatusCode,
5216 },
5217 }
5218 target := &ret
5219 if err := gensupport.DecodeResponse(target, res); err != nil {
5220 return nil, err
5221 }
5222 return ret, nil
5223 }
5224
5225 type ProjectsLocationsGatewaysListCall struct {
5226 s *Service
5227 parent string
5228 urlParams_ gensupport.URLParams
5229 ifNoneMatch_ string
5230 ctx_ context.Context
5231 header_ http.Header
5232 }
5233
5234
5235
5236
5237
5238 func (r *ProjectsLocationsGatewaysService) List(parent string) *ProjectsLocationsGatewaysListCall {
5239 c := &ProjectsLocationsGatewaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5240 c.parent = parent
5241 return c
5242 }
5243
5244
5245
5246 func (c *ProjectsLocationsGatewaysListCall) PageSize(pageSize int64) *ProjectsLocationsGatewaysListCall {
5247 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5248 return c
5249 }
5250
5251
5252
5253
5254
5255 func (c *ProjectsLocationsGatewaysListCall) PageToken(pageToken string) *ProjectsLocationsGatewaysListCall {
5256 c.urlParams_.Set("pageToken", pageToken)
5257 return c
5258 }
5259
5260
5261
5262
5263 func (c *ProjectsLocationsGatewaysListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysListCall {
5264 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5265 return c
5266 }
5267
5268
5269
5270
5271 func (c *ProjectsLocationsGatewaysListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGatewaysListCall {
5272 c.ifNoneMatch_ = entityTag
5273 return c
5274 }
5275
5276
5277 func (c *ProjectsLocationsGatewaysListCall) Context(ctx context.Context) *ProjectsLocationsGatewaysListCall {
5278 c.ctx_ = ctx
5279 return c
5280 }
5281
5282
5283
5284 func (c *ProjectsLocationsGatewaysListCall) Header() http.Header {
5285 if c.header_ == nil {
5286 c.header_ = make(http.Header)
5287 }
5288 return c.header_
5289 }
5290
5291 func (c *ProjectsLocationsGatewaysListCall) doRequest(alt string) (*http.Response, error) {
5292 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5293 if c.ifNoneMatch_ != "" {
5294 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5295 }
5296 var body io.Reader = nil
5297 c.urlParams_.Set("alt", alt)
5298 c.urlParams_.Set("prettyPrint", "false")
5299 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/gateways")
5300 urls += "?" + c.urlParams_.Encode()
5301 req, err := http.NewRequest("GET", urls, body)
5302 if err != nil {
5303 return nil, err
5304 }
5305 req.Header = reqHeaders
5306 googleapi.Expand(req.URL, map[string]string{
5307 "parent": c.parent,
5308 })
5309 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5310 }
5311
5312
5313
5314
5315
5316
5317
5318 func (c *ProjectsLocationsGatewaysListCall) Do(opts ...googleapi.CallOption) (*ListGatewaysResponse, error) {
5319 gensupport.SetOptions(c.urlParams_, opts...)
5320 res, err := c.doRequest("json")
5321 if res != nil && res.StatusCode == http.StatusNotModified {
5322 if res.Body != nil {
5323 res.Body.Close()
5324 }
5325 return nil, gensupport.WrapError(&googleapi.Error{
5326 Code: res.StatusCode,
5327 Header: res.Header,
5328 })
5329 }
5330 if err != nil {
5331 return nil, err
5332 }
5333 defer googleapi.CloseBody(res)
5334 if err := googleapi.CheckResponse(res); err != nil {
5335 return nil, gensupport.WrapError(err)
5336 }
5337 ret := &ListGatewaysResponse{
5338 ServerResponse: googleapi.ServerResponse{
5339 Header: res.Header,
5340 HTTPStatusCode: res.StatusCode,
5341 },
5342 }
5343 target := &ret
5344 if err := gensupport.DecodeResponse(target, res); err != nil {
5345 return nil, err
5346 }
5347 return ret, nil
5348 }
5349
5350
5351
5352
5353 func (c *ProjectsLocationsGatewaysListCall) Pages(ctx context.Context, f func(*ListGatewaysResponse) error) error {
5354 c.ctx_ = ctx
5355 defer c.PageToken(c.urlParams_.Get("pageToken"))
5356 for {
5357 x, err := c.Do()
5358 if err != nil {
5359 return err
5360 }
5361 if err := f(x); err != nil {
5362 return err
5363 }
5364 if x.NextPageToken == "" {
5365 return nil
5366 }
5367 c.PageToken(x.NextPageToken)
5368 }
5369 }
5370
5371 type ProjectsLocationsGatewaysPatchCall struct {
5372 s *Service
5373 name string
5374 gateway *Gateway
5375 urlParams_ gensupport.URLParams
5376 ctx_ context.Context
5377 header_ http.Header
5378 }
5379
5380
5381
5382
5383
5384 func (r *ProjectsLocationsGatewaysService) Patch(name string, gateway *Gateway) *ProjectsLocationsGatewaysPatchCall {
5385 c := &ProjectsLocationsGatewaysPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5386 c.name = name
5387 c.gateway = gateway
5388 return c
5389 }
5390
5391
5392
5393
5394
5395
5396 func (c *ProjectsLocationsGatewaysPatchCall) UpdateMask(updateMask string) *ProjectsLocationsGatewaysPatchCall {
5397 c.urlParams_.Set("updateMask", updateMask)
5398 return c
5399 }
5400
5401
5402
5403
5404 func (c *ProjectsLocationsGatewaysPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysPatchCall {
5405 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5406 return c
5407 }
5408
5409
5410 func (c *ProjectsLocationsGatewaysPatchCall) Context(ctx context.Context) *ProjectsLocationsGatewaysPatchCall {
5411 c.ctx_ = ctx
5412 return c
5413 }
5414
5415
5416
5417 func (c *ProjectsLocationsGatewaysPatchCall) Header() http.Header {
5418 if c.header_ == nil {
5419 c.header_ = make(http.Header)
5420 }
5421 return c.header_
5422 }
5423
5424 func (c *ProjectsLocationsGatewaysPatchCall) doRequest(alt string) (*http.Response, error) {
5425 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5426 var body io.Reader = nil
5427 body, err := googleapi.WithoutDataWrapper.JSONReader(c.gateway)
5428 if err != nil {
5429 return nil, err
5430 }
5431 c.urlParams_.Set("alt", alt)
5432 c.urlParams_.Set("prettyPrint", "false")
5433 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
5434 urls += "?" + c.urlParams_.Encode()
5435 req, err := http.NewRequest("PATCH", urls, body)
5436 if err != nil {
5437 return nil, err
5438 }
5439 req.Header = reqHeaders
5440 googleapi.Expand(req.URL, map[string]string{
5441 "name": c.name,
5442 })
5443 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5444 }
5445
5446
5447
5448
5449
5450
5451 func (c *ProjectsLocationsGatewaysPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5452 gensupport.SetOptions(c.urlParams_, opts...)
5453 res, err := c.doRequest("json")
5454 if res != nil && res.StatusCode == http.StatusNotModified {
5455 if res.Body != nil {
5456 res.Body.Close()
5457 }
5458 return nil, gensupport.WrapError(&googleapi.Error{
5459 Code: res.StatusCode,
5460 Header: res.Header,
5461 })
5462 }
5463 if err != nil {
5464 return nil, err
5465 }
5466 defer googleapi.CloseBody(res)
5467 if err := googleapi.CheckResponse(res); err != nil {
5468 return nil, gensupport.WrapError(err)
5469 }
5470 ret := &Operation{
5471 ServerResponse: googleapi.ServerResponse{
5472 Header: res.Header,
5473 HTTPStatusCode: res.StatusCode,
5474 },
5475 }
5476 target := &ret
5477 if err := gensupport.DecodeResponse(target, res); err != nil {
5478 return nil, err
5479 }
5480 return ret, nil
5481 }
5482
5483 type ProjectsLocationsGatewaysSetIamPolicyCall struct {
5484 s *Service
5485 resource string
5486 setiampolicyrequest *SetIamPolicyRequest
5487 urlParams_ gensupport.URLParams
5488 ctx_ context.Context
5489 header_ http.Header
5490 }
5491
5492
5493
5494
5495
5496
5497
5498
5499 func (r *ProjectsLocationsGatewaysService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsGatewaysSetIamPolicyCall {
5500 c := &ProjectsLocationsGatewaysSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5501 c.resource = resource
5502 c.setiampolicyrequest = setiampolicyrequest
5503 return c
5504 }
5505
5506
5507
5508
5509 func (c *ProjectsLocationsGatewaysSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysSetIamPolicyCall {
5510 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5511 return c
5512 }
5513
5514
5515 func (c *ProjectsLocationsGatewaysSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGatewaysSetIamPolicyCall {
5516 c.ctx_ = ctx
5517 return c
5518 }
5519
5520
5521
5522 func (c *ProjectsLocationsGatewaysSetIamPolicyCall) Header() http.Header {
5523 if c.header_ == nil {
5524 c.header_ = make(http.Header)
5525 }
5526 return c.header_
5527 }
5528
5529 func (c *ProjectsLocationsGatewaysSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
5530 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5531 var body io.Reader = nil
5532 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
5533 if err != nil {
5534 return nil, err
5535 }
5536 c.urlParams_.Set("alt", alt)
5537 c.urlParams_.Set("prettyPrint", "false")
5538 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:setIamPolicy")
5539 urls += "?" + c.urlParams_.Encode()
5540 req, err := http.NewRequest("POST", urls, body)
5541 if err != nil {
5542 return nil, err
5543 }
5544 req.Header = reqHeaders
5545 googleapi.Expand(req.URL, map[string]string{
5546 "resource": c.resource,
5547 })
5548 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5549 }
5550
5551
5552
5553
5554
5555
5556 func (c *ProjectsLocationsGatewaysSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
5557 gensupport.SetOptions(c.urlParams_, opts...)
5558 res, err := c.doRequest("json")
5559 if res != nil && res.StatusCode == http.StatusNotModified {
5560 if res.Body != nil {
5561 res.Body.Close()
5562 }
5563 return nil, gensupport.WrapError(&googleapi.Error{
5564 Code: res.StatusCode,
5565 Header: res.Header,
5566 })
5567 }
5568 if err != nil {
5569 return nil, err
5570 }
5571 defer googleapi.CloseBody(res)
5572 if err := googleapi.CheckResponse(res); err != nil {
5573 return nil, gensupport.WrapError(err)
5574 }
5575 ret := &Policy{
5576 ServerResponse: googleapi.ServerResponse{
5577 Header: res.Header,
5578 HTTPStatusCode: res.StatusCode,
5579 },
5580 }
5581 target := &ret
5582 if err := gensupport.DecodeResponse(target, res); err != nil {
5583 return nil, err
5584 }
5585 return ret, nil
5586 }
5587
5588 type ProjectsLocationsGatewaysTestIamPermissionsCall struct {
5589 s *Service
5590 resource string
5591 testiampermissionsrequest *TestIamPermissionsRequest
5592 urlParams_ gensupport.URLParams
5593 ctx_ context.Context
5594 header_ http.Header
5595 }
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607 func (r *ProjectsLocationsGatewaysService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsGatewaysTestIamPermissionsCall {
5608 c := &ProjectsLocationsGatewaysTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5609 c.resource = resource
5610 c.testiampermissionsrequest = testiampermissionsrequest
5611 return c
5612 }
5613
5614
5615
5616
5617 func (c *ProjectsLocationsGatewaysTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysTestIamPermissionsCall {
5618 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5619 return c
5620 }
5621
5622
5623 func (c *ProjectsLocationsGatewaysTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsGatewaysTestIamPermissionsCall {
5624 c.ctx_ = ctx
5625 return c
5626 }
5627
5628
5629
5630 func (c *ProjectsLocationsGatewaysTestIamPermissionsCall) Header() http.Header {
5631 if c.header_ == nil {
5632 c.header_ = make(http.Header)
5633 }
5634 return c.header_
5635 }
5636
5637 func (c *ProjectsLocationsGatewaysTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
5638 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5639 var body io.Reader = nil
5640 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
5641 if err != nil {
5642 return nil, err
5643 }
5644 c.urlParams_.Set("alt", alt)
5645 c.urlParams_.Set("prettyPrint", "false")
5646 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:testIamPermissions")
5647 urls += "?" + c.urlParams_.Encode()
5648 req, err := http.NewRequest("POST", urls, body)
5649 if err != nil {
5650 return nil, err
5651 }
5652 req.Header = reqHeaders
5653 googleapi.Expand(req.URL, map[string]string{
5654 "resource": c.resource,
5655 })
5656 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5657 }
5658
5659
5660
5661
5662
5663
5664
5665 func (c *ProjectsLocationsGatewaysTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
5666 gensupport.SetOptions(c.urlParams_, opts...)
5667 res, err := c.doRequest("json")
5668 if res != nil && res.StatusCode == http.StatusNotModified {
5669 if res.Body != nil {
5670 res.Body.Close()
5671 }
5672 return nil, gensupport.WrapError(&googleapi.Error{
5673 Code: res.StatusCode,
5674 Header: res.Header,
5675 })
5676 }
5677 if err != nil {
5678 return nil, err
5679 }
5680 defer googleapi.CloseBody(res)
5681 if err := googleapi.CheckResponse(res); err != nil {
5682 return nil, gensupport.WrapError(err)
5683 }
5684 ret := &TestIamPermissionsResponse{
5685 ServerResponse: googleapi.ServerResponse{
5686 Header: res.Header,
5687 HTTPStatusCode: res.StatusCode,
5688 },
5689 }
5690 target := &ret
5691 if err := gensupport.DecodeResponse(target, res); err != nil {
5692 return nil, err
5693 }
5694 return ret, nil
5695 }
5696
5697 type ProjectsLocationsGrpcRoutesCreateCall struct {
5698 s *Service
5699 parent string
5700 grpcroute *GrpcRoute
5701 urlParams_ gensupport.URLParams
5702 ctx_ context.Context
5703 header_ http.Header
5704 }
5705
5706
5707
5708
5709
5710 func (r *ProjectsLocationsGrpcRoutesService) Create(parent string, grpcroute *GrpcRoute) *ProjectsLocationsGrpcRoutesCreateCall {
5711 c := &ProjectsLocationsGrpcRoutesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5712 c.parent = parent
5713 c.grpcroute = grpcroute
5714 return c
5715 }
5716
5717
5718
5719 func (c *ProjectsLocationsGrpcRoutesCreateCall) GrpcRouteId(grpcRouteId string) *ProjectsLocationsGrpcRoutesCreateCall {
5720 c.urlParams_.Set("grpcRouteId", grpcRouteId)
5721 return c
5722 }
5723
5724
5725
5726
5727 func (c *ProjectsLocationsGrpcRoutesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGrpcRoutesCreateCall {
5728 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5729 return c
5730 }
5731
5732
5733 func (c *ProjectsLocationsGrpcRoutesCreateCall) Context(ctx context.Context) *ProjectsLocationsGrpcRoutesCreateCall {
5734 c.ctx_ = ctx
5735 return c
5736 }
5737
5738
5739
5740 func (c *ProjectsLocationsGrpcRoutesCreateCall) Header() http.Header {
5741 if c.header_ == nil {
5742 c.header_ = make(http.Header)
5743 }
5744 return c.header_
5745 }
5746
5747 func (c *ProjectsLocationsGrpcRoutesCreateCall) doRequest(alt string) (*http.Response, error) {
5748 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5749 var body io.Reader = nil
5750 body, err := googleapi.WithoutDataWrapper.JSONReader(c.grpcroute)
5751 if err != nil {
5752 return nil, err
5753 }
5754 c.urlParams_.Set("alt", alt)
5755 c.urlParams_.Set("prettyPrint", "false")
5756 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/grpcRoutes")
5757 urls += "?" + c.urlParams_.Encode()
5758 req, err := http.NewRequest("POST", urls, body)
5759 if err != nil {
5760 return nil, err
5761 }
5762 req.Header = reqHeaders
5763 googleapi.Expand(req.URL, map[string]string{
5764 "parent": c.parent,
5765 })
5766 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5767 }
5768
5769
5770
5771
5772
5773
5774 func (c *ProjectsLocationsGrpcRoutesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5775 gensupport.SetOptions(c.urlParams_, opts...)
5776 res, err := c.doRequest("json")
5777 if res != nil && res.StatusCode == http.StatusNotModified {
5778 if res.Body != nil {
5779 res.Body.Close()
5780 }
5781 return nil, gensupport.WrapError(&googleapi.Error{
5782 Code: res.StatusCode,
5783 Header: res.Header,
5784 })
5785 }
5786 if err != nil {
5787 return nil, err
5788 }
5789 defer googleapi.CloseBody(res)
5790 if err := googleapi.CheckResponse(res); err != nil {
5791 return nil, gensupport.WrapError(err)
5792 }
5793 ret := &Operation{
5794 ServerResponse: googleapi.ServerResponse{
5795 Header: res.Header,
5796 HTTPStatusCode: res.StatusCode,
5797 },
5798 }
5799 target := &ret
5800 if err := gensupport.DecodeResponse(target, res); err != nil {
5801 return nil, err
5802 }
5803 return ret, nil
5804 }
5805
5806 type ProjectsLocationsGrpcRoutesDeleteCall struct {
5807 s *Service
5808 name string
5809 urlParams_ gensupport.URLParams
5810 ctx_ context.Context
5811 header_ http.Header
5812 }
5813
5814
5815
5816
5817
5818 func (r *ProjectsLocationsGrpcRoutesService) Delete(name string) *ProjectsLocationsGrpcRoutesDeleteCall {
5819 c := &ProjectsLocationsGrpcRoutesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5820 c.name = name
5821 return c
5822 }
5823
5824
5825
5826
5827 func (c *ProjectsLocationsGrpcRoutesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGrpcRoutesDeleteCall {
5828 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5829 return c
5830 }
5831
5832
5833 func (c *ProjectsLocationsGrpcRoutesDeleteCall) Context(ctx context.Context) *ProjectsLocationsGrpcRoutesDeleteCall {
5834 c.ctx_ = ctx
5835 return c
5836 }
5837
5838
5839
5840 func (c *ProjectsLocationsGrpcRoutesDeleteCall) Header() http.Header {
5841 if c.header_ == nil {
5842 c.header_ = make(http.Header)
5843 }
5844 return c.header_
5845 }
5846
5847 func (c *ProjectsLocationsGrpcRoutesDeleteCall) doRequest(alt string) (*http.Response, error) {
5848 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5849 var body io.Reader = nil
5850 c.urlParams_.Set("alt", alt)
5851 c.urlParams_.Set("prettyPrint", "false")
5852 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
5853 urls += "?" + c.urlParams_.Encode()
5854 req, err := http.NewRequest("DELETE", urls, body)
5855 if err != nil {
5856 return nil, err
5857 }
5858 req.Header = reqHeaders
5859 googleapi.Expand(req.URL, map[string]string{
5860 "name": c.name,
5861 })
5862 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5863 }
5864
5865
5866
5867
5868
5869
5870 func (c *ProjectsLocationsGrpcRoutesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5871 gensupport.SetOptions(c.urlParams_, opts...)
5872 res, err := c.doRequest("json")
5873 if res != nil && res.StatusCode == http.StatusNotModified {
5874 if res.Body != nil {
5875 res.Body.Close()
5876 }
5877 return nil, gensupport.WrapError(&googleapi.Error{
5878 Code: res.StatusCode,
5879 Header: res.Header,
5880 })
5881 }
5882 if err != nil {
5883 return nil, err
5884 }
5885 defer googleapi.CloseBody(res)
5886 if err := googleapi.CheckResponse(res); err != nil {
5887 return nil, gensupport.WrapError(err)
5888 }
5889 ret := &Operation{
5890 ServerResponse: googleapi.ServerResponse{
5891 Header: res.Header,
5892 HTTPStatusCode: res.StatusCode,
5893 },
5894 }
5895 target := &ret
5896 if err := gensupport.DecodeResponse(target, res); err != nil {
5897 return nil, err
5898 }
5899 return ret, nil
5900 }
5901
5902 type ProjectsLocationsGrpcRoutesGetCall struct {
5903 s *Service
5904 name string
5905 urlParams_ gensupport.URLParams
5906 ifNoneMatch_ string
5907 ctx_ context.Context
5908 header_ http.Header
5909 }
5910
5911
5912
5913
5914
5915 func (r *ProjectsLocationsGrpcRoutesService) Get(name string) *ProjectsLocationsGrpcRoutesGetCall {
5916 c := &ProjectsLocationsGrpcRoutesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5917 c.name = name
5918 return c
5919 }
5920
5921
5922
5923
5924 func (c *ProjectsLocationsGrpcRoutesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGrpcRoutesGetCall {
5925 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5926 return c
5927 }
5928
5929
5930
5931
5932 func (c *ProjectsLocationsGrpcRoutesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGrpcRoutesGetCall {
5933 c.ifNoneMatch_ = entityTag
5934 return c
5935 }
5936
5937
5938 func (c *ProjectsLocationsGrpcRoutesGetCall) Context(ctx context.Context) *ProjectsLocationsGrpcRoutesGetCall {
5939 c.ctx_ = ctx
5940 return c
5941 }
5942
5943
5944
5945 func (c *ProjectsLocationsGrpcRoutesGetCall) Header() http.Header {
5946 if c.header_ == nil {
5947 c.header_ = make(http.Header)
5948 }
5949 return c.header_
5950 }
5951
5952 func (c *ProjectsLocationsGrpcRoutesGetCall) doRequest(alt string) (*http.Response, error) {
5953 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5954 if c.ifNoneMatch_ != "" {
5955 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5956 }
5957 var body io.Reader = nil
5958 c.urlParams_.Set("alt", alt)
5959 c.urlParams_.Set("prettyPrint", "false")
5960 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
5961 urls += "?" + c.urlParams_.Encode()
5962 req, err := http.NewRequest("GET", urls, body)
5963 if err != nil {
5964 return nil, err
5965 }
5966 req.Header = reqHeaders
5967 googleapi.Expand(req.URL, map[string]string{
5968 "name": c.name,
5969 })
5970 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5971 }
5972
5973
5974
5975
5976
5977
5978 func (c *ProjectsLocationsGrpcRoutesGetCall) Do(opts ...googleapi.CallOption) (*GrpcRoute, error) {
5979 gensupport.SetOptions(c.urlParams_, opts...)
5980 res, err := c.doRequest("json")
5981 if res != nil && res.StatusCode == http.StatusNotModified {
5982 if res.Body != nil {
5983 res.Body.Close()
5984 }
5985 return nil, gensupport.WrapError(&googleapi.Error{
5986 Code: res.StatusCode,
5987 Header: res.Header,
5988 })
5989 }
5990 if err != nil {
5991 return nil, err
5992 }
5993 defer googleapi.CloseBody(res)
5994 if err := googleapi.CheckResponse(res); err != nil {
5995 return nil, gensupport.WrapError(err)
5996 }
5997 ret := &GrpcRoute{
5998 ServerResponse: googleapi.ServerResponse{
5999 Header: res.Header,
6000 HTTPStatusCode: res.StatusCode,
6001 },
6002 }
6003 target := &ret
6004 if err := gensupport.DecodeResponse(target, res); err != nil {
6005 return nil, err
6006 }
6007 return ret, nil
6008 }
6009
6010 type ProjectsLocationsGrpcRoutesListCall struct {
6011 s *Service
6012 parent string
6013 urlParams_ gensupport.URLParams
6014 ifNoneMatch_ string
6015 ctx_ context.Context
6016 header_ http.Header
6017 }
6018
6019
6020
6021
6022
6023 func (r *ProjectsLocationsGrpcRoutesService) List(parent string) *ProjectsLocationsGrpcRoutesListCall {
6024 c := &ProjectsLocationsGrpcRoutesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6025 c.parent = parent
6026 return c
6027 }
6028
6029
6030
6031 func (c *ProjectsLocationsGrpcRoutesListCall) PageSize(pageSize int64) *ProjectsLocationsGrpcRoutesListCall {
6032 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
6033 return c
6034 }
6035
6036
6037
6038
6039
6040 func (c *ProjectsLocationsGrpcRoutesListCall) PageToken(pageToken string) *ProjectsLocationsGrpcRoutesListCall {
6041 c.urlParams_.Set("pageToken", pageToken)
6042 return c
6043 }
6044
6045
6046
6047
6048 func (c *ProjectsLocationsGrpcRoutesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGrpcRoutesListCall {
6049 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6050 return c
6051 }
6052
6053
6054
6055
6056 func (c *ProjectsLocationsGrpcRoutesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGrpcRoutesListCall {
6057 c.ifNoneMatch_ = entityTag
6058 return c
6059 }
6060
6061
6062 func (c *ProjectsLocationsGrpcRoutesListCall) Context(ctx context.Context) *ProjectsLocationsGrpcRoutesListCall {
6063 c.ctx_ = ctx
6064 return c
6065 }
6066
6067
6068
6069 func (c *ProjectsLocationsGrpcRoutesListCall) Header() http.Header {
6070 if c.header_ == nil {
6071 c.header_ = make(http.Header)
6072 }
6073 return c.header_
6074 }
6075
6076 func (c *ProjectsLocationsGrpcRoutesListCall) doRequest(alt string) (*http.Response, error) {
6077 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6078 if c.ifNoneMatch_ != "" {
6079 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6080 }
6081 var body io.Reader = nil
6082 c.urlParams_.Set("alt", alt)
6083 c.urlParams_.Set("prettyPrint", "false")
6084 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/grpcRoutes")
6085 urls += "?" + c.urlParams_.Encode()
6086 req, err := http.NewRequest("GET", urls, body)
6087 if err != nil {
6088 return nil, err
6089 }
6090 req.Header = reqHeaders
6091 googleapi.Expand(req.URL, map[string]string{
6092 "parent": c.parent,
6093 })
6094 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6095 }
6096
6097
6098
6099
6100
6101
6102
6103 func (c *ProjectsLocationsGrpcRoutesListCall) Do(opts ...googleapi.CallOption) (*ListGrpcRoutesResponse, error) {
6104 gensupport.SetOptions(c.urlParams_, opts...)
6105 res, err := c.doRequest("json")
6106 if res != nil && res.StatusCode == http.StatusNotModified {
6107 if res.Body != nil {
6108 res.Body.Close()
6109 }
6110 return nil, gensupport.WrapError(&googleapi.Error{
6111 Code: res.StatusCode,
6112 Header: res.Header,
6113 })
6114 }
6115 if err != nil {
6116 return nil, err
6117 }
6118 defer googleapi.CloseBody(res)
6119 if err := googleapi.CheckResponse(res); err != nil {
6120 return nil, gensupport.WrapError(err)
6121 }
6122 ret := &ListGrpcRoutesResponse{
6123 ServerResponse: googleapi.ServerResponse{
6124 Header: res.Header,
6125 HTTPStatusCode: res.StatusCode,
6126 },
6127 }
6128 target := &ret
6129 if err := gensupport.DecodeResponse(target, res); err != nil {
6130 return nil, err
6131 }
6132 return ret, nil
6133 }
6134
6135
6136
6137
6138 func (c *ProjectsLocationsGrpcRoutesListCall) Pages(ctx context.Context, f func(*ListGrpcRoutesResponse) error) error {
6139 c.ctx_ = ctx
6140 defer c.PageToken(c.urlParams_.Get("pageToken"))
6141 for {
6142 x, err := c.Do()
6143 if err != nil {
6144 return err
6145 }
6146 if err := f(x); err != nil {
6147 return err
6148 }
6149 if x.NextPageToken == "" {
6150 return nil
6151 }
6152 c.PageToken(x.NextPageToken)
6153 }
6154 }
6155
6156 type ProjectsLocationsGrpcRoutesPatchCall struct {
6157 s *Service
6158 name string
6159 grpcroute *GrpcRoute
6160 urlParams_ gensupport.URLParams
6161 ctx_ context.Context
6162 header_ http.Header
6163 }
6164
6165
6166
6167
6168
6169 func (r *ProjectsLocationsGrpcRoutesService) Patch(name string, grpcroute *GrpcRoute) *ProjectsLocationsGrpcRoutesPatchCall {
6170 c := &ProjectsLocationsGrpcRoutesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6171 c.name = name
6172 c.grpcroute = grpcroute
6173 return c
6174 }
6175
6176
6177
6178
6179
6180
6181
6182 func (c *ProjectsLocationsGrpcRoutesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsGrpcRoutesPatchCall {
6183 c.urlParams_.Set("updateMask", updateMask)
6184 return c
6185 }
6186
6187
6188
6189
6190 func (c *ProjectsLocationsGrpcRoutesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGrpcRoutesPatchCall {
6191 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6192 return c
6193 }
6194
6195
6196 func (c *ProjectsLocationsGrpcRoutesPatchCall) Context(ctx context.Context) *ProjectsLocationsGrpcRoutesPatchCall {
6197 c.ctx_ = ctx
6198 return c
6199 }
6200
6201
6202
6203 func (c *ProjectsLocationsGrpcRoutesPatchCall) Header() http.Header {
6204 if c.header_ == nil {
6205 c.header_ = make(http.Header)
6206 }
6207 return c.header_
6208 }
6209
6210 func (c *ProjectsLocationsGrpcRoutesPatchCall) doRequest(alt string) (*http.Response, error) {
6211 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6212 var body io.Reader = nil
6213 body, err := googleapi.WithoutDataWrapper.JSONReader(c.grpcroute)
6214 if err != nil {
6215 return nil, err
6216 }
6217 c.urlParams_.Set("alt", alt)
6218 c.urlParams_.Set("prettyPrint", "false")
6219 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
6220 urls += "?" + c.urlParams_.Encode()
6221 req, err := http.NewRequest("PATCH", urls, body)
6222 if err != nil {
6223 return nil, err
6224 }
6225 req.Header = reqHeaders
6226 googleapi.Expand(req.URL, map[string]string{
6227 "name": c.name,
6228 })
6229 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6230 }
6231
6232
6233
6234
6235
6236
6237 func (c *ProjectsLocationsGrpcRoutesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6238 gensupport.SetOptions(c.urlParams_, opts...)
6239 res, err := c.doRequest("json")
6240 if res != nil && res.StatusCode == http.StatusNotModified {
6241 if res.Body != nil {
6242 res.Body.Close()
6243 }
6244 return nil, gensupport.WrapError(&googleapi.Error{
6245 Code: res.StatusCode,
6246 Header: res.Header,
6247 })
6248 }
6249 if err != nil {
6250 return nil, err
6251 }
6252 defer googleapi.CloseBody(res)
6253 if err := googleapi.CheckResponse(res); err != nil {
6254 return nil, gensupport.WrapError(err)
6255 }
6256 ret := &Operation{
6257 ServerResponse: googleapi.ServerResponse{
6258 Header: res.Header,
6259 HTTPStatusCode: res.StatusCode,
6260 },
6261 }
6262 target := &ret
6263 if err := gensupport.DecodeResponse(target, res); err != nil {
6264 return nil, err
6265 }
6266 return ret, nil
6267 }
6268
6269 type ProjectsLocationsHttpRoutesCreateCall struct {
6270 s *Service
6271 parent string
6272 httproute *HttpRoute
6273 urlParams_ gensupport.URLParams
6274 ctx_ context.Context
6275 header_ http.Header
6276 }
6277
6278
6279
6280
6281
6282 func (r *ProjectsLocationsHttpRoutesService) Create(parent string, httproute *HttpRoute) *ProjectsLocationsHttpRoutesCreateCall {
6283 c := &ProjectsLocationsHttpRoutesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6284 c.parent = parent
6285 c.httproute = httproute
6286 return c
6287 }
6288
6289
6290
6291 func (c *ProjectsLocationsHttpRoutesCreateCall) HttpRouteId(httpRouteId string) *ProjectsLocationsHttpRoutesCreateCall {
6292 c.urlParams_.Set("httpRouteId", httpRouteId)
6293 return c
6294 }
6295
6296
6297
6298
6299 func (c *ProjectsLocationsHttpRoutesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsHttpRoutesCreateCall {
6300 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6301 return c
6302 }
6303
6304
6305 func (c *ProjectsLocationsHttpRoutesCreateCall) Context(ctx context.Context) *ProjectsLocationsHttpRoutesCreateCall {
6306 c.ctx_ = ctx
6307 return c
6308 }
6309
6310
6311
6312 func (c *ProjectsLocationsHttpRoutesCreateCall) Header() http.Header {
6313 if c.header_ == nil {
6314 c.header_ = make(http.Header)
6315 }
6316 return c.header_
6317 }
6318
6319 func (c *ProjectsLocationsHttpRoutesCreateCall) doRequest(alt string) (*http.Response, error) {
6320 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6321 var body io.Reader = nil
6322 body, err := googleapi.WithoutDataWrapper.JSONReader(c.httproute)
6323 if err != nil {
6324 return nil, err
6325 }
6326 c.urlParams_.Set("alt", alt)
6327 c.urlParams_.Set("prettyPrint", "false")
6328 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/httpRoutes")
6329 urls += "?" + c.urlParams_.Encode()
6330 req, err := http.NewRequest("POST", urls, body)
6331 if err != nil {
6332 return nil, err
6333 }
6334 req.Header = reqHeaders
6335 googleapi.Expand(req.URL, map[string]string{
6336 "parent": c.parent,
6337 })
6338 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6339 }
6340
6341
6342
6343
6344
6345
6346 func (c *ProjectsLocationsHttpRoutesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6347 gensupport.SetOptions(c.urlParams_, opts...)
6348 res, err := c.doRequest("json")
6349 if res != nil && res.StatusCode == http.StatusNotModified {
6350 if res.Body != nil {
6351 res.Body.Close()
6352 }
6353 return nil, gensupport.WrapError(&googleapi.Error{
6354 Code: res.StatusCode,
6355 Header: res.Header,
6356 })
6357 }
6358 if err != nil {
6359 return nil, err
6360 }
6361 defer googleapi.CloseBody(res)
6362 if err := googleapi.CheckResponse(res); err != nil {
6363 return nil, gensupport.WrapError(err)
6364 }
6365 ret := &Operation{
6366 ServerResponse: googleapi.ServerResponse{
6367 Header: res.Header,
6368 HTTPStatusCode: res.StatusCode,
6369 },
6370 }
6371 target := &ret
6372 if err := gensupport.DecodeResponse(target, res); err != nil {
6373 return nil, err
6374 }
6375 return ret, nil
6376 }
6377
6378 type ProjectsLocationsHttpRoutesDeleteCall struct {
6379 s *Service
6380 name string
6381 urlParams_ gensupport.URLParams
6382 ctx_ context.Context
6383 header_ http.Header
6384 }
6385
6386
6387
6388
6389
6390 func (r *ProjectsLocationsHttpRoutesService) Delete(name string) *ProjectsLocationsHttpRoutesDeleteCall {
6391 c := &ProjectsLocationsHttpRoutesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6392 c.name = name
6393 return c
6394 }
6395
6396
6397
6398
6399 func (c *ProjectsLocationsHttpRoutesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsHttpRoutesDeleteCall {
6400 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6401 return c
6402 }
6403
6404
6405 func (c *ProjectsLocationsHttpRoutesDeleteCall) Context(ctx context.Context) *ProjectsLocationsHttpRoutesDeleteCall {
6406 c.ctx_ = ctx
6407 return c
6408 }
6409
6410
6411
6412 func (c *ProjectsLocationsHttpRoutesDeleteCall) Header() http.Header {
6413 if c.header_ == nil {
6414 c.header_ = make(http.Header)
6415 }
6416 return c.header_
6417 }
6418
6419 func (c *ProjectsLocationsHttpRoutesDeleteCall) doRequest(alt string) (*http.Response, error) {
6420 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6421 var body io.Reader = nil
6422 c.urlParams_.Set("alt", alt)
6423 c.urlParams_.Set("prettyPrint", "false")
6424 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
6425 urls += "?" + c.urlParams_.Encode()
6426 req, err := http.NewRequest("DELETE", urls, body)
6427 if err != nil {
6428 return nil, err
6429 }
6430 req.Header = reqHeaders
6431 googleapi.Expand(req.URL, map[string]string{
6432 "name": c.name,
6433 })
6434 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6435 }
6436
6437
6438
6439
6440
6441
6442 func (c *ProjectsLocationsHttpRoutesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6443 gensupport.SetOptions(c.urlParams_, opts...)
6444 res, err := c.doRequest("json")
6445 if res != nil && res.StatusCode == http.StatusNotModified {
6446 if res.Body != nil {
6447 res.Body.Close()
6448 }
6449 return nil, gensupport.WrapError(&googleapi.Error{
6450 Code: res.StatusCode,
6451 Header: res.Header,
6452 })
6453 }
6454 if err != nil {
6455 return nil, err
6456 }
6457 defer googleapi.CloseBody(res)
6458 if err := googleapi.CheckResponse(res); err != nil {
6459 return nil, gensupport.WrapError(err)
6460 }
6461 ret := &Operation{
6462 ServerResponse: googleapi.ServerResponse{
6463 Header: res.Header,
6464 HTTPStatusCode: res.StatusCode,
6465 },
6466 }
6467 target := &ret
6468 if err := gensupport.DecodeResponse(target, res); err != nil {
6469 return nil, err
6470 }
6471 return ret, nil
6472 }
6473
6474 type ProjectsLocationsHttpRoutesGetCall struct {
6475 s *Service
6476 name string
6477 urlParams_ gensupport.URLParams
6478 ifNoneMatch_ string
6479 ctx_ context.Context
6480 header_ http.Header
6481 }
6482
6483
6484
6485
6486
6487 func (r *ProjectsLocationsHttpRoutesService) Get(name string) *ProjectsLocationsHttpRoutesGetCall {
6488 c := &ProjectsLocationsHttpRoutesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6489 c.name = name
6490 return c
6491 }
6492
6493
6494
6495
6496 func (c *ProjectsLocationsHttpRoutesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsHttpRoutesGetCall {
6497 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6498 return c
6499 }
6500
6501
6502
6503
6504 func (c *ProjectsLocationsHttpRoutesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsHttpRoutesGetCall {
6505 c.ifNoneMatch_ = entityTag
6506 return c
6507 }
6508
6509
6510 func (c *ProjectsLocationsHttpRoutesGetCall) Context(ctx context.Context) *ProjectsLocationsHttpRoutesGetCall {
6511 c.ctx_ = ctx
6512 return c
6513 }
6514
6515
6516
6517 func (c *ProjectsLocationsHttpRoutesGetCall) Header() http.Header {
6518 if c.header_ == nil {
6519 c.header_ = make(http.Header)
6520 }
6521 return c.header_
6522 }
6523
6524 func (c *ProjectsLocationsHttpRoutesGetCall) doRequest(alt string) (*http.Response, error) {
6525 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6526 if c.ifNoneMatch_ != "" {
6527 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6528 }
6529 var body io.Reader = nil
6530 c.urlParams_.Set("alt", alt)
6531 c.urlParams_.Set("prettyPrint", "false")
6532 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
6533 urls += "?" + c.urlParams_.Encode()
6534 req, err := http.NewRequest("GET", urls, body)
6535 if err != nil {
6536 return nil, err
6537 }
6538 req.Header = reqHeaders
6539 googleapi.Expand(req.URL, map[string]string{
6540 "name": c.name,
6541 })
6542 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6543 }
6544
6545
6546
6547
6548
6549
6550 func (c *ProjectsLocationsHttpRoutesGetCall) Do(opts ...googleapi.CallOption) (*HttpRoute, error) {
6551 gensupport.SetOptions(c.urlParams_, opts...)
6552 res, err := c.doRequest("json")
6553 if res != nil && res.StatusCode == http.StatusNotModified {
6554 if res.Body != nil {
6555 res.Body.Close()
6556 }
6557 return nil, gensupport.WrapError(&googleapi.Error{
6558 Code: res.StatusCode,
6559 Header: res.Header,
6560 })
6561 }
6562 if err != nil {
6563 return nil, err
6564 }
6565 defer googleapi.CloseBody(res)
6566 if err := googleapi.CheckResponse(res); err != nil {
6567 return nil, gensupport.WrapError(err)
6568 }
6569 ret := &HttpRoute{
6570 ServerResponse: googleapi.ServerResponse{
6571 Header: res.Header,
6572 HTTPStatusCode: res.StatusCode,
6573 },
6574 }
6575 target := &ret
6576 if err := gensupport.DecodeResponse(target, res); err != nil {
6577 return nil, err
6578 }
6579 return ret, nil
6580 }
6581
6582 type ProjectsLocationsHttpRoutesListCall struct {
6583 s *Service
6584 parent string
6585 urlParams_ gensupport.URLParams
6586 ifNoneMatch_ string
6587 ctx_ context.Context
6588 header_ http.Header
6589 }
6590
6591
6592
6593
6594
6595 func (r *ProjectsLocationsHttpRoutesService) List(parent string) *ProjectsLocationsHttpRoutesListCall {
6596 c := &ProjectsLocationsHttpRoutesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6597 c.parent = parent
6598 return c
6599 }
6600
6601
6602
6603 func (c *ProjectsLocationsHttpRoutesListCall) PageSize(pageSize int64) *ProjectsLocationsHttpRoutesListCall {
6604 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
6605 return c
6606 }
6607
6608
6609
6610
6611
6612 func (c *ProjectsLocationsHttpRoutesListCall) PageToken(pageToken string) *ProjectsLocationsHttpRoutesListCall {
6613 c.urlParams_.Set("pageToken", pageToken)
6614 return c
6615 }
6616
6617
6618
6619
6620 func (c *ProjectsLocationsHttpRoutesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsHttpRoutesListCall {
6621 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6622 return c
6623 }
6624
6625
6626
6627
6628 func (c *ProjectsLocationsHttpRoutesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsHttpRoutesListCall {
6629 c.ifNoneMatch_ = entityTag
6630 return c
6631 }
6632
6633
6634 func (c *ProjectsLocationsHttpRoutesListCall) Context(ctx context.Context) *ProjectsLocationsHttpRoutesListCall {
6635 c.ctx_ = ctx
6636 return c
6637 }
6638
6639
6640
6641 func (c *ProjectsLocationsHttpRoutesListCall) Header() http.Header {
6642 if c.header_ == nil {
6643 c.header_ = make(http.Header)
6644 }
6645 return c.header_
6646 }
6647
6648 func (c *ProjectsLocationsHttpRoutesListCall) doRequest(alt string) (*http.Response, error) {
6649 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6650 if c.ifNoneMatch_ != "" {
6651 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6652 }
6653 var body io.Reader = nil
6654 c.urlParams_.Set("alt", alt)
6655 c.urlParams_.Set("prettyPrint", "false")
6656 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/httpRoutes")
6657 urls += "?" + c.urlParams_.Encode()
6658 req, err := http.NewRequest("GET", urls, body)
6659 if err != nil {
6660 return nil, err
6661 }
6662 req.Header = reqHeaders
6663 googleapi.Expand(req.URL, map[string]string{
6664 "parent": c.parent,
6665 })
6666 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6667 }
6668
6669
6670
6671
6672
6673
6674
6675 func (c *ProjectsLocationsHttpRoutesListCall) Do(opts ...googleapi.CallOption) (*ListHttpRoutesResponse, error) {
6676 gensupport.SetOptions(c.urlParams_, opts...)
6677 res, err := c.doRequest("json")
6678 if res != nil && res.StatusCode == http.StatusNotModified {
6679 if res.Body != nil {
6680 res.Body.Close()
6681 }
6682 return nil, gensupport.WrapError(&googleapi.Error{
6683 Code: res.StatusCode,
6684 Header: res.Header,
6685 })
6686 }
6687 if err != nil {
6688 return nil, err
6689 }
6690 defer googleapi.CloseBody(res)
6691 if err := googleapi.CheckResponse(res); err != nil {
6692 return nil, gensupport.WrapError(err)
6693 }
6694 ret := &ListHttpRoutesResponse{
6695 ServerResponse: googleapi.ServerResponse{
6696 Header: res.Header,
6697 HTTPStatusCode: res.StatusCode,
6698 },
6699 }
6700 target := &ret
6701 if err := gensupport.DecodeResponse(target, res); err != nil {
6702 return nil, err
6703 }
6704 return ret, nil
6705 }
6706
6707
6708
6709
6710 func (c *ProjectsLocationsHttpRoutesListCall) Pages(ctx context.Context, f func(*ListHttpRoutesResponse) error) error {
6711 c.ctx_ = ctx
6712 defer c.PageToken(c.urlParams_.Get("pageToken"))
6713 for {
6714 x, err := c.Do()
6715 if err != nil {
6716 return err
6717 }
6718 if err := f(x); err != nil {
6719 return err
6720 }
6721 if x.NextPageToken == "" {
6722 return nil
6723 }
6724 c.PageToken(x.NextPageToken)
6725 }
6726 }
6727
6728 type ProjectsLocationsHttpRoutesPatchCall struct {
6729 s *Service
6730 name string
6731 httproute *HttpRoute
6732 urlParams_ gensupport.URLParams
6733 ctx_ context.Context
6734 header_ http.Header
6735 }
6736
6737
6738
6739
6740
6741 func (r *ProjectsLocationsHttpRoutesService) Patch(name string, httproute *HttpRoute) *ProjectsLocationsHttpRoutesPatchCall {
6742 c := &ProjectsLocationsHttpRoutesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6743 c.name = name
6744 c.httproute = httproute
6745 return c
6746 }
6747
6748
6749
6750
6751
6752
6753
6754 func (c *ProjectsLocationsHttpRoutesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsHttpRoutesPatchCall {
6755 c.urlParams_.Set("updateMask", updateMask)
6756 return c
6757 }
6758
6759
6760
6761
6762 func (c *ProjectsLocationsHttpRoutesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsHttpRoutesPatchCall {
6763 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6764 return c
6765 }
6766
6767
6768 func (c *ProjectsLocationsHttpRoutesPatchCall) Context(ctx context.Context) *ProjectsLocationsHttpRoutesPatchCall {
6769 c.ctx_ = ctx
6770 return c
6771 }
6772
6773
6774
6775 func (c *ProjectsLocationsHttpRoutesPatchCall) Header() http.Header {
6776 if c.header_ == nil {
6777 c.header_ = make(http.Header)
6778 }
6779 return c.header_
6780 }
6781
6782 func (c *ProjectsLocationsHttpRoutesPatchCall) doRequest(alt string) (*http.Response, error) {
6783 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6784 var body io.Reader = nil
6785 body, err := googleapi.WithoutDataWrapper.JSONReader(c.httproute)
6786 if err != nil {
6787 return nil, err
6788 }
6789 c.urlParams_.Set("alt", alt)
6790 c.urlParams_.Set("prettyPrint", "false")
6791 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
6792 urls += "?" + c.urlParams_.Encode()
6793 req, err := http.NewRequest("PATCH", urls, body)
6794 if err != nil {
6795 return nil, err
6796 }
6797 req.Header = reqHeaders
6798 googleapi.Expand(req.URL, map[string]string{
6799 "name": c.name,
6800 })
6801 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6802 }
6803
6804
6805
6806
6807
6808
6809 func (c *ProjectsLocationsHttpRoutesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6810 gensupport.SetOptions(c.urlParams_, opts...)
6811 res, err := c.doRequest("json")
6812 if res != nil && res.StatusCode == http.StatusNotModified {
6813 if res.Body != nil {
6814 res.Body.Close()
6815 }
6816 return nil, gensupport.WrapError(&googleapi.Error{
6817 Code: res.StatusCode,
6818 Header: res.Header,
6819 })
6820 }
6821 if err != nil {
6822 return nil, err
6823 }
6824 defer googleapi.CloseBody(res)
6825 if err := googleapi.CheckResponse(res); err != nil {
6826 return nil, gensupport.WrapError(err)
6827 }
6828 ret := &Operation{
6829 ServerResponse: googleapi.ServerResponse{
6830 Header: res.Header,
6831 HTTPStatusCode: res.StatusCode,
6832 },
6833 }
6834 target := &ret
6835 if err := gensupport.DecodeResponse(target, res); err != nil {
6836 return nil, err
6837 }
6838 return ret, nil
6839 }
6840
6841 type ProjectsLocationsLbRouteExtensionsCreateCall struct {
6842 s *Service
6843 parent string
6844 lbrouteextension *LbRouteExtension
6845 urlParams_ gensupport.URLParams
6846 ctx_ context.Context
6847 header_ http.Header
6848 }
6849
6850
6851
6852
6853
6854
6855 func (r *ProjectsLocationsLbRouteExtensionsService) Create(parent string, lbrouteextension *LbRouteExtension) *ProjectsLocationsLbRouteExtensionsCreateCall {
6856 c := &ProjectsLocationsLbRouteExtensionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6857 c.parent = parent
6858 c.lbrouteextension = lbrouteextension
6859 return c
6860 }
6861
6862
6863
6864 func (c *ProjectsLocationsLbRouteExtensionsCreateCall) LbRouteExtensionId(lbRouteExtensionId string) *ProjectsLocationsLbRouteExtensionsCreateCall {
6865 c.urlParams_.Set("lbRouteExtensionId", lbRouteExtensionId)
6866 return c
6867 }
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880 func (c *ProjectsLocationsLbRouteExtensionsCreateCall) RequestId(requestId string) *ProjectsLocationsLbRouteExtensionsCreateCall {
6881 c.urlParams_.Set("requestId", requestId)
6882 return c
6883 }
6884
6885
6886
6887
6888 func (c *ProjectsLocationsLbRouteExtensionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbRouteExtensionsCreateCall {
6889 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6890 return c
6891 }
6892
6893
6894 func (c *ProjectsLocationsLbRouteExtensionsCreateCall) Context(ctx context.Context) *ProjectsLocationsLbRouteExtensionsCreateCall {
6895 c.ctx_ = ctx
6896 return c
6897 }
6898
6899
6900
6901 func (c *ProjectsLocationsLbRouteExtensionsCreateCall) Header() http.Header {
6902 if c.header_ == nil {
6903 c.header_ = make(http.Header)
6904 }
6905 return c.header_
6906 }
6907
6908 func (c *ProjectsLocationsLbRouteExtensionsCreateCall) doRequest(alt string) (*http.Response, error) {
6909 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6910 var body io.Reader = nil
6911 body, err := googleapi.WithoutDataWrapper.JSONReader(c.lbrouteextension)
6912 if err != nil {
6913 return nil, err
6914 }
6915 c.urlParams_.Set("alt", alt)
6916 c.urlParams_.Set("prettyPrint", "false")
6917 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/lbRouteExtensions")
6918 urls += "?" + c.urlParams_.Encode()
6919 req, err := http.NewRequest("POST", urls, body)
6920 if err != nil {
6921 return nil, err
6922 }
6923 req.Header = reqHeaders
6924 googleapi.Expand(req.URL, map[string]string{
6925 "parent": c.parent,
6926 })
6927 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6928 }
6929
6930
6931
6932
6933
6934
6935 func (c *ProjectsLocationsLbRouteExtensionsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6936 gensupport.SetOptions(c.urlParams_, opts...)
6937 res, err := c.doRequest("json")
6938 if res != nil && res.StatusCode == http.StatusNotModified {
6939 if res.Body != nil {
6940 res.Body.Close()
6941 }
6942 return nil, gensupport.WrapError(&googleapi.Error{
6943 Code: res.StatusCode,
6944 Header: res.Header,
6945 })
6946 }
6947 if err != nil {
6948 return nil, err
6949 }
6950 defer googleapi.CloseBody(res)
6951 if err := googleapi.CheckResponse(res); err != nil {
6952 return nil, gensupport.WrapError(err)
6953 }
6954 ret := &Operation{
6955 ServerResponse: googleapi.ServerResponse{
6956 Header: res.Header,
6957 HTTPStatusCode: res.StatusCode,
6958 },
6959 }
6960 target := &ret
6961 if err := gensupport.DecodeResponse(target, res); err != nil {
6962 return nil, err
6963 }
6964 return ret, nil
6965 }
6966
6967 type ProjectsLocationsLbRouteExtensionsDeleteCall struct {
6968 s *Service
6969 name string
6970 urlParams_ gensupport.URLParams
6971 ctx_ context.Context
6972 header_ http.Header
6973 }
6974
6975
6976
6977
6978
6979
6980
6981 func (r *ProjectsLocationsLbRouteExtensionsService) Delete(name string) *ProjectsLocationsLbRouteExtensionsDeleteCall {
6982 c := &ProjectsLocationsLbRouteExtensionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6983 c.name = name
6984 return c
6985 }
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998 func (c *ProjectsLocationsLbRouteExtensionsDeleteCall) RequestId(requestId string) *ProjectsLocationsLbRouteExtensionsDeleteCall {
6999 c.urlParams_.Set("requestId", requestId)
7000 return c
7001 }
7002
7003
7004
7005
7006 func (c *ProjectsLocationsLbRouteExtensionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbRouteExtensionsDeleteCall {
7007 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7008 return c
7009 }
7010
7011
7012 func (c *ProjectsLocationsLbRouteExtensionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsLbRouteExtensionsDeleteCall {
7013 c.ctx_ = ctx
7014 return c
7015 }
7016
7017
7018
7019 func (c *ProjectsLocationsLbRouteExtensionsDeleteCall) Header() http.Header {
7020 if c.header_ == nil {
7021 c.header_ = make(http.Header)
7022 }
7023 return c.header_
7024 }
7025
7026 func (c *ProjectsLocationsLbRouteExtensionsDeleteCall) doRequest(alt string) (*http.Response, error) {
7027 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7028 var body io.Reader = nil
7029 c.urlParams_.Set("alt", alt)
7030 c.urlParams_.Set("prettyPrint", "false")
7031 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
7032 urls += "?" + c.urlParams_.Encode()
7033 req, err := http.NewRequest("DELETE", urls, body)
7034 if err != nil {
7035 return nil, err
7036 }
7037 req.Header = reqHeaders
7038 googleapi.Expand(req.URL, map[string]string{
7039 "name": c.name,
7040 })
7041 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7042 }
7043
7044
7045
7046
7047
7048
7049 func (c *ProjectsLocationsLbRouteExtensionsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7050 gensupport.SetOptions(c.urlParams_, opts...)
7051 res, err := c.doRequest("json")
7052 if res != nil && res.StatusCode == http.StatusNotModified {
7053 if res.Body != nil {
7054 res.Body.Close()
7055 }
7056 return nil, gensupport.WrapError(&googleapi.Error{
7057 Code: res.StatusCode,
7058 Header: res.Header,
7059 })
7060 }
7061 if err != nil {
7062 return nil, err
7063 }
7064 defer googleapi.CloseBody(res)
7065 if err := googleapi.CheckResponse(res); err != nil {
7066 return nil, gensupport.WrapError(err)
7067 }
7068 ret := &Operation{
7069 ServerResponse: googleapi.ServerResponse{
7070 Header: res.Header,
7071 HTTPStatusCode: res.StatusCode,
7072 },
7073 }
7074 target := &ret
7075 if err := gensupport.DecodeResponse(target, res); err != nil {
7076 return nil, err
7077 }
7078 return ret, nil
7079 }
7080
7081 type ProjectsLocationsLbRouteExtensionsGetCall struct {
7082 s *Service
7083 name string
7084 urlParams_ gensupport.URLParams
7085 ifNoneMatch_ string
7086 ctx_ context.Context
7087 header_ http.Header
7088 }
7089
7090
7091
7092
7093
7094
7095
7096 func (r *ProjectsLocationsLbRouteExtensionsService) Get(name string) *ProjectsLocationsLbRouteExtensionsGetCall {
7097 c := &ProjectsLocationsLbRouteExtensionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7098 c.name = name
7099 return c
7100 }
7101
7102
7103
7104
7105 func (c *ProjectsLocationsLbRouteExtensionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbRouteExtensionsGetCall {
7106 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7107 return c
7108 }
7109
7110
7111
7112
7113 func (c *ProjectsLocationsLbRouteExtensionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsLbRouteExtensionsGetCall {
7114 c.ifNoneMatch_ = entityTag
7115 return c
7116 }
7117
7118
7119 func (c *ProjectsLocationsLbRouteExtensionsGetCall) Context(ctx context.Context) *ProjectsLocationsLbRouteExtensionsGetCall {
7120 c.ctx_ = ctx
7121 return c
7122 }
7123
7124
7125
7126 func (c *ProjectsLocationsLbRouteExtensionsGetCall) Header() http.Header {
7127 if c.header_ == nil {
7128 c.header_ = make(http.Header)
7129 }
7130 return c.header_
7131 }
7132
7133 func (c *ProjectsLocationsLbRouteExtensionsGetCall) doRequest(alt string) (*http.Response, error) {
7134 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7135 if c.ifNoneMatch_ != "" {
7136 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7137 }
7138 var body io.Reader = nil
7139 c.urlParams_.Set("alt", alt)
7140 c.urlParams_.Set("prettyPrint", "false")
7141 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
7142 urls += "?" + c.urlParams_.Encode()
7143 req, err := http.NewRequest("GET", urls, body)
7144 if err != nil {
7145 return nil, err
7146 }
7147 req.Header = reqHeaders
7148 googleapi.Expand(req.URL, map[string]string{
7149 "name": c.name,
7150 })
7151 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7152 }
7153
7154
7155
7156
7157
7158
7159
7160 func (c *ProjectsLocationsLbRouteExtensionsGetCall) Do(opts ...googleapi.CallOption) (*LbRouteExtension, error) {
7161 gensupport.SetOptions(c.urlParams_, opts...)
7162 res, err := c.doRequest("json")
7163 if res != nil && res.StatusCode == http.StatusNotModified {
7164 if res.Body != nil {
7165 res.Body.Close()
7166 }
7167 return nil, gensupport.WrapError(&googleapi.Error{
7168 Code: res.StatusCode,
7169 Header: res.Header,
7170 })
7171 }
7172 if err != nil {
7173 return nil, err
7174 }
7175 defer googleapi.CloseBody(res)
7176 if err := googleapi.CheckResponse(res); err != nil {
7177 return nil, gensupport.WrapError(err)
7178 }
7179 ret := &LbRouteExtension{
7180 ServerResponse: googleapi.ServerResponse{
7181 Header: res.Header,
7182 HTTPStatusCode: res.StatusCode,
7183 },
7184 }
7185 target := &ret
7186 if err := gensupport.DecodeResponse(target, res); err != nil {
7187 return nil, err
7188 }
7189 return ret, nil
7190 }
7191
7192 type ProjectsLocationsLbRouteExtensionsListCall struct {
7193 s *Service
7194 parent string
7195 urlParams_ gensupport.URLParams
7196 ifNoneMatch_ string
7197 ctx_ context.Context
7198 header_ http.Header
7199 }
7200
7201
7202
7203
7204
7205
7206 func (r *ProjectsLocationsLbRouteExtensionsService) List(parent string) *ProjectsLocationsLbRouteExtensionsListCall {
7207 c := &ProjectsLocationsLbRouteExtensionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7208 c.parent = parent
7209 return c
7210 }
7211
7212
7213 func (c *ProjectsLocationsLbRouteExtensionsListCall) Filter(filter string) *ProjectsLocationsLbRouteExtensionsListCall {
7214 c.urlParams_.Set("filter", filter)
7215 return c
7216 }
7217
7218
7219
7220 func (c *ProjectsLocationsLbRouteExtensionsListCall) OrderBy(orderBy string) *ProjectsLocationsLbRouteExtensionsListCall {
7221 c.urlParams_.Set("orderBy", orderBy)
7222 return c
7223 }
7224
7225
7226
7227
7228 func (c *ProjectsLocationsLbRouteExtensionsListCall) PageSize(pageSize int64) *ProjectsLocationsLbRouteExtensionsListCall {
7229 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
7230 return c
7231 }
7232
7233
7234
7235 func (c *ProjectsLocationsLbRouteExtensionsListCall) PageToken(pageToken string) *ProjectsLocationsLbRouteExtensionsListCall {
7236 c.urlParams_.Set("pageToken", pageToken)
7237 return c
7238 }
7239
7240
7241
7242
7243 func (c *ProjectsLocationsLbRouteExtensionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbRouteExtensionsListCall {
7244 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7245 return c
7246 }
7247
7248
7249
7250
7251 func (c *ProjectsLocationsLbRouteExtensionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLbRouteExtensionsListCall {
7252 c.ifNoneMatch_ = entityTag
7253 return c
7254 }
7255
7256
7257 func (c *ProjectsLocationsLbRouteExtensionsListCall) Context(ctx context.Context) *ProjectsLocationsLbRouteExtensionsListCall {
7258 c.ctx_ = ctx
7259 return c
7260 }
7261
7262
7263
7264 func (c *ProjectsLocationsLbRouteExtensionsListCall) Header() http.Header {
7265 if c.header_ == nil {
7266 c.header_ = make(http.Header)
7267 }
7268 return c.header_
7269 }
7270
7271 func (c *ProjectsLocationsLbRouteExtensionsListCall) doRequest(alt string) (*http.Response, error) {
7272 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7273 if c.ifNoneMatch_ != "" {
7274 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7275 }
7276 var body io.Reader = nil
7277 c.urlParams_.Set("alt", alt)
7278 c.urlParams_.Set("prettyPrint", "false")
7279 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/lbRouteExtensions")
7280 urls += "?" + c.urlParams_.Encode()
7281 req, err := http.NewRequest("GET", urls, body)
7282 if err != nil {
7283 return nil, err
7284 }
7285 req.Header = reqHeaders
7286 googleapi.Expand(req.URL, map[string]string{
7287 "parent": c.parent,
7288 })
7289 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7290 }
7291
7292
7293
7294
7295
7296
7297
7298 func (c *ProjectsLocationsLbRouteExtensionsListCall) Do(opts ...googleapi.CallOption) (*ListLbRouteExtensionsResponse, error) {
7299 gensupport.SetOptions(c.urlParams_, opts...)
7300 res, err := c.doRequest("json")
7301 if res != nil && res.StatusCode == http.StatusNotModified {
7302 if res.Body != nil {
7303 res.Body.Close()
7304 }
7305 return nil, gensupport.WrapError(&googleapi.Error{
7306 Code: res.StatusCode,
7307 Header: res.Header,
7308 })
7309 }
7310 if err != nil {
7311 return nil, err
7312 }
7313 defer googleapi.CloseBody(res)
7314 if err := googleapi.CheckResponse(res); err != nil {
7315 return nil, gensupport.WrapError(err)
7316 }
7317 ret := &ListLbRouteExtensionsResponse{
7318 ServerResponse: googleapi.ServerResponse{
7319 Header: res.Header,
7320 HTTPStatusCode: res.StatusCode,
7321 },
7322 }
7323 target := &ret
7324 if err := gensupport.DecodeResponse(target, res); err != nil {
7325 return nil, err
7326 }
7327 return ret, nil
7328 }
7329
7330
7331
7332
7333 func (c *ProjectsLocationsLbRouteExtensionsListCall) Pages(ctx context.Context, f func(*ListLbRouteExtensionsResponse) error) error {
7334 c.ctx_ = ctx
7335 defer c.PageToken(c.urlParams_.Get("pageToken"))
7336 for {
7337 x, err := c.Do()
7338 if err != nil {
7339 return err
7340 }
7341 if err := f(x); err != nil {
7342 return err
7343 }
7344 if x.NextPageToken == "" {
7345 return nil
7346 }
7347 c.PageToken(x.NextPageToken)
7348 }
7349 }
7350
7351 type ProjectsLocationsLbRouteExtensionsPatchCall struct {
7352 s *Service
7353 name string
7354 lbrouteextension *LbRouteExtension
7355 urlParams_ gensupport.URLParams
7356 ctx_ context.Context
7357 header_ http.Header
7358 }
7359
7360
7361
7362
7363
7364
7365
7366 func (r *ProjectsLocationsLbRouteExtensionsService) Patch(name string, lbrouteextension *LbRouteExtension) *ProjectsLocationsLbRouteExtensionsPatchCall {
7367 c := &ProjectsLocationsLbRouteExtensionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7368 c.name = name
7369 c.lbrouteextension = lbrouteextension
7370 return c
7371 }
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384 func (c *ProjectsLocationsLbRouteExtensionsPatchCall) RequestId(requestId string) *ProjectsLocationsLbRouteExtensionsPatchCall {
7385 c.urlParams_.Set("requestId", requestId)
7386 return c
7387 }
7388
7389
7390
7391
7392
7393
7394 func (c *ProjectsLocationsLbRouteExtensionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsLbRouteExtensionsPatchCall {
7395 c.urlParams_.Set("updateMask", updateMask)
7396 return c
7397 }
7398
7399
7400
7401
7402 func (c *ProjectsLocationsLbRouteExtensionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbRouteExtensionsPatchCall {
7403 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7404 return c
7405 }
7406
7407
7408 func (c *ProjectsLocationsLbRouteExtensionsPatchCall) Context(ctx context.Context) *ProjectsLocationsLbRouteExtensionsPatchCall {
7409 c.ctx_ = ctx
7410 return c
7411 }
7412
7413
7414
7415 func (c *ProjectsLocationsLbRouteExtensionsPatchCall) Header() http.Header {
7416 if c.header_ == nil {
7417 c.header_ = make(http.Header)
7418 }
7419 return c.header_
7420 }
7421
7422 func (c *ProjectsLocationsLbRouteExtensionsPatchCall) doRequest(alt string) (*http.Response, error) {
7423 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7424 var body io.Reader = nil
7425 body, err := googleapi.WithoutDataWrapper.JSONReader(c.lbrouteextension)
7426 if err != nil {
7427 return nil, err
7428 }
7429 c.urlParams_.Set("alt", alt)
7430 c.urlParams_.Set("prettyPrint", "false")
7431 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
7432 urls += "?" + c.urlParams_.Encode()
7433 req, err := http.NewRequest("PATCH", urls, body)
7434 if err != nil {
7435 return nil, err
7436 }
7437 req.Header = reqHeaders
7438 googleapi.Expand(req.URL, map[string]string{
7439 "name": c.name,
7440 })
7441 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7442 }
7443
7444
7445
7446
7447
7448
7449 func (c *ProjectsLocationsLbRouteExtensionsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7450 gensupport.SetOptions(c.urlParams_, opts...)
7451 res, err := c.doRequest("json")
7452 if res != nil && res.StatusCode == http.StatusNotModified {
7453 if res.Body != nil {
7454 res.Body.Close()
7455 }
7456 return nil, gensupport.WrapError(&googleapi.Error{
7457 Code: res.StatusCode,
7458 Header: res.Header,
7459 })
7460 }
7461 if err != nil {
7462 return nil, err
7463 }
7464 defer googleapi.CloseBody(res)
7465 if err := googleapi.CheckResponse(res); err != nil {
7466 return nil, gensupport.WrapError(err)
7467 }
7468 ret := &Operation{
7469 ServerResponse: googleapi.ServerResponse{
7470 Header: res.Header,
7471 HTTPStatusCode: res.StatusCode,
7472 },
7473 }
7474 target := &ret
7475 if err := gensupport.DecodeResponse(target, res); err != nil {
7476 return nil, err
7477 }
7478 return ret, nil
7479 }
7480
7481 type ProjectsLocationsLbTrafficExtensionsCreateCall struct {
7482 s *Service
7483 parent string
7484 lbtrafficextension *LbTrafficExtension
7485 urlParams_ gensupport.URLParams
7486 ctx_ context.Context
7487 header_ http.Header
7488 }
7489
7490
7491
7492
7493
7494
7495 func (r *ProjectsLocationsLbTrafficExtensionsService) Create(parent string, lbtrafficextension *LbTrafficExtension) *ProjectsLocationsLbTrafficExtensionsCreateCall {
7496 c := &ProjectsLocationsLbTrafficExtensionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7497 c.parent = parent
7498 c.lbtrafficextension = lbtrafficextension
7499 return c
7500 }
7501
7502
7503
7504
7505 func (c *ProjectsLocationsLbTrafficExtensionsCreateCall) LbTrafficExtensionId(lbTrafficExtensionId string) *ProjectsLocationsLbTrafficExtensionsCreateCall {
7506 c.urlParams_.Set("lbTrafficExtensionId", lbTrafficExtensionId)
7507 return c
7508 }
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521 func (c *ProjectsLocationsLbTrafficExtensionsCreateCall) RequestId(requestId string) *ProjectsLocationsLbTrafficExtensionsCreateCall {
7522 c.urlParams_.Set("requestId", requestId)
7523 return c
7524 }
7525
7526
7527
7528
7529 func (c *ProjectsLocationsLbTrafficExtensionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbTrafficExtensionsCreateCall {
7530 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7531 return c
7532 }
7533
7534
7535 func (c *ProjectsLocationsLbTrafficExtensionsCreateCall) Context(ctx context.Context) *ProjectsLocationsLbTrafficExtensionsCreateCall {
7536 c.ctx_ = ctx
7537 return c
7538 }
7539
7540
7541
7542 func (c *ProjectsLocationsLbTrafficExtensionsCreateCall) Header() http.Header {
7543 if c.header_ == nil {
7544 c.header_ = make(http.Header)
7545 }
7546 return c.header_
7547 }
7548
7549 func (c *ProjectsLocationsLbTrafficExtensionsCreateCall) doRequest(alt string) (*http.Response, error) {
7550 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7551 var body io.Reader = nil
7552 body, err := googleapi.WithoutDataWrapper.JSONReader(c.lbtrafficextension)
7553 if err != nil {
7554 return nil, err
7555 }
7556 c.urlParams_.Set("alt", alt)
7557 c.urlParams_.Set("prettyPrint", "false")
7558 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/lbTrafficExtensions")
7559 urls += "?" + c.urlParams_.Encode()
7560 req, err := http.NewRequest("POST", urls, body)
7561 if err != nil {
7562 return nil, err
7563 }
7564 req.Header = reqHeaders
7565 googleapi.Expand(req.URL, map[string]string{
7566 "parent": c.parent,
7567 })
7568 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7569 }
7570
7571
7572
7573
7574
7575
7576 func (c *ProjectsLocationsLbTrafficExtensionsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7577 gensupport.SetOptions(c.urlParams_, opts...)
7578 res, err := c.doRequest("json")
7579 if res != nil && res.StatusCode == http.StatusNotModified {
7580 if res.Body != nil {
7581 res.Body.Close()
7582 }
7583 return nil, gensupport.WrapError(&googleapi.Error{
7584 Code: res.StatusCode,
7585 Header: res.Header,
7586 })
7587 }
7588 if err != nil {
7589 return nil, err
7590 }
7591 defer googleapi.CloseBody(res)
7592 if err := googleapi.CheckResponse(res); err != nil {
7593 return nil, gensupport.WrapError(err)
7594 }
7595 ret := &Operation{
7596 ServerResponse: googleapi.ServerResponse{
7597 Header: res.Header,
7598 HTTPStatusCode: res.StatusCode,
7599 },
7600 }
7601 target := &ret
7602 if err := gensupport.DecodeResponse(target, res); err != nil {
7603 return nil, err
7604 }
7605 return ret, nil
7606 }
7607
7608 type ProjectsLocationsLbTrafficExtensionsDeleteCall struct {
7609 s *Service
7610 name string
7611 urlParams_ gensupport.URLParams
7612 ctx_ context.Context
7613 header_ http.Header
7614 }
7615
7616
7617
7618
7619
7620
7621
7622 func (r *ProjectsLocationsLbTrafficExtensionsService) Delete(name string) *ProjectsLocationsLbTrafficExtensionsDeleteCall {
7623 c := &ProjectsLocationsLbTrafficExtensionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7624 c.name = name
7625 return c
7626 }
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639 func (c *ProjectsLocationsLbTrafficExtensionsDeleteCall) RequestId(requestId string) *ProjectsLocationsLbTrafficExtensionsDeleteCall {
7640 c.urlParams_.Set("requestId", requestId)
7641 return c
7642 }
7643
7644
7645
7646
7647 func (c *ProjectsLocationsLbTrafficExtensionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbTrafficExtensionsDeleteCall {
7648 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7649 return c
7650 }
7651
7652
7653 func (c *ProjectsLocationsLbTrafficExtensionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsLbTrafficExtensionsDeleteCall {
7654 c.ctx_ = ctx
7655 return c
7656 }
7657
7658
7659
7660 func (c *ProjectsLocationsLbTrafficExtensionsDeleteCall) Header() http.Header {
7661 if c.header_ == nil {
7662 c.header_ = make(http.Header)
7663 }
7664 return c.header_
7665 }
7666
7667 func (c *ProjectsLocationsLbTrafficExtensionsDeleteCall) doRequest(alt string) (*http.Response, error) {
7668 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7669 var body io.Reader = nil
7670 c.urlParams_.Set("alt", alt)
7671 c.urlParams_.Set("prettyPrint", "false")
7672 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
7673 urls += "?" + c.urlParams_.Encode()
7674 req, err := http.NewRequest("DELETE", urls, body)
7675 if err != nil {
7676 return nil, err
7677 }
7678 req.Header = reqHeaders
7679 googleapi.Expand(req.URL, map[string]string{
7680 "name": c.name,
7681 })
7682 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7683 }
7684
7685
7686
7687
7688
7689
7690 func (c *ProjectsLocationsLbTrafficExtensionsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7691 gensupport.SetOptions(c.urlParams_, opts...)
7692 res, err := c.doRequest("json")
7693 if res != nil && res.StatusCode == http.StatusNotModified {
7694 if res.Body != nil {
7695 res.Body.Close()
7696 }
7697 return nil, gensupport.WrapError(&googleapi.Error{
7698 Code: res.StatusCode,
7699 Header: res.Header,
7700 })
7701 }
7702 if err != nil {
7703 return nil, err
7704 }
7705 defer googleapi.CloseBody(res)
7706 if err := googleapi.CheckResponse(res); err != nil {
7707 return nil, gensupport.WrapError(err)
7708 }
7709 ret := &Operation{
7710 ServerResponse: googleapi.ServerResponse{
7711 Header: res.Header,
7712 HTTPStatusCode: res.StatusCode,
7713 },
7714 }
7715 target := &ret
7716 if err := gensupport.DecodeResponse(target, res); err != nil {
7717 return nil, err
7718 }
7719 return ret, nil
7720 }
7721
7722 type ProjectsLocationsLbTrafficExtensionsGetCall struct {
7723 s *Service
7724 name string
7725 urlParams_ gensupport.URLParams
7726 ifNoneMatch_ string
7727 ctx_ context.Context
7728 header_ http.Header
7729 }
7730
7731
7732
7733
7734
7735
7736
7737 func (r *ProjectsLocationsLbTrafficExtensionsService) Get(name string) *ProjectsLocationsLbTrafficExtensionsGetCall {
7738 c := &ProjectsLocationsLbTrafficExtensionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7739 c.name = name
7740 return c
7741 }
7742
7743
7744
7745
7746 func (c *ProjectsLocationsLbTrafficExtensionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbTrafficExtensionsGetCall {
7747 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7748 return c
7749 }
7750
7751
7752
7753
7754 func (c *ProjectsLocationsLbTrafficExtensionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsLbTrafficExtensionsGetCall {
7755 c.ifNoneMatch_ = entityTag
7756 return c
7757 }
7758
7759
7760 func (c *ProjectsLocationsLbTrafficExtensionsGetCall) Context(ctx context.Context) *ProjectsLocationsLbTrafficExtensionsGetCall {
7761 c.ctx_ = ctx
7762 return c
7763 }
7764
7765
7766
7767 func (c *ProjectsLocationsLbTrafficExtensionsGetCall) Header() http.Header {
7768 if c.header_ == nil {
7769 c.header_ = make(http.Header)
7770 }
7771 return c.header_
7772 }
7773
7774 func (c *ProjectsLocationsLbTrafficExtensionsGetCall) doRequest(alt string) (*http.Response, error) {
7775 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7776 if c.ifNoneMatch_ != "" {
7777 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7778 }
7779 var body io.Reader = nil
7780 c.urlParams_.Set("alt", alt)
7781 c.urlParams_.Set("prettyPrint", "false")
7782 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
7783 urls += "?" + c.urlParams_.Encode()
7784 req, err := http.NewRequest("GET", urls, body)
7785 if err != nil {
7786 return nil, err
7787 }
7788 req.Header = reqHeaders
7789 googleapi.Expand(req.URL, map[string]string{
7790 "name": c.name,
7791 })
7792 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7793 }
7794
7795
7796
7797
7798
7799
7800
7801 func (c *ProjectsLocationsLbTrafficExtensionsGetCall) Do(opts ...googleapi.CallOption) (*LbTrafficExtension, error) {
7802 gensupport.SetOptions(c.urlParams_, opts...)
7803 res, err := c.doRequest("json")
7804 if res != nil && res.StatusCode == http.StatusNotModified {
7805 if res.Body != nil {
7806 res.Body.Close()
7807 }
7808 return nil, gensupport.WrapError(&googleapi.Error{
7809 Code: res.StatusCode,
7810 Header: res.Header,
7811 })
7812 }
7813 if err != nil {
7814 return nil, err
7815 }
7816 defer googleapi.CloseBody(res)
7817 if err := googleapi.CheckResponse(res); err != nil {
7818 return nil, gensupport.WrapError(err)
7819 }
7820 ret := &LbTrafficExtension{
7821 ServerResponse: googleapi.ServerResponse{
7822 Header: res.Header,
7823 HTTPStatusCode: res.StatusCode,
7824 },
7825 }
7826 target := &ret
7827 if err := gensupport.DecodeResponse(target, res); err != nil {
7828 return nil, err
7829 }
7830 return ret, nil
7831 }
7832
7833 type ProjectsLocationsLbTrafficExtensionsListCall struct {
7834 s *Service
7835 parent string
7836 urlParams_ gensupport.URLParams
7837 ifNoneMatch_ string
7838 ctx_ context.Context
7839 header_ http.Header
7840 }
7841
7842
7843
7844
7845
7846
7847 func (r *ProjectsLocationsLbTrafficExtensionsService) List(parent string) *ProjectsLocationsLbTrafficExtensionsListCall {
7848 c := &ProjectsLocationsLbTrafficExtensionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7849 c.parent = parent
7850 return c
7851 }
7852
7853
7854 func (c *ProjectsLocationsLbTrafficExtensionsListCall) Filter(filter string) *ProjectsLocationsLbTrafficExtensionsListCall {
7855 c.urlParams_.Set("filter", filter)
7856 return c
7857 }
7858
7859
7860
7861 func (c *ProjectsLocationsLbTrafficExtensionsListCall) OrderBy(orderBy string) *ProjectsLocationsLbTrafficExtensionsListCall {
7862 c.urlParams_.Set("orderBy", orderBy)
7863 return c
7864 }
7865
7866
7867
7868
7869 func (c *ProjectsLocationsLbTrafficExtensionsListCall) PageSize(pageSize int64) *ProjectsLocationsLbTrafficExtensionsListCall {
7870 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
7871 return c
7872 }
7873
7874
7875
7876 func (c *ProjectsLocationsLbTrafficExtensionsListCall) PageToken(pageToken string) *ProjectsLocationsLbTrafficExtensionsListCall {
7877 c.urlParams_.Set("pageToken", pageToken)
7878 return c
7879 }
7880
7881
7882
7883
7884 func (c *ProjectsLocationsLbTrafficExtensionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbTrafficExtensionsListCall {
7885 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7886 return c
7887 }
7888
7889
7890
7891
7892 func (c *ProjectsLocationsLbTrafficExtensionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLbTrafficExtensionsListCall {
7893 c.ifNoneMatch_ = entityTag
7894 return c
7895 }
7896
7897
7898 func (c *ProjectsLocationsLbTrafficExtensionsListCall) Context(ctx context.Context) *ProjectsLocationsLbTrafficExtensionsListCall {
7899 c.ctx_ = ctx
7900 return c
7901 }
7902
7903
7904
7905 func (c *ProjectsLocationsLbTrafficExtensionsListCall) Header() http.Header {
7906 if c.header_ == nil {
7907 c.header_ = make(http.Header)
7908 }
7909 return c.header_
7910 }
7911
7912 func (c *ProjectsLocationsLbTrafficExtensionsListCall) doRequest(alt string) (*http.Response, error) {
7913 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7914 if c.ifNoneMatch_ != "" {
7915 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7916 }
7917 var body io.Reader = nil
7918 c.urlParams_.Set("alt", alt)
7919 c.urlParams_.Set("prettyPrint", "false")
7920 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/lbTrafficExtensions")
7921 urls += "?" + c.urlParams_.Encode()
7922 req, err := http.NewRequest("GET", urls, body)
7923 if err != nil {
7924 return nil, err
7925 }
7926 req.Header = reqHeaders
7927 googleapi.Expand(req.URL, map[string]string{
7928 "parent": c.parent,
7929 })
7930 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7931 }
7932
7933
7934
7935
7936
7937
7938
7939 func (c *ProjectsLocationsLbTrafficExtensionsListCall) Do(opts ...googleapi.CallOption) (*ListLbTrafficExtensionsResponse, error) {
7940 gensupport.SetOptions(c.urlParams_, opts...)
7941 res, err := c.doRequest("json")
7942 if res != nil && res.StatusCode == http.StatusNotModified {
7943 if res.Body != nil {
7944 res.Body.Close()
7945 }
7946 return nil, gensupport.WrapError(&googleapi.Error{
7947 Code: res.StatusCode,
7948 Header: res.Header,
7949 })
7950 }
7951 if err != nil {
7952 return nil, err
7953 }
7954 defer googleapi.CloseBody(res)
7955 if err := googleapi.CheckResponse(res); err != nil {
7956 return nil, gensupport.WrapError(err)
7957 }
7958 ret := &ListLbTrafficExtensionsResponse{
7959 ServerResponse: googleapi.ServerResponse{
7960 Header: res.Header,
7961 HTTPStatusCode: res.StatusCode,
7962 },
7963 }
7964 target := &ret
7965 if err := gensupport.DecodeResponse(target, res); err != nil {
7966 return nil, err
7967 }
7968 return ret, nil
7969 }
7970
7971
7972
7973
7974 func (c *ProjectsLocationsLbTrafficExtensionsListCall) Pages(ctx context.Context, f func(*ListLbTrafficExtensionsResponse) error) error {
7975 c.ctx_ = ctx
7976 defer c.PageToken(c.urlParams_.Get("pageToken"))
7977 for {
7978 x, err := c.Do()
7979 if err != nil {
7980 return err
7981 }
7982 if err := f(x); err != nil {
7983 return err
7984 }
7985 if x.NextPageToken == "" {
7986 return nil
7987 }
7988 c.PageToken(x.NextPageToken)
7989 }
7990 }
7991
7992 type ProjectsLocationsLbTrafficExtensionsPatchCall struct {
7993 s *Service
7994 name string
7995 lbtrafficextension *LbTrafficExtension
7996 urlParams_ gensupport.URLParams
7997 ctx_ context.Context
7998 header_ http.Header
7999 }
8000
8001
8002
8003
8004
8005
8006
8007
8008 func (r *ProjectsLocationsLbTrafficExtensionsService) Patch(name string, lbtrafficextension *LbTrafficExtension) *ProjectsLocationsLbTrafficExtensionsPatchCall {
8009 c := &ProjectsLocationsLbTrafficExtensionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8010 c.name = name
8011 c.lbtrafficextension = lbtrafficextension
8012 return c
8013 }
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026 func (c *ProjectsLocationsLbTrafficExtensionsPatchCall) RequestId(requestId string) *ProjectsLocationsLbTrafficExtensionsPatchCall {
8027 c.urlParams_.Set("requestId", requestId)
8028 return c
8029 }
8030
8031
8032
8033
8034
8035
8036 func (c *ProjectsLocationsLbTrafficExtensionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsLbTrafficExtensionsPatchCall {
8037 c.urlParams_.Set("updateMask", updateMask)
8038 return c
8039 }
8040
8041
8042
8043
8044 func (c *ProjectsLocationsLbTrafficExtensionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbTrafficExtensionsPatchCall {
8045 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8046 return c
8047 }
8048
8049
8050 func (c *ProjectsLocationsLbTrafficExtensionsPatchCall) Context(ctx context.Context) *ProjectsLocationsLbTrafficExtensionsPatchCall {
8051 c.ctx_ = ctx
8052 return c
8053 }
8054
8055
8056
8057 func (c *ProjectsLocationsLbTrafficExtensionsPatchCall) Header() http.Header {
8058 if c.header_ == nil {
8059 c.header_ = make(http.Header)
8060 }
8061 return c.header_
8062 }
8063
8064 func (c *ProjectsLocationsLbTrafficExtensionsPatchCall) doRequest(alt string) (*http.Response, error) {
8065 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8066 var body io.Reader = nil
8067 body, err := googleapi.WithoutDataWrapper.JSONReader(c.lbtrafficextension)
8068 if err != nil {
8069 return nil, err
8070 }
8071 c.urlParams_.Set("alt", alt)
8072 c.urlParams_.Set("prettyPrint", "false")
8073 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
8074 urls += "?" + c.urlParams_.Encode()
8075 req, err := http.NewRequest("PATCH", urls, body)
8076 if err != nil {
8077 return nil, err
8078 }
8079 req.Header = reqHeaders
8080 googleapi.Expand(req.URL, map[string]string{
8081 "name": c.name,
8082 })
8083 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8084 }
8085
8086
8087
8088
8089
8090
8091 func (c *ProjectsLocationsLbTrafficExtensionsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8092 gensupport.SetOptions(c.urlParams_, opts...)
8093 res, err := c.doRequest("json")
8094 if res != nil && res.StatusCode == http.StatusNotModified {
8095 if res.Body != nil {
8096 res.Body.Close()
8097 }
8098 return nil, gensupport.WrapError(&googleapi.Error{
8099 Code: res.StatusCode,
8100 Header: res.Header,
8101 })
8102 }
8103 if err != nil {
8104 return nil, err
8105 }
8106 defer googleapi.CloseBody(res)
8107 if err := googleapi.CheckResponse(res); err != nil {
8108 return nil, gensupport.WrapError(err)
8109 }
8110 ret := &Operation{
8111 ServerResponse: googleapi.ServerResponse{
8112 Header: res.Header,
8113 HTTPStatusCode: res.StatusCode,
8114 },
8115 }
8116 target := &ret
8117 if err := gensupport.DecodeResponse(target, res); err != nil {
8118 return nil, err
8119 }
8120 return ret, nil
8121 }
8122
8123 type ProjectsLocationsMeshesCreateCall struct {
8124 s *Service
8125 parent string
8126 mesh *Mesh
8127 urlParams_ gensupport.URLParams
8128 ctx_ context.Context
8129 header_ http.Header
8130 }
8131
8132
8133
8134
8135
8136 func (r *ProjectsLocationsMeshesService) Create(parent string, mesh *Mesh) *ProjectsLocationsMeshesCreateCall {
8137 c := &ProjectsLocationsMeshesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8138 c.parent = parent
8139 c.mesh = mesh
8140 return c
8141 }
8142
8143
8144
8145 func (c *ProjectsLocationsMeshesCreateCall) MeshId(meshId string) *ProjectsLocationsMeshesCreateCall {
8146 c.urlParams_.Set("meshId", meshId)
8147 return c
8148 }
8149
8150
8151
8152
8153 func (c *ProjectsLocationsMeshesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesCreateCall {
8154 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8155 return c
8156 }
8157
8158
8159 func (c *ProjectsLocationsMeshesCreateCall) Context(ctx context.Context) *ProjectsLocationsMeshesCreateCall {
8160 c.ctx_ = ctx
8161 return c
8162 }
8163
8164
8165
8166 func (c *ProjectsLocationsMeshesCreateCall) Header() http.Header {
8167 if c.header_ == nil {
8168 c.header_ = make(http.Header)
8169 }
8170 return c.header_
8171 }
8172
8173 func (c *ProjectsLocationsMeshesCreateCall) doRequest(alt string) (*http.Response, error) {
8174 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8175 var body io.Reader = nil
8176 body, err := googleapi.WithoutDataWrapper.JSONReader(c.mesh)
8177 if err != nil {
8178 return nil, err
8179 }
8180 c.urlParams_.Set("alt", alt)
8181 c.urlParams_.Set("prettyPrint", "false")
8182 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/meshes")
8183 urls += "?" + c.urlParams_.Encode()
8184 req, err := http.NewRequest("POST", urls, body)
8185 if err != nil {
8186 return nil, err
8187 }
8188 req.Header = reqHeaders
8189 googleapi.Expand(req.URL, map[string]string{
8190 "parent": c.parent,
8191 })
8192 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8193 }
8194
8195
8196
8197
8198
8199
8200 func (c *ProjectsLocationsMeshesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8201 gensupport.SetOptions(c.urlParams_, opts...)
8202 res, err := c.doRequest("json")
8203 if res != nil && res.StatusCode == http.StatusNotModified {
8204 if res.Body != nil {
8205 res.Body.Close()
8206 }
8207 return nil, gensupport.WrapError(&googleapi.Error{
8208 Code: res.StatusCode,
8209 Header: res.Header,
8210 })
8211 }
8212 if err != nil {
8213 return nil, err
8214 }
8215 defer googleapi.CloseBody(res)
8216 if err := googleapi.CheckResponse(res); err != nil {
8217 return nil, gensupport.WrapError(err)
8218 }
8219 ret := &Operation{
8220 ServerResponse: googleapi.ServerResponse{
8221 Header: res.Header,
8222 HTTPStatusCode: res.StatusCode,
8223 },
8224 }
8225 target := &ret
8226 if err := gensupport.DecodeResponse(target, res); err != nil {
8227 return nil, err
8228 }
8229 return ret, nil
8230 }
8231
8232 type ProjectsLocationsMeshesDeleteCall struct {
8233 s *Service
8234 name string
8235 urlParams_ gensupport.URLParams
8236 ctx_ context.Context
8237 header_ http.Header
8238 }
8239
8240
8241
8242
8243
8244 func (r *ProjectsLocationsMeshesService) Delete(name string) *ProjectsLocationsMeshesDeleteCall {
8245 c := &ProjectsLocationsMeshesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8246 c.name = name
8247 return c
8248 }
8249
8250
8251
8252
8253 func (c *ProjectsLocationsMeshesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesDeleteCall {
8254 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8255 return c
8256 }
8257
8258
8259 func (c *ProjectsLocationsMeshesDeleteCall) Context(ctx context.Context) *ProjectsLocationsMeshesDeleteCall {
8260 c.ctx_ = ctx
8261 return c
8262 }
8263
8264
8265
8266 func (c *ProjectsLocationsMeshesDeleteCall) Header() http.Header {
8267 if c.header_ == nil {
8268 c.header_ = make(http.Header)
8269 }
8270 return c.header_
8271 }
8272
8273 func (c *ProjectsLocationsMeshesDeleteCall) doRequest(alt string) (*http.Response, error) {
8274 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8275 var body io.Reader = nil
8276 c.urlParams_.Set("alt", alt)
8277 c.urlParams_.Set("prettyPrint", "false")
8278 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
8279 urls += "?" + c.urlParams_.Encode()
8280 req, err := http.NewRequest("DELETE", urls, body)
8281 if err != nil {
8282 return nil, err
8283 }
8284 req.Header = reqHeaders
8285 googleapi.Expand(req.URL, map[string]string{
8286 "name": c.name,
8287 })
8288 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8289 }
8290
8291
8292
8293
8294
8295
8296 func (c *ProjectsLocationsMeshesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8297 gensupport.SetOptions(c.urlParams_, opts...)
8298 res, err := c.doRequest("json")
8299 if res != nil && res.StatusCode == http.StatusNotModified {
8300 if res.Body != nil {
8301 res.Body.Close()
8302 }
8303 return nil, gensupport.WrapError(&googleapi.Error{
8304 Code: res.StatusCode,
8305 Header: res.Header,
8306 })
8307 }
8308 if err != nil {
8309 return nil, err
8310 }
8311 defer googleapi.CloseBody(res)
8312 if err := googleapi.CheckResponse(res); err != nil {
8313 return nil, gensupport.WrapError(err)
8314 }
8315 ret := &Operation{
8316 ServerResponse: googleapi.ServerResponse{
8317 Header: res.Header,
8318 HTTPStatusCode: res.StatusCode,
8319 },
8320 }
8321 target := &ret
8322 if err := gensupport.DecodeResponse(target, res); err != nil {
8323 return nil, err
8324 }
8325 return ret, nil
8326 }
8327
8328 type ProjectsLocationsMeshesGetCall struct {
8329 s *Service
8330 name string
8331 urlParams_ gensupport.URLParams
8332 ifNoneMatch_ string
8333 ctx_ context.Context
8334 header_ http.Header
8335 }
8336
8337
8338
8339
8340
8341 func (r *ProjectsLocationsMeshesService) Get(name string) *ProjectsLocationsMeshesGetCall {
8342 c := &ProjectsLocationsMeshesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8343 c.name = name
8344 return c
8345 }
8346
8347
8348
8349
8350 func (c *ProjectsLocationsMeshesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesGetCall {
8351 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8352 return c
8353 }
8354
8355
8356
8357
8358 func (c *ProjectsLocationsMeshesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMeshesGetCall {
8359 c.ifNoneMatch_ = entityTag
8360 return c
8361 }
8362
8363
8364 func (c *ProjectsLocationsMeshesGetCall) Context(ctx context.Context) *ProjectsLocationsMeshesGetCall {
8365 c.ctx_ = ctx
8366 return c
8367 }
8368
8369
8370
8371 func (c *ProjectsLocationsMeshesGetCall) Header() http.Header {
8372 if c.header_ == nil {
8373 c.header_ = make(http.Header)
8374 }
8375 return c.header_
8376 }
8377
8378 func (c *ProjectsLocationsMeshesGetCall) doRequest(alt string) (*http.Response, error) {
8379 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8380 if c.ifNoneMatch_ != "" {
8381 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8382 }
8383 var body io.Reader = nil
8384 c.urlParams_.Set("alt", alt)
8385 c.urlParams_.Set("prettyPrint", "false")
8386 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
8387 urls += "?" + c.urlParams_.Encode()
8388 req, err := http.NewRequest("GET", urls, body)
8389 if err != nil {
8390 return nil, err
8391 }
8392 req.Header = reqHeaders
8393 googleapi.Expand(req.URL, map[string]string{
8394 "name": c.name,
8395 })
8396 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8397 }
8398
8399
8400
8401
8402
8403
8404 func (c *ProjectsLocationsMeshesGetCall) Do(opts ...googleapi.CallOption) (*Mesh, error) {
8405 gensupport.SetOptions(c.urlParams_, opts...)
8406 res, err := c.doRequest("json")
8407 if res != nil && res.StatusCode == http.StatusNotModified {
8408 if res.Body != nil {
8409 res.Body.Close()
8410 }
8411 return nil, gensupport.WrapError(&googleapi.Error{
8412 Code: res.StatusCode,
8413 Header: res.Header,
8414 })
8415 }
8416 if err != nil {
8417 return nil, err
8418 }
8419 defer googleapi.CloseBody(res)
8420 if err := googleapi.CheckResponse(res); err != nil {
8421 return nil, gensupport.WrapError(err)
8422 }
8423 ret := &Mesh{
8424 ServerResponse: googleapi.ServerResponse{
8425 Header: res.Header,
8426 HTTPStatusCode: res.StatusCode,
8427 },
8428 }
8429 target := &ret
8430 if err := gensupport.DecodeResponse(target, res); err != nil {
8431 return nil, err
8432 }
8433 return ret, nil
8434 }
8435
8436 type ProjectsLocationsMeshesGetIamPolicyCall struct {
8437 s *Service
8438 resource string
8439 urlParams_ gensupport.URLParams
8440 ifNoneMatch_ string
8441 ctx_ context.Context
8442 header_ http.Header
8443 }
8444
8445
8446
8447
8448
8449
8450
8451 func (r *ProjectsLocationsMeshesService) GetIamPolicy(resource string) *ProjectsLocationsMeshesGetIamPolicyCall {
8452 c := &ProjectsLocationsMeshesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8453 c.resource = resource
8454 return c
8455 }
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469 func (c *ProjectsLocationsMeshesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsMeshesGetIamPolicyCall {
8470 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
8471 return c
8472 }
8473
8474
8475
8476
8477 func (c *ProjectsLocationsMeshesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesGetIamPolicyCall {
8478 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8479 return c
8480 }
8481
8482
8483
8484
8485 func (c *ProjectsLocationsMeshesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsMeshesGetIamPolicyCall {
8486 c.ifNoneMatch_ = entityTag
8487 return c
8488 }
8489
8490
8491 func (c *ProjectsLocationsMeshesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsMeshesGetIamPolicyCall {
8492 c.ctx_ = ctx
8493 return c
8494 }
8495
8496
8497
8498 func (c *ProjectsLocationsMeshesGetIamPolicyCall) Header() http.Header {
8499 if c.header_ == nil {
8500 c.header_ = make(http.Header)
8501 }
8502 return c.header_
8503 }
8504
8505 func (c *ProjectsLocationsMeshesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
8506 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8507 if c.ifNoneMatch_ != "" {
8508 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8509 }
8510 var body io.Reader = nil
8511 c.urlParams_.Set("alt", alt)
8512 c.urlParams_.Set("prettyPrint", "false")
8513 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:getIamPolicy")
8514 urls += "?" + c.urlParams_.Encode()
8515 req, err := http.NewRequest("GET", urls, body)
8516 if err != nil {
8517 return nil, err
8518 }
8519 req.Header = reqHeaders
8520 googleapi.Expand(req.URL, map[string]string{
8521 "resource": c.resource,
8522 })
8523 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8524 }
8525
8526
8527
8528
8529
8530
8531 func (c *ProjectsLocationsMeshesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
8532 gensupport.SetOptions(c.urlParams_, opts...)
8533 res, err := c.doRequest("json")
8534 if res != nil && res.StatusCode == http.StatusNotModified {
8535 if res.Body != nil {
8536 res.Body.Close()
8537 }
8538 return nil, gensupport.WrapError(&googleapi.Error{
8539 Code: res.StatusCode,
8540 Header: res.Header,
8541 })
8542 }
8543 if err != nil {
8544 return nil, err
8545 }
8546 defer googleapi.CloseBody(res)
8547 if err := googleapi.CheckResponse(res); err != nil {
8548 return nil, gensupport.WrapError(err)
8549 }
8550 ret := &Policy{
8551 ServerResponse: googleapi.ServerResponse{
8552 Header: res.Header,
8553 HTTPStatusCode: res.StatusCode,
8554 },
8555 }
8556 target := &ret
8557 if err := gensupport.DecodeResponse(target, res); err != nil {
8558 return nil, err
8559 }
8560 return ret, nil
8561 }
8562
8563 type ProjectsLocationsMeshesListCall struct {
8564 s *Service
8565 parent string
8566 urlParams_ gensupport.URLParams
8567 ifNoneMatch_ string
8568 ctx_ context.Context
8569 header_ http.Header
8570 }
8571
8572
8573
8574
8575
8576 func (r *ProjectsLocationsMeshesService) List(parent string) *ProjectsLocationsMeshesListCall {
8577 c := &ProjectsLocationsMeshesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8578 c.parent = parent
8579 return c
8580 }
8581
8582
8583
8584 func (c *ProjectsLocationsMeshesListCall) PageSize(pageSize int64) *ProjectsLocationsMeshesListCall {
8585 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
8586 return c
8587 }
8588
8589
8590
8591
8592 func (c *ProjectsLocationsMeshesListCall) PageToken(pageToken string) *ProjectsLocationsMeshesListCall {
8593 c.urlParams_.Set("pageToken", pageToken)
8594 return c
8595 }
8596
8597
8598
8599
8600 func (c *ProjectsLocationsMeshesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesListCall {
8601 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8602 return c
8603 }
8604
8605
8606
8607
8608 func (c *ProjectsLocationsMeshesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMeshesListCall {
8609 c.ifNoneMatch_ = entityTag
8610 return c
8611 }
8612
8613
8614 func (c *ProjectsLocationsMeshesListCall) Context(ctx context.Context) *ProjectsLocationsMeshesListCall {
8615 c.ctx_ = ctx
8616 return c
8617 }
8618
8619
8620
8621 func (c *ProjectsLocationsMeshesListCall) Header() http.Header {
8622 if c.header_ == nil {
8623 c.header_ = make(http.Header)
8624 }
8625 return c.header_
8626 }
8627
8628 func (c *ProjectsLocationsMeshesListCall) doRequest(alt string) (*http.Response, error) {
8629 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8630 if c.ifNoneMatch_ != "" {
8631 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8632 }
8633 var body io.Reader = nil
8634 c.urlParams_.Set("alt", alt)
8635 c.urlParams_.Set("prettyPrint", "false")
8636 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/meshes")
8637 urls += "?" + c.urlParams_.Encode()
8638 req, err := http.NewRequest("GET", urls, body)
8639 if err != nil {
8640 return nil, err
8641 }
8642 req.Header = reqHeaders
8643 googleapi.Expand(req.URL, map[string]string{
8644 "parent": c.parent,
8645 })
8646 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8647 }
8648
8649
8650
8651
8652
8653
8654
8655 func (c *ProjectsLocationsMeshesListCall) Do(opts ...googleapi.CallOption) (*ListMeshesResponse, error) {
8656 gensupport.SetOptions(c.urlParams_, opts...)
8657 res, err := c.doRequest("json")
8658 if res != nil && res.StatusCode == http.StatusNotModified {
8659 if res.Body != nil {
8660 res.Body.Close()
8661 }
8662 return nil, gensupport.WrapError(&googleapi.Error{
8663 Code: res.StatusCode,
8664 Header: res.Header,
8665 })
8666 }
8667 if err != nil {
8668 return nil, err
8669 }
8670 defer googleapi.CloseBody(res)
8671 if err := googleapi.CheckResponse(res); err != nil {
8672 return nil, gensupport.WrapError(err)
8673 }
8674 ret := &ListMeshesResponse{
8675 ServerResponse: googleapi.ServerResponse{
8676 Header: res.Header,
8677 HTTPStatusCode: res.StatusCode,
8678 },
8679 }
8680 target := &ret
8681 if err := gensupport.DecodeResponse(target, res); err != nil {
8682 return nil, err
8683 }
8684 return ret, nil
8685 }
8686
8687
8688
8689
8690 func (c *ProjectsLocationsMeshesListCall) Pages(ctx context.Context, f func(*ListMeshesResponse) error) error {
8691 c.ctx_ = ctx
8692 defer c.PageToken(c.urlParams_.Get("pageToken"))
8693 for {
8694 x, err := c.Do()
8695 if err != nil {
8696 return err
8697 }
8698 if err := f(x); err != nil {
8699 return err
8700 }
8701 if x.NextPageToken == "" {
8702 return nil
8703 }
8704 c.PageToken(x.NextPageToken)
8705 }
8706 }
8707
8708 type ProjectsLocationsMeshesPatchCall struct {
8709 s *Service
8710 name string
8711 mesh *Mesh
8712 urlParams_ gensupport.URLParams
8713 ctx_ context.Context
8714 header_ http.Header
8715 }
8716
8717
8718
8719
8720
8721 func (r *ProjectsLocationsMeshesService) Patch(name string, mesh *Mesh) *ProjectsLocationsMeshesPatchCall {
8722 c := &ProjectsLocationsMeshesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8723 c.name = name
8724 c.mesh = mesh
8725 return c
8726 }
8727
8728
8729
8730
8731
8732
8733 func (c *ProjectsLocationsMeshesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsMeshesPatchCall {
8734 c.urlParams_.Set("updateMask", updateMask)
8735 return c
8736 }
8737
8738
8739
8740
8741 func (c *ProjectsLocationsMeshesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesPatchCall {
8742 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8743 return c
8744 }
8745
8746
8747 func (c *ProjectsLocationsMeshesPatchCall) Context(ctx context.Context) *ProjectsLocationsMeshesPatchCall {
8748 c.ctx_ = ctx
8749 return c
8750 }
8751
8752
8753
8754 func (c *ProjectsLocationsMeshesPatchCall) Header() http.Header {
8755 if c.header_ == nil {
8756 c.header_ = make(http.Header)
8757 }
8758 return c.header_
8759 }
8760
8761 func (c *ProjectsLocationsMeshesPatchCall) doRequest(alt string) (*http.Response, error) {
8762 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8763 var body io.Reader = nil
8764 body, err := googleapi.WithoutDataWrapper.JSONReader(c.mesh)
8765 if err != nil {
8766 return nil, err
8767 }
8768 c.urlParams_.Set("alt", alt)
8769 c.urlParams_.Set("prettyPrint", "false")
8770 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
8771 urls += "?" + c.urlParams_.Encode()
8772 req, err := http.NewRequest("PATCH", urls, body)
8773 if err != nil {
8774 return nil, err
8775 }
8776 req.Header = reqHeaders
8777 googleapi.Expand(req.URL, map[string]string{
8778 "name": c.name,
8779 })
8780 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8781 }
8782
8783
8784
8785
8786
8787
8788 func (c *ProjectsLocationsMeshesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8789 gensupport.SetOptions(c.urlParams_, opts...)
8790 res, err := c.doRequest("json")
8791 if res != nil && res.StatusCode == http.StatusNotModified {
8792 if res.Body != nil {
8793 res.Body.Close()
8794 }
8795 return nil, gensupport.WrapError(&googleapi.Error{
8796 Code: res.StatusCode,
8797 Header: res.Header,
8798 })
8799 }
8800 if err != nil {
8801 return nil, err
8802 }
8803 defer googleapi.CloseBody(res)
8804 if err := googleapi.CheckResponse(res); err != nil {
8805 return nil, gensupport.WrapError(err)
8806 }
8807 ret := &Operation{
8808 ServerResponse: googleapi.ServerResponse{
8809 Header: res.Header,
8810 HTTPStatusCode: res.StatusCode,
8811 },
8812 }
8813 target := &ret
8814 if err := gensupport.DecodeResponse(target, res); err != nil {
8815 return nil, err
8816 }
8817 return ret, nil
8818 }
8819
8820 type ProjectsLocationsMeshesSetIamPolicyCall struct {
8821 s *Service
8822 resource string
8823 setiampolicyrequest *SetIamPolicyRequest
8824 urlParams_ gensupport.URLParams
8825 ctx_ context.Context
8826 header_ http.Header
8827 }
8828
8829
8830
8831
8832
8833
8834
8835
8836 func (r *ProjectsLocationsMeshesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsMeshesSetIamPolicyCall {
8837 c := &ProjectsLocationsMeshesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8838 c.resource = resource
8839 c.setiampolicyrequest = setiampolicyrequest
8840 return c
8841 }
8842
8843
8844
8845
8846 func (c *ProjectsLocationsMeshesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesSetIamPolicyCall {
8847 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8848 return c
8849 }
8850
8851
8852 func (c *ProjectsLocationsMeshesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsMeshesSetIamPolicyCall {
8853 c.ctx_ = ctx
8854 return c
8855 }
8856
8857
8858
8859 func (c *ProjectsLocationsMeshesSetIamPolicyCall) Header() http.Header {
8860 if c.header_ == nil {
8861 c.header_ = make(http.Header)
8862 }
8863 return c.header_
8864 }
8865
8866 func (c *ProjectsLocationsMeshesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
8867 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8868 var body io.Reader = nil
8869 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
8870 if err != nil {
8871 return nil, err
8872 }
8873 c.urlParams_.Set("alt", alt)
8874 c.urlParams_.Set("prettyPrint", "false")
8875 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:setIamPolicy")
8876 urls += "?" + c.urlParams_.Encode()
8877 req, err := http.NewRequest("POST", urls, body)
8878 if err != nil {
8879 return nil, err
8880 }
8881 req.Header = reqHeaders
8882 googleapi.Expand(req.URL, map[string]string{
8883 "resource": c.resource,
8884 })
8885 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8886 }
8887
8888
8889
8890
8891
8892
8893 func (c *ProjectsLocationsMeshesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
8894 gensupport.SetOptions(c.urlParams_, opts...)
8895 res, err := c.doRequest("json")
8896 if res != nil && res.StatusCode == http.StatusNotModified {
8897 if res.Body != nil {
8898 res.Body.Close()
8899 }
8900 return nil, gensupport.WrapError(&googleapi.Error{
8901 Code: res.StatusCode,
8902 Header: res.Header,
8903 })
8904 }
8905 if err != nil {
8906 return nil, err
8907 }
8908 defer googleapi.CloseBody(res)
8909 if err := googleapi.CheckResponse(res); err != nil {
8910 return nil, gensupport.WrapError(err)
8911 }
8912 ret := &Policy{
8913 ServerResponse: googleapi.ServerResponse{
8914 Header: res.Header,
8915 HTTPStatusCode: res.StatusCode,
8916 },
8917 }
8918 target := &ret
8919 if err := gensupport.DecodeResponse(target, res); err != nil {
8920 return nil, err
8921 }
8922 return ret, nil
8923 }
8924
8925 type ProjectsLocationsMeshesTestIamPermissionsCall struct {
8926 s *Service
8927 resource string
8928 testiampermissionsrequest *TestIamPermissionsRequest
8929 urlParams_ gensupport.URLParams
8930 ctx_ context.Context
8931 header_ http.Header
8932 }
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944 func (r *ProjectsLocationsMeshesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsMeshesTestIamPermissionsCall {
8945 c := &ProjectsLocationsMeshesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8946 c.resource = resource
8947 c.testiampermissionsrequest = testiampermissionsrequest
8948 return c
8949 }
8950
8951
8952
8953
8954 func (c *ProjectsLocationsMeshesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesTestIamPermissionsCall {
8955 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8956 return c
8957 }
8958
8959
8960 func (c *ProjectsLocationsMeshesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsMeshesTestIamPermissionsCall {
8961 c.ctx_ = ctx
8962 return c
8963 }
8964
8965
8966
8967 func (c *ProjectsLocationsMeshesTestIamPermissionsCall) Header() http.Header {
8968 if c.header_ == nil {
8969 c.header_ = make(http.Header)
8970 }
8971 return c.header_
8972 }
8973
8974 func (c *ProjectsLocationsMeshesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
8975 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8976 var body io.Reader = nil
8977 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
8978 if err != nil {
8979 return nil, err
8980 }
8981 c.urlParams_.Set("alt", alt)
8982 c.urlParams_.Set("prettyPrint", "false")
8983 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:testIamPermissions")
8984 urls += "?" + c.urlParams_.Encode()
8985 req, err := http.NewRequest("POST", urls, body)
8986 if err != nil {
8987 return nil, err
8988 }
8989 req.Header = reqHeaders
8990 googleapi.Expand(req.URL, map[string]string{
8991 "resource": c.resource,
8992 })
8993 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8994 }
8995
8996
8997
8998
8999
9000
9001
9002 func (c *ProjectsLocationsMeshesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
9003 gensupport.SetOptions(c.urlParams_, opts...)
9004 res, err := c.doRequest("json")
9005 if res != nil && res.StatusCode == http.StatusNotModified {
9006 if res.Body != nil {
9007 res.Body.Close()
9008 }
9009 return nil, gensupport.WrapError(&googleapi.Error{
9010 Code: res.StatusCode,
9011 Header: res.Header,
9012 })
9013 }
9014 if err != nil {
9015 return nil, err
9016 }
9017 defer googleapi.CloseBody(res)
9018 if err := googleapi.CheckResponse(res); err != nil {
9019 return nil, gensupport.WrapError(err)
9020 }
9021 ret := &TestIamPermissionsResponse{
9022 ServerResponse: googleapi.ServerResponse{
9023 Header: res.Header,
9024 HTTPStatusCode: res.StatusCode,
9025 },
9026 }
9027 target := &ret
9028 if err := gensupport.DecodeResponse(target, res); err != nil {
9029 return nil, err
9030 }
9031 return ret, nil
9032 }
9033
9034 type ProjectsLocationsOperationsCancelCall struct {
9035 s *Service
9036 name string
9037 canceloperationrequest *CancelOperationRequest
9038 urlParams_ gensupport.URLParams
9039 ctx_ context.Context
9040 header_ http.Header
9041 }
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054 func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall {
9055 c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9056 c.name = name
9057 c.canceloperationrequest = canceloperationrequest
9058 return c
9059 }
9060
9061
9062
9063
9064 func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
9065 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9066 return c
9067 }
9068
9069
9070 func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
9071 c.ctx_ = ctx
9072 return c
9073 }
9074
9075
9076
9077 func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
9078 if c.header_ == nil {
9079 c.header_ = make(http.Header)
9080 }
9081 return c.header_
9082 }
9083
9084 func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
9085 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9086 var body io.Reader = nil
9087 body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
9088 if err != nil {
9089 return nil, err
9090 }
9091 c.urlParams_.Set("alt", alt)
9092 c.urlParams_.Set("prettyPrint", "false")
9093 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:cancel")
9094 urls += "?" + c.urlParams_.Encode()
9095 req, err := http.NewRequest("POST", urls, body)
9096 if err != nil {
9097 return nil, err
9098 }
9099 req.Header = reqHeaders
9100 googleapi.Expand(req.URL, map[string]string{
9101 "name": c.name,
9102 })
9103 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9104 }
9105
9106
9107
9108
9109
9110
9111 func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
9112 gensupport.SetOptions(c.urlParams_, opts...)
9113 res, err := c.doRequest("json")
9114 if res != nil && res.StatusCode == http.StatusNotModified {
9115 if res.Body != nil {
9116 res.Body.Close()
9117 }
9118 return nil, gensupport.WrapError(&googleapi.Error{
9119 Code: res.StatusCode,
9120 Header: res.Header,
9121 })
9122 }
9123 if err != nil {
9124 return nil, err
9125 }
9126 defer googleapi.CloseBody(res)
9127 if err := googleapi.CheckResponse(res); err != nil {
9128 return nil, gensupport.WrapError(err)
9129 }
9130 ret := &Empty{
9131 ServerResponse: googleapi.ServerResponse{
9132 Header: res.Header,
9133 HTTPStatusCode: res.StatusCode,
9134 },
9135 }
9136 target := &ret
9137 if err := gensupport.DecodeResponse(target, res); err != nil {
9138 return nil, err
9139 }
9140 return ret, nil
9141 }
9142
9143 type ProjectsLocationsOperationsDeleteCall struct {
9144 s *Service
9145 name string
9146 urlParams_ gensupport.URLParams
9147 ctx_ context.Context
9148 header_ http.Header
9149 }
9150
9151
9152
9153
9154
9155
9156
9157 func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall {
9158 c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9159 c.name = name
9160 return c
9161 }
9162
9163
9164
9165
9166 func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall {
9167 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9168 return c
9169 }
9170
9171
9172 func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall {
9173 c.ctx_ = ctx
9174 return c
9175 }
9176
9177
9178
9179 func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header {
9180 if c.header_ == nil {
9181 c.header_ = make(http.Header)
9182 }
9183 return c.header_
9184 }
9185
9186 func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
9187 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9188 var body io.Reader = nil
9189 c.urlParams_.Set("alt", alt)
9190 c.urlParams_.Set("prettyPrint", "false")
9191 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
9192 urls += "?" + c.urlParams_.Encode()
9193 req, err := http.NewRequest("DELETE", urls, body)
9194 if err != nil {
9195 return nil, err
9196 }
9197 req.Header = reqHeaders
9198 googleapi.Expand(req.URL, map[string]string{
9199 "name": c.name,
9200 })
9201 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9202 }
9203
9204
9205
9206
9207
9208
9209 func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
9210 gensupport.SetOptions(c.urlParams_, opts...)
9211 res, err := c.doRequest("json")
9212 if res != nil && res.StatusCode == http.StatusNotModified {
9213 if res.Body != nil {
9214 res.Body.Close()
9215 }
9216 return nil, gensupport.WrapError(&googleapi.Error{
9217 Code: res.StatusCode,
9218 Header: res.Header,
9219 })
9220 }
9221 if err != nil {
9222 return nil, err
9223 }
9224 defer googleapi.CloseBody(res)
9225 if err := googleapi.CheckResponse(res); err != nil {
9226 return nil, gensupport.WrapError(err)
9227 }
9228 ret := &Empty{
9229 ServerResponse: googleapi.ServerResponse{
9230 Header: res.Header,
9231 HTTPStatusCode: res.StatusCode,
9232 },
9233 }
9234 target := &ret
9235 if err := gensupport.DecodeResponse(target, res); err != nil {
9236 return nil, err
9237 }
9238 return ret, nil
9239 }
9240
9241 type ProjectsLocationsOperationsGetCall struct {
9242 s *Service
9243 name string
9244 urlParams_ gensupport.URLParams
9245 ifNoneMatch_ string
9246 ctx_ context.Context
9247 header_ http.Header
9248 }
9249
9250
9251
9252
9253
9254
9255 func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
9256 c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9257 c.name = name
9258 return c
9259 }
9260
9261
9262
9263
9264 func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
9265 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9266 return c
9267 }
9268
9269
9270
9271
9272 func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
9273 c.ifNoneMatch_ = entityTag
9274 return c
9275 }
9276
9277
9278 func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
9279 c.ctx_ = ctx
9280 return c
9281 }
9282
9283
9284
9285 func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
9286 if c.header_ == nil {
9287 c.header_ = make(http.Header)
9288 }
9289 return c.header_
9290 }
9291
9292 func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
9293 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9294 if c.ifNoneMatch_ != "" {
9295 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9296 }
9297 var body io.Reader = nil
9298 c.urlParams_.Set("alt", alt)
9299 c.urlParams_.Set("prettyPrint", "false")
9300 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
9301 urls += "?" + c.urlParams_.Encode()
9302 req, err := http.NewRequest("GET", urls, body)
9303 if err != nil {
9304 return nil, err
9305 }
9306 req.Header = reqHeaders
9307 googleapi.Expand(req.URL, map[string]string{
9308 "name": c.name,
9309 })
9310 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9311 }
9312
9313
9314
9315
9316
9317
9318 func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9319 gensupport.SetOptions(c.urlParams_, opts...)
9320 res, err := c.doRequest("json")
9321 if res != nil && res.StatusCode == http.StatusNotModified {
9322 if res.Body != nil {
9323 res.Body.Close()
9324 }
9325 return nil, gensupport.WrapError(&googleapi.Error{
9326 Code: res.StatusCode,
9327 Header: res.Header,
9328 })
9329 }
9330 if err != nil {
9331 return nil, err
9332 }
9333 defer googleapi.CloseBody(res)
9334 if err := googleapi.CheckResponse(res); err != nil {
9335 return nil, gensupport.WrapError(err)
9336 }
9337 ret := &Operation{
9338 ServerResponse: googleapi.ServerResponse{
9339 Header: res.Header,
9340 HTTPStatusCode: res.StatusCode,
9341 },
9342 }
9343 target := &ret
9344 if err := gensupport.DecodeResponse(target, res); err != nil {
9345 return nil, err
9346 }
9347 return ret, nil
9348 }
9349
9350 type ProjectsLocationsOperationsListCall struct {
9351 s *Service
9352 name string
9353 urlParams_ gensupport.URLParams
9354 ifNoneMatch_ string
9355 ctx_ context.Context
9356 header_ http.Header
9357 }
9358
9359
9360
9361
9362
9363 func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
9364 c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9365 c.name = name
9366 return c
9367 }
9368
9369
9370 func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
9371 c.urlParams_.Set("filter", filter)
9372 return c
9373 }
9374
9375
9376
9377 func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
9378 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
9379 return c
9380 }
9381
9382
9383
9384 func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
9385 c.urlParams_.Set("pageToken", pageToken)
9386 return c
9387 }
9388
9389
9390
9391
9392 func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
9393 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9394 return c
9395 }
9396
9397
9398
9399
9400 func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
9401 c.ifNoneMatch_ = entityTag
9402 return c
9403 }
9404
9405
9406 func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
9407 c.ctx_ = ctx
9408 return c
9409 }
9410
9411
9412
9413 func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
9414 if c.header_ == nil {
9415 c.header_ = make(http.Header)
9416 }
9417 return c.header_
9418 }
9419
9420 func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
9421 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9422 if c.ifNoneMatch_ != "" {
9423 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9424 }
9425 var body io.Reader = nil
9426 c.urlParams_.Set("alt", alt)
9427 c.urlParams_.Set("prettyPrint", "false")
9428 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/operations")
9429 urls += "?" + c.urlParams_.Encode()
9430 req, err := http.NewRequest("GET", urls, body)
9431 if err != nil {
9432 return nil, err
9433 }
9434 req.Header = reqHeaders
9435 googleapi.Expand(req.URL, map[string]string{
9436 "name": c.name,
9437 })
9438 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9439 }
9440
9441
9442
9443
9444
9445
9446
9447 func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
9448 gensupport.SetOptions(c.urlParams_, opts...)
9449 res, err := c.doRequest("json")
9450 if res != nil && res.StatusCode == http.StatusNotModified {
9451 if res.Body != nil {
9452 res.Body.Close()
9453 }
9454 return nil, gensupport.WrapError(&googleapi.Error{
9455 Code: res.StatusCode,
9456 Header: res.Header,
9457 })
9458 }
9459 if err != nil {
9460 return nil, err
9461 }
9462 defer googleapi.CloseBody(res)
9463 if err := googleapi.CheckResponse(res); err != nil {
9464 return nil, gensupport.WrapError(err)
9465 }
9466 ret := &ListOperationsResponse{
9467 ServerResponse: googleapi.ServerResponse{
9468 Header: res.Header,
9469 HTTPStatusCode: res.StatusCode,
9470 },
9471 }
9472 target := &ret
9473 if err := gensupport.DecodeResponse(target, res); err != nil {
9474 return nil, err
9475 }
9476 return ret, nil
9477 }
9478
9479
9480
9481
9482 func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
9483 c.ctx_ = ctx
9484 defer c.PageToken(c.urlParams_.Get("pageToken"))
9485 for {
9486 x, err := c.Do()
9487 if err != nil {
9488 return err
9489 }
9490 if err := f(x); err != nil {
9491 return err
9492 }
9493 if x.NextPageToken == "" {
9494 return nil
9495 }
9496 c.PageToken(x.NextPageToken)
9497 }
9498 }
9499
9500 type ProjectsLocationsServiceBindingsCreateCall struct {
9501 s *Service
9502 parent string
9503 servicebinding *ServiceBinding
9504 urlParams_ gensupport.URLParams
9505 ctx_ context.Context
9506 header_ http.Header
9507 }
9508
9509
9510
9511
9512
9513 func (r *ProjectsLocationsServiceBindingsService) Create(parent string, servicebinding *ServiceBinding) *ProjectsLocationsServiceBindingsCreateCall {
9514 c := &ProjectsLocationsServiceBindingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9515 c.parent = parent
9516 c.servicebinding = servicebinding
9517 return c
9518 }
9519
9520
9521
9522 func (c *ProjectsLocationsServiceBindingsCreateCall) ServiceBindingId(serviceBindingId string) *ProjectsLocationsServiceBindingsCreateCall {
9523 c.urlParams_.Set("serviceBindingId", serviceBindingId)
9524 return c
9525 }
9526
9527
9528
9529
9530 func (c *ProjectsLocationsServiceBindingsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsCreateCall {
9531 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9532 return c
9533 }
9534
9535
9536 func (c *ProjectsLocationsServiceBindingsCreateCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsCreateCall {
9537 c.ctx_ = ctx
9538 return c
9539 }
9540
9541
9542
9543 func (c *ProjectsLocationsServiceBindingsCreateCall) Header() http.Header {
9544 if c.header_ == nil {
9545 c.header_ = make(http.Header)
9546 }
9547 return c.header_
9548 }
9549
9550 func (c *ProjectsLocationsServiceBindingsCreateCall) doRequest(alt string) (*http.Response, error) {
9551 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9552 var body io.Reader = nil
9553 body, err := googleapi.WithoutDataWrapper.JSONReader(c.servicebinding)
9554 if err != nil {
9555 return nil, err
9556 }
9557 c.urlParams_.Set("alt", alt)
9558 c.urlParams_.Set("prettyPrint", "false")
9559 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/serviceBindings")
9560 urls += "?" + c.urlParams_.Encode()
9561 req, err := http.NewRequest("POST", urls, body)
9562 if err != nil {
9563 return nil, err
9564 }
9565 req.Header = reqHeaders
9566 googleapi.Expand(req.URL, map[string]string{
9567 "parent": c.parent,
9568 })
9569 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9570 }
9571
9572
9573
9574
9575
9576
9577 func (c *ProjectsLocationsServiceBindingsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9578 gensupport.SetOptions(c.urlParams_, opts...)
9579 res, err := c.doRequest("json")
9580 if res != nil && res.StatusCode == http.StatusNotModified {
9581 if res.Body != nil {
9582 res.Body.Close()
9583 }
9584 return nil, gensupport.WrapError(&googleapi.Error{
9585 Code: res.StatusCode,
9586 Header: res.Header,
9587 })
9588 }
9589 if err != nil {
9590 return nil, err
9591 }
9592 defer googleapi.CloseBody(res)
9593 if err := googleapi.CheckResponse(res); err != nil {
9594 return nil, gensupport.WrapError(err)
9595 }
9596 ret := &Operation{
9597 ServerResponse: googleapi.ServerResponse{
9598 Header: res.Header,
9599 HTTPStatusCode: res.StatusCode,
9600 },
9601 }
9602 target := &ret
9603 if err := gensupport.DecodeResponse(target, res); err != nil {
9604 return nil, err
9605 }
9606 return ret, nil
9607 }
9608
9609 type ProjectsLocationsServiceBindingsDeleteCall struct {
9610 s *Service
9611 name string
9612 urlParams_ gensupport.URLParams
9613 ctx_ context.Context
9614 header_ http.Header
9615 }
9616
9617
9618
9619
9620
9621 func (r *ProjectsLocationsServiceBindingsService) Delete(name string) *ProjectsLocationsServiceBindingsDeleteCall {
9622 c := &ProjectsLocationsServiceBindingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9623 c.name = name
9624 return c
9625 }
9626
9627
9628
9629
9630 func (c *ProjectsLocationsServiceBindingsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsDeleteCall {
9631 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9632 return c
9633 }
9634
9635
9636 func (c *ProjectsLocationsServiceBindingsDeleteCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsDeleteCall {
9637 c.ctx_ = ctx
9638 return c
9639 }
9640
9641
9642
9643 func (c *ProjectsLocationsServiceBindingsDeleteCall) Header() http.Header {
9644 if c.header_ == nil {
9645 c.header_ = make(http.Header)
9646 }
9647 return c.header_
9648 }
9649
9650 func (c *ProjectsLocationsServiceBindingsDeleteCall) doRequest(alt string) (*http.Response, error) {
9651 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9652 var body io.Reader = nil
9653 c.urlParams_.Set("alt", alt)
9654 c.urlParams_.Set("prettyPrint", "false")
9655 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
9656 urls += "?" + c.urlParams_.Encode()
9657 req, err := http.NewRequest("DELETE", urls, body)
9658 if err != nil {
9659 return nil, err
9660 }
9661 req.Header = reqHeaders
9662 googleapi.Expand(req.URL, map[string]string{
9663 "name": c.name,
9664 })
9665 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9666 }
9667
9668
9669
9670
9671
9672
9673 func (c *ProjectsLocationsServiceBindingsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9674 gensupport.SetOptions(c.urlParams_, opts...)
9675 res, err := c.doRequest("json")
9676 if res != nil && res.StatusCode == http.StatusNotModified {
9677 if res.Body != nil {
9678 res.Body.Close()
9679 }
9680 return nil, gensupport.WrapError(&googleapi.Error{
9681 Code: res.StatusCode,
9682 Header: res.Header,
9683 })
9684 }
9685 if err != nil {
9686 return nil, err
9687 }
9688 defer googleapi.CloseBody(res)
9689 if err := googleapi.CheckResponse(res); err != nil {
9690 return nil, gensupport.WrapError(err)
9691 }
9692 ret := &Operation{
9693 ServerResponse: googleapi.ServerResponse{
9694 Header: res.Header,
9695 HTTPStatusCode: res.StatusCode,
9696 },
9697 }
9698 target := &ret
9699 if err := gensupport.DecodeResponse(target, res); err != nil {
9700 return nil, err
9701 }
9702 return ret, nil
9703 }
9704
9705 type ProjectsLocationsServiceBindingsGetCall struct {
9706 s *Service
9707 name string
9708 urlParams_ gensupport.URLParams
9709 ifNoneMatch_ string
9710 ctx_ context.Context
9711 header_ http.Header
9712 }
9713
9714
9715
9716
9717
9718 func (r *ProjectsLocationsServiceBindingsService) Get(name string) *ProjectsLocationsServiceBindingsGetCall {
9719 c := &ProjectsLocationsServiceBindingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9720 c.name = name
9721 return c
9722 }
9723
9724
9725
9726
9727 func (c *ProjectsLocationsServiceBindingsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsGetCall {
9728 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9729 return c
9730 }
9731
9732
9733
9734
9735 func (c *ProjectsLocationsServiceBindingsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceBindingsGetCall {
9736 c.ifNoneMatch_ = entityTag
9737 return c
9738 }
9739
9740
9741 func (c *ProjectsLocationsServiceBindingsGetCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsGetCall {
9742 c.ctx_ = ctx
9743 return c
9744 }
9745
9746
9747
9748 func (c *ProjectsLocationsServiceBindingsGetCall) Header() http.Header {
9749 if c.header_ == nil {
9750 c.header_ = make(http.Header)
9751 }
9752 return c.header_
9753 }
9754
9755 func (c *ProjectsLocationsServiceBindingsGetCall) doRequest(alt string) (*http.Response, error) {
9756 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9757 if c.ifNoneMatch_ != "" {
9758 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9759 }
9760 var body io.Reader = nil
9761 c.urlParams_.Set("alt", alt)
9762 c.urlParams_.Set("prettyPrint", "false")
9763 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
9764 urls += "?" + c.urlParams_.Encode()
9765 req, err := http.NewRequest("GET", urls, body)
9766 if err != nil {
9767 return nil, err
9768 }
9769 req.Header = reqHeaders
9770 googleapi.Expand(req.URL, map[string]string{
9771 "name": c.name,
9772 })
9773 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9774 }
9775
9776
9777
9778
9779
9780
9781 func (c *ProjectsLocationsServiceBindingsGetCall) Do(opts ...googleapi.CallOption) (*ServiceBinding, error) {
9782 gensupport.SetOptions(c.urlParams_, opts...)
9783 res, err := c.doRequest("json")
9784 if res != nil && res.StatusCode == http.StatusNotModified {
9785 if res.Body != nil {
9786 res.Body.Close()
9787 }
9788 return nil, gensupport.WrapError(&googleapi.Error{
9789 Code: res.StatusCode,
9790 Header: res.Header,
9791 })
9792 }
9793 if err != nil {
9794 return nil, err
9795 }
9796 defer googleapi.CloseBody(res)
9797 if err := googleapi.CheckResponse(res); err != nil {
9798 return nil, gensupport.WrapError(err)
9799 }
9800 ret := &ServiceBinding{
9801 ServerResponse: googleapi.ServerResponse{
9802 Header: res.Header,
9803 HTTPStatusCode: res.StatusCode,
9804 },
9805 }
9806 target := &ret
9807 if err := gensupport.DecodeResponse(target, res); err != nil {
9808 return nil, err
9809 }
9810 return ret, nil
9811 }
9812
9813 type ProjectsLocationsServiceBindingsGetIamPolicyCall struct {
9814 s *Service
9815 resource string
9816 urlParams_ gensupport.URLParams
9817 ifNoneMatch_ string
9818 ctx_ context.Context
9819 header_ http.Header
9820 }
9821
9822
9823
9824
9825
9826
9827
9828 func (r *ProjectsLocationsServiceBindingsService) GetIamPolicy(resource string) *ProjectsLocationsServiceBindingsGetIamPolicyCall {
9829 c := &ProjectsLocationsServiceBindingsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9830 c.resource = resource
9831 return c
9832 }
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
9843
9844
9845
9846 func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsServiceBindingsGetIamPolicyCall {
9847 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
9848 return c
9849 }
9850
9851
9852
9853
9854 func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsGetIamPolicyCall {
9855 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9856 return c
9857 }
9858
9859
9860
9861
9862 func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceBindingsGetIamPolicyCall {
9863 c.ifNoneMatch_ = entityTag
9864 return c
9865 }
9866
9867
9868 func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsGetIamPolicyCall {
9869 c.ctx_ = ctx
9870 return c
9871 }
9872
9873
9874
9875 func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) Header() http.Header {
9876 if c.header_ == nil {
9877 c.header_ = make(http.Header)
9878 }
9879 return c.header_
9880 }
9881
9882 func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
9883 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9884 if c.ifNoneMatch_ != "" {
9885 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9886 }
9887 var body io.Reader = nil
9888 c.urlParams_.Set("alt", alt)
9889 c.urlParams_.Set("prettyPrint", "false")
9890 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:getIamPolicy")
9891 urls += "?" + c.urlParams_.Encode()
9892 req, err := http.NewRequest("GET", urls, body)
9893 if err != nil {
9894 return nil, err
9895 }
9896 req.Header = reqHeaders
9897 googleapi.Expand(req.URL, map[string]string{
9898 "resource": c.resource,
9899 })
9900 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9901 }
9902
9903
9904
9905
9906
9907
9908 func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
9909 gensupport.SetOptions(c.urlParams_, opts...)
9910 res, err := c.doRequest("json")
9911 if res != nil && res.StatusCode == http.StatusNotModified {
9912 if res.Body != nil {
9913 res.Body.Close()
9914 }
9915 return nil, gensupport.WrapError(&googleapi.Error{
9916 Code: res.StatusCode,
9917 Header: res.Header,
9918 })
9919 }
9920 if err != nil {
9921 return nil, err
9922 }
9923 defer googleapi.CloseBody(res)
9924 if err := googleapi.CheckResponse(res); err != nil {
9925 return nil, gensupport.WrapError(err)
9926 }
9927 ret := &Policy{
9928 ServerResponse: googleapi.ServerResponse{
9929 Header: res.Header,
9930 HTTPStatusCode: res.StatusCode,
9931 },
9932 }
9933 target := &ret
9934 if err := gensupport.DecodeResponse(target, res); err != nil {
9935 return nil, err
9936 }
9937 return ret, nil
9938 }
9939
9940 type ProjectsLocationsServiceBindingsListCall struct {
9941 s *Service
9942 parent string
9943 urlParams_ gensupport.URLParams
9944 ifNoneMatch_ string
9945 ctx_ context.Context
9946 header_ http.Header
9947 }
9948
9949
9950
9951
9952
9953 func (r *ProjectsLocationsServiceBindingsService) List(parent string) *ProjectsLocationsServiceBindingsListCall {
9954 c := &ProjectsLocationsServiceBindingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9955 c.parent = parent
9956 return c
9957 }
9958
9959
9960
9961 func (c *ProjectsLocationsServiceBindingsListCall) PageSize(pageSize int64) *ProjectsLocationsServiceBindingsListCall {
9962 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
9963 return c
9964 }
9965
9966
9967
9968
9969
9970 func (c *ProjectsLocationsServiceBindingsListCall) PageToken(pageToken string) *ProjectsLocationsServiceBindingsListCall {
9971 c.urlParams_.Set("pageToken", pageToken)
9972 return c
9973 }
9974
9975
9976
9977
9978 func (c *ProjectsLocationsServiceBindingsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsListCall {
9979 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9980 return c
9981 }
9982
9983
9984
9985
9986 func (c *ProjectsLocationsServiceBindingsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceBindingsListCall {
9987 c.ifNoneMatch_ = entityTag
9988 return c
9989 }
9990
9991
9992 func (c *ProjectsLocationsServiceBindingsListCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsListCall {
9993 c.ctx_ = ctx
9994 return c
9995 }
9996
9997
9998
9999 func (c *ProjectsLocationsServiceBindingsListCall) Header() http.Header {
10000 if c.header_ == nil {
10001 c.header_ = make(http.Header)
10002 }
10003 return c.header_
10004 }
10005
10006 func (c *ProjectsLocationsServiceBindingsListCall) doRequest(alt string) (*http.Response, error) {
10007 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10008 if c.ifNoneMatch_ != "" {
10009 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10010 }
10011 var body io.Reader = nil
10012 c.urlParams_.Set("alt", alt)
10013 c.urlParams_.Set("prettyPrint", "false")
10014 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/serviceBindings")
10015 urls += "?" + c.urlParams_.Encode()
10016 req, err := http.NewRequest("GET", urls, body)
10017 if err != nil {
10018 return nil, err
10019 }
10020 req.Header = reqHeaders
10021 googleapi.Expand(req.URL, map[string]string{
10022 "parent": c.parent,
10023 })
10024 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10025 }
10026
10027
10028
10029
10030
10031
10032
10033 func (c *ProjectsLocationsServiceBindingsListCall) Do(opts ...googleapi.CallOption) (*ListServiceBindingsResponse, error) {
10034 gensupport.SetOptions(c.urlParams_, opts...)
10035 res, err := c.doRequest("json")
10036 if res != nil && res.StatusCode == http.StatusNotModified {
10037 if res.Body != nil {
10038 res.Body.Close()
10039 }
10040 return nil, gensupport.WrapError(&googleapi.Error{
10041 Code: res.StatusCode,
10042 Header: res.Header,
10043 })
10044 }
10045 if err != nil {
10046 return nil, err
10047 }
10048 defer googleapi.CloseBody(res)
10049 if err := googleapi.CheckResponse(res); err != nil {
10050 return nil, gensupport.WrapError(err)
10051 }
10052 ret := &ListServiceBindingsResponse{
10053 ServerResponse: googleapi.ServerResponse{
10054 Header: res.Header,
10055 HTTPStatusCode: res.StatusCode,
10056 },
10057 }
10058 target := &ret
10059 if err := gensupport.DecodeResponse(target, res); err != nil {
10060 return nil, err
10061 }
10062 return ret, nil
10063 }
10064
10065
10066
10067
10068 func (c *ProjectsLocationsServiceBindingsListCall) Pages(ctx context.Context, f func(*ListServiceBindingsResponse) error) error {
10069 c.ctx_ = ctx
10070 defer c.PageToken(c.urlParams_.Get("pageToken"))
10071 for {
10072 x, err := c.Do()
10073 if err != nil {
10074 return err
10075 }
10076 if err := f(x); err != nil {
10077 return err
10078 }
10079 if x.NextPageToken == "" {
10080 return nil
10081 }
10082 c.PageToken(x.NextPageToken)
10083 }
10084 }
10085
10086 type ProjectsLocationsServiceBindingsSetIamPolicyCall struct {
10087 s *Service
10088 resource string
10089 setiampolicyrequest *SetIamPolicyRequest
10090 urlParams_ gensupport.URLParams
10091 ctx_ context.Context
10092 header_ http.Header
10093 }
10094
10095
10096
10097
10098
10099
10100
10101
10102 func (r *ProjectsLocationsServiceBindingsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsServiceBindingsSetIamPolicyCall {
10103 c := &ProjectsLocationsServiceBindingsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10104 c.resource = resource
10105 c.setiampolicyrequest = setiampolicyrequest
10106 return c
10107 }
10108
10109
10110
10111
10112 func (c *ProjectsLocationsServiceBindingsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsSetIamPolicyCall {
10113 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10114 return c
10115 }
10116
10117
10118 func (c *ProjectsLocationsServiceBindingsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsSetIamPolicyCall {
10119 c.ctx_ = ctx
10120 return c
10121 }
10122
10123
10124
10125 func (c *ProjectsLocationsServiceBindingsSetIamPolicyCall) Header() http.Header {
10126 if c.header_ == nil {
10127 c.header_ = make(http.Header)
10128 }
10129 return c.header_
10130 }
10131
10132 func (c *ProjectsLocationsServiceBindingsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
10133 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10134 var body io.Reader = nil
10135 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
10136 if err != nil {
10137 return nil, err
10138 }
10139 c.urlParams_.Set("alt", alt)
10140 c.urlParams_.Set("prettyPrint", "false")
10141 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:setIamPolicy")
10142 urls += "?" + c.urlParams_.Encode()
10143 req, err := http.NewRequest("POST", urls, body)
10144 if err != nil {
10145 return nil, err
10146 }
10147 req.Header = reqHeaders
10148 googleapi.Expand(req.URL, map[string]string{
10149 "resource": c.resource,
10150 })
10151 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10152 }
10153
10154
10155
10156
10157
10158
10159 func (c *ProjectsLocationsServiceBindingsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
10160 gensupport.SetOptions(c.urlParams_, opts...)
10161 res, err := c.doRequest("json")
10162 if res != nil && res.StatusCode == http.StatusNotModified {
10163 if res.Body != nil {
10164 res.Body.Close()
10165 }
10166 return nil, gensupport.WrapError(&googleapi.Error{
10167 Code: res.StatusCode,
10168 Header: res.Header,
10169 })
10170 }
10171 if err != nil {
10172 return nil, err
10173 }
10174 defer googleapi.CloseBody(res)
10175 if err := googleapi.CheckResponse(res); err != nil {
10176 return nil, gensupport.WrapError(err)
10177 }
10178 ret := &Policy{
10179 ServerResponse: googleapi.ServerResponse{
10180 Header: res.Header,
10181 HTTPStatusCode: res.StatusCode,
10182 },
10183 }
10184 target := &ret
10185 if err := gensupport.DecodeResponse(target, res); err != nil {
10186 return nil, err
10187 }
10188 return ret, nil
10189 }
10190
10191 type ProjectsLocationsServiceBindingsTestIamPermissionsCall struct {
10192 s *Service
10193 resource string
10194 testiampermissionsrequest *TestIamPermissionsRequest
10195 urlParams_ gensupport.URLParams
10196 ctx_ context.Context
10197 header_ http.Header
10198 }
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210 func (r *ProjectsLocationsServiceBindingsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsServiceBindingsTestIamPermissionsCall {
10211 c := &ProjectsLocationsServiceBindingsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10212 c.resource = resource
10213 c.testiampermissionsrequest = testiampermissionsrequest
10214 return c
10215 }
10216
10217
10218
10219
10220 func (c *ProjectsLocationsServiceBindingsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsTestIamPermissionsCall {
10221 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10222 return c
10223 }
10224
10225
10226 func (c *ProjectsLocationsServiceBindingsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsTestIamPermissionsCall {
10227 c.ctx_ = ctx
10228 return c
10229 }
10230
10231
10232
10233 func (c *ProjectsLocationsServiceBindingsTestIamPermissionsCall) Header() http.Header {
10234 if c.header_ == nil {
10235 c.header_ = make(http.Header)
10236 }
10237 return c.header_
10238 }
10239
10240 func (c *ProjectsLocationsServiceBindingsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
10241 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10242 var body io.Reader = nil
10243 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
10244 if err != nil {
10245 return nil, err
10246 }
10247 c.urlParams_.Set("alt", alt)
10248 c.urlParams_.Set("prettyPrint", "false")
10249 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:testIamPermissions")
10250 urls += "?" + c.urlParams_.Encode()
10251 req, err := http.NewRequest("POST", urls, body)
10252 if err != nil {
10253 return nil, err
10254 }
10255 req.Header = reqHeaders
10256 googleapi.Expand(req.URL, map[string]string{
10257 "resource": c.resource,
10258 })
10259 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10260 }
10261
10262
10263
10264
10265
10266
10267
10268 func (c *ProjectsLocationsServiceBindingsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
10269 gensupport.SetOptions(c.urlParams_, opts...)
10270 res, err := c.doRequest("json")
10271 if res != nil && res.StatusCode == http.StatusNotModified {
10272 if res.Body != nil {
10273 res.Body.Close()
10274 }
10275 return nil, gensupport.WrapError(&googleapi.Error{
10276 Code: res.StatusCode,
10277 Header: res.Header,
10278 })
10279 }
10280 if err != nil {
10281 return nil, err
10282 }
10283 defer googleapi.CloseBody(res)
10284 if err := googleapi.CheckResponse(res); err != nil {
10285 return nil, gensupport.WrapError(err)
10286 }
10287 ret := &TestIamPermissionsResponse{
10288 ServerResponse: googleapi.ServerResponse{
10289 Header: res.Header,
10290 HTTPStatusCode: res.StatusCode,
10291 },
10292 }
10293 target := &ret
10294 if err := gensupport.DecodeResponse(target, res); err != nil {
10295 return nil, err
10296 }
10297 return ret, nil
10298 }
10299
10300 type ProjectsLocationsServiceLbPoliciesCreateCall struct {
10301 s *Service
10302 parent string
10303 servicelbpolicy *ServiceLbPolicy
10304 urlParams_ gensupport.URLParams
10305 ctx_ context.Context
10306 header_ http.Header
10307 }
10308
10309
10310
10311
10312
10313 func (r *ProjectsLocationsServiceLbPoliciesService) Create(parent string, servicelbpolicy *ServiceLbPolicy) *ProjectsLocationsServiceLbPoliciesCreateCall {
10314 c := &ProjectsLocationsServiceLbPoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10315 c.parent = parent
10316 c.servicelbpolicy = servicelbpolicy
10317 return c
10318 }
10319
10320
10321
10322
10323
10324
10325 func (c *ProjectsLocationsServiceLbPoliciesCreateCall) ServiceLbPolicyId(serviceLbPolicyId string) *ProjectsLocationsServiceLbPoliciesCreateCall {
10326 c.urlParams_.Set("serviceLbPolicyId", serviceLbPolicyId)
10327 return c
10328 }
10329
10330
10331
10332
10333 func (c *ProjectsLocationsServiceLbPoliciesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceLbPoliciesCreateCall {
10334 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10335 return c
10336 }
10337
10338
10339 func (c *ProjectsLocationsServiceLbPoliciesCreateCall) Context(ctx context.Context) *ProjectsLocationsServiceLbPoliciesCreateCall {
10340 c.ctx_ = ctx
10341 return c
10342 }
10343
10344
10345
10346 func (c *ProjectsLocationsServiceLbPoliciesCreateCall) Header() http.Header {
10347 if c.header_ == nil {
10348 c.header_ = make(http.Header)
10349 }
10350 return c.header_
10351 }
10352
10353 func (c *ProjectsLocationsServiceLbPoliciesCreateCall) doRequest(alt string) (*http.Response, error) {
10354 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10355 var body io.Reader = nil
10356 body, err := googleapi.WithoutDataWrapper.JSONReader(c.servicelbpolicy)
10357 if err != nil {
10358 return nil, err
10359 }
10360 c.urlParams_.Set("alt", alt)
10361 c.urlParams_.Set("prettyPrint", "false")
10362 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/serviceLbPolicies")
10363 urls += "?" + c.urlParams_.Encode()
10364 req, err := http.NewRequest("POST", urls, body)
10365 if err != nil {
10366 return nil, err
10367 }
10368 req.Header = reqHeaders
10369 googleapi.Expand(req.URL, map[string]string{
10370 "parent": c.parent,
10371 })
10372 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10373 }
10374
10375
10376
10377
10378
10379
10380 func (c *ProjectsLocationsServiceLbPoliciesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10381 gensupport.SetOptions(c.urlParams_, opts...)
10382 res, err := c.doRequest("json")
10383 if res != nil && res.StatusCode == http.StatusNotModified {
10384 if res.Body != nil {
10385 res.Body.Close()
10386 }
10387 return nil, gensupport.WrapError(&googleapi.Error{
10388 Code: res.StatusCode,
10389 Header: res.Header,
10390 })
10391 }
10392 if err != nil {
10393 return nil, err
10394 }
10395 defer googleapi.CloseBody(res)
10396 if err := googleapi.CheckResponse(res); err != nil {
10397 return nil, gensupport.WrapError(err)
10398 }
10399 ret := &Operation{
10400 ServerResponse: googleapi.ServerResponse{
10401 Header: res.Header,
10402 HTTPStatusCode: res.StatusCode,
10403 },
10404 }
10405 target := &ret
10406 if err := gensupport.DecodeResponse(target, res); err != nil {
10407 return nil, err
10408 }
10409 return ret, nil
10410 }
10411
10412 type ProjectsLocationsServiceLbPoliciesDeleteCall struct {
10413 s *Service
10414 name string
10415 urlParams_ gensupport.URLParams
10416 ctx_ context.Context
10417 header_ http.Header
10418 }
10419
10420
10421
10422
10423
10424 func (r *ProjectsLocationsServiceLbPoliciesService) Delete(name string) *ProjectsLocationsServiceLbPoliciesDeleteCall {
10425 c := &ProjectsLocationsServiceLbPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10426 c.name = name
10427 return c
10428 }
10429
10430
10431
10432
10433 func (c *ProjectsLocationsServiceLbPoliciesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceLbPoliciesDeleteCall {
10434 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10435 return c
10436 }
10437
10438
10439 func (c *ProjectsLocationsServiceLbPoliciesDeleteCall) Context(ctx context.Context) *ProjectsLocationsServiceLbPoliciesDeleteCall {
10440 c.ctx_ = ctx
10441 return c
10442 }
10443
10444
10445
10446 func (c *ProjectsLocationsServiceLbPoliciesDeleteCall) Header() http.Header {
10447 if c.header_ == nil {
10448 c.header_ = make(http.Header)
10449 }
10450 return c.header_
10451 }
10452
10453 func (c *ProjectsLocationsServiceLbPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) {
10454 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10455 var body io.Reader = nil
10456 c.urlParams_.Set("alt", alt)
10457 c.urlParams_.Set("prettyPrint", "false")
10458 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
10459 urls += "?" + c.urlParams_.Encode()
10460 req, err := http.NewRequest("DELETE", urls, body)
10461 if err != nil {
10462 return nil, err
10463 }
10464 req.Header = reqHeaders
10465 googleapi.Expand(req.URL, map[string]string{
10466 "name": c.name,
10467 })
10468 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10469 }
10470
10471
10472
10473
10474
10475
10476 func (c *ProjectsLocationsServiceLbPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10477 gensupport.SetOptions(c.urlParams_, opts...)
10478 res, err := c.doRequest("json")
10479 if res != nil && res.StatusCode == http.StatusNotModified {
10480 if res.Body != nil {
10481 res.Body.Close()
10482 }
10483 return nil, gensupport.WrapError(&googleapi.Error{
10484 Code: res.StatusCode,
10485 Header: res.Header,
10486 })
10487 }
10488 if err != nil {
10489 return nil, err
10490 }
10491 defer googleapi.CloseBody(res)
10492 if err := googleapi.CheckResponse(res); err != nil {
10493 return nil, gensupport.WrapError(err)
10494 }
10495 ret := &Operation{
10496 ServerResponse: googleapi.ServerResponse{
10497 Header: res.Header,
10498 HTTPStatusCode: res.StatusCode,
10499 },
10500 }
10501 target := &ret
10502 if err := gensupport.DecodeResponse(target, res); err != nil {
10503 return nil, err
10504 }
10505 return ret, nil
10506 }
10507
10508 type ProjectsLocationsServiceLbPoliciesGetCall struct {
10509 s *Service
10510 name string
10511 urlParams_ gensupport.URLParams
10512 ifNoneMatch_ string
10513 ctx_ context.Context
10514 header_ http.Header
10515 }
10516
10517
10518
10519
10520
10521 func (r *ProjectsLocationsServiceLbPoliciesService) Get(name string) *ProjectsLocationsServiceLbPoliciesGetCall {
10522 c := &ProjectsLocationsServiceLbPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10523 c.name = name
10524 return c
10525 }
10526
10527
10528
10529
10530 func (c *ProjectsLocationsServiceLbPoliciesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceLbPoliciesGetCall {
10531 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10532 return c
10533 }
10534
10535
10536
10537
10538 func (c *ProjectsLocationsServiceLbPoliciesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceLbPoliciesGetCall {
10539 c.ifNoneMatch_ = entityTag
10540 return c
10541 }
10542
10543
10544 func (c *ProjectsLocationsServiceLbPoliciesGetCall) Context(ctx context.Context) *ProjectsLocationsServiceLbPoliciesGetCall {
10545 c.ctx_ = ctx
10546 return c
10547 }
10548
10549
10550
10551 func (c *ProjectsLocationsServiceLbPoliciesGetCall) Header() http.Header {
10552 if c.header_ == nil {
10553 c.header_ = make(http.Header)
10554 }
10555 return c.header_
10556 }
10557
10558 func (c *ProjectsLocationsServiceLbPoliciesGetCall) doRequest(alt string) (*http.Response, error) {
10559 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10560 if c.ifNoneMatch_ != "" {
10561 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10562 }
10563 var body io.Reader = nil
10564 c.urlParams_.Set("alt", alt)
10565 c.urlParams_.Set("prettyPrint", "false")
10566 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
10567 urls += "?" + c.urlParams_.Encode()
10568 req, err := http.NewRequest("GET", urls, body)
10569 if err != nil {
10570 return nil, err
10571 }
10572 req.Header = reqHeaders
10573 googleapi.Expand(req.URL, map[string]string{
10574 "name": c.name,
10575 })
10576 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10577 }
10578
10579
10580
10581
10582
10583
10584
10585 func (c *ProjectsLocationsServiceLbPoliciesGetCall) Do(opts ...googleapi.CallOption) (*ServiceLbPolicy, error) {
10586 gensupport.SetOptions(c.urlParams_, opts...)
10587 res, err := c.doRequest("json")
10588 if res != nil && res.StatusCode == http.StatusNotModified {
10589 if res.Body != nil {
10590 res.Body.Close()
10591 }
10592 return nil, gensupport.WrapError(&googleapi.Error{
10593 Code: res.StatusCode,
10594 Header: res.Header,
10595 })
10596 }
10597 if err != nil {
10598 return nil, err
10599 }
10600 defer googleapi.CloseBody(res)
10601 if err := googleapi.CheckResponse(res); err != nil {
10602 return nil, gensupport.WrapError(err)
10603 }
10604 ret := &ServiceLbPolicy{
10605 ServerResponse: googleapi.ServerResponse{
10606 Header: res.Header,
10607 HTTPStatusCode: res.StatusCode,
10608 },
10609 }
10610 target := &ret
10611 if err := gensupport.DecodeResponse(target, res); err != nil {
10612 return nil, err
10613 }
10614 return ret, nil
10615 }
10616
10617 type ProjectsLocationsServiceLbPoliciesGetIamPolicyCall struct {
10618 s *Service
10619 resource string
10620 urlParams_ gensupport.URLParams
10621 ifNoneMatch_ string
10622 ctx_ context.Context
10623 header_ http.Header
10624 }
10625
10626
10627
10628
10629
10630
10631
10632 func (r *ProjectsLocationsServiceLbPoliciesService) GetIamPolicy(resource string) *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall {
10633 c := &ProjectsLocationsServiceLbPoliciesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10634 c.resource = resource
10635 return c
10636 }
10637
10638
10639
10640
10641
10642
10643
10644
10645
10646
10647
10648
10649
10650 func (c *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall {
10651 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
10652 return c
10653 }
10654
10655
10656
10657
10658 func (c *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall {
10659 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10660 return c
10661 }
10662
10663
10664
10665
10666 func (c *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall {
10667 c.ifNoneMatch_ = entityTag
10668 return c
10669 }
10670
10671
10672 func (c *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall {
10673 c.ctx_ = ctx
10674 return c
10675 }
10676
10677
10678
10679 func (c *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall) Header() http.Header {
10680 if c.header_ == nil {
10681 c.header_ = make(http.Header)
10682 }
10683 return c.header_
10684 }
10685
10686 func (c *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
10687 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10688 if c.ifNoneMatch_ != "" {
10689 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10690 }
10691 var body io.Reader = nil
10692 c.urlParams_.Set("alt", alt)
10693 c.urlParams_.Set("prettyPrint", "false")
10694 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:getIamPolicy")
10695 urls += "?" + c.urlParams_.Encode()
10696 req, err := http.NewRequest("GET", urls, body)
10697 if err != nil {
10698 return nil, err
10699 }
10700 req.Header = reqHeaders
10701 googleapi.Expand(req.URL, map[string]string{
10702 "resource": c.resource,
10703 })
10704 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10705 }
10706
10707
10708
10709
10710
10711
10712 func (c *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
10713 gensupport.SetOptions(c.urlParams_, opts...)
10714 res, err := c.doRequest("json")
10715 if res != nil && res.StatusCode == http.StatusNotModified {
10716 if res.Body != nil {
10717 res.Body.Close()
10718 }
10719 return nil, gensupport.WrapError(&googleapi.Error{
10720 Code: res.StatusCode,
10721 Header: res.Header,
10722 })
10723 }
10724 if err != nil {
10725 return nil, err
10726 }
10727 defer googleapi.CloseBody(res)
10728 if err := googleapi.CheckResponse(res); err != nil {
10729 return nil, gensupport.WrapError(err)
10730 }
10731 ret := &Policy{
10732 ServerResponse: googleapi.ServerResponse{
10733 Header: res.Header,
10734 HTTPStatusCode: res.StatusCode,
10735 },
10736 }
10737 target := &ret
10738 if err := gensupport.DecodeResponse(target, res); err != nil {
10739 return nil, err
10740 }
10741 return ret, nil
10742 }
10743
10744 type ProjectsLocationsServiceLbPoliciesListCall struct {
10745 s *Service
10746 parent string
10747 urlParams_ gensupport.URLParams
10748 ifNoneMatch_ string
10749 ctx_ context.Context
10750 header_ http.Header
10751 }
10752
10753
10754
10755
10756
10757
10758 func (r *ProjectsLocationsServiceLbPoliciesService) List(parent string) *ProjectsLocationsServiceLbPoliciesListCall {
10759 c := &ProjectsLocationsServiceLbPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10760 c.parent = parent
10761 return c
10762 }
10763
10764
10765
10766 func (c *ProjectsLocationsServiceLbPoliciesListCall) PageSize(pageSize int64) *ProjectsLocationsServiceLbPoliciesListCall {
10767 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
10768 return c
10769 }
10770
10771
10772
10773
10774
10775 func (c *ProjectsLocationsServiceLbPoliciesListCall) PageToken(pageToken string) *ProjectsLocationsServiceLbPoliciesListCall {
10776 c.urlParams_.Set("pageToken", pageToken)
10777 return c
10778 }
10779
10780
10781
10782
10783 func (c *ProjectsLocationsServiceLbPoliciesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceLbPoliciesListCall {
10784 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10785 return c
10786 }
10787
10788
10789
10790
10791 func (c *ProjectsLocationsServiceLbPoliciesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceLbPoliciesListCall {
10792 c.ifNoneMatch_ = entityTag
10793 return c
10794 }
10795
10796
10797 func (c *ProjectsLocationsServiceLbPoliciesListCall) Context(ctx context.Context) *ProjectsLocationsServiceLbPoliciesListCall {
10798 c.ctx_ = ctx
10799 return c
10800 }
10801
10802
10803
10804 func (c *ProjectsLocationsServiceLbPoliciesListCall) Header() http.Header {
10805 if c.header_ == nil {
10806 c.header_ = make(http.Header)
10807 }
10808 return c.header_
10809 }
10810
10811 func (c *ProjectsLocationsServiceLbPoliciesListCall) doRequest(alt string) (*http.Response, error) {
10812 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10813 if c.ifNoneMatch_ != "" {
10814 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10815 }
10816 var body io.Reader = nil
10817 c.urlParams_.Set("alt", alt)
10818 c.urlParams_.Set("prettyPrint", "false")
10819 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/serviceLbPolicies")
10820 urls += "?" + c.urlParams_.Encode()
10821 req, err := http.NewRequest("GET", urls, body)
10822 if err != nil {
10823 return nil, err
10824 }
10825 req.Header = reqHeaders
10826 googleapi.Expand(req.URL, map[string]string{
10827 "parent": c.parent,
10828 })
10829 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10830 }
10831
10832
10833
10834
10835
10836
10837
10838 func (c *ProjectsLocationsServiceLbPoliciesListCall) Do(opts ...googleapi.CallOption) (*ListServiceLbPoliciesResponse, error) {
10839 gensupport.SetOptions(c.urlParams_, opts...)
10840 res, err := c.doRequest("json")
10841 if res != nil && res.StatusCode == http.StatusNotModified {
10842 if res.Body != nil {
10843 res.Body.Close()
10844 }
10845 return nil, gensupport.WrapError(&googleapi.Error{
10846 Code: res.StatusCode,
10847 Header: res.Header,
10848 })
10849 }
10850 if err != nil {
10851 return nil, err
10852 }
10853 defer googleapi.CloseBody(res)
10854 if err := googleapi.CheckResponse(res); err != nil {
10855 return nil, gensupport.WrapError(err)
10856 }
10857 ret := &ListServiceLbPoliciesResponse{
10858 ServerResponse: googleapi.ServerResponse{
10859 Header: res.Header,
10860 HTTPStatusCode: res.StatusCode,
10861 },
10862 }
10863 target := &ret
10864 if err := gensupport.DecodeResponse(target, res); err != nil {
10865 return nil, err
10866 }
10867 return ret, nil
10868 }
10869
10870
10871
10872
10873 func (c *ProjectsLocationsServiceLbPoliciesListCall) Pages(ctx context.Context, f func(*ListServiceLbPoliciesResponse) error) error {
10874 c.ctx_ = ctx
10875 defer c.PageToken(c.urlParams_.Get("pageToken"))
10876 for {
10877 x, err := c.Do()
10878 if err != nil {
10879 return err
10880 }
10881 if err := f(x); err != nil {
10882 return err
10883 }
10884 if x.NextPageToken == "" {
10885 return nil
10886 }
10887 c.PageToken(x.NextPageToken)
10888 }
10889 }
10890
10891 type ProjectsLocationsServiceLbPoliciesPatchCall struct {
10892 s *Service
10893 name string
10894 servicelbpolicy *ServiceLbPolicy
10895 urlParams_ gensupport.URLParams
10896 ctx_ context.Context
10897 header_ http.Header
10898 }
10899
10900
10901
10902
10903
10904
10905 func (r *ProjectsLocationsServiceLbPoliciesService) Patch(name string, servicelbpolicy *ServiceLbPolicy) *ProjectsLocationsServiceLbPoliciesPatchCall {
10906 c := &ProjectsLocationsServiceLbPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10907 c.name = name
10908 c.servicelbpolicy = servicelbpolicy
10909 return c
10910 }
10911
10912
10913
10914
10915
10916
10917
10918 func (c *ProjectsLocationsServiceLbPoliciesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsServiceLbPoliciesPatchCall {
10919 c.urlParams_.Set("updateMask", updateMask)
10920 return c
10921 }
10922
10923
10924
10925
10926 func (c *ProjectsLocationsServiceLbPoliciesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceLbPoliciesPatchCall {
10927 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10928 return c
10929 }
10930
10931
10932 func (c *ProjectsLocationsServiceLbPoliciesPatchCall) Context(ctx context.Context) *ProjectsLocationsServiceLbPoliciesPatchCall {
10933 c.ctx_ = ctx
10934 return c
10935 }
10936
10937
10938
10939 func (c *ProjectsLocationsServiceLbPoliciesPatchCall) Header() http.Header {
10940 if c.header_ == nil {
10941 c.header_ = make(http.Header)
10942 }
10943 return c.header_
10944 }
10945
10946 func (c *ProjectsLocationsServiceLbPoliciesPatchCall) doRequest(alt string) (*http.Response, error) {
10947 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10948 var body io.Reader = nil
10949 body, err := googleapi.WithoutDataWrapper.JSONReader(c.servicelbpolicy)
10950 if err != nil {
10951 return nil, err
10952 }
10953 c.urlParams_.Set("alt", alt)
10954 c.urlParams_.Set("prettyPrint", "false")
10955 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
10956 urls += "?" + c.urlParams_.Encode()
10957 req, err := http.NewRequest("PATCH", urls, body)
10958 if err != nil {
10959 return nil, err
10960 }
10961 req.Header = reqHeaders
10962 googleapi.Expand(req.URL, map[string]string{
10963 "name": c.name,
10964 })
10965 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10966 }
10967
10968
10969
10970
10971
10972
10973 func (c *ProjectsLocationsServiceLbPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10974 gensupport.SetOptions(c.urlParams_, opts...)
10975 res, err := c.doRequest("json")
10976 if res != nil && res.StatusCode == http.StatusNotModified {
10977 if res.Body != nil {
10978 res.Body.Close()
10979 }
10980 return nil, gensupport.WrapError(&googleapi.Error{
10981 Code: res.StatusCode,
10982 Header: res.Header,
10983 })
10984 }
10985 if err != nil {
10986 return nil, err
10987 }
10988 defer googleapi.CloseBody(res)
10989 if err := googleapi.CheckResponse(res); err != nil {
10990 return nil, gensupport.WrapError(err)
10991 }
10992 ret := &Operation{
10993 ServerResponse: googleapi.ServerResponse{
10994 Header: res.Header,
10995 HTTPStatusCode: res.StatusCode,
10996 },
10997 }
10998 target := &ret
10999 if err := gensupport.DecodeResponse(target, res); err != nil {
11000 return nil, err
11001 }
11002 return ret, nil
11003 }
11004
11005 type ProjectsLocationsServiceLbPoliciesSetIamPolicyCall struct {
11006 s *Service
11007 resource string
11008 setiampolicyrequest *SetIamPolicyRequest
11009 urlParams_ gensupport.URLParams
11010 ctx_ context.Context
11011 header_ http.Header
11012 }
11013
11014
11015
11016
11017
11018
11019
11020
11021 func (r *ProjectsLocationsServiceLbPoliciesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsServiceLbPoliciesSetIamPolicyCall {
11022 c := &ProjectsLocationsServiceLbPoliciesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11023 c.resource = resource
11024 c.setiampolicyrequest = setiampolicyrequest
11025 return c
11026 }
11027
11028
11029
11030
11031 func (c *ProjectsLocationsServiceLbPoliciesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceLbPoliciesSetIamPolicyCall {
11032 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11033 return c
11034 }
11035
11036
11037 func (c *ProjectsLocationsServiceLbPoliciesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceLbPoliciesSetIamPolicyCall {
11038 c.ctx_ = ctx
11039 return c
11040 }
11041
11042
11043
11044 func (c *ProjectsLocationsServiceLbPoliciesSetIamPolicyCall) Header() http.Header {
11045 if c.header_ == nil {
11046 c.header_ = make(http.Header)
11047 }
11048 return c.header_
11049 }
11050
11051 func (c *ProjectsLocationsServiceLbPoliciesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
11052 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11053 var body io.Reader = nil
11054 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
11055 if err != nil {
11056 return nil, err
11057 }
11058 c.urlParams_.Set("alt", alt)
11059 c.urlParams_.Set("prettyPrint", "false")
11060 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:setIamPolicy")
11061 urls += "?" + c.urlParams_.Encode()
11062 req, err := http.NewRequest("POST", urls, body)
11063 if err != nil {
11064 return nil, err
11065 }
11066 req.Header = reqHeaders
11067 googleapi.Expand(req.URL, map[string]string{
11068 "resource": c.resource,
11069 })
11070 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11071 }
11072
11073
11074
11075
11076
11077
11078 func (c *ProjectsLocationsServiceLbPoliciesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
11079 gensupport.SetOptions(c.urlParams_, opts...)
11080 res, err := c.doRequest("json")
11081 if res != nil && res.StatusCode == http.StatusNotModified {
11082 if res.Body != nil {
11083 res.Body.Close()
11084 }
11085 return nil, gensupport.WrapError(&googleapi.Error{
11086 Code: res.StatusCode,
11087 Header: res.Header,
11088 })
11089 }
11090 if err != nil {
11091 return nil, err
11092 }
11093 defer googleapi.CloseBody(res)
11094 if err := googleapi.CheckResponse(res); err != nil {
11095 return nil, gensupport.WrapError(err)
11096 }
11097 ret := &Policy{
11098 ServerResponse: googleapi.ServerResponse{
11099 Header: res.Header,
11100 HTTPStatusCode: res.StatusCode,
11101 },
11102 }
11103 target := &ret
11104 if err := gensupport.DecodeResponse(target, res); err != nil {
11105 return nil, err
11106 }
11107 return ret, nil
11108 }
11109
11110 type ProjectsLocationsServiceLbPoliciesTestIamPermissionsCall struct {
11111 s *Service
11112 resource string
11113 testiampermissionsrequest *TestIamPermissionsRequest
11114 urlParams_ gensupport.URLParams
11115 ctx_ context.Context
11116 header_ http.Header
11117 }
11118
11119
11120
11121
11122
11123
11124
11125
11126
11127
11128
11129 func (r *ProjectsLocationsServiceLbPoliciesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsServiceLbPoliciesTestIamPermissionsCall {
11130 c := &ProjectsLocationsServiceLbPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11131 c.resource = resource
11132 c.testiampermissionsrequest = testiampermissionsrequest
11133 return c
11134 }
11135
11136
11137
11138
11139 func (c *ProjectsLocationsServiceLbPoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceLbPoliciesTestIamPermissionsCall {
11140 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11141 return c
11142 }
11143
11144
11145 func (c *ProjectsLocationsServiceLbPoliciesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsServiceLbPoliciesTestIamPermissionsCall {
11146 c.ctx_ = ctx
11147 return c
11148 }
11149
11150
11151
11152 func (c *ProjectsLocationsServiceLbPoliciesTestIamPermissionsCall) Header() http.Header {
11153 if c.header_ == nil {
11154 c.header_ = make(http.Header)
11155 }
11156 return c.header_
11157 }
11158
11159 func (c *ProjectsLocationsServiceLbPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
11160 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11161 var body io.Reader = nil
11162 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
11163 if err != nil {
11164 return nil, err
11165 }
11166 c.urlParams_.Set("alt", alt)
11167 c.urlParams_.Set("prettyPrint", "false")
11168 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:testIamPermissions")
11169 urls += "?" + c.urlParams_.Encode()
11170 req, err := http.NewRequest("POST", urls, body)
11171 if err != nil {
11172 return nil, err
11173 }
11174 req.Header = reqHeaders
11175 googleapi.Expand(req.URL, map[string]string{
11176 "resource": c.resource,
11177 })
11178 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11179 }
11180
11181
11182
11183
11184
11185
11186
11187 func (c *ProjectsLocationsServiceLbPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
11188 gensupport.SetOptions(c.urlParams_, opts...)
11189 res, err := c.doRequest("json")
11190 if res != nil && res.StatusCode == http.StatusNotModified {
11191 if res.Body != nil {
11192 res.Body.Close()
11193 }
11194 return nil, gensupport.WrapError(&googleapi.Error{
11195 Code: res.StatusCode,
11196 Header: res.Header,
11197 })
11198 }
11199 if err != nil {
11200 return nil, err
11201 }
11202 defer googleapi.CloseBody(res)
11203 if err := googleapi.CheckResponse(res); err != nil {
11204 return nil, gensupport.WrapError(err)
11205 }
11206 ret := &TestIamPermissionsResponse{
11207 ServerResponse: googleapi.ServerResponse{
11208 Header: res.Header,
11209 HTTPStatusCode: res.StatusCode,
11210 },
11211 }
11212 target := &ret
11213 if err := gensupport.DecodeResponse(target, res); err != nil {
11214 return nil, err
11215 }
11216 return ret, nil
11217 }
11218
11219 type ProjectsLocationsTcpRoutesCreateCall struct {
11220 s *Service
11221 parent string
11222 tcproute *TcpRoute
11223 urlParams_ gensupport.URLParams
11224 ctx_ context.Context
11225 header_ http.Header
11226 }
11227
11228
11229
11230
11231
11232 func (r *ProjectsLocationsTcpRoutesService) Create(parent string, tcproute *TcpRoute) *ProjectsLocationsTcpRoutesCreateCall {
11233 c := &ProjectsLocationsTcpRoutesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11234 c.parent = parent
11235 c.tcproute = tcproute
11236 return c
11237 }
11238
11239
11240
11241 func (c *ProjectsLocationsTcpRoutesCreateCall) TcpRouteId(tcpRouteId string) *ProjectsLocationsTcpRoutesCreateCall {
11242 c.urlParams_.Set("tcpRouteId", tcpRouteId)
11243 return c
11244 }
11245
11246
11247
11248
11249 func (c *ProjectsLocationsTcpRoutesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsTcpRoutesCreateCall {
11250 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11251 return c
11252 }
11253
11254
11255 func (c *ProjectsLocationsTcpRoutesCreateCall) Context(ctx context.Context) *ProjectsLocationsTcpRoutesCreateCall {
11256 c.ctx_ = ctx
11257 return c
11258 }
11259
11260
11261
11262 func (c *ProjectsLocationsTcpRoutesCreateCall) Header() http.Header {
11263 if c.header_ == nil {
11264 c.header_ = make(http.Header)
11265 }
11266 return c.header_
11267 }
11268
11269 func (c *ProjectsLocationsTcpRoutesCreateCall) doRequest(alt string) (*http.Response, error) {
11270 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11271 var body io.Reader = nil
11272 body, err := googleapi.WithoutDataWrapper.JSONReader(c.tcproute)
11273 if err != nil {
11274 return nil, err
11275 }
11276 c.urlParams_.Set("alt", alt)
11277 c.urlParams_.Set("prettyPrint", "false")
11278 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/tcpRoutes")
11279 urls += "?" + c.urlParams_.Encode()
11280 req, err := http.NewRequest("POST", urls, body)
11281 if err != nil {
11282 return nil, err
11283 }
11284 req.Header = reqHeaders
11285 googleapi.Expand(req.URL, map[string]string{
11286 "parent": c.parent,
11287 })
11288 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11289 }
11290
11291
11292
11293
11294
11295
11296 func (c *ProjectsLocationsTcpRoutesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
11297 gensupport.SetOptions(c.urlParams_, opts...)
11298 res, err := c.doRequest("json")
11299 if res != nil && res.StatusCode == http.StatusNotModified {
11300 if res.Body != nil {
11301 res.Body.Close()
11302 }
11303 return nil, gensupport.WrapError(&googleapi.Error{
11304 Code: res.StatusCode,
11305 Header: res.Header,
11306 })
11307 }
11308 if err != nil {
11309 return nil, err
11310 }
11311 defer googleapi.CloseBody(res)
11312 if err := googleapi.CheckResponse(res); err != nil {
11313 return nil, gensupport.WrapError(err)
11314 }
11315 ret := &Operation{
11316 ServerResponse: googleapi.ServerResponse{
11317 Header: res.Header,
11318 HTTPStatusCode: res.StatusCode,
11319 },
11320 }
11321 target := &ret
11322 if err := gensupport.DecodeResponse(target, res); err != nil {
11323 return nil, err
11324 }
11325 return ret, nil
11326 }
11327
11328 type ProjectsLocationsTcpRoutesDeleteCall struct {
11329 s *Service
11330 name string
11331 urlParams_ gensupport.URLParams
11332 ctx_ context.Context
11333 header_ http.Header
11334 }
11335
11336
11337
11338
11339
11340 func (r *ProjectsLocationsTcpRoutesService) Delete(name string) *ProjectsLocationsTcpRoutesDeleteCall {
11341 c := &ProjectsLocationsTcpRoutesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11342 c.name = name
11343 return c
11344 }
11345
11346
11347
11348
11349 func (c *ProjectsLocationsTcpRoutesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsTcpRoutesDeleteCall {
11350 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11351 return c
11352 }
11353
11354
11355 func (c *ProjectsLocationsTcpRoutesDeleteCall) Context(ctx context.Context) *ProjectsLocationsTcpRoutesDeleteCall {
11356 c.ctx_ = ctx
11357 return c
11358 }
11359
11360
11361
11362 func (c *ProjectsLocationsTcpRoutesDeleteCall) Header() http.Header {
11363 if c.header_ == nil {
11364 c.header_ = make(http.Header)
11365 }
11366 return c.header_
11367 }
11368
11369 func (c *ProjectsLocationsTcpRoutesDeleteCall) doRequest(alt string) (*http.Response, error) {
11370 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11371 var body io.Reader = nil
11372 c.urlParams_.Set("alt", alt)
11373 c.urlParams_.Set("prettyPrint", "false")
11374 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
11375 urls += "?" + c.urlParams_.Encode()
11376 req, err := http.NewRequest("DELETE", urls, body)
11377 if err != nil {
11378 return nil, err
11379 }
11380 req.Header = reqHeaders
11381 googleapi.Expand(req.URL, map[string]string{
11382 "name": c.name,
11383 })
11384 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11385 }
11386
11387
11388
11389
11390
11391
11392 func (c *ProjectsLocationsTcpRoutesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
11393 gensupport.SetOptions(c.urlParams_, opts...)
11394 res, err := c.doRequest("json")
11395 if res != nil && res.StatusCode == http.StatusNotModified {
11396 if res.Body != nil {
11397 res.Body.Close()
11398 }
11399 return nil, gensupport.WrapError(&googleapi.Error{
11400 Code: res.StatusCode,
11401 Header: res.Header,
11402 })
11403 }
11404 if err != nil {
11405 return nil, err
11406 }
11407 defer googleapi.CloseBody(res)
11408 if err := googleapi.CheckResponse(res); err != nil {
11409 return nil, gensupport.WrapError(err)
11410 }
11411 ret := &Operation{
11412 ServerResponse: googleapi.ServerResponse{
11413 Header: res.Header,
11414 HTTPStatusCode: res.StatusCode,
11415 },
11416 }
11417 target := &ret
11418 if err := gensupport.DecodeResponse(target, res); err != nil {
11419 return nil, err
11420 }
11421 return ret, nil
11422 }
11423
11424 type ProjectsLocationsTcpRoutesGetCall struct {
11425 s *Service
11426 name string
11427 urlParams_ gensupport.URLParams
11428 ifNoneMatch_ string
11429 ctx_ context.Context
11430 header_ http.Header
11431 }
11432
11433
11434
11435
11436
11437 func (r *ProjectsLocationsTcpRoutesService) Get(name string) *ProjectsLocationsTcpRoutesGetCall {
11438 c := &ProjectsLocationsTcpRoutesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11439 c.name = name
11440 return c
11441 }
11442
11443
11444
11445
11446 func (c *ProjectsLocationsTcpRoutesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsTcpRoutesGetCall {
11447 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11448 return c
11449 }
11450
11451
11452
11453
11454 func (c *ProjectsLocationsTcpRoutesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsTcpRoutesGetCall {
11455 c.ifNoneMatch_ = entityTag
11456 return c
11457 }
11458
11459
11460 func (c *ProjectsLocationsTcpRoutesGetCall) Context(ctx context.Context) *ProjectsLocationsTcpRoutesGetCall {
11461 c.ctx_ = ctx
11462 return c
11463 }
11464
11465
11466
11467 func (c *ProjectsLocationsTcpRoutesGetCall) Header() http.Header {
11468 if c.header_ == nil {
11469 c.header_ = make(http.Header)
11470 }
11471 return c.header_
11472 }
11473
11474 func (c *ProjectsLocationsTcpRoutesGetCall) doRequest(alt string) (*http.Response, error) {
11475 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11476 if c.ifNoneMatch_ != "" {
11477 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11478 }
11479 var body io.Reader = nil
11480 c.urlParams_.Set("alt", alt)
11481 c.urlParams_.Set("prettyPrint", "false")
11482 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
11483 urls += "?" + c.urlParams_.Encode()
11484 req, err := http.NewRequest("GET", urls, body)
11485 if err != nil {
11486 return nil, err
11487 }
11488 req.Header = reqHeaders
11489 googleapi.Expand(req.URL, map[string]string{
11490 "name": c.name,
11491 })
11492 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11493 }
11494
11495
11496
11497
11498
11499
11500 func (c *ProjectsLocationsTcpRoutesGetCall) Do(opts ...googleapi.CallOption) (*TcpRoute, error) {
11501 gensupport.SetOptions(c.urlParams_, opts...)
11502 res, err := c.doRequest("json")
11503 if res != nil && res.StatusCode == http.StatusNotModified {
11504 if res.Body != nil {
11505 res.Body.Close()
11506 }
11507 return nil, gensupport.WrapError(&googleapi.Error{
11508 Code: res.StatusCode,
11509 Header: res.Header,
11510 })
11511 }
11512 if err != nil {
11513 return nil, err
11514 }
11515 defer googleapi.CloseBody(res)
11516 if err := googleapi.CheckResponse(res); err != nil {
11517 return nil, gensupport.WrapError(err)
11518 }
11519 ret := &TcpRoute{
11520 ServerResponse: googleapi.ServerResponse{
11521 Header: res.Header,
11522 HTTPStatusCode: res.StatusCode,
11523 },
11524 }
11525 target := &ret
11526 if err := gensupport.DecodeResponse(target, res); err != nil {
11527 return nil, err
11528 }
11529 return ret, nil
11530 }
11531
11532 type ProjectsLocationsTcpRoutesListCall struct {
11533 s *Service
11534 parent string
11535 urlParams_ gensupport.URLParams
11536 ifNoneMatch_ string
11537 ctx_ context.Context
11538 header_ http.Header
11539 }
11540
11541
11542
11543
11544
11545 func (r *ProjectsLocationsTcpRoutesService) List(parent string) *ProjectsLocationsTcpRoutesListCall {
11546 c := &ProjectsLocationsTcpRoutesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11547 c.parent = parent
11548 return c
11549 }
11550
11551
11552
11553 func (c *ProjectsLocationsTcpRoutesListCall) PageSize(pageSize int64) *ProjectsLocationsTcpRoutesListCall {
11554 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
11555 return c
11556 }
11557
11558
11559
11560
11561
11562 func (c *ProjectsLocationsTcpRoutesListCall) PageToken(pageToken string) *ProjectsLocationsTcpRoutesListCall {
11563 c.urlParams_.Set("pageToken", pageToken)
11564 return c
11565 }
11566
11567
11568
11569
11570 func (c *ProjectsLocationsTcpRoutesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsTcpRoutesListCall {
11571 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11572 return c
11573 }
11574
11575
11576
11577
11578 func (c *ProjectsLocationsTcpRoutesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsTcpRoutesListCall {
11579 c.ifNoneMatch_ = entityTag
11580 return c
11581 }
11582
11583
11584 func (c *ProjectsLocationsTcpRoutesListCall) Context(ctx context.Context) *ProjectsLocationsTcpRoutesListCall {
11585 c.ctx_ = ctx
11586 return c
11587 }
11588
11589
11590
11591 func (c *ProjectsLocationsTcpRoutesListCall) Header() http.Header {
11592 if c.header_ == nil {
11593 c.header_ = make(http.Header)
11594 }
11595 return c.header_
11596 }
11597
11598 func (c *ProjectsLocationsTcpRoutesListCall) doRequest(alt string) (*http.Response, error) {
11599 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11600 if c.ifNoneMatch_ != "" {
11601 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11602 }
11603 var body io.Reader = nil
11604 c.urlParams_.Set("alt", alt)
11605 c.urlParams_.Set("prettyPrint", "false")
11606 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/tcpRoutes")
11607 urls += "?" + c.urlParams_.Encode()
11608 req, err := http.NewRequest("GET", urls, body)
11609 if err != nil {
11610 return nil, err
11611 }
11612 req.Header = reqHeaders
11613 googleapi.Expand(req.URL, map[string]string{
11614 "parent": c.parent,
11615 })
11616 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11617 }
11618
11619
11620
11621
11622
11623
11624
11625 func (c *ProjectsLocationsTcpRoutesListCall) Do(opts ...googleapi.CallOption) (*ListTcpRoutesResponse, error) {
11626 gensupport.SetOptions(c.urlParams_, opts...)
11627 res, err := c.doRequest("json")
11628 if res != nil && res.StatusCode == http.StatusNotModified {
11629 if res.Body != nil {
11630 res.Body.Close()
11631 }
11632 return nil, gensupport.WrapError(&googleapi.Error{
11633 Code: res.StatusCode,
11634 Header: res.Header,
11635 })
11636 }
11637 if err != nil {
11638 return nil, err
11639 }
11640 defer googleapi.CloseBody(res)
11641 if err := googleapi.CheckResponse(res); err != nil {
11642 return nil, gensupport.WrapError(err)
11643 }
11644 ret := &ListTcpRoutesResponse{
11645 ServerResponse: googleapi.ServerResponse{
11646 Header: res.Header,
11647 HTTPStatusCode: res.StatusCode,
11648 },
11649 }
11650 target := &ret
11651 if err := gensupport.DecodeResponse(target, res); err != nil {
11652 return nil, err
11653 }
11654 return ret, nil
11655 }
11656
11657
11658
11659
11660 func (c *ProjectsLocationsTcpRoutesListCall) Pages(ctx context.Context, f func(*ListTcpRoutesResponse) error) error {
11661 c.ctx_ = ctx
11662 defer c.PageToken(c.urlParams_.Get("pageToken"))
11663 for {
11664 x, err := c.Do()
11665 if err != nil {
11666 return err
11667 }
11668 if err := f(x); err != nil {
11669 return err
11670 }
11671 if x.NextPageToken == "" {
11672 return nil
11673 }
11674 c.PageToken(x.NextPageToken)
11675 }
11676 }
11677
11678 type ProjectsLocationsTcpRoutesPatchCall struct {
11679 s *Service
11680 name string
11681 tcproute *TcpRoute
11682 urlParams_ gensupport.URLParams
11683 ctx_ context.Context
11684 header_ http.Header
11685 }
11686
11687
11688
11689
11690
11691 func (r *ProjectsLocationsTcpRoutesService) Patch(name string, tcproute *TcpRoute) *ProjectsLocationsTcpRoutesPatchCall {
11692 c := &ProjectsLocationsTcpRoutesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11693 c.name = name
11694 c.tcproute = tcproute
11695 return c
11696 }
11697
11698
11699
11700
11701
11702
11703 func (c *ProjectsLocationsTcpRoutesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsTcpRoutesPatchCall {
11704 c.urlParams_.Set("updateMask", updateMask)
11705 return c
11706 }
11707
11708
11709
11710
11711 func (c *ProjectsLocationsTcpRoutesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsTcpRoutesPatchCall {
11712 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11713 return c
11714 }
11715
11716
11717 func (c *ProjectsLocationsTcpRoutesPatchCall) Context(ctx context.Context) *ProjectsLocationsTcpRoutesPatchCall {
11718 c.ctx_ = ctx
11719 return c
11720 }
11721
11722
11723
11724 func (c *ProjectsLocationsTcpRoutesPatchCall) Header() http.Header {
11725 if c.header_ == nil {
11726 c.header_ = make(http.Header)
11727 }
11728 return c.header_
11729 }
11730
11731 func (c *ProjectsLocationsTcpRoutesPatchCall) doRequest(alt string) (*http.Response, error) {
11732 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11733 var body io.Reader = nil
11734 body, err := googleapi.WithoutDataWrapper.JSONReader(c.tcproute)
11735 if err != nil {
11736 return nil, err
11737 }
11738 c.urlParams_.Set("alt", alt)
11739 c.urlParams_.Set("prettyPrint", "false")
11740 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
11741 urls += "?" + c.urlParams_.Encode()
11742 req, err := http.NewRequest("PATCH", urls, body)
11743 if err != nil {
11744 return nil, err
11745 }
11746 req.Header = reqHeaders
11747 googleapi.Expand(req.URL, map[string]string{
11748 "name": c.name,
11749 })
11750 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11751 }
11752
11753
11754
11755
11756
11757
11758 func (c *ProjectsLocationsTcpRoutesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
11759 gensupport.SetOptions(c.urlParams_, opts...)
11760 res, err := c.doRequest("json")
11761 if res != nil && res.StatusCode == http.StatusNotModified {
11762 if res.Body != nil {
11763 res.Body.Close()
11764 }
11765 return nil, gensupport.WrapError(&googleapi.Error{
11766 Code: res.StatusCode,
11767 Header: res.Header,
11768 })
11769 }
11770 if err != nil {
11771 return nil, err
11772 }
11773 defer googleapi.CloseBody(res)
11774 if err := googleapi.CheckResponse(res); err != nil {
11775 return nil, gensupport.WrapError(err)
11776 }
11777 ret := &Operation{
11778 ServerResponse: googleapi.ServerResponse{
11779 Header: res.Header,
11780 HTTPStatusCode: res.StatusCode,
11781 },
11782 }
11783 target := &ret
11784 if err := gensupport.DecodeResponse(target, res); err != nil {
11785 return nil, err
11786 }
11787 return ret, nil
11788 }
11789
11790 type ProjectsLocationsTlsRoutesCreateCall struct {
11791 s *Service
11792 parent string
11793 tlsroute *TlsRoute
11794 urlParams_ gensupport.URLParams
11795 ctx_ context.Context
11796 header_ http.Header
11797 }
11798
11799
11800
11801
11802
11803 func (r *ProjectsLocationsTlsRoutesService) Create(parent string, tlsroute *TlsRoute) *ProjectsLocationsTlsRoutesCreateCall {
11804 c := &ProjectsLocationsTlsRoutesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11805 c.parent = parent
11806 c.tlsroute = tlsroute
11807 return c
11808 }
11809
11810
11811
11812 func (c *ProjectsLocationsTlsRoutesCreateCall) TlsRouteId(tlsRouteId string) *ProjectsLocationsTlsRoutesCreateCall {
11813 c.urlParams_.Set("tlsRouteId", tlsRouteId)
11814 return c
11815 }
11816
11817
11818
11819
11820 func (c *ProjectsLocationsTlsRoutesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsTlsRoutesCreateCall {
11821 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11822 return c
11823 }
11824
11825
11826 func (c *ProjectsLocationsTlsRoutesCreateCall) Context(ctx context.Context) *ProjectsLocationsTlsRoutesCreateCall {
11827 c.ctx_ = ctx
11828 return c
11829 }
11830
11831
11832
11833 func (c *ProjectsLocationsTlsRoutesCreateCall) Header() http.Header {
11834 if c.header_ == nil {
11835 c.header_ = make(http.Header)
11836 }
11837 return c.header_
11838 }
11839
11840 func (c *ProjectsLocationsTlsRoutesCreateCall) doRequest(alt string) (*http.Response, error) {
11841 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11842 var body io.Reader = nil
11843 body, err := googleapi.WithoutDataWrapper.JSONReader(c.tlsroute)
11844 if err != nil {
11845 return nil, err
11846 }
11847 c.urlParams_.Set("alt", alt)
11848 c.urlParams_.Set("prettyPrint", "false")
11849 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/tlsRoutes")
11850 urls += "?" + c.urlParams_.Encode()
11851 req, err := http.NewRequest("POST", urls, body)
11852 if err != nil {
11853 return nil, err
11854 }
11855 req.Header = reqHeaders
11856 googleapi.Expand(req.URL, map[string]string{
11857 "parent": c.parent,
11858 })
11859 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11860 }
11861
11862
11863
11864
11865
11866
11867 func (c *ProjectsLocationsTlsRoutesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
11868 gensupport.SetOptions(c.urlParams_, opts...)
11869 res, err := c.doRequest("json")
11870 if res != nil && res.StatusCode == http.StatusNotModified {
11871 if res.Body != nil {
11872 res.Body.Close()
11873 }
11874 return nil, gensupport.WrapError(&googleapi.Error{
11875 Code: res.StatusCode,
11876 Header: res.Header,
11877 })
11878 }
11879 if err != nil {
11880 return nil, err
11881 }
11882 defer googleapi.CloseBody(res)
11883 if err := googleapi.CheckResponse(res); err != nil {
11884 return nil, gensupport.WrapError(err)
11885 }
11886 ret := &Operation{
11887 ServerResponse: googleapi.ServerResponse{
11888 Header: res.Header,
11889 HTTPStatusCode: res.StatusCode,
11890 },
11891 }
11892 target := &ret
11893 if err := gensupport.DecodeResponse(target, res); err != nil {
11894 return nil, err
11895 }
11896 return ret, nil
11897 }
11898
11899 type ProjectsLocationsTlsRoutesDeleteCall struct {
11900 s *Service
11901 name string
11902 urlParams_ gensupport.URLParams
11903 ctx_ context.Context
11904 header_ http.Header
11905 }
11906
11907
11908
11909
11910
11911 func (r *ProjectsLocationsTlsRoutesService) Delete(name string) *ProjectsLocationsTlsRoutesDeleteCall {
11912 c := &ProjectsLocationsTlsRoutesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11913 c.name = name
11914 return c
11915 }
11916
11917
11918
11919
11920 func (c *ProjectsLocationsTlsRoutesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsTlsRoutesDeleteCall {
11921 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11922 return c
11923 }
11924
11925
11926 func (c *ProjectsLocationsTlsRoutesDeleteCall) Context(ctx context.Context) *ProjectsLocationsTlsRoutesDeleteCall {
11927 c.ctx_ = ctx
11928 return c
11929 }
11930
11931
11932
11933 func (c *ProjectsLocationsTlsRoutesDeleteCall) Header() http.Header {
11934 if c.header_ == nil {
11935 c.header_ = make(http.Header)
11936 }
11937 return c.header_
11938 }
11939
11940 func (c *ProjectsLocationsTlsRoutesDeleteCall) doRequest(alt string) (*http.Response, error) {
11941 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11942 var body io.Reader = nil
11943 c.urlParams_.Set("alt", alt)
11944 c.urlParams_.Set("prettyPrint", "false")
11945 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
11946 urls += "?" + c.urlParams_.Encode()
11947 req, err := http.NewRequest("DELETE", urls, body)
11948 if err != nil {
11949 return nil, err
11950 }
11951 req.Header = reqHeaders
11952 googleapi.Expand(req.URL, map[string]string{
11953 "name": c.name,
11954 })
11955 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11956 }
11957
11958
11959
11960
11961
11962
11963 func (c *ProjectsLocationsTlsRoutesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
11964 gensupport.SetOptions(c.urlParams_, opts...)
11965 res, err := c.doRequest("json")
11966 if res != nil && res.StatusCode == http.StatusNotModified {
11967 if res.Body != nil {
11968 res.Body.Close()
11969 }
11970 return nil, gensupport.WrapError(&googleapi.Error{
11971 Code: res.StatusCode,
11972 Header: res.Header,
11973 })
11974 }
11975 if err != nil {
11976 return nil, err
11977 }
11978 defer googleapi.CloseBody(res)
11979 if err := googleapi.CheckResponse(res); err != nil {
11980 return nil, gensupport.WrapError(err)
11981 }
11982 ret := &Operation{
11983 ServerResponse: googleapi.ServerResponse{
11984 Header: res.Header,
11985 HTTPStatusCode: res.StatusCode,
11986 },
11987 }
11988 target := &ret
11989 if err := gensupport.DecodeResponse(target, res); err != nil {
11990 return nil, err
11991 }
11992 return ret, nil
11993 }
11994
11995 type ProjectsLocationsTlsRoutesGetCall struct {
11996 s *Service
11997 name string
11998 urlParams_ gensupport.URLParams
11999 ifNoneMatch_ string
12000 ctx_ context.Context
12001 header_ http.Header
12002 }
12003
12004
12005
12006
12007
12008 func (r *ProjectsLocationsTlsRoutesService) Get(name string) *ProjectsLocationsTlsRoutesGetCall {
12009 c := &ProjectsLocationsTlsRoutesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12010 c.name = name
12011 return c
12012 }
12013
12014
12015
12016
12017 func (c *ProjectsLocationsTlsRoutesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsTlsRoutesGetCall {
12018 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12019 return c
12020 }
12021
12022
12023
12024
12025 func (c *ProjectsLocationsTlsRoutesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsTlsRoutesGetCall {
12026 c.ifNoneMatch_ = entityTag
12027 return c
12028 }
12029
12030
12031 func (c *ProjectsLocationsTlsRoutesGetCall) Context(ctx context.Context) *ProjectsLocationsTlsRoutesGetCall {
12032 c.ctx_ = ctx
12033 return c
12034 }
12035
12036
12037
12038 func (c *ProjectsLocationsTlsRoutesGetCall) Header() http.Header {
12039 if c.header_ == nil {
12040 c.header_ = make(http.Header)
12041 }
12042 return c.header_
12043 }
12044
12045 func (c *ProjectsLocationsTlsRoutesGetCall) doRequest(alt string) (*http.Response, error) {
12046 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12047 if c.ifNoneMatch_ != "" {
12048 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12049 }
12050 var body io.Reader = nil
12051 c.urlParams_.Set("alt", alt)
12052 c.urlParams_.Set("prettyPrint", "false")
12053 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
12054 urls += "?" + c.urlParams_.Encode()
12055 req, err := http.NewRequest("GET", urls, body)
12056 if err != nil {
12057 return nil, err
12058 }
12059 req.Header = reqHeaders
12060 googleapi.Expand(req.URL, map[string]string{
12061 "name": c.name,
12062 })
12063 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12064 }
12065
12066
12067
12068
12069
12070
12071 func (c *ProjectsLocationsTlsRoutesGetCall) Do(opts ...googleapi.CallOption) (*TlsRoute, error) {
12072 gensupport.SetOptions(c.urlParams_, opts...)
12073 res, err := c.doRequest("json")
12074 if res != nil && res.StatusCode == http.StatusNotModified {
12075 if res.Body != nil {
12076 res.Body.Close()
12077 }
12078 return nil, gensupport.WrapError(&googleapi.Error{
12079 Code: res.StatusCode,
12080 Header: res.Header,
12081 })
12082 }
12083 if err != nil {
12084 return nil, err
12085 }
12086 defer googleapi.CloseBody(res)
12087 if err := googleapi.CheckResponse(res); err != nil {
12088 return nil, gensupport.WrapError(err)
12089 }
12090 ret := &TlsRoute{
12091 ServerResponse: googleapi.ServerResponse{
12092 Header: res.Header,
12093 HTTPStatusCode: res.StatusCode,
12094 },
12095 }
12096 target := &ret
12097 if err := gensupport.DecodeResponse(target, res); err != nil {
12098 return nil, err
12099 }
12100 return ret, nil
12101 }
12102
12103 type ProjectsLocationsTlsRoutesListCall struct {
12104 s *Service
12105 parent string
12106 urlParams_ gensupport.URLParams
12107 ifNoneMatch_ string
12108 ctx_ context.Context
12109 header_ http.Header
12110 }
12111
12112
12113
12114
12115
12116 func (r *ProjectsLocationsTlsRoutesService) List(parent string) *ProjectsLocationsTlsRoutesListCall {
12117 c := &ProjectsLocationsTlsRoutesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12118 c.parent = parent
12119 return c
12120 }
12121
12122
12123
12124 func (c *ProjectsLocationsTlsRoutesListCall) PageSize(pageSize int64) *ProjectsLocationsTlsRoutesListCall {
12125 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
12126 return c
12127 }
12128
12129
12130
12131
12132
12133 func (c *ProjectsLocationsTlsRoutesListCall) PageToken(pageToken string) *ProjectsLocationsTlsRoutesListCall {
12134 c.urlParams_.Set("pageToken", pageToken)
12135 return c
12136 }
12137
12138
12139
12140
12141 func (c *ProjectsLocationsTlsRoutesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsTlsRoutesListCall {
12142 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12143 return c
12144 }
12145
12146
12147
12148
12149 func (c *ProjectsLocationsTlsRoutesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsTlsRoutesListCall {
12150 c.ifNoneMatch_ = entityTag
12151 return c
12152 }
12153
12154
12155 func (c *ProjectsLocationsTlsRoutesListCall) Context(ctx context.Context) *ProjectsLocationsTlsRoutesListCall {
12156 c.ctx_ = ctx
12157 return c
12158 }
12159
12160
12161
12162 func (c *ProjectsLocationsTlsRoutesListCall) Header() http.Header {
12163 if c.header_ == nil {
12164 c.header_ = make(http.Header)
12165 }
12166 return c.header_
12167 }
12168
12169 func (c *ProjectsLocationsTlsRoutesListCall) doRequest(alt string) (*http.Response, error) {
12170 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12171 if c.ifNoneMatch_ != "" {
12172 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12173 }
12174 var body io.Reader = nil
12175 c.urlParams_.Set("alt", alt)
12176 c.urlParams_.Set("prettyPrint", "false")
12177 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/tlsRoutes")
12178 urls += "?" + c.urlParams_.Encode()
12179 req, err := http.NewRequest("GET", urls, body)
12180 if err != nil {
12181 return nil, err
12182 }
12183 req.Header = reqHeaders
12184 googleapi.Expand(req.URL, map[string]string{
12185 "parent": c.parent,
12186 })
12187 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12188 }
12189
12190
12191
12192
12193
12194
12195
12196 func (c *ProjectsLocationsTlsRoutesListCall) Do(opts ...googleapi.CallOption) (*ListTlsRoutesResponse, error) {
12197 gensupport.SetOptions(c.urlParams_, opts...)
12198 res, err := c.doRequest("json")
12199 if res != nil && res.StatusCode == http.StatusNotModified {
12200 if res.Body != nil {
12201 res.Body.Close()
12202 }
12203 return nil, gensupport.WrapError(&googleapi.Error{
12204 Code: res.StatusCode,
12205 Header: res.Header,
12206 })
12207 }
12208 if err != nil {
12209 return nil, err
12210 }
12211 defer googleapi.CloseBody(res)
12212 if err := googleapi.CheckResponse(res); err != nil {
12213 return nil, gensupport.WrapError(err)
12214 }
12215 ret := &ListTlsRoutesResponse{
12216 ServerResponse: googleapi.ServerResponse{
12217 Header: res.Header,
12218 HTTPStatusCode: res.StatusCode,
12219 },
12220 }
12221 target := &ret
12222 if err := gensupport.DecodeResponse(target, res); err != nil {
12223 return nil, err
12224 }
12225 return ret, nil
12226 }
12227
12228
12229
12230
12231 func (c *ProjectsLocationsTlsRoutesListCall) Pages(ctx context.Context, f func(*ListTlsRoutesResponse) error) error {
12232 c.ctx_ = ctx
12233 defer c.PageToken(c.urlParams_.Get("pageToken"))
12234 for {
12235 x, err := c.Do()
12236 if err != nil {
12237 return err
12238 }
12239 if err := f(x); err != nil {
12240 return err
12241 }
12242 if x.NextPageToken == "" {
12243 return nil
12244 }
12245 c.PageToken(x.NextPageToken)
12246 }
12247 }
12248
12249 type ProjectsLocationsTlsRoutesPatchCall struct {
12250 s *Service
12251 name string
12252 tlsroute *TlsRoute
12253 urlParams_ gensupport.URLParams
12254 ctx_ context.Context
12255 header_ http.Header
12256 }
12257
12258
12259
12260
12261
12262 func (r *ProjectsLocationsTlsRoutesService) Patch(name string, tlsroute *TlsRoute) *ProjectsLocationsTlsRoutesPatchCall {
12263 c := &ProjectsLocationsTlsRoutesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12264 c.name = name
12265 c.tlsroute = tlsroute
12266 return c
12267 }
12268
12269
12270
12271
12272
12273
12274 func (c *ProjectsLocationsTlsRoutesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsTlsRoutesPatchCall {
12275 c.urlParams_.Set("updateMask", updateMask)
12276 return c
12277 }
12278
12279
12280
12281
12282 func (c *ProjectsLocationsTlsRoutesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsTlsRoutesPatchCall {
12283 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12284 return c
12285 }
12286
12287
12288 func (c *ProjectsLocationsTlsRoutesPatchCall) Context(ctx context.Context) *ProjectsLocationsTlsRoutesPatchCall {
12289 c.ctx_ = ctx
12290 return c
12291 }
12292
12293
12294
12295 func (c *ProjectsLocationsTlsRoutesPatchCall) Header() http.Header {
12296 if c.header_ == nil {
12297 c.header_ = make(http.Header)
12298 }
12299 return c.header_
12300 }
12301
12302 func (c *ProjectsLocationsTlsRoutesPatchCall) doRequest(alt string) (*http.Response, error) {
12303 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12304 var body io.Reader = nil
12305 body, err := googleapi.WithoutDataWrapper.JSONReader(c.tlsroute)
12306 if err != nil {
12307 return nil, err
12308 }
12309 c.urlParams_.Set("alt", alt)
12310 c.urlParams_.Set("prettyPrint", "false")
12311 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
12312 urls += "?" + c.urlParams_.Encode()
12313 req, err := http.NewRequest("PATCH", urls, body)
12314 if err != nil {
12315 return nil, err
12316 }
12317 req.Header = reqHeaders
12318 googleapi.Expand(req.URL, map[string]string{
12319 "name": c.name,
12320 })
12321 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12322 }
12323
12324
12325
12326
12327
12328
12329 func (c *ProjectsLocationsTlsRoutesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
12330 gensupport.SetOptions(c.urlParams_, opts...)
12331 res, err := c.doRequest("json")
12332 if res != nil && res.StatusCode == http.StatusNotModified {
12333 if res.Body != nil {
12334 res.Body.Close()
12335 }
12336 return nil, gensupport.WrapError(&googleapi.Error{
12337 Code: res.StatusCode,
12338 Header: res.Header,
12339 })
12340 }
12341 if err != nil {
12342 return nil, err
12343 }
12344 defer googleapi.CloseBody(res)
12345 if err := googleapi.CheckResponse(res); err != nil {
12346 return nil, gensupport.WrapError(err)
12347 }
12348 ret := &Operation{
12349 ServerResponse: googleapi.ServerResponse{
12350 Header: res.Header,
12351 HTTPStatusCode: res.StatusCode,
12352 },
12353 }
12354 target := &ret
12355 if err := gensupport.DecodeResponse(target, res); err != nil {
12356 return nil, err
12357 }
12358 return ret, nil
12359 }
12360
View as plain text