Copied!

A reCAPTCHA Enterprise assessment resource.

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

CloneableInstantiable
Methods
public __construct( $data = NULL)
 

Constructor.

  • param array $data { Optional. Data for populating the Message object.
    @type string $name
          Output only. Identifier. The resource name for the Assessment in the format
          `projects/{project}/assessments/{assessment}`.
    @type \Google\Cloud\RecaptchaEnterprise\V1\Event $event
          Optional. The event being assessed.
    @type \Google\Cloud\RecaptchaEnterprise\V1\RiskAnalysis $risk_analysis
          Output only. The risk analysis result for the event being assessed.
    @type \Google\Cloud\RecaptchaEnterprise\V1\TokenProperties $token_properties
          Output only. Properties of the provided event token.
    @type \Google\Cloud\RecaptchaEnterprise\V1\AccountVerificationInfo $account_verification
          Optional. Account verification information for identity verification. The
          assessment event must include a token and site key to use this feature.
    @type \Google\Cloud\RecaptchaEnterprise\V1\AccountDefenderAssessment $account_defender_assessment
          Output only. Assessment returned by account defender when an account
          identifier is provided.
    @type \Google\Cloud\RecaptchaEnterprise\V1\PrivatePasswordLeakVerification $private_password_leak_verification
          Optional. The private password leak verification field contains the
          parameters that are used to to check for leaks privately without sharing
          user credentials.
    @type \Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicyAssessment $firewall_policy_assessment
          Output only. Assessment returned when firewall policies belonging to the
          project are evaluated using the field firewall_policy_evaluation.
    @type \Google\Cloud\RecaptchaEnterprise\V1\FraudPreventionAssessment $fraud_prevention_assessment
          Output only. Assessment returned by Fraud Prevention when TransactionData
          is provided.
    @type \Google\Cloud\RecaptchaEnterprise\V1\FraudSignals $fraud_signals
          Output only. Fraud Signals specific to the users involved in a payment
          transaction.
    @type \Google\Cloud\RecaptchaEnterprise\V1\PhoneFraudAssessment $phone_fraud_assessment
          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.
    @type \Google\Cloud\RecaptchaEnterprise\V1\AssessmentEnvironment $assessment_environment
          Optional. The environment creating the assessment. This describes your
          environment (the system invoking CreateAssessment), NOT the environment of
          your user.
    
    }
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 clearAccountDefenderAssessment()
public clearAccountVerification()
public clearAssessmentEnvironment()
public clearEvent()
public clearFirewallPolicyAssessment()
public clearFraudPreventionAssessment()
public clearFraudSignals()
public clearPhoneFraudAssessment()
public clearPrivatePasswordLeakVerification()
public clearRiskAnalysis()
public clearTokenProperties()
public Google\Protobuf\Internal\Message::discardUnknownFields()
 

Clear all unknown fields previously parsed.

  • return null
public getAccountDefenderAssessment()
 

Output only. Assessment returned by account defender when an account identifier is provided.

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment account_defender_assessment = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

  • return \Google\Cloud\RecaptchaEnterprise\V1\AccountDefenderAssessment|null
public getAccountVerification()
 

Optional. Account verification information for identity verification. The assessment event must include a token and site key to use this feature.

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AccountVerificationInfo account_verification = 5 [(.google.api.field_behavior) = OPTIONAL];

  • return \Google\Cloud\RecaptchaEnterprise\V1\AccountVerificationInfo|null
public getAssessmentEnvironment()
 

Optional. The environment creating the assessment. This describes your environment (the system invoking CreateAssessment), NOT the environment of your user.

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AssessmentEnvironment assessment_environment = 14 [(.google.api.field_behavior) = OPTIONAL];

  • return \Google\Cloud\RecaptchaEnterprise\V1\AssessmentEnvironment|null
public getEvent()
 

Optional. The event being assessed.

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.Event event = 2 [(.google.api.field_behavior) = OPTIONAL];

  • return \Google\Cloud\RecaptchaEnterprise\V1\Event|null
