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

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

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

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

## Namespace

Google \\ Developers \\ Knowledge \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ names` | `string[]` Required. Specifies the names of the documents to retrieve. A maximum of 20 documents can be retrieved in a batch. The documents are returned in the same order as the `names` in the request. Format: `documents/{uri_without_scheme}` Example: `documents/docs.cloud.google.com/storage/docs/creating-buckets` |
| `↳ view` | `int` Optional. Specifies the [DocumentView](https://docs.cloud.google.com/php/docs/reference/developers-knowledge/latest/V1.DocumentView) of the document. If unspecified, [DeveloperKnowledge.BatchGetDocuments](https://docs.cloud.google.com/php/docs/reference/developers-knowledge/latest/V1.Client.DeveloperKnowledgeClient#_Google_Developers_Knowledge_V1_Client_DeveloperKnowledgeClient__batchGetDocuments__) defaults to `DOCUMENT_VIEW_CONTENT`. |

### getNames

Required. Specifies the names of the documents to retrieve. A maximum of 20
documents can be retrieved in a batch. The documents are returned in the
same order as the `names` in the request.

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

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

### setNames

Required. Specifies the names of the documents to retrieve. A maximum of 20
documents can be retrieved in a batch. The documents are returned in the
same order as the `names` in the request.

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://docs.cloud.google.com/php/docs/reference/developers-knowledge/latest/V1.DocumentView) of the
document. If unspecified,
[DeveloperKnowledge.BatchGetDocuments](https://docs.cloud.google.com/php/docs/reference/developers-knowledge/latest/V1.Client.DeveloperKnowledgeClient#_Google_Developers_Knowledge_V1_Client_DeveloperKnowledgeClient__batchGetDocuments__)
defaults to `DOCUMENT_VIEW_CONTENT`.

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

### setView

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

| **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` |   |