Skip to content

Commit

Permalink
feat: [google-cloud-documentai] Add API fields for the descriptions o…
Browse files Browse the repository at this point in the history
…f entity type and property in the document schema (#13067)

- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 671472365

Source-Link:
googleapis/googleapis@003e626

Source-Link:
googleapis/googleapis-gen@bf0196f
Copy-Tag:
eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRvY3VtZW50YWkvLk93bEJvdC55YW1sIiwiaCI6ImJmMDE5NmZlMjAwNGUxZmJiMWVkZjVhYThkOGFkYTY1M2UxMGQ2MmMifQ==

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <[email protected]>
  • Loading branch information
3 people authored Sep 6, 2024
1 parent a7f0dbf commit 1a2b325
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,10 @@ class EntityType(proto.Message):
type. For example ``line_item/amount``. This convention
is deprecated, but will still be honored for backward
compatibility.
description (str):
The description of the entity type. Could be
used to provide more information about the
entity type for model calls.
base_types (MutableSequence[str]):
The entity type that this type is derived
from. For now, one and only one should be set.
Expand Down Expand Up @@ -220,6 +224,10 @@ class Property(proto.Message):
name (str):
The name of the property. Follows the same
guidelines as the EntityType name.
description (str):
The description of the property. Could be
used to provide more information about the
property for model calls.
display_name (str):
User defined name for the property.
value_type (str):
Expand Down Expand Up @@ -274,6 +282,10 @@ class OccurrenceType(proto.Enum):
proto.STRING,
number=1,
)
description: str = proto.Field(
proto.STRING,
number=7,
)
display_name: str = proto.Field(
proto.STRING,
number=6,
Expand Down Expand Up @@ -309,6 +321,10 @@ class OccurrenceType(proto.Enum):
proto.STRING,
number=1,
)
description: str = proto.Field(
proto.STRING,
number=15,
)
base_types: MutableSequence[str] = proto.RepeatedField(
proto.STRING,
number=2,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -396,10 +396,8 @@ class ListDocumentsRequest(proto.Message):
https://google.aip.dev/160.
Currently support query strings are:
------------------------------------
``SplitType=DATASET_SPLIT_TEST|DATASET_SPLIT_TRAIN|DATASET_SPLIT_UNASSIGNED``
- ``SplitType=DATASET_SPLIT_TEST|DATASET_SPLIT_TRAIN|DATASET_SPLIT_UNASSIGNED``
- ``LabelingState=DOCUMENT_LABELED|DOCUMENT_UNLABELED|DOCUMENT_AUTO_LABELED``
- ``DisplayName=\"file_name.pdf\"``
- ``EntityType=abc/def``
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6117,10 +6117,12 @@ def test_update_dataset_schema_rest(request_type):
"enum_values": {"values": ["values_value1", "values_value2"]},
"display_name": "display_name_value",
"name": "name_value",
"description": "description_value",
"base_types": ["base_types_value1", "base_types_value2"],
"properties": [
{
"name": "name_value",
"description": "description_value",
"display_name": "display_name_value",
"value_type": "value_type_value",
"occurrence_type": 1,
Expand Down
15 changes: 13 additions & 2 deletions scripts/client-post-processing/doc-formatting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,20 @@ replacements:
after: " 'ingestionTime': DOUBLE; (UNIX timestamp)\n 'application': STRING;\n"
count: 2
- paths: [
packages/google-cloud-visionai/google/cloud/visionai_v1/types/platform.py,
packages/google-cloud-visionai/google/cloud/visionai_v1/types/platform.py,
]
before: "'processor': STRING;\n }\n dynamic_config_input_topic "
after: "'processor': STRING;\n\n }\n\n dynamic_config_input_topic "
count: 1

- paths: [
packages/google-cloud-documentai/google/cloud/documentai_v1beta3/types/document_service.py,
]
before: |
\n Currently support query strings are:
\ ------------------------------------
\
\ ``SplitType=DATASET_SPLIT_TEST\|DATASET_SPLIT_TRAIN\|DATASET_SPLIT_UNASSIGNED``
\
\ - ``LabelingState=DOCUMENT_LABELED\|DOCUMENT_UNLABELED\|DOCUMENT_AUTO_LABELED``
after: "\n Currently support query strings are:\n\n - ``SplitType=DATASET_SPLIT_TEST|DATASET_SPLIT_TRAIN|DATASET_SPLIT_UNASSIGNED``\n - ``LabelingState=DOCUMENT_LABELED|DOCUMENT_UNLABELED|DOCUMENT_AUTO_LABELED``\n"
count: 1

0 comments on commit 1a2b325

Please sign in to comment.