google-cloud-documentai 3.12.0__tar.gz → 3.13.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {google_cloud_documentai-3.12.0/google_cloud_documentai.egg-info → google_cloud_documentai-3.13.0}/PKG-INFO +6 -8
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/README.rst +2 -2
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai/gapic_version.py +1 -1
- {google_cloud_documentai-3.12.0/google/cloud/documentai_v1beta3 → google_cloud_documentai-3.13.0/google/cloud/documentai_v1}/gapic_version.py +1 -1
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1/services/document_processor_service/async_client.py +46 -26
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1/services/document_processor_service/client.py +54 -30
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1/services/document_processor_service/transports/base.py +6 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1/services/document_processor_service/transports/grpc.py +6 -2
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1/services/document_processor_service/transports/grpc_asyncio.py +6 -2
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1/services/document_processor_service/transports/rest.py +6 -0
- {google_cloud_documentai-3.12.0/google/cloud/documentai_v1 → google_cloud_documentai-3.13.0/google/cloud/documentai_v1beta3}/gapic_version.py +1 -1
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1beta3/services/document_processor_service/async_client.py +46 -26
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1beta3/services/document_processor_service/client.py +54 -30
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1beta3/services/document_processor_service/transports/base.py +6 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1beta3/services/document_processor_service/transports/grpc.py +6 -2
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1beta3/services/document_processor_service/transports/grpc_asyncio.py +6 -2
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1beta3/services/document_processor_service/transports/rest.py +6 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1beta3/services/document_service/async_client.py +46 -26
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1beta3/services/document_service/client.py +54 -30
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1beta3/services/document_service/transports/base.py +6 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1beta3/services/document_service/transports/grpc.py +6 -2
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1beta3/services/document_service/transports/grpc_asyncio.py +6 -2
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1beta3/services/document_service/transports/rest.py +6 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0/google_cloud_documentai.egg-info}/PKG-INFO +6 -8
- google_cloud_documentai-3.13.0/google_cloud_documentai.egg-info/requires.txt +11 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/setup.py +3 -5
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/tests/unit/gapic/documentai_v1/test_document_processor_service.py +623 -374
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/tests/unit/gapic/documentai_v1beta3/test_document_processor_service.py +643 -392
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/tests/unit/gapic/documentai_v1beta3/test_document_service.py +336 -128
- google_cloud_documentai-3.12.0/google_cloud_documentai.egg-info/requires.txt +0 -11
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/LICENSE +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/MANIFEST.in +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai/__init__.py +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai/py.typed +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1/__init__.py +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1/gapic_metadata.json +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1/py.typed +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1/services/__init__.py +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1/services/document_processor_service/__init__.py +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1/services/document_processor_service/pagers.py +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1/services/document_processor_service/transports/__init__.py +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1/services/document_processor_service/transports/rest_base.py +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1/types/__init__.py +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1/types/barcode.py +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1/types/document.py +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1/types/document_io.py +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1/types/document_processor_service.py +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1/types/document_schema.py +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1/types/evaluation.py +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1/types/geometry.py +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1/types/operation_metadata.py +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1/types/processor.py +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1/types/processor_type.py +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1beta3/__init__.py +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1beta3/gapic_metadata.json +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1beta3/py.typed +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1beta3/services/__init__.py +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1beta3/services/document_processor_service/__init__.py +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1beta3/services/document_processor_service/pagers.py +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1beta3/services/document_processor_service/transports/__init__.py +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1beta3/services/document_processor_service/transports/rest_base.py +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1beta3/services/document_service/__init__.py +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1beta3/services/document_service/pagers.py +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1beta3/services/document_service/transports/__init__.py +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1beta3/services/document_service/transports/rest_base.py +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1beta3/types/__init__.py +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1beta3/types/barcode.py +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1beta3/types/dataset.py +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1beta3/types/document.py +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1beta3/types/document_io.py +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1beta3/types/document_processor_service.py +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1beta3/types/document_schema.py +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1beta3/types/document_service.py +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1beta3/types/evaluation.py +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1beta3/types/geometry.py +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1beta3/types/operation_metadata.py +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1beta3/types/processor.py +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google/cloud/documentai_v1beta3/types/processor_type.py +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google_cloud_documentai.egg-info/SOURCES.txt +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google_cloud_documentai.egg-info/dependency_links.txt +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google_cloud_documentai.egg-info/not-zip-safe +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/google_cloud_documentai.egg-info/top_level.txt +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/setup.cfg +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/tests/__init__.py +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/tests/unit/__init__.py +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/tests/unit/gapic/__init__.py +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/tests/unit/gapic/documentai_v1/__init__.py +0 -0
- {google_cloud_documentai-3.12.0 → google_cloud_documentai-3.13.0}/tests/unit/gapic/documentai_v1beta3/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: google-cloud-documentai
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.13.0
|
|
4
4
|
Summary: Google Cloud Documentai API client library
|
|
5
5
|
Home-page: https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-documentai
|
|
6
6
|
Author: Google LLC
|
|
@@ -12,8 +12,6 @@ Classifier: Intended Audience :: Developers
|
|
|
12
12
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
13
13
|
Classifier: Programming Language :: Python
|
|
14
14
|
Classifier: Programming Language :: Python :: 3
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.7
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
17
15
|
Classifier: Programming Language :: Python :: 3.9
|
|
18
16
|
Classifier: Programming Language :: Python :: 3.10
|
|
19
17
|
Classifier: Programming Language :: Python :: 3.11
|
|
@@ -22,15 +20,15 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
22
20
|
Classifier: Programming Language :: Python :: 3.14
|
|
23
21
|
Classifier: Operating System :: OS Independent
|
|
24
22
|
Classifier: Topic :: Internet
|
|
25
|
-
Requires-Python: >=3.
|
|
23
|
+
Requires-Python: >=3.9
|
|
26
24
|
License-File: LICENSE
|
|
27
|
-
Requires-Dist: google-api-core[grpc]
|
|
25
|
+
Requires-Dist: google-api-core[grpc]<3.0.0,>=2.11.0
|
|
28
26
|
Requires-Dist: google-auth!=2.24.0,!=2.25.0,<3.0.0,>=2.14.1
|
|
29
27
|
Requires-Dist: grpcio<2.0.0,>=1.33.2
|
|
30
28
|
Requires-Dist: grpcio<2.0.0,>=1.75.1; python_version >= "3.14"
|
|
31
29
|
Requires-Dist: proto-plus<2.0.0,>=1.22.3
|
|
32
30
|
Requires-Dist: proto-plus<2.0.0,>=1.25.0; python_version >= "3.13"
|
|
33
|
-
Requires-Dist: protobuf
|
|
31
|
+
Requires-Dist: protobuf<8.0.0,>=4.25.8
|
|
34
32
|
Dynamic: author
|
|
35
33
|
Dynamic: author-email
|
|
36
34
|
Dynamic: classifier
|
|
@@ -106,14 +104,14 @@ Supported Python Versions
|
|
|
106
104
|
Our client libraries are compatible with all current `active`_ and `maintenance`_ versions of
|
|
107
105
|
Python.
|
|
108
106
|
|
|
109
|
-
Python >= 3.
|
|
107
|
+
Python >= 3.9, including 3.14
|
|
110
108
|
|
|
111
109
|
.. _active: https://devguide.python.org/devcycle/#in-development-main-branch
|
|
112
110
|
.. _maintenance: https://devguide.python.org/devcycle/#maintenance-branches
|
|
113
111
|
|
|
114
112
|
Unsupported Python Versions
|
|
115
113
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
116
|
-
Python <= 3.
|
|
114
|
+
Python <= 3.8
|
|
117
115
|
|
|
118
116
|
If you are using an `end-of-life`_
|
|
119
117
|
version of Python, we recommend that you update as soon as possible to an actively supported version.
|
|
@@ -61,14 +61,14 @@ Supported Python Versions
|
|
|
61
61
|
Our client libraries are compatible with all current `active`_ and `maintenance`_ versions of
|
|
62
62
|
Python.
|
|
63
63
|
|
|
64
|
-
Python >= 3.
|
|
64
|
+
Python >= 3.9, including 3.14
|
|
65
65
|
|
|
66
66
|
.. _active: https://devguide.python.org/devcycle/#in-development-main-branch
|
|
67
67
|
.. _maintenance: https://devguide.python.org/devcycle/#maintenance-branches
|
|
68
68
|
|
|
69
69
|
Unsupported Python Versions
|
|
70
70
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
71
|
-
Python <= 3.
|
|
71
|
+
Python <= 3.8
|
|
72
72
|
|
|
73
73
|
If you are using an `end-of-life`_
|
|
74
74
|
version of Python, we recommend that you update as soon as possible to an actively supported version.
|
|
@@ -240,7 +240,7 @@ class DocumentProcessorServiceAsyncClient:
|
|
|
240
240
|
return self._client.transport
|
|
241
241
|
|
|
242
242
|
@property
|
|
243
|
-
def api_endpoint(self):
|
|
243
|
+
def api_endpoint(self) -> str:
|
|
244
244
|
"""Return the API endpoint used by the client instance.
|
|
245
245
|
|
|
246
246
|
Returns:
|
|
@@ -3156,7 +3156,7 @@ class DocumentProcessorServiceAsyncClient:
|
|
|
3156
3156
|
|
|
3157
3157
|
async def list_operations(
|
|
3158
3158
|
self,
|
|
3159
|
-
request: Optional[operations_pb2.ListOperationsRequest] = None,
|
|
3159
|
+
request: Optional[Union[operations_pb2.ListOperationsRequest, dict]] = None,
|
|
3160
3160
|
*,
|
|
3161
3161
|
retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
|
3162
3162
|
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
|
|
@@ -3182,8 +3182,12 @@ class DocumentProcessorServiceAsyncClient:
|
|
|
3182
3182
|
# Create or coerce a protobuf request object.
|
|
3183
3183
|
# The request isn't a proto-plus wrapped type,
|
|
3184
3184
|
# so it must be constructed via keyword expansion.
|
|
3185
|
-
if
|
|
3186
|
-
|
|
3185
|
+
if request is None:
|
|
3186
|
+
request_pb = operations_pb2.ListOperationsRequest()
|
|
3187
|
+
elif isinstance(request, dict):
|
|
3188
|
+
request_pb = operations_pb2.ListOperationsRequest(**request)
|
|
3189
|
+
else:
|
|
3190
|
+
request_pb = request
|
|
3187
3191
|
|
|
3188
3192
|
# Wrap the RPC method; this adds retry and timeout information,
|
|
3189
3193
|
# and friendly error handling.
|
|
@@ -3192,7 +3196,7 @@ class DocumentProcessorServiceAsyncClient:
|
|
|
3192
3196
|
# Certain fields should be provided within the metadata header;
|
|
3193
3197
|
# add these here.
|
|
3194
3198
|
metadata = tuple(metadata) + (
|
|
3195
|
-
gapic_v1.routing_header.to_grpc_metadata((("name",
|
|
3199
|
+
gapic_v1.routing_header.to_grpc_metadata((("name", request_pb.name),)),
|
|
3196
3200
|
)
|
|
3197
3201
|
|
|
3198
3202
|
# Validate the universe domain.
|
|
@@ -3200,7 +3204,7 @@ class DocumentProcessorServiceAsyncClient:
|
|
|
3200
3204
|
|
|
3201
3205
|
# Send the request.
|
|
3202
3206
|
response = await rpc(
|
|
3203
|
-
|
|
3207
|
+
request_pb,
|
|
3204
3208
|
retry=retry,
|
|
3205
3209
|
timeout=timeout,
|
|
3206
3210
|
metadata=metadata,
|
|
@@ -3211,7 +3215,7 @@ class DocumentProcessorServiceAsyncClient:
|
|
|
3211
3215
|
|
|
3212
3216
|
async def get_operation(
|
|
3213
3217
|
self,
|
|
3214
|
-
request: Optional[operations_pb2.GetOperationRequest] = None,
|
|
3218
|
+
request: Optional[Union[operations_pb2.GetOperationRequest, dict]] = None,
|
|
3215
3219
|
*,
|
|
3216
3220
|
retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
|
3217
3221
|
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
|
|
@@ -3237,8 +3241,12 @@ class DocumentProcessorServiceAsyncClient:
|
|
|
3237
3241
|
# Create or coerce a protobuf request object.
|
|
3238
3242
|
# The request isn't a proto-plus wrapped type,
|
|
3239
3243
|
# so it must be constructed via keyword expansion.
|
|
3240
|
-
if
|
|
3241
|
-
|
|
3244
|
+
if request is None:
|
|
3245
|
+
request_pb = operations_pb2.GetOperationRequest()
|
|
3246
|
+
elif isinstance(request, dict):
|
|
3247
|
+
request_pb = operations_pb2.GetOperationRequest(**request)
|
|
3248
|
+
else:
|
|
3249
|
+
request_pb = request
|
|
3242
3250
|
|
|
3243
3251
|
# Wrap the RPC method; this adds retry and timeout information,
|
|
3244
3252
|
# and friendly error handling.
|
|
@@ -3247,7 +3255,7 @@ class DocumentProcessorServiceAsyncClient:
|
|
|
3247
3255
|
# Certain fields should be provided within the metadata header;
|
|
3248
3256
|
# add these here.
|
|
3249
3257
|
metadata = tuple(metadata) + (
|
|
3250
|
-
gapic_v1.routing_header.to_grpc_metadata((("name",
|
|
3258
|
+
gapic_v1.routing_header.to_grpc_metadata((("name", request_pb.name),)),
|
|
3251
3259
|
)
|
|
3252
3260
|
|
|
3253
3261
|
# Validate the universe domain.
|
|
@@ -3255,7 +3263,7 @@ class DocumentProcessorServiceAsyncClient:
|
|
|
3255
3263
|
|
|
3256
3264
|
# Send the request.
|
|
3257
3265
|
response = await rpc(
|
|
3258
|
-
|
|
3266
|
+
request_pb,
|
|
3259
3267
|
retry=retry,
|
|
3260
3268
|
timeout=timeout,
|
|
3261
3269
|
metadata=metadata,
|
|
@@ -3266,7 +3274,7 @@ class DocumentProcessorServiceAsyncClient:
|
|
|
3266
3274
|
|
|
3267
3275
|
async def cancel_operation(
|
|
3268
3276
|
self,
|
|
3269
|
-
request: Optional[operations_pb2.CancelOperationRequest] = None,
|
|
3277
|
+
request: Optional[Union[operations_pb2.CancelOperationRequest, dict]] = None,
|
|
3270
3278
|
*,
|
|
3271
3279
|
retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
|
3272
3280
|
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
|
|
@@ -3295,8 +3303,12 @@ class DocumentProcessorServiceAsyncClient:
|
|
|
3295
3303
|
# Create or coerce a protobuf request object.
|
|
3296
3304
|
# The request isn't a proto-plus wrapped type,
|
|
3297
3305
|
# so it must be constructed via keyword expansion.
|
|
3298
|
-
if
|
|
3299
|
-
|
|
3306
|
+
if request is None:
|
|
3307
|
+
request_pb = operations_pb2.CancelOperationRequest()
|
|
3308
|
+
elif isinstance(request, dict):
|
|
3309
|
+
request_pb = operations_pb2.CancelOperationRequest(**request)
|
|
3310
|
+
else:
|
|
3311
|
+
request_pb = request
|
|
3300
3312
|
|
|
3301
3313
|
# Wrap the RPC method; this adds retry and timeout information,
|
|
3302
3314
|
# and friendly error handling.
|
|
@@ -3305,7 +3317,7 @@ class DocumentProcessorServiceAsyncClient:
|
|
|
3305
3317
|
# Certain fields should be provided within the metadata header;
|
|
3306
3318
|
# add these here.
|
|
3307
3319
|
metadata = tuple(metadata) + (
|
|
3308
|
-
gapic_v1.routing_header.to_grpc_metadata((("name",
|
|
3320
|
+
gapic_v1.routing_header.to_grpc_metadata((("name", request_pb.name),)),
|
|
3309
3321
|
)
|
|
3310
3322
|
|
|
3311
3323
|
# Validate the universe domain.
|
|
@@ -3313,7 +3325,7 @@ class DocumentProcessorServiceAsyncClient:
|
|
|
3313
3325
|
|
|
3314
3326
|
# Send the request.
|
|
3315
3327
|
await rpc(
|
|
3316
|
-
|
|
3328
|
+
request_pb,
|
|
3317
3329
|
retry=retry,
|
|
3318
3330
|
timeout=timeout,
|
|
3319
3331
|
metadata=metadata,
|
|
@@ -3321,7 +3333,7 @@ class DocumentProcessorServiceAsyncClient:
|
|
|
3321
3333
|
|
|
3322
3334
|
async def get_location(
|
|
3323
3335
|
self,
|
|
3324
|
-
request: Optional[locations_pb2.GetLocationRequest] = None,
|
|
3336
|
+
request: Optional[Union[locations_pb2.GetLocationRequest, dict]] = None,
|
|
3325
3337
|
*,
|
|
3326
3338
|
retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
|
3327
3339
|
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
|
|
@@ -3347,8 +3359,12 @@ class DocumentProcessorServiceAsyncClient:
|
|
|
3347
3359
|
# Create or coerce a protobuf request object.
|
|
3348
3360
|
# The request isn't a proto-plus wrapped type,
|
|
3349
3361
|
# so it must be constructed via keyword expansion.
|
|
3350
|
-
if
|
|
3351
|
-
|
|
3362
|
+
if request is None:
|
|
3363
|
+
request_pb = locations_pb2.GetLocationRequest()
|
|
3364
|
+
elif isinstance(request, dict):
|
|
3365
|
+
request_pb = locations_pb2.GetLocationRequest(**request)
|
|
3366
|
+
else:
|
|
3367
|
+
request_pb = request
|
|
3352
3368
|
|
|
3353
3369
|
# Wrap the RPC method; this adds retry and timeout information,
|
|
3354
3370
|
# and friendly error handling.
|
|
@@ -3357,7 +3373,7 @@ class DocumentProcessorServiceAsyncClient:
|
|
|
3357
3373
|
# Certain fields should be provided within the metadata header;
|
|
3358
3374
|
# add these here.
|
|
3359
3375
|
metadata = tuple(metadata) + (
|
|
3360
|
-
gapic_v1.routing_header.to_grpc_metadata((("name",
|
|
3376
|
+
gapic_v1.routing_header.to_grpc_metadata((("name", request_pb.name),)),
|
|
3361
3377
|
)
|
|
3362
3378
|
|
|
3363
3379
|
# Validate the universe domain.
|
|
@@ -3365,7 +3381,7 @@ class DocumentProcessorServiceAsyncClient:
|
|
|
3365
3381
|
|
|
3366
3382
|
# Send the request.
|
|
3367
3383
|
response = await rpc(
|
|
3368
|
-
|
|
3384
|
+
request_pb,
|
|
3369
3385
|
retry=retry,
|
|
3370
3386
|
timeout=timeout,
|
|
3371
3387
|
metadata=metadata,
|
|
@@ -3376,7 +3392,7 @@ class DocumentProcessorServiceAsyncClient:
|
|
|
3376
3392
|
|
|
3377
3393
|
async def list_locations(
|
|
3378
3394
|
self,
|
|
3379
|
-
request: Optional[locations_pb2.ListLocationsRequest] = None,
|
|
3395
|
+
request: Optional[Union[locations_pb2.ListLocationsRequest, dict]] = None,
|
|
3380
3396
|
*,
|
|
3381
3397
|
retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
|
3382
3398
|
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
|
|
@@ -3402,8 +3418,12 @@ class DocumentProcessorServiceAsyncClient:
|
|
|
3402
3418
|
# Create or coerce a protobuf request object.
|
|
3403
3419
|
# The request isn't a proto-plus wrapped type,
|
|
3404
3420
|
# so it must be constructed via keyword expansion.
|
|
3405
|
-
if
|
|
3406
|
-
|
|
3421
|
+
if request is None:
|
|
3422
|
+
request_pb = locations_pb2.ListLocationsRequest()
|
|
3423
|
+
elif isinstance(request, dict):
|
|
3424
|
+
request_pb = locations_pb2.ListLocationsRequest(**request)
|
|
3425
|
+
else:
|
|
3426
|
+
request_pb = request
|
|
3407
3427
|
|
|
3408
3428
|
# Wrap the RPC method; this adds retry and timeout information,
|
|
3409
3429
|
# and friendly error handling.
|
|
@@ -3412,7 +3432,7 @@ class DocumentProcessorServiceAsyncClient:
|
|
|
3412
3432
|
# Certain fields should be provided within the metadata header;
|
|
3413
3433
|
# add these here.
|
|
3414
3434
|
metadata = tuple(metadata) + (
|
|
3415
|
-
gapic_v1.routing_header.to_grpc_metadata((("name",
|
|
3435
|
+
gapic_v1.routing_header.to_grpc_metadata((("name", request_pb.name),)),
|
|
3416
3436
|
)
|
|
3417
3437
|
|
|
3418
3438
|
# Validate the universe domain.
|
|
@@ -3420,7 +3440,7 @@ class DocumentProcessorServiceAsyncClient:
|
|
|
3420
3440
|
|
|
3421
3441
|
# Send the request.
|
|
3422
3442
|
response = await rpc(
|
|
3423
|
-
|
|
3443
|
+
request_pb,
|
|
3424
3444
|
retry=retry,
|
|
3425
3445
|
timeout=timeout,
|
|
3426
3446
|
metadata=metadata,
|
|
@@ -130,7 +130,7 @@ class DocumentProcessorServiceClient(metaclass=DocumentProcessorServiceClientMet
|
|
|
130
130
|
"""
|
|
131
131
|
|
|
132
132
|
@staticmethod
|
|
133
|
-
def _get_default_mtls_endpoint(api_endpoint):
|
|
133
|
+
def _get_default_mtls_endpoint(api_endpoint) -> Optional[str]:
|
|
134
134
|
"""Converts api endpoint to mTLS endpoint.
|
|
135
135
|
|
|
136
136
|
Convert "*.sandbox.googleapis.com" and "*.googleapis.com" to
|
|
@@ -138,7 +138,7 @@ class DocumentProcessorServiceClient(metaclass=DocumentProcessorServiceClientMet
|
|
|
138
138
|
Args:
|
|
139
139
|
api_endpoint (Optional[str]): the api endpoint to convert.
|
|
140
140
|
Returns:
|
|
141
|
-
str: converted mTLS api endpoint.
|
|
141
|
+
Optional[str]: converted mTLS api endpoint.
|
|
142
142
|
"""
|
|
143
143
|
if not api_endpoint:
|
|
144
144
|
return api_endpoint
|
|
@@ -148,6 +148,10 @@ class DocumentProcessorServiceClient(metaclass=DocumentProcessorServiceClientMet
|
|
|
148
148
|
)
|
|
149
149
|
|
|
150
150
|
m = mtls_endpoint_re.match(api_endpoint)
|
|
151
|
+
if m is None:
|
|
152
|
+
# Could not parse api_endpoint; return as-is.
|
|
153
|
+
return api_endpoint
|
|
154
|
+
|
|
151
155
|
name, mtls, sandbox, googledomain = m.groups()
|
|
152
156
|
if mtls or not googledomain:
|
|
153
157
|
return api_endpoint
|
|
@@ -549,7 +553,7 @@ class DocumentProcessorServiceClient(metaclass=DocumentProcessorServiceClientMet
|
|
|
549
553
|
@staticmethod
|
|
550
554
|
def _get_api_endpoint(
|
|
551
555
|
api_override, client_cert_source, universe_domain, use_mtls_endpoint
|
|
552
|
-
):
|
|
556
|
+
) -> str:
|
|
553
557
|
"""Return the API endpoint used by the client.
|
|
554
558
|
|
|
555
559
|
Args:
|
|
@@ -648,7 +652,7 @@ class DocumentProcessorServiceClient(metaclass=DocumentProcessorServiceClientMet
|
|
|
648
652
|
error._details.append(json.dumps(cred_info))
|
|
649
653
|
|
|
650
654
|
@property
|
|
651
|
-
def api_endpoint(self):
|
|
655
|
+
def api_endpoint(self) -> str:
|
|
652
656
|
"""Return the API endpoint used by the client instance.
|
|
653
657
|
|
|
654
658
|
Returns:
|
|
@@ -750,7 +754,7 @@ class DocumentProcessorServiceClient(metaclass=DocumentProcessorServiceClientMet
|
|
|
750
754
|
self._universe_domain = DocumentProcessorServiceClient._get_universe_domain(
|
|
751
755
|
universe_domain_opt, self._universe_domain_env
|
|
752
756
|
)
|
|
753
|
-
self._api_endpoint =
|
|
757
|
+
self._api_endpoint: str = "" # updated below, depending on `transport`
|
|
754
758
|
|
|
755
759
|
# Initialize the universe domain validation.
|
|
756
760
|
self._is_universe_domain_valid = False
|
|
@@ -3607,7 +3611,7 @@ class DocumentProcessorServiceClient(metaclass=DocumentProcessorServiceClientMet
|
|
|
3607
3611
|
|
|
3608
3612
|
def list_operations(
|
|
3609
3613
|
self,
|
|
3610
|
-
request: Optional[operations_pb2.ListOperationsRequest] = None,
|
|
3614
|
+
request: Optional[Union[operations_pb2.ListOperationsRequest, dict]] = None,
|
|
3611
3615
|
*,
|
|
3612
3616
|
retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
|
3613
3617
|
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
|
|
@@ -3633,8 +3637,12 @@ class DocumentProcessorServiceClient(metaclass=DocumentProcessorServiceClientMet
|
|
|
3633
3637
|
# Create or coerce a protobuf request object.
|
|
3634
3638
|
# The request isn't a proto-plus wrapped type,
|
|
3635
3639
|
# so it must be constructed via keyword expansion.
|
|
3636
|
-
if
|
|
3637
|
-
|
|
3640
|
+
if request is None:
|
|
3641
|
+
request_pb = operations_pb2.ListOperationsRequest()
|
|
3642
|
+
elif isinstance(request, dict):
|
|
3643
|
+
request_pb = operations_pb2.ListOperationsRequest(**request)
|
|
3644
|
+
else:
|
|
3645
|
+
request_pb = request
|
|
3638
3646
|
|
|
3639
3647
|
# Wrap the RPC method; this adds retry and timeout information,
|
|
3640
3648
|
# and friendly error handling.
|
|
@@ -3643,7 +3651,7 @@ class DocumentProcessorServiceClient(metaclass=DocumentProcessorServiceClientMet
|
|
|
3643
3651
|
# Certain fields should be provided within the metadata header;
|
|
3644
3652
|
# add these here.
|
|
3645
3653
|
metadata = tuple(metadata) + (
|
|
3646
|
-
gapic_v1.routing_header.to_grpc_metadata((("name",
|
|
3654
|
+
gapic_v1.routing_header.to_grpc_metadata((("name", request_pb.name),)),
|
|
3647
3655
|
)
|
|
3648
3656
|
|
|
3649
3657
|
# Validate the universe domain.
|
|
@@ -3652,7 +3660,7 @@ class DocumentProcessorServiceClient(metaclass=DocumentProcessorServiceClientMet
|
|
|
3652
3660
|
try:
|
|
3653
3661
|
# Send the request.
|
|
3654
3662
|
response = rpc(
|
|
3655
|
-
|
|
3663
|
+
request_pb,
|
|
3656
3664
|
retry=retry,
|
|
3657
3665
|
timeout=timeout,
|
|
3658
3666
|
metadata=metadata,
|
|
@@ -3666,7 +3674,7 @@ class DocumentProcessorServiceClient(metaclass=DocumentProcessorServiceClientMet
|
|
|
3666
3674
|
|
|
3667
3675
|
def get_operation(
|
|
3668
3676
|
self,
|
|
3669
|
-
request: Optional[operations_pb2.GetOperationRequest] = None,
|
|
3677
|
+
request: Optional[Union[operations_pb2.GetOperationRequest, dict]] = None,
|
|
3670
3678
|
*,
|
|
3671
3679
|
retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
|
3672
3680
|
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
|
|
@@ -3692,8 +3700,12 @@ class DocumentProcessorServiceClient(metaclass=DocumentProcessorServiceClientMet
|
|
|
3692
3700
|
# Create or coerce a protobuf request object.
|
|
3693
3701
|
# The request isn't a proto-plus wrapped type,
|
|
3694
3702
|
# so it must be constructed via keyword expansion.
|
|
3695
|
-
if
|
|
3696
|
-
|
|
3703
|
+
if request is None:
|
|
3704
|
+
request_pb = operations_pb2.GetOperationRequest()
|
|
3705
|
+
elif isinstance(request, dict):
|
|
3706
|
+
request_pb = operations_pb2.GetOperationRequest(**request)
|
|
3707
|
+
else:
|
|
3708
|
+
request_pb = request
|
|
3697
3709
|
|
|
3698
3710
|
# Wrap the RPC method; this adds retry and timeout information,
|
|
3699
3711
|
# and friendly error handling.
|
|
@@ -3702,7 +3714,7 @@ class DocumentProcessorServiceClient(metaclass=DocumentProcessorServiceClientMet
|
|
|
3702
3714
|
# Certain fields should be provided within the metadata header;
|
|
3703
3715
|
# add these here.
|
|
3704
3716
|
metadata = tuple(metadata) + (
|
|
3705
|
-
gapic_v1.routing_header.to_grpc_metadata((("name",
|
|
3717
|
+
gapic_v1.routing_header.to_grpc_metadata((("name", request_pb.name),)),
|
|
3706
3718
|
)
|
|
3707
3719
|
|
|
3708
3720
|
# Validate the universe domain.
|
|
@@ -3711,7 +3723,7 @@ class DocumentProcessorServiceClient(metaclass=DocumentProcessorServiceClientMet
|
|
|
3711
3723
|
try:
|
|
3712
3724
|
# Send the request.
|
|
3713
3725
|
response = rpc(
|
|
3714
|
-
|
|
3726
|
+
request_pb,
|
|
3715
3727
|
retry=retry,
|
|
3716
3728
|
timeout=timeout,
|
|
3717
3729
|
metadata=metadata,
|
|
@@ -3725,7 +3737,7 @@ class DocumentProcessorServiceClient(metaclass=DocumentProcessorServiceClientMet
|
|
|
3725
3737
|
|
|
3726
3738
|
def cancel_operation(
|
|
3727
3739
|
self,
|
|
3728
|
-
request: Optional[operations_pb2.CancelOperationRequest] = None,
|
|
3740
|
+
request: Optional[Union[operations_pb2.CancelOperationRequest, dict]] = None,
|
|
3729
3741
|
*,
|
|
3730
3742
|
retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
|
3731
3743
|
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
|
|
@@ -3754,8 +3766,12 @@ class DocumentProcessorServiceClient(metaclass=DocumentProcessorServiceClientMet
|
|
|
3754
3766
|
# Create or coerce a protobuf request object.
|
|
3755
3767
|
# The request isn't a proto-plus wrapped type,
|
|
3756
3768
|
# so it must be constructed via keyword expansion.
|
|
3757
|
-
if
|
|
3758
|
-
|
|
3769
|
+
if request is None:
|
|
3770
|
+
request_pb = operations_pb2.CancelOperationRequest()
|
|
3771
|
+
elif isinstance(request, dict):
|
|
3772
|
+
request_pb = operations_pb2.CancelOperationRequest(**request)
|
|
3773
|
+
else:
|
|
3774
|
+
request_pb = request
|
|
3759
3775
|
|
|
3760
3776
|
# Wrap the RPC method; this adds retry and timeout information,
|
|
3761
3777
|
# and friendly error handling.
|
|
@@ -3764,7 +3780,7 @@ class DocumentProcessorServiceClient(metaclass=DocumentProcessorServiceClientMet
|
|
|
3764
3780
|
# Certain fields should be provided within the metadata header;
|
|
3765
3781
|
# add these here.
|
|
3766
3782
|
metadata = tuple(metadata) + (
|
|
3767
|
-
gapic_v1.routing_header.to_grpc_metadata((("name",
|
|
3783
|
+
gapic_v1.routing_header.to_grpc_metadata((("name", request_pb.name),)),
|
|
3768
3784
|
)
|
|
3769
3785
|
|
|
3770
3786
|
# Validate the universe domain.
|
|
@@ -3772,7 +3788,7 @@ class DocumentProcessorServiceClient(metaclass=DocumentProcessorServiceClientMet
|
|
|
3772
3788
|
|
|
3773
3789
|
# Send the request.
|
|
3774
3790
|
rpc(
|
|
3775
|
-
|
|
3791
|
+
request_pb,
|
|
3776
3792
|
retry=retry,
|
|
3777
3793
|
timeout=timeout,
|
|
3778
3794
|
metadata=metadata,
|
|
@@ -3780,7 +3796,7 @@ class DocumentProcessorServiceClient(metaclass=DocumentProcessorServiceClientMet
|
|
|
3780
3796
|
|
|
3781
3797
|
def get_location(
|
|
3782
3798
|
self,
|
|
3783
|
-
request: Optional[locations_pb2.GetLocationRequest] = None,
|
|
3799
|
+
request: Optional[Union[locations_pb2.GetLocationRequest, dict]] = None,
|
|
3784
3800
|
*,
|
|
3785
3801
|
retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
|
3786
3802
|
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
|
|
@@ -3806,8 +3822,12 @@ class DocumentProcessorServiceClient(metaclass=DocumentProcessorServiceClientMet
|
|
|
3806
3822
|
# Create or coerce a protobuf request object.
|
|
3807
3823
|
# The request isn't a proto-plus wrapped type,
|
|
3808
3824
|
# so it must be constructed via keyword expansion.
|
|
3809
|
-
if
|
|
3810
|
-
|
|
3825
|
+
if request is None:
|
|
3826
|
+
request_pb = locations_pb2.GetLocationRequest()
|
|
3827
|
+
elif isinstance(request, dict):
|
|
3828
|
+
request_pb = locations_pb2.GetLocationRequest(**request)
|
|
3829
|
+
else:
|
|
3830
|
+
request_pb = request
|
|
3811
3831
|
|
|
3812
3832
|
# Wrap the RPC method; this adds retry and timeout information,
|
|
3813
3833
|
# and friendly error handling.
|
|
@@ -3816,7 +3836,7 @@ class DocumentProcessorServiceClient(metaclass=DocumentProcessorServiceClientMet
|
|
|
3816
3836
|
# Certain fields should be provided within the metadata header;
|
|
3817
3837
|
# add these here.
|
|
3818
3838
|
metadata = tuple(metadata) + (
|
|
3819
|
-
gapic_v1.routing_header.to_grpc_metadata((("name",
|
|
3839
|
+
gapic_v1.routing_header.to_grpc_metadata((("name", request_pb.name),)),
|
|
3820
3840
|
)
|
|
3821
3841
|
|
|
3822
3842
|
# Validate the universe domain.
|
|
@@ -3825,7 +3845,7 @@ class DocumentProcessorServiceClient(metaclass=DocumentProcessorServiceClientMet
|
|
|
3825
3845
|
try:
|
|
3826
3846
|
# Send the request.
|
|
3827
3847
|
response = rpc(
|
|
3828
|
-
|
|
3848
|
+
request_pb,
|
|
3829
3849
|
retry=retry,
|
|
3830
3850
|
timeout=timeout,
|
|
3831
3851
|
metadata=metadata,
|
|
@@ -3839,7 +3859,7 @@ class DocumentProcessorServiceClient(metaclass=DocumentProcessorServiceClientMet
|
|
|
3839
3859
|
|
|
3840
3860
|
def list_locations(
|
|
3841
3861
|
self,
|
|
3842
|
-
request: Optional[locations_pb2.ListLocationsRequest] = None,
|
|
3862
|
+
request: Optional[Union[locations_pb2.ListLocationsRequest, dict]] = None,
|
|
3843
3863
|
*,
|
|
3844
3864
|
retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
|
3845
3865
|
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
|
|
@@ -3865,8 +3885,12 @@ class DocumentProcessorServiceClient(metaclass=DocumentProcessorServiceClientMet
|
|
|
3865
3885
|
# Create or coerce a protobuf request object.
|
|
3866
3886
|
# The request isn't a proto-plus wrapped type,
|
|
3867
3887
|
# so it must be constructed via keyword expansion.
|
|
3868
|
-
if
|
|
3869
|
-
|
|
3888
|
+
if request is None:
|
|
3889
|
+
request_pb = locations_pb2.ListLocationsRequest()
|
|
3890
|
+
elif isinstance(request, dict):
|
|
3891
|
+
request_pb = locations_pb2.ListLocationsRequest(**request)
|
|
3892
|
+
else:
|
|
3893
|
+
request_pb = request
|
|
3870
3894
|
|
|
3871
3895
|
# Wrap the RPC method; this adds retry and timeout information,
|
|
3872
3896
|
# and friendly error handling.
|
|
@@ -3875,7 +3899,7 @@ class DocumentProcessorServiceClient(metaclass=DocumentProcessorServiceClientMet
|
|
|
3875
3899
|
# Certain fields should be provided within the metadata header;
|
|
3876
3900
|
# add these here.
|
|
3877
3901
|
metadata = tuple(metadata) + (
|
|
3878
|
-
gapic_v1.routing_header.to_grpc_metadata((("name",
|
|
3902
|
+
gapic_v1.routing_header.to_grpc_metadata((("name", request_pb.name),)),
|
|
3879
3903
|
)
|
|
3880
3904
|
|
|
3881
3905
|
# Validate the universe domain.
|
|
@@ -3884,7 +3908,7 @@ class DocumentProcessorServiceClient(metaclass=DocumentProcessorServiceClientMet
|
|
|
3884
3908
|
try:
|
|
3885
3909
|
# Send the request.
|
|
3886
3910
|
response = rpc(
|
|
3887
|
-
|
|
3911
|
+
request_pb,
|
|
3888
3912
|
retry=retry,
|
|
3889
3913
|
timeout=timeout,
|
|
3890
3914
|
metadata=metadata,
|
|
@@ -88,6 +88,10 @@ class DocumentProcessorServiceTransport(abc.ABC):
|
|
|
88
88
|
your own client library.
|
|
89
89
|
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
|
|
90
90
|
be used for service account credentials.
|
|
91
|
+
api_audience (Optional[str]): The intended audience for the API calls
|
|
92
|
+
to the service that will be set when using certain 3rd party
|
|
93
|
+
authentication flows. Audience is typically a resource identifier.
|
|
94
|
+
If not set, the host value will be used as a default.
|
|
91
95
|
"""
|
|
92
96
|
|
|
93
97
|
# Save the scopes.
|
|
@@ -137,6 +141,8 @@ class DocumentProcessorServiceTransport(abc.ABC):
|
|
|
137
141
|
host += ":443"
|
|
138
142
|
self._host = host
|
|
139
143
|
|
|
144
|
+
self._wrapped_methods: Dict[Callable, Callable] = {}
|
|
145
|
+
|
|
140
146
|
@property
|
|
141
147
|
def host(self):
|
|
142
148
|
return self._host
|
|
@@ -62,7 +62,7 @@ class _LoggingClientInterceptor(grpc.UnaryUnaryClientInterceptor): # pragma: NO
|
|
|
62
62
|
elif isinstance(request, google.protobuf.message.Message):
|
|
63
63
|
request_payload = MessageToJson(request)
|
|
64
64
|
else:
|
|
65
|
-
request_payload = f"{type(request).__name__}: {pickle.dumps(request)}"
|
|
65
|
+
request_payload = f"{type(request).__name__}: {pickle.dumps(request)!r}"
|
|
66
66
|
|
|
67
67
|
request_metadata = {
|
|
68
68
|
key: value.decode("utf-8") if isinstance(value, bytes) else value
|
|
@@ -97,7 +97,7 @@ class _LoggingClientInterceptor(grpc.UnaryUnaryClientInterceptor): # pragma: NO
|
|
|
97
97
|
elif isinstance(result, google.protobuf.message.Message):
|
|
98
98
|
response_payload = MessageToJson(result)
|
|
99
99
|
else:
|
|
100
|
-
response_payload = f"{type(result).__name__}: {pickle.dumps(result)}"
|
|
100
|
+
response_payload = f"{type(result).__name__}: {pickle.dumps(result)!r}"
|
|
101
101
|
grpc_response = {
|
|
102
102
|
"payload": response_payload,
|
|
103
103
|
"metadata": metadata,
|
|
@@ -196,6 +196,10 @@ class DocumentProcessorServiceGrpcTransport(DocumentProcessorServiceTransport):
|
|
|
196
196
|
your own client library.
|
|
197
197
|
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
|
|
198
198
|
be used for service account credentials.
|
|
199
|
+
api_audience (Optional[str]): The intended audience for the API calls
|
|
200
|
+
to the service that will be set when using certain 3rd party
|
|
201
|
+
authentication flows. Audience is typically a resource identifier.
|
|
202
|
+
If not set, the host value will be used as a default.
|
|
199
203
|
|
|
200
204
|
Raises:
|
|
201
205
|
google.auth.exceptions.MutualTLSChannelError: If mutual TLS transport
|
|
@@ -68,7 +68,7 @@ class _LoggingClientAIOInterceptor(
|
|
|
68
68
|
elif isinstance(request, google.protobuf.message.Message):
|
|
69
69
|
request_payload = MessageToJson(request)
|
|
70
70
|
else:
|
|
71
|
-
request_payload = f"{type(request).__name__}: {pickle.dumps(request)}"
|
|
71
|
+
request_payload = f"{type(request).__name__}: {pickle.dumps(request)!r}"
|
|
72
72
|
|
|
73
73
|
request_metadata = {
|
|
74
74
|
key: value.decode("utf-8") if isinstance(value, bytes) else value
|
|
@@ -103,7 +103,7 @@ class _LoggingClientAIOInterceptor(
|
|
|
103
103
|
elif isinstance(result, google.protobuf.message.Message):
|
|
104
104
|
response_payload = MessageToJson(result)
|
|
105
105
|
else:
|
|
106
|
-
response_payload = f"{type(result).__name__}: {pickle.dumps(result)}"
|
|
106
|
+
response_payload = f"{type(result).__name__}: {pickle.dumps(result)!r}"
|
|
107
107
|
grpc_response = {
|
|
108
108
|
"payload": response_payload,
|
|
109
109
|
"metadata": metadata,
|
|
@@ -247,6 +247,10 @@ class DocumentProcessorServiceGrpcAsyncIOTransport(DocumentProcessorServiceTrans
|
|
|
247
247
|
your own client library.
|
|
248
248
|
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
|
|
249
249
|
be used for service account credentials.
|
|
250
|
+
api_audience (Optional[str]): The intended audience for the API calls
|
|
251
|
+
to the service that will be set when using certain 3rd party
|
|
252
|
+
authentication flows. Audience is typically a resource identifier.
|
|
253
|
+
If not set, the host value will be used as a default.
|
|
250
254
|
|
|
251
255
|
Raises:
|
|
252
256
|
google.auth.exceptions.MutualTlsChannelError: If mutual TLS transport
|
|
@@ -1550,6 +1550,12 @@ class DocumentProcessorServiceRestTransport(_BaseDocumentProcessorServiceRestTra
|
|
|
1550
1550
|
url_scheme: the protocol scheme for the API endpoint. Normally
|
|
1551
1551
|
"https", but for testing or local servers,
|
|
1552
1552
|
"http" can be specified.
|
|
1553
|
+
interceptor (Optional[DocumentProcessorServiceRestInterceptor]): Interceptor used
|
|
1554
|
+
to manipulate requests, request metadata, and responses.
|
|
1555
|
+
api_audience (Optional[str]): The intended audience for the API calls
|
|
1556
|
+
to the service that will be set when using certain 3rd party
|
|
1557
|
+
authentication flows. Audience is typically a resource identifier.
|
|
1558
|
+
If not set, the host value will be used as a default.
|
|
1553
1559
|
"""
|
|
1554
1560
|
# Run the base constructor
|
|
1555
1561
|
# TODO(yon-mg): resolve other ctor params i.e. scopes, quota, etc.
|