diff --git a/protos/google/cloud/documentai/v1/document.proto b/protos/google/cloud/documentai/v1/document.proto index aed16a998..4512affa5 100644 --- a/protos/google/cloud/documentai/v1/document.proto +++ b/protos/google/cloud/documentai/v1/document.proto @@ -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. diff --git a/protos/google/cloud/documentai/v1beta1/document.proto b/protos/google/cloud/documentai/v1beta1/document.proto index 2c47f6f22..0ac64a57f 100644 --- a/protos/google/cloud/documentai/v1beta1/document.proto +++ b/protos/google/cloud/documentai/v1beta1/document.proto @@ -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"; @@ -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; diff --git a/protos/google/cloud/documentai/v1beta2/document.proto b/protos/google/cloud/documentai/v1beta2/document.proto index b8af15b52..846fcd265 100644 --- a/protos/google/cloud/documentai/v1beta2/document.proto +++ b/protos/google/cloud/documentai/v1beta2/document.proto @@ -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; @@ -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]. diff --git a/protos/google/cloud/documentai/v1beta3/document.proto b/protos/google/cloud/documentai/v1beta3/document.proto index 760cd5115..f9bec08b9 100644 --- a/protos/google/cloud/documentai/v1beta3/document.proto +++ b/protos/google/cloud/documentai/v1beta3/document.proto @@ -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. diff --git a/protos/protos.d.ts b/protos/protos.d.ts index 0d6b89282..52c11c025 100644 --- a/protos/protos.d.ts +++ b/protos/protos.d.ts @@ -12237,9 +12237,6 @@ export namespace google { /** Entity id */ id?: (string|null); - - /** Entity boundingPolyForDemoFrontend */ - boundingPolyForDemoFrontend?: (google.cloud.documentai.v1beta2.IBoundingPoly|null); } /** Represents an Entity. */ @@ -12272,9 +12269,6 @@ export namespace google { /** Entity id. */ public id: string; - /** Entity boundingPolyForDemoFrontend. */ - public boundingPolyForDemoFrontend?: (google.cloud.documentai.v1beta2.IBoundingPoly|null); - /** * Creates a new Entity instance using the specified properties. * @param [properties] Properties to set diff --git a/protos/protos.js b/protos/protos.js index 7e024ef51..7f75f503c 100644 --- a/protos/protos.js +++ b/protos/protos.js @@ -31283,7 +31283,6 @@ * @property {number|null} [confidence] Entity confidence * @property {google.cloud.documentai.v1beta2.Document.IPageAnchor|null} [pageAnchor] Entity pageAnchor * @property {string|null} [id] Entity id - * @property {google.cloud.documentai.v1beta2.IBoundingPoly|null} [boundingPolyForDemoFrontend] Entity boundingPolyForDemoFrontend */ /** @@ -31357,14 +31356,6 @@ */ Entity.prototype.id = ""; - /** - * Entity boundingPolyForDemoFrontend. - * @member {google.cloud.documentai.v1beta2.IBoundingPoly|null|undefined} boundingPolyForDemoFrontend - * @memberof google.cloud.documentai.v1beta2.Document.Entity - * @instance - */ - Entity.prototype.boundingPolyForDemoFrontend = null; - /** * Creates a new Entity instance using the specified properties. * @function create @@ -31403,8 +31394,6 @@ $root.google.cloud.documentai.v1beta2.Document.PageAnchor.encode(message.pageAnchor, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.id); - if (message.boundingPolyForDemoFrontend != null && Object.hasOwnProperty.call(message, "boundingPolyForDemoFrontend")) - $root.google.cloud.documentai.v1beta2.BoundingPoly.encode(message.boundingPolyForDemoFrontend, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); return writer; }; @@ -31460,9 +31449,6 @@ case 7: message.id = reader.string(); break; - case 8: - message.boundingPolyForDemoFrontend = $root.google.cloud.documentai.v1beta2.BoundingPoly.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -31523,11 +31509,6 @@ if (message.id != null && message.hasOwnProperty("id")) if (!$util.isString(message.id)) return "id: string expected"; - if (message.boundingPolyForDemoFrontend != null && message.hasOwnProperty("boundingPolyForDemoFrontend")) { - var error = $root.google.cloud.documentai.v1beta2.BoundingPoly.verify(message.boundingPolyForDemoFrontend); - if (error) - return "boundingPolyForDemoFrontend." + error; - } return null; }; @@ -31563,11 +31544,6 @@ } if (object.id != null) message.id = String(object.id); - if (object.boundingPolyForDemoFrontend != null) { - if (typeof object.boundingPolyForDemoFrontend !== "object") - throw TypeError(".google.cloud.documentai.v1beta2.Document.Entity.boundingPolyForDemoFrontend: object expected"); - message.boundingPolyForDemoFrontend = $root.google.cloud.documentai.v1beta2.BoundingPoly.fromObject(object.boundingPolyForDemoFrontend); - } return message; }; @@ -31592,7 +31568,6 @@ object.confidence = 0; object.pageAnchor = null; object.id = ""; - object.boundingPolyForDemoFrontend = null; } if (message.textAnchor != null && message.hasOwnProperty("textAnchor")) object.textAnchor = $root.google.cloud.documentai.v1beta2.Document.TextAnchor.toObject(message.textAnchor, options); @@ -31608,8 +31583,6 @@ object.pageAnchor = $root.google.cloud.documentai.v1beta2.Document.PageAnchor.toObject(message.pageAnchor, options); if (message.id != null && message.hasOwnProperty("id")) object.id = message.id; - if (message.boundingPolyForDemoFrontend != null && message.hasOwnProperty("boundingPolyForDemoFrontend")) - object.boundingPolyForDemoFrontend = $root.google.cloud.documentai.v1beta2.BoundingPoly.toObject(message.boundingPolyForDemoFrontend, options); return object; }; diff --git a/protos/protos.json b/protos/protos.json index d293c9d9a..7773f8661 100644 --- a/protos/protos.json +++ b/protos/protos.json @@ -549,7 +549,10 @@ }, "type": { "type": "string", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "mentionText": { "type": "string", @@ -1782,7 +1785,10 @@ }, "type": { "type": "string", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "mentionText": { "type": "string", @@ -2653,7 +2659,10 @@ }, "type": { "type": "string", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "mentionText": { "type": "string", @@ -2683,13 +2692,6 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } - }, - "boundingPolyForDemoFrontend": { - "type": "BoundingPoly", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } } } }, @@ -3721,7 +3723,10 @@ }, "type": { "type": "string", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, "mentionText": { "type": "string",