1*d5c09012SAndroid Build Coastguard Worker// Copyright 2023 Google LLC 2*d5c09012SAndroid Build Coastguard Worker// 3*d5c09012SAndroid Build Coastguard Worker// Licensed under the Apache License, Version 2.0 (the "License"); 4*d5c09012SAndroid Build Coastguard Worker// you may not use this file except in compliance with the License. 5*d5c09012SAndroid Build Coastguard Worker// You may obtain a copy of the License at 6*d5c09012SAndroid Build Coastguard Worker// 7*d5c09012SAndroid Build Coastguard Worker// http://www.apache.org/licenses/LICENSE-2.0 8*d5c09012SAndroid Build Coastguard Worker// 9*d5c09012SAndroid Build Coastguard Worker// Unless required by applicable law or agreed to in writing, software 10*d5c09012SAndroid Build Coastguard Worker// distributed under the License is distributed on an "AS IS" BASIS, 11*d5c09012SAndroid Build Coastguard Worker// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12*d5c09012SAndroid Build Coastguard Worker// See the License for the specific language governing permissions and 13*d5c09012SAndroid Build Coastguard Worker// limitations under the License. 14*d5c09012SAndroid Build Coastguard Worker 15*d5c09012SAndroid Build Coastguard Workersyntax = "proto3"; 16*d5c09012SAndroid Build Coastguard Worker 17*d5c09012SAndroid Build Coastguard Workerpackage google.bigtable.v2; 18*d5c09012SAndroid Build Coastguard Worker 19*d5c09012SAndroid Build Coastguard Workerimport "google/api/field_behavior.proto"; 20*d5c09012SAndroid Build Coastguard Worker 21*d5c09012SAndroid Build Coastguard Workeroption csharp_namespace = "Google.Cloud.Bigtable.V2"; 22*d5c09012SAndroid Build Coastguard Workeroption go_package = "google.golang.org/genproto/googleapis/bigtable/v2;bigtable"; 23*d5c09012SAndroid Build Coastguard Workeroption java_multiple_files = true; 24*d5c09012SAndroid Build Coastguard Workeroption java_outer_classname = "DataProto"; 25*d5c09012SAndroid Build Coastguard Workeroption java_package = "com.google.bigtable.v2"; 26*d5c09012SAndroid Build Coastguard Workeroption php_namespace = "Google\\Cloud\\Bigtable\\V2"; 27*d5c09012SAndroid Build Coastguard Workeroption ruby_package = "Google::Cloud::Bigtable::V2"; 28*d5c09012SAndroid Build Coastguard Worker 29*d5c09012SAndroid Build Coastguard Worker// Specifies the complete (requested) contents of a single row of a table. 30*d5c09012SAndroid Build Coastguard Worker// Rows which exceed 256MiB in size cannot be read in full. 31*d5c09012SAndroid Build Coastguard Workermessage Row { 32*d5c09012SAndroid Build Coastguard Worker // The unique key which identifies this row within its table. This is the same 33*d5c09012SAndroid Build Coastguard Worker // key that's used to identify the row in, for example, a MutateRowRequest. 34*d5c09012SAndroid Build Coastguard Worker // May contain any non-empty byte string up to 4KiB in length. 35*d5c09012SAndroid Build Coastguard Worker bytes key = 1; 36*d5c09012SAndroid Build Coastguard Worker 37*d5c09012SAndroid Build Coastguard Worker // May be empty, but only if the entire row is empty. 38*d5c09012SAndroid Build Coastguard Worker // The mutual ordering of column families is not specified. 39*d5c09012SAndroid Build Coastguard Worker repeated Family families = 2; 40*d5c09012SAndroid Build Coastguard Worker} 41*d5c09012SAndroid Build Coastguard Worker 42*d5c09012SAndroid Build Coastguard Worker// Specifies (some of) the contents of a single row/column family intersection 43*d5c09012SAndroid Build Coastguard Worker// of a table. 44*d5c09012SAndroid Build Coastguard Workermessage Family { 45*d5c09012SAndroid Build Coastguard Worker // The unique key which identifies this family within its row. This is the 46*d5c09012SAndroid Build Coastguard Worker // same key that's used to identify the family in, for example, a RowFilter 47*d5c09012SAndroid Build Coastguard Worker // which sets its "family_name_regex_filter" field. 48*d5c09012SAndroid Build Coastguard Worker // Must match `[-_.a-zA-Z0-9]+`, except that AggregatingRowProcessors may 49*d5c09012SAndroid Build Coastguard Worker // produce cells in a sentinel family with an empty name. 50*d5c09012SAndroid Build Coastguard Worker // Must be no greater than 64 characters in length. 51*d5c09012SAndroid Build Coastguard Worker string name = 1; 52*d5c09012SAndroid Build Coastguard Worker 53*d5c09012SAndroid Build Coastguard Worker // Must not be empty. Sorted in order of increasing "qualifier". 54*d5c09012SAndroid Build Coastguard Worker repeated Column columns = 2; 55*d5c09012SAndroid Build Coastguard Worker} 56*d5c09012SAndroid Build Coastguard Worker 57*d5c09012SAndroid Build Coastguard Worker// Specifies (some of) the contents of a single row/column intersection of a 58*d5c09012SAndroid Build Coastguard Worker// table. 59*d5c09012SAndroid Build Coastguard Workermessage Column { 60*d5c09012SAndroid Build Coastguard Worker // The unique key which identifies this column within its family. This is the 61*d5c09012SAndroid Build Coastguard Worker // same key that's used to identify the column in, for example, a RowFilter 62*d5c09012SAndroid Build Coastguard Worker // which sets its `column_qualifier_regex_filter` field. 63*d5c09012SAndroid Build Coastguard Worker // May contain any byte string, including the empty string, up to 16kiB in 64*d5c09012SAndroid Build Coastguard Worker // length. 65*d5c09012SAndroid Build Coastguard Worker bytes qualifier = 1; 66*d5c09012SAndroid Build Coastguard Worker 67*d5c09012SAndroid Build Coastguard Worker // Must not be empty. Sorted in order of decreasing "timestamp_micros". 68*d5c09012SAndroid Build Coastguard Worker repeated Cell cells = 2; 69*d5c09012SAndroid Build Coastguard Worker} 70*d5c09012SAndroid Build Coastguard Worker 71*d5c09012SAndroid Build Coastguard Worker// Specifies (some of) the contents of a single row/column/timestamp of a table. 72*d5c09012SAndroid Build Coastguard Workermessage Cell { 73*d5c09012SAndroid Build Coastguard Worker // The cell's stored timestamp, which also uniquely identifies it within 74*d5c09012SAndroid Build Coastguard Worker // its column. 75*d5c09012SAndroid Build Coastguard Worker // Values are always expressed in microseconds, but individual tables may set 76*d5c09012SAndroid Build Coastguard Worker // a coarser granularity to further restrict the allowed values. For 77*d5c09012SAndroid Build Coastguard Worker // example, a table which specifies millisecond granularity will only allow 78*d5c09012SAndroid Build Coastguard Worker // values of `timestamp_micros` which are multiples of 1000. 79*d5c09012SAndroid Build Coastguard Worker int64 timestamp_micros = 1; 80*d5c09012SAndroid Build Coastguard Worker 81*d5c09012SAndroid Build Coastguard Worker // The value stored in the cell. 82*d5c09012SAndroid Build Coastguard Worker // May contain any byte string, including the empty string, up to 100MiB in 83*d5c09012SAndroid Build Coastguard Worker // length. 84*d5c09012SAndroid Build Coastguard Worker bytes value = 2; 85*d5c09012SAndroid Build Coastguard Worker 86*d5c09012SAndroid Build Coastguard Worker // Labels applied to the cell by a [RowFilter][google.bigtable.v2.RowFilter]. 87*d5c09012SAndroid Build Coastguard Worker repeated string labels = 3; 88*d5c09012SAndroid Build Coastguard Worker} 89*d5c09012SAndroid Build Coastguard Worker 90*d5c09012SAndroid Build Coastguard Worker// `Value` represents a dynamically typed value. 91*d5c09012SAndroid Build Coastguard Worker// The typed fields in `Value` are used as a transport encoding for the actual 92*d5c09012SAndroid Build Coastguard Worker// value (which may be of a more complex type). See the documentation of the 93*d5c09012SAndroid Build Coastguard Worker// `Type` message for more details. 94*d5c09012SAndroid Build Coastguard Workermessage Value { 95*d5c09012SAndroid Build Coastguard Worker // Options for transporting values within the protobuf type system. A given 96*d5c09012SAndroid Build Coastguard Worker // `kind` may support more than one `type` and vice versa. On write, this is 97*d5c09012SAndroid Build Coastguard Worker // roughly analogous to a GoogleSQL literal. 98*d5c09012SAndroid Build Coastguard Worker // 99*d5c09012SAndroid Build Coastguard Worker // The value is `NULL` if none of the fields in `kind` is set. If `type` is 100*d5c09012SAndroid Build Coastguard Worker // also omitted on write, we will infer it based on the schema. 101*d5c09012SAndroid Build Coastguard Worker oneof kind { 102*d5c09012SAndroid Build Coastguard Worker // Represents a raw byte sequence with no type information. 103*d5c09012SAndroid Build Coastguard Worker // The `type` field must be omitted. 104*d5c09012SAndroid Build Coastguard Worker bytes raw_value = 8; 105*d5c09012SAndroid Build Coastguard Worker 106*d5c09012SAndroid Build Coastguard Worker // Represents a raw cell timestamp with no type information. 107*d5c09012SAndroid Build Coastguard Worker // The `type` field must be omitted. 108*d5c09012SAndroid Build Coastguard Worker int64 raw_timestamp_micros = 9; 109*d5c09012SAndroid Build Coastguard Worker 110*d5c09012SAndroid Build Coastguard Worker // Represents a typed value transported as an integer. 111*d5c09012SAndroid Build Coastguard Worker // Default type for writes: `Int64` 112*d5c09012SAndroid Build Coastguard Worker int64 int_value = 6; 113*d5c09012SAndroid Build Coastguard Worker } 114*d5c09012SAndroid Build Coastguard Worker} 115*d5c09012SAndroid Build Coastguard Worker 116*d5c09012SAndroid Build Coastguard Worker// Specifies a contiguous range of rows. 117*d5c09012SAndroid Build Coastguard Workermessage RowRange { 118*d5c09012SAndroid Build Coastguard Worker // The row key at which to start the range. 119*d5c09012SAndroid Build Coastguard Worker // If neither field is set, interpreted as the empty string, inclusive. 120*d5c09012SAndroid Build Coastguard Worker oneof start_key { 121*d5c09012SAndroid Build Coastguard Worker // Used when giving an inclusive lower bound for the range. 122*d5c09012SAndroid Build Coastguard Worker bytes start_key_closed = 1; 123*d5c09012SAndroid Build Coastguard Worker 124*d5c09012SAndroid Build Coastguard Worker // Used when giving an exclusive lower bound for the range. 125*d5c09012SAndroid Build Coastguard Worker bytes start_key_open = 2; 126*d5c09012SAndroid Build Coastguard Worker } 127*d5c09012SAndroid Build Coastguard Worker 128*d5c09012SAndroid Build Coastguard Worker // The row key at which to end the range. 129*d5c09012SAndroid Build Coastguard Worker // If neither field is set, interpreted as the infinite row key, exclusive. 130*d5c09012SAndroid Build Coastguard Worker oneof end_key { 131*d5c09012SAndroid Build Coastguard Worker // Used when giving an exclusive upper bound for the range. 132*d5c09012SAndroid Build Coastguard Worker bytes end_key_open = 3; 133*d5c09012SAndroid Build Coastguard Worker 134*d5c09012SAndroid Build Coastguard Worker // Used when giving an inclusive upper bound for the range. 135*d5c09012SAndroid Build Coastguard Worker bytes end_key_closed = 4; 136*d5c09012SAndroid Build Coastguard Worker } 137*d5c09012SAndroid Build Coastguard Worker} 138*d5c09012SAndroid Build Coastguard Worker 139*d5c09012SAndroid Build Coastguard Worker// Specifies a non-contiguous set of rows. 140*d5c09012SAndroid Build Coastguard Workermessage RowSet { 141*d5c09012SAndroid Build Coastguard Worker // Single rows included in the set. 142*d5c09012SAndroid Build Coastguard Worker repeated bytes row_keys = 1; 143*d5c09012SAndroid Build Coastguard Worker 144*d5c09012SAndroid Build Coastguard Worker // Contiguous row ranges included in the set. 145*d5c09012SAndroid Build Coastguard Worker repeated RowRange row_ranges = 2; 146*d5c09012SAndroid Build Coastguard Worker} 147*d5c09012SAndroid Build Coastguard Worker 148*d5c09012SAndroid Build Coastguard Worker// Specifies a contiguous range of columns within a single column family. 149*d5c09012SAndroid Build Coastguard Worker// The range spans from <column_family>:<start_qualifier> to 150*d5c09012SAndroid Build Coastguard Worker// <column_family>:<end_qualifier>, where both bounds can be either 151*d5c09012SAndroid Build Coastguard Worker// inclusive or exclusive. 152*d5c09012SAndroid Build Coastguard Workermessage ColumnRange { 153*d5c09012SAndroid Build Coastguard Worker // The name of the column family within which this range falls. 154*d5c09012SAndroid Build Coastguard Worker string family_name = 1; 155*d5c09012SAndroid Build Coastguard Worker 156*d5c09012SAndroid Build Coastguard Worker // The column qualifier at which to start the range (within `column_family`). 157*d5c09012SAndroid Build Coastguard Worker // If neither field is set, interpreted as the empty string, inclusive. 158*d5c09012SAndroid Build Coastguard Worker oneof start_qualifier { 159*d5c09012SAndroid Build Coastguard Worker // Used when giving an inclusive lower bound for the range. 160*d5c09012SAndroid Build Coastguard Worker bytes start_qualifier_closed = 2; 161*d5c09012SAndroid Build Coastguard Worker 162*d5c09012SAndroid Build Coastguard Worker // Used when giving an exclusive lower bound for the range. 163*d5c09012SAndroid Build Coastguard Worker bytes start_qualifier_open = 3; 164*d5c09012SAndroid Build Coastguard Worker } 165*d5c09012SAndroid Build Coastguard Worker 166*d5c09012SAndroid Build Coastguard Worker // The column qualifier at which to end the range (within `column_family`). 167*d5c09012SAndroid Build Coastguard Worker // If neither field is set, interpreted as the infinite string, exclusive. 168*d5c09012SAndroid Build Coastguard Worker oneof end_qualifier { 169*d5c09012SAndroid Build Coastguard Worker // Used when giving an inclusive upper bound for the range. 170*d5c09012SAndroid Build Coastguard Worker bytes end_qualifier_closed = 4; 171*d5c09012SAndroid Build Coastguard Worker 172*d5c09012SAndroid Build Coastguard Worker // Used when giving an exclusive upper bound for the range. 173*d5c09012SAndroid Build Coastguard Worker bytes end_qualifier_open = 5; 174*d5c09012SAndroid Build Coastguard Worker } 175*d5c09012SAndroid Build Coastguard Worker} 176*d5c09012SAndroid Build Coastguard Worker 177*d5c09012SAndroid Build Coastguard Worker// Specified a contiguous range of microsecond timestamps. 178*d5c09012SAndroid Build Coastguard Workermessage TimestampRange { 179*d5c09012SAndroid Build Coastguard Worker // Inclusive lower bound. If left empty, interpreted as 0. 180*d5c09012SAndroid Build Coastguard Worker int64 start_timestamp_micros = 1; 181*d5c09012SAndroid Build Coastguard Worker 182*d5c09012SAndroid Build Coastguard Worker // Exclusive upper bound. If left empty, interpreted as infinity. 183*d5c09012SAndroid Build Coastguard Worker int64 end_timestamp_micros = 2; 184*d5c09012SAndroid Build Coastguard Worker} 185*d5c09012SAndroid Build Coastguard Worker 186*d5c09012SAndroid Build Coastguard Worker// Specifies a contiguous range of raw byte values. 187*d5c09012SAndroid Build Coastguard Workermessage ValueRange { 188*d5c09012SAndroid Build Coastguard Worker // The value at which to start the range. 189*d5c09012SAndroid Build Coastguard Worker // If neither field is set, interpreted as the empty string, inclusive. 190*d5c09012SAndroid Build Coastguard Worker oneof start_value { 191*d5c09012SAndroid Build Coastguard Worker // Used when giving an inclusive lower bound for the range. 192*d5c09012SAndroid Build Coastguard Worker bytes start_value_closed = 1; 193*d5c09012SAndroid Build Coastguard Worker 194*d5c09012SAndroid Build Coastguard Worker // Used when giving an exclusive lower bound for the range. 195*d5c09012SAndroid Build Coastguard Worker bytes start_value_open = 2; 196*d5c09012SAndroid Build Coastguard Worker } 197*d5c09012SAndroid Build Coastguard Worker 198*d5c09012SAndroid Build Coastguard Worker // The value at which to end the range. 199*d5c09012SAndroid Build Coastguard Worker // If neither field is set, interpreted as the infinite string, exclusive. 200*d5c09012SAndroid Build Coastguard Worker oneof end_value { 201*d5c09012SAndroid Build Coastguard Worker // Used when giving an inclusive upper bound for the range. 202*d5c09012SAndroid Build Coastguard Worker bytes end_value_closed = 3; 203*d5c09012SAndroid Build Coastguard Worker 204*d5c09012SAndroid Build Coastguard Worker // Used when giving an exclusive upper bound for the range. 205*d5c09012SAndroid Build Coastguard Worker bytes end_value_open = 4; 206*d5c09012SAndroid Build Coastguard Worker } 207*d5c09012SAndroid Build Coastguard Worker} 208*d5c09012SAndroid Build Coastguard Worker 209*d5c09012SAndroid Build Coastguard Worker// Takes a row as input and produces an alternate view of the row based on 210*d5c09012SAndroid Build Coastguard Worker// specified rules. For example, a RowFilter might trim down a row to include 211*d5c09012SAndroid Build Coastguard Worker// just the cells from columns matching a given regular expression, or might 212*d5c09012SAndroid Build Coastguard Worker// return all the cells of a row but not their values. More complicated filters 213*d5c09012SAndroid Build Coastguard Worker// can be composed out of these components to express requests such as, "within 214*d5c09012SAndroid Build Coastguard Worker// every column of a particular family, give just the two most recent cells 215*d5c09012SAndroid Build Coastguard Worker// which are older than timestamp X." 216*d5c09012SAndroid Build Coastguard Worker// 217*d5c09012SAndroid Build Coastguard Worker// There are two broad categories of RowFilters (true filters and transformers), 218*d5c09012SAndroid Build Coastguard Worker// as well as two ways to compose simple filters into more complex ones 219*d5c09012SAndroid Build Coastguard Worker// (chains and interleaves). They work as follows: 220*d5c09012SAndroid Build Coastguard Worker// 221*d5c09012SAndroid Build Coastguard Worker// * True filters alter the input row by excluding some of its cells wholesale 222*d5c09012SAndroid Build Coastguard Worker// from the output row. An example of a true filter is the `value_regex_filter`, 223*d5c09012SAndroid Build Coastguard Worker// which excludes cells whose values don't match the specified pattern. All 224*d5c09012SAndroid Build Coastguard Worker// regex true filters use RE2 syntax (https://github.com/google/re2/wiki/Syntax) 225*d5c09012SAndroid Build Coastguard Worker// in raw byte mode (RE2::Latin1), and are evaluated as full matches. An 226*d5c09012SAndroid Build Coastguard Worker// important point to keep in mind is that `RE2(.)` is equivalent by default to 227*d5c09012SAndroid Build Coastguard Worker// `RE2([^\n])`, meaning that it does not match newlines. When attempting to 228*d5c09012SAndroid Build Coastguard Worker// match an arbitrary byte, you should therefore use the escape sequence `\C`, 229*d5c09012SAndroid Build Coastguard Worker// which may need to be further escaped as `\\C` in your client language. 230*d5c09012SAndroid Build Coastguard Worker// 231*d5c09012SAndroid Build Coastguard Worker// * Transformers alter the input row by changing the values of some of its 232*d5c09012SAndroid Build Coastguard Worker// cells in the output, without excluding them completely. Currently, the only 233*d5c09012SAndroid Build Coastguard Worker// supported transformer is the `strip_value_transformer`, which replaces every 234*d5c09012SAndroid Build Coastguard Worker// cell's value with the empty string. 235*d5c09012SAndroid Build Coastguard Worker// 236*d5c09012SAndroid Build Coastguard Worker// * Chains and interleaves are described in more detail in the 237*d5c09012SAndroid Build Coastguard Worker// RowFilter.Chain and RowFilter.Interleave documentation. 238*d5c09012SAndroid Build Coastguard Worker// 239*d5c09012SAndroid Build Coastguard Worker// The total serialized size of a RowFilter message must not 240*d5c09012SAndroid Build Coastguard Worker// exceed 20480 bytes, and RowFilters may not be nested within each other 241*d5c09012SAndroid Build Coastguard Worker// (in Chains or Interleaves) to a depth of more than 20. 242*d5c09012SAndroid Build Coastguard Workermessage RowFilter { 243*d5c09012SAndroid Build Coastguard Worker // A RowFilter which sends rows through several RowFilters in sequence. 244*d5c09012SAndroid Build Coastguard Worker message Chain { 245*d5c09012SAndroid Build Coastguard Worker // The elements of "filters" are chained together to process the input row: 246*d5c09012SAndroid Build Coastguard Worker // in row -> f(0) -> intermediate row -> f(1) -> ... -> f(N) -> out row 247*d5c09012SAndroid Build Coastguard Worker // The full chain is executed atomically. 248*d5c09012SAndroid Build Coastguard Worker repeated RowFilter filters = 1; 249*d5c09012SAndroid Build Coastguard Worker } 250*d5c09012SAndroid Build Coastguard Worker 251*d5c09012SAndroid Build Coastguard Worker // A RowFilter which sends each row to each of several component 252*d5c09012SAndroid Build Coastguard Worker // RowFilters and interleaves the results. 253*d5c09012SAndroid Build Coastguard Worker message Interleave { 254*d5c09012SAndroid Build Coastguard Worker // The elements of "filters" all process a copy of the input row, and the 255*d5c09012SAndroid Build Coastguard Worker // results are pooled, sorted, and combined into a single output row. 256*d5c09012SAndroid Build Coastguard Worker // If multiple cells are produced with the same column and timestamp, 257*d5c09012SAndroid Build Coastguard Worker // they will all appear in the output row in an unspecified mutual order. 258*d5c09012SAndroid Build Coastguard Worker // Consider the following example, with three filters: 259*d5c09012SAndroid Build Coastguard Worker // 260*d5c09012SAndroid Build Coastguard Worker // input row 261*d5c09012SAndroid Build Coastguard Worker // | 262*d5c09012SAndroid Build Coastguard Worker // ----------------------------------------------------- 263*d5c09012SAndroid Build Coastguard Worker // | | | 264*d5c09012SAndroid Build Coastguard Worker // f(0) f(1) f(2) 265*d5c09012SAndroid Build Coastguard Worker // | | | 266*d5c09012SAndroid Build Coastguard Worker // 1: foo,bar,10,x foo,bar,10,z far,bar,7,a 267*d5c09012SAndroid Build Coastguard Worker // 2: foo,blah,11,z far,blah,5,x far,blah,5,x 268*d5c09012SAndroid Build Coastguard Worker // | | | 269*d5c09012SAndroid Build Coastguard Worker // ----------------------------------------------------- 270*d5c09012SAndroid Build Coastguard Worker // | 271*d5c09012SAndroid Build Coastguard Worker // 1: foo,bar,10,z // could have switched with #2 272*d5c09012SAndroid Build Coastguard Worker // 2: foo,bar,10,x // could have switched with #1 273*d5c09012SAndroid Build Coastguard Worker // 3: foo,blah,11,z 274*d5c09012SAndroid Build Coastguard Worker // 4: far,bar,7,a 275*d5c09012SAndroid Build Coastguard Worker // 5: far,blah,5,x // identical to #6 276*d5c09012SAndroid Build Coastguard Worker // 6: far,blah,5,x // identical to #5 277*d5c09012SAndroid Build Coastguard Worker // 278*d5c09012SAndroid Build Coastguard Worker // All interleaved filters are executed atomically. 279*d5c09012SAndroid Build Coastguard Worker repeated RowFilter filters = 1; 280*d5c09012SAndroid Build Coastguard Worker } 281*d5c09012SAndroid Build Coastguard Worker 282*d5c09012SAndroid Build Coastguard Worker // A RowFilter which evaluates one of two possible RowFilters, depending on 283*d5c09012SAndroid Build Coastguard Worker // whether or not a predicate RowFilter outputs any cells from the input row. 284*d5c09012SAndroid Build Coastguard Worker // 285*d5c09012SAndroid Build Coastguard Worker // IMPORTANT NOTE: The predicate filter does not execute atomically with the 286*d5c09012SAndroid Build Coastguard Worker // true and false filters, which may lead to inconsistent or unexpected 287*d5c09012SAndroid Build Coastguard Worker // results. Additionally, Condition filters have poor performance, especially 288*d5c09012SAndroid Build Coastguard Worker // when filters are set for the false condition. 289*d5c09012SAndroid Build Coastguard Worker message Condition { 290*d5c09012SAndroid Build Coastguard Worker // If `predicate_filter` outputs any cells, then `true_filter` will be 291*d5c09012SAndroid Build Coastguard Worker // evaluated on the input row. Otherwise, `false_filter` will be evaluated. 292*d5c09012SAndroid Build Coastguard Worker RowFilter predicate_filter = 1; 293*d5c09012SAndroid Build Coastguard Worker 294*d5c09012SAndroid Build Coastguard Worker // The filter to apply to the input row if `predicate_filter` returns any 295*d5c09012SAndroid Build Coastguard Worker // results. If not provided, no results will be returned in the true case. 296*d5c09012SAndroid Build Coastguard Worker RowFilter true_filter = 2; 297*d5c09012SAndroid Build Coastguard Worker 298*d5c09012SAndroid Build Coastguard Worker // The filter to apply to the input row if `predicate_filter` does not 299*d5c09012SAndroid Build Coastguard Worker // return any results. If not provided, no results will be returned in the 300*d5c09012SAndroid Build Coastguard Worker // false case. 301*d5c09012SAndroid Build Coastguard Worker RowFilter false_filter = 3; 302*d5c09012SAndroid Build Coastguard Worker } 303*d5c09012SAndroid Build Coastguard Worker 304*d5c09012SAndroid Build Coastguard Worker // Which of the possible RowFilter types to apply. If none are set, this 305*d5c09012SAndroid Build Coastguard Worker // RowFilter returns all cells in the input row. 306*d5c09012SAndroid Build Coastguard Worker oneof filter { 307*d5c09012SAndroid Build Coastguard Worker // Applies several RowFilters to the data in sequence, progressively 308*d5c09012SAndroid Build Coastguard Worker // narrowing the results. 309*d5c09012SAndroid Build Coastguard Worker Chain chain = 1; 310*d5c09012SAndroid Build Coastguard Worker 311*d5c09012SAndroid Build Coastguard Worker // Applies several RowFilters to the data in parallel and combines the 312*d5c09012SAndroid Build Coastguard Worker // results. 313*d5c09012SAndroid Build Coastguard Worker Interleave interleave = 2; 314*d5c09012SAndroid Build Coastguard Worker 315*d5c09012SAndroid Build Coastguard Worker // Applies one of two possible RowFilters to the data based on the output of 316*d5c09012SAndroid Build Coastguard Worker // a predicate RowFilter. 317*d5c09012SAndroid Build Coastguard Worker Condition condition = 3; 318*d5c09012SAndroid Build Coastguard Worker 319*d5c09012SAndroid Build Coastguard Worker // ADVANCED USE ONLY. 320*d5c09012SAndroid Build Coastguard Worker // Hook for introspection into the RowFilter. Outputs all cells directly to 321*d5c09012SAndroid Build Coastguard Worker // the output of the read rather than to any parent filter. Consider the 322*d5c09012SAndroid Build Coastguard Worker // following example: 323*d5c09012SAndroid Build Coastguard Worker // 324*d5c09012SAndroid Build Coastguard Worker // Chain( 325*d5c09012SAndroid Build Coastguard Worker // FamilyRegex("A"), 326*d5c09012SAndroid Build Coastguard Worker // Interleave( 327*d5c09012SAndroid Build Coastguard Worker // All(), 328*d5c09012SAndroid Build Coastguard Worker // Chain(Label("foo"), Sink()) 329*d5c09012SAndroid Build Coastguard Worker // ), 330*d5c09012SAndroid Build Coastguard Worker // QualifierRegex("B") 331*d5c09012SAndroid Build Coastguard Worker // ) 332*d5c09012SAndroid Build Coastguard Worker // 333*d5c09012SAndroid Build Coastguard Worker // A,A,1,w 334*d5c09012SAndroid Build Coastguard Worker // A,B,2,x 335*d5c09012SAndroid Build Coastguard Worker // B,B,4,z 336*d5c09012SAndroid Build Coastguard Worker // | 337*d5c09012SAndroid Build Coastguard Worker // FamilyRegex("A") 338*d5c09012SAndroid Build Coastguard Worker // | 339*d5c09012SAndroid Build Coastguard Worker // A,A,1,w 340*d5c09012SAndroid Build Coastguard Worker // A,B,2,x 341*d5c09012SAndroid Build Coastguard Worker // | 342*d5c09012SAndroid Build Coastguard Worker // +------------+-------------+ 343*d5c09012SAndroid Build Coastguard Worker // | | 344*d5c09012SAndroid Build Coastguard Worker // All() Label(foo) 345*d5c09012SAndroid Build Coastguard Worker // | | 346*d5c09012SAndroid Build Coastguard Worker // A,A,1,w A,A,1,w,labels:[foo] 347*d5c09012SAndroid Build Coastguard Worker // A,B,2,x A,B,2,x,labels:[foo] 348*d5c09012SAndroid Build Coastguard Worker // | | 349*d5c09012SAndroid Build Coastguard Worker // | Sink() --------------+ 350*d5c09012SAndroid Build Coastguard Worker // | | | 351*d5c09012SAndroid Build Coastguard Worker // +------------+ x------+ A,A,1,w,labels:[foo] 352*d5c09012SAndroid Build Coastguard Worker // | A,B,2,x,labels:[foo] 353*d5c09012SAndroid Build Coastguard Worker // A,A,1,w | 354*d5c09012SAndroid Build Coastguard Worker // A,B,2,x | 355*d5c09012SAndroid Build Coastguard Worker // | | 356*d5c09012SAndroid Build Coastguard Worker // QualifierRegex("B") | 357*d5c09012SAndroid Build Coastguard Worker // | | 358*d5c09012SAndroid Build Coastguard Worker // A,B,2,x | 359*d5c09012SAndroid Build Coastguard Worker // | | 360*d5c09012SAndroid Build Coastguard Worker // +--------------------------------+ 361*d5c09012SAndroid Build Coastguard Worker // | 362*d5c09012SAndroid Build Coastguard Worker // A,A,1,w,labels:[foo] 363*d5c09012SAndroid Build Coastguard Worker // A,B,2,x,labels:[foo] // could be switched 364*d5c09012SAndroid Build Coastguard Worker // A,B,2,x // could be switched 365*d5c09012SAndroid Build Coastguard Worker // 366*d5c09012SAndroid Build Coastguard Worker // Despite being excluded by the qualifier filter, a copy of every cell 367*d5c09012SAndroid Build Coastguard Worker // that reaches the sink is present in the final result. 368*d5c09012SAndroid Build Coastguard Worker // 369*d5c09012SAndroid Build Coastguard Worker // As with an [Interleave][google.bigtable.v2.RowFilter.Interleave], 370*d5c09012SAndroid Build Coastguard Worker // duplicate cells are possible, and appear in an unspecified mutual order. 371*d5c09012SAndroid Build Coastguard Worker // In this case we have a duplicate with column "A:B" and timestamp 2, 372*d5c09012SAndroid Build Coastguard Worker // because one copy passed through the all filter while the other was 373*d5c09012SAndroid Build Coastguard Worker // passed through the label and sink. Note that one copy has label "foo", 374*d5c09012SAndroid Build Coastguard Worker // while the other does not. 375*d5c09012SAndroid Build Coastguard Worker // 376*d5c09012SAndroid Build Coastguard Worker // Cannot be used within the `predicate_filter`, `true_filter`, or 377*d5c09012SAndroid Build Coastguard Worker // `false_filter` of a [Condition][google.bigtable.v2.RowFilter.Condition]. 378*d5c09012SAndroid Build Coastguard Worker bool sink = 16; 379*d5c09012SAndroid Build Coastguard Worker 380*d5c09012SAndroid Build Coastguard Worker // Matches all cells, regardless of input. Functionally equivalent to 381*d5c09012SAndroid Build Coastguard Worker // leaving `filter` unset, but included for completeness. 382*d5c09012SAndroid Build Coastguard Worker bool pass_all_filter = 17; 383*d5c09012SAndroid Build Coastguard Worker 384*d5c09012SAndroid Build Coastguard Worker // Does not match any cells, regardless of input. Useful for temporarily 385*d5c09012SAndroid Build Coastguard Worker // disabling just part of a filter. 386*d5c09012SAndroid Build Coastguard Worker bool block_all_filter = 18; 387*d5c09012SAndroid Build Coastguard Worker 388*d5c09012SAndroid Build Coastguard Worker // Matches only cells from rows whose keys satisfy the given RE2 regex. In 389*d5c09012SAndroid Build Coastguard Worker // other words, passes through the entire row when the key matches, and 390*d5c09012SAndroid Build Coastguard Worker // otherwise produces an empty row. 391*d5c09012SAndroid Build Coastguard Worker // Note that, since row keys can contain arbitrary bytes, the `\C` escape 392*d5c09012SAndroid Build Coastguard Worker // sequence must be used if a true wildcard is desired. The `.` character 393*d5c09012SAndroid Build Coastguard Worker // will not match the new line character `\n`, which may be present in a 394*d5c09012SAndroid Build Coastguard Worker // binary key. 395*d5c09012SAndroid Build Coastguard Worker bytes row_key_regex_filter = 4; 396*d5c09012SAndroid Build Coastguard Worker 397*d5c09012SAndroid Build Coastguard Worker // Matches all cells from a row with probability p, and matches no cells 398*d5c09012SAndroid Build Coastguard Worker // from the row with probability 1-p. 399*d5c09012SAndroid Build Coastguard Worker double row_sample_filter = 14; 400*d5c09012SAndroid Build Coastguard Worker 401*d5c09012SAndroid Build Coastguard Worker // Matches only cells from columns whose families satisfy the given RE2 402*d5c09012SAndroid Build Coastguard Worker // regex. For technical reasons, the regex must not contain the `:` 403*d5c09012SAndroid Build Coastguard Worker // character, even if it is not being used as a literal. 404*d5c09012SAndroid Build Coastguard Worker // Note that, since column families cannot contain the new line character 405*d5c09012SAndroid Build Coastguard Worker // `\n`, it is sufficient to use `.` as a full wildcard when matching 406*d5c09012SAndroid Build Coastguard Worker // column family names. 407*d5c09012SAndroid Build Coastguard Worker string family_name_regex_filter = 5; 408*d5c09012SAndroid Build Coastguard Worker 409*d5c09012SAndroid Build Coastguard Worker // Matches only cells from columns whose qualifiers satisfy the given RE2 410*d5c09012SAndroid Build Coastguard Worker // regex. 411*d5c09012SAndroid Build Coastguard Worker // Note that, since column qualifiers can contain arbitrary bytes, the `\C` 412*d5c09012SAndroid Build Coastguard Worker // escape sequence must be used if a true wildcard is desired. The `.` 413*d5c09012SAndroid Build Coastguard Worker // character will not match the new line character `\n`, which may be 414*d5c09012SAndroid Build Coastguard Worker // present in a binary qualifier. 415*d5c09012SAndroid Build Coastguard Worker bytes column_qualifier_regex_filter = 6; 416*d5c09012SAndroid Build Coastguard Worker 417*d5c09012SAndroid Build Coastguard Worker // Matches only cells from columns within the given range. 418*d5c09012SAndroid Build Coastguard Worker ColumnRange column_range_filter = 7; 419*d5c09012SAndroid Build Coastguard Worker 420*d5c09012SAndroid Build Coastguard Worker // Matches only cells with timestamps within the given range. 421*d5c09012SAndroid Build Coastguard Worker TimestampRange timestamp_range_filter = 8; 422*d5c09012SAndroid Build Coastguard Worker 423*d5c09012SAndroid Build Coastguard Worker // Matches only cells with values that satisfy the given regular expression. 424*d5c09012SAndroid Build Coastguard Worker // Note that, since cell values can contain arbitrary bytes, the `\C` escape 425*d5c09012SAndroid Build Coastguard Worker // sequence must be used if a true wildcard is desired. The `.` character 426*d5c09012SAndroid Build Coastguard Worker // will not match the new line character `\n`, which may be present in a 427*d5c09012SAndroid Build Coastguard Worker // binary value. 428*d5c09012SAndroid Build Coastguard Worker bytes value_regex_filter = 9; 429*d5c09012SAndroid Build Coastguard Worker 430*d5c09012SAndroid Build Coastguard Worker // Matches only cells with values that fall within the given range. 431*d5c09012SAndroid Build Coastguard Worker ValueRange value_range_filter = 15; 432*d5c09012SAndroid Build Coastguard Worker 433*d5c09012SAndroid Build Coastguard Worker // Skips the first N cells of each row, matching all subsequent cells. 434*d5c09012SAndroid Build Coastguard Worker // If duplicate cells are present, as is possible when using an Interleave, 435*d5c09012SAndroid Build Coastguard Worker // each copy of the cell is counted separately. 436*d5c09012SAndroid Build Coastguard Worker int32 cells_per_row_offset_filter = 10; 437*d5c09012SAndroid Build Coastguard Worker 438*d5c09012SAndroid Build Coastguard Worker // Matches only the first N cells of each row. 439*d5c09012SAndroid Build Coastguard Worker // If duplicate cells are present, as is possible when using an Interleave, 440*d5c09012SAndroid Build Coastguard Worker // each copy of the cell is counted separately. 441*d5c09012SAndroid Build Coastguard Worker int32 cells_per_row_limit_filter = 11; 442*d5c09012SAndroid Build Coastguard Worker 443*d5c09012SAndroid Build Coastguard Worker // Matches only the most recent N cells within each column. For example, 444*d5c09012SAndroid Build Coastguard Worker // if N=2, this filter would match column `foo:bar` at timestamps 10 and 9, 445*d5c09012SAndroid Build Coastguard Worker // skip all earlier cells in `foo:bar`, and then begin matching again in 446*d5c09012SAndroid Build Coastguard Worker // column `foo:bar2`. 447*d5c09012SAndroid Build Coastguard Worker // If duplicate cells are present, as is possible when using an Interleave, 448*d5c09012SAndroid Build Coastguard Worker // each copy of the cell is counted separately. 449*d5c09012SAndroid Build Coastguard Worker int32 cells_per_column_limit_filter = 12; 450*d5c09012SAndroid Build Coastguard Worker 451*d5c09012SAndroid Build Coastguard Worker // Replaces each cell's value with the empty string. 452*d5c09012SAndroid Build Coastguard Worker bool strip_value_transformer = 13; 453*d5c09012SAndroid Build Coastguard Worker 454*d5c09012SAndroid Build Coastguard Worker // Applies the given label to all cells in the output row. This allows 455*d5c09012SAndroid Build Coastguard Worker // the client to determine which results were produced from which part of 456*d5c09012SAndroid Build Coastguard Worker // the filter. 457*d5c09012SAndroid Build Coastguard Worker // 458*d5c09012SAndroid Build Coastguard Worker // Values must be at most 15 characters in length, and match the RE2 459*d5c09012SAndroid Build Coastguard Worker // pattern `[a-z0-9\\-]+` 460*d5c09012SAndroid Build Coastguard Worker // 461*d5c09012SAndroid Build Coastguard Worker // Due to a technical limitation, it is not currently possible to apply 462*d5c09012SAndroid Build Coastguard Worker // multiple labels to a cell. As a result, a Chain may have no more than 463*d5c09012SAndroid Build Coastguard Worker // one sub-filter which contains a `apply_label_transformer`. It is okay for 464*d5c09012SAndroid Build Coastguard Worker // an Interleave to contain multiple `apply_label_transformers`, as they 465*d5c09012SAndroid Build Coastguard Worker // will be applied to separate copies of the input. This may be relaxed in 466*d5c09012SAndroid Build Coastguard Worker // the future. 467*d5c09012SAndroid Build Coastguard Worker string apply_label_transformer = 19; 468*d5c09012SAndroid Build Coastguard Worker } 469*d5c09012SAndroid Build Coastguard Worker} 470*d5c09012SAndroid Build Coastguard Worker 471*d5c09012SAndroid Build Coastguard Worker// Specifies a particular change to be made to the contents of a row. 472*d5c09012SAndroid Build Coastguard Workermessage Mutation { 473*d5c09012SAndroid Build Coastguard Worker // A Mutation which sets the value of the specified cell. 474*d5c09012SAndroid Build Coastguard Worker message SetCell { 475*d5c09012SAndroid Build Coastguard Worker // The name of the family into which new data should be written. 476*d5c09012SAndroid Build Coastguard Worker // Must match `[-_.a-zA-Z0-9]+` 477*d5c09012SAndroid Build Coastguard Worker string family_name = 1; 478*d5c09012SAndroid Build Coastguard Worker 479*d5c09012SAndroid Build Coastguard Worker // The qualifier of the column into which new data should be written. 480*d5c09012SAndroid Build Coastguard Worker // Can be any byte string, including the empty string. 481*d5c09012SAndroid Build Coastguard Worker bytes column_qualifier = 2; 482*d5c09012SAndroid Build Coastguard Worker 483*d5c09012SAndroid Build Coastguard Worker // The timestamp of the cell into which new data should be written. 484*d5c09012SAndroid Build Coastguard Worker // Use -1 for current Bigtable server time. 485*d5c09012SAndroid Build Coastguard Worker // Otherwise, the client should set this value itself, noting that the 486*d5c09012SAndroid Build Coastguard Worker // default value is a timestamp of zero if the field is left unspecified. 487*d5c09012SAndroid Build Coastguard Worker // Values must match the granularity of the table (e.g. micros, millis). 488*d5c09012SAndroid Build Coastguard Worker int64 timestamp_micros = 3; 489*d5c09012SAndroid Build Coastguard Worker 490*d5c09012SAndroid Build Coastguard Worker // The value to be written into the specified cell. 491*d5c09012SAndroid Build Coastguard Worker bytes value = 4; 492*d5c09012SAndroid Build Coastguard Worker } 493*d5c09012SAndroid Build Coastguard Worker 494*d5c09012SAndroid Build Coastguard Worker // A Mutation which incrementally updates a cell in an `Aggregate` family. 495*d5c09012SAndroid Build Coastguard Worker message AddToCell { 496*d5c09012SAndroid Build Coastguard Worker // The name of the `Aggregate` family into which new data should be added. 497*d5c09012SAndroid Build Coastguard Worker // This must be a family with a `value_type` of `Aggregate`. 498*d5c09012SAndroid Build Coastguard Worker // Format: `[-_.a-zA-Z0-9]+` 499*d5c09012SAndroid Build Coastguard Worker string family_name = 1; 500*d5c09012SAndroid Build Coastguard Worker 501*d5c09012SAndroid Build Coastguard Worker // The qualifier of the column into which new data should be added. This 502*d5c09012SAndroid Build Coastguard Worker // must be a `raw_value`. 503*d5c09012SAndroid Build Coastguard Worker Value column_qualifier = 2; 504*d5c09012SAndroid Build Coastguard Worker 505*d5c09012SAndroid Build Coastguard Worker // The timestamp of the cell to which new data should be added. This must 506*d5c09012SAndroid Build Coastguard Worker // be a `raw_timestamp_micros` that matches the table's `granularity`. 507*d5c09012SAndroid Build Coastguard Worker Value timestamp = 3; 508*d5c09012SAndroid Build Coastguard Worker 509*d5c09012SAndroid Build Coastguard Worker // The input value to be accumulated into the specified cell. This must be 510*d5c09012SAndroid Build Coastguard Worker // compatible with the family's `value_type.input_type`. 511*d5c09012SAndroid Build Coastguard Worker Value input = 4; 512*d5c09012SAndroid Build Coastguard Worker } 513*d5c09012SAndroid Build Coastguard Worker 514*d5c09012SAndroid Build Coastguard Worker // A Mutation which deletes cells from the specified column, optionally 515*d5c09012SAndroid Build Coastguard Worker // restricting the deletions to a given timestamp range. 516*d5c09012SAndroid Build Coastguard Worker message DeleteFromColumn { 517*d5c09012SAndroid Build Coastguard Worker // The name of the family from which cells should be deleted. 518*d5c09012SAndroid Build Coastguard Worker // Must match `[-_.a-zA-Z0-9]+` 519*d5c09012SAndroid Build Coastguard Worker string family_name = 1; 520*d5c09012SAndroid Build Coastguard Worker 521*d5c09012SAndroid Build Coastguard Worker // The qualifier of the column from which cells should be deleted. 522*d5c09012SAndroid Build Coastguard Worker // Can be any byte string, including the empty string. 523*d5c09012SAndroid Build Coastguard Worker bytes column_qualifier = 2; 524*d5c09012SAndroid Build Coastguard Worker 525*d5c09012SAndroid Build Coastguard Worker // The range of timestamps within which cells should be deleted. 526*d5c09012SAndroid Build Coastguard Worker TimestampRange time_range = 3; 527*d5c09012SAndroid Build Coastguard Worker } 528*d5c09012SAndroid Build Coastguard Worker 529*d5c09012SAndroid Build Coastguard Worker // A Mutation which deletes all cells from the specified column family. 530*d5c09012SAndroid Build Coastguard Worker message DeleteFromFamily { 531*d5c09012SAndroid Build Coastguard Worker // The name of the family from which cells should be deleted. 532*d5c09012SAndroid Build Coastguard Worker // Must match `[-_.a-zA-Z0-9]+` 533*d5c09012SAndroid Build Coastguard Worker string family_name = 1; 534*d5c09012SAndroid Build Coastguard Worker } 535*d5c09012SAndroid Build Coastguard Worker 536*d5c09012SAndroid Build Coastguard Worker // A Mutation which deletes all cells from the containing row. 537*d5c09012SAndroid Build Coastguard Worker message DeleteFromRow {} 538*d5c09012SAndroid Build Coastguard Worker 539*d5c09012SAndroid Build Coastguard Worker // Which of the possible Mutation types to apply. 540*d5c09012SAndroid Build Coastguard Worker oneof mutation { 541*d5c09012SAndroid Build Coastguard Worker // Set a cell's value. 542*d5c09012SAndroid Build Coastguard Worker SetCell set_cell = 1; 543*d5c09012SAndroid Build Coastguard Worker 544*d5c09012SAndroid Build Coastguard Worker // Incrementally updates an `Aggregate` cell. 545*d5c09012SAndroid Build Coastguard Worker AddToCell add_to_cell = 5; 546*d5c09012SAndroid Build Coastguard Worker 547*d5c09012SAndroid Build Coastguard Worker // Deletes cells from a column. 548*d5c09012SAndroid Build Coastguard Worker DeleteFromColumn delete_from_column = 2; 549*d5c09012SAndroid Build Coastguard Worker 550*d5c09012SAndroid Build Coastguard Worker // Deletes cells from a column family. 551*d5c09012SAndroid Build Coastguard Worker DeleteFromFamily delete_from_family = 3; 552*d5c09012SAndroid Build Coastguard Worker 553*d5c09012SAndroid Build Coastguard Worker // Deletes cells from the entire row. 554*d5c09012SAndroid Build Coastguard Worker DeleteFromRow delete_from_row = 4; 555*d5c09012SAndroid Build Coastguard Worker } 556*d5c09012SAndroid Build Coastguard Worker} 557*d5c09012SAndroid Build Coastguard Worker 558*d5c09012SAndroid Build Coastguard Worker// Specifies an atomic read/modify/write operation on the latest value of the 559*d5c09012SAndroid Build Coastguard Worker// specified column. 560*d5c09012SAndroid Build Coastguard Workermessage ReadModifyWriteRule { 561*d5c09012SAndroid Build Coastguard Worker // The name of the family to which the read/modify/write should be applied. 562*d5c09012SAndroid Build Coastguard Worker // Must match `[-_.a-zA-Z0-9]+` 563*d5c09012SAndroid Build Coastguard Worker string family_name = 1; 564*d5c09012SAndroid Build Coastguard Worker 565*d5c09012SAndroid Build Coastguard Worker // The qualifier of the column to which the read/modify/write should be 566*d5c09012SAndroid Build Coastguard Worker // applied. 567*d5c09012SAndroid Build Coastguard Worker // Can be any byte string, including the empty string. 568*d5c09012SAndroid Build Coastguard Worker bytes column_qualifier = 2; 569*d5c09012SAndroid Build Coastguard Worker 570*d5c09012SAndroid Build Coastguard Worker // The rule used to determine the column's new latest value from its current 571*d5c09012SAndroid Build Coastguard Worker // latest value. 572*d5c09012SAndroid Build Coastguard Worker oneof rule { 573*d5c09012SAndroid Build Coastguard Worker // Rule specifying that `append_value` be appended to the existing value. 574*d5c09012SAndroid Build Coastguard Worker // If the targeted cell is unset, it will be treated as containing the 575*d5c09012SAndroid Build Coastguard Worker // empty string. 576*d5c09012SAndroid Build Coastguard Worker bytes append_value = 3; 577*d5c09012SAndroid Build Coastguard Worker 578*d5c09012SAndroid Build Coastguard Worker // Rule specifying that `increment_amount` be added to the existing value. 579*d5c09012SAndroid Build Coastguard Worker // If the targeted cell is unset, it will be treated as containing a zero. 580*d5c09012SAndroid Build Coastguard Worker // Otherwise, the targeted cell must contain an 8-byte value (interpreted 581*d5c09012SAndroid Build Coastguard Worker // as a 64-bit big-endian signed integer), or the entire request will fail. 582*d5c09012SAndroid Build Coastguard Worker int64 increment_amount = 4; 583*d5c09012SAndroid Build Coastguard Worker } 584*d5c09012SAndroid Build Coastguard Worker} 585*d5c09012SAndroid Build Coastguard Worker 586*d5c09012SAndroid Build Coastguard Worker// NOTE: This API is intended to be used by Apache Beam BigtableIO. 587*d5c09012SAndroid Build Coastguard Worker// A partition of a change stream. 588*d5c09012SAndroid Build Coastguard Workermessage StreamPartition { 589*d5c09012SAndroid Build Coastguard Worker // The row range covered by this partition and is specified by 590*d5c09012SAndroid Build Coastguard Worker // [`start_key_closed`, `end_key_open`). 591*d5c09012SAndroid Build Coastguard Worker RowRange row_range = 1; 592*d5c09012SAndroid Build Coastguard Worker} 593*d5c09012SAndroid Build Coastguard Worker 594*d5c09012SAndroid Build Coastguard Worker// NOTE: This API is intended to be used by Apache Beam BigtableIO. 595*d5c09012SAndroid Build Coastguard Worker// The information required to continue reading the data from multiple 596*d5c09012SAndroid Build Coastguard Worker// `StreamPartitions` from where a previous read left off. 597*d5c09012SAndroid Build Coastguard Workermessage StreamContinuationTokens { 598*d5c09012SAndroid Build Coastguard Worker // List of continuation tokens. 599*d5c09012SAndroid Build Coastguard Worker repeated StreamContinuationToken tokens = 1; 600*d5c09012SAndroid Build Coastguard Worker} 601*d5c09012SAndroid Build Coastguard Worker 602*d5c09012SAndroid Build Coastguard Worker// NOTE: This API is intended to be used by Apache Beam BigtableIO. 603*d5c09012SAndroid Build Coastguard Worker// The information required to continue reading the data from a 604*d5c09012SAndroid Build Coastguard Worker// `StreamPartition` from where a previous read left off. 605*d5c09012SAndroid Build Coastguard Workermessage StreamContinuationToken { 606*d5c09012SAndroid Build Coastguard Worker // The partition that this token applies to. 607*d5c09012SAndroid Build Coastguard Worker StreamPartition partition = 1; 608*d5c09012SAndroid Build Coastguard Worker 609*d5c09012SAndroid Build Coastguard Worker // An encoded position in the stream to restart reading from. 610*d5c09012SAndroid Build Coastguard Worker string token = 2; 611*d5c09012SAndroid Build Coastguard Worker} 612