# Google Cloud Recaptcha Enterprise V1 Client - Class AnnotateAssessmentRequest (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 AnnotateAssessmentRequest.

The request message to annotate an Assessment.

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

## Namespace

Google \\ Cloud \\ RecaptchaEnterprise \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Required. The resource name of the Assessment, in the format `projects/{project}/assessments/{assessment}`. |
| `↳ annotation` | `int` Optional. The annotation that is 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. |
| `↳ reasons` | `int[]` Optional. Reasons for the annotation that are assigned to the event. |
| `↳ account_id` | `string` 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. |
| `↳ hashed_account_id` | `string` 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. |
| `↳ transaction_event` | `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.TransactionEvent` Optional. If the assessment is part of a payment transaction, provide details on payment lifecycle events that occur in the transaction. |
| `↳ phone_authentication_event` | `https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.PhoneAuthenticationEvent` Optional. If using an external multi-factor authentication provider, provide phone authentication details for fraud detection purposes. |

### getName

Required. The resource name of the Assessment, in the format
`projects/{project}/assessments/{assessment}`.

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

### setName

Required. The resource name of the Assessment, in the format
`projects/{project}/assessments/{assessment}`.

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

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

### getAnnotation

Optional. The annotation that is 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.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [Annotation](https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.AnnotateAssessmentRequest.Annotation). |

### setAnnotation

Optional. The annotation that is 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.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Annotation](https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.AnnotateAssessmentRequest.Annotation). |

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

### getReasons

Optional. Reasons for the annotation that are assigned to the event.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<int>` |   |

### setReasons

Optional. Reasons for the annotation that are assigned to the event.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int[]` |

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

### getAccountId

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.

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

### setAccountId

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.

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

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

### getHashedAccountId

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.

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

### setHashedAccountId

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.

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

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

### getTransactionEvent

Optional. If the assessment is part of a payment transaction, provide
details on payment lifecycle events that occur in the transaction.

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

### hasTransactionEvent

### clearTransactionEvent

### setTransactionEvent

Optional. If the assessment is part of a payment transaction, provide
details on payment lifecycle events that occur in the transaction.

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

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

### getPhoneAuthenticationEvent

Optional. If using an external multi-factor authentication provider,
provide phone authentication details for fraud detection purposes.

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

### hasPhoneAuthenticationEvent

### clearPhoneAuthenticationEvent

### setPhoneAuthenticationEvent

Optional. If using an external multi-factor authentication provider,
provide phone authentication details for fraud detection purposes.

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

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

### static::build

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `string` Required. The resource name of the Assessment, in the format `projects/{project}/assessments/{assessment}`. Please see RecaptchaEnterpriseServiceClient::assessmentName() for help formatting this field. |
| `annotation` | `int` Optional. The annotation that is 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. For allowed values, use constants defined on [AnnotateAssessmentRequest\\Annotation](https://docs.cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest/V1.AnnotateAssessmentRequest.Annotation) |

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