Updated DB_Helper by adding firebase methods.

This commit is contained in:
Batuhan Berk Başoğlu 2020-10-05 16:53:40 -04:00
parent 485cc3bbba
commit c82121d036
1810 changed files with 537281 additions and 1 deletions

View file

@ -0,0 +1,15 @@
# Copyright 2015 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Generated protobuf modules for Google Cloud Bigtable API."""

View file

@ -0,0 +1,321 @@
// Copyright 2016 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package google.bigtable.v2;
import "google/api/annotations.proto";
import "google/bigtable/v2/data.proto";
import "google/protobuf/wrappers.proto";
import "google/rpc/status.proto";
option java_multiple_files = true;
option java_outer_classname = "BigtableProto";
option java_package = "com.google.bigtable.v2";
// Service for reading from and writing to existing Bigtable tables.
service Bigtable {
// Streams back the contents of all requested rows, optionally
// applying the same Reader filter to each. Depending on their size,
// rows and cells may be broken up across multiple responses, but
// atomicity of each row will still be preserved. See the
// ReadRowsResponse documentation for details.
rpc ReadRows(ReadRowsRequest) returns (stream ReadRowsResponse) {
option (google.api.http) = { post: "/v2/{table_name=projects/*/instances/*/tables/*}:readRows" body: "*" };
}
// Returns a sample of row keys in the table. The returned row keys will
// delimit contiguous sections of the table of approximately equal size,
// which can be used to break up the data for distributed tasks like
// mapreduces.
rpc SampleRowKeys(SampleRowKeysRequest) returns (stream SampleRowKeysResponse) {
option (google.api.http) = { get: "/v2/{table_name=projects/*/instances/*/tables/*}:sampleRowKeys" };
}
// Mutates a row atomically. Cells already present in the row are left
// unchanged unless explicitly changed by `mutation`.
rpc MutateRow(MutateRowRequest) returns (MutateRowResponse) {
option (google.api.http) = { post: "/v2/{table_name=projects/*/instances/*/tables/*}:mutateRow" body: "*" };
}
// Mutates multiple rows in a batch. Each individual row is mutated
// atomically as in MutateRow, but the entire batch is not executed
// atomically.
rpc MutateRows(MutateRowsRequest) returns (stream MutateRowsResponse) {
option (google.api.http) = { post: "/v2/{table_name=projects/*/instances/*/tables/*}:mutateRows" body: "*" };
}
// Mutates a row atomically based on the output of a predicate Reader filter.
rpc CheckAndMutateRow(CheckAndMutateRowRequest) returns (CheckAndMutateRowResponse) {
option (google.api.http) = { post: "/v2/{table_name=projects/*/instances/*/tables/*}:checkAndMutateRow" body: "*" };
}
// Modifies a row atomically. The method reads the latest existing timestamp
// and value from the specified columns and writes a new entry based on
// pre-defined read/modify/write rules. The new value for the timestamp is the
// greater of the existing timestamp or the current server time. The method
// returns the new contents of all modified cells.
rpc ReadModifyWriteRow(ReadModifyWriteRowRequest) returns (ReadModifyWriteRowResponse) {
option (google.api.http) = { post: "/v2/{table_name=projects/*/instances/*/tables/*}:readModifyWriteRow" body: "*" };
}
}
// Request message for Bigtable.ReadRows.
message ReadRowsRequest {
// The unique name of the table from which to read.
// Values are of the form
// projects/<project>/instances/<instance>/tables/<table>
string table_name = 1;
// The row keys and/or ranges to read. If not specified, reads from all rows.
RowSet rows = 2;
// The filter to apply to the contents of the specified row(s). If unset,
// reads the entirety of each row.
RowFilter filter = 3;
// The read will terminate after committing to N rows' worth of results. The
// default (zero) is to return all results.
int64 rows_limit = 4;
}
// Response message for Bigtable.ReadRows.
message ReadRowsResponse {
// Specifies a piece of a row's contents returned as part of the read
// response stream.
message CellChunk {
// The row key for this chunk of data. If the row key is empty,
// this CellChunk is a continuation of the same row as the previous
// CellChunk in the response stream, even if that CellChunk was in a
// previous ReadRowsResponse message.
bytes row_key = 1;
// The column family name for this chunk of data. If this message
// is not present this CellChunk is a continuation of the same column
// family as the previous CellChunk. The empty string can occur as a
// column family name in a response so clients must check
// explicitly for the presence of this message, not just for
// `family_name.value` being non-empty.
google.protobuf.StringValue family_name = 2;
// The column qualifier for this chunk of data. If this message
// is not present, this CellChunk is a continuation of the same column
// as the previous CellChunk. Column qualifiers may be empty so
// clients must check for the presence of this message, not just
// for `qualifier.value` being non-empty.
google.protobuf.BytesValue qualifier = 3;
// The cell's stored timestamp, which also uniquely identifies it
// within its column. Values are always expressed in
// microseconds, but individual tables may set a coarser
// granularity to further restrict the allowed values. For
// example, a table which specifies millisecond granularity will
// only allow values of `timestamp_micros` which are multiples of
// 1000. Timestamps are only set in the first CellChunk per cell
// (for cells split into multiple chunks).
int64 timestamp_micros = 4;
// Labels applied to the cell by a
// [RowFilter][google.bigtable.v2.RowFilter]. Labels are only set
// on the first CellChunk per cell.
repeated string labels = 5;
// The value stored in the cell. Cell values can be split across
// multiple CellChunks. In that case only the value field will be
// set in CellChunks after the first: the timestamp and labels
// will only be present in the first CellChunk, even if the first
// CellChunk came in a previous ReadRowsResponse.
bytes value = 6;
// If this CellChunk is part of a chunked cell value and this is
// not the final chunk of that cell, value_size will be set to the
// total length of the cell value. The client can use this size
// to pre-allocate memory to hold the full cell value.
int32 value_size = 7;
oneof row_status {
// Indicates that the client should drop all previous chunks for
// `row_key`, as it will be re-read from the beginning.
bool reset_row = 8;
// Indicates that the client can safely process all previous chunks for
// `row_key`, as its data has been fully read.
bool commit_row = 9;
}
}
repeated CellChunk chunks = 1;
// Optionally the server might return the row key of the last row it
// has scanned. The client can use this to construct a more
// efficient retry request if needed: any row keys or portions of
// ranges less than this row key can be dropped from the request.
// This is primarily useful for cases where the server has read a
// lot of data that was filtered out since the last committed row
// key, allowing the client to skip that work on a retry.
bytes last_scanned_row_key = 2;
}
// Request message for Bigtable.SampleRowKeys.
message SampleRowKeysRequest {
// The unique name of the table from which to sample row keys.
// Values are of the form
// projects/<project>/instances/<instance>/tables/<table>
string table_name = 1;
}
// Response message for Bigtable.SampleRowKeys.
message SampleRowKeysResponse {
// Sorted streamed sequence of sample row keys in the table. The table might
// have contents before the first row key in the list and after the last one,
// but a key containing the empty string indicates "end of table" and will be
// the last response given, if present.
// Note that row keys in this list may not have ever been written to or read
// from, and users should therefore not make any assumptions about the row key
// structure that are specific to their use case.
bytes row_key = 1;
// Approximate total storage space used by all rows in the table which precede
// `row_key`. Buffering the contents of all rows between two subsequent
// samples would require space roughly equal to the difference in their
// `offset_bytes` fields.
int64 offset_bytes = 2;
}
// Request message for Bigtable.MutateRow.
message MutateRowRequest {
// The unique name of the table to which the mutation should be applied.
// Values are of the form
// projects/<project>/instances/<instance>/tables/<table>
string table_name = 1;
// The key of the row to which the mutation should be applied.
bytes row_key = 2;
// Changes to be atomically applied to the specified row. Entries are applied
// in order, meaning that earlier mutations can be masked by later ones.
// Must contain at least one entry and at most 100000.
repeated Mutation mutations = 3;
}
// Response message for Bigtable.MutateRow.
message MutateRowResponse {
}
// Request message for BigtableService.MutateRows.
message MutateRowsRequest {
message Entry {
// The key of the row to which the `mutations` should be applied.
bytes row_key = 1;
// Changes to be atomically applied to the specified row. Mutations are
// applied in order, meaning that earlier mutations can be masked by
// later ones.
// You must specify at least one mutation.
repeated Mutation mutations = 2;
}
// The unique name of the table to which the mutations should be applied.
string table_name = 1;
// The row keys and corresponding mutations to be applied in bulk.
// Each entry is applied as an atomic mutation, but the entries may be
// applied in arbitrary order (even between entries for the same row).
// At least one entry must be specified, and in total the entries can
// contain at most 100000 mutations.
repeated Entry entries = 2;
}
// Response message for BigtableService.MutateRows.
message MutateRowsResponse {
message Entry {
// The index into the original request's `entries` list of the Entry
// for which a result is being reported.
int64 index = 1;
// The result of the request Entry identified by `index`.
// Depending on how requests are batched during execution, it is possible
// for one Entry to fail due to an error with another Entry. In the event
// that this occurs, the same error will be reported for both entries.
google.rpc.Status status = 2;
}
// One or more results for Entries from the batch request.
repeated Entry entries = 1;
}
// Request message for Bigtable.CheckAndMutateRow.
message CheckAndMutateRowRequest {
// The unique name of the table to which the conditional mutation should be
// applied.
// Values are of the form
// projects/<project>/instances/<instance>/tables/<table>
string table_name = 1;
// The key of the row to which the conditional mutation should be applied.
bytes row_key = 2;
// The filter to be applied to the contents of the specified row. Depending
// on whether or not any results are yielded, either `true_mutations` or
// `false_mutations` will be executed. If unset, checks that the row contains
// any values at all.
RowFilter predicate_filter = 6;
// Changes to be atomically applied to the specified row if `predicate_filter`
// yields at least one cell when applied to `row_key`. Entries are applied in
// order, meaning that earlier mutations can be masked by later ones.
// Must contain at least one entry if `false_mutations` is empty, and at most
// 100000.
repeated Mutation true_mutations = 4;
// Changes to be atomically applied to the specified row if `predicate_filter`
// does not yield any cells when applied to `row_key`. Entries are applied in
// order, meaning that earlier mutations can be masked by later ones.
// Must contain at least one entry if `true_mutations` is empty, and at most
// 100000.
repeated Mutation false_mutations = 5;
}
// Response message for Bigtable.CheckAndMutateRow.
message CheckAndMutateRowResponse {
// Whether or not the request's `predicate_filter` yielded any results for
// the specified row.
bool predicate_matched = 1;
}
// Request message for Bigtable.ReadModifyWriteRow.
message ReadModifyWriteRowRequest {
// The unique name of the table to which the read/modify/write rules should be
// applied.
// Values are of the form
// projects/<project>/instances/<instance>/tables/<table>
string table_name = 1;
// The key of the row to which the read/modify/write rules should be applied.
bytes row_key = 2;
// Rules specifying how the specified row's contents are to be transformed
// into writes. Entries are applied in order, meaning that earlier rules will
// affect the results of later ones.
repeated ReadModifyWriteRule rules = 3;
}
// Response message for Bigtable.ReadModifyWriteRow.
message ReadModifyWriteRowResponse {
// A Row containing the new contents of all cells modified by the request.
Row row = 1;
}

View file

