Class DocumentProcessorServiceGrpc.DocumentProcessorServiceStub (2.6.2)

Stay organized with collections Save and categorize content based on your preferences.
public static final class DocumentProcessorServiceGrpc.DocumentProcessorServiceStub extends AbstractAsyncStub<DocumentProcessorServiceGrpc.DocumentProcessorServiceStub>

Service to call Cloud DocumentAI to process documents according to the processor's definition. Processors are built using state-of-the-art Google AI such as natural language, computer vision, and translation to extract structured information from unstructured or semi-structured documents.

Inheritance

java.lang.Object > io.grpc.stub.AbstractStub > io.grpc.stub.AbstractAsyncStub > DocumentProcessorServiceGrpc.DocumentProcessorServiceStub

Methods

batchProcessDocuments(BatchProcessRequest request, StreamObserver<Operation> responseObserver)

public void batchProcessDocuments(BatchProcessRequest request, StreamObserver<Operation> responseObserver)

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

Parameters
NameDescription
requestBatchProcessRequest
responseObserverio.grpc.stub.StreamObserver<Operation>

build(Channel channel, CallOptions callOptions)

protected DocumentProcessorServiceGrpc.DocumentProcessorServiceStub build(Channel channel, CallOptions callOptions)
Parameters
NameDescription
channelio.grpc.Channel
callOptionsio.grpc.CallOptions
Returns
TypeDescription
DocumentProcessorServiceGrpc.DocumentProcessorServiceStub
Overrides
io.grpc.stub.AbstractStub.build(io.grpc.Channel,io.grpc.CallOptions)

createProcessor(CreateProcessorRequest request, StreamObserver<Processor> responseObserver)

public void createProcessor(CreateProcessorRequest request, StreamObserver<Processor> responseObserver)

Creates a processor from the type processor that the user chose. The processor will be at "ENABLED" state by default after its creation.

Parameters
NameDescription
requestCreateProcessorRequest
responseObserverio.grpc.stub.StreamObserver<Processor>

deleteProcessor(DeleteProcessorRequest request, StreamObserver<Operation> responseObserver)

public void deleteProcessor(DeleteProcessorRequest request, StreamObserver<Operation> responseObserver)

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

Parameters
NameDescription
requestDeleteProcessorRequest
responseObserverio.grpc.stub.StreamObserver<Operation>

disableProcessor(DisableProcessorRequest request, StreamObserver<Operation> responseObserver)

public void disableProcessor(DisableProcessorRequest request, StreamObserver<Operation> responseObserver)

Disables a processor

Parameters
NameDescription
requestDisableProcessorRequest
responseObserverio.grpc.stub.StreamObserver<Operation>

enableProcessor(EnableProcessorRequest request, StreamObserver<Operation> responseObserver)

public void enableProcessor(EnableProcessorRequest request, StreamObserver<Operation> responseObserver)

Enables a processor

Parameters
NameDescription
requestEnableProcessorRequest
responseObserverio.grpc.stub.StreamObserver<Operation>

fetchProcessorTypes(FetchProcessorTypesRequest request, StreamObserver<FetchProcessorTypesResponse> responseObserver)

public void fetchProcessorTypes(FetchProcessorTypesRequest request, StreamObserver<FetchProcessorTypesResponse> responseObserver)

Fetches processor types.

Parameters
NameDescription
requestFetchProcessorTypesRequest
responseObserverio.grpc.stub.StreamObserver<FetchProcessorTypesResponse>

listProcessors(ListProcessorsRequest request, StreamObserver<ListProcessorsResponse> responseObserver)

public void listProcessors(ListProcessorsRequest request, StreamObserver<ListProcessorsResponse> responseObserver)

Lists all processors which belong to this project.

Parameters
NameDescription
requestListProcessorsRequest
responseObserverio.grpc.stub.StreamObserver<ListProcessorsResponse>

processDocument(ProcessRequest request, StreamObserver<ProcessResponse> responseObserver)

public void processDocument(ProcessRequest request, StreamObserver<ProcessResponse> responseObserver)

Processes a single document.

Parameters
NameDescription
requestProcessRequest
responseObserverio.grpc.stub.StreamObserver<ProcessResponse>

reviewDocument(ReviewDocumentRequest request, StreamObserver<Operation> responseObserver)

public void reviewDocument(ReviewDocumentRequest request, StreamObserver<Operation> responseObserver)

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

Parameters
NameDescription
requestReviewDocumentRequest
responseObserverio.grpc.stub.StreamObserver<Operation>