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

A representation of a text snippet.

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

## Namespace

Google \\ Cloud \\ AutoMl \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ content` | `string` Required. The content of the text snippet as a string. Up to 250000 characters long. |
| `↳ mime_type` | `string` Optional. The format of [content](https://docs.cloud.google.com/php/docs/reference/cloud-automl/latest/V1.TextSnippet#_Google_Cloud_AutoMl_V1_TextSnippet__getContent__). Currently the only two allowed values are "text/html" and "text/plain". If left blank, the format is automatically determined from the type of the uploaded [content](https://docs.cloud.google.com/php/docs/reference/cloud-automl/latest/V1.TextSnippet#_Google_Cloud_AutoMl_V1_TextSnippet__getContent__). |
| `↳ content_uri` | `string` Output only. HTTP URI where you can download the content. |

### getContent

Required. The content of the text snippet as a string. Up to 250000
characters long.

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

### setContent

Required. The content of the text snippet as a string. Up to 250000
characters long.

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

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

### getMimeType

Optional. The format of [content](https://docs.cloud.google.com/php/docs/reference/cloud-automl/latest/V1.TextSnippet#_Google_Cloud_AutoMl_V1_TextSnippet__getContent__). Currently the only two allowed
values are "text/html" and "text/plain". If left blank, the format is
automatically determined from the type of the uploaded [content](https://docs.cloud.google.com/php/docs/reference/cloud-automl/latest/V1.TextSnippet#_Google_Cloud_AutoMl_V1_TextSnippet__getContent__).

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

### setMimeType

Optional. The format of [content](https://docs.cloud.google.com/php/docs/reference/cloud-automl/latest/V1.TextSnippet#_Google_Cloud_AutoMl_V1_TextSnippet__getContent__). Currently the only two allowed
values are "text/html" and "text/plain". If left blank, the format is
automatically determined from the type of the uploaded [content](https://docs.cloud.google.com/php/docs/reference/cloud-automl/latest/V1.TextSnippet#_Google_Cloud_AutoMl_V1_TextSnippet__getContent__).

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

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

### getContentUri

Output only. HTTP URI where you can download the content.

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

### setContentUri

Output only. HTTP URI where you can download the content.

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

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