@ -0,0 +1,232 @@
// Copyright 2016 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package google.bigtable.admin.v2;
import "google/api/annotations.proto";
import "google/bigtable/admin/v2/instance.proto";
import "google/longrunning/operations.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/timestamp.proto";
option java_multiple_files = true;
option java_outer_classname = "BigtableInstanceAdminProto";
option java_package = "com.google.bigtable.admin.v2";
// Service for creating, configuring, and deleting Cloud Bigtable Instances and
// Clusters. Provides access to the Instance and Cluster schemas only, not the
// tables metadata or data stored in those tables.
service BigtableInstanceAdmin {
// Create an instance within a project.
rpc CreateInstance(CreateInstanceRequest) returns (google.longrunning.Operation) {
option (google.api.http) = { post: "/v2/{parent=projects/*}/instances" body: "*" };
}
// Gets information about an instance.
rpc GetInstance(GetInstanceRequest) returns (Instance) {
option (google.api.http) = { get: "/v2/{name=projects/*/instances/*}" };
}
// Lists information about instances in a project.
rpc ListInstances(ListInstancesRequest) returns (ListInstancesResponse) {
option (google.api.http) = { get: "/v2/{parent=projects/*}/instances" };
}
// Updates an instance within a project.
rpc UpdateInstance(Instance) returns (Instance) {
option (google.api.http) = { put: "/v2/{name=projects/*/instances/*}" body: "*" };
}
// Delete an instance from a project.
rpc DeleteInstance(DeleteInstanceRequest) returns (google.protobuf.Empty) {
option (google.api.http) = { delete: "/v2/{name=projects/*/instances/*}" };
}
// Creates a cluster within an instance.
rpc CreateCluster(CreateClusterRequest) returns (google.longrunning.Operation) {
option (google.api.http) = { post: "/v2/{parent=projects/*/instances/*}/clusters" body: "cluster" };
}
// Gets information about a cluster.
rpc GetCluster(GetClusterRequest) returns (Cluster) {
option (google.api.http) = { get: "/v2/{name=projects/*/instances/*/clusters/*}" };
}
// Lists information about clusters in an instance.
rpc ListClusters(ListClustersRequest) returns (ListClustersResponse) {
option (google.api.http) = { get: "/v2/{parent=projects/*/instances/*}/clusters" };
}
// Updates a cluster within an instance.
rpc UpdateCluster(Cluster) returns (google.longrunning.Operation) {
option (google.api.http) = { put: "/v2/{name=projects/*/instances/*/clusters/*}" body: "*" };
}
// Deletes a cluster from an instance.
rpc DeleteCluster(DeleteClusterRequest) returns (google.protobuf.Empty) {
option (google.api.http) = { delete: "/v2/{name=projects/*/instances/*/clusters/*}" };
}
}
// Request message for BigtableInstanceAdmin.CreateInstance.
message CreateInstanceRequest {
// The unique name of the project in which to create the new instance.
// Values are of the form projects/<project>
string parent = 1;
// The id to be used when referring to the new instance within its project,
// e.g. just the "myinstance" section of the full name
// "projects/myproject/instances/myinstance"
string instance_id = 2;
// The instance to create.
// Fields marked "@OutputOnly" must be left blank.
Instance instance = 3;
// The clusters to be created within the instance, mapped by desired
// cluster ID (e.g. just the "mycluster" part of the full name
// "projects/myproject/instances/myinstance/clusters/mycluster").
// Fields marked "@OutputOnly" must be left blank.
// Currently exactly one cluster must be specified.
map<string, Cluster> clusters = 4;
}
// Request message for BigtableInstanceAdmin.GetInstance.
message GetInstanceRequest {
// The unique name of the requested instance. Values are of the form
// projects/<project>/instances/<instance>
string name = 1;
}
// Request message for BigtableInstanceAdmin.ListInstances.
message ListInstancesRequest {
// The unique name of the project for which a list of instances is requested.
// Values are of the form projects/<project>
string parent = 1;
// The value of `next_page_token` returned by a previous call.
string page_token = 2;
}
// Response message for BigtableInstanceAdmin.ListInstances.
message ListInstancesResponse {
// The list of requested instances.
repeated Instance instances = 1;
// Locations from which Instance information could not be retrieved,
// due to an outage or some other transient condition.
// Instances whose Clusters are all in one of the failed locations
// may be missing from 'instances', and Instances with at least one
// Cluster in a failed location may only have partial information returned.
repeated string failed_locations = 2;
// Set if not all instances could be returned in a single response.
// Pass this value to `page_token` in another request to get the next
// page of results.
string next_page_token = 3;
}
// Request message for BigtableInstanceAdmin.DeleteInstance.
message DeleteInstanceRequest {
// The unique name of the instance to be deleted.
// Values are of the form projects/<project>/instances/<instance>
string name = 1;
}
// Request message for BigtableInstanceAdmin.CreateCluster.
message CreateClusterRequest {
// The unique name of the instance in which to create the new cluster.
// Values are of the form
// projects/<project>/instances/<instance>/clusters/[a-z][-a-z0-9]*
string parent = 1;
// The id to be used when referring to the new cluster within its instance,
// e.g. just the "mycluster" section of the full name
// "projects/myproject/instances/myinstance/clusters/mycluster"
string cluster_id = 2;
// The cluster to be created.
// Fields marked "@OutputOnly" must be left blank.
Cluster cluster = 3;
}
// Request message for BigtableInstanceAdmin.GetCluster.
message GetClusterRequest {
// The unique name of the requested cluster. Values are of the form
// projects/<project>/instances/<instance>/clusters/<cluster>
string name = 1;
}
// Request message for BigtableInstanceAdmin.ListClusters.
message ListClustersRequest {
// The unique name of the instance for which a list of clusters is requested.
// Values are of the form projects/<project>/instances/<instance>
// Use <instance> = '-' to list Clusters for all Instances in a project,
// for example "projects/myproject/instances/-"
string parent = 1;
// The value of `next_page_token` returned by a previous call.
string page_token = 2;
}
// Response message for BigtableInstanceAdmin.ListClusters.
message ListClustersResponse {
// The list of requested clusters.
repeated Cluster clusters = 1;
// Locations from which Cluster information could not be retrieved,
// due to an outage or some other transient condition.
// Clusters from these locations may be missing from 'clusters',
// or may only have partial information returned.
repeated string failed_locations = 2;
// Set if not all clusters could be returned in a single response.
// Pass this value to `page_token` in another request to get the next
// page of results.
string next_page_token = 3;
}
// Request message for BigtableInstanceAdmin.DeleteCluster.
message DeleteClusterRequest {
// The unique name of the cluster to be deleted. Values are of the form
// projects/<project>/instances/<instance>/clusters/<cluster>
string name = 1;
}
// The metadata for the Operation returned by CreateInstance.
message CreateInstanceMetadata {
// The request that prompted the initiation of this CreateInstance operation.
CreateInstanceRequest original_request = 1;
// The time at which the original request was received.
google.protobuf.Timestamp request_time = 2;
// The time at which the operation failed or was completed successfully.
google.protobuf.Timestamp finish_time = 3;
}
// The metadata for the Operation returned by UpdateCluster.
message UpdateClusterMetadata {
// The request that prompted the initiation of this UpdateCluster operation.
Cluster original_request = 1;
// The time at which the original request was received.
google.protobuf.Timestamp request_time = 2;
// The time at which the operation failed or was completed successfully.
google.protobuf.Timestamp finish_time = 3;
}

View file

@ -0,0 +1,195 @@
// Copyright 2016 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package google.bigtable.admin.v2;
import "google/api/annotations.proto";
import "google/bigtable/admin/v2/table.proto";
import "google/protobuf/empty.proto";
option java_multiple_files = true;
option java_outer_classname = "BigtableTableAdminProto";
option java_package = "com.google.bigtable.admin.v2";
// Service for creating, configuring, and deleting Cloud Bigtable tables.
// Provides access to the table schemas only, not the data stored within
// the tables.
service BigtableTableAdmin {
// Creates a new table in the specified instance.
// The table can be created with a full set of initial column families,
// specified in the request.
rpc CreateTable(CreateTableRequest) returns (Table) {
option (google.api.http) = { post: "/v2/{parent=projects/*/instances/*}/tables" body: "*" };
}
// Lists all tables served from a specified instance.
rpc ListTables(ListTablesRequest) returns (ListTablesResponse) {
option (google.api.http) = { get: "/v2/{parent=projects/*/instances/*}/tables" };
}
// Gets metadata information about the specified table.
rpc GetTable(GetTableRequest) returns (Table) {
option (google.api.http) = { get: "/v2/{name=projects/*/instances/*/tables/*}" };
}
// Permanently deletes a specified table and all of its data.
rpc DeleteTable(DeleteTableRequest) returns (google.protobuf.Empty) {
option (google.api.http) = { delete: "/v2/{name=projects/*/instances/*/tables/*}" };
}
// Atomically performs a series of column family modifications
// on the specified table.
rpc ModifyColumnFamilies(ModifyColumnFamiliesRequest) returns (Table) {
option (google.api.http) = { post: "/v2/{name=projects/*/instances/*/tables/*}:modifyColumnFamilies" body: "*" };
}
// Permanently drop/delete a row range from a specified table. The request can
// specify whether to delete all rows in a table, or only those that match a
// particular prefix.
rpc DropRowRange(DropRowRangeRequest) returns (google.protobuf.Empty) {
option (google.api.http) = { post: "/v2/{name=projects/*/instances/*/tables/*}:dropRowRange" body: "*" };
}
}
// Request message for [google.bigtable.admin.v2.BigtableTableAdmin.CreateTable][google.bigtable.admin.v2.BigtableTableAdmin.CreateTable]
message CreateTableRequest {
// An initial split point for a newly created table.
message Split {
// Row key to use as an initial tablet boundary.
bytes key = 1;
}
// The unique name of the instance in which to create the table.
// Values are of the form projects/<project>/instances/<instance>
string parent = 1;
// The name by which the new table should be referred to within the parent
// instance, e.g. "foobar" rather than "<parent>/tables/foobar".
string table_id = 2;
// The Table to create.
Table table = 3;
// The optional list of row keys that will be used to initially split the
// table into several tablets (Tablets are similar to HBase regions).
// Given two split keys, "s1" and "s2", three tablets will be created,
// spanning the key ranges: [, s1), [s1, s2), [s2, ).
//
// Example:
// * Row keys := ["a", "apple", "custom", "customer_1", "customer_2",
// "other", "zz"]
// * initial_split_keys := ["apple", "customer_1", "customer_2", "other"]
// * Key assignment:
// - Tablet 1 [, apple) => {"a"}.
// - Tablet 2 [apple, customer_1) => {"apple", "custom"}.
// - Tablet 3 [customer_1, customer_2) => {"customer_1"}.
// - Tablet 4 [customer_2, other) => {"customer_2"}.
// - Tablet 5 [other, ) => {"other", "zz"}.
repeated Split initial_splits = 4;
}
// Request message for [google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange][google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange]
message DropRowRangeRequest {
// The unique name of the table on which to drop a range of rows.
// Values are of the form projects/<project>/instances/<instance>/tables/<table>
string name = 1;
oneof target {
// Delete all rows that start with this row key prefix. Prefix cannot be
// zero length.
bytes row_key_prefix = 2;
// Delete all rows in the table. Setting this to false is a no-op.
bool delete_all_data_from_table = 3;
}
}
// Request message for [google.bigtable.admin.v2.BigtableTableAdmin.ListTables][google.bigtable.admin.v2.BigtableTableAdmin.ListTables]
message ListTablesRequest {
// The unique name of the instance for which tables should be listed.
// Values are of the form projects/<project>/instances/<instance>
string parent = 1;
// The view to be applied to the returned tables' fields.
// Defaults to NAME_ONLY if unspecified (no others are currently supported).
Table.View view = 2;
// The value of `next_page_token` returned by a previous call.
string page_token = 3;
}
// Response message for [google.bigtable.admin.v2.BigtableTableAdmin.ListTables][google.bigtable.admin.v2.BigtableTableAdmin.ListTables]
message ListTablesResponse {
// The tables present in the requested cluster.
repeated Table tables = 1;
// Set if not all tables could be returned in a single response.
// Pass this value to `page_token` in another request to get the next
// page of results.
string next_page_token = 2;
}
// Request message for [google.bigtable.admin.v2.BigtableTableAdmin.GetTable][google.bigtable.admin.v2.BigtableTableAdmin.GetTable]
message GetTableRequest {
// The unique name of the requested table.
// Values are of the form projects/<project>/instances/<instance>/tables/<table>
string name = 1;
// The view to be applied to the returned table's fields.
// Defaults to SCHEMA_ONLY if unspecified.
Table.View view = 2;
}
// Request message for [google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable]
message DeleteTableRequest {
// The unique name of the table to be deleted.
// Values are of the form projects/<project>/instances/<instance>/tables/<table>
string name = 1;
}
// Request message for [google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies][google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies]
message ModifyColumnFamiliesRequest {
// A create, update, or delete of a particular column family.
message Modification {
// The ID of the column family to be modified.
string id = 1;
oneof mod {
// Create a new column family with the specified schema, or fail if
// one already exists with the given ID.
ColumnFamily create = 2;
// Update an existing column family to the specified schema, or fail
// if no column family exists with the given ID.
ColumnFamily update = 3;
// Drop (delete) the column family with the given ID, or fail if no such
// family exists.
bool drop = 4;
}
}
// The unique name of the table whose families should be modified.
// Values are of the form projects/<project>/instances/<instance>/tables/<table>
string name = 1;
// Modifications to be atomically applied to the specified table's families.
// Entries are applied in order, meaning that earlier modifications can be
// masked by later ones (in the case of repeated updates to the same family,
// for example).
repeated Modification modifications = 2;
}

View file

@ -0,0 +1,37 @@
// Copyright 2016 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package google.bigtable.admin.v2;
import "google/api/annotations.proto";
import "google/protobuf/timestamp.proto";
option java_multiple_files = true;
option java_outer_classname = "CommonProto";
option java_package = "com.google.bigtable.admin.v2";
// Storage media types for persisting Bigtable data.
enum StorageType {
// The user did not specify a storage type.
STORAGE_TYPE_UNSPECIFIED = 0;
// Flash (SSD) storage should be used.
SSD = 1;
// Magnetic drive (HDD) storage should be used.
HDD = 2;
}

View file

