# Google Developers Knowledge V1 Client - Class Document (0.1.0)

Reference documentation and code samples for the Google Developers Knowledge V1 Client class Document.

A Document represents a piece of content from the Developer Knowledge corpus.

Generated from protobuf message `google.developers.knowledge.v1.Document`

## Namespace

Google \\ Developers \\ Knowledge \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Identifier. Contains the resource name of the document. Format: `documents/{uri_without_scheme}` Example: `documents/docs.cloud.google.com/storage/docs/creating-buckets` |
| `↳ uri` | `string` Output only. Provides the URI of the content, such as `docs.cloud.google.com/storage/docs/creating-buckets`. |
| `↳ content` | `string` Output only. Contains the full content of the document in Markdown format. |
| `↳ description` | `string` Output only. Provides a description of the document. |
| `↳ data_source` | `string` Output only. Specifies the data source of the document. Example data source: `firebase.google.com` |
| `↳ title` | `string` Output only. Provides the title of the document. |
| `↳ update_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. Represents the timestamp when the content or metadata of the document was last updated. |
| `↳ view` | `int` Output only. Specifies the [DocumentView](https://docs.cloud.google.com/php/docs/reference/developers-knowledge/latest/V1.DocumentView) of the document. |

### getName

Identifier. Contains the resource name of the document.

Format: `documents/{uri_without_scheme}`
Example: `documents/docs.cloud.google.com/storage/docs/creating-buckets`

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

### setName

Identifier. Contains the resource name of the document.

Format: `documents/{uri_without_scheme}`
Example: `documents/docs.cloud.google.com/storage/docs/creating-buckets`

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

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

### getUri

Output only. Provides the URI of the content, such as
`docs.cloud.google.com/storage/docs/creating-buckets`.

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

### setUri

Output only. Provides the URI of the content, such as
`docs.cloud.google.com/storage/docs/creating-buckets`.

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

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

### getContent

Output only. Contains the full content of the document in Markdown format.

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

### setContent

Output only. Contains the full content of the document in Markdown format.

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

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

### getDescription

Output only. Provides a description of the document.

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

### setDescription

Output only. Provides a description of the document.

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

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

### getDataSource

Output only. Specifies the data source of the document.

Example data source: `firebase.google.com`

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

### setDataSource

Output only. Specifies the data source of the document.

Example data source: `firebase.google.com`

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

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

### getTitle

Output only. Provides the title of the document.

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

### setTitle

Output only. Provides the title of the document.

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

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

### getUpdateTime

Output only. Represents the timestamp when the content or metadata of the
document was last updated.

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

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

Output only. Represents the timestamp when the content or metadata of the
document was last updated.

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

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

### getView

Output only. Specifies the
[DocumentView](https://docs.cloud.google.com/php/docs/reference/developers-knowledge/latest/V1.DocumentView) of the
document.

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

### setView

Output only. Specifies the
[DocumentView](https://docs.cloud.google.com/php/docs/reference/developers-knowledge/latest/V1.DocumentView) of the
document.

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

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