feat: A new field `revisions` is added to message `.google.cloud.docu… · googleapis/googleapis@39bd091

1-

// Copyright 2025 Google LLC

1+

// Copyright 2026 Google LLC

22

//

33

// Licensed under the Apache License, Version 2.0 (the "License");

44

// you may not use this file except in compliance with the License.

@@ -17,6 +17,7 @@ syntax = "proto3";

1717

package google.cloud.documentai.v1beta3;

18181919

import "google/api/field_behavior.proto";

20+

import "google/api/resource.proto";

2021

import "google/cloud/documentai/v1beta3/barcode.proto";

2122

import "google/cloud/documentai/v1beta3/geometry.proto";

2223

import "google/protobuf/timestamp.proto";

@@ -340,7 +341,7 @@ message Document {

340341

repeated DetectedLanguage detected_languages = 2;

341342

}

342343343-

// Detected non-text visual elements, for example, checkbox, signature, etc.

344+

// Detected non-text visual elements, for example, checkbox, signature etc.

344345

// on the page.

345346

message VisualElement {

346347

// [Layout][google.cloud.documentai.v1beta3.Document.Page.Layout] for

@@ -530,7 +531,7 @@ message Document {

530531

// A list of visually detected tokens on the page.

531532

repeated Token tokens = 8;

532533533-

// A list of detected non-text visual elements for example, checkbox,

534+

// A list of detected non-text visual elements, for example, checkbox,

534535

// signature etc. on the page.

535536

repeated VisualElement visual_elements = 9;

536537

@@ -628,10 +629,11 @@ message Document {

628629

// [Document.text][google.cloud.documentai.v1beta3.Document.text].

629630

TextAnchor text_anchor = 1 [(google.api.field_behavior) = OPTIONAL];

630631631-

// Required. Entity type from a schema for example, `Address`.

632+

// Required. Entity type from a schema, for example, `Address`.

632633

string type = 2 [(google.api.field_behavior) = REQUIRED];

633634634-

// Optional. Text value of the entity for example, `1600 Amphitheatre Pkwy`.

635+

// Optional. Text value of the entity, for example, `1600 Amphitheatre

636+

// Pkwy`.

635637

string mention_text = 3 [(google.api.field_behavior) = OPTIONAL];

636638637639

// Optional. Deprecated. Use `id` field instead.

