From 60c6c7ff0903132b59c87db26de6ccd454e25f6a Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 30 May 2023 12:05:04 -0700 Subject: [PATCH] feat(bigtable-admin-v2): Support for enabling the change stream on a table (#21683) feat(bigtable-admin-v2): Uses binary protobuf definitions for better forward compatibility --- .../google-cloud-bigtable-admin-v2.gemspec | 2 +- .../admin/v2/bigtable_instance_admin_pb.rb | 156 +++----------- .../admin/v2/bigtable_table_admin_pb.rb | 194 +++--------------- .../lib/google/bigtable/admin/v2/common_pb.rb | 36 +++- .../google/bigtable/admin/v2/instance_pb.rb | 106 +++------- .../lib/google/bigtable/admin/v2/table_pb.rb | 133 +++--------- .../admin/v2/bigtable_table_admin/client.rb | 10 +- .../bigtable/admin/v2/bigtable_table_admin.rb | 10 +- .../google/bigtable/admin/v2/table.rb | 18 ++ .../proto_docs/google/protobuf/any.rb | 11 +- .../proto_docs/google/protobuf/timestamp.rb | 4 +- 11 files changed, 175 insertions(+), 505 deletions(-) diff --git a/google-cloud-bigtable-admin-v2/google-cloud-bigtable-admin-v2.gemspec b/google-cloud-bigtable-admin-v2/google-cloud-bigtable-admin-v2.gemspec index b0bb06e2951b..d446b382e9aa 100644 --- a/google-cloud-bigtable-admin-v2/google-cloud-bigtable-admin-v2.gemspec +++ b/google-cloud-bigtable-admin-v2/google-cloud-bigtable-admin-v2.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 2.6" - gem.add_dependency "gapic-common", ">= 0.18.0", "< 2.a" + gem.add_dependency "gapic-common", ">= 0.19.0", "< 2.a" gem.add_dependency "google-cloud-errors", "~> 1.0" gem.add_dependency "grpc-google-iam-v1", "~> 1.1" diff --git a/google-cloud-bigtable-admin-v2/lib/google/bigtable/admin/v2/bigtable_instance_admin_pb.rb b/google-cloud-bigtable-admin-v2/lib/google/bigtable/admin/v2/bigtable_instance_admin_pb.rb index 78a6d2a3ff07..f88fd3c46383 100644 --- a/google-cloud-bigtable-admin-v2/lib/google/bigtable/admin/v2/bigtable_instance_admin_pb.rb +++ b/google-cloud-bigtable-admin-v2/lib/google/bigtable/admin/v2/bigtable_instance_admin_pb.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/bigtable/admin/v2/bigtable_instance_admin.proto @@ -15,137 +16,34 @@ require 'google/protobuf/field_mask_pb' require 'google/protobuf/timestamp_pb' -Google::Protobuf::DescriptorPool.generated_pool.build do - add_file("google/bigtable/admin/v2/bigtable_instance_admin.proto", :syntax => :proto3) do - add_message "google.bigtable.admin.v2.CreateInstanceRequest" do - optional :parent, :string, 1 - optional :instance_id, :string, 2 - optional :instance, :message, 3, "google.bigtable.admin.v2.Instance" - map :clusters, :string, :message, 4, "google.bigtable.admin.v2.Cluster" - end - add_message "google.bigtable.admin.v2.GetInstanceRequest" do - optional :name, :string, 1 - end - add_message "google.bigtable.admin.v2.ListInstancesRequest" do - optional :parent, :string, 1 - optional :page_token, :string, 2 - end - add_message "google.bigtable.admin.v2.ListInstancesResponse" do - repeated :instances, :message, 1, "google.bigtable.admin.v2.Instance" - repeated :failed_locations, :string, 2 - optional :next_page_token, :string, 3 - end - add_message "google.bigtable.admin.v2.PartialUpdateInstanceRequest" do - optional :instance, :message, 1, "google.bigtable.admin.v2.Instance" - optional :update_mask, :message, 2, "google.protobuf.FieldMask" - end - add_message "google.bigtable.admin.v2.DeleteInstanceRequest" do - optional :name, :string, 1 - end - add_message "google.bigtable.admin.v2.CreateClusterRequest" do - optional :parent, :string, 1 - optional :cluster_id, :string, 2 - optional :cluster, :message, 3, "google.bigtable.admin.v2.Cluster" - end - add_message "google.bigtable.admin.v2.GetClusterRequest" do - optional :name, :string, 1 - end - add_message "google.bigtable.admin.v2.ListClustersRequest" do - optional :parent, :string, 1 - optional :page_token, :string, 2 - end - add_message "google.bigtable.admin.v2.ListClustersResponse" do - repeated :clusters, :message, 1, "google.bigtable.admin.v2.Cluster" - repeated :failed_locations, :string, 2 - optional :next_page_token, :string, 3 - end - add_message "google.bigtable.admin.v2.DeleteClusterRequest" do - optional :name, :string, 1 - end - add_message "google.bigtable.admin.v2.CreateInstanceMetadata" do - optional :original_request, :message, 1, "google.bigtable.admin.v2.CreateInstanceRequest" - optional :request_time, :message, 2, "google.protobuf.Timestamp" - optional :finish_time, :message, 3, "google.protobuf.Timestamp" - end - add_message "google.bigtable.admin.v2.UpdateInstanceMetadata" do - optional :original_request, :message, 1, "google.bigtable.admin.v2.PartialUpdateInstanceRequest" - optional :request_time, :message, 2, "google.protobuf.Timestamp" - optional :finish_time, :message, 3, "google.protobuf.Timestamp" - end - add_message "google.bigtable.admin.v2.CreateClusterMetadata" do - optional :original_request, :message, 1, "google.bigtable.admin.v2.CreateClusterRequest" - optional :request_time, :message, 2, "google.protobuf.Timestamp" - optional :finish_time, :message, 3, "google.protobuf.Timestamp" - map :tables, :string, :message, 4, "google.bigtable.admin.v2.CreateClusterMetadata.TableProgress" - end - add_message "google.bigtable.admin.v2.CreateClusterMetadata.TableProgress" do - optional :estimated_size_bytes, :int64, 2 - optional :estimated_copied_bytes, :int64, 3 - optional :state, :enum, 4, "google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.State" - end - add_enum "google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.State" do - value :STATE_UNSPECIFIED, 0 - value :PENDING, 1 - value :COPYING, 2 - value :COMPLETED, 3 - value :CANCELLED, 4 - end - add_message "google.bigtable.admin.v2.UpdateClusterMetadata" do - optional :original_request, :message, 1, "google.bigtable.admin.v2.Cluster" - optional :request_time, :message, 2, "google.protobuf.Timestamp" - optional :finish_time, :message, 3, "google.protobuf.Timestamp" - end - add_message "google.bigtable.admin.v2.PartialUpdateClusterMetadata" do - optional :request_time, :message, 1, "google.protobuf.Timestamp" - optional :finish_time, :message, 2, "google.protobuf.Timestamp" - optional :original_request, :message, 3, "google.bigtable.admin.v2.PartialUpdateClusterRequest" - end - add_message "google.bigtable.admin.v2.PartialUpdateClusterRequest" do - optional :cluster, :message, 1, "google.bigtable.admin.v2.Cluster" - optional :update_mask, :message, 2, "google.protobuf.FieldMask" - end - add_message "google.bigtable.admin.v2.CreateAppProfileRequest" do - optional :parent, :string, 1 - optional :app_profile_id, :string, 2 - optional :app_profile, :message, 3, "google.bigtable.admin.v2.AppProfile" - optional :ignore_warnings, :bool, 4 - end - add_message "google.bigtable.admin.v2.GetAppProfileRequest" do - optional :name, :string, 1 - end - add_message "google.bigtable.admin.v2.ListAppProfilesRequest" do - optional :parent, :string, 1 - optional :page_size, :int32, 3 - optional :page_token, :string, 2 - end - add_message "google.bigtable.admin.v2.ListAppProfilesResponse" do - repeated :app_profiles, :message, 1, "google.bigtable.admin.v2.AppProfile" - optional :next_page_token, :string, 2 - repeated :failed_locations, :string, 3 - end - add_message "google.bigtable.admin.v2.UpdateAppProfileRequest" do - optional :app_profile, :message, 1, "google.bigtable.admin.v2.AppProfile" - optional :update_mask, :message, 2, "google.protobuf.FieldMask" - optional :ignore_warnings, :bool, 3 - end - add_message "google.bigtable.admin.v2.DeleteAppProfileRequest" do - optional :name, :string, 1 - optional :ignore_warnings, :bool, 2 - end - add_message "google.bigtable.admin.v2.UpdateAppProfileMetadata" do - end - add_message "google.bigtable.admin.v2.ListHotTabletsRequest" do - optional :parent, :string, 1 - optional :start_time, :message, 2, "google.protobuf.Timestamp" - optional :end_time, :message, 3, "google.protobuf.Timestamp" - optional :page_size, :int32, 4 - optional :page_token, :string, 5 - end - add_message "google.bigtable.admin.v2.ListHotTabletsResponse" do - repeated :hot_tablets, :message, 1, "google.bigtable.admin.v2.HotTablet" - optional :next_page_token, :string, 2 + +descriptor_data = "\n6google/bigtable/admin/v2/bigtable_instance_admin.proto\x12\x18google.bigtable.admin.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\'google/bigtable/admin/v2/instance.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xdb\x02\n\x15\x43reateInstanceRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x18\n\x0binstance_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x39\n\x08instance\x18\x03 \x01(\x0b\x32\".google.bigtable.admin.v2.InstanceB\x03\xe0\x41\x02\x12T\n\x08\x63lusters\x18\x04 \x03(\x0b\x32=.google.bigtable.admin.v2.CreateInstanceRequest.ClustersEntryB\x03\xe0\x41\x02\x1aR\n\rClustersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x30\n\x05value\x18\x02 \x01(\x0b\x32!.google.bigtable.admin.v2.Cluster:\x02\x38\x01\"Q\n\x12GetInstanceRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%bigtableadmin.googleapis.com/Instance\"o\n\x14ListInstancesRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x12\n\npage_token\x18\x02 \x01(\t\"\x81\x01\n\x15ListInstancesResponse\x12\x35\n\tinstances\x18\x01 \x03(\x0b\x32\".google.bigtable.admin.v2.Instance\x12\x18\n\x10\x66\x61iled_locations\x18\x02 \x03(\t\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\"\x8f\x01\n\x1cPartialUpdateInstanceRequest\x12\x39\n\x08instance\x18\x01 \x01(\x0b\x32\".google.bigtable.admin.v2.InstanceB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"T\n\x15\x44\x65leteInstanceRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%bigtableadmin.googleapis.com/Instance\"\xa7\x01\n\x14\x43reateClusterRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%bigtableadmin.googleapis.com/Instance\x12\x17\n\ncluster_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x37\n\x07\x63luster\x18\x03 \x01(\x0b\x32!.google.bigtable.admin.v2.ClusterB\x03\xe0\x41\x02\"O\n\x11GetClusterRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$bigtableadmin.googleapis.com/Cluster\"h\n\x13ListClustersRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%bigtableadmin.googleapis.com/Instance\x12\x12\n\npage_token\x18\x02 \x01(\t\"~\n\x14ListClustersResponse\x12\x33\n\x08\x63lusters\x18\x01 \x03(\x0b\x32!.google.bigtable.admin.v2.Cluster\x12\x18\n\x10\x66\x61iled_locations\x18\x02 \x03(\t\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\"R\n\x14\x44\x65leteClusterRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$bigtableadmin.googleapis.com/Cluster\"\xc6\x01\n\x16\x43reateInstanceMetadata\x12I\n\x10original_request\x18\x01 \x01(\x0b\x32/.google.bigtable.admin.v2.CreateInstanceRequest\x12\x30\n\x0crequest_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x66inish_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xcd\x01\n\x16UpdateInstanceMetadata\x12P\n\x10original_request\x18\x01 \x01(\x0b\x32\x36.google.bigtable.admin.v2.PartialUpdateInstanceRequest\x12\x30\n\x0crequest_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x66inish_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xfb\x04\n\x15\x43reateClusterMetadata\x12H\n\x10original_request\x18\x01 \x01(\x0b\x32..google.bigtable.admin.v2.CreateClusterRequest\x12\x30\n\x0crequest_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x66inish_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12K\n\x06tables\x18\x04 \x03(\x0b\x32;.google.bigtable.admin.v2.CreateClusterMetadata.TablesEntry\x1a\xf9\x01\n\rTableProgress\x12\x1c\n\x14\x65stimated_size_bytes\x18\x02 \x01(\x03\x12\x1e\n\x16\x65stimated_copied_bytes\x18\x03 \x01(\x03\x12R\n\x05state\x18\x04 \x01(\x0e\x32\x43.google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.State\"V\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0b\n\x07\x43OPYING\x10\x02\x12\r\n\tCOMPLETED\x10\x03\x12\r\n\tCANCELLED\x10\x04\x1al\n\x0bTablesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12L\n\x05value\x18\x02 \x01(\x0b\x32=.google.bigtable.admin.v2.CreateClusterMetadata.TableProgress:\x02\x38\x01\"\xb7\x01\n\x15UpdateClusterMetadata\x12;\n\x10original_request\x18\x01 \x01(\x0b\x32!.google.bigtable.admin.v2.Cluster\x12\x30\n\x0crequest_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x66inish_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xd2\x01\n\x1cPartialUpdateClusterMetadata\x12\x30\n\x0crequest_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x66inish_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12O\n\x10original_request\x18\x03 \x01(\x0b\x32\x35.google.bigtable.admin.v2.PartialUpdateClusterRequest\"\x8c\x01\n\x1bPartialUpdateClusterRequest\x12\x37\n\x07\x63luster\x18\x01 \x01(\x0b\x32!.google.bigtable.admin.v2.ClusterB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\xce\x01\n\x17\x43reateAppProfileRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%bigtableadmin.googleapis.com/Instance\x12\x1b\n\x0e\x61pp_profile_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12>\n\x0b\x61pp_profile\x18\x03 \x01(\x0b\x32$.google.bigtable.admin.v2.AppProfileB\x03\xe0\x41\x02\x12\x17\n\x0fignore_warnings\x18\x04 \x01(\x08\"U\n\x14GetAppProfileRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'bigtableadmin.googleapis.com/AppProfile\"~\n\x16ListAppProfilesRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%bigtableadmin.googleapis.com/Instance\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x02 \x01(\t\"\x88\x01\n\x17ListAppProfilesResponse\x12:\n\x0c\x61pp_profiles\x18\x01 \x03(\x0b\x32$.google.bigtable.admin.v2.AppProfile\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x18\n\x10\x66\x61iled_locations\x18\x03 \x03(\t\"\xa8\x01\n\x17UpdateAppProfileRequest\x12>\n\x0b\x61pp_profile\x18\x01 \x01(\x0b\x32$.google.bigtable.admin.v2.AppProfileB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x17\n\x0fignore_warnings\x18\x03 \x01(\x08\"v\n\x17\x44\x65leteAppProfileRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'bigtableadmin.googleapis.com/AppProfile\x12\x1c\n\x0fignore_warnings\x18\x02 \x01(\x08\x42\x03\xe0\x41\x02\"\x1a\n\x18UpdateAppProfileMetadata\"\xda\x01\n\x15ListHotTabletsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$bigtableadmin.googleapis.com/Cluster\x12.\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12\x12\n\npage_token\x18\x05 \x01(\t\"k\n\x16ListHotTabletsResponse\x12\x38\n\x0bhot_tablets\x18\x01 \x03(\x0b\x32#.google.bigtable.admin.v2.HotTablet\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xcb!\n\x15\x42igtableInstanceAdmin\x12\xda\x01\n\x0e\x43reateInstance\x12/.google.bigtable.admin.v2.CreateInstanceRequest\x1a\x1d.google.longrunning.Operation\"x\x82\xd3\xe4\x93\x02&\"!/v2/{parent=projects/*}/instances:\x01*\xda\x41$parent,instance_id,instance,clusters\xca\x41\"\n\x08Instance\x12\x16\x43reateInstanceMetadata\x12\x91\x01\n\x0bGetInstance\x12,.google.bigtable.admin.v2.GetInstanceRequest\x1a\".google.bigtable.admin.v2.Instance\"0\x82\xd3\xe4\x93\x02#\x12!/v2/{name=projects/*/instances/*}\xda\x41\x04name\x12\xa4\x01\n\rListInstances\x12..google.bigtable.admin.v2.ListInstancesRequest\x1a/.google.bigtable.admin.v2.ListInstancesResponse\"2\x82\xd3\xe4\x93\x02#\x12!/v2/{parent=projects/*}/instances\xda\x41\x06parent\x12\x86\x01\n\x0eUpdateInstance\x12\".google.bigtable.admin.v2.Instance\x1a\".google.bigtable.admin.v2.Instance\",\x82\xd3\xe4\x93\x02&\x1a!/v2/{name=projects/*/instances/*}:\x01*\x12\xe8\x01\n\x15PartialUpdateInstance\x12\x36.google.bigtable.admin.v2.PartialUpdateInstanceRequest\x1a\x1d.google.longrunning.Operation\"x\x82\xd3\xe4\x93\x02\x36\x32*/v2/{instance.name=projects/*/instances/*}:\x08instance\xda\x41\x14instance,update_mask\xca\x41\"\n\x08Instance\x12\x16UpdateInstanceMetadata\x12\x8b\x01\n\x0e\x44\x65leteInstance\x12/.google.bigtable.admin.v2.DeleteInstanceRequest\x1a\x16.google.protobuf.Empty\"0\x82\xd3\xe4\x93\x02#*!/v2/{name=projects/*/instances/*}\xda\x41\x04name\x12\xdc\x01\n\rCreateCluster\x12..google.bigtable.admin.v2.CreateClusterRequest\x1a\x1d.google.longrunning.Operation\"|\x82\xd3\xe4\x93\x02\x37\",/v2/{parent=projects/*/instances/*}/clusters:\x07\x63luster\xda\x41\x19parent,cluster_id,cluster\xca\x41 \n\x07\x43luster\x12\x15\x43reateClusterMetadata\x12\x99\x01\n\nGetCluster\x12+.google.bigtable.admin.v2.GetClusterRequest\x1a!.google.bigtable.admin.v2.Cluster\";\x82\xd3\xe4\x93\x02.\x12,/v2/{name=projects/*/instances/*/clusters/*}\xda\x41\x04name\x12\xac\x01\n\x0cListClusters\x12-.google.bigtable.admin.v2.ListClustersRequest\x1a..google.bigtable.admin.v2.ListClustersResponse\"=\x82\xd3\xe4\x93\x02.\x12,/v2/{parent=projects/*/instances/*}/clusters\xda\x41\x06parent\x12\xad\x01\n\rUpdateCluster\x12!.google.bigtable.admin.v2.Cluster\x1a\x1d.google.longrunning.Operation\"Z\x82\xd3\xe4\x93\x02\x31\x1a,/v2/{name=projects/*/instances/*/clusters/*}:\x01*\xca\x41 \n\x07\x43luster\x12\x15UpdateClusterMetadata\x12\xf4\x01\n\x14PartialUpdateCluster\x12\x35.google.bigtable.admin.v2.PartialUpdateClusterRequest\x1a\x1d.google.longrunning.Operation\"\x85\x01\x82\xd3\xe4\x93\x02?24/v2/{cluster.name=projects/*/instances/*/clusters/*}:\x07\x63luster\xda\x41\x13\x63luster,update_mask\xca\x41\'\n\x07\x43luster\x12\x1cPartialUpdateClusterMetadata\x12\x94\x01\n\rDeleteCluster\x12..google.bigtable.admin.v2.DeleteClusterRequest\x1a\x16.google.protobuf.Empty\";\x82\xd3\xe4\x93\x02.*,/v2/{name=projects/*/instances/*/clusters/*}\xda\x41\x04name\x12\xd5\x01\n\x10\x43reateAppProfile\x12\x31.google.bigtable.admin.v2.CreateAppProfileRequest\x1a$.google.bigtable.admin.v2.AppProfile\"h\x82\xd3\xe4\x93\x02>\"//v2/{parent=projects/*/instances/*}/appProfiles:\x0b\x61pp_profile\xda\x41!parent,app_profile_id,app_profile\x12\xa5\x01\n\rGetAppProfile\x12..google.bigtable.admin.v2.GetAppProfileRequest\x1a$.google.bigtable.admin.v2.AppProfile\">\x82\xd3\xe4\x93\x02\x31\x12//v2/{name=projects/*/instances/*/appProfiles/*}\xda\x41\x04name\x12\xb8\x01\n\x0fListAppProfiles\x12\x30.google.bigtable.admin.v2.ListAppProfilesRequest\x1a\x31.google.bigtable.admin.v2.ListAppProfilesResponse\"@\x82\xd3\xe4\x93\x02\x31\x12//v2/{parent=projects/*/instances/*}/appProfiles\xda\x41\x06parent\x12\xfa\x01\n\x10UpdateAppProfile\x12\x31.google.bigtable.admin.v2.UpdateAppProfileRequest\x1a\x1d.google.longrunning.Operation\"\x93\x01\x82\xd3\xe4\x93\x02J2;/v2/{app_profile.name=projects/*/instances/*/appProfiles/*}:\x0b\x61pp_profile\xda\x41\x17\x61pp_profile,update_mask\xca\x41&\n\nAppProfile\x12\x18UpdateAppProfileMetadata\x12\x9d\x01\n\x10\x44\x65leteAppProfile\x12\x31.google.bigtable.admin.v2.DeleteAppProfileRequest\x1a\x16.google.protobuf.Empty\">\x82\xd3\xe4\x93\x02\x31*//v2/{name=projects/*/instances/*/appProfiles/*}\xda\x41\x04name\x12\x93\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"H\x82\xd3\xe4\x93\x02\x37\"2/v2/{resource=projects/*/instances/*}:getIamPolicy:\x01*\xda\x41\x08resource\x12\x9a\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"O\x82\xd3\xe4\x93\x02\x37\"2/v2/{resource=projects/*/instances/*}:setIamPolicy:\x01*\xda\x41\x0fresource,policy\x12\xc5\x01\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"Z\x82\xd3\xe4\x93\x02=\"8/v2/{resource=projects/*/instances/*}:testIamPermissions:\x01*\xda\x41\x14resource,permissions\x12\xbf\x01\n\x0eListHotTablets\x12/.google.bigtable.admin.v2.ListHotTabletsRequest\x1a\x30.google.bigtable.admin.v2.ListHotTabletsResponse\"J\x82\xd3\xe4\x93\x02;\x12\x39/v2/{parent=projects/*/instances/*/clusters/*}/hotTablets\xda\x41\x06parent\x1a\x9a\x03\xca\x41\x1c\x62igtableadmin.googleapis.com\xd2\x41\xf7\x02https://www.googleapis.com/auth/bigtable.admin,https://www.googleapis.com/auth/bigtable.admin.cluster,https://www.googleapis.com/auth/bigtable.admin.instance,https://www.googleapis.com/auth/cloud-bigtable.admin,https://www.googleapis.com/auth/cloud-bigtable.admin.cluster,https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-onlyB\xe2\x01\n\x1c\x63om.google.bigtable.admin.v2B\x1a\x42igtableInstanceAdminProtoP\x01Z=google.golang.org/genproto/googleapis/bigtable/admin/v2;admin\xaa\x02\x1eGoogle.Cloud.Bigtable.Admin.V2\xca\x02\x1eGoogle\\Cloud\\Bigtable\\Admin\\V2\xea\x02\"Google::Cloud::Bigtable::Admin::V2b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError => e + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.bigtable.admin.v2.Instance", "google/bigtable/admin/v2/instance.proto"], + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" end end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." end module Google diff --git a/google-cloud-bigtable-admin-v2/lib/google/bigtable/admin/v2/bigtable_table_admin_pb.rb b/google-cloud-bigtable-admin-v2/lib/google/bigtable/admin/v2/bigtable_table_admin_pb.rb index c3e9fd27ff0a..cb037552353c 100644 --- a/google-cloud-bigtable-admin-v2/lib/google/bigtable/admin/v2/bigtable_table_admin_pb.rb +++ b/google-cloud-bigtable-admin-v2/lib/google/bigtable/admin/v2/bigtable_table_admin_pb.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/bigtable/admin/v2/bigtable_table_admin.proto @@ -17,173 +18,36 @@ require 'google/protobuf/field_mask_pb' require 'google/protobuf/timestamp_pb' -Google::Protobuf::DescriptorPool.generated_pool.build do - add_file("google/bigtable/admin/v2/bigtable_table_admin.proto", :syntax => :proto3) do - add_message "google.bigtable.admin.v2.RestoreTableRequest" do - optional :parent, :string, 1 - optional :table_id, :string, 2 - oneof :source do - optional :backup, :string, 3 - end - end - add_message "google.bigtable.admin.v2.RestoreTableMetadata" do - optional :name, :string, 1 - optional :source_type, :enum, 2, "google.bigtable.admin.v2.RestoreSourceType" - optional :optimize_table_operation_name, :string, 4 - optional :progress, :message, 5, "google.bigtable.admin.v2.OperationProgress" - oneof :source_info do - optional :backup_info, :message, 3, "google.bigtable.admin.v2.BackupInfo" - end - end - add_message "google.bigtable.admin.v2.OptimizeRestoredTableMetadata" do - optional :name, :string, 1 - optional :progress, :message, 2, "google.bigtable.admin.v2.OperationProgress" - end - add_message "google.bigtable.admin.v2.CreateTableRequest" do - optional :parent, :string, 1 - optional :table_id, :string, 2 - optional :table, :message, 3, "google.bigtable.admin.v2.Table" - repeated :initial_splits, :message, 4, "google.bigtable.admin.v2.CreateTableRequest.Split" - end - add_message "google.bigtable.admin.v2.CreateTableRequest.Split" do - optional :key, :bytes, 1 - end - add_message "google.bigtable.admin.v2.CreateTableFromSnapshotRequest" do - optional :parent, :string, 1 - optional :table_id, :string, 2 - optional :source_snapshot, :string, 3 - end - add_message "google.bigtable.admin.v2.DropRowRangeRequest" do - optional :name, :string, 1 - oneof :target do - optional :row_key_prefix, :bytes, 2 - optional :delete_all_data_from_table, :bool, 3 - end - end - add_message "google.bigtable.admin.v2.ListTablesRequest" do - optional :parent, :string, 1 - optional :view, :enum, 2, "google.bigtable.admin.v2.Table.View" - optional :page_size, :int32, 4 - optional :page_token, :string, 3 - end - add_message "google.bigtable.admin.v2.ListTablesResponse" do - repeated :tables, :message, 1, "google.bigtable.admin.v2.Table" - optional :next_page_token, :string, 2 - end - add_message "google.bigtable.admin.v2.GetTableRequest" do - optional :name, :string, 1 - optional :view, :enum, 2, "google.bigtable.admin.v2.Table.View" - end - add_message "google.bigtable.admin.v2.UpdateTableRequest" do - optional :table, :message, 1, "google.bigtable.admin.v2.Table" - optional :update_mask, :message, 2, "google.protobuf.FieldMask" - end - add_message "google.bigtable.admin.v2.UpdateTableMetadata" do - optional :name, :string, 1 - optional :start_time, :message, 2, "google.protobuf.Timestamp" - optional :end_time, :message, 3, "google.protobuf.Timestamp" - end - add_message "google.bigtable.admin.v2.DeleteTableRequest" do - optional :name, :string, 1 - end - add_message "google.bigtable.admin.v2.UndeleteTableRequest" do - optional :name, :string, 1 - end - add_message "google.bigtable.admin.v2.UndeleteTableMetadata" do - optional :name, :string, 1 - optional :start_time, :message, 2, "google.protobuf.Timestamp" - optional :end_time, :message, 3, "google.protobuf.Timestamp" - end - add_message "google.bigtable.admin.v2.ModifyColumnFamiliesRequest" do - optional :name, :string, 1 - repeated :modifications, :message, 2, "google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification" - end - add_message "google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification" do - optional :id, :string, 1 - oneof :mod do - optional :create, :message, 2, "google.bigtable.admin.v2.ColumnFamily" - optional :update, :message, 3, "google.bigtable.admin.v2.ColumnFamily" - optional :drop, :bool, 4 - end - end - add_message "google.bigtable.admin.v2.GenerateConsistencyTokenRequest" do - optional :name, :string, 1 - end - add_message "google.bigtable.admin.v2.GenerateConsistencyTokenResponse" do - optional :consistency_token, :string, 1 - end - add_message "google.bigtable.admin.v2.CheckConsistencyRequest" do - optional :name, :string, 1 - optional :consistency_token, :string, 2 - end - add_message "google.bigtable.admin.v2.CheckConsistencyResponse" do - optional :consistent, :bool, 1 - end - add_message "google.bigtable.admin.v2.SnapshotTableRequest" do - optional :name, :string, 1 - optional :cluster, :string, 2 - optional :snapshot_id, :string, 3 - optional :ttl, :message, 4, "google.protobuf.Duration" - optional :description, :string, 5 - end - add_message "google.bigtable.admin.v2.GetSnapshotRequest" do - optional :name, :string, 1 - end - add_message "google.bigtable.admin.v2.ListSnapshotsRequest" do - optional :parent, :string, 1 - optional :page_size, :int32, 2 - optional :page_token, :string, 3 - end - add_message "google.bigtable.admin.v2.ListSnapshotsResponse" do - repeated :snapshots, :message, 1, "google.bigtable.admin.v2.Snapshot" - optional :next_page_token, :string, 2 - end - add_message "google.bigtable.admin.v2.DeleteSnapshotRequest" do - optional :name, :string, 1 - end - add_message "google.bigtable.admin.v2.SnapshotTableMetadata" do - optional :original_request, :message, 1, "google.bigtable.admin.v2.SnapshotTableRequest" - optional :request_time, :message, 2, "google.protobuf.Timestamp" - optional :finish_time, :message, 3, "google.protobuf.Timestamp" - end - add_message "google.bigtable.admin.v2.CreateTableFromSnapshotMetadata" do - optional :original_request, :message, 1, "google.bigtable.admin.v2.CreateTableFromSnapshotRequest" - optional :request_time, :message, 2, "google.protobuf.Timestamp" - optional :finish_time, :message, 3, "google.protobuf.Timestamp" - end - add_message "google.bigtable.admin.v2.CreateBackupRequest" do - optional :parent, :string, 1 - optional :backup_id, :string, 2 - optional :backup, :message, 3, "google.bigtable.admin.v2.Backup" - end - add_message "google.bigtable.admin.v2.CreateBackupMetadata" do - optional :name, :string, 1 - optional :source_table, :string, 2 - optional :start_time, :message, 3, "google.protobuf.Timestamp" - optional :end_time, :message, 4, "google.protobuf.Timestamp" - end - add_message "google.bigtable.admin.v2.UpdateBackupRequest" do - optional :backup, :message, 1, "google.bigtable.admin.v2.Backup" - optional :update_mask, :message, 2, "google.protobuf.FieldMask" - end - add_message "google.bigtable.admin.v2.GetBackupRequest" do - optional :name, :string, 1 - end - add_message "google.bigtable.admin.v2.DeleteBackupRequest" do - optional :name, :string, 1 - end - add_message "google.bigtable.admin.v2.ListBackupsRequest" do - optional :parent, :string, 1 - optional :filter, :string, 2 - optional :order_by, :string, 3 - optional :page_size, :int32, 4 - optional :page_token, :string, 5 - end - add_message "google.bigtable.admin.v2.ListBackupsResponse" do - repeated :backups, :message, 1, "google.bigtable.admin.v2.Backup" - optional :next_page_token, :string, 2 + +descriptor_data = "\n3google/bigtable/admin/v2/bigtable_table_admin.proto\x12\x18google.bigtable.admin.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a%google/bigtable/admin/v2/common.proto\x1a$google/bigtable/admin/v2/table.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb1\x01\n\x13RestoreTableRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%bigtableadmin.googleapis.com/Instance\x12\x15\n\x08table_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12:\n\x06\x62\x61\x63kup\x18\x03 \x01(\tB(\xfa\x41%\n#bigtableadmin.googleapis.com/BackupH\x00\x42\x08\n\x06source\"\x98\x02\n\x14RestoreTableMetadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12@\n\x0bsource_type\x18\x02 \x01(\x0e\x32+.google.bigtable.admin.v2.RestoreSourceType\x12;\n\x0b\x62\x61\x63kup_info\x18\x03 \x01(\x0b\x32$.google.bigtable.admin.v2.BackupInfoH\x00\x12%\n\x1doptimize_table_operation_name\x18\x04 \x01(\t\x12=\n\x08progress\x18\x05 \x01(\x0b\x32+.google.bigtable.admin.v2.OperationProgressB\r\n\x0bsource_info\"l\n\x1dOptimizeRestoredTableMetadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12=\n\x08progress\x18\x02 \x01(\x0b\x32+.google.bigtable.admin.v2.OperationProgress\"\x81\x02\n\x12\x43reateTableRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%bigtableadmin.googleapis.com/Instance\x12\x15\n\x08table_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x33\n\x05table\x18\x03 \x01(\x0b\x32\x1f.google.bigtable.admin.v2.TableB\x03\xe0\x41\x02\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\"\xbe\x01\n\x1e\x43reateTableFromSnapshotRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%bigtableadmin.googleapis.com/Instance\x12\x15\n\x08table_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x46\n\x0fsource_snapshot\x18\x03 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%bigtableadmin.googleapis.com/Snapshot\"\x99\x01\n\x13\x44ropRowRangeRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\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\"\xad\x01\n\x11ListTablesRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%bigtableadmin.googleapis.com/Instance\x12\x32\n\x04view\x18\x02 \x01(\x0e\x32$.google.bigtable.admin.v2.Table.View\x12\x11\n\tpage_size\x18\x04 \x01(\x05\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\"\x7f\n\x0fGetTableRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12\x32\n\x04view\x18\x02 \x01(\x0e\x32$.google.bigtable.admin.v2.Table.View\"\x7f\n\x12UpdateTableRequest\x12\x33\n\x05table\x18\x01 \x01(\x0b\x32\x1f.google.bigtable.admin.v2.TableB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\x81\x01\n\x13UpdateTableMetadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12.\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"N\n\x12\x44\x65leteTableRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\"P\n\x14UndeleteTableRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\"\x83\x01\n\x15UndeleteTableMetadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12.\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xdf\x02\n\x1bModifyColumnFamiliesRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12^\n\rmodifications\x18\x02 \x03(\x0b\x32\x42.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.ModificationB\x03\xe0\x41\x02\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\x03mod\"[\n\x1fGenerateConsistencyTokenRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\"=\n GenerateConsistencyTokenResponse\x12\x19\n\x11\x63onsistency_token\x18\x01 \x01(\t\"s\n\x17\x43heckConsistencyRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12\x1e\n\x11\x63onsistency_token\x18\x02 \x01(\tB\x03\xe0\x41\x02\".\n\x18\x43heckConsistencyResponse\x12\x12\n\nconsistent\x18\x01 \x01(\x08\"\xe6\x01\n\x14SnapshotTableRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12=\n\x07\x63luster\x18\x02 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$bigtableadmin.googleapis.com/Cluster\x12\x18\n\x0bsnapshot_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12&\n\x03ttl\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x13\n\x0b\x64\x65scription\x18\x05 \x01(\t\"Q\n\x12GetSnapshotRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%bigtableadmin.googleapis.com/Snapshot\"{\n\x14ListSnapshotsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$bigtableadmin.googleapis.com/Cluster\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"g\n\x15ListSnapshotsResponse\x12\x35\n\tsnapshots\x18\x01 \x03(\x0b\x32\".google.bigtable.admin.v2.Snapshot\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"T\n\x15\x44\x65leteSnapshotRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%bigtableadmin.googleapis.com/Snapshot\"\xc4\x01\n\x15SnapshotTableMetadata\x12H\n\x10original_request\x18\x01 \x01(\x0b\x32..google.bigtable.admin.v2.SnapshotTableRequest\x12\x30\n\x0crequest_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x66inish_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xd8\x01\n\x1f\x43reateTableFromSnapshotMetadata\x12R\n\x10original_request\x18\x01 \x01(\x0b\x32\x38.google.bigtable.admin.v2.CreateTableFromSnapshotRequest\x12\x30\n\x0crequest_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x66inish_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xa2\x01\n\x13\x43reateBackupRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$bigtableadmin.googleapis.com/Cluster\x12\x16\n\tbackup_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x35\n\x06\x62\x61\x63kup\x18\x03 \x01(\x0b\x32 .google.bigtable.admin.v2.BackupB\x03\xe0\x41\x02\"\x98\x01\n\x14\x43reateBackupMetadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0csource_table\x18\x02 \x01(\t\x12.\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x82\x01\n\x13UpdateBackupRequest\x12\x35\n\x06\x62\x61\x63kup\x18\x01 \x01(\x0b\x32 .google.bigtable.admin.v2.BackupB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"M\n\x10GetBackupRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#bigtableadmin.googleapis.com/Backup\"P\n\x13\x44\x65leteBackupRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#bigtableadmin.googleapis.com/Backup\"\x9b\x01\n\x12ListBackupsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$bigtableadmin.googleapis.com/Cluster\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x10\n\x08order_by\x18\x03 \x01(\t\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12\x12\n\npage_token\x18\x05 \x01(\t\"a\n\x13ListBackupsResponse\x12\x31\n\x07\x62\x61\x63kups\x18\x01 \x03(\x0b\x32 .google.bigtable.admin.v2.Backup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xb2(\n\x12\x42igtableTableAdmin\x12\xab\x01\n\x0b\x43reateTable\x12,.google.bigtable.admin.v2.CreateTableRequest\x1a\x1f.google.bigtable.admin.v2.Table\"M\x82\xd3\xe4\x93\x02/\"*/v2/{parent=projects/*/instances/*}/tables:\x01*\xda\x41\x15parent,table_id,table\x12\x8a\x02\n\x17\x43reateTableFromSnapshot\x12\x38.google.bigtable.admin.v2.CreateTableFromSnapshotRequest\x1a\x1d.google.longrunning.Operation\"\x95\x01\x82\xd3\xe4\x93\x02\x42\"=/v2/{parent=projects/*/instances/*}/tables:createFromSnapshot:\x01*\xda\x41\x1fparent,table_id,source_snapshot\xca\x41(\n\x05Table\x12\x1f\x43reateTableFromSnapshotMetadata\x12\xa4\x01\n\nListTables\x12+.google.bigtable.admin.v2.ListTablesRequest\x1a,.google.bigtable.admin.v2.ListTablesResponse\";\x82\xd3\xe4\x93\x02,\x12*/v2/{parent=projects/*/instances/*}/tables\xda\x41\x06parent\x12\x91\x01\n\x08GetTable\x12).google.bigtable.admin.v2.GetTableRequest\x1a\x1f.google.bigtable.admin.v2.Table\"9\x82\xd3\xe4\x93\x02,\x12*/v2/{name=projects/*/instances/*/tables/*}\xda\x41\x04name\x12\xce\x01\n\x0bUpdateTable\x12,.google.bigtable.admin.v2.UpdateTableRequest\x1a\x1d.google.longrunning.Operation\"r\x82\xd3\xe4\x93\x02\x39\x32\x30/v2/{table.name=projects/*/instances/*/tables/*}:\x05table\xda\x41\x11table,update_mask\xca\x41\x1c\n\x05Table\x12\x13UpdateTableMetadata\x12\x8e\x01\n\x0b\x44\x65leteTable\x12,.google.bigtable.admin.v2.DeleteTableRequest\x1a\x16.google.protobuf.Empty\"9\x82\xd3\xe4\x93\x02,**/v2/{name=projects/*/instances/*/tables/*}\xda\x41\x04name\x12\xc6\x01\n\rUndeleteTable\x12..google.bigtable.admin.v2.UndeleteTableRequest\x1a\x1d.google.longrunning.Operation\"f\x82\xd3\xe4\x93\x02\x38\"3/v2/{name=projects/*/instances/*/tables/*}:undelete:\x01*\xda\x41\x04name\xca\x41\x1e\n\x05Table\x12\x15UndeleteTableMetadata\x12\xcf\x01\n\x14ModifyColumnFamilies\x12\x35.google.bigtable.admin.v2.ModifyColumnFamiliesRequest\x1a\x1f.google.bigtable.admin.v2.Table\"_\x82\xd3\xe4\x93\x02\x44\"?/v2/{name=projects/*/instances/*/tables/*}:modifyColumnFamilies:\x01*\xda\x41\x12name,modifications\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*\x12\xe8\x01\n\x18GenerateConsistencyToken\x12\x39.google.bigtable.admin.v2.GenerateConsistencyTokenRequest\x1a:.google.bigtable.admin.v2.GenerateConsistencyTokenResponse\"U\x82\xd3\xe4\x93\x02H\"C/v2/{name=projects/*/instances/*/tables/*}:generateConsistencyToken:\x01*\xda\x41\x04name\x12\xda\x01\n\x10\x43heckConsistency\x12\x31.google.bigtable.admin.v2.CheckConsistencyRequest\x1a\x32.google.bigtable.admin.v2.CheckConsistencyResponse\"_\x82\xd3\xe4\x93\x02@\";/v2/{name=projects/*/instances/*/tables/*}:checkConsistency:\x01*\xda\x41\x16name,consistency_token\x12\xea\x01\n\rSnapshotTable\x12..google.bigtable.admin.v2.SnapshotTableRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\x82\xd3\xe4\x93\x02\x38\"3/v2/{name=projects/*/instances/*/tables/*}:snapshot:\x01*\xda\x41$name,cluster,snapshot_id,description\xca\x41!\n\x08Snapshot\x12\x15SnapshotTableMetadata\x12\xa8\x01\n\x0bGetSnapshot\x12,.google.bigtable.admin.v2.GetSnapshotRequest\x1a\".google.bigtable.admin.v2.Snapshot\"G\x82\xd3\xe4\x93\x02:\x12\x38/v2/{name=projects/*/instances/*/clusters/*/snapshots/*}\xda\x41\x04name\x12\xbb\x01\n\rListSnapshots\x12..google.bigtable.admin.v2.ListSnapshotsRequest\x1a/.google.bigtable.admin.v2.ListSnapshotsResponse\"I\x82\xd3\xe4\x93\x02:\x12\x38/v2/{parent=projects/*/instances/*/clusters/*}/snapshots\xda\x41\x06parent\x12\xa2\x01\n\x0e\x44\x65leteSnapshot\x12/.google.bigtable.admin.v2.DeleteSnapshotRequest\x1a\x16.google.protobuf.Empty\"G\x82\xd3\xe4\x93\x02:*8/v2/{name=projects/*/instances/*/clusters/*/snapshots/*}\xda\x41\x04name\x12\xe0\x01\n\x0c\x43reateBackup\x12-.google.bigtable.admin.v2.CreateBackupRequest\x1a\x1d.google.longrunning.Operation\"\x81\x01\x82\xd3\xe4\x93\x02@\"6/v2/{parent=projects/*/instances/*/clusters/*}/backups:\x06\x62\x61\x63kup\xda\x41\x17parent,backup_id,backup\xca\x41\x1e\n\x06\x42\x61\x63kup\x12\x14\x43reateBackupMetadata\x12\xa0\x01\n\tGetBackup\x12*.google.bigtable.admin.v2.GetBackupRequest\x1a .google.bigtable.admin.v2.Backup\"E\x82\xd3\xe4\x93\x02\x38\x12\x36/v2/{name=projects/*/instances/*/clusters/*/backups/*}\xda\x41\x04name\x12\xc3\x01\n\x0cUpdateBackup\x12-.google.bigtable.admin.v2.UpdateBackupRequest\x1a .google.bigtable.admin.v2.Backup\"b\x82\xd3\xe4\x93\x02G2=/v2/{backup.name=projects/*/instances/*/clusters/*/backups/*}:\x06\x62\x61\x63kup\xda\x41\x12\x62\x61\x63kup,update_mask\x12\x9c\x01\n\x0c\x44\x65leteBackup\x12-.google.bigtable.admin.v2.DeleteBackupRequest\x1a\x16.google.protobuf.Empty\"E\x82\xd3\xe4\x93\x02\x38*6/v2/{name=projects/*/instances/*/clusters/*/backups/*}\xda\x41\x04name\x12\xb3\x01\n\x0bListBackups\x12,.google.bigtable.admin.v2.ListBackupsRequest\x1a-.google.bigtable.admin.v2.ListBackupsResponse\"G\x82\xd3\xe4\x93\x02\x38\x12\x36/v2/{parent=projects/*/instances/*/clusters/*}/backups\xda\x41\x06parent\x12\xbb\x01\n\x0cRestoreTable\x12-.google.bigtable.admin.v2.RestoreTableRequest\x1a\x1d.google.longrunning.Operation\"]\x82\xd3\xe4\x93\x02\x37\"2/v2/{parent=projects/*/instances/*}/tables:restore:\x01*\xca\x41\x1d\n\x05Table\x12\x14RestoreTableMetadata\x12\xec\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"\xa0\x01\x82\xd3\xe4\x93\x02\x8e\x01\";/v2/{resource=projects/*/instances/*/tables/*}:getIamPolicy:\x01*ZL\"G/v2/{resource=projects/*/instances/*/clusters/*/backups/*}:getIamPolicy:\x01*\xda\x41\x08resource\x12\xf3\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"\xa7\x01\x82\xd3\xe4\x93\x02\x8e\x01\";/v2/{resource=projects/*/instances/*/tables/*}:setIamPolicy:\x01*ZL\"G/v2/{resource=projects/*/instances/*/clusters/*/backups/*}:setIamPolicy:\x01*\xda\x41\x0fresource,policy\x12\xa4\x02\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"\xb8\x01\x82\xd3\xe4\x93\x02\x9a\x01\"A/v2/{resource=projects/*/instances/*/tables/*}:testIamPermissions:\x01*ZR\"M/v2/{resource=projects/*/instances/*/clusters/*/backups/*}:testIamPermissions:\x01*\xda\x41\x14resource,permissions\x1a\xde\x02\xca\x41\x1c\x62igtableadmin.googleapis.com\xd2\x41\xbb\x02https://www.googleapis.com/auth/bigtable.admin,https://www.googleapis.com/auth/bigtable.admin.table,https://www.googleapis.com/auth/cloud-bigtable.admin,https://www.googleapis.com/auth/cloud-bigtable.admin.table,https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-onlyB\xdf\x01\n\x1c\x63om.google.bigtable.admin.v2B\x17\x42igtableTableAdminProtoP\x01Z=google.golang.org/genproto/googleapis/bigtable/admin/v2;admin\xaa\x02\x1eGoogle.Cloud.Bigtable.Admin.V2\xca\x02\x1eGoogle\\Cloud\\Bigtable\\Admin\\V2\xea\x02\"Google::Cloud::Bigtable::Admin::V2b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError => e + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.bigtable.admin.v2.BackupInfo", "google/bigtable/admin/v2/table.proto"], + ["google.bigtable.admin.v2.OperationProgress", "google/bigtable/admin/v2/common.proto"], + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.protobuf.Duration", "google/protobuf/duration.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" end end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." end module Google diff --git a/google-cloud-bigtable-admin-v2/lib/google/bigtable/admin/v2/common_pb.rb b/google-cloud-bigtable-admin-v2/lib/google/bigtable/admin/v2/common_pb.rb index 756b928d3f7d..1ba0ccda18f6 100644 --- a/google-cloud-bigtable-admin-v2/lib/google/bigtable/admin/v2/common_pb.rb +++ b/google-cloud-bigtable-admin-v2/lib/google/bigtable/admin/v2/common_pb.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/bigtable/admin/v2/common.proto @@ -5,19 +6,32 @@ require 'google/protobuf/timestamp_pb' -Google::Protobuf::DescriptorPool.generated_pool.build do - add_file("google/bigtable/admin/v2/common.proto", :syntax => :proto3) do - add_message "google.bigtable.admin.v2.OperationProgress" do - optional :progress_percent, :int32, 1 - optional :start_time, :message, 2, "google.protobuf.Timestamp" - optional :end_time, :message, 3, "google.protobuf.Timestamp" - end - add_enum "google.bigtable.admin.v2.StorageType" do - value :STORAGE_TYPE_UNSPECIFIED, 0 - value :SSD, 1 - value :HDD, 2 + +descriptor_data = "\n%google/bigtable/admin/v2/common.proto\x12\x18google.bigtable.admin.v2\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8b\x01\n\x11OperationProgress\x12\x18\n\x10progress_percent\x18\x01 \x01(\x05\x12.\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp*=\n\x0bStorageType\x12\x1c\n\x18STORAGE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03SSD\x10\x01\x12\x07\n\x03HDD\x10\x02\x42\xd3\x01\n\x1c\x63om.google.bigtable.admin.v2B\x0b\x43ommonProtoP\x01Z=google.golang.org/genproto/googleapis/bigtable/admin/v2;admin\xaa\x02\x1eGoogle.Cloud.Bigtable.Admin.V2\xca\x02\x1eGoogle\\Cloud\\Bigtable\\Admin\\V2\xea\x02\"Google::Cloud::Bigtable::Admin::V2b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError => e + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" end end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." end module Google diff --git a/google-cloud-bigtable-admin-v2/lib/google/bigtable/admin/v2/instance_pb.rb b/google-cloud-bigtable-admin-v2/lib/google/bigtable/admin/v2/instance_pb.rb index 420aa375a10a..749d3664c726 100644 --- a/google-cloud-bigtable-admin-v2/lib/google/bigtable/admin/v2/instance_pb.rb +++ b/google-cloud-bigtable-admin-v2/lib/google/bigtable/admin/v2/instance_pb.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/bigtable/admin/v2/instance.proto @@ -8,89 +9,32 @@ require 'google/bigtable/admin/v2/common_pb' require 'google/protobuf/timestamp_pb' -Google::Protobuf::DescriptorPool.generated_pool.build do - add_file("google/bigtable/admin/v2/instance.proto", :syntax => :proto3) do - add_message "google.bigtable.admin.v2.Instance" do - optional :name, :string, 1 - optional :display_name, :string, 2 - optional :state, :enum, 3, "google.bigtable.admin.v2.Instance.State" - optional :type, :enum, 4, "google.bigtable.admin.v2.Instance.Type" - map :labels, :string, :string, 5 - optional :create_time, :message, 7, "google.protobuf.Timestamp" - proto3_optional :satisfies_pzs, :bool, 8 - end - add_enum "google.bigtable.admin.v2.Instance.State" do - value :STATE_NOT_KNOWN, 0 - value :READY, 1 - value :CREATING, 2 - end - add_enum "google.bigtable.admin.v2.Instance.Type" do - value :TYPE_UNSPECIFIED, 0 - value :PRODUCTION, 1 - value :DEVELOPMENT, 2 - end - add_message "google.bigtable.admin.v2.AutoscalingTargets" do - optional :cpu_utilization_percent, :int32, 2 - optional :storage_utilization_gib_per_node, :int32, 3 - end - add_message "google.bigtable.admin.v2.AutoscalingLimits" do - optional :min_serve_nodes, :int32, 1 - optional :max_serve_nodes, :int32, 2 - end - add_message "google.bigtable.admin.v2.Cluster" do - optional :name, :string, 1 - optional :location, :string, 2 - optional :state, :enum, 3, "google.bigtable.admin.v2.Cluster.State" - optional :serve_nodes, :int32, 4 - optional :default_storage_type, :enum, 5, "google.bigtable.admin.v2.StorageType" - optional :encryption_config, :message, 6, "google.bigtable.admin.v2.Cluster.EncryptionConfig" - oneof :config do - optional :cluster_config, :message, 7, "google.bigtable.admin.v2.Cluster.ClusterConfig" - end - end - add_message "google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig" do - optional :autoscaling_limits, :message, 1, "google.bigtable.admin.v2.AutoscalingLimits" - optional :autoscaling_targets, :message, 2, "google.bigtable.admin.v2.AutoscalingTargets" - end - add_message "google.bigtable.admin.v2.Cluster.ClusterConfig" do - optional :cluster_autoscaling_config, :message, 1, "google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig" - end - add_message "google.bigtable.admin.v2.Cluster.EncryptionConfig" do - optional :kms_key_name, :string, 1 - end - add_enum "google.bigtable.admin.v2.Cluster.State" do - value :STATE_NOT_KNOWN, 0 - value :READY, 1 - value :CREATING, 2 - value :RESIZING, 3 - value :DISABLED, 4 - end - add_message "google.bigtable.admin.v2.AppProfile" do - optional :name, :string, 1 - optional :etag, :string, 2 - optional :description, :string, 3 - oneof :routing_policy do - optional :multi_cluster_routing_use_any, :message, 5, "google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny" - optional :single_cluster_routing, :message, 6, "google.bigtable.admin.v2.AppProfile.SingleClusterRouting" - end - end - add_message "google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny" do - repeated :cluster_ids, :string, 1 - end - add_message "google.bigtable.admin.v2.AppProfile.SingleClusterRouting" do - optional :cluster_id, :string, 1 - optional :allow_transactional_writes, :bool, 2 - end - add_message "google.bigtable.admin.v2.HotTablet" do - optional :name, :string, 1 - optional :table_name, :string, 2 - optional :start_time, :message, 3, "google.protobuf.Timestamp" - optional :end_time, :message, 4, "google.protobuf.Timestamp" - optional :start_key, :string, 5 - optional :end_key, :string, 6 - optional :node_cpu_usage_percent, :float, 7 + +descriptor_data = "\n\'google/bigtable/admin/v2/instance.proto\x12\x18google.bigtable.admin.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a%google/bigtable/admin/v2/common.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc6\x04\n\x08Instance\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x37\n\x05state\x18\x03 \x01(\x0e\x32(.google.bigtable.admin.v2.Instance.State\x12\x35\n\x04type\x18\x04 \x01(\x0e\x32\'.google.bigtable.admin.v2.Instance.Type\x12>\n\x06labels\x18\x05 \x03(\x0b\x32..google.bigtable.admin.v2.Instance.LabelsEntry\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1f\n\rsatisfies_pzs\x18\x08 \x01(\x08\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"5\n\x05State\x12\x13\n\x0fSTATE_NOT_KNOWN\x10\x00\x12\t\n\x05READY\x10\x01\x12\x0c\n\x08\x43REATING\x10\x02\"=\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nPRODUCTION\x10\x01\x12\x0f\n\x0b\x44\x45VELOPMENT\x10\x02:S\xea\x41P\n%bigtableadmin.googleapis.com/Instance\x12\'projects/{project}/instances/{instance}B\x10\n\x0e_satisfies_pzs\"_\n\x12\x41utoscalingTargets\x12\x1f\n\x17\x63pu_utilization_percent\x18\x02 \x01(\x05\x12(\n storage_utilization_gib_per_node\x18\x03 \x01(\x05\"O\n\x11\x41utoscalingLimits\x12\x1c\n\x0fmin_serve_nodes\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1c\n\x0fmax_serve_nodes\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\"\xd1\x07\n\x07\x43luster\x12\x0c\n\x04name\x18\x01 \x01(\t\x12;\n\x08location\x18\x02 \x01(\tB)\xe0\x41\x05\xfa\x41#\n!locations.googleapis.com/Location\x12;\n\x05state\x18\x03 \x01(\x0e\x32\'.google.bigtable.admin.v2.Cluster.StateB\x03\xe0\x41\x03\x12\x13\n\x0bserve_nodes\x18\x04 \x01(\x05\x12I\n\x0e\x63luster_config\x18\x07 \x01(\x0b\x32/.google.bigtable.admin.v2.Cluster.ClusterConfigH\x00\x12H\n\x14\x64\x65\x66\x61ult_storage_type\x18\x05 \x01(\x0e\x32%.google.bigtable.admin.v2.StorageTypeB\x03\xe0\x41\x05\x12R\n\x11\x65ncryption_config\x18\x06 \x01(\x0b\x32\x32.google.bigtable.admin.v2.Cluster.EncryptionConfigB\x03\xe0\x41\x05\x1a\xb8\x01\n\x18\x43lusterAutoscalingConfig\x12L\n\x12\x61utoscaling_limits\x18\x01 \x01(\x0b\x32+.google.bigtable.admin.v2.AutoscalingLimitsB\x03\xe0\x41\x02\x12N\n\x13\x61utoscaling_targets\x18\x02 \x01(\x0b\x32,.google.bigtable.admin.v2.AutoscalingTargetsB\x03\xe0\x41\x02\x1ao\n\rClusterConfig\x12^\n\x1a\x63luster_autoscaling_config\x18\x01 \x01(\x0b\x32:.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig\x1aP\n\x10\x45ncryptionConfig\x12<\n\x0ckms_key_name\x18\x01 \x01(\tB&\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\"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:e\xea\x41\x62\n$bigtableadmin.googleapis.com/Cluster\x12:projects/{project}/instances/{instance}/clusters/{cluster}B\x08\n\x06\x63onfig\"\x88\x04\n\nAppProfile\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04\x65tag\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12g\n\x1dmulti_cluster_routing_use_any\x18\x05 \x01(\x0b\x32>.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAnyH\x00\x12[\n\x16single_cluster_routing\x18\x06 \x01(\x0b\x32\x39.google.bigtable.admin.v2.AppProfile.SingleClusterRoutingH\x00\x1a\x30\n\x19MultiClusterRoutingUseAny\x12\x13\n\x0b\x63luster_ids\x18\x01 \x03(\t\x1aN\n\x14SingleClusterRouting\x12\x12\n\ncluster_id\x18\x01 \x01(\t\x12\"\n\x1a\x61llow_transactional_writes\x18\x02 \x01(\x08:o\xea\x41l\n\'bigtableadmin.googleapis.com/AppProfile\x12\x41projects/{project}/instances/{instance}/appProfiles/{app_profile}B\x10\n\x0erouting_policy\"\x88\x03\n\tHotTablet\x12\x0c\n\x04name\x18\x01 \x01(\t\x12;\n\ntable_name\x18\x02 \x01(\tB\'\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12\x33\n\nstart_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\tstart_key\x18\x05 \x01(\t\x12\x0f\n\x07\x65nd_key\x18\x06 \x01(\t\x12#\n\x16node_cpu_usage_percent\x18\x07 \x01(\x02\x42\x03\xe0\x41\x03:\x7f\xea\x41|\n&bigtableadmin.googleapis.com/HotTablet\x12Rprojects/{project}/instances/{instance}/clusters/{cluster}/hotTablets/{hot_tablet}B\xd0\x02\n\x1c\x63om.google.bigtable.admin.v2B\rInstanceProtoP\x01Z=google.golang.org/genproto/googleapis/bigtable/admin/v2;admin\xaa\x02\x1eGoogle.Cloud.Bigtable.Admin.V2\xca\x02\x1eGoogle\\Cloud\\Bigtable\\Admin\\V2\xea\x02\"Google::Cloud::Bigtable::Admin::V2\xea\x41x\n!cloudkms.googleapis.com/CryptoKey\x12Sprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError => e + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" end end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." end module Google diff --git a/google-cloud-bigtable-admin-v2/lib/google/bigtable/admin/v2/table_pb.rb b/google-cloud-bigtable-admin-v2/lib/google/bigtable/admin/v2/table_pb.rb index 644ab9f95f64..cca6eae8cd27 100644 --- a/google-cloud-bigtable-admin-v2/lib/google/bigtable/admin/v2/table_pb.rb +++ b/google-cloud-bigtable-admin-v2/lib/google/bigtable/admin/v2/table_pb.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/bigtable/admin/v2/table.proto @@ -9,113 +10,34 @@ require 'google/protobuf/timestamp_pb' require 'google/rpc/status_pb' -Google::Protobuf::DescriptorPool.generated_pool.build do - add_file("google/bigtable/admin/v2/table.proto", :syntax => :proto3) do - add_message "google.bigtable.admin.v2.RestoreInfo" do - optional :source_type, :enum, 1, "google.bigtable.admin.v2.RestoreSourceType" - oneof :source_info do - optional :backup_info, :message, 2, "google.bigtable.admin.v2.BackupInfo" - end - end - add_message "google.bigtable.admin.v2.Table" do - optional :name, :string, 1 - map :cluster_states, :string, :message, 2, "google.bigtable.admin.v2.Table.ClusterState" - map :column_families, :string, :message, 3, "google.bigtable.admin.v2.ColumnFamily" - optional :granularity, :enum, 4, "google.bigtable.admin.v2.Table.TimestampGranularity" - optional :restore_info, :message, 6, "google.bigtable.admin.v2.RestoreInfo" - optional :deletion_protection, :bool, 9 - end - add_message "google.bigtable.admin.v2.Table.ClusterState" do - optional :replication_state, :enum, 1, "google.bigtable.admin.v2.Table.ClusterState.ReplicationState" - repeated :encryption_info, :message, 2, "google.bigtable.admin.v2.EncryptionInfo" - end - add_enum "google.bigtable.admin.v2.Table.ClusterState.ReplicationState" do - value :STATE_NOT_KNOWN, 0 - value :INITIALIZING, 1 - value :PLANNED_MAINTENANCE, 2 - value :UNPLANNED_MAINTENANCE, 3 - value :READY, 4 - value :READY_OPTIMIZING, 5 - end - add_enum "google.bigtable.admin.v2.Table.TimestampGranularity" do - value :TIMESTAMP_GRANULARITY_UNSPECIFIED, 0 - value :MILLIS, 1 - end - add_enum "google.bigtable.admin.v2.Table.View" do - value :VIEW_UNSPECIFIED, 0 - value :NAME_ONLY, 1 - value :SCHEMA_VIEW, 2 - value :REPLICATION_VIEW, 3 - value :ENCRYPTION_VIEW, 5 - value :FULL, 4 - end - add_message "google.bigtable.admin.v2.ColumnFamily" do - optional :gc_rule, :message, 1, "google.bigtable.admin.v2.GcRule" - end - add_message "google.bigtable.admin.v2.GcRule" do - oneof :rule do - optional :max_num_versions, :int32, 1 - optional :max_age, :message, 2, "google.protobuf.Duration" - optional :intersection, :message, 3, "google.bigtable.admin.v2.GcRule.Intersection" - optional :union, :message, 4, "google.bigtable.admin.v2.GcRule.Union" - end - end - add_message "google.bigtable.admin.v2.GcRule.Intersection" do - repeated :rules, :message, 1, "google.bigtable.admin.v2.GcRule" - end - add_message "google.bigtable.admin.v2.GcRule.Union" do - repeated :rules, :message, 1, "google.bigtable.admin.v2.GcRule" - end - add_message "google.bigtable.admin.v2.EncryptionInfo" do - optional :encryption_type, :enum, 3, "google.bigtable.admin.v2.EncryptionInfo.EncryptionType" - optional :encryption_status, :message, 4, "google.rpc.Status" - optional :kms_key_version, :string, 2 - end - add_enum "google.bigtable.admin.v2.EncryptionInfo.EncryptionType" do - value :ENCRYPTION_TYPE_UNSPECIFIED, 0 - value :GOOGLE_DEFAULT_ENCRYPTION, 1 - value :CUSTOMER_MANAGED_ENCRYPTION, 2 - end - add_message "google.bigtable.admin.v2.Snapshot" do - optional :name, :string, 1 - optional :source_table, :message, 2, "google.bigtable.admin.v2.Table" - optional :data_size_bytes, :int64, 3 - optional :create_time, :message, 4, "google.protobuf.Timestamp" - optional :delete_time, :message, 5, "google.protobuf.Timestamp" - optional :state, :enum, 6, "google.bigtable.admin.v2.Snapshot.State" - optional :description, :string, 7 - end - add_enum "google.bigtable.admin.v2.Snapshot.State" do - value :STATE_NOT_KNOWN, 0 - value :READY, 1 - value :CREATING, 2 - end - add_message "google.bigtable.admin.v2.Backup" do - optional :name, :string, 1 - optional :source_table, :string, 2 - optional :expire_time, :message, 3, "google.protobuf.Timestamp" - optional :start_time, :message, 4, "google.protobuf.Timestamp" - optional :end_time, :message, 5, "google.protobuf.Timestamp" - optional :size_bytes, :int64, 6 - optional :state, :enum, 7, "google.bigtable.admin.v2.Backup.State" - optional :encryption_info, :message, 9, "google.bigtable.admin.v2.EncryptionInfo" - end - add_enum "google.bigtable.admin.v2.Backup.State" do - value :STATE_UNSPECIFIED, 0 - value :CREATING, 1 - value :READY, 2 - end - add_message "google.bigtable.admin.v2.BackupInfo" do - optional :backup, :string, 1 - optional :start_time, :message, 2, "google.protobuf.Timestamp" - optional :end_time, :message, 3, "google.protobuf.Timestamp" - optional :source_table, :string, 4 - end - add_enum "google.bigtable.admin.v2.RestoreSourceType" do - value :RESTORE_SOURCE_TYPE_UNSPECIFIED, 0 - value :BACKUP, 1 + +descriptor_data = "\n$google/bigtable/admin/v2/table.proto\x12\x18google.bigtable.admin.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\x9b\x01\n\x0bRestoreInfo\x12@\n\x0bsource_type\x18\x01 \x01(\x0e\x32+.google.bigtable.admin.v2.RestoreSourceType\x12;\n\x0b\x62\x61\x63kup_info\x18\x02 \x01(\x0b\x32$.google.bigtable.admin.v2.BackupInfoH\x00\x42\r\n\x0bsource_info\"I\n\x12\x43hangeStreamConfig\x12\x33\n\x10retention_period\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\"\xda\t\n\x05Table\x12\x0c\n\x04name\x18\x01 \x01(\t\x12O\n\x0e\x63luster_states\x18\x02 \x03(\x0b\x32\x32.google.bigtable.admin.v2.Table.ClusterStatesEntryB\x03\xe0\x41\x03\x12L\n\x0f\x63olumn_families\x18\x03 \x03(\x0b\x32\x33.google.bigtable.admin.v2.Table.ColumnFamiliesEntry\x12N\n\x0bgranularity\x18\x04 \x01(\x0e\x32\x34.google.bigtable.admin.v2.Table.TimestampGranularityB\x03\xe0\x41\x05\x12@\n\x0crestore_info\x18\x06 \x01(\x0b\x32%.google.bigtable.admin.v2.RestoreInfoB\x03\xe0\x41\x03\x12J\n\x14\x63hange_stream_config\x18\x08 \x01(\x0b\x32,.google.bigtable.admin.v2.ChangeStreamConfig\x12\x1b\n\x13\x64\x65letion_protection\x18\t \x01(\x08\x1a\xc6\x02\n\x0c\x43lusterState\x12]\n\x11replication_state\x18\x01 \x01(\x0e\x32=.google.bigtable.admin.v2.Table.ClusterState.ReplicationStateB\x03\xe0\x41\x03\x12\x46\n\x0f\x65ncryption_info\x18\x02 \x03(\x0b\x32(.google.bigtable.admin.v2.EncryptionInfoB\x03\xe0\x41\x03\"\x8e\x01\n\x10ReplicationState\x12\x13\n\x0fSTATE_NOT_KNOWN\x10\x00\x12\x10\n\x0cINITIALIZING\x10\x01\x12\x17\n\x13PLANNED_MAINTENANCE\x10\x02\x12\x19\n\x15UNPLANNED_MAINTENANCE\x10\x03\x12\t\n\x05READY\x10\x04\x12\x14\n\x10READY_OPTIMIZING\x10\x05\x1a\x62\n\x12\x43lusterStatesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12;\n\x05value\x18\x02 \x01(\x0b\x32,.google.bigtable.admin.v2.Table.ClusterState:\x02\x38\x01\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\"q\n\x04View\x12\x14\n\x10VIEW_UNSPECIFIED\x10\x00\x12\r\n\tNAME_ONLY\x10\x01\x12\x0f\n\x0bSCHEMA_VIEW\x10\x02\x12\x14\n\x10REPLICATION_VIEW\x10\x03\x12\x13\n\x0f\x45NCRYPTION_VIEW\x10\x05\x12\x08\n\x04\x46ULL\x10\x04:_\xea\x41\\\n\"bigtableadmin.googleapis.com/Table\x12\x36projects/{project}/instances/{instance}/tables/{table}\"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\x04rule\"\xd9\x02\n\x0e\x45ncryptionInfo\x12U\n\x0f\x65ncryption_type\x18\x03 \x01(\x0e\x32\x37.google.bigtable.admin.v2.EncryptionInfo.EncryptionTypeB\x03\xe0\x41\x03\x12\x32\n\x11\x65ncryption_status\x18\x04 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12I\n\x0fkms_key_version\x18\x02 \x01(\tB0\xe0\x41\x03\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\"q\n\x0e\x45ncryptionType\x12\x1f\n\x1b\x45NCRYPTION_TYPE_UNSPECIFIED\x10\x00\x12\x1d\n\x19GOOGLE_DEFAULT_ENCRYPTION\x10\x01\x12\x1f\n\x1b\x43USTOMER_MANAGED_ENCRYPTION\x10\x02\"\xcc\x03\n\x08Snapshot\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x35\n\x0csource_table\x18\x02 \x01(\x0b\x32\x1f.google.bigtable.admin.v2.Table\x12\x17\n\x0f\x64\x61ta_size_bytes\x18\x03 \x01(\x03\x12/\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x64\x65lete_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x37\n\x05state\x18\x06 \x01(\x0e\x32(.google.bigtable.admin.v2.Snapshot.State\x12\x13\n\x0b\x64\x65scription\x18\x07 \x01(\t\"5\n\x05State\x12\x13\n\x0fSTATE_NOT_KNOWN\x10\x00\x12\t\n\x05READY\x10\x01\x12\x0c\n\x08\x43REATING\x10\x02:{\xea\x41x\n%bigtableadmin.googleapis.com/Snapshot\x12Oprojects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}\"\x9f\x04\n\x06\x42\x61\x63kup\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1c\n\x0csource_table\x18\x02 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x02\x12\x34\n\x0b\x65xpire_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x12\x33\n\nstart_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x17\n\nsize_bytes\x18\x06 \x01(\x03\x42\x03\xe0\x41\x03\x12:\n\x05state\x18\x07 \x01(\x0e\x32&.google.bigtable.admin.v2.Backup.StateB\x03\xe0\x41\x03\x12\x46\n\x0f\x65ncryption_info\x18\t \x01(\x0b\x32(.google.bigtable.admin.v2.EncryptionInfoB\x03\xe0\x41\x03\"7\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x02:u\xea\x41r\n#bigtableadmin.googleapis.com/Backup\x12Kprojects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}\"\xa4\x01\n\nBackupInfo\x12\x13\n\x06\x62\x61\x63kup\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x19\n\x0csource_table\x18\x04 \x01(\tB\x03\xe0\x41\x03*D\n\x11RestoreSourceType\x12#\n\x1fRESTORE_SOURCE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x42\x41\x43KUP\x10\x01\x42\xfc\x02\n\x1c\x63om.google.bigtable.admin.v2B\nTableProtoP\x01Z=google.golang.org/genproto/googleapis/bigtable/admin/v2;admin\xaa\x02\x1eGoogle.Cloud.Bigtable.Admin.V2\xca\x02\x1eGoogle\\Cloud\\Bigtable\\Admin\\V2\xea\x02\"Google::Cloud::Bigtable::Admin::V2\xea\x41\xa6\x01\n(cloudkms.googleapis.com/CryptoKeyVersion\x12zprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError => e + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Duration", "google/protobuf/duration.proto"], + ["google.rpc.Status", "google/rpc/status.proto"], + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" end end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." end module Google @@ -124,6 +46,7 @@ module Bigtable module Admin module V2 RestoreInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.RestoreInfo").msgclass + ChangeStreamConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.ChangeStreamConfig").msgclass Table = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.Table").msgclass Table::ClusterState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.Table.ClusterState").msgclass Table::ClusterState::ReplicationState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.Table.ClusterState.ReplicationState").enummodule diff --git a/google-cloud-bigtable-admin-v2/lib/google/cloud/bigtable/admin/v2/bigtable_table_admin/client.rb b/google-cloud-bigtable-admin-v2/lib/google/cloud/bigtable/admin/v2/bigtable_table_admin/client.rb index b9246db05973..c93d73459f7f 100644 --- a/google-cloud-bigtable-admin-v2/lib/google/cloud/bigtable/admin/v2/bigtable_table_admin/client.rb +++ b/google-cloud-bigtable-admin-v2/lib/google/cloud/bigtable/admin/v2/bigtable_table_admin/client.rb @@ -671,11 +671,15 @@ def get_table request, options = nil # The table's `name` field is used to identify the table to update. # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] # Required. The list of fields to update. - # A mask specifying which fields (e.g. `deletion_protection`) in the `table` + # A mask specifying which fields (e.g. `change_stream_config`) in the `table` # field should be updated. This mask is relative to the `table` field, not to # the request message. The wildcard (*) path is currently not supported. - # Currently UpdateTable is only supported for the following field: - # * `deletion_protection` + # Currently UpdateTable is only supported for the following fields: + # + # * `change_stream_config` + # * `change_stream_config.retention_period` + # * `deletion_protection` + # # If `column_families` is set in `update_mask`, it will return an # UNIMPLEMENTED error. # diff --git a/google-cloud-bigtable-admin-v2/proto_docs/google/bigtable/admin/v2/bigtable_table_admin.rb b/google-cloud-bigtable-admin-v2/proto_docs/google/bigtable/admin/v2/bigtable_table_admin.rb index 39cc1d4d5407..c8fbc0635f80 100644 --- a/google-cloud-bigtable-admin-v2/proto_docs/google/bigtable/admin/v2/bigtable_table_admin.rb +++ b/google-cloud-bigtable-admin-v2/proto_docs/google/bigtable/admin/v2/bigtable_table_admin.rb @@ -249,11 +249,15 @@ class GetTableRequest # @!attribute [rw] update_mask # @return [::Google::Protobuf::FieldMask] # Required. The list of fields to update. - # A mask specifying which fields (e.g. `deletion_protection`) in the `table` + # A mask specifying which fields (e.g. `change_stream_config`) in the `table` # field should be updated. This mask is relative to the `table` field, not to # the request message. The wildcard (*) path is currently not supported. - # Currently UpdateTable is only supported for the following field: - # * `deletion_protection` + # Currently UpdateTable is only supported for the following fields: + # + # * `change_stream_config` + # * `change_stream_config.retention_period` + # * `deletion_protection` + # # If `column_families` is set in `update_mask`, it will return an # UNIMPLEMENTED error. class UpdateTableRequest diff --git a/google-cloud-bigtable-admin-v2/proto_docs/google/bigtable/admin/v2/table.rb b/google-cloud-bigtable-admin-v2/proto_docs/google/bigtable/admin/v2/table.rb index 288c21a4a0cb..0bbd0c9d6db2 100644 --- a/google-cloud-bigtable-admin-v2/proto_docs/google/bigtable/admin/v2/table.rb +++ b/google-cloud-bigtable-admin-v2/proto_docs/google/bigtable/admin/v2/table.rb @@ -35,6 +35,19 @@ class RestoreInfo extend ::Google::Protobuf::MessageExts::ClassMethods end + # Change stream configuration. + # @!attribute [rw] retention_period + # @return [::Google::Protobuf::Duration] + # How long the change stream should be retained. Change stream data older + # than the retention period will not be returned when reading the change + # stream from the table. + # Values must be at least 1 day and at most 7 days, and will be truncated to + # microsecond granularity. + class ChangeStreamConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # A collection of user data indexed by row, column, and timestamp. # Each table is served using the resources of its parent cluster. # @!attribute [rw] name @@ -63,6 +76,11 @@ class RestoreInfo # @return [::Google::Cloud::Bigtable::Admin::V2::RestoreInfo] # Output only. If this table was restored from another data source (e.g. a backup), this # field will be populated with information about the restore. + # @!attribute [rw] change_stream_config + # @return [::Google::Cloud::Bigtable::Admin::V2::ChangeStreamConfig] + # If specified, enable the change stream on this table. + # Otherwise, the change stream is disabled and the change stream is not + # retained. # @!attribute [rw] deletion_protection # @return [::Boolean] # Set to true to make the table protected against data loss. i.e. deleting diff --git a/google-cloud-bigtable-admin-v2/proto_docs/google/protobuf/any.rb b/google-cloud-bigtable-admin-v2/proto_docs/google/protobuf/any.rb index 8774b7f4a815..68a54aef5a75 100644 --- a/google-cloud-bigtable-admin-v2/proto_docs/google/protobuf/any.rb +++ b/google-cloud-bigtable-admin-v2/proto_docs/google/protobuf/any.rb @@ -43,8 +43,12 @@ module Protobuf # if (any.is(Foo.class)) { # foo = any.unpack(Foo.class); # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } # - # Example 3: Pack and unpack a message in Python. + # Example 3: Pack and unpack a message in Python. # # foo = Foo(...) # any = Any() @@ -54,7 +58,7 @@ module Protobuf # any.Unpack(foo) # ... # - # Example 4: Pack and unpack a message in Go + # Example 4: Pack and unpack a message in Go # # foo := &pb.Foo{...} # any, err := anypb.New(foo) @@ -73,9 +77,8 @@ module Protobuf # in the type URL, for example "foo.bar.com/x/y.z" will yield type # name "y.z". # - # # JSON - # + # ==== # The JSON representation of an `Any` value uses the regular # representation of the deserialized, embedded message, with an # additional field `@type` which contains the type URL. Example: diff --git a/google-cloud-bigtable-admin-v2/proto_docs/google/protobuf/timestamp.rb b/google-cloud-bigtable-admin-v2/proto_docs/google/protobuf/timestamp.rb index 7c4e206ac5fb..4891104f14b9 100644 --- a/google-cloud-bigtable-admin-v2/proto_docs/google/protobuf/timestamp.rb +++ b/google-cloud-bigtable-admin-v2/proto_docs/google/protobuf/timestamp.rb @@ -69,7 +69,6 @@ module Protobuf # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) # .setNanos((int) ((millis % 1000) * 1000000)).build(); # - # # Example 5: Compute Timestamp from Java `Instant.now()`. # # Instant now = Instant.now(); @@ -78,7 +77,6 @@ module Protobuf # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) # .setNanos(now.getNano()).build(); # - # # Example 6: Compute Timestamp from current time in Python. # # timestamp = Timestamp() @@ -108,7 +106,7 @@ module Protobuf # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() # ) to obtain a formatter capable of generating timestamps in this format. # @!attribute [rw] seconds # @return [::Integer]