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

Represents a block. A block could be one of the various types (text,
table, list) supported.

Generated from protobuf message `google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock`

## Namespace

Google \\ Cloud \\ DocumentAI \\ V1 \\ Document \\ DocumentLayout

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ text_block` | `https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTextBlock` Block consisting of text content. |
| `↳ table_block` | `https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.DocumentLayout.DocumentLayoutBlock.LayoutTableBlock` Block consisting of table content/structure. |
| `↳ list_block` | `https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.DocumentLayout.DocumentLayoutBlock.LayoutListBlock` Block consisting of list content/structure. |
| `↳ image_block` | `https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock` Block consisting of image content. |
| `↳ block_id` | `string` ID of the block. |
| `↳ page_span` | `https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.Document.DocumentLayout.DocumentLayoutBlock.LayoutPageSpan` Page span of the block. |
| `↳ bounding_box` | `https://docs.cloud.google.com/php/docs/reference/cloud-document-ai/latest/V1.BoundingPoly` Identifies the bounding box for the block. |

### getTextBlock

Block consisting of text content.

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

### hasTextBlock

### setTextBlock

Block consisting of text content.

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

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

### getTableBlock

Block consisting of table content/structure.

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

### hasTableBlock

### setTableBlock

Block consisting of table content/structure.

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

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

### getListBlock

Block consisting of list content/structure.

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

### hasListBlock

### setListBlock

Block consisting of list content/structure.

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

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

### getImageBlock

Block consisting of image content.

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

### hasImageBlock

### setImageBlock

Block consisting of image content.

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

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

### getBlockId

ID of the block.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setBlockId

ID of the block.

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

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

### getPageSpan

Page span of the block.

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

### hasPageSpan

### clearPageSpan

### setPageSpan

Page span of the block.

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

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

### getBoundingBox

Identifies the bounding box for the block.

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

### hasBoundingBox

### clearBoundingBox

### setBoundingBox

Identifies the bounding box for the block.

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

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

### getBlock

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |