Class: MistApi::IotendpointStats
- Defined in:
- lib/mist_api/models/iotendpoint_stats.rb
Overview
IoT endpoint statistics
Instance Attribute Summary collapse
-
#ap_mac ⇒ String
MAC address of the AP the endpoint was seen on.
-
#id ⇒ String
Unique identifier for the IoT endpoint.
-
#lqi ⇒ Integer
Link Quality Indicator (0–255).
-
#mac ⇒ String
MAC address of the IoT endpoint.
-
#mfg ⇒ String
Manufacturer name.
-
#model ⇒ String
Model name.
-
#timestamp ⇒ Float
Epoch timestamp of the last observation, in seconds.
-
#type ⇒ String
IoT endpoint type.
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(ap_mac = SKIP, id = SKIP, lqi = SKIP, mac = SKIP, mfg = SKIP, model = SKIP, timestamp = SKIP, type = SKIP) ⇒ IotendpointStats
constructor
A new instance of IotendpointStats.
-
#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(ap_mac = SKIP, id = SKIP, lqi = SKIP, mac = SKIP, mfg = SKIP, model = SKIP, timestamp = SKIP, type = SKIP) ⇒ IotendpointStats
Returns a new instance of IotendpointStats.
77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/mist_api/models/iotendpoint_stats.rb', line 77 def initialize(ap_mac = SKIP, id = SKIP, lqi = SKIP, mac = SKIP, mfg = SKIP, model = SKIP, = SKIP, type = SKIP) @ap_mac = ap_mac unless ap_mac == SKIP @id = id unless id == SKIP @lqi = lqi unless lqi == SKIP @mac = mac unless mac == SKIP @mfg = mfg unless mfg == SKIP @model = model unless model == SKIP @timestamp = unless == SKIP @type = type unless type == SKIP end |
Instance Attribute Details
#ap_mac ⇒ String
MAC address of the AP the endpoint was seen on
14 15 16 |
# File 'lib/mist_api/models/iotendpoint_stats.rb', line 14 def ap_mac @ap_mac end |
#id ⇒ String
Unique identifier for the IoT endpoint
18 19 20 |
# File 'lib/mist_api/models/iotendpoint_stats.rb', line 18 def id @id end |
#lqi ⇒ Integer
Link Quality Indicator (0–255)
22 23 24 |
# File 'lib/mist_api/models/iotendpoint_stats.rb', line 22 def lqi @lqi end |
#mac ⇒ String
MAC address of the IoT endpoint
26 27 28 |
# File 'lib/mist_api/models/iotendpoint_stats.rb', line 26 def mac @mac end |
#mfg ⇒ String
Manufacturer name
30 31 32 |
# File 'lib/mist_api/models/iotendpoint_stats.rb', line 30 def mfg @mfg end |
#model ⇒ String
Model name
34 35 36 |
# File 'lib/mist_api/models/iotendpoint_stats.rb', line 34 def model @model end |
#timestamp ⇒ Float
Epoch timestamp of the last observation, in seconds
38 39 40 |
# File 'lib/mist_api/models/iotendpoint_stats.rb', line 38 def @timestamp end |
#type ⇒ String
IoT endpoint type. enum: ‘zigbee`
42 43 44 |
# File 'lib/mist_api/models/iotendpoint_stats.rb', line 42 def type @type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/mist_api/models/iotendpoint_stats.rb', line 90 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. ap_mac = hash.key?('ap_mac') ? hash['ap_mac'] : SKIP id = hash.key?('id') ? hash['id'] : SKIP lqi = hash.key?('lqi') ? hash['lqi'] : SKIP mac = hash.key?('mac') ? hash['mac'] : SKIP mfg = hash.key?('mfg') ? hash['mfg'] : SKIP model = hash.key?('model') ? hash['model'] : SKIP = hash.key?('timestamp') ? hash['timestamp'] : SKIP type = hash.key?('type') ? hash['type'] : SKIP # Create object from extracted values. IotendpointStats.new(ap_mac, id, lqi, mac, mfg, model, , type) 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/iotendpoint_stats.rb', line 45 def self.names @_hash = {} if @_hash.nil? @_hash['ap_mac'] = 'ap_mac' @_hash['id'] = 'id' @_hash['lqi'] = 'lqi' @_hash['mac'] = 'mac' @_hash['mfg'] = 'mfg' @_hash['model'] = 'model' @_hash['timestamp'] = 'timestamp' @_hash['type'] = 'type' @_hash end |
.nullables ⇒ Object
An array for nullable fields
73 74 75 |
# File 'lib/mist_api/models/iotendpoint_stats.rb', line 73 def self.nullables [] 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/iotendpoint_stats.rb', line 59 def self.optionals %w[ ap_mac id lqi mac mfg model timestamp type ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
122 123 124 125 126 127 |
# File 'lib/mist_api/models/iotendpoint_stats.rb', line 122 def inspect class_name = self.class.name.split('::').last "<#{class_name} ap_mac: #{@ap_mac.inspect}, id: #{@id.inspect}, lqi: #{@lqi.inspect}, mac:"\ " #{@mac.inspect}, mfg: #{@mfg.inspect}, model: #{@model.inspect}, timestamp:"\ " #{@timestamp.inspect}, type: #{@type.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
115 116 117 118 119 |
# File 'lib/mist_api/models/iotendpoint_stats.rb', line 115 def to_s class_name = self.class.name.split('::').last "<#{class_name} ap_mac: #{@ap_mac}, id: #{@id}, lqi: #{@lqi}, mac: #{@mac}, mfg: #{@mfg},"\ " model: #{@model}, timestamp: #{@timestamp}, type: #{@type}>" end |