Class DocumentProcessorServiceClient (2.31.0)

Service to call Document AI 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.

Equality

Instances of this class created via copy-construction or copy-assignment always compare equal. Instances created with equal std::shared_ptr<*Connection> objects compare equal. Objects that compare equal share the same underlying resources.

Performance

Creating a new instance of this class is a relatively expensive operation, new objects establish new connections to the service. In contrast, copy-construction, move-construction, and the corresponding assignment operations are relatively efficient as the copies share all underlying resources.

Thread Safety

Concurrent access to different instances of this class, even if they compare equal, is guaranteed to work. Two or more threads operating on the same instance of this class is not guaranteed to work. Since copy-construction and move-construction is a relatively efficient operation, consider using such a copy when using this class from multiple threads.

Constructors

DocumentProcessorServiceClient(DocumentProcessorServiceClient const &)

Copy and move support

Parameter
Name Description
DocumentProcessorServiceClient const &

DocumentProcessorServiceClient(DocumentProcessorServiceClient &&)

Copy and move support

Parameter
Name Description
DocumentProcessorServiceClient &&

DocumentProcessorServiceClient(std::shared_ptr< DocumentProcessorServiceConnection >, Options)

Parameters
Name Description
connection std::shared_ptr< DocumentProcessorServiceConnection >
opts Options

Operators

operator=(DocumentProcessorServiceClient const &)

Copy and move support

Parameter
Name Description
DocumentProcessorServiceClient const &
Returns
Type Description
DocumentProcessorServiceClient &

operator=(DocumentProcessorServiceClient &&)

Copy and move support

Parameter
Name Description
DocumentProcessorServiceClient &&
Returns
Type Description
DocumentProcessorServiceClient &

Functions

ProcessDocument(std::string const &, Options)

Processes a single document.

Parameters
Name Description
name std::string const &

Required. The resource name of the Processor or ProcessorVersion to use for processing. If a Processor is specified, the server will use its default version. Format: projects/{project}/locations/{location}/processors/{processor}, or projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::documentai::v1::ProcessResponse >

the result of the RPC. The response message type (google.cloud.documentai.v1.ProcessResponse) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

ProcessDocument(google::cloud::documentai::v1::ProcessRequest const &, Options)

Processes a single document.

Parameters
Name Description
request google::cloud::documentai::v1::ProcessRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.documentai.v1.ProcessRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::documentai::v1::ProcessResponse >

the result of the RPC. The response message type (google.cloud.documentai.v1.ProcessResponse) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

BatchProcessDocuments(std::string const &, Options)

LRO endpoint to batch process many documents.

The output is written to Cloud Storage as JSON in the [Document] format.

Parameters
Name Description
name std::string const &

Required. The resource name of Processor or ProcessorVersion. Format: projects/{project}/locations/{location}/processors/{processor}, or projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::documentai::v1::BatchProcessResponse > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.documentai.v1.BatchProcessResponse proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

BatchProcessDocuments(NoAwaitTag, std::string const &, Options)

LRO endpoint to batch process many documents.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
name std::string const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

BatchProcessDocuments(google::cloud::documentai::v1::BatchProcessRequest const &, Options)

LRO endpoint to batch process many documents.

The output is written to Cloud Storage as JSON in the [Document] format.

Parameters
Name Description
request google::cloud::documentai::v1::BatchProcessRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.documentai.v1.BatchProcessRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::documentai::v1::BatchProcessResponse > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.documentai.v1.BatchProcessResponse proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

BatchProcessDocuments(NoAwaitTag, google::cloud::documentai::v1::BatchProcessRequest const &, Options)

LRO endpoint to batch process many documents.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
request google::cloud::documentai::v1::BatchProcessRequest const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

BatchProcessDocuments(google::longrunning::Operation const &, Options)

LRO endpoint to batch process many documents.

This method accepts a google::longrunning::Operation that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

Parameters
Name Description
operation google::longrunning::Operation const &
opts Options
Returns
Type Description
future< StatusOr< google::cloud::documentai::v1::BatchProcessResponse > >