@ -0,0 +1,532 @@
// Copyright 2016 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package google.bigtable.v2;
option java_multiple_files = true;
option java_outer_classname = "DataProto";
option java_package = "com.google.bigtable.v2";
// Specifies the complete (requested) contents of a single row of a table.
// Rows which exceed 256MiB in size cannot be read in full.
message Row {
// The unique key which identifies this row within its table. This is the same
// key that's used to identify the row in, for example, a MutateRowRequest.
// May contain any non-empty byte string up to 4KiB in length.
bytes key = 1;
// May be empty, but only if the entire row is empty.
// The mutual ordering of column families is not specified.
repeated Family families = 2;
}
// Specifies (some of) the contents of a single row/column family intersection
// of a table.
message Family {
// The unique key which identifies this family within its row. This is the
// same key that's used to identify the family in, for example, a RowFilter
// which sets its "family_name_regex_filter" field.
// Must match `[-_.a-zA-Z0-9]+`, except that AggregatingRowProcessors may
// produce cells in a sentinel family with an empty name.
// Must be no greater than 64 characters in length.
string name = 1;
// Must not be empty. Sorted in order of increasing "qualifier".
repeated Column columns = 2;
}
// Specifies (some of) the contents of a single row/column intersection of a
// table.
message Column {
// The unique key which identifies this column within its family. This is the
// same key that's used to identify the column in, for example, a RowFilter
// which sets its `column_qualifier_regex_filter` field.
// May contain any byte string, including the empty string, up to 16kiB in
// length.
bytes qualifier = 1;
// Must not be empty. Sorted in order of decreasing "timestamp_micros".
repeated Cell cells = 2;
}
// Specifies (some of) the contents of a single row/column/timestamp of a table.
message Cell {
// The cell's stored timestamp, which also uniquely identifies it within
// its column.
// Values are always expressed in microseconds, but individual tables may set
// a coarser granularity to further restrict the allowed values. For
// example, a table which specifies millisecond granularity will only allow
// values of `timestamp_micros` which are multiples of 1000.
int64 timestamp_micros = 1;
// The value stored in the cell.
// May contain any byte string, including the empty string, up to 100MiB in
// length.
bytes value = 2;
// Labels applied to the cell by a [RowFilter][google.bigtable.v2.RowFilter].
repeated string labels = 3;
}
// Specifies a contiguous range of rows.
message RowRange {
// The row key at which to start the range.
// If neither field is set, interpreted as the empty string, inclusive.
oneof start_key {
// Used when giving an inclusive lower bound for the range.
bytes start_key_closed = 1;
// Used when giving an exclusive lower bound for the range.
bytes start_key_open = 2;
}
// The row key at which to end the range.
// If neither field is set, interpreted as the infinite row key, exclusive.
oneof end_key {
// Used when giving an inclusive upper bound for the range.
bytes end_key_open = 3;
// Used when giving an exclusive upper bound for the range.
bytes end_key_closed = 4;
}
}
// Specifies a non-contiguous set of rows.
message RowSet {
// Single rows included in the set.
repeated bytes row_keys = 1;
// Contiguous row ranges included in the set.
repeated RowRange row_ranges = 2;
}
// Specifies a contiguous range of columns within a single column family.
// The range spans from &lt;column_family&gt;:&lt;start_qualifier&gt; to
// &lt;column_family&gt;:&lt;end_qualifier&gt;, where both bounds can be either
// inclusive or exclusive.
message ColumnRange {
// The name of the column family within which this range falls.
string family_name = 1;
// The column qualifier at which to start the range (within `column_family`).
// If neither field is set, interpreted as the empty string, inclusive.
oneof start_qualifier {
// Used when giving an inclusive lower bound for the range.
bytes start_qualifier_closed = 2;
// Used when giving an exclusive lower bound for the range.
bytes start_qualifier_open = 3;
}
// The column qualifier at which to end the range (within `column_family`).
// If neither field is set, interpreted as the infinite string, exclusive.
oneof end_qualifier {
// Used when giving an inclusive upper bound for the range.
bytes end_qualifier_closed = 4;
// Used when giving an exclusive upper bound for the range.
bytes end_qualifier_open = 5;
}
}
// Specified a contiguous range of microsecond timestamps.
message TimestampRange {
// Inclusive lower bound. If left empty, interpreted as 0.
int64 start_timestamp_micros = 1;
// Exclusive upper bound. If left empty, interpreted as infinity.
int64 end_timestamp_micros = 2;
}
// Specifies a contiguous range of raw byte values.
message ValueRange {
// The value at which to start the range.
// If neither field is set, interpreted as the empty string, inclusive.
oneof start_value {
// Used when giving an inclusive lower bound for the range.
bytes start_value_closed = 1;
// Used when giving an exclusive lower bound for the range.
bytes start_value_open = 2;
}
// The value at which to end the range.
// If neither field is set, interpreted as the infinite string, exclusive.
oneof end_value {
// Used when giving an inclusive upper bound for the range.
bytes end_value_closed = 3;
// Used when giving an exclusive upper bound for the range.
bytes end_value_open = 4;
}
}
// Takes a row as input and produces an alternate view of the row based on
// specified rules. For example, a RowFilter might trim down a row to include
// just the cells from columns matching a given regular expression, or might
// return all the cells of a row but not their values. More complicated filters
// can be composed out of these components to express requests such as, "within
// every column of a particular family, give just the two most recent cells
// which are older than timestamp X."
//
// There are two broad categories of RowFilters (true filters and transformers),
// as well as two ways to compose simple filters into more complex ones
// (chains and interleaves). They work as follows:
//
// * True filters alter the input row by excluding some of its cells wholesale
// from the output row. An example of a true filter is the `value_regex_filter`,
// which excludes cells whose values don't match the specified pattern. All
// regex true filters use RE2 syntax (https://github.com/google/re2/wiki/Syntax)
// in raw byte mode (RE2::Latin1), and are evaluated as full matches. An
// important point to keep in mind is that `RE2(.)` is equivalent by default to
// `RE2([^\n])`, meaning that it does not match newlines. When attempting to
// match an arbitrary byte, you should therefore use the escape sequence `\C`,
// which may need to be further escaped as `\\C` in your client language.
//
// * Transformers alter the input row by changing the values of some of its
// cells in the output, without excluding them completely. Currently, the only
// supported transformer is the `strip_value_transformer`, which replaces every
// cell's value with the empty string.
//
// * Chains and interleaves are described in more detail in the
// RowFilter.Chain and RowFilter.Interleave documentation.
//
// The total serialized size of a RowFilter message must not
// exceed 4096 bytes, and RowFilters may not be nested within each other
// (in Chains or Interleaves) to a depth of more than 20.
message RowFilter {
// A RowFilter which sends rows through several RowFilters in sequence.
message Chain {
// The elements of "filters" are chained together to process the input row:
// in row -> f(0) -> intermediate row -> f(1) -> ... -> f(N) -> out row
// The full chain is executed atomically.
repeated RowFilter filters = 1;
}
// A RowFilter which sends each row to each of several component
// RowFilters and interleaves the results.
message Interleave {
// The elements of "filters" all process a copy of the input row, and the
// results are pooled, sorted, and combined into a single output row.
// If multiple cells are produced with the same column and timestamp,
// they will all appear in the output row in an unspecified mutual order.
// Consider the following example, with three filters:
//
// input row
// |
// -----------------------------------------------------
// | | |
// f(0) f(1) f(2)
// | | |
// 1: foo,bar,10,x foo,bar,10,z far,bar,7,a
// 2: foo,blah,11,z far,blah,5,x far,blah,5,x
// | | |
// -----------------------------------------------------
// |
// 1: foo,bar,10,z // could have switched with #2
// 2: foo,bar,10,x // could have switched with #1
// 3: foo,blah,11,z
// 4: far,bar,7,a
// 5: far,blah,5,x // identical to #6
// 6: far,blah,5,x // identical to #5
//
// All interleaved filters are executed atomically.
repeated RowFilter filters = 1;
}
// A RowFilter which evaluates one of two possible RowFilters, depending on
// whether or not a predicate RowFilter outputs any cells from the input row.
//
// IMPORTANT NOTE: The predicate filter does not execute atomically with the
// true and false filters, which may lead to inconsistent or unexpected
// results. Additionally, Condition filters have poor performance, especially
// when filters are set for the false condition.
message Condition {
// If `predicate_filter` outputs any cells, then `true_filter` will be
// evaluated on the input row. Otherwise, `false_filter` will be evaluated.
RowFilter predicate_filter = 1;
// The filter to apply to the input row if `predicate_filter` returns any
// results. If not provided, no results will be returned in the true case.
RowFilter true_filter = 2;
// The filter to apply to the input row if `predicate_filter` does not
// return any results. If not provided, no results will be returned in the
// false case.
RowFilter false_filter = 3;
}
// Which of the possible RowFilter types to apply. If none are set, this
// RowFilter returns all cells in the input row.
oneof filter {
// Applies several RowFilters to the data in sequence, progressively
// narrowing the results.
Chain chain = 1;
// Applies several RowFilters to the data in parallel and combines the
// results.
Interleave interleave = 2;
// Applies one of two possible RowFilters to the data based on the output of
// a predicate RowFilter.
Condition condition = 3;
// ADVANCED USE ONLY.
// Hook for introspection into the RowFilter. Outputs all cells directly to
// the output of the read rather than to any parent filter. Consider the
// following example:
//
// Chain(
// FamilyRegex("A"),
// Interleave(
// All(),
// Chain(Label("foo"), Sink())
// ),
// QualifierRegex("B")
// )
//
// A,A,1,w
// A,B,2,x
// B,B,4,z
// |
// FamilyRegex("A")
// |
// A,A,1,w
// A,B,2,x
// |
// +------------+-------------+
// | |
// All() Label(foo)
// | |
// A,A,1,w A,A,1,w,labels:[foo]
// A,B,2,x A,B,2,x,labels:[foo]
// | |
// | Sink() --------------+
// | | |
// +------------+ x------+ A,A,1,w,labels:[foo]
// | A,B,2,x,labels:[foo]
// A,A,1,w |
// A,B,2,x |
// | |
// QualifierRegex("B") |
// | |
// A,B,2,x |
// | |
// +--------------------------------+
// |
// A,A,1,w,labels:[foo]
// A,B,2,x,labels:[foo] // could be switched
// A,B,2,x // could be switched
//
// Despite being excluded by the qualifier filter, a copy of every cell
// that reaches the sink is present in the final result.
//
// As with an [Interleave][google.bigtable.v2.RowFilter.Interleave],
// duplicate cells are possible, and appear in an unspecified mutual order.
// In this case we have a duplicate with column "A:B" and timestamp 2,
// because one copy passed through the all filter while the other was
// passed through the label and sink. Note that one copy has label "foo",
// while the other does not.
//
// Cannot be used within the `predicate_filter`, `true_filter`, or
// `false_filter` of a [Condition][google.bigtable.v2.RowFilter.Condition].
bool sink = 16;
// Matches all cells, regardless of input. Functionally equivalent to
// leaving `filter` unset, but included for completeness.
bool pass_all_filter = 17;
// Does not match any cells, regardless of input. Useful for temporarily
// disabling just part of a filter.
bool block_all_filter = 18;
// Matches only cells from rows whose keys satisfy the given RE2 regex. In
// other words, passes through the entire row when the key matches, and
// otherwise produces an empty row.
// Note that, since row keys can contain arbitrary bytes, the `\C` escape
// sequence must be used if a true wildcard is desired. The `.` character
// will not match the new line character `\n`, which may be present in a
// binary key.
bytes row_key_regex_filter = 4;
// Matches all cells from a row with probability p, and matches no cells
// from the row with probability 1-p.
double row_sample_filter = 14;
// Matches only cells from columns whose families satisfy the given RE2
// regex. For technical reasons, the regex must not contain the `:`
// character, even if it is not being used as a literal.
// Note that, since column families cannot contain the new line character
// `\n`, it is sufficient to use `.` as a full wildcard when matching
// column family names.
string family_name_regex_filter = 5;
// Matches only cells from columns whose qualifiers satisfy the given RE2
// regex.
// Note that, since column qualifiers can contain arbitrary bytes, the `\C`
// escape sequence must be used if a true wildcard is desired. The `.`
// character will not match the new line character `\n`, which may be
// present in a binary qualifier.
bytes column_qualifier_regex_filter = 6;
// Matches only cells from columns within the given range.
ColumnRange column_range_filter = 7;
// Matches only cells with timestamps within the given range.
TimestampRange timestamp_range_filter = 8;
// Matches only cells with values that satisfy the given regular expression.
// Note that, since cell values can contain arbitrary bytes, the `\C` escape
// sequence must be used if a true wildcard is desired. The `.` character
// will not match the new line character `\n`, which may be present in a
// binary value.
bytes value_regex_filter = 9;
// Matches only cells with values that fall within the given range.
ValueRange value_range_filter = 15;
// Skips the first N cells of each row, matching all subsequent cells.
// If duplicate cells are present, as is possible when using an Interleave,
// each copy of the cell is counted separately.
int32 cells_per_row_offset_filter = 10;
// Matches only the first N cells of each row.
// If duplicate cells are present, as is possible when using an Interleave,
// each copy of the cell is counted separately.
int32 cells_per_row_limit_filter = 11;
// Matches only the most recent N cells within each column. For example,
// if N=2, this filter would match column `foo:bar` at timestamps 10 and 9,
// skip all earlier cells in `foo:bar`, and then begin matching again in
// column `foo:bar2`.
// If duplicate cells are present, as is possible when using an Interleave,
// each copy of the cell is counted separately.
int32 cells_per_column_limit_filter = 12;
// Replaces each cell's value with the empty string.
bool strip_value_transformer = 13;
// Applies the given label to all cells in the output row. This allows
// the client to determine which results were produced from which part of
// the filter.
//
// Values must be at most 15 characters in length, and match the RE2
// pattern `[a-z0-9\\-]+`
//
// Due to a technical limitation, it is not currently possible to apply
// multiple labels to a cell. As a result, a Chain may have no more than
// one sub-filter which contains a `apply_label_transformer`. It is okay for
// an Interleave to contain multiple `apply_label_transformers`, as they
// will be applied to separate copies of the input. This may be relaxed in
// the future.
string apply_label_transformer = 19;
}
}
// Specifies a particular change to be made to the contents of a row.
message Mutation {
// A Mutation which sets the value of the specified cell.
message SetCell {
// The name of the family into which new data should be written.
// Must match `[-_.a-zA-Z0-9]+`
string family_name = 1;
// The qualifier of the column into which new data should be written.
// Can be any byte string, including the empty string.
bytes column_qualifier = 2;
// The timestamp of the cell into which new data should be written.
// Use -1 for current Bigtable server time.
// Otherwise, the client should set this value itself, noting that the
// default value is a timestamp of zero if the field is left unspecified.
// Values must match the granularity of the table (e.g. micros, millis).
int64 timestamp_micros = 3;
// The value to be written into the specified cell.
bytes value = 4;
}
// A Mutation which deletes cells from the specified column, optionally
// restricting the deletions to a given timestamp range.
message DeleteFromColumn {
// The name of the family from which cells should be deleted.
// Must match `[-_.a-zA-Z0-9]+`
string family_name = 1;
// The qualifier of the column from which cells should be deleted.
// Can be any byte string, including the empty string.
bytes column_qualifier = 2;
// The range of timestamps within which cells should be deleted.
TimestampRange time_range = 3;
}
// A Mutation which deletes all cells from the specified column family.
message DeleteFromFamily {
// The name of the family from which cells should be deleted.
// Must match `[-_.a-zA-Z0-9]+`
string family_name = 1;
}
// A Mutation which deletes all cells from the containing row.
message DeleteFromRow {
}
// Which of the possible Mutation types to apply.
oneof mutation {
// Set a cell's value.
SetCell set_cell = 1;
// Deletes cells from a column.
DeleteFromColumn delete_from_column = 2;
// Deletes cells from a column family.
DeleteFromFamily delete_from_family = 3;
// Deletes cells from the entire row.
DeleteFromRow delete_from_row = 4;
}
}
// Specifies an atomic read/modify/write operation on the latest value of the
// specified column.
message ReadModifyWriteRule {
// The name of the family to which the read/modify/write should be applied.
// Must match `[-_.a-zA-Z0-9]+`
string family_name = 1;
// The qualifier of the column to which the read/modify/write should be
// applied.
// Can be any byte string, including the empty string.
bytes column_qualifier = 2;
// The rule used to determine the column's new latest value from its current
// latest value.
oneof rule {
// Rule specifying that `append_value` be appended to the existing value.
// If the targeted cell is unset, it will be treated as containing the
// empty string.
bytes append_value = 3;
// Rule specifying that `increment_amount` be added to the existing value.
// If the targeted cell is unset, it will be treated as containing a zero.
// Otherwise, the targeted cell must contain an 8-byte value (interpreted
// as a 64-bit big-endian signed integer), or the entire request will fail.
int64 increment_amount = 4;
}
}

