Class: MistApi::RrmEventPreBandwidthEnum
- Inherits:
-
Object
- Object
- MistApi::RrmEventPreBandwidthEnum
- Defined in:
- lib/mist_api/models/rrm_event_pre_bandwidth_enum.rb
Overview
(previously) channel width for the band , 0 means no previously available. enum: ‘0`, `20`, `40`, `80`, `160`
Constant Summary collapse
- RRM_EVENT_PRE_BANDWIDTH_ENUM =
[ # TODO: Write general description for ENUM_0 ENUM_0 = 0, # TODO: Write general description for ENUM_20 ENUM_20 = 20, # TODO: Write general description for ENUM_40 ENUM_40 = 40, # TODO: Write general description for ENUM_80 ENUM_80 = 80, # TODO: Write general description for ENUM_160 ENUM_160 = 160 ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = ENUM_0) ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/mist_api/models/rrm_event_pre_bandwidth_enum.rb', line 33 def self.from_value(value, default_value = ENUM_0) return default_value if value.nil? str = value.to_s.strip if str.match?(/\A\d+\z/) num = str.to_i return num if RRM_EVENT_PRE_BANDWIDTH_ENUM.include?(num) return default_value end case str.downcase when 'enum_0' then ENUM_0 when 'enum_20' then ENUM_20 when 'enum_40' then ENUM_40 when 'enum_80' then ENUM_80 when 'enum_160' then ENUM_160 else default_value end end |
.validate(value) ⇒ Object
27 28 29 30 31 |
# File 'lib/mist_api/models/rrm_event_pre_bandwidth_enum.rb', line 27 def self.validate(value) return false if value.nil? RRM_EVENT_PRE_BANDWIDTH_ENUM.include?(value) end |