google-cloud-logging 3.14.0__tar.gz → 3.15.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_logging-3.14.0/google_cloud_logging.egg-info → google_cloud_logging-3.15.0}/PKG-INFO +6 -8
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/README.rst +2 -2
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging/gapic_version.py +1 -1
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/gapic_version.py +1 -1
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/services/config_service_v2/async_client.py +28 -16
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/services/config_service_v2/client.py +36 -20
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/services/config_service_v2/transports/base.py +6 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/services/config_service_v2/transports/grpc.py +6 -2
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/services/config_service_v2/transports/grpc_asyncio.py +6 -2
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/services/logging_service_v2/async_client.py +28 -16
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/services/logging_service_v2/client.py +36 -20
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/services/logging_service_v2/transports/base.py +6 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/services/logging_service_v2/transports/grpc.py +6 -2
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/services/logging_service_v2/transports/grpc_asyncio.py +6 -2
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/services/metrics_service_v2/async_client.py +28 -16
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/services/metrics_service_v2/client.py +36 -20
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/services/metrics_service_v2/transports/base.py +6 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/services/metrics_service_v2/transports/grpc.py +6 -2
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/services/metrics_service_v2/transports/grpc_asyncio.py +6 -2
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0/google_cloud_logging.egg-info}/PKG-INFO +6 -8
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google_cloud_logging.egg-info/requires.txt +2 -2
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/setup.py +3 -5
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/tests/unit/gapic/logging_v2/test_config_service_v2.py +132 -18
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/tests/unit/gapic/logging_v2/test_logging_service_v2.py +132 -18
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/tests/unit/gapic/logging_v2/test_metrics_service_v2.py +132 -18
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/tests/unit/handlers/test_app_engine.py +46 -32
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/LICENSE +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/MANIFEST.in +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging/__init__.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging/handlers/__init__.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging/handlers/middleware/__init__.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging/handlers/transports/__init__.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging/py.typed +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/__init__.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/_gapic.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/_helpers.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/_http.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/_instrumentation.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/client.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/entries.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/gapic_metadata.json +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/handlers/__init__.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/handlers/_helpers.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/handlers/_monitored_resources.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/handlers/app_engine.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/handlers/container_engine.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/handlers/handlers.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/handlers/middleware/__init__.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/handlers/middleware/request.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/handlers/structured_log.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/handlers/transports/__init__.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/handlers/transports/background_thread.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/handlers/transports/base.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/handlers/transports/sync.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/logger.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/metric.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/py.typed +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/resource.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/services/__init__.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/services/config_service_v2/__init__.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/services/config_service_v2/pagers.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/services/config_service_v2/transports/__init__.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/services/logging_service_v2/__init__.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/services/logging_service_v2/pagers.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/services/logging_service_v2/transports/__init__.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/services/metrics_service_v2/__init__.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/services/metrics_service_v2/pagers.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/services/metrics_service_v2/transports/__init__.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/sink.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/types/__init__.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/types/log_entry.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/types/logging.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/types/logging_config.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/types/logging_metrics.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google_cloud_logging.egg-info/SOURCES.txt +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google_cloud_logging.egg-info/dependency_links.txt +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google_cloud_logging.egg-info/not-zip-safe +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/google_cloud_logging.egg-info/top_level.txt +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/setup.cfg +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/tests/__init__.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/tests/system/gapic/v2/test_system_logging_service_v2_v2.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/tests/system/test_system.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/tests/unit/__init__.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/tests/unit/gapic/__init__.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/tests/unit/gapic/logging_v2/__init__.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/tests/unit/handlers/__init__.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/tests/unit/handlers/middleware/test_request.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/tests/unit/handlers/test__helpers.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/tests/unit/handlers/test__monitored_resources.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/tests/unit/handlers/test_container_engine.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/tests/unit/handlers/test_handlers.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/tests/unit/handlers/test_structured_log.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/tests/unit/handlers/transports/__init__.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/tests/unit/handlers/transports/test_background_thread.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/tests/unit/handlers/transports/test_base.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/tests/unit/handlers/transports/test_sync.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/tests/unit/test__gapic.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/tests/unit/test__helpers.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/tests/unit/test__http.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/tests/unit/test__instrumentation.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/tests/unit/test_client.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/tests/unit/test_entries.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/tests/unit/test_logger.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/tests/unit/test_logging_shim.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/tests/unit/test_metric.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/tests/unit/test_packaging.py +0 -0
- {google_cloud_logging-3.14.0 → google_cloud_logging-3.15.0}/tests/unit/test_sink.py +0 -0
{google_cloud_logging-3.14.0/google_cloud_logging.egg-info → google_cloud_logging-3.15.0}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: google-cloud-logging
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.15.0
|
|
4
4
|
Summary: Google Cloud Logging API client library
|
|
5
5
|
Home-page: https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-logging
|
|
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,9 +20,9 @@ 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: google-cloud-appengine-logging<2.0.0,>=0.1.3
|
|
30
28
|
Requires-Dist: google-cloud-audit-log<1.0.0,>=0.3.1
|
|
@@ -35,7 +33,7 @@ Requires-Dist: grpcio<2.0.0,>=1.33.2
|
|
|
35
33
|
Requires-Dist: grpcio<2.0.0,>=1.75.1; python_version >= "3.14"
|
|
36
34
|
Requires-Dist: proto-plus<2.0.0,>=1.22.3
|
|
37
35
|
Requires-Dist: proto-plus<2.0.0,>=1.25.0; python_version >= "3.13"
|
|
38
|
-
Requires-Dist: protobuf
|
|
36
|
+
Requires-Dist: protobuf<8.0.0,>=4.25.8
|
|
39
37
|
Dynamic: author
|
|
40
38
|
Dynamic: author-email
|
|
41
39
|
Dynamic: classifier
|
|
@@ -118,14 +116,14 @@ Supported Python Versions
|
|
|
118
116
|
Our client libraries are compatible with all current `active`_ and `maintenance`_ versions of
|
|
119
117
|
Python.
|
|
120
118
|
|
|
121
|
-
Python >= 3.
|
|
119
|
+
Python >= 3.9, including 3.14
|
|
122
120
|
|
|
123
121
|
.. _active: https://devguide.python.org/devcycle/#in-development-main-branch
|
|
124
122
|
.. _maintenance: https://devguide.python.org/devcycle/#maintenance-branches
|
|
125
123
|
|
|
126
124
|
Unsupported Python Versions
|
|
127
125
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
128
|
-
Python <= 3.
|
|
126
|
+
Python <= 3.8
|
|
129
127
|
|
|
130
128
|
If you are using an `end-of-life`_
|
|
131
129
|
version of Python, we recommend that you update as soon as possible to an actively supported version.
|
|
@@ -68,14 +68,14 @@ Supported Python Versions
|
|
|
68
68
|
Our client libraries are compatible with all current `active`_ and `maintenance`_ versions of
|
|
69
69
|
Python.
|
|
70
70
|
|
|
71
|
-
Python >= 3.
|
|
71
|
+
Python >= 3.9, including 3.14
|
|
72
72
|
|
|
73
73
|
.. _active: https://devguide.python.org/devcycle/#in-development-main-branch
|
|
74
74
|
.. _maintenance: https://devguide.python.org/devcycle/#maintenance-branches
|
|
75
75
|
|
|
76
76
|
Unsupported Python Versions
|
|
77
77
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
78
|
-
Python <= 3.
|
|
78
|
+
Python <= 3.8
|
|
79
79
|
|
|
80
80
|
If you are using an `end-of-life`_
|
|
81
81
|
version of Python, we recommend that you update as soon as possible to an actively supported version.
|
|
@@ -209,7 +209,7 @@ class ConfigServiceV2AsyncClient:
|
|
|
209
209
|
return self._client.transport
|
|
210
210
|
|
|
211
211
|
@property
|
|
212
|
-
def api_endpoint(self):
|
|
212
|
+
def api_endpoint(self) -> str:
|
|
213
213
|
"""Return the API endpoint used by the client instance.
|
|
214
214
|
|
|
215
215
|
Returns:
|
|
@@ -4058,7 +4058,7 @@ class ConfigServiceV2AsyncClient:
|
|
|
4058
4058
|
|
|
4059
4059
|
async def list_operations(
|
|
4060
4060
|
self,
|
|
4061
|
-
request: Optional[operations_pb2.ListOperationsRequest] = None,
|
|
4061
|
+
request: Optional[Union[operations_pb2.ListOperationsRequest, dict]] = None,
|
|
4062
4062
|
*,
|
|
4063
4063
|
retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
|
4064
4064
|
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
|
|
@@ -4084,8 +4084,12 @@ class ConfigServiceV2AsyncClient:
|
|
|
4084
4084
|
# Create or coerce a protobuf request object.
|
|
4085
4085
|
# The request isn't a proto-plus wrapped type,
|
|
4086
4086
|
# so it must be constructed via keyword expansion.
|
|
4087
|
-
if
|
|
4088
|
-
|
|
4087
|
+
if request is None:
|
|
4088
|
+
request_pb = operations_pb2.ListOperationsRequest()
|
|
4089
|
+
elif isinstance(request, dict):
|
|
4090
|
+
request_pb = operations_pb2.ListOperationsRequest(**request)
|
|
4091
|
+
else:
|
|
4092
|
+
request_pb = request
|
|
4089
4093
|
|
|
4090
4094
|
# Wrap the RPC method; this adds retry and timeout information,
|
|
4091
4095
|
# and friendly error handling.
|
|
@@ -4094,7 +4098,7 @@ class ConfigServiceV2AsyncClient:
|
|
|
4094
4098
|
# Certain fields should be provided within the metadata header;
|
|
4095
4099
|
# add these here.
|
|
4096
4100
|
metadata = tuple(metadata) + (
|
|
4097
|
-
gapic_v1.routing_header.to_grpc_metadata((("name",
|
|
4101
|
+
gapic_v1.routing_header.to_grpc_metadata((("name", request_pb.name),)),
|
|
4098
4102
|
)
|
|
4099
4103
|
|
|
4100
4104
|
# Validate the universe domain.
|
|
@@ -4102,7 +4106,7 @@ class ConfigServiceV2AsyncClient:
|
|
|
4102
4106
|
|
|
4103
4107
|
# Send the request.
|
|
4104
4108
|
response = await rpc(
|
|
4105
|
-
|
|
4109
|
+
request_pb,
|
|
4106
4110
|
retry=retry,
|
|
4107
4111
|
timeout=timeout,
|
|
4108
4112
|
metadata=metadata,
|
|
@@ -4113,7 +4117,7 @@ class ConfigServiceV2AsyncClient:
|
|
|
4113
4117
|
|
|
4114
4118
|
async def get_operation(
|
|
4115
4119
|
self,
|
|
4116
|
-
request: Optional[operations_pb2.GetOperationRequest] = None,
|
|
4120
|
+
request: Optional[Union[operations_pb2.GetOperationRequest, dict]] = None,
|
|
4117
4121
|
*,
|
|
4118
4122
|
retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
|
4119
4123
|
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
|
|
@@ -4139,8 +4143,12 @@ class ConfigServiceV2AsyncClient:
|
|
|
4139
4143
|
# Create or coerce a protobuf request object.
|
|
4140
4144
|
# The request isn't a proto-plus wrapped type,
|
|
4141
4145
|
# so it must be constructed via keyword expansion.
|
|
4142
|
-
if
|
|
4143
|
-
|
|
4146
|
+
if request is None:
|
|
4147
|
+
request_pb = operations_pb2.GetOperationRequest()
|
|
4148
|
+
elif isinstance(request, dict):
|
|
4149
|
+
request_pb = operations_pb2.GetOperationRequest(**request)
|
|
4150
|
+
else:
|
|
4151
|
+
request_pb = request
|
|
4144
4152
|
|
|
4145
4153
|
# Wrap the RPC method; this adds retry and timeout information,
|
|
4146
4154
|
# and friendly error handling.
|
|
@@ -4149,7 +4157,7 @@ class ConfigServiceV2AsyncClient:
|
|
|
4149
4157
|
# Certain fields should be provided within the metadata header;
|
|
4150
4158
|
# add these here.
|
|
4151
4159
|
metadata = tuple(metadata) + (
|
|
4152
|
-
gapic_v1.routing_header.to_grpc_metadata((("name",
|
|
4160
|
+
gapic_v1.routing_header.to_grpc_metadata((("name", request_pb.name),)),
|
|
4153
4161
|
)
|
|
4154
4162
|
|
|
4155
4163
|
# Validate the universe domain.
|
|
@@ -4157,7 +4165,7 @@ class ConfigServiceV2AsyncClient:
|
|
|
4157
4165
|
|
|
4158
4166
|
# Send the request.
|
|
4159
4167
|
response = await rpc(
|
|
4160
|
-
|
|
4168
|
+
request_pb,
|
|
4161
4169
|
retry=retry,
|
|
4162
4170
|
timeout=timeout,
|
|
4163
4171
|
metadata=metadata,
|
|
@@ -4168,7 +4176,7 @@ class ConfigServiceV2AsyncClient:
|
|
|
4168
4176
|
|
|
4169
4177
|
async def cancel_operation(
|
|
4170
4178
|
self,
|
|
4171
|
-
request: Optional[operations_pb2.CancelOperationRequest] = None,
|
|
4179
|
+
request: Optional[Union[operations_pb2.CancelOperationRequest, dict]] = None,
|
|
4172
4180
|
*,
|
|
4173
4181
|
retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
|
4174
4182
|
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
|
|
@@ -4197,8 +4205,12 @@ class ConfigServiceV2AsyncClient:
|
|
|
4197
4205
|
# Create or coerce a protobuf request object.
|
|
4198
4206
|
# The request isn't a proto-plus wrapped type,
|
|
4199
4207
|
# so it must be constructed via keyword expansion.
|
|
4200
|
-
if
|
|
4201
|
-
|
|
4208
|
+
if request is None:
|
|
4209
|
+
request_pb = operations_pb2.CancelOperationRequest()
|
|
4210
|
+
elif isinstance(request, dict):
|
|
4211
|
+
request_pb = operations_pb2.CancelOperationRequest(**request)
|
|
4212
|
+
else:
|
|
4213
|
+
request_pb = request
|
|
4202
4214
|
|
|
4203
4215
|
# Wrap the RPC method; this adds retry and timeout information,
|
|
4204
4216
|
# and friendly error handling.
|
|
@@ -4207,7 +4219,7 @@ class ConfigServiceV2AsyncClient:
|
|
|
4207
4219
|
# Certain fields should be provided within the metadata header;
|
|
4208
4220
|
# add these here.
|
|
4209
4221
|
metadata = tuple(metadata) + (
|
|
4210
|
-
gapic_v1.routing_header.to_grpc_metadata((("name",
|
|
4222
|
+
gapic_v1.routing_header.to_grpc_metadata((("name", request_pb.name),)),
|
|
4211
4223
|
)
|
|
4212
4224
|
|
|
4213
4225
|
# Validate the universe domain.
|
|
@@ -4215,7 +4227,7 @@ class ConfigServiceV2AsyncClient:
|
|
|
4215
4227
|
|
|
4216
4228
|
# Send the request.
|
|
4217
4229
|
await rpc(
|
|
4218
|
-
|
|
4230
|
+
request_pb,
|
|
4219
4231
|
retry=retry,
|
|
4220
4232
|
timeout=timeout,
|
|
4221
4233
|
metadata=metadata,
|
|
@@ -115,7 +115,7 @@ class ConfigServiceV2Client(metaclass=ConfigServiceV2ClientMeta):
|
|
|
115
115
|
"""Service for configuring sinks used to route log entries."""
|
|
116
116
|
|
|
117
117
|
@staticmethod
|
|
118
|
-
def _get_default_mtls_endpoint(api_endpoint):
|
|
118
|
+
def _get_default_mtls_endpoint(api_endpoint) -> Optional[str]:
|
|
119
119
|
"""Converts api endpoint to mTLS endpoint.
|
|
120
120
|
|
|
121
121
|
Convert "*.sandbox.googleapis.com" and "*.googleapis.com" to
|
|
@@ -123,7 +123,7 @@ class ConfigServiceV2Client(metaclass=ConfigServiceV2ClientMeta):
|
|
|
123
123
|
Args:
|
|
124
124
|
api_endpoint (Optional[str]): the api endpoint to convert.
|
|
125
125
|
Returns:
|
|
126
|
-
str: converted mTLS api endpoint.
|
|
126
|
+
Optional[str]: converted mTLS api endpoint.
|
|
127
127
|
"""
|
|
128
128
|
if not api_endpoint:
|
|
129
129
|
return api_endpoint
|
|
@@ -133,6 +133,10 @@ class ConfigServiceV2Client(metaclass=ConfigServiceV2ClientMeta):
|
|
|
133
133
|
)
|
|
134
134
|
|
|
135
135
|
m = mtls_endpoint_re.match(api_endpoint)
|
|
136
|
+
if m is None:
|
|
137
|
+
# Could not parse api_endpoint; return as-is.
|
|
138
|
+
return api_endpoint
|
|
139
|
+
|
|
136
140
|
name, mtls, sandbox, googledomain = m.groups()
|
|
137
141
|
if mtls or not googledomain:
|
|
138
142
|
return api_endpoint
|
|
@@ -552,7 +556,7 @@ class ConfigServiceV2Client(metaclass=ConfigServiceV2ClientMeta):
|
|
|
552
556
|
@staticmethod
|
|
553
557
|
def _get_api_endpoint(
|
|
554
558
|
api_override, client_cert_source, universe_domain, use_mtls_endpoint
|
|
555
|
-
):
|
|
559
|
+
) -> str:
|
|
556
560
|
"""Return the API endpoint used by the client.
|
|
557
561
|
|
|
558
562
|
Args:
|
|
@@ -649,7 +653,7 @@ class ConfigServiceV2Client(metaclass=ConfigServiceV2ClientMeta):
|
|
|
649
653
|
error._details.append(json.dumps(cred_info))
|
|
650
654
|
|
|
651
655
|
@property
|
|
652
|
-
def api_endpoint(self):
|
|
656
|
+
def api_endpoint(self) -> str:
|
|
653
657
|
"""Return the API endpoint used by the client instance.
|
|
654
658
|
|
|
655
659
|
Returns:
|
|
@@ -747,7 +751,7 @@ class ConfigServiceV2Client(metaclass=ConfigServiceV2ClientMeta):
|
|
|
747
751
|
self._universe_domain = ConfigServiceV2Client._get_universe_domain(
|
|
748
752
|
universe_domain_opt, self._universe_domain_env
|
|
749
753
|
)
|
|
750
|
-
self._api_endpoint =
|
|
754
|
+
self._api_endpoint: str = "" # updated below, depending on `transport`
|
|
751
755
|
|
|
752
756
|
# Initialize the universe domain validation.
|
|
753
757
|
self._is_universe_domain_valid = False
|
|
@@ -4519,7 +4523,7 @@ class ConfigServiceV2Client(metaclass=ConfigServiceV2ClientMeta):
|
|
|
4519
4523
|
|
|
4520
4524
|
def list_operations(
|
|
4521
4525
|
self,
|
|
4522
|
-
request: Optional[operations_pb2.ListOperationsRequest] = None,
|
|
4526
|
+
request: Optional[Union[operations_pb2.ListOperationsRequest, dict]] = None,
|
|
4523
4527
|
*,
|
|
4524
4528
|
retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
|
4525
4529
|
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
|
|
@@ -4545,8 +4549,12 @@ class ConfigServiceV2Client(metaclass=ConfigServiceV2ClientMeta):
|
|
|
4545
4549
|
# Create or coerce a protobuf request object.
|
|
4546
4550
|
# The request isn't a proto-plus wrapped type,
|
|
4547
4551
|
# so it must be constructed via keyword expansion.
|
|
4548
|
-
if
|
|
4549
|
-
|
|
4552
|
+
if request is None:
|
|
4553
|
+
request_pb = operations_pb2.ListOperationsRequest()
|
|
4554
|
+
elif isinstance(request, dict):
|
|
4555
|
+
request_pb = operations_pb2.ListOperationsRequest(**request)
|
|
4556
|
+
else:
|
|
4557
|
+
request_pb = request
|
|
4550
4558
|
|
|
4551
4559
|
# Wrap the RPC method; this adds retry and timeout information,
|
|
4552
4560
|
# and friendly error handling.
|
|
@@ -4555,7 +4563,7 @@ class ConfigServiceV2Client(metaclass=ConfigServiceV2ClientMeta):
|
|
|
4555
4563
|
# Certain fields should be provided within the metadata header;
|
|
4556
4564
|
# add these here.
|
|
4557
4565
|
metadata = tuple(metadata) + (
|
|
4558
|
-
gapic_v1.routing_header.to_grpc_metadata((("name",
|
|
4566
|
+
gapic_v1.routing_header.to_grpc_metadata((("name", request_pb.name),)),
|
|
4559
4567
|
)
|
|
4560
4568
|
|
|
4561
4569
|
# Validate the universe domain.
|
|
@@ -4564,7 +4572,7 @@ class ConfigServiceV2Client(metaclass=ConfigServiceV2ClientMeta):
|
|
|
4564
4572
|
try:
|
|
4565
4573
|
# Send the request.
|
|
4566
4574
|
response = rpc(
|
|
4567
|
-
|
|
4575
|
+
request_pb,
|
|
4568
4576
|
retry=retry,
|
|
4569
4577
|
timeout=timeout,
|
|
4570
4578
|
metadata=metadata,
|
|
@@ -4578,7 +4586,7 @@ class ConfigServiceV2Client(metaclass=ConfigServiceV2ClientMeta):
|
|
|
4578
4586
|
|
|
4579
4587
|
def get_operation(
|
|
4580
4588
|
self,
|
|
4581
|
-
request: Optional[operations_pb2.GetOperationRequest] = None,
|
|
4589
|
+
request: Optional[Union[operations_pb2.GetOperationRequest, dict]] = None,
|
|
4582
4590
|
*,
|
|
4583
4591
|
retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
|
4584
4592
|
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
|
|
@@ -4604,8 +4612,12 @@ class ConfigServiceV2Client(metaclass=ConfigServiceV2ClientMeta):
|
|
|
4604
4612
|
# Create or coerce a protobuf request object.
|
|
4605
4613
|
# The request isn't a proto-plus wrapped type,
|
|
4606
4614
|
# so it must be constructed via keyword expansion.
|
|
4607
|
-
if
|
|
4608
|
-
|
|
4615
|
+
if request is None:
|
|
4616
|
+
request_pb = operations_pb2.GetOperationRequest()
|
|
4617
|
+
elif isinstance(request, dict):
|
|
4618
|
+
request_pb = operations_pb2.GetOperationRequest(**request)
|
|
4619
|
+
else:
|
|
4620
|
+
request_pb = request
|
|
4609
4621
|
|
|
4610
4622
|
# Wrap the RPC method; this adds retry and timeout information,
|
|
4611
4623
|
# and friendly error handling.
|
|
@@ -4614,7 +4626,7 @@ class ConfigServiceV2Client(metaclass=ConfigServiceV2ClientMeta):
|
|
|
4614
4626
|
# Certain fields should be provided within the metadata header;
|
|
4615
4627
|
# add these here.
|
|
4616
4628
|
metadata = tuple(metadata) + (
|
|
4617
|
-
gapic_v1.routing_header.to_grpc_metadata((("name",
|
|
4629
|
+
gapic_v1.routing_header.to_grpc_metadata((("name", request_pb.name),)),
|
|
4618
4630
|
)
|
|
4619
4631
|
|
|
4620
4632
|
# Validate the universe domain.
|
|
@@ -4623,7 +4635,7 @@ class ConfigServiceV2Client(metaclass=ConfigServiceV2ClientMeta):
|
|
|
4623
4635
|
try:
|
|
4624
4636
|
# Send the request.
|
|
4625
4637
|
response = rpc(
|
|
4626
|
-
|
|
4638
|
+
request_pb,
|
|
4627
4639
|
retry=retry,
|
|
4628
4640
|
timeout=timeout,
|
|
4629
4641
|
metadata=metadata,
|
|
@@ -4637,7 +4649,7 @@ class ConfigServiceV2Client(metaclass=ConfigServiceV2ClientMeta):
|
|
|
4637
4649
|
|
|
4638
4650
|
def cancel_operation(
|
|
4639
4651
|
self,
|
|
4640
|
-
request: Optional[operations_pb2.CancelOperationRequest] = None,
|
|
4652
|
+
request: Optional[Union[operations_pb2.CancelOperationRequest, dict]] = None,
|
|
4641
4653
|
*,
|
|
4642
4654
|
retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
|
4643
4655
|
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
|
|
@@ -4666,8 +4678,12 @@ class ConfigServiceV2Client(metaclass=ConfigServiceV2ClientMeta):
|
|
|
4666
4678
|
# Create or coerce a protobuf request object.
|
|
4667
4679
|
# The request isn't a proto-plus wrapped type,
|
|
4668
4680
|
# so it must be constructed via keyword expansion.
|
|
4669
|
-
if
|
|
4670
|
-
|
|
4681
|
+
if request is None:
|
|
4682
|
+
request_pb = operations_pb2.CancelOperationRequest()
|
|
4683
|
+
elif isinstance(request, dict):
|
|
4684
|
+
request_pb = operations_pb2.CancelOperationRequest(**request)
|
|
4685
|
+
else:
|
|
4686
|
+
request_pb = request
|
|
4671
4687
|
|
|
4672
4688
|
# Wrap the RPC method; this adds retry and timeout information,
|
|
4673
4689
|
# and friendly error handling.
|
|
@@ -4676,7 +4692,7 @@ class ConfigServiceV2Client(metaclass=ConfigServiceV2ClientMeta):
|
|
|
4676
4692
|
# Certain fields should be provided within the metadata header;
|
|
4677
4693
|
# add these here.
|
|
4678
4694
|
metadata = tuple(metadata) + (
|
|
4679
|
-
gapic_v1.routing_header.to_grpc_metadata((("name",
|
|
4695
|
+
gapic_v1.routing_header.to_grpc_metadata((("name", request_pb.name),)),
|
|
4680
4696
|
)
|
|
4681
4697
|
|
|
4682
4698
|
# Validate the universe domain.
|
|
@@ -4684,7 +4700,7 @@ class ConfigServiceV2Client(metaclass=ConfigServiceV2ClientMeta):
|
|
|
4684
4700
|
|
|
4685
4701
|
# Send the request.
|
|
4686
4702
|
rpc(
|
|
4687
|
-
|
|
4703
|
+
request_pb,
|
|
4688
4704
|
retry=retry,
|
|
4689
4705
|
timeout=timeout,
|
|
4690
4706
|
metadata=metadata,
|
|
@@ -87,6 +87,10 @@ class ConfigServiceV2Transport(abc.ABC):
|
|
|
87
87
|
your own client library.
|
|
88
88
|
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
|
|
89
89
|
be used for service account credentials.
|
|
90
|
+
api_audience (Optional[str]): The intended audience for the API calls
|
|
91
|
+
to the service that will be set when using certain 3rd party
|
|
92
|
+
authentication flows. Audience is typically a resource identifier.
|
|
93
|
+
If not set, the host value will be used as a default.
|
|
90
94
|
"""
|
|
91
95
|
|
|
92
96
|
# Save the scopes.
|
|
@@ -136,6 +140,8 @@ class ConfigServiceV2Transport(abc.ABC):
|
|
|
136
140
|
host += ":443"
|
|
137
141
|
self._host = host
|
|
138
142
|
|
|
143
|
+
self._wrapped_methods: Dict[Callable, Callable] = {}
|
|
144
|
+
|
|
139
145
|
@property
|
|
140
146
|
def host(self):
|
|
141
147
|
return self._host
|
|
@@ -56,7 +56,7 @@ class _LoggingClientInterceptor(grpc.UnaryUnaryClientInterceptor): # pragma: NO
|
|
|
56
56
|
elif isinstance(request, google.protobuf.message.Message):
|
|
57
57
|
request_payload = MessageToJson(request)
|
|
58
58
|
else:
|
|
59
|
-
request_payload = f"{type(request).__name__}: {pickle.dumps(request)}"
|
|
59
|
+
request_payload = f"{type(request).__name__}: {pickle.dumps(request)!r}"
|
|
60
60
|
|
|
61
61
|
request_metadata = {
|
|
62
62
|
key: value.decode("utf-8") if isinstance(value, bytes) else value
|
|
@@ -91,7 +91,7 @@ class _LoggingClientInterceptor(grpc.UnaryUnaryClientInterceptor): # pragma: NO
|
|
|
91
91
|
elif isinstance(result, google.protobuf.message.Message):
|
|
92
92
|
response_payload = MessageToJson(result)
|
|
93
93
|
else:
|
|
94
|
-
response_payload = f"{type(result).__name__}: {pickle.dumps(result)}"
|
|
94
|
+
response_payload = f"{type(result).__name__}: {pickle.dumps(result)!r}"
|
|
95
95
|
grpc_response = {
|
|
96
96
|
"payload": response_payload,
|
|
97
97
|
"metadata": metadata,
|
|
@@ -186,6 +186,10 @@ class ConfigServiceV2GrpcTransport(ConfigServiceV2Transport):
|
|
|
186
186
|
your own client library.
|
|
187
187
|
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
|
|
188
188
|
be used for service account credentials.
|
|
189
|
+
api_audience (Optional[str]): The intended audience for the API calls
|
|
190
|
+
to the service that will be set when using certain 3rd party
|
|
191
|
+
authentication flows. Audience is typically a resource identifier.
|
|
192
|
+
If not set, the host value will be used as a default.
|
|
189
193
|
|
|
190
194
|
Raises:
|
|
191
195
|
google.auth.exceptions.MutualTLSChannelError: If mutual TLS transport
|
|
@@ -62,7 +62,7 @@ class _LoggingClientAIOInterceptor(
|
|
|
62
62
|
elif isinstance(request, google.protobuf.message.Message):
|
|
63
63
|
request_payload = MessageToJson(request)
|
|
64
64
|
else:
|
|
65
|
-
request_payload = f"{type(request).__name__}: {pickle.dumps(request)}"
|
|
65
|
+
request_payload = f"{type(request).__name__}: {pickle.dumps(request)!r}"
|
|
66
66
|
|
|
67
67
|
request_metadata = {
|
|
68
68
|
key: value.decode("utf-8") if isinstance(value, bytes) else value
|
|
@@ -97,7 +97,7 @@ class _LoggingClientAIOInterceptor(
|
|
|
97
97
|
elif isinstance(result, google.protobuf.message.Message):
|
|
98
98
|
response_payload = MessageToJson(result)
|
|
99
99
|
else:
|
|
100
|
-
response_payload = f"{type(result).__name__}: {pickle.dumps(result)}"
|
|
100
|
+
response_payload = f"{type(result).__name__}: {pickle.dumps(result)!r}"
|
|
101
101
|
grpc_response = {
|
|
102
102
|
"payload": response_payload,
|
|
103
103
|
"metadata": metadata,
|
|
@@ -237,6 +237,10 @@ class ConfigServiceV2GrpcAsyncIOTransport(ConfigServiceV2Transport):
|
|
|
237
237
|
your own client library.
|
|
238
238
|
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
|
|
239
239
|
be used for service account credentials.
|
|
240
|
+
api_audience (Optional[str]): The intended audience for the API calls
|
|
241
|
+
to the service that will be set when using certain 3rd party
|
|
242
|
+
authentication flows. Audience is typically a resource identifier.
|
|
243
|
+
If not set, the host value will be used as a default.
|
|
240
244
|
|
|
241
245
|
Raises:
|
|
242
246
|
google.auth.exceptions.MutualTlsChannelError: If mutual TLS transport
|
|
@@ -192,7 +192,7 @@ class LoggingServiceV2AsyncClient:
|
|
|
192
192
|
return self._client.transport
|
|
193
193
|
|
|
194
194
|
@property
|
|
195
|
-
def api_endpoint(self):
|
|
195
|
+
def api_endpoint(self) -> str:
|
|
196
196
|
"""Return the API endpoint used by the client instance.
|
|
197
197
|
|
|
198
198
|
Returns:
|
|
@@ -1097,7 +1097,7 @@ class LoggingServiceV2AsyncClient:
|
|
|
1097
1097
|
|
|
1098
1098
|
async def list_operations(
|
|
1099
1099
|
self,
|
|
1100
|
-
request: Optional[operations_pb2.ListOperationsRequest] = None,
|
|
1100
|
+
request: Optional[Union[operations_pb2.ListOperationsRequest, dict]] = None,
|
|
1101
1101
|
*,
|
|
1102
1102
|
retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
|
1103
1103
|
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
|
|
@@ -1123,8 +1123,12 @@ class LoggingServiceV2AsyncClient:
|
|
|
1123
1123
|
# Create or coerce a protobuf request object.
|
|
1124
1124
|
# The request isn't a proto-plus wrapped type,
|
|
1125
1125
|
# so it must be constructed via keyword expansion.
|
|
1126
|
-
if
|
|
1127
|
-
|
|
1126
|
+
if request is None:
|
|
1127
|
+
request_pb = operations_pb2.ListOperationsRequest()
|
|
1128
|
+
elif isinstance(request, dict):
|
|
1129
|
+
request_pb = operations_pb2.ListOperationsRequest(**request)
|
|
1130
|
+
else:
|
|
1131
|
+
request_pb = request
|
|
1128
1132
|
|
|
1129
1133
|
# Wrap the RPC method; this adds retry and timeout information,
|
|
1130
1134
|
# and friendly error handling.
|
|
@@ -1133,7 +1137,7 @@ class LoggingServiceV2AsyncClient:
|
|
|
1133
1137
|
# Certain fields should be provided within the metadata header;
|
|
1134
1138
|
# add these here.
|
|
1135
1139
|
metadata = tuple(metadata) + (
|
|
1136
|
-
gapic_v1.routing_header.to_grpc_metadata((("name",
|
|
1140
|
+
gapic_v1.routing_header.to_grpc_metadata((("name", request_pb.name),)),
|
|
1137
1141
|
)
|
|
1138
1142
|
|
|
1139
1143
|
# Validate the universe domain.
|
|
@@ -1141,7 +1145,7 @@ class LoggingServiceV2AsyncClient:
|
|
|
1141
1145
|
|
|
1142
1146
|
# Send the request.
|
|
1143
1147
|
response = await rpc(
|
|
1144
|
-
|
|
1148
|
+
request_pb,
|
|
1145
1149
|
retry=retry,
|
|
1146
1150
|
timeout=timeout,
|
|
1147
1151
|
metadata=metadata,
|
|
@@ -1152,7 +1156,7 @@ class LoggingServiceV2AsyncClient:
|
|
|
1152
1156
|
|
|
1153
1157
|
async def get_operation(
|
|
1154
1158
|
self,
|
|
1155
|
-
request: Optional[operations_pb2.GetOperationRequest] = None,
|
|
1159
|
+
request: Optional[Union[operations_pb2.GetOperationRequest, dict]] = None,
|
|
1156
1160
|
*,
|
|
1157
1161
|
retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
|
1158
1162
|
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
|
|
@@ -1178,8 +1182,12 @@ class LoggingServiceV2AsyncClient:
|
|
|
1178
1182
|
# Create or coerce a protobuf request object.
|
|
1179
1183
|
# The request isn't a proto-plus wrapped type,
|
|
1180
1184
|
# so it must be constructed via keyword expansion.
|
|
1181
|
-
if
|
|
1182
|
-
|
|
1185
|
+
if request is None:
|
|
1186
|
+
request_pb = operations_pb2.GetOperationRequest()
|
|
1187
|
+
elif isinstance(request, dict):
|
|
1188
|
+
request_pb = operations_pb2.GetOperationRequest(**request)
|
|
1189
|
+
else:
|
|
1190
|
+
request_pb = request
|
|
1183
1191
|
|
|
1184
1192
|
# Wrap the RPC method; this adds retry and timeout information,
|
|
1185
1193
|
# and friendly error handling.
|
|
@@ -1188,7 +1196,7 @@ class LoggingServiceV2AsyncClient:
|
|
|
1188
1196
|
# Certain fields should be provided within the metadata header;
|
|
1189
1197
|
# add these here.
|
|
1190
1198
|
metadata = tuple(metadata) + (
|
|
1191
|
-
gapic_v1.routing_header.to_grpc_metadata((("name",
|
|
1199
|
+
gapic_v1.routing_header.to_grpc_metadata((("name", request_pb.name),)),
|
|
1192
1200
|
)
|
|
1193
1201
|
|
|
1194
1202
|
# Validate the universe domain.
|
|
@@ -1196,7 +1204,7 @@ class LoggingServiceV2AsyncClient:
|
|
|
1196
1204
|
|
|
1197
1205
|
# Send the request.
|
|
1198
1206
|
response = await rpc(
|
|
1199
|
-
|
|
1207
|
+
request_pb,
|
|
1200
1208
|
retry=retry,
|
|
1201
1209
|
timeout=timeout,
|
|
1202
1210
|
metadata=metadata,
|
|
@@ -1207,7 +1215,7 @@ class LoggingServiceV2AsyncClient:
|
|
|
1207
1215
|
|
|
1208
1216
|
async def cancel_operation(
|
|
1209
1217
|
self,
|
|
1210
|
-
request: Optional[operations_pb2.CancelOperationRequest] = None,
|
|
1218
|
+
request: Optional[Union[operations_pb2.CancelOperationRequest, dict]] = None,
|
|
1211
1219
|
*,
|
|
1212
1220
|
retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
|
1213
1221
|
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
|
|
@@ -1236,8 +1244,12 @@ class LoggingServiceV2AsyncClient:
|
|
|
1236
1244
|
# Create or coerce a protobuf request object.
|
|
1237
1245
|
# The request isn't a proto-plus wrapped type,
|
|
1238
1246
|
# so it must be constructed via keyword expansion.
|
|
1239
|
-
if
|
|
1240
|
-
|
|
1247
|
+
if request is None:
|
|
1248
|
+
request_pb = operations_pb2.CancelOperationRequest()
|
|
1249
|
+
elif isinstance(request, dict):
|
|
1250
|
+
request_pb = operations_pb2.CancelOperationRequest(**request)
|
|
1251
|
+
else:
|
|
1252
|
+
request_pb = request
|
|
1241
1253
|
|
|
1242
1254
|
# Wrap the RPC method; this adds retry and timeout information,
|
|
1243
1255
|
# and friendly error handling.
|
|
@@ -1246,7 +1258,7 @@ class LoggingServiceV2AsyncClient:
|
|
|
1246
1258
|
# Certain fields should be provided within the metadata header;
|
|
1247
1259
|
# add these here.
|
|
1248
1260
|
metadata = tuple(metadata) + (
|
|
1249
|
-
gapic_v1.routing_header.to_grpc_metadata((("name",
|
|
1261
|
+
gapic_v1.routing_header.to_grpc_metadata((("name", request_pb.name),)),
|
|
1250
1262
|
)
|
|
1251
1263
|
|
|
1252
1264
|
# Validate the universe domain.
|
|
@@ -1254,7 +1266,7 @@ class LoggingServiceV2AsyncClient:
|
|
|
1254
1266
|
|
|
1255
1267
|
# Send the request.
|
|
1256
1268
|
await rpc(
|
|
1257
|
-
|
|
1269
|
+
request_pb,
|
|
1258
1270
|
retry=retry,
|
|
1259
1271
|
timeout=timeout,
|
|
1260
1272
|
metadata=metadata,
|