Cloud Document AI v1 API - Class DocumentProcessorService.DocumentProcessorServiceBase (3.8.0)

[BindServiceMethod(typeof(DocumentProcessorService), "BindService")]
public abstract class DocumentProcessorService.DocumentProcessorServiceBase

Reference documentation and code samples for the Cloud Document AI v1 API class DocumentProcessorService.DocumentProcessorServiceBase.

Base class for server-side implementations of DocumentProcessorService

Inheritance

object > DocumentProcessorService.DocumentProcessorServiceBase

Namespace

Google.Cloud.DocumentAI.V1

Assembly

Google.Cloud.DocumentAI.V1.dll

Methods

BatchProcessDocuments(BatchProcessRequest, ServerCallContext)

public virtual Task<Operation> BatchProcessDocuments(BatchProcessRequest request, ServerCallContext context)

LRO endpoint to batch process many documents. The output is written to Cloud Storage as JSON in the [Document] format.

Parameters
NameDescription
requestBatchProcessRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
TaskOperation

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

CreateProcessor(CreateProcessorRequest, ServerCallContext)

public virtual Task<Processor> CreateProcessor(CreateProcessorRequest request, ServerCallContext context)

Creates a processor from the [ProcessorType][google.cloud.documentai.v1.ProcessorType] provided. The processor will be at ENABLED state by default after its creation.

Parameters
NameDescription
requestCreateProcessorRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
TaskProcessor

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

DeleteProcessor(DeleteProcessorRequest, ServerCallContext)

public virtual Task<Operation> DeleteProcessor(DeleteProcessorRequest request, ServerCallContext context)

Deletes the processor, unloads all deployed model artifacts if it was enabled and then deletes all artifacts associated with this processor.

Parameters
NameDescription
requestDeleteProcessorRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
TaskOperation

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

DeleteProcessorVersion(DeleteProcessorVersionRequest, ServerCallContext)

public virtual Task<Operation> DeleteProcessorVersion(DeleteProcessorVersionRequest request, ServerCallContext context)

Deletes the processor version, all artifacts under the processor version will be deleted.

Parameters
NameDescription
requestDeleteProcessorVersionRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
TaskOperation

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

DeployProcessorVersion(DeployProcessorVersionRequest, ServerCallContext)

public virtual Task<Operation> DeployProcessorVersion(DeployProcessorVersionRequest request, ServerCallContext context)

Deploys the processor version.

Parameters
NameDescription
requestDeployProcessorVersionRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
TaskOperation

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

DisableProcessor(DisableProcessorRequest, ServerCallContext)

public virtual Task<Operation> DisableProcessor(DisableProcessorRequest request, ServerCallContext context)

Disables a processor

Parameters
NameDescription
requestDisableProcessorRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
TaskOperation

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

EnableProcessor(EnableProcessorRequest, ServerCallContext)

public virtual Task<Operation> EnableProcessor(EnableProcessorRequest request, ServerCallContext context)

Enables a processor

Parameters
NameDescription
requestEnableProcessorRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
TaskOperation

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

EvaluateProcessorVersion(EvaluateProcessorVersionRequest, ServerCallContext)

public virtual Task<Operation> EvaluateProcessorVersion(EvaluateProcessorVersionRequest request, ServerCallContext context)

Evaluates a ProcessorVersion against annotated documents, producing an Evaluation.

Parameters
NameDescription
requestEvaluateProcessorVersionRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
TaskOperation

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

FetchProcessorTypes(FetchProcessorTypesRequest, ServerCallContext)

public virtual Task<FetchProcessorTypesResponse> FetchProcessorTypes(FetchProcessorTypesRequest request, ServerCallContext context)

Fetches processor types. Note that we don't use [ListProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.ListProcessorTypes] here, because it isn't paginated.

Parameters
NameDescription
requestFetchProcessorTypesRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
TaskFetchProcessorTypesResponse

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

GetEvaluation(GetEvaluationRequest, ServerCallContext)

public virtual Task<Evaluation> GetEvaluation(GetEvaluationRequest request, ServerCallContext context)

Retrieves a specific evaluation.

Parameters
NameDescription
requestGetEvaluationRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
TaskEvaluation

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

GetProcessor(GetProcessorRequest, ServerCallContext)

