0.2.1 (latest) 0.1.0 Reference documentation and code samples for the Google Developer Knowledge V1 Client class GetDocumentRequest.

Request message for
[DeveloperKnowledge.GetDocument](https://developers.google.com/php/docs/reference/developer-knowledge/latest/V1.Client.DeveloperKnowledgeClient#_Google_Developers_DeveloperKnowledge_V1_Client_DeveloperKnowledgeClient__getDocument__).

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

## Namespace

Google \\ Developers \\ DeveloperKnowledge \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Required. Specifies the name of the document to retrieve. Format: `documents/{uri_without_scheme}` Example: `documents/docs.cloud.google.com/storage/docs/creating-buckets` |
| `↳ view` | `int` Optional. Specifies the [DocumentView](https://developers.google.com/php/docs/reference/developer-knowledge/latest/V1.DocumentView) of the document. If unspecified, [DeveloperKnowledge.GetDocument](https://developers.google.com/php/docs/reference/developer-knowledge/latest/V1.Client.DeveloperKnowledgeClient#_Google_Developers_DeveloperKnowledge_V1_Client_DeveloperKnowledgeClient__getDocument__) defaults to `DOCUMENT_VIEW_CONTENT`. |

### getName

Required. Specifies the name of the document to retrieve.

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

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

### setName

Required. Specifies the name of the document to retrieve.

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

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

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

### getView

Optional. Specifies the
[DocumentView](https://developers.google.com/php/docs/reference/developer-knowledge/latest/V1.DocumentView) of the
document. If unspecified,
[DeveloperKnowledge.GetDocument](https://developers.google.com/php/docs/reference/developer-knowledge/latest/V1.Client.DeveloperKnowledgeClient#_Google_Developers_DeveloperKnowledge_V1_Client_DeveloperKnowledgeClient__getDocument__)
defaults to `DOCUMENT_VIEW_CONTENT`.

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

### setView

Optional. Specifies the
[DocumentView](https://developers.google.com/php/docs/reference/developer-knowledge/latest/V1.DocumentView) of the
document. If unspecified,
[DeveloperKnowledge.GetDocument](https://developers.google.com/php/docs/reference/developer-knowledge/latest/V1.Client.DeveloperKnowledgeClient#_Google_Developers_DeveloperKnowledge_V1_Client_DeveloperKnowledgeClient__getDocument__)
defaults to `DOCUMENT_VIEW_CONTENT`.

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

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

### static::build

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `string` Required. Specifies the name of the document to retrieve. Format: `documents/{uri_without_scheme}` Example: `documents/docs.cloud.google.com/storage/docs/creating-buckets` Please see DeveloperKnowledgeClient::documentName() for help formatting this field. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://developers.google.com/php/docs/reference/developer-knowledge/latest/V1.GetDocumentRequest` |   |