diff --git a/packages/google-cloud-documentai/google/cloud/documentai_v1beta3/services/document_processor_service/transports/base.py b/packages/google-cloud-documentai/google/cloud/documentai_v1beta3/services/document_processor_service/transports/base.py index 5af85e9c7819..28d13393ad6d 100644 --- a/packages/google-cloud-documentai/google/cloud/documentai_v1beta3/services/document_processor_service/transports/base.py +++ b/packages/google-cloud-documentai/google/cloud/documentai_v1beta3/services/document_processor_service/transports/base.py @@ -136,11 +136,12 @@ def _prep_wrapped_messages(self, client_info): self.process_document: gapic_v1.method.wrap_method( self.process_document, default_retry=retries.Retry( - initial=0.1, - maximum=60.0, - multiplier=1.3, + initial=1.0, + maximum=90.0, + multiplier=9.0, predicate=retries.if_exception_type( core_exceptions.DeadlineExceeded, + core_exceptions.ResourceExhausted, core_exceptions.ServiceUnavailable, ), deadline=300.0, @@ -151,9 +152,9 @@ def _prep_wrapped_messages(self, client_info): self.batch_process_documents: gapic_v1.method.wrap_method( self.batch_process_documents, default_retry=retries.Retry( - initial=0.1, + initial=1.0, maximum=60.0, - multiplier=1.3, + multiplier=1.5, predicate=retries.if_exception_type( core_exceptions.DeadlineExceeded, core_exceptions.ServiceUnavailable, @@ -246,9 +247,9 @@ def _prep_wrapped_messages(self, client_info): self.review_document: gapic_v1.method.wrap_method( self.review_document, default_retry=retries.Retry( - initial=0.1, + initial=1.0, maximum=60.0, - multiplier=1.3, + multiplier=1.5, predicate=retries.if_exception_type( core_exceptions.DeadlineExceeded, core_exceptions.ServiceUnavailable, diff --git a/packages/google-cloud-documentai/google/cloud/documentai_v1beta3/services/document_processor_service/transports/grpc_asyncio.py b/packages/google-cloud-documentai/google/cloud/documentai_v1beta3/services/document_processor_service/transports/grpc_asyncio.py index 62c68cca4b6e..1d293f041566 100644 --- a/packages/google-cloud-documentai/google/cloud/documentai_v1beta3/services/document_processor_service/transports/grpc_asyncio.py +++ b/packages/google-cloud-documentai/google/cloud/documentai_v1beta3/services/document_processor_service/transports/grpc_asyncio.py @@ -966,11 +966,12 @@ def _prep_wrapped_messages(self, client_info): self.process_document: self._wrap_method( self.process_document, default_retry=retries.AsyncRetry( - initial=0.1, - maximum=60.0, - multiplier=1.3, + initial=1.0, + maximum=90.0, + multiplier=9.0, predicate=retries.if_exception_type( core_exceptions.DeadlineExceeded, + core_exceptions.ResourceExhausted, core_exceptions.ServiceUnavailable, ), deadline=300.0, @@ -981,9 +982,9 @@ def _prep_wrapped_messages(self, client_info): self.batch_process_documents: self._wrap_method( self.batch_process_documents, default_retry=retries.AsyncRetry( - initial=0.1, + initial=1.0, maximum=60.0, - multiplier=1.3, + multiplier=1.5, predicate=retries.if_exception_type( core_exceptions.DeadlineExceeded, core_exceptions.ServiceUnavailable, @@ -1076,9 +1077,9 @@ def _prep_wrapped_messages(self, client_info): self.review_document: self._wrap_method( self.review_document, default_retry=retries.AsyncRetry( - initial=0.1, + initial=1.0, maximum=60.0, - multiplier=1.3, + multiplier=1.5, predicate=retries.if_exception_type( core_exceptions.DeadlineExceeded, core_exceptions.ServiceUnavailable, diff --git a/packages/google-cloud-documentai/google/cloud/documentai_v1beta3/types/dataset.py b/packages/google-cloud-documentai/google/cloud/documentai_v1beta3/types/dataset.py index 2c63a0f3915e..320e8d5c21fb 100644 --- a/packages/google-cloud-documentai/google/cloud/documentai_v1beta3/types/dataset.py +++ b/packages/google-cloud-documentai/google/cloud/documentai_v1beta3/types/dataset.py @@ -279,6 +279,10 @@ class DatasetSchema(proto.Message): ``projects/{project}/locations/{location}/processors/{processor}/dataset/datasetSchema`` document_schema (google.cloud.documentai_v1beta3.types.DocumentSchema): Optional. Schema of the dataset. + satisfies_pzs (bool): + Output only. Reserved for future use. + satisfies_pzi (bool): + Output only. Reserved for future use. """ name: str = proto.Field( @@ -290,6 +294,14 @@ class DatasetSchema(proto.Message): number=3, message=gcd_document_schema.DocumentSchema, ) + satisfies_pzs: bool = proto.Field( + proto.BOOL, + number=4, + ) + satisfies_pzi: bool = proto.Field( + proto.BOOL, + number=5, + ) class BatchDatasetDocuments(proto.Message): diff --git a/packages/google-cloud-documentai/tests/unit/gapic/documentai_v1beta3/test_document_service.py b/packages/google-cloud-documentai/tests/unit/gapic/documentai_v1beta3/test_document_service.py index 3849a96e4844..321a4a0eb996 100644 --- a/packages/google-cloud-documentai/tests/unit/gapic/documentai_v1beta3/test_document_service.py +++ b/packages/google-cloud-documentai/tests/unit/gapic/documentai_v1beta3/test_document_service.py @@ -3091,6 +3091,8 @@ def test_get_dataset_schema(request_type, transport: str = "grpc"): # Designate an appropriate return value for the call. call.return_value = dataset.DatasetSchema( name="name_value", + satisfies_pzs=True, + satisfies_pzi=True, ) response = client.get_dataset_schema(request) @@ -3103,6 +3105,8 @@ def test_get_dataset_schema(request_type, transport: str = "grpc"): # Establish that the response is the type that we expect. assert isinstance(response, dataset.DatasetSchema) assert response.name == "name_value" + assert response.satisfies_pzs is True + assert response.satisfies_pzi is True def test_get_dataset_schema_non_empty_request_with_auto_populated_field(): @@ -3238,6 +3242,8 @@ async def test_get_dataset_schema_async( call.return_value = grpc_helpers_async.FakeUnaryUnaryCall( dataset.DatasetSchema( name="name_value", + satisfies_pzs=True, + satisfies_pzi=True, ) ) response = await client.get_dataset_schema(request) @@ -3251,6 +3257,8 @@ async def test_get_dataset_schema_async( # Establish that the response is the type that we expect. assert isinstance(response, dataset.DatasetSchema) assert response.name == "name_value" + assert response.satisfies_pzs is True + assert response.satisfies_pzi is True @pytest.mark.asyncio @@ -3433,6 +3441,8 @@ def test_update_dataset_schema(request_type, transport: str = "grpc"): # Designate an appropriate return value for the call. call.return_value = dataset.DatasetSchema( name="name_value", + satisfies_pzs=True, + satisfies_pzi=True, ) response = client.update_dataset_schema(request) @@ -3445,6 +3455,8 @@ def test_update_dataset_schema(request_type, transport: str = "grpc"): # Establish that the response is the type that we expect. assert isinstance(response, dataset.DatasetSchema) assert response.name == "name_value" + assert response.satisfies_pzs is True + assert response.satisfies_pzi is True def test_update_dataset_schema_non_empty_request_with_auto_populated_field(): @@ -3577,6 +3589,8 @@ async def test_update_dataset_schema_async( call.return_value = grpc_helpers_async.FakeUnaryUnaryCall( dataset.DatasetSchema( name="name_value", + satisfies_pzs=True, + satisfies_pzi=True, ) ) response = await client.update_dataset_schema(request) @@ -3590,6 +3604,8 @@ async def test_update_dataset_schema_async( # Establish that the response is the type that we expect. assert isinstance(response, dataset.DatasetSchema) assert response.name == "name_value" + assert response.satisfies_pzs is True + assert response.satisfies_pzi is True @pytest.mark.asyncio @@ -5561,6 +5577,8 @@ async def test_get_dataset_schema_empty_call_grpc_asyncio(): call.return_value = grpc_helpers_async.FakeUnaryUnaryCall( dataset.DatasetSchema( name="name_value", + satisfies_pzs=True, + satisfies_pzi=True, ) ) await client.get_dataset_schema(request=None) @@ -5590,6 +5608,8 @@ async def test_update_dataset_schema_empty_call_grpc_asyncio(): call.return_value = grpc_helpers_async.FakeUnaryUnaryCall( dataset.DatasetSchema( name="name_value", + satisfies_pzs=True, + satisfies_pzi=True, ) ) await client.update_dataset_schema(request=None) @@ -6350,6 +6370,8 @@ def test_get_dataset_schema_rest_call_success(request_type): # Designate an appropriate value for the returned response. return_value = dataset.DatasetSchema( name="name_value", + satisfies_pzs=True, + satisfies_pzi=True, ) # Wrap the value into a proper Response obj @@ -6366,6 +6388,8 @@ def test_get_dataset_schema_rest_call_success(request_type): # Establish that the response is the type that we expect. assert isinstance(response, dataset.DatasetSchema) assert response.name == "name_value" + assert response.satisfies_pzs is True + assert response.satisfies_pzi is True @pytest.mark.parametrize("null_interceptor", [True, False]) @@ -6507,6 +6531,8 @@ def test_update_dataset_schema_rest_call_success(request_type): "skip_naming_validation": True, }, }, + "satisfies_pzs": True, + "satisfies_pzi": True, } # The version of a generated dependency at test runtime may differ from the version used during generation. # Delete any fields which are not present in the current runtime dependency @@ -6584,6 +6610,8 @@ def get_message_fields(field): # Designate an appropriate value for the returned response. return_value = dataset.DatasetSchema( name="name_value", + satisfies_pzs=True, + satisfies_pzi=True, ) # Wrap the value into a proper Response obj @@ -6600,6 +6628,8 @@ def get_message_fields(field): # Establish that the response is the type that we expect. assert isinstance(response, dataset.DatasetSchema) assert response.name == "name_value" + assert response.satisfies_pzs is True + assert response.satisfies_pzi is True @pytest.mark.parametrize("null_interceptor", [True, False])