Module: Google::Cloud::Monitoring::NotificationChannel
- Defined in:
- lib/google/cloud/monitoring.rb
Class Method Summary collapse
-
.new(version: , credentials: , scopes: , client_config: , timeout: ) ⇒ Object
The Notification Channel API provides access to configuration that controls how messages related to incidents are sent.
Class Method Details
.new(version: , credentials: , scopes: , client_config: , timeout: ) ⇒ Object
The Notification Channel API provides access to configuration that controls how messages related to incidents are sent.
326 327 328 329 330 331 332 333 334 335 336 337 338 |
# File 'lib/google/cloud/monitoring.rb', line 326 def self.new(*args, version: :v3, **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::Monitoring .constants .select {|sym| sym.to_s.downcase == version.to_s.downcase} .first Google::Cloud::Monitoring.const_get(version_module)::NotificationChannel.new(*args, **kwargs) end |