# Cloud Vision V1 Client - Class AnnotateImageResponse (2.2.1)

2.2.1 (latest) 2.2.0 2.1.3 2.0.3 1.10.3 1.9.4 1.8.0 1.7.6 1.6.8 Reference documentation and code samples for the Cloud Vision V1 Client class AnnotateImageResponse.

Response to an image annotation request.

Generated from protobuf message `google.cloud.vision.v1.AnnotateImageResponse`

## Namespace

Google \\ Cloud \\ Vision \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ face_annotations` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-vision/latest/V1.FaceAnnotation>` If present, face detection has completed successfully. |
| `↳ landmark_annotations` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-vision/latest/V1.EntityAnnotation>` If present, landmark detection has completed successfully. |
| `↳ logo_annotations` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-vision/latest/V1.EntityAnnotation>` If present, logo detection has completed successfully. |
| `↳ label_annotations` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-vision/latest/V1.EntityAnnotation>` If present, label detection has completed successfully. |
| `↳ localized_object_annotations` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-vision/latest/V1.LocalizedObjectAnnotation>` If present, localized object detection has completed successfully. This will be sorted descending by confidence score. |
| `↳ text_annotations` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-vision/latest/V1.EntityAnnotation>` If present, text (OCR) detection has completed successfully. |
| `↳ full_text_annotation` | `https://docs.cloud.google.com/php/docs/reference/cloud-vision/latest/V1.TextAnnotation` If present, text (OCR) detection or document (OCR) text detection has completed successfully. This annotation provides the structural hierarchy for the OCR detected text. |
| `↳ safe_search_annotation` | `https://docs.cloud.google.com/php/docs/reference/cloud-vision/latest/V1.SafeSearchAnnotation` If present, safe-search annotation has completed successfully. |
| `↳ image_properties_annotation` | `https://docs.cloud.google.com/php/docs/reference/cloud-vision/latest/V1.ImageProperties` If present, image properties were extracted successfully. |
| `↳ crop_hints_annotation` | `https://docs.cloud.google.com/php/docs/reference/cloud-vision/latest/V1.CropHintsAnnotation` If present, crop hints have completed successfully. |
| `↳ web_detection` | `https://docs.cloud.google.com/php/docs/reference/cloud-vision/latest/V1.WebDetection` If present, web detection has completed successfully. |
| `↳ product_search_results` | `https://docs.cloud.google.com/php/docs/reference/cloud-vision/latest/V1.ProductSearchResults` If present, product search has completed successfully. |
| `↳ error` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html` If set, represents the error message for the operation. Note that filled-in image annotations are guaranteed to be correct, even when `error` is set. |
| `↳ context` | `https://docs.cloud.google.com/php/docs/reference/cloud-vision/latest/V1.ImageAnnotationContext` If present, contextual information is needed to understand where this image comes from. |

### getFaceAnnotations

If present, face detection has completed successfully.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-vision/latest/V1.FaceAnnotation>` |   |

### setFaceAnnotations

If present, face detection has completed successfully.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-vision/latest/V1.FaceAnnotation>` |

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

### getLandmarkAnnotations

If present, landmark detection has completed successfully.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-vision/latest/V1.EntityAnnotation>` |   |

### setLandmarkAnnotations

If present, landmark detection has completed successfully.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-vision/latest/V1.EntityAnnotation>` |

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

### getLogoAnnotations

If present, logo detection has completed successfully.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-vision/latest/V1.EntityAnnotation>` |   |

### setLogoAnnotations

If present, logo detection has completed successfully.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-vision/latest/V1.EntityAnnotation>` |

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

### getLabelAnnotations

If present, label detection has completed successfully.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-vision/latest/V1.EntityAnnotation>` |   |

### setLabelAnnotations

If present, label detection has completed successfully.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-vision/latest/V1.EntityAnnotation>` |

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

### getLocalizedObjectAnnotations

If present, localized object detection has completed successfully.

This will be sorted descending by confidence score.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-vision/latest/V1.LocalizedObjectAnnotation>` |   |

### setLocalizedObjectAnnotations

If present, localized object detection has completed successfully.

This will be sorted descending by confidence score.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-vision/latest/V1.LocalizedObjectAnnotation>` |

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

### getTextAnnotations

If present, text (OCR) detection has completed successfully.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-vision/latest/V1.EntityAnnotation>` |   |

### setTextAnnotations

If present, text (OCR) detection has completed successfully.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-vision/latest/V1.EntityAnnotation>` |

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

### getFullTextAnnotation

If present, text (OCR) detection or document (OCR) text detection has
completed successfully.

This annotation provides the structural hierarchy for the OCR detected
text.

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

### hasFullTextAnnotation

### clearFullTextAnnotation

### setFullTextAnnotation

If present, text (OCR) detection or document (OCR) text detection has
completed successfully.

This annotation provides the structural hierarchy for the OCR detected
text.

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

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

### getSafeSearchAnnotation

If present, safe-search annotation has completed successfully.

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

### hasSafeSearchAnnotation

### clearSafeSearchAnnotation

### setSafeSearchAnnotation

If present, safe-search annotation has completed successfully.

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

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

### getImagePropertiesAnnotation

If present, image properties were extracted successfully.

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

### hasImagePropertiesAnnotation

### clearImagePropertiesAnnotation

### setImagePropertiesAnnotation

If present, image properties were extracted successfully.

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

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

### getCropHintsAnnotation

If present, crop hints have completed successfully.

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

### hasCropHintsAnnotation

### clearCropHintsAnnotation

### setCropHintsAnnotation

If present, crop hints have completed successfully.

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

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

### getWebDetection

If present, web detection has completed successfully.

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

### hasWebDetection

### clearWebDetection

### setWebDetection

If present, web detection has completed successfully.

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

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

### getProductSearchResults

If present, product search has completed successfully.

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

### hasProductSearchResults

### clearProductSearchResults

### setProductSearchResults

If present, product search has completed successfully.

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

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

### getError

If set, represents the error message for the operation.

Note that filled-in image annotations are guaranteed to be
correct, even when `error` is set.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html|null` |   |

### hasError

### clearError

### setError

If set, represents the error message for the operation.

Note that filled-in image annotations are guaranteed to be
correct, even when `error` is set.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html` |

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

### getContext

If present, contextual information is needed to understand where this image
comes from.

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

### hasContext

### clearContext

### setContext

If present, contextual information is needed to understand where this image
comes from.

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

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