Class: MistApi::CountUsermacDistinctEnum
- Inherits:
-
Object
- Object
- MistApi::CountUsermacDistinctEnum
- Defined in:
- lib/mist_api/models/count_usermac_distinct_enum.rb
Overview
count_usermac_distinct.
Constant Summary collapse
- COUNT_USERMAC_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 LABELS LABELS = 'labels'.freeze, # TODO: Write general description for ORG_ID ORG_ID = 'org_id'.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/count_usermac_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 'labels' then LABELS when 'org_id' then ORG_ID else default_value end end |
.validate(value) ⇒ Object
23 24 25 26 27 |
# File 'lib/mist_api/models/count_usermac_distinct_enum.rb', line 23 def self.validate(value) return false if value.nil? COUNT_USERMAC_DISTINCT_ENUM.include?(value) end |