-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
recaptchaenterprise-gen.go
4877 lines (4538 loc) · 211 KB
/
recaptchaenterprise-gen.go
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
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
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
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
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright 2024 Google LLC.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Code generated file. DO NOT EDIT.
// Package recaptchaenterprise provides access to the reCAPTCHA Enterprise API.
//
// For product documentation, see: https://cloud.google.com/recaptcha-enterprise/
//
// # Library status
//
// These client libraries are officially supported by Google. However, this
// library is considered complete and is in maintenance mode. This means
// that we will address critical bugs and security issues but will not add
// any new features.
//
// When possible, we recommend using our newer
// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)
// that are still actively being worked and iterated on.
//
// # Creating a client
//
// Usage example:
//
// import "google.golang.org/api/recaptchaenterprise/v1"
// ...
// ctx := context.Background()
// recaptchaenterpriseService, err := recaptchaenterprise.NewService(ctx)
//
// In this example, Google Application Default Credentials are used for
// authentication. For information on how to create and obtain Application
// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
//
// # Other authentication options
//
// To use an API key for authentication (note: some APIs do not support API
// keys), use [google.golang.org/api/option.WithAPIKey]:
//
// recaptchaenterpriseService, err := recaptchaenterprise.NewService(ctx, option.WithAPIKey("AIza..."))
//
// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth
// flow, use [google.golang.org/api/option.WithTokenSource]:
//
// config := &oauth2.Config{...}
// // ...
// token, err := config.Exchange(ctx, ...)
// recaptchaenterpriseService, err := recaptchaenterprise.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
//
// See [google.golang.org/api/option.ClientOption] for details on options.
package recaptchaenterprise // import "google.golang.org/api/recaptchaenterprise/v1"
import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
"io"
"net/http"
"net/url"
"strconv"
"strings"
googleapi "google.golang.org/api/googleapi"
internal "google.golang.org/api/internal"
gensupport "google.golang.org/api/internal/gensupport"
option "google.golang.org/api/option"
internaloption "google.golang.org/api/option/internaloption"
htransport "google.golang.org/api/transport/http"
)
// Always reference these packages, just in case the auto-generated code
// below doesn't.
var _ = bytes.NewBuffer
var _ = strconv.Itoa
var _ = fmt.Sprintf
var _ = json.NewDecoder
var _ = io.Copy
var _ = url.Parse
var _ = gensupport.MarshalJSON
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
var _ = context.Canceled
var _ = internaloption.WithDefaultEndpoint
var _ = internal.Version
const apiId = "recaptchaenterprise:v1"
const apiName = "recaptchaenterprise"
const apiVersion = "v1"
const basePath = "https://recaptchaenterprise.googleapis.com/"
const basePathTemplate = "https://recaptchaenterprise.UNIVERSE_DOMAIN/"
const mtlsBasePath = "https://recaptchaenterprise.mtls.googleapis.com/"
// OAuth2 scopes used by this API.
const (
// See, edit, configure, and delete your Google Cloud data and see the email
// address for your Google Account.
CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
)
// NewService creates a new Service.
func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
scopesOption := internaloption.WithDefaultScopes(
"https://www.googleapis.com/auth/cloud-platform",
)
// NOTE: prepend, so we don't override user-specified scopes.
opts = append([]option.ClientOption{scopesOption}, opts...)
opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
opts = append(opts, internaloption.EnableNewAuthLibrary())
client, endpoint, err := htransport.NewClient(ctx, opts...)
if err != nil {
return nil, err
}
s, err := New(client)
if err != nil {
return nil, err
}
if endpoint != "" {
s.BasePath = endpoint
}
return s, nil
}
// New creates a new Service. It uses the provided http.Client for requests.
//
// Deprecated: please use NewService instead.
// To provide a custom HTTP client, use option.WithHTTPClient.
// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
func New(client *http.Client) (*Service, error) {
if client == nil {
return nil, errors.New("client is nil")
}
s := &Service{client: client, BasePath: basePath}
s.Projects = NewProjectsService(s)
return s, nil
}
type Service struct {
client *http.Client
BasePath string // API endpoint base URL
UserAgent string // optional additional User-Agent fragment
Projects *ProjectsService
}
func (s *Service) userAgent() string {
if s.UserAgent == "" {
return googleapi.UserAgent
}
return googleapi.UserAgent + " " + s.UserAgent
}
func NewProjectsService(s *Service) *ProjectsService {
rs := &ProjectsService{s: s}
rs.Assessments = NewProjectsAssessmentsService(s)
rs.Firewallpolicies = NewProjectsFirewallpoliciesService(s)
rs.Keys = NewProjectsKeysService(s)
rs.Relatedaccountgroupmemberships = NewProjectsRelatedaccountgroupmembershipsService(s)
rs.Relatedaccountgroups = NewProjectsRelatedaccountgroupsService(s)
return rs
}
type ProjectsService struct {
s *Service
Assessments *ProjectsAssessmentsService
Firewallpolicies *ProjectsFirewallpoliciesService
Keys *ProjectsKeysService
Relatedaccountgroupmemberships *ProjectsRelatedaccountgroupmembershipsService
Relatedaccountgroups *ProjectsRelatedaccountgroupsService
}
func NewProjectsAssessmentsService(s *Service) *ProjectsAssessmentsService {
rs := &ProjectsAssessmentsService{s: s}
return rs
}
type ProjectsAssessmentsService struct {
s *Service
}
func NewProjectsFirewallpoliciesService(s *Service) *ProjectsFirewallpoliciesService {
rs := &ProjectsFirewallpoliciesService{s: s}
return rs
}
type ProjectsFirewallpoliciesService struct {
s *Service
}
func NewProjectsKeysService(s *Service) *ProjectsKeysService {
rs := &ProjectsKeysService{s: s}
return rs
}
type ProjectsKeysService struct {
s *Service
}
func NewProjectsRelatedaccountgroupmembershipsService(s *Service) *ProjectsRelatedaccountgroupmembershipsService {
rs := &ProjectsRelatedaccountgroupmembershipsService{s: s}
return rs
}
type ProjectsRelatedaccountgroupmembershipsService struct {
s *Service
}
func NewProjectsRelatedaccountgroupsService(s *Service) *ProjectsRelatedaccountgroupsService {
rs := &ProjectsRelatedaccountgroupsService{s: s}
rs.Memberships = NewProjectsRelatedaccountgroupsMembershipsService(s)
return rs
}
type ProjectsRelatedaccountgroupsService struct {
s *Service
Memberships *ProjectsRelatedaccountgroupsMembershipsService
}
func NewProjectsRelatedaccountgroupsMembershipsService(s *Service) *ProjectsRelatedaccountgroupsMembershipsService {
rs := &ProjectsRelatedaccountgroupsMembershipsService{s: s}
return rs
}
type ProjectsRelatedaccountgroupsMembershipsService struct {
s *Service
}
// GoogleCloudRecaptchaenterpriseV1AccountDefenderAssessment: Account defender
// risk assessment.
type GoogleCloudRecaptchaenterpriseV1AccountDefenderAssessment struct {
// Labels: Output only. Labels for this request.
//
// Possible values:
// "ACCOUNT_DEFENDER_LABEL_UNSPECIFIED" - Default unspecified type.
// "PROFILE_MATCH" - The request matches a known good profile for the user.
// "SUSPICIOUS_LOGIN_ACTIVITY" - The request is potentially a suspicious
// login event and must be further verified either through multi-factor
// authentication or another system.
// "SUSPICIOUS_ACCOUNT_CREATION" - The request matched a profile that
// previously had suspicious account creation behavior. This can mean that this
// is a fake account.
// "RELATED_ACCOUNTS_NUMBER_HIGH" - The account in the request has a high
// number of related accounts. It does not necessarily imply that the account
// is bad but can require further investigation.
Labels []string `json:"labels,omitempty"`
// ForceSendFields is a list of field names (e.g. "Labels") to unconditionally
// include in API requests. By default, fields with empty or default values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Labels") to include in API
// requests with the JSON null value. By default, fields with empty values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
func (s GoogleCloudRecaptchaenterpriseV1AccountDefenderAssessment) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudRecaptchaenterpriseV1AccountDefenderAssessment
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}
// GoogleCloudRecaptchaenterpriseV1AccountVerificationInfo: Information about
// account verification, used for identity verification.
type GoogleCloudRecaptchaenterpriseV1AccountVerificationInfo struct {
// Endpoints: Optional. Endpoints that can be used for identity verification.
Endpoints []*GoogleCloudRecaptchaenterpriseV1EndpointVerificationInfo `json:"endpoints,omitempty"`
// LanguageCode: Optional. Language code preference for the verification
// message, set as a IETF BCP 47 language code.
LanguageCode string `json:"languageCode,omitempty"`
// LatestVerificationResult: Output only. Result of the latest account
// verification challenge.
//
// Possible values:
// "RESULT_UNSPECIFIED" - No information about the latest account
// verification.
// "SUCCESS_USER_VERIFIED" - The user was successfully verified. This means
// the account verification challenge was successfully completed.
// "ERROR_USER_NOT_VERIFIED" - The user failed the verification challenge.
// "ERROR_SITE_ONBOARDING_INCOMPLETE" - The site is not properly onboarded to
// use the account verification feature.
// "ERROR_RECIPIENT_NOT_ALLOWED" - The recipient is not allowed for account
// verification. This can occur during integration but should not occur in
// production.
// "ERROR_RECIPIENT_ABUSE_LIMIT_EXHAUSTED" - The recipient has already been
// sent too many verification codes in a short amount of time.
// "ERROR_CRITICAL_INTERNAL" - The verification flow could not be completed
// due to a critical internal error.
// "ERROR_CUSTOMER_QUOTA_EXHAUSTED" - The client has exceeded their two
// factor request quota for this period of time.
// "ERROR_VERIFICATION_BYPASSED" - The request cannot be processed at the
// time because of an incident. This bypass can be restricted to a problematic
// destination email domain, a customer, or could affect the entire service.
// "ERROR_VERDICT_MISMATCH" - The request parameters do not match with the
// token provided and cannot be processed.
LatestVerificationResult string `json:"latestVerificationResult,omitempty"`
// Username: Username of the account that is being verified. Deprecated.
// Customers should now provide the `account_id` field in `event.user_info`.
Username string `json:"username,omitempty"`
// ForceSendFields is a list of field names (e.g. "Endpoints") to
// unconditionally include in API requests. By default, fields with empty or
// default values are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Endpoints") to include in API
// requests with the JSON null value. By default, fields with empty values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
func (s GoogleCloudRecaptchaenterpriseV1AccountVerificationInfo) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudRecaptchaenterpriseV1AccountVerificationInfo
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}
// GoogleCloudRecaptchaenterpriseV1AddIpOverrideRequest: The AddIpOverride
// request message.
type GoogleCloudRecaptchaenterpriseV1AddIpOverrideRequest struct {
// IpOverrideData: Required. IP override added to the key.
IpOverrideData *GoogleCloudRecaptchaenterpriseV1IpOverrideData `json:"ipOverrideData,omitempty"`
// ForceSendFields is a list of field names (e.g. "IpOverrideData") to
// unconditionally include in API requests. By default, fields with empty or
// default values are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "IpOverrideData") to include in
// API requests with the JSON null value. By default, fields with empty values
// are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
func (s GoogleCloudRecaptchaenterpriseV1AddIpOverrideRequest) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudRecaptchaenterpriseV1AddIpOverrideRequest
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}
// GoogleCloudRecaptchaenterpriseV1AddIpOverrideResponse: Response for
// AddIpOverride.
type GoogleCloudRecaptchaenterpriseV1AddIpOverrideResponse struct {
// ServerResponse contains the HTTP response code and headers from the server.
googleapi.ServerResponse `json:"-"`
}
// GoogleCloudRecaptchaenterpriseV1AndroidKeySettings: Settings specific to
// keys that can be used by Android apps.
type GoogleCloudRecaptchaenterpriseV1AndroidKeySettings struct {
// AllowAllPackageNames: Optional. If set to true, allowed_package_names are
// not enforced.
AllowAllPackageNames bool `json:"allowAllPackageNames,omitempty"`
// AllowedPackageNames: Optional. Android package names of apps allowed to use
// the key. Example: 'com.companyname.appname'
AllowedPackageNames []string `json:"allowedPackageNames,omitempty"`
// SupportNonGoogleAppStoreDistribution: Optional. Set to true for keys that
// are used in an Android application that is available for download in app
// stores in addition to the Google Play Store.
SupportNonGoogleAppStoreDistribution bool `json:"supportNonGoogleAppStoreDistribution,omitempty"`
// ForceSendFields is a list of field names (e.g. "AllowAllPackageNames") to
// unconditionally include in API requests. By default, fields with empty or
// default values are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AllowAllPackageNames") to include
// in API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
func (s GoogleCloudRecaptchaenterpriseV1AndroidKeySettings) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudRecaptchaenterpriseV1AndroidKeySettings
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}
// GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentRequest: The request
// message to annotate an Assessment.
type GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentRequest struct {
// AccountId: Optional. A stable account identifier to apply to the assessment.
// This is an alternative to setting `account_id` in `CreateAssessment`, for
// example when a stable account identifier is not yet known in the initial
// request.
AccountId string `json:"accountId,omitempty"`
// Annotation: Optional. The annotation that will be assigned to the Event.
// This field can be left empty to provide reasons that apply to an event
// without concluding whether the event is legitimate or fraudulent.
//
// Possible values:
// "ANNOTATION_UNSPECIFIED" - Default unspecified type.
// "LEGITIMATE" - Provides information that the event turned out to be
// legitimate.
// "FRAUDULENT" - Provides information that the event turned out to be
// fraudulent.
// "PASSWORD_CORRECT" - Provides information that the event was related to a
// login event in which the user typed the correct password. Deprecated, prefer
// indicating CORRECT_PASSWORD through the reasons field instead.
// "PASSWORD_INCORRECT" - Provides information that the event was related to
// a login event in which the user typed the incorrect password. Deprecated,
// prefer indicating INCORRECT_PASSWORD through the reasons field instead.
Annotation string `json:"annotation,omitempty"`
// HashedAccountId: Optional. A stable hashed account identifier to apply to
// the assessment. This is an alternative to setting `hashed_account_id` in
// `CreateAssessment`, for example when a stable account identifier is not yet
// known in the initial request.
HashedAccountId string `json:"hashedAccountId,omitempty"`
// Reasons: Optional. Reasons for the annotation that are assigned to the
// event.
//
// Possible values:
// "REASON_UNSPECIFIED" - Default unspecified reason.
// "CHARGEBACK" - Indicates that the transaction had a chargeback issued with
// no other details. When possible, specify the type by using CHARGEBACK_FRAUD
// or CHARGEBACK_DISPUTE instead.
// "CHARGEBACK_FRAUD" - Indicates that the transaction had a chargeback
// issued related to an alleged unauthorized transaction from the cardholder's
// perspective (for example, the card number was stolen).
// "CHARGEBACK_DISPUTE" - Indicates that the transaction had a chargeback
// issued related to the cardholder having provided their card details but
// allegedly not being satisfied with the purchase (for example,
// misrepresentation, attempted cancellation).
// "REFUND" - Indicates that the completed payment transaction was refunded
// by the seller.
// "REFUND_FRAUD" - Indicates that the completed payment transaction was
// determined to be fraudulent by the seller, and was cancelled and refunded as
// a result.
// "TRANSACTION_ACCEPTED" - Indicates that the payment transaction was
// accepted, and the user was charged.
// "TRANSACTION_DECLINED" - Indicates that the payment transaction was
// declined, for example due to invalid card details.
// "PAYMENT_HEURISTICS" - Indicates the transaction associated with the
// assessment is suspected of being fraudulent based on the payment method,
// billing details, shipping address or other transaction information.
// "INITIATED_TWO_FACTOR" - Indicates that the user was served a 2FA
// challenge. An old assessment with `ENUM_VALUES.INITIATED_TWO_FACTOR` reason
// that has not been overwritten with `PASSED_TWO_FACTOR` is treated as an
// abandoned 2FA flow. This is equivalent to `FAILED_TWO_FACTOR`.
// "PASSED_TWO_FACTOR" - Indicates that the user passed a 2FA challenge.
// "FAILED_TWO_FACTOR" - Indicates that the user failed a 2FA challenge.
// "CORRECT_PASSWORD" - Indicates the user provided the correct password.
// "INCORRECT_PASSWORD" - Indicates the user provided an incorrect password.
// "SOCIAL_SPAM" - Indicates that the user sent unwanted and abusive messages
// to other users of the platform, such as spam, scams, phishing, or social
// engineering.
Reasons []string `json:"reasons,omitempty"`
// TransactionEvent: Optional. If the assessment is part of a payment
// transaction, provide details on payment lifecycle events that occur in the
// transaction.
TransactionEvent *GoogleCloudRecaptchaenterpriseV1TransactionEvent `json:"transactionEvent,omitempty"`
// ForceSendFields is a list of field names (e.g. "AccountId") to
// unconditionally include in API requests. By default, fields with empty or
// default values are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AccountId") to include in API
// requests with the JSON null value. By default, fields with empty values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
func (s GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentRequest) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentRequest
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}
// GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentResponse: Empty response
// for AnnotateAssessment.
type GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentResponse struct {
// ServerResponse contains the HTTP response code and headers from the server.
googleapi.ServerResponse `json:"-"`
}
// GoogleCloudRecaptchaenterpriseV1AppleDeveloperId: Contains fields that are
// required to perform Apple-specific integrity checks.
type GoogleCloudRecaptchaenterpriseV1AppleDeveloperId struct {
// KeyId: Required. The Apple developer key ID (10-character string).
KeyId string `json:"keyId,omitempty"`
// PrivateKey: Required. Input only. A private key (downloaded as a text file
// with a .p8 file extension) generated for your Apple Developer account.
// Ensure that Apple DeviceCheck is enabled for the private key.
PrivateKey string `json:"privateKey,omitempty"`
// TeamId: Required. The Apple team ID (10-character string) owning the
// provisioning profile used to build your application.
TeamId string `json:"teamId,omitempty"`
// ForceSendFields is a list of field names (e.g. "KeyId") to unconditionally
// include in API requests. By default, fields with empty or default values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "KeyId") to include in API
// requests with the JSON null value. By default, fields with empty values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
func (s GoogleCloudRecaptchaenterpriseV1AppleDeveloperId) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudRecaptchaenterpriseV1AppleDeveloperId
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}
// GoogleCloudRecaptchaenterpriseV1Assessment: A reCAPTCHA Enterprise
// assessment resource.
type GoogleCloudRecaptchaenterpriseV1Assessment struct {
// AccountDefenderAssessment: Output only. Assessment returned by account
// defender when an account identifier is provided.
AccountDefenderAssessment *GoogleCloudRecaptchaenterpriseV1AccountDefenderAssessment `json:"accountDefenderAssessment,omitempty"`
// AccountVerification: Optional. Account verification information for identity
// verification. The assessment event must include a token and site key to use
// this feature.
AccountVerification *GoogleCloudRecaptchaenterpriseV1AccountVerificationInfo `json:"accountVerification,omitempty"`
// AssessmentEnvironment: Optional. The environment creating the assessment.
// This describes your environment (the system invoking CreateAssessment), NOT
// the environment of your user.
AssessmentEnvironment *GoogleCloudRecaptchaenterpriseV1AssessmentEnvironment `json:"assessmentEnvironment,omitempty"`
// Event: Optional. The event being assessed.
Event *GoogleCloudRecaptchaenterpriseV1Event `json:"event,omitempty"`
// FirewallPolicyAssessment: Output only. Assessment returned when firewall
// policies belonging to the project are evaluated using the field
// firewall_policy_evaluation.
FirewallPolicyAssessment *GoogleCloudRecaptchaenterpriseV1FirewallPolicyAssessment `json:"firewallPolicyAssessment,omitempty"`
// FraudPreventionAssessment: Output only. Assessment returned by Fraud
// Prevention when TransactionData is provided.
FraudPreventionAssessment *GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessment `json:"fraudPreventionAssessment,omitempty"`
// FraudSignals: Output only. Fraud Signals specific to the users involved in a
// payment transaction.
FraudSignals *GoogleCloudRecaptchaenterpriseV1FraudSignals `json:"fraudSignals,omitempty"`
// Name: Output only. Identifier. The resource name for the Assessment in the
// format `projects/{project}/assessments/{assessment}`.
Name string `json:"name,omitempty"`
// PhoneFraudAssessment: Output only. Assessment returned when a site key, a
// token, and a phone number as `user_id` are provided. Account defender and
// SMS toll fraud protection need to be enabled.
PhoneFraudAssessment *GoogleCloudRecaptchaenterpriseV1PhoneFraudAssessment `json:"phoneFraudAssessment,omitempty"`
// PrivatePasswordLeakVerification: Optional. The private password leak
// verification field contains the parameters that are used to to check for
// leaks privately without sharing user credentials.
PrivatePasswordLeakVerification *GoogleCloudRecaptchaenterpriseV1PrivatePasswordLeakVerification `json:"privatePasswordLeakVerification,omitempty"`
// RiskAnalysis: Output only. The risk analysis result for the event being
// assessed.
RiskAnalysis *GoogleCloudRecaptchaenterpriseV1RiskAnalysis `json:"riskAnalysis,omitempty"`
// TokenProperties: Output only. Properties of the provided event token.
TokenProperties *GoogleCloudRecaptchaenterpriseV1TokenProperties `json:"tokenProperties,omitempty"`
// ServerResponse contains the HTTP response code and headers from the server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "AccountDefenderAssessment")
// to unconditionally include in API requests. By default, fields with empty or
// default values are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AccountDefenderAssessment") to
// include in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
func (s GoogleCloudRecaptchaenterpriseV1Assessment) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudRecaptchaenterpriseV1Assessment
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}
// GoogleCloudRecaptchaenterpriseV1AssessmentEnvironment: The environment
// creating the assessment. This describes your environment (the system
// invoking CreateAssessment), NOT the environment of your user.
type GoogleCloudRecaptchaenterpriseV1AssessmentEnvironment struct {
// Client: Optional. Identifies the client module initiating the
// CreateAssessment request. This can be the link to the client module's
// project. Examples include: -
// "github.com/GoogleCloudPlatform/recaptcha-enterprise-google-tag-manager" -
// "cloud.google.com/recaptcha/docs/implement-waf-akamai" -
// "cloud.google.com/recaptcha/docs/implement-waf-cloudflare" -
// "wordpress.org/plugins/recaptcha-something"
Client string `json:"client,omitempty"`
// Version: Optional. The version of the client module. For example, "1.0.0".
Version string `json:"version,omitempty"`
// ForceSendFields is a list of field names (e.g. "Client") to unconditionally
// include in API requests. By default, fields with empty or default values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Client") to include in API
// requests with the JSON null value. By default, fields with empty values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
func (s GoogleCloudRecaptchaenterpriseV1AssessmentEnvironment) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudRecaptchaenterpriseV1AssessmentEnvironment
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}
// GoogleCloudRecaptchaenterpriseV1ChallengeMetrics: Metrics related to
// challenges.
type GoogleCloudRecaptchaenterpriseV1ChallengeMetrics struct {
// FailedCount: Count of submitted challenge solutions that were incorrect or
// otherwise deemed suspicious such that a subsequent challenge was triggered.
FailedCount int64 `json:"failedCount,omitempty,string"`
// NocaptchaCount: Count of nocaptchas (successful verification without a
// challenge) issued.
NocaptchaCount int64 `json:"nocaptchaCount,omitempty,string"`
// PageloadCount: Count of reCAPTCHA checkboxes or badges rendered. This is
// mostly equivalent to a count of pageloads for pages that include reCAPTCHA.
PageloadCount int64 `json:"pageloadCount,omitempty,string"`
// PassedCount: Count of nocaptchas (successful verification without a
// challenge) plus submitted challenge solutions that were correct and resulted
// in verification.
PassedCount int64 `json:"passedCount,omitempty,string"`
// ForceSendFields is a list of field names (e.g. "FailedCount") to
// unconditionally include in API requests. By default, fields with empty or
// default values are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "FailedCount") to include in API
// requests with the JSON null value. By default, fields with empty values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
func (s GoogleCloudRecaptchaenterpriseV1ChallengeMetrics) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudRecaptchaenterpriseV1ChallengeMetrics
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}
// GoogleCloudRecaptchaenterpriseV1EndpointVerificationInfo: Information about
// a verification endpoint that can be used for 2FA.
type GoogleCloudRecaptchaenterpriseV1EndpointVerificationInfo struct {
// EmailAddress: Email address for which to trigger a verification request.
EmailAddress string `json:"emailAddress,omitempty"`
// LastVerificationTime: Output only. Timestamp of the last successful
// verification for the endpoint, if any.
LastVerificationTime string `json:"lastVerificationTime,omitempty"`
// PhoneNumber: Phone number for which to trigger a verification request.
// Should be given in E.164 format.
PhoneNumber string `json:"phoneNumber,omitempty"`
// RequestToken: Output only. Token to provide to the client to trigger
// endpoint verification. It must be used within 15 minutes.
RequestToken string `json:"requestToken,omitempty"`
// ForceSendFields is a list of field names (e.g. "EmailAddress") to
// unconditionally include in API requests. By default, fields with empty or
// default values are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "EmailAddress") to include in API
// requests with the JSON null value. By default, fields with empty values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
func (s GoogleCloudRecaptchaenterpriseV1EndpointVerificationInfo) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudRecaptchaenterpriseV1EndpointVerificationInfo
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}
// GoogleCloudRecaptchaenterpriseV1Event: The event being assessed.
type GoogleCloudRecaptchaenterpriseV1Event struct {
// ExpectedAction: Optional. The expected action for this type of event. This
// should be the same action provided at token generation time on client-side
// platforms already integrated with recaptcha enterprise.
ExpectedAction string `json:"expectedAction,omitempty"`
// Express: Optional. Flag for a reCAPTCHA express request for an assessment
// without a token. If enabled, `site_key` must reference an Express site key.
Express bool `json:"express,omitempty"`
// FirewallPolicyEvaluation: Optional. Flag for enabling firewall policy config
// assessment. If this flag is enabled, the firewall policy will be evaluated
// and a suggested firewall action will be returned in the response.
FirewallPolicyEvaluation bool `json:"firewallPolicyEvaluation,omitempty"`
// FraudPrevention: Optional. The Fraud Prevention setting for this assessment.
//
// Possible values:
// "FRAUD_PREVENTION_UNSPECIFIED" - Default, unspecified setting. If opted in
// for automatic detection, `fraud_prevention_assessment` is returned based on
// the request. Otherwise, `fraud_prevention_assessment` is returned if
// `transaction_data` is present in the `Event` and Fraud Prevention is enabled
// in the Google Cloud console.
// "ENABLED" - Enable Fraud Prevention for this assessment, if Fraud
// Prevention is enabled in the Google Cloud console.
// "DISABLED" - Disable Fraud Prevention for this assessment, regardless of
// opt-in status or Google Cloud console settings.
FraudPrevention string `json:"fraudPrevention,omitempty"`
// HashedAccountId: Optional. Deprecated: use `user_info.account_id` instead.
// Unique stable hashed user identifier for the request. The identifier must be
// hashed using hmac-sha256 with stable secret.
HashedAccountId string `json:"hashedAccountId,omitempty"`
// Headers: Optional. HTTP header information about the request.
Headers []string `json:"headers,omitempty"`
// Ja3: Optional. JA3 fingerprint for SSL clients.
Ja3 string `json:"ja3,omitempty"`
// RequestedUri: Optional. The URI resource the user requested that triggered
// an assessment.
RequestedUri string `json:"requestedUri,omitempty"`
// SiteKey: Optional. The site key that was used to invoke reCAPTCHA Enterprise
// on your site and generate the token.
SiteKey string `json:"siteKey,omitempty"`
// Token: Optional. The user response token provided by the reCAPTCHA
// Enterprise client-side integration on your site.
Token string `json:"token,omitempty"`
// TransactionData: Optional. Data describing a payment transaction to be
// assessed. Sending this data enables reCAPTCHA Enterprise Fraud Prevention
// and the FraudPreventionAssessment component in the response.
TransactionData *GoogleCloudRecaptchaenterpriseV1TransactionData `json:"transactionData,omitempty"`
// UserAgent: Optional. The user agent present in the request from the user's
// device related to this event.
UserAgent string `json:"userAgent,omitempty"`
// UserInfo: Optional. Information about the user that generates this event,
// when they can be identified. They are often identified through the use of an
// account for logged-in requests or login/registration requests, or by
// providing user identifiers for guest actions like checkout.
UserInfo *GoogleCloudRecaptchaenterpriseV1UserInfo `json:"userInfo,omitempty"`
// UserIpAddress: Optional. The IP address in the request from the user's
// device related to this event.
UserIpAddress string `json:"userIpAddress,omitempty"`
// WafTokenAssessment: Optional. Flag for running WAF token assessment. If
// enabled, the token must be specified, and have been created by a WAF-enabled
// key.
WafTokenAssessment bool `json:"wafTokenAssessment,omitempty"`
// ForceSendFields is a list of field names (e.g. "ExpectedAction") to
// unconditionally include in API requests. By default, fields with empty or
// default values are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ExpectedAction") to include in
// API requests with the JSON null value. By default, fields with empty values
// are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
func (s GoogleCloudRecaptchaenterpriseV1Event) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudRecaptchaenterpriseV1Event
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}
// GoogleCloudRecaptchaenterpriseV1ExpressKeySettings: Settings specific to
// keys that can be used for reCAPTCHA Express.
type GoogleCloudRecaptchaenterpriseV1ExpressKeySettings struct {
}
// GoogleCloudRecaptchaenterpriseV1FirewallAction: An individual action. Each
// action represents what to do if a policy matches.
type GoogleCloudRecaptchaenterpriseV1FirewallAction struct {
// Allow: The user request did not match any policy and should be allowed
// access to the requested resource.
Allow *GoogleCloudRecaptchaenterpriseV1FirewallActionAllowAction `json:"allow,omitempty"`
// Block: This action will deny access to a given page. The user will get an
// HTTP error code.
Block *GoogleCloudRecaptchaenterpriseV1FirewallActionBlockAction `json:"block,omitempty"`
// IncludeRecaptchaScript: This action will inject reCAPTCHA JavaScript code
// into the HTML page returned by the site backend.
IncludeRecaptchaScript *GoogleCloudRecaptchaenterpriseV1FirewallActionIncludeRecaptchaScriptAction `json:"includeRecaptchaScript,omitempty"`
// Redirect: This action will redirect the request to a ReCaptcha interstitial
// to attach a token.
Redirect *GoogleCloudRecaptchaenterpriseV1FirewallActionRedirectAction `json:"redirect,omitempty"`
// SetHeader: This action will set a custom header but allow the request to
// continue to the customer backend.
SetHeader *GoogleCloudRecaptchaenterpriseV1FirewallActionSetHeaderAction `json:"setHeader,omitempty"`
// Substitute: This action will transparently serve a different page to an
// offending user.
Substitute *GoogleCloudRecaptchaenterpriseV1FirewallActionSubstituteAction `json:"substitute,omitempty"`
// ForceSendFields is a list of field names (e.g. "Allow") to unconditionally
// include in API requests. By default, fields with empty or default values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Allow") to include in API
// requests with the JSON null value. By default, fields with empty values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
func (s GoogleCloudRecaptchaenterpriseV1FirewallAction) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudRecaptchaenterpriseV1FirewallAction
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}
// GoogleCloudRecaptchaenterpriseV1FirewallActionAllowAction: An allow action
// continues processing a request unimpeded.
type GoogleCloudRecaptchaenterpriseV1FirewallActionAllowAction struct {
}
// GoogleCloudRecaptchaenterpriseV1FirewallActionBlockAction: A block action
// serves an HTTP error code a prevents the request from hitting the backend.
type GoogleCloudRecaptchaenterpriseV1FirewallActionBlockAction struct {
}
// GoogleCloudRecaptchaenterpriseV1FirewallActionIncludeRecaptchaScriptAction:
// An include reCAPTCHA script action involves injecting reCAPTCHA JavaScript
// code into the HTML returned by the site backend. This reCAPTCHA script is
// tasked with collecting user signals on the requested web page, issuing
// tokens as a cookie within the site domain, and enabling their utilization in
// subsequent page requests.
type GoogleCloudRecaptchaenterpriseV1FirewallActionIncludeRecaptchaScriptAction struct {
}
// GoogleCloudRecaptchaenterpriseV1FirewallActionRedirectAction: A redirect
// action returns a 307 (temporary redirect) response, pointing the user to a
// ReCaptcha interstitial page to attach a token.
type GoogleCloudRecaptchaenterpriseV1FirewallActionRedirectAction struct {
}
// GoogleCloudRecaptchaenterpriseV1FirewallActionSetHeaderAction: A set header
// action sets a header and forwards the request to the backend. This can be
// used to trigger custom protection implemented on the backend.
type GoogleCloudRecaptchaenterpriseV1FirewallActionSetHeaderAction struct {
// Key: Optional. The header key to set in the request to the backend server.
Key string `json:"key,omitempty"`
// Value: Optional. The header value to set in the request to the backend
// server.
Value string `json:"value,omitempty"`
// ForceSendFields is a list of field names (e.g. "Key") to unconditionally
// include in API requests. By default, fields with empty or default values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Key") to include in API requests
// with the JSON null value. By default, fields with empty values are omitted
// from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
func (s GoogleCloudRecaptchaenterpriseV1FirewallActionSetHeaderAction) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudRecaptchaenterpriseV1FirewallActionSetHeaderAction
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}
// GoogleCloudRecaptchaenterpriseV1FirewallActionSubstituteAction: A substitute
// action transparently serves a different page than the one requested.
type GoogleCloudRecaptchaenterpriseV1FirewallActionSubstituteAction struct {
// Path: Optional. The address to redirect to. The target is a relative path in
// the current host. Example: "/blog/404.html".
Path string `json:"path,omitempty"`
// ForceSendFields is a list of field names (e.g. "Path") to unconditionally
// include in API requests. By default, fields with empty or default values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Path") to include in API requests
// with the JSON null value. By default, fields with empty values are omitted
// from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
func (s GoogleCloudRecaptchaenterpriseV1FirewallActionSubstituteAction) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudRecaptchaenterpriseV1FirewallActionSubstituteAction
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}
// GoogleCloudRecaptchaenterpriseV1FirewallPolicy: A FirewallPolicy represents
// a single matching pattern and resulting actions to take.
type GoogleCloudRecaptchaenterpriseV1FirewallPolicy struct {
// Actions: Optional. The actions that the caller should take regarding user
// access. There should be at most one terminal action. A terminal action is
// any action that forces a response, such as `AllowAction`, `BlockAction` or
// `SubstituteAction`. Zero or more non-terminal actions such as `SetHeader`
// might be specified. A single policy can contain up to 16 actions.
Actions []*GoogleCloudRecaptchaenterpriseV1FirewallAction `json:"actions,omitempty"`
// Condition: Optional. A CEL (Common Expression Language) conditional
// expression that specifies if this policy applies to an incoming user
// request. If this condition evaluates to true and the requested path matched
// the path pattern, the associated actions should be executed by the caller.
// The condition string is checked for CEL syntax correctness on creation. For
// more information, see the CEL spec (https://github.com/google/cel-spec) and
// its language definition
// (https://github.com/google/cel-spec/blob/master/doc/langdef.md). A condition
// has a max length of 500 characters.
Condition string `json:"condition,omitempty"`
// Description: Optional. A description of what this policy aims to achieve,
// for convenience purposes. The description can at most include 256 UTF-8
// characters.
Description string `json:"description,omitempty"`
// Name: Identifier. The resource name for the FirewallPolicy in the format
// `projects/{project}/firewallpolicies/{firewallpolicy}`.
Name string `json:"name,omitempty"`
// Path: Optional. The path for which this policy applies, specified as a glob
// pattern. For more information on glob, see the manual page
// (https://man7.org/linux/man-pages/man7/glob.7.html). A path has a max length
// of 200 characters.
Path string `json:"path,omitempty"`
// ServerResponse contains the HTTP response code and headers from the server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Actions") to unconditionally
// include in API requests. By default, fields with empty or default values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Actions") to include in API
// requests with the JSON null value. By default, fields with empty values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
func (s GoogleCloudRecaptchaenterpriseV1FirewallPolicy) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudRecaptchaenterpriseV1FirewallPolicy
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}
// GoogleCloudRecaptchaenterpriseV1FirewallPolicyAssessment: Policy config
// assessment.
type GoogleCloudRecaptchaenterpriseV1FirewallPolicyAssessment struct {
// Error: Output only. If the processing of a policy config fails, an error
// will be populated and the firewall_policy will be left empty.
Error *GoogleRpcStatus `json:"error,omitempty"`
// FirewallPolicy: Output only. The policy that matched the request. If more
// than one policy may match, this is the first match. If no policy matches the
// incoming request, the policy field will be left empty.
FirewallPolicy *GoogleCloudRecaptchaenterpriseV1FirewallPolicy `json:"firewallPolicy,omitempty"`
// ForceSendFields is a list of field names (e.g. "Error") to unconditionally
// include in API requests. By default, fields with empty or default values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Error") to include in API
// requests with the JSON null value. By default, fields with empty values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
func (s GoogleCloudRecaptchaenterpriseV1FirewallPolicyAssessment) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudRecaptchaenterpriseV1FirewallPolicyAssessment
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}
// GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessment: Assessment for
// Fraud Prevention.
type GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessment struct {
// BehavioralTrustVerdict: Output only. Assessment of this transaction for
// behavioral trust.
BehavioralTrustVerdict *GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentBehavioralTrustVerdict `json:"behavioralTrustVerdict,omitempty"`
// CardTestingVerdict: Output only. Assessment of this transaction for risk of
// being part of a card testing attack.
CardTestingVerdict *GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentCardTestingVerdict `json:"cardTestingVerdict,omitempty"`
// StolenInstrumentVerdict: Output only. Assessment of this transaction for
// risk of a stolen instrument.
StolenInstrumentVerdict *GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentStolenInstrumentVerdict `json:"stolenInstrumentVerdict,omitempty"`
// TransactionRisk: Output only. Probability of this transaction being
// fraudulent. Summarizes the combined risk of attack vectors below. Values are
// from 0.0 (lowest) to 1.0 (highest).
TransactionRisk float64 `json:"transactionRisk,omitempty"`
// ForceSendFields is a list of field names (e.g. "BehavioralTrustVerdict") to
// unconditionally include in API requests. By default, fields with empty or
// default values are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "BehavioralTrustVerdict") to
// include in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
func (s GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessment) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessment
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}
func (s *GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessment) UnmarshalJSON(data []byte) error {
type NoMethod GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessment
var s1 struct {
TransactionRisk gensupport.JSONFloat64 `json:"transactionRisk"`
*NoMethod
}
s1.NoMethod = (*NoMethod)(s)
if err := json.Unmarshal(data, &s1); err != nil {