Module: Google::Cloud::Bigtable::Admin::BigtableTableAdmin
- Defined in:
- lib/google/cloud/bigtable/admin.rb
Class Method Summary collapse
-
.new(version: , credentials: , scopes: , client_config: , timeout: ) ⇒ Object
Service for creating, configuring, and deleting Cloud Bigtable tables.
Class Method Details
.new(version: , credentials: , scopes: , client_config: , timeout: ) ⇒ Object
Service for creating, configuring, and deleting Cloud Bigtable tables.
Provides access to the table schemas only, not the data stored within the tables.
179 180 181 182 183 184 185 186 187 188 189 190 191 |
# File 'lib/google/cloud/bigtable/admin.rb', line 179 def self.new(*args, version: :v2, **kwargs) unless AVAILABLE_VERSIONS.include?(version.to_s.downcase) raise "The version: #{version} is not available. The available versions " \ "are: [#{AVAILABLE_VERSIONS.join(", ")}]" end require "#{FILE_DIR}/#{version.to_s.downcase}" version_module = Google::Cloud::Bigtable::Admin .constants .select {|sym| sym.to_s.downcase == version.to_s.downcase} .first Google::Cloud::Bigtable::Admin.const_get(version_module)::BigtableTableAdmin.new(*args, **kwargs) end |