# Google Cloud Vision Ai V1 Client - Class Annotation (0.3.0)

0.3.0 (latest) 0.2.0 0.1.0 Reference documentation and code samples for the Google Cloud Vision Ai V1 Client class Annotation.

An annotation is a resource in asset. It represents a key-value mapping of
content in asset.

Generated from protobuf message `google.cloud.visionai.v1.Annotation`

## Namespace

Google \\ Cloud \\ VisionAI \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Resource name of the annotation. Format: `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}` |
| `↳ user_specified_annotation` | `https://docs.cloud.google.com/php/docs/reference/cloud-visionai/latest/V1.UserSpecifiedAnnotation` User provided annotation. |

### getName

Resource name of the annotation.

Format:
`projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}`

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

### setName

Resource name of the annotation.

Format:
`projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}`

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

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

### getUserSpecifiedAnnotation

User provided annotation.

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

### hasUserSpecifiedAnnotation

### clearUserSpecifiedAnnotation

### setUserSpecifiedAnnotation

User provided annotation.

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

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