public getFirewallPolicyAssessment()
 

Output only. Assessment returned when firewall policies belonging to the project are evaluated using the field firewall_policy_evaluation.

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FirewallPolicyAssessment firewall_policy_assessment = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

  • return \Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicyAssessment|null
public getFraudPreventionAssessment()
 

Output only. Assessment returned by Fraud Prevention when TransactionData is provided.

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment fraud_prevention_assessment = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

  • return \Google\Cloud\RecaptchaEnterprise\V1\FraudPreventionAssessment|null
public getFraudSignals()
 

Output only. Fraud Signals specific to the users involved in a payment transaction.

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudSignals fraud_signals = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];

  • return \Google\Cloud\RecaptchaEnterprise\V1\FraudSignals|null
public getName()
 

Output only. Identifier. The resource name for the Assessment in the format projects/{project}/assessments/{assessment}.

Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER];

  • return string
public getPhoneFraudAssessment()
 

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.

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.PhoneFraudAssessment phone_fraud_assessment = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

  • return \Google\Cloud\RecaptchaEnterprise\V1\PhoneFraudAssessment|null
public getPrivatePasswordLeakVerification()
 

Optional. The private password leak verification field contains the parameters that are used to to check for leaks privately without sharing user credentials.

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 8 [(.google.api.field_behavior) = OPTIONAL];

  • return \Google\Cloud\RecaptchaEnterprise\V1\PrivatePasswordLeakVerification|null
public getRiskAnalysis()
 

Output only. The risk analysis result for the event being assessed.

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.RiskAnalysis risk_analysis = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

  • return \Google\Cloud\RecaptchaEnterprise\V1\RiskAnalysis|null
public getTokenProperties()
 

Output only. Properties of the provided event token.

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TokenProperties token_properties = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

  • return \Google\Cloud\RecaptchaEnterprise\V1\TokenProperties|null
public hasAccountDefenderAssessment()
public hasAccountVerification()
public hasAssessmentEnvironment()
public hasEvent()
public hasFirewallPolicyAssessment()
public hasFraudPreventionAssessment()
public hasFraudSignals()
public hasPhoneFraudAssessment()
public hasPrivatePasswordLeakVerification()
public hasRiskAnalysis()
public hasTokenProperties()
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 setAccountDefenderAssessment( $var)
 

Output only. Assessment returned by account defender when an account identifier is provided.

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment account_defender_assessment = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

  • param \Google\Cloud\RecaptchaEnterprise\V1\AccountDefenderAssessment $var
  • return $this
public setAccountVerification( $var)
 

Optional. Account verification information for identity verification. The assessment event must include a token and site key to use this feature.

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AccountVerificationInfo account_verification = 5 [(.google.api.field_behavior) = OPTIONAL];

  • param \Google\Cloud\RecaptchaEnterprise\V1\AccountVerificationInfo $var
  • return $this
public setAssessmentEnvironment( $var)
 

Optional. The environment creating the assessment. This describes your environment (the system invoking CreateAssessment), NOT the environment of your user.

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AssessmentEnvironment assessment_environment = 14 [(.google.api.field_behavior) = OPTIONAL];

  • param \Google\Cloud\RecaptchaEnterprise\V1\AssessmentEnvironment $var
  • return $this
public setEvent( $var)
 

Optional. The event being assessed.

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.Event event = 2 [(.google.api.field_behavior) = OPTIONAL];

  • param \Google\Cloud\RecaptchaEnterprise\V1\Event $var
  • return $this
public setFirewallPolicyAssessment( $var)
 

Output only. Assessment returned when firewall policies belonging to the project are evaluated using the field firewall_policy_evaluation.

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FirewallPolicyAssessment firewall_policy_assessment = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

  • param \Google\Cloud\RecaptchaEnterprise\V1\FirewallPolicyAssessment $var
  • return $this
public setFraudPreventionAssessment( $var)
 