FetchProcessorTypes(std::string const &, Options)

Fetches processor types.

Note that we don't use ListProcessorTypes here, because it isn't paginated.

Parameters
Name Description
parent std::string const &

Required. The location of processor types to list. Format: projects/{project}/locations/{location}.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::documentai::v1::FetchProcessorTypesResponse >

the result of the RPC. The response message type (google.cloud.documentai.v1.FetchProcessorTypesResponse) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

FetchProcessorTypes(google::cloud::documentai::v1::FetchProcessorTypesRequest const &, Options)

Fetches processor types.

Note that we don't use ListProcessorTypes here, because it isn't paginated.

Parameters
Name Description
request google::cloud::documentai::v1::FetchProcessorTypesRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.documentai.v1.FetchProcessorTypesRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::documentai::v1::FetchProcessorTypesResponse >

the result of the RPC. The response message type (google.cloud.documentai.v1.FetchProcessorTypesResponse) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

ListProcessorTypes(std::string const &, Options)

Lists the processor types that exist.

Parameters
Name Description
parent std::string const &

Required. The location of processor types to list. Format: projects/{project}/locations/{location}.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::cloud::documentai::v1::ProcessorType >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.documentai.v1.ProcessorType, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListProcessorTypes(google::cloud::documentai::v1::ListProcessorTypesRequest, Options)

Lists the processor types that exist.

Parameters
Name Description
request google::cloud::documentai::v1::ListProcessorTypesRequest

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.documentai.v1.ListProcessorTypesRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::cloud::documentai::v1::ProcessorType >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.documentai.v1.ProcessorType, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

GetProcessorType(std::string const &, Options)

Gets a processor type detail.

Parameters
Name Description
name std::string const &

Required. The processor type resource name.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::documentai::v1::ProcessorType >

the result of the RPC. The response message type (google.cloud.documentai.v1.ProcessorType) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetProcessorType(google::cloud::documentai::v1::GetProcessorTypeRequest const &, Options)

Gets a processor type detail.

Parameters
Name Description
request google::cloud::documentai::v1::GetProcessorTypeRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.documentai.v1.GetProcessorTypeRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::documentai::v1::ProcessorType >

the result of the RPC. The response message type (google.cloud.documentai.v1.ProcessorType) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

ListProcessors(std::string const &, Options)

Lists all processors which belong to this project.

Parameters
Name Description
parent std::string const &

Required. The parent (project and location) which owns this collection of Processors. Format: projects/{project}/locations/{location}

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::cloud::documentai::v1::Processor >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.documentai.v1.Processor, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListProcessors(google::cloud::documentai::v1::ListProcessorsRequest, Options)

Lists all processors which belong to this project.

Parameters
Name Description
request google::cloud::documentai::v1::ListProcessorsRequest

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.documentai.v1.ListProcessorsRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::cloud::documentai::v1::Processor >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.documentai.v1.Processor, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

GetProcessor(std::string const &, Options)

Gets a processor detail.

Parameters
Name Description
name std::string const &

Required. The processor resource name.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::documentai::v1::Processor >

the result of the RPC. The response message type (google.cloud.documentai.v1.Processor) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetProcessor(google::cloud::documentai::v1::GetProcessorRequest const &, Options)

Gets a processor detail.

Parameters
Name Description
request google::cloud::documentai::v1::GetProcessorRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.documentai.v1.GetProcessorRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::documentai::v1::Processor >

the result of the RPC. The response message type (google.cloud.documentai.v1.Processor) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

TrainProcessorVersion(std::string const &, google::cloud::documentai::v1::ProcessorVersion const &, Options)

Trains a new processor version.

Operation metadata is returned as TrainProcessorVersionMetadata.

Parameters
Name Description
parent std::string const &

Required. The parent (project, location and processor) to create the new version for. Format: projects/{project}/locations/{location}/processors/{processor}.

processor_version google::cloud::documentai::v1::ProcessorVersion const &

