Skip to content

Commit

Permalink
feat: update the admin APIs (googleapis#485)
Browse files Browse the repository at this point in the history
* feat: update admin APIs
  • Loading branch information
yoshi-automation authored and crwilcox committed Jun 21, 2019
1 parent 89124f6 commit c76fba9
Show file tree
Hide file tree
Showing 26 changed files with 3,409 additions and 1,311 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
"google-gax": "^1.0.0",
"is": "^3.0.1",
"is-utf8": "^0.2.1",
"lodash.merge": "^4.6.0",
"lodash.snakecase": "^4.1.1",
"long": "^4.0.0",
"protobufjs": "^6.8.0",
Expand Down
227 changes: 107 additions & 120 deletions protos/google/bigtable/admin/v2/bigtable_instance_admin.proto

Large diffs are not rendered by default.

247 changes: 132 additions & 115 deletions protos/google/bigtable/admin/v2/bigtable_table_admin.proto

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions protos/google/bigtable/admin/v2/common.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2017 Google Inc.
// Copyright 2018 Google LLC.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -11,6 +11,7 @@
// 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";

Expand All @@ -26,7 +27,6 @@ option java_outer_classname = "CommonProto";
option java_package = "com.google.bigtable.admin.v2";
option php_namespace = "Google\\Cloud\\Bigtable\\Admin\\V2";


// Storage media types for persisting Bigtable data.
enum StorageType {
// The user did not specify a storage type.
Expand Down
13 changes: 3 additions & 10 deletions protos/google/bigtable/admin/v2/instance.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2017 Google Inc.
// Copyright 2018 Google LLC.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -11,6 +11,7 @@
// 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";

Expand All @@ -26,7 +27,6 @@ option java_outer_classname = "InstanceProto";
option java_package = "com.google.bigtable.admin.v2";
option php_namespace = "Google\\Cloud\\Bigtable\\Admin\\V2";


// A collection of Bigtable [Tables][google.bigtable.admin.v2.Table] and
// the resources that serve them.
// All tables in an instance are served from a single
Expand Down Expand Up @@ -153,21 +153,14 @@ message Cluster {
StorageType default_storage_type = 5;
}

// This is a private alpha release of Cloud Bigtable replication. This feature
// is not currently available to most Cloud Bigtable customers. This feature
// might be changed in backward-incompatible ways and is not recommended for
// production use. It is not subject to any SLA or deprecation policy.
//
// A configuration object describing how Cloud Bigtable should treat traffic
// from a particular end user application.
message AppProfile {
// Read/write requests may be routed to any cluster in the instance, and will
// fail over to another cluster in the event of transient errors or delays.
// Choosing this option sacrifices read-your-writes consistency to improve
// availability.
message MultiClusterRoutingUseAny {

}
message MultiClusterRoutingUseAny {}

// Unconditionally routes all read/write requests to a specific cluster.
// This option preserves read-your-writes consistency, but does not improve
Expand Down
52 changes: 16 additions & 36 deletions protos/google/bigtable/admin/v2/table.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2017 Google Inc.
// Copyright 2018 Google LLC.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -11,6 +11,7 @@
// 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";

Expand All @@ -27,15 +28,9 @@ option java_outer_classname = "TableProto";
option java_package = "com.google.bigtable.admin.v2";
option php_namespace = "Google\\Cloud\\Bigtable\\Admin\\V2";


// A collection of user data indexed by row, column, and timestamp.
// Each table is served using the resources of its parent cluster.
message Table {
// This is a private alpha release of Cloud Bigtable replication. This feature
// is not currently available to most Cloud Bigtable customers. This feature
// might be changed in backward-incompatible ways and is not recommended for
// production use. It is not subject to any SLA or deprecation policy.
//
// The state of a table's data in a particular cluster.
message ClusterState {
// Table replication states.
Expand All @@ -45,24 +40,20 @@ message Table {

// The cluster was recently created, and the table must finish copying
// over pre-existing data from other clusters before it can begin
// receiving live replication updates and serving
// [Data API][google.bigtable.v2.Bigtable] requests.
// receiving live replication updates and serving Data API requests.
INITIALIZING = 1;

// The table is temporarily unable to serve
// [Data API][google.bigtable.v2.Bigtable] requests from this
// The table is temporarily unable to serve Data API requests from this
// cluster due to planned internal maintenance.
PLANNED_MAINTENANCE = 2;

// The table is temporarily unable to serve
// [Data API][google.bigtable.v2.Bigtable] requests from this
// The table is temporarily unable to serve Data API requests from this
// cluster due to unplanned or emergency maintenance.
UNPLANNED_MAINTENANCE = 3;

// The table can serve
// [Data API][google.bigtable.v2.Bigtable] requests from this
// cluster. Depending on replication delay, reads may not immediately
// reflect the state of the table in other clusters.
// The table can serve Data API requests from this cluster. Depending on
// replication delay, reads may not immediately reflect the state of the
// table in other clusters.
READY = 4;
}

Expand Down Expand Up @@ -93,12 +84,6 @@ message Table {
// Only populates `name` and fields related to the table's schema.
SCHEMA_VIEW = 2;

// This is a private alpha release of Cloud Bigtable replication. This
// feature is not currently available to most Cloud Bigtable customers. This
// feature might be changed in backward-incompatible ways and is not
// recommended for production use. It is not subject to any SLA or
// deprecation policy.
//
// Only populates `name` and fields related to the table's
// replication state.
REPLICATION_VIEW = 3;
Expand All @@ -110,20 +95,15 @@ message Table {
// (`OutputOnly`)
// The unique name of the table. Values are of the form
// `projects/<project>/instances/<instance>/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
// Views: `NAME_ONLY`, `SCHEMA_VIEW`, `FULL`
// Views: `NAME_ONLY`, `SCHEMA_VIEW`, `REPLICATION_VIEW`, `FULL`
string name = 1;

// This is a private alpha release of Cloud Bigtable replication. This feature
// is not currently available to most Cloud Bigtable customers. This feature
// might be changed in backward-incompatible ways and is not recommended for
// production use. It is not subject to any SLA or deprecation policy.
//
// (`OutputOnly`)
// Map from cluster ID to per-cluster table state.
// If it could not be determined whether or not the table has data in a
// particular cluster (for example, if its zone is unavailable), then
// there will be an entry for the cluster with UNKNOWN `replication_status`.
// Views: `FULL`
// Views: `REPLICATION_VIEW`, `FULL`
map<string, ClusterState> cluster_states = 2;

// (`CreationOnly`)
Expand All @@ -132,7 +112,7 @@ message Table {
map<string, ColumnFamily> column_families = 3;

// (`CreationOnly`)
// The granularity (e.g. `MILLIS`, `MICROS`) at which timestamps are stored in
// The granularity (i.e. `MILLIS`) at which timestamps are stored in
// this table. Timestamps not matching the granularity will be rejected.
// If unspecified at creation time, the value will be set to `MILLIS`.
// Views: `SCHEMA_VIEW`, `FULL`
Expand Down Expand Up @@ -182,13 +162,13 @@ message GcRule {
}
}

// This is a private alpha release of Cloud Bigtable snapshots. This feature
// is not currently available to most Cloud Bigtable customers. This feature
// might be changed in backward-incompatible ways and is not recommended for
// production use. It is not subject to any SLA or deprecation policy.
//
// A snapshot of a table at a particular time. A snapshot can be used as a
// checkpoint for data restoration or a data source for a new table.
//
// Note: This is a private alpha release of Cloud Bigtable snapshots. This
// feature is not currently available to most Cloud Bigtable customers. This
// feature might be changed in backward-incompatible ways and is not recommended
// for production use. It is not subject to any SLA or deprecation policy.
message Snapshot {
// Possible states of a snapshot.
enum State {
Expand Down
6 changes: 6 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@
/**
* @namespace google.protobuf
*/
/**
* @namespace google.type
*/
/**
* @namespace google.longrunning
*/

import {Service} from '@google-cloud/common-grpc';
import {replaceProjectIdToken} from '@google-cloud/projectify';
Expand Down
Loading

0 comments on commit c76fba9

Please sign in to comment.