Class: MistApi::OrgDevicesLastConfigsCountDistinctEnum
- Inherits:
-
Object
- Object
- MistApi::OrgDevicesLastConfigsCountDistinctEnum
- Defined in:
- lib/mist_api/models/org_devices_last_configs_count_distinct_enum.rb
Overview
enum: ‘mac`, `name`, `site_id`, `version`
Constant Summary collapse
- ORG_DEVICES_LAST_CONFIGS_COUNT_DISTINCT_ENUM =
[ # TODO: Write general description for MAC MAC = 'mac'.freeze, # TODO: Write general description for NAME NAME = 'name'.freeze, # TODO: Write general description for SITE_ID SITE_ID = 'site_id'.freeze, # TODO: Write general description for VERSION VERSION = 'version'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = MAC) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/mist_api/models/org_devices_last_configs_count_distinct_enum.rb', line 29 def self.from_value(value, default_value = MAC) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'mac' then MAC when 'name' then NAME when 'site_id' then SITE_ID when 'version' then VERSION else default_value end end |
.validate(value) ⇒ Object
23 24 25 26 27 |
# File 'lib/mist_api/models/org_devices_last_configs_count_distinct_enum.rb', line 23 def self.validate(value) return false if value.nil? ORG_DEVICES_LAST_CONFIGS_COUNT_DISTINCT_ENUM.include?(value) end |