Class Documents.DocumentsClient (3.8.0)

public class DocumentsClient : ClientBase<Documents.DocumentsClient>

Client for Documents

Inheritance

Object > ClientBase > ClientBase<Documents.DocumentsClient> > Documents.DocumentsClient

Namespace

Google.Cloud.Dialogflow.V2

Assembly

Google.Cloud.Dialogflow.V2.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
NameDescription
callInvokerCallInvoker

The callInvoker to use to make remote calls.

DocumentsClient(ChannelBase)

public DocumentsClient(ChannelBase channel)

Creates a new client for Documents

Parameter
NameDescription
channelChannelBase

The channel to use to make remote calls.

DocumentsClient(ClientBase.ClientBaseConfiguration)

protected DocumentsClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
NameDescription
configurationClientBase.ClientBaseConfiguration

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. The returned Operation type has the following method-specific fields:

  • metadata: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]
  • response: [Document][google.cloud.dialogflow.v2.Document]
Parameters
NameDescription
requestCreateDocumentRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Operation

The response received from the server.

CreateDocument(CreateDocumentRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

Creates a new document.

This method is a long-running operation. The returned Operation type has the following method-specific fields:

  • metadata: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]
  • response: [Document][google.cloud.dialogflow.v2.Document]
Parameters
NameDescription
requestCreateDocumentRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Operation

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. The returned Operation type has the following method-specific fields:

  • metadata: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]
  • response: [Document][google.cloud.dialogflow.v2.Document]
Parameters
NameDescription
requestCreateDocumentRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<Operation>

The call object.

CreateDocumentAsync(CreateDocumentRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

Creates a new document.

This method is a long-running operation. The returned Operation type has the following method-specific fields:

  • metadata: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]
  • response: [Document][google.cloud.dialogflow.v2.Document]
Parameters
NameDescription
requestCreateDocumentRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<Operation>

The call object.

CreateOperationsClient()

public virtual Operations.OperationsClient CreateOperationsClient()

Creates a new instance of Operations.OperationsClient using the same call invoker as this client.

Returns
TypeDescription
Operations.OperationsClient

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. The returned Operation type has the following method-specific fields:

  • metadata: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]
  • response: An Empty message
Parameters
NameDescription
requestDeleteDocumentRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Operation

The response received from the server.

DeleteDocument(DeleteDocumentRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

Deletes the specified document.

This method is a long-running operation. The returned Operation type has the following method-specific fields:

  • metadata: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]
  • response: An Empty message
Parameters
NameDescription
requestDeleteDocumentRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Operation

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. The returned Operation type has the following method-specific fields:

  • metadata: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]
  • response: An Empty message
Parameters
NameDescription
requestDeleteDocumentRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<Operation>

The call object.

DeleteDocumentAsync(DeleteDocumentRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

Deletes the specified document.

This method is a long-running operation. The returned Operation type has the following method-specific fields:

  • metadata: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]
  • response: An Empty message
Parameters
NameDescription
requestDeleteDocumentRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<Operation>

The call object.

GetDocument(GetDocumentRequest, CallOptions)

public virtual Document GetDocument(GetDocumentRequest request, CallOptions options)

Retrieves the specified document.

Parameters
NameDescription
requestGetDocumentRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Document

The response received from the server.

GetDocument(GetDocumentRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

Retrieves the specified document.

Parameters
NameDescription
requestGetDocumentRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Document

The response received from the server.

GetDocumentAsync(GetDocumentRequest, CallOptions)

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

Retrieves the specified document.

Parameters
NameDescription
requestGetDocumentRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<Document>

The call object.

GetDocumentAsync(GetDocumentRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

Retrieves the specified document.

Parameters
NameDescription
requestGetDocumentRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<Document>

The call object.

ListDocuments(ListDocumentsRequest, CallOptions)

public virtual ListDocumentsResponse ListDocuments(ListDocumentsRequest request, CallOptions options)

Returns the list of all documents of the knowledge base.

Parameters
NameDescription
requestListDocumentsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
ListDocumentsResponse

The response received from the server.

ListDocuments(ListDocumentsRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

Returns the list of all documents of the knowledge base.

Parameters
NameDescription
requestListDocumentsRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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.

Parameters
NameDescription
requestListDocumentsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<ListDocumentsResponse>

The call object.

ListDocumentsAsync(ListDocumentsRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

Returns the list of all documents of the knowledge base.

Parameters
NameDescription
requestListDocumentsRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<ListDocumentsResponse>

The call object.

NewInstance(ClientBase.ClientBaseConfiguration)

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

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
NameDescription
configurationClientBase.ClientBaseConfiguration
Returns
TypeDescription
Documents.DocumentsClient
Overrides
Grpc.Core.ClientBase<Google.Cloud.Dialogflow.V2.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.

This method is a long-running operation. The returned Operation type has the following method-specific fields:

  • metadata: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]
  • response: [Document][google.cloud.dialogflow.v2.Document]

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

Parameters
NameDescription
requestReloadDocumentRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Operation

The response received from the server.

ReloadDocument(ReloadDocumentRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

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.

This method is a long-running operation. The returned Operation type has the following method-specific fields:

  • metadata: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]
  • response: [Document][google.cloud.dialogflow.v2.Document]

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

Parameters
NameDescription
requestReloadDocumentRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Operation

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.

This method is a long-running operation. The returned Operation type has the following method-specific fields:

  • metadata: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]
  • response: [Document][google.cloud.dialogflow.v2.Document]

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

Parameters
NameDescription
requestReloadDocumentRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<Operation>

The call object.

ReloadDocumentAsync(ReloadDocumentRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

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.

This method is a long-running operation. The returned Operation type has the following method-specific fields:

  • metadata: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]
  • response: [Document][google.cloud.dialogflow.v2.Document]

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

Parameters
NameDescription
requestReloadDocumentRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<Operation>

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. The returned Operation type has the following method-specific fields:

  • metadata: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]
  • response: [Document][google.cloud.dialogflow.v2.Document]
Parameters
NameDescription
requestUpdateDocumentRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Operation

The response received from the server.

UpdateDocument(UpdateDocumentRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

Updates the specified document.

This method is a long-running operation. The returned Operation type has the following method-specific fields:

  • metadata: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]
  • response: [Document][google.cloud.dialogflow.v2.Document]
Parameters
NameDescription
requestUpdateDocumentRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Operation

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. The returned Operation type has the following method-specific fields:

  • metadata: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]
  • response: [Document][google.cloud.dialogflow.v2.Document]
Parameters
NameDescription
requestUpdateDocumentRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<Operation>

The call object.

UpdateDocumentAsync(UpdateDocumentRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

Updates the specified document.

This method is a long-running operation. The returned Operation type has the following method-specific fields:

  • metadata: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]
  • response: [Document][google.cloud.dialogflow.v2.Document]
Parameters
NameDescription
requestUpdateDocumentRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<Operation>

The call object.