Skip to content

Commit c5b9322

Browse files
feat: [google-cloud-documentai] Make Layout Parser generally available in V1 (#12745)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 638041158 Source-Link: googleapis/googleapis@1e41378 Source-Link: googleapis/googleapis-gen@1d34c97 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRvY3VtZW50YWkvLk93bEJvdC55YW1sIiwiaCI6IjFkMzRjOTdhZGQwOTNkZjU2MmZhNTA3MzJkYTM2NTZjNzZiODNlZGUifQ== --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <[email protected]>
1 parent a79b3ab commit c5b9322

File tree

10 files changed

+457
-7
lines changed

10 files changed

+457
-7
lines changed

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.27.1" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

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.27.1" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

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

Lines changed: 382 additions & 0 deletions
Large diffs are not rendered by default.

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ class ProcessorVersion(proto.Message):
7272
model_type (google.cloud.documentai_v1.types.ProcessorVersion.ModelType):
7373
Output only. The model type of this processor
7474
version.
75+
satisfies_pzs (bool):
76+
Output only. Reserved for future use.
77+
satisfies_pzi (bool):
78+
Output only. Reserved for future use.
7579
"""
7680

7781
class State(proto.Enum):
@@ -201,6 +205,14 @@ class DeprecationInfo(proto.Message):
201205
number=15,
202206
enum=ModelType,
203207
)
208+
satisfies_pzs: bool = proto.Field(
209+
proto.BOOL,
210+
number=16,
211+
)
212+
satisfies_pzi: bool = proto.Field(
213+
proto.BOOL,
214+
number=17,
215+
)
204216

205217

206218
class ProcessorVersionAlias(proto.Message):
@@ -256,6 +268,10 @@ class Processor(proto.Message):
256268
The `KMS
257269
key <https://cloud.google.com/security-key-management>`__
258270
used for encryption and decryption in CMEK scenarios.
271+
satisfies_pzs (bool):
272+
Output only. Reserved for future use.
273+
satisfies_pzi (bool):
274+
Output only. Reserved for future use.
259275
"""
260276

261277
class State(proto.Enum):
@@ -344,6 +360,14 @@ class State(proto.Enum):
344360
proto.STRING,
345361
number=8,
346362
)
363+
satisfies_pzs: bool = proto.Field(
364+
proto.BOOL,
365+
number=12,
366+
)
367+
satisfies_pzi: bool = proto.Field(
368+
proto.BOOL,
369+
number=13,
370+
)
347371

348372

349373
__all__ = tuple(sorted(__protobuf__.manifest))

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.27.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.27.1" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-documentai/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.27.1"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

packages/google-cloud-documentai/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.27.1"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

packages/google-cloud-documentai/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.27.1"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

packages/google-cloud-documentai/tests/unit/gapic/documentai_v1/test_document_processor_service.py

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3970,6 +3970,8 @@ def test_get_processor(request_type, transport: str = "grpc"):
39703970
default_processor_version="default_processor_version_value",
39713971
process_endpoint="process_endpoint_value",
39723972
kms_key_name="kms_key_name_value",
3973+
satisfies_pzs=True,
3974+
satisfies_pzi=True,
39733975
)
39743976
response = client.get_processor(request)
39753977

@@ -3988,6 +3990,8 @@ def test_get_processor(request_type, transport: str = "grpc"):
39883990
assert response.default_processor_version == "default_processor_version_value"
39893991
assert response.process_endpoint == "process_endpoint_value"
39903992
assert response.kms_key_name == "kms_key_name_value"
3993+
assert response.satisfies_pzs is True
3994+
assert response.satisfies_pzi is True
39913995

39923996

