Google Cloud Dialogflow v2 API - Class Documents.DocumentsBase (4.24.0)

[BindServiceMethod(typeof(Documents), "BindService")]
public abstract class Documents.DocumentsBase

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

Base class for server-side implementations of Documents

Inheritance

object > Documents.DocumentsBase

Namespace

Google.Cloud.Dialogflow.V2

Assembly

Google.Cloud.Dialogflow.V2.dll

Methods

CreateDocument(CreateDocumentRequest, ServerCallContext)

public virtual Task<Operation> CreateDocument(CreateDocumentRequest request, ServerCallContext context)

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
Name Description
request CreateDocumentRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskOperation

The response to send back to the client (wrapped by a task).

DeleteDocument(DeleteDocumentRequest, ServerCallContext)

public virtual Task<Operation> DeleteDocument(DeleteDocumentRequest request, ServerCallContext context)

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
Name Description
request DeleteDocumentRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskOperation

The response to send back to the client (wrapped by a task).

ExportDocument(ExportDocumentRequest, ServerCallContext)

public virtual Task<Operation> ExportDocument(ExportDocumentRequest request, ServerCallContext context)

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
Name Description
request ExportDocumentRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskOperation

The response to send back to the client (wrapped by a task).

GetDocument(GetDocumentRequest, ServerCallContext)

public virtual Task<Document> GetDocument(GetDocumentRequest request, ServerCallContext context)

Retrieves the specified document.

Parameters
Name Description
request GetDocumentRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskDocument

The response to send back to the client (wrapped by a task).

ImportDocuments(ImportDocumentsRequest, ServerCallContext)

public virtual Task<Operation> ImportDocuments(ImportDocumentsRequest request, ServerCallContext context)

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
Name Description
request ImportDocumentsRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskOperation

The response to send back to the client (wrapped by a task).

ListDocuments(ListDocumentsRequest, ServerCallContext)

public virtual Task<ListDocumentsResponse> ListDocuments(ListDocumentsRequest request, ServerCallContext context)

Returns the list of all documents of the knowledge base.

Parameters
Name Description
request ListDocumentsRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskListDocumentsResponse

The response to send back to the client (wrapped by a task).

ReloadDocument(ReloadDocumentRequest, ServerCallContext)

public virtual Task<Operation> ReloadDocument(ReloadDocumentRequest request, ServerCallContext context)

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
Name Description
request ReloadDocumentRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskOperation

The response to send back to the client (wrapped by a task).

UpdateDocument(UpdateDocumentRequest, ServerCallContext)

public virtual Task<Operation> UpdateDocument(UpdateDocumentRequest request, ServerCallContext context)

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
Name Description
request UpdateDocumentRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskOperation

The response to send back to the client (wrapped by a task).