Class: MistApi::StatsSdkclientNetworkConnection
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- MistApi::StatsSdkclientNetworkConnection
- Defined in:
- lib/mist_api/models/stats_sdkclient_network_connection.rb
Overview
Various network connection info for the SDK client (if known, else omitted), with RSSI in dBm, and signal level as
Instance Attribute Summary collapse
-
#mac ⇒ String
TODO: Write general description for this method.
-
#rssi ⇒ Float
TODO: Write general description for this method.
-
#signal_level ⇒ Float
TODO: Write general description for this method.
-
#type ⇒ String
TODO: Write general description for this method.
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(mac = nil, rssi = nil, signal_level = nil, type = nil) ⇒ StatsSdkclientNetworkConnection
constructor
A new instance of StatsSdkclientNetworkConnection.
-
#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(mac = nil, rssi = nil, signal_level = nil, type = nil) ⇒ StatsSdkclientNetworkConnection
Returns a new instance of StatsSdkclientNetworkConnection.
49 50 51 52 53 54 |
# File 'lib/mist_api/models/stats_sdkclient_network_connection.rb', line 49 def initialize(mac = nil, rssi = nil, signal_level = nil, type = nil) @mac = mac @rssi = rssi @signal_level = signal_level @type = type end |
Instance Attribute Details
#mac ⇒ String
TODO: Write general description for this method
15 16 17 |
# File 'lib/mist_api/models/stats_sdkclient_network_connection.rb', line 15 def mac @mac end |
#rssi ⇒ Float
TODO: Write general description for this method
19 20 21 |
# File 'lib/mist_api/models/stats_sdkclient_network_connection.rb', line 19 def rssi @rssi end |
#signal_level ⇒ Float
TODO: Write general description for this method
23 24 25 |
# File 'lib/mist_api/models/stats_sdkclient_network_connection.rb', line 23 def signal_level @signal_level end |
#type ⇒ String
TODO: Write general description for this method
27 28 29 |
# File 'lib/mist_api/models/stats_sdkclient_network_connection.rb', line 27 def type @type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/mist_api/models/stats_sdkclient_network_connection.rb', line 57 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. mac = hash.key?('mac') ? hash['mac'] : nil rssi = hash.key?('rssi') ? hash['rssi'] : nil signal_level = hash.key?('signal_level') ? hash['signal_level'] : nil type = hash.key?('type') ? hash['type'] : nil # Create object from extracted values. StatsSdkclientNetworkConnection.new(mac, rssi, signal_level, type) end |
.names ⇒ Object
A mapping from model property names to API property names.
30 31 32 33 34 35 36 37 |
# File 'lib/mist_api/models/stats_sdkclient_network_connection.rb', line 30 def self.names @_hash = {} if @_hash.nil? @_hash['mac'] = 'mac' @_hash['rssi'] = 'rssi' @_hash['signal_level'] = 'signal_level' @_hash['type'] = 'type' @_hash end |
.nullables ⇒ Object
An array for nullable fields
45 46 47 |
# File 'lib/mist_api/models/stats_sdkclient_network_connection.rb', line 45 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
40 41 42 |
# File 'lib/mist_api/models/stats_sdkclient_network_connection.rb', line 40 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
81 82 83 84 85 |
# File 'lib/mist_api/models/stats_sdkclient_network_connection.rb', line 81 def inspect class_name = self.class.name.split('::').last "<#{class_name} mac: #{@mac.inspect}, rssi: #{@rssi.inspect}, signal_level:"\ " #{@signal_level.inspect}, type: #{@type.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
74 75 76 77 78 |
# File 'lib/mist_api/models/stats_sdkclient_network_connection.rb', line 74 def to_s class_name = self.class.name.split('::').last "<#{class_name} mac: #{@mac}, rssi: #{@rssi}, signal_level: #{@signal_level}, type:"\ " #{@type}>" end |