39933997
def test_get_processor_empty_call():
@@ -4093,6 +4097,8 @@ async def test_get_processor_empty_call_async():
40934097
default_processor_version="default_processor_version_value",
40944098
process_endpoint="process_endpoint_value",
40954099
kms_key_name="kms_key_name_value",
4100+
satisfies_pzs=True,
4101+
satisfies_pzi=True,
40964102
)
40974103
)
40984104
response = await client.get_processor()
@@ -4173,6 +4179,8 @@ async def test_get_processor_async(
41734179
default_processor_version="default_processor_version_value",
41744180
process_endpoint="process_endpoint_value",
41754181
kms_key_name="kms_key_name_value",
4182+
satisfies_pzs=True,
4183+
satisfies_pzi=True,
41764184
)
41774185
)
41784186
response = await client.get_processor(request)
@@ -4192,6 +4200,8 @@ async def test_get_processor_async(
41924200
assert response.default_processor_version == "default_processor_version_value"
41934201
assert response.process_endpoint == "process_endpoint_value"
41944202
assert response.kms_key_name == "kms_key_name_value"
4203+
assert response.satisfies_pzs is True
4204+
assert response.satisfies_pzi is True
41954205

41964206

41974207
@pytest.mark.asyncio
@@ -4773,6 +4783,8 @@ def test_get_processor_version(request_type, transport: str = "grpc"):
47734783
kms_key_version_name="kms_key_version_name_value",
47744784
google_managed=True,
47754785
model_type=processor.ProcessorVersion.ModelType.MODEL_TYPE_GENERATIVE,
4786+
satisfies_pzs=True,
4787+
satisfies_pzi=True,
47764788
)
47774789
response = client.get_processor_version(request)
47784790

@@ -4794,6 +4806,8 @@ def test_get_processor_version(request_type, transport: str = "grpc"):
47944806
response.model_type
47954807
== processor.ProcessorVersion.ModelType.MODEL_TYPE_GENERATIVE
47964808
)
4809+
assert response.satisfies_pzs is True
4810+
assert response.satisfies_pzi is True
47974811

47984812

47994813
def test_get_processor_version_empty_call():
@@ -4910,6 +4924,8 @@ async def test_get_processor_version_empty_call_async():
49104924
kms_key_version_name="kms_key_version_name_value",
49114925
google_managed=True,
49124926
model_type=processor.ProcessorVersion.ModelType.MODEL_TYPE_GENERATIVE,
4927+
satisfies_pzs=True,
4928+
satisfies_pzi=True,
49134929
)
49144930
)
49154931
response = await client.get_processor_version()
@@ -4992,6 +5008,8 @@ async def test_get_processor_version_async(
49925008
kms_key_version_name="kms_key_version_name_value",
49935009
google_managed=True,
49945010
model_type=processor.ProcessorVersion.ModelType.MODEL_TYPE_GENERATIVE,
5011+
satisfies_pzs=True,
5012+
satisfies_pzi=True,
49955013
)
49965014
)
49975015
response = await client.get_processor_version(request)
@@ -5014,6 +5032,8 @@ async def test_get_processor_version_async(
50145032
response.model_type
50155033
== processor.ProcessorVersion.ModelType.MODEL_TYPE_GENERATIVE
50165034
)
5035+
assert response.satisfies_pzs is True
5036+
assert response.satisfies_pzi is True
50175037

50185038

50195039
@pytest.mark.asyncio
@@ -6972,6 +6992,8 @@ def test_create_processor(request_type, transport: str = "grpc"):
69726992
default_processor_version="default_processor_version_value",
69736993
process_endpoint="process_endpoint_value",
69746994
kms_key_name="kms_key_name_value",
6995+
satisfies_pzs=True,
6996+
satisfies_pzi=True,
69756997
)
69766998
response = client.create_processor(request)
69776999

@@ -6990,6 +7012,8 @@ def test_create_processor(request_type, transport: str = "grpc"):
69907012
assert response.default_processor_version == "default_processor_version_value"
69917013
assert response.process_endpoint == "process_endpoint_value"
69927014
assert response.kms_key_name == "kms_key_name_value"
7015+
assert response.satisfies_pzs is True
7016+
assert response.satisfies_pzi is True
69937017

69947018