View file

@ -0,0 +1,113 @@
// Copyright 2016 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package google.bigtable.admin.v2;
import "google/api/annotations.proto";
import "google/bigtable/admin/v2/common.proto";
option java_multiple_files = true;
option java_outer_classname = "InstanceProto";
option java_package = "com.google.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
// [Cluster][google.bigtable.admin.v2.Cluster].
message Instance {
// Possible states of an instance.
enum State {
// The state of the instance could not be determined.
STATE_NOT_KNOWN = 0;
// The instance has been successfully created and can serve requests
// to its tables.
READY = 1;
// The instance is currently being created, and may be destroyed
// if the creation process encounters an error.
CREATING = 2;
}
// @OutputOnly
// The unique name of the instance. Values are of the form
// projects/<project>/instances/[a-z][a-z0-9\\-]+[a-z0-9]
string name = 1;
// The descriptive name for this instance as it appears in UIs.
// Can be changed at any time, but should be kept globally unique
// to avoid confusion.
string display_name = 2;
//
// The current state of the instance.
State state = 3;
}
// A resizable group of nodes in a particular cloud location, capable
// of serving all [Tables][google.bigtable.admin.v2.Table] in the parent
// [Instance][google.bigtable.admin.v2.Instance].
message Cluster {
// Possible states of a cluster.
enum State {
// The state of the cluster could not be determined.
STATE_NOT_KNOWN = 0;
// The cluster has been successfully created and is ready to serve requests.
READY = 1;
// The cluster is currently being created, and may be destroyed
// if the creation process encounters an error.
// A cluster may not be able to serve requests while being created.
CREATING = 2;
// The cluster is currently being resized, and may revert to its previous
// node count if the process encounters an error.
// A cluster is still capable of serving requests while being resized,
// but may exhibit performance as if its number of allocated nodes is
// between the starting and requested states.
RESIZING = 3;
// The cluster has no backing nodes. The data (tables) still
// exist, but no operations can be performed on the cluster.
DISABLED = 4;
}
// @OutputOnly
// The unique name of the cluster. Values are of the form
// projects/<project>/instances/<instance>/clusters/[a-z][-a-z0-9]*
string name = 1;
// @CreationOnly
// The location where this cluster's nodes and storage reside. For best
// performance, clients should be located as close as possible to this cluster.
// Currently only zones are supported, e.g. projects/*/locations/us-central1-b
string location = 2;
// @OutputOnly
// The current state of the cluster.
State state = 3;
// The number of nodes allocated to this cluster. More nodes enable higher
// throughput and more consistent performance.
int32 serve_nodes = 4;
// @CreationOnly
// The type of storage used by this cluster to serve its
// parent instance's tables, unless explicitly overridden.
StorageType default_storage_type = 5;
}

View file

@ -0,0 +1,144 @@
// Copyright (c) 2015, Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package google.longrunning;
import "google/api/annotations.proto";
import "google/protobuf/any.proto";
import "google/protobuf/empty.proto";
import "google/rpc/status.proto";
option java_multiple_files = true;
option java_outer_classname = "OperationsProto";
option java_package = "com.google.longrunning";
// Manages long-running operations with an API service.
//
// When an API method normally takes long time to complete, it can be designed
// to return [Operation][google.longrunning.Operation] to the client, and the client can use this
// interface to receive the real response asynchronously by polling the
// operation resource, or using `google.watcher.v1.Watcher` interface to watch
// the response, or pass the operation resource to another API (such as Google
// Cloud Pub/Sub API) to receive the response. Any API service that returns
// long-running operations should implement the `Operations` interface so
// developers can have a consistent client experience.
service Operations {
// Gets the latest state of a long-running operation. Clients may use this
// method to poll the operation result at intervals as recommended by the API
// service.
rpc GetOperation(GetOperationRequest) returns (Operation) {
option (google.api.http) = { get: "/v1/{name=operations/**}" };
}
// Lists operations that match the specified filter in the request. If the
// server doesn't support this method, it returns
// `google.rpc.Code.UNIMPLEMENTED`.
rpc ListOperations(ListOperationsRequest) returns (ListOperationsResponse) {
option (google.api.http) = { get: "/v1/{name=operations}" };
}
// Starts asynchronous cancellation on a long-running operation. The server
// makes a best effort to cancel the operation, but success is not
// guaranteed. If the server doesn't support this method, it returns
// `google.rpc.Code.UNIMPLEMENTED`. Clients may use
// [Operations.GetOperation] or other methods to check whether the
// cancellation succeeded or the operation completed despite cancellation.
rpc CancelOperation(CancelOperationRequest) returns (google.protobuf.Empty) {
option (google.api.http) = { post: "/v1/{name=operations/**}:cancel" body: "*" };
}
// Deletes a long-running operation. It indicates the client is no longer
// interested in the operation result. It does not cancel the operation.
rpc DeleteOperation(DeleteOperationRequest) returns (google.protobuf.Empty) {
option (google.api.http) = { delete: "/v1/{name=operations/**}" };
}
}
// This resource represents a long-running operation that is the result of a
// network API call.
message Operation {
// The name of the operation resource, which is only unique within the same
// service that originally returns it.
string name = 1;
// Some service-specific metadata associated with the operation. It typically
// contains progress information and common metadata such as create time.
// Some services may not provide such metadata. Any method that returns a
// long-running operation should document the metadata type, if any.
google.protobuf.Any metadata = 2;
// If the value is false, it means the operation is still in progress.
// If true, the operation is completed and the `result` is available.
bool done = 3;
oneof result {
// The error result of the operation in case of failure.
google.rpc.Status error = 4;
// The normal response of the operation in case of success. If the original
// method returns no data on success, such as `Delete`, the response will be
// `google.protobuf.Empty`. If the original method is standard
// `Get`/`Create`/`Update`, the response should be the resource. For other
// methods, the response should have the type `XxxResponse`, where `Xxx`
// is the original method name. For example, if the original method name
// is `TakeSnapshot()`, the inferred response type will be
// `TakeSnapshotResponse`.
google.protobuf.Any response = 5;
}
}
// The request message for [Operations.GetOperation][google.longrunning.Operations.GetOperation].
message GetOperationRequest {
// The name of the operation resource.
string name = 1;
}
// The request message for [Operations.ListOperations][google.longrunning.Operations.ListOperations].
message ListOperationsRequest {
// The name of the operation collection.
string name = 4;
// The standard List filter.
string filter = 1;
// The standard List page size.
int32 page_size = 2;
// The standard List page token.
string page_token = 3;
}
// The response message for [Operations.ListOperations][google.longrunning.Operations.ListOperations].
message ListOperationsResponse {
// A list of operations that match the specified filter in the request.
repeated Operation operations = 1;
// The standard List next-page token.
string next_page_token = 2;
}
// The request message for [Operations.CancelOperation][google.longrunning.Operations.CancelOperation].
message CancelOperationRequest {
// The name of the operation resource to be cancelled.
string name = 1;
}
// The request message for [Operations.DeleteOperation][google.longrunning.Operations.DeleteOperation].
message DeleteOperationRequest {
// The name of the operation resource to be deleted.
string name = 1;
}

View file

