Copied!

The event being assessed.

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

CloneableInstantiable
Methods
public __construct( $data = NULL)
 

Constructor.

  • param array $data { Optional. Data for populating the Message object.
    @type string $token
          Optional. The user response token provided by the reCAPTCHA Enterprise
          client-side integration on your site.
    @type string $site_key
          Optional. The site key that was used to invoke reCAPTCHA Enterprise on your
          site and generate the token.
    @type string $user_agent
          Optional. The user agent present in the request from the user's device
          related to this event.
    @type string $user_ip_address
          Optional. The IP address in the request from the user's device related to
          this event.
    @type string $expected_action
          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.
    @type string $hashed_account_id
          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.
    @type bool $express
          Optional. Flag for a reCAPTCHA express request for an assessment without a
          token. If enabled, `site_key` must reference an Express site key.
    @type string $requested_uri
          Optional. The URI resource the user requested that triggered an assessment.
    @type bool $waf_token_assessment
          Optional. Flag for running Web Application Firewall (WAF) token assessment.
          If enabled, the token must be specified, and have been created by a
          WAF-enabled key.
    @type string $ja3
          Optional. JA3 fingerprint for SSL clients. To learn how to compute this
          fingerprint, please refer to https://github.com/salesforce/ja3.
    @type string $ja4
          Optional. JA4 fingerprint for SSL clients. To learn how to compute this
          fingerprint, please refer to https://github.com/FoxIO-LLC/ja4.
    @type string[] $headers
          Optional. HTTP header information about the request.
    @type bool $firewall_policy_evaluation
          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.
    @type \Google\Cloud\RecaptchaEnterprise\V1\TransactionData $transaction_data
          Optional. Data describing a payment transaction to be assessed. Sending
          this data enables reCAPTCHA Enterprise Fraud Prevention and the
          FraudPreventionAssessment component in the response.
    @type \Google\Cloud\RecaptchaEnterprise\V1\UserInfo $user_info
          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.
    @type int $fraud_prevention
          Optional. The Fraud Prevention setting for this assessment.
    
    }
public Google\Protobuf\Internal\Message::__debugInfo()
public Google\Protobuf\Internal\Message::byteSize()
 
  • ignore
public Google\Protobuf\Internal\Message::clear()
 

Clear all containing fields.

  • return null
public clearTransactionData()
public clearUserInfo()
public Google\Protobuf\Internal\Message::discardUnknownFields()
 

Clear all unknown fields previously parsed.

  • return null
public 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.

Generated from protobuf field string expected_action = 5 [(.google.api.field_behavior) = OPTIONAL];

  • return string
public getExpress()
 

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

Generated from protobuf field bool express = 14 [(.google.api.field_behavior) = OPTIONAL];

  • return bool
public 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.

Generated from protobuf field bool firewall_policy_evaluation = 12 [(.google.api.field_behavior) = OPTIONAL];

  • return bool
public getFraudPrevention()
 

Optional. The Fraud Prevention setting for this assessment.

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.Event.FraudPrevention fraud_prevention = 17 [(.google.api.field_behavior) = OPTIONAL];

  • return int
public 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.

Generated from protobuf field bytes hashed_account_id = 6 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];

  • return string
  • deprecated
public getHeaders()
 

Optional. HTTP header information about the request.

Generated from protobuf field repeated string headers = 11 [(.google.api.field_behavior) = OPTIONAL];

  • return \RepeatedField<string>
public getJa3()
 

Optional. JA3 fingerprint for SSL clients. To learn how to compute this fingerprint, please refer to https://github.com/salesforce/ja3.

Generated from protobuf field string ja3 = 10 [(.google.api.field_behavior) = OPTIONAL];

  • return string
public getJa4()
 

Optional. JA4 fingerprint for SSL clients. To learn how to compute this fingerprint, please refer to https://github.com/FoxIO-LLC/ja4.

Generated from protobuf field string ja4 = 18 [(.google.api.field_behavior) = OPTIONAL];

  • return string
public getRequestedUri()
 

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

Generated from protobuf field string requested_uri = 8 [(.google.api.field_behavior) = OPTIONAL];

  • return string
public getSiteKey()
 

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

Generated from protobuf field string site_key = 2 [(.google.api.field_behavior) = OPTIONAL];

  • return string
public getToken()
 

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

Generated from protobuf field string token = 1 [(.google.api.field_behavior) = OPTIONAL];

  • return string
public 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.

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData transaction_data = 13 [(.google.api.field_behavior) = OPTIONAL];

  • return \Google\Cloud\RecaptchaEnterprise\V1\TransactionData|null
public getUserAgent()
 

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

Generated from protobuf field string user_agent = 3 [(.google.api.field_behavior) = OPTIONAL];

  • return string
public 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.

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.UserInfo user_info = 15 [(.google.api.field_behavior) = OPTIONAL];

  • return \Google\Cloud\RecaptchaEnterprise\V1\UserInfo|null