Required. The processor version to be created.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::documentai::v1::TrainProcessorVersionResponse > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.documentai.v1.TrainProcessorVersionResponse proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

TrainProcessorVersion(NoAwaitTag, std::string const &, google::cloud::documentai::v1::ProcessorVersion const &, Options)

Trains a new processor version.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
parent std::string const &
processor_version google::cloud::documentai::v1::ProcessorVersion const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

TrainProcessorVersion(google::cloud::documentai::v1::TrainProcessorVersionRequest const &, Options)

Trains a new processor version.

Operation metadata is returned as TrainProcessorVersionMetadata.

Parameters
Name Description
request google::cloud::documentai::v1::TrainProcessorVersionRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.documentai.v1.TrainProcessorVersionRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::documentai::v1::TrainProcessorVersionResponse > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.documentai.v1.TrainProcessorVersionResponse proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

TrainProcessorVersion(NoAwaitTag, google::cloud::documentai::v1::TrainProcessorVersionRequest const &, Options)

Trains a new processor version.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
request google::cloud::documentai::v1::TrainProcessorVersionRequest const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

TrainProcessorVersion(google::longrunning::Operation const &, Options)

Trains a new processor version.

This method accepts a google::longrunning::Operation that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

Parameters
Name Description
operation google::longrunning::Operation const &
opts Options
Returns
Type Description
future< StatusOr< google::cloud::documentai::v1::TrainProcessorVersionResponse > >

GetProcessorVersion(std::string const &, Options)

Gets a processor version detail.

Parameters
Name Description
name std::string const &

Required. The processor resource name.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::documentai::v1::ProcessorVersion >

the result of the RPC. The response message type (google.cloud.documentai.v1.ProcessorVersion) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetProcessorVersion(google::cloud::documentai::v1::GetProcessorVersionRequest const &, Options)

Gets a processor version detail.

Parameters
Name Description
request google::cloud::documentai::v1::GetProcessorVersionRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.documentai.v1.GetProcessorVersionRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::documentai::v1::ProcessorVersion >

the result of the RPC. The response message type (google.cloud.documentai.v1.ProcessorVersion) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

ListProcessorVersions(std::string const &, Options)

Lists all versions of a processor.

Parameters
Name Description
parent std::string const &

Required. The parent (project, location and processor) to list all versions. Format: projects/{project}/locations/{location}/processors/{processor}

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::cloud::documentai::v1::ProcessorVersion >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.documentai.v1.ProcessorVersion, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListProcessorVersions(google::cloud::documentai::v1::ListProcessorVersionsRequest, Options)

Lists all versions of a processor.

Parameters
Name Description
request google::cloud::documentai::v1::ListProcessorVersionsRequest

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.documentai.v1.ListProcessorVersionsRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::cloud::documentai::v1::ProcessorVersion >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.documentai.v1.ProcessorVersion, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

DeleteProcessorVersion(std::string const &, Options)

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

Parameters
Name Description
name std::string const &

Required. The processor version resource name to be deleted.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::documentai::v1::DeleteProcessorVersionMetadata > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.documentai.v1.DeleteProcessorVersionMetadata proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

DeleteProcessorVersion(NoAwaitTag, std::string const &, Options)

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

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
name std::string const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

DeleteProcessorVersion(google::cloud::documentai::v1::DeleteProcessorVersionRequest const &, Options)

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

Parameters
Name Description
request google::cloud::documentai::v1::DeleteProcessorVersionRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.documentai.v1.DeleteProcessorVersionRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::documentai::v1::DeleteProcessorVersionMetadata > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.documentai.v1.DeleteProcessorVersionMetadata proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

DeleteProcessorVersion(NoAwaitTag, google::cloud::documentai::v1::DeleteProcessorVersionRequest const &, Options)

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

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
request google::cloud::documentai::v1::DeleteProcessorVersionRequest const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

DeleteProcessorVersion(google::longrunning::Operation const &, Options)

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

This method accepts a google::longrunning::Operation that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

