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 recaptchaenterprise
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 = "recaptchaenterprise:v1"
90 const apiName = "recaptchaenterprise"
91 const apiVersion = "v1"
92 const basePath = "https://recaptchaenterprise.googleapis.com/"
93 const basePathTemplate = "https://recaptchaenterprise.UNIVERSE_DOMAIN/"
94 const mtlsBasePath = "https://recaptchaenterprise.mtls.googleapis.com/"
95
96
97 const (
98
99
100 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
101 )
102
103
104 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
105 scopesOption := internaloption.WithDefaultScopes(
106 "https://www.googleapis.com/auth/cloud-platform",
107 )
108
109 opts = append([]option.ClientOption{scopesOption}, opts...)
110 opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
111 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
112 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
113 opts = append(opts, internaloption.EnableNewAuthLibrary())
114 client, endpoint, err := htransport.NewClient(ctx, opts...)
115 if err != nil {
116 return nil, err
117 }
118 s, err := New(client)
119 if err != nil {
120 return nil, err
121 }
122 if endpoint != "" {
123 s.BasePath = endpoint
124 }
125 return s, nil
126 }
127
128
129
130
131
132
133 func New(client *http.Client) (*Service, error) {
134 if client == nil {
135 return nil, errors.New("client is nil")
136 }
137 s := &Service{client: client, BasePath: basePath}
138 s.Projects = NewProjectsService(s)
139 return s, nil
140 }
141
142 type Service struct {
143 client *http.Client
144 BasePath string
145 UserAgent string
146
147 Projects *ProjectsService
148 }
149
150 func (s *Service) userAgent() string {
151 if s.UserAgent == "" {
152 return googleapi.UserAgent
153 }
154 return googleapi.UserAgent + " " + s.UserAgent
155 }
156
157 func NewProjectsService(s *Service) *ProjectsService {
158 rs := &ProjectsService{s: s}
159 rs.Assessments = NewProjectsAssessmentsService(s)
160 rs.Firewallpolicies = NewProjectsFirewallpoliciesService(s)
161 rs.Keys = NewProjectsKeysService(s)
162 rs.Relatedaccountgroupmemberships = NewProjectsRelatedaccountgroupmembershipsService(s)
163 rs.Relatedaccountgroups = NewProjectsRelatedaccountgroupsService(s)
164 return rs
165 }
166
167 type ProjectsService struct {
168 s *Service
169
170 Assessments *ProjectsAssessmentsService
171
172 Firewallpolicies *ProjectsFirewallpoliciesService
173
174 Keys *ProjectsKeysService
175
176 Relatedaccountgroupmemberships *ProjectsRelatedaccountgroupmembershipsService
177
178 Relatedaccountgroups *ProjectsRelatedaccountgroupsService
179 }
180
181 func NewProjectsAssessmentsService(s *Service) *ProjectsAssessmentsService {
182 rs := &ProjectsAssessmentsService{s: s}
183 return rs
184 }
185
186 type ProjectsAssessmentsService struct {
187 s *Service
188 }
189
190 func NewProjectsFirewallpoliciesService(s *Service) *ProjectsFirewallpoliciesService {
191 rs := &ProjectsFirewallpoliciesService{s: s}
192 return rs
193 }
194
195 type ProjectsFirewallpoliciesService struct {
196 s *Service
197 }
198
199 func NewProjectsKeysService(s *Service) *ProjectsKeysService {
200 rs := &ProjectsKeysService{s: s}
201 return rs
202 }
203
204 type ProjectsKeysService struct {
205 s *Service
206 }
207
208 func NewProjectsRelatedaccountgroupmembershipsService(s *Service) *ProjectsRelatedaccountgroupmembershipsService {
209 rs := &ProjectsRelatedaccountgroupmembershipsService{s: s}
210 return rs
211 }
212
213 type ProjectsRelatedaccountgroupmembershipsService struct {
214 s *Service
215 }
216
217 func NewProjectsRelatedaccountgroupsService(s *Service) *ProjectsRelatedaccountgroupsService {
218 rs := &ProjectsRelatedaccountgroupsService{s: s}
219 rs.Memberships = NewProjectsRelatedaccountgroupsMembershipsService(s)
220 return rs
221 }
222
223 type ProjectsRelatedaccountgroupsService struct {
224 s *Service
225
226 Memberships *ProjectsRelatedaccountgroupsMembershipsService
227 }
228
229 func NewProjectsRelatedaccountgroupsMembershipsService(s *Service) *ProjectsRelatedaccountgroupsMembershipsService {
230 rs := &ProjectsRelatedaccountgroupsMembershipsService{s: s}
231 return rs
232 }
233
234 type ProjectsRelatedaccountgroupsMembershipsService struct {
235 s *Service
236 }
237
238
239
240 type GoogleCloudRecaptchaenterpriseV1AccountDefenderAssessment struct {
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255 Labels []string `json:"labels,omitempty"`
256
257
258
259
260
261 ForceSendFields []string `json:"-"`
262
263
264
265
266 NullFields []string `json:"-"`
267 }
268
269 func (s *GoogleCloudRecaptchaenterpriseV1AccountDefenderAssessment) MarshalJSON() ([]byte, error) {
270 type NoMethod GoogleCloudRecaptchaenterpriseV1AccountDefenderAssessment
271 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
272 }
273
274
275
276 type GoogleCloudRecaptchaenterpriseV1AccountVerificationInfo struct {
277
278 Endpoints []*GoogleCloudRecaptchaenterpriseV1EndpointVerificationInfo `json:"endpoints,omitempty"`
279
280
281 LanguageCode string `json:"languageCode,omitempty"`
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307 LatestVerificationResult string `json:"latestVerificationResult,omitempty"`
308
309
310 Username string `json:"username,omitempty"`
311
312
313
314
315
316 ForceSendFields []string `json:"-"`
317
318
319
320
321 NullFields []string `json:"-"`
322 }
323
324 func (s *GoogleCloudRecaptchaenterpriseV1AccountVerificationInfo) MarshalJSON() ([]byte, error) {
325 type NoMethod GoogleCloudRecaptchaenterpriseV1AccountVerificationInfo
326 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
327 }
328
329
330
331 type GoogleCloudRecaptchaenterpriseV1AndroidKeySettings struct {
332
333
334 AllowAllPackageNames bool `json:"allowAllPackageNames,omitempty"`
335
336
337 AllowedPackageNames []string `json:"allowedPackageNames,omitempty"`
338
339
340
341 SupportNonGoogleAppStoreDistribution bool `json:"supportNonGoogleAppStoreDistribution,omitempty"`
342
343
344
345
346
347 ForceSendFields []string `json:"-"`
348
349
350
351
352 NullFields []string `json:"-"`
353 }
354
355 func (s *GoogleCloudRecaptchaenterpriseV1AndroidKeySettings) MarshalJSON() ([]byte, error) {
356 type NoMethod GoogleCloudRecaptchaenterpriseV1AndroidKeySettings
357 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
358 }
359
360
361
362 type GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentRequest struct {
363
364
365
366
367 AccountId string `json:"accountId,omitempty"`
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384 Annotation string `json:"annotation,omitempty"`
385
386
387
388
389 HashedAccountId string `json:"hashedAccountId,omitempty"`
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428 Reasons []string `json:"reasons,omitempty"`
429
430
431
432 TransactionEvent *GoogleCloudRecaptchaenterpriseV1TransactionEvent `json:"transactionEvent,omitempty"`
433
434
435
436
437
438 ForceSendFields []string `json:"-"`
439
440
441
442
443 NullFields []string `json:"-"`
444 }
445
446 func (s *GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentRequest) MarshalJSON() ([]byte, error) {
447 type NoMethod GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentRequest
448 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
449 }
450
451
452
453 type GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentResponse struct {
454
455 googleapi.ServerResponse `json:"-"`
456 }
457
458
459
460 type GoogleCloudRecaptchaenterpriseV1AppleDeveloperId struct {
461
462 KeyId string `json:"keyId,omitempty"`
463
464
465
466 PrivateKey string `json:"privateKey,omitempty"`
467
468
469 TeamId string `json:"teamId,omitempty"`
470
471
472
473
474
475 ForceSendFields []string `json:"-"`
476
477
478
479
480 NullFields []string `json:"-"`
481 }
482
483 func (s *GoogleCloudRecaptchaenterpriseV1AppleDeveloperId) MarshalJSON() ([]byte, error) {
484 type NoMethod GoogleCloudRecaptchaenterpriseV1AppleDeveloperId
485 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
486 }
487
488
489
490 type GoogleCloudRecaptchaenterpriseV1Assessment struct {
491
492
493 AccountDefenderAssessment *GoogleCloudRecaptchaenterpriseV1AccountDefenderAssessment `json:"accountDefenderAssessment,omitempty"`
494
495
496
497 AccountVerification *GoogleCloudRecaptchaenterpriseV1AccountVerificationInfo `json:"accountVerification,omitempty"`
498
499 Event *GoogleCloudRecaptchaenterpriseV1Event `json:"event,omitempty"`
500
501
502
503 FirewallPolicyAssessment *GoogleCloudRecaptchaenterpriseV1FirewallPolicyAssessment `json:"firewallPolicyAssessment,omitempty"`
504
505
506 FraudPreventionAssessment *GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessment `json:"fraudPreventionAssessment,omitempty"`
507
508
509 FraudSignals *GoogleCloudRecaptchaenterpriseV1FraudSignals `json:"fraudSignals,omitempty"`
510
511
512 Name string `json:"name,omitempty"`
513
514
515
516 PrivatePasswordLeakVerification *GoogleCloudRecaptchaenterpriseV1PrivatePasswordLeakVerification `json:"privatePasswordLeakVerification,omitempty"`
517
518
519 RiskAnalysis *GoogleCloudRecaptchaenterpriseV1RiskAnalysis `json:"riskAnalysis,omitempty"`
520
521 TokenProperties *GoogleCloudRecaptchaenterpriseV1TokenProperties `json:"tokenProperties,omitempty"`
522
523
524 googleapi.ServerResponse `json:"-"`
525
526
527
528
529
530 ForceSendFields []string `json:"-"`
531
532
533
534
535 NullFields []string `json:"-"`
536 }
537
538 func (s *GoogleCloudRecaptchaenterpriseV1Assessment) MarshalJSON() ([]byte, error) {
539 type NoMethod GoogleCloudRecaptchaenterpriseV1Assessment
540 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
541 }
542
543
544
545 type GoogleCloudRecaptchaenterpriseV1ChallengeMetrics struct {
546
547
548 FailedCount int64 `json:"failedCount,omitempty,string"`
549
550
551 NocaptchaCount int64 `json:"nocaptchaCount,omitempty,string"`
552
553
554 PageloadCount int64 `json:"pageloadCount,omitempty,string"`
555
556
557
558 PassedCount int64 `json:"passedCount,omitempty,string"`
559
560
561
562
563
564 ForceSendFields []string `json:"-"`
565
566
567
568
569 NullFields []string `json:"-"`
570 }
571
572 func (s *GoogleCloudRecaptchaenterpriseV1ChallengeMetrics) MarshalJSON() ([]byte, error) {
573 type NoMethod GoogleCloudRecaptchaenterpriseV1ChallengeMetrics
574 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
575 }
576
577
578
579 type GoogleCloudRecaptchaenterpriseV1EndpointVerificationInfo struct {
580
581 EmailAddress string `json:"emailAddress,omitempty"`
582
583
584 LastVerificationTime string `json:"lastVerificationTime,omitempty"`
585
586
587 PhoneNumber string `json:"phoneNumber,omitempty"`
588
589
590 RequestToken string `json:"requestToken,omitempty"`
591
592
593
594
595
596 ForceSendFields []string `json:"-"`
597
598
599
600
601 NullFields []string `json:"-"`
602 }
603
604 func (s *GoogleCloudRecaptchaenterpriseV1EndpointVerificationInfo) MarshalJSON() ([]byte, error) {
605 type NoMethod GoogleCloudRecaptchaenterpriseV1EndpointVerificationInfo
606 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
607 }
608
609
610 type GoogleCloudRecaptchaenterpriseV1Event struct {
611
612
613
614 ExpectedAction string `json:"expectedAction,omitempty"`
615
616
617
618 Express bool `json:"express,omitempty"`
619
620
621
622 FirewallPolicyEvaluation bool `json:"firewallPolicyEvaluation,omitempty"`
623
624
625
626
627
628
629
630
631
632
633
634
635 FraudPrevention string `json:"fraudPrevention,omitempty"`
636
637
638
639 HashedAccountId string `json:"hashedAccountId,omitempty"`
640
641 Headers []string `json:"headers,omitempty"`
642
643 Ja3 string `json:"ja3,omitempty"`
644
645
646 RequestedUri string `json:"requestedUri,omitempty"`
647
648
649 SiteKey string `json:"siteKey,omitempty"`
650
651
652 Token string `json:"token,omitempty"`
653
654
655
656 TransactionData *GoogleCloudRecaptchaenterpriseV1TransactionData `json:"transactionData,omitempty"`
657
658
659 UserAgent string `json:"userAgent,omitempty"`
660
661
662
663
664 UserInfo *GoogleCloudRecaptchaenterpriseV1UserInfo `json:"userInfo,omitempty"`
665
666
667 UserIpAddress string `json:"userIpAddress,omitempty"`
668
669
670
671 WafTokenAssessment bool `json:"wafTokenAssessment,omitempty"`
672
673
674
675
676
677 ForceSendFields []string `json:"-"`
678
679
680
681
682 NullFields []string `json:"-"`
683 }
684
685 func (s *GoogleCloudRecaptchaenterpriseV1Event) MarshalJSON() ([]byte, error) {
686 type NoMethod GoogleCloudRecaptchaenterpriseV1Event
687 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
688 }
689
690
691
692 type GoogleCloudRecaptchaenterpriseV1FirewallAction struct {
693
694
695 Allow *GoogleCloudRecaptchaenterpriseV1FirewallActionAllowAction `json:"allow,omitempty"`
696
697
698 Block *GoogleCloudRecaptchaenterpriseV1FirewallActionBlockAction `json:"block,omitempty"`
699
700
701 IncludeRecaptchaScript *GoogleCloudRecaptchaenterpriseV1FirewallActionIncludeRecaptchaScriptAction `json:"includeRecaptchaScript,omitempty"`
702
703
704 Redirect *GoogleCloudRecaptchaenterpriseV1FirewallActionRedirectAction `json:"redirect,omitempty"`
705
706
707 SetHeader *GoogleCloudRecaptchaenterpriseV1FirewallActionSetHeaderAction `json:"setHeader,omitempty"`
708
709
710 Substitute *GoogleCloudRecaptchaenterpriseV1FirewallActionSubstituteAction `json:"substitute,omitempty"`
711
712
713
714
715
716 ForceSendFields []string `json:"-"`
717
718
719
720
721 NullFields []string `json:"-"`
722 }
723
724 func (s *GoogleCloudRecaptchaenterpriseV1FirewallAction) MarshalJSON() ([]byte, error) {
725 type NoMethod GoogleCloudRecaptchaenterpriseV1FirewallAction
726 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
727 }
728
729
730
731 type GoogleCloudRecaptchaenterpriseV1FirewallActionAllowAction struct {
732 }
733
734
735
736 type GoogleCloudRecaptchaenterpriseV1FirewallActionBlockAction struct {
737 }
738
739
740
741
742
743
744
745 type GoogleCloudRecaptchaenterpriseV1FirewallActionIncludeRecaptchaScriptAction struct {
746 }
747
748
749
750
751 type GoogleCloudRecaptchaenterpriseV1FirewallActionRedirectAction struct {
752 }
753
754
755
756
757 type GoogleCloudRecaptchaenterpriseV1FirewallActionSetHeaderAction struct {
758
759 Key string `json:"key,omitempty"`
760
761
762 Value string `json:"value,omitempty"`
763
764
765
766
767
768 ForceSendFields []string `json:"-"`
769
770
771
772
773 NullFields []string `json:"-"`
774 }
775
776 func (s *GoogleCloudRecaptchaenterpriseV1FirewallActionSetHeaderAction) MarshalJSON() ([]byte, error) {
777 type NoMethod GoogleCloudRecaptchaenterpriseV1FirewallActionSetHeaderAction
778 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
779 }
780
781
782
783 type GoogleCloudRecaptchaenterpriseV1FirewallActionSubstituteAction struct {
784
785
786 Path string `json:"path,omitempty"`
787
788
789
790
791
792 ForceSendFields []string `json:"-"`
793
794
795
796
797 NullFields []string `json:"-"`
798 }
799
800 func (s *GoogleCloudRecaptchaenterpriseV1FirewallActionSubstituteAction) MarshalJSON() ([]byte, error) {
801 type NoMethod GoogleCloudRecaptchaenterpriseV1FirewallActionSubstituteAction
802 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
803 }
804
805
806
807 type GoogleCloudRecaptchaenterpriseV1FirewallPolicy struct {
808
809
810
811
812
813 Actions []*GoogleCloudRecaptchaenterpriseV1FirewallAction `json:"actions,omitempty"`
814
815
816
817
818
819
820
821
822
823 Condition string `json:"condition,omitempty"`
824
825
826
827 Description string `json:"description,omitempty"`
828
829
830 Name string `json:"name,omitempty"`
831
832
833
834
835 Path string `json:"path,omitempty"`
836
837
838 googleapi.ServerResponse `json:"-"`
839
840
841
842
843
844 ForceSendFields []string `json:"-"`
845
846
847
848
849 NullFields []string `json:"-"`
850 }
851
852 func (s *GoogleCloudRecaptchaenterpriseV1FirewallPolicy) MarshalJSON() ([]byte, error) {
853 type NoMethod GoogleCloudRecaptchaenterpriseV1FirewallPolicy
854 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
855 }
856
857
858
859 type GoogleCloudRecaptchaenterpriseV1FirewallPolicyAssessment struct {
860
861
862 Error *GoogleRpcStatus `json:"error,omitempty"`
863
864
865
866 FirewallPolicy *GoogleCloudRecaptchaenterpriseV1FirewallPolicy `json:"firewallPolicy,omitempty"`
867
868
869
870
871
872 ForceSendFields []string `json:"-"`
873
874
875
876
877 NullFields []string `json:"-"`
878 }
879
880 func (s *GoogleCloudRecaptchaenterpriseV1FirewallPolicyAssessment) MarshalJSON() ([]byte, error) {
881 type NoMethod GoogleCloudRecaptchaenterpriseV1FirewallPolicyAssessment
882 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
883 }
884
885
886
887 type GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessment struct {
888
889
890 BehavioralTrustVerdict *GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentBehavioralTrustVerdict `json:"behavioralTrustVerdict,omitempty"`
891
892
893 CardTestingVerdict *GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentCardTestingVerdict `json:"cardTestingVerdict,omitempty"`
894
895
896 StolenInstrumentVerdict *GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentStolenInstrumentVerdict `json:"stolenInstrumentVerdict,omitempty"`
897
898
899
900 TransactionRisk float64 `json:"transactionRisk,omitempty"`
901
902
903
904
905
906 ForceSendFields []string `json:"-"`
907
908
909
910
911 NullFields []string `json:"-"`
912 }
913
914 func (s *GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessment) MarshalJSON() ([]byte, error) {
915 type NoMethod GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessment
916 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
917 }
918
919 func (s *GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessment) UnmarshalJSON(data []byte) error {
920 type NoMethod GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessment
921 var s1 struct {
922 TransactionRisk gensupport.JSONFloat64 `json:"transactionRisk"`
923 *NoMethod
924 }
925 s1.NoMethod = (*NoMethod)(s)
926 if err := json.Unmarshal(data, &s1); err != nil {
927 return err
928 }
929 s.TransactionRisk = float64(s1.TransactionRisk)
930 return nil
931 }
932
933
934
935 type GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentBehavioralTrustVerdict struct {
936
937
938
939 Trust float64 `json:"trust,omitempty"`
940
941
942
943
944
945 ForceSendFields []string `json:"-"`
946
947
948
949
950 NullFields []string `json:"-"`
951 }
952
953 func (s *GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentBehavioralTrustVerdict) MarshalJSON() ([]byte, error) {
954 type NoMethod GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentBehavioralTrustVerdict
955 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
956 }
957
958 func (s *GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentBehavioralTrustVerdict) UnmarshalJSON(data []byte) error {
959 type NoMethod GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentBehavioralTrustVerdict
960 var s1 struct {
961 Trust gensupport.JSONFloat64 `json:"trust"`
962 *NoMethod
963 }
964 s1.NoMethod = (*NoMethod)(s)
965 if err := json.Unmarshal(data, &s1); err != nil {
966 return err
967 }
968 s.Trust = float64(s1.Trust)
969 return nil
970 }
971
972
973
974
975 type GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentCardTestingVerdict struct {
976
977
978 Risk float64 `json:"risk,omitempty"`
979
980
981
982
983
984 ForceSendFields []string `json:"-"`
985
986
987
988
989 NullFields []string `json:"-"`
990 }
991
992 func (s *GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentCardTestingVerdict) MarshalJSON() ([]byte, error) {
993 type NoMethod GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentCardTestingVerdict
994 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
995 }
996
997 func (s *GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentCardTestingVerdict) UnmarshalJSON(data []byte) error {
998 type NoMethod GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentCardTestingVerdict
999 var s1 struct {
1000 Risk gensupport.JSONFloat64 `json:"risk"`
1001 *NoMethod
1002 }
1003 s1.NoMethod = (*NoMethod)(s)
1004 if err := json.Unmarshal(data, &s1); err != nil {
1005 return err
1006 }
1007 s.Risk = float64(s1.Risk)
1008 return nil
1009 }
1010
1011
1012
1013
1014 type GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentStolenInstrumentVerdict struct {
1015
1016
1017 Risk float64 `json:"risk,omitempty"`
1018
1019
1020
1021
1022
1023 ForceSendFields []string `json:"-"`
1024
1025
1026
1027
1028 NullFields []string `json:"-"`
1029 }
1030
1031 func (s *GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentStolenInstrumentVerdict) MarshalJSON() ([]byte, error) {
1032 type NoMethod GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentStolenInstrumentVerdict
1033 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1034 }
1035
1036 func (s *GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentStolenInstrumentVerdict) UnmarshalJSON(data []byte) error {
1037 type NoMethod GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentStolenInstrumentVerdict
1038 var s1 struct {
1039 Risk gensupport.JSONFloat64 `json:"risk"`
1040 *NoMethod
1041 }
1042 s1.NoMethod = (*NoMethod)(s)
1043 if err := json.Unmarshal(data, &s1); err != nil {
1044 return err
1045 }
1046 s.Risk = float64(s1.Risk)
1047 return nil
1048 }
1049
1050
1051
1052 type GoogleCloudRecaptchaenterpriseV1FraudSignals struct {
1053
1054
1055 CardSignals *GoogleCloudRecaptchaenterpriseV1FraudSignalsCardSignals `json:"cardSignals,omitempty"`
1056
1057
1058 UserSignals *GoogleCloudRecaptchaenterpriseV1FraudSignalsUserSignals `json:"userSignals,omitempty"`
1059
1060
1061
1062
1063
1064 ForceSendFields []string `json:"-"`
1065
1066
1067
1068
1069 NullFields []string `json:"-"`
1070 }
1071
1072 func (s *GoogleCloudRecaptchaenterpriseV1FraudSignals) MarshalJSON() ([]byte, error) {
1073 type NoMethod GoogleCloudRecaptchaenterpriseV1FraudSignals
1074 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1075 }
1076
1077
1078
1079 type GoogleCloudRecaptchaenterpriseV1FraudSignalsCardSignals struct {
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090 CardLabels []string `json:"cardLabels,omitempty"`
1091
1092
1093
1094
1095
1096 ForceSendFields []string `json:"-"`
1097
1098
1099
1100
1101 NullFields []string `json:"-"`
1102 }
1103
1104 func (s *GoogleCloudRecaptchaenterpriseV1FraudSignalsCardSignals) MarshalJSON() ([]byte, error) {
1105 type NoMethod GoogleCloudRecaptchaenterpriseV1FraudSignalsCardSignals
1106 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1107 }
1108
1109
1110
1111 type GoogleCloudRecaptchaenterpriseV1FraudSignalsUserSignals struct {
1112
1113
1114
1115 ActiveDaysLowerBound int64 `json:"activeDaysLowerBound,omitempty"`
1116
1117
1118
1119 SyntheticRisk float64 `json:"syntheticRisk,omitempty"`
1120
1121
1122
1123
1124
1125 ForceSendFields []string `json:"-"`
1126
1127
1128
1129
1130 NullFields []string `json:"-"`
1131 }
1132
1133 func (s *GoogleCloudRecaptchaenterpriseV1FraudSignalsUserSignals) MarshalJSON() ([]byte, error) {
1134 type NoMethod GoogleCloudRecaptchaenterpriseV1FraudSignalsUserSignals
1135 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1136 }
1137
1138 func (s *GoogleCloudRecaptchaenterpriseV1FraudSignalsUserSignals) UnmarshalJSON(data []byte) error {
1139 type NoMethod GoogleCloudRecaptchaenterpriseV1FraudSignalsUserSignals
1140 var s1 struct {
1141 SyntheticRisk gensupport.JSONFloat64 `json:"syntheticRisk"`
1142 *NoMethod
1143 }
1144 s1.NoMethod = (*NoMethod)(s)
1145 if err := json.Unmarshal(data, &s1); err != nil {
1146 return err
1147 }
1148 s.SyntheticRisk = float64(s1.SyntheticRisk)
1149 return nil
1150 }
1151
1152
1153
1154 type GoogleCloudRecaptchaenterpriseV1IOSKeySettings struct {
1155
1156
1157 AllowAllBundleIds bool `json:"allowAllBundleIds,omitempty"`
1158
1159
1160 AllowedBundleIds []string `json:"allowedBundleIds,omitempty"`
1161
1162
1163
1164
1165
1166 AppleDeveloperId *GoogleCloudRecaptchaenterpriseV1AppleDeveloperId `json:"appleDeveloperId,omitempty"`
1167
1168
1169
1170
1171
1172 ForceSendFields []string `json:"-"`
1173
1174
1175
1176
1177 NullFields []string `json:"-"`
1178 }
1179
1180 func (s *GoogleCloudRecaptchaenterpriseV1IOSKeySettings) MarshalJSON() ([]byte, error) {
1181 type NoMethod GoogleCloudRecaptchaenterpriseV1IOSKeySettings
1182 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1183 }
1184
1185
1186
1187 type GoogleCloudRecaptchaenterpriseV1Key struct {
1188
1189 AndroidSettings *GoogleCloudRecaptchaenterpriseV1AndroidKeySettings `json:"androidSettings,omitempty"`
1190
1191
1192 CreateTime string `json:"createTime,omitempty"`
1193
1194
1195 DisplayName string `json:"displayName,omitempty"`
1196
1197 IosSettings *GoogleCloudRecaptchaenterpriseV1IOSKeySettings `json:"iosSettings,omitempty"`
1198
1199
1200 Labels map[string]string `json:"labels,omitempty"`
1201
1202
1203 Name string `json:"name,omitempty"`
1204
1205 TestingOptions *GoogleCloudRecaptchaenterpriseV1TestingOptions `json:"testingOptions,omitempty"`
1206
1207 WafSettings *GoogleCloudRecaptchaenterpriseV1WafSettings `json:"wafSettings,omitempty"`
1208
1209 WebSettings *GoogleCloudRecaptchaenterpriseV1WebKeySettings `json:"webSettings,omitempty"`
1210
1211
1212 googleapi.ServerResponse `json:"-"`
1213
1214
1215
1216
1217
1218 ForceSendFields []string `json:"-"`
1219
1220
1221
1222
1223 NullFields []string `json:"-"`
1224 }
1225
1226 func (s *GoogleCloudRecaptchaenterpriseV1Key) MarshalJSON() ([]byte, error) {
1227 type NoMethod GoogleCloudRecaptchaenterpriseV1Key
1228 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1229 }
1230
1231
1232
1233 type GoogleCloudRecaptchaenterpriseV1ListFirewallPoliciesResponse struct {
1234
1235 FirewallPolicies []*GoogleCloudRecaptchaenterpriseV1FirewallPolicy `json:"firewallPolicies,omitempty"`
1236
1237
1238 NextPageToken string `json:"nextPageToken,omitempty"`
1239
1240
1241 googleapi.ServerResponse `json:"-"`
1242
1243
1244
1245
1246
1247 ForceSendFields []string `json:"-"`
1248
1249
1250
1251
1252 NullFields []string `json:"-"`
1253 }
1254
1255 func (s *GoogleCloudRecaptchaenterpriseV1ListFirewallPoliciesResponse) MarshalJSON() ([]byte, error) {
1256 type NoMethod GoogleCloudRecaptchaenterpriseV1ListFirewallPoliciesResponse
1257 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1258 }
1259
1260
1261
1262 type GoogleCloudRecaptchaenterpriseV1ListKeysResponse struct {
1263
1264 Keys []*GoogleCloudRecaptchaenterpriseV1Key `json:"keys,omitempty"`
1265
1266
1267 NextPageToken string `json:"nextPageToken,omitempty"`
1268
1269
1270 googleapi.ServerResponse `json:"-"`
1271
1272
1273
1274
1275
1276 ForceSendFields []string `json:"-"`
1277
1278
1279
1280
1281 NullFields []string `json:"-"`
1282 }
1283
1284 func (s *GoogleCloudRecaptchaenterpriseV1ListKeysResponse) MarshalJSON() ([]byte, error) {
1285 type NoMethod GoogleCloudRecaptchaenterpriseV1ListKeysResponse
1286 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1287 }
1288
1289
1290
1291 type GoogleCloudRecaptchaenterpriseV1ListRelatedAccountGroupMembershipsResponse struct {
1292
1293
1294 NextPageToken string `json:"nextPageToken,omitempty"`
1295
1296 RelatedAccountGroupMemberships []*GoogleCloudRecaptchaenterpriseV1RelatedAccountGroupMembership `json:"relatedAccountGroupMemberships,omitempty"`
1297
1298
1299 googleapi.ServerResponse `json:"-"`
1300
1301
1302
1303
1304
1305 ForceSendFields []string `json:"-"`
1306
1307
1308
1309
1310 NullFields []string `json:"-"`
1311 }
1312
1313 func (s *GoogleCloudRecaptchaenterpriseV1ListRelatedAccountGroupMembershipsResponse) MarshalJSON() ([]byte, error) {
1314 type NoMethod GoogleCloudRecaptchaenterpriseV1ListRelatedAccountGroupMembershipsResponse
1315 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1316 }
1317
1318
1319
1320 type GoogleCloudRecaptchaenterpriseV1ListRelatedAccountGroupsResponse struct {
1321
1322
1323 NextPageToken string `json:"nextPageToken,omitempty"`
1324
1325 RelatedAccountGroups []*GoogleCloudRecaptchaenterpriseV1RelatedAccountGroup `json:"relatedAccountGroups,omitempty"`
1326
1327
1328 googleapi.ServerResponse `json:"-"`
1329
1330
1331
1332
1333
1334 ForceSendFields []string `json:"-"`
1335
1336
1337
1338
1339 NullFields []string `json:"-"`
1340 }
1341
1342 func (s *GoogleCloudRecaptchaenterpriseV1ListRelatedAccountGroupsResponse) MarshalJSON() ([]byte, error) {
1343 type NoMethod GoogleCloudRecaptchaenterpriseV1ListRelatedAccountGroupsResponse
1344 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1345 }
1346
1347
1348 type GoogleCloudRecaptchaenterpriseV1Metrics struct {
1349
1350
1351
1352 ChallengeMetrics []*GoogleCloudRecaptchaenterpriseV1ChallengeMetrics `json:"challengeMetrics,omitempty"`
1353
1354
1355 Name string `json:"name,omitempty"`
1356
1357
1358 ScoreMetrics []*GoogleCloudRecaptchaenterpriseV1ScoreMetrics `json:"scoreMetrics,omitempty"`
1359
1360 StartTime string `json:"startTime,omitempty"`
1361
1362
1363 googleapi.ServerResponse `json:"-"`
1364
1365
1366
1367
1368
1369 ForceSendFields []string `json:"-"`
1370
1371
1372
1373
1374 NullFields []string `json:"-"`
1375 }
1376
1377 func (s *GoogleCloudRecaptchaenterpriseV1Metrics) MarshalJSON() ([]byte, error) {
1378 type NoMethod GoogleCloudRecaptchaenterpriseV1Metrics
1379 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1380 }
1381
1382
1383
1384 type GoogleCloudRecaptchaenterpriseV1MigrateKeyRequest struct {
1385
1386
1387
1388
1389
1390
1391
1392
1393 SkipBillingCheck bool `json:"skipBillingCheck,omitempty"`
1394
1395
1396
1397
1398
1399 ForceSendFields []string `json:"-"`
1400
1401
1402
1403
1404 NullFields []string `json:"-"`
1405 }
1406
1407 func (s *GoogleCloudRecaptchaenterpriseV1MigrateKeyRequest) MarshalJSON() ([]byte, error) {
1408 type NoMethod GoogleCloudRecaptchaenterpriseV1MigrateKeyRequest
1409 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1410 }
1411
1412
1413
1414 type GoogleCloudRecaptchaenterpriseV1PrivatePasswordLeakVerification struct {
1415
1416
1417
1418
1419 EncryptedLeakMatchPrefixes []string `json:"encryptedLeakMatchPrefixes,omitempty"`
1420
1421
1422
1423 EncryptedUserCredentialsHash string `json:"encryptedUserCredentialsHash,omitempty"`
1424
1425
1426
1427 LookupHashPrefix string `json:"lookupHashPrefix,omitempty"`
1428
1429
1430
1431 ReencryptedUserCredentialsHash string `json:"reencryptedUserCredentialsHash,omitempty"`
1432
1433
1434
1435
1436
1437 ForceSendFields []string `json:"-"`
1438
1439
1440
1441
1442 NullFields []string `json:"-"`
1443 }
1444
1445 func (s *GoogleCloudRecaptchaenterpriseV1PrivatePasswordLeakVerification) MarshalJSON() ([]byte, error) {
1446 type NoMethod GoogleCloudRecaptchaenterpriseV1PrivatePasswordLeakVerification
1447 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1448 }
1449
1450
1451
1452 type GoogleCloudRecaptchaenterpriseV1RelatedAccountGroup struct {
1453
1454
1455
1456 Name string `json:"name,omitempty"`
1457
1458
1459
1460
1461
1462 ForceSendFields []string `json:"-"`
1463
1464
1465
1466
1467 NullFields []string `json:"-"`
1468 }
1469
1470 func (s *GoogleCloudRecaptchaenterpriseV1RelatedAccountGroup) MarshalJSON() ([]byte, error) {
1471 type NoMethod GoogleCloudRecaptchaenterpriseV1RelatedAccountGroup
1472 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1473 }
1474
1475
1476
1477 type GoogleCloudRecaptchaenterpriseV1RelatedAccountGroupMembership struct {
1478
1479
1480
1481 AccountId string `json:"accountId,omitempty"`
1482
1483
1484
1485
1486 HashedAccountId string `json:"hashedAccountId,omitempty"`
1487
1488
1489
1490
1491 Name string `json:"name,omitempty"`
1492
1493
1494
1495
1496
1497 ForceSendFields []string `json:"-"`
1498
1499
1500
1501
1502 NullFields []string `json:"-"`
1503 }
1504
1505 func (s *GoogleCloudRecaptchaenterpriseV1RelatedAccountGroupMembership) MarshalJSON() ([]byte, error) {
1506 type NoMethod GoogleCloudRecaptchaenterpriseV1RelatedAccountGroupMembership
1507 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1508 }
1509
1510
1511
1512 type GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesRequest struct {
1513
1514
1515
1516 Names []string `json:"names,omitempty"`
1517
1518
1519
1520
1521
1522 ForceSendFields []string `json:"-"`
1523
1524
1525
1526
1527 NullFields []string `json:"-"`
1528 }
1529
1530 func (s *GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesRequest) MarshalJSON() ([]byte, error) {
1531 type NoMethod GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesRequest
1532 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1533 }
1534
1535
1536
1537 type GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesResponse struct {
1538
1539 googleapi.ServerResponse `json:"-"`
1540 }
1541
1542
1543
1544
1545 type GoogleCloudRecaptchaenterpriseV1RetrieveLegacySecretKeyResponse struct {
1546
1547
1548
1549
1550 LegacySecretKey string `json:"legacySecretKey,omitempty"`
1551
1552
1553 googleapi.ServerResponse `json:"-"`
1554
1555
1556
1557
1558
1559 ForceSendFields []string `json:"-"`
1560
1561
1562
1563
1564 NullFields []string `json:"-"`
1565 }
1566
1567 func (s *GoogleCloudRecaptchaenterpriseV1RetrieveLegacySecretKeyResponse) MarshalJSON() ([]byte, error) {
1568 type NoMethod GoogleCloudRecaptchaenterpriseV1RetrieveLegacySecretKeyResponse
1569 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1570 }
1571
1572
1573
1574 type GoogleCloudRecaptchaenterpriseV1RiskAnalysis struct {
1575
1576
1577 ExtendedVerdictReasons []string `json:"extendedVerdictReasons,omitempty"`
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595 Reasons []string `json:"reasons,omitempty"`
1596
1597
1598
1599 Score float64 `json:"score,omitempty"`
1600
1601
1602
1603
1604
1605 ForceSendFields []string `json:"-"`
1606
1607
1608
1609
1610 NullFields []string `json:"-"`
1611 }
1612
1613 func (s *GoogleCloudRecaptchaenterpriseV1RiskAnalysis) MarshalJSON() ([]byte, error) {
1614 type NoMethod GoogleCloudRecaptchaenterpriseV1RiskAnalysis
1615 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1616 }
1617
1618 func (s *GoogleCloudRecaptchaenterpriseV1RiskAnalysis) UnmarshalJSON(data []byte) error {
1619 type NoMethod GoogleCloudRecaptchaenterpriseV1RiskAnalysis
1620 var s1 struct {
1621 Score gensupport.JSONFloat64 `json:"score"`
1622 *NoMethod
1623 }
1624 s1.NoMethod = (*NoMethod)(s)
1625 if err := json.Unmarshal(data, &s1); err != nil {
1626 return err
1627 }
1628 s.Score = float64(s1.Score)
1629 return nil
1630 }
1631
1632
1633 type GoogleCloudRecaptchaenterpriseV1ScoreDistribution struct {
1634
1635
1636
1637 ScoreBuckets map[string]string `json:"scoreBuckets,omitempty"`
1638
1639
1640
1641
1642
1643 ForceSendFields []string `json:"-"`
1644
1645
1646
1647
1648 NullFields []string `json:"-"`
1649 }
1650
1651 func (s *GoogleCloudRecaptchaenterpriseV1ScoreDistribution) MarshalJSON() ([]byte, error) {
1652 type NoMethod GoogleCloudRecaptchaenterpriseV1ScoreDistribution
1653 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1654 }
1655
1656
1657 type GoogleCloudRecaptchaenterpriseV1ScoreMetrics struct {
1658
1659
1660 ActionMetrics map[string]GoogleCloudRecaptchaenterpriseV1ScoreDistribution `json:"actionMetrics,omitempty"`
1661
1662 OverallMetrics *GoogleCloudRecaptchaenterpriseV1ScoreDistribution `json:"overallMetrics,omitempty"`
1663
1664
1665
1666
1667
1668 ForceSendFields []string `json:"-"`
1669
1670
1671
1672
1673 NullFields []string `json:"-"`
1674 }
1675
1676 func (s *GoogleCloudRecaptchaenterpriseV1ScoreMetrics) MarshalJSON() ([]byte, error) {
1677 type NoMethod GoogleCloudRecaptchaenterpriseV1ScoreMetrics
1678 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1679 }
1680
1681
1682
1683 type GoogleCloudRecaptchaenterpriseV1SearchRelatedAccountGroupMembershipsRequest struct {
1684
1685
1686
1687
1688 AccountId string `json:"accountId,omitempty"`
1689
1690
1691
1692
1693
1694 HashedAccountId string `json:"hashedAccountId,omitempty"`
1695
1696
1697
1698 PageSize int64 `json:"pageSize,omitempty"`
1699
1700
1701
1702
1703
1704 PageToken string `json:"pageToken,omitempty"`
1705
1706
1707
1708
1709
1710 ForceSendFields []string `json:"-"`
1711
1712
1713
1714
1715 NullFields []string `json:"-"`
1716 }
1717
1718 func (s *GoogleCloudRecaptchaenterpriseV1SearchRelatedAccountGroupMembershipsRequest) MarshalJSON() ([]byte, error) {
1719 type NoMethod GoogleCloudRecaptchaenterpriseV1SearchRelatedAccountGroupMembershipsRequest
1720 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1721 }
1722
1723
1724
1725
1726 type GoogleCloudRecaptchaenterpriseV1SearchRelatedAccountGroupMembershipsResponse struct {
1727
1728
1729 NextPageToken string `json:"nextPageToken,omitempty"`
1730
1731 RelatedAccountGroupMemberships []*GoogleCloudRecaptchaenterpriseV1RelatedAccountGroupMembership `json:"relatedAccountGroupMemberships,omitempty"`
1732
1733
1734 googleapi.ServerResponse `json:"-"`
1735
1736
1737
1738
1739
1740 ForceSendFields []string `json:"-"`
1741
1742
1743
1744
1745 NullFields []string `json:"-"`
1746 }
1747
1748 func (s *GoogleCloudRecaptchaenterpriseV1SearchRelatedAccountGroupMembershipsResponse) MarshalJSON() ([]byte, error) {
1749 type NoMethod GoogleCloudRecaptchaenterpriseV1SearchRelatedAccountGroupMembershipsResponse
1750 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1751 }
1752
1753
1754
1755 type GoogleCloudRecaptchaenterpriseV1TestingOptions struct {
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767 TestingChallenge string `json:"testingChallenge,omitempty"`
1768
1769
1770
1771 TestingScore float64 `json:"testingScore,omitempty"`
1772
1773
1774
1775
1776
1777 ForceSendFields []string `json:"-"`
1778
1779
1780
1781
1782 NullFields []string `json:"-"`
1783 }
1784
1785 func (s *GoogleCloudRecaptchaenterpriseV1TestingOptions) MarshalJSON() ([]byte, error) {
1786 type NoMethod GoogleCloudRecaptchaenterpriseV1TestingOptions
1787 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1788 }
1789
1790 func (s *GoogleCloudRecaptchaenterpriseV1TestingOptions) UnmarshalJSON(data []byte) error {
1791 type NoMethod GoogleCloudRecaptchaenterpriseV1TestingOptions
1792 var s1 struct {
1793 TestingScore gensupport.JSONFloat64 `json:"testingScore"`
1794 *NoMethod
1795 }
1796 s1.NoMethod = (*NoMethod)(s)
1797 if err := json.Unmarshal(data, &s1); err != nil {
1798 return err
1799 }
1800 s.TestingScore = float64(s1.TestingScore)
1801 return nil
1802 }
1803
1804
1805
1806 type GoogleCloudRecaptchaenterpriseV1TokenProperties struct {
1807
1808 Action string `json:"action,omitempty"`
1809
1810
1811 AndroidPackageName string `json:"androidPackageName,omitempty"`
1812
1813
1814 CreateTime string `json:"createTime,omitempty"`
1815
1816
1817 Hostname string `json:"hostname,omitempty"`
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830 InvalidReason string `json:"invalidReason,omitempty"`
1831
1832
1833 IosBundleId string `json:"iosBundleId,omitempty"`
1834
1835
1836
1837
1838
1839 Valid bool `json:"valid,omitempty"`
1840
1841
1842
1843
1844
1845 ForceSendFields []string `json:"-"`
1846
1847
1848
1849
1850 NullFields []string `json:"-"`
1851 }
1852
1853 func (s *GoogleCloudRecaptchaenterpriseV1TokenProperties) MarshalJSON() ([]byte, error) {
1854 type NoMethod GoogleCloudRecaptchaenterpriseV1TokenProperties
1855 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1856 }
1857
1858
1859
1860 type GoogleCloudRecaptchaenterpriseV1TransactionData struct {
1861
1862
1863 BillingAddress *GoogleCloudRecaptchaenterpriseV1TransactionDataAddress `json:"billingAddress,omitempty"`
1864
1865
1866 CardBin string `json:"cardBin,omitempty"`
1867
1868 CardLastFour string `json:"cardLastFour,omitempty"`
1869
1870 CurrencyCode string `json:"currencyCode,omitempty"`
1871
1872
1873 GatewayInfo *GoogleCloudRecaptchaenterpriseV1TransactionDataGatewayInfo `json:"gatewayInfo,omitempty"`
1874
1875 Items []*GoogleCloudRecaptchaenterpriseV1TransactionDataItem `json:"items,omitempty"`
1876
1877
1878 Merchants []*GoogleCloudRecaptchaenterpriseV1TransactionDataUser `json:"merchants,omitempty"`
1879
1880
1881
1882
1883 PaymentMethod string `json:"paymentMethod,omitempty"`
1884
1885
1886 ShippingAddress *GoogleCloudRecaptchaenterpriseV1TransactionDataAddress `json:"shippingAddress,omitempty"`
1887
1888
1889 ShippingValue float64 `json:"shippingValue,omitempty"`
1890
1891
1892
1893
1894 TransactionId string `json:"transactionId,omitempty"`
1895
1896
1897 User *GoogleCloudRecaptchaenterpriseV1TransactionDataUser `json:"user,omitempty"`
1898
1899
1900 Value float64 `json:"value,omitempty"`
1901
1902
1903
1904
1905
1906 ForceSendFields []string `json:"-"`
1907
1908
1909
1910
1911 NullFields []string `json:"-"`
1912 }
1913
1914 func (s *GoogleCloudRecaptchaenterpriseV1TransactionData) MarshalJSON() ([]byte, error) {
1915 type NoMethod GoogleCloudRecaptchaenterpriseV1TransactionData
1916 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1917 }
1918
1919 func (s *GoogleCloudRecaptchaenterpriseV1TransactionData) UnmarshalJSON(data []byte) error {
1920 type NoMethod GoogleCloudRecaptchaenterpriseV1TransactionData
1921 var s1 struct {
1922 ShippingValue gensupport.JSONFloat64 `json:"shippingValue"`
1923 Value gensupport.JSONFloat64 `json:"value"`
1924 *NoMethod
1925 }
1926 s1.NoMethod = (*NoMethod)(s)
1927 if err := json.Unmarshal(data, &s1); err != nil {
1928 return err
1929 }
1930 s.ShippingValue = float64(s1.ShippingValue)
1931 s.Value = float64(s1.Value)
1932 return nil
1933 }
1934
1935
1936
1937 type GoogleCloudRecaptchaenterpriseV1TransactionDataAddress struct {
1938
1939
1940
1941 Address []string `json:"address,omitempty"`
1942
1943
1944 AdministrativeArea string `json:"administrativeArea,omitempty"`
1945
1946 Locality string `json:"locality,omitempty"`
1947
1948 PostalCode string `json:"postalCode,omitempty"`
1949
1950
1951 Recipient string `json:"recipient,omitempty"`
1952
1953 RegionCode string `json:"regionCode,omitempty"`
1954
1955
1956
1957
1958
1959 ForceSendFields []string `json:"-"`
1960
1961
1962
1963
1964 NullFields []string `json:"-"`
1965 }
1966
1967 func (s *GoogleCloudRecaptchaenterpriseV1TransactionDataAddress) MarshalJSON() ([]byte, error) {
1968 type NoMethod GoogleCloudRecaptchaenterpriseV1TransactionDataAddress
1969 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1970 }
1971
1972
1973
1974 type GoogleCloudRecaptchaenterpriseV1TransactionDataGatewayInfo struct {
1975
1976
1977 AvsResponseCode string `json:"avsResponseCode,omitempty"`
1978
1979
1980 CvvResponseCode string `json:"cvvResponseCode,omitempty"`
1981
1982
1983 GatewayResponseCode string `json:"gatewayResponseCode,omitempty"`
1984
1985
1986 Name string `json:"name,omitempty"`
1987
1988
1989
1990
1991
1992 ForceSendFields []string `json:"-"`
1993
1994
1995
1996
1997 NullFields []string `json:"-"`
1998 }
1999
2000 func (s *GoogleCloudRecaptchaenterpriseV1TransactionDataGatewayInfo) MarshalJSON() ([]byte, error) {
2001 type NoMethod GoogleCloudRecaptchaenterpriseV1TransactionDataGatewayInfo
2002 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2003 }
2004
2005
2006
2007 type GoogleCloudRecaptchaenterpriseV1TransactionDataItem struct {
2008
2009
2010 MerchantAccountId string `json:"merchantAccountId,omitempty"`
2011
2012 Name string `json:"name,omitempty"`
2013
2014 Quantity int64 `json:"quantity,omitempty,string"`
2015
2016
2017 Value float64 `json:"value,omitempty"`
2018
2019
2020
2021
2022
2023 ForceSendFields []string `json:"-"`
2024
2025
2026
2027
2028 NullFields []string `json:"-"`
2029 }
2030
2031 func (s *GoogleCloudRecaptchaenterpriseV1TransactionDataItem) MarshalJSON() ([]byte, error) {
2032 type NoMethod GoogleCloudRecaptchaenterpriseV1TransactionDataItem
2033 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2034 }
2035
2036 func (s *GoogleCloudRecaptchaenterpriseV1TransactionDataItem) UnmarshalJSON(data []byte) error {
2037 type NoMethod GoogleCloudRecaptchaenterpriseV1TransactionDataItem
2038 var s1 struct {
2039 Value gensupport.JSONFloat64 `json:"value"`
2040 *NoMethod
2041 }
2042 s1.NoMethod = (*NoMethod)(s)
2043 if err := json.Unmarshal(data, &s1); err != nil {
2044 return err
2045 }
2046 s.Value = float64(s1.Value)
2047 return nil
2048 }
2049
2050
2051
2052 type GoogleCloudRecaptchaenterpriseV1TransactionDataUser struct {
2053
2054
2055
2056 AccountId string `json:"accountId,omitempty"`
2057
2058 CreationMs int64 `json:"creationMs,omitempty,string"`
2059
2060 Email string `json:"email,omitempty"`
2061
2062
2063 EmailVerified bool `json:"emailVerified,omitempty"`
2064
2065 PhoneNumber string `json:"phoneNumber,omitempty"`
2066
2067
2068 PhoneVerified bool `json:"phoneVerified,omitempty"`
2069
2070
2071
2072
2073
2074 ForceSendFields []string `json:"-"`
2075
2076
2077
2078
2079 NullFields []string `json:"-"`
2080 }
2081
2082 func (s *GoogleCloudRecaptchaenterpriseV1TransactionDataUser) MarshalJSON() ([]byte, error) {
2083 type NoMethod GoogleCloudRecaptchaenterpriseV1TransactionDataUser
2084 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2085 }
2086
2087
2088
2089 type GoogleCloudRecaptchaenterpriseV1TransactionEvent struct {
2090
2091
2092 EventTime string `json:"eventTime,omitempty"`
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157 EventType string `json:"eventType,omitempty"`
2158
2159
2160
2161 Reason string `json:"reason,omitempty"`
2162
2163
2164
2165 Value float64 `json:"value,omitempty"`
2166
2167
2168
2169
2170
2171 ForceSendFields []string `json:"-"`
2172
2173
2174
2175
2176 NullFields []string `json:"-"`
2177 }
2178
2179 func (s *GoogleCloudRecaptchaenterpriseV1TransactionEvent) MarshalJSON() ([]byte, error) {
2180 type NoMethod GoogleCloudRecaptchaenterpriseV1TransactionEvent
2181 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2182 }
2183
2184 func (s *GoogleCloudRecaptchaenterpriseV1TransactionEvent) UnmarshalJSON(data []byte) error {
2185 type NoMethod GoogleCloudRecaptchaenterpriseV1TransactionEvent
2186 var s1 struct {
2187 Value gensupport.JSONFloat64 `json:"value"`
2188 *NoMethod
2189 }
2190 s1.NoMethod = (*NoMethod)(s)
2191 if err := json.Unmarshal(data, &s1); err != nil {
2192 return err
2193 }
2194 s.Value = float64(s1.Value)
2195 return nil
2196 }
2197
2198
2199
2200 type GoogleCloudRecaptchaenterpriseV1UserId struct {
2201
2202 Email string `json:"email,omitempty"`
2203
2204 PhoneNumber string `json:"phoneNumber,omitempty"`
2205
2206
2207
2208 Username string `json:"username,omitempty"`
2209
2210
2211
2212
2213
2214 ForceSendFields []string `json:"-"`
2215
2216
2217
2218
2219 NullFields []string `json:"-"`
2220 }
2221
2222 func (s *GoogleCloudRecaptchaenterpriseV1UserId) MarshalJSON() ([]byte, error) {
2223 type NoMethod GoogleCloudRecaptchaenterpriseV1UserId
2224 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2225 }
2226
2227
2228
2229 type GoogleCloudRecaptchaenterpriseV1UserInfo struct {
2230
2231
2232
2233
2234
2235 AccountId string `json:"accountId,omitempty"`
2236
2237
2238
2239 CreateAccountTime string `json:"createAccountTime,omitempty"`
2240
2241 UserIds []*GoogleCloudRecaptchaenterpriseV1UserId `json:"userIds,omitempty"`
2242
2243
2244
2245
2246
2247 ForceSendFields []string `json:"-"`
2248
2249
2250
2251
2252 NullFields []string `json:"-"`
2253 }
2254
2255 func (s *GoogleCloudRecaptchaenterpriseV1UserInfo) MarshalJSON() ([]byte, error) {
2256 type NoMethod GoogleCloudRecaptchaenterpriseV1UserInfo
2257 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2258 }
2259
2260
2261
2262 type GoogleCloudRecaptchaenterpriseV1WafSettings struct {
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273 WafFeature string `json:"wafFeature,omitempty"`
2274
2275
2276
2277
2278
2279
2280
2281 WafService string `json:"wafService,omitempty"`
2282
2283
2284
2285
2286
2287 ForceSendFields []string `json:"-"`
2288
2289
2290
2291
2292 NullFields []string `json:"-"`
2293 }
2294
2295 func (s *GoogleCloudRecaptchaenterpriseV1WafSettings) MarshalJSON() ([]byte, error) {
2296 type NoMethod GoogleCloudRecaptchaenterpriseV1WafSettings
2297 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2298 }
2299
2300
2301
2302 type GoogleCloudRecaptchaenterpriseV1WebKeySettings struct {
2303
2304
2305 AllowAllDomains bool `json:"allowAllDomains,omitempty"`
2306
2307
2308
2309 AllowAmpTraffic bool `json:"allowAmpTraffic,omitempty"`
2310
2311
2312
2313
2314 AllowedDomains []string `json:"allowedDomains,omitempty"`
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326 ChallengeSecurityPreference string `json:"challengeSecurityPreference,omitempty"`
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340 IntegrationType string `json:"integrationType,omitempty"`
2341
2342
2343
2344
2345
2346 ForceSendFields []string `json:"-"`
2347
2348
2349
2350
2351 NullFields []string `json:"-"`
2352 }
2353
2354 func (s *GoogleCloudRecaptchaenterpriseV1WebKeySettings) MarshalJSON() ([]byte, error) {
2355 type NoMethod GoogleCloudRecaptchaenterpriseV1WebKeySettings
2356 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2357 }
2358
2359
2360
2361
2362
2363
2364 type GoogleProtobufEmpty struct {
2365
2366 googleapi.ServerResponse `json:"-"`
2367 }
2368
2369
2370
2371
2372
2373
2374
2375 type GoogleRpcStatus struct {
2376
2377 Code int64 `json:"code,omitempty"`
2378
2379
2380 Details []googleapi.RawMessage `json:"details,omitempty"`
2381
2382
2383
2384 Message string `json:"message,omitempty"`
2385
2386
2387
2388
2389
2390 ForceSendFields []string `json:"-"`
2391
2392
2393
2394
2395 NullFields []string `json:"-"`
2396 }
2397
2398 func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) {
2399 type NoMethod GoogleRpcStatus
2400 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2401 }
2402
2403 type ProjectsAssessmentsAnnotateCall struct {
2404 s *Service
2405 name string
2406 googlecloudrecaptchaenterprisev1annotateassessmentrequest *GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentRequest
2407 urlParams_ gensupport.URLParams
2408 ctx_ context.Context
2409 header_ http.Header
2410 }
2411
2412
2413
2414
2415
2416
2417 func (r *ProjectsAssessmentsService) Annotate(name string, googlecloudrecaptchaenterprisev1annotateassessmentrequest *GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentRequest) *ProjectsAssessmentsAnnotateCall {
2418 c := &ProjectsAssessmentsAnnotateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2419 c.name = name
2420 c.googlecloudrecaptchaenterprisev1annotateassessmentrequest = googlecloudrecaptchaenterprisev1annotateassessmentrequest
2421 return c
2422 }
2423
2424
2425
2426
2427 func (c *ProjectsAssessmentsAnnotateCall) Fields(s ...googleapi.Field) *ProjectsAssessmentsAnnotateCall {
2428 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2429 return c
2430 }
2431
2432
2433 func (c *ProjectsAssessmentsAnnotateCall) Context(ctx context.Context) *ProjectsAssessmentsAnnotateCall {
2434 c.ctx_ = ctx
2435 return c
2436 }
2437
2438
2439
2440 func (c *ProjectsAssessmentsAnnotateCall) Header() http.Header {
2441 if c.header_ == nil {
2442 c.header_ = make(http.Header)
2443 }
2444 return c.header_
2445 }
2446
2447 func (c *ProjectsAssessmentsAnnotateCall) doRequest(alt string) (*http.Response, error) {
2448 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2449 var body io.Reader = nil
2450 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudrecaptchaenterprisev1annotateassessmentrequest)
2451 if err != nil {
2452 return nil, err
2453 }
2454 c.urlParams_.Set("alt", alt)
2455 c.urlParams_.Set("prettyPrint", "false")
2456 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:annotate")
2457 urls += "?" + c.urlParams_.Encode()
2458 req, err := http.NewRequest("POST", urls, body)
2459 if err != nil {
2460 return nil, err
2461 }
2462 req.Header = reqHeaders
2463 googleapi.Expand(req.URL, map[string]string{
2464 "name": c.name,
2465 })
2466 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2467 }
2468
2469
2470
2471
2472
2473
2474
2475 func (c *ProjectsAssessmentsAnnotateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentResponse, error) {
2476 gensupport.SetOptions(c.urlParams_, opts...)
2477 res, err := c.doRequest("json")
2478 if res != nil && res.StatusCode == http.StatusNotModified {
2479 if res.Body != nil {
2480 res.Body.Close()
2481 }
2482 return nil, gensupport.WrapError(&googleapi.Error{
2483 Code: res.StatusCode,
2484 Header: res.Header,
2485 })
2486 }
2487 if err != nil {
2488 return nil, err
2489 }
2490 defer googleapi.CloseBody(res)
2491 if err := googleapi.CheckResponse(res); err != nil {
2492 return nil, gensupport.WrapError(err)
2493 }
2494 ret := &GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentResponse{
2495 ServerResponse: googleapi.ServerResponse{
2496 Header: res.Header,
2497 HTTPStatusCode: res.StatusCode,
2498 },
2499 }
2500 target := &ret
2501 if err := gensupport.DecodeResponse(target, res); err != nil {
2502 return nil, err
2503 }
2504 return ret, nil
2505 }
2506
2507 type ProjectsAssessmentsCreateCall struct {
2508 s *Service
2509 parent string
2510 googlecloudrecaptchaenterprisev1assessment *GoogleCloudRecaptchaenterpriseV1Assessment
2511 urlParams_ gensupport.URLParams
2512 ctx_ context.Context
2513 header_ http.Header
2514 }
2515
2516
2517
2518
2519
2520 func (r *ProjectsAssessmentsService) Create(parent string, googlecloudrecaptchaenterprisev1assessment *GoogleCloudRecaptchaenterpriseV1Assessment) *ProjectsAssessmentsCreateCall {
2521 c := &ProjectsAssessmentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2522 c.parent = parent
2523 c.googlecloudrecaptchaenterprisev1assessment = googlecloudrecaptchaenterprisev1assessment
2524 return c
2525 }
2526
2527
2528
2529
2530 func (c *ProjectsAssessmentsCreateCall) Fields(s ...googleapi.Field) *ProjectsAssessmentsCreateCall {
2531 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2532 return c
2533 }
2534
2535
2536 func (c *ProjectsAssessmentsCreateCall) Context(ctx context.Context) *ProjectsAssessmentsCreateCall {
2537 c.ctx_ = ctx
2538 return c
2539 }
2540
2541
2542
2543 func (c *ProjectsAssessmentsCreateCall) Header() http.Header {
2544 if c.header_ == nil {
2545 c.header_ = make(http.Header)
2546 }
2547 return c.header_
2548 }
2549
2550 func (c *ProjectsAssessmentsCreateCall) doRequest(alt string) (*http.Response, error) {
2551 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2552 var body io.Reader = nil
2553 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudrecaptchaenterprisev1assessment)
2554 if err != nil {
2555 return nil, err
2556 }
2557 c.urlParams_.Set("alt", alt)
2558 c.urlParams_.Set("prettyPrint", "false")
2559 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/assessments")
2560 urls += "?" + c.urlParams_.Encode()
2561 req, err := http.NewRequest("POST", urls, body)
2562 if err != nil {
2563 return nil, err
2564 }
2565 req.Header = reqHeaders
2566 googleapi.Expand(req.URL, map[string]string{
2567 "parent": c.parent,
2568 })
2569 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2570 }
2571
2572
2573
2574
2575
2576
2577
2578 func (c *ProjectsAssessmentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecaptchaenterpriseV1Assessment, error) {
2579 gensupport.SetOptions(c.urlParams_, opts...)
2580 res, err := c.doRequest("json")
2581 if res != nil && res.StatusCode == http.StatusNotModified {
2582 if res.Body != nil {
2583 res.Body.Close()
2584 }
2585 return nil, gensupport.WrapError(&googleapi.Error{
2586 Code: res.StatusCode,
2587 Header: res.Header,
2588 })
2589 }
2590 if err != nil {
2591 return nil, err
2592 }
2593 defer googleapi.CloseBody(res)
2594 if err := googleapi.CheckResponse(res); err != nil {
2595 return nil, gensupport.WrapError(err)
2596 }
2597 ret := &GoogleCloudRecaptchaenterpriseV1Assessment{
2598 ServerResponse: googleapi.ServerResponse{
2599 Header: res.Header,
2600 HTTPStatusCode: res.StatusCode,
2601 },
2602 }
2603 target := &ret
2604 if err := gensupport.DecodeResponse(target, res); err != nil {
2605 return nil, err
2606 }
2607 return ret, nil
2608 }
2609
2610 type ProjectsFirewallpoliciesCreateCall struct {
2611 s *Service
2612 parent string
2613 googlecloudrecaptchaenterprisev1firewallpolicy *GoogleCloudRecaptchaenterpriseV1FirewallPolicy
2614 urlParams_ gensupport.URLParams
2615 ctx_ context.Context
2616 header_ http.Header
2617 }
2618
2619
2620
2621
2622
2623
2624
2625 func (r *ProjectsFirewallpoliciesService) Create(parent string, googlecloudrecaptchaenterprisev1firewallpolicy *GoogleCloudRecaptchaenterpriseV1FirewallPolicy) *ProjectsFirewallpoliciesCreateCall {
2626 c := &ProjectsFirewallpoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2627 c.parent = parent
2628 c.googlecloudrecaptchaenterprisev1firewallpolicy = googlecloudrecaptchaenterprisev1firewallpolicy
2629 return c
2630 }
2631
2632
2633
2634
2635 func (c *ProjectsFirewallpoliciesCreateCall) Fields(s ...googleapi.Field) *ProjectsFirewallpoliciesCreateCall {
2636 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2637 return c
2638 }
2639
2640
2641 func (c *ProjectsFirewallpoliciesCreateCall) Context(ctx context.Context) *ProjectsFirewallpoliciesCreateCall {
2642 c.ctx_ = ctx
2643 return c
2644 }
2645
2646
2647
2648 func (c *ProjectsFirewallpoliciesCreateCall) Header() http.Header {
2649 if c.header_ == nil {
2650 c.header_ = make(http.Header)
2651 }
2652 return c.header_
2653 }
2654
2655 func (c *ProjectsFirewallpoliciesCreateCall) doRequest(alt string) (*http.Response, error) {
2656 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2657 var body io.Reader = nil
2658 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudrecaptchaenterprisev1firewallpolicy)
2659 if err != nil {
2660 return nil, err
2661 }
2662 c.urlParams_.Set("alt", alt)
2663 c.urlParams_.Set("prettyPrint", "false")
2664 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/firewallpolicies")
2665 urls += "?" + c.urlParams_.Encode()
2666 req, err := http.NewRequest("POST", urls, body)
2667 if err != nil {
2668 return nil, err
2669 }
2670 req.Header = reqHeaders
2671 googleapi.Expand(req.URL, map[string]string{
2672 "parent": c.parent,
2673 })
2674 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2675 }
2676
2677
2678
2679
2680
2681
2682
2683 func (c *ProjectsFirewallpoliciesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecaptchaenterpriseV1FirewallPolicy, error) {
2684 gensupport.SetOptions(c.urlParams_, opts...)
2685 res, err := c.doRequest("json")
2686 if res != nil && res.StatusCode == http.StatusNotModified {
2687 if res.Body != nil {
2688 res.Body.Close()
2689 }
2690 return nil, gensupport.WrapError(&googleapi.Error{
2691 Code: res.StatusCode,
2692 Header: res.Header,
2693 })
2694 }
2695 if err != nil {
2696 return nil, err
2697 }
2698 defer googleapi.CloseBody(res)
2699 if err := googleapi.CheckResponse(res); err != nil {
2700 return nil, gensupport.WrapError(err)
2701 }
2702 ret := &GoogleCloudRecaptchaenterpriseV1FirewallPolicy{
2703 ServerResponse: googleapi.ServerResponse{
2704 Header: res.Header,
2705 HTTPStatusCode: res.StatusCode,
2706 },
2707 }
2708 target := &ret
2709 if err := gensupport.DecodeResponse(target, res); err != nil {
2710 return nil, err
2711 }
2712 return ret, nil
2713 }
2714
2715 type ProjectsFirewallpoliciesDeleteCall struct {
2716 s *Service
2717 name string
2718 urlParams_ gensupport.URLParams
2719 ctx_ context.Context
2720 header_ http.Header
2721 }
2722
2723
2724
2725
2726
2727 func (r *ProjectsFirewallpoliciesService) Delete(name string) *ProjectsFirewallpoliciesDeleteCall {
2728 c := &ProjectsFirewallpoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2729 c.name = name
2730 return c
2731 }
2732
2733
2734
2735
2736 func (c *ProjectsFirewallpoliciesDeleteCall) Fields(s ...googleapi.Field) *ProjectsFirewallpoliciesDeleteCall {
2737 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2738 return c
2739 }
2740
2741
2742 func (c *ProjectsFirewallpoliciesDeleteCall) Context(ctx context.Context) *ProjectsFirewallpoliciesDeleteCall {
2743 c.ctx_ = ctx
2744 return c
2745 }
2746
2747
2748
2749 func (c *ProjectsFirewallpoliciesDeleteCall) Header() http.Header {
2750 if c.header_ == nil {
2751 c.header_ = make(http.Header)
2752 }
2753 return c.header_
2754 }
2755
2756 func (c *ProjectsFirewallpoliciesDeleteCall) doRequest(alt string) (*http.Response, error) {
2757 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2758 var body io.Reader = nil
2759 c.urlParams_.Set("alt", alt)
2760 c.urlParams_.Set("prettyPrint", "false")
2761 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
2762 urls += "?" + c.urlParams_.Encode()
2763 req, err := http.NewRequest("DELETE", urls, body)
2764 if err != nil {
2765 return nil, err
2766 }
2767 req.Header = reqHeaders
2768 googleapi.Expand(req.URL, map[string]string{
2769 "name": c.name,
2770 })
2771 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2772 }
2773
2774
2775
2776
2777
2778
2779
2780 func (c *ProjectsFirewallpoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
2781 gensupport.SetOptions(c.urlParams_, opts...)
2782 res, err := c.doRequest("json")
2783 if res != nil && res.StatusCode == http.StatusNotModified {
2784 if res.Body != nil {
2785 res.Body.Close()
2786 }
2787 return nil, gensupport.WrapError(&googleapi.Error{
2788 Code: res.StatusCode,
2789 Header: res.Header,
2790 })
2791 }
2792 if err != nil {
2793 return nil, err
2794 }
2795 defer googleapi.CloseBody(res)
2796 if err := googleapi.CheckResponse(res); err != nil {
2797 return nil, gensupport.WrapError(err)
2798 }
2799 ret := &GoogleProtobufEmpty{
2800 ServerResponse: googleapi.ServerResponse{
2801 Header: res.Header,
2802 HTTPStatusCode: res.StatusCode,
2803 },
2804 }
2805 target := &ret
2806 if err := gensupport.DecodeResponse(target, res); err != nil {
2807 return nil, err
2808 }
2809 return ret, nil
2810 }
2811
2812 type ProjectsFirewallpoliciesGetCall struct {
2813 s *Service
2814 name string
2815 urlParams_ gensupport.URLParams
2816 ifNoneMatch_ string
2817 ctx_ context.Context
2818 header_ http.Header
2819 }
2820
2821
2822
2823
2824
2825 func (r *ProjectsFirewallpoliciesService) Get(name string) *ProjectsFirewallpoliciesGetCall {
2826 c := &ProjectsFirewallpoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2827 c.name = name
2828 return c
2829 }
2830
2831
2832
2833
2834 func (c *ProjectsFirewallpoliciesGetCall) Fields(s ...googleapi.Field) *ProjectsFirewallpoliciesGetCall {
2835 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2836 return c
2837 }
2838
2839
2840
2841
2842 func (c *ProjectsFirewallpoliciesGetCall) IfNoneMatch(entityTag string) *ProjectsFirewallpoliciesGetCall {
2843 c.ifNoneMatch_ = entityTag
2844 return c
2845 }
2846
2847
2848 func (c *ProjectsFirewallpoliciesGetCall) Context(ctx context.Context) *ProjectsFirewallpoliciesGetCall {
2849 c.ctx_ = ctx
2850 return c
2851 }
2852
2853
2854
2855 func (c *ProjectsFirewallpoliciesGetCall) Header() http.Header {
2856 if c.header_ == nil {
2857 c.header_ = make(http.Header)
2858 }
2859 return c.header_
2860 }
2861
2862 func (c *ProjectsFirewallpoliciesGetCall) doRequest(alt string) (*http.Response, error) {
2863 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2864 if c.ifNoneMatch_ != "" {
2865 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2866 }
2867 var body io.Reader = nil
2868 c.urlParams_.Set("alt", alt)
2869 c.urlParams_.Set("prettyPrint", "false")
2870 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
2871 urls += "?" + c.urlParams_.Encode()
2872 req, err := http.NewRequest("GET", urls, body)
2873 if err != nil {
2874 return nil, err
2875 }
2876 req.Header = reqHeaders
2877 googleapi.Expand(req.URL, map[string]string{
2878 "name": c.name,
2879 })
2880 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2881 }
2882
2883
2884
2885
2886
2887
2888
2889 func (c *ProjectsFirewallpoliciesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecaptchaenterpriseV1FirewallPolicy, error) {
2890 gensupport.SetOptions(c.urlParams_, opts...)
2891 res, err := c.doRequest("json")
2892 if res != nil && res.StatusCode == http.StatusNotModified {
2893 if res.Body != nil {
2894 res.Body.Close()
2895 }
2896 return nil, gensupport.WrapError(&googleapi.Error{
2897 Code: res.StatusCode,
2898 Header: res.Header,
2899 })
2900 }
2901 if err != nil {
2902 return nil, err
2903 }
2904 defer googleapi.CloseBody(res)
2905 if err := googleapi.CheckResponse(res); err != nil {
2906 return nil, gensupport.WrapError(err)
2907 }
2908 ret := &GoogleCloudRecaptchaenterpriseV1FirewallPolicy{
2909 ServerResponse: googleapi.ServerResponse{
2910 Header: res.Header,
2911 HTTPStatusCode: res.StatusCode,
2912 },
2913 }
2914 target := &ret
2915 if err := gensupport.DecodeResponse(target, res); err != nil {
2916 return nil, err
2917 }
2918 return ret, nil
2919 }
2920
2921 type ProjectsFirewallpoliciesListCall struct {
2922 s *Service
2923 parent string
2924 urlParams_ gensupport.URLParams
2925 ifNoneMatch_ string
2926 ctx_ context.Context
2927 header_ http.Header
2928 }
2929
2930
2931
2932
2933
2934 func (r *ProjectsFirewallpoliciesService) List(parent string) *ProjectsFirewallpoliciesListCall {
2935 c := &ProjectsFirewallpoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2936 c.parent = parent
2937 return c
2938 }
2939
2940
2941
2942 func (c *ProjectsFirewallpoliciesListCall) PageSize(pageSize int64) *ProjectsFirewallpoliciesListCall {
2943 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
2944 return c
2945 }
2946
2947
2948
2949 func (c *ProjectsFirewallpoliciesListCall) PageToken(pageToken string) *ProjectsFirewallpoliciesListCall {
2950 c.urlParams_.Set("pageToken", pageToken)
2951 return c
2952 }
2953
2954
2955
2956
2957 func (c *ProjectsFirewallpoliciesListCall) Fields(s ...googleapi.Field) *ProjectsFirewallpoliciesListCall {
2958 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2959 return c
2960 }
2961
2962
2963
2964
2965 func (c *ProjectsFirewallpoliciesListCall) IfNoneMatch(entityTag string) *ProjectsFirewallpoliciesListCall {
2966 c.ifNoneMatch_ = entityTag
2967 return c
2968 }
2969
2970
2971 func (c *ProjectsFirewallpoliciesListCall) Context(ctx context.Context) *ProjectsFirewallpoliciesListCall {
2972 c.ctx_ = ctx
2973 return c
2974 }
2975
2976
2977
2978 func (c *ProjectsFirewallpoliciesListCall) Header() http.Header {
2979 if c.header_ == nil {
2980 c.header_ = make(http.Header)
2981 }
2982 return c.header_
2983 }
2984
2985 func (c *ProjectsFirewallpoliciesListCall) doRequest(alt string) (*http.Response, error) {
2986 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2987 if c.ifNoneMatch_ != "" {
2988 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2989 }
2990 var body io.Reader = nil
2991 c.urlParams_.Set("alt", alt)
2992 c.urlParams_.Set("prettyPrint", "false")
2993 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/firewallpolicies")
2994 urls += "?" + c.urlParams_.Encode()
2995 req, err := http.NewRequest("GET", urls, body)
2996 if err != nil {
2997 return nil, err
2998 }
2999 req.Header = reqHeaders
3000 googleapi.Expand(req.URL, map[string]string{
3001 "parent": c.parent,
3002 })
3003 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3004 }
3005
3006
3007
3008
3009
3010
3011
3012 func (c *ProjectsFirewallpoliciesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecaptchaenterpriseV1ListFirewallPoliciesResponse, error) {
3013 gensupport.SetOptions(c.urlParams_, opts...)
3014 res, err := c.doRequest("json")
3015 if res != nil && res.StatusCode == http.StatusNotModified {
3016 if res.Body != nil {
3017 res.Body.Close()
3018 }
3019 return nil, gensupport.WrapError(&googleapi.Error{
3020 Code: res.StatusCode,
3021 Header: res.Header,
3022 })
3023 }
3024 if err != nil {
3025 return nil, err
3026 }
3027 defer googleapi.CloseBody(res)
3028 if err := googleapi.CheckResponse(res); err != nil {
3029 return nil, gensupport.WrapError(err)
3030 }
3031 ret := &GoogleCloudRecaptchaenterpriseV1ListFirewallPoliciesResponse{
3032 ServerResponse: googleapi.ServerResponse{
3033 Header: res.Header,
3034 HTTPStatusCode: res.StatusCode,
3035 },
3036 }
3037 target := &ret
3038 if err := gensupport.DecodeResponse(target, res); err != nil {
3039 return nil, err
3040 }
3041 return ret, nil
3042 }
3043
3044
3045
3046
3047 func (c *ProjectsFirewallpoliciesListCall) Pages(ctx context.Context, f func(*GoogleCloudRecaptchaenterpriseV1ListFirewallPoliciesResponse) error) error {
3048 c.ctx_ = ctx
3049 defer c.PageToken(c.urlParams_.Get("pageToken"))
3050 for {
3051 x, err := c.Do()
3052 if err != nil {
3053 return err
3054 }
3055 if err := f(x); err != nil {
3056 return err
3057 }
3058 if x.NextPageToken == "" {
3059 return nil
3060 }
3061 c.PageToken(x.NextPageToken)
3062 }
3063 }
3064
3065 type ProjectsFirewallpoliciesPatchCall struct {
3066 s *Service
3067 name string
3068 googlecloudrecaptchaenterprisev1firewallpolicy *GoogleCloudRecaptchaenterpriseV1FirewallPolicy
3069 urlParams_ gensupport.URLParams
3070 ctx_ context.Context
3071 header_ http.Header
3072 }
3073
3074
3075
3076
3077
3078 func (r *ProjectsFirewallpoliciesService) Patch(name string, googlecloudrecaptchaenterprisev1firewallpolicy *GoogleCloudRecaptchaenterpriseV1FirewallPolicy) *ProjectsFirewallpoliciesPatchCall {
3079 c := &ProjectsFirewallpoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3080 c.name = name
3081 c.googlecloudrecaptchaenterprisev1firewallpolicy = googlecloudrecaptchaenterprisev1firewallpolicy
3082 return c
3083 }
3084
3085
3086
3087
3088 func (c *ProjectsFirewallpoliciesPatchCall) UpdateMask(updateMask string) *ProjectsFirewallpoliciesPatchCall {
3089 c.urlParams_.Set("updateMask", updateMask)
3090 return c
3091 }
3092
3093
3094
3095
3096 func (c *ProjectsFirewallpoliciesPatchCall) Fields(s ...googleapi.Field) *ProjectsFirewallpoliciesPatchCall {
3097 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3098 return c
3099 }
3100
3101
3102 func (c *ProjectsFirewallpoliciesPatchCall) Context(ctx context.Context) *ProjectsFirewallpoliciesPatchCall {
3103 c.ctx_ = ctx
3104 return c
3105 }
3106
3107
3108
3109 func (c *ProjectsFirewallpoliciesPatchCall) Header() http.Header {
3110 if c.header_ == nil {
3111 c.header_ = make(http.Header)
3112 }
3113 return c.header_
3114 }
3115
3116 func (c *ProjectsFirewallpoliciesPatchCall) doRequest(alt string) (*http.Response, error) {
3117 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3118 var body io.Reader = nil
3119 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudrecaptchaenterprisev1firewallpolicy)
3120 if err != nil {
3121 return nil, err
3122 }
3123 c.urlParams_.Set("alt", alt)
3124 c.urlParams_.Set("prettyPrint", "false")
3125 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
3126 urls += "?" + c.urlParams_.Encode()
3127 req, err := http.NewRequest("PATCH", urls, body)
3128 if err != nil {
3129 return nil, err
3130 }
3131 req.Header = reqHeaders
3132 googleapi.Expand(req.URL, map[string]string{
3133 "name": c.name,
3134 })
3135 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3136 }
3137
3138
3139
3140
3141
3142
3143
3144 func (c *ProjectsFirewallpoliciesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecaptchaenterpriseV1FirewallPolicy, error) {
3145 gensupport.SetOptions(c.urlParams_, opts...)
3146 res, err := c.doRequest("json")
3147 if res != nil && res.StatusCode == http.StatusNotModified {
3148 if res.Body != nil {
3149 res.Body.Close()
3150 }
3151 return nil, gensupport.WrapError(&googleapi.Error{
3152 Code: res.StatusCode,
3153 Header: res.Header,
3154 })
3155 }
3156 if err != nil {
3157 return nil, err
3158 }
3159 defer googleapi.CloseBody(res)
3160 if err := googleapi.CheckResponse(res); err != nil {
3161 return nil, gensupport.WrapError(err)
3162 }
3163 ret := &GoogleCloudRecaptchaenterpriseV1FirewallPolicy{
3164 ServerResponse: googleapi.ServerResponse{
3165 Header: res.Header,
3166 HTTPStatusCode: res.StatusCode,
3167 },
3168 }
3169 target := &ret
3170 if err := gensupport.DecodeResponse(target, res); err != nil {
3171 return nil, err
3172 }
3173 return ret, nil
3174 }
3175
3176 type ProjectsFirewallpoliciesReorderCall struct {
3177 s *Service
3178 parent string
3179 googlecloudrecaptchaenterprisev1reorderfirewallpoliciesrequest *GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesRequest
3180 urlParams_ gensupport.URLParams
3181 ctx_ context.Context
3182 header_ http.Header
3183 }
3184
3185
3186
3187
3188
3189 func (r *ProjectsFirewallpoliciesService) Reorder(parent string, googlecloudrecaptchaenterprisev1reorderfirewallpoliciesrequest *GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesRequest) *ProjectsFirewallpoliciesReorderCall {
3190 c := &ProjectsFirewallpoliciesReorderCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3191 c.parent = parent
3192 c.googlecloudrecaptchaenterprisev1reorderfirewallpoliciesrequest = googlecloudrecaptchaenterprisev1reorderfirewallpoliciesrequest
3193 return c
3194 }
3195
3196
3197
3198
3199 func (c *ProjectsFirewallpoliciesReorderCall) Fields(s ...googleapi.Field) *ProjectsFirewallpoliciesReorderCall {
3200 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3201 return c
3202 }
3203
3204
3205 func (c *ProjectsFirewallpoliciesReorderCall) Context(ctx context.Context) *ProjectsFirewallpoliciesReorderCall {
3206 c.ctx_ = ctx
3207 return c
3208 }
3209
3210
3211
3212 func (c *ProjectsFirewallpoliciesReorderCall) Header() http.Header {
3213 if c.header_ == nil {
3214 c.header_ = make(http.Header)
3215 }
3216 return c.header_
3217 }
3218
3219 func (c *ProjectsFirewallpoliciesReorderCall) doRequest(alt string) (*http.Response, error) {
3220 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3221 var body io.Reader = nil
3222 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudrecaptchaenterprisev1reorderfirewallpoliciesrequest)
3223 if err != nil {
3224 return nil, err
3225 }
3226 c.urlParams_.Set("alt", alt)
3227 c.urlParams_.Set("prettyPrint", "false")
3228 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/firewallpolicies:reorder")
3229 urls += "?" + c.urlParams_.Encode()
3230 req, err := http.NewRequest("POST", urls, body)
3231 if err != nil {
3232 return nil, err
3233 }
3234 req.Header = reqHeaders
3235 googleapi.Expand(req.URL, map[string]string{
3236 "parent": c.parent,
3237 })
3238 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3239 }
3240
3241
3242
3243
3244
3245
3246
3247 func (c *ProjectsFirewallpoliciesReorderCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesResponse, error) {
3248 gensupport.SetOptions(c.urlParams_, opts...)
3249 res, err := c.doRequest("json")
3250 if res != nil && res.StatusCode == http.StatusNotModified {
3251 if res.Body != nil {
3252 res.Body.Close()
3253 }
3254 return nil, gensupport.WrapError(&googleapi.Error{
3255 Code: res.StatusCode,
3256 Header: res.Header,
3257 })
3258 }
3259 if err != nil {
3260 return nil, err
3261 }
3262 defer googleapi.CloseBody(res)
3263 if err := googleapi.CheckResponse(res); err != nil {
3264 return nil, gensupport.WrapError(err)
3265 }
3266 ret := &GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesResponse{
3267 ServerResponse: googleapi.ServerResponse{
3268 Header: res.Header,
3269 HTTPStatusCode: res.StatusCode,
3270 },
3271 }
3272 target := &ret
3273 if err := gensupport.DecodeResponse(target, res); err != nil {
3274 return nil, err
3275 }
3276 return ret, nil
3277 }
3278
3279 type ProjectsKeysCreateCall struct {
3280 s *Service
3281 parent string
3282 googlecloudrecaptchaenterprisev1key *GoogleCloudRecaptchaenterpriseV1Key
3283 urlParams_ gensupport.URLParams
3284 ctx_ context.Context
3285 header_ http.Header
3286 }
3287
3288
3289
3290
3291
3292 func (r *ProjectsKeysService) Create(parent string, googlecloudrecaptchaenterprisev1key *GoogleCloudRecaptchaenterpriseV1Key) *ProjectsKeysCreateCall {
3293 c := &ProjectsKeysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3294 c.parent = parent
3295 c.googlecloudrecaptchaenterprisev1key = googlecloudrecaptchaenterprisev1key
3296 return c
3297 }
3298
3299
3300
3301
3302 func (c *ProjectsKeysCreateCall) Fields(s ...googleapi.Field) *ProjectsKeysCreateCall {
3303 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3304 return c
3305 }
3306
3307
3308 func (c *ProjectsKeysCreateCall) Context(ctx context.Context) *ProjectsKeysCreateCall {
3309 c.ctx_ = ctx
3310 return c
3311 }
3312
3313
3314
3315 func (c *ProjectsKeysCreateCall) Header() http.Header {
3316 if c.header_ == nil {
3317 c.header_ = make(http.Header)
3318 }
3319 return c.header_
3320 }
3321
3322 func (c *ProjectsKeysCreateCall) doRequest(alt string) (*http.Response, error) {
3323 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3324 var body io.Reader = nil
3325 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudrecaptchaenterprisev1key)
3326 if err != nil {
3327 return nil, err
3328 }
3329 c.urlParams_.Set("alt", alt)
3330 c.urlParams_.Set("prettyPrint", "false")
3331 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/keys")
3332 urls += "?" + c.urlParams_.Encode()
3333 req, err := http.NewRequest("POST", urls, body)
3334 if err != nil {
3335 return nil, err
3336 }
3337 req.Header = reqHeaders
3338 googleapi.Expand(req.URL, map[string]string{
3339 "parent": c.parent,
3340 })
3341 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3342 }
3343
3344
3345
3346
3347
3348
3349
3350 func (c *ProjectsKeysCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecaptchaenterpriseV1Key, error) {
3351 gensupport.SetOptions(c.urlParams_, opts...)
3352 res, err := c.doRequest("json")
3353 if res != nil && res.StatusCode == http.StatusNotModified {
3354 if res.Body != nil {
3355 res.Body.Close()
3356 }
3357 return nil, gensupport.WrapError(&googleapi.Error{
3358 Code: res.StatusCode,
3359 Header: res.Header,
3360 })
3361 }
3362 if err != nil {
3363 return nil, err
3364 }
3365 defer googleapi.CloseBody(res)
3366 if err := googleapi.CheckResponse(res); err != nil {
3367 return nil, gensupport.WrapError(err)
3368 }
3369 ret := &GoogleCloudRecaptchaenterpriseV1Key{
3370 ServerResponse: googleapi.ServerResponse{
3371 Header: res.Header,
3372 HTTPStatusCode: res.StatusCode,
3373 },
3374 }
3375 target := &ret
3376 if err := gensupport.DecodeResponse(target, res); err != nil {
3377 return nil, err
3378 }
3379 return ret, nil
3380 }
3381
3382 type ProjectsKeysDeleteCall struct {
3383 s *Service
3384 name string
3385 urlParams_ gensupport.URLParams
3386 ctx_ context.Context
3387 header_ http.Header
3388 }
3389
3390
3391
3392
3393
3394 func (r *ProjectsKeysService) Delete(name string) *ProjectsKeysDeleteCall {
3395 c := &ProjectsKeysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3396 c.name = name
3397 return c
3398 }
3399
3400
3401
3402
3403 func (c *ProjectsKeysDeleteCall) Fields(s ...googleapi.Field) *ProjectsKeysDeleteCall {
3404 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3405 return c
3406 }
3407
3408
3409 func (c *ProjectsKeysDeleteCall) Context(ctx context.Context) *ProjectsKeysDeleteCall {
3410 c.ctx_ = ctx
3411 return c
3412 }
3413
3414
3415
3416 func (c *ProjectsKeysDeleteCall) Header() http.Header {
3417 if c.header_ == nil {
3418 c.header_ = make(http.Header)
3419 }
3420 return c.header_
3421 }
3422
3423 func (c *ProjectsKeysDeleteCall) doRequest(alt string) (*http.Response, error) {
3424 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3425 var body io.Reader = nil
3426 c.urlParams_.Set("alt", alt)
3427 c.urlParams_.Set("prettyPrint", "false")
3428 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
3429 urls += "?" + c.urlParams_.Encode()
3430 req, err := http.NewRequest("DELETE", urls, body)
3431 if err != nil {
3432 return nil, err
3433 }
3434 req.Header = reqHeaders
3435 googleapi.Expand(req.URL, map[string]string{
3436 "name": c.name,
3437 })
3438 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3439 }
3440
3441
3442
3443
3444
3445
3446
3447 func (c *ProjectsKeysDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
3448 gensupport.SetOptions(c.urlParams_, opts...)
3449 res, err := c.doRequest("json")
3450 if res != nil && res.StatusCode == http.StatusNotModified {
3451 if res.Body != nil {
3452 res.Body.Close()
3453 }
3454 return nil, gensupport.WrapError(&googleapi.Error{
3455 Code: res.StatusCode,
3456 Header: res.Header,
3457 })
3458 }
3459 if err != nil {
3460 return nil, err
3461 }
3462 defer googleapi.CloseBody(res)
3463 if err := googleapi.CheckResponse(res); err != nil {
3464 return nil, gensupport.WrapError(err)
3465 }
3466 ret := &GoogleProtobufEmpty{
3467 ServerResponse: googleapi.ServerResponse{
3468 Header: res.Header,
3469 HTTPStatusCode: res.StatusCode,
3470 },
3471 }
3472 target := &ret
3473 if err := gensupport.DecodeResponse(target, res); err != nil {
3474 return nil, err
3475 }
3476 return ret, nil
3477 }
3478
3479 type ProjectsKeysGetCall struct {
3480 s *Service
3481 name string
3482 urlParams_ gensupport.URLParams
3483 ifNoneMatch_ string
3484 ctx_ context.Context
3485 header_ http.Header
3486 }
3487
3488
3489
3490
3491
3492 func (r *ProjectsKeysService) Get(name string) *ProjectsKeysGetCall {
3493 c := &ProjectsKeysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3494 c.name = name
3495 return c
3496 }
3497
3498
3499
3500
3501 func (c *ProjectsKeysGetCall) Fields(s ...googleapi.Field) *ProjectsKeysGetCall {
3502 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3503 return c
3504 }
3505
3506
3507
3508
3509 func (c *ProjectsKeysGetCall) IfNoneMatch(entityTag string) *ProjectsKeysGetCall {
3510 c.ifNoneMatch_ = entityTag
3511 return c
3512 }
3513
3514
3515 func (c *ProjectsKeysGetCall) Context(ctx context.Context) *ProjectsKeysGetCall {
3516 c.ctx_ = ctx
3517 return c
3518 }
3519
3520
3521
3522 func (c *ProjectsKeysGetCall) Header() http.Header {
3523 if c.header_ == nil {
3524 c.header_ = make(http.Header)
3525 }
3526 return c.header_
3527 }
3528
3529 func (c *ProjectsKeysGetCall) doRequest(alt string) (*http.Response, error) {
3530 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3531 if c.ifNoneMatch_ != "" {
3532 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3533 }
3534 var body io.Reader = nil
3535 c.urlParams_.Set("alt", alt)
3536 c.urlParams_.Set("prettyPrint", "false")
3537 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
3538 urls += "?" + c.urlParams_.Encode()
3539 req, err := http.NewRequest("GET", urls, body)
3540 if err != nil {
3541 return nil, err
3542 }
3543 req.Header = reqHeaders
3544 googleapi.Expand(req.URL, map[string]string{
3545 "name": c.name,
3546 })
3547 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3548 }
3549
3550
3551
3552
3553
3554
3555
3556 func (c *ProjectsKeysGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecaptchaenterpriseV1Key, error) {
3557 gensupport.SetOptions(c.urlParams_, opts...)
3558 res, err := c.doRequest("json")
3559 if res != nil && res.StatusCode == http.StatusNotModified {
3560 if res.Body != nil {
3561 res.Body.Close()
3562 }
3563 return nil, gensupport.WrapError(&googleapi.Error{
3564 Code: res.StatusCode,
3565 Header: res.Header,
3566 })
3567 }
3568 if err != nil {
3569 return nil, err
3570 }
3571 defer googleapi.CloseBody(res)
3572 if err := googleapi.CheckResponse(res); err != nil {
3573 return nil, gensupport.WrapError(err)
3574 }
3575 ret := &GoogleCloudRecaptchaenterpriseV1Key{
3576 ServerResponse: googleapi.ServerResponse{
3577 Header: res.Header,
3578 HTTPStatusCode: res.StatusCode,
3579 },
3580 }
3581 target := &ret
3582 if err := gensupport.DecodeResponse(target, res); err != nil {
3583 return nil, err
3584 }
3585 return ret, nil
3586 }
3587
3588 type ProjectsKeysGetMetricsCall struct {
3589 s *Service
3590 name string
3591 urlParams_ gensupport.URLParams
3592 ifNoneMatch_ string
3593 ctx_ context.Context
3594 header_ http.Header
3595 }
3596
3597
3598
3599
3600
3601
3602 func (r *ProjectsKeysService) GetMetrics(name string) *ProjectsKeysGetMetricsCall {
3603 c := &ProjectsKeysGetMetricsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3604 c.name = name
3605 return c
3606 }
3607
3608
3609
3610
3611 func (c *ProjectsKeysGetMetricsCall) Fields(s ...googleapi.Field) *ProjectsKeysGetMetricsCall {
3612 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3613 return c
3614 }
3615
3616
3617
3618
3619 func (c *ProjectsKeysGetMetricsCall) IfNoneMatch(entityTag string) *ProjectsKeysGetMetricsCall {
3620 c.ifNoneMatch_ = entityTag
3621 return c
3622 }
3623
3624
3625 func (c *ProjectsKeysGetMetricsCall) Context(ctx context.Context) *ProjectsKeysGetMetricsCall {
3626 c.ctx_ = ctx
3627 return c
3628 }
3629
3630
3631
3632 func (c *ProjectsKeysGetMetricsCall) Header() http.Header {
3633 if c.header_ == nil {
3634 c.header_ = make(http.Header)
3635 }
3636 return c.header_
3637 }
3638
3639 func (c *ProjectsKeysGetMetricsCall) doRequest(alt string) (*http.Response, error) {
3640 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3641 if c.ifNoneMatch_ != "" {
3642 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3643 }
3644 var body io.Reader = nil
3645 c.urlParams_.Set("alt", alt)
3646 c.urlParams_.Set("prettyPrint", "false")
3647 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
3648 urls += "?" + c.urlParams_.Encode()
3649 req, err := http.NewRequest("GET", urls, body)
3650 if err != nil {
3651 return nil, err
3652 }
3653 req.Header = reqHeaders
3654 googleapi.Expand(req.URL, map[string]string{
3655 "name": c.name,
3656 })
3657 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3658 }
3659
3660
3661
3662
3663
3664
3665
3666 func (c *ProjectsKeysGetMetricsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecaptchaenterpriseV1Metrics, error) {
3667 gensupport.SetOptions(c.urlParams_, opts...)
3668 res, err := c.doRequest("json")
3669 if res != nil && res.StatusCode == http.StatusNotModified {
3670 if res.Body != nil {
3671 res.Body.Close()
3672 }
3673 return nil, gensupport.WrapError(&googleapi.Error{
3674 Code: res.StatusCode,
3675 Header: res.Header,
3676 })
3677 }
3678 if err != nil {
3679 return nil, err
3680 }
3681 defer googleapi.CloseBody(res)
3682 if err := googleapi.CheckResponse(res); err != nil {
3683 return nil, gensupport.WrapError(err)
3684 }
3685 ret := &GoogleCloudRecaptchaenterpriseV1Metrics{
3686 ServerResponse: googleapi.ServerResponse{
3687 Header: res.Header,
3688 HTTPStatusCode: res.StatusCode,
3689 },
3690 }
3691 target := &ret
3692 if err := gensupport.DecodeResponse(target, res); err != nil {
3693 return nil, err
3694 }
3695 return ret, nil
3696 }
3697
3698 type ProjectsKeysListCall struct {
3699 s *Service
3700 parent string
3701 urlParams_ gensupport.URLParams
3702 ifNoneMatch_ string
3703 ctx_ context.Context
3704 header_ http.Header
3705 }
3706
3707
3708
3709
3710
3711 func (r *ProjectsKeysService) List(parent string) *ProjectsKeysListCall {
3712 c := &ProjectsKeysListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3713 c.parent = parent
3714 return c
3715 }
3716
3717
3718
3719 func (c *ProjectsKeysListCall) PageSize(pageSize int64) *ProjectsKeysListCall {
3720 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3721 return c
3722 }
3723
3724
3725
3726 func (c *ProjectsKeysListCall) PageToken(pageToken string) *ProjectsKeysListCall {
3727 c.urlParams_.Set("pageToken", pageToken)
3728 return c
3729 }
3730
3731
3732
3733
3734 func (c *ProjectsKeysListCall) Fields(s ...googleapi.Field) *ProjectsKeysListCall {
3735 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3736 return c
3737 }
3738
3739
3740
3741
3742 func (c *ProjectsKeysListCall) IfNoneMatch(entityTag string) *ProjectsKeysListCall {
3743 c.ifNoneMatch_ = entityTag
3744 return c
3745 }
3746
3747
3748 func (c *ProjectsKeysListCall) Context(ctx context.Context) *ProjectsKeysListCall {
3749 c.ctx_ = ctx
3750 return c
3751 }
3752
3753
3754
3755 func (c *ProjectsKeysListCall) Header() http.Header {
3756 if c.header_ == nil {
3757 c.header_ = make(http.Header)
3758 }
3759 return c.header_
3760 }
3761
3762 func (c *ProjectsKeysListCall) doRequest(alt string) (*http.Response, error) {
3763 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3764 if c.ifNoneMatch_ != "" {
3765 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3766 }
3767 var body io.Reader = nil
3768 c.urlParams_.Set("alt", alt)
3769 c.urlParams_.Set("prettyPrint", "false")
3770 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/keys")
3771 urls += "?" + c.urlParams_.Encode()
3772 req, err := http.NewRequest("GET", urls, body)
3773 if err != nil {
3774 return nil, err
3775 }
3776 req.Header = reqHeaders
3777 googleapi.Expand(req.URL, map[string]string{
3778 "parent": c.parent,
3779 })
3780 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3781 }
3782
3783
3784
3785
3786
3787
3788
3789 func (c *ProjectsKeysListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecaptchaenterpriseV1ListKeysResponse, error) {
3790 gensupport.SetOptions(c.urlParams_, opts...)
3791 res, err := c.doRequest("json")
3792 if res != nil && res.StatusCode == http.StatusNotModified {
3793 if res.Body != nil {
3794 res.Body.Close()
3795 }
3796 return nil, gensupport.WrapError(&googleapi.Error{
3797 Code: res.StatusCode,
3798 Header: res.Header,
3799 })
3800 }
3801 if err != nil {
3802 return nil, err
3803 }
3804 defer googleapi.CloseBody(res)
3805 if err := googleapi.CheckResponse(res); err != nil {
3806 return nil, gensupport.WrapError(err)
3807 }
3808 ret := &GoogleCloudRecaptchaenterpriseV1ListKeysResponse{
3809 ServerResponse: googleapi.ServerResponse{
3810 Header: res.Header,
3811 HTTPStatusCode: res.StatusCode,
3812 },
3813 }
3814 target := &ret
3815 if err := gensupport.DecodeResponse(target, res); err != nil {
3816 return nil, err
3817 }
3818 return ret, nil
3819 }
3820
3821
3822
3823
3824 func (c *ProjectsKeysListCall) Pages(ctx context.Context, f func(*GoogleCloudRecaptchaenterpriseV1ListKeysResponse) error) error {
3825 c.ctx_ = ctx
3826 defer c.PageToken(c.urlParams_.Get("pageToken"))
3827 for {
3828 x, err := c.Do()
3829 if err != nil {
3830 return err
3831 }
3832 if err := f(x); err != nil {
3833 return err
3834 }
3835 if x.NextPageToken == "" {
3836 return nil
3837 }
3838 c.PageToken(x.NextPageToken)
3839 }
3840 }
3841
3842 type ProjectsKeysMigrateCall struct {
3843 s *Service
3844 name string
3845 googlecloudrecaptchaenterprisev1migratekeyrequest *GoogleCloudRecaptchaenterpriseV1MigrateKeyRequest
3846 urlParams_ gensupport.URLParams
3847 ctx_ context.Context
3848 header_ http.Header
3849 }
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859 func (r *ProjectsKeysService) Migrate(name string, googlecloudrecaptchaenterprisev1migratekeyrequest *GoogleCloudRecaptchaenterpriseV1MigrateKeyRequest) *ProjectsKeysMigrateCall {
3860 c := &ProjectsKeysMigrateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3861 c.name = name
3862 c.googlecloudrecaptchaenterprisev1migratekeyrequest = googlecloudrecaptchaenterprisev1migratekeyrequest
3863 return c
3864 }
3865
3866
3867
3868
3869 func (c *ProjectsKeysMigrateCall) Fields(s ...googleapi.Field) *ProjectsKeysMigrateCall {
3870 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3871 return c
3872 }
3873
3874
3875 func (c *ProjectsKeysMigrateCall) Context(ctx context.Context) *ProjectsKeysMigrateCall {
3876 c.ctx_ = ctx
3877 return c
3878 }
3879
3880
3881
3882 func (c *ProjectsKeysMigrateCall) Header() http.Header {
3883 if c.header_ == nil {
3884 c.header_ = make(http.Header)
3885 }
3886 return c.header_
3887 }
3888
3889 func (c *ProjectsKeysMigrateCall) doRequest(alt string) (*http.Response, error) {
3890 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3891 var body io.Reader = nil
3892 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudrecaptchaenterprisev1migratekeyrequest)
3893 if err != nil {
3894 return nil, err
3895 }
3896 c.urlParams_.Set("alt", alt)
3897 c.urlParams_.Set("prettyPrint", "false")
3898 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:migrate")
3899 urls += "?" + c.urlParams_.Encode()
3900 req, err := http.NewRequest("POST", urls, body)
3901 if err != nil {
3902 return nil, err
3903 }
3904 req.Header = reqHeaders
3905 googleapi.Expand(req.URL, map[string]string{
3906 "name": c.name,
3907 })
3908 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3909 }
3910
3911
3912
3913
3914
3915
3916
3917 func (c *ProjectsKeysMigrateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecaptchaenterpriseV1Key, error) {
3918 gensupport.SetOptions(c.urlParams_, opts...)
3919 res, err := c.doRequest("json")
3920 if res != nil && res.StatusCode == http.StatusNotModified {
3921 if res.Body != nil {
3922 res.Body.Close()
3923 }
3924 return nil, gensupport.WrapError(&googleapi.Error{
3925 Code: res.StatusCode,
3926 Header: res.Header,
3927 })
3928 }
3929 if err != nil {
3930 return nil, err
3931 }
3932 defer googleapi.CloseBody(res)
3933 if err := googleapi.CheckResponse(res); err != nil {
3934 return nil, gensupport.WrapError(err)
3935 }
3936 ret := &GoogleCloudRecaptchaenterpriseV1Key{
3937 ServerResponse: googleapi.ServerResponse{
3938 Header: res.Header,
3939 HTTPStatusCode: res.StatusCode,
3940 },
3941 }
3942 target := &ret
3943 if err := gensupport.DecodeResponse(target, res); err != nil {
3944 return nil, err
3945 }
3946 return ret, nil
3947 }
3948
3949 type ProjectsKeysPatchCall struct {
3950 s *Service
3951 name string
3952 googlecloudrecaptchaenterprisev1key *GoogleCloudRecaptchaenterpriseV1Key
3953 urlParams_ gensupport.URLParams
3954 ctx_ context.Context
3955 header_ http.Header
3956 }
3957
3958
3959
3960
3961
3962 func (r *ProjectsKeysService) Patch(name string, googlecloudrecaptchaenterprisev1key *GoogleCloudRecaptchaenterpriseV1Key) *ProjectsKeysPatchCall {
3963 c := &ProjectsKeysPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3964 c.name = name
3965 c.googlecloudrecaptchaenterprisev1key = googlecloudrecaptchaenterprisev1key
3966 return c
3967 }
3968
3969
3970
3971
3972 func (c *ProjectsKeysPatchCall) UpdateMask(updateMask string) *ProjectsKeysPatchCall {
3973 c.urlParams_.Set("updateMask", updateMask)
3974 return c
3975 }
3976
3977
3978
3979
3980 func (c *ProjectsKeysPatchCall) Fields(s ...googleapi.Field) *ProjectsKeysPatchCall {
3981 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3982 return c
3983 }
3984
3985
3986 func (c *ProjectsKeysPatchCall) Context(ctx context.Context) *ProjectsKeysPatchCall {
3987 c.ctx_ = ctx
3988 return c
3989 }
3990
3991
3992
3993 func (c *ProjectsKeysPatchCall) Header() http.Header {
3994 if c.header_ == nil {
3995 c.header_ = make(http.Header)
3996 }
3997 return c.header_
3998 }
3999
4000 func (c *ProjectsKeysPatchCall) doRequest(alt string) (*http.Response, error) {
4001 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4002 var body io.Reader = nil
4003 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudrecaptchaenterprisev1key)
4004 if err != nil {
4005 return nil, err
4006 }
4007 c.urlParams_.Set("alt", alt)
4008 c.urlParams_.Set("prettyPrint", "false")
4009 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4010 urls += "?" + c.urlParams_.Encode()
4011 req, err := http.NewRequest("PATCH", urls, body)
4012 if err != nil {
4013 return nil, err
4014 }
4015 req.Header = reqHeaders
4016 googleapi.Expand(req.URL, map[string]string{
4017 "name": c.name,
4018 })
4019 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4020 }
4021
4022
4023
4024
4025
4026
4027
4028 func (c *ProjectsKeysPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecaptchaenterpriseV1Key, error) {
4029 gensupport.SetOptions(c.urlParams_, opts...)
4030 res, err := c.doRequest("json")
4031 if res != nil && res.StatusCode == http.StatusNotModified {
4032 if res.Body != nil {
4033 res.Body.Close()
4034 }
4035 return nil, gensupport.WrapError(&googleapi.Error{
4036 Code: res.StatusCode,
4037 Header: res.Header,
4038 })
4039 }
4040 if err != nil {
4041 return nil, err
4042 }
4043 defer googleapi.CloseBody(res)
4044 if err := googleapi.CheckResponse(res); err != nil {
4045 return nil, gensupport.WrapError(err)
4046 }
4047 ret := &GoogleCloudRecaptchaenterpriseV1Key{
4048 ServerResponse: googleapi.ServerResponse{
4049 Header: res.Header,
4050 HTTPStatusCode: res.StatusCode,
4051 },
4052 }
4053 target := &ret
4054 if err := gensupport.DecodeResponse(target, res); err != nil {
4055 return nil, err
4056 }
4057 return ret, nil
4058 }
4059
4060 type ProjectsKeysRetrieveLegacySecretKeyCall struct {
4061 s *Service
4062 key string
4063 urlParams_ gensupport.URLParams
4064 ifNoneMatch_ string
4065 ctx_ context.Context
4066 header_ http.Header
4067 }
4068
4069
4070
4071
4072
4073
4074
4075 func (r *ProjectsKeysService) RetrieveLegacySecretKey(key string) *ProjectsKeysRetrieveLegacySecretKeyCall {
4076 c := &ProjectsKeysRetrieveLegacySecretKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4077 c.key = key
4078 return c
4079 }
4080
4081
4082
4083
4084 func (c *ProjectsKeysRetrieveLegacySecretKeyCall) Fields(s ...googleapi.Field) *ProjectsKeysRetrieveLegacySecretKeyCall {
4085 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4086 return c
4087 }
4088
4089
4090
4091
4092 func (c *ProjectsKeysRetrieveLegacySecretKeyCall) IfNoneMatch(entityTag string) *ProjectsKeysRetrieveLegacySecretKeyCall {
4093 c.ifNoneMatch_ = entityTag
4094 return c
4095 }
4096
4097
4098 func (c *ProjectsKeysRetrieveLegacySecretKeyCall) Context(ctx context.Context) *ProjectsKeysRetrieveLegacySecretKeyCall {
4099 c.ctx_ = ctx
4100 return c
4101 }
4102
4103
4104
4105 func (c *ProjectsKeysRetrieveLegacySecretKeyCall) Header() http.Header {
4106 if c.header_ == nil {
4107 c.header_ = make(http.Header)
4108 }
4109 return c.header_
4110 }
4111
4112 func (c *ProjectsKeysRetrieveLegacySecretKeyCall) doRequest(alt string) (*http.Response, error) {
4113 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4114 if c.ifNoneMatch_ != "" {
4115 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4116 }
4117 var body io.Reader = nil
4118 c.urlParams_.Set("alt", alt)
4119 c.urlParams_.Set("prettyPrint", "false")
4120 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+key}:retrieveLegacySecretKey")
4121 urls += "?" + c.urlParams_.Encode()
4122 req, err := http.NewRequest("GET", urls, body)
4123 if err != nil {
4124 return nil, err
4125 }
4126 req.Header = reqHeaders
4127 googleapi.Expand(req.URL, map[string]string{
4128 "key": c.key,
4129 })
4130 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4131 }
4132
4133
4134
4135
4136
4137
4138
4139 func (c *ProjectsKeysRetrieveLegacySecretKeyCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecaptchaenterpriseV1RetrieveLegacySecretKeyResponse, error) {
4140 gensupport.SetOptions(c.urlParams_, opts...)
4141 res, err := c.doRequest("json")
4142 if res != nil && res.StatusCode == http.StatusNotModified {
4143 if res.Body != nil {
4144 res.Body.Close()
4145 }
4146 return nil, gensupport.WrapError(&googleapi.Error{
4147 Code: res.StatusCode,
4148 Header: res.Header,
4149 })
4150 }
4151 if err != nil {
4152 return nil, err
4153 }
4154 defer googleapi.CloseBody(res)
4155 if err := googleapi.CheckResponse(res); err != nil {
4156 return nil, gensupport.WrapError(err)
4157 }
4158 ret := &GoogleCloudRecaptchaenterpriseV1RetrieveLegacySecretKeyResponse{
4159 ServerResponse: googleapi.ServerResponse{
4160 Header: res.Header,
4161 HTTPStatusCode: res.StatusCode,
4162 },
4163 }
4164 target := &ret
4165 if err := gensupport.DecodeResponse(target, res); err != nil {
4166 return nil, err
4167 }
4168 return ret, nil
4169 }
4170
4171 type ProjectsRelatedaccountgroupmembershipsSearchCall struct {
4172 s *Service
4173 project string
4174 googlecloudrecaptchaenterprisev1searchrelatedaccountgroupmembershipsrequest *GoogleCloudRecaptchaenterpriseV1SearchRelatedAccountGroupMembershipsRequest
4175 urlParams_ gensupport.URLParams
4176 ctx_ context.Context
4177 header_ http.Header
4178 }
4179
4180
4181
4182
4183
4184
4185 func (r *ProjectsRelatedaccountgroupmembershipsService) Search(project string, googlecloudrecaptchaenterprisev1searchrelatedaccountgroupmembershipsrequest *GoogleCloudRecaptchaenterpriseV1SearchRelatedAccountGroupMembershipsRequest) *ProjectsRelatedaccountgroupmembershipsSearchCall {
4186 c := &ProjectsRelatedaccountgroupmembershipsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4187 c.project = project
4188 c.googlecloudrecaptchaenterprisev1searchrelatedaccountgroupmembershipsrequest = googlecloudrecaptchaenterprisev1searchrelatedaccountgroupmembershipsrequest
4189 return c
4190 }
4191
4192
4193
4194
4195 func (c *ProjectsRelatedaccountgroupmembershipsSearchCall) Fields(s ...googleapi.Field) *ProjectsRelatedaccountgroupmembershipsSearchCall {
4196 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4197 return c
4198 }
4199
4200
4201 func (c *ProjectsRelatedaccountgroupmembershipsSearchCall) Context(ctx context.Context) *ProjectsRelatedaccountgroupmembershipsSearchCall {
4202 c.ctx_ = ctx
4203 return c
4204 }
4205
4206
4207
4208 func (c *ProjectsRelatedaccountgroupmembershipsSearchCall) Header() http.Header {
4209 if c.header_ == nil {
4210 c.header_ = make(http.Header)
4211 }
4212 return c.header_
4213 }
4214
4215 func (c *ProjectsRelatedaccountgroupmembershipsSearchCall) doRequest(alt string) (*http.Response, error) {
4216 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4217 var body io.Reader = nil
4218 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudrecaptchaenterprisev1searchrelatedaccountgroupmembershipsrequest)
4219 if err != nil {
4220 return nil, err
4221 }
4222 c.urlParams_.Set("alt", alt)
4223 c.urlParams_.Set("prettyPrint", "false")
4224 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+project}/relatedaccountgroupmemberships:search")
4225 urls += "?" + c.urlParams_.Encode()
4226 req, err := http.NewRequest("POST", urls, body)
4227 if err != nil {
4228 return nil, err
4229 }
4230 req.Header = reqHeaders
4231 googleapi.Expand(req.URL, map[string]string{
4232 "project": c.project,
4233 })
4234 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4235 }
4236
4237
4238
4239
4240
4241
4242
4243 func (c *ProjectsRelatedaccountgroupmembershipsSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecaptchaenterpriseV1SearchRelatedAccountGroupMembershipsResponse, error) {
4244 gensupport.SetOptions(c.urlParams_, opts...)
4245 res, err := c.doRequest("json")
4246 if res != nil && res.StatusCode == http.StatusNotModified {
4247 if res.Body != nil {
4248 res.Body.Close()
4249 }
4250 return nil, gensupport.WrapError(&googleapi.Error{
4251 Code: res.StatusCode,
4252 Header: res.Header,
4253 })
4254 }
4255 if err != nil {
4256 return nil, err
4257 }
4258 defer googleapi.CloseBody(res)
4259 if err := googleapi.CheckResponse(res); err != nil {
4260 return nil, gensupport.WrapError(err)
4261 }
4262 ret := &GoogleCloudRecaptchaenterpriseV1SearchRelatedAccountGroupMembershipsResponse{
4263 ServerResponse: googleapi.ServerResponse{
4264 Header: res.Header,
4265 HTTPStatusCode: res.StatusCode,
4266 },
4267 }
4268 target := &ret
4269 if err := gensupport.DecodeResponse(target, res); err != nil {
4270 return nil, err
4271 }
4272 return ret, nil
4273 }
4274
4275
4276
4277
4278 func (c *ProjectsRelatedaccountgroupmembershipsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudRecaptchaenterpriseV1SearchRelatedAccountGroupMembershipsResponse) error) error {
4279 c.ctx_ = ctx
4280 defer func(pt string) {
4281 c.googlecloudrecaptchaenterprisev1searchrelatedaccountgroupmembershipsrequest.PageToken = pt
4282 }(c.googlecloudrecaptchaenterprisev1searchrelatedaccountgroupmembershipsrequest.PageToken)
4283 for {
4284 x, err := c.Do()
4285 if err != nil {
4286 return err
4287 }
4288 if err := f(x); err != nil {
4289 return err
4290 }
4291 if x.NextPageToken == "" {
4292 return nil
4293 }
4294 c.googlecloudrecaptchaenterprisev1searchrelatedaccountgroupmembershipsrequest.PageToken = x.NextPageToken
4295 }
4296 }
4297
4298 type ProjectsRelatedaccountgroupsListCall struct {
4299 s *Service
4300 parent string
4301 urlParams_ gensupport.URLParams
4302 ifNoneMatch_ string
4303 ctx_ context.Context
4304 header_ http.Header
4305 }
4306
4307
4308
4309
4310
4311 func (r *ProjectsRelatedaccountgroupsService) List(parent string) *ProjectsRelatedaccountgroupsListCall {
4312 c := &ProjectsRelatedaccountgroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4313 c.parent = parent
4314 return c
4315 }
4316
4317
4318
4319
4320
4321 func (c *ProjectsRelatedaccountgroupsListCall) PageSize(pageSize int64) *ProjectsRelatedaccountgroupsListCall {
4322 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4323 return c
4324 }
4325
4326
4327
4328
4329
4330 func (c *ProjectsRelatedaccountgroupsListCall) PageToken(pageToken string) *ProjectsRelatedaccountgroupsListCall {
4331 c.urlParams_.Set("pageToken", pageToken)
4332 return c
4333 }
4334
4335
4336
4337
4338 func (c *ProjectsRelatedaccountgroupsListCall) Fields(s ...googleapi.Field) *ProjectsRelatedaccountgroupsListCall {
4339 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4340 return c
4341 }
4342
4343
4344
4345
4346 func (c *ProjectsRelatedaccountgroupsListCall) IfNoneMatch(entityTag string) *ProjectsRelatedaccountgroupsListCall {
4347 c.ifNoneMatch_ = entityTag
4348 return c
4349 }
4350
4351
4352 func (c *ProjectsRelatedaccountgroupsListCall) Context(ctx context.Context) *ProjectsRelatedaccountgroupsListCall {
4353 c.ctx_ = ctx
4354 return c
4355 }
4356
4357
4358
4359 func (c *ProjectsRelatedaccountgroupsListCall) Header() http.Header {
4360 if c.header_ == nil {
4361 c.header_ = make(http.Header)
4362 }
4363 return c.header_
4364 }
4365
4366 func (c *ProjectsRelatedaccountgroupsListCall) doRequest(alt string) (*http.Response, error) {
4367 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4368 if c.ifNoneMatch_ != "" {
4369 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4370 }
4371 var body io.Reader = nil
4372 c.urlParams_.Set("alt", alt)
4373 c.urlParams_.Set("prettyPrint", "false")
4374 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/relatedaccountgroups")
4375 urls += "?" + c.urlParams_.Encode()
4376 req, err := http.NewRequest("GET", urls, body)
4377 if err != nil {
4378 return nil, err
4379 }
4380 req.Header = reqHeaders
4381 googleapi.Expand(req.URL, map[string]string{
4382 "parent": c.parent,
4383 })
4384 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4385 }
4386
4387
4388
4389
4390
4391
4392
4393 func (c *ProjectsRelatedaccountgroupsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecaptchaenterpriseV1ListRelatedAccountGroupsResponse, error) {
4394 gensupport.SetOptions(c.urlParams_, opts...)
4395 res, err := c.doRequest("json")
4396 if res != nil && res.StatusCode == http.StatusNotModified {
4397 if res.Body != nil {
4398 res.Body.Close()
4399 }
4400 return nil, gensupport.WrapError(&googleapi.Error{
4401 Code: res.StatusCode,
4402 Header: res.Header,
4403 })
4404 }
4405 if err != nil {
4406 return nil, err
4407 }
4408 defer googleapi.CloseBody(res)
4409 if err := googleapi.CheckResponse(res); err != nil {
4410 return nil, gensupport.WrapError(err)
4411 }
4412 ret := &GoogleCloudRecaptchaenterpriseV1ListRelatedAccountGroupsResponse{
4413 ServerResponse: googleapi.ServerResponse{
4414 Header: res.Header,
4415 HTTPStatusCode: res.StatusCode,
4416 },
4417 }
4418 target := &ret
4419 if err := gensupport.DecodeResponse(target, res); err != nil {
4420 return nil, err
4421 }
4422 return ret, nil
4423 }
4424
4425
4426
4427
4428 func (c *ProjectsRelatedaccountgroupsListCall) Pages(ctx context.Context, f func(*GoogleCloudRecaptchaenterpriseV1ListRelatedAccountGroupsResponse) error) error {
4429 c.ctx_ = ctx
4430 defer c.PageToken(c.urlParams_.Get("pageToken"))
4431 for {
4432 x, err := c.Do()
4433 if err != nil {
4434 return err
4435 }
4436 if err := f(x); err != nil {
4437 return err
4438 }
4439 if x.NextPageToken == "" {
4440 return nil
4441 }
4442 c.PageToken(x.NextPageToken)
4443 }
4444 }
4445
4446 type ProjectsRelatedaccountgroupsMembershipsListCall struct {
4447 s *Service
4448 parent string
4449 urlParams_ gensupport.URLParams
4450 ifNoneMatch_ string
4451 ctx_ context.Context
4452 header_ http.Header
4453 }
4454
4455
4456
4457
4458
4459 func (r *ProjectsRelatedaccountgroupsMembershipsService) List(parent string) *ProjectsRelatedaccountgroupsMembershipsListCall {
4460 c := &ProjectsRelatedaccountgroupsMembershipsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4461 c.parent = parent
4462 return c
4463 }
4464
4465
4466
4467
4468
4469 func (c *ProjectsRelatedaccountgroupsMembershipsListCall) PageSize(pageSize int64) *ProjectsRelatedaccountgroupsMembershipsListCall {
4470 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4471 return c
4472 }
4473
4474
4475
4476
4477
4478 func (c *ProjectsRelatedaccountgroupsMembershipsListCall) PageToken(pageToken string) *ProjectsRelatedaccountgroupsMembershipsListCall {
4479 c.urlParams_.Set("pageToken", pageToken)
4480 return c
4481 }
4482
4483
4484
4485
4486 func (c *ProjectsRelatedaccountgroupsMembershipsListCall) Fields(s ...googleapi.Field) *ProjectsRelatedaccountgroupsMembershipsListCall {
4487 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4488 return c
4489 }
4490
4491
4492
4493
4494 func (c *ProjectsRelatedaccountgroupsMembershipsListCall) IfNoneMatch(entityTag string) *ProjectsRelatedaccountgroupsMembershipsListCall {
4495 c.ifNoneMatch_ = entityTag
4496 return c
4497 }
4498
4499
4500 func (c *ProjectsRelatedaccountgroupsMembershipsListCall) Context(ctx context.Context) *ProjectsRelatedaccountgroupsMembershipsListCall {
4501 c.ctx_ = ctx
4502 return c
4503 }
4504
4505
4506
4507 func (c *ProjectsRelatedaccountgroupsMembershipsListCall) Header() http.Header {
4508 if c.header_ == nil {
4509 c.header_ = make(http.Header)
4510 }
4511 return c.header_
4512 }
4513
4514 func (c *ProjectsRelatedaccountgroupsMembershipsListCall) doRequest(alt string) (*http.Response, error) {
4515 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4516 if c.ifNoneMatch_ != "" {
4517 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4518 }
4519 var body io.Reader = nil
4520 c.urlParams_.Set("alt", alt)
4521 c.urlParams_.Set("prettyPrint", "false")
4522 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/memberships")
4523 urls += "?" + c.urlParams_.Encode()
4524 req, err := http.NewRequest("GET", urls, body)
4525 if err != nil {
4526 return nil, err
4527 }
4528 req.Header = reqHeaders
4529 googleapi.Expand(req.URL, map[string]string{
4530 "parent": c.parent,
4531 })
4532 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4533 }
4534
4535
4536
4537
4538
4539
4540
4541 func (c *ProjectsRelatedaccountgroupsMembershipsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecaptchaenterpriseV1ListRelatedAccountGroupMembershipsResponse, error) {
4542 gensupport.SetOptions(c.urlParams_, opts...)
4543 res, err := c.doRequest("json")
4544 if res != nil && res.StatusCode == http.StatusNotModified {
4545 if res.Body != nil {
4546 res.Body.Close()
4547 }
4548 return nil, gensupport.WrapError(&googleapi.Error{
4549 Code: res.StatusCode,
4550 Header: res.Header,
4551 })
4552 }
4553 if err != nil {
4554 return nil, err
4555 }
4556 defer googleapi.CloseBody(res)
4557 if err := googleapi.CheckResponse(res); err != nil {
4558 return nil, gensupport.WrapError(err)
4559 }
4560 ret := &GoogleCloudRecaptchaenterpriseV1ListRelatedAccountGroupMembershipsResponse{
4561 ServerResponse: googleapi.ServerResponse{
4562 Header: res.Header,
4563 HTTPStatusCode: res.StatusCode,
4564 },
4565 }
4566 target := &ret
4567 if err := gensupport.DecodeResponse(target, res); err != nil {
4568 return nil, err
4569 }
4570 return ret, nil
4571 }
4572
4573
4574
4575
4576 func (c *ProjectsRelatedaccountgroupsMembershipsListCall) Pages(ctx context.Context, f func(*GoogleCloudRecaptchaenterpriseV1ListRelatedAccountGroupMembershipsResponse) error) error {
4577 c.ctx_ = ctx
4578 defer c.PageToken(c.urlParams_.Get("pageToken"))
4579 for {
4580 x, err := c.Do()
4581 if err != nil {
4582 return err
4583 }
4584 if err := f(x); err != nil {
4585 return err
4586 }
4587 if x.NextPageToken == "" {
4588 return nil
4589 }
4590 c.PageToken(x.NextPageToken)
4591 }
4592 }
4593
View as plain text