DocumentUnderstandingService

google.cloud.documentai.v1beta2. DocumentUnderstandingService

Represents a DocumentUnderstandingService

Constructor

new DocumentUnderstandingService(rpcImpl, requestDelimitedopt, responseDelimitedopt)

Constructs a new DocumentUnderstandingService service.

Parameters:
Name Type Attributes Default Description
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean <optional>
false

Whether requests are length-delimited

responseDelimited boolean <optional>
false

Whether responses are length-delimited

Extends

  • $protobuf.rpc.Service

Methods

batchProcessDocuments(request, callback) → {undefined}

Calls BatchProcessDocuments.

Parameters:
Name Type Description
request google.cloud.documentai.v1beta2.IBatchProcessDocumentsRequest

BatchProcessDocumentsRequest message or plain object

callback google.cloud.documentai.v1beta2.DocumentUnderstandingService.BatchProcessDocumentsCallback

Node-style callback called with the error, if any, and Operation

Returns:
Type Description
undefined

batchProcessDocuments(request) → {Promise.<google.longrunning.Operation>}

Calls BatchProcessDocuments.

Parameters:
Name Type Description
request google.cloud.documentai.v1beta2.IBatchProcessDocumentsRequest

BatchProcessDocumentsRequest message or plain object

Returns:
Type Description
Promise.<google.longrunning.Operation>

Promise

processDocument(request, callback) → {undefined}

Calls ProcessDocument.

Parameters:
Name Type Description
request google.cloud.documentai.v1beta2.IProcessDocumentRequest

ProcessDocumentRequest message or plain object

callback google.cloud.documentai.v1beta2.DocumentUnderstandingService.ProcessDocumentCallback

Node-style callback called with the error, if any, and Document

Returns:
Type Description
undefined

processDocument(request) → {Promise.<google.cloud.documentai.v1beta2.Document>}

Calls ProcessDocument.

Parameters:
Name Type Description
request google.cloud.documentai.v1beta2.IProcessDocumentRequest

ProcessDocumentRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.documentai.v1beta2.Document>

Promise

(static) create(rpcImpl, requestDelimitedopt, responseDelimitedopt) → {DocumentUnderstandingService}

Creates new DocumentUnderstandingService service using the specified rpc implementation.

Parameters:
Name Type Attributes Default Description
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean <optional>
false

Whether requests are length-delimited

responseDelimited boolean <optional>
false

Whether responses are length-delimited

Returns:
Type Description
DocumentUnderstandingService

RPC service. Useful where requests and/or responses are streamed.

Type Definitions

BatchProcessDocumentsCallback(error, responseopt)

Callback as used by batchProcessDocuments.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.longrunning.Operation <optional>

Operation

ProcessDocumentCallback(error, responseopt)

Callback as used by processDocument.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.documentai.v1beta2.Document <optional>

Document