Class: MistApi::ApEslConfig
- Defined in:
- lib/mist_api/models/ap_esl_config.rb
Overview
ApEslConfig Model.
Instance Attribute Summary collapse
-
#cacert ⇒ String
Only if ‘type`==`imagotag` or `type`==`native`.
-
#channel ⇒ Integer
Only if ‘type`==`imagotag` or `type`==`native`.
-
#enabled ⇒ TrueClass | FalseClass
usb_config is ignored if esl_config enabled.
-
#host ⇒ String
Only if ‘type`==`imagotag` or `type`==`native`.
-
#port ⇒ Integer
Only if ‘type`==`imagotag` or `type`==`native`.
-
#type ⇒ ApEslTypeEnum
note: ble_config will be ignored if esl_config is enabled and with native mode.
-
#verify_cert ⇒ TrueClass | FalseClass
Only if ‘type`==`imagotag` or `type`==`native`.
-
#vlan_id ⇒ Integer
Only if ‘type`==`solum` or `type`==`hanshow`.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(cacert = SKIP, channel = SKIP, enabled = false, host = SKIP, port = SKIP, type = SKIP, verify_cert = SKIP, vlan_id = 1) ⇒ ApEslConfig
constructor
A new instance of ApEslConfig.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(cacert = SKIP, channel = SKIP, enabled = false, host = SKIP, port = SKIP, type = SKIP, verify_cert = SKIP, vlan_id = 1) ⇒ ApEslConfig
Returns a new instance of ApEslConfig.
78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/mist_api/models/ap_esl_config.rb', line 78 def initialize(cacert = SKIP, channel = SKIP, enabled = false, host = SKIP, port = SKIP, type = SKIP, verify_cert = SKIP, vlan_id = 1) @cacert = cacert unless cacert == SKIP @channel = channel unless channel == SKIP @enabled = enabled unless enabled == SKIP @host = host unless host == SKIP @port = port unless port == SKIP @type = type unless type == SKIP @verify_cert = verify_cert unless verify_cert == SKIP @vlan_id = vlan_id unless vlan_id == SKIP end |
Instance Attribute Details
#cacert ⇒ String
Only if ‘type`==`imagotag` or `type`==`native`
14 15 16 |
# File 'lib/mist_api/models/ap_esl_config.rb', line 14 def cacert @cacert end |
#channel ⇒ Integer
Only if ‘type`==`imagotag` or `type`==`native`
18 19 20 |
# File 'lib/mist_api/models/ap_esl_config.rb', line 18 def channel @channel end |
#enabled ⇒ TrueClass | FalseClass
usb_config is ignored if esl_config enabled
22 23 24 |
# File 'lib/mist_api/models/ap_esl_config.rb', line 22 def enabled @enabled end |
#host ⇒ String
Only if ‘type`==`imagotag` or `type`==`native`
26 27 28 |
# File 'lib/mist_api/models/ap_esl_config.rb', line 26 def host @host end |
#port ⇒ Integer
Only if ‘type`==`imagotag` or `type`==`native`
30 31 32 |
# File 'lib/mist_api/models/ap_esl_config.rb', line 30 def port @port end |
#type ⇒ ApEslTypeEnum
note: ble_config will be ignored if esl_config is enabled and with native mode. enum: ‘hanshow`, `imagotag`, `native`, `solum`
35 36 37 |
# File 'lib/mist_api/models/ap_esl_config.rb', line 35 def type @type end |
#verify_cert ⇒ TrueClass | FalseClass
Only if ‘type`==`imagotag` or `type`==`native`
39 40 41 |
# File 'lib/mist_api/models/ap_esl_config.rb', line 39 def verify_cert @verify_cert end |
#vlan_id ⇒ Integer
Only if ‘type`==`solum` or `type`==`hanshow`
43 44 45 |
# File 'lib/mist_api/models/ap_esl_config.rb', line 43 def vlan_id @vlan_id end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
# File 'lib/mist_api/models/ap_esl_config.rb', line 91 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. cacert = hash.key?('cacert') ? hash['cacert'] : SKIP channel = hash.key?('channel') ? hash['channel'] : SKIP enabled = hash['enabled'] ||= false host = hash.key?('host') ? hash['host'] : SKIP port = hash.key?('port') ? hash['port'] : SKIP type = hash.key?('type') ? hash['type'] : SKIP verify_cert = hash.key?('verify_cert') ? hash['verify_cert'] : SKIP vlan_id = hash['vlan_id'] ||= 1 # Create object from extracted values. ApEslConfig.new(cacert, channel, enabled, host, port, type, verify_cert, vlan_id) end |
.names ⇒ Object
A mapping from model property names to API property names.
46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/mist_api/models/ap_esl_config.rb', line 46 def self.names @_hash = {} if @_hash.nil? @_hash['cacert'] = 'cacert' @_hash['channel'] = 'channel' @_hash['enabled'] = 'enabled' @_hash['host'] = 'host' @_hash['port'] = 'port' @_hash['type'] = 'type' @_hash['verify_cert'] = 'verify_cert' @_hash['vlan_id'] = 'vlan_id' @_hash end |
.nullables ⇒ Object
An array for nullable fields
74 75 76 |
# File 'lib/mist_api/models/ap_esl_config.rb', line 74 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/mist_api/models/ap_esl_config.rb', line 60 def self.optionals %w[ cacert channel enabled host port type verify_cert vlan_id ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
124 125 126 127 128 129 |
# File 'lib/mist_api/models/ap_esl_config.rb', line 124 def inspect class_name = self.class.name.split('::').last "<#{class_name} cacert: #{@cacert.inspect}, channel: #{@channel.inspect}, enabled:"\ " #{@enabled.inspect}, host: #{@host.inspect}, port: #{@port.inspect}, type:"\ " #{@type.inspect}, verify_cert: #{@verify_cert.inspect}, vlan_id: #{@vlan_id.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
116 117 118 119 120 121 |
# File 'lib/mist_api/models/ap_esl_config.rb', line 116 def to_s class_name = self.class.name.split('::').last "<#{class_name} cacert: #{@cacert}, channel: #{@channel}, enabled: #{@enabled}, host:"\ " #{@host}, port: #{@port}, type: #{@type}, verify_cert: #{@verify_cert}, vlan_id:"\ " #{@vlan_id}>" end |