Class: MistApi::SynthetictestConfigAggressivenessEnum
- Inherits:
-
Object
- Object
- MistApi::SynthetictestConfigAggressivenessEnum
- Defined in:
- lib/mist_api/models/synthetictest_config_aggressiveness_enum.rb
Overview
enum: ‘auto`, `high`, `low`
Constant Summary collapse
- SYNTHETICTEST_CONFIG_AGGRESSIVENESS_ENUM =
[ # TODO: Write general description for AUTO AUTO = 'auto'.freeze, # TODO: Write general description for HIGH HIGH = 'high'.freeze, # TODO: Write general description for MED MED = 'med'.freeze, # TODO: Write general description for LOW LOW = 'low'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = AUTO) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/mist_api/models/synthetictest_config_aggressiveness_enum.rb', line 29 def self.from_value(value, default_value = AUTO) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'auto' then AUTO when 'high' then HIGH when 'med' then MED when 'low' then LOW else default_value end end |
.validate(value) ⇒ Object
23 24 25 26 27 |
# File 'lib/mist_api/models/synthetictest_config_aggressiveness_enum.rb', line 23 def self.validate(value) return false if value.nil? SYNTHETICTEST_CONFIG_AGGRESSIVENESS_ENUM.include?(value) end |