Module: Google::Cloud::Dataproc::WorkflowTemplateService
- Defined in:
- lib/google/cloud/dataproc.rb
Class Method Summary collapse
-
.new(version: , credentials: , scopes: , client_config: , timeout: ) ⇒ Object
The API interface for managing Workflow Templates in the Dataproc API.
Class Method Details
.new(version: , credentials: , scopes: , client_config: , timeout: ) ⇒ Object
The API interface for managing Workflow Templates in the Dataproc API.
324 325 326 327 328 329 330 331 332 333 334 335 336 |
# File 'lib/google/cloud/dataproc.rb', line 324 def self.new(*args, version: :v1, **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::Dataproc .constants .select {|sym| sym.to_s.downcase == version.to_s.downcase} .first Google::Cloud::Dataproc.const_get(version_module)::WorkflowTemplateService.new(*args, **kwargs) end |