public getUserIpAddress()
 

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

Generated from protobuf field string user_ip_address = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = {

  • return string
public getWafTokenAssessment()
 

Optional. Flag for running Web Application Firewall (WAF) token assessment.

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

Generated from protobuf field bool waf_token_assessment = 9 [(.google.api.field_behavior) = OPTIONAL];

  • return bool
public hasTransactionData()
public hasUserInfo()
public Google\Protobuf\Internal\Message::jsonByteSize( $options = 0)
 
  • ignore
public Google\Protobuf\Internal\Message::mergeFrom( $msg)
 

Merges the contents of the specified message into current message.

This method merges the contents of the specified message into the current message. Singular fields that are set in the specified message overwrite the corresponding fields in the current message. Repeated fields are appended. Map fields key-value pairs are overwritten. Singular/Oneof sub-messages are recursively merged. All overwritten sub-messages are deep-copied.

  • param object $msg Protobuf message to be merged from.
  • return null
public Google\Protobuf\Internal\Message::mergeFromJsonString( $data, $ignore_unknown = false)
 

Parses a json string to protobuf message.

This function takes a string in the json wire format, matching the encoding output by serializeToJsonString(). See mergeFrom() for merging behavior, if the field is already set in the specified message.

  • param string $data Json protobuf data.
  • param bool $ignore_unknown
  • return null
  • throws \Exception Invalid data.
public Google\Protobuf\Internal\Message::mergeFromString( $data)
 

Parses a protocol buffer contained in a string.

This function takes a string in the (non-human-readable) binary wire format, matching the encoding output by serializeToString(). See mergeFrom() for merging behavior, if the field is already set in the specified message.

  • param string $data Binary protobuf data.
  • return null
  • throws \Exception Invalid data.
public Google\Protobuf\Internal\Message::parseFromJsonStream( $input, $ignore_unknown)
 
  • ignore
public Google\Protobuf\Internal\Message::parseFromStream( $input)
 
  • ignore
public Google\Protobuf\Internal\Message::serializeToJsonStream( $output)
 
  • ignore
public Google\Protobuf\Internal\Message::serializeToJsonString( $options = 0)
 

Serialize the message to json string.

  • return string Serialized json protobuf data.
public Google\Protobuf\Internal\Message::serializeToStream( $output)
 
  • ignore
public Google\Protobuf\Internal\Message::serializeToString()
 

Serialize the message to string.

  • return string Serialized binary protobuf data.
public setExpectedAction( $var)
 

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.

Generated from protobuf field string expected_action = 5 [(.google.api.field_behavior) = OPTIONAL];

  • param string $var
  • return $this
public setExpress( $var)
 

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

Generated from protobuf field bool express = 14 [(.google.api.field_behavior) = OPTIONAL];

  • param bool $var
  • return $this
public setFirewallPolicyEvaluation( $var)
 

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.

Generated from protobuf field bool firewall_policy_evaluation = 12 [(.google.api.field_behavior) = OPTIONAL];

  • param bool $var
  • return $this
public setFraudPrevention( $var)
 

Optional. The Fraud Prevention setting for this assessment.

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.Event.FraudPrevention fraud_prevention = 17 [(.google.api.field_behavior) = OPTIONAL];

  • param int $var
  • return $this
public setHashedAccountId( $var)
 

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.

Generated from protobuf field bytes hashed_account_id = 6 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];

  • param string $var
  • return $this
  • deprecated
public setHeaders( $var)
 

Optional. HTTP header information about the request.

Generated from protobuf field repeated string headers = 11 [(.google.api.field_behavior) = OPTIONAL];

  • param string[] $var
  • return $this
public setJa3( $var)
 

Optional. JA3 fingerprint for SSL clients. To learn how to compute this fingerprint, please refer to https://github.com/salesforce/ja3.

Generated from protobuf field string ja3 = 10 [(.google.api.field_behavior) = OPTIONAL];

  • param string $var
  • return $this
public setJa4( $var)
 

Optional. JA4 fingerprint for SSL clients. To learn how to compute this fingerprint, please refer to https://github.com/FoxIO-LLC/ja4.

Generated from protobuf field string ja4 = 18 [(.google.api.field_behavior) = OPTIONAL];

  • param string $var
  • return $this
public setRequestedUri( $var)
 

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

Generated from protobuf field string requested_uri = 8 [(.google.api.field_behavior) = OPTIONAL];

  • param string $var
  • return $this
public setSiteKey( $var)
 

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

Generated from protobuf field string site_key = 2 [(.google.api.field_behavior) = OPTIONAL];

  • param string $var
  • return $this
public setToken( $var)
 

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

Generated from protobuf field string token = 1 [(.google.api.field_behavior) = OPTIONAL];

  • param string $var
  • return $this
