0.9.0 (latest) 0.8.3 0.7.2 0.6.3 0.5.7 0.4.2 0.3.1 0.2.0 0.1.14

> [!WARNING]
> **Beta**
>
>
> This library is covered by the [Pre-GA Offerings Terms](https://docs.cloud.google.com/terms/service-terms#1)
> of the Terms of Service. Pre-GA libraries might have limited support,
> and changes to pre-GA libraries might not be compatible with other pre-GA versions.
> For more information, see the
> [launch stage descriptions](https://docs.cloud.google.com/products#product-launch-stages).

Reference documentation and code samples for the Google Cloud Datalabeling V1beta1 Client class Annotation.

Annotation for Example. Each example may have one or more annotations. For
example in image classification problem, each image might have one or more
labels. We call labels binded with this image an Annotation.

Generated from protobuf message `google.cloud.datalabeling.v1beta1.Annotation`

## Namespace

Google \\ Cloud \\ DataLabeling \\ V1beta1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Output only. Unique name of this annotation, format is: projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/{annotated_dataset}/examples/{example_id}/annotations/{annotation_id} |
| `↳ annotation_source` | `int` Output only. The source of the annotation. |
| `↳ annotation_value` | `https://docs.cloud.google.com/php/docs/reference/cloud-datalabeling/latest/V1beta1.AnnotationValue` Output only. This is the actual annotation value, e.g classification, bounding box values are stored here. |
| `↳ annotation_metadata` | `https://docs.cloud.google.com/php/docs/reference/cloud-datalabeling/latest/V1beta1.AnnotationMetadata` Output only. Annotation metadata, including information like votes for labels. |
| `↳ annotation_sentiment` | `int` Output only. Sentiment for this annotation. |

### getName

Output only. Unique name of this annotation, format is:
projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/{annotated_dataset}/examples/{example_id}/annotations/{annotation_id}

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

### setName

Output only. Unique name of this annotation, format is:
projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/{annotated_dataset}/examples/{example_id}/annotations/{annotation_id}

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

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

### getAnnotationSource

Output only. The source of the annotation.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [AnnotationSource](https://docs.cloud.google.com/php/docs/reference/cloud-datalabeling/latest/V1beta1.AnnotationSource). |

### setAnnotationSource

Output only. The source of the annotation.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [AnnotationSource](https://docs.cloud.google.com/php/docs/reference/cloud-datalabeling/latest/V1beta1.AnnotationSource). |

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

### getAnnotationValue

Output only. This is the actual annotation value, e.g classification,
bounding box values are stored here.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-datalabeling/latest/V1beta1.AnnotationValue|null` |   |

### hasAnnotationValue

### clearAnnotationValue

### setAnnotationValue

Output only. This is the actual annotation value, e.g classification,
bounding box values are stored here.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-datalabeling/latest/V1beta1.AnnotationValue` |

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

### getAnnotationMetadata

Output only. Annotation metadata, including information like votes
for labels.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-datalabeling/latest/V1beta1.AnnotationMetadata|null` |   |

### hasAnnotationMetadata

### clearAnnotationMetadata

### setAnnotationMetadata

Output only. Annotation metadata, including information like votes
for labels.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-datalabeling/latest/V1beta1.AnnotationMetadata` |

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

### getAnnotationSentiment

Output only. Sentiment for this annotation.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [AnnotationSentiment](https://docs.cloud.google.com/php/docs/reference/cloud-datalabeling/latest/V1beta1.AnnotationSentiment). |

### setAnnotationSentiment

Output only. Sentiment for this annotation.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [AnnotationSentiment](https://docs.cloud.google.com/php/docs/reference/cloud-datalabeling/latest/V1beta1.AnnotationSentiment). |

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