Parameters
Name Description
operation google::longrunning::Operation const &
opts Options
Returns
Type Description
future< StatusOr< google::cloud::documentai::v1::DeleteProcessorVersionMetadata > >

DeployProcessorVersion(std::string const &, Options)

Deploys the processor version.

Parameters
Name Description
name std::string const &

Required. The processor version resource name to be deployed.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::documentai::v1::DeployProcessorVersionResponse > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.documentai.v1.DeployProcessorVersionResponse proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

DeployProcessorVersion(NoAwaitTag, std::string const &, Options)

Deploys the processor version.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
name std::string const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

DeployProcessorVersion(google::cloud::documentai::v1::DeployProcessorVersionRequest const &, Options)

Deploys the processor version.

Parameters
Name Description
request google::cloud::documentai::v1::DeployProcessorVersionRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.documentai.v1.DeployProcessorVersionRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::documentai::v1::DeployProcessorVersionResponse > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.documentai.v1.DeployProcessorVersionResponse proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

DeployProcessorVersion(NoAwaitTag, google::cloud::documentai::v1::DeployProcessorVersionRequest const &, Options)

Deploys the processor version.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
request google::cloud::documentai::v1::DeployProcessorVersionRequest const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

DeployProcessorVersion(google::longrunning::Operation const &, Options)

Deploys the processor version.

This method accepts a google::longrunning::Operation that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

Parameters
Name Description
operation google::longrunning::Operation const &
opts Options
Returns
Type Description
future< StatusOr< google::cloud::documentai::v1::DeployProcessorVersionResponse > >

UndeployProcessorVersion(std::string const &, Options)

Undeploys the processor version.

Parameters
Name Description
name std::string const &

Required. The processor version resource name to be undeployed.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::documentai::v1::UndeployProcessorVersionResponse > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.documentai.v1.UndeployProcessorVersionResponse proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

UndeployProcessorVersion(NoAwaitTag, std::string const &, Options)

Undeploys the processor version.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
name std::string const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

UndeployProcessorVersion(google::cloud::documentai::v1::UndeployProcessorVersionRequest const &, Options)

Undeploys the processor version.

Parameters
Name Description
request google::cloud::documentai::v1::UndeployProcessorVersionRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.documentai.v1.UndeployProcessorVersionRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::documentai::v1::UndeployProcessorVersionResponse > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.documentai.v1.UndeployProcessorVersionResponse proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

UndeployProcessorVersion(NoAwaitTag, google::cloud::documentai::v1::UndeployProcessorVersionRequest const &, Options)

Undeploys the processor version.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
request google::cloud::documentai::v1::UndeployProcessorVersionRequest const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

UndeployProcessorVersion(google::longrunning::Operation const &, Options)

Undeploys the processor version.

This method accepts a google::longrunning::Operation that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

Parameters
Name Description
operation google::longrunning::Operation const &
opts Options
Returns
Type Description
future< StatusOr< google::cloud::documentai::v1::UndeployProcessorVersionResponse > >

CreateProcessor(std::string const &, google::cloud::documentai::v1::Processor const &, Options)

Creates a processor from the ProcessorType provided.

The processor will be at ENABLED state by default after its creation. Note that this method requires the documentai.processors.create permission on the project, which is highly privileged. A user or service account with this permission can create new processors that can interact with any gcs bucket in your project.

Parameters
Name Description
parent std::string const &

Required. The parent (project and location) under which to create the processor. Format: projects/{project}/locations/{location}

processor google::cloud::documentai::v1::Processor const &

Required. The processor to be created, requires Processor.type and Processor.display_name to be set. Also, the Processor.kms_key_name field must be set if the processor is under CMEK.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::documentai::v1::Processor >

the result of the RPC. The response message type (google.cloud.documentai.v1.Processor) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

CreateProcessor(google::cloud::documentai::v1::CreateProcessorRequest const &, Options)

Creates a processor from the ProcessorType provided.

The processor will be at ENABLED state by default after its creation. Note that this method requires the documentai.processors.create permission on the project, which is highly privileged. A user or service account with this permission can create new processors that can interact with any gcs bucket in your project.

