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.
185 186 187 188 189 190 191 192 193 194 195 196 197 |
# File 'lib/google/cloud/bigtable/admin.rb', line 185 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 |