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,1249 @@
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 json
17
+ import logging as std_logging
18
+ import pickle
19
+ import warnings
20
+ from typing import Callable, Dict, Optional, Sequence, Tuple, Union
21
+
22
+ from google.api_core import grpc_helpers
23
+ from google.api_core import operations_v1
24
+ from google.api_core import gapic_v1
25
+ import google.auth # type: ignore
26
+ from google.auth import credentials as ga_credentials # type: ignore
27
+ from google.auth.transport.grpc import SslCredentials # type: ignore
28
+ from google.protobuf.json_format import MessageToJson
29
+ import google.protobuf.message
30
+
31
+ import grpc # type: ignore
32
+ import proto # type: ignore
33
+
34
+ from google.cloud.bigtable_admin_v2.types import bigtable_instance_admin
35
+ from google.cloud.bigtable_admin_v2.types import instance
36
+ from google.iam.v1 import iam_policy_pb2 # type: ignore
37
+ from google.iam.v1 import policy_pb2 # type: ignore
38
+ from google.longrunning import operations_pb2 # type: ignore
39
+ from google.protobuf import empty_pb2 # type: ignore
40
+ from .base import BigtableInstanceAdminTransport, DEFAULT_CLIENT_INFO
41
+
42
+ try:
43
+ from google.api_core import client_logging # type: ignore
44
+
45
+ CLIENT_LOGGING_SUPPORTED = True # pragma: NO COVER
46
+ except ImportError: # pragma: NO COVER
47
+ CLIENT_LOGGING_SUPPORTED = False
48
+
49
+ _LOGGER = std_logging.getLogger(__name__)
50
+
51
+
52
+ class _LoggingClientInterceptor(grpc.UnaryUnaryClientInterceptor): # pragma: NO COVER
53
+ def intercept_unary_unary(self, continuation, client_call_details, request):
54
+ logging_enabled = CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor(
55
+ std_logging.DEBUG
56
+ )
57
+ if logging_enabled: # pragma: NO COVER
58
+ request_metadata = client_call_details.metadata
59
+ if isinstance(request, proto.Message):
60
+ request_payload = type(request).to_json(request)
61
+ elif isinstance(request, google.protobuf.message.Message):
62
+ request_payload = MessageToJson(request)
63
+ else:
64
+ request_payload = f"{type(request).__name__}: {pickle.dumps(request)}"
65
+
66
+ request_metadata = {
67
+ key: value.decode("utf-8") if isinstance(value, bytes) else value
68
+ for key, value in request_metadata
69
+ }
70
+ grpc_request = {
71
+ "payload": request_payload,
72
+ "requestMethod": "grpc",
73
+ "metadata": dict(request_metadata),
74
+ }
75
+ _LOGGER.debug(
76
+ f"Sending request for {client_call_details.method}",
77
+ extra={
78
+ "serviceName": "google.bigtable.admin.v2.BigtableInstanceAdmin",
79
+ "rpcName": client_call_details.method,
80
+ "request": grpc_request,
81
+ "metadata": grpc_request["metadata"],
82
+ },
83
+ )
84
+
85
+ response = continuation(client_call_details, request)
86
+ if logging_enabled: # pragma: NO COVER
87
+ response_metadata = response.trailing_metadata()
88
+ # Convert gRPC metadata `<class 'grpc.aio._metadata.Metadata'>` to list of tuples
89
+ metadata = (
90
+ dict([(k, str(v)) for k, v in response_metadata])
91
+ if response_metadata
92
+ else None
93
+ )
94
+ result = response.result()
95
+ if isinstance(result, proto.Message):
96
+ response_payload = type(result).to_json(result)
97
+ elif isinstance(result, google.protobuf.message.Message):
98
+ response_payload = MessageToJson(result)
99
+ else:
100
+ response_payload = f"{type(result).__name__}: {pickle.dumps(result)}"
101
+ grpc_response = {
102
+ "payload": response_payload,
103
+ "metadata": metadata,
104
+ "status": "OK",
105
+ }
106
+ _LOGGER.debug(
107
+ f"Received response for {client_call_details.method}.",
108
+ extra={
109
+ "serviceName": "google.bigtable.admin.v2.BigtableInstanceAdmin",
110
+ "rpcName": client_call_details.method,
111
+ "response": grpc_response,
112
+ "metadata": grpc_response["metadata"],
113
+ },
114
+ )
115
+ return response
116
+
117
+
118
+ class BigtableInstanceAdminGrpcTransport(BigtableInstanceAdminTransport):
119
+ """gRPC backend transport for BigtableInstanceAdmin.
120
+
121
+ Service for creating, configuring, and deleting Cloud
122
+ Bigtable Instances and Clusters. Provides access to the Instance
123
+ and Cluster schemas only, not the tables' metadata or data
124
+ stored in those tables.
125
+
126
+ This class defines the same methods as the primary client, so the
127
+ primary client can load the underlying transport implementation
128
+ and call it.
129
+
130
+ It sends protocol buffers over the wire using gRPC (which is built on
131
+ top of HTTP/2); the ``grpcio`` package must be installed.
132
+ """
133
+
134
+ _stubs: Dict[str, Callable]
135
+
136
+ def __init__(
137
+ self,
138
+ *,
139
+ host: str = "bigtableadmin.googleapis.com",
140
+ credentials: Optional[ga_credentials.Credentials] = None,
141
+ credentials_file: Optional[str] = None,
142
+ scopes: Optional[Sequence[str]] = None,
143
+ channel: Optional[Union[grpc.Channel, Callable[..., grpc.Channel]]] = None,
144
+ api_mtls_endpoint: Optional[str] = None,
145
+ client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None,
146
+ ssl_channel_credentials: Optional[grpc.ChannelCredentials] = None,
147
+ client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None,
148
+ quota_project_id: Optional[str] = None,
149
+ client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
150
+ always_use_jwt_access: Optional[bool] = False,
151
+ api_audience: Optional[str] = None,
152
+ ) -> None:
153
+ """Instantiate the transport.
154
+
155
+ Args:
156
+ host (Optional[str]):
157
+ The hostname to connect to (default: 'bigtableadmin.googleapis.com').
158
+ credentials (Optional[google.auth.credentials.Credentials]): The
159
+ authorization credentials to attach to requests. These
160
+ credentials identify the application to the service; if none
161
+ are specified, the client will attempt to ascertain the
162
+ credentials from the environment.
163
+ This argument is ignored if a ``channel`` instance is provided.
164
+ credentials_file (Optional[str]): A file with credentials that can
165
+ be loaded with :func:`google.auth.load_credentials_from_file`.
166
+ This argument is ignored if a ``channel`` instance is provided.
167
+ scopes (Optional(Sequence[str])): A list of scopes. This argument is
168
+ ignored if a ``channel`` instance is provided.
169
+ channel (Optional[Union[grpc.Channel, Callable[..., grpc.Channel]]]):
170
+ A ``Channel`` instance through which to make calls, or a Callable
171
+ that constructs and returns one. If set to None, ``self.create_channel``
172
+ is used to create the channel. If a Callable is given, it will be called
173
+ with the same arguments as used in ``self.create_channel``.
174
+ api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint.
175
+ If provided, it overrides the ``host`` argument and tries to create
176
+ a mutual TLS channel with client SSL credentials from
177
+ ``client_cert_source`` or application default SSL credentials.
178
+ client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]):
179
+ Deprecated. A callback to provide client SSL certificate bytes and
180
+ private key bytes, both in PEM format. It is ignored if
181
+ ``api_mtls_endpoint`` is None.
182
+ ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials
183
+ for the grpc channel. It is ignored if a ``channel`` instance is provided.
184
+ client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]):
185
+ A callback to provide client certificate bytes and private key bytes,
186
+ both in PEM format. It is used to configure a mutual TLS channel. It is
187
+ ignored if a ``channel`` instance or ``ssl_channel_credentials`` is provided.
188
+ quota_project_id (Optional[str]): An optional project to use for billing
189
+ and quota.
190
+ client_info (google.api_core.gapic_v1.client_info.ClientInfo):
191
+ The client info used to send a user-agent string along with
192
+ API requests. If ``None``, then default info will be used.
193
+ Generally, you only need to set this if you're developing
194
+ your own client library.
195
+ always_use_jwt_access (Optional[bool]): Whether self signed JWT should
196
+ be used for service account credentials.
197
+
198
+ Raises:
199
+ google.auth.exceptions.MutualTLSChannelError: If mutual TLS transport
200
+ creation failed for any reason.
201
+ google.api_core.exceptions.DuplicateCredentialArgs: If both ``credentials``
202
+ and ``credentials_file`` are passed.
203
+ """
204
+ self._grpc_channel = None
205
+ self._ssl_channel_credentials = ssl_channel_credentials
206
+ self._stubs: Dict[str, Callable] = {}
207
+ self._operations_client: Optional[operations_v1.OperationsClient] = None
208
+
209
+ if api_mtls_endpoint:
210
+ warnings.warn("api_mtls_endpoint is deprecated", DeprecationWarning)
211
+ if client_cert_source:
212
+ warnings.warn("client_cert_source is deprecated", DeprecationWarning)
213
+
214
+ if isinstance(channel, grpc.Channel):
215
+ # Ignore credentials if a channel was passed.
216
+ credentials = None
217
+ self._ignore_credentials = True
218
+ # If a channel was explicitly provided, set it.
219
+ self._grpc_channel = channel
220
+ self._ssl_channel_credentials = None
221
+
222
+ else:
223
+ if api_mtls_endpoint:
224
+ host = api_mtls_endpoint
225
+
226
+ # Create SSL credentials with client_cert_source or application
227
+ # default SSL credentials.
228
+ if client_cert_source:
229
+ cert, key = client_cert_source()
230
+ self._ssl_channel_credentials = grpc.ssl_channel_credentials(
231
+ certificate_chain=cert, private_key=key
232
+ )
233
+ else:
234
+ self._ssl_channel_credentials = SslCredentials().ssl_credentials
235
+
236
+ else:
237
+ if client_cert_source_for_mtls and not ssl_channel_credentials:
238
+ cert, key = client_cert_source_for_mtls()
239
+ self._ssl_channel_credentials = grpc.ssl_channel_credentials(
240
+ certificate_chain=cert, private_key=key
241
+ )
242
+
243
+ # The base transport sets the host, credentials and scopes
244
+ super().__init__(
245
+ host=host,
246
+ credentials=credentials,
247
+ credentials_file=credentials_file,
248
+ scopes=scopes,
249
+ quota_project_id=quota_project_id,
250
+ client_info=client_info,
251
+ always_use_jwt_access=always_use_jwt_access,
252
+ api_audience=api_audience,
253
+ )
254
+
255
+ if not self._grpc_channel:
256
+ # initialize with the provided callable or the default channel
257
+ channel_init = channel or type(self).create_channel
258
+ self._grpc_channel = channel_init(
259
+ self._host,
260
+ # use the credentials which are saved
261
+ credentials=self._credentials,
262
+ # Set ``credentials_file`` to ``None`` here as
263
+ # the credentials that we saved earlier should be used.
264
+ credentials_file=None,
265
+ scopes=self._scopes,
266
+ ssl_credentials=self._ssl_channel_credentials,
267
+ quota_project_id=quota_project_id,
268
+ options=[
269
+ ("grpc.max_send_message_length", -1),
270
+ ("grpc.max_receive_message_length", -1),
271
+ ],
272
+ )
273
+
274
+ self._interceptor = _LoggingClientInterceptor()
275
+ self._logged_channel = grpc.intercept_channel(
276
+ self._grpc_channel, self._interceptor
277
+ )
278
+
279
+ # Wrap messages. This must be done after self._logged_channel exists
280
+ self._prep_wrapped_messages(client_info)
281
+
282
+ @classmethod
283
+ def create_channel(
284
+ cls,
285
+ host: str = "bigtableadmin.googleapis.com",
286
+ credentials: Optional[ga_credentials.Credentials] = None,
287
+ credentials_file: Optional[str] = None,
288
+ scopes: Optional[Sequence[str]] = None,
289
+ quota_project_id: Optional[str] = None,
290
+ **kwargs,
291
+ ) -> grpc.Channel:
292
+ """Create and return a gRPC channel object.
293
+ Args:
294
+ host (Optional[str]): The host for the channel to use.
295
+ credentials (Optional[~.Credentials]): The
296
+ authorization credentials to attach to requests. These
297
+ credentials identify this application to the service. If
298
+ none are specified, the client will attempt to ascertain
299
+ the credentials from the environment.
300
+ credentials_file (Optional[str]): A file with credentials that can
301
+ be loaded with :func:`google.auth.load_credentials_from_file`.
302
+ This argument is mutually exclusive with credentials.
303
+ scopes (Optional[Sequence[str]]): A optional list of scopes needed for this
304
+ service. These are only used when credentials are not specified and
305
+ are passed to :func:`google.auth.default`.
306
+ quota_project_id (Optional[str]): An optional project to use for billing
307
+ and quota.
308
+ kwargs (Optional[dict]): Keyword arguments, which are passed to the
309
+ channel creation.
310
+ Returns:
311
+ grpc.Channel: A gRPC channel object.
312
+
313
+ Raises:
314
+ google.api_core.exceptions.DuplicateCredentialArgs: If both ``credentials``
315
+ and ``credentials_file`` are passed.
316
+ """
317
+
318
+ return grpc_helpers.create_channel(
319
+ host,
320
+ credentials=credentials,
321
+ credentials_file=credentials_file,
322
+ quota_project_id=quota_project_id,
323
+ default_scopes=cls.AUTH_SCOPES,
324
+ scopes=scopes,
325
+ default_host=cls.DEFAULT_HOST,
326
+ **kwargs,
327
+ )
328
+
329
+ @property
330
+ def grpc_channel(self) -> grpc.Channel:
331
+ """Return the channel designed to connect to this service."""
332
+ return self._grpc_channel
333
+
334
+ @property
335
+ def operations_client(self) -> operations_v1.OperationsClient:
336
+ """Create the client designed to process long-running operations.
337
+
338
+ This property caches on the instance; repeated calls return the same
339
+ client.
340
+ """
341
+ # Quick check: Only create a new client if we do not already have one.
342
+ if self._operations_client is None:
343
+ self._operations_client = operations_v1.OperationsClient(
344
+ self._logged_channel
345
+ )
346
+
347
+ # Return the client from cache.
348
+ return self._operations_client
349
+
350
+ @property
351
+ def create_instance(
352
+ self,
353
+ ) -> Callable[
354
+ [bigtable_instance_admin.CreateInstanceRequest], operations_pb2.Operation
355
+ ]:
356
+ r"""Return a callable for the create instance method over gRPC.
357
+
358
+ Create an instance within a project.
359
+
360
+ Note that exactly one of Cluster.serve_nodes and
361
+ Cluster.cluster_config.cluster_autoscaling_config can be set. If
362
+ serve_nodes is set to non-zero, then the cluster is manually
363
+ scaled. If cluster_config.cluster_autoscaling_config is
364
+ non-empty, then autoscaling is enabled.
365
+
366
+ Returns:
367
+ Callable[[~.CreateInstanceRequest],
368
+ ~.Operation]:
369
+ A function that, when called, will call the underlying RPC
370
+ on the server.
371
+ """
372
+ # Generate a "stub function" on-the-fly which will actually make
373
+ # the request.
374
+ # gRPC handles serialization and deserialization, so we just need
375
+ # to pass in the functions for each.
376
+ if "create_instance" not in self._stubs:
377
+ self._stubs["create_instance"] = self._logged_channel.unary_unary(
378
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/CreateInstance",
379
+ request_serializer=bigtable_instance_admin.CreateInstanceRequest.serialize,
380
+ response_deserializer=operations_pb2.Operation.FromString,
381
+ )
382
+ return self._stubs["create_instance"]
383
+
384
+ @property
385
+ def get_instance(
386
+ self,
387
+ ) -> Callable[[bigtable_instance_admin.GetInstanceRequest], instance.Instance]:
388
+ r"""Return a callable for the get instance method over gRPC.
389
+
390
+ Gets information about an instance.
391
+
392
+ Returns:
393
+ Callable[[~.GetInstanceRequest],
394
+ ~.Instance]:
395
+ A function that, when called, will call the underlying RPC
396
+ on the server.
397
+ """
398
+ # Generate a "stub function" on-the-fly which will actually make
399
+ # the request.
400
+ # gRPC handles serialization and deserialization, so we just need
401
+ # to pass in the functions for each.
402
+ if "get_instance" not in self._stubs:
403
+ self._stubs["get_instance"] = self._logged_channel.unary_unary(
404
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/GetInstance",
405
+ request_serializer=bigtable_instance_admin.GetInstanceRequest.serialize,
406
+ response_deserializer=instance.Instance.deserialize,
407
+ )
408
+ return self._stubs["get_instance"]
409
+
410
+ @property
411
+ def list_instances(
412
+ self,
413
+ ) -> Callable[
414
+ [bigtable_instance_admin.ListInstancesRequest],
415
+ bigtable_instance_admin.ListInstancesResponse,
416
+ ]:
417
+ r"""Return a callable for the list instances method over gRPC.
418
+
419
+ Lists information about instances in a project.
420
+
421
+ Returns:
422
+ Callable[[~.ListInstancesRequest],
423
+ ~.ListInstancesResponse]:
424
+ A function that, when called, will call the underlying RPC
425
+ on the server.
426
+ """
427
+ # Generate a "stub function" on-the-fly which will actually make
428
+ # the request.
429
+ # gRPC handles serialization and deserialization, so we just need
430
+ # to pass in the functions for each.
431
+ if "list_instances" not in self._stubs:
432
+ self._stubs["list_instances"] = self._logged_channel.unary_unary(
433
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/ListInstances",
434
+ request_serializer=bigtable_instance_admin.ListInstancesRequest.serialize,
435
+ response_deserializer=bigtable_instance_admin.ListInstancesResponse.deserialize,
436
+ )
437
+ return self._stubs["list_instances"]
438
+
439
+ @property
440
+ def update_instance(self) -> Callable[[instance.Instance], instance.Instance]:
441
+ r"""Return a callable for the update instance method over gRPC.
442
+
443
+ Updates an instance within a project. This method
444
+ updates only the display name and type for an Instance.
445
+ To update other Instance properties, such as labels, use
446
+ PartialUpdateInstance.
447
+
448
+ Returns:
449
+ Callable[[~.Instance],
450
+ ~.Instance]:
451
+ A function that, when called, will call the underlying RPC
452
+ on the server.
453
+ """
454
+ # Generate a "stub function" on-the-fly which will actually make
455
+ # the request.
456
+ # gRPC handles serialization and deserialization, so we just need
457
+ # to pass in the functions for each.
458
+ if "update_instance" not in self._stubs:
459
+ self._stubs["update_instance"] = self._logged_channel.unary_unary(
460
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/UpdateInstance",
461
+ request_serializer=instance.Instance.serialize,
462
+ response_deserializer=instance.Instance.deserialize,
463
+ )
464
+ return self._stubs["update_instance"]
465
+
466
+ @property
467
+ def partial_update_instance(
468
+ self,
469
+ ) -> Callable[
470
+ [bigtable_instance_admin.PartialUpdateInstanceRequest], operations_pb2.Operation
471
+ ]:
472
+ r"""Return a callable for the partial update instance method over gRPC.
473
+
474
+ Partially updates an instance within a project. This
475
+ method can modify all fields of an Instance and is the
476
+ preferred way to update an Instance.
477
+
478
+ Returns:
479
+ Callable[[~.PartialUpdateInstanceRequest],
480
+ ~.Operation]:
481
+ A function that, when called, will call the underlying RPC
482
+ on the server.
483
+ """
484
+ # Generate a "stub function" on-the-fly which will actually make
485
+ # the request.
486
+ # gRPC handles serialization and deserialization, so we just need
487
+ # to pass in the functions for each.
488
+ if "partial_update_instance" not in self._stubs:
489
+ self._stubs["partial_update_instance"] = self._logged_channel.unary_unary(
490
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/PartialUpdateInstance",
491
+ request_serializer=bigtable_instance_admin.PartialUpdateInstanceRequest.serialize,
492
+ response_deserializer=operations_pb2.Operation.FromString,
493
+ )
494
+ return self._stubs["partial_update_instance"]
495
+
496
+ @property
497
+ def delete_instance(
498
+ self,
499
+ ) -> Callable[[bigtable_instance_admin.DeleteInstanceRequest], empty_pb2.Empty]:
500
+ r"""Return a callable for the delete instance method over gRPC.
501
+
502
+ Delete an instance from a project.
503
+
504
+ Returns:
505
+ Callable[[~.DeleteInstanceRequest],
506
+ ~.Empty]:
507
+ A function that, when called, will call the underlying RPC
508
+ on the server.
509
+ """
510
+ # Generate a "stub function" on-the-fly which will actually make
511
+ # the request.
512
+ # gRPC handles serialization and deserialization, so we just need
513
+ # to pass in the functions for each.
514
+ if "delete_instance" not in self._stubs:
515
+ self._stubs["delete_instance"] = self._logged_channel.unary_unary(
516
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/DeleteInstance",
517
+ request_serializer=bigtable_instance_admin.DeleteInstanceRequest.serialize,
518
+ response_deserializer=empty_pb2.Empty.FromString,
519
+ )
520
+ return self._stubs["delete_instance"]
521
+
522
+ @property
523
+ def create_cluster(
524
+ self,
525
+ ) -> Callable[
526
+ [bigtable_instance_admin.CreateClusterRequest], operations_pb2.Operation
527
+ ]:
528
+ r"""Return a callable for the create cluster method over gRPC.
529
+
530
+ Creates a cluster within an instance.
531
+
532
+ Note that exactly one of Cluster.serve_nodes and
533
+ Cluster.cluster_config.cluster_autoscaling_config can be set. If
534
+ serve_nodes is set to non-zero, then the cluster is manually
535
+ scaled. If cluster_config.cluster_autoscaling_config is
536
+ non-empty, then autoscaling is enabled.
537
+
538
+ Returns:
539
+ Callable[[~.CreateClusterRequest],
540
+ ~.Operation]:
541
+ A function that, when called, will call the underlying RPC
542
+ on the server.
543
+ """
544
+ # Generate a "stub function" on-the-fly which will actually make
545
+ # the request.
546
+ # gRPC handles serialization and deserialization, so we just need
547
+ # to pass in the functions for each.
548
+ if "create_cluster" not in self._stubs:
549
+ self._stubs["create_cluster"] = self._logged_channel.unary_unary(
550
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/CreateCluster",
551
+ request_serializer=bigtable_instance_admin.CreateClusterRequest.serialize,
552
+ response_deserializer=operations_pb2.Operation.FromString,
553
+ )
554
+ return self._stubs["create_cluster"]
555
+
556
+ @property
557
+ def get_cluster(
558
+ self,
559
+ ) -> Callable[[bigtable_instance_admin.GetClusterRequest], instance.Cluster]:
560
+ r"""Return a callable for the get cluster method over gRPC.
561
+
562
+ Gets information about a cluster.
563
+
564
+ Returns:
565
+ Callable[[~.GetClusterRequest],
566
+ ~.Cluster]:
567
+ A function that, when called, will call the underlying RPC
568
+ on the server.
569
+ """
570
+ # Generate a "stub function" on-the-fly which will actually make
571
+ # the request.
572
+ # gRPC handles serialization and deserialization, so we just need
573
+ # to pass in the functions for each.
574
+ if "get_cluster" not in self._stubs:
575
+ self._stubs["get_cluster"] = self._logged_channel.unary_unary(
576
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/GetCluster",
577
+ request_serializer=bigtable_instance_admin.GetClusterRequest.serialize,
578
+ response_deserializer=instance.Cluster.deserialize,
579
+ )
580
+ return self._stubs["get_cluster"]
581
+
582
+ @property
583
+ def list_clusters(
584
+ self,
585
+ ) -> Callable[
586
+ [bigtable_instance_admin.ListClustersRequest],
587
+ bigtable_instance_admin.ListClustersResponse,
588
+ ]:
589
+ r"""Return a callable for the list clusters method over gRPC.
590
+
591
+ Lists information about clusters in an instance.
592
+
593
+ Returns:
594
+ Callable[[~.ListClustersRequest],
595
+ ~.ListClustersResponse]:
596
+ A function that, when called, will call the underlying RPC
597
+ on the server.
598
+ """
599
+ # Generate a "stub function" on-the-fly which will actually make
600
+ # the request.
601
+ # gRPC handles serialization and deserialization, so we just need
602
+ # to pass in the functions for each.
603
+ if "list_clusters" not in self._stubs:
604
+ self._stubs["list_clusters"] = self._logged_channel.unary_unary(
605
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/ListClusters",
606
+ request_serializer=bigtable_instance_admin.ListClustersRequest.serialize,
607
+ response_deserializer=bigtable_instance_admin.ListClustersResponse.deserialize,
608
+ )
609
+ return self._stubs["list_clusters"]
610
+
611
+ @property
612
+ def update_cluster(self) -> Callable[[instance.Cluster], operations_pb2.Operation]:
613
+ r"""Return a callable for the update cluster method over gRPC.
614
+
615
+ Updates a cluster within an instance.
616
+
617
+ Note that UpdateCluster does not support updating
618
+ cluster_config.cluster_autoscaling_config. In order to update
619
+ it, you must use PartialUpdateCluster.
620
+
621
+ Returns:
622
+ Callable[[~.Cluster],
623
+ ~.Operation]:
624
+ A function that, when called, will call the underlying RPC
625
+ on the server.
626
+ """
627
+ # Generate a "stub function" on-the-fly which will actually make
628
+ # the request.
629
+ # gRPC handles serialization and deserialization, so we just need
630
+ # to pass in the functions for each.
631
+ if "update_cluster" not in self._stubs:
632
+ self._stubs["update_cluster"] = self._logged_channel.unary_unary(
633
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/UpdateCluster",
634
+ request_serializer=instance.Cluster.serialize,
635
+ response_deserializer=operations_pb2.Operation.FromString,
636
+ )
637
+ return self._stubs["update_cluster"]
638
+
639
+ @property
640
+ def partial_update_cluster(
641
+ self,
642
+ ) -> Callable[
643
+ [bigtable_instance_admin.PartialUpdateClusterRequest], operations_pb2.Operation
644
+ ]:
645
+ r"""Return a callable for the partial update cluster method over gRPC.
646
+
647
+ Partially updates a cluster within a project. This method is the
648
+ preferred way to update a Cluster.
649
+
650
+ To enable and update autoscaling, set
651
+ cluster_config.cluster_autoscaling_config. When autoscaling is
652
+ enabled, serve_nodes is treated as an OUTPUT_ONLY field, meaning
653
+ that updates to it are ignored. Note that an update cannot
654
+ simultaneously set serve_nodes to non-zero and
655
+ cluster_config.cluster_autoscaling_config to non-empty, and also
656
+ specify both in the update_mask.
657
+
658
+ To disable autoscaling, clear
659
+ cluster_config.cluster_autoscaling_config, and explicitly set a
660
+ serve_node count via the update_mask.
661
+
662
+ Returns:
663
+ Callable[[~.PartialUpdateClusterRequest],
664
+ ~.Operation]:
665
+ A function that, when called, will call the underlying RPC
666
+ on the server.
667
+ """
668
+ # Generate a "stub function" on-the-fly which will actually make
669
+ # the request.
670
+ # gRPC handles serialization and deserialization, so we just need
671
+ # to pass in the functions for each.
672
+ if "partial_update_cluster" not in self._stubs:
673
+ self._stubs["partial_update_cluster"] = self._logged_channel.unary_unary(
674
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/PartialUpdateCluster",
675
+ request_serializer=bigtable_instance_admin.PartialUpdateClusterRequest.serialize,
676
+ response_deserializer=operations_pb2.Operation.FromString,
677
+ )
678
+ return self._stubs["partial_update_cluster"]
679
+
680
+ @property
681
+ def delete_cluster(
682
+ self,
683
+ ) -> Callable[[bigtable_instance_admin.DeleteClusterRequest], empty_pb2.Empty]:
684
+ r"""Return a callable for the delete cluster method over gRPC.
685
+
686
+ Deletes a cluster from an instance.
687
+
688
+ Returns:
689
+ Callable[[~.DeleteClusterRequest],
690
+ ~.Empty]:
691
+ A function that, when called, will call the underlying RPC
692
+ on the server.
693
+ """
694
+ # Generate a "stub function" on-the-fly which will actually make
695
+ # the request.
696
+ # gRPC handles serialization and deserialization, so we just need
697
+ # to pass in the functions for each.
698
+ if "delete_cluster" not in self._stubs:
699
+ self._stubs["delete_cluster"] = self._logged_channel.unary_unary(
700
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/DeleteCluster",
701
+ request_serializer=bigtable_instance_admin.DeleteClusterRequest.serialize,
702
+ response_deserializer=empty_pb2.Empty.FromString,
703
+ )
704
+ return self._stubs["delete_cluster"]
705
+
706
+ @property
707
+ def create_app_profile(
708
+ self,
709
+ ) -> Callable[
710
+ [bigtable_instance_admin.CreateAppProfileRequest], instance.AppProfile
711
+ ]:
712
+ r"""Return a callable for the create app profile method over gRPC.
713
+
714
+ Creates an app profile within an instance.
715
+
716
+ Returns:
717
+ Callable[[~.CreateAppProfileRequest],
718
+ ~.AppProfile]:
719
+ A function that, when called, will call the underlying RPC
720
+ on the server.
721
+ """
722
+ # Generate a "stub function" on-the-fly which will actually make
723
+ # the request.
724
+ # gRPC handles serialization and deserialization, so we just need
725
+ # to pass in the functions for each.
726
+ if "create_app_profile" not in self._stubs:
727
+ self._stubs["create_app_profile"] = self._logged_channel.unary_unary(
728
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/CreateAppProfile",
729
+ request_serializer=bigtable_instance_admin.CreateAppProfileRequest.serialize,
730
+ response_deserializer=instance.AppProfile.deserialize,
731
+ )
732
+ return self._stubs["create_app_profile"]
733
+
734
+ @property
735
+ def get_app_profile(
736
+ self,
737
+ ) -> Callable[[bigtable_instance_admin.GetAppProfileRequest], instance.AppProfile]:
738
+ r"""Return a callable for the get app profile method over gRPC.
739
+
740
+ Gets information about an app profile.
741
+
742
+ Returns:
743
+ Callable[[~.GetAppProfileRequest],
744
+ ~.AppProfile]:
745
+ A function that, when called, will call the underlying RPC
746
+ on the server.
747
+ """
748
+ # Generate a "stub function" on-the-fly which will actually make
749
+ # the request.
750
+ # gRPC handles serialization and deserialization, so we just need
751
+ # to pass in the functions for each.
752
+ if "get_app_profile" not in self._stubs:
753
+ self._stubs["get_app_profile"] = self._logged_channel.unary_unary(
754
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/GetAppProfile",
755
+ request_serializer=bigtable_instance_admin.GetAppProfileRequest.serialize,
756
+ response_deserializer=instance.AppProfile.deserialize,
757
+ )
758
+ return self._stubs["get_app_profile"]
759
+
760
+ @property
761
+ def list_app_profiles(
762
+ self,
763
+ ) -> Callable[
764
+ [bigtable_instance_admin.ListAppProfilesRequest],
765
+ bigtable_instance_admin.ListAppProfilesResponse,
766
+ ]:
767
+ r"""Return a callable for the list app profiles method over gRPC.
768
+
769
+ Lists information about app profiles in an instance.
770
+
771
+ Returns:
772
+ Callable[[~.ListAppProfilesRequest],
773
+ ~.ListAppProfilesResponse]:
774
+ A function that, when called, will call the underlying RPC
775
+ on the server.
776
+ """
777
+ # Generate a "stub function" on-the-fly which will actually make
778
+ # the request.
779
+ # gRPC handles serialization and deserialization, so we just need
780
+ # to pass in the functions for each.
781
+ if "list_app_profiles" not in self._stubs:
782
+ self._stubs["list_app_profiles"] = self._logged_channel.unary_unary(
783
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/ListAppProfiles",
784
+ request_serializer=bigtable_instance_admin.ListAppProfilesRequest.serialize,
785
+ response_deserializer=bigtable_instance_admin.ListAppProfilesResponse.deserialize,
786
+ )
787
+ return self._stubs["list_app_profiles"]
788
+
789
+ @property
790
+ def update_app_profile(
791
+ self,
792
+ ) -> Callable[
793
+ [bigtable_instance_admin.UpdateAppProfileRequest], operations_pb2.Operation
794
+ ]:
795
+ r"""Return a callable for the update app profile method over gRPC.
796
+
797
+ Updates an app profile within an instance.
798
+
799
+ Returns:
800
+ Callable[[~.UpdateAppProfileRequest],
801
+ ~.Operation]:
802
+ A function that, when called, will call the underlying RPC
803
+ on the server.
804
+ """
805
+ # Generate a "stub function" on-the-fly which will actually make
806
+ # the request.
807
+ # gRPC handles serialization and deserialization, so we just need
808
+ # to pass in the functions for each.
809
+ if "update_app_profile" not in self._stubs:
810
+ self._stubs["update_app_profile"] = self._logged_channel.unary_unary(
811
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/UpdateAppProfile",
812
+ request_serializer=bigtable_instance_admin.UpdateAppProfileRequest.serialize,
813
+ response_deserializer=operations_pb2.Operation.FromString,
814
+ )
815
+ return self._stubs["update_app_profile"]
816
+
817
+ @property
818
+ def delete_app_profile(
819
+ self,
820
+ ) -> Callable[[bigtable_instance_admin.DeleteAppProfileRequest], empty_pb2.Empty]:
821
+ r"""Return a callable for the delete app profile method over gRPC.
822
+
823
+ Deletes an app profile from an instance.
824
+
825
+ Returns:
826
+ Callable[[~.DeleteAppProfileRequest],
827
+ ~.Empty]:
828
+ A function that, when called, will call the underlying RPC
829
+ on the server.
830
+ """
831
+ # Generate a "stub function" on-the-fly which will actually make
832
+ # the request.
833
+ # gRPC handles serialization and deserialization, so we just need
834
+ # to pass in the functions for each.
835
+ if "delete_app_profile" not in self._stubs:
836
+ self._stubs["delete_app_profile"] = self._logged_channel.unary_unary(
837
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/DeleteAppProfile",
838
+ request_serializer=bigtable_instance_admin.DeleteAppProfileRequest.serialize,
839
+ response_deserializer=empty_pb2.Empty.FromString,
840
+ )
841
+ return self._stubs["delete_app_profile"]
842
+
843
+ @property
844
+ def get_iam_policy(
845
+ self,
846
+ ) -> Callable[[iam_policy_pb2.GetIamPolicyRequest], policy_pb2.Policy]:
847
+ r"""Return a callable for the get iam policy method over gRPC.
848
+
849
+ Gets the access control policy for an instance
850
+ resource. Returns an empty policy if an instance exists
851
+ but does not have a policy set.
852
+
853
+ Returns:
854
+ Callable[[~.GetIamPolicyRequest],
855
+ ~.Policy]:
856
+ A function that, when called, will call the underlying RPC
857
+ on the server.
858
+ """
859
+ # Generate a "stub function" on-the-fly which will actually make
860
+ # the request.
861
+ # gRPC handles serialization and deserialization, so we just need
862
+ # to pass in the functions for each.
863
+ if "get_iam_policy" not in self._stubs:
864
+ self._stubs["get_iam_policy"] = self._logged_channel.unary_unary(
865
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/GetIamPolicy",
866
+ request_serializer=iam_policy_pb2.GetIamPolicyRequest.SerializeToString,
867
+ response_deserializer=policy_pb2.Policy.FromString,
868
+ )
869
+ return self._stubs["get_iam_policy"]
870
+
871
+ @property
872
+ def set_iam_policy(
873
+ self,
874
+ ) -> Callable[[iam_policy_pb2.SetIamPolicyRequest], policy_pb2.Policy]:
875
+ r"""Return a callable for the set iam policy method over gRPC.
876
+
877
+ Sets the access control policy on an instance
878
+ resource. Replaces any existing policy.
879
+
880
+ Returns:
881
+ Callable[[~.SetIamPolicyRequest],
882
+ ~.Policy]:
883
+ A function that, when called, will call the underlying RPC
884
+ on the server.
885
+ """
886
+ # Generate a "stub function" on-the-fly which will actually make
887
+ # the request.
888
+ # gRPC handles serialization and deserialization, so we just need
889
+ # to pass in the functions for each.
890
+ if "set_iam_policy" not in self._stubs:
891
+ self._stubs["set_iam_policy"] = self._logged_channel.unary_unary(
892
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/SetIamPolicy",
893
+ request_serializer=iam_policy_pb2.SetIamPolicyRequest.SerializeToString,
894
+ response_deserializer=policy_pb2.Policy.FromString,
895
+ )
896
+ return self._stubs["set_iam_policy"]
897
+
898
+ @property
899
+ def test_iam_permissions(
900
+ self,
901
+ ) -> Callable[
902
+ [iam_policy_pb2.TestIamPermissionsRequest],
903
+ iam_policy_pb2.TestIamPermissionsResponse,
904
+ ]:
905
+ r"""Return a callable for the test iam permissions method over gRPC.
906
+
907
+ Returns permissions that the caller has on the
908
+ specified instance resource.
909
+
910
+ Returns:
911
+ Callable[[~.TestIamPermissionsRequest],
912
+ ~.TestIamPermissionsResponse]:
913
+ A function that, when called, will call the underlying RPC
914
+ on the server.
915
+ """
916
+ # Generate a "stub function" on-the-fly which will actually make
917
+ # the request.
918
+ # gRPC handles serialization and deserialization, so we just need
919
+ # to pass in the functions for each.
920
+ if "test_iam_permissions" not in self._stubs:
921
+ self._stubs["test_iam_permissions"] = self._logged_channel.unary_unary(
922
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/TestIamPermissions",
923
+ request_serializer=iam_policy_pb2.TestIamPermissionsRequest.SerializeToString,
924
+ response_deserializer=iam_policy_pb2.TestIamPermissionsResponse.FromString,
925
+ )
926
+ return self._stubs["test_iam_permissions"]
927
+
928
+ @property
929
+ def list_hot_tablets(
930
+ self,
931
+ ) -> Callable[
932
+ [bigtable_instance_admin.ListHotTabletsRequest],
933
+ bigtable_instance_admin.ListHotTabletsResponse,
934
+ ]:
935
+ r"""Return a callable for the list hot tablets method over gRPC.
936
+
937
+ Lists hot tablets in a cluster, within the time range
938
+ provided. Hot tablets are ordered based on CPU usage.
939
+
940
+ Returns:
941
+ Callable[[~.ListHotTabletsRequest],
942
+ ~.ListHotTabletsResponse]:
943
+ A function that, when called, will call the underlying RPC
944
+ on the server.
945
+ """
946
+ # Generate a "stub function" on-the-fly which will actually make
947
+ # the request.
948
+ # gRPC handles serialization and deserialization, so we just need
949
+ # to pass in the functions for each.
950
+ if "list_hot_tablets" not in self._stubs:
951
+ self._stubs["list_hot_tablets"] = self._logged_channel.unary_unary(
952
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/ListHotTablets",
953
+ request_serializer=bigtable_instance_admin.ListHotTabletsRequest.serialize,
954
+ response_deserializer=bigtable_instance_admin.ListHotTabletsResponse.deserialize,
955
+ )
956
+ return self._stubs["list_hot_tablets"]
957
+
958
+ @property
959
+ def create_logical_view(
960
+ self,
961
+ ) -> Callable[
962
+ [bigtable_instance_admin.CreateLogicalViewRequest], operations_pb2.Operation
963
+ ]:
964
+ r"""Return a callable for the create logical view method over gRPC.
965
+
966
+ Creates a logical view within an instance.
967
+
968
+ Returns:
969
+ Callable[[~.CreateLogicalViewRequest],
970
+ ~.Operation]:
971
+ A function that, when called, will call the underlying RPC
972
+ on the server.
973
+ """
974
+ # Generate a "stub function" on-the-fly which will actually make
975
+ # the request.
976
+ # gRPC handles serialization and deserialization, so we just need
977
+ # to pass in the functions for each.
978
+ if "create_logical_view" not in self._stubs:
979
+ self._stubs["create_logical_view"] = self._logged_channel.unary_unary(
980
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/CreateLogicalView",
981
+ request_serializer=bigtable_instance_admin.CreateLogicalViewRequest.serialize,
982
+ response_deserializer=operations_pb2.Operation.FromString,
983
+ )
984
+ return self._stubs["create_logical_view"]
985
+
986
+ @property
987
+ def get_logical_view(
988
+ self,
989
+ ) -> Callable[
990
+ [bigtable_instance_admin.GetLogicalViewRequest], instance.LogicalView
991
+ ]:
992
+ r"""Return a callable for the get logical view method over gRPC.
993
+
994
+ Gets information about a logical view.
995
+
996
+ Returns:
997
+ Callable[[~.GetLogicalViewRequest],
998
+ ~.LogicalView]:
999
+ A function that, when called, will call the underlying RPC
1000
+ on the server.
1001
+ """
1002
+ # Generate a "stub function" on-the-fly which will actually make
1003
+ # the request.
1004
+ # gRPC handles serialization and deserialization, so we just need
1005
+ # to pass in the functions for each.
1006
+ if "get_logical_view" not in self._stubs:
1007
+ self._stubs["get_logical_view"] = self._logged_channel.unary_unary(
1008
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/GetLogicalView",
1009
+ request_serializer=bigtable_instance_admin.GetLogicalViewRequest.serialize,
1010
+ response_deserializer=instance.LogicalView.deserialize,
1011
+ )
1012
+ return self._stubs["get_logical_view"]
1013
+
1014
+ @property
1015
+ def list_logical_views(
1016
+ self,
1017
+ ) -> Callable[
1018
+ [bigtable_instance_admin.ListLogicalViewsRequest],
1019
+ bigtable_instance_admin.ListLogicalViewsResponse,
1020
+ ]:
1021
+ r"""Return a callable for the list logical views method over gRPC.
1022
+
1023
+ Lists information about logical views in an instance.
1024
+
1025
+ Returns:
1026
+ Callable[[~.ListLogicalViewsRequest],
1027
+ ~.ListLogicalViewsResponse]:
1028
+ A function that, when called, will call the underlying RPC
1029
+ on the server.
1030
+ """
1031
+ # Generate a "stub function" on-the-fly which will actually make
1032
+ # the request.
1033
+ # gRPC handles serialization and deserialization, so we just need
1034
+ # to pass in the functions for each.
1035
+ if "list_logical_views" not in self._stubs:
1036
+ self._stubs["list_logical_views"] = self._logged_channel.unary_unary(
1037
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/ListLogicalViews",
1038
+ request_serializer=bigtable_instance_admin.ListLogicalViewsRequest.serialize,
1039
+ response_deserializer=bigtable_instance_admin.ListLogicalViewsResponse.deserialize,
1040
+ )
1041
+ return self._stubs["list_logical_views"]
1042
+
1043
+ @property
1044
+ def update_logical_view(
1045
+ self,
1046
+ ) -> Callable[
1047
+ [bigtable_instance_admin.UpdateLogicalViewRequest], operations_pb2.Operation
1048
+ ]:
1049
+ r"""Return a callable for the update logical view method over gRPC.
1050
+
1051
+ Updates a logical view within an instance.
1052
+
1053
+ Returns:
1054
+ Callable[[~.UpdateLogicalViewRequest],
1055
+ ~.Operation]:
1056
+ A function that, when called, will call the underlying RPC
1057
+ on the server.
1058
+ """
1059
+ # Generate a "stub function" on-the-fly which will actually make
1060
+ # the request.
1061
+ # gRPC handles serialization and deserialization, so we just need
1062
+ # to pass in the functions for each.
1063
+ if "update_logical_view" not in self._stubs:
1064
+ self._stubs["update_logical_view"] = self._logged_channel.unary_unary(
1065
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/UpdateLogicalView",
1066
+ request_serializer=bigtable_instance_admin.UpdateLogicalViewRequest.serialize,
1067
+ response_deserializer=operations_pb2.Operation.FromString,
1068
+ )
1069
+ return self._stubs["update_logical_view"]
1070
+
1071
+ @property
1072
+ def delete_logical_view(
1073
+ self,
1074
+ ) -> Callable[[bigtable_instance_admin.DeleteLogicalViewRequest], empty_pb2.Empty]:
1075
+ r"""Return a callable for the delete logical view method over gRPC.
1076
+
1077
+ Deletes a logical view from an instance.
1078
+
1079
+ Returns:
1080
+ Callable[[~.DeleteLogicalViewRequest],
1081
+ ~.Empty]:
1082
+ A function that, when called, will call the underlying RPC
1083
+ on the server.
1084
+ """
1085
+ # Generate a "stub function" on-the-fly which will actually make
1086
+ # the request.
1087
+ # gRPC handles serialization and deserialization, so we just need
1088
+ # to pass in the functions for each.
1089
+ if "delete_logical_view" not in self._stubs:
1090
+ self._stubs["delete_logical_view"] = self._logged_channel.unary_unary(
1091
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/DeleteLogicalView",
1092
+ request_serializer=bigtable_instance_admin.DeleteLogicalViewRequest.serialize,
1093
+ response_deserializer=empty_pb2.Empty.FromString,
1094
+ )
1095
+ return self._stubs["delete_logical_view"]
1096
+
1097
+ @property
1098
+ def create_materialized_view(
1099
+ self,
1100
+ ) -> Callable[
1101
+ [bigtable_instance_admin.CreateMaterializedViewRequest],
1102
+ operations_pb2.Operation,
1103
+ ]:
1104
+ r"""Return a callable for the create materialized view method over gRPC.
1105
+
1106
+ Creates a materialized view within an instance.
1107
+
1108
+ Returns:
1109
+ Callable[[~.CreateMaterializedViewRequest],
1110
+ ~.Operation]:
1111
+ A function that, when called, will call the underlying RPC
1112
+ on the server.
1113
+ """
1114
+ # Generate a "stub function" on-the-fly which will actually make
1115
+ # the request.
1116
+ # gRPC handles serialization and deserialization, so we just need
1117
+ # to pass in the functions for each.
1118
+ if "create_materialized_view" not in self._stubs:
1119
+ self._stubs["create_materialized_view"] = self._logged_channel.unary_unary(
1120
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/CreateMaterializedView",
1121
+ request_serializer=bigtable_instance_admin.CreateMaterializedViewRequest.serialize,
1122
+ response_deserializer=operations_pb2.Operation.FromString,
1123
+ )
1124
+ return self._stubs["create_materialized_view"]
1125
+
1126
+ @property
1127
+ def get_materialized_view(
1128
+ self,
1129
+ ) -> Callable[
1130
+ [bigtable_instance_admin.GetMaterializedViewRequest], instance.MaterializedView
1131
+ ]:
1132
+ r"""Return a callable for the get materialized view method over gRPC.
1133
+
1134
+ Gets information about a materialized view.
1135
+
1136
+ Returns:
1137
+ Callable[[~.GetMaterializedViewRequest],
1138
+ ~.MaterializedView]:
1139
+ A function that, when called, will call the underlying RPC
1140
+ on the server.
1141
+ """
1142
+ # Generate a "stub function" on-the-fly which will actually make
1143
+ # the request.
1144
+ # gRPC handles serialization and deserialization, so we just need
1145
+ # to pass in the functions for each.
1146
+ if "get_materialized_view" not in self._stubs:
1147
+ self._stubs["get_materialized_view"] = self._logged_channel.unary_unary(
1148
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/GetMaterializedView",
1149
+ request_serializer=bigtable_instance_admin.GetMaterializedViewRequest.serialize,
1150
+ response_deserializer=instance.MaterializedView.deserialize,
1151
+ )
1152
+ return self._stubs["get_materialized_view"]
1153
+
1154
+ @property
1155
+ def list_materialized_views(
1156
+ self,
1157
+ ) -> Callable[
1158
+ [bigtable_instance_admin.ListMaterializedViewsRequest],
1159
+ bigtable_instance_admin.ListMaterializedViewsResponse,
1160
+ ]:
1161
+ r"""Return a callable for the list materialized views method over gRPC.
1162
+
1163
+ Lists information about materialized views in an
1164
+ instance.
1165
+
1166
+ Returns:
1167
+ Callable[[~.ListMaterializedViewsRequest],
1168
+ ~.ListMaterializedViewsResponse]:
1169
+ A function that, when called, will call the underlying RPC
1170
+ on the server.
1171
+ """
1172
+ # Generate a "stub function" on-the-fly which will actually make
1173
+ # the request.
1174
+ # gRPC handles serialization and deserialization, so we just need
1175
+ # to pass in the functions for each.
1176
+ if "list_materialized_views" not in self._stubs:
1177
+ self._stubs["list_materialized_views"] = self._logged_channel.unary_unary(
1178
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/ListMaterializedViews",
1179
+ request_serializer=bigtable_instance_admin.ListMaterializedViewsRequest.serialize,
1180
+ response_deserializer=bigtable_instance_admin.ListMaterializedViewsResponse.deserialize,
1181
+ )
1182
+ return self._stubs["list_materialized_views"]
1183
+
1184
+ @property
1185
+ def update_materialized_view(
1186
+ self,
1187
+ ) -> Callable[
1188
+ [bigtable_instance_admin.UpdateMaterializedViewRequest],
1189
+ operations_pb2.Operation,
1190
+ ]:
1191
+ r"""Return a callable for the update materialized view method over gRPC.
1192
+
1193
+ Updates a materialized view within an instance.
1194
+
1195
+ Returns:
1196
+ Callable[[~.UpdateMaterializedViewRequest],
1197
+ ~.Operation]:
1198
+ A function that, when called, will call the underlying RPC
1199
+ on the server.
1200
+ """
1201
+ # Generate a "stub function" on-the-fly which will actually make
1202
+ # the request.
1203
+ # gRPC handles serialization and deserialization, so we just need
1204
+ # to pass in the functions for each.
1205
+ if "update_materialized_view" not in self._stubs:
1206
+ self._stubs["update_materialized_view"] = self._logged_channel.unary_unary(
1207
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/UpdateMaterializedView",
1208
+ request_serializer=bigtable_instance_admin.UpdateMaterializedViewRequest.serialize,
1209
+ response_deserializer=operations_pb2.Operation.FromString,
1210
+ )
1211
+ return self._stubs["update_materialized_view"]
1212
+
1213
+ @property
1214
+ def delete_materialized_view(
1215
+ self,
1216
+ ) -> Callable[
1217
+ [bigtable_instance_admin.DeleteMaterializedViewRequest], empty_pb2.Empty
1218
+ ]:
1219
+ r"""Return a callable for the delete materialized view method over gRPC.
1220
+
1221
+ Deletes a materialized view from an instance.
1222
+
1223
+ Returns:
1224
+ Callable[[~.DeleteMaterializedViewRequest],
1225
+ ~.Empty]:
1226
+ A function that, when called, will call the underlying RPC
1227
+ on the server.
1228
+ """
1229
+ # Generate a "stub function" on-the-fly which will actually make
1230
+ # the request.
1231
+ # gRPC handles serialization and deserialization, so we just need
1232
+ # to pass in the functions for each.
1233
+ if "delete_materialized_view" not in self._stubs:
1234
+ self._stubs["delete_materialized_view"] = self._logged_channel.unary_unary(
1235
+ "/google.bigtable.admin.v2.BigtableInstanceAdmin/DeleteMaterializedView",
1236
+ request_serializer=bigtable_instance_admin.DeleteMaterializedViewRequest.serialize,
1237
+ response_deserializer=empty_pb2.Empty.FromString,
1238
+ )
1239
+ return self._stubs["delete_materialized_view"]
1240
+
1241
+ def close(self):
1242
+ self._logged_channel.close()
1243
+
1244
+ @property
1245
+ def kind(self) -> str:
1246
+ return "grpc"
1247
+
1248
+
1249
+ __all__ = ("BigtableInstanceAdminGrpcTransport",)