google-cloud-bigtable 2.30.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 (115) hide show
  1. google/cloud/bigtable/__init__.py +25 -0
  2. google/cloud/bigtable/app_profile.py +377 -0
  3. google/cloud/bigtable/backup.py +490 -0
  4. google/cloud/bigtable/batcher.py +414 -0
  5. google/cloud/bigtable/client.py +475 -0
  6. google/cloud/bigtable/cluster.py +541 -0
  7. google/cloud/bigtable/column_family.py +362 -0
  8. google/cloud/bigtable/data/__init__.py +103 -0
  9. google/cloud/bigtable/data/_async/__init__.py +25 -0
  10. google/cloud/bigtable/data/_async/_mutate_rows.py +226 -0
  11. google/cloud/bigtable/data/_async/_read_rows.py +363 -0
  12. google/cloud/bigtable/data/_async/client.py +1522 -0
  13. google/cloud/bigtable/data/_async/mutations_batcher.py +534 -0
  14. google/cloud/bigtable/data/_cross_sync/__init__.py +20 -0
  15. google/cloud/bigtable/data/_cross_sync/_decorators.py +441 -0
  16. google/cloud/bigtable/data/_cross_sync/_mapping_meta.py +64 -0
  17. google/cloud/bigtable/data/_cross_sync/cross_sync.py +334 -0
  18. google/cloud/bigtable/data/_helpers.py +249 -0
  19. google/cloud/bigtable/data/_sync_autogen/_mutate_rows.py +182 -0
  20. google/cloud/bigtable/data/_sync_autogen/_read_rows.py +304 -0
  21. google/cloud/bigtable/data/_sync_autogen/client.py +1293 -0
  22. google/cloud/bigtable/data/_sync_autogen/mutations_batcher.py +449 -0
  23. google/cloud/bigtable/data/exceptions.py +340 -0
  24. google/cloud/bigtable/data/execute_query/__init__.py +43 -0
  25. google/cloud/bigtable/data/execute_query/_async/__init__.py +13 -0
  26. google/cloud/bigtable/data/execute_query/_async/execute_query_iterator.py +291 -0
  27. google/cloud/bigtable/data/execute_query/_byte_cursor.py +123 -0
  28. google/cloud/bigtable/data/execute_query/_checksum.py +43 -0
  29. google/cloud/bigtable/data/execute_query/_parameters_formatting.py +155 -0
  30. google/cloud/bigtable/data/execute_query/_query_result_parsing_utils.py +134 -0
  31. google/cloud/bigtable/data/execute_query/_reader.py +122 -0
  32. google/cloud/bigtable/data/execute_query/_sync_autogen/execute_query_iterator.py +239 -0
  33. google/cloud/bigtable/data/execute_query/metadata.py +399 -0
  34. google/cloud/bigtable/data/execute_query/values.py +123 -0
  35. google/cloud/bigtable/data/mutations.py +380 -0
  36. google/cloud/bigtable/data/read_modify_write_rules.py +112 -0
  37. google/cloud/bigtable/data/read_rows_query.py +536 -0
  38. google/cloud/bigtable/data/row.py +535 -0
  39. google/cloud/bigtable/data/row_filters.py +968 -0
  40. google/cloud/bigtable/encryption_info.py +64 -0
  41. google/cloud/bigtable/enums.py +223 -0
  42. google/cloud/bigtable/error.py +64 -0
  43. google/cloud/bigtable/gapic_version.py +16 -0
  44. google/cloud/bigtable/helpers.py +31 -0
  45. google/cloud/bigtable/instance.py +789 -0
  46. google/cloud/bigtable/policy.py +255 -0
  47. google/cloud/bigtable/row.py +1267 -0
  48. google/cloud/bigtable/row_data.py +380 -0
  49. google/cloud/bigtable/row_filters.py +838 -0
  50. google/cloud/bigtable/row_merger.py +250 -0
  51. google/cloud/bigtable/row_set.py +213 -0
  52. google/cloud/bigtable/table.py +1409 -0
  53. google/cloud/bigtable_admin/__init__.py +410 -0
  54. google/cloud/bigtable_admin/gapic_version.py +16 -0
  55. google/cloud/bigtable_admin/py.typed +2 -0
  56. google/cloud/bigtable_admin_v2/__init__.py +250 -0
  57. google/cloud/bigtable_admin_v2/gapic_metadata.json +962 -0
  58. google/cloud/bigtable_admin_v2/gapic_version.py +16 -0
  59. google/cloud/bigtable_admin_v2/py.typed +2 -0
  60. google/cloud/bigtable_admin_v2/services/__init__.py +15 -0
  61. google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/__init__.py +22 -0
  62. google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/async_client.py +3465 -0
  63. google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/client.py +3944 -0
  64. google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/pagers.py +681 -0
  65. google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/__init__.py +40 -0
  66. google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/base.py +751 -0
  67. google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/grpc.py +1249 -0
  68. google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/grpc_asyncio.py +1579 -0
  69. google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/rest.py +6820 -0
  70. google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/rest_base.py +1746 -0
  71. google/cloud/bigtable_admin_v2/services/bigtable_table_admin/__init__.py +22 -0
  72. google/cloud/bigtable_admin_v2/services/bigtable_table_admin/async_client.py +3472 -0
  73. google/cloud/bigtable_admin_v2/services/bigtable_table_admin/client.py +3949 -0
  74. google/cloud/bigtable_admin_v2/services/bigtable_table_admin/pagers.py +669 -0
  75. google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/__init__.py +40 -0
  76. google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/base.py +708 -0
  77. google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/grpc.py +1257 -0
  78. google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/grpc_asyncio.py +1549 -0
  79. google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/rest.py +6609 -0
  80. google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/rest_base.py +1714 -0
  81. google/cloud/bigtable_admin_v2/types/__init__.py +248 -0
  82. google/cloud/bigtable_admin_v2/types/bigtable_instance_admin.py +1364 -0
  83. google/cloud/bigtable_admin_v2/types/bigtable_table_admin.py +1715 -0
  84. google/cloud/bigtable_admin_v2/types/common.py +81 -0
  85. google/cloud/bigtable_admin_v2/types/instance.py +819 -0
  86. google/cloud/bigtable_admin_v2/types/table.py +1028 -0
  87. google/cloud/bigtable_admin_v2/types/types.py +776 -0
  88. google/cloud/bigtable_v2/__init__.py +136 -0
  89. google/cloud/bigtable_v2/gapic_metadata.json +193 -0
  90. google/cloud/bigtable_v2/gapic_version.py +16 -0
  91. google/cloud/bigtable_v2/py.typed +2 -0
  92. google/cloud/bigtable_v2/services/__init__.py +15 -0
  93. google/cloud/bigtable_v2/services/bigtable/__init__.py +22 -0
  94. google/cloud/bigtable_v2/services/bigtable/async_client.py +1741 -0
  95. google/cloud/bigtable_v2/services/bigtable/client.py +2194 -0
  96. google/cloud/bigtable_v2/services/bigtable/transports/__init__.py +38 -0
  97. google/cloud/bigtable_v2/services/bigtable/transports/base.py +343 -0
  98. google/cloud/bigtable_v2/services/bigtable/transports/grpc.py +660 -0
  99. google/cloud/bigtable_v2/services/bigtable/transports/grpc_asyncio.py +762 -0
  100. google/cloud/bigtable_v2/services/bigtable/transports/rest.py +2489 -0
  101. google/cloud/bigtable_v2/services/bigtable/transports/rest_base.py +711 -0
  102. google/cloud/bigtable_v2/types/__init__.py +138 -0
  103. google/cloud/bigtable_v2/types/bigtable.py +1531 -0
  104. google/cloud/bigtable_v2/types/data.py +1612 -0
  105. google/cloud/bigtable_v2/types/feature_flags.py +119 -0
  106. google/cloud/bigtable_v2/types/request_stats.py +171 -0
  107. google/cloud/bigtable_v2/types/response_params.py +64 -0
  108. google/cloud/bigtable_v2/types/types.py +579 -0
  109. google_cloud_bigtable-2.30.0.data/scripts/fixup_bigtable_admin_v2_keywords.py +233 -0
  110. google_cloud_bigtable-2.30.0.data/scripts/fixup_bigtable_v2_keywords.py +186 -0
  111. google_cloud_bigtable-2.30.0.dist-info/LICENSE +202 -0
  112. google_cloud_bigtable-2.30.0.dist-info/METADATA +154 -0
  113. google_cloud_bigtable-2.30.0.dist-info/RECORD +115 -0
  114. google_cloud_bigtable-2.30.0.dist-info/WHEEL +5 -0
  115. google_cloud_bigtable-2.30.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1579 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Copyright 2024 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 inspect
