Skip to content

Commit 87fc4d4

Browse files
Google APIscopybara-github
authored andcommitted
feat: update ReviewDocumentRequest to allow set priority and enable validation.
PiperOrigin-RevId: 380732771
1 parent a5cec0a commit 87fc4d4

2 files changed

Lines changed: 32 additions & 2 deletions

File tree

google/cloud/documentai/v1/document.proto

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,9 @@ message Document {
324324
// - "unfilled_checkbox"
325325
// - "filled_checkbox"
326326
string value_type = 5;
327+
328+
// The history of this annotation.
329+
Provenance provenance = 8;
327330
}
328331

329332
// Detected language for a structural component.
@@ -385,6 +388,9 @@ message Document {
385388

386389
// A list of visually detected form fields on the page.
387390
repeated FormField form_fields = 11;
391+
392+
// The history of this page.
393+
Provenance provenance = 16;
388394
}
389395

390396
// A phrase in the text that is a known entity type, such as a person, an
@@ -536,6 +542,8 @@ message Document {
536542

537543
// Required. Index into the [Document.pages][google.cloud.documentai.v1.Document.pages] element, for example using
538544
// [Document.pages][page_refs.page] to locate the related page element.
545+
// This field is skipped when its value is the default 0. See
546+
// https://developers.google.com/protocol-buffers/docs/proto3#json.
539547
int64 page = 1 [(google.api.field_behavior) = REQUIRED];
540548

541549
// Optional. The type of the layout element that is being referenced if any.
@@ -568,8 +576,12 @@ message Document {
568576
// The index of the [Document.revisions] identifying the parent revision.
569577
int32 revision = 1;
570578

579+
// The index of the parent revisions corresponding collection of items
580+
// (eg. list of entities, properties within entities, etc.)
581+
int32 index = 3;
582+
571583
// The id of the parent provenance.
572-
int32 id = 2;
584+
int32 id = 2 [deprecated = true];
573585
}
574586

575587
// If a processor or agent does an explicit operation on existing elements.
@@ -602,7 +614,7 @@ message Document {
602614

603615
// The Id of this operation. Needs to be unique within the scope of the
604616
// revision.
605-
int32 id = 2;
617+
int32 id = 2 [deprecated = true];
606618

607619
// References to the original elements that are replaced.
608620
repeated Parent parents = 3;

google/cloud/documentai/v1/document_processor_service.proto

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,18 @@ message BatchProcessMetadata {
254254

255255
// Request message for review document method.
256256
message ReviewDocumentRequest {
257+
reserved 2;
258+
259+
// The priority level of the human review task.
260+
enum Priority {
261+
// The default priority level.
262+
DEFAULT = 0;
263+
264+
// The urgent priority level. The labeling manager should allocate labeler
265+
// resource to the urgent task queue to respect this priority level.
266+
URGENT = 1;
267+
}
268+
257269
// The document payload.
258270
oneof source {
259271
// An inline document proto.
@@ -268,6 +280,12 @@ message ReviewDocumentRequest {
268280
type: "documentai.googleapis.com/HumanReviewConfig"
269281
}
270282
];
283+
284+
// Whether the validation should be performed on the ad-hoc review request.
285+
bool enable_schema_validation = 3;
286+
287+
// The priority of the human review task.
288+
Priority priority = 5;
271289
}
272290

273291
// Response message for review document method.

0 commit comments

Comments
 (0)