Class: MistApi::DeviceSearchRadiusFilterStatusEnum
- Inherits:
-
Object
- Object
- MistApi::DeviceSearchRadiusFilterStatusEnum
- Defined in:
- lib/mist_api/models/device_search_radius_filter_status_enum.rb
Overview
Status of the device search radius filter. enum: ‘up`, `down`, `unreachable`
Constant Summary collapse
- DEVICE_SEARCH_RADIUS_FILTER_STATUS_ENUM =
[ # TODO: Write general description for UP UP = 'up'.freeze, # TODO: Write general description for DOWN DOWN = 'down'.freeze, # TODO: Write general description for UNREACHABLE UNREACHABLE = 'unreachable'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = UP) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/mist_api/models/device_search_radius_filter_status_enum.rb', line 26 def self.from_value(value, default_value = UP) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'up' then UP when 'down' then DOWN when 'unreachable' then UNREACHABLE else default_value end end |
.validate(value) ⇒ Object
20 21 22 23 24 |
# File 'lib/mist_api/models/device_search_radius_filter_status_enum.rb', line 20 def self.validate(value) return false if value.nil? DEVICE_SEARCH_RADIUS_FILTER_STATUS_ENUM.include?(value) end |