Class: MistApi::StatsSdkclient
- Defined in:
- lib/mist_api/models/stats_sdkclient.rb
Overview
SDK Client statistics
Instance Attribute Summary collapse
-
#id ⇒ UUID | String
Unique ID of the object instance in the Mist Organization.
-
#last_seen ⇒ Float
Last seen timestamp.
-
#map_id ⇒ UUID | String
Map_id of the sdk client (if known), or null.
-
#name ⇒ String
Name of the sdk client (if provided).
-
#network_connection ⇒ StatsSdkclientNetworkConnection
Various network connection info for the SDK client (if known, else omitted), with RSSI in dBm, and signal level as.
-
#uuid ⇒ UUID | String
UUID of the sdk client.
-
#x ⇒ Float
X (in pixels) of user location on the map (if known).
-
#y ⇒ Float
Y (in pixels) of user location on the map (if known).
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(id = nil, network_connection = nil, uuid = nil, last_seen = SKIP, map_id = SKIP, name = SKIP, x = SKIP, y = SKIP) ⇒ StatsSdkclient
constructor
A new instance of StatsSdkclient.
-
#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(id = nil, network_connection = nil, uuid = nil, last_seen = SKIP, map_id = SKIP, name = SKIP, x = SKIP, y = SKIP) ⇒ StatsSdkclient
Returns a new instance of StatsSdkclient.
78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/mist_api/models/stats_sdkclient.rb', line 78 def initialize(id = nil, network_connection = nil, uuid = nil, last_seen = SKIP, map_id = SKIP, name = SKIP, x = SKIP, y = SKIP) @id = id @last_seen = last_seen unless last_seen == SKIP @map_id = map_id unless map_id == SKIP @name = name unless name == SKIP @network_connection = network_connection @uuid = uuid @x = x unless x == SKIP @y = y unless y == SKIP end |
Instance Attribute Details
#id ⇒ UUID | String
Unique ID of the object instance in the Mist Organization
14 15 16 |
# File 'lib/mist_api/models/stats_sdkclient.rb', line 14 def id @id end |
#last_seen ⇒ Float
Last seen timestamp
18 19 20 |
# File 'lib/mist_api/models/stats_sdkclient.rb', line 18 def last_seen @last_seen end |
#map_id ⇒ UUID | String
Map_id of the sdk client (if known), or null
22 23 24 |
# File 'lib/mist_api/models/stats_sdkclient.rb', line 22 def map_id @map_id end |
#name ⇒ String
Name of the sdk client (if provided)
26 27 28 |
# File 'lib/mist_api/models/stats_sdkclient.rb', line 26 def name @name end |
#network_connection ⇒ StatsSdkclientNetworkConnection
Various network connection info for the SDK client (if known, else omitted), with RSSI in dBm, and signal level as
31 32 33 |
# File 'lib/mist_api/models/stats_sdkclient.rb', line 31 def network_connection @network_connection end |
#uuid ⇒ UUID | String
UUID of the sdk client
35 36 37 |
# File 'lib/mist_api/models/stats_sdkclient.rb', line 35 def uuid @uuid end |
#x ⇒ Float
X (in pixels) of user location on the map (if known)
39 40 41 |
# File 'lib/mist_api/models/stats_sdkclient.rb', line 39 def x @x end |
#y ⇒ Float
Y (in pixels) of user location on the map (if known)
43 44 45 |
# File 'lib/mist_api/models/stats_sdkclient.rb', line 43 def y @y end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/mist_api/models/stats_sdkclient.rb', line 92 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. id = hash.key?('id') ? hash['id'] : nil network_connection = StatsSdkclientNetworkConnection.from_hash(hash['network_connection']) if hash['network_connection'] uuid = hash.key?('uuid') ? hash['uuid'] : nil last_seen = hash.key?('last_seen') ? hash['last_seen'] : SKIP map_id = hash.key?('map_id') ? hash['map_id'] : SKIP name = hash.key?('name') ? hash['name'] : SKIP x = hash.key?('x') ? hash['x'] : SKIP y = hash.key?('y') ? hash['y'] : SKIP # Create object from extracted values. StatsSdkclient.new(id, network_connection, uuid, last_seen, map_id, name, x, y) 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/stats_sdkclient.rb', line 46 def self.names @_hash = {} if @_hash.nil? @_hash['id'] = 'id' @_hash['last_seen'] = 'last_seen' @_hash['map_id'] = 'map_id' @_hash['name'] = 'name' @_hash['network_connection'] = 'network_connection' @_hash['uuid'] = 'uuid' @_hash['x'] = 'x' @_hash['y'] = 'y' @_hash end |
.nullables ⇒ Object
An array for nullable fields
71 72 73 74 75 76 |
# File 'lib/mist_api/models/stats_sdkclient.rb', line 71 def self.nullables %w[ last_seen map_id ] end |
.optionals ⇒ Object
An array for optional fields
60 61 62 63 64 65 66 67 68 |
# File 'lib/mist_api/models/stats_sdkclient.rb', line 60 def self.optionals %w[ last_seen map_id name x y ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
125 126 127 128 129 130 131 |
# File 'lib/mist_api/models/stats_sdkclient.rb', line 125 def inspect class_name = self.class.name.split('::').last "<#{class_name} id: #{@id.inspect}, last_seen: #{@last_seen.inspect}, map_id:"\ " #{@map_id.inspect}, name: #{@name.inspect}, network_connection:"\ " #{@network_connection.inspect}, uuid: #{@uuid.inspect}, x: #{@x.inspect}, y:"\ " #{@y.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
118 119 120 121 122 |
# File 'lib/mist_api/models/stats_sdkclient.rb', line 118 def to_s class_name = self.class.name.split('::').last "<#{class_name} id: #{@id}, last_seen: #{@last_seen}, map_id: #{@map_id}, name: #{@name},"\ " network_connection: #{@network_connection}, uuid: #{@uuid}, x: #{@x}, y: #{@y}>" end |