# Cloud Vision V1 Client - Class AnnotateFileResponse (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 AnnotateFileResponse.

Response to a single file annotation request. A file may contain one or more
images, which individually have their own responses.

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

## Namespace

Google \\ Cloud \\ Vision \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ input_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-vision/latest/V1.InputConfig` Information about the file for which this response is generated. |
| `↳ responses` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-vision/latest/V1.AnnotateImageResponse>` Individual responses to images found within the file. This field will be empty if the `error` field is set. |
| `↳ total_pages` | `int` This field gives the total number of pages in the file. |
| `↳ error` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html` If set, represents the error message for the failed request. The `responses` field will not be set in this case. |

### getInputConfig

Information about the file for which this response is generated.

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

### hasInputConfig

### clearInputConfig

### setInputConfig

Information about the file for which this response is generated.

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

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

### getResponses

Individual responses to images found within the file. This field will be
empty if the `error` field is set.

| **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.AnnotateImageResponse>` |   |

### setResponses

Individual responses to images found within the file. This field will be
empty if the `error` field is set.

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

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

### getTotalPages

This field gives the total number of pages in the file.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setTotalPages

This field gives the total number of pages in the file.

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

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

### getError

If set, represents the error message for the failed request. The
`responses` field will not be set in this case.

| **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 failed request. The
`responses` field will not be set in this case.

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

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