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,776 @@
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
+ from __future__ import annotations
17
+
18
+ from typing import MutableMapping, MutableSequence
19
+
20
+ import proto # type: ignore
21
+
22
+
23
+ __protobuf__ = proto.module(
24
+ package="google.bigtable.admin.v2",
25
+ manifest={
26
+ "Type",
27
+ },
28
+ )
29
+
30
+
31
+ class Type(proto.Message):
32
+ r"""``Type`` represents the type of data that is written to, read from,
33
+ or stored in Bigtable. It is heavily based on the GoogleSQL standard
34
+ to help maintain familiarity and consistency across products and
35
+ features.
36
+
37
+ For compatibility with Bigtable's existing untyped APIs, each
38
+ ``Type`` includes an ``Encoding`` which describes how to convert to
39
+ or from the underlying data.
40
+
41
+ Each encoding can operate in one of two modes:
42
+
43
+ - Sorted: In this mode, Bigtable guarantees that
44
+ ``Encode(X) <= Encode(Y)`` if and only if ``X <= Y``. This is
45
+ useful anywhere sort order is important, for example when
46
+ encoding keys.
47
+ - Distinct: In this mode, Bigtable guarantees that if ``X != Y``
48
+ then ``Encode(X) != Encode(Y)``. However, the converse is not
49
+ guaranteed. For example, both "{'foo': '1', 'bar': '2'}" and
50
+ "{'bar': '2', 'foo': '1'}" are valid encodings of the same JSON
51
+ value.
52
+
53
+ The API clearly documents which mode is used wherever an encoding
54
+ can be configured. Each encoding also documents which values are
55
+ supported in which modes. For example, when encoding INT64 as a
56
+ numeric STRING, negative numbers cannot be encoded in sorted mode.
57
+ This is because ``INT64(1) > INT64(-1)``, but
58
+ ``STRING("-00001") > STRING("00001")``.
59
+
60
+ This message has `oneof`_ fields (mutually exclusive fields).
61
+ For each oneof, at most one member field can be set at the same time.
62
+ Setting any member of the oneof automatically clears all other
63
+ members.
64
+
65
+ .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
66
+
67
+ Attributes:
68
+ bytes_type (google.cloud.bigtable_admin_v2.types.Type.Bytes):
69
+ Bytes
70
+
71
+ This field is a member of `oneof`_ ``kind``.
72
+ string_type (google.cloud.bigtable_admin_v2.types.Type.String):
73
+ String
74
+
75
+ This field is a member of `oneof`_ ``kind``.
76
+ int64_type (google.cloud.bigtable_admin_v2.types.Type.Int64):
77
+ Int64
78
+
79
+ This field is a member of `oneof`_ ``kind``.
80
+ float32_type (google.cloud.bigtable_admin_v2.types.Type.Float32):
81
+ Float32
82
+
83
+ This field is a member of `oneof`_ ``kind``.
84
+ float64_type (google.cloud.bigtable_admin_v2.types.Type.Float64):
85
+ Float64
86
+
87
+ This field is a member of `oneof`_ ``kind``.
88
+ bool_type (google.cloud.bigtable_admin_v2.types.Type.Bool):
89
+ Bool
90
+
91
+ This field is a member of `oneof`_ ``kind``.
92
+ timestamp_type (google.cloud.bigtable_admin_v2.types.Type.Timestamp):
93
+ Timestamp
94
+
95
+ This field is a member of `oneof`_ ``kind``.
96
+ date_type (google.cloud.bigtable_admin_v2.types.Type.Date):
97
+ Date
98
+
99
+ This field is a member of `oneof`_ ``kind``.
100
+ aggregate_type (google.cloud.bigtable_admin_v2.types.Type.Aggregate):
101
+ Aggregate
102
+
103
+ This field is a member of `oneof`_ ``kind``.
104
+ struct_type (google.cloud.bigtable_admin_v2.types.Type.Struct):
105
+ Struct
106
+
107
+ This field is a member of `oneof`_ ``kind``.
108
+ array_type (google.cloud.bigtable_admin_v2.types.Type.Array):
109
+ Array
110
+
111
+ This field is a member of `oneof`_ ``kind``.
112
+ map_type (google.cloud.bigtable_admin_v2.types.Type.Map):
113
+ Map
114
+
115
+ This field is a member of `oneof`_ ``kind``.
116
+ """
117
+
118
+ class Bytes(proto.Message):
119
+ r"""Bytes Values of type ``Bytes`` are stored in ``Value.bytes_value``.
120
+
121
+ Attributes:
122
+ encoding (google.cloud.bigtable_admin_v2.types.Type.Bytes.Encoding):
123
+ The encoding to use when converting to or
124
+ from lower level types.
125
+ """
126
+
127
+ class Encoding(proto.Message):
128
+ r"""Rules used to convert to or from lower level types.
129
+
130
+ .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
131
+
132
+ Attributes:
133
+ raw (google.cloud.bigtable_admin_v2.types.Type.Bytes.Encoding.Raw):
134
+ Use ``Raw`` encoding.
135
+
136
+ This field is a member of `oneof`_ ``encoding``.
137
+ """
138
+
139
+ class Raw(proto.Message):
140
+ r"""Leaves the value as-is.
141
+
142
+ Sorted mode: all values are supported.
143
+
144
+ Distinct mode: all values are supported.
145
+
146
+ """
147
+
148
+ raw: "Type.Bytes.Encoding.Raw" = proto.Field(
149
+ proto.MESSAGE,
150
+ number=1,
151
+ oneof="encoding",
152
+ message="Type.Bytes.Encoding.Raw",
153
+ )
154
+
155
+ encoding: "Type.Bytes.Encoding" = proto.Field(
156
+ proto.MESSAGE,
157
+ number=1,
158
+ message="Type.Bytes.Encoding",
159
+ )
160
+
161
+ class String(proto.Message):
162
+ r"""String Values of type ``String`` are stored in
163
+ ``Value.string_value``.
164
+
165
+ Attributes:
166
+ encoding (google.cloud.bigtable_admin_v2.types.Type.String.Encoding):
167
+ The encoding to use when converting to or
168
+ from lower level types.
169
+ """
170
+
171
+ class Encoding(proto.Message):
172
+ r"""Rules used to convert to or from lower level types.
173
+
174
+ This message has `oneof`_ fields (mutually exclusive fields).
175
+ For each oneof, at most one member field can be set at the same time.
176
+ Setting any member of the oneof automatically clears all other
177
+ members.
178
+
179
+ .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
180
+
181
+ Attributes:
182
+ utf8_raw (google.cloud.bigtable_admin_v2.types.Type.String.Encoding.Utf8Raw):
183
+ Deprecated: if set, converts to an empty ``utf8_bytes``.
184
+
185
+ This field is a member of `oneof`_ ``encoding``.
186
+ utf8_bytes (google.cloud.bigtable_admin_v2.types.Type.String.Encoding.Utf8Bytes):
187
+ Use ``Utf8Bytes`` encoding.
188
+
189
+ This field is a member of `oneof`_ ``encoding``.
190
+ """
191
+
192
+ class Utf8Raw(proto.Message):
193
+ r"""Deprecated: prefer the equivalent ``Utf8Bytes``."""
194
+
195
+ class Utf8Bytes(proto.Message):
196
+ r"""UTF-8 encoding.
197
+
198
+ Sorted mode:
199
+
200
+ - All values are supported.
201
+ - Code point order is preserved.
202
+
203
+ Distinct mode: all values are supported.
204
+
205
+ Compatible with:
206
+
207
+ - BigQuery ``TEXT`` encoding
208
+ - HBase ``Bytes.toBytes``
209
+ - Java ``String#getBytes(StandardCharsets.UTF_8)``
210
+
211
+ """
212
+
213
+ utf8_raw: "Type.String.Encoding.Utf8Raw" = proto.Field(
214
+ proto.MESSAGE,
215
+ number=1,
216
+ oneof="encoding",
217
+ message="Type.String.Encoding.Utf8Raw",
218
+ )
219
+ utf8_bytes: "Type.String.Encoding.Utf8Bytes" = proto.Field(
220
+ proto.MESSAGE,
221
+ number=2,
222
+ oneof="encoding",
223
+ message="Type.String.Encoding.Utf8Bytes",
224
+ )
225
+
226
+ encoding: "Type.String.Encoding" = proto.Field(
227
+ proto.MESSAGE,
228
+ number=1,
229
+ message="Type.String.Encoding",
230
+ )
231
+
232
+ class Int64(proto.Message):
233
+ r"""Int64 Values of type ``Int64`` are stored in ``Value.int_value``.
234
+
235
+ Attributes:
236
+ encoding (google.cloud.bigtable_admin_v2.types.Type.Int64.Encoding):
237
+ The encoding to use when converting to or
238
+ from lower level types.
239
+ """
240
+
241
+ class Encoding(proto.Message):
242
+ r"""Rules used to convert to or from lower level types.
243
+
244
+ This message has `oneof`_ fields (mutually exclusive fields).
245
+ For each oneof, at most one member field can be set at the same time.
246
+ Setting any member of the oneof automatically clears all other
247
+ members.
248
+
249
+ .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
250
+
251
+ Attributes:
252
+ big_endian_bytes (google.cloud.bigtable_admin_v2.types.Type.Int64.Encoding.BigEndianBytes):
253
+ Use ``BigEndianBytes`` encoding.
254
+
255
+ This field is a member of `oneof`_ ``encoding``.
256
+ ordered_code_bytes (google.cloud.bigtable_admin_v2.types.Type.Int64.Encoding.OrderedCodeBytes):
257
+ Use ``OrderedCodeBytes`` encoding.
258
+
259
+ This field is a member of `oneof`_ ``encoding``.
260
+ """
261
+
262
+ class BigEndianBytes(proto.Message):
263
+ r"""Encodes the value as an 8-byte big-endian two's complement value.
264
+
265
+ Sorted mode: non-negative values are supported.
266
+
267
+ Distinct mode: all values are supported.
268
+
269
+ Compatible with:
270
+
271
+ - BigQuery ``BINARY`` encoding
272
+ - HBase ``Bytes.toBytes``
273
+ - Java ``ByteBuffer.putLong()`` with ``ByteOrder.BIG_ENDIAN``
274
+
275
+ Attributes:
276
+ bytes_type (google.cloud.bigtable_admin_v2.types.Type.Bytes):
277
+ Deprecated: ignored if set.
278
+ """
279
+
280
+ bytes_type: "Type.Bytes" = proto.Field(
281
+ proto.MESSAGE,
282
+ number=1,
283
+ message="Type.Bytes",
284
+ )
285
+
286
+ class OrderedCodeBytes(proto.Message):
287
+ r"""Encodes the value in a variable length binary format of up to
288
+ 10 bytes. Values that are closer to zero use fewer bytes.
289
+
290
+ Sorted mode: all values are supported.
291
+
292
+ Distinct mode: all values are supported.
293
+
294
+ """
295
+
296
+ big_endian_bytes: "Type.Int64.Encoding.BigEndianBytes" = proto.Field(
297
+ proto.MESSAGE,
298
+ number=1,
299
+ oneof="encoding",
300
+ message="Type.Int64.Encoding.BigEndianBytes",
301
+ )
302
+ ordered_code_bytes: "Type.Int64.Encoding.OrderedCodeBytes" = proto.Field(
303
+ proto.MESSAGE,
304
+ number=2,
305
+ oneof="encoding",
306
+ message="Type.Int64.Encoding.OrderedCodeBytes",
307
+ )
308
+
309
+ encoding: "Type.Int64.Encoding" = proto.Field(
310
+ proto.MESSAGE,
311
+ number=1,
312
+ message="Type.Int64.Encoding",
313
+ )
314
+
315
+ class Bool(proto.Message):
316
+ r"""bool Values of type ``Bool`` are stored in ``Value.bool_value``."""
317
+
318
+ class Float32(proto.Message):
319
+ r"""Float32 Values of type ``Float32`` are stored in
320
+ ``Value.float_value``.
321
+
322
+ """
323
+
324
+ class Float64(proto.Message):
325
+ r"""Float64 Values of type ``Float64`` are stored in
326
+ ``Value.float_value``.
327
+
328
+ """
329
+
330
+ class Timestamp(proto.Message):
331
+ r"""Timestamp Values of type ``Timestamp`` are stored in
332
+ ``Value.timestamp_value``.
333
+
334
+ Attributes:
335
+ encoding (google.cloud.bigtable_admin_v2.types.Type.Timestamp.Encoding):
336
+ The encoding to use when converting to or
337
+ from lower level types.
338
+ """
339
+
340
+ class Encoding(proto.Message):
341
+ r"""Rules used to convert to or from lower level types.
342
+
343
+ .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
344
+
345
+ Attributes:
346
+ unix_micros_int64 (google.cloud.bigtable_admin_v2.types.Type.Int64.Encoding):
347
+ Encodes the number of microseconds since the Unix epoch
348
+ using the given ``Int64`` encoding. Values must be
349
+ microsecond-aligned.
350
+
351
+ Compatible with:
352
+
353
+ - Java ``Instant.truncatedTo()`` with ``ChronoUnit.MICROS``
354
+
355
+ This field is a member of `oneof`_ ``encoding``.
356
+ """
357
+
358
+ unix_micros_int64: "Type.Int64.Encoding" = proto.Field(
359
+ proto.MESSAGE,
360
+ number=1,
361
+ oneof="encoding",
362
+ message="Type.Int64.Encoding",
363
+ )
364
+
365
+ encoding: "Type.Timestamp.Encoding" = proto.Field(
366
+ proto.MESSAGE,
367
+ number=1,
368
+ message="Type.Timestamp.Encoding",
369
+ )
370
+
371
+ class Date(proto.Message):
372
+ r"""Date Values of type ``Date`` are stored in ``Value.date_value``."""
373
+
374
+ class Struct(proto.Message):
375
+ r"""A structured data value, consisting of fields which map to
376
+ dynamically typed values. Values of type ``Struct`` are stored in
377
+ ``Value.array_value`` where entries are in the same order and number
378
+ as ``field_types``.
379
+
380
+ Attributes:
381
+ fields (MutableSequence[google.cloud.bigtable_admin_v2.types.Type.Struct.Field]):
382
+ The names and types of the fields in this
383
+ struct.
384
+ encoding (google.cloud.bigtable_admin_v2.types.Type.Struct.Encoding):
385
+ The encoding to use when converting to or
386
+ from lower level types.
387
+ """
388
+
389
+ class Field(proto.Message):
390
+ r"""A struct field and its type.
391
+
392
+ Attributes:
393
+ field_name (str):
394
+ The field name (optional). Fields without a ``field_name``
395
+ are considered anonymous and cannot be referenced by name.
396
+ type_ (google.cloud.bigtable_admin_v2.types.Type):
397
+ The type of values in this field.
398
+ """
399
+
400
+ field_name: str = proto.Field(
401
+ proto.STRING,
402
+ number=1,
403
+ )
404
+ type_: "Type" = proto.Field(
405
+ proto.MESSAGE,
406
+ number=2,
407
+ message="Type",
408
+ )
409
+
410
+ class Encoding(proto.Message):
411
+ r"""Rules used to convert to or from lower level types.
412
+
413
+ This message has `oneof`_ fields (mutually exclusive fields).
414
+ For each oneof, at most one member field can be set at the same time.
415
+ Setting any member of the oneof automatically clears all other
416
+ members.
417
+
418
+ .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
419
+
420
+ Attributes:
421
+ singleton (google.cloud.bigtable_admin_v2.types.Type.Struct.Encoding.Singleton):
422
+ Use ``Singleton`` encoding.
423
+
424
+ This field is a member of `oneof`_ ``encoding``.
425
+ delimited_bytes (google.cloud.bigtable_admin_v2.types.Type.Struct.Encoding.DelimitedBytes):
426
+ Use ``DelimitedBytes`` encoding.
427
+
428
+ This field is a member of `oneof`_ ``encoding``.
429
+ ordered_code_bytes (google.cloud.bigtable_admin_v2.types.Type.Struct.Encoding.OrderedCodeBytes):
430
+ User ``OrderedCodeBytes`` encoding.
431
+
432
+ This field is a member of `oneof`_ ``encoding``.
433
+ """
434
+
435
+ class Singleton(proto.Message):
436
+ r"""Uses the encoding of ``fields[0].type`` as-is. Only valid if
437
+ ``fields.size == 1``.
438
+
439
+ """
440
+
441
+ class DelimitedBytes(proto.Message):
442
+ r"""Fields are encoded independently and concatenated with a
443
+ configurable ``delimiter`` in between.
444
+
445
+ A struct with no fields defined is encoded as a single
446
+ ``delimiter``.
447
+
448
+ Sorted mode:
449
+
450
+ - Fields are encoded in sorted mode.
451
+ - Encoded field values must not contain any bytes <=
452
+ ``delimiter[0]``
453
+ - Element-wise order is preserved: ``A < B`` if ``A[0] < B[0]``, or
454
+ if ``A[0] == B[0] && A[1] < B[1]``, etc. Strict prefixes sort
455
+ first.
456
+
457
+ Distinct mode:
458
+
459
+ - Fields are encoded in distinct mode.
460
+ - Encoded field values must not contain ``delimiter[0]``.
461
+
462
+ Attributes:
463
+ delimiter (bytes):
464
+ Byte sequence used to delimit concatenated
465
+ fields. The delimiter must contain at least 1
466
+ character and at most 50 characters.
467
+ """
468
+
469
+ delimiter: bytes = proto.Field(
470
+ proto.BYTES,
471
+ number=1,
472
+ )
473
+
474
+ class OrderedCodeBytes(proto.Message):
475
+ r"""Fields are encoded independently and concatenated with the fixed
476
+ byte pair {0x00, 0x01} in between.
477
+
478
+ Any null (0x00) byte in an encoded field is replaced by the fixed
479
+ byte pair {0x00, 0xFF}.
480
+
481
+ Fields that encode to the empty string "" have special handling:
482
+
483
+ - If *every* field encodes to "", or if the STRUCT has no fields
484
+ defined, then the STRUCT is encoded as the fixed byte pair {0x00,
485
+ 0x00}.
486
+ - Otherwise, the STRUCT only encodes until the last non-empty
487
+ field, omitting any trailing empty fields. Any empty fields that
488
+ aren't omitted are replaced with the fixed byte pair {0x00,
489
+ 0x00}.
490
+
491
+ Examples:
492
+
493
+ - STRUCT() -> "\00\00"
494
+ - STRUCT("") -> "\00\00"
495
+ - STRUCT("", "") -> "\00\00"
496
+ - STRUCT("", "B") -> "\00\00" + "\00\01" + "B"
497
+ - STRUCT("A", "") -> "A"
498
+ - STRUCT("", "B", "") -> "\00\00" + "\00\01" + "B"
499
+ - STRUCT("A", "", "C") -> "A" + "\00\01" + "\00\00" + "\00\01" +
500
+ "C"
501
+
502
+ Since null bytes are always escaped, this encoding can cause size
503
+ blowup for encodings like ``Int64.BigEndianBytes`` that are likely
504
+ to produce many such bytes.
505
+
506
+ Sorted mode:
507
+
508
+ - Fields are encoded in sorted mode.
509
+ - All values supported by the field encodings are allowed
510
+ - Element-wise order is preserved: ``A < B`` if ``A[0] < B[0]``, or
511
+ if ``A[0] == B[0] && A[1] < B[1]``, etc. Strict prefixes sort
512
+ first.
513
+
514
+ Distinct mode:
515
+
516
+ - Fields are encoded in distinct mode.
517
+ - All values supported by the field encodings are allowed.
518
+
519
+ """
520
+
521
+ singleton: "Type.Struct.Encoding.Singleton" = proto.Field(
522
+ proto.MESSAGE,
523
+ number=1,
524
+ oneof="encoding",
525
+ message="Type.Struct.Encoding.Singleton",
526
+ )
527
+ delimited_bytes: "Type.Struct.Encoding.DelimitedBytes" = proto.Field(
528
+ proto.MESSAGE,
529
+ number=2,
530
+ oneof="encoding",
531
+ message="Type.Struct.Encoding.DelimitedBytes",
532
+ )
533
+ ordered_code_bytes: "Type.Struct.Encoding.OrderedCodeBytes" = proto.Field(
534
+ proto.MESSAGE,
535
+ number=3,
536
+ oneof="encoding",
537
+ message="Type.Struct.Encoding.OrderedCodeBytes",
538
+ )
539
+
540
+ fields: MutableSequence["Type.Struct.Field"] = proto.RepeatedField(
541
+ proto.MESSAGE,
542
+ number=1,
543
+ message="Type.Struct.Field",
544
+ )
545
+ encoding: "Type.Struct.Encoding" = proto.Field(
546
+ proto.MESSAGE,
547
+ number=2,
548
+ message="Type.Struct.Encoding",
549
+ )
550
+
551
+ class Array(proto.Message):
552
+ r"""An ordered list of elements of a given type. Values of type
553
+ ``Array`` are stored in ``Value.array_value``.
554
+
555
+ Attributes:
556
+ element_type (google.cloud.bigtable_admin_v2.types.Type):
557
+ The type of the elements in the array. This must not be
558
+ ``Array``.
559
+ """
560
+
561
+ element_type: "Type" = proto.Field(
562
+ proto.MESSAGE,
563
+ number=1,
564
+ message="Type",
565
+ )
566
+
567
+ class Map(proto.Message):
568
+ r"""A mapping of keys to values of a given type. Values of type ``Map``
569
+ are stored in a ``Value.array_value`` where each entry is another
570
+ ``Value.array_value`` with two elements (the key and the value, in
571
+ that order). Normally encoded Map values won't have repeated keys,
572
+ however, clients are expected to handle the case in which they do.
573
+ If the same key appears multiple times, the *last* value takes
574
+ precedence.
575
+
576
+ Attributes:
577
+ key_type (google.cloud.bigtable_admin_v2.types.Type):
578
+ The type of a map key. Only ``Bytes``, ``String``, and
579
+ ``Int64`` are allowed as key types.
580
+ value_type (google.cloud.bigtable_admin_v2.types.Type):
581
+ The type of the values in a map.
582
+ """
583
+
584
+ key_type: "Type" = proto.Field(
585
+ proto.MESSAGE,
586
+ number=1,
587
+ message="Type",
588
+ )
589
+ value_type: "Type" = proto.Field(
590
+ proto.MESSAGE,
591
+ number=2,
592
+ message="Type",
593
+ )
594
+
595
+ class Aggregate(proto.Message):
596
+ r"""A value that combines incremental updates into a summarized value.
597
+
598
+ Data is never directly written or read using type ``Aggregate``.
599
+ Writes will provide either the ``input_type`` or ``state_type``, and
600
+ reads will always return the ``state_type`` .
601
+
602
+ This message has `oneof`_ fields (mutually exclusive fields).
603
+ For each oneof, at most one member field can be set at the same time.
604
+ Setting any member of the oneof automatically clears all other
605
+ members.
606
+
607
+ .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
608
+
609
+ Attributes:
610
+ input_type (google.cloud.bigtable_admin_v2.types.Type):
611
+ Type of the inputs that are accumulated by this
612
+ ``Aggregate``, which must specify a full encoding. Use
613
+ ``AddInput`` mutations to accumulate new inputs.
614
+ state_type (google.cloud.bigtable_admin_v2.types.Type):
615
+ Output only. Type that holds the internal accumulator state
616
+ for the ``Aggregate``. This is a function of the
617
+ ``input_type`` and ``aggregator`` chosen, and will always
618
+ specify a full encoding.
619
+ sum (google.cloud.bigtable_admin_v2.types.Type.Aggregate.Sum):
620
+ Sum aggregator.
621
+
622
+ This field is a member of `oneof`_ ``aggregator``.
623
+ hllpp_unique_count (google.cloud.bigtable_admin_v2.types.Type.Aggregate.HyperLogLogPlusPlusUniqueCount):
624
+ HyperLogLogPlusPlusUniqueCount aggregator.
625
+
626
+ This field is a member of `oneof`_ ``aggregator``.
627
+ max_ (google.cloud.bigtable_admin_v2.types.Type.Aggregate.Max):
628
+ Max aggregator.
629
+
630
+ This field is a member of `oneof`_ ``aggregator``.
631
+ min_ (google.cloud.bigtable_admin_v2.types.Type.Aggregate.Min):
632
+ Min aggregator.
633
+
634
+ This field is a member of `oneof`_ ``aggregator``.
635
+ """
636
+
637
+ class Sum(proto.Message):
638
+ r"""Computes the sum of the input values. Allowed input: ``Int64``
639
+ State: same as input
640
+
641
+ """
642
+
643
+ class Max(proto.Message):
644
+ r"""Computes the max of the input values. Allowed input: ``Int64``
645
+ State: same as input
646
+
647
+ """
648
+
649
+ class Min(proto.Message):
650
+ r"""Computes the min of the input values. Allowed input: ``Int64``
651
+ State: same as input
652
+
653
+ """
654
+
655
+ class HyperLogLogPlusPlusUniqueCount(proto.Message):
656
+ r"""Computes an approximate unique count over the input values. When
657
+ using raw data as input, be careful to use a consistent encoding.
658
+ Otherwise the same value encoded differently could count more than
659
+ once, or two distinct values could count as identical. Input: Any,
660
+ or omit for Raw State: TBD Special state conversions: ``Int64`` (the
661
+ unique count estimate)
662
+
663
+ """
664
+
665
+ input_type: "Type" = proto.Field(
666
+ proto.MESSAGE,
667
+ number=1,
668
+ message="Type",
669
+ )
670
+ state_type: "Type" = proto.Field(
671
+ proto.MESSAGE,
672
+ number=2,
673
+ message="Type",
674
+ )
675
+ sum: "Type.Aggregate.Sum" = proto.Field(
676
+ proto.MESSAGE,
677
+ number=4,
678
+ oneof="aggregator",
679
+ message="Type.Aggregate.Sum",
680
+ )
681
+ hllpp_unique_count: "Type.Aggregate.HyperLogLogPlusPlusUniqueCount" = (
682
+ proto.Field(
683
+ proto.MESSAGE,
684
+ number=5,
685
+ oneof="aggregator",
686
+ message="Type.Aggregate.HyperLogLogPlusPlusUniqueCount",
687
+ )
688
+ )
689
+ max_: "Type.Aggregate.Max" = proto.Field(
690
+ proto.MESSAGE,
691
+ number=6,
692
+ oneof="aggregator",
693
+ message="Type.Aggregate.Max",
694
+ )
695
+ min_: "Type.Aggregate.Min" = proto.Field(
696
+ proto.MESSAGE,
697
+ number=7,
698
+ oneof="aggregator",
699
+ message="Type.Aggregate.Min",
700
+ )
701
+
702
+ bytes_type: Bytes = proto.Field(
703
+ proto.MESSAGE,
704
+ number=1,
705
+ oneof="kind",
706
+ message=Bytes,
707
+ )
708
+ string_type: String = proto.Field(
709
+ proto.MESSAGE,
710
+ number=2,
711
+ oneof="kind",
712
+ message=String,
713
+ )
714
+ int64_type: Int64 = proto.Field(
715
+ proto.MESSAGE,
716
+ number=5,
717
+ oneof="kind",
718
+ message=Int64,
719
+ )
720
+ float32_type: Float32 = proto.Field(
721
+ proto.MESSAGE,
722
+ number=12,
723
+ oneof="kind",
724
+ message=Float32,
725
+ )
726
+ float64_type: Float64 = proto.Field(
727
+ proto.MESSAGE,
728
+ number=9,
729
+ oneof="kind",
730
+ message=Float64,
731
+ )
732
+ bool_type: Bool = proto.Field(
733
+ proto.MESSAGE,
734
+ number=8,
735
+ oneof="kind",
736
+ message=Bool,
737
+ )
738
+ timestamp_type: Timestamp = proto.Field(
739
+ proto.MESSAGE,
740
+ number=10,
741
+ oneof="kind",
742
+ message=Timestamp,
743
+ )
744
+ date_type: Date = proto.Field(
745
+ proto.MESSAGE,
746
+ number=11,
747
+ oneof="kind",
748
+ message=Date,
749
+ )
750
+ aggregate_type: Aggregate = proto.Field(
751
+ proto.MESSAGE,
752
+ number=6,
753
+ oneof="kind",
754
+ message=Aggregate,
755
+ )
756
+ struct_type: Struct = proto.Field(
757
+ proto.MESSAGE,
758
+ number=7,
759
+ oneof="kind",
760
+ message=Struct,
761
+ )
762
+ array_type: Array = proto.Field(
763
+ proto.MESSAGE,
764
+ number=3,
765
+ oneof="kind",
766
+ message=Array,
767
+ )
768
+ map_type: Map = proto.Field(
769
+ proto.MESSAGE,
770
+ number=4,
771
+ oneof="kind",
772
+ message=Map,
773
+ )
774
+
775
+
776
+ __all__ = tuple(sorted(__protobuf__.manifest))