Class: MistApi::GatewayPathTypeEnum
- Inherits:
-
Object
- Object
- MistApi::GatewayPathTypeEnum
- Defined in:
- lib/mist_api/models/gateway_path_type_enum.rb
Overview
enum: ‘local`, `tunnel`, `vpn`, `wan`
Constant Summary collapse
- GATEWAY_PATH_TYPE_ENUM =
[ # TODO: Write general description for LOCAL LOCAL = 'local'.freeze, # TODO: Write general description for TUNNEL TUNNEL = 'tunnel'.freeze, # TODO: Write general description for VPN VPN = 'vpn'.freeze, # TODO: Write general description for WAN WAN = 'wan'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = LOCAL) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/mist_api/models/gateway_path_type_enum.rb', line 29 def self.from_value(value, default_value = LOCAL) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'local' then LOCAL when 'tunnel' then TUNNEL when 'vpn' then VPN when 'wan' then WAN else default_value end end |
.validate(value) ⇒ Object
23 24 25 26 27 |
# File 'lib/mist_api/models/gateway_path_type_enum.rb', line 23 def self.validate(value) return false if value.nil? GATEWAY_PATH_TYPE_ENUM.include?(value) end |