17
+ import json
18
+ import pickle
19
+ import logging as std_logging
20
+ import warnings
21
+ from typing import Awaitable, Callable, Dict, Optional, Sequence, Tuple, Union
22
+
23
+ from google.api_core import gapic_v1
24
+ from google.api_core import grpc_helpers_async
25
+ from google.api_core import exceptions as core_exceptions
26
+ from google.api_core import retry_async as retries
27
+ from google.api_core import operations_v1
28
+ from google.auth import credentials as ga_credentials # type: ignore
29
+ from google.auth.transport.grpc import SslCredentials # type: ignore
30
+ from google.protobuf.json_format import MessageToJson
31
+ import google.protobuf.message
32
+
33
+ import grpc # type: ignore
34
+ import proto # type: ignore
35
+ from grpc.experimental import aio # type: ignore
36
+
37
+ from google.cloud.bigtable_admin_v2.types import bigtable_instance_admin
38
+ from google.cloud.bigtable_admin_v2.types import instance
39
+ from google.iam.v1 import iam_policy_pb2 # type: ignore
40
+ from google.iam.v1 import policy_pb2 # type: ignore
41
+ from google.longrunning import operations_pb2 # type: ignore
42
+ from google.protobuf import empty_pb2 # type: ignore
43
+ from .base import BigtableInstanceAdminTransport, DEFAULT_CLIENT_INFO
44
+ from .grpc import BigtableInstanceAdminGrpcTransport
45
+
46
+ try:
47
+ from google.api_core import client_logging # type: ignore
48
+
49
+ CLIENT_LOGGING_SUPPORTED = True # pragma: NO COVER
50
+ except ImportError: # pragma: NO COVER
51
+ CLIENT_LOGGING_SUPPORTED = False
52
+
53
+ _LOGGER = std_logging.getLogger(__name__)
54
+
55
+
56
+ class _LoggingClientAIOInterceptor(
57
+ grpc.aio.UnaryUnaryClientInterceptor
58
+ ): # pragma: NO COVER
59
+ async def intercept_unary_unary(self, continuation, client_call_details, request):
60
+ logging_enabled = CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor(
61
+ std_logging.DEBUG
62
+ )
63
+ if logging_enabled: # pragma: NO COVER
64
+ request_metadata = client_call_details.metadata
65
+ if isinstance(request, proto.Message):
66
+ request_payload = type(request).to_json(request)
67
+ elif isinstance(request, google.protobuf.message.Message):
68
+ request_payload = MessageToJson(request)
69
+ else:
70
+ request_payload = f"{type(request).__name__}: {pickle.dumps(request)}"
71
+
72
+ request_metadata = {
73
+ key: value.decode("utf-8") if isinstance(value, bytes) else value
74
+ for key, value in request_metadata
75
+ }
76
+ grpc_request = {
77
+ "payload": request_payload,
78
+ "requestMethod": "grpc",
79
+ "metadata": dict(request_metadata),
80
+ }
81
+ _LOGGER.debug(
82
+ f"Sending request for {client_call_details.method}",
83
+ extra={
84
+ "serviceName": "google.bigtable.admin.v2.BigtableInstanceAdmin",
85
+ "rpcName": str(client_call_details.method),
86
+ "request": grpc_request,
87
+ "metadata": grpc_request["metadata"],
88
+ },
89
+ )
90
+ response = await continuation(client_call_details, request)
91
+ if logging_enabled: # pragma: NO COVER
92
+ response_metadata = await response.trailing_metadata()
93
+ # Convert gRPC metadata `<class 'grpc.aio._metadata.Metadata'>` to list of tuples
94
+ metadata = (
95
+ dict([(k, str(v)) for k, v in response_metadata])
96
+ if response_metadata
97
+ else None
98
+ )
99
+ result = await response
100
+ if isinstance(result, proto.Message):
101
+ response_payload = type(result).to_json(result)
102
+ elif isinstance(result, google.protobuf.message.Message):
103
+ response_payload = MessageToJson(result)
104
+ else:
105
+ response_payload = f"{type(result).__name__}: {pickle.dumps(result)}"
106
+ grpc_response = {
107
+ "payload": response_payload,
108
+ "metadata": metadata,
109
+ "status": "OK",
110
+ }
111
+ _LOGGER.debug(
112
+ f"Received response to rpc {client_call_details.method}.",
113
+ extra={
114
+ "serviceName": "google.bigtable.admin.v2.BigtableInstanceAdmin",
115
+ "rpcName": str(client_call_details.method),
116
+ "response": grpc_response,
117
+ "metadata": grpc_response["metadata"],
118
+ },
119
+ )
120
+ return response
121
+
122
+
123
+ class BigtableInstanceAdminGrpcAsyncIOTransport(BigtableInstanceAdminTransport):
124
+ """gRPC AsyncIO backend transport for BigtableInstanceAdmin.
125
+
126
+ Service for creating, configuring, and deleting Cloud
127
+ Bigtable Instances and Clusters. Provides access to the Instance
128
+ and Cluster schemas only, not the tables' metadata or data
129
+ stored in those tables.
130
+
131
+ This class defines the same methods as the primary client, so the
132
+ primary client can load the underlying transport implementation
133
+ and call it.
134
+
135
+ It sends protocol buffers over the wire using gRPC (which is built on
136
+ top of HTTP/2); the ``grpcio`` package must be installed.
137
+ """
138
+
139
+ _grpc_channel: aio.Channel
140
+ _stubs: Dict[str, Callable] = {}
141
+
142
+ @classmethod
143
+ def create_channel(
144
+ cls,
145
+ host: str = "bigtableadmin.googleapis.com",
146
+ credentials: Optional[ga_credentials.Credentials] = None,
147
+ credentials_file: Optional[str] = None,
148
+ scopes: Optional[Sequence[str]] = None,
149
+ quota_project_id: Optional[str] = None,
150
+ **kwargs,
151
+ ) -> aio.Channel:
152
+ """Create and return a gRPC AsyncIO channel object.
153
+ Args:
154
+ host (Optional[str]): The host for the channel to use.
155
+ credentials (Optional[~.Credentials]): The
156
+ authorization credentials to attach to requests. These
157
+ credentials identify this application to the service. If
158
+ none are specified, the client will attempt to ascertain
159
+ the credentials from the environment.
160
+ credentials_file (Optional[str]): A file with credentials that can
161
+ be loaded with :func:`google.auth.load_credentials_from_file`.
162
+ scopes (Optional[Sequence[str]]): A optional list of scopes needed for this
163
+ service. These are only used when credentials are not specified and
164
+ are passed to :func:`google.auth.default`.
165
+ quota_project_id (Optional[str]): An optional project to use for billing
166
+ and quota.
167
+ kwargs (Optional[dict]): Keyword arguments, which are passed to the
168
+ channel creation.
169
+ Returns:
170
+ aio.Channel: A gRPC AsyncIO channel object.
171
+ """
172
+
173
+ return grpc_helpers_async.create_channel(
174
+ host,
175
+ credentials=credentials,
176
+ credentials_file=credentials_file,
177
+ quota_project_id=quota_project_id,
178
+ default_scopes=cls.AUTH_SCOPES,
179
+ scopes=scopes,
180
+ default_host=cls.DEFAULT_HOST,
181
+ **kwargs,
182
+ )
183
+
184
+ def __init__(
185
+ self,
186
+ *,
187
+ host: str = "bigtableadmin.googleapis.com",
188
+ credentials: Optional[ga_credentials.Credentials] = None,
189
+ credentials_file: Optional[str] = None,
190
+ scopes: Optional[Sequence[str]] = None,
191
+ channel: Optional[Union[aio.Channel, Callable[..., aio.Channel]]] = None,
192
+ api_mtls_endpoint: Optional[str] = None,
193
+ client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None,
194
+ ssl_channel_credentials: Optional[grpc.ChannelCredentials] = None,
195
+ client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None,
196
+ quota_project_id: Optional[str] = None,
197
+ client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
198
+ always_use_jwt_access: Optional[bool] = False,
199
+ api_audience: Optional[str] = None,
200
+ ) -> None:
201
+ """Instantiate the transport.
202
+
203
+ Args:
204
+ host (Optional[str]):
205
+ The hostname to connect to (default: 'bigtableadmin.googleapis.com').
206
+ credentials (Optional[google.auth.credentials.Credentials]): The
207
+ authorization credentials to attach to requests. These
208
+ credentials identify the application to the service; if none
209
+ are specified, the client will attempt to ascertain the
210
+ credentials from the environment.
211
+ This argument is ignored if a ``channel`` instance is provided.
212
+ credentials_file (Optional[str]): A file with credentials that can
213
+ be loaded with :func:`google.auth.load_credentials_from_file`.
214
+ This argument is ignored if a ``channel`` instance is provided.
215
+ scopes (Optional[Sequence[str]]): A optional list of scopes needed for this
216
+ service. These are only used when credentials are not specified and
217
+ are passed to :func:`google.auth.default`.
218
+ channel (Optional[Union[aio.Channel, Callable[..., aio.Channel]]]):
219
+ A ``Channel`` instance through which to make calls, or a Callable
220
+ that constructs and returns one. If set to None, ``self.create_channel``
221
+ is used to create the channel. If a Callable is given, it will be called
222
+ with the same arguments as used in ``self.create_channel``.
223
+ api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint.
224
+ If provided, it overrides the ``host`` argument and tries to create
225
+ a mutual TLS channel with client SSL credentials from
226
+ ``client_cert_source`` or application default SSL credentials.
227
+ client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]):
228
+ Deprecated. A callback to provide client SSL certificate bytes and
229
+ private key bytes, both in PEM format. It is ignored if
230
+ ``api_mtls_endpoint`` is None.
231
+ ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials
232
+ for the grpc channel. It is ignored if a ``channel`` instance is provided.
233
+ client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]):
234
+ A callback to provide client certificate bytes and private key bytes,
235
+ both in PEM format. It is used to configure a mutual TLS channel. It is
236
+ ignored if a ``channel`` instance or ``ssl_channel_credentials`` is provided.
237
+ quota_project_id (Optional[str]): An optional project to use for billing
238
+ and quota.
239
+ client_info (google.api_core.gapic_v1.client_info.ClientInfo):
240
+ The client info used to send a user-agent string along with
241
+ API requests. If ``None``, then default info will be used.
242
+ Generally, you only need to set this if you're developing
243
+ your own client library.
244
+ always_use_jwt_access (Optional[bool]): Whether self signed JWT should
245
+ be used for service account credentials.
246
+
247
+ Raises:
248
+ google.auth.exceptions.MutualTlsChannelError: If mutual TLS transport
249
+ creation failed for any reason.
250
+ google.api_core.exceptions.DuplicateCredentialArgs: If both ``credentials``
251
+ and ``credentials_file`` are passed.
252
+ """
253
+ self._grpc_channel = None
254
+ self._ssl_channel_credentials = ssl_channel_credentials
255
+ self._stubs: Dict[str, Callable] = {}
256
+ self._operations_client: Optional[operations_v1.OperationsAsyncClient] = None
257
+
258
+ if api_mtls_endpoint:
259
+ warnings.warn("api_mtls_endpoint is deprecated", DeprecationWarning)
260
+ if client_cert_source:
261
+ warnings.warn("client_cert_source is deprecated", DeprecationWarning)
262
+
263
+ if isinstance(channel, aio.Channel):
264
+ # Ignore credentials if a channel was passed.
265
+ credentials = None
266
+ self._ignore_credentials = True
267
+ # If a channel was explicitly provided, set it.
268
+ self._grpc_channel = channel
269
+ self._ssl_channel_credentials = None
270
+ else:
271
+ if api_mtls_endpoint:
272
+ host = api_mtls_endpoint
273
+
274
+ # Create SSL credentials with client_cert_source or application
275
+ # default SSL credentials.
276
+ if client_cert_source:
277
+ cert, key = client_cert_source()
278
+ self._ssl_channel_credentials = grpc.ssl_channel_credentials(
279
+ certificate_chain=cert, private_key=key
280
+ )
281
+ else:
282
+ self._ssl_channel_credentials = SslCredentials().ssl_credentials
283
+
284
+ else:
285
+ if client_cert_source_for_mtls and not ssl_channel_credentials:
286
+ cert, key = client_cert_source_for_mtls()
287
+ self._ssl_channel_credentials = grpc.ssl_channel_credentials(
288
+ certificate_chain=cert, private_key=key
289
+ )
290
+
291
+ # The base transport sets the host, credentials and scopes
292
+ super().__init__(
293
+ host=host,
294
+ credentials=credentials,
295
+ credentials_file=credentials_file,
296
+ scopes=scopes,
297
+ quota_project_id=quota_project_id,
298
+ client_info=client_info,
299
+ always_use_jwt_access=always_use_jwt_access,
300
+ api_audience=api_audience,
301
+ )
302
+
303
+ if not self._grpc_channel:
304
+ # initialize with the provided callable or the default channel
305
+ channel_init = channel or type(self).create_channel
306
+ self._grpc_channel = channel_init(
307
+ self._host,
308
+ # use the credentials which are saved
309
+ credentials=self._credentials,
310
+ # Set ``credentials_file`` to ``None`` here as
311
+ # the credentials that we saved earlier should be used.
312
+ credentials_file=None,
313
+ scopes=self._scopes,
314
+ ssl_credentials=self._ssl_channel_credentials,
315
+ quota_project_id=quota_project_id,
316
+ options=[
317
+ ("grpc.max_send_message_length", -1),
318
+ ("grpc.max_receive_message_length", -1),
319
+ ],
320
+ )
321
+
322
+ self._interceptor = _LoggingClientAIOInterceptor()
323
+ self._grpc_channel._unary_unary_interceptors.append(self._interceptor)
324
+ self._logged_channel = self._grpc_channel
325
+ self._wrap_with_kind = (
326
+ "kind" in inspect.signature(gapic_v1.method_async.wrap_method).parameters
327
+ )
328
+ # Wrap messages. This must be done after self._logged_channel exists
329
+ self._prep_wrapped_messages(client_info)
330
+
331
+ @property
332
+ def grpc_channel(self) -> aio.Channel:
333
+ """Create the channel designed to connect to this service.
334
+
335
+ This property caches on the instance; repeated calls return
336
+ the same channel.
337
+ """
338
+ # Return the channel from cache.
339
+ return self._grpc_channel
340
+
341
+ @property
342
+ def operations_client(self) -> operations_v1.OperationsAsyncClient:
343
+ """Create the client designed to process long-running operations.
344
+
345
+ This property caches on the instance; repeated calls return the same
346
+ client.
347
+ """
348
+ # Quick check: Only create a new client if we do not already have one.
349
+ if self._operations_client is None:
350
+ self._operations_client = operations_v1.OperationsAsyncClient(
351
+ self._logged_channel
352
+ )
353
+
354
+ # Return the client from cache.
355
+ return self._operations_client
356
+
357
+ @property
358
+ def create_instance(
359
+ self,
360
+ ) -> Callable[
361
+ [bigtable_instance_admin.CreateInstanceRequest],
362
+ Awaitable[operations_pb2.Operation],
363
+ ]:
364
+ r"""Return a callable for the create instance method over gRPC.
365
+
366
+ Create an instance within a project.
367
+
368
+ Note that exactly one of Cluster.serve_nodes and
369
+ Cluster.cluster_config.cluster_autoscaling_config can be set. If
370
+ serve_nodes is set to non-zero, then the cluster is manually
371
+ scaled. If cluster_config.cluster_autoscaling_config is
372
+ non-empty, then autoscaling is enabled.
373
+
374
+ Returns:
375
+ Callable[[~.CreateInstanceRequest],
376
+ Awaitable[~.Operation]]:
377
+ A function that, when called, will call the underlying RPC
378
+ on the server.
379
+ """
380
+ # Generate a "stub function" on-the-fly which will actually make
381
+ # the request.
382
+ # gRPC handles serialization and deserialization, so we just need
383
+ # to pass in the functions for each.
384
+ if "create_instance" not in self._stubs:
385
+ self._stubs["create_instance"] = self._logged_channel.unary_unary(
386
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/CreateInstance",
387
+ request_serializer=bigtable_instance_admin.CreateInstanceRequest.serialize,
388
+ response_deserializer=operations_pb2.Operation.FromString,
389
+ )
390
+ return self._stubs["create_instance"]
391
+
392
+ @property
393
+ def get_instance(
394
+ self,
395
+ ) -> Callable[
396
+ [bigtable_instance_admin.GetInstanceRequest], Awaitable[instance.Instance]
397
+ ]:
398
+ r"""Return a callable for the get instance method over gRPC.
399
+
400
+ Gets information about an instance.
401
+
402
+ Returns:
403
+ Callable[[~.GetInstanceRequest],
404
+ Awaitable[~.Instance]]:
405
+ A function that, when called, will call the underlying RPC
406
+ on the server.
407
+ """
408
+ # Generate a "stub function" on-the-fly which will actually make
409
+ # the request.
410
+ # gRPC handles serialization and deserialization, so we just need
411
+ # to pass in the functions for each.
412
+ if "get_instance" not in self._stubs:
413
+ self._stubs["get_instance"] = self._logged_channel.unary_unary(
414
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/GetInstance",
415
+ request_serializer=bigtable_instance_admin.GetInstanceRequest.serialize,
416
+ response_deserializer=instance.Instance.deserialize,
417
+ )
418
+ return self._stubs["get_instance"]
419
+
420
+ @property
421
+ def list_instances(
422
+ self,
423
+ ) -> Callable[
424
+ [bigtable_instance_admin.ListInstancesRequest],
425
+ Awaitable[bigtable_instance_admin.ListInstancesResponse],
426
+ ]:
427
+ r"""Return a callable for the list instances method over gRPC.
428
+
429
+ Lists information about instances in a project.
430
+
431
+ Returns:
432
+ Callable[[~.ListInstancesRequest],
433
+ Awaitable[~.ListInstancesResponse]]:
434
+ A function that, when called, will call the underlying RPC
435
+ on the server.
436
+ """
437
+ # Generate a "stub function" on-the-fly which will actually make
438
+ # the request.
439
+ # gRPC handles serialization and deserialization, so we just need
440
+ # to pass in the functions for each.
441
+ if "list_instances" not in self._stubs:
442
+ self._stubs["list_instances"] = self._logged_channel.unary_unary(
443
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/ListInstances",
444
+ request_serializer=bigtable_instance_admin.ListInstancesRequest.serialize,
445
+ response_deserializer=bigtable_instance_admin.ListInstancesResponse.deserialize,
446
+ )
447
+ return self._stubs["list_instances"]
448
+
449
+ @property
450
+ def update_instance(
451
+ self,
452
+ ) -> Callable[[instance.Instance], Awaitable[instance.Instance]]:
453
+ r"""Return a callable for the update instance method over gRPC.
454
+
455
+ Updates an instance within a project. This method
456
+ updates only the display name and type for an Instance.
457
+ To update other Instance properties, such as labels, use
458
+ PartialUpdateInstance.
459
+
460
+ Returns:
461
+ Callable[[~.Instance],
462
+ Awaitable[~.Instance]]:
463
+ A function that, when called, will call the underlying RPC
464
+ on the server.
465
+ """
466
+ # Generate a "stub function" on-the-fly which will actually make
467
+ # the request.
468
+ # gRPC handles serialization and deserialization, so we just need
469
+ # to pass in the functions for each.
470
+ if "update_instance" not in self._stubs:
471
+ self._stubs["update_instance"] = self._logged_channel.unary_unary(
472
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/UpdateInstance",
473
+ request_serializer=instance.Instance.serialize,
474
+ response_deserializer=instance.Instance.deserialize,
475
+ )
476
+ return self._stubs["update_instance"]
477
+
478
+ @property
479
+ def partial_update_instance(
480
+ self,
481
+ ) -> Callable[
482
+ [bigtable_instance_admin.PartialUpdateInstanceRequest],
483
+ Awaitable[operations_pb2.Operation],
484
+ ]:
485
+ r"""Return a callable for the partial update instance method over gRPC.
486
+
487
+ Partially updates an instance within a project. This
488
+ method can modify all fields of an Instance and is the
489
+ preferred way to update an Instance.
490
+
491
+ Returns:
492
+ Callable[[~.PartialUpdateInstanceRequest],
493
+ Awaitable[~.Operation]]:
494
+ A function that, when called, will call the underlying RPC
495
+ on the server.
496
+ """
497
+ # Generate a "stub function" on-the-fly which will actually make
498
+ # the request.
499
+ # gRPC handles serialization and deserialization, so we just need
500
+ # to pass in the functions for each.
501
+ if "partial_update_instance" not in self._stubs:
502
+ self._stubs["partial_update_instance"] = self._logged_channel.unary_unary(
503
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/PartialUpdateInstance",
504
+ request_serializer=bigtable_instance_admin.PartialUpdateInstanceRequest.serialize,
505
+ response_deserializer=operations_pb2.Operation.FromString,
506
+ )
507
+ return self._stubs["partial_update_instance"]
508
+
509
+ @property
510
+ def delete_instance(
511
+ self,
512
+ ) -> Callable[
513
+ [bigtable_instance_admin.DeleteInstanceRequest], Awaitable[empty_pb2.Empty]
514
+ ]:
515
+ r"""Return a callable for the delete instance method over gRPC.
516
+
517
+ Delete an instance from a project.
518
+
519
+ Returns:
520
+ Callable[[~.DeleteInstanceRequest],
521
+ Awaitable[~.Empty]]:
522
+ A function that, when called, will call the underlying RPC
523
+ on the server.
524
+ """
525
+ # Generate a "stub function" on-the-fly which will actually make
526
+ # the request.
527
+ # gRPC handles serialization and deserialization, so we just need
528
+ # to pass in the functions for each.
529
+ if "delete_instance" not in self._stubs:
530
+ self._stubs["delete_instance"] = self._logged_channel.unary_unary(
531
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/DeleteInstance",
532
+ request_serializer=bigtable_instance_admin.DeleteInstanceRequest.serialize,
533
+ response_deserializer=empty_pb2.Empty.FromString,
534
+ )
535
+ return self._stubs["delete_instance"]
536
+
537
+ @property
538
+ def create_cluster(
539
+ self,
540
+ ) -> Callable[
541
+ [bigtable_instance_admin.CreateClusterRequest],
542
+ Awaitable[operations_pb2.Operation],
543
+ ]:
544
+ r"""Return a callable for the create cluster method over gRPC.
545
+
546
+ Creates a cluster within an instance.
547
+
548
+ Note that exactly one of Cluster.serve_nodes and
549
+ Cluster.cluster_config.cluster_autoscaling_config can be set. If
550
+ serve_nodes is set to non-zero, then the cluster is manually
551
+ scaled. If cluster_config.cluster_autoscaling_config is
552
+ non-empty, then autoscaling is enabled.
553
+
554
+ Returns:
555
+ Callable[[~.CreateClusterRequest],
556
+ Awaitable[~.Operation]]:
557
+ A function that, when called, will call the underlying RPC
558
+ on the server.
559
+ """
560
+ # Generate a "stub function" on-the-fly which will actually make
561
+ # the request.
562
+ # gRPC handles serialization and deserialization, so we just need
563
+ # to pass in the functions for each.
564
+ if "create_cluster" not in self._stubs:
565
+ self._stubs["create_cluster"] = self._logged_channel.unary_unary(
566
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/CreateCluster",
567
+ request_serializer=bigtable_instance_admin.CreateClusterRequest.serialize,
568
+ response_deserializer=operations_pb2.Operation.FromString,
569
+ )
570
+ return self._stubs["create_cluster"]
571
+
572
+ @property
573
+ def get_cluster(
574
+ self,
575
+ ) -> Callable[
576
+ [bigtable_instance_admin.GetClusterRequest], Awaitable[instance.Cluster]
577
+ ]:
578
+ r"""Return a callable for the get cluster method over gRPC.
579
+
580
+ Gets information about a cluster.
581
+
582
+ Returns:
583
+ Callable[[~.GetClusterRequest],
584
+ Awaitable[~.Cluster]]:
585
+ A function that, when called, will call the underlying RPC
586
+ on the server.
587
+ """
588
+ # Generate a "stub function" on-the-fly which will actually make
589
+ # the request.
590
+ # gRPC handles serialization and deserialization, so we just need
591
+ # to pass in the functions for each.
592
+ if "get_cluster" not in self._stubs:
593
+ self._stubs["get_cluster"] = self._logged_channel.unary_unary(
594
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/GetCluster",
595
+ request_serializer=bigtable_instance_admin.GetClusterRequest.serialize,
596
+ response_deserializer=instance.Cluster.deserialize,
597
+ )
598
+ return self._stubs["get_cluster"]
599
+
600
+ @property
601
+ def list_clusters(
602
+ self,
603
+ ) -> Callable[
604
+ [bigtable_instance_admin.ListClustersRequest],
605
+ Awaitable[bigtable_instance_admin.ListClustersResponse],
606
+ ]:
607
+ r"""Return a callable for the list clusters method over gRPC.
608
+
609
+ Lists information about clusters in an instance.
610
+
611
+ Returns:
612
+ Callable[[~.ListClustersRequest],
613
+ Awaitable[~.ListClustersResponse]]:
614
+ A function that, when called, will call the underlying RPC
615
+ on the server.
616
+ """
617
+ # Generate a "stub function" on-the-fly which will actually make
618
+ # the request.
619
+ # gRPC handles serialization and deserialization, so we just need
620
+ # to pass in the functions for each.
621
+ if "list_clusters" not in self._stubs:
622
+ self._stubs["list_clusters"] = self._logged_channel.unary_unary(
623
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/ListClusters",
624
+ request_serializer=bigtable_instance_admin.ListClustersRequest.serialize,
625
+ response_deserializer=bigtable_instance_admin.ListClustersResponse.deserialize,
626
+ )
627
+ return self._stubs["list_clusters"]
628
+
629
+ @property
630
+ def update_cluster(
631
+ self,
632
+ ) -> Callable[[instance.Cluster], Awaitable[operations_pb2.Operation]]:
633
+ r"""Return a callable for the update cluster method over gRPC.
634
+
635
+ Updates a cluster within an instance.
636
+
637
+ Note that UpdateCluster does not support updating
638
+ cluster_config.cluster_autoscaling_config. In order to update
639
+ it, you must use PartialUpdateCluster.
640
+
641
+ Returns:
642
+ Callable[[~.Cluster],
643
+ Awaitable[~.Operation]]:
644
+ A function that, when called, will call the underlying RPC
645
+ on the server.
646
+ """
647
+ # Generate a "stub function" on-the-fly which will actually make
648
+ # the request.
649
+ # gRPC handles serialization and deserialization, so we just need
650
+ # to pass in the functions for each.
651
+ if "update_cluster" not in self._stubs:
652
+ self._stubs["update_cluster"] = self._logged_channel.unary_unary(
653
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/UpdateCluster",
654
+ request_serializer=instance.Cluster.serialize,
655
+ response_deserializer=operations_pb2.Operation.FromString,
656
+ )
657
+ return self._stubs["update_cluster"]
658
+
659
+ @property
660
+ def partial_update_cluster(
661
+ self,
662
+ ) -> Callable[
663
+ [bigtable_instance_admin.PartialUpdateClusterRequest],
664
+ Awaitable[operations_pb2.Operation],
665
+ ]:
666
+ r"""Return a callable for the partial update cluster method over gRPC.
667
+
668
+ Partially updates a cluster within a project. This method is the
669
+ preferred way to update a Cluster.
670
+
671
+ To enable and update autoscaling, set
672
+ cluster_config.cluster_autoscaling_config. When autoscaling is
673
+ enabled, serve_nodes is treated as an OUTPUT_ONLY field, meaning
674
+ that updates to it are ignored. Note that an update cannot
675
+ simultaneously set serve_nodes to non-zero and
676
+ cluster_config.cluster_autoscaling_config to non-empty, and also
677
+ specify both in the update_mask.
678
+
679
+ To disable autoscaling, clear
680
+ cluster_config.cluster_autoscaling_config, and explicitly set a
681
+ serve_node count via the update_mask.
682
+
683
+ Returns:
684
+ Callable[[~.PartialUpdateClusterRequest],
685
+ Awaitable[~.Operation]]:
686
+ A function that, when called, will call the underlying RPC
687
+ on the server.
688
+ """
689
+ # Generate a "stub function" on-the-fly which will actually make
690
+ # the request.
691
+ # gRPC handles serialization and deserialization, so we just need
692
+ # to pass in the functions for each.
693
+ if "partial_update_cluster" not in self._stubs:
694
+ self._stubs["partial_update_cluster"] = self._logged_channel.unary_unary(
695
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/PartialUpdateCluster",
696
+ request_serializer=bigtable_instance_admin.PartialUpdateClusterRequest.serialize,
697
+ response_deserializer=operations_pb2.Operation.FromString,
698
+ )
699
+ return self._stubs["partial_update_cluster"]
700
+
701
+ @property
702
+ def delete_cluster(
703
+ self,
704
+ ) -> Callable[
705
+ [bigtable_instance_admin.DeleteClusterRequest], Awaitable[empty_pb2.Empty]
706
+ ]:
707
+ r"""Return a callable for the delete cluster method over gRPC.
708
+
709
+ Deletes a cluster from an instance.
710
+
711
+ Returns:
712
+ Callable[[~.DeleteClusterRequest],
713
+ Awaitable[~.Empty]]:
714
+ A function that, when called, will call the underlying RPC
715
+ on the server.
716
+ """
717
+ # Generate a "stub function" on-the-fly which will actually make
718
+ # the request.
719
+ # gRPC handles serialization and deserialization, so we just need
720
+ # to pass in the functions for each.
721
+ if "delete_cluster" not in self._stubs:
722
+ self._stubs["delete_cluster"] = self._logged_channel.unary_unary(
723
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/DeleteCluster",
724
+ request_serializer=bigtable_instance_admin.DeleteClusterRequest.serialize,
725
+ response_deserializer=empty_pb2.Empty.FromString,
726
+ )
727
+ return self._stubs["delete_cluster"]
728
+
729
+ @property
730
+ def create_app_profile(
731
+ self,
732
+ ) -> Callable[
733
+ [bigtable_instance_admin.CreateAppProfileRequest],
734
+ Awaitable[instance.AppProfile],
735
+ ]:
736
+ r"""Return a callable for the create app profile method over gRPC.
737
+
738
+ Creates an app profile within an instance.
739
+
740
+ Returns:
741
+ Callable[[~.CreateAppProfileRequest],
742
+ Awaitable[~.AppProfile]]:
743
+ A function that, when called, will call the underlying RPC
744
+ on the server.
745
+ """
746
+ # Generate a "stub function" on-the-fly which will actually make
747
+ # the request.
748
+ # gRPC handles serialization and deserialization, so we just need
749
+ # to pass in the functions for each.
750
+ if "create_app_profile" not in self._stubs:
751
+ self._stubs["create_app_profile"] = self._logged_channel.unary_unary(
752
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/CreateAppProfile",
753
+ request_serializer=bigtable_instance_admin.CreateAppProfileRequest.serialize,
754
+ response_deserializer=instance.AppProfile.deserialize,
755
+ )
756
+ return self._stubs["create_app_profile"]
757
+
758
+ @property
759
+ def get_app_profile(
760
+ self,
761
+ ) -> Callable[
762
+ [bigtable_instance_admin.GetAppProfileRequest], Awaitable[instance.AppProfile]
763
+ ]:
764
+ r"""Return a callable for the get app profile method over gRPC.
765
+
766
+ Gets information about an app profile.
767
+
768
+ Returns:
769
+ Callable[[~.GetAppProfileRequest],
770
+ Awaitable[~.AppProfile]]:
771
+ A function that, when called, will call the underlying RPC
772
+ on the server.
773
+ """
774
+ # Generate a "stub function" on-the-fly which will actually make
775
+ # the request.
776
+ # gRPC handles serialization and deserialization, so we just need
777
+ # to pass in the functions for each.
778
+ if "get_app_profile" not in self._stubs:
779
+ self._stubs["get_app_profile"] = self._logged_channel.unary_unary(
780
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/GetAppProfile",
781
+ request_serializer=bigtable_instance_admin.GetAppProfileRequest.serialize,
782
+ response_deserializer=instance.AppProfile.deserialize,
783
+ )
784
+ return self._stubs["get_app_profile"]
785
+
786
+ @property
787
+ def list_app_profiles(
788
+ self,
789
+ ) -> Callable[
790
+ [bigtable_instance_admin.ListAppProfilesRequest],
791
+ Awaitable[bigtable_instance_admin.ListAppProfilesResponse],
792
+ ]:
793
+ r"""Return a callable for the list app profiles method over gRPC.
794
+
795
+ Lists information about app profiles in an instance.
796
+
797
+ Returns:
798
+ Callable[[~.ListAppProfilesRequest],
799
+ Awaitable[~.ListAppProfilesResponse]]:
800
+ A function that, when called, will call the underlying RPC
801
+ on the server.
802
+ """
803
+ # Generate a "stub function" on-the-fly which will actually make
804
+ # the request.
805
+ # gRPC handles serialization and deserialization, so we just need
806
+ # to pass in the functions for each.
807
+ if "list_app_profiles" not in self._stubs:
808
+ self._stubs["list_app_profiles"] = self._logged_channel.unary_unary(
809
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/ListAppProfiles",
810
+ request_serializer=bigtable_instance_admin.ListAppProfilesRequest.serialize,
811
+ response_deserializer=bigtable_instance_admin.ListAppProfilesResponse.deserialize,
812
+ )
813
+ return self._stubs["list_app_profiles"]
814
+
815
+ @property
816
+ def update_app_profile(
817
+ self,
818
+ ) -> Callable[
819
+ [bigtable_instance_admin.UpdateAppProfileRequest],
820
+ Awaitable[operations_pb2.Operation],
821
+ ]:
822
+ r"""Return a callable for the update app profile method over gRPC.
823
+
824
+ Updates an app profile within an instance.
825
+
826
+ Returns:
827
+ Callable[[~.UpdateAppProfileRequest],
828
+ Awaitable[~.Operation]]:
829
+ A function that, when called, will call the underlying RPC
830
+ on the server.
831
+ """
832
+ # Generate a "stub function" on-the-fly which will actually make
833
+ # the request.
834
+ # gRPC handles serialization and deserialization, so we just need
835
+ # to pass in the functions for each.
836
+ if "update_app_profile" not in self._stubs:
837
+ self._stubs["update_app_profile"] = self._logged_channel.unary_unary(
838
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/UpdateAppProfile",
839
+ request_serializer=bigtable_instance_admin.UpdateAppProfileRequest.serialize,
840
+ response_deserializer=operations_pb2.Operation.FromString,
841
+ )
842
+ return self._stubs["update_app_profile"]
843
+
844
+ @property
845
+ def delete_app_profile(
846
+ self,
847
+ ) -> Callable[
848
+ [bigtable_instance_admin.DeleteAppProfileRequest], Awaitable[empty_pb2.Empty]
849
+ ]:
850
+ r"""Return a callable for the delete app profile method over gRPC.
851
+
852
+ Deletes an app profile from an instance.
853
+
854
+ Returns:
855
+ Callable[[~.DeleteAppProfileRequest],
856
+ Awaitable[~.Empty]]:
857
+ A function that, when called, will call the underlying RPC
858
+ on the server.
859
+ """
860
+ # Generate a "stub function" on-the-fly which will actually make
861
+ # the request.
862
+ # gRPC handles serialization and deserialization, so we just need
863
+ # to pass in the functions for each.
864
+ if "delete_app_profile" not in self._stubs:
865
+ self._stubs["delete_app_profile"] = self._logged_channel.unary_unary(
866
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/DeleteAppProfile",
867
+ request_serializer=bigtable_instance_admin.DeleteAppProfileRequest.serialize,
868
+ response_deserializer=empty_pb2.Empty.FromString,
869
+ )
870
+ return self._stubs["delete_app_profile"]
871
+
872
+ @property
873
+ def get_iam_policy(
874
+ self,
875
+ ) -> Callable[[iam_policy_pb2.GetIamPolicyRequest], Awaitable[policy_pb2.Policy]]:
876
+ r"""Return a callable for the get iam policy method over gRPC.
877
+
878
+ Gets the access control policy for an instance
879
+ resource. Returns an empty policy if an instance exists
880
+ but does not have a policy set.
881
+
882
+ Returns:
883
+ Callable[[~.GetIamPolicyRequest],
884
+ Awaitable[~.Policy]]:
885
+ A function that, when called, will call the underlying RPC
886
+ on the server.
887
+ """
888
+ # Generate a "stub function" on-the-fly which will actually make
889
+ # the request.
890
+ # gRPC handles serialization and deserialization, so we just need
891
+ # to pass in the functions for each.
892
+ if "get_iam_policy" not in self._stubs:
893
+ self._stubs["get_iam_policy"] = self._logged_channel.unary_unary(
894
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/GetIamPolicy",
895
+ request_serializer=iam_policy_pb2.GetIamPolicyRequest.SerializeToString,
896
+ response_deserializer=policy_pb2.Policy.FromString,
897
+ )
898
+ return self._stubs["get_iam_policy"]
899
+
900
+ @property
901
+ def set_iam_policy(
902
+ self,
903
+ ) -> Callable[[iam_policy_pb2.SetIamPolicyRequest], Awaitable[policy_pb2.Policy]]:
904
+ r"""Return a callable for the set iam policy method over gRPC.
905
+
906
+ Sets the access control policy on an instance
907
+ resource. Replaces any existing policy.
908
+
909
+ Returns:
910
+ Callable[[~.SetIamPolicyRequest],
911
+ Awaitable[~.Policy]]:
912
+ A function that, when called, will call the underlying RPC
913
+ on the server.
914
+ """
915
+ # Generate a "stub function" on-the-fly which will actually make
916
+ # the request.
917
+ # gRPC handles serialization and deserialization, so we just need
918
+ # to pass in the functions for each.
919
+ if "set_iam_policy" not in self._stubs:
920
+ self._stubs["set_iam_policy"] = self._logged_channel.unary_unary(
921
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/SetIamPolicy",
922
+ request_serializer=iam_policy_pb2.SetIamPolicyRequest.SerializeToString,
923
+ response_deserializer=policy_pb2.Policy.FromString,
924
+ )
925
+ return self._stubs["set_iam_policy"]
926
+
927
+ @property
928
+ def test_iam_permissions(
929
+ self,
930
+ ) -> Callable[
931
+ [iam_policy_pb2.TestIamPermissionsRequest],
932
+ Awaitable[iam_policy_pb2.TestIamPermissionsResponse],
933
+ ]:
934
+ r"""Return a callable for the test iam permissions method over gRPC.
935
+
936
+ Returns permissions that the caller has on the
937
+ specified instance resource.
938
+
939
+ Returns:
940
+ Callable[[~.TestIamPermissionsRequest],
941
+ Awaitable[~.TestIamPermissionsResponse]]:
942
+ A function that, when called, will call the underlying RPC
943
+ on the server.
944
+ """
945
+ # Generate a "stub function" on-the-fly which will actually make
946
+ # the request.
947
+ # gRPC handles serialization and deserialization, so we just need
948
+ # to pass in the functions for each.
949
+ if "test_iam_permissions" not in self._stubs:
950
+ self._stubs["test_iam_permissions"] = self._logged_channel.unary_unary(
951
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/TestIamPermissions",
952
+ request_serializer=iam_policy_pb2.TestIamPermissionsRequest.SerializeToString,
953
+ response_deserializer=iam_policy_pb2.TestIamPermissionsResponse.FromString,
954
+ )
955
+ return self._stubs["test_iam_permissions"]
956
+
957
+ @property
958
+ def list_hot_tablets(
959
+ self,
960
+ ) -> Callable[
961
+ [bigtable_instance_admin.ListHotTabletsRequest],
962
+ Awaitable[bigtable_instance_admin.ListHotTabletsResponse],
963
+ ]:
964
+ r"""Return a callable for the list hot tablets method over gRPC.
965
+
966
+ Lists hot tablets in a cluster, within the time range
967
+ provided. Hot tablets are ordered based on CPU usage.
968
+
969
+ Returns:
970
+ Callable[[~.ListHotTabletsRequest],
971
+ Awaitable[~.ListHotTabletsResponse]]:
972
+ A function that, when called, will call the underlying RPC
973
+ on the server.
974
+ """
975
+ # Generate a "stub function" on-the-fly which will actually make
976
+ # the request.
977
+ # gRPC handles serialization and deserialization, so we just need
978
+ # to pass in the functions for each.
979
+ if "list_hot_tablets" not in self._stubs:
980
+ self._stubs["list_hot_tablets"] = self._logged_channel.unary_unary(
981
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/ListHotTablets",
982
+ request_serializer=bigtable_instance_admin.ListHotTabletsRequest.serialize,
983
+ response_deserializer=bigtable_instance_admin.ListHotTabletsResponse.deserialize,
984
+ )
985
+ return self._stubs["list_hot_tablets"]
986
+
987
+ @property
988
+ def create_logical_view(
989
+ self,
990
+ ) -> Callable[
991
+ [bigtable_instance_admin.CreateLogicalViewRequest],
992
+ Awaitable[operations_pb2.Operation],
993
+ ]:
994
+ r"""Return a callable for the create logical view method over gRPC.
995
+
996
+ Creates a logical view within an instance.
997
+
998
+ Returns:
999
+ Callable[[~.CreateLogicalViewRequest],
1000
+ Awaitable[~.Operation]]:
1001
+ A function that, when called, will call the underlying RPC
1002
+ on the server.
1003
+ """
1004
+ # Generate a "stub function" on-the-fly which will actually make
1005
+ # the request.
1006
+ # gRPC handles serialization and deserialization, so we just need
1007
+ # to pass in the functions for each.
1008
+ if "create_logical_view" not in self._stubs:
1009
+ self._stubs["create_logical_view"] = self._logged_channel.unary_unary(
1010
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/CreateLogicalView",
1011
+ request_serializer=bigtable_instance_admin.CreateLogicalViewRequest.serialize,
1012
+ response_deserializer=operations_pb2.Operation.FromString,
1013
+ )
1014
+ return self._stubs["create_logical_view"]
1015
+
1016
+ @property
1017
+ def get_logical_view(
1018
+ self,
1019
+ ) -> Callable[
1020
+ [bigtable_instance_admin.GetLogicalViewRequest], Awaitable[instance.LogicalView]
1021
+ ]:
1022
+ r"""Return a callable for the get logical view method over gRPC.
1023
+
1024
+ Gets information about a logical view.
1025
+
1026
+ Returns:
1027
+ Callable[[~.GetLogicalViewRequest],
1028
+ Awaitable[~.LogicalView]]:
1029
+ A function that, when called, will call the underlying RPC
1030
+ on the server.
1031
+ """
1032
+ # Generate a "stub function" on-the-fly which will actually make
1033
+ # the request.
1034
+ # gRPC handles serialization and deserialization, so we just need
1035
+ # to pass in the functions for each.
1036
+ if "get_logical_view" not in self._stubs:
1037
+ self._stubs["get_logical_view"] = self._logged_channel.unary_unary(
1038
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/GetLogicalView",
1039
+ request_serializer=bigtable_instance_admin.GetLogicalViewRequest.serialize,
1040
+ response_deserializer=instance.LogicalView.deserialize,
1041
+ )
1042
+ return self._stubs["get_logical_view"]
1043
+
1044
+ @property
1045
+ def list_logical_views(
1046
+ self,
1047
+ ) -> Callable[
1048
+ [bigtable_instance_admin.ListLogicalViewsRequest],
1049
+ Awaitable[bigtable_instance_admin.ListLogicalViewsResponse],
1050
+ ]:
1051
+ r"""Return a callable for the list logical views method over gRPC.
1052
+
1053
+ Lists information about logical views in an instance.
1054
+
1055
+ Returns:
1056
+ Callable[[~.ListLogicalViewsRequest],
1057
+ Awaitable[~.ListLogicalViewsResponse]]:
1058
+ A function that, when called, will call the underlying RPC
1059
+ on the server.
1060
+ """
1061
+ # Generate a "stub function" on-the-fly which will actually make
1062
+ # the request.
1063
+ # gRPC handles serialization and deserialization, so we just need
1064
+ # to pass in the functions for each.
1065
+ if "list_logical_views" not in self._stubs:
1066
+ self._stubs["list_logical_views"] = self._logged_channel.unary_unary(
1067
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/ListLogicalViews",
1068
+ request_serializer=bigtable_instance_admin.ListLogicalViewsRequest.serialize,
1069
+ response_deserializer=bigtable_instance_admin.ListLogicalViewsResponse.deserialize,
1070
+ )
1071
+ return self._stubs["list_logical_views"]
1072
+
1073
+ @property
1074
+ def update_logical_view(
1075
+ self,
1076
+ ) -> Callable[
1077
+ [bigtable_instance_admin.UpdateLogicalViewRequest],
1078
+ Awaitable[operations_pb2.Operation],
1079
+ ]:
1080
+ r"""Return a callable for the update logical view method over gRPC.
1081
+
1082
+ Updates a logical view within an instance.
1083
+
1084
+ Returns:
1085
+ Callable[[~.UpdateLogicalViewRequest],
1086
+ Awaitable[~.Operation]]:
1087
+ A function that, when called, will call the underlying RPC
1088
+ on the server.
1089
+ """
1090
+ # Generate a "stub function" on-the-fly which will actually make
1091
+ # the request.
1092
+ # gRPC handles serialization and deserialization, so we just need
1093
+ # to pass in the functions for each.
1094
+ if "update_logical_view" not in self._stubs:
1095
+ self._stubs["update_logical_view"] = self._logged_channel.unary_unary(
1096
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/UpdateLogicalView",
1097
+ request_serializer=bigtable_instance_admin.UpdateLogicalViewRequest.serialize,
1098
+ response_deserializer=operations_pb2.Operation.FromString,
1099
+ )
1100
+ return self._stubs["update_logical_view"]
1101
+
1102
+ @property
1103
+ def delete_logical_view(
1104
+ self,
1105
+ ) -> Callable[
1106
+ [bigtable_instance_admin.DeleteLogicalViewRequest], Awaitable[empty_pb2.Empty]
1107
+ ]:
1108
+ r"""Return a callable for the delete logical view method over gRPC.
1109
+
1110
+ Deletes a logical view from an instance.
1111
+
1112
+ Returns:
1113
+ Callable[[~.DeleteLogicalViewRequest],
1114
+ Awaitable[~.Empty]]:
1115
+ A function that, when called, will call the underlying RPC
1116
+ on the server.
1117
+ """
1118
+ # Generate a "stub function" on-the-fly which will actually make
1119
+ # the request.
1120
+ # gRPC handles serialization and deserialization, so we just need
1121
+ # to pass in the functions for each.
1122
+ if "delete_logical_view" not in self._stubs:
1123
+ self._stubs["delete_logical_view"] = self._logged_channel.unary_unary(
1124
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/DeleteLogicalView",
1125
+ request_serializer=bigtable_instance_admin.DeleteLogicalViewRequest.serialize,
1126
+ response_deserializer=empty_pb2.Empty.FromString,
1127
+ )
1128
+ return self._stubs["delete_logical_view"]
1129
+
1130
+ @property
1131
+ def create_materialized_view(
1132
+ self,
1133
+ ) -> Callable[
1134
+ [bigtable_instance_admin.CreateMaterializedViewRequest],
1135
+ Awaitable[operations_pb2.Operation],
1136
+ ]:
1137
+ r"""Return a callable for the create materialized view method over gRPC.
1138
+
1139
+ Creates a materialized view within an instance.
1140
+
1141
+ Returns:
1142
+ Callable[[~.CreateMaterializedViewRequest],
1143
+ Awaitable[~.Operation]]:
1144
+ A function that, when called, will call the underlying RPC
1145
+ on the server.
1146
+ """
1147
+ # Generate a "stub function" on-the-fly which will actually make
1148
+ # the request.
1149
+ # gRPC handles serialization and deserialization, so we just need
1150
+ # to pass in the functions for each.
1151
+ if "create_materialized_view" not in self._stubs:
1152
+ self._stubs["create_materialized_view"] = self._logged_channel.unary_unary(
1153
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/CreateMaterializedView",
1154
+ request_serializer=bigtable_instance_admin.CreateMaterializedViewRequest.serialize,
1155
+ response_deserializer=operations_pb2.Operation.FromString,
1156
+ )
1157
+ return self._stubs["create_materialized_view"]
1158
+
1159
+ @property
1160
+ def get_materialized_view(
1161
+ self,
1162
+ ) -> Callable[
1163
+ [bigtable_instance_admin.GetMaterializedViewRequest],
1164
+ Awaitable[instance.MaterializedView],
1165
+ ]:
1166
+ r"""Return a callable for the get materialized view method over gRPC.
1167
+
1168
+ Gets information about a materialized view.
1169
+
1170
+ Returns:
1171
+ Callable[[~.GetMaterializedViewRequest],
1172
+ Awaitable[~.MaterializedView]]:
1173
+ A function that, when called, will call the underlying RPC
1174
+ on the server.
1175
+ """
1176
+ # Generate a "stub function" on-the-fly which will actually make
1177
+ # the request.
1178
+ # gRPC handles serialization and deserialization, so we just need
1179
+ # to pass in the functions for each.
1180
+ if "get_materialized_view" not in self._stubs:
1181
+ self._stubs["get_materialized_view"] = self._logged_channel.unary_unary(
1182
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/GetMaterializedView",
1183
+ request_serializer=bigtable_instance_admin.GetMaterializedViewRequest.serialize,
1184
+ response_deserializer=instance.MaterializedView.deserialize,
1185
+ )
1186
+ return self._stubs["get_materialized_view"]
1187
+
1188
+ @property
1189
+ def list_materialized_views(
1190
+ self,
1191
+ ) -> Callable[
1192
+ [bigtable_instance_admin.ListMaterializedViewsRequest],
1193
+ Awaitable[bigtable_instance_admin.ListMaterializedViewsResponse],
1194
+ ]:
1195
+ r"""Return a callable for the list materialized views method over gRPC.
1196
+
1197
+ Lists information about materialized views in an
1198
+ instance.
1199
+
1200
+ Returns:
1201
+ Callable[[~.ListMaterializedViewsRequest],
1202
+ Awaitable[~.ListMaterializedViewsResponse]]:
1203
+ A function that, when called, will call the underlying RPC
1204
+ on the server.
1205
+ """
1206
+ # Generate a "stub function" on-the-fly which will actually make
1207
+ # the request.
1208
+ # gRPC handles serialization and deserialization, so we just need
1209
+ # to pass in the functions for each.
1210
+ if "list_materialized_views" not in self._stubs:
1211
+ self._stubs["list_materialized_views"] = self._logged_channel.unary_unary(
1212
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/ListMaterializedViews",
1213
+ request_serializer=bigtable_instance_admin.ListMaterializedViewsRequest.serialize,
1214
+ response_deserializer=bigtable_instance_admin.ListMaterializedViewsResponse.deserialize,
1215
+ )
1216
+ return self._stubs["list_materialized_views"]
1217
+
1218
+ @property
1219
+ def update_materialized_view(
1220
+ self,
1221
+ ) -> Callable[
1222
+ [bigtable_instance_admin.UpdateMaterializedViewRequest],
1223
+ Awaitable[operations_pb2.Operation],
1224
+ ]:
1225
+ r"""Return a callable for the update materialized view method over gRPC.
1226
+
1227
+ Updates a materialized view within an instance.
1228
+
1229
+ Returns:
1230
+ Callable[[~.UpdateMaterializedViewRequest],
1231
+ Awaitable[~.Operation]]:
1232
+ A function that, when called, will call the underlying RPC
1233
+ on the server.
1234
+ """
1235
+ # Generate a "stub function" on-the-fly which will actually make
1236
+ # the request.
1237
+ # gRPC handles serialization and deserialization, so we just need
1238
+ # to pass in the functions for each.
1239
+ if "update_materialized_view" not in self._stubs:
1240
+ self._stubs["update_materialized_view"] = self._logged_channel.unary_unary(
1241
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/UpdateMaterializedView",
1242
+ request_serializer=bigtable_instance_admin.UpdateMaterializedViewRequest.serialize,
1243
+ response_deserializer=operations_pb2.Operation.FromString,
1244
+ )
1245
+ return self._stubs["update_materialized_view"]
1246
+
1247
+ @property
1248
+ def delete_materialized_view(
1249
+ self,
1250
+ ) -> Callable[
1251
+ [bigtable_instance_admin.DeleteMaterializedViewRequest],
1252
+ Awaitable[empty_pb2.Empty],
1253
+ ]:
1254
+ r"""Return a callable for the delete materialized view method over gRPC.
1255
+
1256
+ Deletes a materialized view from an instance.
1257
+
1258
+ Returns:
1259
+ Callable[[~.DeleteMaterializedViewRequest],
1260
+ Awaitable[~.Empty]]:
1261
+ A function that, when called, will call the underlying RPC
1262
+ on the server.
1263
+ """
1264
+ # Generate a "stub function" on-the-fly which will actually make
1265
+ # the request.
1266
+ # gRPC handles serialization and deserialization, so we just need
1267
+ # to pass in the functions for each.
1268
+ if "delete_materialized_view" not in self._stubs:
1269
+ self._stubs["delete_materialized_view"] = self._logged_channel.unary_unary(
1270
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/DeleteMaterializedView",
1271
+ request_serializer=bigtable_instance_admin.DeleteMaterializedViewRequest.serialize,
1272
+ response_deserializer=empty_pb2.Empty.FromString,
1273
+ )
1274
+ return self._stubs["delete_materialized_view"]
1275
+
1276
+ def _prep_wrapped_messages(self, client_info):
1277
+ """Precompute the wrapped methods, overriding the base class method to use async wrappers."""
1278
+ self._wrapped_methods = {
1279
+ self.create_instance: self._wrap_method(
1280
+ self.create_instance,
1281
+ default_timeout=300.0,
1282
+ client_info=client_info,
1283
+ ),
1284
+ self.get_instance: self._wrap_method(
1285
+ self.get_instance,
1286
+ default_retry=retries.AsyncRetry(
1287
+ initial=1.0,
1288
+ maximum=60.0,
1289
+ multiplier=2,
1290
+ predicate=retries.if_exception_type(
1291
+ core_exceptions.DeadlineExceeded,
1292
+ core_exceptions.ServiceUnavailable,
1293
+ ),
1294
+ deadline=60.0,
1295
+ ),
1296
+ default_timeout=60.0,
1297
+ client_info=client_info,
1298
+ ),
1299
+ self.list_instances: self._wrap_method(
1300
+ self.list_instances,
1301
+ default_retry=retries.AsyncRetry(
1302
+ initial=1.0,
1303
+ maximum=60.0,
1304
+ multiplier=2,
1305
+ predicate=retries.if_exception_type(
1306
+ core_exceptions.DeadlineExceeded,
1307
+ core_exceptions.ServiceUnavailable,
1308
+ ),
1309
+ deadline=60.0,
1310
+ ),
1311
+ default_timeout=60.0,
1312
+ client_info=client_info,
1313
+ ),
1314
+ self.update_instance: self._wrap_method(
1315
+ self.update_instance,
1316
+ default_retry=retries.AsyncRetry(
1317
+ initial=1.0,
1318
+ maximum=60.0,
1319
+ multiplier=2,
1320
+ predicate=retries.if_exception_type(
1321
+ core_exceptions.DeadlineExceeded,
1322
+ core_exceptions.ServiceUnavailable,
1323
+ ),
1324
+ deadline=60.0,
1325
+ ),
1326
+ default_timeout=60.0,
1327
+ client_info=client_info,
1328
+ ),
1329
+ self.partial_update_instance: self._wrap_method(
1330
+ self.partial_update_instance,
1331
+ default_retry=retries.AsyncRetry(
1332
+ initial=1.0,
1333
+ maximum=60.0,
1334
+ multiplier=2,
1335
+ predicate=retries.if_exception_type(
1336
+ core_exceptions.DeadlineExceeded,
1337
+ core_exceptions.ServiceUnavailable,
1338
+ ),
1339
+ deadline=60.0,
1340
+ ),
1341
+ default_timeout=60.0,
1342
+ client_info=client_info,
1343
+ ),
1344
+ self.delete_instance: self._wrap_method(
1345
+ self.delete_instance,
1346
+ default_timeout=60.0,
1347
+ client_info=client_info,
1348
+ ),
1349
+ self.create_cluster: self._wrap_method(
1350
+ self.create_cluster,
1351
+ default_timeout=60.0,
1352
+ client_info=client_info,
1353
+ ),
1354
+ self.get_cluster: self._wrap_method(
1355
+ self.get_cluster,
1356
+ default_retry=retries.AsyncRetry(
1357
+ initial=1.0,
1358
+ maximum=60.0,
1359
+ multiplier=2,
1360
+ predicate=retries.if_exception_type(
1361
+ core_exceptions.DeadlineExceeded,
1362
+ core_exceptions.ServiceUnavailable,
1363
+ ),
1364
+ deadline=60.0,
1365
+ ),
1366
+ default_timeout=60.0,
1367
+ client_info=client_info,
1368
+ ),
1369
+ self.list_clusters: self._wrap_method(
1370
+ self.list_clusters,
1371
+ default_retry=retries.AsyncRetry(
1372
+ initial=1.0,
1373
+ maximum=60.0,
1374
+ multiplier=2,
1375
+ predicate=retries.if_exception_type(
1376
+ core_exceptions.DeadlineExceeded,
1377
+ core_exceptions.ServiceUnavailable,
1378
+ ),
1379
+ deadline=60.0,
1380
+ ),
1381
+ default_timeout=60.0,
1382
+ client_info=client_info,
1383
+ ),
1384
+ self.update_cluster: self._wrap_method(
1385
+ self.update_cluster,
1386
+ default_retry=retries.AsyncRetry(
1387
+ initial=1.0,
1388
+ maximum=60.0,
1389
+ multiplier=2,
1390
+ predicate=retries.if_exception_type(
1391
+ core_exceptions.DeadlineExceeded,
1392
+ core_exceptions.ServiceUnavailable,
1393
+ ),
1394
+ deadline=60.0,
1395
+ ),
1396
+ default_timeout=60.0,
1397
+ client_info=client_info,
1398
+ ),
1399
+ self.partial_update_cluster: self._wrap_method(
1400
+ self.partial_update_cluster,
1401
+ default_timeout=None,
1402
+ client_info=client_info,
1403
+ ),
1404
+ self.delete_cluster: self._wrap_method(
1405
+ self.delete_cluster,
1406
+ default_timeout=60.0,
1407
+ client_info=client_info,
1408
+ ),
1409
+ self.create_app_profile: self._wrap_method(
1410
+ self.create_app_profile,
1411
+ default_timeout=60.0,
1412
+ client_info=client_info,
1413
+ ),
1414
+ self.get_app_profile: self._wrap_method(
1415
+ self.get_app_profile,
1416
+ default_retry=retries.AsyncRetry(
1417
+ initial=1.0,
1418
+ maximum=60.0,
1419
+ multiplier=2,
1420
+ predicate=retries.if_exception_type(
1421
+ core_exceptions.DeadlineExceeded,
1422
+ core_exceptions.ServiceUnavailable,
1423
+ ),
1424
+ deadline=60.0,
1425
+ ),
1426
+ default_timeout=60.0,
1427
+ client_info=client_info,
1428
+ ),
1429
+ self.list_app_profiles: self._wrap_method(
1430
+ self.list_app_profiles,
1431
+ default_retry=retries.AsyncRetry(
1432
+ initial=1.0,
1433
+ maximum=60.0,
1434
+ multiplier=2,
1435
+ predicate=retries.if_exception_type(
1436
+ core_exceptions.DeadlineExceeded,
1437
+ core_exceptions.ServiceUnavailable,
1438
+ ),
1439
+ deadline=60.0,
1440
+ ),
1441
+ default_timeout=60.0,
1442
+ client_info=client_info,
1443
+ ),
1444
+ self.update_app_profile: self._wrap_method(
1445
+ self.update_app_profile,
1446
+ default_retry=retries.AsyncRetry(
1447
+ initial=1.0,
1448
+ maximum=60.0,
1449
+ multiplier=2,
1450
+ predicate=retries.if_exception_type(
1451
+ core_exceptions.DeadlineExceeded,
1452
+ core_exceptions.ServiceUnavailable,
1453
+ ),
1454
+ deadline=60.0,
1455
+ ),
1456
+ default_timeout=60.0,
1457
+ client_info=client_info,
1458
+ ),
1459
+ self.delete_app_profile: self._wrap_method(
1460
+ self.delete_app_profile,
1461
+ default_timeout=60.0,
1462
+ client_info=client_info,
1463
+ ),
1464
+ self.get_iam_policy: self._wrap_method(
1465
+ self.get_iam_policy,
1466
+ default_retry=retries.AsyncRetry(
1467
+ initial=1.0,
1468
+ maximum=60.0,
1469
+ multiplier=2,
1470
+ predicate=retries.if_exception_type(
1471
+ core_exceptions.DeadlineExceeded,
1472
+ core_exceptions.ServiceUnavailable,
1473
+ ),
1474
+ deadline=60.0,
1475
+ ),
1476
+ default_timeout=60.0,
1477
+ client_info=client_info,
1478
+ ),
1479
+ self.set_iam_policy: self._wrap_method(
1480
+ self.set_iam_policy,
1481
+ default_timeout=60.0,
1482
+ client_info=client_info,
1483
+ ),
1484
+ self.test_iam_permissions: self._wrap_method(
1485
+ self.test_iam_permissions,
1486
+ default_retry=retries.AsyncRetry(
1487
+ initial=1.0,
1488
+ maximum=60.0,
1489
+ multiplier=2,
1490
+ predicate=retries.if_exception_type(
1491
+ core_exceptions.DeadlineExceeded,
1492
+ core_exceptions.ServiceUnavailable,
1493
+ ),
1494
+ deadline=60.0,
1495
+ ),
1496
+ default_timeout=60.0,
1497
+ client_info=client_info,
1498
+ ),
1499
+ self.list_hot_tablets: self._wrap_method(
1500
+ self.list_hot_tablets,
1501
+ default_retry=retries.AsyncRetry(
1502
+ initial=1.0,
1503
+ maximum=60.0,
1504
+ multiplier=2,
1505
+ predicate=retries.if_exception_type(
1506
+ core_exceptions.DeadlineExceeded,
1507
+ core_exceptions.ServiceUnavailable,
1508
+ ),
1509
+ deadline=60.0,
1510
+ ),
1511
+ default_timeout=60.0,
1512
+ client_info=client_info,
1513
+ ),
1514
+ self.create_logical_view: self._wrap_method(
1515
+ self.create_logical_view,
1516
+ default_timeout=None,
1517
+ client_info=client_info,
1518
+ ),
1519
+ self.get_logical_view: self._wrap_method(
1520
+ self.get_logical_view,
1521
+ default_timeout=None,
1522
+ client_info=client_info,
1523
+ ),
1524
+ self.list_logical_views: self._wrap_method(
1525
+ self.list_logical_views,
1526
+ default_timeout=None,
1527
+ client_info=client_info,
1528
+ ),
1529
+ self.update_logical_view: self._wrap_method(
1530
+ self.update_logical_view,
1531
+ default_timeout=None,
1532
+ client_info=client_info,
1533
+ ),
1534
+ self.delete_logical_view: self._wrap_method(
1535
+ self.delete_logical_view,
1536
+ default_timeout=None,
1537
+ client_info=client_info,
1538
+ ),
1539
+ self.create_materialized_view: self._wrap_method(
1540
+ self.create_materialized_view,
1541
+ default_timeout=None,
1542
+ client_info=client_info,
1543
+ ),
1544
+ self.get_materialized_view: self._wrap_method(
1545
+ self.get_materialized_view,
1546
+ default_timeout=None,
1547
+ client_info=client_info,
1548
+ ),
1549
+ self.list_materialized_views: self._wrap_method(
1550
+ self.list_materialized_views,
1551
+ default_timeout=None,
1552
+ client_info=client_info,
1553
+ ),
1554
+ self.update_materialized_view: self._wrap_method(
1555
+ self.update_materialized_view,
1556
+ default_timeout=None,
1557
+ client_info=client_info,
1558
+ ),
1559
+ self.delete_materialized_view: self._wrap_method(
1560
+ self.delete_materialized_view,
1561
+ default_timeout=None,
1562
+ client_info=client_info,
1563
+ ),
1564
+ }
1565
+
1566
+ def _wrap_method(self, func, *args, **kwargs):
1567
+ if self._wrap_with_kind: # pragma: NO COVER
1568
+ kwargs["kind"] = self.kind
1569
+ return gapic_v1.method_async.wrap_method(func, *args, **kwargs)
1570
+
1571
+ def close(self):
1572
+ return self._logged_channel.close()
1573
+
1574
+ @property
1575
+ def kind(self) -> str:
1576
+ return "grpc_asyncio"
1577
+
1578
+
1579
+ __all__ = ("BigtableInstanceAdminGrpcAsyncIOTransport",)