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

Message that describes dimension of a document.

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

## Namespace

Google \\ Cloud \\ AutoMl \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ unit` | `int` Unit of the dimension. |
| `↳ width` | `float` Width value of the document, works together with the unit. |
| `↳ height` | `float` Height value of the document, works together with the unit. |

### getUnit

Unit of the dimension.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [DocumentDimensionUnit](https://docs.cloud.google.com/php/docs/reference/cloud-automl/latest/V1.DocumentDimensions.DocumentDimensionUnit). |

### setUnit

Unit of the dimension.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [DocumentDimensionUnit](https://docs.cloud.google.com/php/docs/reference/cloud-automl/latest/V1.DocumentDimensions.DocumentDimensionUnit). |

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

### getWidth

Width value of the document, works together with the unit.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `float` |   |

### setWidth

Width value of the document, works together with the unit.

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

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

### getHeight

Height value of the document, works together with the unit.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `float` |   |

### setHeight

Height value of the document, works together with the unit.

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

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