Google Cloud Recaptcha Enterprise V1 Client - Class Event (1.16.0)

Reference documentation and code samples for the Google Cloud Recaptcha Enterprise V1 Client class Event.

The event being assessed.

Generated from protobuf message google.cloud.recaptchaenterprise.v1.Event

Namespace

Google \ Cloud \ RecaptchaEnterprise \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ token string

Optional. The user response token provided by the reCAPTCHA Enterprise client-side integration on your site.

↳ site_key string

Optional. The site key that was used to invoke reCAPTCHA Enterprise on your site and generate the token.

↳ user_agent string

Optional. The user agent present in the request from the user's device related to this event.

↳ user_ip_address string

Optional. The IP address in the request from the user's device related to this event.

↳ expected_action string

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.

↳ hashed_account_id string

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.

↳ express bool

Optional. Flag for a reCAPTCHA express request for an assessment without a token. If enabled, site_key must reference an Express site key.

↳ requested_uri string

Optional. The URI resource the user requested that triggered an assessment.

↳ waf_token_assessment bool

Optional. Flag for running WAF token assessment. If enabled, the token must be specified, and have been created by a WAF-enabled key.

↳ ja3 string

Optional. JA3 fingerprint for SSL clients.

↳ headers array

Optional. HTTP header information about the request.

↳ firewall_policy_evaluation bool

Optional. Flag for enabling firewall policy config assessment. If this flag is enabled, the firewall policy is evaluated and a suggested firewall action is returned in the response.

↳ transaction_data Google\Cloud\RecaptchaEnterprise\V1\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.

↳ user_info Google\Cloud\RecaptchaEnterprise\V1\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.

↳ fraud_prevention int

Optional. The Fraud Prevention setting for this assessment.

getToken

Optional. The user response token provided by the reCAPTCHA Enterprise client-side integration on your site.

Returns
Type Description
string

setToken

Optional. The user response token provided by the reCAPTCHA Enterprise client-side integration on your site.

Parameter
Name Description
var string
Returns
Type Description
$this

getSiteKey

Optional. The site key that was used to invoke reCAPTCHA Enterprise on your site and generate the token.

Returns
Type Description
string

setSiteKey

Optional. The site key that was used to invoke reCAPTCHA Enterprise on your site and generate the token.

Parameter
Name Description
var string
Returns
Type Description
$this

getUserAgent

Optional. The user agent present in the request from the user's device related to this event.

Returns
Type Description
string

setUserAgent

Optional. The user agent present in the request from the user's device related to this event.

Parameter
Name Description
var string
Returns
Type Description
$this

getUserIpAddress

Optional. The IP address in the request from the user's device related to this event.

Returns
Type Description
string

setUserIpAddress

Optional. The IP address in the request from the user's device related to this event.

Parameter
Name Description
var string
Returns
Type Description
$this

getExpectedAction

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.

Returns
Type Description
string

setExpectedAction

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.

Parameter
Name Description
var string
Returns
Type Description
$this

getHashedAccountId

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.

Returns
Type Description
string

setHashedAccountId

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.

Parameter
Name Description
var string
Returns
Type Description
$this

getExpress

Optional. Flag for a reCAPTCHA express request for an assessment without a token. If enabled, site_key must reference an Express site key.

Returns
Type Description
bool

setExpress

Optional. Flag for a reCAPTCHA express request for an assessment without a token. If enabled, site_key must reference an Express site key.

Parameter
Name Description
var bool
Returns
Type Description
$this

getRequestedUri

Optional. The URI resource the user requested that triggered an assessment.

Returns
Type Description
string

setRequestedUri

Optional. The URI resource the user requested that triggered an assessment.

Parameter
Name Description
var string
Returns
Type Description
$this

getWafTokenAssessment

Optional. Flag for running WAF token assessment.

If enabled, the token must be specified, and have been created by a WAF-enabled key.

Returns
Type Description
bool

setWafTokenAssessment

Optional. Flag for running WAF token assessment.

If enabled, the token must be specified, and have been created by a WAF-enabled key.

Parameter
Name Description
var bool
Returns
Type Description
$this

getJa3

Optional. JA3 fingerprint for SSL clients.

Returns
Type Description
string

setJa3

Optional. JA3 fingerprint for SSL clients.

Parameter
Name Description
var string
Returns
Type Description
$this

getHeaders

Optional. HTTP header information about the request.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setHeaders

Optional. HTTP header information about the request.

Parameter
Name Description
var string[]
Returns
Type Description
$this

getFirewallPolicyEvaluation

Optional. Flag for enabling firewall policy config assessment.

If this flag is enabled, the firewall policy is evaluated and a suggested firewall action is returned in the response.

Returns
Type Description
bool

setFirewallPolicyEvaluation

Optional. Flag for enabling firewall policy config assessment.

If this flag is enabled, the firewall policy is evaluated and a suggested firewall action is returned in the response.

Parameter
Name Description
var bool
Returns
Type Description
$this

getTransactionData

Optional. Data describing a payment transaction to be assessed. Sending this data enables reCAPTCHA Enterprise Fraud Prevention and the FraudPreventionAssessment component in the response.

Returns
Type Description
Google\Cloud\RecaptchaEnterprise\V1\TransactionData|null

hasTransactionData

clearTransactionData

setTransactionData

Optional. Data describing a payment transaction to be assessed. Sending this data enables reCAPTCHA Enterprise Fraud Prevention and the FraudPreventionAssessment component in the response.

Parameter
Name Description
var Google\Cloud\RecaptchaEnterprise\V1\TransactionData
Returns
Type Description
$this

getUserInfo

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.

Returns
Type Description
Google\Cloud\RecaptchaEnterprise\V1\UserInfo|null

hasUserInfo

clearUserInfo

setUserInfo

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.

Parameter
Name Description
var Google\Cloud\RecaptchaEnterprise\V1\UserInfo
Returns
Type Description
$this

getFraudPrevention

Optional. The Fraud Prevention setting for this assessment.

Returns
Type Description
int

setFraudPrevention

Optional. The Fraud Prevention setting for this assessment.

Parameter
Name Description
var int
Returns
Type Description
$this