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