From c0995a2e4866012d19ce21a3b98c514c8640a5e3 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 12 Sep 2024 10:46:24 -0700 Subject: [PATCH] feat: [documentai] Add API fields for the descriptions of entity type and property in the document schema (#5662) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Add API fields for the descriptions of entity type and property in the document schema PiperOrigin-RevId: 671472365 Source-Link: https://github.com/googleapis/googleapis/commit/003e62665190becd32d722a82ed3cab62696225f Source-Link: https://github.com/googleapis/googleapis-gen/commit/bf0196fe2004e1fbb1edf5aa8d8ada653e10d62c Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRvY3VtZW50YWkvLk93bEJvdC55YW1sIiwiaCI6ImJmMDE5NmZlMjAwNGUxZmJiMWVkZjVhYThkOGFkYTY1M2UxMGQ2MmMifQ== * 🦉 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 Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> --- .../documentai/v1beta3/document_schema.proto | 8 ++++ .../protos/protos.d.ts | 12 +++++ .../google-cloud-documentai/protos/protos.js | 46 +++++++++++++++++++ .../protos/protos.json | 8 ++++ 4 files changed, 74 insertions(+) diff --git a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/document_schema.proto b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/document_schema.proto index f4b86ba0acd..74f381e04ac 100644 --- a/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/document_schema.proto +++ b/packages/google-cloud-documentai/protos/google/cloud/documentai/v1beta3/document_schema.proto @@ -127,6 +127,10 @@ message DocumentSchema { // EntityType name. string name = 1; + // The description of the property. Could be used to provide more + // information about the property for model calls. + string description = 7; + // User defined name for the property. string display_name = 6; @@ -169,6 +173,10 @@ message DocumentSchema { // honored for backward compatibility. string name = 1; + // The description of the entity type. Could be used to provide more + // information about the entity type for model calls. + string description = 15; + // The entity type that this type is derived from. For now, one and only // one should be set. repeated string base_types = 2; diff --git a/packages/google-cloud-documentai/protos/protos.d.ts b/packages/google-cloud-documentai/protos/protos.d.ts index ded3c1959bb..c1c9a873a5a 100644 --- a/packages/google-cloud-documentai/protos/protos.d.ts +++ b/packages/google-cloud-documentai/protos/protos.d.ts @@ -37437,6 +37437,9 @@ export namespace google { /** EntityType name */ name?: (string|null); + /** EntityType description */ + description?: (string|null); + /** EntityType baseTypes */ baseTypes?: (string[]|null); @@ -37465,6 +37468,9 @@ export namespace google { /** EntityType name. */ public name: string; + /** EntityType description. */ + public description: string; + /** EntityType baseTypes. */ public baseTypes: string[]; @@ -37660,6 +37666,9 @@ export namespace google { /** Property name */ name?: (string|null); + /** Property description */ + description?: (string|null); + /** Property displayName */ displayName?: (string|null); @@ -37685,6 +37694,9 @@ export namespace google { /** Property name. */ public name: string; + /** Property description. */ + public description: string; + /** Property displayName. */ public displayName: string; diff --git a/packages/google-cloud-documentai/protos/protos.js b/packages/google-cloud-documentai/protos/protos.js index 19c3d69952c..4fce4f24966 100644 --- a/packages/google-cloud-documentai/protos/protos.js +++ b/packages/google-cloud-documentai/protos/protos.js @@ -93878,6 +93878,7 @@ * @property {google.cloud.documentai.v1beta3.DocumentSchema.EntityType.IEnumValues|null} [enumValues] EntityType enumValues * @property {string|null} [displayName] EntityType displayName * @property {string|null} [name] EntityType name + * @property {string|null} [description] EntityType description * @property {Array.|null} [baseTypes] EntityType baseTypes * @property {Array.|null} [properties] EntityType properties * @property {google.cloud.documentai.v1beta3.IEntityTypeMetadata|null} [entityTypeMetadata] EntityType entityTypeMetadata @@ -93924,6 +93925,14 @@ */ EntityType.prototype.name = ""; + /** + * EntityType description. + * @member {string} description + * @memberof google.cloud.documentai.v1beta3.DocumentSchema.EntityType + * @instance + */ + EntityType.prototype.description = ""; + /** * EntityType baseTypes. * @member {Array.} baseTypes @@ -94000,6 +94009,8 @@ writer.uint32(/* id 13, wireType 2 =*/106).string(message.displayName); if (message.enumValues != null && Object.hasOwnProperty.call(message, "enumValues")) $root.google.cloud.documentai.v1beta3.DocumentSchema.EntityType.EnumValues.encode(message.enumValues, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.description); return writer; }; @@ -94046,6 +94057,10 @@ message.name = reader.string(); break; } + case 15: { + message.description = reader.string(); + break; + } case 2: { if (!(message.baseTypes && message.baseTypes.length)) message.baseTypes = []; @@ -94112,6 +94127,9 @@ if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; if (message.baseTypes != null && message.hasOwnProperty("baseTypes")) { if (!Array.isArray(message.baseTypes)) return "baseTypes: array expected"; @@ -94157,6 +94175,8 @@ message.displayName = String(object.displayName); if (object.name != null) message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); if (object.baseTypes) { if (!Array.isArray(object.baseTypes)) throw TypeError(".google.cloud.documentai.v1beta3.DocumentSchema.EntityType.baseTypes: array expected"); @@ -94203,6 +94223,7 @@ object.name = ""; object.entityTypeMetadata = null; object.displayName = ""; + object.description = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -94225,6 +94246,8 @@ if (options.oneofs) object.valueSource = "enumValues"; } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; return object; }; @@ -94480,6 +94503,7 @@ * @memberof google.cloud.documentai.v1beta3.DocumentSchema.EntityType * @interface IProperty * @property {string|null} [name] Property name + * @property {string|null} [description] Property description * @property {string|null} [displayName] Property displayName * @property {string|null} [valueType] Property valueType * @property {google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property.OccurrenceType|null} [occurrenceType] Property occurrenceType @@ -94509,6 +94533,14 @@ */ Property.prototype.name = ""; + /** + * Property description. + * @member {string} description + * @memberof google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property + * @instance + */ + Property.prototype.description = ""; + /** * Property displayName. * @member {string} displayName @@ -94575,6 +94607,8 @@ $root.google.cloud.documentai.v1beta3.PropertyMetadata.encode(message.propertyMetadata, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.description); return writer; }; @@ -94613,6 +94647,10 @@ message.name = reader.string(); break; } + case 7: { + message.description = reader.string(); + break; + } case 6: { message.displayName = reader.string(); break; @@ -94667,6 +94705,9 @@ if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; if (message.displayName != null && message.hasOwnProperty("displayName")) if (!$util.isString(message.displayName)) return "displayName: string expected"; @@ -94706,6 +94747,8 @@ var message = new $root.google.cloud.documentai.v1beta3.DocumentSchema.EntityType.Property(); if (object.name != null) message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); if (object.displayName != null) message.displayName = String(object.displayName); if (object.valueType != null) @@ -94765,6 +94808,7 @@ object.occurrenceType = options.enums === String ? "OCCURRENCE_TYPE_UNSPECIFIED" : 0; object.propertyMetadata = null; object.displayName = ""; + object.description = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -94776,6 +94820,8 @@ object.propertyMetadata = $root.google.cloud.documentai.v1beta3.PropertyMetadata.toObject(message.propertyMetadata, options); if (message.displayName != null && message.hasOwnProperty("displayName")) object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; return object; }; diff --git a/packages/google-cloud-documentai/protos/protos.json b/packages/google-cloud-documentai/protos/protos.json index ea1af266bdf..a311c442444 100644 --- a/packages/google-cloud-documentai/protos/protos.json +++ b/packages/google-cloud-documentai/protos/protos.json @@ -7910,6 +7910,10 @@ "type": "string", "id": 1 }, + "description": { + "type": "string", + "id": 15 + }, "baseTypes": { "rule": "repeated", "type": "string", @@ -7941,6 +7945,10 @@ "type": "string", "id": 1 }, + "description": { + "type": "string", + "id": 7 + }, "displayName": { "type": "string", "id": 6