google-cloud-storagebatchoperations 0.5.0__tar.gz → 0.6.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_storagebatchoperations-0.5.0/google_cloud_storagebatchoperations.egg-info → google_cloud_storagebatchoperations-0.6.0}/PKG-INFO +6 -8
- {google_cloud_storagebatchoperations-0.5.0 → google_cloud_storagebatchoperations-0.6.0}/README.rst +2 -2
- {google_cloud_storagebatchoperations-0.5.0 → google_cloud_storagebatchoperations-0.6.0}/google/cloud/storagebatchoperations/gapic_version.py +1 -1
- {google_cloud_storagebatchoperations-0.5.0 → google_cloud_storagebatchoperations-0.6.0}/google/cloud/storagebatchoperations_v1/gapic_version.py +1 -1
- {google_cloud_storagebatchoperations-0.5.0 → google_cloud_storagebatchoperations-0.6.0}/google/cloud/storagebatchoperations_v1/services/storage_batch_operations/async_client.py +55 -31
- {google_cloud_storagebatchoperations-0.5.0 → google_cloud_storagebatchoperations-0.6.0}/google/cloud/storagebatchoperations_v1/services/storage_batch_operations/client.py +63 -35
- {google_cloud_storagebatchoperations-0.5.0 → google_cloud_storagebatchoperations-0.6.0}/google/cloud/storagebatchoperations_v1/services/storage_batch_operations/transports/base.py +6 -0
- {google_cloud_storagebatchoperations-0.5.0 → google_cloud_storagebatchoperations-0.6.0}/google/cloud/storagebatchoperations_v1/services/storage_batch_operations/transports/grpc.py +6 -2
- {google_cloud_storagebatchoperations-0.5.0 → google_cloud_storagebatchoperations-0.6.0}/google/cloud/storagebatchoperations_v1/services/storage_batch_operations/transports/grpc_asyncio.py +6 -2
- {google_cloud_storagebatchoperations-0.5.0 → google_cloud_storagebatchoperations-0.6.0}/google/cloud/storagebatchoperations_v1/services/storage_batch_operations/transports/rest.py +6 -0
- {google_cloud_storagebatchoperations-0.5.0 → google_cloud_storagebatchoperations-0.6.0/google_cloud_storagebatchoperations.egg-info}/PKG-INFO +6 -8
- google_cloud_storagebatchoperations-0.6.0/google_cloud_storagebatchoperations.egg-info/requires.txt +11 -0
- {google_cloud_storagebatchoperations-0.5.0 → google_cloud_storagebatchoperations-0.6.0}/setup.py +3 -5
- {google_cloud_storagebatchoperations-0.5.0 → google_cloud_storagebatchoperations-0.6.0}/tests/unit/gapic/storagebatchoperations_v1/test_storage_batch_operations.py +366 -123
- google_cloud_storagebatchoperations-0.5.0/google_cloud_storagebatchoperations.egg-info/requires.txt +0 -11
- {google_cloud_storagebatchoperations-0.5.0 → google_cloud_storagebatchoperations-0.6.0}/LICENSE +0 -0
- {google_cloud_storagebatchoperations-0.5.0 → google_cloud_storagebatchoperations-0.6.0}/MANIFEST.in +0 -0
- {google_cloud_storagebatchoperations-0.5.0 → google_cloud_storagebatchoperations-0.6.0}/google/cloud/storagebatchoperations/__init__.py +0 -0
- {google_cloud_storagebatchoperations-0.5.0 → google_cloud_storagebatchoperations-0.6.0}/google/cloud/storagebatchoperations/py.typed +0 -0
- {google_cloud_storagebatchoperations-0.5.0 → google_cloud_storagebatchoperations-0.6.0}/google/cloud/storagebatchoperations_v1/__init__.py +0 -0
- {google_cloud_storagebatchoperations-0.5.0 → google_cloud_storagebatchoperations-0.6.0}/google/cloud/storagebatchoperations_v1/gapic_metadata.json +0 -0
- {google_cloud_storagebatchoperations-0.5.0 → google_cloud_storagebatchoperations-0.6.0}/google/cloud/storagebatchoperations_v1/py.typed +0 -0
- {google_cloud_storagebatchoperations-0.5.0 → google_cloud_storagebatchoperations-0.6.0}/google/cloud/storagebatchoperations_v1/services/__init__.py +0 -0
- {google_cloud_storagebatchoperations-0.5.0 → google_cloud_storagebatchoperations-0.6.0}/google/cloud/storagebatchoperations_v1/services/storage_batch_operations/__init__.py +0 -0
- {google_cloud_storagebatchoperations-0.5.0 → google_cloud_storagebatchoperations-0.6.0}/google/cloud/storagebatchoperations_v1/services/storage_batch_operations/pagers.py +0 -0
- {google_cloud_storagebatchoperations-0.5.0 → google_cloud_storagebatchoperations-0.6.0}/google/cloud/storagebatchoperations_v1/services/storage_batch_operations/transports/__init__.py +0 -0
- {google_cloud_storagebatchoperations-0.5.0 → google_cloud_storagebatchoperations-0.6.0}/google/cloud/storagebatchoperations_v1/services/storage_batch_operations/transports/rest_base.py +0 -0
- {google_cloud_storagebatchoperations-0.5.0 → google_cloud_storagebatchoperations-0.6.0}/google/cloud/storagebatchoperations_v1/types/__init__.py +0 -0
- {google_cloud_storagebatchoperations-0.5.0 → google_cloud_storagebatchoperations-0.6.0}/google/cloud/storagebatchoperations_v1/types/storage_batch_operations.py +0 -0
- {google_cloud_storagebatchoperations-0.5.0 → google_cloud_storagebatchoperations-0.6.0}/google/cloud/storagebatchoperations_v1/types/storage_batch_operations_types.py +0 -0
- {google_cloud_storagebatchoperations-0.5.0 → google_cloud_storagebatchoperations-0.6.0}/google_cloud_storagebatchoperations.egg-info/SOURCES.txt +0 -0
- {google_cloud_storagebatchoperations-0.5.0 → google_cloud_storagebatchoperations-0.6.0}/google_cloud_storagebatchoperations.egg-info/dependency_links.txt +0 -0
- {google_cloud_storagebatchoperations-0.5.0 → google_cloud_storagebatchoperations-0.6.0}/google_cloud_storagebatchoperations.egg-info/not-zip-safe +0 -0
- {google_cloud_storagebatchoperations-0.5.0 → google_cloud_storagebatchoperations-0.6.0}/google_cloud_storagebatchoperations.egg-info/top_level.txt +0 -0
- {google_cloud_storagebatchoperations-0.5.0 → google_cloud_storagebatchoperations-0.6.0}/setup.cfg +0 -0
- {google_cloud_storagebatchoperations-0.5.0 → google_cloud_storagebatchoperations-0.6.0}/tests/__init__.py +0 -0
- {google_cloud_storagebatchoperations-0.5.0 → google_cloud_storagebatchoperations-0.6.0}/tests/unit/__init__.py +0 -0
- {google_cloud_storagebatchoperations-0.5.0 → google_cloud_storagebatchoperations-0.6.0}/tests/unit/gapic/__init__.py +0 -0
- {google_cloud_storagebatchoperations-0.5.0 → google_cloud_storagebatchoperations-0.6.0}/tests/unit/gapic/storagebatchoperations_v1/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: google-cloud-storagebatchoperations
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.6.0
|
|
4
4
|
Summary: Google Cloud Storagebatchoperations API client library
|
|
5
5
|
Home-page: https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-storagebatchoperations
|
|
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.
|
{google_cloud_storagebatchoperations-0.5.0 → google_cloud_storagebatchoperations-0.6.0}/README.rst
RENAMED
|
@@ -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.
|
|
@@ -217,7 +217,7 @@ class StorageBatchOperationsAsyncClient:
|
|
|
217
217
|
return self._client.transport
|
|
218
218
|
|
|
219
219
|
@property
|
|
220
|
-
def api_endpoint(self):
|
|
220
|
+
def api_endpoint(self) -> str:
|
|
221
221
|
"""Return the API endpoint used by the client instance.
|
|
222
222
|
|
|
223
223
|
Returns:
|
|
@@ -1171,7 +1171,7 @@ class StorageBatchOperationsAsyncClient:
|
|
|
1171
1171
|
|
|
1172
1172
|
async def list_operations(
|
|
1173
1173
|
self,
|
|
1174
|
-
request: Optional[operations_pb2.ListOperationsRequest] = None,
|
|
1174
|
+
request: Optional[Union[operations_pb2.ListOperationsRequest, dict]] = None,
|
|
1175
1175
|
*,
|
|
1176
1176
|
retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
|
1177
1177
|
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
|
|
@@ -1197,8 +1197,12 @@ class StorageBatchOperationsAsyncClient:
|
|
|
1197
1197
|
# Create or coerce a protobuf request object.
|
|
1198
1198
|
# The request isn't a proto-plus wrapped type,
|
|
1199
1199
|
# so it must be constructed via keyword expansion.
|
|
1200
|
-
if
|
|
1201
|
-
|
|
1200
|
+
if request is None:
|
|
1201
|
+
request_pb = operations_pb2.ListOperationsRequest()
|
|
1202
|
+
elif isinstance(request, dict):
|
|
1203
|
+
request_pb = operations_pb2.ListOperationsRequest(**request)
|
|
1204
|
+
else:
|
|
1205
|
+
request_pb = request
|
|
1202
1206
|
|
|
1203
1207
|
# Wrap the RPC method; this adds retry and timeout information,
|
|
1204
1208
|
# and friendly error handling.
|
|
@@ -1207,7 +1211,7 @@ class StorageBatchOperationsAsyncClient:
|
|
|
1207
1211
|
# Certain fields should be provided within the metadata header;
|
|
1208
1212
|
# add these here.
|
|
1209
1213
|
metadata = tuple(metadata) + (
|
|
1210
|
-
gapic_v1.routing_header.to_grpc_metadata((("name",
|
|
1214
|
+
gapic_v1.routing_header.to_grpc_metadata((("name", request_pb.name),)),
|
|
1211
1215
|
)
|
|
1212
1216
|
|
|
1213
1217
|
# Validate the universe domain.
|
|
@@ -1215,7 +1219,7 @@ class StorageBatchOperationsAsyncClient:
|
|
|
1215
1219
|
|
|
1216
1220
|
# Send the request.
|
|
1217
1221
|
response = await rpc(
|
|
1218
|
-
|
|
1222
|
+
request_pb,
|
|
1219
1223
|
retry=retry,
|
|
1220
1224
|
timeout=timeout,
|
|
1221
1225
|
metadata=metadata,
|
|
@@ -1226,7 +1230,7 @@ class StorageBatchOperationsAsyncClient:
|
|
|
1226
1230
|
|
|
1227
1231
|
async def get_operation(
|
|
1228
1232
|
self,
|
|
1229
|
-
request: Optional[operations_pb2.GetOperationRequest] = None,
|
|
1233
|
+
request: Optional[Union[operations_pb2.GetOperationRequest, dict]] = None,
|
|
1230
1234
|
*,
|
|
1231
1235
|
retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
|
1232
1236
|
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
|
|
@@ -1252,8 +1256,12 @@ class StorageBatchOperationsAsyncClient:
|
|
|
1252
1256
|
# Create or coerce a protobuf request object.
|
|
1253
1257
|
# The request isn't a proto-plus wrapped type,
|
|
1254
1258
|
# so it must be constructed via keyword expansion.
|
|
1255
|
-
if
|
|
1256
|
-
|
|
1259
|
+
if request is None:
|
|
1260
|
+
request_pb = operations_pb2.GetOperationRequest()
|
|
1261
|
+
elif isinstance(request, dict):
|
|
1262
|
+
request_pb = operations_pb2.GetOperationRequest(**request)
|
|
1263
|
+
else:
|
|
1264
|
+
request_pb = request
|
|
1257
1265
|
|
|
1258
1266
|
# Wrap the RPC method; this adds retry and timeout information,
|
|
1259
1267
|
# and friendly error handling.
|
|
@@ -1262,7 +1270,7 @@ class StorageBatchOperationsAsyncClient:
|
|
|
1262
1270
|
# Certain fields should be provided within the metadata header;
|
|
1263
1271
|
# add these here.
|
|
1264
1272
|
metadata = tuple(metadata) + (
|
|
1265
|
-
gapic_v1.routing_header.to_grpc_metadata((("name",
|
|
1273
|
+
gapic_v1.routing_header.to_grpc_metadata((("name", request_pb.name),)),
|
|
1266
1274
|
)
|
|
1267
1275
|
|
|
1268
1276
|
# Validate the universe domain.
|
|
@@ -1270,7 +1278,7 @@ class StorageBatchOperationsAsyncClient:
|
|
|
1270
1278
|
|
|
1271
1279
|
# Send the request.
|
|
1272
1280
|
response = await rpc(
|
|
1273
|
-
|
|
1281
|
+
request_pb,
|
|
1274
1282
|
retry=retry,
|
|
1275
1283
|
timeout=timeout,
|
|
1276
1284
|
metadata=metadata,
|
|
@@ -1281,7 +1289,7 @@ class StorageBatchOperationsAsyncClient:
|
|
|
1281
1289
|
|
|
1282
1290
|
async def delete_operation(
|
|
1283
1291
|
self,
|
|
1284
|
-
request: Optional[operations_pb2.DeleteOperationRequest] = None,
|
|
1292
|
+
request: Optional[Union[operations_pb2.DeleteOperationRequest, dict]] = None,
|
|
1285
1293
|
*,
|
|
1286
1294
|
retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
|
1287
1295
|
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
|
|
@@ -1311,8 +1319,12 @@ class StorageBatchOperationsAsyncClient:
|
|
|
1311
1319
|
# Create or coerce a protobuf request object.
|
|
1312
1320
|
# The request isn't a proto-plus wrapped type,
|
|
1313
1321
|
# so it must be constructed via keyword expansion.
|
|
1314
|
-
if
|
|
1315
|
-
|
|
1322
|
+
if request is None:
|
|
1323
|
+
request_pb = operations_pb2.DeleteOperationRequest()
|
|
1324
|
+
elif isinstance(request, dict):
|
|
1325
|
+
request_pb = operations_pb2.DeleteOperationRequest(**request)
|
|
1326
|
+
else:
|
|
1327
|
+
request_pb = request
|
|
1316
1328
|
|
|
1317
1329
|
# Wrap the RPC method; this adds retry and timeout information,
|
|
1318
1330
|
# and friendly error handling.
|
|
@@ -1321,7 +1333,7 @@ class StorageBatchOperationsAsyncClient:
|
|
|
1321
1333
|
# Certain fields should be provided within the metadata header;
|
|
1322
1334
|
# add these here.
|
|
1323
1335
|
metadata = tuple(metadata) + (
|
|
1324
|
-
gapic_v1.routing_header.to_grpc_metadata((("name",
|
|
1336
|
+
gapic_v1.routing_header.to_grpc_metadata((("name", request_pb.name),)),
|
|
1325
1337
|
)
|
|
1326
1338
|
|
|
1327
1339
|
# Validate the universe domain.
|
|
@@ -1329,7 +1341,7 @@ class StorageBatchOperationsAsyncClient:
|
|
|
1329
1341
|
|
|
1330
1342
|
# Send the request.
|
|
1331
1343
|
await rpc(
|
|
1332
|
-
|
|
1344
|
+
request_pb,
|
|
1333
1345
|
retry=retry,
|
|
1334
1346
|
timeout=timeout,
|
|
1335
1347
|
metadata=metadata,
|
|
@@ -1337,7 +1349,7 @@ class StorageBatchOperationsAsyncClient:
|
|
|
1337
1349
|
|
|
1338
1350
|
async def cancel_operation(
|
|
1339
1351
|
self,
|
|
1340
|
-
request: Optional[operations_pb2.CancelOperationRequest] = None,
|
|
1352
|
+
request: Optional[Union[operations_pb2.CancelOperationRequest, dict]] = None,
|
|
1341
1353
|
*,
|
|
1342
1354
|
retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
|
1343
1355
|
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
|
|
@@ -1366,8 +1378,12 @@ class StorageBatchOperationsAsyncClient:
|
|
|
1366
1378
|
# Create or coerce a protobuf request object.
|
|
1367
1379
|
# The request isn't a proto-plus wrapped type,
|
|
1368
1380
|
# so it must be constructed via keyword expansion.
|
|
1369
|
-
if
|
|
1370
|
-
|
|
1381
|
+
if request is None:
|
|
1382
|
+
request_pb = operations_pb2.CancelOperationRequest()
|
|
1383
|
+
elif isinstance(request, dict):
|
|
1384
|
+
request_pb = operations_pb2.CancelOperationRequest(**request)
|
|
1385
|
+
else:
|
|
1386
|
+
request_pb = request
|
|
1371
1387
|
|
|
1372
1388
|
# Wrap the RPC method; this adds retry and timeout information,
|
|
1373
1389
|
# and friendly error handling.
|
|
@@ -1376,7 +1392,7 @@ class StorageBatchOperationsAsyncClient:
|
|
|
1376
1392
|
# Certain fields should be provided within the metadata header;
|
|
1377
1393
|
# add these here.
|
|
1378
1394
|
metadata = tuple(metadata) + (
|
|
1379
|
-
gapic_v1.routing_header.to_grpc_metadata((("name",
|
|
1395
|
+
gapic_v1.routing_header.to_grpc_metadata((("name", request_pb.name),)),
|
|
1380
1396
|
)
|
|
1381
1397
|
|
|
1382
1398
|
# Validate the universe domain.
|
|
@@ -1384,7 +1400,7 @@ class StorageBatchOperationsAsyncClient:
|
|
|
1384
1400
|
|
|
1385
1401
|
# Send the request.
|
|
1386
1402
|
await rpc(
|
|
1387
|
-
|
|
1403
|
+
request_pb,
|
|
1388
1404
|
retry=retry,
|
|
1389
1405
|
timeout=timeout,
|
|
1390
1406
|
metadata=metadata,
|
|
@@ -1392,7 +1408,7 @@ class StorageBatchOperationsAsyncClient:
|
|
|
1392
1408
|
|
|
1393
1409
|
async def get_location(
|
|
1394
1410
|
self,
|
|
1395
|
-
request: Optional[locations_pb2.GetLocationRequest] = None,
|
|
1411
|
+
request: Optional[Union[locations_pb2.GetLocationRequest, dict]] = None,
|
|
1396
1412
|
*,
|
|
1397
1413
|
retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
|
1398
1414
|
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
|
|
@@ -1418,8 +1434,12 @@ class StorageBatchOperationsAsyncClient:
|
|
|
1418
1434
|
# Create or coerce a protobuf request object.
|
|
1419
1435
|
# The request isn't a proto-plus wrapped type,
|
|
1420
1436
|
# so it must be constructed via keyword expansion.
|
|
1421
|
-
if
|
|
1422
|
-
|
|
1437
|
+
if request is None:
|
|
1438
|
+
request_pb = locations_pb2.GetLocationRequest()
|
|
1439
|
+
elif isinstance(request, dict):
|
|
1440
|
+
request_pb = locations_pb2.GetLocationRequest(**request)
|
|
1441
|
+
else:
|
|
1442
|
+
request_pb = request
|
|
1423
1443
|
|
|
1424
1444
|
# Wrap the RPC method; this adds retry and timeout information,
|
|
1425
1445
|
# and friendly error handling.
|
|
@@ -1428,7 +1448,7 @@ class StorageBatchOperationsAsyncClient:
|
|
|
1428
1448
|
# Certain fields should be provided within the metadata header;
|
|
1429
1449
|
# add these here.
|
|
1430
1450
|
metadata = tuple(metadata) + (
|
|
1431
|
-
gapic_v1.routing_header.to_grpc_metadata((("name",
|
|
1451
|
+
gapic_v1.routing_header.to_grpc_metadata((("name", request_pb.name),)),
|
|
1432
1452
|
)
|
|
1433
1453
|
|
|
1434
1454
|
# Validate the universe domain.
|
|
@@ -1436,7 +1456,7 @@ class StorageBatchOperationsAsyncClient:
|
|
|
1436
1456
|
|
|
1437
1457
|
# Send the request.
|
|
1438
1458
|
response = await rpc(
|
|
1439
|
-
|
|
1459
|
+
request_pb,
|
|
1440
1460
|
retry=retry,
|
|
1441
1461
|
timeout=timeout,
|
|
1442
1462
|
metadata=metadata,
|
|
@@ -1447,7 +1467,7 @@ class StorageBatchOperationsAsyncClient:
|
|
|
1447
1467
|
|
|
1448
1468
|
async def list_locations(
|
|
1449
1469
|
self,
|
|
1450
|
-
request: Optional[locations_pb2.ListLocationsRequest] = None,
|
|
1470
|
+
request: Optional[Union[locations_pb2.ListLocationsRequest, dict]] = None,
|
|
1451
1471
|
*,
|
|
1452
1472
|
retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
|
1453
1473
|
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
|
|
@@ -1473,8 +1493,12 @@ class StorageBatchOperationsAsyncClient:
|
|
|
1473
1493
|
# Create or coerce a protobuf request object.
|
|
1474
1494
|
# The request isn't a proto-plus wrapped type,
|
|
1475
1495
|
# so it must be constructed via keyword expansion.
|
|
1476
|
-
if
|
|
1477
|
-
|
|
1496
|
+
if request is None:
|
|
1497
|
+
request_pb = locations_pb2.ListLocationsRequest()
|
|
1498
|
+
elif isinstance(request, dict):
|
|
1499
|
+
request_pb = locations_pb2.ListLocationsRequest(**request)
|
|
1500
|
+
else:
|
|
1501
|
+
request_pb = request
|
|
1478
1502
|
|
|
1479
1503
|
# Wrap the RPC method; this adds retry and timeout information,
|
|
1480
1504
|
# and friendly error handling.
|
|
@@ -1483,7 +1507,7 @@ class StorageBatchOperationsAsyncClient:
|
|
|
1483
1507
|
# Certain fields should be provided within the metadata header;
|
|
1484
1508
|
# add these here.
|
|
1485
1509
|
metadata = tuple(metadata) + (
|
|
1486
|
-
gapic_v1.routing_header.to_grpc_metadata((("name",
|
|
1510
|
+
gapic_v1.routing_header.to_grpc_metadata((("name", request_pb.name),)),
|
|
1487
1511
|
)
|
|
1488
1512
|
|
|
1489
1513
|
# Validate the universe domain.
|
|
@@ -1491,7 +1515,7 @@ class StorageBatchOperationsAsyncClient:
|
|
|
1491
1515
|
|
|
1492
1516
|
# Send the request.
|
|
1493
1517
|
response = await rpc(
|
|
1494
|
-
|
|
1518
|
+
request_pb,
|
|
1495
1519
|
retry=retry,
|
|
1496
1520
|
timeout=timeout,
|
|
1497
1521
|
metadata=metadata,
|
|
@@ -125,7 +125,7 @@ class StorageBatchOperationsClient(metaclass=StorageBatchOperationsClientMeta):
|
|
|
125
125
|
"""
|
|
126
126
|
|
|
127
127
|
@staticmethod
|
|
128
|
-
def _get_default_mtls_endpoint(api_endpoint):
|
|
128
|
+
def _get_default_mtls_endpoint(api_endpoint) -> Optional[str]:
|
|
129
129
|
"""Converts api endpoint to mTLS endpoint.
|
|
130
130
|
|
|
131
131
|
Convert "*.sandbox.googleapis.com" and "*.googleapis.com" to
|
|
@@ -133,7 +133,7 @@ class StorageBatchOperationsClient(metaclass=StorageBatchOperationsClientMeta):
|
|
|
133
133
|
Args:
|
|
134
134
|
api_endpoint (Optional[str]): the api endpoint to convert.
|
|
135
135
|
Returns:
|
|
136
|
-
str: converted mTLS api endpoint.
|
|
136
|
+
Optional[str]: converted mTLS api endpoint.
|
|
137
137
|
"""
|
|
138
138
|
if not api_endpoint:
|
|
139
139
|
return api_endpoint
|
|
@@ -143,6 +143,10 @@ class StorageBatchOperationsClient(metaclass=StorageBatchOperationsClientMeta):
|
|
|
143
143
|
)
|
|
144
144
|
|
|
145
145
|
m = mtls_endpoint_re.match(api_endpoint)
|
|
146
|
+
if m is None:
|
|
147
|
+
# Could not parse api_endpoint; return as-is.
|
|
148
|
+
return api_endpoint
|
|
149
|
+
|
|
146
150
|
name, mtls, sandbox, googledomain = m.groups()
|
|
147
151
|
if mtls or not googledomain:
|
|
148
152
|
return api_endpoint
|
|
@@ -498,7 +502,7 @@ class StorageBatchOperationsClient(metaclass=StorageBatchOperationsClientMeta):
|
|
|
498
502
|
@staticmethod
|
|
499
503
|
def _get_api_endpoint(
|
|
500
504
|
api_override, client_cert_source, universe_domain, use_mtls_endpoint
|
|
501
|
-
):
|
|
505
|
+
) -> str:
|
|
502
506
|
"""Return the API endpoint used by the client.
|
|
503
507
|
|
|
504
508
|
Args:
|
|
@@ -597,7 +601,7 @@ class StorageBatchOperationsClient(metaclass=StorageBatchOperationsClientMeta):
|
|
|
597
601
|
error._details.append(json.dumps(cred_info))
|
|
598
602
|
|
|
599
603
|
@property
|
|
600
|
-
def api_endpoint(self):
|
|
604
|
+
def api_endpoint(self) -> str:
|
|
601
605
|
"""Return the API endpoint used by the client instance.
|
|
602
606
|
|
|
603
607
|
Returns:
|
|
@@ -697,7 +701,7 @@ class StorageBatchOperationsClient(metaclass=StorageBatchOperationsClientMeta):
|
|
|
697
701
|
self._universe_domain = StorageBatchOperationsClient._get_universe_domain(
|
|
698
702
|
universe_domain_opt, self._universe_domain_env
|
|
699
703
|
)
|
|
700
|
-
self._api_endpoint =
|
|
704
|
+
self._api_endpoint: str = "" # updated below, depending on `transport`
|
|
701
705
|
|
|
702
706
|
# Initialize the universe domain validation.
|
|
703
707
|
self._is_universe_domain_valid = False
|
|
@@ -1630,7 +1634,7 @@ class StorageBatchOperationsClient(metaclass=StorageBatchOperationsClientMeta):
|
|
|
1630
1634
|
|
|
1631
1635
|
def list_operations(
|
|
1632
1636
|
self,
|
|
1633
|
-
request: Optional[operations_pb2.ListOperationsRequest] = None,
|
|
1637
|
+
request: Optional[Union[operations_pb2.ListOperationsRequest, dict]] = None,
|
|
1634
1638
|
*,
|
|
1635
1639
|
retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
|
1636
1640
|
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
|
|
@@ -1656,8 +1660,12 @@ class StorageBatchOperationsClient(metaclass=StorageBatchOperationsClientMeta):
|
|
|
1656
1660
|
# Create or coerce a protobuf request object.
|
|
1657
1661
|
# The request isn't a proto-plus wrapped type,
|
|
1658
1662
|
# so it must be constructed via keyword expansion.
|
|
1659
|
-
if
|
|
1660
|
-
|
|
1663
|
+
if request is None:
|
|
1664
|
+
request_pb = operations_pb2.ListOperationsRequest()
|
|
1665
|
+
elif isinstance(request, dict):
|
|
1666
|
+
request_pb = operations_pb2.ListOperationsRequest(**request)
|
|
1667
|
+
else:
|
|
1668
|
+
request_pb = request
|
|
1661
1669
|
|
|
1662
1670
|
# Wrap the RPC method; this adds retry and timeout information,
|
|
1663
1671
|
# and friendly error handling.
|
|
@@ -1666,7 +1674,7 @@ class StorageBatchOperationsClient(metaclass=StorageBatchOperationsClientMeta):
|
|
|
1666
1674
|
# Certain fields should be provided within the metadata header;
|
|
1667
1675
|
# add these here.
|
|
1668
1676
|
metadata = tuple(metadata) + (
|
|
1669
|
-
gapic_v1.routing_header.to_grpc_metadata((("name",
|
|
1677
|
+
gapic_v1.routing_header.to_grpc_metadata((("name", request_pb.name),)),
|
|
1670
1678
|
)
|
|
1671
1679
|
|
|
1672
1680
|
# Validate the universe domain.
|
|
@@ -1675,7 +1683,7 @@ class StorageBatchOperationsClient(metaclass=StorageBatchOperationsClientMeta):
|
|
|
1675
1683
|
try:
|
|
1676
1684
|
# Send the request.
|
|
1677
1685
|
response = rpc(
|
|
1678
|
-
|
|
1686
|
+
request_pb,
|
|
1679
1687
|
retry=retry,
|
|
1680
1688
|
timeout=timeout,
|
|
1681
1689
|
metadata=metadata,
|
|
@@ -1689,7 +1697,7 @@ class StorageBatchOperationsClient(metaclass=StorageBatchOperationsClientMeta):
|
|
|
1689
1697
|
|
|
1690
1698
|
def get_operation(
|
|
1691
1699
|
self,
|
|
1692
|
-
request: Optional[operations_pb2.GetOperationRequest] = None,
|
|
1700
|
+
request: Optional[Union[operations_pb2.GetOperationRequest, dict]] = None,
|
|
1693
1701
|
*,
|
|
1694
1702
|
retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
|
1695
1703
|
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
|
|
@@ -1715,8 +1723,12 @@ class StorageBatchOperationsClient(metaclass=StorageBatchOperationsClientMeta):
|
|
|
1715
1723
|
# Create or coerce a protobuf request object.
|
|
1716
1724
|
# The request isn't a proto-plus wrapped type,
|
|
1717
1725
|
# so it must be constructed via keyword expansion.
|
|
1718
|
-
if
|
|
1719
|
-
|
|
1726
|
+
if request is None:
|
|
1727
|
+
request_pb = operations_pb2.GetOperationRequest()
|
|
1728
|
+
elif isinstance(request, dict):
|
|
1729
|
+
request_pb = operations_pb2.GetOperationRequest(**request)
|
|
1730
|
+
else:
|
|
1731
|
+
request_pb = request
|
|
1720
1732
|
|
|
1721
1733
|
# Wrap the RPC method; this adds retry and timeout information,
|
|
1722
1734
|
# and friendly error handling.
|
|
@@ -1725,7 +1737,7 @@ class StorageBatchOperationsClient(metaclass=StorageBatchOperationsClientMeta):
|
|
|
1725
1737
|
# Certain fields should be provided within the metadata header;
|
|
1726
1738
|
# add these here.
|
|
1727
1739
|
metadata = tuple(metadata) + (
|
|
1728
|
-
gapic_v1.routing_header.to_grpc_metadata((("name",
|
|
1740
|
+
gapic_v1.routing_header.to_grpc_metadata((("name", request_pb.name),)),
|
|
1729
1741
|
)
|
|
1730
1742
|
|
|
1731
1743
|
# Validate the universe domain.
|
|
@@ -1734,7 +1746,7 @@ class StorageBatchOperationsClient(metaclass=StorageBatchOperationsClientMeta):
|
|
|
1734
1746
|
try:
|
|
1735
1747
|
# Send the request.
|
|
1736
1748
|
response = rpc(
|
|
1737
|
-
|
|
1749
|
+
request_pb,
|
|
1738
1750
|
retry=retry,
|
|
1739
1751
|
timeout=timeout,
|
|
1740
1752
|
metadata=metadata,
|
|
@@ -1748,7 +1760,7 @@ class StorageBatchOperationsClient(metaclass=StorageBatchOperationsClientMeta):
|
|
|
1748
1760
|
|
|
1749
1761
|
def delete_operation(
|
|
1750
1762
|
self,
|
|
1751
|
-
request: Optional[operations_pb2.DeleteOperationRequest] = None,
|
|
1763
|
+
request: Optional[Union[operations_pb2.DeleteOperationRequest, dict]] = None,
|
|
1752
1764
|
*,
|
|
1753
1765
|
retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
|
1754
1766
|
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
|
|
@@ -1778,8 +1790,12 @@ class StorageBatchOperationsClient(metaclass=StorageBatchOperationsClientMeta):
|
|
|
1778
1790
|
# Create or coerce a protobuf request object.
|
|
1779
1791
|
# The request isn't a proto-plus wrapped type,
|
|
1780
1792
|
# so it must be constructed via keyword expansion.
|
|
1781
|
-
if
|
|
1782
|
-
|
|
1793
|
+
if request is None:
|
|
1794
|
+
request_pb = operations_pb2.DeleteOperationRequest()
|
|
1795
|
+
elif isinstance(request, dict):
|
|
1796
|
+
request_pb = operations_pb2.DeleteOperationRequest(**request)
|
|
1797
|
+
else:
|
|
1798
|
+
request_pb = request
|
|
1783
1799
|
|
|
1784
1800
|
# Wrap the RPC method; this adds retry and timeout information,
|
|
1785
1801
|
# and friendly error handling.
|
|
@@ -1788,7 +1804,7 @@ class StorageBatchOperationsClient(metaclass=StorageBatchOperationsClientMeta):
|
|
|
1788
1804
|
# Certain fields should be provided within the metadata header;
|
|
1789
1805
|
# add these here.
|
|
1790
1806
|
metadata = tuple(metadata) + (
|
|
1791
|
-
gapic_v1.routing_header.to_grpc_metadata((("name",
|
|
1807
|
+
gapic_v1.routing_header.to_grpc_metadata((("name", request_pb.name),)),
|
|
1792
1808
|
)
|
|
1793
1809
|
|
|
1794
1810
|
# Validate the universe domain.
|
|
@@ -1796,7 +1812,7 @@ class StorageBatchOperationsClient(metaclass=StorageBatchOperationsClientMeta):
|
|
|
1796
1812
|
|
|
1797
1813
|
# Send the request.
|
|
1798
1814
|
rpc(
|
|
1799
|
-
|
|
1815
|
+
request_pb,
|
|
1800
1816
|
retry=retry,
|
|
1801
1817
|
timeout=timeout,
|
|
1802
1818
|
metadata=metadata,
|
|
@@ -1804,7 +1820,7 @@ class StorageBatchOperationsClient(metaclass=StorageBatchOperationsClientMeta):
|
|
|
1804
1820
|
|
|
1805
1821
|
def cancel_operation(
|
|
1806
1822
|
self,
|
|
1807
|
-
request: Optional[operations_pb2.CancelOperationRequest] = None,
|
|
1823
|
+
request: Optional[Union[operations_pb2.CancelOperationRequest, dict]] = None,
|
|
1808
1824
|
*,
|
|
1809
1825
|
retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
|
1810
1826
|
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
|
|
@@ -1833,8 +1849,12 @@ class StorageBatchOperationsClient(metaclass=StorageBatchOperationsClientMeta):
|
|
|
1833
1849
|
# Create or coerce a protobuf request object.
|
|
1834
1850
|
# The request isn't a proto-plus wrapped type,
|
|
1835
1851
|
# so it must be constructed via keyword expansion.
|
|
1836
|
-
if
|
|
1837
|
-
|
|
1852
|
+
if request is None:
|
|
1853
|
+
request_pb = operations_pb2.CancelOperationRequest()
|
|
1854
|
+
elif isinstance(request, dict):
|
|
1855
|
+
request_pb = operations_pb2.CancelOperationRequest(**request)
|
|
1856
|
+
else:
|
|
1857
|
+
request_pb = request
|
|
1838
1858
|
|
|
1839
1859
|
# Wrap the RPC method; this adds retry and timeout information,
|
|
1840
1860
|
# and friendly error handling.
|
|
@@ -1843,7 +1863,7 @@ class StorageBatchOperationsClient(metaclass=StorageBatchOperationsClientMeta):
|
|
|
1843
1863
|
# Certain fields should be provided within the metadata header;
|
|
1844
1864
|
# add these here.
|
|
1845
1865
|
metadata = tuple(metadata) + (
|
|
1846
|
-
gapic_v1.routing_header.to_grpc_metadata((("name",
|
|
1866
|
+
gapic_v1.routing_header.to_grpc_metadata((("name", request_pb.name),)),
|
|
1847
1867
|
)
|
|
1848
1868
|
|
|
1849
1869
|
# Validate the universe domain.
|
|
@@ -1851,7 +1871,7 @@ class StorageBatchOperationsClient(metaclass=StorageBatchOperationsClientMeta):
|
|
|
1851
1871
|
|
|
1852
1872
|
# Send the request.
|
|
1853
1873
|
rpc(
|
|
1854
|
-
|
|
1874
|
+
request_pb,
|
|
1855
1875
|
retry=retry,
|
|
1856
1876
|
timeout=timeout,
|
|
1857
1877
|
metadata=metadata,
|
|
@@ -1859,7 +1879,7 @@ class StorageBatchOperationsClient(metaclass=StorageBatchOperationsClientMeta):
|
|
|
1859
1879
|
|
|
1860
1880
|
def get_location(
|
|
1861
1881
|
self,
|
|
1862
|
-
request: Optional[locations_pb2.GetLocationRequest] = None,
|
|
1882
|
+
request: Optional[Union[locations_pb2.GetLocationRequest, dict]] = None,
|
|
1863
1883
|
*,
|
|
1864
1884
|
retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
|
1865
1885
|
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
|
|
@@ -1885,8 +1905,12 @@ class StorageBatchOperationsClient(metaclass=StorageBatchOperationsClientMeta):
|
|
|
1885
1905
|
# Create or coerce a protobuf request object.
|
|
1886
1906
|
# The request isn't a proto-plus wrapped type,
|
|
1887
1907
|
# so it must be constructed via keyword expansion.
|
|
1888
|
-
if
|
|
1889
|
-
|
|
1908
|
+
if request is None:
|
|
1909
|
+
request_pb = locations_pb2.GetLocationRequest()
|
|
1910
|
+
elif isinstance(request, dict):
|
|
1911
|
+
request_pb = locations_pb2.GetLocationRequest(**request)
|
|
1912
|
+
else:
|
|
1913
|
+
request_pb = request
|
|
1890
1914
|
|
|
1891
1915
|
# Wrap the RPC method; this adds retry and timeout information,
|
|
1892
1916
|
# and friendly error handling.
|
|
@@ -1895,7 +1919,7 @@ class StorageBatchOperationsClient(metaclass=StorageBatchOperationsClientMeta):
|
|
|
1895
1919
|
# Certain fields should be provided within the metadata header;
|
|
1896
1920
|
# add these here.
|
|
1897
1921
|
metadata = tuple(metadata) + (
|
|
1898
|
-
gapic_v1.routing_header.to_grpc_metadata((("name",
|
|
1922
|
+
gapic_v1.routing_header.to_grpc_metadata((("name", request_pb.name),)),
|
|
1899
1923
|
)
|
|
1900
1924
|
|
|
1901
1925
|
# Validate the universe domain.
|
|
@@ -1904,7 +1928,7 @@ class StorageBatchOperationsClient(metaclass=StorageBatchOperationsClientMeta):
|
|
|
1904
1928
|
try:
|
|
1905
1929
|
# Send the request.
|
|
1906
1930
|
response = rpc(
|
|
1907
|
-
|
|
1931
|
+
request_pb,
|
|
1908
1932
|
retry=retry,
|
|
1909
1933
|
timeout=timeout,
|
|
1910
1934
|
metadata=metadata,
|
|
@@ -1918,7 +1942,7 @@ class StorageBatchOperationsClient(metaclass=StorageBatchOperationsClientMeta):
|
|
|
1918
1942
|
|
|
1919
1943
|
def list_locations(
|
|
1920
1944
|
self,
|
|
1921
|
-
request: Optional[locations_pb2.ListLocationsRequest] = None,
|
|
1945
|
+
request: Optional[Union[locations_pb2.ListLocationsRequest, dict]] = None,
|
|
1922
1946
|
*,
|
|
1923
1947
|
retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
|
1924
1948
|
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
|
|
@@ -1944,8 +1968,12 @@ class StorageBatchOperationsClient(metaclass=StorageBatchOperationsClientMeta):
|
|
|
1944
1968
|
# Create or coerce a protobuf request object.
|
|
1945
1969
|
# The request isn't a proto-plus wrapped type,
|
|
1946
1970
|
# so it must be constructed via keyword expansion.
|
|
1947
|
-
if
|
|
1948
|
-
|
|
1971
|
+
if request is None:
|
|
1972
|
+
request_pb = locations_pb2.ListLocationsRequest()
|
|
1973
|
+
elif isinstance(request, dict):
|
|
1974
|
+
request_pb = locations_pb2.ListLocationsRequest(**request)
|
|
1975
|
+
else:
|
|
1976
|
+
request_pb = request
|
|
1949
1977
|
|
|
1950
1978
|
# Wrap the RPC method; this adds retry and timeout information,
|
|
1951
1979
|
# and friendly error handling.
|
|
@@ -1954,7 +1982,7 @@ class StorageBatchOperationsClient(metaclass=StorageBatchOperationsClientMeta):
|
|
|
1954
1982
|
# Certain fields should be provided within the metadata header;
|
|
1955
1983
|
# add these here.
|
|
1956
1984
|
metadata = tuple(metadata) + (
|
|
1957
|
-
gapic_v1.routing_header.to_grpc_metadata((("name",
|
|
1985
|
+
gapic_v1.routing_header.to_grpc_metadata((("name", request_pb.name),)),
|
|
1958
1986
|
)
|
|
1959
1987
|
|
|
1960
1988
|
# Validate the universe domain.
|
|
@@ -1963,7 +1991,7 @@ class StorageBatchOperationsClient(metaclass=StorageBatchOperationsClientMeta):
|
|
|
1963
1991
|
try:
|
|
1964
1992
|
# Send the request.
|
|
1965
1993
|
response = rpc(
|
|
1966
|
-
|
|
1994
|
+
request_pb,
|
|
1967
1995
|
retry=retry,
|
|
1968
1996
|
timeout=timeout,
|
|
1969
1997
|
metadata=metadata,
|
|
@@ -86,6 +86,10 @@ class StorageBatchOperationsTransport(abc.ABC):
|
|
|
86
86
|
your own client library.
|
|
87
87
|
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
|
|
88
88
|
be used for service account credentials.
|
|
89
|
+
api_audience (Optional[str]): The intended audience for the API calls
|
|
90
|
+
to the service that will be set when using certain 3rd party
|
|
91
|
+
authentication flows. Audience is typically a resource identifier.
|
|
92
|
+
If not set, the host value will be used as a default.
|
|
89
93
|
"""
|
|
90
94
|
|
|
91
95
|
# Save the scopes.
|
|
@@ -135,6 +139,8 @@ class StorageBatchOperationsTransport(abc.ABC):
|
|
|
135
139
|
host += ":443"
|
|
136
140
|
self._host = host
|
|
137
141
|
|
|
142
|
+
self._wrapped_methods: Dict[Callable, Callable] = {}
|
|
143
|
+
|
|
138
144
|
@property
|
|
139
145
|
def host(self):
|
|
140
146
|
return self._host
|