xref: /aosp_15_r20/external/googleapis/google/bigtable/admin/v2/bigtable_table_admin.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2023 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
15syntax = "proto3";
16
17package google.bigtable.admin.v2;
18
19import "google/api/annotations.proto";
20import "google/api/client.proto";
21import "google/api/field_behavior.proto";
22import "google/api/resource.proto";
23import "google/bigtable/admin/v2/common.proto";
24import "google/bigtable/admin/v2/table.proto";
25import "google/iam/v1/iam_policy.proto";
26import "google/iam/v1/policy.proto";
27import "google/longrunning/operations.proto";
28import "google/protobuf/duration.proto";
29import "google/protobuf/empty.proto";
30import "google/protobuf/field_mask.proto";
31import "google/protobuf/timestamp.proto";
32
33option csharp_namespace = "Google.Cloud.Bigtable.Admin.V2";
34option go_package = "google.golang.org/genproto/googleapis/bigtable/admin/v2;admin";
35option java_multiple_files = true;
36option java_outer_classname = "BigtableTableAdminProto";
37option java_package = "com.google.bigtable.admin.v2";
38option php_namespace = "Google\\Cloud\\Bigtable\\Admin\\V2";
39option ruby_package = "Google::Cloud::Bigtable::Admin::V2";
40
41// Service for creating, configuring, and deleting Cloud Bigtable tables.
42//
43//
44// Provides access to the table schemas only, not the data stored within
45// the tables.
46service BigtableTableAdmin {
47  option (google.api.default_host) = "bigtableadmin.googleapis.com";
48  option (google.api.oauth_scopes) =
49      "https://www.googleapis.com/auth/bigtable.admin,"
50      "https://www.googleapis.com/auth/bigtable.admin.table,"
51      "https://www.googleapis.com/auth/cloud-bigtable.admin,"
52      "https://www.googleapis.com/auth/cloud-bigtable.admin.table,"
53      "https://www.googleapis.com/auth/cloud-platform,"
54      "https://www.googleapis.com/auth/cloud-platform.read-only";
55
56  // Creates a new table in the specified instance.
57  // The table can be created with a full set of initial column families,
58  // specified in the request.
59  rpc CreateTable(CreateTableRequest) returns (Table) {
60    option (google.api.http) = {
61      post: "/v2/{parent=projects/*/instances/*}/tables"
62      body: "*"
63    };
64    option (google.api.method_signature) = "parent,table_id,table";
65  }
66
67  // Creates a new table from the specified snapshot. The target table must
68  // not exist. The snapshot and the table must be in the same instance.
69  //
70  // Note: This is a private alpha release of Cloud Bigtable snapshots. This
71  // feature is not currently available to most Cloud Bigtable customers. This
72  // feature might be changed in backward-incompatible ways and is not
73  // recommended for production use. It is not subject to any SLA or deprecation
74  // policy.
75  rpc CreateTableFromSnapshot(CreateTableFromSnapshotRequest)
76      returns (google.longrunning.Operation) {
77    option (google.api.http) = {
78      post: "/v2/{parent=projects/*/instances/*}/tables:createFromSnapshot"
79      body: "*"
80    };
81    option (google.api.method_signature) = "parent,table_id,source_snapshot";
82    option (google.longrunning.operation_info) = {
83      response_type: "Table"
84      metadata_type: "CreateTableFromSnapshotMetadata"
85    };
86  }
87
88  // Lists all tables served from a specified instance.
89  rpc ListTables(ListTablesRequest) returns (ListTablesResponse) {
90    option (google.api.http) = {
91      get: "/v2/{parent=projects/*/instances/*}/tables"
92    };
93    option (google.api.method_signature) = "parent";
94  }
95
96  // Gets metadata information about the specified table.
97  rpc GetTable(GetTableRequest) returns (Table) {
98    option (google.api.http) = {
99      get: "/v2/{name=projects/*/instances/*/tables/*}"
100    };
101    option (google.api.method_signature) = "name";
102  }
103
104  // Updates a specified table.
105  rpc UpdateTable(UpdateTableRequest) returns (google.longrunning.Operation) {
106    option (google.api.http) = {
107      patch: "/v2/{table.name=projects/*/instances/*/tables/*}"
108      body: "table"
109    };
110    option (google.api.method_signature) = "table,update_mask";
111    option (google.longrunning.operation_info) = {
112      response_type: "Table"
113      metadata_type: "UpdateTableMetadata"
114    };
115  }
116
117  // Permanently deletes a specified table and all of its data.
118  rpc DeleteTable(DeleteTableRequest) returns (google.protobuf.Empty) {
119    option (google.api.http) = {
120      delete: "/v2/{name=projects/*/instances/*/tables/*}"
121    };
122    option (google.api.method_signature) = "name";
123  }
124
125  // Restores a specified table which was accidentally deleted.
126  rpc UndeleteTable(UndeleteTableRequest)
127      returns (google.longrunning.Operation) {
128    option (google.api.http) = {
129      post: "/v2/{name=projects/*/instances/*/tables/*}:undelete"
130      body: "*"
131    };
132    option (google.api.method_signature) = "name";
133    option (google.longrunning.operation_info) = {
134      response_type: "Table"
135      metadata_type: "UndeleteTableMetadata"
136    };
137  }
138
139  // Creates a new AuthorizedView in a table.
140  rpc CreateAuthorizedView(CreateAuthorizedViewRequest)
141      returns (google.longrunning.Operation) {
142    option (google.api.http) = {
143      post: "/v2/{parent=projects/*/instances/*/tables/*}/authorizedViews"
144      body: "authorized_view"
145    };
146    option (google.api.method_signature) =
147        "parent,authorized_view,authorized_view_id";
148    option (google.longrunning.operation_info) = {
149      response_type: "AuthorizedView"
150      metadata_type: "CreateAuthorizedViewMetadata"
151    };
152  }
153
154  // Lists all AuthorizedViews from a specific table.
155  rpc ListAuthorizedViews(ListAuthorizedViewsRequest)
156      returns (ListAuthorizedViewsResponse) {
157    option (google.api.http) = {
158      get: "/v2/{parent=projects/*/instances/*/tables/*}/authorizedViews"
159    };
160    option (google.api.method_signature) = "parent";
161  }
162
163  // Gets information from a specified AuthorizedView.
164  rpc GetAuthorizedView(GetAuthorizedViewRequest) returns (AuthorizedView) {
165    option (google.api.http) = {
166      get: "/v2/{name=projects/*/instances/*/tables/*/authorizedViews/*}"
167    };
168    option (google.api.method_signature) = "name";
169  }
170
171  // Updates an AuthorizedView in a table.
172  rpc UpdateAuthorizedView(UpdateAuthorizedViewRequest)
173      returns (google.longrunning.Operation) {
174    option (google.api.http) = {
175      patch: "/v2/{authorized_view.name=projects/*/instances/*/tables/*/authorizedViews/*}"
176      body: "authorized_view"
177    };
178    option (google.api.method_signature) = "authorized_view,update_mask";
179    option (google.longrunning.operation_info) = {
180      response_type: "AuthorizedView"
181      metadata_type: "UpdateAuthorizedViewMetadata"
182    };
183  }
184
185  // Permanently deletes a specified AuthorizedView.
186  rpc DeleteAuthorizedView(DeleteAuthorizedViewRequest)
187      returns (google.protobuf.Empty) {
188    option (google.api.http) = {
189      delete: "/v2/{name=projects/*/instances/*/tables/*/authorizedViews/*}"
190    };
191    option (google.api.method_signature) = "name";
192  }
193
194  // Performs a series of column family modifications on the specified table.
195  // Either all or none of the modifications will occur before this method
196  // returns, but data requests received prior to that point may see a table
197  // where only some modifications have taken effect.
198  rpc ModifyColumnFamilies(ModifyColumnFamiliesRequest) returns (Table) {
199    option (google.api.http) = {
200      post: "/v2/{name=projects/*/instances/*/tables/*}:modifyColumnFamilies"
201      body: "*"
202    };
203    option (google.api.method_signature) = "name,modifications";
204  }
205
206  // Permanently drop/delete a row range from a specified table. The request can
207  // specify whether to delete all rows in a table, or only those that match a
208  // particular prefix.
209  rpc DropRowRange(DropRowRangeRequest) returns (google.protobuf.Empty) {
210    option (google.api.http) = {
211      post: "/v2/{name=projects/*/instances/*/tables/*}:dropRowRange"
212      body: "*"
213    };
214  }
215
216  // Generates a consistency token for a Table, which can be used in
217  // CheckConsistency to check whether mutations to the table that finished
218  // before this call started have been replicated. The tokens will be available
219  // for 90 days.
220  rpc GenerateConsistencyToken(GenerateConsistencyTokenRequest)
221      returns (GenerateConsistencyTokenResponse) {
222    option (google.api.http) = {
223      post: "/v2/{name=projects/*/instances/*/tables/*}:generateConsistencyToken"
224      body: "*"
225    };
226    option (google.api.method_signature) = "name";
227  }
228
229  // Checks replication consistency based on a consistency token, that is, if
230  // replication has caught up based on the conditions specified in the token
231  // and the check request.
232  rpc CheckConsistency(CheckConsistencyRequest)
233      returns (CheckConsistencyResponse) {
234    option (google.api.http) = {
235      post: "/v2/{name=projects/*/instances/*/tables/*}:checkConsistency"
236      body: "*"
237    };
238    option (google.api.method_signature) = "name,consistency_token";
239  }
240
241  // Creates a new snapshot in the specified cluster from the specified
242  // source table. The cluster and the table must be in the same instance.
243  //
244  // Note: This is a private alpha release of Cloud Bigtable snapshots. This
245  // feature is not currently available to most Cloud Bigtable customers. This
246  // feature might be changed in backward-incompatible ways and is not
247  // recommended for production use. It is not subject to any SLA or deprecation
248  // policy.
249  rpc SnapshotTable(SnapshotTableRequest)
250      returns (google.longrunning.Operation) {
251    option (google.api.http) = {
252      post: "/v2/{name=projects/*/instances/*/tables/*}:snapshot"
253      body: "*"
254    };
255    option (google.api.method_signature) =
256        "name,cluster,snapshot_id,description";
257    option (google.longrunning.operation_info) = {
258      response_type: "Snapshot"
259      metadata_type: "SnapshotTableMetadata"
260    };
261  }
262
263  // Gets metadata information about the specified snapshot.
264  //
265  // Note: This is a private alpha release of Cloud Bigtable snapshots. This
266  // feature is not currently available to most Cloud Bigtable customers. This
267  // feature might be changed in backward-incompatible ways and is not
268  // recommended for production use. It is not subject to any SLA or deprecation
269  // policy.
270  rpc GetSnapshot(GetSnapshotRequest) returns (Snapshot) {
271    option (google.api.http) = {
272      get: "/v2/{name=projects/*/instances/*/clusters/*/snapshots/*}"
273    };
274    option (google.api.method_signature) = "name";
275  }
276
277  // Lists all snapshots associated with the specified cluster.
278  //
279  // Note: This is a private alpha release of Cloud Bigtable snapshots. This
280  // feature is not currently available to most Cloud Bigtable customers. This
281  // feature might be changed in backward-incompatible ways and is not
282  // recommended for production use. It is not subject to any SLA or deprecation
283  // policy.
284  rpc ListSnapshots(ListSnapshotsRequest) returns (ListSnapshotsResponse) {
285    option (google.api.http) = {
286      get: "/v2/{parent=projects/*/instances/*/clusters/*}/snapshots"
287    };
288    option (google.api.method_signature) = "parent";
289  }
290
291  // Permanently deletes the specified snapshot.
292  //
293  // Note: This is a private alpha release of Cloud Bigtable snapshots. This
294  // feature is not currently available to most Cloud Bigtable customers. This
295  // feature might be changed in backward-incompatible ways and is not
296  // recommended for production use. It is not subject to any SLA or deprecation
297  // policy.
298  rpc DeleteSnapshot(DeleteSnapshotRequest) returns (google.protobuf.Empty) {
299    option (google.api.http) = {
300      delete: "/v2/{name=projects/*/instances/*/clusters/*/snapshots/*}"
301    };
302    option (google.api.method_signature) = "name";
303  }
304
305  // Starts creating a new Cloud Bigtable Backup.  The returned backup
306  // [long-running operation][google.longrunning.Operation] can be used to
307  // track creation of the backup. The
308  // [metadata][google.longrunning.Operation.metadata] field type is
309  // [CreateBackupMetadata][google.bigtable.admin.v2.CreateBackupMetadata]. The
310  // [response][google.longrunning.Operation.response] field type is
311  // [Backup][google.bigtable.admin.v2.Backup], if successful. Cancelling the
312  // returned operation will stop the creation and delete the backup.
313  rpc CreateBackup(CreateBackupRequest) returns (google.longrunning.Operation) {
314    option (google.api.http) = {
315      post: "/v2/{parent=projects/*/instances/*/clusters/*}/backups"
316      body: "backup"
317    };
318    option (google.api.method_signature) = "parent,backup_id,backup";
319    option (google.longrunning.operation_info) = {
320      response_type: "Backup"
321      metadata_type: "CreateBackupMetadata"
322    };
323  }
324
325  // Gets metadata on a pending or completed Cloud Bigtable Backup.
326  rpc GetBackup(GetBackupRequest) returns (Backup) {
327    option (google.api.http) = {
328      get: "/v2/{name=projects/*/instances/*/clusters/*/backups/*}"
329    };
330    option (google.api.method_signature) = "name";
331  }
332
333  // Updates a pending or completed Cloud Bigtable Backup.
334  rpc UpdateBackup(UpdateBackupRequest) returns (Backup) {
335    option (google.api.http) = {
336      patch: "/v2/{backup.name=projects/*/instances/*/clusters/*/backups/*}"
337      body: "backup"
338    };
339    option (google.api.method_signature) = "backup,update_mask";
340  }
341
342  // Deletes a pending or completed Cloud Bigtable backup.
343  rpc DeleteBackup(DeleteBackupRequest) returns (google.protobuf.Empty) {
344    option (google.api.http) = {
345      delete: "/v2/{name=projects/*/instances/*/clusters/*/backups/*}"
346    };
347    option (google.api.method_signature) = "name";
348  }
349
350  // Lists Cloud Bigtable backups. Returns both completed and pending
351  // backups.
352  rpc ListBackups(ListBackupsRequest) returns (ListBackupsResponse) {
353    option (google.api.http) = {
354      get: "/v2/{parent=projects/*/instances/*/clusters/*}/backups"
355    };
356    option (google.api.method_signature) = "parent";
357  }
358
359  // Create a new table by restoring from a completed backup.  The
360  // returned table [long-running operation][google.longrunning.Operation] can
361  // be used to track the progress of the operation, and to cancel it.  The
362  // [metadata][google.longrunning.Operation.metadata] field type is
363  // [RestoreTableMetadata][google.bigtable.admin.RestoreTableMetadata].  The
364  // [response][google.longrunning.Operation.response] type is
365  // [Table][google.bigtable.admin.v2.Table], if successful.
366  rpc RestoreTable(RestoreTableRequest) returns (google.longrunning.Operation) {
367    option (google.api.http) = {
368      post: "/v2/{parent=projects/*/instances/*}/tables:restore"
369      body: "*"
370    };
371    option (google.longrunning.operation_info) = {
372      response_type: "Table"
373      metadata_type: "RestoreTableMetadata"
374    };
375  }
376
377  // Copy a Cloud Bigtable backup to a new backup in the destination cluster
378  // located in the destination instance and project.
379  rpc CopyBackup(CopyBackupRequest) returns (google.longrunning.Operation) {
380    option (google.api.http) = {
381      post: "/v2/{parent=projects/*/instances/*/clusters/*}/backups:copy"
382      body: "*"
383    };
384    option (google.api.method_signature) =
385        "parent,backup_id,source_backup,expire_time";
386    option (google.longrunning.operation_info) = {
387      response_type: "Backup"
388      metadata_type: "CopyBackupMetadata"
389    };
390  }
391
392  // Gets the access control policy for a Table or Backup resource.
393  // Returns an empty policy if the resource exists but does not have a policy
394  // set.
395  rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest)
396      returns (google.iam.v1.Policy) {
397    option (google.api.http) = {
398      post: "/v2/{resource=projects/*/instances/*/tables/*}:getIamPolicy"
399      body: "*"
400      additional_bindings {
401        post: "/v2/{resource=projects/*/instances/*/clusters/*/backups/*}:getIamPolicy"
402        body: "*"
403      }
404    };
405    option (google.api.method_signature) = "resource";
406  }
407
408  // Sets the access control policy on a Table or Backup resource.
409  // Replaces any existing policy.
410  rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest)
411      returns (google.iam.v1.Policy) {
412    option (google.api.http) = {
413      post: "/v2/{resource=projects/*/instances/*/tables/*}:setIamPolicy"
414      body: "*"
415      additional_bindings {
416        post: "/v2/{resource=projects/*/instances/*/clusters/*/backups/*}:setIamPolicy"
417        body: "*"
418      }
419    };
420    option (google.api.method_signature) = "resource,policy";
421  }
422
423  // Returns permissions that the caller has on the specified Table or Backup
424  // resource.
425  rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest)
426      returns (google.iam.v1.TestIamPermissionsResponse) {
427    option (google.api.http) = {
428      post: "/v2/{resource=projects/*/instances/*/tables/*}:testIamPermissions"
429      body: "*"
430      additional_bindings {
431        post: "/v2/{resource=projects/*/instances/*/clusters/*/backups/*}:testIamPermissions"
432        body: "*"
433      }
434    };
435    option (google.api.method_signature) = "resource,permissions";
436  }
437}
438
439// The request for
440// [RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable].
441message RestoreTableRequest {
442  // Required. The name of the instance in which to create the restored
443  // table. Values are of the form `projects/<project>/instances/<instance>`.
444  string parent = 1 [
445    (google.api.field_behavior) = REQUIRED,
446    (google.api.resource_reference) = {
447      type: "bigtableadmin.googleapis.com/Instance"
448    }
449  ];
450
451  // Required. The id of the table to create and restore to. This
452  // table must not already exist. The `table_id` appended to
453  // `parent` forms the full table name of the form
454  // `projects/<project>/instances/<instance>/tables/<table_id>`.
455  string table_id = 2 [(google.api.field_behavior) = REQUIRED];
456
457  // Required. The source from which to restore.
458  oneof source {
459    // Name of the backup from which to restore.  Values are of the form
460    // `projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>`.
461    string backup = 3 [(google.api.resource_reference) = {
462      type: "bigtableadmin.googleapis.com/Backup"
463    }];
464  }
465}
466
467// Metadata type for the long-running operation returned by
468// [RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable].
469message RestoreTableMetadata {
470  // Name of the table being created and restored to.
471  string name = 1;
472
473  // The type of the restore source.
474  RestoreSourceType source_type = 2;
475
476  // Information about the source used to restore the table, as specified by
477  // `source` in
478  // [RestoreTableRequest][google.bigtable.admin.v2.RestoreTableRequest].
479  oneof source_info {
480    BackupInfo backup_info = 3;
481  }
482
483  // If exists, the name of the long-running operation that will be used to
484  // track the post-restore optimization process to optimize the performance of
485  // the restored table. The metadata type of the long-running operation is
486  // [OptimizeRestoreTableMetadata][]. The response type is
487  // [Empty][google.protobuf.Empty]. This long-running operation may be
488  // automatically created by the system if applicable after the
489  // RestoreTable long-running operation completes successfully. This operation
490  // may not be created if the table is already optimized or the restore was
491  // not successful.
492  string optimize_table_operation_name = 4;
493
494  // The progress of the
495  // [RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable]
496  // operation.
497  OperationProgress progress = 5;
498}
499
500// Metadata type for the long-running operation used to track the progress
501// of optimizations performed on a newly restored table. This long-running
502// operation is automatically created by the system after the successful
503// completion of a table restore, and cannot be cancelled.
504message OptimizeRestoredTableMetadata {
505  // Name of the restored table being optimized.
506  string name = 1;
507
508  // The progress of the post-restore optimizations.
509  OperationProgress progress = 2;
510}
511
512// Request message for
513// [google.bigtable.admin.v2.BigtableTableAdmin.CreateTable][google.bigtable.admin.v2.BigtableTableAdmin.CreateTable]
514message CreateTableRequest {
515  // An initial split point for a newly created table.
516  message Split {
517    // Row key to use as an initial tablet boundary.
518    bytes key = 1;
519  }
520
521  // Required. The unique name of the instance in which to create the table.
522  // Values are of the form `projects/{project}/instances/{instance}`.
523  string parent = 1 [
524    (google.api.field_behavior) = REQUIRED,
525    (google.api.resource_reference) = {
526      type: "bigtableadmin.googleapis.com/Instance"
527    }
528  ];
529
530  // Required. The name by which the new table should be referred to within the
531  // parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`.
532  // Maximum 50 characters.
533  string table_id = 2 [(google.api.field_behavior) = REQUIRED];
534
535  // Required. The Table to create.
536  Table table = 3 [(google.api.field_behavior) = REQUIRED];
537
538  // The optional list of row keys that will be used to initially split the
539  // table into several tablets (tablets are similar to HBase regions).
540  // Given two split keys, `s1` and `s2`, three tablets will be created,
541  // spanning the key ranges: `[, s1), [s1, s2), [s2, )`.
542  //
543  // Example:
544  //
545  // * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",`
546  //                `"other", "zz"]`
547  // * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]`
548  // * Key assignment:
549  //     - Tablet 1 `[, apple)                => {"a"}.`
550  //     - Tablet 2 `[apple, customer_1)      => {"apple", "custom"}.`
551  //     - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.`
552  //     - Tablet 4 `[customer_2, other)      => {"customer_2"}.`
553  //     - Tablet 5 `[other, )                => {"other", "zz"}.`
554  repeated Split initial_splits = 4;
555}
556
557// Request message for
558// [google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot][google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot]
559//
560// Note: This is a private alpha release of Cloud Bigtable snapshots. This
561// feature is not currently available to most Cloud Bigtable customers. This
562// feature might be changed in backward-incompatible ways and is not recommended
563// for production use. It is not subject to any SLA or deprecation policy.
564message CreateTableFromSnapshotRequest {
565  // Required. The unique name of the instance in which to create the table.
566  // Values are of the form `projects/{project}/instances/{instance}`.
567  string parent = 1 [
568    (google.api.field_behavior) = REQUIRED,
569    (google.api.resource_reference) = {
570      type: "bigtableadmin.googleapis.com/Instance"
571    }
572  ];
573
574  // Required. The name by which the new table should be referred to within the
575  // parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`.
576  string table_id = 2 [(google.api.field_behavior) = REQUIRED];
577
578  // Required. The unique name of the snapshot from which to restore the table.
579  // The snapshot and the table must be in the same instance. Values are of the
580  // form
581  // `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.
582  string source_snapshot = 3 [
583    (google.api.field_behavior) = REQUIRED,
584    (google.api.resource_reference) = {
585      type: "bigtableadmin.googleapis.com/Snapshot"
586    }
587  ];
588}
589
590// Request message for
591// [google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange][google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange]
592message DropRowRangeRequest {
593  // Required. The unique name of the table on which to drop a range of rows.
594  // Values are of the form
595  // `projects/{project}/instances/{instance}/tables/{table}`.
596  string name = 1 [
597    (google.api.field_behavior) = REQUIRED,
598    (google.api.resource_reference) = {
599      type: "bigtableadmin.googleapis.com/Table"
600    }
601  ];
602
603  // Delete all rows or by prefix.
604  oneof target {
605    // Delete all rows that start with this row key prefix. Prefix cannot be
606    // zero length.
607    bytes row_key_prefix = 2;
608
609    // Delete all rows in the table. Setting this to false is a no-op.
610    bool delete_all_data_from_table = 3;
611  }
612}
613
614// Request message for
615// [google.bigtable.admin.v2.BigtableTableAdmin.ListTables][google.bigtable.admin.v2.BigtableTableAdmin.ListTables]
616message ListTablesRequest {
617  // Required. The unique name of the instance for which tables should be
618  // listed. Values are of the form `projects/{project}/instances/{instance}`.
619  string parent = 1 [
620    (google.api.field_behavior) = REQUIRED,
621    (google.api.resource_reference) = {
622      type: "bigtableadmin.googleapis.com/Instance"
623    }
624  ];
625
626  // The view to be applied to the returned tables' fields.
627  // NAME_ONLY view (default) and REPLICATION_VIEW are supported.
628  Table.View view = 2;
629
630  // Maximum number of results per page.
631  //
632  // A page_size of zero lets the server choose the number of items to return.
633  // A page_size which is strictly positive will return at most that many items.
634  // A negative page_size will cause an error.
635  //
636  // Following the first request, subsequent paginated calls are not required
637  // to pass a page_size. If a page_size is set in subsequent calls, it must
638  // match the page_size given in the first request.
639  int32 page_size = 4;
640
641  // The value of `next_page_token` returned by a previous call.
642  string page_token = 3;
643}
644
645// Response message for
646// [google.bigtable.admin.v2.BigtableTableAdmin.ListTables][google.bigtable.admin.v2.BigtableTableAdmin.ListTables]
647message ListTablesResponse {
648  // The tables present in the requested instance.
649  repeated Table tables = 1;
650
651  // Set if not all tables could be returned in a single response.
652  // Pass this value to `page_token` in another request to get the next
653  // page of results.
654  string next_page_token = 2;
655}
656
657// Request message for
658// [google.bigtable.admin.v2.BigtableTableAdmin.GetTable][google.bigtable.admin.v2.BigtableTableAdmin.GetTable]
659message GetTableRequest {
660  // Required. The unique name of the requested table.
661  // Values are of the form
662  // `projects/{project}/instances/{instance}/tables/{table}`.
663  string name = 1 [
664    (google.api.field_behavior) = REQUIRED,
665    (google.api.resource_reference) = {
666      type: "bigtableadmin.googleapis.com/Table"
667    }
668  ];
669
670  // The view to be applied to the returned table's fields.
671  // Defaults to `SCHEMA_VIEW` if unspecified.
672  Table.View view = 2;
673}
674
675// The request for
676// [UpdateTable][google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable].
677message UpdateTableRequest {
678  // Required. The table to update.
679  // The table's `name` field is used to identify the table to update.
680  Table table = 1 [(google.api.field_behavior) = REQUIRED];
681
682  // Required. The list of fields to update.
683  // A mask specifying which fields (e.g. `change_stream_config`) in the `table`
684  // field should be updated. This mask is relative to the `table` field, not to
685  // the request message. The wildcard (*) path is currently not supported.
686  // Currently UpdateTable is only supported for the following fields:
687  //
688  // * `change_stream_config`
689  // * `change_stream_config.retention_period`
690  // * `deletion_protection`
691  //
692  // If `column_families` is set in `update_mask`, it will return an
693  // UNIMPLEMENTED error.
694  google.protobuf.FieldMask update_mask = 2
695      [(google.api.field_behavior) = REQUIRED];
696}
697
698// Metadata type for the operation returned by
699// [UpdateTable][google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable].
700message UpdateTableMetadata {
701  // The name of the table being updated.
702  string name = 1;
703
704  // The time at which this operation started.
705  google.protobuf.Timestamp start_time = 2;
706
707  // If set, the time at which this operation finished or was canceled.
708  google.protobuf.Timestamp end_time = 3;
709}
710
711// Request message for
712// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable]
713message DeleteTableRequest {
714  // Required. The unique name of the table to be deleted.
715  // Values are of the form
716  // `projects/{project}/instances/{instance}/tables/{table}`.
717  string name = 1 [
718    (google.api.field_behavior) = REQUIRED,
719    (google.api.resource_reference) = {
720      type: "bigtableadmin.googleapis.com/Table"
721    }
722  ];
723}
724
725// Request message for
726// [google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable]
727message UndeleteTableRequest {
728  // Required. The unique name of the table to be restored.
729  // Values are of the form
730  // `projects/{project}/instances/{instance}/tables/{table}`.
731  string name = 1 [
732    (google.api.field_behavior) = REQUIRED,
733    (google.api.resource_reference) = {
734      type: "bigtableadmin.googleapis.com/Table"
735    }
736  ];
737}
738
739// Metadata type for the operation returned by
740// [google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable].
741message UndeleteTableMetadata {
742  // The name of the table being restored.
743  string name = 1;
744
745  // The time at which this operation started.
746  google.protobuf.Timestamp start_time = 2;
747
748  // If set, the time at which this operation finished or was cancelled.
749  google.protobuf.Timestamp end_time = 3;
750}
751
752// Request message for
753// [google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies][google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies]
754message ModifyColumnFamiliesRequest {
755  // A create, update, or delete of a particular column family.
756  message Modification {
757    // The ID of the column family to be modified.
758    string id = 1;
759
760    // Column family modifications.
761    oneof mod {
762      // Create a new column family with the specified schema, or fail if
763      // one already exists with the given ID.
764      ColumnFamily create = 2;
765
766      // Update an existing column family to the specified schema, or fail
767      // if no column family exists with the given ID.
768      ColumnFamily update = 3;
769
770      // Drop (delete) the column family with the given ID, or fail if no such
771      // family exists.
772      bool drop = 4;
773    }
774
775    // Optional. A mask specifying which fields (e.g. `gc_rule`) in the `update`
776    // mod should be updated, ignored for other modification types. If unset or
777    // empty, we treat it as updating `gc_rule` to be backward compatible.
778    google.protobuf.FieldMask update_mask = 6
779        [(google.api.field_behavior) = OPTIONAL];
780  }
781
782  // Required. The unique name of the table whose families should be modified.
783  // Values are of the form
784  // `projects/{project}/instances/{instance}/tables/{table}`.
785  string name = 1 [
786    (google.api.field_behavior) = REQUIRED,
787    (google.api.resource_reference) = {
788      type: "bigtableadmin.googleapis.com/Table"
789    }
790  ];
791
792  // Required. Modifications to be atomically applied to the specified table's
793  // families. Entries are applied in order, meaning that earlier modifications
794  // can be masked by later ones (in the case of repeated updates to the same
795  // family, for example).
796  repeated Modification modifications = 2
797      [(google.api.field_behavior) = REQUIRED];
798
799  // Optional. If true, ignore safety checks when modifying the column families.
800  bool ignore_warnings = 3 [(google.api.field_behavior) = OPTIONAL];
801}
802
803// Request message for
804// [google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken][google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken]
805message GenerateConsistencyTokenRequest {
806  // Required. The unique name of the Table for which to create a consistency
807  // token. Values are of the form
808  // `projects/{project}/instances/{instance}/tables/{table}`.
809  string name = 1 [
810    (google.api.field_behavior) = REQUIRED,
811    (google.api.resource_reference) = {
812      type: "bigtableadmin.googleapis.com/Table"
813    }
814  ];
815}
816
817// Response message for
818// [google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken][google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken]
819message GenerateConsistencyTokenResponse {
820  // The generated consistency token.
821  string consistency_token = 1;
822}
823
824// Request message for
825// [google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency][google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency]
826message CheckConsistencyRequest {
827  // Required. The unique name of the Table for which to check replication
828  // consistency. Values are of the form
829  // `projects/{project}/instances/{instance}/tables/{table}`.
830  string name = 1 [
831    (google.api.field_behavior) = REQUIRED,
832    (google.api.resource_reference) = {
833      type: "bigtableadmin.googleapis.com/Table"
834    }
835  ];
836
837  // Required. The token created using GenerateConsistencyToken for the Table.
838  string consistency_token = 2 [(google.api.field_behavior) = REQUIRED];
839
840  // Which type of read needs to consistently observe which type of write?
841  // Default: `standard_read_remote_writes`
842  oneof mode {
843    // Checks that reads using an app profile with `StandardIsolation` can
844    // see all writes committed before the token was created, even if the
845    // read and write target different clusters.
846    StandardReadRemoteWrites standard_read_remote_writes = 3;
847
848    // Checks that reads using an app profile with `DataBoostIsolationReadOnly`
849    // can see all writes committed before the token was created, but only if
850    // the read and write target the same cluster.
851    DataBoostReadLocalWrites data_boost_read_local_writes = 4;
852  }
853}
854
855// Checks that all writes before the consistency token was generated are
856// replicated in every cluster and readable.
857message StandardReadRemoteWrites {}
858
859// Checks that all writes before the consistency token was generated in the same
860// cluster are readable by Databoost.
861message DataBoostReadLocalWrites {}
862
863// Response message for
864// [google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency][google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency]
865message CheckConsistencyResponse {
866  // True only if the token is consistent. A token is consistent if replication
867  // has caught up with the restrictions specified in the request.
868  bool consistent = 1;
869}
870
871// Request message for
872// [google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable][google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable]
873//
874// Note: This is a private alpha release of Cloud Bigtable snapshots. This
875// feature is not currently available to most Cloud Bigtable customers. This
876// feature might be changed in backward-incompatible ways and is not recommended
877// for production use. It is not subject to any SLA or deprecation policy.
878message SnapshotTableRequest {
879  // Required. The unique name of the table to have the snapshot taken.
880  // Values are of the form
881  // `projects/{project}/instances/{instance}/tables/{table}`.
882  string name = 1 [
883    (google.api.field_behavior) = REQUIRED,
884    (google.api.resource_reference) = {
885      type: "bigtableadmin.googleapis.com/Table"
886    }
887  ];
888
889  // Required. The name of the cluster where the snapshot will be created in.
890  // Values are of the form
891  // `projects/{project}/instances/{instance}/clusters/{cluster}`.
892  string cluster = 2 [
893    (google.api.field_behavior) = REQUIRED,
894    (google.api.resource_reference) = {
895      type: "bigtableadmin.googleapis.com/Cluster"
896    }
897  ];
898
899  // Required. The ID by which the new snapshot should be referred to within the
900  // parent cluster, e.g., `mysnapshot` of the form:
901  // `[_a-zA-Z0-9][-_.a-zA-Z0-9]*` rather than
902  // `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot`.
903  string snapshot_id = 3 [(google.api.field_behavior) = REQUIRED];
904
905  // The amount of time that the new snapshot can stay active after it is
906  // created. Once 'ttl' expires, the snapshot will get deleted. The maximum
907  // amount of time a snapshot can stay active is 7 days. If 'ttl' is not
908  // specified, the default value of 24 hours will be used.
909  google.protobuf.Duration ttl = 4;
910
911  // Description of the snapshot.
912  string description = 5;
913}
914
915// Request message for
916// [google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot][google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot]
917//
918// Note: This is a private alpha release of Cloud Bigtable snapshots. This
919// feature is not currently available to most Cloud Bigtable customers. This
920// feature might be changed in backward-incompatible ways and is not recommended
921// for production use. It is not subject to any SLA or deprecation policy.
922message GetSnapshotRequest {
923  // Required. The unique name of the requested snapshot.
924  // Values are of the form
925  // `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.
926  string name = 1 [
927    (google.api.field_behavior) = REQUIRED,
928    (google.api.resource_reference) = {
929      type: "bigtableadmin.googleapis.com/Snapshot"
930    }
931  ];
932}
933
934// Request message for
935// [google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots][google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots]
936//
937// Note: This is a private alpha release of Cloud Bigtable snapshots. This
938// feature is not currently available to most Cloud Bigtable customers. This
939// feature might be changed in backward-incompatible ways and is not recommended
940// for production use. It is not subject to any SLA or deprecation policy.
941message ListSnapshotsRequest {
942  // Required. The unique name of the cluster for which snapshots should be
943  // listed. Values are of the form
944  // `projects/{project}/instances/{instance}/clusters/{cluster}`.
945  // Use `{cluster} = '-'` to list snapshots for all clusters in an instance,
946  // e.g., `projects/{project}/instances/{instance}/clusters/-`.
947  string parent = 1 [
948    (google.api.field_behavior) = REQUIRED,
949    (google.api.resource_reference) = {
950      type: "bigtableadmin.googleapis.com/Cluster"
951    }
952  ];
953
954  // The maximum number of snapshots to return per page.
955  // CURRENTLY UNIMPLEMENTED AND IGNORED.
956  int32 page_size = 2;
957
958  // The value of `next_page_token` returned by a previous call.
959  string page_token = 3;
960}
961
962// Response message for
963// [google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots][google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots]
964//
965// Note: This is a private alpha release of Cloud Bigtable snapshots. This
966// feature is not currently available to most Cloud Bigtable customers. This
967// feature might be changed in backward-incompatible ways and is not recommended
968// for production use. It is not subject to any SLA or deprecation policy.
969message ListSnapshotsResponse {
970  // The snapshots present in the requested cluster.
971  repeated Snapshot snapshots = 1;
972
973  // Set if not all snapshots could be returned in a single response.
974  // Pass this value to `page_token` in another request to get the next
975  // page of results.
976  string next_page_token = 2;
977}
978
979// Request message for
980// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot][google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot]
981//
982// Note: This is a private alpha release of Cloud Bigtable snapshots. This
983// feature is not currently available to most Cloud Bigtable customers. This
984// feature might be changed in backward-incompatible ways and is not recommended
985// for production use. It is not subject to any SLA or deprecation policy.
986message DeleteSnapshotRequest {
987  // Required. The unique name of the snapshot to be deleted.
988  // Values are of the form
989  // `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.
990  string name = 1 [
991    (google.api.field_behavior) = REQUIRED,
992    (google.api.resource_reference) = {
993      type: "bigtableadmin.googleapis.com/Snapshot"
994    }
995  ];
996}
997
998// The metadata for the Operation returned by SnapshotTable.
999//
1000// Note: This is a private alpha release of Cloud Bigtable snapshots. This
1001// feature is not currently available to most Cloud Bigtable customers. This
1002// feature might be changed in backward-incompatible ways and is not recommended
1003// for production use. It is not subject to any SLA or deprecation policy.
1004message SnapshotTableMetadata {
1005  // The request that prompted the initiation of this SnapshotTable operation.
1006  SnapshotTableRequest original_request = 1;
1007
1008  // The time at which the original request was received.
1009  google.protobuf.Timestamp request_time = 2;
1010
1011  // The time at which the operation failed or was completed successfully.
1012  google.protobuf.Timestamp finish_time = 3;
1013}
1014
1015// The metadata for the Operation returned by CreateTableFromSnapshot.
1016//
1017// Note: This is a private alpha release of Cloud Bigtable snapshots. This
1018// feature is not currently available to most Cloud Bigtable customers. This
1019// feature might be changed in backward-incompatible ways and is not recommended
1020// for production use. It is not subject to any SLA or deprecation policy.
1021message CreateTableFromSnapshotMetadata {
1022  // The request that prompted the initiation of this CreateTableFromSnapshot
1023  // operation.
1024  CreateTableFromSnapshotRequest original_request = 1;
1025
1026  // The time at which the original request was received.
1027  google.protobuf.Timestamp request_time = 2;
1028
1029  // The time at which the operation failed or was completed successfully.
1030  google.protobuf.Timestamp finish_time = 3;
1031}
1032
1033// The request for
1034// [CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup].
1035message CreateBackupRequest {
1036  // Required. This must be one of the clusters in the instance in which this
1037  // table is located. The backup will be stored in this cluster. Values are
1038  // of the form `projects/{project}/instances/{instance}/clusters/{cluster}`.
1039  string parent = 1 [
1040    (google.api.field_behavior) = REQUIRED,
1041    (google.api.resource_reference) = {
1042      type: "bigtableadmin.googleapis.com/Cluster"
1043    }
1044  ];
1045
1046  // Required. The id of the backup to be created. The `backup_id` along with
1047  // the parent `parent` are combined as {parent}/backups/{backup_id} to create
1048  // the full backup name, of the form:
1049  // `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`.
1050  // This string must be between 1 and 50 characters in length and match the
1051  // regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*.
1052  string backup_id = 2 [(google.api.field_behavior) = REQUIRED];
1053
1054  // Required. The backup to create.
1055  Backup backup = 3 [(google.api.field_behavior) = REQUIRED];
1056}
1057
1058// Metadata type for the operation returned by
1059// [CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup].
1060message CreateBackupMetadata {
1061  // The name of the backup being created.
1062  string name = 1;
1063
1064  // The name of the table the backup is created from.
1065  string source_table = 2;
1066
1067  // The time at which this operation started.
1068  google.protobuf.Timestamp start_time = 3;
1069
1070  // If set, the time at which this operation finished or was cancelled.
1071  google.protobuf.Timestamp end_time = 4;
1072}
1073
1074// The request for
1075// [UpdateBackup][google.bigtable.admin.v2.BigtableTableAdmin.UpdateBackup].
1076message UpdateBackupRequest {
1077  // Required. The backup to update. `backup.name`, and the fields to be updated
1078  // as specified by `update_mask` are required. Other fields are ignored.
1079  // Update is only supported for the following fields:
1080  //
1081  //  * `backup.expire_time`.
1082  Backup backup = 1 [(google.api.field_behavior) = REQUIRED];
1083
1084  // Required. A mask specifying which fields (e.g. `expire_time`) in the
1085  // Backup resource should be updated. This mask is relative to the Backup
1086  // resource, not to the request message. The field mask must always be
1087  // specified; this prevents any future fields from being erased accidentally
1088  // by clients that do not know about them.
1089  google.protobuf.FieldMask update_mask = 2
1090      [(google.api.field_behavior) = REQUIRED];
1091}
1092
1093// The request for
1094// [GetBackup][google.bigtable.admin.v2.BigtableTableAdmin.GetBackup].
1095message GetBackupRequest {
1096  // Required. Name of the backup.
1097  // Values are of the form
1098  // `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`.
1099  string name = 1 [
1100    (google.api.field_behavior) = REQUIRED,
1101    (google.api.resource_reference) = {
1102      type: "bigtableadmin.googleapis.com/Backup"
1103    }
1104  ];
1105}
1106
1107// The request for
1108// [DeleteBackup][google.bigtable.admin.v2.BigtableTableAdmin.DeleteBackup].
1109message DeleteBackupRequest {
1110  // Required. Name of the backup to delete.
1111  // Values are of the form
1112  // `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`.
1113  string name = 1 [
1114    (google.api.field_behavior) = REQUIRED,
1115    (google.api.resource_reference) = {
1116      type: "bigtableadmin.googleapis.com/Backup"
1117    }
1118  ];
1119}
1120
1121// The request for
1122// [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups].
1123message ListBackupsRequest {
1124  // Required. The cluster to list backups from.  Values are of the
1125  // form `projects/{project}/instances/{instance}/clusters/{cluster}`.
1126  // Use `{cluster} = '-'` to list backups for all clusters in an instance,
1127  // e.g., `projects/{project}/instances/{instance}/clusters/-`.
1128  string parent = 1 [
1129    (google.api.field_behavior) = REQUIRED,
1130    (google.api.resource_reference) = {
1131      type: "bigtableadmin.googleapis.com/Cluster"
1132    }
1133  ];
1134
1135  // A filter expression that filters backups listed in the response.
1136  // The expression must specify the field name, a comparison operator,
1137  // and the value that you want to use for filtering. The value must be a
1138  // string, a number, or a boolean. The comparison operator must be
1139  // <, >, <=, >=, !=, =, or :. Colon ':' represents a HAS operator which is
1140  // roughly synonymous with equality. Filter rules are case insensitive.
1141  //
1142  // The fields eligible for filtering are:
1143  //
1144  // * `name`
1145  // * `source_table`
1146  // * `state`
1147  // * `start_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
1148  // * `end_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
1149  // * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
1150  // * `size_bytes`
1151  //
1152  // To filter on multiple expressions, provide each separate expression within
1153  // parentheses. By default, each expression is an AND expression. However,
1154  // you can include AND, OR, and NOT expressions explicitly.
1155  //
1156  // Some examples of using filters are:
1157  //
1158  // * `name:"exact"` --> The backup's name is the string "exact".
1159  // * `name:howl` --> The backup's name contains the string "howl".
1160  // * `source_table:prod`
1161  //        --> The source_table's name contains the string "prod".
1162  // * `state:CREATING` --> The backup is pending creation.
1163  // * `state:READY` --> The backup is fully created and ready for use.
1164  // * `(name:howl) AND (start_time < \"2018-03-28T14:50:00Z\")`
1165  //        --> The backup name contains the string "howl" and start_time
1166  //            of the backup is before 2018-03-28T14:50:00Z.
1167  // * `size_bytes > 10000000000` --> The backup's size is greater than 10GB
1168  string filter = 2;
1169
1170  // An expression for specifying the sort order of the results of the request.
1171  // The string value should specify one or more fields in
1172  // [Backup][google.bigtable.admin.v2.Backup]. The full syntax is described at
1173  // https://aip.dev/132#ordering.
1174  //
1175  // Fields supported are:
1176  //
1177  // * name
1178  // * source_table
1179  // * expire_time
1180  // * start_time
1181  // * end_time
1182  // * size_bytes
1183  // * state
1184  //
1185  // For example, "start_time". The default sorting order is ascending.
1186  // To specify descending order for the field, a suffix " desc" should
1187  // be appended to the field name. For example, "start_time desc".
1188  // Redundant space characters in the syntax are insigificant.
1189  //
1190  // If order_by is empty, results will be sorted by `start_time` in descending
1191  // order starting from the most recently created backup.
1192  string order_by = 3;
1193
1194  // Number of backups to be returned in the response. If 0 or
1195  // less, defaults to the server's maximum allowed page size.
1196  int32 page_size = 4;
1197
1198  // If non-empty, `page_token` should contain a
1199  // [next_page_token][google.bigtable.admin.v2.ListBackupsResponse.next_page_token]
1200  // from a previous
1201  // [ListBackupsResponse][google.bigtable.admin.v2.ListBackupsResponse] to the
1202  // same `parent` and with the same `filter`.
1203  string page_token = 5;
1204}
1205
1206// The response for
1207// [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups].
1208message ListBackupsResponse {
1209  // The list of matching backups.
1210  repeated Backup backups = 1;
1211
1212  // `next_page_token` can be sent in a subsequent
1213  // [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups] call
1214  // to fetch more of the matching backups.
1215  string next_page_token = 2;
1216}
1217
1218// The request for
1219// [CopyBackup][google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup].
1220message CopyBackupRequest {
1221  // Required. The name of the destination cluster that will contain the backup
1222  // copy. The cluster must already exists. Values are of the form:
1223  // `projects/{project}/instances/{instance}/clusters/{cluster}`.
1224  string parent = 1 [
1225    (google.api.field_behavior) = REQUIRED,
1226    (google.api.resource_reference) = {
1227      type: "bigtableadmin.googleapis.com/Cluster"
1228    }
1229  ];
1230
1231  // Required. The id of the new backup. The `backup_id` along with `parent`
1232  // are combined as {parent}/backups/{backup_id} to create the full backup
1233  // name, of the form:
1234  // `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`.
1235  // This string must be between 1 and 50 characters in length and match the
1236  // regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*.
1237  string backup_id = 2 [(google.api.field_behavior) = REQUIRED];
1238
1239  // Required. The source backup to be copied from.
1240  // The source backup needs to be in READY state for it to be copied.
1241  // Copying a copied backup is not allowed.
1242  // Once CopyBackup is in progress, the source backup cannot be deleted or
1243  // cleaned up on expiration until CopyBackup is finished.
1244  // Values are of the form:
1245  // `projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>`.
1246  string source_backup = 3 [
1247    (google.api.field_behavior) = REQUIRED,
1248    (google.api.resource_reference) = {
1249      type: "bigtableadmin.googleapis.com/Backup"
1250    }
1251  ];
1252
1253  // Required. Required. The expiration time of the copied backup with
1254  // microsecond granularity that must be at least 6 hours and at most 30 days
1255  // from the time the request is received. Once the `expire_time` has
1256  // passed, Cloud Bigtable will delete the backup and free the resources used
1257  // by the backup.
1258  google.protobuf.Timestamp expire_time = 4
1259      [(google.api.field_behavior) = REQUIRED];
1260}
1261
1262// Metadata type for the google.longrunning.Operation returned by
1263// [CopyBackup][google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup].
1264message CopyBackupMetadata {
1265  // The name of the backup being created through the copy operation.
1266  // Values are of the form
1267  // `projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>`.
1268  string name = 1 [(google.api.resource_reference) = {
1269    type: "bigtableadmin.googleapis.com/Backup"
1270  }];
1271
1272  // Information about the source backup that is being copied from.
1273  BackupInfo source_backup_info = 2;
1274
1275  // The progress of the
1276  // [CopyBackup][google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup]
1277  // operation.
1278  OperationProgress progress = 3;
1279}
1280
1281// The request for
1282// [CreateAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.CreateAuthorizedView]
1283message CreateAuthorizedViewRequest {
1284  // Required. This is the name of the table the AuthorizedView belongs to.
1285  // Values are of the form
1286  // `projects/{project}/instances/{instance}/tables/{table}`.
1287  string parent = 1 [
1288    (google.api.field_behavior) = REQUIRED,
1289    (google.api.resource_reference) = {
1290      child_type: "bigtableadmin.googleapis.com/AuthorizedView"
1291    }
1292  ];
1293
1294  // Required. The id of the AuthorizedView to create. This AuthorizedView must
1295  // not already exist. The `authorized_view_id` appended to `parent` forms the
1296  // full AuthorizedView name of the form
1297  // `projects/{project}/instances/{instance}/tables/{table}/authorizedView/{authorized_view}`.
1298  string authorized_view_id = 2 [(google.api.field_behavior) = REQUIRED];
1299
1300  // Required. The AuthorizedView to create.
1301  AuthorizedView authorized_view = 3 [(google.api.field_behavior) = REQUIRED];
1302}
1303
1304// The metadata for the Operation returned by CreateAuthorizedView.
1305message CreateAuthorizedViewMetadata {
1306  // The request that prompted the initiation of this CreateInstance operation.
1307  CreateAuthorizedViewRequest original_request = 1;
1308
1309  // The time at which the original request was received.
1310  google.protobuf.Timestamp request_time = 2;
1311
1312  // The time at which the operation failed or was completed successfully.
1313  google.protobuf.Timestamp finish_time = 3;
1314}
1315
1316// Request message for
1317// [google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews][google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews]
1318message ListAuthorizedViewsRequest {
1319  // Required. The unique name of the table for which AuthorizedViews should be
1320  // listed. Values are of the form
1321  // `projects/{project}/instances/{instance}/tables/{table}`.
1322  string parent = 1 [
1323    (google.api.field_behavior) = REQUIRED,
1324    (google.api.resource_reference) = {
1325      child_type: "bigtableadmin.googleapis.com/AuthorizedView"
1326    }
1327  ];
1328
1329  // Optional. Maximum number of results per page.
1330  //
1331  // A page_size of zero lets the server choose the number of items to return.
1332  // A page_size which is strictly positive will return at most that many items.
1333  // A negative page_size will cause an error.
1334  //
1335  // Following the first request, subsequent paginated calls are not required
1336  // to pass a page_size. If a page_size is set in subsequent calls, it must
1337  // match the page_size given in the first request.
1338  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
1339
1340  // Optional. The value of `next_page_token` returned by a previous call.
1341  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
1342
1343  // Optional. The resource_view to be applied to the returned views' fields.
1344  // Default to NAME_ONLY.
1345  AuthorizedView.ResponseView view = 4 [(google.api.field_behavior) = OPTIONAL];
1346}
1347
1348// Response message for
1349// [google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews][google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews]
1350message ListAuthorizedViewsResponse {
1351  // The AuthorizedViews present in the requested table.
1352  repeated AuthorizedView authorized_views = 1;
1353
1354  // Set if not all tables could be returned in a single response.
1355  // Pass this value to `page_token` in another request to get the next
1356  // page of results.
1357  string next_page_token = 2;
1358}
1359
1360// Request message for
1361// [google.bigtable.admin.v2.BigtableTableAdmin.GetAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.GetAuthorizedView]
1362message GetAuthorizedViewRequest {
1363  // Required. The unique name of the requested AuthorizedView.
1364  // Values are of the form
1365  // `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`.
1366  string name = 1 [
1367    (google.api.field_behavior) = REQUIRED,
1368    (google.api.resource_reference) = {
1369      type: "bigtableadmin.googleapis.com/AuthorizedView"
1370    }
1371  ];
1372
1373  // Optional. The resource_view to be applied to the returned AuthorizedView's
1374  // fields. Default to BASIC.
1375  AuthorizedView.ResponseView view = 2 [(google.api.field_behavior) = OPTIONAL];
1376}
1377
1378// The request for
1379// [UpdateAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.UpdateAuthorizedView].
1380message UpdateAuthorizedViewRequest {
1381  // Required. The AuthorizedView to update. The `name` in `authorized_view` is
1382  // used to identify the AuthorizedView. AuthorizedView name must in this
1383  // format
1384  // projects/<project>/instances/<instance>/tables/<table>/authorizedViews/<authorized_view>
1385  AuthorizedView authorized_view = 1 [(google.api.field_behavior) = REQUIRED];
1386
1387  // Optional. The list of fields to update.
1388  // A mask specifying which fields in the AuthorizedView resource should be
1389  // updated. This mask is relative to the AuthorizedView resource, not to the
1390  // request message. A field will be overwritten if it is in the mask. If
1391  // empty, all fields set in the request will be overwritten. A special value
1392  // `*` means to overwrite all fields (including fields not set in the
1393  // request).
1394  google.protobuf.FieldMask update_mask = 2
1395      [(google.api.field_behavior) = OPTIONAL];
1396
1397  // Optional. If true, ignore the safety checks when updating the
1398  // AuthorizedView.
1399  bool ignore_warnings = 3 [(google.api.field_behavior) = OPTIONAL];
1400}
1401
1402// Metadata for the google.longrunning.Operation returned by
1403// [UpdateAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.UpdateAuthorizedView].
1404message UpdateAuthorizedViewMetadata {
1405  // The request that prompted the initiation of this UpdateAuthorizedView
1406  // operation.
1407  UpdateAuthorizedViewRequest original_request = 1;
1408
1409  // The time at which the original request was received.
1410  google.protobuf.Timestamp request_time = 2;
1411
1412  // The time at which the operation failed or was completed successfully.
1413  google.protobuf.Timestamp finish_time = 3;
1414}
1415
1416// Request message for
1417// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.DeleteAuthorizedView]
1418message DeleteAuthorizedViewRequest {
1419  // Required. The unique name of the AuthorizedView to be deleted.
1420  // Values are of the form
1421  // `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`.
1422  string name = 1 [
1423    (google.api.field_behavior) = REQUIRED,
1424    (google.api.resource_reference) = {
1425      type: "bigtableadmin.googleapis.com/AuthorizedView"
1426    }
1427  ];
1428
1429  // Optional. The current etag of the AuthorizedView.
1430  // If an etag is provided and does not match the current etag of the
1431  // AuthorizedView, deletion will be blocked and an ABORTED error will be
1432  // returned.
1433  string etag = 2 [(google.api.field_behavior) = OPTIONAL];
1434}
1435