Parameters
Name Description
request google::cloud::documentai::v1::CreateProcessorRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.documentai.v1.CreateProcessorRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::documentai::v1::Processor >

the result of the RPC. The response message type (google.cloud.documentai.v1.Processor) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

DeleteProcessor(std::string const &, Options)

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

Parameters
Name Description
name std::string const &

Required. The processor resource name to be deleted.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::documentai::v1::DeleteProcessorMetadata > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.documentai.v1.DeleteProcessorMetadata proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

DeleteProcessor(NoAwaitTag, std::string const &, Options)

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

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
name std::string const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

DeleteProcessor(google::cloud::documentai::v1::DeleteProcessorRequest const &, Options)

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

Parameters
Name Description
request google::cloud::documentai::v1::DeleteProcessorRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.documentai.v1.DeleteProcessorRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::documentai::v1::DeleteProcessorMetadata > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.documentai.v1.DeleteProcessorMetadata proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

DeleteProcessor(NoAwaitTag, google::cloud::documentai::v1::DeleteProcessorRequest const &, Options)

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

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
request google::cloud::documentai::v1::DeleteProcessorRequest const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

DeleteProcessor(google::longrunning::Operation const &, Options)

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

This method accepts a google::longrunning::Operation that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

Parameters
Name Description
operation google::longrunning::Operation const &
opts Options
Returns
Type Description
future< StatusOr< google::cloud::documentai::v1::DeleteProcessorMetadata > >

EnableProcessor(google::cloud::documentai::v1::EnableProcessorRequest const &, Options)

Enables a processor.

Parameters
Name Description
request google::cloud::documentai::v1::EnableProcessorRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.documentai.v1.EnableProcessorRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::documentai::v1::EnableProcessorResponse > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.documentai.v1.EnableProcessorResponse proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

EnableProcessor(NoAwaitTag, google::cloud::documentai::v1::EnableProcessorRequest const &, Options)

Enables a processor.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
request google::cloud::documentai::v1::EnableProcessorRequest const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

EnableProcessor(google::longrunning::Operation const &, Options)

Enables a processor.

This method accepts a google::longrunning::Operation that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

Parameters
Name Description
operation google::longrunning::Operation const &
opts Options
Returns
Type Description
future< StatusOr< google::cloud::documentai::v1::EnableProcessorResponse > >

DisableProcessor(google::cloud::documentai::v1::DisableProcessorRequest const &, Options)

Disables a processor.

Parameters
Name Description
request google::cloud::documentai::v1::DisableProcessorRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.documentai.v1.DisableProcessorRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::documentai::v1::DisableProcessorResponse > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.documentai.v1.DisableProcessorResponse proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

DisableProcessor(NoAwaitTag, google::cloud::documentai::v1::DisableProcessorRequest const &, Options)

Disables a processor.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
request google::cloud::documentai::v1::DisableProcessorRequest const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

DisableProcessor(google::longrunning::Operation const &, Options)

Disables a processor.

This method accepts a google::longrunning::Operation that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

Parameters
Name Description
operation google::longrunning::Operation const &
opts Options
Returns
Type Description
future< StatusOr< google::cloud::documentai::v1::DisableProcessorResponse > >

SetDefaultProcessorVersion(google::cloud::documentai::v1::SetDefaultProcessorVersionRequest const &, Options)

Set the default (active) version of a Processor that will be used in ProcessDocument and BatchProcessDocuments.

Parameters
Name Description
request google::cloud::documentai::v1::SetDefaultProcessorVersionRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.documentai.v1.SetDefaultProcessorVersionRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::documentai::v1::SetDefaultProcessorVersionResponse > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.documentai.v1.SetDefaultProcessorVersionResponse proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

SetDefaultProcessorVersion(NoAwaitTag, google::cloud::documentai::v1::SetDefaultProcessorVersionRequest const &, Options)

Set the default (active) version of a Processor that will be used in ProcessDocument and BatchProcessDocuments.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
request google::cloud::documentai::v1::SetDefaultProcessorVersionRequest const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