@ -0,0 +1,115 @@
// Copyright 2016 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package google.bigtable.admin.v2;
import "google/api/annotations.proto";
import "google/protobuf/duration.proto";
option java_multiple_files = true;
option java_outer_classname = "TableProto";
option java_package = "com.google.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 {
// Possible timestamp granularities to use when keeping multiple versions
// of data in a table.
enum TimestampGranularity {
// The user did not specify a granularity. Should not be returned.
// When specified during table creation, MILLIS will be used.
TIMESTAMP_GRANULARITY_UNSPECIFIED = 0;
// The table keeps data versioned at a granularity of 1ms.
MILLIS = 1;
}
// Defines a view over a table's fields.
enum View {
// Uses the default view for each method as documented in its request.
VIEW_UNSPECIFIED = 0;
// Only populates `name`.
NAME_ONLY = 1;
// Only populates `name` and fields related to the table's schema.
SCHEMA_VIEW = 2;
// Populates all fields.
FULL = 4;
}
// 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, REPLICATION_VIEW, FULL
// @OutputOnly
string name = 1;
// The column families configured for this table, mapped by column family ID.
// Views: SCHEMA_VIEW, FULL
// @CreationOnly
map<string, ColumnFamily> column_families = 3;
// The granularity (e.g. MILLIS, MICROS) 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
// @CreationOnly
TimestampGranularity granularity = 4;
}
// A set of columns within a table which share a common configuration.
message ColumnFamily {
// Garbage collection rule specified as a protobuf.
// Must serialize to at most 500 bytes.
//
// NOTE: Garbage collection executes opportunistically in the background, and
// so it's possible for reads to return a cell even if it matches the active
// GC expression for its family.
GcRule gc_rule = 1;
}
// Rule for determining which cells to delete during garbage collection.
message GcRule {
// A GcRule which deletes cells matching all of the given rules.
message Intersection {
// Only delete cells which would be deleted by every element of `rules`.
repeated GcRule rules = 1;
}
// A GcRule which deletes cells matching any of the given rules.
message Union {
// Delete cells which would be deleted by any element of `rules`.
repeated GcRule rules = 1;
}
oneof rule {
// Delete all cells in a column except the most recent N.
int32 max_num_versions = 1;
// Delete cells in a column older than the given age.
// Values must be at least one millisecond, and will be truncated to
// microsecond granularity.
google.protobuf.Duration max_age = 2;
// Delete cells that would be deleted by every nested rule.
Intersection intersection = 3;
// Delete cells that would be deleted by any nested rule.
Union union = 4;
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,784 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/bigtable/admin/v2/bigtable_table_admin.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
from google.protobuf import descriptor_pb2
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
from gcloud.bigtable._generated_v2 import table_pb2 as google_dot_bigtable_dot_admin_dot_v2_dot_table__pb2
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name='google/bigtable/admin/v2/bigtable_table_admin.proto',
package='google.bigtable.admin.v2',
syntax='proto3',
serialized_pb=_b('\n3google/bigtable/admin/v2/bigtable_table_admin.proto\x12\x18google.bigtable.admin.v2\x1a\x1cgoogle/api/annotations.proto\x1a$google/bigtable/admin/v2/table.proto\x1a\x1bgoogle/protobuf/empty.proto\"\xc8\x01\n\x12\x43reateTableRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x10\n\x08table_id\x18\x02 \x01(\t\x12.\n\x05table\x18\x03 \x01(\x0b\x32\x1f.google.bigtable.admin.v2.Table\x12J\n\x0einitial_splits\x18\x04 \x03(\x0b\x32\x32.google.bigtable.admin.v2.CreateTableRequest.Split\x1a\x14\n\x05Split\x12\x0b\n\x03key\x18\x01 \x01(\x0c\"m\n\x13\x44ropRowRangeRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x18\n\x0erow_key_prefix\x18\x02 \x01(\x0cH\x00\x12$\n\x1a\x64\x65lete_all_data_from_table\x18\x03 \x01(\x08H\x00\x42\x08\n\x06target\"k\n\x11ListTablesRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x32\n\x04view\x18\x02 \x01(\x0e\x32$.google.bigtable.admin.v2.Table.View\x12\x12\n\npage_token\x18\x03 \x01(\t\"^\n\x12ListTablesResponse\x12/\n\x06tables\x18\x01 \x03(\x0b\x32\x1f.google.bigtable.admin.v2.Table\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"S\n\x0fGetTableRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x32\n\x04view\x18\x02 \x01(\x0e\x32$.google.bigtable.admin.v2.Table.View\"\"\n\x12\x44\x65leteTableRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\xae\x02\n\x1bModifyColumnFamiliesRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12Y\n\rmodifications\x18\x02 \x03(\x0b\x32\x42.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification\x1a\xa5\x01\n\x0cModification\x12\n\n\x02id\x18\x01 \x01(\t\x12\x38\n\x06\x63reate\x18\x02 \x01(\x0b\x32&.google.bigtable.admin.v2.ColumnFamilyH\x00\x12\x38\n\x06update\x18\x03 \x01(\x0b\x32&.google.bigtable.admin.v2.ColumnFamilyH\x00\x12\x0e\n\x04\x64rop\x18\x04 \x01(\x08H\x00\x42\x05\n\x03mod2\xb8\x07\n\x12\x42igtableTableAdmin\x12\x93\x01\n\x0b\x43reateTable\x12,.google.bigtable.admin.v2.CreateTableRequest\x1a\x1f.google.bigtable.admin.v2.Table\"5\x82\xd3\xe4\x93\x02/\"*/v2/{parent=projects/*/instances/*}/tables:\x01*\x12\x9b\x01\n\nListTables\x12+.google.bigtable.admin.v2.ListTablesRequest\x1a,.google.bigtable.admin.v2.ListTablesResponse\"2\x82\xd3\xe4\x93\x02,\x12*/v2/{parent=projects/*/instances/*}/tables\x12\x8a\x01\n\x08GetTable\x12).google.bigtable.admin.v2.GetTableRequest\x1a\x1f.google.bigtable.admin.v2.Table\"2\x82\xd3\xe4\x93\x02,\x12*/v2/{name=projects/*/instances/*/tables/*}\x12\x87\x01\n\x0b\x44\x65leteTable\x12,.google.bigtable.admin.v2.DeleteTableRequest\x1a\x16.google.protobuf.Empty\"2\x82\xd3\xe4\x93\x02,**/v2/{name=projects/*/instances/*/tables/*}\x12\xba\x01\n\x14ModifyColumnFamilies\x12\x35.google.bigtable.admin.v2.ModifyColumnFamiliesRequest\x1a\x1f.google.bigtable.admin.v2.Table\"J\x82\xd3\xe4\x93\x02\x44\"?/v2/{name=projects/*/instances/*/tables/*}:modifyColumnFamilies:\x01*\x12\x99\x01\n\x0c\x44ropRowRange\x12-.google.bigtable.admin.v2.DropRowRangeRequest\x1a\x16.google.protobuf.Empty\"B\x82\xd3\xe4\x93\x02<\"7/v2/{name=projects/*/instances/*/tables/*}:dropRowRange:\x01*B9\n\x1c\x63om.google.bigtable.admin.v2B\x17\x42igtableTableAdminProtoP\x01\x62\x06proto3')
,
dependencies=[google_dot_api_dot_annotations__pb2.DESCRIPTOR,google_dot_bigtable_dot_admin_dot_v2_dot_table__pb2.DESCRIPTOR,google_dot_protobuf_dot_empty__pb2.DESCRIPTOR,])
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
_CREATETABLEREQUEST_SPLIT = _descriptor.Descriptor(
name='Split',
full_name='google.bigtable.admin.v2.CreateTableRequest.Split',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='key', full_name='google.bigtable.admin.v2.CreateTableRequest.Split.key', index=0,
number=1, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=_b(""),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=359,
serialized_end=379,
)
_CREATETABLEREQUEST = _descriptor.Descriptor(
name='CreateTableRequest',
full_name='google.bigtable.admin.v2.CreateTableRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='parent', full_name='google.bigtable.admin.v2.CreateTableRequest.parent', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='table_id', full_name='google.bigtable.admin.v2.CreateTableRequest.table_id', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='table', full_name='google.bigtable.admin.v2.CreateTableRequest.table', index=2,
number=3, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='initial_splits', full_name='google.bigtable.admin.v2.CreateTableRequest.initial_splits', index=3,
number=4, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[_CREATETABLEREQUEST_SPLIT, ],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=179,
serialized_end=379,
)
_DROPROWRANGEREQUEST = _descriptor.Descriptor(
name='DropRowRangeRequest',
full_name='google.bigtable.admin.v2.DropRowRangeRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='name', full_name='google.bigtable.admin.v2.DropRowRangeRequest.name', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='row_key_prefix', full_name='google.bigtable.admin.v2.DropRowRangeRequest.row_key_prefix', index=1,
number=2, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=_b(""),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='delete_all_data_from_table', full_name='google.bigtable.admin.v2.DropRowRangeRequest.delete_all_data_from_table', index=2,
number=3, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
_descriptor.OneofDescriptor(
name='target', full_name='google.bigtable.admin.v2.DropRowRangeRequest.target',
index=0, containing_type=None, fields=[]),
],
serialized_start=381,
serialized_end=490,
)
_LISTTABLESREQUEST = _descriptor.Descriptor(
name='ListTablesRequest',
full_name='google.bigtable.admin.v2.ListTablesRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='parent', full_name='google.bigtable.admin.v2.ListTablesRequest.parent', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='view', full_name='google.bigtable.admin.v2.ListTablesRequest.view', index=1,
number=2, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='page_token', full_name='google.bigtable.admin.v2.ListTablesRequest.page_token', index=2,
number=3, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=492,
serialized_end=599,
)
_LISTTABLESRESPONSE = _descriptor.Descriptor(
name='ListTablesResponse',
full_name='google.bigtable.admin.v2.ListTablesResponse',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='tables', full_name='google.bigtable.admin.v2.ListTablesResponse.tables', index=0,
number=1, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='next_page_token', full_name='google.bigtable.admin.v2.ListTablesResponse.next_page_token', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=601,
serialized_end=695,
)
_GETTABLEREQUEST = _descriptor.Descriptor(
name='GetTableRequest',
full_name='google.bigtable.admin.v2.GetTableRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='name', full_name='google.bigtable.admin.v2.GetTableRequest.name', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='view', full_name='google.bigtable.admin.v2.GetTableRequest.view', index=1,
number=2, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=697,
serialized_end=780,
)
_DELETETABLEREQUEST = _descriptor.Descriptor(
name='DeleteTableRequest',
full_name='google.bigtable.admin.v2.DeleteTableRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='name', full_name='google.bigtable.admin.v2.DeleteTableRequest.name', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=782,
serialized_end=816,
)
_MODIFYCOLUMNFAMILIESREQUEST_MODIFICATION = _descriptor.Descriptor(
name='Modification',
full_name='google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='id', full_name='google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.id', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='create', full_name='google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.create', index=1,
number=2, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='update', full_name='google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.update', index=2,
number=3, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='drop', full_name='google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.drop', index=3,
number=4, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
_descriptor.OneofDescriptor(
name='mod', full_name='google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.mod',
index=0, containing_type=None, fields=[]),
],
serialized_start=956,
serialized_end=1121,
)
_MODIFYCOLUMNFAMILIESREQUEST = _descriptor.Descriptor(
name='ModifyColumnFamiliesRequest',
full_name='google.bigtable.admin.v2.ModifyColumnFamiliesRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='name', full_name='google.bigtable.admin.v2.ModifyColumnFamiliesRequest.name', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='modifications', full_name='google.bigtable.admin.v2.ModifyColumnFamiliesRequest.modifications', index=1,
number=2, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[_MODIFYCOLUMNFAMILIESREQUEST_MODIFICATION, ],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=819,
serialized_end=1121,
)
_CREATETABLEREQUEST_SPLIT.containing_type = _CREATETABLEREQUEST
_CREATETABLEREQUEST.fields_by_name['table'].message_type = google_dot_bigtable_dot_admin_dot_v2_dot_table__pb2._TABLE
_CREATETABLEREQUEST.fields_by_name['initial_splits'].message_type = _CREATETABLEREQUEST_SPLIT
_DROPROWRANGEREQUEST.oneofs_by_name['target'].fields.append(
_DROPROWRANGEREQUEST.fields_by_name['row_key_prefix'])
_DROPROWRANGEREQUEST.fields_by_name['row_key_prefix'].containing_oneof = _DROPROWRANGEREQUEST.oneofs_by_name['target']
_DROPROWRANGEREQUEST.oneofs_by_name['target'].fields.append(
_DROPROWRANGEREQUEST.fields_by_name['delete_all_data_from_table'])
_DROPROWRANGEREQUEST.fields_by_name['delete_all_data_from_table'].containing_oneof = _DROPROWRANGEREQUEST.oneofs_by_name['target']
_LISTTABLESREQUEST.fields_by_name['view'].enum_type = google_dot_bigtable_dot_admin_dot_v2_dot_table__pb2._TABLE_VIEW
_LISTTABLESRESPONSE.fields_by_name['tables'].message_type = google_dot_bigtable_dot_admin_dot_v2_dot_table__pb2._TABLE
_GETTABLEREQUEST.fields_by_name['view'].enum_type = google_dot_bigtable_dot_admin_dot_v2_dot_table__pb2._TABLE_VIEW
_MODIFYCOLUMNFAMILIESREQUEST_MODIFICATION.fields_by_name['create'].message_type = google_dot_bigtable_dot_admin_dot_v2_dot_table__pb2._COLUMNFAMILY
_MODIFYCOLUMNFAMILIESREQUEST_MODIFICATION.fields_by_name['update'].message_type = google_dot_bigtable_dot_admin_dot_v2_dot_table__pb2._COLUMNFAMILY
_MODIFYCOLUMNFAMILIESREQUEST_MODIFICATION.containing_type = _MODIFYCOLUMNFAMILIESREQUEST
_MODIFYCOLUMNFAMILIESREQUEST_MODIFICATION.oneofs_by_name['mod'].fields.append(
_MODIFYCOLUMNFAMILIESREQUEST_MODIFICATION.fields_by_name['create'])
_MODIFYCOLUMNFAMILIESREQUEST_MODIFICATION.fields_by_name['create'].containing_oneof = _MODIFYCOLUMNFAMILIESREQUEST_MODIFICATION.oneofs_by_name['mod']
_MODIFYCOLUMNFAMILIESREQUEST_MODIFICATION.oneofs_by_name['mod'].fields.append(
_MODIFYCOLUMNFAMILIESREQUEST_MODIFICATION.fields_by_name['update'])
_MODIFYCOLUMNFAMILIESREQUEST_MODIFICATION.fields_by_name['update'].containing_oneof = _MODIFYCOLUMNFAMILIESREQUEST_MODIFICATION.oneofs_by_name['mod']
_MODIFYCOLUMNFAMILIESREQUEST_MODIFICATION.oneofs_by_name['mod'].fields.append(
_MODIFYCOLUMNFAMILIESREQUEST_MODIFICATION.fields_by_name['drop'])
_MODIFYCOLUMNFAMILIESREQUEST_MODIFICATION.fields_by_name['drop'].containing_oneof = _MODIFYCOLUMNFAMILIESREQUEST_MODIFICATION.oneofs_by_name['mod']
_MODIFYCOLUMNFAMILIESREQUEST.fields_by_name['modifications'].message_type = _MODIFYCOLUMNFAMILIESREQUEST_MODIFICATION
DESCRIPTOR.message_types_by_name['CreateTableRequest'] = _CREATETABLEREQUEST
DESCRIPTOR.message_types_by_name['DropRowRangeRequest'] = _DROPROWRANGEREQUEST
DESCRIPTOR.message_types_by_name['ListTablesRequest'] = _LISTTABLESREQUEST
DESCRIPTOR.message_types_by_name['ListTablesResponse'] = _LISTTABLESRESPONSE
DESCRIPTOR.message_types_by_name['GetTableRequest'] = _GETTABLEREQUEST
DESCRIPTOR.message_types_by_name['DeleteTableRequest'] = _DELETETABLEREQUEST
DESCRIPTOR.message_types_by_name['ModifyColumnFamiliesRequest'] = _MODIFYCOLUMNFAMILIESREQUEST
CreateTableRequest = _reflection.GeneratedProtocolMessageType('CreateTableRequest', (_message.Message,), dict(
Split = _reflection.GeneratedProtocolMessageType('Split', (_message.Message,), dict(
DESCRIPTOR = _CREATETABLEREQUEST_SPLIT,
__module__ = 'google.bigtable.admin.v2.bigtable_table_admin_pb2'
# @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.CreateTableRequest.Split)
))
,
DESCRIPTOR = _CREATETABLEREQUEST,
__module__ = 'google.bigtable.admin.v2.bigtable_table_admin_pb2'
# @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.CreateTableRequest)
))
_sym_db.RegisterMessage(CreateTableRequest)
_sym_db.RegisterMessage(CreateTableRequest.Split)
DropRowRangeRequest = _reflection.GeneratedProtocolMessageType('DropRowRangeRequest', (_message.Message,), dict(
DESCRIPTOR = _DROPROWRANGEREQUEST,
__module__ = 'google.bigtable.admin.v2.bigtable_table_admin_pb2'
# @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.DropRowRangeRequest)
))
_sym_db.RegisterMessage(DropRowRangeRequest)
ListTablesRequest = _reflection.GeneratedProtocolMessageType('ListTablesRequest', (_message.Message,), dict(
DESCRIPTOR = _LISTTABLESREQUEST,
__module__ = 'google.bigtable.admin.v2.bigtable_table_admin_pb2'
# @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.ListTablesRequest)
))
_sym_db.RegisterMessage(ListTablesRequest)
ListTablesResponse = _reflection.GeneratedProtocolMessageType('ListTablesResponse', (_message.Message,), dict(
DESCRIPTOR = _LISTTABLESRESPONSE,
__module__ = 'google.bigtable.admin.v2.bigtable_table_admin_pb2'
# @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.ListTablesResponse)
))
_sym_db.RegisterMessage(ListTablesResponse)
GetTableRequest = _reflection.GeneratedProtocolMessageType('GetTableRequest', (_message.Message,), dict(
DESCRIPTOR = _GETTABLEREQUEST,
__module__ = 'google.bigtable.admin.v2.bigtable_table_admin_pb2'
# @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.GetTableRequest)
))
_sym_db.RegisterMessage(GetTableRequest)
DeleteTableRequest = _reflection.GeneratedProtocolMessageType('DeleteTableRequest', (_message.Message,), dict(
DESCRIPTOR = _DELETETABLEREQUEST,
__module__ = 'google.bigtable.admin.v2.bigtable_table_admin_pb2'
# @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.DeleteTableRequest)
))
_sym_db.RegisterMessage(DeleteTableRequest)
ModifyColumnFamiliesRequest = _reflection.GeneratedProtocolMessageType('ModifyColumnFamiliesRequest', (_message.Message,), dict(
Modification = _reflection.GeneratedProtocolMessageType('Modification', (_message.Message,), dict(
DESCRIPTOR = _MODIFYCOLUMNFAMILIESREQUEST_MODIFICATION,
__module__ = 'google.bigtable.admin.v2.bigtable_table_admin_pb2'
# @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification)
))
,
DESCRIPTOR = _MODIFYCOLUMNFAMILIESREQUEST,
__module__ = 'google.bigtable.admin.v2.bigtable_table_admin_pb2'
# @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.ModifyColumnFamiliesRequest)
))
_sym_db.RegisterMessage(ModifyColumnFamiliesRequest)
_sym_db.RegisterMessage(ModifyColumnFamiliesRequest.Modification)
DESCRIPTOR.has_options = True
DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\n\034com.google.bigtable.admin.v2B\027BigtableTableAdminProtoP\001'))
from grpc.beta import implementations as beta_implementations
from grpc.beta import interfaces as beta_interfaces
from grpc.framework.common import cardinality
from grpc.framework.interfaces.face import utilities as face_utilities
class BigtableTableAdminStub(object):
"""Service for creating, configuring, and deleting Cloud Bigtable tables.
Provides access to the table schemas only, not the data stored within
the tables.
"""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.CreateTable = channel.unary_unary(
'/google.bigtable.admin.v2.BigtableTableAdmin/CreateTable',
request_serializer=CreateTableRequest.SerializeToString,
response_deserializer=google_dot_bigtable_dot_admin_dot_v2_dot_table__pb2.Table.FromString,
)
self.ListTables = channel.unary_unary(
'/google.bigtable.admin.v2.BigtableTableAdmin/ListTables',
request_serializer=ListTablesRequest.SerializeToString,
response_deserializer=ListTablesResponse.FromString,
)
self.GetTable = channel.unary_unary(
'/google.bigtable.admin.v2.BigtableTableAdmin/GetTable',
request_serializer=GetTableRequest.SerializeToString,
response_deserializer=google_dot_bigtable_dot_admin_dot_v2_dot_table__pb2.Table.FromString,
)
self.DeleteTable = channel.unary_unary(
'/google.bigtable.admin.v2.BigtableTableAdmin/DeleteTable',
request_serializer=DeleteTableRequest.SerializeToString,
response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
)
self.ModifyColumnFamilies = channel.unary_unary(
'/google.bigtable.admin.v2.BigtableTableAdmin/ModifyColumnFamilies',
request_serializer=ModifyColumnFamiliesRequest.SerializeToString,
response_deserializer=google_dot_bigtable_dot_admin_dot_v2_dot_table__pb2.Table.FromString,
)
self.DropRowRange = channel.unary_unary(
'/google.bigtable.admin.v2.BigtableTableAdmin/DropRowRange',
request_serializer=DropRowRangeRequest.SerializeToString,
response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
)
class BigtableTableAdminServicer(object):
"""Service for creating, configuring, and deleting Cloud Bigtable tables.
Provides access to the table schemas only, not the data stored within
the tables.
"""
def CreateTable(self, request, context):
"""Creates a new table in the specified instance.
The table can be created with a full set of initial column families,
specified in the request.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def ListTables(self, request, context):
"""Lists all tables served from a specified instance.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetTable(self, request, context):
"""Gets metadata information about the specified table.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def DeleteTable(self, request, context):
"""Permanently deletes a specified table and all of its data.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def ModifyColumnFamilies(self, request, context):
"""Atomically performs a series of column family modifications
on the specified table.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def DropRowRange(self, request, context):
"""Permanently drop/delete a row range from a specified table. The request can
specify whether to delete all rows in a table, or only those that match a
particular prefix.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_BigtableTableAdminServicer_to_server(servicer, server):
rpc_method_handlers = {
'CreateTable': grpc.unary_unary_rpc_method_handler(
servicer.CreateTable,
request_deserializer=CreateTableRequest.FromString,
response_serializer=google_dot_bigtable_dot_admin_dot_v2_dot_table__pb2.Table.SerializeToString,
),
'ListTables': grpc.unary_unary_rpc_method_handler(
servicer.ListTables,
request_deserializer=ListTablesRequest.FromString,
response_serializer=ListTablesResponse.SerializeToString,
),
'GetTable': grpc.unary_unary_rpc_method_handler(
servicer.GetTable,
request_deserializer=GetTableRequest.FromString,
response_serializer=google_dot_bigtable_dot_admin_dot_v2_dot_table__pb2.Table.SerializeToString,
),
'DeleteTable': grpc.unary_unary_rpc_method_handler(
servicer.DeleteTable,
request_deserializer=DeleteTableRequest.FromString,
response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
),
'ModifyColumnFamilies': grpc.unary_unary_rpc_method_handler(
servicer.ModifyColumnFamilies,
request_deserializer=ModifyColumnFamiliesRequest.FromString,
response_serializer=google_dot_bigtable_dot_admin_dot_v2_dot_table__pb2.Table.SerializeToString,
),
'DropRowRange': grpc.unary_unary_rpc_method_handler(
servicer.DropRowRange,
request_deserializer=DropRowRangeRequest.FromString,
response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'google.bigtable.admin.v2.BigtableTableAdmin', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
class BetaBigtableTableAdminServicer(object):
"""Service for creating, configuring, and deleting Cloud Bigtable tables.
Provides access to the table schemas only, not the data stored within
the tables.
"""
def CreateTable(self, request, context):
"""Creates a new table in the specified instance.
The table can be created with a full set of initial column families,
specified in the request.
"""
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def ListTables(self, request, context):
"""Lists all tables served from a specified instance.
"""
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def GetTable(self, request, context):
"""Gets metadata information about the specified table.
"""
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def DeleteTable(self, request, context):
"""Permanently deletes a specified table and all of its data.
"""
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def ModifyColumnFamilies(self, request, context):
"""Atomically performs a series of column family modifications
on the specified table.
"""
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def DropRowRange(self, request, context):
"""Permanently drop/delete a row range from a specified table. The request can
specify whether to delete all rows in a table, or only those that match a
particular prefix.
"""
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
class BetaBigtableTableAdminStub(object):
"""Service for creating, configuring, and deleting Cloud Bigtable tables.
Provides access to the table schemas only, not the data stored within
the tables.
"""
def CreateTable(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
"""Creates a new table in the specified instance.
The table can be created with a full set of initial column families,
specified in the request.
"""
raise NotImplementedError()
CreateTable.future = None
def ListTables(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
"""Lists all tables served from a specified instance.
"""
raise NotImplementedError()
ListTables.future = None
def GetTable(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
"""Gets metadata information about the specified table.
"""
raise NotImplementedError()
GetTable.future = None
def DeleteTable(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
"""Permanently deletes a specified table and all of its data.
"""
raise NotImplementedError()
DeleteTable.future = None
def ModifyColumnFamilies(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
"""Atomically performs a series of column family modifications
on the specified table.
"""
raise NotImplementedError()
ModifyColumnFamilies.future = None
def DropRowRange(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
"""Permanently drop/delete a row range from a specified table. The request can
specify whether to delete all rows in a table, or only those that match a
particular prefix.
"""
raise NotImplementedError()
DropRowRange.future = None
def beta_create_BigtableTableAdmin_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
request_deserializers = {
('google.bigtable.admin.v2.BigtableTableAdmin', 'CreateTable'): CreateTableRequest.FromString,
('google.bigtable.admin.v2.BigtableTableAdmin', 'DeleteTable'): DeleteTableRequest.FromString,
('google.bigtable.admin.v2.BigtableTableAdmin', 'DropRowRange'): DropRowRangeRequest.FromString,
('google.bigtable.admin.v2.BigtableTableAdmin', 'GetTable'): GetTableRequest.FromString,
('google.bigtable.admin.v2.BigtableTableAdmin', 'ListTables'): ListTablesRequest.FromString,
('google.bigtable.admin.v2.BigtableTableAdmin', 'ModifyColumnFamilies'): ModifyColumnFamiliesRequest.FromString,
}
response_serializers = {
('google.bigtable.admin.v2.BigtableTableAdmin', 'CreateTable'): google_dot_bigtable_dot_admin_dot_v2_dot_table__pb2.Table.SerializeToString,
('google.bigtable.admin.v2.BigtableTableAdmin', 'DeleteTable'): google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
('google.bigtable.admin.v2.BigtableTableAdmin', 'DropRowRange'): google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
('google.bigtable.admin.v2.BigtableTableAdmin', 'GetTable'): google_dot_bigtable_dot_admin_dot_v2_dot_table__pb2.Table.SerializeToString,
('google.bigtable.admin.v2.BigtableTableAdmin', 'ListTables'): ListTablesResponse.SerializeToString,
('google.bigtable.admin.v2.BigtableTableAdmin', 'ModifyColumnFamilies'): google_dot_bigtable_dot_admin_dot_v2_dot_table__pb2.Table.SerializeToString,
}
method_implementations = {
('google.bigtable.admin.v2.BigtableTableAdmin', 'CreateTable'): face_utilities.unary_unary_inline(servicer.CreateTable),
('google.bigtable.admin.v2.BigtableTableAdmin', 'DeleteTable'): face_utilities.unary_unary_inline(servicer.DeleteTable),
('google.bigtable.admin.v2.BigtableTableAdmin', 'DropRowRange'): face_utilities.unary_unary_inline(servicer.DropRowRange),
('google.bigtable.admin.v2.BigtableTableAdmin', 'GetTable'): face_utilities.unary_unary_inline(servicer.GetTable),
('google.bigtable.admin.v2.BigtableTableAdmin', 'ListTables'): face_utilities.unary_unary_inline(servicer.ListTables),
('google.bigtable.admin.v2.BigtableTableAdmin', 'ModifyColumnFamilies'): face_utilities.unary_unary_inline(servicer.ModifyColumnFamilies),
}
server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
return beta_implementations.server(method_implementations, options=server_options)
def beta_create_BigtableTableAdmin_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
request_serializers = {
('google.bigtable.admin.v2.BigtableTableAdmin', 'CreateTable'): CreateTableRequest.SerializeToString,
('google.bigtable.admin.v2.BigtableTableAdmin', 'DeleteTable'): DeleteTableRequest.SerializeToString,
('google.bigtable.admin.v2.BigtableTableAdmin', 'DropRowRange'): DropRowRangeRequest.SerializeToString,
('google.bigtable.admin.v2.BigtableTableAdmin', 'GetTable'): GetTableRequest.SerializeToString,
('google.bigtable.admin.v2.BigtableTableAdmin', 'ListTables'): ListTablesRequest.SerializeToString,
('google.bigtable.admin.v2.BigtableTableAdmin', 'ModifyColumnFamilies'): ModifyColumnFamiliesRequest.SerializeToString,
}
response_deserializers = {
('google.bigtable.admin.v2.BigtableTableAdmin', 'CreateTable'): google_dot_bigtable_dot_admin_dot_v2_dot_table__pb2.Table.FromString,
('google.bigtable.admin.v2.BigtableTableAdmin', 'DeleteTable'): google_dot_protobuf_dot_empty__pb2.Empty.FromString,
('google.bigtable.admin.v2.BigtableTableAdmin', 'DropRowRange'): google_dot_protobuf_dot_empty__pb2.Empty.FromString,
('google.bigtable.admin.v2.BigtableTableAdmin', 'GetTable'): google_dot_bigtable_dot_admin_dot_v2_dot_table__pb2.Table.FromString,
('google.bigtable.admin.v2.BigtableTableAdmin', 'ListTables'): ListTablesResponse.FromString,
('google.bigtable.admin.v2.BigtableTableAdmin', 'ModifyColumnFamilies'): google_dot_bigtable_dot_admin_dot_v2_dot_table__pb2.Table.FromString,
}
cardinalities = {
'CreateTable': cardinality.Cardinality.UNARY_UNARY,
'DeleteTable': cardinality.Cardinality.UNARY_UNARY,
'DropRowRange': cardinality.Cardinality.UNARY_UNARY,
'GetTable': cardinality.Cardinality.UNARY_UNARY,
'ListTables': cardinality.Cardinality.UNARY_UNARY,
'ModifyColumnFamilies': cardinality.Cardinality.UNARY_UNARY,
}
stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
return beta_implementations.dynamic_stub(channel, 'google.bigtable.admin.v2.BigtableTableAdmin', cardinalities, options=stub_options)
# @@protoc_insertion_point(module_scope)

View file

@ -0,0 +1,67 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/bigtable/admin/v2/common.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
from google.protobuf import descriptor_pb2
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name='google/bigtable/admin/v2/common.proto',
package='google.bigtable.admin.v2',
syntax='proto3',
serialized_pb=_b('\n%google/bigtable/admin/v2/common.proto\x12\x18google.bigtable.admin.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/protobuf/timestamp.proto*=\n\x0bStorageType\x12\x1c\n\x18STORAGE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03SSD\x10\x01\x12\x07\n\x03HDD\x10\x02\x42-\n\x1c\x63om.google.bigtable.admin.v2B\x0b\x43ommonProtoP\x01\x62\x06proto3')
,
dependencies=[google_dot_api_dot_annotations__pb2.DESCRIPTOR,google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,])
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
_STORAGETYPE = _descriptor.EnumDescriptor(
name='StorageType',
full_name='google.bigtable.admin.v2.StorageType',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='STORAGE_TYPE_UNSPECIFIED', index=0, number=0,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SSD', index=1, number=1,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='HDD', index=2, number=2,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=130,
serialized_end=191,
)
_sym_db.RegisterEnumDescriptor(_STORAGETYPE)
StorageType = enum_type_wrapper.EnumTypeWrapper(_STORAGETYPE)
STORAGE_TYPE_UNSPECIFIED = 0
SSD = 1
HDD = 2
DESCRIPTOR.enum_types_by_name['StorageType'] = _STORAGETYPE
DESCRIPTOR.has_options = True
DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\n\034com.google.bigtable.admin.v2B\013CommonProtoP\001'))
# @@protoc_insertion_point(module_scope)

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,222 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/bigtable/admin/v2/instance.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
from google.protobuf import descriptor_pb2
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
from gcloud.bigtable._generated_v2 import common_pb2 as google_dot_bigtable_dot_admin_dot_v2_dot_common__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name='google/bigtable/admin/v2/instance.proto',
package='google.bigtable.admin.v2',
syntax='proto3',
serialized_pb=_b('\n\'google/bigtable/admin/v2/instance.proto\x12\x18google.bigtable.admin.v2\x1a\x1cgoogle/api/annotations.proto\x1a%google/bigtable/admin/v2/common.proto\"\x9e\x01\n\x08Instance\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x37\n\x05state\x18\x03 \x01(\x0e\x32(.google.bigtable.admin.v2.Instance.State\"5\n\x05State\x12\x13\n\x0fSTATE_NOT_KNOWN\x10\x00\x12\t\n\x05READY\x10\x01\x12\x0c\n\x08\x43REATING\x10\x02\"\x8e\x02\n\x07\x43luster\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x10\n\x08location\x18\x02 \x01(\t\x12\x36\n\x05state\x18\x03 \x01(\x0e\x32\'.google.bigtable.admin.v2.Cluster.State\x12\x13\n\x0bserve_nodes\x18\x04 \x01(\x05\x12\x43\n\x14\x64\x65\x66\x61ult_storage_type\x18\x05 \x01(\x0e\x32%.google.bigtable.admin.v2.StorageType\"Q\n\x05State\x12\x13\n\x0fSTATE_NOT_KNOWN\x10\x00\x12\t\n\x05READY\x10\x01\x12\x0c\n\x08\x43REATING\x10\x02\x12\x0c\n\x08RESIZING\x10\x03\x12\x0c\n\x08\x44ISABLED\x10\x04\x42/\n\x1c\x63om.google.bigtable.admin.v2B\rInstanceProtoP\x01\x62\x06proto3')
,
dependencies=[google_dot_api_dot_annotations__pb2.DESCRIPTOR,google_dot_bigtable_dot_admin_dot_v2_dot_common__pb2.DESCRIPTOR,])
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
_INSTANCE_STATE = _descriptor.EnumDescriptor(
name='State',
full_name='google.bigtable.admin.v2.Instance.State',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='STATE_NOT_KNOWN', index=0, number=0,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='READY', index=1, number=1,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CREATING', index=2, number=2,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=244,
serialized_end=297,
)
_sym_db.RegisterEnumDescriptor(_INSTANCE_STATE)
_CLUSTER_STATE = _descriptor.EnumDescriptor(
name='State',
full_name='google.bigtable.admin.v2.Cluster.State',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='STATE_NOT_KNOWN', index=0, number=0,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='READY', index=1, number=1,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='CREATING', index=2, number=2,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='RESIZING', index=3, number=3,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='DISABLED', index=4, number=4,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=489,
serialized_end=570,
)
_sym_db.RegisterEnumDescriptor(_CLUSTER_STATE)
_INSTANCE = _descriptor.Descriptor(
name='Instance',
full_name='google.bigtable.admin.v2.Instance',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='name', full_name='google.bigtable.admin.v2.Instance.name', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='display_name', full_name='google.bigtable.admin.v2.Instance.display_name', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='state', full_name='google.bigtable.admin.v2.Instance.state', index=2,
number=3, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
_INSTANCE_STATE,
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=139,
serialized_end=297,
)
_CLUSTER = _descriptor.Descriptor(
name='Cluster',
full_name='google.bigtable.admin.v2.Cluster',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='name', full_name='google.bigtable.admin.v2.Cluster.name', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='location', full_name='google.bigtable.admin.v2.Cluster.location', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='state', full_name='google.bigtable.admin.v2.Cluster.state', index=2,
number=3, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='serve_nodes', full_name='google.bigtable.admin.v2.Cluster.serve_nodes', index=3,
number=4, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='default_storage_type', full_name='google.bigtable.admin.v2.Cluster.default_storage_type', index=4,
number=5, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
_CLUSTER_STATE,
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=300,
serialized_end=570,
)
_INSTANCE.fields_by_name['state'].enum_type = _INSTANCE_STATE
_INSTANCE_STATE.containing_type = _INSTANCE
_CLUSTER.fields_by_name['state'].enum_type = _CLUSTER_STATE
_CLUSTER.fields_by_name['default_storage_type'].enum_type = google_dot_bigtable_dot_admin_dot_v2_dot_common__pb2._STORAGETYPE
_CLUSTER_STATE.containing_type = _CLUSTER
DESCRIPTOR.message_types_by_name['Instance'] = _INSTANCE
DESCRIPTOR.message_types_by_name['Cluster'] = _CLUSTER
Instance = _reflection.GeneratedProtocolMessageType('Instance', (_message.Message,), dict(
DESCRIPTOR = _INSTANCE,
__module__ = 'google.bigtable.admin.v2.instance_pb2'
# @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.Instance)
))
_sym_db.RegisterMessage(Instance)
Cluster = _reflection.GeneratedProtocolMessageType('Cluster', (_message.Message,), dict(
DESCRIPTOR = _CLUSTER,
__module__ = 'google.bigtable.admin.v2.instance_pb2'
# @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.Cluster)
))
_sym_db.RegisterMessage(Cluster)
DESCRIPTOR.has_options = True
DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\n\034com.google.bigtable.admin.v2B\rInstanceProtoP\001'))
# @@protoc_insertion_point(module_scope)

View file

@ -0,0 +1,264 @@
from google.longrunning.operations_pb2 import (
CancelOperationRequest,
DeleteOperationRequest,
GetOperationRequest,
ListOperationsRequest,
ListOperationsResponse,
Operation,
google_dot_protobuf_dot_empty__pb2,
)
from grpc.beta import implementations as beta_implementations
from grpc.beta import interfaces as beta_interfaces
from grpc.framework.common import cardinality
from grpc.framework.interfaces.face import utilities as face_utilities
class OperationsStub(object):
"""Manages long-running operations with an API service.
When an API method normally takes long time to complete, it can be designed
to return [Operation][google.longrunning.Operation] to the client, and the client can use this
interface to receive the real response asynchronously by polling the
operation resource, or using `google.watcher.v1.Watcher` interface to watch
the response, or pass the operation resource to another API (such as Google
Cloud Pub/Sub API) to receive the response. Any API service that returns
long-running operations should implement the `Operations` interface so
developers can have a consistent client experience.
"""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.GetOperation = channel.unary_unary(
'/google.longrunning.Operations/GetOperation',
request_serializer=GetOperationRequest.SerializeToString,
response_deserializer=Operation.FromString,
)
self.ListOperations = channel.unary_unary(
'/google.longrunning.Operations/ListOperations',
request_serializer=ListOperationsRequest.SerializeToString,
response_deserializer=ListOperationsResponse.FromString,
)
self.CancelOperation = channel.unary_unary(
'/google.longrunning.Operations/CancelOperation',
request_serializer=CancelOperationRequest.SerializeToString,
response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
)
self.DeleteOperation = channel.unary_unary(
'/google.longrunning.Operations/DeleteOperation',
request_serializer=DeleteOperationRequest.SerializeToString,
response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
)
class OperationsServicer(object):
"""Manages long-running operations with an API service.
When an API method normally takes long time to complete, it can be designed
to return [Operation][google.longrunning.Operation] to the client, and the client can use this
interface to receive the real response asynchronously by polling the
operation resource, or using `google.watcher.v1.Watcher` interface to watch
the response, or pass the operation resource to another API (such as Google
Cloud Pub/Sub API) to receive the response. Any API service that returns
long-running operations should implement the `Operations` interface so
developers can have a consistent client experience.
"""
def GetOperation(self, request, context):
"""Gets the latest state of a long-running operation. Clients may use this
method to poll the operation result at intervals as recommended by the API
service.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def ListOperations(self, request, context):
"""Lists operations that match the specified filter in the request. If the
server doesn't support this method, it returns
`google.rpc.Code.UNIMPLEMENTED`.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def CancelOperation(self, request, context):
"""Starts asynchronous cancellation on a long-running operation. The server
makes a best effort to cancel the operation, but success is not
guaranteed. If the server doesn't support this method, it returns
`google.rpc.Code.UNIMPLEMENTED`. Clients may use
[Operations.GetOperation] or other methods to check whether the
cancellation succeeded or the operation completed despite cancellation.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def DeleteOperation(self, request, context):
"""Deletes a long-running operation. It indicates the client is no longer
interested in the operation result. It does not cancel the operation.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_OperationsServicer_to_server(servicer, server):
rpc_method_handlers = {
'GetOperation': grpc.unary_unary_rpc_method_handler(
servicer.GetOperation,
request_deserializer=GetOperationRequest.FromString,
response_serializer=Operation.SerializeToString,
),
'ListOperations': grpc.unary_unary_rpc_method_handler(
servicer.ListOperations,
request_deserializer=ListOperationsRequest.FromString,
response_serializer=ListOperationsResponse.SerializeToString,
),
'CancelOperation': grpc.unary_unary_rpc_method_handler(
servicer.CancelOperation,
request_deserializer=CancelOperationRequest.FromString,
response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
),
'DeleteOperation': grpc.unary_unary_rpc_method_handler(
servicer.DeleteOperation,
request_deserializer=DeleteOperationRequest.FromString,
response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'google.longrunning.Operations', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
class BetaOperationsServicer(object):
"""Manages long-running operations with an API service.
When an API method normally takes long time to complete, it can be designed
to return [Operation][google.longrunning.Operation] to the client, and the client can use this
interface to receive the real response asynchronously by polling the
operation resource, or using `google.watcher.v1.Watcher` interface to watch
the response, or pass the operation resource to another API (such as Google
Cloud Pub/Sub API) to receive the response. Any API service that returns
long-running operations should implement the `Operations` interface so
developers can have a consistent client experience.
"""
def GetOperation(self, request, context):
"""Gets the latest state of a long-running operation. Clients may use this
method to poll the operation result at intervals as recommended by the API
service.
"""
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def ListOperations(self, request, context):
"""Lists operations that match the specified filter in the request. If the
server doesn't support this method, it returns
`google.rpc.Code.UNIMPLEMENTED`.
"""
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def CancelOperation(self, request, context):
"""Starts asynchronous cancellation on a long-running operation. The server
makes a best effort to cancel the operation, but success is not
guaranteed. If the server doesn't support this method, it returns
`google.rpc.Code.UNIMPLEMENTED`. Clients may use
[Operations.GetOperation] or other methods to check whether the
cancellation succeeded or the operation completed despite cancellation.
"""
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def DeleteOperation(self, request, context):
"""Deletes a long-running operation. It indicates the client is no longer
interested in the operation result. It does not cancel the operation.
"""
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
class BetaOperationsStub(object):
"""Manages long-running operations with an API service.
When an API method normally takes long time to complete, it can be designed
to return [Operation][google.longrunning.Operation] to the client, and the client can use this
interface to receive the real response asynchronously by polling the
operation resource, or using `google.watcher.v1.Watcher` interface to watch
the response, or pass the operation resource to another API (such as Google
Cloud Pub/Sub API) to receive the response. Any API service that returns
long-running operations should implement the `Operations` interface so
developers can have a consistent client experience.
"""
def GetOperation(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
"""Gets the latest state of a long-running operation. Clients may use this
method to poll the operation result at intervals as recommended by the API
service.
"""
raise NotImplementedError()
GetOperation.future = None
def ListOperations(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
"""Lists operations that match the specified filter in the request. If the
server doesn't support this method, it returns
`google.rpc.Code.UNIMPLEMENTED`.
"""
raise NotImplementedError()
ListOperations.future = None
def CancelOperation(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
"""Starts asynchronous cancellation on a long-running operation. The server
makes a best effort to cancel the operation, but success is not
guaranteed. If the server doesn't support this method, it returns
`google.rpc.Code.UNIMPLEMENTED`. Clients may use
[Operations.GetOperation] or other methods to check whether the
cancellation succeeded or the operation completed despite cancellation.
"""
raise NotImplementedError()
CancelOperation.future = None
def DeleteOperation(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
"""Deletes a long-running operation. It indicates the client is no longer
interested in the operation result. It does not cancel the operation.
"""
raise NotImplementedError()
DeleteOperation.future = None
def beta_create_Operations_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
request_deserializers = {
('google.longrunning.Operations', 'CancelOperation'): CancelOperationRequest.FromString,
('google.longrunning.Operations', 'DeleteOperation'): DeleteOperationRequest.FromString,
('google.longrunning.Operations', 'GetOperation'): GetOperationRequest.FromString,
('google.longrunning.Operations', 'ListOperations'): ListOperationsRequest.FromString,
}
response_serializers = {
('google.longrunning.Operations', 'CancelOperation'): google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
('google.longrunning.Operations', 'DeleteOperation'): google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
('google.longrunning.Operations', 'GetOperation'): Operation.SerializeToString,
('google.longrunning.Operations', 'ListOperations'): ListOperationsResponse.SerializeToString,
}
method_implementations = {
('google.longrunning.Operations', 'CancelOperation'): face_utilities.unary_unary_inline(servicer.CancelOperation),
('google.longrunning.Operations', 'DeleteOperation'): face_utilities.unary_unary_inline(servicer.DeleteOperation),
('google.longrunning.Operations', 'GetOperation'): face_utilities.unary_unary_inline(servicer.GetOperation),
('google.longrunning.Operations', 'ListOperations'): face_utilities.unary_unary_inline(servicer.ListOperations),
}
server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
return beta_implementations.server(method_implementations, options=server_options)
def beta_create_Operations_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
request_serializers = {
('google.longrunning.Operations', 'CancelOperation'): CancelOperationRequest.SerializeToString,
('google.longrunning.Operations', 'DeleteOperation'): DeleteOperationRequest.SerializeToString,
('google.longrunning.Operations', 'GetOperation'): GetOperationRequest.SerializeToString,
('google.longrunning.Operations', 'ListOperations'): ListOperationsRequest.SerializeToString,
}
response_deserializers = {
('google.longrunning.Operations', 'CancelOperation'): google_dot_protobuf_dot_empty__pb2.Empty.FromString,
('google.longrunning.Operations', 'DeleteOperation'): google_dot_protobuf_dot_empty__pb2.Empty.FromString,
('google.longrunning.Operations', 'GetOperation'): Operation.FromString,
('google.longrunning.Operations', 'ListOperations'): ListOperationsResponse.FromString,
}
cardinalities = {
'CancelOperation': cardinality.Cardinality.UNARY_UNARY,
'DeleteOperation': cardinality.Cardinality.UNARY_UNARY,
'GetOperation': cardinality.Cardinality.UNARY_UNARY,
'ListOperations': cardinality.Cardinality.UNARY_UNARY,
}
stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
return beta_implementations.dynamic_stub(channel, 'google.longrunning.Operations', cardinalities, options=stub_options)

View file

@ -0,0 +1,393 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/bigtable/admin/v2/table.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
from google.protobuf import descriptor_pb2
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name='google/bigtable/admin/v2/table.proto',
package='google.bigtable.admin.v2',
syntax='proto3',
serialized_pb=_b('\n$google/bigtable/admin/v2/table.proto\x12\x18google.bigtable.admin.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x1egoogle/protobuf/duration.proto\"\xa0\x03\n\x05Table\x12\x0c\n\x04name\x18\x01 \x01(\t\x12L\n\x0f\x63olumn_families\x18\x03 \x03(\x0b\x32\x33.google.bigtable.admin.v2.Table.ColumnFamiliesEntry\x12I\n\x0bgranularity\x18\x04 \x01(\x0e\x32\x34.google.bigtable.admin.v2.Table.TimestampGranularity\x1a]\n\x13\x43olumnFamiliesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x35\n\x05value\x18\x02 \x01(\x0b\x32&.google.bigtable.admin.v2.ColumnFamily:\x02\x38\x01\"I\n\x14TimestampGranularity\x12%\n!TIMESTAMP_GRANULARITY_UNSPECIFIED\x10\x00\x12\n\n\x06MILLIS\x10\x01\"F\n\x04View\x12\x14\n\x10VIEW_UNSPECIFIED\x10\x00\x12\r\n\tNAME_ONLY\x10\x01\x12\x0f\n\x0bSCHEMA_VIEW\x10\x02\x12\x08\n\x04\x46ULL\x10\x04\"A\n\x0c\x43olumnFamily\x12\x31\n\x07gc_rule\x18\x01 \x01(\x0b\x32 .google.bigtable.admin.v2.GcRule\"\xd5\x02\n\x06GcRule\x12\x1a\n\x10max_num_versions\x18\x01 \x01(\x05H\x00\x12,\n\x07max_age\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x12\x45\n\x0cintersection\x18\x03 \x01(\x0b\x32-.google.bigtable.admin.v2.GcRule.IntersectionH\x00\x12\x37\n\x05union\x18\x04 \x01(\x0b\x32&.google.bigtable.admin.v2.GcRule.UnionH\x00\x1a?\n\x0cIntersection\x12/\n\x05rules\x18\x01 \x03(\x0b\x32 .google.bigtable.admin.v2.GcRule\x1a\x38\n\x05Union\x12/\n\x05rules\x18\x01 \x03(\x0b\x32 .google.bigtable.admin.v2.GcRuleB\x06\n\x04ruleB,\n\x1c\x63om.google.bigtable.admin.v2B\nTableProtoP\x01\x62\x06proto3')
,
dependencies=[google_dot_api_dot_annotations__pb2.DESCRIPTOR,google_dot_protobuf_dot_duration__pb2.DESCRIPTOR,])
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
_TABLE_TIMESTAMPGRANULARITY = _descriptor.EnumDescriptor(
name='TimestampGranularity',
full_name='google.bigtable.admin.v2.Table.TimestampGranularity',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='TIMESTAMP_GRANULARITY_UNSPECIFIED', index=0, number=0,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='MILLIS', index=1, number=1,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=400,
serialized_end=473,
)
_sym_db.RegisterEnumDescriptor(_TABLE_TIMESTAMPGRANULARITY)
_TABLE_VIEW = _descriptor.EnumDescriptor(
name='View',
full_name='google.bigtable.admin.v2.Table.View',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='VIEW_UNSPECIFIED', index=0, number=0,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='NAME_ONLY', index=1, number=1,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='SCHEMA_VIEW', index=2, number=2,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='FULL', index=3, number=4,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=475,
serialized_end=545,
)
_sym_db.RegisterEnumDescriptor(_TABLE_VIEW)
_TABLE_COLUMNFAMILIESENTRY = _descriptor.Descriptor(
name='ColumnFamiliesEntry',
full_name='google.bigtable.admin.v2.Table.ColumnFamiliesEntry',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='key', full_name='google.bigtable.admin.v2.Table.ColumnFamiliesEntry.key', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='value', full_name='google.bigtable.admin.v2.Table.ColumnFamiliesEntry.value', index=1,
number=2, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=_descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')),
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=305,
serialized_end=398,
)
_TABLE = _descriptor.Descriptor(
name='Table',
full_name='google.bigtable.admin.v2.Table',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='name', full_name='google.bigtable.admin.v2.Table.name', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='column_families', full_name='google.bigtable.admin.v2.Table.column_families', index=1,
number=3, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='granularity', full_name='google.bigtable.admin.v2.Table.granularity', index=2,
number=4, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[_TABLE_COLUMNFAMILIESENTRY, ],
enum_types=[
_TABLE_TIMESTAMPGRANULARITY,
_TABLE_VIEW,
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=129,
serialized_end=545,
)
_COLUMNFAMILY = _descriptor.Descriptor(
name='ColumnFamily',
full_name='google.bigtable.admin.v2.ColumnFamily',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='gc_rule', full_name='google.bigtable.admin.v2.ColumnFamily.gc_rule', index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=547,
serialized_end=612,
)
_GCRULE_INTERSECTION = _descriptor.Descriptor(
name='Intersection',
full_name='google.bigtable.admin.v2.GcRule.Intersection',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='rules', full_name='google.bigtable.admin.v2.GcRule.Intersection.rules', index=0,
number=1, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=827,
serialized_end=890,
)
_GCRULE_UNION = _descriptor.Descriptor(
name='Union',
full_name='google.bigtable.admin.v2.GcRule.Union',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='rules', full_name='google.bigtable.admin.v2.GcRule.Union.rules', index=0,
number=1, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=892,
serialized_end=948,
)
_GCRULE = _descriptor.Descriptor(
name='GcRule',
full_name='google.bigtable.admin.v2.GcRule',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='max_num_versions', full_name='google.bigtable.admin.v2.GcRule.max_num_versions', index=0,
number=1, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='max_age', full_name='google.bigtable.admin.v2.GcRule.max_age', index=1,
number=2, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='intersection', full_name='google.bigtable.admin.v2.GcRule.intersection', index=2,
number=3, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='union', full_name='google.bigtable.admin.v2.GcRule.union', index=3,
number=4, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[_GCRULE_INTERSECTION, _GCRULE_UNION, ],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
_descriptor.OneofDescriptor(
name='rule', full_name='google.bigtable.admin.v2.GcRule.rule',
index=0, containing_type=None, fields=[]),
],
serialized_start=615,
serialized_end=956,
)
_TABLE_COLUMNFAMILIESENTRY.fields_by_name['value'].message_type = _COLUMNFAMILY
_TABLE_COLUMNFAMILIESENTRY.containing_type = _TABLE
_TABLE.fields_by_name['column_families'].message_type = _TABLE_COLUMNFAMILIESENTRY
_TABLE.fields_by_name['granularity'].enum_type = _TABLE_TIMESTAMPGRANULARITY
_TABLE_TIMESTAMPGRANULARITY.containing_type = _TABLE
_TABLE_VIEW.containing_type = _TABLE
_COLUMNFAMILY.fields_by_name['gc_rule'].message_type = _GCRULE
_GCRULE_INTERSECTION.fields_by_name['rules'].message_type = _GCRULE
_GCRULE_INTERSECTION.containing_type = _GCRULE
_GCRULE_UNION.fields_by_name['rules'].message_type = _GCRULE
_GCRULE_UNION.containing_type = _GCRULE
_GCRULE.fields_by_name['max_age'].message_type = google_dot_protobuf_dot_duration__pb2._DURATION
_GCRULE.fields_by_name['intersection'].message_type = _GCRULE_INTERSECTION
_GCRULE.fields_by_name['union'].message_type = _GCRULE_UNION
_GCRULE.oneofs_by_name['rule'].fields.append(
_GCRULE.fields_by_name['max_num_versions'])
_GCRULE.fields_by_name['max_num_versions'].containing_oneof = _GCRULE.oneofs_by_name['rule']
_GCRULE.oneofs_by_name['rule'].fields.append(
_GCRULE.fields_by_name['max_age'])
_GCRULE.fields_by_name['max_age'].containing_oneof = _GCRULE.oneofs_by_name['rule']
_GCRULE.oneofs_by_name['rule'].fields.append(
_GCRULE.fields_by_name['intersection'])
_GCRULE.fields_by_name['intersection'].containing_oneof = _GCRULE.oneofs_by_name['rule']
_GCRULE.oneofs_by_name['rule'].fields.append(
_GCRULE.fields_by_name['union'])
_GCRULE.fields_by_name['union'].containing_oneof = _GCRULE.oneofs_by_name['rule']
DESCRIPTOR.message_types_by_name['Table'] = _TABLE
DESCRIPTOR.message_types_by_name['ColumnFamily'] = _COLUMNFAMILY
DESCRIPTOR.message_types_by_name['GcRule'] = _GCRULE
Table = _reflection.GeneratedProtocolMessageType('Table', (_message.Message,), dict(
ColumnFamiliesEntry = _reflection.GeneratedProtocolMessageType('ColumnFamiliesEntry', (_message.Message,), dict(
DESCRIPTOR = _TABLE_COLUMNFAMILIESENTRY,
__module__ = 'google.bigtable.admin.v2.table_pb2'
# @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.Table.ColumnFamiliesEntry)
))
,
DESCRIPTOR = _TABLE,
__module__ = 'google.bigtable.admin.v2.table_pb2'
# @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.Table)
))
_sym_db.RegisterMessage(Table)
_sym_db.RegisterMessage(Table.ColumnFamiliesEntry)
ColumnFamily = _reflection.GeneratedProtocolMessageType('ColumnFamily', (_message.Message,), dict(
DESCRIPTOR = _COLUMNFAMILY,
__module__ = 'google.bigtable.admin.v2.table_pb2'
# @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.ColumnFamily)
))
_sym_db.RegisterMessage(ColumnFamily)
GcRule = _reflection.GeneratedProtocolMessageType('GcRule', (_message.Message,), dict(
Intersection = _reflection.GeneratedProtocolMessageType('Intersection', (_message.Message,), dict(
DESCRIPTOR = _GCRULE_INTERSECTION,
__module__ = 'google.bigtable.admin.v2.table_pb2'
# @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.GcRule.Intersection)
))
,
Union = _reflection.GeneratedProtocolMessageType('Union', (_message.Message,), dict(
DESCRIPTOR = _GCRULE_UNION,
__module__ = 'google.bigtable.admin.v2.table_pb2'
# @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.GcRule.Union)
))
,
DESCRIPTOR = _GCRULE,
__module__ = 'google.bigtable.admin.v2.table_pb2'
# @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.GcRule)
))
_sym_db.RegisterMessage(GcRule)
_sym_db.RegisterMessage(GcRule.Intersection)
_sym_db.RegisterMessage(GcRule.Union)
DESCRIPTOR.has_options = True
DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\n\034com.google.bigtable.admin.v2B\nTableProtoP\001'))
_TABLE_COLUMNFAMILIESENTRY.has_options = True
_TABLE_COLUMNFAMILIESENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001'))
# @@protoc_insertion_point(module_scope)