Output only. Assessment returned by Fraud Prevention when TransactionData is provided.

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment fraud_prevention_assessment = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

  • param \Google\Cloud\RecaptchaEnterprise\V1\FraudPreventionAssessment $var
  • return $this
public setFraudSignals( $var)
 

Output only. Fraud Signals specific to the users involved in a payment transaction.

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudSignals fraud_signals = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];

  • param \Google\Cloud\RecaptchaEnterprise\V1\FraudSignals $var
  • return $this
public setName( $var)
 

Output only. Identifier. The resource name for the Assessment in the format projects/{project}/assessments/{assessment}.

Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER];

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

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.

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.PhoneFraudAssessment phone_fraud_assessment = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

  • param \Google\Cloud\RecaptchaEnterprise\V1\PhoneFraudAssessment $var
  • return $this
public setPrivatePasswordLeakVerification( $var)
 

Optional. The private password leak verification field contains the parameters that are used to to check for leaks privately without sharing user credentials.

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 8 [(.google.api.field_behavior) = OPTIONAL];

  • param \Google\Cloud\RecaptchaEnterprise\V1\PrivatePasswordLeakVerification $var
  • return $this
public setRiskAnalysis( $var)
 

Output only. The risk analysis result for the event being assessed.

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.RiskAnalysis risk_analysis = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

  • param \Google\Cloud\RecaptchaEnterprise\V1\RiskAnalysis $var
  • return $this
public setTokenProperties( $var)
 

Output only. Properties of the provided event token.

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TokenProperties token_properties = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

  • param \Google\Cloud\RecaptchaEnterprise\V1\TokenProperties $var
  • return $this
Properties
protected $account_defender_assessment = NULL
 

Output only. Assessment returned by account defender when an account identifier is provided.

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AccountDefenderAssessment account_defender_assessment = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

protected $account_verification = NULL
 

Optional. Account verification information for identity verification. The assessment event must include a token and site key to use this feature.

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AccountVerificationInfo account_verification = 5 [(.google.api.field_behavior) = OPTIONAL];

protected $assessment_environment = NULL
 

Optional. The environment creating the assessment. This describes your environment (the system invoking CreateAssessment), NOT the environment of your user.

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.AssessmentEnvironment assessment_environment = 14 [(.google.api.field_behavior) = OPTIONAL];

protected $event = NULL
 

Optional. The event being assessed.

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.Event event = 2 [(.google.api.field_behavior) = OPTIONAL];

protected $firewall_policy_assessment = NULL
 

Output only. Assessment returned when firewall policies belonging to the project are evaluated using the field firewall_policy_evaluation.

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FirewallPolicyAssessment firewall_policy_assessment = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

protected $fraud_prevention_assessment = NULL
 

Output only. Assessment returned by Fraud Prevention when TransactionData is provided.

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudPreventionAssessment fraud_prevention_assessment = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

protected $fraud_signals = NULL
 

Output only. Fraud Signals specific to the users involved in a payment transaction.

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.FraudSignals fraud_signals = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];

protected $name = ''
 

Output only. Identifier. The resource name for the Assessment in the format projects/{project}/assessments/{assessment}.

Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER];

protected $phone_fraud_assessment = NULL
 

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.

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.PhoneFraudAssessment phone_fraud_assessment = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

protected $private_password_leak_verification = NULL
 

Optional. The private password leak verification field contains the parameters that are used to to check for leaks privately without sharing user credentials.

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.PrivatePasswordLeakVerification private_password_leak_verification = 8 [(.google.api.field_behavior) = OPTIONAL];

protected $risk_analysis = NULL
 

Output only. The risk analysis result for the event being assessed.

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.RiskAnalysis risk_analysis = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

protected $token_properties = NULL
 

Output only. Properties of the provided event token.

Generated from protobuf field .google.cloud.recaptchaenterprise.v1.TokenProperties token_properties = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

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)
© 2026 Bruce Wells
Search Namespaces \ Classes
Configuration