# Google Cloud Dialogflow V2 Client - Class ImportDocumentTemplate (2.4.0)

2.4.0 (latest) 2.3.1 2.2.1 2.1.2 2.0.1 1.17.2 1.16.0 1.15.1 1.14.0 1.13.0 1.12.3 1.11.0 1.10.2 1.9.0 1.8.0 1.7.2 1.6.0 1.5.0 1.4.0 1.3.2 1.2.0 1.1.1 1.0.1 Reference documentation and code samples for the Google Cloud Dialogflow V2 Client class ImportDocumentTemplate.

The template used for importing documents.

Generated from protobuf message `google.cloud.dialogflow.v2.ImportDocumentTemplate`

## Namespace

Google \\ Cloud \\ Dialogflow \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ mime_type` | `string` Required. The MIME type of the document. |
| `↳ knowledge_types` | `int[]` Required. The knowledge type of document content. |
| `↳ metadata` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Metadata for the document. The metadata supports arbitrary key-value pairs. Suggested use cases include storing a document's title, an external URL distinct from the document's content_uri, etc. The max size of a `key` or a `value` of the metadata is 1024 bytes. |

### getMimeType

Required. The MIME type of the document.

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

### setMimeType

Required. The MIME type of the document.

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

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

### getKnowledgeTypes

Required. The knowledge type of document content.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<int>` |   |

### setKnowledgeTypes

Required. The knowledge type of document content.

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

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

### getMetadata

Metadata for the document. The metadata supports arbitrary
key-value pairs. Suggested use cases include storing a document's title,
an external URL distinct from the document's content_uri, etc.

The max size of a `key` or a `value` of the metadata is 1024 bytes.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |   |

### setMetadata

Metadata for the document. The metadata supports arbitrary
key-value pairs. Suggested use cases include storing a document's title,
an external URL distinct from the document's content_uri, etc.

The max size of a `key` or a `value` of the metadata is 1024 bytes.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |

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