reviewDocument method
Future<GoogleLongrunningOperation>
reviewDocument(
- GoogleCloudDocumentaiV1beta3ReviewDocumentRequest request,
- String humanReviewConfig, {
- String? $fields,
Send a document for Human Review.
The input document should be processed by the specified processor.
request
- The metadata request object.
Request parameters:
humanReviewConfig
- Required. The resource name of the HumanReviewConfig
that the document will be reviewed with.
Value must have pattern
^projects/\[^/\]+/locations/\[^/\]+/processors/\[^/\]+/humanReviewConfig$
.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a GoogleLongrunningOperation.
Completes with a commons.ApiRequestError if the API endpoint returned an error.
If the used http.Client
completes with an error when making a REST call,
this method will complete with the same error.
Implementation
async.Future<GoogleLongrunningOperation> reviewDocument(
GoogleCloudDocumentaiV1beta3ReviewDocumentRequest request,
core.String humanReviewConfig, {
core.String? $fields,
}) async {
final _body = convert.json.encode(request.toJson());
final _queryParams = <core.String, core.List<core.String>>{
if ($fields != null) 'fields': [$fields],
};
final _url = 'v1beta3/' +
core.Uri.encodeFull('$humanReviewConfig') +
':reviewDocument';
final _response = await _requester.request(
_url,
'POST',
body: _body,
queryParams: _queryParams,
);
return GoogleLongrunningOperation.fromJson(
_response as core.Map<core.String, core.dynamic>);
}