# Cloud AutoML V1 Client - Class AnnotationPayload (2.1.3)

2.1.3 (latest) 2.1.2 2.0.5 1.6.5 1.5.4 1.4.17 Reference documentation and code samples for the Cloud AutoML V1 Client class AnnotationPayload.

Contains annotation information that is relevant to AutoML.

Generated from protobuf message `google.cloud.automl.v1.AnnotationPayload`

## Namespace

Google \\ Cloud \\ AutoMl \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ translation` | `https://docs.cloud.google.com/php/docs/reference/cloud-automl/latest/V1.TranslationAnnotation` Annotation details for translation. |
| `↳ classification` | `https://docs.cloud.google.com/php/docs/reference/cloud-automl/latest/V1.ClassificationAnnotation` Annotation details for content or image classification. |
| `↳ image_object_detection` | `https://docs.cloud.google.com/php/docs/reference/cloud-automl/latest/V1.ImageObjectDetectionAnnotation` Annotation details for image object detection. |
| `↳ text_extraction` | `https://docs.cloud.google.com/php/docs/reference/cloud-automl/latest/V1.TextExtractionAnnotation` Annotation details for text extraction. |
| `↳ text_sentiment` | `https://docs.cloud.google.com/php/docs/reference/cloud-automl/latest/V1.TextSentimentAnnotation` Annotation details for text sentiment. |
| `↳ annotation_spec_id` | `string` Output only . The resource ID of the annotation spec that this annotation pertains to. The annotation spec comes from either an ancestor dataset, or the dataset that was used to train the model in use. |
| `↳ display_name` | `string` Output only. The value of [display_name](https://docs.cloud.google.com/php/docs/reference/cloud-automl/latest/V1.AnnotationSpec#_Google_Cloud_AutoMl_V1_AnnotationSpec__getDisplayName__) when the model was trained. Because this field returns a value at model training time, for different models trained using the same dataset, the returned value could be different as model owner could update the `display_name` between any two model training. |

### getTranslation

Annotation details for translation.

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

### hasTranslation

### setTranslation

Annotation details for translation.

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

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

### getClassification

Annotation details for content or image classification.

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

### hasClassification

### setClassification

Annotation details for content or image classification.

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

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

### getImageObjectDetection

Annotation details for image object detection.

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

### hasImageObjectDetection

### setImageObjectDetection

Annotation details for image object detection.

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

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

### getTextExtraction

Annotation details for text extraction.

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

### hasTextExtraction

### setTextExtraction

Annotation details for text extraction.

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

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

### getTextSentiment

Annotation details for text sentiment.

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

### hasTextSentiment

### setTextSentiment

Annotation details for text sentiment.

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

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

### getAnnotationSpecId

Output only . The resource ID of the annotation spec that
this annotation pertains to. The annotation spec comes from either an
ancestor dataset, or the dataset that was used to train the model in use.

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

### setAnnotationSpecId

Output only . The resource ID of the annotation spec that
this annotation pertains to. The annotation spec comes from either an
ancestor dataset, or the dataset that was used to train the model in use.

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

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

### getDisplayName

Output only. The value of
[display_name](https://docs.cloud.google.com/php/docs/reference/cloud-automl/latest/V1.AnnotationSpec#_Google_Cloud_AutoMl_V1_AnnotationSpec__getDisplayName__)
when the model was trained. Because this field returns a value at model
training time, for different models trained using the same dataset, the
returned value could be different as model owner could update the
`display_name` between any two model training.

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

### setDisplayName

Output only. The value of
[display_name](https://docs.cloud.google.com/php/docs/reference/cloud-automl/latest/V1.AnnotationSpec#_Google_Cloud_AutoMl_V1_AnnotationSpec__getDisplayName__)
when the model was trained. Because this field returns a value at model
training time, for different models trained using the same dataset, the
returned value could be different as model owner could update the
`display_name` between any two model training.

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

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

### getDetail

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