google-cloud-bigtable-v2 0.1.0

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.
@@ -0,0 +1,341 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module Bigtable
23
+ module V2
24
+ # Request message for Bigtable.ReadRows.
25
+ # @!attribute [rw] table_name
26
+ # @return [::String]
27
+ # Required. The unique name of the table from which to read.
28
+ # Values are of the form
29
+ # `projects/<project>/instances/<instance>/tables/<table>`.
30
+ # @!attribute [rw] app_profile_id
31
+ # @return [::String]
32
+ # This value specifies routing for replication. If not specified, the
33
+ # "default" application profile will be used.
34
+ # @!attribute [rw] rows
35
+ # @return [::Google::Cloud::Bigtable::V2::RowSet]
36
+ # The row keys and/or ranges to read. If not specified, reads from all rows.
37
+ # @!attribute [rw] filter
38
+ # @return [::Google::Cloud::Bigtable::V2::RowFilter]
39
+ # The filter to apply to the contents of the specified row(s). If unset,
40
+ # reads the entirety of each row.
41
+ # @!attribute [rw] rows_limit
42
+ # @return [::Integer]
43
+ # The read will terminate after committing to N rows' worth of results. The
44
+ # default (zero) is to return all results.
45
+ class ReadRowsRequest
46
+ include ::Google::Protobuf::MessageExts
47
+ extend ::Google::Protobuf::MessageExts::ClassMethods
48
+ end
49
+
50
+ # Response message for Bigtable.ReadRows.
51
+ # @!attribute [rw] chunks
52
+ # @return [::Array<::Google::Cloud::Bigtable::V2::ReadRowsResponse::CellChunk>]
53
+ # A collection of a row's contents as part of the read request.
54
+ # @!attribute [rw] last_scanned_row_key
55
+ # @return [::String]
56
+ # Optionally the server might return the row key of the last row it
57
+ # has scanned. The client can use this to construct a more
58
+ # efficient retry request if needed: any row keys or portions of
59
+ # ranges less than this row key can be dropped from the request.
60
+ # This is primarily useful for cases where the server has read a
61
+ # lot of data that was filtered out since the last committed row
62
+ # key, allowing the client to skip that work on a retry.
63
+ class ReadRowsResponse
64
+ include ::Google::Protobuf::MessageExts
65
+ extend ::Google::Protobuf::MessageExts::ClassMethods
66
+
67
+ # Specifies a piece of a row's contents returned as part of the read
68
+ # response stream.
69
+ # @!attribute [rw] row_key
70
+ # @return [::String]
71
+ # The row key for this chunk of data. If the row key is empty,
72
+ # this CellChunk is a continuation of the same row as the previous
73
+ # CellChunk in the response stream, even if that CellChunk was in a
74
+ # previous ReadRowsResponse message.
75
+ # @!attribute [rw] family_name
76
+ # @return [::Google::Protobuf::StringValue]
77
+ # The column family name for this chunk of data. If this message
78
+ # is not present this CellChunk is a continuation of the same column
79
+ # family as the previous CellChunk. The empty string can occur as a
80
+ # column family name in a response so clients must check
81
+ # explicitly for the presence of this message, not just for
82
+ # `family_name.value` being non-empty.
83
+ # @!attribute [rw] qualifier
84
+ # @return [::Google::Protobuf::BytesValue]
85
+ # The column qualifier for this chunk of data. If this message
86
+ # is not present, this CellChunk is a continuation of the same column
87
+ # as the previous CellChunk. Column qualifiers may be empty so
88
+ # clients must check for the presence of this message, not just
89
+ # for `qualifier.value` being non-empty.
90
+ # @!attribute [rw] timestamp_micros
91
+ # @return [::Integer]
92
+ # The cell's stored timestamp, which also uniquely identifies it
93
+ # within its column. Values are always expressed in
94
+ # microseconds, but individual tables may set a coarser
95
+ # granularity to further restrict the allowed values. For
96
+ # example, a table which specifies millisecond granularity will
97
+ # only allow values of `timestamp_micros` which are multiples of
98
+ # 1000. Timestamps are only set in the first CellChunk per cell
99
+ # (for cells split into multiple chunks).
100
+ # @!attribute [rw] labels
101
+ # @return [::Array<::String>]
102
+ # Labels applied to the cell by a
103
+ # {::Google::Cloud::Bigtable::V2::RowFilter RowFilter}. Labels are only set
104
+ # on the first CellChunk per cell.
105
+ # @!attribute [rw] value
106
+ # @return [::String]
107
+ # The value stored in the cell. Cell values can be split across
108
+ # multiple CellChunks. In that case only the value field will be
109
+ # set in CellChunks after the first: the timestamp and labels
110
+ # will only be present in the first CellChunk, even if the first
111
+ # CellChunk came in a previous ReadRowsResponse.
112
+ # @!attribute [rw] value_size
113
+ # @return [::Integer]
114
+ # If this CellChunk is part of a chunked cell value and this is
115
+ # not the final chunk of that cell, value_size will be set to the
116
+ # total length of the cell value. The client can use this size
117
+ # to pre-allocate memory to hold the full cell value.
118
+ # @!attribute [rw] reset_row
119
+ # @return [::Boolean]
120
+ # Indicates that the client should drop all previous chunks for
121
+ # `row_key`, as it will be re-read from the beginning.
122
+ # @!attribute [rw] commit_row
123
+ # @return [::Boolean]
124
+ # Indicates that the client can safely process all previous chunks for
125
+ # `row_key`, as its data has been fully read.
126
+ class CellChunk
127
+ include ::Google::Protobuf::MessageExts
128
+ extend ::Google::Protobuf::MessageExts::ClassMethods
129
+ end
130
+ end
131
+
132
+ # Request message for Bigtable.SampleRowKeys.
133
+ # @!attribute [rw] table_name
134
+ # @return [::String]
135
+ # Required. The unique name of the table from which to sample row keys.
136
+ # Values are of the form
137
+ # `projects/<project>/instances/<instance>/tables/<table>`.
138
+ # @!attribute [rw] app_profile_id
139
+ # @return [::String]
140
+ # This value specifies routing for replication. If not specified, the
141
+ # "default" application profile will be used.
142
+ class SampleRowKeysRequest
143
+ include ::Google::Protobuf::MessageExts
144
+ extend ::Google::Protobuf::MessageExts::ClassMethods
145
+ end
146
+
147
+ # Response message for Bigtable.SampleRowKeys.
148
+ # @!attribute [rw] row_key
149
+ # @return [::String]
150
+ # Sorted streamed sequence of sample row keys in the table. The table might
151
+ # have contents before the first row key in the list and after the last one,
152
+ # but a key containing the empty string indicates "end of table" and will be
153
+ # the last response given, if present.
154
+ # Note that row keys in this list may not have ever been written to or read
155
+ # from, and users should therefore not make any assumptions about the row key
156
+ # structure that are specific to their use case.
157
+ # @!attribute [rw] offset_bytes
158
+ # @return [::Integer]
159
+ # Approximate total storage space used by all rows in the table which precede
160
+ # `row_key`. Buffering the contents of all rows between two subsequent
161
+ # samples would require space roughly equal to the difference in their
162
+ # `offset_bytes` fields.
163
+ class SampleRowKeysResponse
164
+ include ::Google::Protobuf::MessageExts
165
+ extend ::Google::Protobuf::MessageExts::ClassMethods
166
+ end
167
+
168
+ # Request message for Bigtable.MutateRow.
169
+ # @!attribute [rw] table_name
170
+ # @return [::String]
171
+ # Required. The unique name of the table to which the mutation should be applied.
172
+ # Values are of the form
173
+ # `projects/<project>/instances/<instance>/tables/<table>`.
174
+ # @!attribute [rw] app_profile_id
175
+ # @return [::String]
176
+ # This value specifies routing for replication. If not specified, the
177
+ # "default" application profile will be used.
178
+ # @!attribute [rw] row_key
179
+ # @return [::String]
180
+ # Required. The key of the row to which the mutation should be applied.
181
+ # @!attribute [rw] mutations
182
+ # @return [::Array<::Google::Cloud::Bigtable::V2::Mutation>]
183
+ # Required. Changes to be atomically applied to the specified row. Entries are applied
184
+ # in order, meaning that earlier mutations can be masked by later ones.
185
+ # Must contain at least one entry and at most 100000.
186
+ class MutateRowRequest
187
+ include ::Google::Protobuf::MessageExts
188
+ extend ::Google::Protobuf::MessageExts::ClassMethods
189
+ end
190
+
191
+ # Response message for Bigtable.MutateRow.
192
+ class MutateRowResponse
193
+ include ::Google::Protobuf::MessageExts
194
+ extend ::Google::Protobuf::MessageExts::ClassMethods
195
+ end
196
+
197
+ # Request message for BigtableService.MutateRows.
198
+ # @!attribute [rw] table_name
199
+ # @return [::String]
200
+ # Required. The unique name of the table to which the mutations should be applied.
201
+ # @!attribute [rw] app_profile_id
202
+ # @return [::String]
203
+ # This value specifies routing for replication. If not specified, the
204
+ # "default" application profile will be used.
205
+ # @!attribute [rw] entries
206
+ # @return [::Array<::Google::Cloud::Bigtable::V2::MutateRowsRequest::Entry>]
207
+ # Required. The row keys and corresponding mutations to be applied in bulk.
208
+ # Each entry is applied as an atomic mutation, but the entries may be
209
+ # applied in arbitrary order (even between entries for the same row).
210
+ # At least one entry must be specified, and in total the entries can
211
+ # contain at most 100000 mutations.
212
+ class MutateRowsRequest
213
+ include ::Google::Protobuf::MessageExts
214
+ extend ::Google::Protobuf::MessageExts::ClassMethods
215
+
216
+ # A mutation for a given row.
217
+ # @!attribute [rw] row_key
218
+ # @return [::String]
219
+ # The key of the row to which the `mutations` should be applied.
220
+ # @!attribute [rw] mutations
221
+ # @return [::Array<::Google::Cloud::Bigtable::V2::Mutation>]
222
+ # Required. Changes to be atomically applied to the specified row. Mutations are
223
+ # applied in order, meaning that earlier mutations can be masked by
224
+ # later ones.
225
+ # You must specify at least one mutation.
226
+ class Entry
227
+ include ::Google::Protobuf::MessageExts
228
+ extend ::Google::Protobuf::MessageExts::ClassMethods
229
+ end
230
+ end
231
+
232
+ # Response message for BigtableService.MutateRows.
233
+ # @!attribute [rw] entries
234
+ # @return [::Array<::Google::Cloud::Bigtable::V2::MutateRowsResponse::Entry>]
235
+ # One or more results for Entries from the batch request.
236
+ class MutateRowsResponse
237
+ include ::Google::Protobuf::MessageExts
238
+ extend ::Google::Protobuf::MessageExts::ClassMethods
239
+
240
+ # The result of applying a passed mutation in the original request.
241
+ # @!attribute [rw] index
242
+ # @return [::Integer]
243
+ # The index into the original request's `entries` list of the Entry
244
+ # for which a result is being reported.
245
+ # @!attribute [rw] status
246
+ # @return [::Google::Rpc::Status]
247
+ # The result of the request Entry identified by `index`.
248
+ # Depending on how requests are batched during execution, it is possible
249
+ # for one Entry to fail due to an error with another Entry. In the event
250
+ # that this occurs, the same error will be reported for both entries.
251
+ class Entry
252
+ include ::Google::Protobuf::MessageExts
253
+ extend ::Google::Protobuf::MessageExts::ClassMethods
254
+ end
255
+ end
256
+
257
+ # Request message for Bigtable.CheckAndMutateRow.
258
+ # @!attribute [rw] table_name
259
+ # @return [::String]
260
+ # Required. The unique name of the table to which the conditional mutation should be
261
+ # applied.
262
+ # Values are of the form
263
+ # `projects/<project>/instances/<instance>/tables/<table>`.
264
+ # @!attribute [rw] app_profile_id
265
+ # @return [::String]
266
+ # This value specifies routing for replication. If not specified, the
267
+ # "default" application profile will be used.
268
+ # @!attribute [rw] row_key
269
+ # @return [::String]
270
+ # Required. The key of the row to which the conditional mutation should be applied.
271
+ # @!attribute [rw] predicate_filter
272
+ # @return [::Google::Cloud::Bigtable::V2::RowFilter]
273
+ # The filter to be applied to the contents of the specified row. Depending
274
+ # on whether or not any results are yielded, either `true_mutations` or
275
+ # `false_mutations` will be executed. If unset, checks that the row contains
276
+ # any values at all.
277
+ # @!attribute [rw] true_mutations
278
+ # @return [::Array<::Google::Cloud::Bigtable::V2::Mutation>]
279
+ # Changes to be atomically applied to the specified row if `predicate_filter`
280
+ # yields at least one cell when applied to `row_key`. Entries are applied in
281
+ # order, meaning that earlier mutations can be masked by later ones.
282
+ # Must contain at least one entry if `false_mutations` is empty, and at most
283
+ # 100000.
284
+ # @!attribute [rw] false_mutations
285
+ # @return [::Array<::Google::Cloud::Bigtable::V2::Mutation>]
286
+ # Changes to be atomically applied to the specified row if `predicate_filter`
287
+ # does not yield any cells when applied to `row_key`. Entries are applied in
288
+ # order, meaning that earlier mutations can be masked by later ones.
289
+ # Must contain at least one entry if `true_mutations` is empty, and at most
290
+ # 100000.
291
+ class CheckAndMutateRowRequest
292
+ include ::Google::Protobuf::MessageExts
293
+ extend ::Google::Protobuf::MessageExts::ClassMethods
294
+ end
295
+
296
+ # Response message for Bigtable.CheckAndMutateRow.
297
+ # @!attribute [rw] predicate_matched
298
+ # @return [::Boolean]
299
+ # Whether or not the request's `predicate_filter` yielded any results for
300
+ # the specified row.
301
+ class CheckAndMutateRowResponse
302
+ include ::Google::Protobuf::MessageExts
303
+ extend ::Google::Protobuf::MessageExts::ClassMethods
304
+ end
305
+
306
+ # Request message for Bigtable.ReadModifyWriteRow.
307
+ # @!attribute [rw] table_name
308
+ # @return [::String]
309
+ # Required. The unique name of the table to which the read/modify/write rules should be
310
+ # applied.
311
+ # Values are of the form
312
+ # `projects/<project>/instances/<instance>/tables/<table>`.
313
+ # @!attribute [rw] app_profile_id
314
+ # @return [::String]
315
+ # This value specifies routing for replication. If not specified, the
316
+ # "default" application profile will be used.
317
+ # @!attribute [rw] row_key
318
+ # @return [::String]
319
+ # Required. The key of the row to which the read/modify/write rules should be applied.
320
+ # @!attribute [rw] rules
321
+ # @return [::Array<::Google::Cloud::Bigtable::V2::ReadModifyWriteRule>]
322
+ # Required. Rules specifying how the specified row's contents are to be transformed
323
+ # into writes. Entries are applied in order, meaning that earlier rules will
324
+ # affect the results of later ones.
325
+ class ReadModifyWriteRowRequest
326
+ include ::Google::Protobuf::MessageExts
327
+ extend ::Google::Protobuf::MessageExts::ClassMethods
328
+ end
329
+
330
+ # Response message for Bigtable.ReadModifyWriteRow.
331
+ # @!attribute [rw] row
332
+ # @return [::Google::Cloud::Bigtable::V2::Row]
333
+ # A Row containing the new contents of all cells modified by the request.
334
+ class ReadModifyWriteRowResponse
335
+ include ::Google::Protobuf::MessageExts
336
+ extend ::Google::Protobuf::MessageExts::ClassMethods
337
+ end
338
+ end
339
+ end
340
+ end
341
+ end
@@ -0,0 +1,556 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module Bigtable
23
+ module V2
24
+ # Specifies the complete (requested) contents of a single row of a table.
25
+ # Rows which exceed 256MiB in size cannot be read in full.
26
+ # @!attribute [rw] key
27
+ # @return [::String]
28
+ # The unique key which identifies this row within its table. This is the same
29
+ # key that's used to identify the row in, for example, a MutateRowRequest.
30
+ # May contain any non-empty byte string up to 4KiB in length.
31
+ # @!attribute [rw] families
32
+ # @return [::Array<::Google::Cloud::Bigtable::V2::Family>]
33
+ # May be empty, but only if the entire row is empty.
34
+ # The mutual ordering of column families is not specified.
35
+ class Row
36
+ include ::Google::Protobuf::MessageExts
37
+ extend ::Google::Protobuf::MessageExts::ClassMethods
38
+ end
39
+
40
+ # Specifies (some of) the contents of a single row/column family intersection
41
+ # of a table.
42
+ # @!attribute [rw] name
43
+ # @return [::String]
44
+ # The unique key which identifies this family within its row. This is the
45
+ # same key that's used to identify the family in, for example, a RowFilter
46
+ # which sets its "family_name_regex_filter" field.
47
+ # Must match `[-_.a-zA-Z0-9]+`, except that AggregatingRowProcessors may
48
+ # produce cells in a sentinel family with an empty name.
49
+ # Must be no greater than 64 characters in length.
50
+ # @!attribute [rw] columns
51
+ # @return [::Array<::Google::Cloud::Bigtable::V2::Column>]
52
+ # Must not be empty. Sorted in order of increasing "qualifier".
53
+ class Family
54
+ include ::Google::Protobuf::MessageExts
55
+ extend ::Google::Protobuf::MessageExts::ClassMethods
56
+ end
57
+
58
+ # Specifies (some of) the contents of a single row/column intersection of a
59
+ # table.
60
+ # @!attribute [rw] qualifier
61
+ # @return [::String]
62
+ # The unique key which identifies this column within its family. This is the
63
+ # same key that's used to identify the column in, for example, a RowFilter
64
+ # which sets its `column_qualifier_regex_filter` field.
65
+ # May contain any byte string, including the empty string, up to 16kiB in
66
+ # length.
67
+ # @!attribute [rw] cells
68
+ # @return [::Array<::Google::Cloud::Bigtable::V2::Cell>]
69
+ # Must not be empty. Sorted in order of decreasing "timestamp_micros".
70
+ class Column
71
+ include ::Google::Protobuf::MessageExts
72
+ extend ::Google::Protobuf::MessageExts::ClassMethods
73
+ end
74
+
75
+ # Specifies (some of) the contents of a single row/column/timestamp of a table.
76
+ # @!attribute [rw] timestamp_micros
77
+ # @return [::Integer]
78
+ # The cell's stored timestamp, which also uniquely identifies it within
79
+ # its column.
80
+ # Values are always expressed in microseconds, but individual tables may set
81
+ # a coarser granularity to further restrict the allowed values. For
82
+ # example, a table which specifies millisecond granularity will only allow
83
+ # values of `timestamp_micros` which are multiples of 1000.
84
+ # @!attribute [rw] value
85
+ # @return [::String]
86
+ # The value stored in the cell.
87
+ # May contain any byte string, including the empty string, up to 100MiB in
88
+ # length.
89
+ # @!attribute [rw] labels
90
+ # @return [::Array<::String>]
91
+ # Labels applied to the cell by a {::Google::Cloud::Bigtable::V2::RowFilter RowFilter}.
92
+ class Cell
93
+ include ::Google::Protobuf::MessageExts
94
+ extend ::Google::Protobuf::MessageExts::ClassMethods
95
+ end
96
+
97
+ # Specifies a contiguous range of rows.
98
+ # @!attribute [rw] start_key_closed
99
+ # @return [::String]
100
+ # Used when giving an inclusive lower bound for the range.
101
+ # @!attribute [rw] start_key_open
102
+ # @return [::String]
103
+ # Used when giving an exclusive lower bound for the range.
104
+ # @!attribute [rw] end_key_open
105
+ # @return [::String]
106
+ # Used when giving an exclusive upper bound for the range.
107
+ # @!attribute [rw] end_key_closed
108
+ # @return [::String]
109
+ # Used when giving an inclusive upper bound for the range.
110
+ class RowRange
111
+ include ::Google::Protobuf::MessageExts
112
+ extend ::Google::Protobuf::MessageExts::ClassMethods
113
+ end
114
+
115
+ # Specifies a non-contiguous set of rows.
116
+ # @!attribute [rw] row_keys
117
+ # @return [::Array<::String>]
118
+ # Single rows included in the set.
119
+ # @!attribute [rw] row_ranges
120
+ # @return [::Array<::Google::Cloud::Bigtable::V2::RowRange>]
121
+ # Contiguous row ranges included in the set.
122
+ class RowSet
123
+ include ::Google::Protobuf::MessageExts
124
+ extend ::Google::Protobuf::MessageExts::ClassMethods
125
+ end
126
+
127
+ # Specifies a contiguous range of columns within a single column family.
128
+ # The range spans from &lt;column_family&gt;:&lt;start_qualifier&gt; to
129
+ # &lt;column_family&gt;:&lt;end_qualifier&gt;, where both bounds can be either
130
+ # inclusive or exclusive.
131
+ # @!attribute [rw] family_name
132
+ # @return [::String]
133
+ # The name of the column family within which this range falls.
134
+ # @!attribute [rw] start_qualifier_closed
135
+ # @return [::String]
136
+ # Used when giving an inclusive lower bound for the range.
137
+ # @!attribute [rw] start_qualifier_open
138
+ # @return [::String]
139
+ # Used when giving an exclusive lower bound for the range.
140
+ # @!attribute [rw] end_qualifier_closed
141
+ # @return [::String]
142
+ # Used when giving an inclusive upper bound for the range.
143
+ # @!attribute [rw] end_qualifier_open
144
+ # @return [::String]
145
+ # Used when giving an exclusive upper bound for the range.
146
+ class ColumnRange
147
+ include ::Google::Protobuf::MessageExts
148
+ extend ::Google::Protobuf::MessageExts::ClassMethods
149
+ end
150
+
151
+ # Specified a contiguous range of microsecond timestamps.
152
+ # @!attribute [rw] start_timestamp_micros
153
+ # @return [::Integer]
154
+ # Inclusive lower bound. If left empty, interpreted as 0.
155
+ # @!attribute [rw] end_timestamp_micros
156
+ # @return [::Integer]
157
+ # Exclusive upper bound. If left empty, interpreted as infinity.
158
+ class TimestampRange
159
+ include ::Google::Protobuf::MessageExts
160
+ extend ::Google::Protobuf::MessageExts::ClassMethods
161
+ end
162
+
163
+ # Specifies a contiguous range of raw byte values.
164
+ # @!attribute [rw] start_value_closed
165
+ # @return [::String]
166
+ # Used when giving an inclusive lower bound for the range.
167
+ # @!attribute [rw] start_value_open
168
+ # @return [::String]
169
+ # Used when giving an exclusive lower bound for the range.
170
+ # @!attribute [rw] end_value_closed
171
+ # @return [::String]
172
+ # Used when giving an inclusive upper bound for the range.
173
+ # @!attribute [rw] end_value_open
174
+ # @return [::String]
175
+ # Used when giving an exclusive upper bound for the range.
176
+ class ValueRange
177
+ include ::Google::Protobuf::MessageExts
178
+ extend ::Google::Protobuf::MessageExts::ClassMethods
179
+ end
180
+
181
+ # Takes a row as input and produces an alternate view of the row based on
182
+ # specified rules. For example, a RowFilter might trim down a row to include
183
+ # just the cells from columns matching a given regular expression, or might
184
+ # return all the cells of a row but not their values. More complicated filters
185
+ # can be composed out of these components to express requests such as, "within
186
+ # every column of a particular family, give just the two most recent cells
187
+ # which are older than timestamp X."
188
+ #
189
+ # There are two broad categories of RowFilters (true filters and transformers),
190
+ # as well as two ways to compose simple filters into more complex ones
191
+ # (chains and interleaves). They work as follows:
192
+ #
193
+ # * True filters alter the input row by excluding some of its cells wholesale
194
+ # from the output row. An example of a true filter is the `value_regex_filter`,
195
+ # which excludes cells whose values don't match the specified pattern. All
196
+ # regex true filters use RE2 syntax (https://github.com/google/re2/wiki/Syntax)
197
+ # in raw byte mode (RE2::Latin1), and are evaluated as full matches. An
198
+ # important point to keep in mind is that `RE2(.)` is equivalent by default to
199
+ # `RE2([^\n])`, meaning that it does not match newlines. When attempting to
200
+ # match an arbitrary byte, you should therefore use the escape sequence `\C`,
201
+ # which may need to be further escaped as `\\C` in your client language.
202
+ #
203
+ # * Transformers alter the input row by changing the values of some of its
204
+ # cells in the output, without excluding them completely. Currently, the only
205
+ # supported transformer is the `strip_value_transformer`, which replaces every
206
+ # cell's value with the empty string.
207
+ #
208
+ # * Chains and interleaves are described in more detail in the
209
+ # RowFilter.Chain and RowFilter.Interleave documentation.
210
+ #
211
+ # The total serialized size of a RowFilter message must not
212
+ # exceed 4096 bytes, and RowFilters may not be nested within each other
213
+ # (in Chains or Interleaves) to a depth of more than 20.
214
+ # @!attribute [rw] chain
215
+ # @return [::Google::Cloud::Bigtable::V2::RowFilter::Chain]
216
+ # Applies several RowFilters to the data in sequence, progressively
217
+ # narrowing the results.
218
+ # @!attribute [rw] interleave
219
+ # @return [::Google::Cloud::Bigtable::V2::RowFilter::Interleave]
220
+ # Applies several RowFilters to the data in parallel and combines the
221
+ # results.
222
+ # @!attribute [rw] condition
223
+ # @return [::Google::Cloud::Bigtable::V2::RowFilter::Condition]
224
+ # Applies one of two possible RowFilters to the data based on the output of
225
+ # a predicate RowFilter.
226
+ # @!attribute [rw] sink
227
+ # @return [::Boolean]
228
+ # ADVANCED USE ONLY.
229
+ # Hook for introspection into the RowFilter. Outputs all cells directly to
230
+ # the output of the read rather than to any parent filter. Consider the
231
+ # following example:
232
+ #
233
+ # Chain(
234
+ # FamilyRegex("A"),
235
+ # Interleave(
236
+ # All(),
237
+ # Chain(Label("foo"), Sink())
238
+ # ),
239
+ # QualifierRegex("B")
240
+ # )
241
+ #
242
+ # A,A,1,w
243
+ # A,B,2,x
244
+ # B,B,4,z
245
+ # |
246
+ # FamilyRegex("A")
247
+ # |
248
+ # A,A,1,w
249
+ # A,B,2,x
250
+ # |
251
+ # +------------+-------------+
252
+ # | |
253
+ # All() Label(foo)
254
+ # | |
255
+ # A,A,1,w A,A,1,w,labels:[foo]
256
+ # A,B,2,x A,B,2,x,labels:[foo]
257
+ # | |
258
+ # | Sink() --------------+
259
+ # | | |
260
+ # +------------+ x------+ A,A,1,w,labels:[foo]
261
+ # | A,B,2,x,labels:[foo]
262
+ # A,A,1,w |
263
+ # A,B,2,x |
264
+ # | |
265
+ # QualifierRegex("B") |
266
+ # | |
267
+ # A,B,2,x |
268
+ # | |
269
+ # +--------------------------------+
270
+ # |
271
+ # A,A,1,w,labels:[foo]
272
+ # A,B,2,x,labels:[foo] // could be switched
273
+ # A,B,2,x // could be switched
274
+ #
275
+ # Despite being excluded by the qualifier filter, a copy of every cell
276
+ # that reaches the sink is present in the final result.
277
+ #
278
+ # As with an {::Google::Cloud::Bigtable::V2::RowFilter::Interleave Interleave},
279
+ # duplicate cells are possible, and appear in an unspecified mutual order.
280
+ # In this case we have a duplicate with column "A:B" and timestamp 2,
281
+ # because one copy passed through the all filter while the other was
282
+ # passed through the label and sink. Note that one copy has label "foo",
283
+ # while the other does not.
284
+ #
285
+ # Cannot be used within the `predicate_filter`, `true_filter`, or
286
+ # `false_filter` of a {::Google::Cloud::Bigtable::V2::RowFilter::Condition Condition}.
287
+ # @!attribute [rw] pass_all_filter
288
+ # @return [::Boolean]
289
+ # Matches all cells, regardless of input. Functionally equivalent to
290
+ # leaving `filter` unset, but included for completeness.
291
+ # @!attribute [rw] block_all_filter
292
+ # @return [::Boolean]
293
+ # Does not match any cells, regardless of input. Useful for temporarily
294
+ # disabling just part of a filter.
295
+ # @!attribute [rw] row_key_regex_filter
296
+ # @return [::String]
297
+ # Matches only cells from rows whose keys satisfy the given RE2 regex. In
298
+ # other words, passes through the entire row when the key matches, and
299
+ # otherwise produces an empty row.
300
+ # Note that, since row keys can contain arbitrary bytes, the `\C` escape
301
+ # sequence must be used if a true wildcard is desired. The `.` character
302
+ # will not match the new line character `\n`, which may be present in a
303
+ # binary key.
304
+ # @!attribute [rw] row_sample_filter
305
+ # @return [::Float]
306
+ # Matches all cells from a row with probability p, and matches no cells
307
+ # from the row with probability 1-p.
308
+ # @!attribute [rw] family_name_regex_filter
309
+ # @return [::String]
310
+ # Matches only cells from columns whose families satisfy the given RE2
311
+ # regex. For technical reasons, the regex must not contain the `:`
312
+ # character, even if it is not being used as a literal.
313
+ # Note that, since column families cannot contain the new line character
314
+ # `\n`, it is sufficient to use `.` as a full wildcard when matching
315
+ # column family names.
316
+ # @!attribute [rw] column_qualifier_regex_filter
317
+ # @return [::String]
318
+ # Matches only cells from columns whose qualifiers satisfy the given RE2
319
+ # regex.
320
+ # Note that, since column qualifiers can contain arbitrary bytes, the `\C`
321
+ # escape sequence must be used if a true wildcard is desired. The `.`
322
+ # character will not match the new line character `\n`, which may be
323
+ # present in a binary qualifier.
324
+ # @!attribute [rw] column_range_filter
325
+ # @return [::Google::Cloud::Bigtable::V2::ColumnRange]
326
+ # Matches only cells from columns within the given range.
327
+ # @!attribute [rw] timestamp_range_filter
328
+ # @return [::Google::Cloud::Bigtable::V2::TimestampRange]
329
+ # Matches only cells with timestamps within the given range.
330
+ # @!attribute [rw] value_regex_filter
331
+ # @return [::String]
332
+ # Matches only cells with values that satisfy the given regular expression.
333
+ # Note that, since cell values can contain arbitrary bytes, the `\C` escape
334
+ # sequence must be used if a true wildcard is desired. The `.` character
335
+ # will not match the new line character `\n`, which may be present in a
336
+ # binary value.
337
+ # @!attribute [rw] value_range_filter
338
+ # @return [::Google::Cloud::Bigtable::V2::ValueRange]
339
+ # Matches only cells with values that fall within the given range.
340
+ # @!attribute [rw] cells_per_row_offset_filter
341
+ # @return [::Integer]
342
+ # Skips the first N cells of each row, matching all subsequent cells.
343
+ # If duplicate cells are present, as is possible when using an Interleave,
344
+ # each copy of the cell is counted separately.
345
+ # @!attribute [rw] cells_per_row_limit_filter
346
+ # @return [::Integer]
347
+ # Matches only the first N cells of each row.
348
+ # If duplicate cells are present, as is possible when using an Interleave,
349
+ # each copy of the cell is counted separately.
350
+ # @!attribute [rw] cells_per_column_limit_filter
351
+ # @return [::Integer]
352
+ # Matches only the most recent N cells within each column. For example,
353
+ # if N=2, this filter would match column `foo:bar` at timestamps 10 and 9,
354
+ # skip all earlier cells in `foo:bar`, and then begin matching again in
355
+ # column `foo:bar2`.
356
+ # If duplicate cells are present, as is possible when using an Interleave,
357
+ # each copy of the cell is counted separately.
358
+ # @!attribute [rw] strip_value_transformer
359
+ # @return [::Boolean]
360
+ # Replaces each cell's value with the empty string.
361
+ # @!attribute [rw] apply_label_transformer
362
+ # @return [::String]
363
+ # Applies the given label to all cells in the output row. This allows
364
+ # the client to determine which results were produced from which part of
365
+ # the filter.
366
+ #
367
+ # Values must be at most 15 characters in length, and match the RE2
368
+ # pattern `[a-z0-9\\-]+`
369
+ #
370
+ # Due to a technical limitation, it is not currently possible to apply
371
+ # multiple labels to a cell. As a result, a Chain may have no more than
372
+ # one sub-filter which contains a `apply_label_transformer`. It is okay for
373
+ # an Interleave to contain multiple `apply_label_transformers`, as they
374
+ # will be applied to separate copies of the input. This may be relaxed in
375
+ # the future.
376
+ class RowFilter
377
+ include ::Google::Protobuf::MessageExts
378
+ extend ::Google::Protobuf::MessageExts::ClassMethods
379
+
380
+ # A RowFilter which sends rows through several RowFilters in sequence.
381
+ # @!attribute [rw] filters
382
+ # @return [::Array<::Google::Cloud::Bigtable::V2::RowFilter>]
383
+ # The elements of "filters" are chained together to process the input row:
384
+ # in row -> f(0) -> intermediate row -> f(1) -> ... -> f(N) -> out row
385
+ # The full chain is executed atomically.
386
+ class Chain
387
+ include ::Google::Protobuf::MessageExts
388
+ extend ::Google::Protobuf::MessageExts::ClassMethods
389
+ end
390
+
391
+ # A RowFilter which sends each row to each of several component
392
+ # RowFilters and interleaves the results.
393
+ # @!attribute [rw] filters
394
+ # @return [::Array<::Google::Cloud::Bigtable::V2::RowFilter>]
395
+ # The elements of "filters" all process a copy of the input row, and the
396
+ # results are pooled, sorted, and combined into a single output row.
397
+ # If multiple cells are produced with the same column and timestamp,
398
+ # they will all appear in the output row in an unspecified mutual order.
399
+ # Consider the following example, with three filters:
400
+ #
401
+ # input row
402
+ # |
403
+ # -----------------------------------------------------
404
+ # | | |
405
+ # f(0) f(1) f(2)
406
+ # | | |
407
+ # 1: foo,bar,10,x foo,bar,10,z far,bar,7,a
408
+ # 2: foo,blah,11,z far,blah,5,x far,blah,5,x
409
+ # | | |
410
+ # -----------------------------------------------------
411
+ # |
412
+ # 1: foo,bar,10,z // could have switched with #2
413
+ # 2: foo,bar,10,x // could have switched with #1
414
+ # 3: foo,blah,11,z
415
+ # 4: far,bar,7,a
416
+ # 5: far,blah,5,x // identical to #6
417
+ # 6: far,blah,5,x // identical to #5
418
+ #
419
+ # All interleaved filters are executed atomically.
420
+ class Interleave
421
+ include ::Google::Protobuf::MessageExts
422
+ extend ::Google::Protobuf::MessageExts::ClassMethods
423
+ end
424
+
425
+ # A RowFilter which evaluates one of two possible RowFilters, depending on
426
+ # whether or not a predicate RowFilter outputs any cells from the input row.
427
+ #
428
+ # IMPORTANT NOTE: The predicate filter does not execute atomically with the
429
+ # true and false filters, which may lead to inconsistent or unexpected
430
+ # results. Additionally, Condition filters have poor performance, especially
431
+ # when filters are set for the false condition.
432
+ # @!attribute [rw] predicate_filter
433
+ # @return [::Google::Cloud::Bigtable::V2::RowFilter]
434
+ # If `predicate_filter` outputs any cells, then `true_filter` will be
435
+ # evaluated on the input row. Otherwise, `false_filter` will be evaluated.
436
+ # @!attribute [rw] true_filter
437
+ # @return [::Google::Cloud::Bigtable::V2::RowFilter]
438
+ # The filter to apply to the input row if `predicate_filter` returns any
439
+ # results. If not provided, no results will be returned in the true case.
440
+ # @!attribute [rw] false_filter
441
+ # @return [::Google::Cloud::Bigtable::V2::RowFilter]
442
+ # The filter to apply to the input row if `predicate_filter` does not
443
+ # return any results. If not provided, no results will be returned in the
444
+ # false case.
445
+ class Condition
446
+ include ::Google::Protobuf::MessageExts
447
+ extend ::Google::Protobuf::MessageExts::ClassMethods
448
+ end
449
+ end
450
+
451
+ # Specifies a particular change to be made to the contents of a row.
452
+ # @!attribute [rw] set_cell
453
+ # @return [::Google::Cloud::Bigtable::V2::Mutation::SetCell]
454
+ # Set a cell's value.
455
+ # @!attribute [rw] delete_from_column
456
+ # @return [::Google::Cloud::Bigtable::V2::Mutation::DeleteFromColumn]
457
+ # Deletes cells from a column.
458
+ # @!attribute [rw] delete_from_family
459
+ # @return [::Google::Cloud::Bigtable::V2::Mutation::DeleteFromFamily]
460
+ # Deletes cells from a column family.
461
+ # @!attribute [rw] delete_from_row
462
+ # @return [::Google::Cloud::Bigtable::V2::Mutation::DeleteFromRow]
463
+ # Deletes cells from the entire row.
464
+ class Mutation
465
+ include ::Google::Protobuf::MessageExts
466
+ extend ::Google::Protobuf::MessageExts::ClassMethods
467
+
468
+ # A Mutation which sets the value of the specified cell.
469
+ # @!attribute [rw] family_name
470
+ # @return [::String]
471
+ # The name of the family into which new data should be written.
472
+ # Must match `[-_.a-zA-Z0-9]+`
473
+ # @!attribute [rw] column_qualifier
474
+ # @return [::String]
475
+ # The qualifier of the column into which new data should be written.
476
+ # Can be any byte string, including the empty string.
477
+ # @!attribute [rw] timestamp_micros
478
+ # @return [::Integer]
479
+ # The timestamp of the cell into which new data should be written.
480
+ # Use -1 for current Bigtable server time.
481
+ # Otherwise, the client should set this value itself, noting that the
482
+ # default value is a timestamp of zero if the field is left unspecified.
483
+ # Values must match the granularity of the table (e.g. micros, millis).
484
+ # @!attribute [rw] value
485
+ # @return [::String]
486
+ # The value to be written into the specified cell.
487
+ class SetCell
488
+ include ::Google::Protobuf::MessageExts
489
+ extend ::Google::Protobuf::MessageExts::ClassMethods
490
+ end
491
+
492
+ # A Mutation which deletes cells from the specified column, optionally
493
+ # restricting the deletions to a given timestamp range.
494
+ # @!attribute [rw] family_name
495
+ # @return [::String]
496
+ # The name of the family from which cells should be deleted.
497
+ # Must match `[-_.a-zA-Z0-9]+`
498
+ # @!attribute [rw] column_qualifier
499
+ # @return [::String]
500
+ # The qualifier of the column from which cells should be deleted.
501
+ # Can be any byte string, including the empty string.
502
+ # @!attribute [rw] time_range
503
+ # @return [::Google::Cloud::Bigtable::V2::TimestampRange]
504
+ # The range of timestamps within which cells should be deleted.
505
+ class DeleteFromColumn
506
+ include ::Google::Protobuf::MessageExts
507
+ extend ::Google::Protobuf::MessageExts::ClassMethods
508
+ end
509
+
510
+ # A Mutation which deletes all cells from the specified column family.
511
+ # @!attribute [rw] family_name
512
+ # @return [::String]
513
+ # The name of the family from which cells should be deleted.
514
+ # Must match `[-_.a-zA-Z0-9]+`
515
+ class DeleteFromFamily
516
+ include ::Google::Protobuf::MessageExts
517
+ extend ::Google::Protobuf::MessageExts::ClassMethods
518
+ end
519
+
520
+ # A Mutation which deletes all cells from the containing row.
521
+ class DeleteFromRow
522
+ include ::Google::Protobuf::MessageExts
523
+ extend ::Google::Protobuf::MessageExts::ClassMethods
524
+ end
525
+ end
526
+
527
+ # Specifies an atomic read/modify/write operation on the latest value of the
528
+ # specified column.
529
+ # @!attribute [rw] family_name
530
+ # @return [::String]
531
+ # The name of the family to which the read/modify/write should be applied.
532
+ # Must match `[-_.a-zA-Z0-9]+`
533
+ # @!attribute [rw] column_qualifier
534
+ # @return [::String]
535
+ # The qualifier of the column to which the read/modify/write should be
536
+ # applied.
537
+ # Can be any byte string, including the empty string.
538
+ # @!attribute [rw] append_value
539
+ # @return [::String]
540
+ # Rule specifying that `append_value` be appended to the existing value.
541
+ # If the targeted cell is unset, it will be treated as containing the
542
+ # empty string.
543
+ # @!attribute [rw] increment_amount
544
+ # @return [::Integer]
545
+ # Rule specifying that `increment_amount` be added to the existing value.
546
+ # If the targeted cell is unset, it will be treated as containing a zero.
547
+ # Otherwise, the targeted cell must contain an 8-byte value (interpreted
548
+ # as a 64-bit big-endian signed integer), or the entire request will fail.
549
+ class ReadModifyWriteRule
550
+ include ::Google::Protobuf::MessageExts
551
+ extend ::Google::Protobuf::MessageExts::ClassMethods
552
+ end
553
+ end
554
+ end
555
+ end
556
+ end