Class: MistApi::NacPortalEapTypeEnum

Inherits:
Object
  • Object
show all
Defined in:
lib/mist_api/models/nac_portal_eap_type_enum.rb

Overview

enum: ‘wpa2`, `wpa3`

Constant Summary collapse

NAC_PORTAL_EAP_TYPE_ENUM =
[
  # TODO: Write general description for WPA2
  WPA2 = 'wpa2'.freeze,

  # TODO: Write general description for WPA3
  WPA3 = 'wpa3'.freeze
].freeze

Class Method Summary collapse

Class Method Details

.from_value(value, default_value = WPA2) ⇒ Object



23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/mist_api/models/nac_portal_eap_type_enum.rb', line 23

def self.from_value(value, default_value = WPA2)
  return default_value if value.nil?

  str = value.to_s.strip

  case str.downcase
  when 'wpa2' then WPA2
  when 'wpa3' then WPA3
  else
    default_value
  end
end

.validate(value) ⇒ Object



17
18
19
20
21
# File 'lib/mist_api/models/nac_portal_eap_type_enum.rb', line 17

def self.validate(value)
  return false if value.nil?

  NAC_PORTAL_EAP_TYPE_ENUM.include?(value)
end