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,1746 @@
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 # type: ignore
17
+ from google.api_core import path_template
18
+ from google.api_core import gapic_v1
19
+
20
+ from google.protobuf import json_format
21
+ from .base import BigtableInstanceAdminTransport, DEFAULT_CLIENT_INFO
22
+
23
+ import re
24
+ from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union
25
+
26
+
27
+ from google.cloud.bigtable_admin_v2.types import bigtable_instance_admin
28
+ from google.cloud.bigtable_admin_v2.types import instance
29
+ from google.iam.v1 import iam_policy_pb2 # type: ignore
30
+ from google.iam.v1 import policy_pb2 # type: ignore
31
+ from google.protobuf import empty_pb2 # type: ignore
32
+ from google.longrunning import operations_pb2 # type: ignore
33
+
34
+
35
+ class _BaseBigtableInstanceAdminRestTransport(BigtableInstanceAdminTransport):
36
+ """Base REST backend transport for BigtableInstanceAdmin.
37
+
38
+ Note: This class is not meant to be used directly. Use its sync and
39
+ async sub-classes instead.
40
+
41
+ This class defines the same methods as the primary client, so the
42
+ primary client can load the underlying transport implementation
43
+ and call it.
44
+
45
+ It sends JSON representations of protocol buffers over HTTP/1.1
46
+ """
47
+
48
+ def __init__(
49
+ self,
50
+ *,
51
+ host: str = "bigtableadmin.googleapis.com",
52
+ credentials: Optional[Any] = None,
53
+ client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
54
+ always_use_jwt_access: Optional[bool] = False,
55
+ url_scheme: str = "https",
56
+ api_audience: Optional[str] = None,
57
+ ) -> None:
58
+ """Instantiate the transport.
59
+ Args:
60
+ host (Optional[str]):
61
+ The hostname to connect to (default: 'bigtableadmin.googleapis.com').
62
+ credentials (Optional[Any]): The
63
+ authorization credentials to attach to requests. These
64
+ credentials identify the application to the service; if none
65
+ are specified, the client will attempt to ascertain the
66
+ credentials from the environment.
67
+ client_info (google.api_core.gapic_v1.client_info.ClientInfo):
68
+ The client info used to send a user-agent string along with
69
+ API requests. If ``None``, then default info will be used.
70
+ Generally, you only need to set this if you are developing
71
+ your own client library.
72
+ always_use_jwt_access (Optional[bool]): Whether self signed JWT should
73
+ be used for service account credentials.
74
+ url_scheme: the protocol scheme for the API endpoint. Normally
75
+ "https", but for testing or local servers,
76
+ "http" can be specified.
77
+ """
78
+ # Run the base constructor
79
+ maybe_url_match = re.match("^(?P<scheme>http(?:s)?://)?(?P<host>.*)$", host)
80
+ if maybe_url_match is None:
81
+ raise ValueError(
82
+ f"Unexpected hostname structure: {host}"
83
+ ) # pragma: NO COVER
84
+
85
+ url_match_items = maybe_url_match.groupdict()
86
+
87
+ host = f"{url_scheme}://{host}" if not url_match_items["scheme"] else host
88
+
89
+ super().__init__(
90
+ host=host,
91
+ credentials=credentials,
92
+ client_info=client_info,
93
+ always_use_jwt_access=always_use_jwt_access,
94
+ api_audience=api_audience,
95
+ )
96
+
97
+ class _BaseCreateAppProfile:
98
+ def __hash__(self): # pragma: NO COVER
99
+ return NotImplementedError("__hash__ must be implemented.")
100
+
101
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {
102
+ "appProfileId": "",
103
+ }
104
+
105
+ @classmethod
106
+ def _get_unset_required_fields(cls, message_dict):
107
+ return {
108
+ k: v
109
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
110
+ if k not in message_dict
111
+ }
112
+
113
+ @staticmethod
114
+ def _get_http_options():
115
+ http_options: List[Dict[str, str]] = [
116
+ {
117
+ "method": "post",
118
+ "uri": "/v2/{parent=projects/*/instances/*}/appProfiles",
119
+ "body": "app_profile",
120
+ },
121
+ ]
122
+ return http_options
123
+
124
+ @staticmethod
125
+ def _get_transcoded_request(http_options, request):
126
+ pb_request = bigtable_instance_admin.CreateAppProfileRequest.pb(request)
127
+ transcoded_request = path_template.transcode(http_options, pb_request)
128
+ return transcoded_request
129
+
130
+ @staticmethod
131
+ def _get_request_body_json(transcoded_request):
132
+ # Jsonify the request body
133
+
134
+ body = json_format.MessageToJson(
135
+ transcoded_request["body"], use_integers_for_enums=True
136
+ )
137
+ return body
138
+
139
+ @staticmethod
140
+ def _get_query_params_json(transcoded_request):
141
+ query_params = json.loads(
142
+ json_format.MessageToJson(
143
+ transcoded_request["query_params"],
144
+ use_integers_for_enums=True,
145
+ )
146
+ )
147
+ query_params.update(
148
+ _BaseBigtableInstanceAdminRestTransport._BaseCreateAppProfile._get_unset_required_fields(
149
+ query_params
150
+ )
151
+ )
152
+
153
+ query_params["$alt"] = "json;enum-encoding=int"
154
+ return query_params
155
+
156
+ class _BaseCreateCluster:
157
+ def __hash__(self): # pragma: NO COVER
158
+ return NotImplementedError("__hash__ must be implemented.")
159
+
160
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {
161
+ "clusterId": "",
162
+ }
163
+
164
+ @classmethod
165
+ def _get_unset_required_fields(cls, message_dict):
166
+ return {
167
+ k: v
168
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
169
+ if k not in message_dict
170
+ }
171
+
172
+ @staticmethod
173
+ def _get_http_options():
174
+ http_options: List[Dict[str, str]] = [
175
+ {
176
+ "method": "post",
177
+ "uri": "/v2/{parent=projects/*/instances/*}/clusters",
178
+ "body": "cluster",
179
+ },
180
+ ]
181
+ return http_options
182
+
183
+ @staticmethod
184
+ def _get_transcoded_request(http_options, request):
185
+ pb_request = bigtable_instance_admin.CreateClusterRequest.pb(request)
186
+ transcoded_request = path_template.transcode(http_options, pb_request)
187
+ return transcoded_request
188
+
189
+ @staticmethod
190
+ def _get_request_body_json(transcoded_request):
191
+ # Jsonify the request body
192
+
193
+ body = json_format.MessageToJson(
194
+ transcoded_request["body"], use_integers_for_enums=True
195
+ )
196
+ return body
197
+
198
+ @staticmethod
199
+ def _get_query_params_json(transcoded_request):
200
+ query_params = json.loads(
201
+ json_format.MessageToJson(
202
+ transcoded_request["query_params"],
203
+ use_integers_for_enums=True,
204
+ )
205
+ )
206
+ query_params.update(
207
+ _BaseBigtableInstanceAdminRestTransport._BaseCreateCluster._get_unset_required_fields(
208
+ query_params
209
+ )
210
+ )
211
+
212
+ query_params["$alt"] = "json;enum-encoding=int"
213
+ return query_params
214
+
215
+ class _BaseCreateInstance:
216
+ def __hash__(self): # pragma: NO COVER
217
+ return NotImplementedError("__hash__ must be implemented.")
218
+
219
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
220
+
221
+ @classmethod
222
+ def _get_unset_required_fields(cls, message_dict):
223
+ return {
224
+ k: v
225
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
226
+ if k not in message_dict
227
+ }
228
+
229
+ @staticmethod
230
+ def _get_http_options():
231
+ http_options: List[Dict[str, str]] = [
232
+ {
233
+ "method": "post",
234
+ "uri": "/v2/{parent=projects/*}/instances",
235
+ "body": "*",
236
+ },
237
+ ]
238
+ return http_options
239
+
240
+ @staticmethod
241
+ def _get_transcoded_request(http_options, request):
242
+ pb_request = bigtable_instance_admin.CreateInstanceRequest.pb(request)
243
+ transcoded_request = path_template.transcode(http_options, pb_request)
244
+ return transcoded_request
245
+
246
+ @staticmethod
247
+ def _get_request_body_json(transcoded_request):
248
+ # Jsonify the request body
249
+
250
+ body = json_format.MessageToJson(
251
+ transcoded_request["body"], use_integers_for_enums=True
252
+ )
253
+ return body
254
+
255
+ @staticmethod
256
+ def _get_query_params_json(transcoded_request):
257
+ query_params = json.loads(
258
+ json_format.MessageToJson(
259
+ transcoded_request["query_params"],
260
+ use_integers_for_enums=True,
261
+ )
262
+ )
263
+ query_params.update(
264
+ _BaseBigtableInstanceAdminRestTransport._BaseCreateInstance._get_unset_required_fields(
265
+ query_params
266
+ )
267
+ )
268
+
269
+ query_params["$alt"] = "json;enum-encoding=int"
270
+ return query_params
271
+
272
+ class _BaseCreateLogicalView:
273
+ def __hash__(self): # pragma: NO COVER
274
+ return NotImplementedError("__hash__ must be implemented.")
275
+
276
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {
277
+ "logicalViewId": "",
278
+ }
279
+
280
+ @classmethod
281
+ def _get_unset_required_fields(cls, message_dict):
282
+ return {
283
+ k: v
284
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
285
+ if k not in message_dict
286
+ }
287
+
288
+ @staticmethod
289
+ def _get_http_options():
290
+ http_options: List[Dict[str, str]] = [
291
+ {
292
+ "method": "post",
293
+ "uri": "/v2/{parent=projects/*/instances/*}/logicalViews",
294
+ "body": "logical_view",
295
+ },
296
+ ]
297
+ return http_options
298
+
299
+ @staticmethod
300
+ def _get_transcoded_request(http_options, request):
301
+ pb_request = bigtable_instance_admin.CreateLogicalViewRequest.pb(request)
302
+ transcoded_request = path_template.transcode(http_options, pb_request)
303
+ return transcoded_request
304
+
305
+ @staticmethod
306
+ def _get_request_body_json(transcoded_request):
307
+ # Jsonify the request body
308
+
309
+ body = json_format.MessageToJson(
310
+ transcoded_request["body"], use_integers_for_enums=True
311
+ )
312
+ return body
313
+
314
+ @staticmethod
315
+ def _get_query_params_json(transcoded_request):
316
+ query_params = json.loads(
317
+ json_format.MessageToJson(
318
+ transcoded_request["query_params"],
319
+ use_integers_for_enums=True,
320
+ )
321
+ )
322
+ query_params.update(
323
+ _BaseBigtableInstanceAdminRestTransport._BaseCreateLogicalView._get_unset_required_fields(
324
+ query_params
325
+ )
326
+ )
327
+
328
+ query_params["$alt"] = "json;enum-encoding=int"
329
+ return query_params
330
+
331
+ class _BaseCreateMaterializedView:
332
+ def __hash__(self): # pragma: NO COVER
333
+ return NotImplementedError("__hash__ must be implemented.")
334
+
335
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {
336
+ "materializedViewId": "",
337
+ }
338
+
339
+ @classmethod
340
+ def _get_unset_required_fields(cls, message_dict):
341
+ return {
342
+ k: v
343
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
344
+ if k not in message_dict
345
+ }
346
+
347
+ @staticmethod
348
+ def _get_http_options():
349
+ http_options: List[Dict[str, str]] = [
350
+ {
351
+ "method": "post",
352
+ "uri": "/v2/{parent=projects/*/instances/*}/materializedViews",
353
+ "body": "materialized_view",
354
+ },
355
+ ]
356
+ return http_options
357
+
358
+ @staticmethod
359
+ def _get_transcoded_request(http_options, request):
360
+ pb_request = bigtable_instance_admin.CreateMaterializedViewRequest.pb(
361
+ request
362
+ )
363
+ transcoded_request = path_template.transcode(http_options, pb_request)
364
+ return transcoded_request
365
+
366
+ @staticmethod
367
+ def _get_request_body_json(transcoded_request):
368
+ # Jsonify the request body
369
+
370
+ body = json_format.MessageToJson(
371
+ transcoded_request["body"], use_integers_for_enums=True
372
+ )
373
+ return body
374
+
375
+ @staticmethod
376
+ def _get_query_params_json(transcoded_request):
377
+ query_params = json.loads(
378
+ json_format.MessageToJson(
379
+ transcoded_request["query_params"],
380
+ use_integers_for_enums=True,
381
+ )
382
+ )
383
+ query_params.update(
384
+ _BaseBigtableInstanceAdminRestTransport._BaseCreateMaterializedView._get_unset_required_fields(
385
+ query_params
386
+ )
387
+ )
388
+
389
+ query_params["$alt"] = "json;enum-encoding=int"
390
+ return query_params
391
+
392
+ class _BaseDeleteAppProfile:
393
+ def __hash__(self): # pragma: NO COVER
394
+ return NotImplementedError("__hash__ must be implemented.")
395
+
396
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {
397
+ "ignoreWarnings": False,
398
+ }
399
+
400
+ @classmethod
401
+ def _get_unset_required_fields(cls, message_dict):
402
+ return {
403
+ k: v
404
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
405
+ if k not in message_dict
406
+ }
407
+
408
+ @staticmethod
409
+ def _get_http_options():
410
+ http_options: List[Dict[str, str]] = [
411
+ {
412
+ "method": "delete",
413
+ "uri": "/v2/{name=projects/*/instances/*/appProfiles/*}",
414
+ },
415
+ ]
416
+ return http_options
417
+
418
+ @staticmethod
419
+ def _get_transcoded_request(http_options, request):
420
+ pb_request = bigtable_instance_admin.DeleteAppProfileRequest.pb(request)
421
+ transcoded_request = path_template.transcode(http_options, pb_request)
422
+ return transcoded_request
423
+
424
+ @staticmethod
425
+ def _get_query_params_json(transcoded_request):
426
+ query_params = json.loads(
427
+ json_format.MessageToJson(
428
+ transcoded_request["query_params"],
429
+ use_integers_for_enums=True,
430
+ )
431
+ )
432
+ query_params.update(
433
+ _BaseBigtableInstanceAdminRestTransport._BaseDeleteAppProfile._get_unset_required_fields(
434
+ query_params
435
+ )
436
+ )
437
+
438
+ query_params["$alt"] = "json;enum-encoding=int"
439
+ return query_params
440
+
441
+ class _BaseDeleteCluster:
442
+ def __hash__(self): # pragma: NO COVER
443
+ return NotImplementedError("__hash__ must be implemented.")
444
+
445
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
446
+
447
+ @classmethod
448
+ def _get_unset_required_fields(cls, message_dict):
449
+ return {
450
+ k: v
451
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
452
+ if k not in message_dict
453
+ }
454
+
455
+ @staticmethod
456
+ def _get_http_options():
457
+ http_options: List[Dict[str, str]] = [
458
+ {
459
+ "method": "delete",
460
+ "uri": "/v2/{name=projects/*/instances/*/clusters/*}",
461
+ },
462
+ ]
463
+ return http_options
464
+
465
+ @staticmethod
466
+ def _get_transcoded_request(http_options, request):
467
+ pb_request = bigtable_instance_admin.DeleteClusterRequest.pb(request)
468
+ transcoded_request = path_template.transcode(http_options, pb_request)
469
+ return transcoded_request
470
+
471
+ @staticmethod
472
+ def _get_query_params_json(transcoded_request):
473
+ query_params = json.loads(
474
+ json_format.MessageToJson(
475
+ transcoded_request["query_params"],
476
+ use_integers_for_enums=True,
477
+ )
478
+ )
479
+ query_params.update(
480
+ _BaseBigtableInstanceAdminRestTransport._BaseDeleteCluster._get_unset_required_fields(
481
+ query_params
482
+ )
483
+ )
484
+
485
+ query_params["$alt"] = "json;enum-encoding=int"
486
+ return query_params
487
+
488
+ class _BaseDeleteInstance:
489
+ def __hash__(self): # pragma: NO COVER
490
+ return NotImplementedError("__hash__ must be implemented.")
491
+
492
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
493
+
494
+ @classmethod
495
+ def _get_unset_required_fields(cls, message_dict):
496
+ return {
497
+ k: v
498
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
499
+ if k not in message_dict
500
+ }
501
+
502
+ @staticmethod
503
+ def _get_http_options():
504
+ http_options: List[Dict[str, str]] = [
505
+ {
506
+ "method": "delete",
507
+ "uri": "/v2/{name=projects/*/instances/*}",
508
+ },
509
+ ]
510
+ return http_options
511
+
512
+ @staticmethod
513
+ def _get_transcoded_request(http_options, request):
514
+ pb_request = bigtable_instance_admin.DeleteInstanceRequest.pb(request)
515
+ transcoded_request = path_template.transcode(http_options, pb_request)
516
+ return transcoded_request
517
+
518
+ @staticmethod
519
+ def _get_query_params_json(transcoded_request):
520
+ query_params = json.loads(
521
+ json_format.MessageToJson(
522
+ transcoded_request["query_params"],
523
+ use_integers_for_enums=True,
524
+ )
525
+ )
526
+ query_params.update(
527
+ _BaseBigtableInstanceAdminRestTransport._BaseDeleteInstance._get_unset_required_fields(
528
+ query_params
529
+ )
530
+ )
531
+
532
+ query_params["$alt"] = "json;enum-encoding=int"
533
+ return query_params
534
+
535
+ class _BaseDeleteLogicalView:
536
+ def __hash__(self): # pragma: NO COVER
537
+ return NotImplementedError("__hash__ must be implemented.")
538
+
539
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
540
+
541
+ @classmethod
542
+ def _get_unset_required_fields(cls, message_dict):
543
+ return {
544
+ k: v
545
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
546
+ if k not in message_dict
547
+ }
548
+
549
+ @staticmethod
550
+ def _get_http_options():
551
+ http_options: List[Dict[str, str]] = [
552
+ {
553
+ "method": "delete",
554
+ "uri": "/v2/{name=projects/*/instances/*/logicalViews/*}",
555
+ },
556
+ ]
557
+ return http_options
558
+
559
+ @staticmethod
560
+ def _get_transcoded_request(http_options, request):
561
+ pb_request = bigtable_instance_admin.DeleteLogicalViewRequest.pb(request)
562
+ transcoded_request = path_template.transcode(http_options, pb_request)
563
+ return transcoded_request
564
+
565
+ @staticmethod
566
+ def _get_query_params_json(transcoded_request):
567
+ query_params = json.loads(
568
+ json_format.MessageToJson(
569
+ transcoded_request["query_params"],
570
+ use_integers_for_enums=True,
571
+ )
572
+ )
573
+ query_params.update(
574
+ _BaseBigtableInstanceAdminRestTransport._BaseDeleteLogicalView._get_unset_required_fields(
575
+ query_params
576
+ )
577
+ )
578
+
579
+ query_params["$alt"] = "json;enum-encoding=int"
580
+ return query_params
581
+
582
+ class _BaseDeleteMaterializedView:
583
+ def __hash__(self): # pragma: NO COVER
584
+ return NotImplementedError("__hash__ must be implemented.")
585
+
586
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
587
+
588
+ @classmethod
589
+ def _get_unset_required_fields(cls, message_dict):
590
+ return {
591
+ k: v
592
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
593
+ if k not in message_dict
594
+ }
595
+
596
+ @staticmethod
597
+ def _get_http_options():
598
+ http_options: List[Dict[str, str]] = [
599
+ {
600
+ "method": "delete",
601
+ "uri": "/v2/{name=projects/*/instances/*/materializedViews/*}",
602
+ },
603
+ ]
604
+ return http_options
605
+
606
+ @staticmethod
607
+ def _get_transcoded_request(http_options, request):
608
+ pb_request = bigtable_instance_admin.DeleteMaterializedViewRequest.pb(
609
+ request
610
+ )
611
+ transcoded_request = path_template.transcode(http_options, pb_request)
612
+ return transcoded_request
613
+
614
+ @staticmethod
615
+ def _get_query_params_json(transcoded_request):
616
+ query_params = json.loads(
617
+ json_format.MessageToJson(
618
+ transcoded_request["query_params"],
619
+ use_integers_for_enums=True,
620
+ )
621
+ )
622
+ query_params.update(
623
+ _BaseBigtableInstanceAdminRestTransport._BaseDeleteMaterializedView._get_unset_required_fields(
624
+ query_params
625
+ )
626
+ )
627
+
628
+ query_params["$alt"] = "json;enum-encoding=int"
629
+ return query_params
630
+
631
+ class _BaseGetAppProfile:
632
+ def __hash__(self): # pragma: NO COVER
633
+ return NotImplementedError("__hash__ must be implemented.")
634
+
635
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
636
+
637
+ @classmethod
638
+ def _get_unset_required_fields(cls, message_dict):
639
+ return {
640
+ k: v
641
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
642
+ if k not in message_dict
643
+ }
644
+
645
+ @staticmethod
646
+ def _get_http_options():
647
+ http_options: List[Dict[str, str]] = [
648
+ {
649
+ "method": "get",
650
+ "uri": "/v2/{name=projects/*/instances/*/appProfiles/*}",
651
+ },
652
+ ]
653
+ return http_options
654
+
655
+ @staticmethod
656
+ def _get_transcoded_request(http_options, request):
657
+ pb_request = bigtable_instance_admin.GetAppProfileRequest.pb(request)
658
+ transcoded_request = path_template.transcode(http_options, pb_request)
659
+ return transcoded_request
660
+
661
+ @staticmethod
662
+ def _get_query_params_json(transcoded_request):
663
+ query_params = json.loads(
664
+ json_format.MessageToJson(
665
+ transcoded_request["query_params"],
666
+ use_integers_for_enums=True,
667
+ )
668
+ )
669
+ query_params.update(
670
+ _BaseBigtableInstanceAdminRestTransport._BaseGetAppProfile._get_unset_required_fields(
671
+ query_params
672
+ )
673
+ )
674
+
675
+ query_params["$alt"] = "json;enum-encoding=int"
676
+ return query_params
677
+
678
+ class _BaseGetCluster:
679
+ def __hash__(self): # pragma: NO COVER
680
+ return NotImplementedError("__hash__ must be implemented.")
681
+
682
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
683
+
684
+ @classmethod
685
+ def _get_unset_required_fields(cls, message_dict):
686
+ return {
687
+ k: v
688
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
689
+ if k not in message_dict
690
+ }
691
+
692
+ @staticmethod
693
+ def _get_http_options():
694
+ http_options: List[Dict[str, str]] = [
695
+ {
696
+ "method": "get",
697
+ "uri": "/v2/{name=projects/*/instances/*/clusters/*}",
698
+ },
699
+ ]
700
+ return http_options
701
+
702
+ @staticmethod
703
+ def _get_transcoded_request(http_options, request):
704
+ pb_request = bigtable_instance_admin.GetClusterRequest.pb(request)
705
+ transcoded_request = path_template.transcode(http_options, pb_request)
706
+ return transcoded_request
707
+
708
+ @staticmethod
709
+ def _get_query_params_json(transcoded_request):
710
+ query_params = json.loads(
711
+ json_format.MessageToJson(
712
+ transcoded_request["query_params"],
713
+ use_integers_for_enums=True,
714
+ )
715
+ )
716
+ query_params.update(
717
+ _BaseBigtableInstanceAdminRestTransport._BaseGetCluster._get_unset_required_fields(
718
+ query_params
719
+ )
720
+ )
721
+
722
+ query_params["$alt"] = "json;enum-encoding=int"
723
+ return query_params
724
+
725
+ class _BaseGetIamPolicy:
726
+ def __hash__(self): # pragma: NO COVER
727
+ return NotImplementedError("__hash__ must be implemented.")
728
+
729
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
730
+
731
+ @classmethod
732
+ def _get_unset_required_fields(cls, message_dict):
733
+ return {
734
+ k: v
735
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
736
+ if k not in message_dict
737
+ }
738
+
739
+ @staticmethod
740
+ def _get_http_options():
741
+ http_options: List[Dict[str, str]] = [
742
+ {
743
+ "method": "post",
744
+ "uri": "/v2/{resource=projects/*/instances/*}:getIamPolicy",
745
+ "body": "*",
746
+ },
747
+ {
748
+ "method": "post",
749
+ "uri": "/v2/{resource=projects/*/instances/*/materializedViews/*}:getIamPolicy",
750
+ "body": "*",
751
+ },
752
+ {
753
+ "method": "post",
754
+ "uri": "/v2/{resource=projects/*/instances/*/logicalViews/*}:getIamPolicy",
755
+ "body": "*",
756
+ },
757
+ ]
758
+ return http_options
759
+
760
+ @staticmethod
761
+ def _get_transcoded_request(http_options, request):
762
+ pb_request = request
763
+ transcoded_request = path_template.transcode(http_options, pb_request)
764
+ return transcoded_request
765
+
766
+ @staticmethod
767
+ def _get_request_body_json(transcoded_request):
768
+ # Jsonify the request body
769
+
770
+ body = json_format.MessageToJson(
771
+ transcoded_request["body"], use_integers_for_enums=True
772
+ )
773
+ return body
774
+
775
+ @staticmethod
776
+ def _get_query_params_json(transcoded_request):
777
+ query_params = json.loads(
778
+ json_format.MessageToJson(
779
+ transcoded_request["query_params"],
780
+ use_integers_for_enums=True,
781
+ )
782
+ )
783
+ query_params.update(
784
+ _BaseBigtableInstanceAdminRestTransport._BaseGetIamPolicy._get_unset_required_fields(
785
+ query_params
786
+ )
787
+ )
788
+
789
+ query_params["$alt"] = "json;enum-encoding=int"
790
+ return query_params
791
+
792
+ class _BaseGetInstance:
793
+ def __hash__(self): # pragma: NO COVER
794
+ return NotImplementedError("__hash__ must be implemented.")
795
+
796
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
797
+
798
+ @classmethod
799
+ def _get_unset_required_fields(cls, message_dict):
800
+ return {
801
+ k: v
802
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
803
+ if k not in message_dict
804
+ }
805
+
806
+ @staticmethod
807
+ def _get_http_options():
808
+ http_options: List[Dict[str, str]] = [
809
+ {
810
+ "method": "get",
811
+ "uri": "/v2/{name=projects/*/instances/*}",
812
+ },
813
+ ]
814
+ return http_options
815
+
816
+ @staticmethod
817
+ def _get_transcoded_request(http_options, request):
818
+ pb_request = bigtable_instance_admin.GetInstanceRequest.pb(request)
819
+ transcoded_request = path_template.transcode(http_options, pb_request)
820
+ return transcoded_request
821
+
822
+ @staticmethod
823
+ def _get_query_params_json(transcoded_request):
824
+ query_params = json.loads(
825
+ json_format.MessageToJson(
826
+ transcoded_request["query_params"],
827
+ use_integers_for_enums=True,
828
+ )
829
+ )
830
+ query_params.update(
831
+ _BaseBigtableInstanceAdminRestTransport._BaseGetInstance._get_unset_required_fields(
832
+ query_params
833
+ )
834
+ )
835
+
836
+ query_params["$alt"] = "json;enum-encoding=int"
837
+ return query_params
838
+
839
+ class _BaseGetLogicalView:
840
+ def __hash__(self): # pragma: NO COVER
841
+ return NotImplementedError("__hash__ must be implemented.")
842
+
843
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
844
+
845
+ @classmethod
846
+ def _get_unset_required_fields(cls, message_dict):
847
+ return {
848
+ k: v
849
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
850
+ if k not in message_dict
851
+ }
852
+
853
+ @staticmethod
854
+ def _get_http_options():
855
+ http_options: List[Dict[str, str]] = [
856
+ {
857
+ "method": "get",
858
+ "uri": "/v2/{name=projects/*/instances/*/logicalViews/*}",
859
+ },
860
+ ]
861
+ return http_options
862
+
863
+ @staticmethod
864
+ def _get_transcoded_request(http_options, request):
865
+ pb_request = bigtable_instance_admin.GetLogicalViewRequest.pb(request)
866
+ transcoded_request = path_template.transcode(http_options, pb_request)
867
+ return transcoded_request
868
+
869
+ @staticmethod
870
+ def _get_query_params_json(transcoded_request):
871
+ query_params = json.loads(
872
+ json_format.MessageToJson(
873
+ transcoded_request["query_params"],
874
+ use_integers_for_enums=True,
875
+ )
876
+ )
877
+ query_params.update(
878
+ _BaseBigtableInstanceAdminRestTransport._BaseGetLogicalView._get_unset_required_fields(
879
+ query_params
880
+ )
881
+ )
882
+
883
+ query_params["$alt"] = "json;enum-encoding=int"
884
+ return query_params
885
+
886
+ class _BaseGetMaterializedView:
887
+ def __hash__(self): # pragma: NO COVER
888
+ return NotImplementedError("__hash__ must be implemented.")
889
+
890
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
891
+
892
+ @classmethod
893
+ def _get_unset_required_fields(cls, message_dict):
894
+ return {
895
+ k: v
896
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
897
+ if k not in message_dict
898
+ }
899
+
900
+ @staticmethod
901
+ def _get_http_options():
902
+ http_options: List[Dict[str, str]] = [
903
+ {
904
+ "method": "get",
905
+ "uri": "/v2/{name=projects/*/instances/*/materializedViews/*}",
906
+ },
907
+ ]
908
+ return http_options
909
+
910
+ @staticmethod
911
+ def _get_transcoded_request(http_options, request):
912
+ pb_request = bigtable_instance_admin.GetMaterializedViewRequest.pb(request)
913
+ transcoded_request = path_template.transcode(http_options, pb_request)
914
+ return transcoded_request
915
+
916
+ @staticmethod
917
+ def _get_query_params_json(transcoded_request):
918
+ query_params = json.loads(
919
+ json_format.MessageToJson(
920
+ transcoded_request["query_params"],
921
+ use_integers_for_enums=True,
922
+ )
923
+ )
924
+ query_params.update(
925
+ _BaseBigtableInstanceAdminRestTransport._BaseGetMaterializedView._get_unset_required_fields(
926
+ query_params
927
+ )
928
+ )
929
+
930
+ query_params["$alt"] = "json;enum-encoding=int"
931
+ return query_params
932
+
933
+ class _BaseListAppProfiles:
934
+ def __hash__(self): # pragma: NO COVER
935
+ return NotImplementedError("__hash__ must be implemented.")
936
+
937
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
938
+
939
+ @classmethod
940
+ def _get_unset_required_fields(cls, message_dict):
941
+ return {
942
+ k: v
943
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
944
+ if k not in message_dict
945
+ }
946
+
947
+ @staticmethod
948
+ def _get_http_options():
949
+ http_options: List[Dict[str, str]] = [
950
+ {
951
+ "method": "get",
952
+ "uri": "/v2/{parent=projects/*/instances/*}/appProfiles",
953
+ },
954
+ ]
955
+ return http_options
956
+
957
+ @staticmethod
958
+ def _get_transcoded_request(http_options, request):
959
+ pb_request = bigtable_instance_admin.ListAppProfilesRequest.pb(request)
960
+ transcoded_request = path_template.transcode(http_options, pb_request)
961
+ return transcoded_request
962
+
963
+ @staticmethod
964
+ def _get_query_params_json(transcoded_request):
965
+ query_params = json.loads(
966
+ json_format.MessageToJson(
967
+ transcoded_request["query_params"],
968
+ use_integers_for_enums=True,
969
+ )
970
+ )
971
+ query_params.update(
972
+ _BaseBigtableInstanceAdminRestTransport._BaseListAppProfiles._get_unset_required_fields(
973
+ query_params
974
+ )
975
+ )
976
+
977
+ query_params["$alt"] = "json;enum-encoding=int"
978
+ return query_params
979
+
980
+ class _BaseListClusters:
981
+ def __hash__(self): # pragma: NO COVER
982
+ return NotImplementedError("__hash__ must be implemented.")
983
+
984
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
985
+
986
+ @classmethod
987
+ def _get_unset_required_fields(cls, message_dict):
988
+ return {
989
+ k: v
990
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
991
+ if k not in message_dict
992
+ }
993
+
994
+ @staticmethod
995
+ def _get_http_options():
996
+ http_options: List[Dict[str, str]] = [
997
+ {
998
+ "method": "get",
999
+ "uri": "/v2/{parent=projects/*/instances/*}/clusters",
1000
+ },
1001
+ ]
1002
+ return http_options
1003
+
1004
+ @staticmethod
1005
+ def _get_transcoded_request(http_options, request):
1006
+ pb_request = bigtable_instance_admin.ListClustersRequest.pb(request)
1007
+ transcoded_request = path_template.transcode(http_options, pb_request)
1008
+ return transcoded_request
1009
+
1010
+ @staticmethod
1011
+ def _get_query_params_json(transcoded_request):
1012
+ query_params = json.loads(
1013
+ json_format.MessageToJson(
1014
+ transcoded_request["query_params"],
1015
+ use_integers_for_enums=True,
1016
+ )
1017
+ )
1018
+ query_params.update(
1019
+ _BaseBigtableInstanceAdminRestTransport._BaseListClusters._get_unset_required_fields(
1020
+ query_params
1021
+ )
1022
+ )
1023
+
1024
+ query_params["$alt"] = "json;enum-encoding=int"
1025
+ return query_params
1026
+
1027
+ class _BaseListHotTablets:
1028
+ def __hash__(self): # pragma: NO COVER
1029
+ return NotImplementedError("__hash__ must be implemented.")
1030
+
1031
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
1032
+
1033
+ @classmethod
1034
+ def _get_unset_required_fields(cls, message_dict):
1035
+ return {
1036
+ k: v
1037
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
1038
+ if k not in message_dict
1039
+ }
1040
+
1041
+ @staticmethod
1042
+ def _get_http_options():
1043
+ http_options: List[Dict[str, str]] = [
1044
+ {
1045
+ "method": "get",
1046
+ "uri": "/v2/{parent=projects/*/instances/*/clusters/*}/hotTablets",
1047
+ },
1048
+ ]
1049
+ return http_options
1050
+
1051
+ @staticmethod
1052
+ def _get_transcoded_request(http_options, request):
1053
+ pb_request = bigtable_instance_admin.ListHotTabletsRequest.pb(request)
1054
+ transcoded_request = path_template.transcode(http_options, pb_request)
1055
+ return transcoded_request
1056
+
1057
+ @staticmethod
1058
+ def _get_query_params_json(transcoded_request):
1059
+ query_params = json.loads(
1060
+ json_format.MessageToJson(
1061
+ transcoded_request["query_params"],
1062
+ use_integers_for_enums=True,
1063
+ )
1064
+ )
1065
+ query_params.update(
1066
+ _BaseBigtableInstanceAdminRestTransport._BaseListHotTablets._get_unset_required_fields(
1067
+ query_params
1068
+ )
1069
+ )
1070
+
1071
+ query_params["$alt"] = "json;enum-encoding=int"
1072
+ return query_params
1073
+
1074
+ class _BaseListInstances:
1075
+ def __hash__(self): # pragma: NO COVER
1076
+ return NotImplementedError("__hash__ must be implemented.")
1077
+
1078
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
1079
+
1080
+ @classmethod
1081
+ def _get_unset_required_fields(cls, message_dict):
1082
+ return {
1083
+ k: v
1084
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
1085
+ if k not in message_dict
1086
+ }
1087
+
1088
+ @staticmethod
1089
+ def _get_http_options():
1090
+ http_options: List[Dict[str, str]] = [
1091
+ {
1092
+ "method": "get",
1093
+ "uri": "/v2/{parent=projects/*}/instances",
1094
+ },
1095
+ ]
1096
+ return http_options
1097
+
1098
+ @staticmethod
1099
+ def _get_transcoded_request(http_options, request):
1100
+ pb_request = bigtable_instance_admin.ListInstancesRequest.pb(request)
1101
+ transcoded_request = path_template.transcode(http_options, pb_request)
1102
+ return transcoded_request
1103
+
1104
+ @staticmethod
1105
+ def _get_query_params_json(transcoded_request):
1106
+ query_params = json.loads(
1107
+ json_format.MessageToJson(
1108
+ transcoded_request["query_params"],
1109
+ use_integers_for_enums=True,
1110
+ )
1111
+ )
1112
+ query_params.update(
1113
+ _BaseBigtableInstanceAdminRestTransport._BaseListInstances._get_unset_required_fields(
1114
+ query_params
1115
+ )
1116
+ )
1117
+
1118
+ query_params["$alt"] = "json;enum-encoding=int"
1119
+ return query_params
1120
+
1121
+ class _BaseListLogicalViews:
1122
+ def __hash__(self): # pragma: NO COVER
1123
+ return NotImplementedError("__hash__ must be implemented.")
1124
+
1125
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
1126
+
1127
+ @classmethod
1128
+ def _get_unset_required_fields(cls, message_dict):
1129
+ return {
1130
+ k: v
1131
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
1132
+ if k not in message_dict
1133
+ }
1134
+
1135
+ @staticmethod
1136
+ def _get_http_options():
1137
+ http_options: List[Dict[str, str]] = [
1138
+ {
1139
+ "method": "get",
1140
+ "uri": "/v2/{parent=projects/*/instances/*}/logicalViews",
1141
+ },
1142
+ ]
1143
+ return http_options
1144
+
1145
+ @staticmethod
1146
+ def _get_transcoded_request(http_options, request):
1147
+ pb_request = bigtable_instance_admin.ListLogicalViewsRequest.pb(request)
1148
+ transcoded_request = path_template.transcode(http_options, pb_request)
1149
+ return transcoded_request
1150
+
1151
+ @staticmethod
1152
+ def _get_query_params_json(transcoded_request):
1153
+ query_params = json.loads(
1154
+ json_format.MessageToJson(
1155
+ transcoded_request["query_params"],
1156
+ use_integers_for_enums=True,
1157
+ )
1158
+ )
1159
+ query_params.update(
1160
+ _BaseBigtableInstanceAdminRestTransport._BaseListLogicalViews._get_unset_required_fields(
1161
+ query_params
1162
+ )
1163
+ )
1164
+
1165
+ query_params["$alt"] = "json;enum-encoding=int"
1166
+ return query_params
1167
+
1168
+ class _BaseListMaterializedViews:
1169
+ def __hash__(self): # pragma: NO COVER
1170
+ return NotImplementedError("__hash__ must be implemented.")
1171
+
1172
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
1173
+
1174
+ @classmethod
1175
+ def _get_unset_required_fields(cls, message_dict):
1176
+ return {
1177
+ k: v
1178
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
1179
+ if k not in message_dict
1180
+ }
1181
+
1182
+ @staticmethod
1183
+ def _get_http_options():
1184
+ http_options: List[Dict[str, str]] = [
1185
+ {
1186
+ "method": "get",
1187
+ "uri": "/v2/{parent=projects/*/instances/*}/materializedViews",
1188
+ },
1189
+ ]
1190
+ return http_options
1191
+
1192
+ @staticmethod
1193
+ def _get_transcoded_request(http_options, request):
1194
+ pb_request = bigtable_instance_admin.ListMaterializedViewsRequest.pb(
1195
+ request
1196
+ )
1197
+ transcoded_request = path_template.transcode(http_options, pb_request)
1198
+ return transcoded_request
1199
+
1200
+ @staticmethod
1201
+ def _get_query_params_json(transcoded_request):
1202
+ query_params = json.loads(
1203
+ json_format.MessageToJson(
1204
+ transcoded_request["query_params"],
1205
+ use_integers_for_enums=True,
1206
+ )
1207
+ )
1208
+ query_params.update(
1209
+ _BaseBigtableInstanceAdminRestTransport._BaseListMaterializedViews._get_unset_required_fields(
1210
+ query_params
1211
+ )
1212
+ )
1213
+
1214
+ query_params["$alt"] = "json;enum-encoding=int"
1215
+ return query_params
1216
+
1217
+ class _BasePartialUpdateCluster:
1218
+ def __hash__(self): # pragma: NO COVER
1219
+ return NotImplementedError("__hash__ must be implemented.")
1220
+
1221
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {
1222
+ "updateMask": {},
1223
+ }
1224
+
1225
+ @classmethod
1226
+ def _get_unset_required_fields(cls, message_dict):
1227
+ return {
1228
+ k: v
1229
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
1230
+ if k not in message_dict
1231
+ }
1232
+
1233
+ @staticmethod
1234
+ def _get_http_options():
1235
+ http_options: List[Dict[str, str]] = [
1236
+ {
1237
+ "method": "patch",
1238
+ "uri": "/v2/{cluster.name=projects/*/instances/*/clusters/*}",
1239
+ "body": "cluster",
1240
+ },
1241
+ ]
1242
+ return http_options
1243
+
1244
+ @staticmethod
1245
+ def _get_transcoded_request(http_options, request):
1246
+ pb_request = bigtable_instance_admin.PartialUpdateClusterRequest.pb(request)
1247
+ transcoded_request = path_template.transcode(http_options, pb_request)
1248
+ return transcoded_request
1249
+
1250
+ @staticmethod
1251
+ def _get_request_body_json(transcoded_request):
1252
+ # Jsonify the request body
1253
+
1254
+ body = json_format.MessageToJson(
1255
+ transcoded_request["body"], use_integers_for_enums=True
1256
+ )
1257
+ return body
1258
+
1259
+ @staticmethod
1260
+ def _get_query_params_json(transcoded_request):
1261
+ query_params = json.loads(
1262
+ json_format.MessageToJson(
1263
+ transcoded_request["query_params"],
1264
+ use_integers_for_enums=True,
1265
+ )
1266
+ )
1267
+ query_params.update(
1268
+ _BaseBigtableInstanceAdminRestTransport._BasePartialUpdateCluster._get_unset_required_fields(
1269
+ query_params
1270
+ )
1271
+ )
1272
+
1273
+ query_params["$alt"] = "json;enum-encoding=int"
1274
+ return query_params
1275
+
1276
+ class _BasePartialUpdateInstance:
1277
+ def __hash__(self): # pragma: NO COVER
1278
+ return NotImplementedError("__hash__ must be implemented.")
1279
+
1280
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {
1281
+ "updateMask": {},
1282
+ }
1283
+
1284
+ @classmethod
1285
+ def _get_unset_required_fields(cls, message_dict):
1286
+ return {
1287
+ k: v
1288
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
1289
+ if k not in message_dict
1290
+ }
1291
+
1292
+ @staticmethod
1293
+ def _get_http_options():
1294
+ http_options: List[Dict[str, str]] = [
1295
+ {
1296
+ "method": "patch",
1297
+ "uri": "/v2/{instance.name=projects/*/instances/*}",
1298
+ "body": "instance",
1299
+ },
1300
+ ]
1301
+ return http_options
1302
+
1303
+ @staticmethod
1304
+ def _get_transcoded_request(http_options, request):
1305
+ pb_request = bigtable_instance_admin.PartialUpdateInstanceRequest.pb(
1306
+ request
1307
+ )
1308
+ transcoded_request = path_template.transcode(http_options, pb_request)
1309
+ return transcoded_request
1310
+
1311
+ @staticmethod
1312
+ def _get_request_body_json(transcoded_request):
1313
+ # Jsonify the request body
1314
+
1315
+ body = json_format.MessageToJson(
1316
+ transcoded_request["body"], use_integers_for_enums=True
1317
+ )
1318
+ return body
1319
+
1320
+ @staticmethod
1321
+ def _get_query_params_json(transcoded_request):
1322
+ query_params = json.loads(
1323
+ json_format.MessageToJson(
1324
+ transcoded_request["query_params"],
1325
+ use_integers_for_enums=True,
1326
+ )
1327
+ )
1328
+ query_params.update(
1329
+ _BaseBigtableInstanceAdminRestTransport._BasePartialUpdateInstance._get_unset_required_fields(
1330
+ query_params
1331
+ )
1332
+ )
1333
+
1334
+ query_params["$alt"] = "json;enum-encoding=int"
1335
+ return query_params
1336
+
1337
+ class _BaseSetIamPolicy:
1338
+ def __hash__(self): # pragma: NO COVER
1339
+ return NotImplementedError("__hash__ must be implemented.")
1340
+
1341
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
1342
+
1343
+ @classmethod
1344
+ def _get_unset_required_fields(cls, message_dict):
1345
+ return {
1346
+ k: v
1347
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
1348
+ if k not in message_dict
1349
+ }
1350
+
1351
+ @staticmethod
1352
+ def _get_http_options():
1353
+ http_options: List[Dict[str, str]] = [
1354
+ {
1355
+ "method": "post",
1356
+ "uri": "/v2/{resource=projects/*/instances/*}:setIamPolicy",
1357
+ "body": "*",
1358
+ },
1359
+ {
1360
+ "method": "post",
1361
+ "uri": "/v2/{resource=projects/*/instances/*/materializedViews/*}:setIamPolicy",
1362
+ "body": "*",
1363
+ },
1364
+ {
1365
+ "method": "post",
1366
+ "uri": "/v2/{resource=projects/*/instances/*/logicalViews/*}:setIamPolicy",
1367
+ "body": "*",
1368
+ },
1369
+ ]
1370
+ return http_options
1371
+
1372
+ @staticmethod
1373
+ def _get_transcoded_request(http_options, request):
1374
+ pb_request = request
1375
+ transcoded_request = path_template.transcode(http_options, pb_request)
1376
+ return transcoded_request
1377
+
1378
+ @staticmethod
1379
+ def _get_request_body_json(transcoded_request):
1380
+ # Jsonify the request body
1381
+
1382
+ body = json_format.MessageToJson(
1383
+ transcoded_request["body"], use_integers_for_enums=True
1384
+ )
1385
+ return body
1386
+
1387
+ @staticmethod
1388
+ def _get_query_params_json(transcoded_request):
1389
+ query_params = json.loads(
1390
+ json_format.MessageToJson(
1391
+ transcoded_request["query_params"],
1392
+ use_integers_for_enums=True,
1393
+ )
1394
+ )
1395
+ query_params.update(
1396
+ _BaseBigtableInstanceAdminRestTransport._BaseSetIamPolicy._get_unset_required_fields(
1397
+ query_params
1398
+ )
1399
+ )
1400
+
1401
+ query_params["$alt"] = "json;enum-encoding=int"
1402
+ return query_params
1403
+
1404
+ class _BaseTestIamPermissions:
1405
+ def __hash__(self): # pragma: NO COVER
1406
+ return NotImplementedError("__hash__ must be implemented.")
1407
+
1408
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
1409
+
1410
+ @classmethod
1411
+ def _get_unset_required_fields(cls, message_dict):
1412
+ return {
1413
+ k: v
1414
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
1415
+ if k not in message_dict
1416
+ }
1417
+
1418
+ @staticmethod
1419
+ def _get_http_options():
1420
+ http_options: List[Dict[str, str]] = [
1421
+ {
1422
+ "method": "post",
1423
+ "uri": "/v2/{resource=projects/*/instances/*}:testIamPermissions",
1424
+ "body": "*",
1425
+ },
1426
+ {
1427
+ "method": "post",
1428
+ "uri": "/v2/{resource=projects/*/instances/*/materializedViews/*}:testIamPermissions",
1429
+ "body": "*",
1430
+ },
1431
+ {
1432
+ "method": "post",
1433
+ "uri": "/v2/{resource=projects/*/instances/*/logicalViews/*}:testIamPermissions",
1434
+ "body": "*",
1435
+ },
1436
+ ]
1437
+ return http_options
1438
+
1439
+ @staticmethod
1440
+ def _get_transcoded_request(http_options, request):
1441
+ pb_request = request
1442
+ transcoded_request = path_template.transcode(http_options, pb_request)
1443
+ return transcoded_request
1444
+
1445
+ @staticmethod
1446
+ def _get_request_body_json(transcoded_request):
1447
+ # Jsonify the request body
1448
+
1449
+ body = json_format.MessageToJson(
1450
+ transcoded_request["body"], use_integers_for_enums=True
1451
+ )
1452
+ return body
1453
+
1454
+ @staticmethod
1455
+ def _get_query_params_json(transcoded_request):
1456
+ query_params = json.loads(
1457
+ json_format.MessageToJson(
1458
+ transcoded_request["query_params"],
1459
+ use_integers_for_enums=True,
1460
+ )
1461
+ )
1462
+ query_params.update(
1463
+ _BaseBigtableInstanceAdminRestTransport._BaseTestIamPermissions._get_unset_required_fields(
1464
+ query_params
1465
+ )
1466
+ )
1467
+
1468
+ query_params["$alt"] = "json;enum-encoding=int"
1469
+ return query_params
1470
+
1471
+ class _BaseUpdateAppProfile:
1472
+ def __hash__(self): # pragma: NO COVER
1473
+ return NotImplementedError("__hash__ must be implemented.")
1474
+
1475
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {
1476
+ "updateMask": {},
1477
+ }
1478
+
1479
+ @classmethod
1480
+ def _get_unset_required_fields(cls, message_dict):
1481
+ return {
1482
+ k: v
1483
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
1484
+ if k not in message_dict
1485
+ }
1486
+
1487
+ @staticmethod
1488
+ def _get_http_options():
1489
+ http_options: List[Dict[str, str]] = [
1490
+ {
1491
+ "method": "patch",
1492
+ "uri": "/v2/{app_profile.name=projects/*/instances/*/appProfiles/*}",
1493
+ "body": "app_profile",
1494
+ },
1495
+ ]
1496
+ return http_options
1497
+
1498
+ @staticmethod
1499
+ def _get_transcoded_request(http_options, request):
1500
+ pb_request = bigtable_instance_admin.UpdateAppProfileRequest.pb(request)
1501
+ transcoded_request = path_template.transcode(http_options, pb_request)
1502
+ return transcoded_request
1503
+
1504
+ @staticmethod
1505
+ def _get_request_body_json(transcoded_request):
1506
+ # Jsonify the request body
1507
+
1508
+ body = json_format.MessageToJson(
1509
+ transcoded_request["body"], use_integers_for_enums=True
1510
+ )
1511
+ return body
1512
+
1513
+ @staticmethod
1514
+ def _get_query_params_json(transcoded_request):
1515
+ query_params = json.loads(
1516
+ json_format.MessageToJson(
1517
+ transcoded_request["query_params"],
1518
+ use_integers_for_enums=True,
1519
+ )
1520
+ )
1521
+ query_params.update(
1522
+ _BaseBigtableInstanceAdminRestTransport._BaseUpdateAppProfile._get_unset_required_fields(
1523
+ query_params
1524
+ )
1525
+ )
1526
+
1527
+ query_params["$alt"] = "json;enum-encoding=int"
1528
+ return query_params
1529
+
1530
+ class _BaseUpdateCluster:
1531
+ def __hash__(self): # pragma: NO COVER
1532
+ return NotImplementedError("__hash__ must be implemented.")
1533
+
1534
+ @staticmethod
1535
+ def _get_http_options():
1536
+ http_options: List[Dict[str, str]] = [
1537
+ {
1538
+ "method": "put",
1539
+ "uri": "/v2/{name=projects/*/instances/*/clusters/*}",
1540
+ "body": "*",
1541
+ },
1542
+ ]
1543
+ return http_options
1544
+
1545
+ @staticmethod
1546
+ def _get_transcoded_request(http_options, request):
1547
+ pb_request = instance.Cluster.pb(request)
1548
+ transcoded_request = path_template.transcode(http_options, pb_request)
1549
+ return transcoded_request
1550
+
1551
+ @staticmethod
1552
+ def _get_request_body_json(transcoded_request):
1553
+ # Jsonify the request body
1554
+
1555
+ body = json_format.MessageToJson(
1556
+ transcoded_request["body"], use_integers_for_enums=True
1557
+ )
1558
+ return body
1559
+
1560
+ @staticmethod
1561
+ def _get_query_params_json(transcoded_request):
1562
+ query_params = json.loads(
1563
+ json_format.MessageToJson(
1564
+ transcoded_request["query_params"],
1565
+ use_integers_for_enums=True,
1566
+ )
1567
+ )
1568
+
1569
+ query_params["$alt"] = "json;enum-encoding=int"
1570
+ return query_params
1571
+
1572
+ class _BaseUpdateInstance:
1573
+ def __hash__(self): # pragma: NO COVER
1574
+ return NotImplementedError("__hash__ must be implemented.")
1575
+
1576
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
1577
+
1578
+ @classmethod
1579
+ def _get_unset_required_fields(cls, message_dict):
1580
+ return {
1581
+ k: v
1582
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
1583
+ if k not in message_dict
1584
+ }
1585
+
1586
+ @staticmethod
1587
+ def _get_http_options():
1588
+ http_options: List[Dict[str, str]] = [
1589
+ {
1590
+ "method": "put",
1591
+ "uri": "/v2/{name=projects/*/instances/*}",
1592
+ "body": "*",
1593
+ },
1594
+ ]
1595
+ return http_options
1596
+
1597
+ @staticmethod
1598
+ def _get_transcoded_request(http_options, request):
1599
+ pb_request = instance.Instance.pb(request)
1600
+ transcoded_request = path_template.transcode(http_options, pb_request)
1601
+ return transcoded_request
1602
+
1603
+ @staticmethod
1604
+ def _get_request_body_json(transcoded_request):
1605
+ # Jsonify the request body
1606
+
1607
+ body = json_format.MessageToJson(
1608
+ transcoded_request["body"], use_integers_for_enums=True
1609
+ )
1610
+ return body
1611
+
1612
+ @staticmethod
1613
+ def _get_query_params_json(transcoded_request):
1614
+ query_params = json.loads(
1615
+ json_format.MessageToJson(
1616
+ transcoded_request["query_params"],
1617
+ use_integers_for_enums=True,
1618
+ )
1619
+ )
1620
+ query_params.update(
1621
+ _BaseBigtableInstanceAdminRestTransport._BaseUpdateInstance._get_unset_required_fields(
1622
+ query_params
1623
+ )
1624
+ )
1625
+
1626
+ query_params["$alt"] = "json;enum-encoding=int"
1627
+ return query_params
1628
+
1629
+ class _BaseUpdateLogicalView:
1630
+ def __hash__(self): # pragma: NO COVER
1631
+ return NotImplementedError("__hash__ must be implemented.")
1632
+
1633
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
1634
+
1635
+ @classmethod
1636
+ def _get_unset_required_fields(cls, message_dict):
1637
+ return {
1638
+ k: v
1639
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
1640
+ if k not in message_dict
1641
+ }
1642
+
1643
+ @staticmethod
1644
+ def _get_http_options():
1645
+ http_options: List[Dict[str, str]] = [
1646
+ {
1647
+ "method": "patch",
1648
+ "uri": "/v2/{logical_view.name=projects/*/instances/*/logicalViews/*}",
1649
+ "body": "logical_view",
1650
+ },
1651
+ ]
1652
+ return http_options
1653
+
1654
+ @staticmethod
1655
+ def _get_transcoded_request(http_options, request):
1656
+ pb_request = bigtable_instance_admin.UpdateLogicalViewRequest.pb(request)
1657
+ transcoded_request = path_template.transcode(http_options, pb_request)
1658
+ return transcoded_request
1659
+
1660
+ @staticmethod
1661
+ def _get_request_body_json(transcoded_request):
1662
+ # Jsonify the request body
1663
+
1664
+ body = json_format.MessageToJson(
1665
+ transcoded_request["body"], use_integers_for_enums=True
1666
+ )
1667
+ return body
1668
+
1669
+ @staticmethod
1670
+ def _get_query_params_json(transcoded_request):
1671
+ query_params = json.loads(
1672
+ json_format.MessageToJson(
1673
+ transcoded_request["query_params"],
1674
+ use_integers_for_enums=True,
1675
+ )
1676
+ )
1677
+ query_params.update(
1678
+ _BaseBigtableInstanceAdminRestTransport._BaseUpdateLogicalView._get_unset_required_fields(
1679
+ query_params
1680
+ )
1681
+ )
1682
+
1683
+ query_params["$alt"] = "json;enum-encoding=int"
1684
+ return query_params
1685
+
1686
+ class _BaseUpdateMaterializedView:
1687
+ def __hash__(self): # pragma: NO COVER
1688
+ return NotImplementedError("__hash__ must be implemented.")
1689
+
1690
+ __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
1691
+
1692
+ @classmethod
1693
+ def _get_unset_required_fields(cls, message_dict):
1694
+ return {
1695
+ k: v
1696
+ for k, v in cls.__REQUIRED_FIELDS_DEFAULT_VALUES.items()
1697
+ if k not in message_dict
1698
+ }
1699
+
1700
+ @staticmethod
1701
+ def _get_http_options():
1702
+ http_options: List[Dict[str, str]] = [
1703
+ {
1704
+ "method": "patch",
1705
+ "uri": "/v2/{materialized_view.name=projects/*/instances/*/materializedViews/*}",
1706
+ "body": "materialized_view",
1707
+ },
1708
+ ]
1709
+ return http_options
1710
+
1711
+ @staticmethod
1712
+ def _get_transcoded_request(http_options, request):
1713
+ pb_request = bigtable_instance_admin.UpdateMaterializedViewRequest.pb(
1714
+ request
1715
+ )
1716
+ transcoded_request = path_template.transcode(http_options, pb_request)
1717
+ return transcoded_request
1718
+
1719
+ @staticmethod
1720
+ def _get_request_body_json(transcoded_request):
1721
+ # Jsonify the request body
1722
+
1723
+ body = json_format.MessageToJson(
1724
+ transcoded_request["body"], use_integers_for_enums=True
1725
+ )
1726
+ return body
1727
+
1728
+ @staticmethod
1729
+ def _get_query_params_json(transcoded_request):
1730
+ query_params = json.loads(
1731
+ json_format.MessageToJson(
1732
+ transcoded_request["query_params"],
1733
+ use_integers_for_enums=True,
1734
+ )
1735
+ )
1736
+ query_params.update(
1737
+ _BaseBigtableInstanceAdminRestTransport._BaseUpdateMaterializedView._get_unset_required_fields(
1738
+ query_params
1739
+ )
1740
+ )
1741
+
1742
+ query_params["$alt"] = "json;enum-encoding=int"
1743
+ return query_params
1744
+
1745
+
1746
+ __all__ = ("_BaseBigtableInstanceAdminRestTransport",)