Google Cloud Dialogflow v2 API - Class DocumentsClientImpl (4.17.0)

public sealed class DocumentsClientImpl : DocumentsClient

Reference documentation and code samples for the Google Cloud Dialogflow v2 API class DocumentsClientImpl.

Documents client wrapper implementation, for convenient use.

Inheritance

object > DocumentsClient > DocumentsClientImpl

Namespace

Google.Cloud.Dialogflow.V2

Assembly

Google.Cloud.Dialogflow.V2.dll

Remarks

Service for managing knowledge [Documents][google.cloud.dialogflow.v2.Document].

Constructors

DocumentsClientImpl(DocumentsClient, DocumentsSettings, ILogger)

public DocumentsClientImpl(Documents.DocumentsClient grpcClient, DocumentsSettings settings, ILogger logger)

Constructs a client wrapper for the Documents service, with the specified gRPC client and settings.

Parameters
NameDescription
grpcClientDocumentsDocumentsClient

The underlying gRPC client.

settingsDocumentsSettings

The base DocumentsSettings used within this client.

loggerILogger

Optional ILogger to use within this client.

Properties

CreateDocumentOperationsClient

public override OperationsClient CreateDocumentOperationsClient { get; }

The long-running operations client for CreateDocument.

Property Value
TypeDescription
OperationsClient
Overrides

DeleteDocumentOperationsClient

public override OperationsClient DeleteDocumentOperationsClient { get; }

The long-running operations client for DeleteDocument.

Property Value
TypeDescription
OperationsClient
Overrides

ExportDocumentOperationsClient

public override OperationsClient ExportDocumentOperationsClient { get; }

The long-running operations client for ExportDocument.

Property Value
TypeDescription
OperationsClient
Overrides

GrpcClient

public override Documents.DocumentsClient GrpcClient { get; }

The underlying gRPC Documents client

Property Value
TypeDescription
DocumentsDocumentsClient
Overrides

ImportDocumentsOperationsClient

public override OperationsClient ImportDocumentsOperationsClient { get; }

The long-running operations client for ImportDocuments.

Property Value
TypeDescription
OperationsClient
Overrides

LocationsClient

public override LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
TypeDescription
LocationsClient
Overrides

ReloadDocumentOperationsClient

public override OperationsClient ReloadDocumentOperationsClient { get; }

The long-running operations client for ReloadDocument.

Property Value
TypeDescription
OperationsClient
Overrides

UpdateDocumentOperationsClient

public override OperationsClient UpdateDocumentOperationsClient { get; }

The long-running operations client for UpdateDocument.

Property Value
TypeDescription
OperationsClient
Overrides

Methods

CreateDocument(CreateDocumentRequest, CallSettings)

