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,1612 @@
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
+ from google.cloud.bigtable_v2.types import types
23
+ from google.protobuf import timestamp_pb2 # type: ignore
24
+ from google.type import date_pb2 # type: ignore
25
+
26
+
27
+ __protobuf__ = proto.module(
28
+ package="google.bigtable.v2",
29
+ manifest={
30
+ "Row",
31
+ "Family",
32
+ "Column",
33
+ "Cell",
34
+ "Value",
35
+ "ArrayValue",
36
+ "RowRange",
37
+ "RowSet",
38
+ "ColumnRange",
39
+ "TimestampRange",
40
+ "ValueRange",
41
+ "RowFilter",
42
+ "Mutation",
43
+ "ReadModifyWriteRule",
44
+ "StreamPartition",
45
+ "StreamContinuationTokens",
46
+ "StreamContinuationToken",
47
+ "ProtoFormat",
48
+ "ColumnMetadata",
49
+ "ProtoSchema",
50
+ "ResultSetMetadata",
51
+ "ProtoRows",
52
+ "ProtoRowsBatch",
53
+ "PartialResultSet",
54
+ },
55
+ )
56
+
57
+
58
+ class Row(proto.Message):
59
+ r"""Specifies the complete (requested) contents of a single row
60
+ of a table. Rows which exceed 256MiB in size cannot be read in
61
+ full.
62
+
63
+ Attributes:
64
+ key (bytes):
65
+ The unique key which identifies this row
66
+ within its table. This is the same key that's
67
+ used to identify the row in, for example, a
68
+ MutateRowRequest. May contain any non-empty byte
69
+ string up to 4KiB in length.
70
+ families (MutableSequence[google.cloud.bigtable_v2.types.Family]):
71
+ May be empty, but only if the entire row is
72
+ empty. The mutual ordering of column families is
73
+ not specified.
74
+ """
75
+
76
+ key: bytes = proto.Field(
77
+ proto.BYTES,
78
+ number=1,
79
+ )
80
+ families: MutableSequence["Family"] = proto.RepeatedField(
81
+ proto.MESSAGE,
82
+ number=2,
83
+ message="Family",
84
+ )
85
+
86
+
87
+ class Family(proto.Message):
88
+ r"""Specifies (some of) the contents of a single row/column
89
+ family intersection of a table.
90
+
91
+ Attributes:
92
+ name (str):
93
+ The unique key which identifies this family within its row.
94
+ This is the same key that's used to identify the family in,
95
+ for example, a RowFilter which sets its
96
+ "family_name_regex_filter" field. Must match
97
+ ``[-_.a-zA-Z0-9]+``, except that AggregatingRowProcessors
98
+ may produce cells in a sentinel family with an empty name.
99
+ Must be no greater than 64 characters in length.
100
+ columns (MutableSequence[google.cloud.bigtable_v2.types.Column]):
101
+ Must not be empty. Sorted in order of
102
+ increasing "qualifier".
103
+ """
104
+
105
+ name: str = proto.Field(
106
+ proto.STRING,
107
+ number=1,
108
+ )
109
+ columns: MutableSequence["Column"] = proto.RepeatedField(
110
+ proto.MESSAGE,
111
+ number=2,
112
+ message="Column",
113
+ )
114
+
115
+
116
+ class Column(proto.Message):
117
+ r"""Specifies (some of) the contents of a single row/column
118
+ intersection of a table.
119
+
120
+ Attributes:
121
+ qualifier (bytes):
122
+ The unique key which identifies this column within its
123
+ family. This is the same key that's used to identify the
124
+ column in, for example, a RowFilter which sets its
125
+ ``column_qualifier_regex_filter`` field. May contain any
126
+ byte string, including the empty string, up to 16kiB in
127
+ length.
128
+ cells (MutableSequence[google.cloud.bigtable_v2.types.Cell]):
129
+ Must not be empty. Sorted in order of decreasing
130
+ "timestamp_micros".
131
+ """
132
+
133
+ qualifier: bytes = proto.Field(
134
+ proto.BYTES,
135
+ number=1,
136
+ )
137
+ cells: MutableSequence["Cell"] = proto.RepeatedField(
138
+ proto.MESSAGE,
139
+ number=2,
140
+ message="Cell",
141
+ )
142
+
143
+
144
+ class Cell(proto.Message):
145
+ r"""Specifies (some of) the contents of a single
146
+ row/column/timestamp of a table.
147
+
148
+ Attributes:
149
+ timestamp_micros (int):
150
+ The cell's stored timestamp, which also uniquely identifies
151
+ it within its column. Values are always expressed in
152
+ microseconds, but individual tables may set a coarser
153
+ granularity to further restrict the allowed values. For
154
+ example, a table which specifies millisecond granularity
155
+ will only allow values of ``timestamp_micros`` which are
156
+ multiples of 1000.
157
+ value (bytes):
158
+ The value stored in the cell.
159
+ May contain any byte string, including the empty
160
+ string, up to 100MiB in length.
161
+ labels (MutableSequence[str]):
162
+ Labels applied to the cell by a
163
+ [RowFilter][google.bigtable.v2.RowFilter].
164
+ """
165
+
166
+ timestamp_micros: int = proto.Field(
167
+ proto.INT64,
168
+ number=1,
169
+ )
170
+ value: bytes = proto.Field(
171
+ proto.BYTES,
172
+ number=2,
173
+ )
174
+ labels: MutableSequence[str] = proto.RepeatedField(
175
+ proto.STRING,
176
+ number=3,
177
+ )
178
+
179
+
180
+ class Value(proto.Message):
181
+ r"""``Value`` represents a dynamically typed value. The typed fields in
182
+ ``Value`` are used as a transport encoding for the actual value
183
+ (which may be of a more complex type). See the documentation of the
184
+ ``Type`` message for more details.
185
+
186
+ This message has `oneof`_ fields (mutually exclusive fields).
187
+ For each oneof, at most one member field can be set at the same time.
188
+ Setting any member of the oneof automatically clears all other
189
+ members.
190
+
191
+ .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
192
+
193
+ Attributes:
194
+ type_ (google.cloud.bigtable_v2.types.Type):
195
+ The verified ``Type`` of this ``Value``, if it cannot be
196
+ inferred.
197
+
198
+ Read results will never specify the encoding for ``type``
199
+ since the value will already have been decoded by the
200
+ server. Furthermore, the ``type`` will be omitted entirely
201
+ if it can be inferred from a previous response. The exact
202
+ semantics for inferring ``type`` will vary, and are
203
+ therefore documented separately for each read method.
204
+
205
+ When using composite types (Struct, Array, Map) only the
206
+ outermost ``Value`` will specify the ``type``. This
207
+ top-level ``type`` will define the types for any nested
208
+ ``Struct' fields,``\ Array\ ``elements, or``\ Map\ ``key/value pairs. If a nested``\ Value\ ``provides a``\ type\`
209
+ on write, the request will be rejected with
210
+ INVALID_ARGUMENT.
211
+ raw_value (bytes):
212
+ Represents a raw byte sequence with no type information. The
213
+ ``type`` field must be omitted.
214
+
215
+ This field is a member of `oneof`_ ``kind``.
216
+ raw_timestamp_micros (int):
217
+ Represents a raw cell timestamp with no type information.
218
+ The ``type`` field must be omitted.
219
+
220
+ This field is a member of `oneof`_ ``kind``.
221
+ bytes_value (bytes):
222
+ Represents a typed value transported as a
223
+ byte sequence.
224
+
225
+ This field is a member of `oneof`_ ``kind``.
226
+ string_value (str):
227
+ Represents a typed value transported as a
228
+ string.
229
+
230
+ This field is a member of `oneof`_ ``kind``.
231
+ int_value (int):
232
+ Represents a typed value transported as an
233
+ integer.
234
+
235
+ This field is a member of `oneof`_ ``kind``.
236
+ bool_value (bool):
237
+ Represents a typed value transported as a
238
+ boolean.
239
+
240
+ This field is a member of `oneof`_ ``kind``.
241
+ float_value (float):
242
+ Represents a typed value transported as a
243
+ floating point number.
244
+
245
+ This field is a member of `oneof`_ ``kind``.
246
+ timestamp_value (google.protobuf.timestamp_pb2.Timestamp):
247
+ Represents a typed value transported as a
248
+ timestamp.
249
+
250
+ This field is a member of `oneof`_ ``kind``.
251
+ date_value (google.type.date_pb2.Date):
252
+ Represents a typed value transported as a
253
+ date.
254
+
255
+ This field is a member of `oneof`_ ``kind``.
256
+ array_value (google.cloud.bigtable_v2.types.ArrayValue):
257
+ Represents a typed value transported as a sequence of
258
+ values. To differentiate between ``Struct``, ``Array``, and
259
+ ``Map``, the outermost ``Value`` must provide an explicit
260
+ ``type`` on write. This ``type`` will apply recursively to
261
+ the nested ``Struct`` fields, ``Array`` elements, or ``Map``
262
+ key/value pairs, which *must not* supply their own ``type``.
263
+
264
+ This field is a member of `oneof`_ ``kind``.
265
+ """
266
+
267
+ type_: types.Type = proto.Field(
268
+ proto.MESSAGE,
269
+ number=7,
270
+ message=types.Type,
271
+ )
272
+ raw_value: bytes = proto.Field(
273
+ proto.BYTES,
274
+ number=8,
275
+ oneof="kind",
276
+ )
277
+ raw_timestamp_micros: int = proto.Field(
278
+ proto.INT64,
279
+ number=9,
280
+ oneof="kind",
281
+ )
282
+ bytes_value: bytes = proto.Field(
283
+ proto.BYTES,
284
+ number=2,
285
+ oneof="kind",
286
+ )
287
+ string_value: str = proto.Field(
288
+ proto.STRING,
289
+ number=3,
290
+ oneof="kind",
291
+ )
292
+ int_value: int = proto.Field(
293
+ proto.INT64,
294
+ number=6,
295
+ oneof="kind",
296
+ )
297
+ bool_value: bool = proto.Field(
298
+ proto.BOOL,
299
+ number=10,
300
+ oneof="kind",
301
+ )
302
+ float_value: float = proto.Field(
303
+ proto.DOUBLE,
304
+ number=11,
305
+ oneof="kind",
306
+ )
307
+ timestamp_value: timestamp_pb2.Timestamp = proto.Field(
308
+ proto.MESSAGE,
309
+ number=12,
310
+ oneof="kind",
311
+ message=timestamp_pb2.Timestamp,
312
+ )
313
+ date_value: date_pb2.Date = proto.Field(
314
+ proto.MESSAGE,
315
+ number=13,
316
+ oneof="kind",
317
+ message=date_pb2.Date,
318
+ )
319
+ array_value: "ArrayValue" = proto.Field(
320
+ proto.MESSAGE,
321
+ number=4,
322
+ oneof="kind",
323
+ message="ArrayValue",
324
+ )
325
+
326
+
327
+ class ArrayValue(proto.Message):
328
+ r"""``ArrayValue`` is an ordered list of ``Value``.
329
+
330
+ Attributes:
331
+ values (MutableSequence[google.cloud.bigtable_v2.types.Value]):
332
+ The ordered elements in the array.
333
+ """
334
+
335
+ values: MutableSequence["Value"] = proto.RepeatedField(
336
+ proto.MESSAGE,
337
+ number=1,
338
+ message="Value",
339
+ )
340
+
341
+
342
+ class RowRange(proto.Message):
343
+ r"""Specifies a contiguous range of rows.
344
+
345
+ This message has `oneof`_ fields (mutually exclusive fields).
346
+ For each oneof, at most one member field can be set at the same time.
347
+ Setting any member of the oneof automatically clears all other
348
+ members.
349
+
350
+ .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
351
+
352
+ Attributes:
353
+ start_key_closed (bytes):
354
+ Used when giving an inclusive lower bound for
355
+ the range.
356
+
357
+ This field is a member of `oneof`_ ``start_key``.
358
+ start_key_open (bytes):
359
+ Used when giving an exclusive lower bound for
360
+ the range.
361
+
362
+ This field is a member of `oneof`_ ``start_key``.
363
+ end_key_open (bytes):
364
+ Used when giving an exclusive upper bound for
365
+ the range.
366
+
367
+ This field is a member of `oneof`_ ``end_key``.
368
+ end_key_closed (bytes):
369
+ Used when giving an inclusive upper bound for
370
+ the range.
371
+
372
+ This field is a member of `oneof`_ ``end_key``.
373
+ """
374
+
375
+ start_key_closed: bytes = proto.Field(
376
+ proto.BYTES,
377
+ number=1,
378
+ oneof="start_key",
379
+ )
380
+ start_key_open: bytes = proto.Field(
381
+ proto.BYTES,
382
+ number=2,
383
+ oneof="start_key",
384
+ )
385
+ end_key_open: bytes = proto.Field(
386
+ proto.BYTES,
387
+ number=3,
388
+ oneof="end_key",
389
+ )
390
+ end_key_closed: bytes = proto.Field(
391
+ proto.BYTES,
392
+ number=4,
393
+ oneof="end_key",
394
+ )
395
+
396
+
397
+ class RowSet(proto.Message):
398
+ r"""Specifies a non-contiguous set of rows.
399
+
400
+ Attributes:
401
+ row_keys (MutableSequence[bytes]):
402
+ Single rows included in the set.
403
+ row_ranges (MutableSequence[google.cloud.bigtable_v2.types.RowRange]):
404
+ Contiguous row ranges included in the set.
405
+ """
406
+
407
+ row_keys: MutableSequence[bytes] = proto.RepeatedField(
408
+ proto.BYTES,
409
+ number=1,
410
+ )
411
+ row_ranges: MutableSequence["RowRange"] = proto.RepeatedField(
412
+ proto.MESSAGE,
413
+ number=2,
414
+ message="RowRange",
415
+ )
416
+
417
+
418
+ class ColumnRange(proto.Message):
419
+ r"""Specifies a contiguous range of columns within a single column
420
+ family. The range spans from <column_family>:<start_qualifier> to
421
+ <column_family>:<end_qualifier>, where both bounds can be either
422
+ inclusive or exclusive.
423
+
424
+ This message has `oneof`_ fields (mutually exclusive fields).
425
+ For each oneof, at most one member field can be set at the same time.
426
+ Setting any member of the oneof automatically clears all other
427
+ members.
428
+
429
+ .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
430
+
431
+ Attributes:
432
+ family_name (str):
433
+ The name of the column family within which
434
+ this range falls.
435
+ start_qualifier_closed (bytes):
436
+ Used when giving an inclusive lower bound for
437
+ the range.
438
+
439
+ This field is a member of `oneof`_ ``start_qualifier``.
440
+ start_qualifier_open (bytes):
441
+ Used when giving an exclusive lower bound for
442
+ the range.
443
+
444
+ This field is a member of `oneof`_ ``start_qualifier``.
445
+ end_qualifier_closed (bytes):
446
+ Used when giving an inclusive upper bound for
447
+ the range.
448
+
449
+ This field is a member of `oneof`_ ``end_qualifier``.
450
+ end_qualifier_open (bytes):
451
+ Used when giving an exclusive upper bound for
452
+ the range.
453
+
454
+ This field is a member of `oneof`_ ``end_qualifier``.
455
+ """
456
+
457
+ family_name: str = proto.Field(
458
+ proto.STRING,
459
+ number=1,
460
+ )
461
+ start_qualifier_closed: bytes = proto.Field(
462
+ proto.BYTES,
463
+ number=2,
464
+ oneof="start_qualifier",
465
+ )
466
+ start_qualifier_open: bytes = proto.Field(
467
+ proto.BYTES,
468
+ number=3,
469
+ oneof="start_qualifier",
470
+ )
471
+ end_qualifier_closed: bytes = proto.Field(
472
+ proto.BYTES,
473
+ number=4,
474
+ oneof="end_qualifier",
475
+ )
476
+ end_qualifier_open: bytes = proto.Field(
477
+ proto.BYTES,
478
+ number=5,
479
+ oneof="end_qualifier",
480
+ )
481
+
482
+
483
+ class TimestampRange(proto.Message):
484
+ r"""Specified a contiguous range of microsecond timestamps.
485
+
486
+ Attributes:
487
+ start_timestamp_micros (int):
488
+ Inclusive lower bound. If left empty,
489
+ interpreted as 0.
490
+ end_timestamp_micros (int):
491
+ Exclusive upper bound. If left empty,
492
+ interpreted as infinity.
493
+ """
494
+
495
+ start_timestamp_micros: int = proto.Field(
496
+ proto.INT64,
497
+ number=1,
498
+ )
499
+ end_timestamp_micros: int = proto.Field(
500
+ proto.INT64,
501
+ number=2,
502
+ )
503
+
504
+
505
+ class ValueRange(proto.Message):
506
+ r"""Specifies a contiguous range of raw byte values.
507
+
508
+ This message has `oneof`_ fields (mutually exclusive fields).
509
+ For each oneof, at most one member field can be set at the same time.
510
+ Setting any member of the oneof automatically clears all other
511
+ members.
512
+
513
+ .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
514
+
515
+ Attributes:
516
+ start_value_closed (bytes):
517
+ Used when giving an inclusive lower bound for
518
+ the range.
519
+
520
+ This field is a member of `oneof`_ ``start_value``.
521
+ start_value_open (bytes):
522
+ Used when giving an exclusive lower bound for
523
+ the range.
524
+
525
+ This field is a member of `oneof`_ ``start_value``.
526
+ end_value_closed (bytes):
527
+ Used when giving an inclusive upper bound for
528
+ the range.
529
+
530
+ This field is a member of `oneof`_ ``end_value``.
531
+ end_value_open (bytes):
532
+ Used when giving an exclusive upper bound for
533
+ the range.
534
+
535
+ This field is a member of `oneof`_ ``end_value``.
536
+ """
537
+
538
+ start_value_closed: bytes = proto.Field(
539
+ proto.BYTES,
540
+ number=1,
541
+ oneof="start_value",
542
+ )
543
+ start_value_open: bytes = proto.Field(
544
+ proto.BYTES,
545
+ number=2,
546
+ oneof="start_value",
547
+ )
548
+ end_value_closed: bytes = proto.Field(
549
+ proto.BYTES,
550
+ number=3,
551
+ oneof="end_value",
552
+ )
553
+ end_value_open: bytes = proto.Field(
554
+ proto.BYTES,
555
+ number=4,
556
+ oneof="end_value",
557
+ )
558
+
559
+
560
+ class RowFilter(proto.Message):
561
+ r"""Takes a row as input and produces an alternate view of the row based
562
+ on specified rules. For example, a RowFilter might trim down a row
563
+ to include just the cells from columns matching a given regular
564
+ expression, or might return all the cells of a row but not their
565
+ values. More complicated filters can be composed out of these
566
+ components to express requests such as, "within every column of a
567
+ particular family, give just the two most recent cells which are
568
+ older than timestamp X."
569
+
570
+ There are two broad categories of RowFilters (true filters and
571
+ transformers), as well as two ways to compose simple filters into
572
+ more complex ones (chains and interleaves). They work as follows:
573
+
574
+ - True filters alter the input row by excluding some of its cells
575
+ wholesale from the output row. An example of a true filter is the
576
+ ``value_regex_filter``, which excludes cells whose values don't
577
+ match the specified pattern. All regex true filters use RE2
578
+ syntax (https://github.com/google/re2/wiki/Syntax) in raw byte
579
+ mode (RE2::Latin1), and are evaluated as full matches. An
580
+ important point to keep in mind is that ``RE2(.)`` is equivalent
581
+ by default to ``RE2([^\n])``, meaning that it does not match
582
+ newlines. When attempting to match an arbitrary byte, you should
583
+ therefore use the escape sequence ``\C``, which may need to be
584
+ further escaped as ``\\C`` in your client language.
585
+
586
+ - Transformers alter the input row by changing the values of some
587
+ of its cells in the output, without excluding them completely.
588
+ Currently, the only supported transformer is the
589
+ ``strip_value_transformer``, which replaces every cell's value
590
+ with the empty string.
591
+
592
+ - Chains and interleaves are described in more detail in the
593
+ RowFilter.Chain and RowFilter.Interleave documentation.
594
+
595
+ The total serialized size of a RowFilter message must not exceed
596
+ 20480 bytes, and RowFilters may not be nested within each other (in
597
+ Chains or Interleaves) to a depth of more than 20.
598
+
599
+ This message has `oneof`_ fields (mutually exclusive fields).
600
+ For each oneof, at most one member field can be set at the same time.
601
+ Setting any member of the oneof automatically clears all other
602
+ members.
603
+
604
+ .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
605
+
606
+ Attributes:
607
+ chain (google.cloud.bigtable_v2.types.RowFilter.Chain):
608
+ Applies several RowFilters to the data in
609
+ sequence, progressively narrowing the results.
610
+
611
+ This field is a member of `oneof`_ ``filter``.
612
+ interleave (google.cloud.bigtable_v2.types.RowFilter.Interleave):
613
+ Applies several RowFilters to the data in
614
+ parallel and combines the results.
615
+
616
+ This field is a member of `oneof`_ ``filter``.
617
+ condition (google.cloud.bigtable_v2.types.RowFilter.Condition):
618
+ Applies one of two possible RowFilters to the
619
+ data based on the output of a predicate
620
+ RowFilter.
621
+
622
+ This field is a member of `oneof`_ ``filter``.
623
+ sink (bool):
624
+ ADVANCED USE ONLY. Hook for introspection into the
625
+ RowFilter. Outputs all cells directly to the output of the
626
+ read rather than to any parent filter. Consider the
627
+ following example:
628
+
629
+ ::
630
+
631
+ Chain(
632
+ FamilyRegex("A"),
633
+ Interleave(
634
+ All(),
635
+ Chain(Label("foo"), Sink())
636
+ ),
637
+ QualifierRegex("B")
638
+ )
639
+
640
+ A,A,1,w
641
+ A,B,2,x
642
+ B,B,4,z
643
+ |
644
+ FamilyRegex("A")
645
+ |
646
+ A,A,1,w
647
+ A,B,2,x
648
+ |
649
+ +------------+-------------+
650
+ | |
651
+ All() Label(foo)
652
+ | |
653
+ A,A,1,w A,A,1,w,labels:[foo]
654
+ A,B,2,x A,B,2,x,labels:[foo]
655
+ | |
656
+ | Sink() --------------+
657
+ | | |
658
+ +------------+ x------+ A,A,1,w,labels:[foo]
659
+ | A,B,2,x,labels:[foo]
660
+ A,A,1,w |
661
+ A,B,2,x |
662
+ | |
663
+ QualifierRegex("B") |
664
+ | |
665
+ A,B,2,x |
666
+ | |
667
+ +--------------------------------+
668
+ |
669
+ A,A,1,w,labels:[foo]
670
+ A,B,2,x,labels:[foo] // could be switched
671
+ A,B,2,x // could be switched
672
+
673
+ Despite being excluded by the qualifier filter, a copy of
674
+ every cell that reaches the sink is present in the final
675
+ result.
676
+
677
+ As with an
678
+ [Interleave][google.bigtable.v2.RowFilter.Interleave],
679
+ duplicate cells are possible, and appear in an unspecified
680
+ mutual order. In this case we have a duplicate with column
681
+ "A:B" and timestamp 2, because one copy passed through the
682
+ all filter while the other was passed through the label and
683
+ sink. Note that one copy has label "foo", while the other
684
+ does not.
685
+
686
+ Cannot be used within the ``predicate_filter``,
687
+ ``true_filter``, or ``false_filter`` of a
688
+ [Condition][google.bigtable.v2.RowFilter.Condition].
689
+
690
+ This field is a member of `oneof`_ ``filter``.
691
+ pass_all_filter (bool):
692
+ Matches all cells, regardless of input. Functionally
693
+ equivalent to leaving ``filter`` unset, but included for
694
+ completeness.
695
+
696
+ This field is a member of `oneof`_ ``filter``.
697
+ block_all_filter (bool):
698
+ Does not match any cells, regardless of
699
+ input. Useful for temporarily disabling just
700
+ part of a filter.
701
+
702
+ This field is a member of `oneof`_ ``filter``.
703
+ row_key_regex_filter (bytes):
704
+ Matches only cells from rows whose keys satisfy the given
705
+ RE2 regex. In other words, passes through the entire row
706
+ when the key matches, and otherwise produces an empty row.
707
+ Note that, since row keys can contain arbitrary bytes, the
708
+ ``\C`` escape sequence must be used if a true wildcard is
709
+ desired. The ``.`` character will not match the new line
710
+ character ``\n``, which may be present in a binary key.
711
+
712
+ This field is a member of `oneof`_ ``filter``.
713
+ row_sample_filter (float):
714
+ Matches all cells from a row with probability
715
+ p, and matches no cells from the row with
716
+ probability 1-p.
717
+
718
+ This field is a member of `oneof`_ ``filter``.
719
+ family_name_regex_filter (str):
720
+ Matches only cells from columns whose families satisfy the
721
+ given RE2 regex. For technical reasons, the regex must not
722
+ contain the ``:`` character, even if it is not being used as
723
+ a literal. Note that, since column families cannot contain
724
+ the new line character ``\n``, it is sufficient to use ``.``
725
+ as a full wildcard when matching column family names.
726
+
727
+ This field is a member of `oneof`_ ``filter``.
728
+ column_qualifier_regex_filter (bytes):
729
+ Matches only cells from columns whose qualifiers satisfy the
730
+ given RE2 regex. Note that, since column qualifiers can
731
+ contain arbitrary bytes, the ``\C`` escape sequence must be
732
+ used if a true wildcard is desired. The ``.`` character will
733
+ not match the new line character ``\n``, which may be
734
+ present in a binary qualifier.
735
+
736
+ This field is a member of `oneof`_ ``filter``.
737
+ column_range_filter (google.cloud.bigtable_v2.types.ColumnRange):
738
+ Matches only cells from columns within the
739
+ given range.
740
+
741
+ This field is a member of `oneof`_ ``filter``.
742
+ timestamp_range_filter (google.cloud.bigtable_v2.types.TimestampRange):
743
+ Matches only cells with timestamps within the
744
+ given range.
745
+
746
+ This field is a member of `oneof`_ ``filter``.
747
+ value_regex_filter (bytes):
748
+ Matches only cells with values that satisfy the given
749
+ regular expression. Note that, since cell values can contain
750
+ arbitrary bytes, the ``\C`` escape sequence must be used if
751
+ a true wildcard is desired. The ``.`` character will not
752
+ match the new line character ``\n``, which may be present in
753
+ a binary value.
754
+
755
+ This field is a member of `oneof`_ ``filter``.
756
+ value_range_filter (google.cloud.bigtable_v2.types.ValueRange):
757
+ Matches only cells with values that fall
758
+ within the given range.
759
+
760
+ This field is a member of `oneof`_ ``filter``.
761
+ cells_per_row_offset_filter (int):
762
+ Skips the first N cells of each row, matching
763
+ all subsequent cells. If duplicate cells are
764
+ present, as is possible when using an
765
+ Interleave, each copy of the cell is counted
766
+ separately.
767
+
768
+ This field is a member of `oneof`_ ``filter``.
769
+ cells_per_row_limit_filter (int):
770
+ Matches only the first N cells of each row.
771
+ If duplicate cells are present, as is possible
772
+ when using an Interleave, each copy of the cell
773
+ is counted separately.
774
+
775
+ This field is a member of `oneof`_ ``filter``.
776
+ cells_per_column_limit_filter (int):
777
+ Matches only the most recent N cells within each column. For
778
+ example, if N=2, this filter would match column ``foo:bar``
779
+ at timestamps 10 and 9, skip all earlier cells in
780
+ ``foo:bar``, and then begin matching again in column
781
+ ``foo:bar2``. If duplicate cells are present, as is possible
782
+ when using an Interleave, each copy of the cell is counted
783
+ separately.
784
+
785
+ This field is a member of `oneof`_ ``filter``.
786
+ strip_value_transformer (bool):
787
+ Replaces each cell's value with the empty
788
+ string.
789
+
790
+ This field is a member of `oneof`_ ``filter``.
791
+ apply_label_transformer (str):
792
+ Applies the given label to all cells in the output row. This
793
+ allows the client to determine which results were produced
794
+ from which part of the filter.
795
+
796
+ Values must be at most 15 characters in length, and match
797
+ the RE2 pattern ``[a-z0-9\\-]+``
798
+
799
+ Due to a technical limitation, it is not currently possible
800
+ to apply multiple labels to a cell. As a result, a Chain may
801
+ have no more than one sub-filter which contains a
802
+ ``apply_label_transformer``. It is okay for an Interleave to
803
+ contain multiple ``apply_label_transformers``, as they will
804
+ be applied to separate copies of the input. This may be
805
+ relaxed in the future.
806
+
807
+ This field is a member of `oneof`_ ``filter``.
808
+ """
809
+
810
+ class Chain(proto.Message):
811
+ r"""A RowFilter which sends rows through several RowFilters in
812
+ sequence.
813
+
814
+ Attributes:
815
+ filters (MutableSequence[google.cloud.bigtable_v2.types.RowFilter]):
816
+ The elements of "filters" are chained
817
+ together to process the input row: in row ->
818
+ f(0) -> intermediate row -> f(1) -> ... -> f(N)
819
+ -> out row The full chain is executed
820
+ atomically.
821
+ """
822
+
823
+ filters: MutableSequence["RowFilter"] = proto.RepeatedField(
824
+ proto.MESSAGE,
825
+ number=1,
826
+ message="RowFilter",
827
+ )
828
+
829
+ class Interleave(proto.Message):
830
+ r"""A RowFilter which sends each row to each of several component
831
+ RowFilters and interleaves the results.
832
+
833
+ Attributes:
834
+ filters (MutableSequence[google.cloud.bigtable_v2.types.RowFilter]):
835
+ The elements of "filters" all process a copy of the input
836
+ row, and the results are pooled, sorted, and combined into a
837
+ single output row. If multiple cells are produced with the
838
+ same column and timestamp, they will all appear in the
839
+ output row in an unspecified mutual order. Consider the
840
+ following example, with three filters:
841
+
842
+ ::
843
+
844
+ input row
845
+ |
846
+ -----------------------------------------------------
847
+ | | |
848
+ f(0) f(1) f(2)
849
+ | | |
850
+ 1: foo,bar,10,x foo,bar,10,z far,bar,7,a
851
+ 2: foo,blah,11,z far,blah,5,x far,blah,5,x
852
+ | | |
853
+ -----------------------------------------------------
854
+ |
855
+ 1: foo,bar,10,z // could have switched with #2
856
+ 2: foo,bar,10,x // could have switched with #1
857
+ 3: foo,blah,11,z
858
+ 4: far,bar,7,a
859
+ 5: far,blah,5,x // identical to #6
860
+ 6: far,blah,5,x // identical to #5
861
+
862
+ All interleaved filters are executed atomically.
863
+ """
864
+
865
+ filters: MutableSequence["RowFilter"] = proto.RepeatedField(
866
+ proto.MESSAGE,
867
+ number=1,
868
+ message="RowFilter",
869
+ )
870
+
871
+ class Condition(proto.Message):
872
+ r"""A RowFilter which evaluates one of two possible RowFilters,
873
+ depending on whether or not a predicate RowFilter outputs any
874
+ cells from the input row.
875
+
876
+ IMPORTANT NOTE: The predicate filter does not execute atomically
877
+ with the true and false filters, which may lead to inconsistent
878
+ or unexpected results. Additionally, Condition filters have poor
879
+ performance, especially when filters are set for the false
880
+ condition.
881
+
882
+ Attributes:
883
+ predicate_filter (google.cloud.bigtable_v2.types.RowFilter):
884
+ If ``predicate_filter`` outputs any cells, then
885
+ ``true_filter`` will be evaluated on the input row.
886
+ Otherwise, ``false_filter`` will be evaluated.
887
+ true_filter (google.cloud.bigtable_v2.types.RowFilter):
888
+ The filter to apply to the input row if ``predicate_filter``
889
+ returns any results. If not provided, no results will be
890
+ returned in the true case.
891
+ false_filter (google.cloud.bigtable_v2.types.RowFilter):
892
+ The filter to apply to the input row if ``predicate_filter``
893
+ does not return any results. If not provided, no results
894
+ will be returned in the false case.
895
+ """
896
+
897
+ predicate_filter: "RowFilter" = proto.Field(
898
+ proto.MESSAGE,
899
+ number=1,
900
+ message="RowFilter",
901
+ )
902
+ true_filter: "RowFilter" = proto.Field(
903
+ proto.MESSAGE,
904
+ number=2,
905
+ message="RowFilter",
906
+ )
907
+ false_filter: "RowFilter" = proto.Field(
908
+ proto.MESSAGE,
909
+ number=3,
910
+ message="RowFilter",
911
+ )
912
+
913
+ chain: Chain = proto.Field(
914
+ proto.MESSAGE,
915
+ number=1,
916
+ oneof="filter",
917
+ message=Chain,
918
+ )
919
+ interleave: Interleave = proto.Field(
920
+ proto.MESSAGE,
921
+ number=2,
922
+ oneof="filter",
923
+ message=Interleave,
924
+ )
925
+ condition: Condition = proto.Field(
926
+ proto.MESSAGE,
927
+ number=3,
928
+ oneof="filter",
929
+ message=Condition,
930
+ )
931
+ sink: bool = proto.Field(
932
+ proto.BOOL,
933
+ number=16,
934
+ oneof="filter",
935
+ )
936
+ pass_all_filter: bool = proto.Field(
937
+ proto.BOOL,
938
+ number=17,
939
+ oneof="filter",
940
+ )
941
+ block_all_filter: bool = proto.Field(
942
+ proto.BOOL,
943
+ number=18,
944
+ oneof="filter",
945
+ )
946
+ row_key_regex_filter: bytes = proto.Field(
947
+ proto.BYTES,
948
+ number=4,
949
+ oneof="filter",
950
+ )
951
+ row_sample_filter: float = proto.Field(
952
+ proto.DOUBLE,
953
+ number=14,
954
+ oneof="filter",
955
+ )
956
+ family_name_regex_filter: str = proto.Field(
957
+ proto.STRING,
958
+ number=5,
959
+ oneof="filter",
960
+ )
961
+ column_qualifier_regex_filter: bytes = proto.Field(
962
+ proto.BYTES,
963
+ number=6,
964
+ oneof="filter",
965
+ )
966
+ column_range_filter: "ColumnRange" = proto.Field(
967
+ proto.MESSAGE,
968
+ number=7,
969
+ oneof="filter",
970
+ message="ColumnRange",
971
+ )
972
+ timestamp_range_filter: "TimestampRange" = proto.Field(
973
+ proto.MESSAGE,
974
+ number=8,
975
+ oneof="filter",
976
+ message="TimestampRange",
977
+ )
978
+ value_regex_filter: bytes = proto.Field(
979
+ proto.BYTES,
980
+ number=9,
981
+ oneof="filter",
982
+ )
983
+ value_range_filter: "ValueRange" = proto.Field(
984
+ proto.MESSAGE,
985
+ number=15,
986
+ oneof="filter",
987
+ message="ValueRange",
988
+ )
989
+ cells_per_row_offset_filter: int = proto.Field(
990
+ proto.INT32,
991
+ number=10,
992
+ oneof="filter",
993
+ )
994
+ cells_per_row_limit_filter: int = proto.Field(
995
+ proto.INT32,
996
+ number=11,
997
+ oneof="filter",
998
+ )
999
+ cells_per_column_limit_filter: int = proto.Field(
1000
+ proto.INT32,
1001
+ number=12,
1002
+ oneof="filter",
1003
+ )
1004
+ strip_value_transformer: bool = proto.Field(
1005
+ proto.BOOL,
1006
+ number=13,
1007
+ oneof="filter",
1008
+ )
1009
+ apply_label_transformer: str = proto.Field(
1010
+ proto.STRING,
1011
+ number=19,
1012
+ oneof="filter",
1013
+ )
1014
+
1015
+
1016
+ class Mutation(proto.Message):
1017
+ r"""Specifies a particular change to be made to the contents of a
1018
+ row.
1019
+
1020
+ This message has `oneof`_ fields (mutually exclusive fields).
1021
+ For each oneof, at most one member field can be set at the same time.
1022
+ Setting any member of the oneof automatically clears all other
1023
+ members.
1024
+
1025
+ .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
1026
+
1027
+ Attributes:
1028
+ set_cell (google.cloud.bigtable_v2.types.Mutation.SetCell):
1029
+ Set a cell's value.
1030
+
1031
+ This field is a member of `oneof`_ ``mutation``.
1032
+ add_to_cell (google.cloud.bigtable_v2.types.Mutation.AddToCell):
1033
+ Incrementally updates an ``Aggregate`` cell.
1034
+
1035
+ This field is a member of `oneof`_ ``mutation``.
1036
+ merge_to_cell (google.cloud.bigtable_v2.types.Mutation.MergeToCell):
1037
+ Merges accumulated state to an ``Aggregate`` cell.
1038
+
1039
+ This field is a member of `oneof`_ ``mutation``.
1040
+ delete_from_column (google.cloud.bigtable_v2.types.Mutation.DeleteFromColumn):
1041
+ Deletes cells from a column.
1042
+
1043
+ This field is a member of `oneof`_ ``mutation``.
1044
+ delete_from_family (google.cloud.bigtable_v2.types.Mutation.DeleteFromFamily):
1045
+ Deletes cells from a column family.
1046
+
1047
+ This field is a member of `oneof`_ ``mutation``.
1048
+ delete_from_row (google.cloud.bigtable_v2.types.Mutation.DeleteFromRow):
1049
+ Deletes cells from the entire row.
1050
+
1051
+ This field is a member of `oneof`_ ``mutation``.
1052
+ """
1053
+
1054
+ class SetCell(proto.Message):
1055
+ r"""A Mutation which sets the value of the specified cell.
1056
+
1057
+ Attributes:
1058
+ family_name (str):
1059
+ The name of the family into which new data should be
1060
+ written. Must match ``[-_.a-zA-Z0-9]+``
1061
+ column_qualifier (bytes):
1062
+ The qualifier of the column into which new
1063
+ data should be written. Can be any byte string,
1064
+ including the empty string.
1065
+ timestamp_micros (int):
1066
+ The timestamp of the cell into which new data
1067
+ should be written. Use -1 for current Bigtable
1068
+ server time. Otherwise, the client should set
1069
+ this value itself, noting that the default value
1070
+ is a timestamp of zero if the field is left
1071
+ unspecified. Values must match the granularity
1072
+ of the table (e.g. micros, millis).
1073
+ value (bytes):
1074
+ The value to be written into the specified
1075
+ cell.
1076
+ """
1077
+
1078
+ family_name: str = proto.Field(
1079
+ proto.STRING,
1080
+ number=1,
1081
+ )
1082
+ column_qualifier: bytes = proto.Field(
1083
+ proto.BYTES,
1084
+ number=2,
1085
+ )
1086
+ timestamp_micros: int = proto.Field(
1087
+ proto.INT64,
1088
+ number=3,
1089
+ )
1090
+ value: bytes = proto.Field(
1091
+ proto.BYTES,
1092
+ number=4,
1093
+ )
1094
+
1095
+ class AddToCell(proto.Message):
1096
+ r"""A Mutation which incrementally updates a cell in an ``Aggregate``
1097
+ family.
1098
+
1099
+ Attributes:
1100
+ family_name (str):
1101
+ The name of the ``Aggregate`` family into which new data
1102
+ should be added. This must be a family with a ``value_type``
1103
+ of ``Aggregate``. Format: ``[-_.a-zA-Z0-9]+``
1104
+ column_qualifier (google.cloud.bigtable_v2.types.Value):
1105
+ The qualifier of the column into which new data should be
1106
+ added. This must be a ``raw_value``.
1107
+ timestamp (google.cloud.bigtable_v2.types.Value):
1108
+ The timestamp of the cell to which new data should be added.
1109
+ This must be a ``raw_timestamp_micros`` that matches the
1110
+ table's ``granularity``.
1111
+ input (google.cloud.bigtable_v2.types.Value):
1112
+ The input value to be accumulated into the specified cell.
1113
+ This must be compatible with the family's
1114
+ ``value_type.input_type``.
1115
+ """
1116
+
1117
+ family_name: str = proto.Field(
1118
+ proto.STRING,
1119
+ number=1,
1120
+ )
1121
+ column_qualifier: "Value" = proto.Field(
1122
+ proto.MESSAGE,
1123
+ number=2,
1124
+ message="Value",
1125
+ )
1126
+ timestamp: "Value" = proto.Field(
1127
+ proto.MESSAGE,
1128
+ number=3,
1129
+ message="Value",
1130
+ )
1131
+ input: "Value" = proto.Field(
1132
+ proto.MESSAGE,
1133
+ number=4,
1134
+ message="Value",
1135
+ )
1136
+
1137
+ class MergeToCell(proto.Message):
1138
+ r"""A Mutation which merges accumulated state into a cell in an
1139
+ ``Aggregate`` family.
1140
+
1141
+ Attributes:
1142
+ family_name (str):
1143
+ The name of the ``Aggregate`` family into which new data
1144
+ should be added. This must be a family with a ``value_type``
1145
+ of ``Aggregate``. Format: ``[-_.a-zA-Z0-9]+``
1146
+ column_qualifier (google.cloud.bigtable_v2.types.Value):
1147
+ The qualifier of the column into which new data should be
1148
+ added. This must be a ``raw_value``.
1149
+ timestamp (google.cloud.bigtable_v2.types.Value):
1150
+ The timestamp of the cell to which new data should be added.
1151
+ This must be a ``raw_timestamp_micros`` that matches the
1152
+ table's ``granularity``.
1153
+ input (google.cloud.bigtable_v2.types.Value):
1154
+ The input value to be merged into the specified cell. This
1155
+ must be compatible with the family's
1156
+ ``value_type.state_type``. Merging ``NULL`` is allowed, but
1157
+ has no effect.
1158
+ """
1159
+
1160
+ family_name: str = proto.Field(
1161
+ proto.STRING,
1162
+ number=1,
1163
+ )
1164
+ column_qualifier: "Value" = proto.Field(
1165
+ proto.MESSAGE,
1166
+ number=2,
1167
+ message="Value",
1168
+ )
1169
+ timestamp: "Value" = proto.Field(
1170
+ proto.MESSAGE,
1171
+ number=3,
1172
+ message="Value",
1173
+ )
1174
+ input: "Value" = proto.Field(
1175
+ proto.MESSAGE,
1176
+ number=4,
1177
+ message="Value",
1178
+ )
1179
+
1180
+ class DeleteFromColumn(proto.Message):
1181
+ r"""A Mutation which deletes cells from the specified column,
1182
+ optionally restricting the deletions to a given timestamp range.
1183
+
1184
+ Attributes:
1185
+ family_name (str):
1186
+ The name of the family from which cells should be deleted.
1187
+ Must match ``[-_.a-zA-Z0-9]+``
1188
+ column_qualifier (bytes):
1189
+ The qualifier of the column from which cells
1190
+ should be deleted. Can be any byte string,
1191
+ including the empty string.
1192
+ time_range (google.cloud.bigtable_v2.types.TimestampRange):
1193
+ The range of timestamps within which cells
1194
+ should be deleted.
1195
+ """
1196
+
1197
+ family_name: str = proto.Field(
1198
+ proto.STRING,
1199
+ number=1,
1200
+ )
1201
+ column_qualifier: bytes = proto.Field(
1202
+ proto.BYTES,
1203
+ number=2,
1204
+ )
1205
+ time_range: "TimestampRange" = proto.Field(
1206
+ proto.MESSAGE,
1207
+ number=3,
1208
+ message="TimestampRange",
1209
+ )
1210
+
1211
+ class DeleteFromFamily(proto.Message):
1212
+ r"""A Mutation which deletes all cells from the specified column
1213
+ family.
1214
+
1215
+ Attributes:
1216
+ family_name (str):
1217
+ The name of the family from which cells should be deleted.
1218
+ Must match ``[-_.a-zA-Z0-9]+``
1219
+ """
1220
+
1221
+ family_name: str = proto.Field(
1222
+ proto.STRING,
1223
+ number=1,
1224
+ )
1225
+
1226
+ class DeleteFromRow(proto.Message):
1227
+ r"""A Mutation which deletes all cells from the containing row."""
1228
+
1229
+ set_cell: SetCell = proto.Field(
1230
+ proto.MESSAGE,
1231
+ number=1,
1232
+ oneof="mutation",
1233
+ message=SetCell,
1234
+ )
1235
+ add_to_cell: AddToCell = proto.Field(
1236
+ proto.MESSAGE,
1237
+ number=5,
1238
+ oneof="mutation",
1239
+ message=AddToCell,
1240
+ )
1241
+ merge_to_cell: MergeToCell = proto.Field(
1242
+ proto.MESSAGE,
1243
+ number=6,
1244
+ oneof="mutation",
1245
+ message=MergeToCell,
1246
+ )
1247
+ delete_from_column: DeleteFromColumn = proto.Field(
1248
+ proto.MESSAGE,
1249
+ number=2,
1250
+ oneof="mutation",
1251
+ message=DeleteFromColumn,
1252
+ )
1253
+ delete_from_family: DeleteFromFamily = proto.Field(
1254
+ proto.MESSAGE,
1255
+ number=3,
1256
+ oneof="mutation",
1257
+ message=DeleteFromFamily,
1258
+ )
1259
+ delete_from_row: DeleteFromRow = proto.Field(
1260
+ proto.MESSAGE,
1261
+ number=4,
1262
+ oneof="mutation",
1263
+ message=DeleteFromRow,
1264
+ )
1265
+
1266
+
1267
+ class ReadModifyWriteRule(proto.Message):
1268
+ r"""Specifies an atomic read/modify/write operation on the latest
1269
+ value of the specified column.
1270
+
1271
+ This message has `oneof`_ fields (mutually exclusive fields).
1272
+ For each oneof, at most one member field can be set at the same time.
1273
+ Setting any member of the oneof automatically clears all other
1274
+ members.
1275
+
1276
+ .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
1277
+
1278
+ Attributes:
1279
+ family_name (str):
1280
+ The name of the family to which the read/modify/write should
1281
+ be applied. Must match ``[-_.a-zA-Z0-9]+``
1282
+ column_qualifier (bytes):
1283
+ The qualifier of the column to which the
1284
+ read/modify/write should be applied.
1285
+ Can be any byte string, including the empty
1286
+ string.
1287
+ append_value (bytes):
1288
+ Rule specifying that ``append_value`` be appended to the
1289
+ existing value. If the targeted cell is unset, it will be
1290
+ treated as containing the empty string.
1291
+
1292
+ This field is a member of `oneof`_ ``rule``.
1293
+ increment_amount (int):
1294
+ Rule specifying that ``increment_amount`` be added to the
1295
+ existing value. If the targeted cell is unset, it will be
1296
+ treated as containing a zero. Otherwise, the targeted cell
1297
+ must contain an 8-byte value (interpreted as a 64-bit
1298
+ big-endian signed integer), or the entire request will fail.
1299
+
1300
+ This field is a member of `oneof`_ ``rule``.
1301
+ """
1302
+
1303
+ family_name: str = proto.Field(
1304
+ proto.STRING,
1305
+ number=1,
1306
+ )
1307
+ column_qualifier: bytes = proto.Field(
1308
+ proto.BYTES,
1309
+ number=2,
1310
+ )
1311
+ append_value: bytes = proto.Field(
1312
+ proto.BYTES,
1313
+ number=3,
1314
+ oneof="rule",
1315
+ )
1316
+ increment_amount: int = proto.Field(
1317
+ proto.INT64,
1318
+ number=4,
1319
+ oneof="rule",
1320
+ )
1321
+
1322
+
1323
+ class StreamPartition(proto.Message):
1324
+ r"""NOTE: This API is intended to be used by Apache Beam
1325
+ BigtableIO. A partition of a change stream.
1326
+
1327
+ Attributes:
1328
+ row_range (google.cloud.bigtable_v2.types.RowRange):
1329
+ The row range covered by this partition and is specified by
1330
+ [``start_key_closed``, ``end_key_open``).
1331
+ """
1332
+
1333
+ row_range: "RowRange" = proto.Field(
1334
+ proto.MESSAGE,
1335
+ number=1,
1336
+ message="RowRange",
1337
+ )
1338
+
1339
+
1340
+ class StreamContinuationTokens(proto.Message):
1341
+ r"""NOTE: This API is intended to be used by Apache Beam BigtableIO. The
1342
+ information required to continue reading the data from multiple
1343
+ ``StreamPartitions`` from where a previous read left off.
1344
+
1345
+ Attributes:
1346
+ tokens (MutableSequence[google.cloud.bigtable_v2.types.StreamContinuationToken]):
1347
+ List of continuation tokens.
1348
+ """
1349
+
1350
+ tokens: MutableSequence["StreamContinuationToken"] = proto.RepeatedField(
1351
+ proto.MESSAGE,
1352
+ number=1,
1353
+ message="StreamContinuationToken",
1354
+ )
1355
+
1356
+
1357
+ class StreamContinuationToken(proto.Message):
1358
+ r"""NOTE: This API is intended to be used by Apache Beam BigtableIO. The
1359
+ information required to continue reading the data from a
1360
+ ``StreamPartition`` from where a previous read left off.
1361
+
1362
+ Attributes:
1363
+ partition (google.cloud.bigtable_v2.types.StreamPartition):
1364
+ The partition that this token applies to.
1365
+ token (str):
1366
+ An encoded position in the stream to restart
1367
+ reading from.
1368
+ """
1369
+
1370
+ partition: "StreamPartition" = proto.Field(
1371
+ proto.MESSAGE,
1372
+ number=1,
1373
+ message="StreamPartition",
1374
+ )
1375
+ token: str = proto.Field(
1376
+ proto.STRING,
1377
+ number=2,
1378
+ )
1379
+
1380
+
1381
+ class ProtoFormat(proto.Message):
1382
+ r"""Protocol buffers format descriptor, as described by Messages
1383
+ ProtoSchema and ProtoRows
1384
+
1385
+ """
1386
+
1387
+
1388
+ class ColumnMetadata(proto.Message):
1389
+ r"""Describes a column in a Bigtable Query Language result set.
1390
+
1391
+ Attributes:
1392
+ name (str):
1393
+ The name of the column.
1394
+ type_ (google.cloud.bigtable_v2.types.Type):
1395
+ The type of the column.
1396
+ """
1397
+
1398
+ name: str = proto.Field(
1399
+ proto.STRING,
1400
+ number=1,
1401
+ )
1402
+ type_: types.Type = proto.Field(
1403
+ proto.MESSAGE,
1404
+ number=2,
1405
+ message=types.Type,
1406
+ )
1407
+
1408
+
1409
+ class ProtoSchema(proto.Message):
1410
+ r"""ResultSet schema in proto format
1411
+
1412
+ Attributes:
1413
+ columns (MutableSequence[google.cloud.bigtable_v2.types.ColumnMetadata]):
1414
+ The columns in the result set.
1415
+ """
1416
+
1417
+ columns: MutableSequence["ColumnMetadata"] = proto.RepeatedField(
1418
+ proto.MESSAGE,
1419
+ number=1,
1420
+ message="ColumnMetadata",
1421
+ )
1422
+
1423
+
1424
+ class ResultSetMetadata(proto.Message):
1425
+ r"""Describes the structure of a Bigtable result set.
1426
+
1427
+ .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
1428
+
1429
+ Attributes:
1430
+ proto_schema (google.cloud.bigtable_v2.types.ProtoSchema):
1431
+ Schema in proto format
1432
+
1433
+ This field is a member of `oneof`_ ``schema``.
1434
+ """
1435
+
1436
+ proto_schema: "ProtoSchema" = proto.Field(
1437
+ proto.MESSAGE,
1438
+ number=1,
1439
+ oneof="schema",
1440
+ message="ProtoSchema",
1441
+ )
1442
+
1443
+
1444
+ class ProtoRows(proto.Message):
1445
+ r"""Rows represented in proto format.
1446
+
1447
+ This should be constructed by concatenating the ``batch_data`` from
1448
+ each of the relevant ``ProtoRowsBatch`` messages and parsing the
1449
+ result as a ``ProtoRows`` message.
1450
+
1451
+ Attributes:
1452
+ values (MutableSequence[google.cloud.bigtable_v2.types.Value]):
1453
+ A proto rows message consists of a list of values. Every N
1454
+ complete values defines a row, where N is equal to the
1455
+ number of entries in the ``metadata.proto_schema.columns``
1456
+ value received in the first response.
1457
+ """
1458
+
1459
+ values: MutableSequence["Value"] = proto.RepeatedField(
1460
+ proto.MESSAGE,
1461
+ number=2,
1462
+ message="Value",
1463
+ )
1464
+
1465
+
1466
+ class ProtoRowsBatch(proto.Message):
1467
+ r"""A part of a serialized ``ProtoRows`` message.
1468
+
1469
+ Attributes:
1470
+ batch_data (bytes):
1471
+ Part of a serialized ``ProtoRows`` message. A complete,
1472
+ parseable ProtoRows message is constructed by concatenating
1473
+ ``batch_data`` from multiple ``ProtoRowsBatch`` messages.
1474
+ The ``PartialResultSet`` that contains the last part has
1475
+ ``complete_batch`` set to ``true``.
1476
+ """
1477
+
1478
+ batch_data: bytes = proto.Field(
1479
+ proto.BYTES,
1480
+ number=1,
1481
+ )
1482
+
1483
+
1484
+ class PartialResultSet(proto.Message):
1485
+ r"""A partial result set from the streaming query API. Cloud Bigtable
1486
+ clients buffer partial results received in this message until a
1487
+ ``resume_token`` is received.
1488
+
1489
+ The pseudocode below describes how to buffer and parse a stream of
1490
+ ``PartialResultSet`` messages.
1491
+
1492
+ Having:
1493
+
1494
+ - queue of row results waiting to be returned ``queue``
1495
+ - extensible buffer of bytes ``buffer``
1496
+ - a place to keep track of the most recent ``resume_token`` for
1497
+ each PartialResultSet ``p`` received { if p.reset { ensure
1498
+ ``queue`` is empty ensure ``buffer`` is empty } if
1499
+ p.estimated_batch_size != 0 { (optional) ensure ``buffer`` is
1500
+ sized to at least ``p.estimated_batch_size`` } if
1501
+ ``p.proto_rows_batch`` is set { append
1502
+ ``p.proto_rows_batch.bytes`` to ``buffer`` } if p.batch_checksum
1503
+ is set and ``buffer`` is not empty { validate the checksum
1504
+ matches the contents of ``buffer`` (see comments on
1505
+ ``batch_checksum``) parse ``buffer`` as ``ProtoRows`` message,
1506
+ clearing ``buffer`` add parsed rows to end of ``queue`` } if
1507
+ p.resume_token is set { release results in ``queue`` save
1508
+ ``p.resume_token`` in ``resume_token`` } }
1509
+
1510
+
1511
+ .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
1512
+
1513
+ Attributes:
1514
+ proto_rows_batch (google.cloud.bigtable_v2.types.ProtoRowsBatch):
1515
+ Partial rows in serialized ProtoRows format.
1516
+
1517
+ This field is a member of `oneof`_ ``partial_rows``.
1518
+ batch_checksum (int):
1519
+ CRC32C checksum of concatenated ``partial_rows`` data for
1520
+ the current batch.
1521
+
1522
+ When present, the buffered data from ``partial_rows`` forms
1523
+ a complete parseable message of the appropriate type.
1524
+
1525
+ The client should mark the end of a parseable message and
1526
+ prepare to receive a new one starting from the next
1527
+ ``PartialResultSet`` message. Clients must verify the
1528
+ checksum of the serialized batch before yielding it to the
1529
+ caller.
1530
+
1531
+ This does NOT mean the values can be yielded to the callers
1532
+ since a ``resume_token`` is required to safely do so.
1533
+
1534
+ If ``resume_token`` is non-empty and any data has been
1535
+ received since the last one, this field is guaranteed to be
1536
+ non-empty. In other words, clients may assume that a batch
1537
+ will never cross a ``resume_token`` boundary.
1538
+
1539
+ This field is a member of `oneof`_ ``_batch_checksum``.
1540
+ resume_token (bytes):
1541
+ An opaque token sent by the server to allow query resumption
1542
+ and signal that the buffered values constructed from
1543
+ received ``partial_rows`` can be yielded to the caller.
1544
+ Clients can provide this token in a subsequent request to
1545
+ resume the result stream from the current point.
1546
+
1547
+ When ``resume_token`` is non-empty, the buffered values
1548
+ received from ``partial_rows`` since the last non-empty
1549
+ ``resume_token`` can be yielded to the callers, provided
1550
+ that the client keeps the value of ``resume_token`` and uses
1551
+ it on subsequent retries.
1552
+
1553
+ A ``resume_token`` may be sent without information in
1554
+ ``partial_rows`` to checkpoint the progress of a sparse
1555
+ query. Any previous ``partial_rows`` data should still be
1556
+ yielded in this case, and the new ``resume_token`` should be
1557
+ saved for future retries as normal.
1558
+
1559
+ A ``resume_token`` will only be sent on a boundary where
1560
+ there is either no ongoing result batch, or
1561
+ ``batch_checksum`` is also populated.
1562
+
1563
+ The server will also send a sentinel ``resume_token`` when
1564
+ last batch of ``partial_rows`` is sent. If the client
1565
+ retries the ExecuteQueryRequest with the sentinel
1566
+ ``resume_token``, the server will emit it again without any
1567
+ data in ``partial_rows``, then return OK.
1568
+ reset (bool):
1569
+ If ``true``, any data buffered since the last non-empty
1570
+ ``resume_token`` must be discarded before the other parts of
1571
+ this message, if any, are handled.
1572
+ estimated_batch_size (int):
1573
+ Estimated size of the buffer required to hold the next batch
1574
+ of results.
1575
+
1576
+ This value will be sent with the first ``partial_rows`` of a
1577
+ batch. That is, on the first ``partial_rows`` received in a
1578
+ stream, on the first message after a ``batch_checksum``
1579
+ message, and any time ``reset`` is true.
1580
+
1581
+ The client can use this estimate to allocate a buffer for
1582
+ the next batch of results. This helps minimize the number of
1583
+ allocations required, though the buffer size may still need
1584
+ to be increased if the estimate is too low.
1585
+ """
1586
+
1587
+ proto_rows_batch: "ProtoRowsBatch" = proto.Field(
1588
+ proto.MESSAGE,
1589
+ number=3,
1590
+ oneof="partial_rows",
1591
+ message="ProtoRowsBatch",
1592
+ )
1593
+ batch_checksum: int = proto.Field(
1594
+ proto.UINT32,
1595
+ number=6,
1596
+ optional=True,
1597
+ )
1598
+ resume_token: bytes = proto.Field(
1599
+ proto.BYTES,
1600
+ number=5,
1601
+ )
1602
+ reset: bool = proto.Field(
1603
+ proto.BOOL,
1604
+ number=7,
1605
+ )
1606
+ estimated_batch_size: int = proto.Field(
1607
+ proto.INT32,
1608
+ number=4,
1609
+ )
1610
+
1611
+
1612
+ __all__ = tuple(sorted(__protobuf__.manifest))