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