SetDefaultProcessorVersion(google::longrunning::Operation const &, Options)

Set the default (active) version of a Processor that will be used in ProcessDocument and BatchProcessDocuments.

This method accepts a google::longrunning::Operation that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

Parameters
Name Description
operation google::longrunning::Operation const &
opts Options
Returns
Type Description
future< StatusOr< google::cloud::documentai::v1::SetDefaultProcessorVersionResponse > >

ReviewDocument(std::string const &, Options)

Send a document for Human Review.

The input document should be processed by the specified processor.

Parameters
Name Description
human_review_config std::string const &

Required. The resource name of the [HumanReviewConfig][google.cloud.documentai.v1.HumanReviewConfig] that the document will be reviewed with.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::documentai::v1::ReviewDocumentResponse > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.documentai.v1.ReviewDocumentResponse proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

ReviewDocument(NoAwaitTag, std::string const &, Options)

Send a document for Human Review.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
human_review_config std::string const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

ReviewDocument(google::cloud::documentai::v1::ReviewDocumentRequest const &, Options)

Send a document for Human Review.

The input document should be processed by the specified processor.

Parameters
Name Description
request google::cloud::documentai::v1::ReviewDocumentRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.documentai.v1.ReviewDocumentRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::documentai::v1::ReviewDocumentResponse > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.documentai.v1.ReviewDocumentResponse proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

ReviewDocument(NoAwaitTag, google::cloud::documentai::v1::ReviewDocumentRequest const &, Options)

Send a document for Human Review.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
request google::cloud::documentai::v1::ReviewDocumentRequest const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

ReviewDocument(google::longrunning::Operation const &, Options)

Send a document for Human Review.

This method accepts a google::longrunning::Operation that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

Parameters
Name Description
operation google::longrunning::Operation const &
opts Options
Returns
Type Description
future< StatusOr< google::cloud::documentai::v1::ReviewDocumentResponse > >

EvaluateProcessorVersion(std::string const &, Options)

Evaluates a ProcessorVersion against annotated documents, producing an Evaluation.

Parameters
Name Description
processor_version std::string const &

Required. The resource name of the ProcessorVersion to evaluate. projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::documentai::v1::EvaluateProcessorVersionResponse > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.documentai.v1.EvaluateProcessorVersionResponse proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

EvaluateProcessorVersion(NoAwaitTag, std::string const &, Options)

Evaluates a ProcessorVersion against annotated documents, producing an Evaluation.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
processor_version std::string const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

EvaluateProcessorVersion(google::cloud::documentai::v1::EvaluateProcessorVersionRequest const &, Options)

Evaluates a ProcessorVersion against annotated documents, producing an Evaluation.

Parameters
Name Description
request google::cloud::documentai::v1::EvaluateProcessorVersionRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.documentai.v1.EvaluateProcessorVersionRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::documentai::v1::EvaluateProcessorVersionResponse > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.documentai.v1.EvaluateProcessorVersionResponse proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

EvaluateProcessorVersion(NoAwaitTag, google::cloud::documentai::v1::EvaluateProcessorVersionRequest const &, Options)

Evaluates a ProcessorVersion against annotated documents, producing an Evaluation.

Specifying the NoAwaitTag immediately returns the [google::longrunning::Operation] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.

Parameters
Name Description
NoAwaitTag
request google::cloud::documentai::v1::EvaluateProcessorVersionRequest const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

EvaluateProcessorVersion(google::longrunning::Operation const &, Options)

Evaluates a ProcessorVersion against annotated documents, producing an Evaluation.

This method accepts a google::longrunning::Operation that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.

Parameters
Name Description
operation google::longrunning::Operation const &
opts Options
Returns
Type Description
future< StatusOr< google::cloud::documentai::v1::EvaluateProcessorVersionResponse > >

GetEvaluation(std::string const &, Options)

Retrieves a specific evaluation.

Parameters
Name Description
name std::string const &

