google-cloud-storagebatchoperations 0.4.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.4.0/google_cloud_storagebatchoperations.egg-info → google_cloud_storagebatchoperations-0.6.0}/PKG-INFO +6 -8
- {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.6.0}/README.rst +2 -2
- {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.6.0}/google/cloud/storagebatchoperations/__init__.py +6 -0
- {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.6.0}/google/cloud/storagebatchoperations/gapic_version.py +1 -1
- {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.6.0}/google/cloud/storagebatchoperations_v1/__init__.py +7 -0
- {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.6.0}/google/cloud/storagebatchoperations_v1/gapic_version.py +1 -1
- {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.6.0}/google/cloud/storagebatchoperations_v1/services/storage_batch_operations/async_client.py +71 -37
- {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.6.0}/google/cloud/storagebatchoperations_v1/services/storage_batch_operations/client.py +73 -50
- {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.6.0}/google/cloud/storagebatchoperations_v1/services/storage_batch_operations/pagers.py +4 -4
- {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.6.0}/google/cloud/storagebatchoperations_v1/services/storage_batch_operations/transports/__init__.py +1 -3
- {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.6.0}/google/cloud/storagebatchoperations_v1/services/storage_batch_operations/transports/base.py +17 -5
- {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.6.0}/google/cloud/storagebatchoperations_v1/services/storage_batch_operations/transports/grpc.py +12 -8
- {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.6.0}/google/cloud/storagebatchoperations_v1/services/storage_batch_operations/transports/grpc_asyncio.py +11 -7
- {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.6.0}/google/cloud/storagebatchoperations_v1/services/storage_batch_operations/transports/rest.py +22 -40
- {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.6.0}/google/cloud/storagebatchoperations_v1/types/__init__.py +6 -0
- {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.6.0}/google/cloud/storagebatchoperations_v1/types/storage_batch_operations_types.py +116 -0
- {google_cloud_storagebatchoperations-0.4.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.4.0 → google_cloud_storagebatchoperations-0.6.0}/setup.py +3 -5
- {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.6.0}/tests/unit/gapic/storagebatchoperations_v1/test_storage_batch_operations.py +402 -157
- google_cloud_storagebatchoperations-0.4.0/google_cloud_storagebatchoperations.egg-info/requires.txt +0 -11
- {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.6.0}/LICENSE +0 -0
- {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.6.0}/MANIFEST.in +0 -0
- {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.6.0}/google/cloud/storagebatchoperations/py.typed +0 -0
- {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.6.0}/google/cloud/storagebatchoperations_v1/gapic_metadata.json +0 -0
- {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.6.0}/google/cloud/storagebatchoperations_v1/py.typed +0 -0
- {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.6.0}/google/cloud/storagebatchoperations_v1/services/__init__.py +0 -0
- {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.6.0}/google/cloud/storagebatchoperations_v1/services/storage_batch_operations/__init__.py +0 -0
- {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.6.0}/google/cloud/storagebatchoperations_v1/services/storage_batch_operations/transports/rest_base.py +1 -1
- {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.6.0}/google/cloud/storagebatchoperations_v1/types/storage_batch_operations.py +0 -0
- {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.6.0}/google_cloud_storagebatchoperations.egg-info/SOURCES.txt +0 -0
- {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.6.0}/google_cloud_storagebatchoperations.egg-info/dependency_links.txt +0 -0
- {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.6.0}/google_cloud_storagebatchoperations.egg-info/not-zip-safe +0 -0
- {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.6.0}/google_cloud_storagebatchoperations.egg-info/top_level.txt +0 -0
- {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.6.0}/setup.cfg +0 -0
- {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.6.0}/tests/__init__.py +0 -0
- {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.6.0}/tests/unit/__init__.py +0 -0
- {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.6.0}/tests/unit/gapic/__init__.py +0 -0
- {google_cloud_storagebatchoperations-0.4.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.4.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.
|
|
@@ -41,17 +41,20 @@ from google.cloud.storagebatchoperations_v1.types.storage_batch_operations_types
|
|
|
41
41
|
BucketList,
|
|
42
42
|
BucketOperation,
|
|
43
43
|
Counters,
|
|
44
|
+
CustomContextUpdates,
|
|
44
45
|
DeleteObject,
|
|
45
46
|
ErrorLogEntry,
|
|
46
47
|
ErrorSummary,
|
|
47
48
|
Job,
|
|
48
49
|
LoggingConfig,
|
|
49
50
|
Manifest,
|
|
51
|
+
ObjectCustomContextPayload,
|
|
50
52
|
ObjectRetention,
|
|
51
53
|
PrefixList,
|
|
52
54
|
PutMetadata,
|
|
53
55
|
PutObjectHold,
|
|
54
56
|
RewriteObject,
|
|
57
|
+
UpdateObjectCustomContext,
|
|
55
58
|
)
|
|
56
59
|
|
|
57
60
|
__all__ = (
|
|
@@ -71,15 +74,18 @@ __all__ = (
|
|
|
71
74
|
"BucketList",
|
|
72
75
|
"BucketOperation",
|
|
73
76
|
"Counters",
|
|
77
|
+
"CustomContextUpdates",
|
|
74
78
|
"DeleteObject",
|
|
75
79
|
"ErrorLogEntry",
|
|
76
80
|
"ErrorSummary",
|
|
77
81
|
"Job",
|
|
78
82
|
"LoggingConfig",
|
|
79
83
|
"Manifest",
|
|
84
|
+
"ObjectCustomContextPayload",
|
|
80
85
|
"ObjectRetention",
|
|
81
86
|
"PrefixList",
|
|
82
87
|
"PutMetadata",
|
|
83
88
|
"PutObjectHold",
|
|
84
89
|
"RewriteObject",
|
|
90
|
+
"UpdateObjectCustomContext",
|
|
85
91
|
)
|
|
@@ -28,6 +28,7 @@ else: # pragma: NO COVER
|
|
|
28
28
|
# this code path once we drop support for Python 3.7
|
|
29
29
|
import importlib_metadata as metadata
|
|
30
30
|
|
|
31
|
+
|
|
31
32
|
from .services.storage_batch_operations import (
|
|
32
33
|
StorageBatchOperationsAsyncClient,
|
|
33
34
|
StorageBatchOperationsClient,
|
|
@@ -49,17 +50,20 @@ from .types.storage_batch_operations_types import (
|
|
|
49
50
|
BucketList,
|
|
50
51
|
BucketOperation,
|
|
51
52
|
Counters,
|
|
53
|
+
CustomContextUpdates,
|
|
52
54
|
DeleteObject,
|
|
53
55
|
ErrorLogEntry,
|
|
54
56
|
ErrorSummary,
|
|
55
57
|
Job,
|
|
56
58
|
LoggingConfig,
|
|
57
59
|
Manifest,
|
|
60
|
+
ObjectCustomContextPayload,
|
|
58
61
|
ObjectRetention,
|
|
59
62
|
PrefixList,
|
|
60
63
|
PutMetadata,
|
|
61
64
|
PutObjectHold,
|
|
62
65
|
RewriteObject,
|
|
66
|
+
UpdateObjectCustomContext,
|
|
63
67
|
)
|
|
64
68
|
|
|
65
69
|
if hasattr(api_core, "check_python_version") and hasattr(
|
|
@@ -164,6 +168,7 @@ __all__ = (
|
|
|
164
168
|
"CancelJobResponse",
|
|
165
169
|
"Counters",
|
|
166
170
|
"CreateJobRequest",
|
|
171
|
+
"CustomContextUpdates",
|
|
167
172
|
"DeleteJobRequest",
|
|
168
173
|
"DeleteObject",
|
|
169
174
|
"ErrorLogEntry",
|
|
@@ -177,6 +182,7 @@ __all__ = (
|
|
|
177
182
|
"ListJobsResponse",
|
|
178
183
|
"LoggingConfig",
|
|
179
184
|
"Manifest",
|
|
185
|
+
"ObjectCustomContextPayload",
|
|
180
186
|
"ObjectRetention",
|
|
181
187
|
"OperationMetadata",
|
|
182
188
|
"PrefixList",
|
|
@@ -184,4 +190,5 @@ __all__ = (
|
|
|
184
190
|
"PutObjectHold",
|
|
185
191
|
"RewriteObject",
|
|
186
192
|
"StorageBatchOperationsClient",
|
|
193
|
+
"UpdateObjectCustomContext",
|
|
187
194
|
)
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
# See the License for the specific language governing permissions and
|
|
14
14
|
# limitations under the License.
|
|
15
15
|
#
|
|
16
|
-
from collections import OrderedDict
|
|
17
16
|
import logging as std_logging
|
|
18
17
|
import re
|
|
18
|
+
from collections import OrderedDict
|
|
19
19
|
from typing import (
|
|
20
20
|
Callable,
|
|
21
21
|
Dict,
|
|
@@ -29,13 +29,13 @@ from typing import (
|
|
|
29
29
|
Union,
|
|
30
30
|
)
|
|
31
31
|
|
|
32
|
+
import google.protobuf
|
|
32
33
|
from google.api_core import exceptions as core_exceptions
|
|
33
34
|
from google.api_core import gapic_v1
|
|
34
35
|
from google.api_core import retry_async as retries
|
|
35
36
|
from google.api_core.client_options import ClientOptions
|
|
36
37
|
from google.auth import credentials as ga_credentials # type: ignore
|
|
37
38
|
from google.oauth2 import service_account # type: ignore
|
|
38
|
-
import google.protobuf
|
|
39
39
|
|
|
40
40
|
from google.cloud.storagebatchoperations_v1 import gapic_version as package_version
|
|
41
41
|
|
|
@@ -46,9 +46,9 @@ except AttributeError: # pragma: NO COVER
|
|
|
46
46
|
|
|
47
47
|
import google.api_core.operation as operation # type: ignore
|
|
48
48
|
import google.api_core.operation_async as operation_async # type: ignore
|
|
49
|
+
import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore
|
|
49
50
|
from google.cloud.location import locations_pb2 # type: ignore
|
|
50
51
|
from google.longrunning import operations_pb2 # type: ignore
|
|
51
|
-
import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore
|
|
52
52
|
|
|
53
53
|
from google.cloud.storagebatchoperations_v1.services.storage_batch_operations import (
|
|
54
54
|
pagers,
|
|
@@ -141,7 +141,10 @@ class StorageBatchOperationsAsyncClient:
|
|
|
141
141
|
Returns:
|
|
142
142
|
StorageBatchOperationsAsyncClient: The constructed client.
|
|
143
143
|
"""
|
|
144
|
-
|
|
144
|
+
sa_info_func = (
|
|
145
|
+
StorageBatchOperationsClient.from_service_account_info.__func__ # type: ignore
|
|
146
|
+
)
|
|
147
|
+
return sa_info_func(StorageBatchOperationsAsyncClient, info, *args, **kwargs)
|
|
145
148
|
|
|
146
149
|
@classmethod
|
|
147
150
|
def from_service_account_file(cls, filename: str, *args, **kwargs):
|
|
@@ -157,7 +160,12 @@ class StorageBatchOperationsAsyncClient:
|
|
|
157
160
|
Returns:
|
|
158
161
|
StorageBatchOperationsAsyncClient: The constructed client.
|
|
159
162
|
"""
|
|
160
|
-
|
|
163
|
+
sa_file_func = (
|
|
164
|
+
StorageBatchOperationsClient.from_service_account_file.__func__ # type: ignore
|
|
165
|
+
)
|
|
166
|
+
return sa_file_func(
|
|
167
|
+
StorageBatchOperationsAsyncClient, filename, *args, **kwargs
|
|
168
|
+
)
|
|
161
169
|
|
|
162
170
|
from_service_account_json = from_service_account_file
|
|
163
171
|
|
|
@@ -195,7 +203,9 @@ class StorageBatchOperationsAsyncClient:
|
|
|
195
203
|
Raises:
|
|
196
204
|
google.auth.exceptions.MutualTLSChannelError: If any errors happen.
|
|
197
205
|
"""
|
|
198
|
-
return StorageBatchOperationsClient.get_mtls_endpoint_and_cert_source(
|
|
206
|
+
return StorageBatchOperationsClient.get_mtls_endpoint_and_cert_source(
|
|
207
|
+
client_options
|
|
208
|
+
) # type: ignore
|
|
199
209
|
|
|
200
210
|
@property
|
|
201
211
|
def transport(self) -> StorageBatchOperationsTransport:
|
|
@@ -207,7 +217,7 @@ class StorageBatchOperationsAsyncClient:
|
|
|
207
217
|
return self._client.transport
|
|
208
218
|
|
|
209
219
|
@property
|
|
210
|
-
def api_endpoint(self):
|
|
220
|
+
def api_endpoint(self) -> str:
|
|
211
221
|
"""Return the API endpoint used by the client instance.
|
|
212
222
|
|
|
213
223
|
Returns:
|
|
@@ -1161,7 +1171,7 @@ class StorageBatchOperationsAsyncClient:
|
|
|
1161
1171
|
|
|
1162
1172
|
async def list_operations(
|
|
1163
1173
|
self,
|
|
1164
|
-
request: Optional[operations_pb2.ListOperationsRequest] = None,
|
|
1174
|
+
request: Optional[Union[operations_pb2.ListOperationsRequest, dict]] = None,
|
|
1165
1175
|
*,
|
|
1166
1176
|
retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
|
1167
1177
|
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
|
|
@@ -1187,8 +1197,12 @@ class StorageBatchOperationsAsyncClient:
|
|
|
1187
1197
|
# Create or coerce a protobuf request object.
|
|
1188
1198
|
# The request isn't a proto-plus wrapped type,
|
|
1189
1199
|
# so it must be constructed via keyword expansion.
|
|
1190
|
-
if
|
|
1191
|
-
|
|
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
|
|
1192
1206
|
|
|
1193
1207
|
# Wrap the RPC method; this adds retry and timeout information,
|
|
1194
1208
|
# and friendly error handling.
|
|
@@ -1197,7 +1211,7 @@ class StorageBatchOperationsAsyncClient:
|
|
|
1197
1211
|
# Certain fields should be provided within the metadata header;
|
|
1198
1212
|
# add these here.
|
|
1199
1213
|
metadata = tuple(metadata) + (
|
|
1200
|
-
gapic_v1.routing_header.to_grpc_metadata((("name",
|
|
1214
|
+
gapic_v1.routing_header.to_grpc_metadata((("name", request_pb.name),)),
|
|
1201
1215
|
)
|
|
1202
1216
|
|
|
1203
1217
|
# Validate the universe domain.
|
|
@@ -1205,7 +1219,7 @@ class StorageBatchOperationsAsyncClient:
|
|
|
1205
1219
|
|
|
1206
1220
|
# Send the request.
|
|
1207
1221
|
response = await rpc(
|
|
1208
|
-
|
|
1222
|
+
request_pb,
|
|
1209
1223
|
retry=retry,
|
|
1210
1224
|
timeout=timeout,
|
|
1211
1225
|
metadata=metadata,
|
|
@@ -1216,7 +1230,7 @@ class StorageBatchOperationsAsyncClient:
|
|
|
1216
1230
|
|
|
1217
1231
|
async def get_operation(
|
|
1218
1232
|
self,
|
|
1219
|
-
request: Optional[operations_pb2.GetOperationRequest] = None,
|
|
1233
|
+
request: Optional[Union[operations_pb2.GetOperationRequest, dict]] = None,
|
|
1220
1234
|
*,
|
|
1221
1235
|
retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
|
1222
1236
|
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
|
|
@@ -1242,8 +1256,12 @@ class StorageBatchOperationsAsyncClient:
|
|
|
1242
1256
|
# Create or coerce a protobuf request object.
|
|
1243
1257
|
# The request isn't a proto-plus wrapped type,
|
|
1244
1258
|
# so it must be constructed via keyword expansion.
|
|
1245
|
-
if
|
|
1246
|
-
|
|
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
|
|
1247
1265
|
|
|
1248
1266
|
# Wrap the RPC method; this adds retry and timeout information,
|
|
1249
1267
|
# and friendly error handling.
|
|
@@ -1252,7 +1270,7 @@ class StorageBatchOperationsAsyncClient:
|
|
|
1252
1270
|
# Certain fields should be provided within the metadata header;
|
|
1253
1271
|
# add these here.
|
|
1254
1272
|
metadata = tuple(metadata) + (
|
|
1255
|
-
gapic_v1.routing_header.to_grpc_metadata((("name",
|
|
1273
|
+
gapic_v1.routing_header.to_grpc_metadata((("name", request_pb.name),)),
|
|
1256
1274
|
)
|
|
1257
1275
|
|
|
1258
1276
|
# Validate the universe domain.
|
|
@@ -1260,7 +1278,7 @@ class StorageBatchOperationsAsyncClient:
|
|
|
1260
1278
|
|
|
1261
1279
|
# Send the request.
|
|
1262
1280
|
response = await rpc(
|
|
1263
|
-
|
|
1281
|
+
request_pb,
|
|
1264
1282
|
retry=retry,
|
|
1265
1283
|
timeout=timeout,
|
|
1266
1284
|
metadata=metadata,
|
|
@@ -1271,7 +1289,7 @@ class StorageBatchOperationsAsyncClient:
|
|
|
1271
1289
|
|
|
1272
1290
|
async def delete_operation(
|
|
1273
1291
|
self,
|
|
1274
|
-
request: Optional[operations_pb2.DeleteOperationRequest] = None,
|
|
1292
|
+
request: Optional[Union[operations_pb2.DeleteOperationRequest, dict]] = None,
|
|
1275
1293
|
*,
|
|
1276
1294
|
retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
|
1277
1295
|
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
|
|
@@ -1301,8 +1319,12 @@ class StorageBatchOperationsAsyncClient:
|
|
|
1301
1319
|
# Create or coerce a protobuf request object.
|
|
1302
1320
|
# The request isn't a proto-plus wrapped type,
|
|
1303
1321
|
# so it must be constructed via keyword expansion.
|
|
1304
|
-
if
|
|
1305
|
-
|
|
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
|
|
1306
1328
|
|
|
1307
1329
|
# Wrap the RPC method; this adds retry and timeout information,
|
|
1308
1330
|
# and friendly error handling.
|
|
@@ -1311,7 +1333,7 @@ class StorageBatchOperationsAsyncClient:
|
|
|
1311
1333
|
# Certain fields should be provided within the metadata header;
|
|
1312
1334
|
# add these here.
|
|
1313
1335
|
metadata = tuple(metadata) + (
|
|
1314
|
-
gapic_v1.routing_header.to_grpc_metadata((("name",
|
|
1336
|
+
gapic_v1.routing_header.to_grpc_metadata((("name", request_pb.name),)),
|
|
1315
1337
|
)
|
|
1316
1338
|
|
|
1317
1339
|
# Validate the universe domain.
|
|
@@ -1319,7 +1341,7 @@ class StorageBatchOperationsAsyncClient:
|
|
|
1319
1341
|
|
|
1320
1342
|
# Send the request.
|
|
1321
1343
|
await rpc(
|
|
1322
|
-
|
|
1344
|
+
request_pb,
|
|
1323
1345
|
retry=retry,
|
|
1324
1346
|
timeout=timeout,
|
|
1325
1347
|
metadata=metadata,
|
|
@@ -1327,7 +1349,7 @@ class StorageBatchOperationsAsyncClient:
|
|
|
1327
1349
|
|
|
1328
1350
|
async def cancel_operation(
|
|
1329
1351
|
self,
|
|
1330
|
-
request: Optional[operations_pb2.CancelOperationRequest] = None,
|
|
1352
|
+
request: Optional[Union[operations_pb2.CancelOperationRequest, dict]] = None,
|
|
1331
1353
|
*,
|
|
1332
1354
|
retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
|
1333
1355
|
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
|
|
@@ -1356,8 +1378,12 @@ class StorageBatchOperationsAsyncClient:
|
|
|
1356
1378
|
# Create or coerce a protobuf request object.
|
|
1357
1379
|
# The request isn't a proto-plus wrapped type,
|
|
1358
1380
|
# so it must be constructed via keyword expansion.
|
|
1359
|
-
if
|
|
1360
|
-
|
|
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
|
|
1361
1387
|
|
|
1362
1388
|
# Wrap the RPC method; this adds retry and timeout information,
|
|
1363
1389
|
# and friendly error handling.
|
|
@@ -1366,7 +1392,7 @@ class StorageBatchOperationsAsyncClient:
|
|
|
1366
1392
|
# Certain fields should be provided within the metadata header;
|
|
1367
1393
|
# add these here.
|
|
1368
1394
|
metadata = tuple(metadata) + (
|
|
1369
|
-
gapic_v1.routing_header.to_grpc_metadata((("name",
|
|
1395
|
+
gapic_v1.routing_header.to_grpc_metadata((("name", request_pb.name),)),
|
|
1370
1396
|
)
|
|
1371
1397
|
|
|
1372
1398
|
# Validate the universe domain.
|
|
@@ -1374,7 +1400,7 @@ class StorageBatchOperationsAsyncClient:
|
|
|
1374
1400
|
|
|
1375
1401
|
# Send the request.
|
|
1376
1402
|
await rpc(
|
|
1377
|
-
|
|
1403
|
+
request_pb,
|
|
1378
1404
|
retry=retry,
|
|
1379
1405
|
timeout=timeout,
|
|
1380
1406
|
metadata=metadata,
|
|
@@ -1382,7 +1408,7 @@ class StorageBatchOperationsAsyncClient:
|
|
|
1382
1408
|
|
|
1383
1409
|
async def get_location(
|
|
1384
1410
|
self,
|
|
1385
|
-
request: Optional[locations_pb2.GetLocationRequest] = None,
|
|
1411
|
+
request: Optional[Union[locations_pb2.GetLocationRequest, dict]] = None,
|
|
1386
1412
|
*,
|
|
1387
1413
|
retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
|
1388
1414
|
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
|
|
@@ -1408,8 +1434,12 @@ class StorageBatchOperationsAsyncClient:
|
|
|
1408
1434
|
# Create or coerce a protobuf request object.
|
|
1409
1435
|
# The request isn't a proto-plus wrapped type,
|
|
1410
1436
|
# so it must be constructed via keyword expansion.
|
|
1411
|
-
if
|
|
1412
|
-
|
|
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
|
|
1413
1443
|
|
|
1414
1444
|
# Wrap the RPC method; this adds retry and timeout information,
|
|
1415
1445
|
# and friendly error handling.
|
|
@@ -1418,7 +1448,7 @@ class StorageBatchOperationsAsyncClient:
|
|
|
1418
1448
|
# Certain fields should be provided within the metadata header;
|
|
1419
1449
|
# add these here.
|
|
1420
1450
|
metadata = tuple(metadata) + (
|
|
1421
|
-
gapic_v1.routing_header.to_grpc_metadata((("name",
|
|
1451
|
+
gapic_v1.routing_header.to_grpc_metadata((("name", request_pb.name),)),
|
|
1422
1452
|
)
|
|
1423
1453
|
|
|
1424
1454
|
# Validate the universe domain.
|
|
@@ -1426,7 +1456,7 @@ class StorageBatchOperationsAsyncClient:
|
|
|
1426
1456
|
|
|
1427
1457
|
# Send the request.
|
|
1428
1458
|
response = await rpc(
|
|
1429
|
-
|
|
1459
|
+
request_pb,
|
|
1430
1460
|
retry=retry,
|
|
1431
1461
|
timeout=timeout,
|
|
1432
1462
|
metadata=metadata,
|
|
@@ -1437,7 +1467,7 @@ class StorageBatchOperationsAsyncClient:
|
|
|
1437
1467
|
|
|
1438
1468
|
async def list_locations(
|
|
1439
1469
|
self,
|
|
1440
|
-
request: Optional[locations_pb2.ListLocationsRequest] = None,
|
|
1470
|
+
request: Optional[Union[locations_pb2.ListLocationsRequest, dict]] = None,
|
|
1441
1471
|
*,
|
|
1442
1472
|
retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
|
1443
1473
|
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
|
|
@@ -1463,8 +1493,12 @@ class StorageBatchOperationsAsyncClient:
|
|
|
1463
1493
|
# Create or coerce a protobuf request object.
|
|
1464
1494
|
# The request isn't a proto-plus wrapped type,
|
|
1465
1495
|
# so it must be constructed via keyword expansion.
|
|
1466
|
-
if
|
|
1467
|
-
|
|
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
|
|
1468
1502
|
|
|
1469
1503
|
# Wrap the RPC method; this adds retry and timeout information,
|
|
1470
1504
|
# and friendly error handling.
|
|
@@ -1473,7 +1507,7 @@ class StorageBatchOperationsAsyncClient:
|
|
|
1473
1507
|
# Certain fields should be provided within the metadata header;
|
|
1474
1508
|
# add these here.
|
|
1475
1509
|
metadata = tuple(metadata) + (
|
|
1476
|
-
gapic_v1.routing_header.to_grpc_metadata((("name",
|
|
1510
|
+
gapic_v1.routing_header.to_grpc_metadata((("name", request_pb.name),)),
|
|
1477
1511
|
)
|
|
1478
1512
|
|
|
1479
1513
|
# Validate the universe domain.
|
|
@@ -1481,7 +1515,7 @@ class StorageBatchOperationsAsyncClient:
|
|
|
1481
1515
|
|
|
1482
1516
|
# Send the request.
|
|
1483
1517
|
response = await rpc(
|
|
1484
|
-
|
|
1518
|
+
request_pb,
|
|
1485
1519
|
retry=retry,
|
|
1486
1520
|
timeout=timeout,
|
|
1487
1521
|
metadata=metadata,
|