public override Operation<Document, KnowledgeOperationMetadata> CreateDocument(CreateDocumentRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationDocumentKnowledgeOperationMetadata

The RPC response.

Overrides

CreateDocumentAsync(CreateDocumentRequest, CallSettings)

public override Task<Operation<Document, KnowledgeOperationMetadata>> CreateDocumentAsync(CreateDocumentRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationDocumentKnowledgeOperationMetadata

A Task containing the RPC response.

Overrides

DeleteDocument(DeleteDocumentRequest, CallSettings)

public override Operation<Empty, KnowledgeOperationMetadata> DeleteDocument(DeleteDocumentRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationEmptyKnowledgeOperationMetadata

The RPC response.

Overrides

DeleteDocumentAsync(DeleteDocumentRequest, CallSettings)

public override Task<Operation<Empty, KnowledgeOperationMetadata>> DeleteDocumentAsync(DeleteDocumentRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationEmptyKnowledgeOperationMetadata

A Task containing the RPC response.

Overrides

ExportDocument(ExportDocumentRequest, CallSettings)

public override Operation<Document, KnowledgeOperationMetadata> ExportDocument(ExportDocumentRequest request, CallSettings callSettings = null)

Exports a smart messaging candidate document into the specified destination.

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
requestExportDocumentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationDocumentKnowledgeOperationMetadata

The RPC response.

Overrides

ExportDocumentAsync(ExportDocumentRequest, CallSettings)

public override Task<Operation<Document, KnowledgeOperationMetadata>> ExportDocumentAsync(ExportDocumentRequest request, CallSettings callSettings = null)

Exports a smart messaging candidate document into the specified destination.

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
requestExportDocumentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationDocumentKnowledgeOperationMetadata

A Task containing the RPC response.

Overrides

GetDocument(GetDocumentRequest, CallSettings)

public override Document GetDocument(GetDocumentRequest request, CallSettings callSettings = null)

Retrieves the specified document.

Parameters
NameDescription
requestGetDocumentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Document

The RPC response.

Overrides

GetDocumentAsync(GetDocumentRequest, CallSettings)

public override Task<Document> GetDocumentAsync(GetDocumentRequest request, CallSettings callSettings = null)

Retrieves the specified document.

Parameters
NameDescription
requestGetDocumentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskDocument

A Task containing the RPC response.

Overrides

ImportDocuments(ImportDocumentsRequest, CallSettings)

public override Operation<ImportDocumentsResponse, KnowledgeOperationMetadata> ImportDocuments(ImportDocumentsRequest request, CallSettings callSettings = null)

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

  • metadata: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]
  • response: [ImportDocumentsResponse][google.cloud.dialogflow.v2.ImportDocumentsResponse]
Parameters
NameDescription
requestImportDocumentsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationImportDocumentsResponseKnowledgeOperationMetadata

The RPC response.

Overrides

ImportDocumentsAsync(ImportDocumentsRequest, CallSettings)

public override Task<Operation<ImportDocumentsResponse, KnowledgeOperationMetadata>> ImportDocumentsAsync(ImportDocumentsRequest request, CallSettings callSettings = null)

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

  • metadata: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]
  • response: [ImportDocumentsResponse][google.cloud.dialogflow.v2.ImportDocumentsResponse]
Parameters
NameDescription
requestImportDocumentsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationImportDocumentsResponseKnowledgeOperationMetadata

A Task containing the RPC response.

Overrides

ListDocuments(ListDocumentsRequest, CallSettings)

public override PagedEnumerable<ListDocumentsResponse, Document> ListDocuments(ListDocumentsRequest request, CallSettings callSettings = null)

Returns the list of all documents of the knowledge base.

Parameters
NameDescription
requestListDocumentsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListDocumentsResponseDocument

A pageable sequence of Document resources.

Overrides

ListDocumentsAsync(ListDocumentsRequest, CallSettings)

public override PagedAsyncEnumerable<ListDocumentsResponse, Document> ListDocumentsAsync(ListDocumentsRequest request, CallSettings callSettings = null)

Returns the list of all documents of the knowledge base.

Parameters
NameDescription
requestListDocumentsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListDocumentsResponseDocument

A pageable asynchronous sequence of Document resources.

Overrides

ReloadDocument(ReloadDocumentRequest, CallSettings)

public override Operation<Document, KnowledgeOperationMetadata> ReloadDocument(ReloadDocumentRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationDocumentKnowledgeOperationMetadata

The RPC response.

Overrides

ReloadDocumentAsync(ReloadDocumentRequest, CallSettings)

public override Task<Operation<Document, KnowledgeOperationMetadata>> ReloadDocumentAsync(ReloadDocumentRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationDocumentKnowledgeOperationMetadata

A Task containing the RPC response.

Overrides

UpdateDocument(UpdateDocumentRequest, CallSettings)

public override Operation<Document, KnowledgeOperationMetadata> UpdateDocument(UpdateDocumentRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationDocumentKnowledgeOperationMetadata

The RPC response.

Overrides

UpdateDocumentAsync(UpdateDocumentRequest, CallSettings)

public override Task<Operation<Document, KnowledgeOperationMetadata>> UpdateDocumentAsync(UpdateDocumentRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationDocumentKnowledgeOperationMetadata

A Task containing the RPC response.

Overrides