aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/googleapis/google/bigtable/v1/bigtable_service_messages.proto
blob: 6d75af78e15c8b0db7eb435800cc5eed597de29b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
// Copyright 2016 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package google.bigtable.v1;

import "google/bigtable/v1/bigtable_data.proto";
import "google/rpc/status.proto";

option go_package = "google.golang.org/genproto/googleapis/bigtable/v1;bigtable";
option java_multiple_files = true;
option java_outer_classname = "BigtableServiceMessagesProto";
option java_package = "com.google.bigtable.v1";


// Request message for BigtableServer.ReadRows.
message ReadRowsRequest {
  // The unique name of the table from which to read.
  string table_name = 1;

  // If neither row_key nor row_range is set, reads from all rows.
  oneof target {
    // The key of a single row from which to read.
    bytes row_key = 2;

    // A range of rows from which to read.
    RowRange row_range = 3;

    // A set of rows from which to read. Entries need not be in order, and will
    // be deduplicated before reading.
    // The total serialized size of the set must not exceed 1MB.
    RowSet row_set = 8;
  }

  // The filter to apply to the contents of the specified row(s). If unset,
  // reads the entire table.
  RowFilter filter = 5;

  // By default, rows are read sequentially, producing results which are
  // guaranteed to arrive in increasing row order. Setting
  // "allow_row_interleaving" to true allows multiple rows to be interleaved in
  // the response stream, which increases throughput but breaks this guarantee,
  // and may force the client to use more memory to buffer partially-received
  // rows. Cannot be set to true when specifying "num_rows_limit".
  bool allow_row_interleaving = 6;

  // The read will terminate after committing to N rows' worth of results. The
  // default (zero) is to return all results.
  // Note that "allow_row_interleaving" cannot be set to true when this is set.
  int64 num_rows_limit = 7;
}

// Response message for BigtableService.ReadRows.
message ReadRowsResponse {
  // Specifies a piece of a row's contents returned as part of the read
  // response stream.
  message Chunk {
    oneof chunk {
      // A subset of the data from a particular row. As long as no "reset_row"
      // is received in between, multiple "row_contents" from the same row are
      // from the same atomic view of that row, and will be received in the
      // expected family/column/timestamp order.
      Family row_contents = 1;

      // Indicates that the client should drop all previous chunks for
      // "row_key", as it will be re-read from the beginning.
      bool reset_row = 2;

      // Indicates that the client can safely process all previous chunks for
      // "row_key", as its data has been fully read.
      bool commit_row = 3;
    }
  }

  // The key of the row for which we're receiving data.
  // Results will be received in increasing row key order, unless
  // "allow_row_interleaving" was specified in the request.
  bytes row_key = 1;

  // One or more chunks of the row specified by "row_key".
  repeated Chunk chunks = 2;
}

// Request message for BigtableService.SampleRowKeys.
message SampleRowKeysRequest {
  // The unique name of the table from which to sample row keys.
  string table_name = 1;
}

// Response message for BigtableService.SampleRowKeys.
message SampleRowKeysResponse {
  // Sorted streamed sequence of sample row keys in the table. The table might
  // have contents before the first row key in the list and after the last one,
  // but a key containing the empty string indicates "end of table" and will be
  // the last response given, if present.
  // Note that row keys in this list may not have ever been written to or read
  // from, and users should therefore not make any assumptions about the row key
  // structure that are specific to their use case.
  bytes row_key = 1;

  // Approximate total storage space used by all rows in the table which precede
  // "row_key". Buffering the contents of all rows between two subsequent
  // samples would require space roughly equal to the difference in their
  // "offset_bytes" fields.
  int64 offset_bytes = 2;
}

// Request message for BigtableService.MutateRow.
message MutateRowRequest {
  // The unique name of the table to which the mutation should be applied.
  string table_name = 1;

  // The key of the row to which the mutation should be applied.
  bytes row_key = 2;

  // Changes to be atomically applied to the specified row. Entries are applied
  // in order, meaning that earlier mutations can be masked by later ones.
  // Must contain at least one entry and at most 100000.
  repeated Mutation mutations = 3;
}

// Request message for BigtableService.MutateRows.
message MutateRowsRequest {
  message Entry {
    // The key of the row to which the `mutations` should be applied.
    bytes row_key = 1;

    // Changes to be atomically applied to the specified row. Mutations are
    // applied in order, meaning that earlier mutations can be masked by
    // later ones.
    // At least one mutation must be specified.
    repeated Mutation mutations = 2;
  }

  // The unique name of the table to which the mutations should be applied.
  string table_name = 1;

  // The row keys/mutations to be applied in bulk.
  // Each entry is applied as an atomic mutation, but the entries may be
  // applied in arbitrary order (even between entries for the same row).
  // At least one entry must be specified, and in total the entries may
  // contain at most 100000 mutations.
  repeated Entry entries = 2;
}

// Response message for BigtableService.MutateRows.
message MutateRowsResponse {
  // The results for each Entry from the request, presented in the order
  // in which the entries were originally given.
  // Depending on how requests are batched during execution, it is possible
  // for one Entry to fail due to an error with another Entry. In the event
  // that this occurs, the same error will be reported for both entries.
  repeated google.rpc.Status statuses = 1;
}

// Request message for BigtableService.CheckAndMutateRowRequest
message CheckAndMutateRowRequest {
  // The unique name of the table to which the conditional mutation should be
  // applied.
  string table_name = 1;

  // The key of the row to which the conditional mutation should be applied.
  bytes row_key = 2;

  // The filter to be applied to the contents of the specified row. Depending
  // on whether or not any results are yielded, either "true_mutations" or
  // "false_mutations" will be executed. If unset, checks that the row contains
  // any values at all.
  RowFilter predicate_filter = 6;

  // Changes to be atomically applied to the specified row if "predicate_filter"
  // yields at least one cell when applied to "row_key". Entries are applied in
  // order, meaning that earlier mutations can be masked by later ones.
  // Must contain at least one entry if "false_mutations" is empty, and at most
  // 100000.
  repeated Mutation true_mutations = 4;

  // Changes to be atomically applied to the specified row if "predicate_filter"
  // does not yield any cells when applied to "row_key". Entries are applied in
  // order, meaning that earlier mutations can be masked by later ones.
  // Must contain at least one entry if "true_mutations" is empty, and at most
  // 100000.
  repeated Mutation false_mutations = 5;
}

// Response message for BigtableService.CheckAndMutateRowRequest.
message CheckAndMutateRowResponse {
  // Whether or not the request's "predicate_filter" yielded any results for
  // the specified row.
  bool predicate_matched = 1;
}

// Request message for BigtableService.ReadModifyWriteRowRequest.
message ReadModifyWriteRowRequest {
  // The unique name of the table to which the read/modify/write rules should be
  // applied.
  string table_name = 1;

  // The key of the row to which the read/modify/write rules should be applied.
  bytes row_key = 2;

  // Rules specifying how the specified row's contents are to be transformed
  // into writes. Entries are applied in order, meaning that earlier rules will
  // affect the results of later ones.
  repeated ReadModifyWriteRule rules = 3;
}