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

Commit 80df6cb

Browse files
feat: added sharding_config field in DocumentOutputConfig.GcsOutputConfig in document_io.proto (#430)
* feat: added sharding_config field in DocumentOutputConfig.GcsOutputConfig in document_io.proto PiperOrigin-RevId: 495050408 Source-Link: googleapis/googleapis@46a1452 Source-Link: https://github.com/googleapis/googleapis-gen/commit/865eeff1ce9e70e0989d6b0213ae6a5c987b10d7 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiODY1ZWVmZjFjZTllNzBlMDk4OWQ2YjAyMTNhZTZhNWM5ODdiMTBkNyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: added sharding_config field in DocumentOutputConfig.GcsOutputConfig in document_io.proto PiperOrigin-RevId: 495051185 Source-Link: googleapis/googleapis@0ff0b24 Source-Link: https://github.com/googleapis/googleapis-gen/commit/ffa8b5f51bd4258481b8fc73ca7370f78847d5d7 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZmZhOGI1ZjUxYmQ0MjU4NDgxYjhmYzczY2E3MzcwZjc4ODQ3ZDVkNyJ9 * 🦉 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>
1 parent 6b841dd commit 80df6cb

File tree

5 files changed

+63
-3
lines changed

5 files changed

+63
-3
lines changed

google/cloud/documentai_v1/types/document_io.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,31 @@ class GcsOutputConfig(proto.Message):
168168
Only supports top level document and pages field so it must
169169
be in the form of ``{document_field_name}`` or
170170
``pages.{page_field_name}``.
171+
sharding_config (google.cloud.documentai_v1.types.DocumentOutputConfig.GcsOutputConfig.ShardingConfig):
172+
Specifies the sharding config for the output
173+
document.
171174
"""
172175

176+
class ShardingConfig(proto.Message):
177+
r"""The sharding config for the output document.
178+
179+
Attributes:
180+
pages_per_shard (int):
181+
The number of pages per shard.
182+
pages_overlap (int):
183+
The number of overlapping pages between
184+
consecutive shards.
185+
"""
186+
187+
pages_per_shard: int = proto.Field(
188+
proto.INT32,
189+
number=1,
190+
)
191+
pages_overlap: int = proto.Field(
192+
proto.INT32,
193+
number=2,
194+
)
195+
173196
gcs_uri: str = proto.Field(
174197
proto.STRING,
175198
number=1,
@@ -179,6 +202,13 @@ class GcsOutputConfig(proto.Message):
179202
number=2,
180203
message=field_mask_pb2.FieldMask,
181204
)
205+
sharding_config: "DocumentOutputConfig.GcsOutputConfig.ShardingConfig" = (
206+
proto.Field(
207+
proto.MESSAGE,
208+
number=3,
209+
message="DocumentOutputConfig.GcsOutputConfig.ShardingConfig",
210+
)
211+
)
182212

183213
gcs_output_config: GcsOutputConfig = proto.Field(
184214
proto.MESSAGE,

google/cloud/documentai_v1beta3/types/document_io.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,31 @@ class GcsOutputConfig(proto.Message):
168168
Only supports top level document and pages field so it must
169169
be in the form of ``{document_field_name}`` or
170170
``pages.{page_field_name}``.
171+
sharding_config (google.cloud.documentai_v1beta3.types.DocumentOutputConfig.GcsOutputConfig.ShardingConfig):
172+
Specifies the sharding config for the output
173+
document.
171174
"""
172175

176+
class ShardingConfig(proto.Message):
177+
r"""The sharding config for the output document.
178+
179+
Attributes:
180+
pages_per_shard (int):
181+
The number of pages per shard.
182+
pages_overlap (int):
183+
The number of overlapping pages between
184+
consecutive shards.
185+
"""
186+
187+
pages_per_shard: int = proto.Field(
188+
proto.INT32,
189+
number=1,
190+
)
191+
pages_overlap: int = proto.Field(
192+
proto.INT32,
193+
number=2,
194+
)
195+
173196
gcs_uri: str = proto.Field(
174197
proto.STRING,
175198
number=1,
@@ -179,6 +202,13 @@ class GcsOutputConfig(proto.Message):
179202
number=2,
180203
message=field_mask_pb2.FieldMask,
181204
)
205+
sharding_config: "DocumentOutputConfig.GcsOutputConfig.ShardingConfig" = (
206+
proto.Field(
207+
proto.MESSAGE,
208+
number=3,
209+
message="DocumentOutputConfig.GcsOutputConfig.ShardingConfig",
210+
)
211+
)
182212

183213
gcs_output_config: GcsOutputConfig = proto.Field(
184214
proto.MESSAGE,

samples/generated_samples/snippet_metadata_google.cloud.documentai.v1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-documentai",
11-
"version": "2.4.1"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

samples/generated_samples/snippet_metadata_google.cloud.documentai.v1beta2.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-documentai",
11-
"version": "2.4.1"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

samples/generated_samples/snippet_metadata_google.cloud.documentai.v1beta3.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-documentai",
11-
"version": "2.4.1"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy