# Google Cloud Dialogflow v2beta1 API - Class Documents.DocumentsClient (1.0.0-beta30)

1.0.0-beta30 (latest) 1.0.0-beta29

    public class Documents.DocumentsClient : ClientBase<Documents.DocumentsClient>

Reference documentation and code samples for the Google Cloud Dialogflow v2beta1 API class Documents.DocumentsClient.

Client for Documents

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> [ClientBase](https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ClientBase.html) \> [ClientBase](https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ClientBase-1.html)[Documents](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.Documents)[DocumentsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.Documents.DocumentsClient) \> Documents.DocumentsClient

## Inherited Members

[ClientBase\<Documents.DocumentsClient\>.WithHost(string)](https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ClientBase-1.html#Grpc_Core_ClientBase_1_WithHost_System_String_) [ClientBase.CallInvoker](https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ClientBase.html#Grpc_Core_ClientBase_CallInvoker) [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Dialogflow.V2Beta1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1)

## Assembly

Google.Cloud.Dialogflow.V2Beta1.dll

## Constructors

### DocumentsClient()

    protected DocumentsClient()

Protected parameterless constructor to allow creation of test doubles.

### DocumentsClient(CallInvoker)

    public DocumentsClient(CallInvoker callInvoker)

Creates a new client for Documents that uses a custom `CallInvoker`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `callInvoker` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallInvoker.html` The callInvoker to use to make remote calls. |

### DocumentsClient(ChannelBase)

    public DocumentsClient(ChannelBase channel)

Creates a new client for Documents

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `channel` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ChannelBase.html` The channel to use to make remote calls. |

### DocumentsClient(ClientBaseConfiguration)

    protected DocumentsClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `configuration` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ClientBase.htmlhttps://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ClientBase.ClientBaseConfiguration.html` The client configuration. |

## Methods

### CreateDocument(CreateDocumentRequest, CallOptions)

    public virtual Operation CreateDocument(CreateDocumentRequest request, CallOptions options)

Creates a new document.

This method is a [long-running
operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
The returned `Operation` type has the following method-specific fields:

- `metadata`: \[KnowledgeOperationMetadata\]\[google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata\]
- `response`: \[Document\]\[google.cloud.dialogflow.v2beta1.Document\]

Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
only use `projects.knowledgeBases.documents`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.CreateDocumentRequest` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation.html` | The response received from the server. |

### CreateDocument(CreateDocumentRequest, Metadata, DateTime?, CancellationToken)

    public virtual Operation CreateDocument(CreateDocumentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Creates a new document.

This method is a [long-running
operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
The returned `Operation` type has the following method-specific fields:

- `metadata`: \[KnowledgeOperationMetadata\]\[google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata\]
- `response`: \[Document\]\[google.cloud.dialogflow.v2beta1.Document\]

Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
only use `projects.knowledgeBases.documents`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.CreateDocumentRequest` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation.html` | The response received from the server. |

### CreateDocumentAsync(CreateDocumentRequest, CallOptions)

    public virtual AsyncUnaryCall<Operation> CreateDocumentAsync(CreateDocumentRequest request, CallOptions options)

Creates a new document.

This method is a [long-running
operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
The returned `Operation` type has the following method-specific fields:

- `metadata`: \[KnowledgeOperationMetadata\]\[google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata\]
- `response`: \[Document\]\[google.cloud.dialogflow.v2beta1.Document\]

Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
only use `projects.knowledgeBases.documents`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.CreateDocumentRequest` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation.html` | The call object. |

### CreateDocumentAsync(CreateDocumentRequest, Metadata, DateTime?, CancellationToken)

    public virtual AsyncUnaryCall<Operation> CreateDocumentAsync(CreateDocumentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Creates a new document.

This method is a [long-running
operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
The returned `Operation` type has the following method-specific fields:

- `metadata`: \[KnowledgeOperationMetadata\]\[google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata\]
- `response`: \[Document\]\[google.cloud.dialogflow.v2beta1.Document\]

Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
only use `projects.knowledgeBases.documents`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.CreateDocumentRequest` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation.html` | The call object. |

### CreateLocationsClient()

    public virtual Locations.LocationsClient CreateLocationsClient()

Creates a new instance of [Locations.LocationsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.Locations.LocationsClient.html) using the same call invoker as
this client.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.Locations.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.Locations.LocationsClient.html` | A new [Locations.LocationsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.Locations.LocationsClient.html) for the same target as this client. |

### CreateOperationsClient()

    public virtual Operations.OperationsClient CreateOperationsClient()

Creates a new instance of [Operations.OperationsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operations.OperationsClient.html) using the same call invoker as
this client.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operations.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operations.OperationsClient.html` | A new Operations client for the same target as this client. |

### DeleteDocument(DeleteDocumentRequest, CallOptions)

    public virtual Operation DeleteDocument(DeleteDocumentRequest request, CallOptions options)

Deletes the specified document.

This method is a [long-running
operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
The returned `Operation` type has the following method-specific fields:

- `metadata`: \[KnowledgeOperationMetadata\]\[google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata\]
- `response`: An [Empty
  message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)

Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
only use `projects.knowledgeBases.documents`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.DeleteDocumentRequest` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation.html` | The response received from the server. |

### DeleteDocument(DeleteDocumentRequest, Metadata, DateTime?, CancellationToken)

    public virtual Operation DeleteDocument(DeleteDocumentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Deletes the specified document.

This method is a [long-running
operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
The returned `Operation` type has the following method-specific fields:

- `metadata`: \[KnowledgeOperationMetadata\]\[google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata\]
- `response`: An [Empty
  message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)

Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
only use `projects.knowledgeBases.documents`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.DeleteDocumentRequest` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation.html` | The response received from the server. |

### DeleteDocumentAsync(DeleteDocumentRequest, CallOptions)

    public virtual AsyncUnaryCall<Operation> DeleteDocumentAsync(DeleteDocumentRequest request, CallOptions options)

Deletes the specified document.

This method is a [long-running
operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
The returned `Operation` type has the following method-specific fields:

- `metadata`: \[KnowledgeOperationMetadata\]\[google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata\]
- `response`: An [Empty
  message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)

Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
only use `projects.knowledgeBases.documents`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.DeleteDocumentRequest` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation.html` | The call object. |

### DeleteDocumentAsync(DeleteDocumentRequest, Metadata, DateTime?, CancellationToken)

    public virtual AsyncUnaryCall<Operation> DeleteDocumentAsync(DeleteDocumentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Deletes the specified document.

This method is a [long-running
operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
The returned `Operation` type has the following method-specific fields:

- `metadata`: \[KnowledgeOperationMetadata\]\[google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata\]
- `response`: An [Empty
  message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)

Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
only use `projects.knowledgeBases.documents`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.DeleteDocumentRequest` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation.html` | The call object. |

### GetDocument(GetDocumentRequest, CallOptions)

    public virtual Document GetDocument(GetDocumentRequest request, CallOptions options)

Retrieves the specified document.

Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
only use `projects.knowledgeBases.documents`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.GetDocumentRequest` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.Document` | The response received from the server. |

### GetDocument(GetDocumentRequest, Metadata, DateTime?, CancellationToken)

    public virtual Document GetDocument(GetDocumentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Retrieves the specified document.

Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
only use `projects.knowledgeBases.documents`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.GetDocumentRequest` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.Document` | The response received from the server. |

### GetDocumentAsync(GetDocumentRequest, CallOptions)

    public virtual AsyncUnaryCall<Document> GetDocumentAsync(GetDocumentRequest request, CallOptions options)

Retrieves the specified document.

Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
only use `projects.knowledgeBases.documents`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.GetDocumentRequest` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.Document` | The call object. |

### GetDocumentAsync(GetDocumentRequest, Metadata, DateTime?, CancellationToken)

    public virtual AsyncUnaryCall<Document> GetDocumentAsync(GetDocumentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Retrieves the specified document.

Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
only use `projects.knowledgeBases.documents`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.GetDocumentRequest` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.Document` | The call object. |

### ImportDocuments(ImportDocumentsRequest, CallOptions)

    public virtual Operation ImportDocuments(ImportDocumentsRequest request, CallOptions options)

Create documents by importing data from external sources.
Dialogflow supports up to 350 documents in each request. If you try to
import more, Dialogflow will return an error.

This method is a [long-running
operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
The returned `Operation` type has the following method-specific fields:

- `metadata`: \[KnowledgeOperationMetadata\]\[google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata\]
- `response`: \[ImportDocumentsResponse\]\[google.cloud.dialogflow.v2beta1.ImportDocumentsResponse\]

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.ImportDocumentsRequest` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation.html` | The response received from the server. |

### ImportDocuments(ImportDocumentsRequest, Metadata, DateTime?, CancellationToken)

    public virtual Operation ImportDocuments(ImportDocumentsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Create documents by importing data from external sources.
Dialogflow supports up to 350 documents in each request. If you try to
import more, Dialogflow will return an error.

This method is a [long-running
operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
The returned `Operation` type has the following method-specific fields:

- `metadata`: \[KnowledgeOperationMetadata\]\[google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata\]
- `response`: \[ImportDocumentsResponse\]\[google.cloud.dialogflow.v2beta1.ImportDocumentsResponse\]

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.ImportDocumentsRequest` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation.html` | The response received from the server. |

### ImportDocumentsAsync(ImportDocumentsRequest, CallOptions)

    public virtual AsyncUnaryCall<Operation> ImportDocumentsAsync(ImportDocumentsRequest request, CallOptions options)

Create documents by importing data from external sources.
Dialogflow supports up to 350 documents in each request. If you try to
import more, Dialogflow will return an error.

This method is a [long-running
operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
The returned `Operation` type has the following method-specific fields:

- `metadata`: \[KnowledgeOperationMetadata\]\[google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata\]
- `response`: \[ImportDocumentsResponse\]\[google.cloud.dialogflow.v2beta1.ImportDocumentsResponse\]

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.ImportDocumentsRequest` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation.html` | The call object. |

### ImportDocumentsAsync(ImportDocumentsRequest, Metadata, DateTime?, CancellationToken)

    public virtual AsyncUnaryCall<Operation> ImportDocumentsAsync(ImportDocumentsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Create documents by importing data from external sources.
Dialogflow supports up to 350 documents in each request. If you try to
import more, Dialogflow will return an error.

This method is a [long-running
operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
The returned `Operation` type has the following method-specific fields:

- `metadata`: \[KnowledgeOperationMetadata\]\[google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata\]
- `response`: \[ImportDocumentsResponse\]\[google.cloud.dialogflow.v2beta1.ImportDocumentsResponse\]

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.ImportDocumentsRequest` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation.html` | The call object. |

### ListDocuments(ListDocumentsRequest, CallOptions)

    public virtual ListDocumentsResponse ListDocuments(ListDocumentsRequest request, CallOptions options)

Returns the list of all documents of the knowledge base.

Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
only use `projects.knowledgeBases.documents`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.ListDocumentsRequest` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.ListDocumentsResponse` | The response received from the server. |

### ListDocuments(ListDocumentsRequest, Metadata, DateTime?, CancellationToken)

    public virtual ListDocumentsResponse ListDocuments(ListDocumentsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Returns the list of all documents of the knowledge base.

Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
only use `projects.knowledgeBases.documents`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.ListDocumentsRequest` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.ListDocumentsResponse` | The response received from the server. |

### ListDocumentsAsync(ListDocumentsRequest, CallOptions)

    public virtual AsyncUnaryCall<ListDocumentsResponse> ListDocumentsAsync(ListDocumentsRequest request, CallOptions options)

Returns the list of all documents of the knowledge base.

Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
only use `projects.knowledgeBases.documents`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.ListDocumentsRequest` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.ListDocumentsResponse` | The call object. |

### ListDocumentsAsync(ListDocumentsRequest, Metadata, DateTime?, CancellationToken)

    public virtual AsyncUnaryCall<ListDocumentsResponse> ListDocumentsAsync(ListDocumentsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Returns the list of all documents of the knowledge base.

Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
only use `projects.knowledgeBases.documents`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.ListDocumentsRequest` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.ListDocumentsResponse` | The call object. |

### NewInstance(ClientBaseConfiguration)

    protected override Documents.DocumentsClient NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given `ClientBaseConfiguration`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `configuration` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ClientBase.htmlhttps://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ClientBase.ClientBaseConfiguration.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.Documentshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.Documents.DocumentsClient` |   |

**Overrides** Grpc.Core.ClientBase\<Google.Cloud.Dialogflow.V2Beta1.Documents.DocumentsClient\>.NewInstance(Grpc.Core.ClientBase.ClientBaseConfiguration)

### ReloadDocument(ReloadDocumentRequest, CallOptions)

    public virtual Operation ReloadDocument(ReloadDocumentRequest request, CallOptions options)

Reloads the specified document from its specified source, content_uri or
content. The previously loaded content of the document will be deleted.
Note: Even when the content of the document has not changed, there still
may be side effects because of internal implementation changes.
Note: If the document source is Google Cloud Storage URI, its metadata will
be replaced with the custom metadata from Google Cloud Storage if the
`import_gcs_custom_metadata` field is set to true in the request.

This method is a [long-running
operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
The returned `Operation` type has the following method-specific fields:

- `metadata`: \[KnowledgeOperationMetadata\]\[google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata\]
- `response`: \[Document\]\[google.cloud.dialogflow.v2beta1.Document\]

Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
only use `projects.knowledgeBases.documents`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.ReloadDocumentRequest` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation.html` | The response received from the server. |

### ReloadDocument(ReloadDocumentRequest, Metadata, DateTime?, CancellationToken)

    public virtual Operation ReloadDocument(ReloadDocumentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Reloads the specified document from its specified source, content_uri or
content. The previously loaded content of the document will be deleted.
Note: Even when the content of the document has not changed, there still
may be side effects because of internal implementation changes.
Note: If the document source is Google Cloud Storage URI, its metadata will
be replaced with the custom metadata from Google Cloud Storage if the
`import_gcs_custom_metadata` field is set to true in the request.

This method is a [long-running
operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
The returned `Operation` type has the following method-specific fields:

- `metadata`: \[KnowledgeOperationMetadata\]\[google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata\]
- `response`: \[Document\]\[google.cloud.dialogflow.v2beta1.Document\]

Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
only use `projects.knowledgeBases.documents`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.ReloadDocumentRequest` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation.html` | The response received from the server. |

### ReloadDocumentAsync(ReloadDocumentRequest, CallOptions)

    public virtual AsyncUnaryCall<Operation> ReloadDocumentAsync(ReloadDocumentRequest request, CallOptions options)

Reloads the specified document from its specified source, content_uri or
content. The previously loaded content of the document will be deleted.
Note: Even when the content of the document has not changed, there still
may be side effects because of internal implementation changes.
Note: If the document source is Google Cloud Storage URI, its metadata will
be replaced with the custom metadata from Google Cloud Storage if the
`import_gcs_custom_metadata` field is set to true in the request.

This method is a [long-running
operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
The returned `Operation` type has the following method-specific fields:

- `metadata`: \[KnowledgeOperationMetadata\]\[google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata\]
- `response`: \[Document\]\[google.cloud.dialogflow.v2beta1.Document\]

Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
only use `projects.knowledgeBases.documents`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.ReloadDocumentRequest` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation.html` | The call object. |

### ReloadDocumentAsync(ReloadDocumentRequest, Metadata, DateTime?, CancellationToken)

    public virtual AsyncUnaryCall<Operation> ReloadDocumentAsync(ReloadDocumentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Reloads the specified document from its specified source, content_uri or
content. The previously loaded content of the document will be deleted.
Note: Even when the content of the document has not changed, there still
may be side effects because of internal implementation changes.
Note: If the document source is Google Cloud Storage URI, its metadata will
be replaced with the custom metadata from Google Cloud Storage if the
`import_gcs_custom_metadata` field is set to true in the request.

This method is a [long-running
operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
The returned `Operation` type has the following method-specific fields:

- `metadata`: \[KnowledgeOperationMetadata\]\[google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata\]
- `response`: \[Document\]\[google.cloud.dialogflow.v2beta1.Document\]

Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
only use `projects.knowledgeBases.documents`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.ReloadDocumentRequest` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation.html` | The call object. |

### UpdateDocument(UpdateDocumentRequest, CallOptions)

    public virtual Operation UpdateDocument(UpdateDocumentRequest request, CallOptions options)

Updates the specified document.

This method is a [long-running
operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
The returned `Operation` type has the following method-specific fields:

- `metadata`: \[KnowledgeOperationMetadata\]\[google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata\]
- `response`: \[Document\]\[google.cloud.dialogflow.v2beta1.Document\]

Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
only use `projects.knowledgeBases.documents`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.UpdateDocumentRequest` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation.html` | The response received from the server. |

### UpdateDocument(UpdateDocumentRequest, Metadata, DateTime?, CancellationToken)

    public virtual Operation UpdateDocument(UpdateDocumentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Updates the specified document.

This method is a [long-running
operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
The returned `Operation` type has the following method-specific fields:

- `metadata`: \[KnowledgeOperationMetadata\]\[google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata\]
- `response`: \[Document\]\[google.cloud.dialogflow.v2beta1.Document\]

Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
only use `projects.knowledgeBases.documents`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.UpdateDocumentRequest` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation.html` | The response received from the server. |

### UpdateDocumentAsync(UpdateDocumentRequest, CallOptions)

    public virtual AsyncUnaryCall<Operation> UpdateDocumentAsync(UpdateDocumentRequest request, CallOptions options)

Updates the specified document.

This method is a [long-running
operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
The returned `Operation` type has the following method-specific fields:

- `metadata`: \[KnowledgeOperationMetadata\]\[google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata\]
- `response`: \[Document\]\[google.cloud.dialogflow.v2beta1.Document\]

Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
only use `projects.knowledgeBases.documents`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.UpdateDocumentRequest` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation.html` | The call object. |

### UpdateDocumentAsync(UpdateDocumentRequest, Metadata, DateTime?, CancellationToken)

    public virtual AsyncUnaryCall<Operation> UpdateDocumentAsync(UpdateDocumentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Updates the specified document.

This method is a [long-running
operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
The returned `Operation` type has the following method-specific fields:

- `metadata`: \[KnowledgeOperationMetadata\]\[google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata\]
- `response`: \[Document\]\[google.cloud.dialogflow.v2beta1.Document\]

Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
only use `projects.knowledgeBases.documents`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Dialogflow.V2Beta1/latest/Google.Cloud.Dialogflow.V2Beta1.UpdateDocumentRequest` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation.html` | The call object. |