69957019
def test_create_processor_empty_call():
@@ -7097,6 +7121,8 @@ async def test_create_processor_empty_call_async():
70977121
default_processor_version="default_processor_version_value",
70987122
process_endpoint="process_endpoint_value",
70997123
kms_key_name="kms_key_name_value",
7124+
satisfies_pzs=True,
7125+
satisfies_pzi=True,
71007126
)
71017127
)
71027128
response = await client.create_processor()
@@ -7177,6 +7203,8 @@ async def test_create_processor_async(
71777203
default_processor_version="default_processor_version_value",
71787204
process_endpoint="process_endpoint_value",
71797205
kms_key_name="kms_key_name_value",
7206+
satisfies_pzs=True,
7207+
satisfies_pzi=True,
71807208
)
71817209
)
71827210
response = await client.create_processor(request)
@@ -7196,6 +7224,8 @@ async def test_create_processor_async(
71967224
assert response.default_processor_version == "default_processor_version_value"
71977225
assert response.process_endpoint == "process_endpoint_value"
71987226
assert response.kms_key_name == "kms_key_name_value"
7227+
assert response.satisfies_pzs is True
7228+
assert response.satisfies_pzi is True
71997229

72007230

72017231
@pytest.mark.asyncio
@@ -12387,6 +12417,8 @@ def test_get_processor_rest(request_type):
1238712417
default_processor_version="default_processor_version_value",
1238812418
process_endpoint="process_endpoint_value",
1238912419
kms_key_name="kms_key_name_value",
12420+
satisfies_pzs=True,
12421+
satisfies_pzi=True,
1239012422
)
1239112423

1239212424
# Wrap the value into a proper Response obj
@@ -12409,6 +12441,8 @@ def test_get_processor_rest(request_type):
1240912441
assert response.default_processor_version == "default_processor_version_value"
1241012442
assert response.process_endpoint == "process_endpoint_value"
1241112443
assert response.kms_key_name == "kms_key_name_value"
12444+
assert response.satisfies_pzs is True
12445+
assert response.satisfies_pzi is True
1241212446

1241312447

1241412448
def test_get_processor_rest_use_cached_wrapped_rpc():
@@ -13023,6 +13057,8 @@ def test_get_processor_version_rest(request_type):
1302313057
kms_key_version_name="kms_key_version_name_value",
1302413058
google_managed=True,
1302513059
model_type=processor.ProcessorVersion.ModelType.MODEL_TYPE_GENERATIVE,
13060+
satisfies_pzs=True,
13061+
satisfies_pzi=True,
1302613062
)
1302713063

1302813064
# Wrap the value into a proper Response obj
@@ -13048,6 +13084,8 @@ def test_get_processor_version_rest(request_type):
1304813084
response.model_type
1304913085
== processor.ProcessorVersion.ModelType.MODEL_TYPE_GENERATIVE
1305013086
)
13087+
assert response.satisfies_pzs is True
13088+
assert response.satisfies_pzi is True
1305113089

1305213090

1305313091
def test_get_processor_version_rest_use_cached_wrapped_rpc():
@@ -14687,6 +14725,8 @@ def test_create_processor_rest(request_type):
1468714725
"process_endpoint": "process_endpoint_value",
1468814726
"create_time": {"seconds": 751, "nanos": 543},
1468914727
"kms_key_name": "kms_key_name_value",
14728+
"satisfies_pzs": True,
14729+
"satisfies_pzi": True,
1469014730
}
1469114731
# The version of a generated dependency at test runtime may differ from the version used during generation.
1469214732
# Delete any fields which are not present in the current runtime dependency
@@ -14770,6 +14810,8 @@ def get_message_fields(field):
1477014810
default_processor_version="default_processor_version_value",
1477114811
process_endpoint="process_endpoint_value",
1477214812
kms_key_name="kms_key_name_value",
14813+
satisfies_pzs=True,
14814+
satisfies_pzi=True,
1477314815
)
1477414816

1477514817
# Wrap the value into a proper Response obj
@@ -14792,6 +14834,8 @@ def get_message_fields(field):
1479214834
assert response.default_processor_version == "default_processor_version_value"
1479314835
assert response.process_endpoint == "process_endpoint_value"
1479414836
assert response.kms_key_name == "kms_key_name_value"
14837+
assert response.satisfies_pzs is True
14838+
assert response.satisfies_pzi is True
1479514839

1479614840

1479714841
def test_create_processor_rest_use_cached_wrapped_rpc():

0 commit comments

Comments
 (0)