# Cloud AutoML V1 Client - Class Document (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 Document.

A structured text document e.g. a PDF.

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

## Namespace

Google \\ Cloud \\ AutoMl \\ 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-automl/latest/V1.DocumentInputConfig` An input config specifying the content of the document. |
| `↳ document_text` | `https://docs.cloud.google.com/php/docs/reference/cloud-automl/latest/V1.TextSnippet` The plain text version of this document. |
| `↳ layout` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-automl/latest/V1.Document.Layout>` Describes the layout of the document. Sorted by page_number. |
| `↳ document_dimensions` | `https://docs.cloud.google.com/php/docs/reference/cloud-automl/latest/V1.DocumentDimensions` The dimensions of the page in the document. |
| `↳ page_count` | `int` Number of pages in the document. |

### getInputConfig

An input config specifying the content of the document.

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

### hasInputConfig

### clearInputConfig

### setInputConfig

An input config specifying the content of the document.

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

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

### getDocumentText

The plain text version of this document.

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

### hasDocumentText

### clearDocumentText

### setDocumentText

The plain text version of this document.

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

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

### getLayout

Describes the layout of the document.

Sorted by page_number.

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

### setLayout

Describes the layout of the document.

Sorted by page_number.

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

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

### getDocumentDimensions

The dimensions of the page in the document.

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

### hasDocumentDimensions

### clearDocumentDimensions

### setDocumentDimensions

The dimensions of the page in the document.

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

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

### getPageCount

Number of pages in the document.

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

### setPageCount

Number of pages in the document.

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

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