Skip to content

Commit c7c3e41

Browse files
feat: added field Processor.processor_version_aliases (#11694)
- [ ] Regenerate this pull request now. BEGIN_COMMIT_OVERRIDE feat: added field RawDocument.display_name fix: deprecated OcrConfig.compute_style_info feat: added field Processor.processor_version_aliases END_COMMIT_OVERRIDE Use PremiumFeatures.compute_style_info instead of OcrConfig.compute_style_info. PiperOrigin-RevId: 567356898 Source-Link: googleapis/googleapis@a32df25 Source-Link: googleapis/googleapis-gen@f3288e6 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRvY3VtZW50YWkvLk93bEJvdC55YW1sIiwiaCI6ImYzMjg4ZTYyZWQ1NmEyYzk3OWE2MzU2NjdiZGY5MWM3MTEzMWRjOTMifQ== --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 3385b1f commit c7c3e41

File tree

14 files changed

+70
-14
lines changed

14 files changed

+70
-14
lines changed

packages/google-cloud-documentai/google/cloud/documentai/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,11 @@
9595
Vertex,
9696
)
9797
from google.cloud.documentai_v1.types.operation_metadata import CommonOperationMetadata
98-
from google.cloud.documentai_v1.types.processor import Processor, ProcessorVersion
98+
from google.cloud.documentai_v1.types.processor import (
99+
Processor,
100+
ProcessorVersion,
101+
ProcessorVersionAlias,
102+
)
99103
from google.cloud.documentai_v1.types.processor_type import ProcessorType
100104

101105
__all__ = (
@@ -169,5 +173,6 @@
169173
"CommonOperationMetadata",
170174
"Processor",
171175
"ProcessorVersion",
176+
"ProcessorVersionAlias",
172177
"ProcessorType",
173178
)

packages/google-cloud-documentai/google/cloud/documentai/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "2.18.1" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-documentai/google/cloud/documentai_v1/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
from .types.evaluation import Evaluation, EvaluationReference
9090
from .types.geometry import BoundingPoly, NormalizedVertex, Vertex
9191
from .types.operation_metadata import CommonOperationMetadata
92-
from .types.processor import Processor, ProcessorVersion
92+
from .types.processor import Processor, ProcessorVersion, ProcessorVersionAlias
9393
from .types.processor_type import ProcessorType
9494

9595
__all__ = (
@@ -150,6 +150,7 @@
150150
"Processor",
151151
"ProcessorType",
152152
"ProcessorVersion",
153+
"ProcessorVersionAlias",
153154
"RawDocument",
154155
"ReviewDocumentOperationMetadata",
155156
"ReviewDocumentRequest",

packages/google-cloud-documentai/google/cloud/documentai_v1/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "2.18.1" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-documentai/google/cloud/documentai_v1/types/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
from .evaluation import Evaluation, EvaluationReference
8181
from .geometry import BoundingPoly, NormalizedVertex, Vertex
8282
from .operation_metadata import CommonOperationMetadata
83-
from .processor import Processor, ProcessorVersion
83+
from .processor import Processor, ProcessorVersion, ProcessorVersionAlias
8484
from .processor_type import ProcessorType
8585

8686
__all__ = (
@@ -152,5 +152,6 @@
152152
"CommonOperationMetadata",
153153
"Processor",
154154
"ProcessorVersion",
155+
"ProcessorVersionAlias",
155156
"ProcessorType",
156157
)

packages/google-cloud-documentai/google/cloud/documentai_v1/types/document_io.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ class RawDocument(proto.Message):
4444
An IANA MIME type (RFC6838) indicating the nature and format
4545
of the
4646
[content][google.cloud.documentai.v1.RawDocument.content].
47+
display_name (str):
48+
The display name of the document, it supports all Unicode
49+
characters except the following: ``*``, ``?``, ``[``, ``]``,
50+
``%``, ``{``, ``}``,\ ``'``, ``\"``, ``,`` ``~``, ``=`` and
51+
``:`` are reserved. If not specified, a default ID will be
52+
generated.
4753
"""
4854

4955
content: bytes = proto.Field(
@@ -54,6 +60,10 @@ class RawDocument(proto.Message):
5460
proto.STRING,
5561
number=2,
5662
)
63+
display_name: str = proto.Field(
64+
proto.STRING,
65+
number=3,
66+
)
5767

5868

5969
class GcsDocument(proto.Message):
@@ -250,8 +260,8 @@ class OcrConfig(proto.Message):
250260
Includes symbol level OCR information if set
251261
to true.
252262
compute_style_info (bool):
253-
Turn on font id model and returns font style
254-
information.
263+
Turn on font id model and returns font style information.
264+
Use PremiumFeatures.compute_style_info instead.
255265
"""
256266

257267
class Hints(proto.Message):

packages/google-cloud-documentai/google/cloud/documentai_v1/types/document_processor_service.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,8 +1124,8 @@ class CustomDocumentExtractionOptions(proto.Message):
11241124
"""
11251125

11261126
class TrainingMethod(proto.Enum):
1127-
r"""Training Method for CDE. TRAINING_METHOD_UNSPECIFIED will fallback
1128-
to MODEL_BASED.
1127+
r"""Training Method for CDE. ``TRAINING_METHOD_UNSPECIFIED`` will fall
1128+
back to ``MODEL_BASED``.
11291129
11301130
Values:
11311131
TRAINING_METHOD_UNSPECIFIED (0):

packages/google-cloud-documentai/google/cloud/documentai_v1/types/processor.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
package="google.cloud.documentai.v1",
2828
manifest={
2929
"ProcessorVersion",
30+
"ProcessorVersionAlias",
3031
"Processor",
3132
},
3233
)
@@ -175,6 +176,29 @@ class DeprecationInfo(proto.Message):
175176
)
176177

177178

179+
class ProcessorVersionAlias(proto.Message):
180+
r"""Contains the alias and the aliased resource name of processor
181+
version.
182+
183+
Attributes:
184+
alias (str):
185+
The alias in the form of ``processor_version`` resource
186+
name.
187+
processor_version (str):
188+
The resource name of aliased processor
189+
version.
190+
"""
191+
192+
alias: str = proto.Field(
193+
proto.STRING,
194+
number=1,
195+
)
196+
processor_version: str = proto.Field(
197+
proto.STRING,
198+
number=2,
199+
)
200+
201+
178202
class Processor(proto.Message):
179203
r"""The first-class citizen for Document AI. Each processor
180204
defines how to extract structural information from a document.
@@ -194,6 +218,8 @@ class Processor(proto.Message):
194218
Output only. The state of the processor.
195219
default_processor_version (str):
196220
The default processor version.
221+
processor_version_aliases (MutableSequence[google.cloud.documentai_v1.types.ProcessorVersionAlias]):
222+
Output only. The processor version aliases.
197223
process_endpoint (str):
198224
Output only. Immutable. The http endpoint
199225
that can be called to invoke processing.
@@ -271,6 +297,13 @@ class State(proto.Enum):
271297
proto.STRING,
272298
number=9,
273299
)
300+
processor_version_aliases: MutableSequence[
301+
"ProcessorVersionAlias"
302+
] = proto.RepeatedField(
303+
proto.MESSAGE,
304+
number=10,
305+
message="ProcessorVersionAlias",
306+
)
274307
process_endpoint: str = proto.Field(
275308
proto.STRING,
276309
number=6,

packages/google-cloud-documentai/google/cloud/documentai_v1beta2/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "2.18.1" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-documentai/google/cloud/documentai_v1beta3/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "2.18.1" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

0 commit comments

Comments
 (0)