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

Commit

Permalink
feat: add content field in TextAnchor (#294)
Browse files Browse the repository at this point in the history
* feat: add `content` field in TextAnchor

PiperOrigin-RevId: 435142243

Source-Link: googleapis/googleapis@721b367

Source-Link: googleapis/googleapis-gen@b627aae
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjYyN2FhZWIzYWZhZmU3ZDk0ZDYwOTlhMmQxOTQ1YWE5YjRkYWRhZCJ9

* 🦉 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] committed Mar 17, 2022
1 parent 3619d97 commit f8b3e05
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions google/cloud/documentai_v1beta2/types/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,9 @@ class TextAnchor(proto.Message):
text_segments (Sequence[google.cloud.documentai_v1beta2.types.Document.TextAnchor.TextSegment]):
The text segments from the
[Document.text][google.cloud.documentai.v1beta2.Document.text].
content (str):
Contains the content of the text span so that users do not
have to look it up in the text_segments.
"""

class TextSegment(proto.Message):
Expand All @@ -699,6 +702,7 @@ class TextSegment(proto.Message):
text_segments = proto.RepeatedField(
proto.MESSAGE, number=1, message="Document.TextAnchor.TextSegment",
)
content = proto.Field(proto.STRING, number=2,)

class PageAnchor(proto.Message):
r"""Referencing elements in
Expand Down

0 comments on commit f8b3e05

Please sign in to comment.