# Google Cloud Recaptcha Enterprise V1 Client - Class Assessment (2.3.1)

2.3.1 (latest) 2.3.0 2.2.1 2.1.3 2.0.1 1.17.2 1.16.1 1.15.0 1.14.0 1.13.0 1.12.2 1.8.0 1.7.0 1.6.0 1.5.2 1.4.2 1.3.2 1.2.6 Reference documentation and code samples for the Google Cloud Recaptcha Enterprise V1 Client class Assessment.

A reCAPTCHA Enterprise assessment resource.

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

## Namespace

Google \\ Cloud \\ RecaptchaEnterprise \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Output only. Identifier. The resource name for the Assessment in the format `projects/{project}/assessments/{assessment}`. |
| `↳ event` | `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.Event` Optional. The event being assessed. |
| `↳ risk_analysis` | `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.RiskAnalysis` Output only. The risk analysis result for the event being assessed. |
| `↳ token_properties` | `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.TokenProperties` Output only. Properties of the provided event token. |
| `↳ account_verification` | `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.AccountVerificationInfo` Optional. Account verification information for identity verification. The assessment event must include a token and site key to use this feature. |
| `↳ account_defender_assessment` | `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.AccountDefenderAssessment` Output only. Assessment returned by account defender when an account identifier is provided. |
| `↳ private_password_leak_verification` | `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.PrivatePasswordLeakVerification` Optional. The private password leak verification field contains the parameters that are used to to check for leaks privately without sharing user credentials. |
| `↳ firewall_policy_assessment` | `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.FirewallPolicyAssessment` Output only. Assessment returned when firewall policies belonging to the project are evaluated using the field firewall_policy_evaluation. |
| `↳ fraud_prevention_assessment` | `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.FraudPreventionAssessment` Output only. Assessment returned by Fraud Prevention when TransactionData is provided. |
| `↳ fraud_signals` | `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.FraudSignals` Output only. Fraud Signals specific to the users involved in a payment transaction. |
| `↳ phone_fraud_assessment` | `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.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. |
| `↳ assessment_environment` | `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.AssessmentEnvironment` Optional. The environment creating the assessment. This describes your environment (the system invoking CreateAssessment), NOT the environment of your user. |

### getName

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setName

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getEvent

Optional. The event being assessed.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.Event|null` |   |

### hasEvent

### clearEvent

### setEvent

Optional. The event being assessed.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.Event` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getRiskAnalysis

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.RiskAnalysis|null` |   |

### hasRiskAnalysis

### clearRiskAnalysis

### setRiskAnalysis

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.RiskAnalysis` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getTokenProperties

Output only. Properties of the provided event token.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.TokenProperties|null` |   |

### hasTokenProperties

### clearTokenProperties

### setTokenProperties

Output only. Properties of the provided event token.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.TokenProperties` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getAccountVerification

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.AccountVerificationInfo|null` |   |

### hasAccountVerification

### clearAccountVerification

### setAccountVerification

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.AccountVerificationInfo` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getAccountDefenderAssessment

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.AccountDefenderAssessment|null` |   |

### hasAccountDefenderAssessment

### clearAccountDefenderAssessment

### setAccountDefenderAssessment

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.AccountDefenderAssessment` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getPrivatePasswordLeakVerification

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.PrivatePasswordLeakVerification|null` |   |

### hasPrivatePasswordLeakVerification

### clearPrivatePasswordLeakVerification

### setPrivatePasswordLeakVerification

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.PrivatePasswordLeakVerification` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getFirewallPolicyAssessment

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.FirewallPolicyAssessment|null` |   |

### hasFirewallPolicyAssessment

### clearFirewallPolicyAssessment

### setFirewallPolicyAssessment

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.FirewallPolicyAssessment` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getFraudPreventionAssessment

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.FraudPreventionAssessment|null` |   |

### hasFraudPreventionAssessment

### clearFraudPreventionAssessment

### setFraudPreventionAssessment

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.FraudPreventionAssessment` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getFraudSignals

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.FraudSignals|null` |   |

### hasFraudSignals

### clearFraudSignals

### setFraudSignals

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.FraudSignals` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### 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.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.PhoneFraudAssessment|null` |   |

### hasPhoneFraudAssessment

### clearPhoneFraudAssessment

### setPhoneFraudAssessment

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.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.PhoneFraudAssessment` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getAssessmentEnvironment

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.AssessmentEnvironment|null` |   |

### hasAssessmentEnvironment

### clearAssessmentEnvironment

### setAssessmentEnvironment

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.AssessmentEnvironment` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |