google-cloud-storagebatchoperations 0.4.0__tar.gz → 0.5.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.
Files changed (38) hide show
  1. {google_cloud_storagebatchoperations-0.4.0/google_cloud_storagebatchoperations.egg-info → google_cloud_storagebatchoperations-0.5.0}/PKG-INFO +1 -1
  2. {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.5.0}/google/cloud/storagebatchoperations/__init__.py +6 -0
  3. {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.5.0}/google/cloud/storagebatchoperations/gapic_version.py +1 -1
  4. {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.5.0}/google/cloud/storagebatchoperations_v1/__init__.py +7 -0
  5. {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.5.0}/google/cloud/storagebatchoperations_v1/gapic_version.py +1 -1
  6. {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.5.0}/google/cloud/storagebatchoperations_v1/services/storage_batch_operations/async_client.py +16 -6
  7. {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.5.0}/google/cloud/storagebatchoperations_v1/services/storage_batch_operations/client.py +10 -15
  8. {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.5.0}/google/cloud/storagebatchoperations_v1/services/storage_batch_operations/pagers.py +4 -4
  9. {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.5.0}/google/cloud/storagebatchoperations_v1/services/storage_batch_operations/transports/__init__.py +1 -3
  10. {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.5.0}/google/cloud/storagebatchoperations_v1/services/storage_batch_operations/transports/base.py +11 -5
  11. {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.5.0}/google/cloud/storagebatchoperations_v1/services/storage_batch_operations/transports/rest.py +16 -40
  12. {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.5.0}/google/cloud/storagebatchoperations_v1/types/__init__.py +6 -0
  13. {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.5.0}/google/cloud/storagebatchoperations_v1/types/storage_batch_operations_types.py +116 -0
  14. {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.5.0/google_cloud_storagebatchoperations.egg-info}/PKG-INFO +1 -1
  15. {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.5.0}/tests/unit/gapic/storagebatchoperations_v1/test_storage_batch_operations.py +37 -35
  16. {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.5.0}/LICENSE +0 -0
  17. {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.5.0}/MANIFEST.in +0 -0
  18. {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.5.0}/README.rst +0 -0
  19. {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.5.0}/google/cloud/storagebatchoperations/py.typed +0 -0
  20. {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.5.0}/google/cloud/storagebatchoperations_v1/gapic_metadata.json +0 -0
  21. {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.5.0}/google/cloud/storagebatchoperations_v1/py.typed +0 -0
  22. {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.5.0}/google/cloud/storagebatchoperations_v1/services/__init__.py +0 -0
  23. {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.5.0}/google/cloud/storagebatchoperations_v1/services/storage_batch_operations/__init__.py +0 -0
  24. {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.5.0}/google/cloud/storagebatchoperations_v1/services/storage_batch_operations/transports/grpc.py +6 -6
  25. {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.5.0}/google/cloud/storagebatchoperations_v1/services/storage_batch_operations/transports/grpc_asyncio.py +5 -5
  26. {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.5.0}/google/cloud/storagebatchoperations_v1/services/storage_batch_operations/transports/rest_base.py +1 -1
  27. {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.5.0}/google/cloud/storagebatchoperations_v1/types/storage_batch_operations.py +0 -0
  28. {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.5.0}/google_cloud_storagebatchoperations.egg-info/SOURCES.txt +0 -0
  29. {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.5.0}/google_cloud_storagebatchoperations.egg-info/dependency_links.txt +0 -0
  30. {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.5.0}/google_cloud_storagebatchoperations.egg-info/not-zip-safe +0 -0
  31. {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.5.0}/google_cloud_storagebatchoperations.egg-info/requires.txt +0 -0
  32. {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.5.0}/google_cloud_storagebatchoperations.egg-info/top_level.txt +0 -0
  33. {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.5.0}/setup.cfg +0 -0
  34. {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.5.0}/setup.py +0 -0
  35. {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.5.0}/tests/__init__.py +0 -0
  36. {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.5.0}/tests/unit/__init__.py +0 -0
  37. {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.5.0}/tests/unit/gapic/__init__.py +0 -0
  38. {google_cloud_storagebatchoperations-0.4.0 → google_cloud_storagebatchoperations-0.5.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.4.0
3
+ Version: 0.5.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
@@ -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
  )
@@ -13,4 +13,4 @@
13
13
  # See the License for the specific language governing permissions and
14
14
  # limitations under the License.
15
15
  #
16
- __version__ = "0.4.0" # {x-release-please-version}
16
+ __version__ = "0.5.0" # {x-release-please-version}
@@ -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,4 +13,4 @@
13
13
  # See the License for the specific language governing permissions and
14
14
  # limitations under the License.
15
15
  #
16
- __version__ = "0.4.0" # {x-release-please-version}
16
+ __version__ = "0.5.0" # {x-release-please-version}
@@ -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
- return StorageBatchOperationsClient.from_service_account_info.__func__(StorageBatchOperationsAsyncClient, info, *args, **kwargs) # type: ignore
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
- return StorageBatchOperationsClient.from_service_account_file.__func__(StorageBatchOperationsAsyncClient, filename, *args, **kwargs) # type: ignore
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(client_options) # type: ignore
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:
@@ -13,12 +13,13 @@
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
- from http import HTTPStatus
18
16
  import json
19
17
  import logging as std_logging
20
18
  import os
21
19
  import re
20
+ import warnings
21
+ from collections import OrderedDict
22
+ from http import HTTPStatus
22
23
  from typing import (
23
24
  Callable,
24
25
  Dict,
@@ -32,8 +33,8 @@ from typing import (
32
33
  Union,
33
34
  cast,
34
35
  )
35
- import warnings
36
36
 
37
+ import google.protobuf
37
38
  from google.api_core import client_options as client_options_lib
38
39
  from google.api_core import exceptions as core_exceptions
39
40
  from google.api_core import gapic_v1
@@ -43,7 +44,6 @@ from google.auth.exceptions import MutualTLSChannelError # type: ignore
43
44
  from google.auth.transport import mtls # type: ignore
44
45
  from google.auth.transport.grpc import SslCredentials # type: ignore
45
46
  from google.oauth2 import service_account # type: ignore
46
- import google.protobuf
47
47
 
48
48
  from google.cloud.storagebatchoperations_v1 import gapic_version as package_version
49
49
 
@@ -63,9 +63,9 @@ _LOGGER = std_logging.getLogger(__name__)
63
63
 
64
64
  import google.api_core.operation as operation # type: ignore
65
65
  import google.api_core.operation_async as operation_async # type: ignore
66
+ import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore
66
67
  from google.cloud.location import locations_pb2 # type: ignore
67
68
  from google.longrunning import operations_pb2 # type: ignore
68
- import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore
69
69
 
70
70
  from google.cloud.storagebatchoperations_v1.services.storage_batch_operations import (
71
71
  pagers,
@@ -89,9 +89,7 @@ class StorageBatchOperationsClientMeta(type):
89
89
  objects.
90
90
  """
91
91
 
92
- _transport_registry = (
93
- OrderedDict()
94
- ) # type: Dict[str, Type[StorageBatchOperationsTransport]]
92
+ _transport_registry = OrderedDict() # type: Dict[str, Type[StorageBatchOperationsTransport]]
95
93
  _transport_registry["grpc"] = StorageBatchOperationsGrpcTransport
96
94
  _transport_registry["grpc_asyncio"] = StorageBatchOperationsGrpcAsyncIOTransport
97
95
  _transport_registry["rest"] = StorageBatchOperationsRestTransport
@@ -690,11 +688,9 @@ class StorageBatchOperationsClient(metaclass=StorageBatchOperationsClientMeta):
690
688
 
691
689
  universe_domain_opt = getattr(self._client_options, "universe_domain", None)
692
690
 
693
- (
694
- self._use_client_cert,
695
- self._use_mtls_endpoint,
696
- self._universe_domain_env,
697
- ) = StorageBatchOperationsClient._read_environment_variables()
691
+ self._use_client_cert, self._use_mtls_endpoint, self._universe_domain_env = (
692
+ StorageBatchOperationsClient._read_environment_variables()
693
+ )
698
694
  self._client_cert_source = StorageBatchOperationsClient._get_client_cert_source(
699
695
  self._client_options.client_cert_source, self._use_client_cert
700
696
  )
@@ -729,8 +725,7 @@ class StorageBatchOperationsClient(metaclass=StorageBatchOperationsClientMeta):
729
725
  )
730
726
  if self._client_options.scopes:
731
727
  raise ValueError(
732
- "When providing a transport instance, provide its scopes "
733
- "directly."
728
+ "When providing a transport instance, provide its scopes directly."
734
729
  )
735
730
  self._transport = cast(StorageBatchOperationsTransport, transport)
736
731
  self._api_endpoint = self._transport.host
@@ -70,7 +70,7 @@ class ListJobsPager:
70
70
  *,
71
71
  retry: OptionalRetry = gapic_v1.method.DEFAULT,
72
72
  timeout: Union[float, object] = gapic_v1.method.DEFAULT,
73
- metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()
73
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
74
74
  ):
75
75
  """Instantiate the pager.
76
76
 
@@ -146,7 +146,7 @@ class ListJobsAsyncPager:
146
146
  *,
147
147
  retry: OptionalAsyncRetry = gapic_v1.method.DEFAULT,
148
148
  timeout: Union[float, object] = gapic_v1.method.DEFAULT,
149
- metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()
149
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
150
150
  ):
151
151
  """Instantiates the pager.
152
152
 
@@ -226,7 +226,7 @@ class ListBucketOperationsPager:
226
226
  *,
227
227
  retry: OptionalRetry = gapic_v1.method.DEFAULT,
228
228
  timeout: Union[float, object] = gapic_v1.method.DEFAULT,
229
- metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()
229
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
230
230
  ):
231
231
  """Instantiate the pager.
232
232
 
@@ -304,7 +304,7 @@ class ListBucketOperationsAsyncPager:
304
304
  *,
305
305
  retry: OptionalAsyncRetry = gapic_v1.method.DEFAULT,
306
306
  timeout: Union[float, object] = gapic_v1.method.DEFAULT,
307
- metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()
307
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
308
308
  ):
309
309
  """Instantiates the pager.
310
310
 
@@ -25,9 +25,7 @@ from .rest import (
25
25
  )
26
26
 
27
27
  # Compile a registry of transports.
28
- _transport_registry = (
29
- OrderedDict()
30
- ) # type: Dict[str, Type[StorageBatchOperationsTransport]]
28
+ _transport_registry = OrderedDict() # type: Dict[str, Type[StorageBatchOperationsTransport]]
31
29
  _transport_registry["grpc"] = StorageBatchOperationsGrpcTransport
32
30
  _transport_registry["grpc_asyncio"] = StorageBatchOperationsGrpcAsyncIOTransport
33
31
  _transport_registry["rest"] = StorageBatchOperationsRestTransport
@@ -17,16 +17,16 @@ import abc
17
17
  from typing import Awaitable, Callable, Dict, Optional, Sequence, Union
18
18
 
19
19
  import google.api_core
20
+ import google.auth # type: ignore
21
+ import google.protobuf
22
+ import google.protobuf.empty_pb2 as empty_pb2 # type: ignore
20
23
  from google.api_core import exceptions as core_exceptions
21
24
  from google.api_core import gapic_v1, operations_v1
22
25
  from google.api_core import retry as retries
23
- import google.auth # type: ignore
24
26
  from google.auth import credentials as ga_credentials # type: ignore
25
27
  from google.cloud.location import locations_pb2 # type: ignore
26
28
  from google.longrunning import operations_pb2 # type: ignore
27
29
  from google.oauth2 import service_account # type: ignore
28
- import google.protobuf
29
- import google.protobuf.empty_pb2 as empty_pb2 # type: ignore
30
30
 
31
31
  from google.cloud.storagebatchoperations_v1 import gapic_version as package_version
32
32
  from google.cloud.storagebatchoperations_v1.types import (
@@ -352,13 +352,19 @@ class StorageBatchOperationsTransport(abc.ABC):
352
352
  @property
353
353
  def cancel_operation(
354
354
  self,
355
- ) -> Callable[[operations_pb2.CancelOperationRequest], None,]:
355
+ ) -> Callable[
356
+ [operations_pb2.CancelOperationRequest],
357
+ None,
358
+ ]:
356
359
  raise NotImplementedError()
357
360
 
358
361
  @property
359
362
  def delete_operation(
360
363
  self,
361
- ) -> Callable[[operations_pb2.DeleteOperationRequest], None,]:
364
+ ) -> Callable[
365
+ [operations_pb2.DeleteOperationRequest],
366
+ None,
367
+ ]:
362
368
  raise NotImplementedError()
363
369
 
364
370
  @property
@@ -16,19 +16,19 @@
16
16
  import dataclasses
17
17
  import json # type: ignore
18
18
  import logging
19
- from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union
20
19
  import warnings
20
+ from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union
21
21
 
22
- from google.api_core import gapic_v1, operations_v1, rest_helpers, rest_streaming
22
+ import google.protobuf
23
+ import google.protobuf.empty_pb2 as empty_pb2 # type: ignore
23
24
  from google.api_core import exceptions as core_exceptions
25
+ from google.api_core import gapic_v1, operations_v1, rest_helpers, rest_streaming
24
26
  from google.api_core import retry as retries
25
27
  from google.auth import credentials as ga_credentials # type: ignore
26
28
  from google.auth.transport.requests import AuthorizedSession # type: ignore
27
29
  from google.cloud.location import locations_pb2 # type: ignore
28
30
  from google.longrunning import operations_pb2 # type: ignore
29
- import google.protobuf
30
31
  from google.protobuf import json_format
31
- import google.protobuf.empty_pb2 as empty_pb2 # type: ignore
32
32
  from requests import __version__ as requests_version
33
33
 
34
34
  from google.cloud.storagebatchoperations_v1.types import (
@@ -806,9 +806,7 @@ class StorageBatchOperationsRestTransport(_BaseStorageBatchOperationsRestTranspo
806
806
  Message for response to cancel Job.
807
807
  """
808
808
 
809
- http_options = (
810
- _BaseStorageBatchOperationsRestTransport._BaseCancelJob._get_http_options()
811
- )
809
+ http_options = _BaseStorageBatchOperationsRestTransport._BaseCancelJob._get_http_options()
812
810
 
813
811
  request, metadata = self._interceptor.pre_cancel_job(request, metadata)
