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