Built motion from commit 6a09e18b.|2.6.11
[motion2.git] / legacy-libs / google-proto-files / google / bigtable / admin / v2 / bigtable_table_admin.proto
1 // Copyright 2018 Google LLC.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //     http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 //
15
16 syntax = "proto3";
17
18 package google.bigtable.admin.v2;
19
20 import "google/api/annotations.proto";
21 import "google/bigtable/admin/v2/table.proto";
22 import "google/longrunning/operations.proto";
23 import "google/protobuf/duration.proto";
24 import "google/protobuf/empty.proto";
25 import "google/protobuf/timestamp.proto";
26
27 option csharp_namespace = "Google.Cloud.Bigtable.Admin.V2";
28 option go_package = "google.golang.org/genproto/googleapis/bigtable/admin/v2;admin";
29 option java_multiple_files = true;
30 option java_outer_classname = "BigtableTableAdminProto";
31 option java_package = "com.google.bigtable.admin.v2";
32 option php_namespace = "Google\\Cloud\\Bigtable\\Admin\\V2";
33
34 // Service for creating, configuring, and deleting Cloud Bigtable tables.
35 //
36 //
37 // Provides access to the table schemas only, not the data stored within
38 // the tables.
39 service BigtableTableAdmin {
40   // Creates a new table in the specified instance.
41   // The table can be created with a full set of initial column families,
42   // specified in the request.
43   rpc CreateTable(CreateTableRequest) returns (Table) {
44     option (google.api.http) = {
45       post: "/v2/{parent=projects/*/instances/*}/tables"
46       body: "*"
47     };
48   }
49
50   // Creates a new table from the specified snapshot. The target table must
51   // not exist. The snapshot and the table must be in the same instance.
52   //
53   // Note: This is a private alpha release of Cloud Bigtable snapshots. This
54   // feature is not currently available to most Cloud Bigtable customers. This
55   // feature might be changed in backward-incompatible ways and is not
56   // recommended for production use. It is not subject to any SLA or deprecation
57   // policy.
58   rpc CreateTableFromSnapshot(CreateTableFromSnapshotRequest)
59       returns (google.longrunning.Operation) {
60     option (google.api.http) = {
61       post: "/v2/{parent=projects/*/instances/*}/tables:createFromSnapshot"
62       body: "*"
63     };
64   }
65
66   // Lists all tables served from a specified instance.
67   rpc ListTables(ListTablesRequest) returns (ListTablesResponse) {
68     option (google.api.http) = {
69       get: "/v2/{parent=projects/*/instances/*}/tables"
70     };
71   }
72
73   // Gets metadata information about the specified table.
74   rpc GetTable(GetTableRequest) returns (Table) {
75     option (google.api.http) = {
76       get: "/v2/{name=projects/*/instances/*/tables/*}"
77     };
78   }
79
80   // Permanently deletes a specified table and all of its data.
81   rpc DeleteTable(DeleteTableRequest) returns (google.protobuf.Empty) {
82     option (google.api.http) = {
83       delete: "/v2/{name=projects/*/instances/*/tables/*}"
84     };
85   }
86
87   // Performs a series of column family modifications on the specified table.
88   // Either all or none of the modifications will occur before this method
89   // returns, but data requests received prior to that point may see a table
90   // where only some modifications have taken effect.
91   rpc ModifyColumnFamilies(ModifyColumnFamiliesRequest) returns (Table) {
92     option (google.api.http) = {
93       post: "/v2/{name=projects/*/instances/*/tables/*}:modifyColumnFamilies"
94       body: "*"
95     };
96   }
97
98   // Permanently drop/delete a row range from a specified table. The request can
99   // specify whether to delete all rows in a table, or only those that match a
100   // particular prefix.
101   rpc DropRowRange(DropRowRangeRequest) returns (google.protobuf.Empty) {
102     option (google.api.http) = {
103       post: "/v2/{name=projects/*/instances/*/tables/*}:dropRowRange"
104       body: "*"
105     };
106   }
107
108   // Generates a consistency token for a Table, which can be used in
109   // CheckConsistency to check whether mutations to the table that finished
110   // before this call started have been replicated. The tokens will be available
111   // for 90 days.
112   rpc GenerateConsistencyToken(GenerateConsistencyTokenRequest)
113       returns (GenerateConsistencyTokenResponse) {
114     option (google.api.http) = {
115       post: "/v2/{name=projects/*/instances/*/tables/*}:generateConsistencyToken"
116       body: "*"
117     };
118   }
119
120   // Checks replication consistency based on a consistency token, that is, if
121   // replication has caught up based on the conditions specified in the token
122   // and the check request.
123   rpc CheckConsistency(CheckConsistencyRequest)
124       returns (CheckConsistencyResponse) {
125     option (google.api.http) = {
126       post: "/v2/{name=projects/*/instances/*/tables/*}:checkConsistency"
127       body: "*"
128     };
129   }
130
131   // Creates a new snapshot in the specified cluster from the specified
132   // source table. The cluster and the table must be in the same instance.
133   //
134   // Note: This is a private alpha release of Cloud Bigtable snapshots. This
135   // feature is not currently available to most Cloud Bigtable customers. This
136   // feature might be changed in backward-incompatible ways and is not
137   // recommended for production use. It is not subject to any SLA or deprecation
138   // policy.
139   rpc SnapshotTable(SnapshotTableRequest)
140       returns (google.longrunning.Operation) {
141     option (google.api.http) = {
142       post: "/v2/{name=projects/*/instances/*/tables/*}:snapshot"
143       body: "*"
144     };
145   }
146
147   // Gets metadata information about the specified snapshot.
148   //
149   // Note: This is a private alpha release of Cloud Bigtable snapshots. This
150   // feature is not currently available to most Cloud Bigtable customers. This
151   // feature might be changed in backward-incompatible ways and is not
152   // recommended for production use. It is not subject to any SLA or deprecation
153   // policy.
154   rpc GetSnapshot(GetSnapshotRequest) returns (Snapshot) {
155     option (google.api.http) = {
156       get: "/v2/{name=projects/*/instances/*/clusters/*/snapshots/*}"
157     };
158   }
159
160   // Lists all snapshots associated with the specified cluster.
161   //
162   // Note: This is a private alpha release of Cloud Bigtable snapshots. This
163   // feature is not currently available to most Cloud Bigtable customers. This
164   // feature might be changed in backward-incompatible ways and is not
165   // recommended for production use. It is not subject to any SLA or deprecation
166   // policy.
167   rpc ListSnapshots(ListSnapshotsRequest) returns (ListSnapshotsResponse) {
168     option (google.api.http) = {
169       get: "/v2/{parent=projects/*/instances/*/clusters/*}/snapshots"
170     };
171   }
172
173   // Permanently deletes the specified snapshot.
174   //
175   // Note: This is a private alpha release of Cloud Bigtable snapshots. This
176   // feature is not currently available to most Cloud Bigtable customers. This
177   // feature might be changed in backward-incompatible ways and is not
178   // recommended for production use. It is not subject to any SLA or deprecation
179   // policy.
180   rpc DeleteSnapshot(DeleteSnapshotRequest) returns (google.protobuf.Empty) {
181     option (google.api.http) = {
182       delete: "/v2/{name=projects/*/instances/*/clusters/*/snapshots/*}"
183     };
184   }
185 }
186
187 // Request message for
188 // [google.bigtable.admin.v2.BigtableTableAdmin.CreateTable][google.bigtable.admin.v2.BigtableTableAdmin.CreateTable]
189 message CreateTableRequest {
190   // An initial split point for a newly created table.
191   message Split {
192     // Row key to use as an initial tablet boundary.
193     bytes key = 1;
194   }
195
196   // The unique name of the instance in which to create the table.
197   // Values are of the form `projects/<project>/instances/<instance>`.
198   string parent = 1;
199
200   // The name by which the new table should be referred to within the parent
201   // instance, e.g., `foobar` rather than `<parent>/tables/foobar`.
202   string table_id = 2;
203
204   // The Table to create.
205   Table table = 3;
206
207   // The optional list of row keys that will be used to initially split the
208   // table into several tablets (tablets are similar to HBase regions).
209   // Given two split keys, `s1` and `s2`, three tablets will be created,
210   // spanning the key ranges: `[, s1), [s1, s2), [s2, )`.
211   //
212   // Example:
213   //
214   // * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",`
215   //                `"other", "zz"]`
216   // * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]`
217   // * Key assignment:
218   //     - Tablet 1 `[, apple)                => {"a"}.`
219   //     - Tablet 2 `[apple, customer_1)      => {"apple", "custom"}.`
220   //     - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.`
221   //     - Tablet 4 `[customer_2, other)      => {"customer_2"}.`
222   //     - Tablet 5 `[other, )                => {"other", "zz"}.`
223   repeated Split initial_splits = 4;
224 }
225
226 // Request message for
227 // [google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot][google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot]
228 //
229 // Note: This is a private alpha release of Cloud Bigtable snapshots. This
230 // feature is not currently available to most Cloud Bigtable customers. This
231 // feature might be changed in backward-incompatible ways and is not recommended
232 // for production use. It is not subject to any SLA or deprecation policy.
233 message CreateTableFromSnapshotRequest {
234   // The unique name of the instance in which to create the table.
235   // Values are of the form `projects/<project>/instances/<instance>`.
236   string parent = 1;
237
238   // The name by which the new table should be referred to within the parent
239   // instance, e.g., `foobar` rather than `<parent>/tables/foobar`.
240   string table_id = 2;
241
242   // The unique name of the snapshot from which to restore the table. The
243   // snapshot and the table must be in the same instance.
244   // Values are of the form
245   // `projects/<project>/instances/<instance>/clusters/<cluster>/snapshots/<snapshot>`.
246   string source_snapshot = 3;
247 }
248
249 // Request message for
250 // [google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange][google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange]
251 message DropRowRangeRequest {
252   // The unique name of the table on which to drop a range of rows.
253   // Values are of the form
254   // `projects/<project>/instances/<instance>/tables/<table>`.
255   string name = 1;
256
257   // Delete all rows or by prefix.
258   oneof target {
259     // Delete all rows that start with this row key prefix. Prefix cannot be
260     // zero length.
261     bytes row_key_prefix = 2;
262
263     // Delete all rows in the table. Setting this to false is a no-op.
264     bool delete_all_data_from_table = 3;
265   }
266 }
267
268 // Request message for
269 // [google.bigtable.admin.v2.BigtableTableAdmin.ListTables][google.bigtable.admin.v2.BigtableTableAdmin.ListTables]
270 message ListTablesRequest {
271   // The unique name of the instance for which tables should be listed.
272   // Values are of the form `projects/<project>/instances/<instance>`.
273   string parent = 1;
274
275   // The view to be applied to the returned tables' fields.
276   // Defaults to `NAME_ONLY` if unspecified; no others are currently supported.
277   Table.View view = 2;
278
279   // Maximum number of results per page.
280   // CURRENTLY UNIMPLEMENTED AND IGNORED.
281   int32 page_size = 4;
282
283   // The value of `next_page_token` returned by a previous call.
284   string page_token = 3;
285 }
286
287 // Response message for
288 // [google.bigtable.admin.v2.BigtableTableAdmin.ListTables][google.bigtable.admin.v2.BigtableTableAdmin.ListTables]
289 message ListTablesResponse {
290   // The tables present in the requested instance.
291   repeated Table tables = 1;
292
293   // Set if not all tables could be returned in a single response.
294   // Pass this value to `page_token` in another request to get the next
295   // page of results.
296   string next_page_token = 2;
297 }
298
299 // Request message for
300 // [google.bigtable.admin.v2.BigtableTableAdmin.GetTable][google.bigtable.admin.v2.BigtableTableAdmin.GetTable]
301 message GetTableRequest {
302   // The unique name of the requested table.
303   // Values are of the form
304   // `projects/<project>/instances/<instance>/tables/<table>`.
305   string name = 1;
306
307   // The view to be applied to the returned table's fields.
308   // Defaults to `SCHEMA_VIEW` if unspecified.
309   Table.View view = 2;
310 }
311
312 // Request message for
313 // [google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable]
314 message DeleteTableRequest {
315   // The unique name of the table to be deleted.
316   // Values are of the form
317   // `projects/<project>/instances/<instance>/tables/<table>`.
318   string name = 1;
319 }
320
321 // Request message for
322 // [google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies][google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies]
323 message ModifyColumnFamiliesRequest {
324   // A create, update, or delete of a particular column family.
325   message Modification {
326     // The ID of the column family to be modified.
327     string id = 1;
328
329     // Column familiy modifications.
330     oneof mod {
331       // Create a new column family with the specified schema, or fail if
332       // one already exists with the given ID.
333       ColumnFamily create = 2;
334
335       // Update an existing column family to the specified schema, or fail
336       // if no column family exists with the given ID.
337       ColumnFamily update = 3;
338
339       // Drop (delete) the column family with the given ID, or fail if no such
340       // family exists.
341       bool drop = 4;
342     }
343   }
344
345   // The unique name of the table whose families should be modified.
346   // Values are of the form
347   // `projects/<project>/instances/<instance>/tables/<table>`.
348   string name = 1;
349
350   // Modifications to be atomically applied to the specified table's families.
351   // Entries are applied in order, meaning that earlier modifications can be
352   // masked by later ones (in the case of repeated updates to the same family,
353   // for example).
354   repeated Modification modifications = 2;
355 }
356
357 // Request message for
358 // [google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken][google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken]
359 message GenerateConsistencyTokenRequest {
360   // The unique name of the Table for which to create a consistency token.
361   // Values are of the form
362   // `projects/<project>/instances/<instance>/tables/<table>`.
363   string name = 1;
364 }
365
366 // Response message for
367 // [google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken][google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken]
368 message GenerateConsistencyTokenResponse {
369   // The generated consistency token.
370   string consistency_token = 1;
371 }
372
373 // Request message for
374 // [google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency][google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency]
375 message CheckConsistencyRequest {
376   // The unique name of the Table for which to check replication consistency.
377   // Values are of the form
378   // `projects/<project>/instances/<instance>/tables/<table>`.
379   string name = 1;
380
381   // The token created using GenerateConsistencyToken for the Table.
382   string consistency_token = 2;
383 }
384
385 // Response message for
386 // [google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency][google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency]
387 message CheckConsistencyResponse {
388   // True only if the token is consistent. A token is consistent if replication
389   // has caught up with the restrictions specified in the request.
390   bool consistent = 1;
391 }
392
393 // Request message for
394 // [google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable][google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable]
395 //
396 // Note: This is a private alpha release of Cloud Bigtable snapshots. This
397 // feature is not currently available to most Cloud Bigtable customers. This
398 // feature might be changed in backward-incompatible ways and is not recommended
399 // for production use. It is not subject to any SLA or deprecation policy.
400 message SnapshotTableRequest {
401   // The unique name of the table to have the snapshot taken.
402   // Values are of the form
403   // `projects/<project>/instances/<instance>/tables/<table>`.
404   string name = 1;
405
406   // The name of the cluster where the snapshot will be created in.
407   // Values are of the form
408   // `projects/<project>/instances/<instance>/clusters/<cluster>`.
409   string cluster = 2;
410
411   // The ID by which the new snapshot should be referred to within the parent
412   // cluster, e.g., `mysnapshot` of the form: `[_a-zA-Z0-9][-_.a-zA-Z0-9]*`
413   // rather than
414   // `projects/<project>/instances/<instance>/clusters/<cluster>/snapshots/mysnapshot`.
415   string snapshot_id = 3;
416
417   // The amount of time that the new snapshot can stay active after it is
418   // created. Once 'ttl' expires, the snapshot will get deleted. The maximum
419   // amount of time a snapshot can stay active is 7 days. If 'ttl' is not
420   // specified, the default value of 24 hours will be used.
421   google.protobuf.Duration ttl = 4;
422
423   // Description of the snapshot.
424   string description = 5;
425 }
426
427 // Request message for
428 // [google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot][google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot]
429 //
430 // Note: This is a private alpha release of Cloud Bigtable snapshots. This
431 // feature is not currently available to most Cloud Bigtable customers. This
432 // feature might be changed in backward-incompatible ways and is not recommended
433 // for production use. It is not subject to any SLA or deprecation policy.
434 message GetSnapshotRequest {
435   // The unique name of the requested snapshot.
436   // Values are of the form
437   // `projects/<project>/instances/<instance>/clusters/<cluster>/snapshots/<snapshot>`.
438   string name = 1;
439 }
440
441 // Request message for
442 // [google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots][google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots]
443 //
444 // Note: This is a private alpha release of Cloud Bigtable snapshots. This
445 // feature is not currently available to most Cloud Bigtable customers. This
446 // feature might be changed in backward-incompatible ways and is not recommended
447 // for production use. It is not subject to any SLA or deprecation policy.
448 message ListSnapshotsRequest {
449   // The unique name of the cluster for which snapshots should be listed.
450   // Values are of the form
451   // `projects/<project>/instances/<instance>/clusters/<cluster>`.
452   // Use `<cluster> = '-'` to list snapshots for all clusters in an instance,
453   // e.g., `projects/<project>/instances/<instance>/clusters/-`.
454   string parent = 1;
455
456   // The maximum number of snapshots to return per page.
457   // CURRENTLY UNIMPLEMENTED AND IGNORED.
458   int32 page_size = 2;
459
460   // The value of `next_page_token` returned by a previous call.
461   string page_token = 3;
462 }
463
464 // Response message for
465 // [google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots][google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots]
466 //
467 // Note: This is a private alpha release of Cloud Bigtable snapshots. This
468 // feature is not currently available to most Cloud Bigtable customers. This
469 // feature might be changed in backward-incompatible ways and is not recommended
470 // for production use. It is not subject to any SLA or deprecation policy.
471 message ListSnapshotsResponse {
472   // The snapshots present in the requested cluster.
473   repeated Snapshot snapshots = 1;
474
475   // Set if not all snapshots could be returned in a single response.
476   // Pass this value to `page_token` in another request to get the next
477   // page of results.
478   string next_page_token = 2;
479 }
480
481 // Request message for
482 // [google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot][google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot]
483 //
484 // Note: This is a private alpha release of Cloud Bigtable snapshots. This
485 // feature is not currently available to most Cloud Bigtable customers. This
486 // feature might be changed in backward-incompatible ways and is not recommended
487 // for production use. It is not subject to any SLA or deprecation policy.
488 message DeleteSnapshotRequest {
489   // The unique name of the snapshot to be deleted.
490   // Values are of the form
491   // `projects/<project>/instances/<instance>/clusters/<cluster>/snapshots/<snapshot>`.
492   string name = 1;
493 }
494
495 // The metadata for the Operation returned by SnapshotTable.
496 //
497 // Note: This is a private alpha release of Cloud Bigtable snapshots. This
498 // feature is not currently available to most Cloud Bigtable customers. This
499 // feature might be changed in backward-incompatible ways and is not recommended
500 // for production use. It is not subject to any SLA or deprecation policy.
501 message SnapshotTableMetadata {
502   // The request that prompted the initiation of this SnapshotTable operation.
503   SnapshotTableRequest original_request = 1;
504
505   // The time at which the original request was received.
506   google.protobuf.Timestamp request_time = 2;
507
508   // The time at which the operation failed or was completed successfully.
509   google.protobuf.Timestamp finish_time = 3;
510 }
511
512 // The metadata for the Operation returned by CreateTableFromSnapshot.
513 //
514 // Note: This is a private alpha release of Cloud Bigtable snapshots. This
515 // feature is not currently available to most Cloud Bigtable customers. This
516 // feature might be changed in backward-incompatible ways and is not recommended
517 // for production use. It is not subject to any SLA or deprecation policy.
518 message CreateTableFromSnapshotMetadata {
519   // The request that prompted the initiation of this CreateTableFromSnapshot
520   // operation.
521   CreateTableFromSnapshotRequest original_request = 1;
522
523   // The time at which the original request was received.
524   google.protobuf.Timestamp request_time = 2;
525
526   // The time at which the operation failed or was completed successfully.
527   google.protobuf.Timestamp finish_time = 3;
528 }