public virtual Task<Processor> GetProcessor(GetProcessorRequest request, ServerCallContext context)

Gets a processor detail.

Parameters
NameDescription
requestGetProcessorRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
TaskProcessor

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

GetProcessorType(GetProcessorTypeRequest, ServerCallContext)

public virtual Task<ProcessorType> GetProcessorType(GetProcessorTypeRequest request, ServerCallContext context)

Gets a processor type detail.

Parameters
NameDescription
requestGetProcessorTypeRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
TaskProcessorType

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

GetProcessorVersion(GetProcessorVersionRequest, ServerCallContext)

public virtual Task<ProcessorVersion> GetProcessorVersion(GetProcessorVersionRequest request, ServerCallContext context)

Gets a processor version detail.

Parameters
NameDescription
requestGetProcessorVersionRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
TaskProcessorVersion

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

ListEvaluations(ListEvaluationsRequest, ServerCallContext)

public virtual Task<ListEvaluationsResponse> ListEvaluations(ListEvaluationsRequest request, ServerCallContext context)

Retrieves a set of evaluations for a given processor version.

Parameters
NameDescription
requestListEvaluationsRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
TaskListEvaluationsResponse

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

ListProcessors(ListProcessorsRequest, ServerCallContext)

public virtual Task<ListProcessorsResponse> ListProcessors(ListProcessorsRequest request, ServerCallContext context)

Lists all processors which belong to this project.

Parameters
NameDescription
requestListProcessorsRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
TaskListProcessorsResponse

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

ListProcessorTypes(ListProcessorTypesRequest, ServerCallContext)

public virtual Task<ListProcessorTypesResponse> ListProcessorTypes(ListProcessorTypesRequest request, ServerCallContext context)

Lists the processor types that exist.

Parameters
NameDescription
requestListProcessorTypesRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
TaskListProcessorTypesResponse

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

ListProcessorVersions(ListProcessorVersionsRequest, ServerCallContext)

public virtual Task<ListProcessorVersionsResponse> ListProcessorVersions(ListProcessorVersionsRequest request, ServerCallContext context)

Lists all versions of a processor.

Parameters
NameDescription
requestListProcessorVersionsRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
TaskListProcessorVersionsResponse

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

ProcessDocument(ProcessRequest, ServerCallContext)

public virtual Task<ProcessResponse> ProcessDocument(ProcessRequest request, ServerCallContext context)

Processes a single document.

Parameters
NameDescription
requestProcessRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
TaskProcessResponse

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

ReviewDocument(ReviewDocumentRequest, ServerCallContext)

public virtual Task<Operation> ReviewDocument(ReviewDocumentRequest request, ServerCallContext context)

Send a document for Human Review. The input document should be processed by the specified processor.

Parameters
NameDescription
requestReviewDocumentRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
TaskOperation

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

SetDefaultProcessorVersion(SetDefaultProcessorVersionRequest, ServerCallContext)

public virtual Task<Operation> SetDefaultProcessorVersion(SetDefaultProcessorVersionRequest request, ServerCallContext context)

Set the default (active) version of a [Processor][google.cloud.documentai.v1.Processor] that will be used in [ProcessDocument][google.cloud.documentai.v1.DocumentProcessorService.ProcessDocument] and [BatchProcessDocuments][google.cloud.documentai.v1.DocumentProcessorService.BatchProcessDocuments].

Parameters
NameDescription
requestSetDefaultProcessorVersionRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
TaskOperation

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

TrainProcessorVersion(TrainProcessorVersionRequest, ServerCallContext)

public virtual Task<Operation> TrainProcessorVersion(TrainProcessorVersionRequest request, ServerCallContext context)

Trains a new processor version. Operation metadata is returned as [TrainProcessorVersionMetadata][google.cloud.documentai.v1.TrainProcessorVersionMetadata].

Parameters
NameDescription
requestTrainProcessorVersionRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
TaskOperation

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

UndeployProcessorVersion(UndeployProcessorVersionRequest, ServerCallContext)

public virtual Task<Operation> UndeployProcessorVersion(UndeployProcessorVersionRequest request, ServerCallContext context)

Undeploys the processor version.

Parameters
NameDescription
requestUndeployProcessorVersionRequest

The request received from the client.

contextServerCallContext

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

Returns
TypeDescription
TaskOperation

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