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