google-cloud-logging 3.13.0__py3-none-any.whl

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 (68) hide show
  1. google/cloud/logging/__init__.py +53 -0
  2. google/cloud/logging/gapic_version.py +16 -0
  3. google/cloud/logging/handlers/__init__.py +31 -0
  4. google/cloud/logging/handlers/middleware/__init__.py +17 -0
  5. google/cloud/logging/handlers/transports/__init__.py +28 -0
  6. google/cloud/logging/py.typed +2 -0
  7. google/cloud/logging_v2/__init__.py +61 -0
  8. google/cloud/logging_v2/_gapic.py +647 -0
  9. google/cloud/logging_v2/_helpers.py +152 -0
  10. google/cloud/logging_v2/_http.py +549 -0
  11. google/cloud/logging_v2/_instrumentation.py +92 -0
  12. google/cloud/logging_v2/client.py +429 -0
  13. google/cloud/logging_v2/entries.py +358 -0
  14. google/cloud/logging_v2/gapic_metadata.json +481 -0
  15. google/cloud/logging_v2/gapic_version.py +16 -0
  16. google/cloud/logging_v2/handlers/__init__.py +31 -0
  17. google/cloud/logging_v2/handlers/_helpers.py +283 -0
  18. google/cloud/logging_v2/handlers/_monitored_resources.py +303 -0
  19. google/cloud/logging_v2/handlers/app_engine.py +139 -0
  20. google/cloud/logging_v2/handlers/container_engine.py +62 -0
  21. google/cloud/logging_v2/handlers/handlers.py +340 -0
  22. google/cloud/logging_v2/handlers/middleware/__init__.py +17 -0
  23. google/cloud/logging_v2/handlers/middleware/request.py +52 -0
  24. google/cloud/logging_v2/handlers/structured_log.py +150 -0
  25. google/cloud/logging_v2/handlers/transports/__init__.py +29 -0
  26. google/cloud/logging_v2/handlers/transports/background_thread.py +343 -0
  27. google/cloud/logging_v2/handlers/transports/base.py +61 -0
  28. google/cloud/logging_v2/handlers/transports/sync.py +68 -0
  29. google/cloud/logging_v2/logger.py +541 -0
  30. google/cloud/logging_v2/metric.py +180 -0
  31. google/cloud/logging_v2/py.typed +2 -0
  32. google/cloud/logging_v2/resource.py +51 -0
  33. google/cloud/logging_v2/services/__init__.py +15 -0
  34. google/cloud/logging_v2/services/config_service_v2/__init__.py +22 -0
  35. google/cloud/logging_v2/services/config_service_v2/async_client.py +4232 -0
  36. google/cloud/logging_v2/services/config_service_v2/client.py +4686 -0
  37. google/cloud/logging_v2/services/config_service_v2/pagers.py +820 -0
  38. google/cloud/logging_v2/services/config_service_v2/transports/__init__.py +33 -0
  39. google/cloud/logging_v2/services/config_service_v2/transports/base.py +748 -0
  40. google/cloud/logging_v2/services/config_service_v2/transports/grpc.py +1345 -0
  41. google/cloud/logging_v2/services/config_service_v2/transports/grpc_asyncio.py +1660 -0
  42. google/cloud/logging_v2/services/logging_service_v2/__init__.py +22 -0
  43. google/cloud/logging_v2/services/logging_service_v2/async_client.py +1272 -0
  44. google/cloud/logging_v2/services/logging_service_v2/client.py +1686 -0
  45. google/cloud/logging_v2/services/logging_service_v2/pagers.py +516 -0
  46. google/cloud/logging_v2/services/logging_service_v2/transports/__init__.py +33 -0
  47. google/cloud/logging_v2/services/logging_service_v2/transports/base.py +361 -0
  48. google/cloud/logging_v2/services/logging_service_v2/transports/grpc.py +566 -0
  49. google/cloud/logging_v2/services/logging_service_v2/transports/grpc_asyncio.py +703 -0
  50. google/cloud/logging_v2/services/metrics_service_v2/__init__.py +22 -0
  51. google/cloud/logging_v2/services/metrics_service_v2/async_client.py +1119 -0
  52. google/cloud/logging_v2/services/metrics_service_v2/client.py +1534 -0
  53. google/cloud/logging_v2/services/metrics_service_v2/pagers.py +196 -0
  54. google/cloud/logging_v2/services/metrics_service_v2/transports/__init__.py +33 -0
  55. google/cloud/logging_v2/services/metrics_service_v2/transports/base.py +320 -0
  56. google/cloud/logging_v2/services/metrics_service_v2/transports/grpc.py +520 -0
  57. google/cloud/logging_v2/services/metrics_service_v2/transports/grpc_asyncio.py +629 -0
  58. google/cloud/logging_v2/sink.py +233 -0
  59. google/cloud/logging_v2/types/__init__.py +178 -0
  60. google/cloud/logging_v2/types/log_entry.py +435 -0
  61. google/cloud/logging_v2/types/logging.py +602 -0
  62. google/cloud/logging_v2/types/logging_config.py +2418 -0
  63. google/cloud/logging_v2/types/logging_metrics.py +412 -0
  64. google_cloud_logging-3.13.0.dist-info/METADATA +143 -0
  65. google_cloud_logging-3.13.0.dist-info/RECORD +68 -0
  66. google_cloud_logging-3.13.0.dist-info/WHEEL +5 -0
  67. google_cloud_logging-3.13.0.dist-info/licenses/LICENSE +202 -0
  68. google_cloud_logging-3.13.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,196 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Copyright 2025 Google LLC
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #
16
+ from google.api_core import gapic_v1
17
+ from google.api_core import retry as retries
18
+ from google.api_core import retry_async as retries_async
19
+ from typing import (
20
+ Any,
21
+ AsyncIterator,
22
+ Awaitable,
23
+ Callable,
24
+ Sequence,
25
+ Tuple,
26
+ Optional,
27
+ Iterator,
28
+ Union,
29
+ )
30
+
31
+ try:
32
+ OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault, None]
33
+ OptionalAsyncRetry = Union[
34
+ retries_async.AsyncRetry, gapic_v1.method._MethodDefault, None
35
+ ]
36
+ except AttributeError: # pragma: NO COVER
37
+ OptionalRetry = Union[retries.Retry, object, None] # type: ignore
38
+ OptionalAsyncRetry = Union[retries_async.AsyncRetry, object, None] # type: ignore
39
+
40
+ from google.cloud.logging_v2.types import logging_metrics
41
+
42
+
43
+ class ListLogMetricsPager:
44
+ """A pager for iterating through ``list_log_metrics`` requests.
45
+
46
+ This class thinly wraps an initial
47
+ :class:`google.cloud.logging_v2.types.ListLogMetricsResponse` object, and
48
+ provides an ``__iter__`` method to iterate through its
49
+ ``metrics`` field.
50
+
51
+ If there are more pages, the ``__iter__`` method will make additional
52
+ ``ListLogMetrics`` requests and continue to iterate
53
+ through the ``metrics`` field on the
54
+ corresponding responses.
55
+
56
+ All the usual :class:`google.cloud.logging_v2.types.ListLogMetricsResponse`
57
+ attributes are available on the pager. If multiple requests are made, only
58
+ the most recent response is retained, and thus used for attribute lookup.
59
+ """
60
+
61
+ def __init__(
62
+ self,
63
+ method: Callable[..., logging_metrics.ListLogMetricsResponse],
64
+ request: logging_metrics.ListLogMetricsRequest,
65
+ response: logging_metrics.ListLogMetricsResponse,
66
+ *,
67
+ retry: OptionalRetry = gapic_v1.method.DEFAULT,
68
+ timeout: Union[float, object] = gapic_v1.method.DEFAULT,
69
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()
70
+ ):
71
+ """Instantiate the pager.
72
+
73
+ Args:
74
+ method (Callable): The method that was originally called, and
75
+ which instantiated this pager.
76
+ request (google.cloud.logging_v2.types.ListLogMetricsRequest):
77
+ The initial request object.
78
+ response (google.cloud.logging_v2.types.ListLogMetricsResponse):
79
+ The initial response object.
80
+ retry (google.api_core.retry.Retry): Designation of what errors,
81
+ if any, should be retried.
82
+ timeout (float): The timeout for this request.
83
+ metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
84
+ sent along with the request as metadata. Normally, each value must be of type `str`,
85
+ but for metadata keys ending with the suffix `-bin`, the corresponding values must
86
+ be of type `bytes`.
87
+ """
88
+ self._method = method
89
+ self._request = logging_metrics.ListLogMetricsRequest(request)
90
+ self._response = response
91
+ self._retry = retry
92
+ self._timeout = timeout
93
+ self._metadata = metadata
94
+
95
+ def __getattr__(self, name: str) -> Any:
96
+ return getattr(self._response, name)
97
+
98
+ @property
99
+ def pages(self) -> Iterator[logging_metrics.ListLogMetricsResponse]:
100
+ yield self._response
101
+ while self._response.next_page_token:
102
+ self._request.page_token = self._response.next_page_token
103
+ self._response = self._method(
104
+ self._request,
105
+ retry=self._retry,
106
+ timeout=self._timeout,
107
+ metadata=self._metadata,
108
+ )
109
+ yield self._response
110
+
111
+ def __iter__(self) -> Iterator[logging_metrics.LogMetric]:
112
+ for page in self.pages:
113
+ yield from page.metrics
114
+
115
+ def __repr__(self) -> str:
116
+ return "{0}<{1!r}>".format(self.__class__.__name__, self._response)
117
+
118
+
119
+ class ListLogMetricsAsyncPager:
120
+ """A pager for iterating through ``list_log_metrics`` requests.
121
+
122
+ This class thinly wraps an initial
123
+ :class:`google.cloud.logging_v2.types.ListLogMetricsResponse` object, and
124
+ provides an ``__aiter__`` method to iterate through its
125
+ ``metrics`` field.
126
+
127
+ If there are more pages, the ``__aiter__`` method will make additional
128
+ ``ListLogMetrics`` requests and continue to iterate
129
+ through the ``metrics`` field on the
130
+ corresponding responses.
131
+
132
+ All the usual :class:`google.cloud.logging_v2.types.ListLogMetricsResponse`
133
+ attributes are available on the pager. If multiple requests are made, only
134
+ the most recent response is retained, and thus used for attribute lookup.
135
+ """
136
+
137
+ def __init__(
138
+ self,
139
+ method: Callable[..., Awaitable[logging_metrics.ListLogMetricsResponse]],
140
+ request: logging_metrics.ListLogMetricsRequest,
141
+ response: logging_metrics.ListLogMetricsResponse,
142
+ *,
143
+ retry: OptionalAsyncRetry = gapic_v1.method.DEFAULT,
144
+ timeout: Union[float, object] = gapic_v1.method.DEFAULT,
145
+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = ()
146
+ ):
147
+ """Instantiates the pager.
148
+
149
+ Args:
150
+ method (Callable): The method that was originally called, and
151
+ which instantiated this pager.
152
+ request (google.cloud.logging_v2.types.ListLogMetricsRequest):
153
+ The initial request object.
154
+ response (google.cloud.logging_v2.types.ListLogMetricsResponse):
155
+ The initial response object.
156
+ retry (google.api_core.retry.AsyncRetry): Designation of what errors,
157
+ if any, should be retried.
158
+ timeout (float): The timeout for this request.
159
+ metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
160
+ sent along with the request as metadata. Normally, each value must be of type `str`,
161
+ but for metadata keys ending with the suffix `-bin`, the corresponding values must
162
+ be of type `bytes`.
163
+ """
164
+ self._method = method
165
+ self._request = logging_metrics.ListLogMetricsRequest(request)
166
+ self._response = response
167
+ self._retry = retry
168
+ self._timeout = timeout
169
+ self._metadata = metadata
170
+
171
+ def __getattr__(self, name: str) -> Any:
172
+ return getattr(self._response, name)
173
+
174
+ @property
175
+ async def pages(self) -> AsyncIterator[logging_metrics.ListLogMetricsResponse]:
176
+ yield self._response
177
+ while self._response.next_page_token:
178
+ self._request.page_token = self._response.next_page_token
179
+ self._response = await self._method(
180
+ self._request,
181
+ retry=self._retry,
182
+ timeout=self._timeout,
183
+ metadata=self._metadata,
184
+ )
185
+ yield self._response
186
+
187
+ def __aiter__(self) -> AsyncIterator[logging_metrics.LogMetric]:
188
+ async def async_generator():
189
+ async for page in self.pages:
190
+ for response in page.metrics:
191
+ yield response
192
+
193
+ return async_generator()
194
+
195
+ def __repr__(self) -> str:
196
+ return "{0}<{1!r}>".format(self.__class__.__name__, self._response)
@@ -0,0 +1,33 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Copyright 2025 Google LLC
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #
16
+ from collections import OrderedDict
17
+ from typing import Dict, Type
18
+
19
+ from .base import MetricsServiceV2Transport
20
+ from .grpc import MetricsServiceV2GrpcTransport
21
+ from .grpc_asyncio import MetricsServiceV2GrpcAsyncIOTransport
22
+
23
+
24
+ # Compile a registry of transports.
25
+ _transport_registry = OrderedDict() # type: Dict[str, Type[MetricsServiceV2Transport]]
26
+ _transport_registry["grpc"] = MetricsServiceV2GrpcTransport
27
+ _transport_registry["grpc_asyncio"] = MetricsServiceV2GrpcAsyncIOTransport
28
+
29
+ __all__ = (
30
+ "MetricsServiceV2Transport",
31
+ "MetricsServiceV2GrpcTransport",
32
+ "MetricsServiceV2GrpcAsyncIOTransport",
33
+ )
@@ -0,0 +1,320 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Copyright 2025 Google LLC
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #
16
+ import abc
17
+ from typing import Awaitable, Callable, Dict, Optional, Sequence, Union
18
+
19
+ from google.cloud.logging_v2 import gapic_version as package_version
20
+
21
+ import google.auth # type: ignore
22
+ import google.api_core
23
+ from google.api_core import exceptions as core_exceptions
24
+ from google.api_core import gapic_v1
25
+ from google.api_core import retry as retries
26
+ from google.auth import credentials as ga_credentials # type: ignore
27
+ from google.oauth2 import service_account # type: ignore
28
+ import google.protobuf
29
+
30
+ from google.cloud.logging_v2.types import logging_metrics
31
+ from google.longrunning import operations_pb2 # type: ignore
32
+ from google.protobuf import empty_pb2 # type: ignore
33
+
34
+ DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
35
+ gapic_version=package_version.__version__
36
+ )
37
+
38
+ if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER
39
+ DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__
40
+
41
+
42
+ class MetricsServiceV2Transport(abc.ABC):
43
+ """Abstract transport class for MetricsServiceV2."""
44
+
45
+ AUTH_SCOPES = (
46
+ "https://www.googleapis.com/auth/cloud-platform",
47
+ "https://www.googleapis.com/auth/cloud-platform.read-only",
48
+ "https://www.googleapis.com/auth/logging.admin",
49
+ "https://www.googleapis.com/auth/logging.read",
50
+ "https://www.googleapis.com/auth/logging.write",
51
+ )
52
+
53
+ DEFAULT_HOST: str = "logging.googleapis.com"
54
+
55
+ def __init__(
56
+ self,
57
+ *,
58
+ host: str = DEFAULT_HOST,
59
+ credentials: Optional[ga_credentials.Credentials] = None,
60
+ credentials_file: Optional[str] = None,
61
+ scopes: Optional[Sequence[str]] = None,
62
+ quota_project_id: Optional[str] = None,
63
+ client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
64
+ always_use_jwt_access: Optional[bool] = False,
65
+ api_audience: Optional[str] = None,
66
+ **kwargs,
67
+ ) -> None:
68
+ """Instantiate the transport.
69
+
70
+ Args:
71
+ host (Optional[str]):
72
+ The hostname to connect to (default: 'logging.googleapis.com').
73
+ credentials (Optional[google.auth.credentials.Credentials]): The
74
+ authorization credentials to attach to requests. These
75
+ credentials identify the application to the service; if none
76
+ are specified, the client will attempt to ascertain the
77
+ credentials from the environment.
78
+ credentials_file (Optional[str]): Deprecated. A file with credentials that can
79
+ be loaded with :func:`google.auth.load_credentials_from_file`.
80
+ This argument is mutually exclusive with credentials. This argument will be
81
+ removed in the next major version of this library.
82
+ scopes (Optional[Sequence[str]]): A list of scopes.
83
+ quota_project_id (Optional[str]): An optional project to use for billing
84
+ and quota.
85
+ client_info (google.api_core.gapic_v1.client_info.ClientInfo):
86
+ The client info used to send a user-agent string along with
87
+ API requests. If ``None``, then default info will be used.
88
+ Generally, you only need to set this if you're developing
89
+ your own client library.
90
+ always_use_jwt_access (Optional[bool]): Whether self signed JWT should
91
+ be used for service account credentials.
92
+ """
93
+
94
+ scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES}
95
+
96
+ # Save the scopes.
97
+ self._scopes = scopes
98
+ if not hasattr(self, "_ignore_credentials"):
99
+ self._ignore_credentials: bool = False
100
+
101
+ # If no credentials are provided, then determine the appropriate
102
+ # defaults.
103
+ if credentials and credentials_file:
104
+ raise core_exceptions.DuplicateCredentialArgs(
105
+ "'credentials_file' and 'credentials' are mutually exclusive"
106
+ )
107
+
108
+ if credentials_file is not None:
109
+ credentials, _ = google.auth.load_credentials_from_file(
110
+ credentials_file, **scopes_kwargs, quota_project_id=quota_project_id
111
+ )
112
+ elif credentials is None and not self._ignore_credentials:
113
+ credentials, _ = google.auth.default(
114
+ **scopes_kwargs, quota_project_id=quota_project_id
115
+ )
116
+ # Don't apply audience if the credentials file passed from user.
117
+ if hasattr(credentials, "with_gdch_audience"):
118
+ credentials = credentials.with_gdch_audience(
119
+ api_audience if api_audience else host
120
+ )
121
+
122
+ # If the credentials are service account credentials, then always try to use self signed JWT.
123
+ if (
124
+ always_use_jwt_access
125
+ and isinstance(credentials, service_account.Credentials)
126
+ and hasattr(service_account.Credentials, "with_always_use_jwt_access")
127
+ ):
128
+ credentials = credentials.with_always_use_jwt_access(True)
129
+
130
+ # Save the credentials.
131
+ self._credentials = credentials
132
+
133
+ # Save the hostname. Default to port 443 (HTTPS) if none is specified.
134
+ if ":" not in host:
135
+ host += ":443"
136
+ self._host = host
137
+
138
+ @property
139
+ def host(self):
140
+ return self._host
141
+
142
+ def _prep_wrapped_messages(self, client_info):
143
+ # Precompute the wrapped methods.
144
+ self._wrapped_methods = {
145
+ self.list_log_metrics: gapic_v1.method.wrap_method(
146
+ self.list_log_metrics,
147
+ default_retry=retries.Retry(
148
+ initial=0.1,
149
+ maximum=60.0,
150
+ multiplier=1.3,
151
+ predicate=retries.if_exception_type(
152
+ core_exceptions.DeadlineExceeded,
153
+ core_exceptions.InternalServerError,
154
+ core_exceptions.ServiceUnavailable,
155
+ ),
156
+ deadline=60.0,
157
+ ),
158
+ default_timeout=60.0,
159
+ client_info=client_info,
160
+ ),
161
+ self.get_log_metric: gapic_v1.method.wrap_method(
162
+ self.get_log_metric,
163
+ default_retry=retries.Retry(
164
+ initial=0.1,
165
+ maximum=60.0,
166
+ multiplier=1.3,
167
+ predicate=retries.if_exception_type(
168
+ core_exceptions.DeadlineExceeded,
169
+ core_exceptions.InternalServerError,
170
+ core_exceptions.ServiceUnavailable,
171
+ ),
172
+ deadline=60.0,
173
+ ),
174
+ default_timeout=60.0,
175
+ client_info=client_info,
176
+ ),
177
+ self.create_log_metric: gapic_v1.method.wrap_method(
178
+ self.create_log_metric,
179
+ default_timeout=60.0,
180
+ client_info=client_info,
181
+ ),
182
+ self.update_log_metric: gapic_v1.method.wrap_method(
183
+ self.update_log_metric,
184
+ default_retry=retries.Retry(
185
+ initial=0.1,
186
+ maximum=60.0,
187
+ multiplier=1.3,
188
+ predicate=retries.if_exception_type(
189
+ core_exceptions.DeadlineExceeded,
190
+ core_exceptions.InternalServerError,
191
+ core_exceptions.ServiceUnavailable,
192
+ ),
193
+ deadline=60.0,
194
+ ),
195
+ default_timeout=60.0,
196
+ client_info=client_info,
197
+ ),
198
+ self.delete_log_metric: gapic_v1.method.wrap_method(
199
+ self.delete_log_metric,
200
+ default_retry=retries.Retry(
201
+ initial=0.1,
202
+ maximum=60.0,
203
+ multiplier=1.3,
204
+ predicate=retries.if_exception_type(
205
+ core_exceptions.DeadlineExceeded,
206
+ core_exceptions.InternalServerError,
207
+ core_exceptions.ServiceUnavailable,
208
+ ),
209
+ deadline=60.0,
210
+ ),
211
+ default_timeout=60.0,
212
+ client_info=client_info,
213
+ ),
214
+ self.cancel_operation: gapic_v1.method.wrap_method(
215
+ self.cancel_operation,
216
+ default_timeout=None,
217
+ client_info=client_info,
218
+ ),
219
+ self.get_operation: gapic_v1.method.wrap_method(
220
+ self.get_operation,
221
+ default_timeout=None,
222
+ client_info=client_info,
223
+ ),
224
+ self.list_operations: gapic_v1.method.wrap_method(
225
+ self.list_operations,
226
+ default_timeout=None,
227
+ client_info=client_info,
228
+ ),
229
+ }
230
+
231
+ def close(self):
232
+ """Closes resources associated with the transport.
233
+
234
+ .. warning::
235
+ Only call this method if the transport is NOT shared
236
+ with other clients - this may cause errors in other clients!
237
+ """
238
+ raise NotImplementedError()
239
+
240
+ @property
241
+ def list_log_metrics(
242
+ self,
243
+ ) -> Callable[
244
+ [logging_metrics.ListLogMetricsRequest],
245
+ Union[
246
+ logging_metrics.ListLogMetricsResponse,
247
+ Awaitable[logging_metrics.ListLogMetricsResponse],
248
+ ],
249
+ ]:
250
+ raise NotImplementedError()
251
+
252
+ @property
253
+ def get_log_metric(
254
+ self,
255
+ ) -> Callable[
256
+ [logging_metrics.GetLogMetricRequest],
257
+ Union[logging_metrics.LogMetric, Awaitable[logging_metrics.LogMetric]],
258
+ ]:
259
+ raise NotImplementedError()
260
+
261
+ @property
262
+ def create_log_metric(
263
+ self,
264
+ ) -> Callable[
265
+ [logging_metrics.CreateLogMetricRequest],
266
+ Union[logging_metrics.LogMetric, Awaitable[logging_metrics.LogMetric]],
267
+ ]:
268
+ raise NotImplementedError()
269
+
270
+ @property
271
+ def update_log_metric(
272
+ self,
273
+ ) -> Callable[
274
+ [logging_metrics.UpdateLogMetricRequest],
275
+ Union[logging_metrics.LogMetric, Awaitable[logging_metrics.LogMetric]],
276
+ ]:
277
+ raise NotImplementedError()
278
+
279
+ @property
280
+ def delete_log_metric(
281
+ self,
282
+ ) -> Callable[
283
+ [logging_metrics.DeleteLogMetricRequest],
284
+ Union[empty_pb2.Empty, Awaitable[empty_pb2.Empty]],
285
+ ]:
286
+ raise NotImplementedError()
287
+
288
+ @property
289
+ def list_operations(
290
+ self,
291
+ ) -> Callable[
292
+ [operations_pb2.ListOperationsRequest],
293
+ Union[
294
+ operations_pb2.ListOperationsResponse,
295
+ Awaitable[operations_pb2.ListOperationsResponse],
296
+ ],
297
+ ]:
298
+ raise NotImplementedError()
299
+
300
+ @property
301
+ def get_operation(
302
+ self,
303
+ ) -> Callable[
304
+ [operations_pb2.GetOperationRequest],
305
+ Union[operations_pb2.Operation, Awaitable[operations_pb2.Operation]],
306
+ ]:
307
+ raise NotImplementedError()
308
+
309
+ @property
310
+ def cancel_operation(
311
+ self,
312
+ ) -> Callable[[operations_pb2.CancelOperationRequest], None,]:
313
+ raise NotImplementedError()
314
+
315
+ @property
316
+ def kind(self) -> str:
317
+ raise NotImplementedError()
318
+
319
+
320
+ __all__ = ("MetricsServiceV2Transport",)