From d328de078e534e21f104567ad8c1a8148de15e63 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 6 Apr 2021 17:27:20 -0700 Subject: [PATCH] feat: add EVAL_SKIPPED value to the Provenance.OperationType enum (#191) PiperOrigin-RevId: 363478455 Source-Author: Google APIs Source-Date: Wed Mar 17 12:20:53 2021 -0700 Source-Repo: googleapis/googleapis Source-Sha: 4fb2f3e141fb4a62c434e1964db0fd2f2763aa08 Source-Link: https://github.com/googleapis/googleapis/commit/4fb2f3e141fb4a62c434e1964db0fd2f2763aa08 --- .../cloud/documentai/v1beta3/document.proto | 47 +++++++++---------- .../protos/protos.d.ts | 3 +- .../google-cloud-documentai/protos/protos.js | 7 +++ .../protos/protos.json | 33 ++++++++++--- .../google-cloud-documentai/synth.metadata | 4 +- 5 files changed, 58 insertions(+), 36 deletions(-) diff --git a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/document.proto b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/document.proto index 0e14be6119f..e9345f01ad6 100644 --- a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/document.proto +++ b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/document.proto @@ -396,27 +396,19 @@ message Document { // known. If this field is present, the 'text' field is still populated. oneof structured_value { // Money value. See also: - // - // https: - // github.com/googleapis/googleapis/blob/master/google/type/money.proto + // https://github.com/googleapis/googleapis/blob/master/google/type/money.proto google.type.Money money_value = 2; // Date value. Includes year, month, day. See also: - // - // https: - // github.com/googleapis/googleapis/blob/master/google/type/date.proto + // https://github.com/googleapis/googleapis/blob/master/google/type/date.proto google.type.Date date_value = 3; // DateTime value. Includes date, time, and timezone. See also: - // - // https: - // github.com/googleapis/googleapis/blob/master/google/type/datetime.proto + // https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto google.type.DateTime datetime_value = 4; // Postal address. See also: - // - // https: - // github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto + // https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto google.type.PostalAddress address_value = 5; // Boolean value. Can be used for entities with binary values, or for @@ -434,18 +426,18 @@ message Document { string text = 1 [(google.api.field_behavior) = REQUIRED]; } - // Provenance of the entity. + // Optional. Provenance of the entity. // Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta3.Document.text]. - TextAnchor text_anchor = 1; + TextAnchor text_anchor = 1 [(google.api.field_behavior) = OPTIONAL]; // Entity type from a schema e.g. `Address`. string type = 2; - // Text value in the document e.g. `1600 Amphitheatre Pkwy`. - string mention_text = 3; + // Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`. + string mention_text = 3 [(google.api.field_behavior) = OPTIONAL]; - // Deprecated. Use `id` field instead. - string mention_id = 4; + // Optional. Deprecated. Use `id` field instead. + string mention_id = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. Confidence of detected Schema entity. Range [0, 1]. float confidence = 5 [(google.api.field_behavior) = OPTIONAL]; @@ -594,9 +586,12 @@ message Document { // Element is requested for human review. EVAL_REQUESTED = 4; - // Element is review and approved at human review, confidence will be set - // to 1.0 + // Element is reviewed and approved at human review, confidence will be + // set to 1.0. EVAL_APPROVED = 5; + + // Element is skipped in the validation process. + EVAL_SKIPPED = 6; } // The index of the revision that produced this element. @@ -669,17 +664,17 @@ message Document { // Original source document from the user. oneof source { - // Currently supports Google Cloud Storage URI of the form + // Optional. Currently supports Google Cloud Storage URI of the form // `gs://bucket_name/object_name`. Object versioning is not supported. // See [Google Cloud Storage Request // URIs](https://cloud.google.com/storage/docs/reference-uris) for more // info. - string uri = 1; + string uri = 1 [(google.api.field_behavior) = OPTIONAL]; - // Inline document content, represented as a stream of bytes. + // Optional. Inline document content, represented as a stream of bytes. // Note: As with all `bytes` fields, protobuffers use a pure binary // representation, whereas JSON representations use base64. - bytes content = 2; + bytes content = 2 [(google.api.field_behavior) = OPTIONAL]; } // An IANA published MIME type (also referred to as media type). For more @@ -687,8 +682,8 @@ message Document { // https://www.iana.org/assignments/media-types/media-types.xhtml. string mime_type = 3; - // UTF-8 encoded text in reading order from the document. - string text = 4; + // Optional. UTF-8 encoded text in reading order from the document. + string text = 4 [(google.api.field_behavior) = OPTIONAL]; // Styles for the [Document.text][google.cloud.documentai.v1beta3.Document.text]. repeated Style text_styles = 5; diff --git a/packages/google-cloud-documentai/protos/protos.d.ts b/packages/google-cloud-documentai/protos/protos.d.ts index 151dfb5fc1d..ff8d35dea2f 100644 --- a/packages/google-cloud-documentai/protos/protos.d.ts +++ b/packages/google-cloud-documentai/protos/protos.d.ts @@ -7949,7 +7949,8 @@ export namespace google { REMOVE = 2, REPLACE = 3, EVAL_REQUESTED = 4, - EVAL_APPROVED = 5 + EVAL_APPROVED = 5, + EVAL_SKIPPED = 6 } } diff --git a/packages/google-cloud-documentai/protos/protos.js b/packages/google-cloud-documentai/protos/protos.js index bebbd2c0cd2..50d1d3d4b94 100644 --- a/packages/google-cloud-documentai/protos/protos.js +++ b/packages/google-cloud-documentai/protos/protos.js @@ -20224,6 +20224,7 @@ case 3: case 4: case 5: + case 6: break; } return null; @@ -20280,6 +20281,10 @@ case 5: message.type = 5; break; + case "EVAL_SKIPPED": + case 6: + message.type = 6; + break; } return message; }; @@ -20549,6 +20554,7 @@ * @property {number} REPLACE=3 REPLACE value * @property {number} EVAL_REQUESTED=4 EVAL_REQUESTED value * @property {number} EVAL_APPROVED=5 EVAL_APPROVED value + * @property {number} EVAL_SKIPPED=6 EVAL_SKIPPED value */ Provenance.OperationType = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -20558,6 +20564,7 @@ values[valuesById[3] = "REPLACE"] = 3; values[valuesById[4] = "EVAL_REQUESTED"] = 4; values[valuesById[5] = "EVAL_APPROVED"] = 5; + values[valuesById[6] = "EVAL_SKIPPED"] = 6; return values; })(); diff --git a/packages/google-cloud-documentai/protos/protos.json b/packages/google-cloud-documentai/protos/protos.json index e264526bb3e..7c87e1b67df 100644 --- a/packages/google-cloud-documentai/protos/protos.json +++ b/packages/google-cloud-documentai/protos/protos.json @@ -1023,11 +1023,17 @@ "fields": { "uri": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "content": { "type": "bytes", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "mimeType": { "type": "string", @@ -1035,7 +1041,10 @@ }, "text": { "type": "string", - "id": 4 + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "textStyles": { "rule": "repeated", @@ -1499,7 +1508,10 @@ "fields": { "textAnchor": { "type": "TextAnchor", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "type": { "type": "string", @@ -1507,11 +1519,17 @@ }, "mentionText": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "mentionId": { "type": "string", - "id": 4 + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "confidence": { "type": "float", @@ -1750,7 +1768,8 @@ "REMOVE": 2, "REPLACE": 3, "EVAL_REQUESTED": 4, - "EVAL_APPROVED": 5 + "EVAL_APPROVED": 5, + "EVAL_SKIPPED": 6 } } } diff --git a/packages/google-cloud-documentai/synth.metadata b/packages/google-cloud-documentai/synth.metadata index eaf76f82ef4..0172dfb4437 100644 --- a/packages/google-cloud-documentai/synth.metadata +++ b/packages/google-cloud-documentai/synth.metadata @@ -11,8 +11,8 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "0c6dd7aa98ebee634ec62568237f7ee17034ad08", - "internalRef": "361590205" + "sha": "4fb2f3e141fb4a62c434e1964db0fd2f2763aa08", + "internalRef": "363478455" } }, {