DocumentService

google.cloud.documentai.v1beta3. DocumentService

Represents a DocumentService

Constructor

new DocumentService(rpcImpl, requestDelimitedopt, responseDelimitedopt)

Constructs a new DocumentService 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

batchDeleteDocuments(request, callback) → {undefined}

Calls BatchDeleteDocuments.

Parameters:
Name Type Description
request google.cloud.documentai.v1beta3.IBatchDeleteDocumentsRequest

BatchDeleteDocumentsRequest message or plain object

callback google.cloud.documentai.v1beta3.DocumentService.BatchDeleteDocumentsCallback

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

Returns:
Type Description
undefined

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

Calls BatchDeleteDocuments.

Parameters:
Name Type Description
request google.cloud.documentai.v1beta3.IBatchDeleteDocumentsRequest

BatchDeleteDocumentsRequest message or plain object

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

Promise

getDatasetSchema(request, callback) → {undefined}

Calls GetDatasetSchema.

Parameters:
Name Type Description
request google.cloud.documentai.v1beta3.IGetDatasetSchemaRequest

GetDatasetSchemaRequest message or plain object

callback google.cloud.documentai.v1beta3.DocumentService.GetDatasetSchemaCallback

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

Returns:
Type Description
undefined

getDatasetSchema(request) → {Promise.<google.cloud.documentai.v1beta3.DatasetSchema>}

Calls GetDatasetSchema.

Parameters:
Name Type Description
request google.cloud.documentai.v1beta3.IGetDatasetSchemaRequest

GetDatasetSchemaRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.documentai.v1beta3.DatasetSchema>

Promise

getDocument(request, callback) → {undefined}

Calls GetDocument.

Parameters:
Name Type Description
request google.cloud.documentai.v1beta3.IGetDocumentRequest

GetDocumentRequest message or plain object

callback google.cloud.documentai.v1beta3.DocumentService.GetDocumentCallback

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

Returns:
Type Description
undefined

getDocument(request) → {Promise.<google.cloud.documentai.v1beta3.GetDocumentResponse>}

Calls GetDocument.

Parameters:
Name Type Description
request google.cloud.documentai.v1beta3.IGetDocumentRequest

GetDocumentRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.documentai.v1beta3.GetDocumentResponse>

Promise

importDocuments(request, callback) → {undefined}

Calls ImportDocuments.

Parameters:
Name Type Description
request google.cloud.documentai.v1beta3.IImportDocumentsRequest

ImportDocumentsRequest message or plain object

callback google.cloud.documentai.v1beta3.DocumentService.ImportDocumentsCallback

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

Returns:
Type Description
undefined

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

Calls ImportDocuments.

Parameters:
Name Type Description
request google.cloud.documentai.v1beta3.IImportDocumentsRequest

ImportDocumentsRequest message or plain object

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

Promise

listDocuments(request, callback) → {undefined}

Calls ListDocuments.

Parameters:
Name Type Description
request google.cloud.documentai.v1beta3.IListDocumentsRequest

ListDocumentsRequest message or plain object

callback google.cloud.documentai.v1beta3.DocumentService.ListDocumentsCallback

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

Returns:
Type Description
undefined

listDocuments(request) → {Promise.<google.cloud.documentai.v1beta3.ListDocumentsResponse>}

Calls ListDocuments.

Parameters:
Name Type Description
request google.cloud.documentai.v1beta3.IListDocumentsRequest

ListDocumentsRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.documentai.v1beta3.ListDocumentsResponse>

Promise

updateDataset(request, callback) → {undefined}

Calls UpdateDataset.

Parameters:
Name Type Description
request google.cloud.documentai.v1beta3.IUpdateDatasetRequest

UpdateDatasetRequest message or plain object

callback google.cloud.documentai.v1beta3.DocumentService.UpdateDatasetCallback

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

Returns:
Type Description
undefined

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

Calls UpdateDataset.

Parameters:
Name Type Description
request google.cloud.documentai.v1beta3.IUpdateDatasetRequest

UpdateDatasetRequest message or plain object

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

Promise

updateDatasetSchema(request, callback) → {undefined}

Calls UpdateDatasetSchema.

Parameters:
Name Type Description
request google.cloud.documentai.v1beta3.IUpdateDatasetSchemaRequest

UpdateDatasetSchemaRequest message or plain object

callback google.cloud.documentai.v1beta3.DocumentService.UpdateDatasetSchemaCallback

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

Returns:
Type Description
undefined

updateDatasetSchema(request) → {Promise.<google.cloud.documentai.v1beta3.DatasetSchema>}

Calls UpdateDatasetSchema.

Parameters:
Name Type Description
request google.cloud.documentai.v1beta3.IUpdateDatasetSchemaRequest

UpdateDatasetSchemaRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.documentai.v1beta3.DatasetSchema>

Promise

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

Creates new DocumentService 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
DocumentService

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

Type Definitions

BatchDeleteDocumentsCallback(error, responseopt)

Callback as used by batchDeleteDocuments.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.longrunning.Operation <optional>

Operation

GetDatasetSchemaCallback(error, responseopt)

Callback as used by getDatasetSchema.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.documentai.v1beta3.DatasetSchema <optional>

DatasetSchema

GetDocumentCallback(error, responseopt)

Callback as used by getDocument.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.documentai.v1beta3.GetDocumentResponse <optional>

GetDocumentResponse

ImportDocumentsCallback(error, responseopt)

Callback as used by importDocuments.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.longrunning.Operation <optional>

Operation

ListDocumentsCallback(error, responseopt)

Callback as used by listDocuments.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.documentai.v1beta3.ListDocumentsResponse <optional>

ListDocumentsResponse

UpdateDatasetCallback(error, responseopt)

Callback as used by updateDataset.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.longrunning.Operation <optional>

Operation

UpdateDatasetSchemaCallback(error, responseopt)

Callback as used by updateDatasetSchema.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.documentai.v1beta3.DatasetSchema <optional>

DatasetSchema