Class DocumentProcessorServiceGrpc.DocumentProcessorServiceStub (2.4.3)

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)

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>