Skip to content
This repository was archived by the owner on Sep 20, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions google/cloud/documentai_v1/types/document_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,31 @@ class GcsOutputConfig(proto.Message):
Only supports top level document and pages field so it must
be in the form of ``{document_field_name}`` or
``pages.{page_field_name}``.
sharding_config (google.cloud.documentai_v1.types.DocumentOutputConfig.GcsOutputConfig.ShardingConfig):
Specifies the sharding config for the output
document.
"""

class ShardingConfig(proto.Message):
r"""The sharding config for the output document.

Attributes:
pages_per_shard (int):
The number of pages per shard.
pages_overlap (int):
The number of overlapping pages between
consecutive shards.
"""

pages_per_shard: int = proto.Field(
proto.INT32,
number=1,
)
pages_overlap: int = proto.Field(
proto.INT32,
number=2,
)

gcs_uri: str = proto.Field(
proto.STRING,
number=1,
Expand All @@ -179,6 +202,13 @@ class GcsOutputConfig(proto.Message):
number=2,
message=field_mask_pb2.FieldMask,
)
sharding_config: "DocumentOutputConfig.GcsOutputConfig.ShardingConfig" = (
proto.Field(
proto.MESSAGE,
number=3,
message="DocumentOutputConfig.GcsOutputConfig.ShardingConfig",
)
)

gcs_output_config: GcsOutputConfig = proto.Field(
proto.MESSAGE,
Expand Down
30 changes: 30 additions & 0 deletions google/cloud/documentai_v1beta3/types/document_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,31 @@ class GcsOutputConfig(proto.Message):
Only supports top level document and pages field so it must
be in the form of ``{document_field_name}`` or
``pages.{page_field_name}``.
sharding_config (google.cloud.documentai_v1beta3.types.DocumentOutputConfig.GcsOutputConfig.ShardingConfig):
Specifies the sharding config for the output
document.
"""

class ShardingConfig(proto.Message):
r"""The sharding config for the output document.

Attributes:
pages_per_shard (int):
The number of pages per shard.
pages_overlap (int):
The number of overlapping pages between
consecutive shards.
"""

pages_per_shard: int = proto.Field(
proto.INT32,
number=1,
)
pages_overlap: int = proto.Field(
proto.INT32,
number=2,
)

gcs_uri: str = proto.Field(
proto.STRING,
number=1,
Expand All @@ -179,6 +202,13 @@ class GcsOutputConfig(proto.Message):
number=2,
message=field_mask_pb2.FieldMask,
)
sharding_config: "DocumentOutputConfig.GcsOutputConfig.ShardingConfig" = (
proto.Field(
proto.MESSAGE,
number=3,
message="DocumentOutputConfig.GcsOutputConfig.ShardingConfig",
)
)

gcs_output_config: GcsOutputConfig = proto.Field(
proto.MESSAGE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-documentai",
"version": "2.4.1"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-documentai",
"version": "2.4.1"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-documentai",
"version": "2.4.1"
"version": "0.1.0"
},
"snippets": [
{
Expand Down