Class: MistApi::StatsSwitchPortTypeEnum
- Inherits:
-
Object
- Object
- MistApi::StatsSwitchPortTypeEnum
- Defined in:
- lib/mist_api/models/stats_switch_port_type_enum.rb
Overview
device type. enum: ‘ap`, `ble`, `gateway`, `mxedge`, `nac`, `switch`
Constant Summary collapse
- STATS_SWITCH_PORT_TYPE_ENUM =
[ # TODO: Write general description for AP AP = 'ap'.freeze, # TODO: Write general description for BLE BLE = 'ble'.freeze, # TODO: Write general description for GATEWAY GATEWAY = 'gateway'.freeze, # TODO: Write general description for MXEDGE MXEDGE = 'mxedge'.freeze, # TODO: Write general description for NAC NAC = 'nac'.freeze, # TODO: Write general description for SWITCH SWITCH = 'switch'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = AP) ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/mist_api/models/stats_switch_port_type_enum.rb', line 35 def self.from_value(value, default_value = AP) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'ap' then AP when 'ble' then BLE when 'gateway' then GATEWAY when 'mxedge' then MXEDGE when 'nac' then NAC when 'switch' then SWITCH else default_value end end |
.validate(value) ⇒ Object
29 30 31 32 33 |
# File 'lib/mist_api/models/stats_switch_port_type_enum.rb', line 29 def self.validate(value) return false if value.nil? STATS_SWITCH_PORT_TYPE_ENUM.include?(value) end |