Class: MistApi::WebhookLocationAssetEvent
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- MistApi::WebhookLocationAssetEvent
- Defined in:
- lib/mist_api/models/webhook_location_asset_event.rb
Overview
WebhookLocationAssetEvent Model.
Instance Attribute Summary collapse
-
#battery_voltage ⇒ Integer
TODO: Write general description for this method.
-
#eddystone_uid_instance ⇒ String
TODO: Write general description for this method.
-
#eddystone_uid_namespace ⇒ String
TODO: Write general description for this method.
-
#eddystone_url_url ⇒ String
TODO: Write general description for this method.
-
#ibeacon_major ⇒ Integer
Major number for iBeacon.
-
#ibeacon_minor ⇒ Integer
Minor number for iBeacon.
-
#ibeacon_uuid ⇒ UUID | String
Minor number for iBeacon.
-
#mac ⇒ String
Minor number for iBeacon.
-
#map_id ⇒ UUID | String
Minor number for iBeacon.
-
#mfg_company_id ⇒ Integer
Optional, BLE manufacturing company ID.
-
#mfg_data ⇒ String
Optional, BLE manufacturing data in hex byte-string format (ie: “112233AABBCC”).
-
#site_id ⇒ UUID | String
Optional, BLE manufacturing data in hex byte-string format (ie: “112233AABBCC”).
-
#timestamp ⇒ Float
Epoch (seconds).
-
#type ⇒ String
Epoch (seconds).
-
#x ⇒ Float
x, in meter.
-
#y ⇒ Float
y, in meter.
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.
-
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
Instance Method Summary collapse
-
#initialize(battery_voltage = SKIP, eddystone_uid_instance = SKIP, eddystone_uid_namespace = SKIP, eddystone_url_url = SKIP, ibeacon_major = SKIP, ibeacon_minor = SKIP, ibeacon_uuid = SKIP, mac = SKIP, map_id = SKIP, mfg_company_id = SKIP, mfg_data = SKIP, site_id = SKIP, timestamp = SKIP, type = 'asset', x = SKIP, y = SKIP) ⇒ WebhookLocationAssetEvent
constructor
A new instance of WebhookLocationAssetEvent.
-
#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(battery_voltage = SKIP, eddystone_uid_instance = SKIP, eddystone_uid_namespace = SKIP, eddystone_url_url = SKIP, ibeacon_major = SKIP, ibeacon_minor = SKIP, ibeacon_uuid = SKIP, mac = SKIP, map_id = SKIP, mfg_company_id = SKIP, mfg_data = SKIP, site_id = SKIP, timestamp = SKIP, type = 'asset', x = SKIP, y = SKIP) ⇒ WebhookLocationAssetEvent
Returns a new instance of WebhookLocationAssetEvent.
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 |
# File 'lib/mist_api/models/webhook_location_asset_event.rb', line 131 def initialize(battery_voltage = SKIP, eddystone_uid_instance = SKIP, eddystone_uid_namespace = SKIP, eddystone_url_url = SKIP, ibeacon_major = SKIP, ibeacon_minor = SKIP, ibeacon_uuid = SKIP, mac = SKIP, map_id = SKIP, mfg_company_id = SKIP, mfg_data = SKIP, site_id = SKIP, = SKIP, type = 'asset', x = SKIP, y = SKIP) @battery_voltage = battery_voltage unless battery_voltage == SKIP @eddystone_uid_instance = eddystone_uid_instance unless eddystone_uid_instance == SKIP @eddystone_uid_namespace = eddystone_uid_namespace unless eddystone_uid_namespace == SKIP @eddystone_url_url = eddystone_url_url unless eddystone_url_url == SKIP @ibeacon_major = ibeacon_major unless ibeacon_major == SKIP @ibeacon_minor = ibeacon_minor unless ibeacon_minor == SKIP @ibeacon_uuid = ibeacon_uuid unless ibeacon_uuid == SKIP @mac = mac unless mac == SKIP @map_id = map_id unless map_id == SKIP @mfg_company_id = mfg_company_id unless mfg_company_id == SKIP @mfg_data = mfg_data unless mfg_data == SKIP @site_id = site_id unless site_id == SKIP @timestamp = unless == SKIP @type = type unless type == SKIP @x = x unless x == SKIP @y = y unless y == SKIP end |
Instance Attribute Details
#battery_voltage ⇒ Integer
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/webhook_location_asset_event.rb', line 14 def battery_voltage @battery_voltage end |
#eddystone_uid_instance ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/mist_api/models/webhook_location_asset_event.rb', line 18 def eddystone_uid_instance @eddystone_uid_instance end |
#eddystone_uid_namespace ⇒ String
TODO: Write general description for this method
22 23 24 |
# File 'lib/mist_api/models/webhook_location_asset_event.rb', line 22 def eddystone_uid_namespace @eddystone_uid_namespace end |
#eddystone_url_url ⇒ String
TODO: Write general description for this method
26 27 28 |
# File 'lib/mist_api/models/webhook_location_asset_event.rb', line 26 def eddystone_url_url @eddystone_url_url end |
#ibeacon_major ⇒ Integer
Major number for iBeacon
30 31 32 |
# File 'lib/mist_api/models/webhook_location_asset_event.rb', line 30 def ibeacon_major @ibeacon_major end |
#ibeacon_minor ⇒ Integer
Minor number for iBeacon
34 35 36 |
# File 'lib/mist_api/models/webhook_location_asset_event.rb', line 34 def ibeacon_minor @ibeacon_minor end |
#ibeacon_uuid ⇒ UUID | String
Minor number for iBeacon
38 39 40 |
# File 'lib/mist_api/models/webhook_location_asset_event.rb', line 38 def ibeacon_uuid @ibeacon_uuid end |
#mac ⇒ String
Minor number for iBeacon
42 43 44 |
# File 'lib/mist_api/models/webhook_location_asset_event.rb', line 42 def mac @mac end |
#map_id ⇒ UUID | String
Minor number for iBeacon
46 47 48 |
# File 'lib/mist_api/models/webhook_location_asset_event.rb', line 46 def map_id @map_id end |
#mfg_company_id ⇒ Integer
Optional, BLE manufacturing company ID
50 51 52 |
# File 'lib/mist_api/models/webhook_location_asset_event.rb', line 50 def mfg_company_id @mfg_company_id end |
#mfg_data ⇒ String
Optional, BLE manufacturing data in hex byte-string format (ie: “112233AABBCC”)
55 56 57 |
# File 'lib/mist_api/models/webhook_location_asset_event.rb', line 55 def mfg_data @mfg_data end |
#site_id ⇒ UUID | String
Optional, BLE manufacturing data in hex byte-string format (ie: “112233AABBCC”)
60 61 62 |
# File 'lib/mist_api/models/webhook_location_asset_event.rb', line 60 def site_id @site_id end |
#timestamp ⇒ Float
Epoch (seconds)
64 65 66 |
# File 'lib/mist_api/models/webhook_location_asset_event.rb', line 64 def @timestamp end |
#type ⇒ String
Epoch (seconds)
68 69 70 |
# File 'lib/mist_api/models/webhook_location_asset_event.rb', line 68 def type @type end |
#x ⇒ Float
x, in meter
72 73 74 |
# File 'lib/mist_api/models/webhook_location_asset_event.rb', line 72 def x @x end |
#y ⇒ Float
y, in meter
76 77 78 |
# File 'lib/mist_api/models/webhook_location_asset_event.rb', line 76 def y @y end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 |
# File 'lib/mist_api/models/webhook_location_asset_event.rb', line 156 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. battery_voltage = hash.key?('battery_voltage') ? hash['battery_voltage'] : SKIP eddystone_uid_instance = hash.key?('eddystone_uid_instance') ? hash['eddystone_uid_instance'] : SKIP eddystone_uid_namespace = hash.key?('eddystone_uid_namespace') ? hash['eddystone_uid_namespace'] : SKIP eddystone_url_url = hash.key?('eddystone_url_url') ? hash['eddystone_url_url'] : SKIP ibeacon_major = hash.key?('ibeacon_major') ? hash['ibeacon_major'] : SKIP ibeacon_minor = hash.key?('ibeacon_minor') ? hash['ibeacon_minor'] : SKIP ibeacon_uuid = hash.key?('ibeacon_uuid') ? hash['ibeacon_uuid'] : SKIP mac = hash.key?('mac') ? hash['mac'] : SKIP map_id = hash.key?('map_id') ? hash['map_id'] : SKIP mfg_company_id = hash.key?('mfg_company_id') ? hash['mfg_company_id'] : SKIP mfg_data = hash.key?('mfg_data') ? hash['mfg_data'] : SKIP site_id = hash.key?('site_id') ? hash['site_id'] : SKIP = hash.key?('timestamp') ? hash['timestamp'] : SKIP type = hash['type'] ||= 'asset' x = hash.key?('x') ? hash['x'] : SKIP y = hash.key?('y') ? hash['y'] : SKIP # Create object from extracted values. WebhookLocationAssetEvent.new(battery_voltage, eddystone_uid_instance, eddystone_uid_namespace, eddystone_url_url, ibeacon_major, ibeacon_minor, ibeacon_uuid, mac, map_id, mfg_company_id, mfg_data, site_id, , type, x, y) end |
.names ⇒ Object
A mapping from model property names to API property names.
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/mist_api/models/webhook_location_asset_event.rb', line 79 def self.names @_hash = {} if @_hash.nil? @_hash['battery_voltage'] = 'battery_voltage' @_hash['eddystone_uid_instance'] = 'eddystone_uid_instance' @_hash['eddystone_uid_namespace'] = 'eddystone_uid_namespace' @_hash['eddystone_url_url'] = 'eddystone_url_url' @_hash['ibeacon_major'] = 'ibeacon_major' @_hash['ibeacon_minor'] = 'ibeacon_minor' @_hash['ibeacon_uuid'] = 'ibeacon_uuid' @_hash['mac'] = 'mac' @_hash['map_id'] = 'map_id' @_hash['mfg_company_id'] = 'mfg_company_id' @_hash['mfg_data'] = 'mfg_data' @_hash['site_id'] = 'site_id' @_hash['timestamp'] = 'timestamp' @_hash['type'] = 'type' @_hash['x'] = 'x' @_hash['y'] = 'y' @_hash end |
.nullables ⇒ Object
An array for nullable fields
123 124 125 126 127 128 129 |
# File 'lib/mist_api/models/webhook_location_asset_event.rb', line 123 def self.nullables %w[ ibeacon_major ibeacon_minor ibeacon_uuid ] end |
.optionals ⇒ Object
An array for optional fields
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
# File 'lib/mist_api/models/webhook_location_asset_event.rb', line 101 def self.optionals %w[ battery_voltage eddystone_uid_instance eddystone_uid_namespace eddystone_url_url ibeacon_major ibeacon_minor ibeacon_uuid mac map_id mfg_company_id mfg_data site_id timestamp type x y ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
203 204 205 206 207 208 209 |
# File 'lib/mist_api/models/webhook_location_asset_event.rb', line 203 def self.validate(value) return true if value.instance_of? self return false unless value.instance_of? Hash true end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
223 224 225 226 227 228 229 230 231 232 233 |
# File 'lib/mist_api/models/webhook_location_asset_event.rb', line 223 def inspect class_name = self.class.name.split('::').last "<#{class_name} battery_voltage: #{@battery_voltage.inspect}, eddystone_uid_instance:"\ " #{@eddystone_uid_instance.inspect}, eddystone_uid_namespace:"\ " #{@eddystone_uid_namespace.inspect}, eddystone_url_url: #{@eddystone_url_url.inspect},"\ " ibeacon_major: #{@ibeacon_major.inspect}, ibeacon_minor: #{@ibeacon_minor.inspect},"\ " ibeacon_uuid: #{@ibeacon_uuid.inspect}, mac: #{@mac.inspect}, map_id: #{@map_id.inspect},"\ " mfg_company_id: #{@mfg_company_id.inspect}, mfg_data: #{@mfg_data.inspect}, site_id:"\ " #{@site_id.inspect}, timestamp: #{@timestamp.inspect}, type: #{@type.inspect}, x:"\ " #{@x.inspect}, y: #{@y.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
212 213 214 215 216 217 218 219 220 |
# File 'lib/mist_api/models/webhook_location_asset_event.rb', line 212 def to_s class_name = self.class.name.split('::').last "<#{class_name} battery_voltage: #{@battery_voltage}, eddystone_uid_instance:"\ " #{@eddystone_uid_instance}, eddystone_uid_namespace: #{@eddystone_uid_namespace},"\ " eddystone_url_url: #{@eddystone_url_url}, ibeacon_major: #{@ibeacon_major}, ibeacon_minor:"\ " #{@ibeacon_minor}, ibeacon_uuid: #{@ibeacon_uuid}, mac: #{@mac}, map_id: #{@map_id},"\ " mfg_company_id: #{@mfg_company_id}, mfg_data: #{@mfg_data}, site_id: #{@site_id},"\ " timestamp: #{@timestamp}, type: #{@type}, x: #{@x}, y: #{@y}>" end |