Class: MistApi::StatsApEslStat
- Defined in:
- lib/mist_api/models/stats_ap_esl_stat.rb
Overview
StatsApEslStat Model.
Instance Attribute Summary collapse
-
#channel ⇒ Integer
TODO: Write general description for this method.
-
#connected ⇒ TrueClass | FalseClass
TODO: Write general description for this method.
-
#ip ⇒ String
IP address of Hanshow and SoluM dongles.
-
#mac ⇒ String
MAC address of Hanshow and SoluM dongles.
-
#product_id ⇒ String
Product ID of Hanshow and SoluM dongles.
-
#type ⇒ String
Product ID of Hanshow and SoluM dongles.
-
#up ⇒ TrueClass | FalseClass
Product ID of Hanshow and SoluM dongles.
-
#vendor_id ⇒ String
Vendor ID of Hanshow and SoluM dongles.
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(channel = SKIP, connected = SKIP, ip = SKIP, mac = SKIP, product_id = SKIP, type = SKIP, up = SKIP, vendor_id = SKIP) ⇒ StatsApEslStat
constructor
A new instance of StatsApEslStat.
-
#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(channel = SKIP, connected = SKIP, ip = SKIP, mac = SKIP, product_id = SKIP, type = SKIP, up = SKIP, vendor_id = SKIP) ⇒ StatsApEslStat
Returns a new instance of StatsApEslStat.
86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/mist_api/models/stats_ap_esl_stat.rb', line 86 def initialize(channel = SKIP, connected = SKIP, ip = SKIP, mac = SKIP, product_id = SKIP, type = SKIP, up = SKIP, vendor_id = SKIP) @channel = channel unless channel == SKIP @connected = connected unless connected == SKIP @ip = ip unless ip == SKIP @mac = mac unless mac == SKIP @product_id = product_id unless product_id == SKIP @type = type unless type == SKIP @up = up unless up == SKIP @vendor_id = vendor_id unless vendor_id == SKIP end |
Instance Attribute Details
#channel ⇒ Integer
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/stats_ap_esl_stat.rb', line 14 def channel @channel end |
#connected ⇒ TrueClass | FalseClass
TODO: Write general description for this method
18 19 20 |
# File 'lib/mist_api/models/stats_ap_esl_stat.rb', line 18 def connected @connected end |
#ip ⇒ String
IP address of Hanshow and SoluM dongles
22 23 24 |
# File 'lib/mist_api/models/stats_ap_esl_stat.rb', line 22 def ip @ip end |
#mac ⇒ String
MAC address of Hanshow and SoluM dongles
26 27 28 |
# File 'lib/mist_api/models/stats_ap_esl_stat.rb', line 26 def mac @mac end |
#product_id ⇒ String
Product ID of Hanshow and SoluM dongles
30 31 32 |
# File 'lib/mist_api/models/stats_ap_esl_stat.rb', line 30 def product_id @product_id end |
#type ⇒ String
Product ID of Hanshow and SoluM dongles
34 35 36 |
# File 'lib/mist_api/models/stats_ap_esl_stat.rb', line 34 def type @type end |
#up ⇒ TrueClass | FalseClass
Product ID of Hanshow and SoluM dongles
38 39 40 |
# File 'lib/mist_api/models/stats_ap_esl_stat.rb', line 38 def up @up end |
#vendor_id ⇒ String
Vendor ID of Hanshow and SoluM dongles
42 43 44 |
# File 'lib/mist_api/models/stats_ap_esl_stat.rb', line 42 def vendor_id @vendor_id end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/mist_api/models/stats_ap_esl_stat.rb', line 99 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. channel = hash.key?('channel') ? hash['channel'] : SKIP connected = hash.key?('connected') ? hash['connected'] : SKIP ip = hash.key?('ip') ? hash['ip'] : SKIP mac = hash.key?('mac') ? hash['mac'] : SKIP product_id = hash.key?('product_id') ? hash['product_id'] : SKIP type = hash.key?('type') ? hash['type'] : SKIP up = hash.key?('up') ? hash['up'] : SKIP vendor_id = hash.key?('vendor_id') ? hash['vendor_id'] : SKIP # Create object from extracted values. StatsApEslStat.new(channel, connected, ip, mac, product_id, type, up, vendor_id) end |
.names ⇒ Object
A mapping from model property names to API property names.
45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/mist_api/models/stats_ap_esl_stat.rb', line 45 def self.names @_hash = {} if @_hash.nil? @_hash['channel'] = 'channel' @_hash['connected'] = 'connected' @_hash['ip'] = 'ip' @_hash['mac'] = 'mac' @_hash['product_id'] = 'product_id' @_hash['type'] = 'type' @_hash['up'] = 'up' @_hash['vendor_id'] = 'vendor_id' @_hash end |
.nullables ⇒ Object
An array for nullable fields
73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/mist_api/models/stats_ap_esl_stat.rb', line 73 def self.nullables %w[ channel connected ip mac product_id type up vendor_id ] end |
.optionals ⇒ Object
An array for optional fields
59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/mist_api/models/stats_ap_esl_stat.rb', line 59 def self.optionals %w[ channel connected ip mac product_id type up vendor_id ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
131 132 133 134 135 136 |
# File 'lib/mist_api/models/stats_ap_esl_stat.rb', line 131 def inspect class_name = self.class.name.split('::').last "<#{class_name} channel: #{@channel.inspect}, connected: #{@connected.inspect}, ip:"\ " #{@ip.inspect}, mac: #{@mac.inspect}, product_id: #{@product_id.inspect}, type:"\ " #{@type.inspect}, up: #{@up.inspect}, vendor_id: #{@vendor_id.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
124 125 126 127 128 |
# File 'lib/mist_api/models/stats_ap_esl_stat.rb', line 124 def to_s class_name = self.class.name.split('::').last "<#{class_name} channel: #{@channel}, connected: #{@connected}, ip: #{@ip}, mac: #{@mac},"\ " product_id: #{@product_id}, type: #{@type}, up: #{@up}, vendor_id: #{@vendor_id}>" end |