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.
276 277 278 279 280 281 282 283 284 285 286 287 288 |
# File 'lib/google/cloud/monitoring.rb', line 276 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 |