@@ -644,7 +646,7 @@ message Document {

644646

// the page where it was found.

645647

PageAnchor page_anchor = 6 [(google.api.field_behavior) = OPTIONAL];

646648647-

// Optional. Canonical ID. This will be a unique value in the entity list

649+

// Optional. Canonical id. This will be a unique value in the entity list

648650

// for this document.

649651

string id = 7 [(google.api.field_behavior) = OPTIONAL];

650652

@@ -673,10 +675,10 @@ message Document {

673675

// Relationship between

674676

// [Entities][google.cloud.documentai.v1beta3.Document.Entity].

675677

message EntityRelation {

676-

// Subject entity ID.

678+

// Subject entity id.

677679

string subject_id = 1;

678680679-

// Object entity ID.

681+

// Object entity id.

680682

string object_id = 2;

681683682684

// Relationship description.

@@ -806,7 +808,7 @@ message Document {

806808

// of entities, properties within entities, etc.) in the parent revision.

807809

int32 index = 3;

808810809-

// The ID of the parent provenance.

811+

// The id of the parent provenance.

810812

int32 id = 2 [deprecated = true];

811813

}

812814

@@ -846,7 +848,7 @@ message Document {

846848

// The index of the revision that produced this element.

847849

int32 revision = 1 [deprecated = true];

848850849-

// The ID of this operation. Needs to be unique within the scope of the

851+

// The Id of this operation. Needs to be unique within the scope of the

850852

// revision.

851853

int32 id = 2 [deprecated = true];

852854

@@ -871,7 +873,7 @@ message Document {

871873872874

// Who/what made the change

873875

oneof source {

874-

// If the change was made by a person specify the name or ID of that

876+

// If the change was made by a person specify the name or id of that

875877

// person.

876878

string agent = 4;

877879

@@ -880,7 +882,7 @@ message Document {

880882

string processor = 5;

881883

}

882884883-

// ID of the revision, internally generated by doc proto storage.

885+

// Id of the revision, internally generated by doc proto storage.

884886

// Unique within the context of the document.

885887

string id = 1;

886888

@@ -889,7 +891,7 @@ message Document {

889891

// index into the `revisions` field.

890892

repeated int32 parent = 2 [deprecated = true];

891893892-

// The revisions that this revision is based on. Must include all the IDs

894+

// The revisions that this revision is based on. Must include all the ids

893895

// that have anything to do with this revision - eg. there are

894896

// `provenance.parent.revision` fields that index into this field.

895897

repeated string parent_ids = 7;

@@ -1013,18 +1015,18 @@ message Document {

10131015

message LayoutImageBlock {

10141016

// Source of the image.

10151017

oneof image_source {

1016-

// Optional. Asset ID of the inline image. If set, find the image

1018+

// Optional. Asset id of the inline image. If set, find the image

10171019

// content in the blob_assets field.

10181020

string blob_asset_id = 4 [(google.api.field_behavior) = OPTIONAL];

101910211020-

// Optional. Google Cloud Storage URI of the image.

1022+

// Optional. Google Cloud Storage uri of the image.

10211023

string gcs_uri = 5 [(google.api.field_behavior) = OPTIONAL];

102210241023-

// Optional. Data URI of the image.

1025+

// Optional. Data uri of the image.

10241026

// It is composed of four parts: a prefix (data:), a MIME type

10251027

// indicating the type of data, an optional base64 token if

10261028

// non-textual, and the data itself:

1027-

// data:[<mediatype>][;base64],<data>.

1029+

// data:[<mediatype>][;base64],<data>

10281030

string data_uri = 6 [(google.api.field_behavior) = OPTIONAL];

10291031

}

10301032

@@ -1103,18 +1105,18 @@ message Document {

11031105

message ImageChunkField {

11041106

// Source of the image.

11051107

oneof image_source {

1106-

// Optional. Asset ID of the inline image. If set, find the image

1108+

// Optional. Asset id of the inline image. If set, find the image

11071109

// content in the blob_assets field.

11081110

string blob_asset_id = 1 [(google.api.field_behavior) = OPTIONAL];

110911111110-

// Optional. Google Cloud Storage URI of the image.

1112+

// Optional. Google Cloud Storage uri of the image.

11111113

string gcs_uri = 2 [(google.api.field_behavior) = OPTIONAL];

111211141113-

// Optional. Data URI of the image.

1115+

// Optional. Data uri of the image.

11141116

// It is composed of four parts: a prefix (data:), a MIME type

11151117

// indicating the type of data, an optional base64 token if

11161118

// non-textual, and the data itself:

1117-

// data:[<mediatype>][;base64],<data>.

1119+

// data:[<mediatype>][;base64],<data>

11181120

string data_uri = 3 [(google.api.field_behavior) = OPTIONAL];

11191121

}

11201122

@@ -1171,7 +1173,7 @@ message Document {

11711173

// in this document, for example, image bytes, such that it can be referenced

11721174

// by other fields in the document via asset ID.

11731175

message BlobAsset {

1174-

// Optional. The ID of the blob asset.

1176+

// Optional. The id of the blob asset.

11751177

string asset_id = 1 [(google.api.field_behavior) = OPTIONAL];

1176117811771179

// Optional. The content of the blob asset, for example, image bytes.

@@ -1205,7 +1207,7 @@ message Document {

12051207

VALIDATION_RESULT_TYPE_NOT_APPLICABLE = 4;

12061208

}

120712091208-

// The name of the validation rule.

1210+

// The display name of the validation rule.

12091211

string rule_name = 1;

1210121212111213

// The description of the validation rule.

@@ -1229,14 +1231,17 @@ message Document {

1229123112301232

// Entity revision.

12311233

message EntitiesRevision {

1232-

// The revision ID.

1234+

// The revision id.

12331235

string revision_id = 1;

1234123612351237

// The entities in this revision.

12361238

repeated Entity entities = 2;

1237123912381240

// The entity validation output for this revision.

12391241

EntityValidationOutput entity_validation_output = 3;

1242+1243+

// Optional. The history of this revision.

1244+

Provenance provenance = 4 [(google.api.field_behavior) = OPTIONAL];

12401245

}

1241124612421247

// Original source document from the user.

@@ -1320,7 +1325,7 @@ message Document {

13201325

// The entity revision ID that `document.entities` field is based on.

13211326

// If this field is set and `entities_revisions` is not empty, the entities in

13221327

// `document.entities` field are the entities in the entity revision with this

1323-

// ID and `document.entity_validation_output` field is the

1328+

// id and `document.entity_validation_output` field is the

13241329

// `entity_validation_output` field in this entity revision.

13251330

string entities_revision_id = 23;

13261331

}

@@ -1347,7 +1352,7 @@ message RevisionRef {

13471352

// Reads the revision by the predefined case.

13481353

RevisionCase revision_case = 1;

134913541350-

// Reads the revision given by the ID.

1355+

// Reads the revision given by the id.

13511356

string revision_id = 2;

1352135713531358

// Reads the revision generated by the processor version.