# Google Cloud Document Ai V1 Client - Class Layout (2.7.0)

2.7.0 (latest) 2.6.1 2.5.1 2.4.1 2.3.0 2.2.2 2.1.3 2.0.0 1.14.0 1.13.1 1.12.2 1.9.0 1.8.2 1.7.0 1.6.0 1.5.0 1.4.0 1.3.0 1.2.2 1.1.1 1.0.1 Reference documentation and code samples for the Google Cloud Document Ai V1 Client class Layout.

Visual element describing a layout unit on a page.

Generated from protobuf message `google.cloud.documentai.v1.Document.Page.Layout`

## Namespace

Google \\ Cloud \\ DocumentAI \\ V1 \\ Document \\ Page

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ text_anchor` | `https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.TextAnchor` Text anchor indexing into the [Document.text](https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document#_Google_Cloud_DocumentAI_V1_Document__getText__). |
| `↳ confidence` | `float` Confidence of the current [Layout](https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.Layout) within context of the object this layout is for. For example, confidence can be for a single token, a table, a visual element, etc. depending on context. Range `[0, 1]`. |
| `↳ bounding_poly` | `https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.BoundingPoly` The bounding polygon for the [Layout](https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.Layout). |
| `↳ orientation` | `int` Detected orientation for the [Layout](https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.Layout). |

### getTextAnchor

Text anchor indexing into the
[Document.text](https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document#_Google_Cloud_DocumentAI_V1_Document__getText__).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.TextAnchor|null` |   |

### hasTextAnchor

### clearTextAnchor

### setTextAnchor

Text anchor indexing into the
[Document.text](https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document#_Google_Cloud_DocumentAI_V1_Document__getText__).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.TextAnchor` |

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

### getConfidence

Confidence of the current
[Layout](https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.Layout) within
context of the object this layout is for. For example, confidence can
be for a single token, a table, a visual element, etc. depending on
context. Range `[0, 1]`.

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

### setConfidence

Confidence of the current
[Layout](https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.Layout) within
context of the object this layout is for. For example, confidence can
be for a single token, a table, a visual element, etc. depending on
context. Range `[0, 1]`.

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

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

### getBoundingPoly

The bounding polygon for the
[Layout](https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.Layout).

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

### hasBoundingPoly

### clearBoundingPoly

### setBoundingPoly

The bounding polygon for the
[Layout](https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.Layout).

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

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

### getOrientation

Detected orientation for the
[Layout](https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.Layout).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [Orientation](https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.Layout.Orientation). |

### setOrientation

Detected orientation for the
[Layout](https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.Layout).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Orientation](https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.Page.Layout.Orientation). |

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