Required. The resource name of the Evaluation to get. projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::documentai::v1::Evaluation >

the result of the RPC. The response message type (google.cloud.documentai.v1.Evaluation) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetEvaluation(google::cloud::documentai::v1::GetEvaluationRequest const &, Options)

Retrieves a specific evaluation.

Parameters
Name Description
request google::cloud::documentai::v1::GetEvaluationRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.documentai.v1.GetEvaluationRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::documentai::v1::Evaluation >

the result of the RPC. The response message type (google.cloud.documentai.v1.Evaluation) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

ListEvaluations(std::string const &, Options)

Retrieves a set of evaluations for a given processor version.

Parameters
Name Description
parent std::string const &

Required. The resource name of the ProcessorVersion to list evaluations for. projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::cloud::documentai::v1::Evaluation >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.documentai.v1.Evaluation, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListEvaluations(google::cloud::documentai::v1::ListEvaluationsRequest, Options)

Retrieves a set of evaluations for a given processor version.

Parameters
Name Description
request google::cloud::documentai::v1::ListEvaluationsRequest

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.documentai.v1.ListEvaluationsRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::cloud::documentai::v1::Evaluation >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.documentai.v1.Evaluation, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListLocations(google::cloud::location::ListLocationsRequest, Options)

Lists information about the supported locations for this service.

Parameters
Name Description
request google::cloud::location::ListLocationsRequest

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.location.ListLocationsRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::cloud::location::Location >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.location.Location, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

GetLocation(google::cloud::location::GetLocationRequest const &, Options)

Gets information about a location.

Parameters
Name Description
request google::cloud::location::GetLocationRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.location.GetLocationRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::location::Location >

the result of the RPC. The response message type (google.cloud.location.Location) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

ListOperations(std::string const &, std::string const &, Options)

Lists operations that match the specified filter in the request.

If the server doesn't support this method, it returns UNIMPLEMENTED.

NOTE: the name binding allows API services to override the binding to use different resource name schemes, such as users/*/operations. To override the binding, API services can add a binding such as "/v1/{name=users/*}/operations" to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.

Parameters
Name Description
name std::string const &

The name of the operation's parent resource.

filter std::string const &

The standard list filter.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::longrunning::Operation >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.longrunning.Operation, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListOperations(google::longrunning::ListOperationsRequest, Options)

Lists operations that match the specified filter in the request.

If the server doesn't support this method, it returns UNIMPLEMENTED.

NOTE: the name binding allows API services to override the binding to use different resource name schemes, such as users/*/operations. To override the binding, API services can add a binding such as "/v1/{name=users/*}/operations" to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.

Parameters
Name Description
request google::longrunning::ListOperationsRequest

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.longrunning.ListOperationsRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::longrunning::Operation >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.longrunning.Operation, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

GetOperation(std::string const &, Options)

Gets the latest state of a long-running operation.

Clients can use this method to poll the operation result at intervals as recommended by the API service.

Parameters
Name Description
name std::string const &

The name of the operation resource.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::longrunning::Operation >

the result of the RPC. The response message type (google.longrunning.Operation) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetOperation(google::longrunning::GetOperationRequest const &, Options)

Gets the latest state of a long-running operation.

Clients can use this method to poll the operation result at intervals as recommended by the API service.

Parameters
Name Description
request google::longrunning::GetOperationRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.longrunning.GetOperationRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::longrunning::Operation >

the result of the RPC. The response message type (google.longrunning.Operation) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

CancelOperation(std::string const &, Options)

Starts asynchronous cancellation on a long-running operation.

The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.

Parameters
Name Description
name std::string const &

The name of the operation resource to be cancelled.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
Status

a Status object. If the request failed, the status contains the details of the failure.

CancelOperation(google::longrunning::CancelOperationRequest const &, Options)

Starts asynchronous cancellation on a long-running operation.

The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.

Parameters
Name Description
request google::longrunning::CancelOperationRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.longrunning.CancelOperationRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
Status

a Status object. If the request failed, the status contains the details of the failure.