Class: MistApi::ApAeroscout
- Defined in:
- lib/mist_api/models/ap_aeroscout.rb
Overview
Aeroscout AP settings
Instance Attribute Summary collapse
-
#enabled ⇒ TrueClass | FalseClass
Whether to enable aeroscout config.
-
#host ⇒ String
Required if enabled, aeroscout server host.
-
#locate_connected ⇒ TrueClass | FalseClass
Whether to enable the feature to allow wireless clients data received and sent to AES server for location calculation.
-
#port ⇒ Integer
Whether to enable the feature to allow wireless clients data received and sent to AES server for location calculation.
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(enabled = false, host = SKIP, locate_connected = false, port = 1144) ⇒ ApAeroscout
constructor
A new instance of ApAeroscout.
-
#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(enabled = false, host = SKIP, locate_connected = false, port = 1144) ⇒ ApAeroscout
Returns a new instance of ApAeroscout.
58 59 60 61 62 63 64 |
# File 'lib/mist_api/models/ap_aeroscout.rb', line 58 def initialize(enabled = false, host = SKIP, locate_connected = false, port = 1144) @enabled = enabled unless enabled == SKIP @host = host unless host == SKIP @locate_connected = locate_connected unless locate_connected == SKIP @port = port unless port == SKIP end |
Instance Attribute Details
#enabled ⇒ TrueClass | FalseClass
Whether to enable aeroscout config
14 15 16 |
# File 'lib/mist_api/models/ap_aeroscout.rb', line 14 def enabled @enabled end |
#host ⇒ String
Required if enabled, aeroscout server host
18 19 20 |
# File 'lib/mist_api/models/ap_aeroscout.rb', line 18 def host @host end |
#locate_connected ⇒ TrueClass | FalseClass
Whether to enable the feature to allow wireless clients data received and sent to AES server for location calculation
23 24 25 |
# File 'lib/mist_api/models/ap_aeroscout.rb', line 23 def locate_connected @locate_connected end |
#port ⇒ Integer
Whether to enable the feature to allow wireless clients data received and sent to AES server for location calculation
28 29 30 |
# File 'lib/mist_api/models/ap_aeroscout.rb', line 28 def port @port end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/mist_api/models/ap_aeroscout.rb', line 67 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. enabled = hash['enabled'] ||= false host = hash.key?('host') ? hash['host'] : SKIP locate_connected = hash['locate_connected'] ||= false port = hash['port'] ||= 1144 # Create object from extracted values. ApAeroscout.new(enabled, host, locate_connected, port) end |
.names ⇒ Object
A mapping from model property names to API property names.
31 32 33 34 35 36 37 38 |
# File 'lib/mist_api/models/ap_aeroscout.rb', line 31 def self.names @_hash = {} if @_hash.nil? @_hash['enabled'] = 'enabled' @_hash['host'] = 'host' @_hash['locate_connected'] = 'locate_connected' @_hash['port'] = 'port' @_hash end |
.nullables ⇒ Object
An array for nullable fields
51 52 53 54 55 56 |
# File 'lib/mist_api/models/ap_aeroscout.rb', line 51 def self.nullables %w[ host port ] end |
.optionals ⇒ Object
An array for optional fields
41 42 43 44 45 46 47 48 |
# File 'lib/mist_api/models/ap_aeroscout.rb', line 41 def self.optionals %w[ enabled host locate_connected port ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
91 92 93 94 95 |
# File 'lib/mist_api/models/ap_aeroscout.rb', line 91 def inspect class_name = self.class.name.split('::').last "<#{class_name} enabled: #{@enabled.inspect}, host: #{@host.inspect}, locate_connected:"\ " #{@locate_connected.inspect}, port: #{@port.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
84 85 86 87 88 |
# File 'lib/mist_api/models/ap_aeroscout.rb', line 84 def to_s class_name = self.class.name.split('::').last "<#{class_name} enabled: #{@enabled}, host: #{@host}, locate_connected:"\ " #{@locate_connected}, port: #{@port}>" end |