814
812
  transcoded_request = _BaseStorageBatchOperationsRestTransport._BaseCancelJob._get_transcoded_request(
@@ -962,9 +960,7 @@ class StorageBatchOperationsRestTransport(_BaseStorageBatchOperationsRestTranspo
962
960
 
963
961
  """
964
962
 
965
- http_options = (
966
- _BaseStorageBatchOperationsRestTransport._BaseCreateJob._get_http_options()
967
- )
963
+ http_options = _BaseStorageBatchOperationsRestTransport._BaseCreateJob._get_http_options()
968
964
 
969
965
  request, metadata = self._interceptor.pre_create_job(request, metadata)
970
966
  transcoded_request = _BaseStorageBatchOperationsRestTransport._BaseCreateJob._get_transcoded_request(
@@ -1106,9 +1102,7 @@ class StorageBatchOperationsRestTransport(_BaseStorageBatchOperationsRestTranspo
1106
1102
  be of type `bytes`.
1107
1103
  """
1108
1104
 
1109
- http_options = (
1110
- _BaseStorageBatchOperationsRestTransport._BaseDeleteJob._get_http_options()
1111
- )
1105
+ http_options = _BaseStorageBatchOperationsRestTransport._BaseDeleteJob._get_http_options()
1112
1106
 
1113
1107
  request, metadata = self._interceptor.pre_delete_job(request, metadata)
1114
1108
  transcoded_request = _BaseStorageBatchOperationsRestTransport._BaseDeleteJob._get_transcoded_request(
@@ -1220,9 +1214,7 @@ class StorageBatchOperationsRestTransport(_BaseStorageBatchOperationsRestTranspo
1220
1214
 
1221
1215
  """
1222
1216
 
1223
- http_options = (
1224
- _BaseStorageBatchOperationsRestTransport._BaseGetBucketOperation._get_http_options()
1225
- )
1217
+ http_options = _BaseStorageBatchOperationsRestTransport._BaseGetBucketOperation._get_http_options()
1226
1218
 
1227
1219
  request, metadata = self._interceptor.pre_get_bucket_operation(
1228
1220
  request, metadata
@@ -1523,9 +1515,7 @@ class StorageBatchOperationsRestTransport(_BaseStorageBatchOperationsRestTranspo
1523
1515
 
1524
1516
  """
1525
1517
 
1526
- http_options = (
1527
- _BaseStorageBatchOperationsRestTransport._BaseListBucketOperations._get_http_options()
1528
- )
1518
+ http_options = _BaseStorageBatchOperationsRestTransport._BaseListBucketOperations._get_http_options()
1529
1519
 
1530
1520
  request, metadata = self._interceptor.pre_list_bucket_operations(
1531
1521
  request, metadata
@@ -1676,9 +1666,7 @@ class StorageBatchOperationsRestTransport(_BaseStorageBatchOperationsRestTranspo
1676
1666
  Message for response to listing Jobs
1677
1667
  """
1678
1668
 
1679
- http_options = (
1680
- _BaseStorageBatchOperationsRestTransport._BaseListJobs._get_http_options()
1681
- )
1669
+ http_options = _BaseStorageBatchOperationsRestTransport._BaseListJobs._get_http_options()
1682
1670
 
1683
1671
  request, metadata = self._interceptor.pre_list_jobs(request, metadata)
1684
1672
  transcoded_request = _BaseStorageBatchOperationsRestTransport._BaseListJobs._get_transcoded_request(
@@ -1898,9 +1886,7 @@ class StorageBatchOperationsRestTransport(_BaseStorageBatchOperationsRestTranspo
1898
1886
  locations_pb2.Location: Response from GetLocation method.
1899
1887
  """
1900
1888
 
1901
- http_options = (
1902
- _BaseStorageBatchOperationsRestTransport._BaseGetLocation._get_http_options()
1903
- )
1889
+ http_options = _BaseStorageBatchOperationsRestTransport._BaseGetLocation._get_http_options()
1904
1890
 
1905
1891
  request, metadata = self._interceptor.pre_get_location(request, metadata)
1906
1892
  transcoded_request = _BaseStorageBatchOperationsRestTransport._BaseGetLocation._get_transcoded_request(
@@ -2039,9 +2025,7 @@ class StorageBatchOperationsRestTransport(_BaseStorageBatchOperationsRestTranspo
2039
2025
  locations_pb2.ListLocationsResponse: Response from ListLocations method.
2040
2026
  """
2041
2027
 
2042
- http_options = (
2043
- _BaseStorageBatchOperationsRestTransport._BaseListLocations._get_http_options()
2044
- )
2028
+ http_options = _BaseStorageBatchOperationsRestTransport._BaseListLocations._get_http_options()
2045
2029
 
2046
2030
  request, metadata = self._interceptor.pre_list_locations(request, metadata)
2047
2031
  transcoded_request = _BaseStorageBatchOperationsRestTransport._BaseListLocations._get_transcoded_request(
@@ -2178,9 +2162,7 @@ class StorageBatchOperationsRestTransport(_BaseStorageBatchOperationsRestTranspo
2178
2162
  be of type `bytes`.
2179
2163
  """
2180
2164
 
2181
- http_options = (
2182
- _BaseStorageBatchOperationsRestTransport._BaseCancelOperation._get_http_options()
2183
- )
2165
+ http_options = _BaseStorageBatchOperationsRestTransport._BaseCancelOperation._get_http_options()
2184
2166
 
2185
2167
  request, metadata = self._interceptor.pre_cancel_operation(
2186
2168
  request, metadata
@@ -2300,9 +2282,7 @@ class StorageBatchOperationsRestTransport(_BaseStorageBatchOperationsRestTranspo
2300
2282
  be of type `bytes`.
2301
2283
  """
2302
2284
 
2303
- http_options = (
2304
- _BaseStorageBatchOperationsRestTransport._BaseDeleteOperation._get_http_options()
2305
- )
2285
+ http_options = _BaseStorageBatchOperationsRestTransport._BaseDeleteOperation._get_http_options()
2306
2286
 
2307
2287
  request, metadata = self._interceptor.pre_delete_operation(
2308
2288
  request, metadata
@@ -2420,9 +2400,7 @@ class StorageBatchOperationsRestTransport(_BaseStorageBatchOperationsRestTranspo
2420
2400
  operations_pb2.Operation: Response from GetOperation method.
2421
2401
  """
2422
2402
 
2423
- http_options = (
2424
- _BaseStorageBatchOperationsRestTransport._BaseGetOperation._get_http_options()
2425
- )
2403
+ http_options = _BaseStorageBatchOperationsRestTransport._BaseGetOperation._get_http_options()
2426
2404
 
2427
2405
  request, metadata = self._interceptor.pre_get_operation(request, metadata)
2428
2406
  transcoded_request = _BaseStorageBatchOperationsRestTransport._BaseGetOperation._get_transcoded_request(
@@ -2561,9 +2539,7 @@ class StorageBatchOperationsRestTransport(_BaseStorageBatchOperationsRestTranspo
2561
2539
  operations_pb2.ListOperationsResponse: Response from ListOperations method.
2562
2540
  """
2563
2541
 
2564
- http_options = (
2565
- _BaseStorageBatchOperationsRestTransport._BaseListOperations._get_http_options()
2566
- )
2542
+ http_options = _BaseStorageBatchOperationsRestTransport._BaseListOperations._get_http_options()
2567
2543
 
2568
2544
  request, metadata = self._interceptor.pre_list_operations(request, metadata)
2569
2545
  transcoded_request = _BaseStorageBatchOperationsRestTransport._BaseListOperations._get_transcoded_request(
@@ -30,17 +30,20 @@ from .storage_batch_operations_types import (
30
30
  BucketList,
31
31
  BucketOperation,
32
32
  Counters,
33
+ CustomContextUpdates,
33
34
  DeleteObject,
34
35
  ErrorLogEntry,
35
36
  ErrorSummary,
36
37
  Job,
37
38
  LoggingConfig,
38
39
  Manifest,
40
+ ObjectCustomContextPayload,
39
41
  ObjectRetention,
40
42
  PrefixList,
41
43
  PutMetadata,
42
44
  PutObjectHold,
43
45
  RewriteObject,
46
+ UpdateObjectCustomContext,
44
47
  )
45
48
 
46
49
  __all__ = (
@@ -58,15 +61,18 @@ __all__ = (
58
61
  "BucketList",
59
62
  "BucketOperation",
60
63
  "Counters",
64
+ "CustomContextUpdates",
61
65
  "DeleteObject",
62
66
  "ErrorLogEntry",
63
67
  "ErrorSummary",
64
68
  "Job",
65
69
  "LoggingConfig",
66
70
  "Manifest",
71
+ "ObjectCustomContextPayload",
67
72
  "ObjectRetention",
68
73
  "PrefixList",
69
74
  "PutMetadata",
70
75
  "PutObjectHold",
71
76
  "RewriteObject",
77
+ "UpdateObjectCustomContext",
72
78
  )
@@ -34,6 +34,9 @@ __protobuf__ = proto.module(
34
34
  "RewriteObject",
35
35
  "ObjectRetention",
36
36
  "PutMetadata",
37
+ "ObjectCustomContextPayload",
38
+ "CustomContextUpdates",
39
+ "UpdateObjectCustomContext",
37
40
  "ErrorSummary",
38
41
  "ErrorLogEntry",
39
42
  "Counters",
@@ -88,6 +91,10 @@ class Job(proto.Message):
88
91
  Rewrite the object and updates metadata like
89
92
  KMS key.
90
93
 
94
+ This field is a member of `oneof`_ ``transformation``.
95
+ update_object_custom_context (google.cloud.storagebatchoperations_v1.types.UpdateObjectCustomContext):
96
+ Update object custom context.
97
+
91
98
  This field is a member of `oneof`_ ``transformation``.
92
99
  logging_config (google.cloud.storagebatchoperations_v1.types.LoggingConfig):
93
100
  Optional. Logging configuration.
@@ -138,6 +145,7 @@ class Job(proto.Message):
138
145
  QUEUED (5):
139
146
  Queued but not yet started.
140
147
  """
148
+
141
149
  STATE_UNSPECIFIED = 0
142
150
  RUNNING = 1
143
151
  SUCCEEDED = 2
@@ -183,6 +191,12 @@ class Job(proto.Message):
183
191
  oneof="transformation",
184
192
  message="RewriteObject",
185
193
  )
194
+ update_object_custom_context: "UpdateObjectCustomContext" = proto.Field(
195
+ proto.MESSAGE,
196
+ number=23,
197
+ oneof="transformation",
198
+ message="UpdateObjectCustomContext",
199
+ )
186
200
  logging_config: "LoggingConfig" = proto.Field(
187
201
  proto.MESSAGE,
188
202
  number=9,
@@ -274,6 +288,10 @@ class BucketOperation(proto.Message):
274
288
  Rewrite the object and updates metadata like
275
289
  KMS key.
276
290
 
291
+ This field is a member of `oneof`_ ``transformation``.
292
+ update_object_custom_context (google.cloud.storagebatchoperations_v1.types.UpdateObjectCustomContext):
293
+ Update object custom context.
294
+
277
295
  This field is a member of `oneof`_ ``transformation``.
278
296
  create_time (google.protobuf.timestamp_pb2.Timestamp):
279
297
  Output only. The time that the
@@ -311,6 +329,7 @@ class BucketOperation(proto.Message):
311
329
  FAILED (5):
312
330
  Terminated due to an unrecoverable failure.
313
331
  """
332
+
314
333
  STATE_UNSPECIFIED = 0
315
334
  QUEUED = 1
316
335
  RUNNING = 2
@@ -362,6 +381,12 @@ class BucketOperation(proto.Message):
362
381
  oneof="transformation",
363
382
  message="RewriteObject",
364
383
  )
384
+ update_object_custom_context: "UpdateObjectCustomContext" = proto.Field(
385
+ proto.MESSAGE,
386
+ number=15,
387
+ oneof="transformation",
388
+ message="UpdateObjectCustomContext",
389
+ )
365
390
  create_time: timestamp_pb2.Timestamp = proto.Field(
366
391
  proto.MESSAGE,
367
392
  number=5,
@@ -527,6 +552,7 @@ class PutObjectHold(proto.Message):
527
552
  UNSET (2):
528
553
  Releases the hold.
529
554
  """
555
+
530
556
  HOLD_STATUS_UNSPECIFIED = 0
531
557
  SET = 1
532
558
  UNSET = 2
@@ -633,6 +659,7 @@ class ObjectRetention(proto.Message):
633
659
  UNLOCKED (2):
634
660
  Sets the retention mode to unlocked.
635
661
  """
662
+
636
663
  RETENTION_MODE_UNSPECIFIED = 0
637
664
  LOCKED = 1
638
665
  UNLOCKED = 2
@@ -770,6 +797,93 @@ class PutMetadata(proto.Message):
770
797
  )
771
798
 
772
799
 
800
+ class ObjectCustomContextPayload(proto.Message):
801
+ r"""Describes the payload of a user defined object custom
802
+ context.
803
+
804
+
805
+ .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
806
+
807
+ Attributes:
808
+ value (str):
809
+ The value of the object custom context. If set, ``value``
810
+ must NOT be an empty string since it is a required field in
811
+ custom context. If unset, ``value`` will be ignored and no
812
+ changes will be made to the ``value`` field of the custom
813
+ context payload.
814
+
815
+ This field is a member of `oneof`_ ``_value``.
816
+ """
817
+
818
+ value: str = proto.Field(
819
+ proto.STRING,
820
+ number=1,
821
+ optional=True,
822
+ )
823
+
824
+
825
+ class CustomContextUpdates(proto.Message):
826
+ r"""Describes a collection of updates to apply to custom contexts
827
+ identified by key.
828
+
829
+ Attributes:
830
+ updates (MutableMapping[str, google.cloud.storagebatchoperations_v1.types.ObjectCustomContextPayload]):
831
+ Optional. Insert or update the existing
832
+ custom contexts.
833
+ keys_to_clear (MutableSequence[str]):
834
+ Optional. Custom contexts to clear by key. A key cannot be
835
+ present in both ``updates`` and ``keys_to_clear``.
836
+ """
837
+
838
+ updates: MutableMapping[str, "ObjectCustomContextPayload"] = proto.MapField(
839
+ proto.STRING,
840
+ proto.MESSAGE,
841
+ number=1,
842
+ message="ObjectCustomContextPayload",
843
+ )
844
+ keys_to_clear: MutableSequence[str] = proto.RepeatedField(
845
+ proto.STRING,
846
+ number=2,
847
+ )
848
+
849
+
850
+ class UpdateObjectCustomContext(proto.Message):
851
+ r"""Describes options to update object custom contexts.
852
+
853
+ This message has `oneof`_ fields (mutually exclusive fields).
854
+ For each oneof, at most one member field can be set at the same time.
855
+ Setting any member of the oneof automatically clears all other
856
+ members.
857
+
858
+ .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
859
+
860
+ Attributes:
861
+ custom_context_updates (google.cloud.storagebatchoperations_v1.types.CustomContextUpdates):
862
+ A collection of updates to apply to specific
863
+ custom contexts. Use this to add, update or
864
+ delete individual contexts by key.
865
+
866
+ This field is a member of `oneof`_ ``action``.
867
+ clear_all (bool):
868
+ If set, must be set to true and all existing
869
+ object custom contexts will be deleted.
870
+
871
+ This field is a member of `oneof`_ ``action``.
872
+ """
873
+
874
+ custom_context_updates: "CustomContextUpdates" = proto.Field(
875
+ proto.MESSAGE,
876
+ number=1,
877
+ oneof="action",
878
+ message="CustomContextUpdates",
879
+ )
880
+ clear_all: bool = proto.Field(
881
+ proto.BOOL,
882
+ number=2,
883
+ oneof="action",
884
+ )
885
+
886
+
773
887
  class ErrorSummary(proto.Message):
774
888
  r"""A summary of errors by error code, plus a count and sample
775
889
  error log entries.
@@ -882,6 +996,7 @@ class LoggingConfig(proto.Message):
882
996
  The corresponding transform action in this
883
997
  job.
884
998
  """
999
+
885
1000
  LOGGABLE_ACTION_UNSPECIFIED = 0
886
1001
  TRANSFORM = 6
887
1002
 
@@ -900,6 +1015,7 @@ class LoggingConfig(proto.Message):
900
1015
  actions are logged as
901
1016
  [ERROR][google.logging.type.LogSeverity.ERROR].
902
1017
  """
1018
+
903
1019
  LOGGABLE_ACTION_STATE_UNSPECIFIED = 0
904
1020
  SUCCEEDED = 1
905
1021
  FAILED = 2
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: google-cloud-storagebatchoperations
3
- Version: 0.4.0
3
+ Version: 0.5.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
@@ -22,17 +22,17 @@ try:
22
22
  except ImportError: # pragma: NO COVER
23
23
  import mock
24
24
 
25
- from collections.abc import AsyncIterable, Iterable
26
25
  import json
27
26
  import math
27
+ from collections.abc import AsyncIterable, Iterable, Mapping, Sequence
28
28
 
29
+ import grpc
30
+ import pytest
29
31
  from google.api_core import api_core_version
30
32
  from google.protobuf import json_format
31
- import grpc
32
33
  from grpc.experimental import aio
33
34
  from proto.marshal.rules import wrappers
34
35
  from proto.marshal.rules.dates import DurationRule, TimestampRule
35
- import pytest
36
36
  from requests import PreparedRequest, Request, Response
37
37
  from requests.sessions import Session
38
38
 
@@ -43,7 +43,12 @@ try:
43
43
  except ImportError: # pragma: NO COVER
44
44
  HAS_GOOGLE_AUTH_AIO = False
45
45
 
46
+ import google.api_core.operation_async as operation_async # type: ignore
47
+ import google.auth
48
+ import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore
49
+ import google.rpc.code_pb2 as code_pb2 # type: ignore
46
50
  from google.api_core import (
51
+ client_options,
47
52
  future,
48
53
  gapic_v1,
49
54
  grpc_helpers,
@@ -52,18 +57,13 @@ from google.api_core import (
52
57
  operations_v1,
53
58
  path_template,
54
59
  )
55
- from google.api_core import client_options
56
60
  from google.api_core import exceptions as core_exceptions
57
61
  from google.api_core import retry as retries
58
- import google.api_core.operation_async as operation_async # type: ignore
59
- import google.auth
60
62
  from google.auth import credentials as ga_credentials
61
63
  from google.auth.exceptions import MutualTLSChannelError
62
64
  from google.cloud.location import locations_pb2
63
65
  from google.longrunning import operations_pb2 # type: ignore
64
66
  from google.oauth2 import service_account
65
- import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore
66
- import google.rpc.code_pb2 as code_pb2 # type: ignore
67
67
 
68
68
  from google.cloud.storagebatchoperations_v1.services.storage_batch_operations import (
69
69
  StorageBatchOperationsAsyncClient,
@@ -1014,10 +1014,9 @@ def test_storage_batch_operations_client_get_mtls_endpoint_and_cert_source(
1014
1014
  client_cert_source=mock_client_cert_source,
1015
1015
  api_endpoint=mock_api_endpoint,
1016
1016
  )
1017
- (
1018
- api_endpoint,
1019
- cert_source,
1020
- ) = client_class.get_mtls_endpoint_and_cert_source(options)
1017
+ api_endpoint, cert_source = (
1018
+ client_class.get_mtls_endpoint_and_cert_source(options)
1019
+ )
1021
1020
  assert api_endpoint == mock_api_endpoint
1022
1021
  assert cert_source is expected_cert_source
1023
1022
 
@@ -1062,10 +1061,9 @@ def test_storage_batch_operations_client_get_mtls_endpoint_and_cert_source(
1062
1061
  client_cert_source=mock_client_cert_source,
1063
1062
  api_endpoint=mock_api_endpoint,
1064
1063
  )
1065
- (
1066
- api_endpoint,
1067
- cert_source,
1068
- ) = client_class.get_mtls_endpoint_and_cert_source(options)
1064
+ api_endpoint, cert_source = (
1065
+ client_class.get_mtls_endpoint_and_cert_source(options)
1066
+ )
1069
1067
  assert api_endpoint == mock_api_endpoint
1070
1068
  assert cert_source is expected_cert_source
1071
1069
 
@@ -1101,10 +1099,9 @@ def test_storage_batch_operations_client_get_mtls_endpoint_and_cert_source(
1101
1099
  "google.auth.transport.mtls.default_client_cert_source",
1102
1100
  return_value=mock_client_cert_source,
1103
1101
  ):
1104
- (
1105
- api_endpoint,
1106
- cert_source,
1107
- ) = client_class.get_mtls_endpoint_and_cert_source()
1102
+ api_endpoint, cert_source = (
1103
+ client_class.get_mtls_endpoint_and_cert_source()
1104
+ )
1108
1105
  assert api_endpoint == client_class.DEFAULT_MTLS_ENDPOINT
1109
1106
  assert cert_source == mock_client_cert_source
1110
1107
 
@@ -1364,9 +1361,7 @@ def test_storage_batch_operations_client_create_channel_credentials_file(
1364
1361
  google.auth, "load_credentials_from_file", autospec=True
1365
1362
  ) as load_creds, mock.patch.object(
1366
1363
  google.auth, "default", autospec=True
1367
- ) as adc, mock.patch.object(
1368
- grpc_helpers, "create_channel"
1369
- ) as create_channel:
1364
+ ) as adc, mock.patch.object(grpc_helpers, "create_channel") as create_channel:
1370
1365
  creds = ga_credentials.AnonymousCredentials()
1371
1366
  file_creds = ga_credentials.AnonymousCredentials()
1372
1367
  load_creds.return_value = (file_creds, None)
@@ -3325,9 +3320,9 @@ def test_list_bucket_operations_use_cached_wrapped_rpc():
3325
3320
  mock_rpc.return_value.name = (
3326
3321
  "foo" # operation_request.operation in compute client(s) expect a string.
3327
3322
  )
3328
- client._transport._wrapped_methods[
3329
- client._transport.list_bucket_operations
3330
- ] = mock_rpc
3323
+ client._transport._wrapped_methods[client._transport.list_bucket_operations] = (
3324
+ mock_rpc
3325
+ )
3331
3326
  request = {}
3332
3327
  client.list_bucket_operations(request)
3333
3328
 
@@ -3881,9 +3876,9 @@ def test_get_bucket_operation_use_cached_wrapped_rpc():
3881
3876
  mock_rpc.return_value.name = (
3882
3877
  "foo" # operation_request.operation in compute client(s) expect a string.
3883
3878
  )
3884
- client._transport._wrapped_methods[
3885
- client._transport.get_bucket_operation
3886
- ] = mock_rpc
3879
+ client._transport._wrapped_methods[client._transport.get_bucket_operation] = (
3880
+ mock_rpc
3881
+ )
3887
3882
  request = {}
3888
3883
  client.get_bucket_operation(request)
3889
3884
 
@@ -5177,9 +5172,9 @@ def test_list_bucket_operations_rest_use_cached_wrapped_rpc():
5177
5172
  mock_rpc.return_value.name = (
5178
5173
  "foo" # operation_request.operation in compute client(s) expect a string.
5179
5174
  )
5180
- client._transport._wrapped_methods[
5181
- client._transport.list_bucket_operations
5182
- ] = mock_rpc
5175
+ client._transport._wrapped_methods[client._transport.list_bucket_operations] = (
5176
+ mock_rpc
5177
+ )
5183
5178
 
5184
5179
  request = {}
5185
5180
  client.list_bucket_operations(request)
@@ -5449,9 +5444,9 @@ def test_get_bucket_operation_rest_use_cached_wrapped_rpc():
5449
5444
  mock_rpc.return_value.name = (
5450
5445
  "foo" # operation_request.operation in compute client(s) expect a string.
5451
5446
  )
5452
- client._transport._wrapped_methods[
5453
- client._transport.get_bucket_operation
5454
- ] = mock_rpc
5447
+ client._transport._wrapped_methods[client._transport.get_bucket_operation] = (
5448
+ mock_rpc
5449
+ )
5455
5450
 
5456
5451
  request = {}
5457
5452
  client.get_bucket_operation(request)
@@ -6424,6 +6419,13 @@ def test_create_job_rest_call_success(request_type):
6424
6419
  },
6425
6420
  },
6426
6421
  "rewrite_object": {"kms_key": "kms_key_value"},
6422
+ "update_object_custom_context": {
6423
+ "custom_context_updates": {
6424
+ "updates": {},
6425
+ "keys_to_clear": ["keys_to_clear_value1", "keys_to_clear_value2"],
6426
+ },
6427
+ "clear_all": True,
6428
+ },
6427
6429
  "logging_config": {"log_actions": [6], "log_action_states": [1]},
6428
6430
  "create_time": {"seconds": 751, "nanos": 543},
6429
6431
  "schedule_time": {},
@@ -16,20 +16,20 @@
16
16
  import json
17
17
  import logging as std_logging
18
18
  import pickle
19
- from typing import Callable, Dict, Optional, Sequence, Tuple, Union
20
19
  import warnings
20
+ from typing import Callable, Dict, Optional, Sequence, Tuple, Union
21
21
 
22
- from google.api_core import gapic_v1, grpc_helpers, operations_v1
23
22
  import google.auth # type: ignore
23
+ import google.protobuf.empty_pb2 as empty_pb2 # type: ignore
24
+ import google.protobuf.message
25
+ import grpc # type: ignore
26
+ import proto # type: ignore
27
+ from google.api_core import gapic_v1, grpc_helpers, operations_v1
24
28
  from google.auth import credentials as ga_credentials # type: ignore
25
29
  from google.auth.transport.grpc import SslCredentials # type: ignore
26
30
  from google.cloud.location import locations_pb2 # type: ignore
27
31
  from google.longrunning import operations_pb2 # type: ignore
28
- import google.protobuf.empty_pb2 as empty_pb2 # type: ignore
29
32
  from google.protobuf.json_format import MessageToJson
30
- import google.protobuf.message
31
- import grpc # type: ignore
32
- import proto # type: ignore
33
33
 
34
34
  from google.cloud.storagebatchoperations_v1.types import (
35
35
  storage_batch_operations,
@@ -17,9 +17,13 @@ import inspect
17
17
  import json
18
18
  import logging as std_logging
19
19
  import pickle
20
- from typing import Awaitable, Callable, Dict, Optional, Sequence, Tuple, Union
21
20
  import warnings
21
+ from typing import Awaitable, Callable, Dict, Optional, Sequence, Tuple, Union
22
22
 
23
+ import google.protobuf.empty_pb2 as empty_pb2 # type: ignore
24
+ import google.protobuf.message
25
+ import grpc # type: ignore
26
+ import proto # type: ignore
23
27
  from google.api_core import exceptions as core_exceptions
24
28
  from google.api_core import gapic_v1, grpc_helpers_async, operations_v1
25
29
  from google.api_core import retry_async as retries
@@ -27,12 +31,8 @@ from google.auth import credentials as ga_credentials # type: ignore
27
31
  from google.auth.transport.grpc import SslCredentials # type: ignore
28
32
  from google.cloud.location import locations_pb2 # type: ignore
29
33
  from google.longrunning import operations_pb2 # type: ignore
30
- import google.protobuf.empty_pb2 as empty_pb2 # type: ignore
31
34
  from google.protobuf.json_format import MessageToJson
32
- import google.protobuf.message
33
- import grpc # type: ignore
34
35
  from grpc.experimental import aio # type: ignore
35
- import proto # type: ignore
36
36
 
37
37
  from google.cloud.storagebatchoperations_v1.types import (
38
38
  storage_batch_operations,
@@ -17,11 +17,11 @@ import json # type: ignore
17
17
  import re
18
18
  from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union
19
19
 
20
+ import google.protobuf.empty_pb2 as empty_pb2 # type: ignore
20
21
  from google.api_core import gapic_v1, path_template
21
22
  from google.cloud.location import locations_pb2 # type: ignore
22
23
  from google.longrunning import operations_pb2 # type: ignore
23
24
  from google.protobuf import json_format
24
- import google.protobuf.empty_pb2 as empty_pb2 # type: ignore
25
25
 
26
26
  from google.cloud.storagebatchoperations_v1.types import (
27
27
  storage_batch_operations,