Class: MistApi::WebhookTypeEnum
- Inherits:
-
Object
- Object
- MistApi::WebhookTypeEnum
- Defined in:
- lib/mist_api/models/webhook_type_enum.rb
Overview
enum: ‘aws-sns`, `google-pubsub`, `http-post`, `oauth2`, `splunk`
Constant Summary collapse
- WEBHOOK_TYPE_ENUM =
[ # TODO: Write general description for AWSSNS AWSSNS = 'aws-sns'.freeze, # TODO: Write general description for GOOGLEPUBSUB GOOGLEPUBSUB = 'google-pubsub'.freeze, # TODO: Write general description for HTTPPOST HTTPPOST = 'http-post'.freeze, # TODO: Write general description for OAUTH2 OAUTH2 = 'oauth2'.freeze, # TODO: Write general description for SPLUNK SPLUNK = 'splunk'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = AWSSNS) ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/mist_api/models/webhook_type_enum.rb', line 32 def self.from_value(value, default_value = AWSSNS) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'awssns' then AWSSNS when 'googlepubsub' then GOOGLEPUBSUB when 'httppost' then HTTPPOST when 'oauth2' then OAUTH2 when 'splunk' then SPLUNK else default_value end end |
.validate(value) ⇒ Object
26 27 28 29 30 |
# File 'lib/mist_api/models/webhook_type_enum.rb', line 26 def self.validate(value) return false if value.nil? WEBHOOK_TYPE_ENUM.include?(value) end |