public setTransactionData( $var)
 

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

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData transaction_data = 13 [(.google.api.field_behavior) = OPTIONAL];

  • param \Google\Cloud\RecaptchaEnterprise\V1\TransactionData $var
  • return $this
public setUserAgent( $var)
 

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

Generated from protobuf field string user_agent = 3 [(.google.api.field_behavior) = OPTIONAL];

  • param string $var
  • return $this
public setUserInfo( $var)
 

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.

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.UserInfo user_info = 15 [(.google.api.field_behavior) = OPTIONAL];

  • param \Google\Cloud\RecaptchaEnterprise\V1\UserInfo $var
  • return $this
public setUserIpAddress( $var)
 

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

Generated from protobuf field string user_ip_address = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = {

  • param string $var
  • return $this
public setWafTokenAssessment( $var)
 

Optional. Flag for running Web Application Firewall (WAF) token assessment.

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

Generated from protobuf field bool waf_token_assessment = 9 [(.google.api.field_behavior) = OPTIONAL];

  • param bool $var
  • return $this
Properties
protected $expected_action = ''
 

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.

Generated from protobuf field string expected_action = 5 [(.google.api.field_behavior) = OPTIONAL];

protected $express = false
 

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

Generated from protobuf field bool express = 14 [(.google.api.field_behavior) = OPTIONAL];

protected $firewall_policy_evaluation = false
 

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.

Generated from protobuf field bool firewall_policy_evaluation = 12 [(.google.api.field_behavior) = OPTIONAL];

protected $fraud_prevention = 0
 

Optional. The Fraud Prevention setting for this assessment.

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.Event.FraudPrevention fraud_prevention = 17 [(.google.api.field_behavior) = OPTIONAL];

protected $hashed_account_id = ''
 

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.

Generated from protobuf field bytes hashed_account_id = 6 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];

  • deprecated
protected $ja3 = ''
 

Optional. JA3 fingerprint for SSL clients. To learn how to compute this fingerprint, please refer to https://github.com/salesforce/ja3.

Generated from protobuf field string ja3 = 10 [(.google.api.field_behavior) = OPTIONAL];

protected $ja4 = ''
 

Optional. JA4 fingerprint for SSL clients. To learn how to compute this fingerprint, please refer to https://github.com/FoxIO-LLC/ja4.

Generated from protobuf field string ja4 = 18 [(.google.api.field_behavior) = OPTIONAL];

protected $requested_uri = ''
 

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

Generated from protobuf field string requested_uri = 8 [(.google.api.field_behavior) = OPTIONAL];

protected $site_key = ''
 

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

Generated from protobuf field string site_key = 2 [(.google.api.field_behavior) = OPTIONAL];

protected $token = ''
 

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

Generated from protobuf field string token = 1 [(.google.api.field_behavior) = OPTIONAL];

protected $transaction_data = NULL
 

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

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TransactionData transaction_data = 13 [(.google.api.field_behavior) = OPTIONAL];

protected $user_agent = ''
 

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

Generated from protobuf field string user_agent = 3 [(.google.api.field_behavior) = OPTIONAL];

protected $user_info = NULL
 

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.

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.UserInfo user_info = 15 [(.google.api.field_behavior) = OPTIONAL];

protected $user_ip_address = ''
 

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

Generated from protobuf field string user_ip_address = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = {

protected $waf_token_assessment = false
 

Optional. Flag for running Web Application Firewall (WAF) token assessment.

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

Generated from protobuf field bool waf_token_assessment = 9 [(.google.api.field_behavior) = OPTIONAL];

Methods
protected Google\Protobuf\Internal\Message::hasOneof( $number)
protected Google\Protobuf\Internal\Message::mergeFromArray(array $array)
 

Populates the message from a user-supplied PHP array. Array keys correspond to Message properties and nested message properties.

Example:

$message->mergeFromArray([
    'name' => 'This is a message name',
    'interval' => [
         'startTime' => time() - 60,
         'endTime' => time(),
    ]
]);

This method will trigger an error if it is passed data that cannot be converted to the correct type. For example, a StringValue field must receive data that is either a string or a StringValue object.

  • param array $array An array containing message properties and values.
  • return null
protected Google\Protobuf\Internal\Message::mergeFromJsonArray( $array, $ignore_unknown)
protected Google\Protobuf\Internal\Message::readOneof( $number)
protected Google\Protobuf\Internal\Message::readWrapperValue( $member)
protected Google\Protobuf\Internal\Message::whichOneof( $oneof_name)
protected Google\Protobuf\Internal\Message::writeOneof( $number, $value)
protected Google\Protobuf\Internal\Message::writeWrapperValue( $member, $value)
Properties
private $headers = NULL
 

Optional. HTTP header information about the request.

Generated from protobuf field repeated string headers = 11 [(.google.api.field_behavior) = OPTIONAL];

© 2026 Bruce Wells
Search Namespaces \ Classes
Configuration