Class: UntitledApi::ApiV1SitesStatsAssetsResponse1
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- UntitledApi::ApiV1SitesStatsAssetsResponse1
- Defined in:
- lib/untitled_api/models/api_v1_sites_stats_assets_response1.rb
Overview
Response data
Instance Attribute Summary collapse
-
#battery_voltage ⇒ Float
TODO: Write general description for this method.
-
#created_time ⇒ Float
TODO: Write general description for this method.
-
#device_name ⇒ String
TODO: Write general description for this method.
-
#for_site ⇒ Object
TODO: Write general description for this method.
-
#gatt_battery_percent ⇒ Float
TODO: Write general description for this method.
-
#gatt_humidity ⇒ Float
TODO: Write general description for this method.
-
#gatt_mfg_name ⇒ String
TODO: Write general description for this method.
-
#gatt_model_num ⇒ String
TODO: Write general description for this method.
-
#gatt_serial_num ⇒ String
TODO: Write general description for this method.
-
#gatt_temperature ⇒ Float
TODO: Write general description for this method.
-
#id ⇒ String
TODO: Write general description for this method.
-
#last_seen ⇒ Float
TODO: Write general description for this method.
-
#mac ⇒ String
TODO: Write general description for this method.
-
#manufacture ⇒ String
TODO: Write general description for this method.
-
#map_id ⇒ Object
TODO: Write general description for this method.
-
#modified_time ⇒ Float
TODO: Write general description for this method.
-
#name ⇒ String
TODO: Write general description for this method.
-
#org_id ⇒ String
TODO: Write general description for this method.
-
#rssizones ⇒ Object
TODO: Write general description for this method.
-
#site_id ⇒ String
TODO: Write general description for this method.
-
#tag_id ⇒ String
TODO: Write general description for this method.
-
#temperature ⇒ Float
TODO: Write general description for this method.
-
#ttl ⇒ Float
TODO: Write general description for this method.
-
#vbeacons ⇒ Object
TODO: Write general description for this method.
-
#zones ⇒ Object
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(id = SKIP, name = SKIP, for_site = SKIP, site_id = SKIP, org_id = SKIP, created_time = SKIP, modified_time = SKIP, map_id = SKIP, tag_id = SKIP, mac = SKIP, last_seen = SKIP, temperature = SKIP, battery_voltage = SKIP, device_name = SKIP, gatt_mfg_name = SKIP, gatt_model_num = SKIP, gatt_serial_num = SKIP, gatt_battery_percent = SKIP, gatt_temperature = SKIP, gatt_humidity = SKIP, ttl = SKIP, manufacture = SKIP, zones = SKIP, vbeacons = SKIP, rssizones = SKIP) ⇒ ApiV1SitesStatsAssetsResponse1
constructor
A new instance of ApiV1SitesStatsAssetsResponse1.
Methods inherited from BaseModel
Constructor Details
#initialize(id = SKIP, name = SKIP, for_site = SKIP, site_id = SKIP, org_id = SKIP, created_time = SKIP, modified_time = SKIP, map_id = SKIP, tag_id = SKIP, mac = SKIP, last_seen = SKIP, temperature = SKIP, battery_voltage = SKIP, device_name = SKIP, gatt_mfg_name = SKIP, gatt_model_num = SKIP, gatt_serial_num = SKIP, gatt_battery_percent = SKIP, gatt_temperature = SKIP, gatt_humidity = SKIP, ttl = SKIP, manufacture = SKIP, zones = SKIP, vbeacons = SKIP, rssizones = SKIP) ⇒ ApiV1SitesStatsAssetsResponse1
Returns a new instance of ApiV1SitesStatsAssetsResponse1.
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 |
# File 'lib/untitled_api/models/api_v1_sites_stats_assets_response1.rb', line 179 def initialize(id = SKIP, name = SKIP, for_site = SKIP, site_id = SKIP, org_id = SKIP, created_time = SKIP, modified_time = SKIP, map_id = SKIP, tag_id = SKIP, mac = SKIP, last_seen = SKIP, temperature = SKIP, battery_voltage = SKIP, device_name = SKIP, gatt_mfg_name = SKIP, gatt_model_num = SKIP, gatt_serial_num = SKIP, gatt_battery_percent = SKIP, gatt_temperature = SKIP, gatt_humidity = SKIP, ttl = SKIP, manufacture = SKIP, zones = SKIP, vbeacons = SKIP, rssizones = SKIP) @id = id unless id == SKIP @name = name unless name == SKIP @for_site = for_site unless for_site == SKIP @site_id = site_id unless site_id == SKIP @org_id = org_id unless org_id == SKIP @created_time = created_time unless created_time == SKIP @modified_time = modified_time unless modified_time == SKIP @map_id = map_id unless map_id == SKIP @tag_id = tag_id unless tag_id == SKIP @mac = mac unless mac == SKIP @last_seen = last_seen unless last_seen == SKIP @temperature = temperature unless temperature == SKIP @battery_voltage = battery_voltage unless battery_voltage == SKIP @device_name = device_name unless device_name == SKIP @gatt_mfg_name = gatt_mfg_name unless gatt_mfg_name == SKIP @gatt_model_num = gatt_model_num unless gatt_model_num == SKIP @gatt_serial_num = gatt_serial_num unless gatt_serial_num == SKIP @gatt_battery_percent = gatt_battery_percent unless gatt_battery_percent == SKIP @gatt_temperature = gatt_temperature unless gatt_temperature == SKIP @gatt_humidity = gatt_humidity unless gatt_humidity == SKIP @ttl = ttl unless ttl == SKIP @manufacture = manufacture unless manufacture == SKIP @zones = zones unless zones == SKIP @vbeacons = vbeacons unless vbeacons == SKIP @rssizones = rssizones unless rssizones == SKIP end |
Instance Attribute Details
#battery_voltage ⇒ Float
TODO: Write general description for this method
62 63 64 |
# File 'lib/untitled_api/models/api_v1_sites_stats_assets_response1.rb', line 62 def battery_voltage @battery_voltage end |
#created_time ⇒ Float
TODO: Write general description for this method
34 35 36 |
# File 'lib/untitled_api/models/api_v1_sites_stats_assets_response1.rb', line 34 def created_time @created_time end |
#device_name ⇒ String
TODO: Write general description for this method
66 67 68 |
# File 'lib/untitled_api/models/api_v1_sites_stats_assets_response1.rb', line 66 def device_name @device_name end |
#for_site ⇒ Object
TODO: Write general description for this method
22 23 24 |
# File 'lib/untitled_api/models/api_v1_sites_stats_assets_response1.rb', line 22 def for_site @for_site end |
#gatt_battery_percent ⇒ Float
TODO: Write general description for this method
82 83 84 |
# File 'lib/untitled_api/models/api_v1_sites_stats_assets_response1.rb', line 82 def gatt_battery_percent @gatt_battery_percent end |
#gatt_humidity ⇒ Float
TODO: Write general description for this method
90 91 92 |
# File 'lib/untitled_api/models/api_v1_sites_stats_assets_response1.rb', line 90 def gatt_humidity @gatt_humidity end |
#gatt_mfg_name ⇒ String
TODO: Write general description for this method
70 71 72 |
# File 'lib/untitled_api/models/api_v1_sites_stats_assets_response1.rb', line 70 def gatt_mfg_name @gatt_mfg_name end |
#gatt_model_num ⇒ String
TODO: Write general description for this method
74 75 76 |
# File 'lib/untitled_api/models/api_v1_sites_stats_assets_response1.rb', line 74 def gatt_model_num @gatt_model_num end |
#gatt_serial_num ⇒ String
TODO: Write general description for this method
78 79 80 |
# File 'lib/untitled_api/models/api_v1_sites_stats_assets_response1.rb', line 78 def gatt_serial_num @gatt_serial_num end |
#gatt_temperature ⇒ Float
TODO: Write general description for this method
86 87 88 |
# File 'lib/untitled_api/models/api_v1_sites_stats_assets_response1.rb', line 86 def gatt_temperature @gatt_temperature end |
#id ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/untitled_api/models/api_v1_sites_stats_assets_response1.rb', line 14 def id @id end |
#last_seen ⇒ Float
TODO: Write general description for this method
54 55 56 |
# File 'lib/untitled_api/models/api_v1_sites_stats_assets_response1.rb', line 54 def last_seen @last_seen end |
#mac ⇒ String
TODO: Write general description for this method
50 51 52 |
# File 'lib/untitled_api/models/api_v1_sites_stats_assets_response1.rb', line 50 def mac @mac end |
#manufacture ⇒ String
TODO: Write general description for this method
98 99 100 |
# File 'lib/untitled_api/models/api_v1_sites_stats_assets_response1.rb', line 98 def manufacture @manufacture end |
#map_id ⇒ Object
TODO: Write general description for this method
42 43 44 |
# File 'lib/untitled_api/models/api_v1_sites_stats_assets_response1.rb', line 42 def map_id @map_id end |
#modified_time ⇒ Float
TODO: Write general description for this method
38 39 40 |
# File 'lib/untitled_api/models/api_v1_sites_stats_assets_response1.rb', line 38 def modified_time @modified_time end |
#name ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/untitled_api/models/api_v1_sites_stats_assets_response1.rb', line 18 def name @name end |
#org_id ⇒ String
TODO: Write general description for this method
30 31 32 |
# File 'lib/untitled_api/models/api_v1_sites_stats_assets_response1.rb', line 30 def org_id @org_id end |
#rssizones ⇒ Object
TODO: Write general description for this method
110 111 112 |
# File 'lib/untitled_api/models/api_v1_sites_stats_assets_response1.rb', line 110 def rssizones @rssizones end |
#site_id ⇒ String
TODO: Write general description for this method
26 27 28 |
# File 'lib/untitled_api/models/api_v1_sites_stats_assets_response1.rb', line 26 def site_id @site_id end |
#tag_id ⇒ String
TODO: Write general description for this method
46 47 48 |
# File 'lib/untitled_api/models/api_v1_sites_stats_assets_response1.rb', line 46 def tag_id @tag_id end |
#temperature ⇒ Float
TODO: Write general description for this method
58 59 60 |
# File 'lib/untitled_api/models/api_v1_sites_stats_assets_response1.rb', line 58 def temperature @temperature end |
#ttl ⇒ Float
TODO: Write general description for this method
94 95 96 |
# File 'lib/untitled_api/models/api_v1_sites_stats_assets_response1.rb', line 94 def ttl @ttl end |
#vbeacons ⇒ Object
TODO: Write general description for this method
106 107 108 |
# File 'lib/untitled_api/models/api_v1_sites_stats_assets_response1.rb', line 106 def vbeacons @vbeacons end |
#zones ⇒ Object
TODO: Write general description for this method
102 103 104 |
# File 'lib/untitled_api/models/api_v1_sites_stats_assets_response1.rb', line 102 def zones @zones end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 |
# File 'lib/untitled_api/models/api_v1_sites_stats_assets_response1.rb', line 232 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. id = hash.key?('id') ? hash['id'] : SKIP name = hash.key?('name') ? hash['name'] : SKIP for_site = hash.key?('for_site') ? hash['for_site'] : SKIP site_id = hash.key?('site_id') ? hash['site_id'] : SKIP org_id = hash.key?('org_id') ? hash['org_id'] : SKIP created_time = hash.key?('created_time') ? hash['created_time'] : SKIP modified_time = hash.key?('modified_time') ? hash['modified_time'] : SKIP map_id = hash.key?('map_id') ? hash['map_id'] : SKIP tag_id = hash.key?('tag_id') ? hash['tag_id'] : SKIP mac = hash.key?('mac') ? hash['mac'] : SKIP last_seen = hash.key?('last_seen') ? hash['last_seen'] : SKIP temperature = hash.key?('temperature') ? hash['temperature'] : SKIP battery_voltage = hash.key?('battery_voltage') ? hash['battery_voltage'] : SKIP device_name = hash.key?('device_name') ? hash['device_name'] : SKIP gatt_mfg_name = hash.key?('gatt_mfg_name') ? hash['gatt_mfg_name'] : SKIP gatt_model_num = hash.key?('gatt_model_num') ? hash['gatt_model_num'] : SKIP gatt_serial_num = hash.key?('gatt_serial_num') ? hash['gatt_serial_num'] : SKIP gatt_battery_percent = hash.key?('gatt_battery_percent') ? hash['gatt_battery_percent'] : SKIP gatt_temperature = hash.key?('gatt_temperature') ? hash['gatt_temperature'] : SKIP gatt_humidity = hash.key?('gatt_humidity') ? hash['gatt_humidity'] : SKIP ttl = hash.key?('_ttl') ? hash['_ttl'] : SKIP manufacture = hash.key?('manufacture') ? hash['manufacture'] : SKIP zones = hash.key?('zones') ? hash['zones'] : SKIP vbeacons = hash.key?('vbeacons') ? hash['vbeacons'] : SKIP rssizones = hash.key?('rssizones') ? hash['rssizones'] : SKIP # Create object from extracted values. ApiV1SitesStatsAssetsResponse1.new(id, name, for_site, site_id, org_id, created_time, modified_time, map_id, tag_id, mac, last_seen, temperature, battery_voltage, device_name, gatt_mfg_name, gatt_model_num, gatt_serial_num, gatt_battery_percent, gatt_temperature, gatt_humidity, ttl, manufacture, zones, vbeacons, rssizones) end |
.names ⇒ Object
A mapping from model property names to API property names.
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 |
# File 'lib/untitled_api/models/api_v1_sites_stats_assets_response1.rb', line 113 def self.names @_hash = {} if @_hash.nil? @_hash['id'] = 'id' @_hash['name'] = 'name' @_hash['for_site'] = 'for_site' @_hash['site_id'] = 'site_id' @_hash['org_id'] = 'org_id' @_hash['created_time'] = 'created_time' @_hash['modified_time'] = 'modified_time' @_hash['map_id'] = 'map_id' @_hash['tag_id'] = 'tag_id' @_hash['mac'] = 'mac' @_hash['last_seen'] = 'last_seen' @_hash['temperature'] = 'temperature' @_hash['battery_voltage'] = 'battery_voltage' @_hash['device_name'] = 'device_name' @_hash['gatt_mfg_name'] = 'gatt_mfg_name' @_hash['gatt_model_num'] = 'gatt_model_num' @_hash['gatt_serial_num'] = 'gatt_serial_num' @_hash['gatt_battery_percent'] = 'gatt_battery_percent' @_hash['gatt_temperature'] = 'gatt_temperature' @_hash['gatt_humidity'] = 'gatt_humidity' @_hash['ttl'] = '_ttl' @_hash['manufacture'] = 'manufacture' @_hash['zones'] = 'zones' @_hash['vbeacons'] = 'vbeacons' @_hash['rssizones'] = 'rssizones' @_hash end |
.nullables ⇒ Object
An array for nullable fields
175 176 177 |
# File 'lib/untitled_api/models/api_v1_sites_stats_assets_response1.rb', line 175 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 |
# File 'lib/untitled_api/models/api_v1_sites_stats_assets_response1.rb', line 144 def self.optionals %w[ id name for_site site_id org_id created_time modified_time map_id tag_id mac last_seen temperature battery_voltage device_name gatt_mfg_name gatt_model_num gatt_serial_num gatt_battery_percent gatt_temperature gatt_humidity ttl manufacture zones vbeacons rssizones ] end |