Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Commit

Permalink
fix!: mark Document.Entity.type as REQUIRED in all versions (#326)
Browse files Browse the repository at this point in the history
* fix!: mark Document.Entity.type as REQUIRED in all versions
fix!: remove Document.Entity.bounding_poly_for_demo_frontend from v1beta2

The type field was always required by the backend, so this formally breaking change can likely be accepted without bumping the major version. Field removal is in beta version so can be accepted as well.

PiperOrigin-RevId: 444656928

Source-Link: googleapis/googleapis@a0d4c5c

Source-Link: googleapis/googleapis-gen@d3a3f6d
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZDNhM2Y2ZGRlMThlYzM3MjFmY2ViYTkzM2U0MzI3YTdiNmRkMmMyZCJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Apr 27, 2022
1 parent 9a9ac9b commit 8ef4cca
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 56 deletions.
4 changes: 2 additions & 2 deletions protos/google/cloud/documentai/v1/document.proto
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,8 @@ message Document {
// [Document.text][google.cloud.documentai.v1.Document.text].
TextAnchor text_anchor = 1 [(google.api.field_behavior) = OPTIONAL];

// Entity type from a schema e.g. `Address`.
string type = 2;
// Required. Entity type from a schema e.g. `Address`.
string type = 2 [(google.api.field_behavior) = REQUIRED];

// Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`. If
// the entity is not present in the document, this field will be empty.
Expand Down
5 changes: 3 additions & 2 deletions protos/google/cloud/documentai/v1beta1/document.proto
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ syntax = "proto3";
package google.cloud.documentai.v1beta1;

import "google/api/annotations.proto";
import "google/api/field_behavior.proto";
import "google/cloud/documentai/v1beta1/geometry.proto";
import "google/rpc/status.proto";
import "google/type/color.proto";
Expand Down Expand Up @@ -351,8 +352,8 @@ message Document {
// [Document.text][google.cloud.documentai.v1beta1.Document.text].
TextAnchor text_anchor = 1;

// Entity type from a schema e.g. `Address`.
string type = 2;
// Required. Entity type from a schema e.g. `Address`.
string type = 2 [(google.api.field_behavior) = REQUIRED];

// Text value in the document e.g. `1600 Amphitheatre Pkwy`.
string mention_text = 3;
Expand Down
8 changes: 2 additions & 6 deletions protos/google/cloud/documentai/v1beta2/document.proto
Original file line number Diff line number Diff line change
Expand Up @@ -368,8 +368,8 @@ message Document {
// Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta2.Document.text].
TextAnchor text_anchor = 1;

// Entity type from a schema e.g. `Address`.
string type = 2;
// Required. Entity type from a schema e.g. `Address`.
string type = 2 [(google.api.field_behavior) = REQUIRED];

// Text value in the document e.g. `1600 Amphitheatre Pkwy`.
string mention_text = 3;
Expand All @@ -387,10 +387,6 @@ message Document {
// Optional. Canonical id. This will be a unique value in the entity list
// for this document.
string id = 7 [(google.api.field_behavior) = OPTIONAL];

// Optional. Temporary field to store the bounding poly for short-term POCs. Used by
// the frontend only. Do not use before you talk to ybo@ and lukasr@.
BoundingPoly bounding_poly_for_demo_frontend = 8 [(google.api.field_behavior) = OPTIONAL];
}

// Relationship between [Entities][google.cloud.documentai.v1beta2.Document.Entity].
Expand Down
4 changes: 2 additions & 2 deletions protos/google/cloud/documentai/v1beta3/document.proto
Original file line number Diff line number Diff line change
Expand Up @@ -480,8 +480,8 @@ message Document {
// [Document.text][google.cloud.documentai.v1beta3.Document.text].
TextAnchor text_anchor = 1 [(google.api.field_behavior) = OPTIONAL];

// Entity type from a schema e.g. `Address`.
string type = 2;
// Required. Entity type from a schema e.g. `Address`.
string type = 2 [(google.api.field_behavior) = REQUIRED];

// Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`. If
// the entity is not present in the document, this field will be empty.
Expand Down
6 changes: 0 additions & 6 deletions protos/protos.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 0 additions & 27 deletions protos/protos.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 16 additions & 11 deletions protos/protos.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8ef4cca

Please sign in to comment.