Class: MistApi::StatsApBle

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/mist_api/models/stats_ap_ble.rb

Overview

StatsApBle Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json

Constructor Details

#initialize(beacon_enabled = SKIP, beacon_rate = SKIP, eddystone_uid_enabled = SKIP, eddystone_uid_freq_msec = SKIP, eddystone_uid_instance = SKIP, eddystone_uid_namespace = SKIP, eddystone_url_enabled = SKIP, eddystone_url_freq_msec = SKIP, eddystone_url_url = SKIP, ibeacon_enabled = SKIP, ibeacon_freq_msec = SKIP, ibeacon_major = SKIP, ibeacon_minor = SKIP, ibeacon_uuid = SKIP, major = SKIP, minors = SKIP, power = SKIP, rx_bytes = SKIP, rx_pkts = SKIP, tx_bytes = SKIP, tx_pkts = SKIP, tx_resets = SKIP, uuid = SKIP) ⇒ StatsApBle

Returns a new instance of StatsApBle.



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
# File 'lib/mist_api/models/stats_ap_ble.rb', line 190

def initialize(beacon_enabled = SKIP, beacon_rate = SKIP,
               eddystone_uid_enabled = SKIP, eddystone_uid_freq_msec = SKIP,
               eddystone_uid_instance = SKIP,
               eddystone_uid_namespace = SKIP, eddystone_url_enabled = SKIP,
               eddystone_url_freq_msec = SKIP, eddystone_url_url = SKIP,
               ibeacon_enabled = SKIP, ibeacon_freq_msec = SKIP,
               ibeacon_major = SKIP, ibeacon_minor = SKIP,
               ibeacon_uuid = SKIP, major = SKIP, minors = SKIP,
               power = SKIP, rx_bytes = SKIP, rx_pkts = SKIP,
               tx_bytes = SKIP, tx_pkts = SKIP, tx_resets = SKIP,
               uuid = SKIP)
  @beacon_enabled = beacon_enabled unless beacon_enabled == SKIP
  @beacon_rate = beacon_rate unless beacon_rate == SKIP
  @eddystone_uid_enabled = eddystone_uid_enabled unless eddystone_uid_enabled == SKIP
  @eddystone_uid_freq_msec = eddystone_uid_freq_msec unless eddystone_uid_freq_msec == 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_enabled = eddystone_url_enabled unless eddystone_url_enabled == SKIP
  @eddystone_url_freq_msec = eddystone_url_freq_msec unless eddystone_url_freq_msec == SKIP
  @eddystone_url_url = eddystone_url_url unless eddystone_url_url == SKIP
  @ibeacon_enabled = ibeacon_enabled unless ibeacon_enabled == SKIP
  @ibeacon_freq_msec = ibeacon_freq_msec unless ibeacon_freq_msec == 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
  @major = major unless major == SKIP
  @minors = minors unless minors == SKIP
  @power = power unless power == SKIP
  @rx_bytes = rx_bytes unless rx_bytes == SKIP
  @rx_pkts = rx_pkts unless rx_pkts == SKIP
  @tx_bytes = tx_bytes unless tx_bytes == SKIP
  @tx_pkts = tx_pkts unless tx_pkts == SKIP
  @tx_resets = tx_resets unless tx_resets == SKIP
  @uuid = uuid unless uuid == SKIP
end

Instance Attribute Details

#beacon_enabledTrueClass | FalseClass

TODO: Write general description for this method

Returns:

  • (TrueClass | FalseClass)


14
15
16
# File 'lib/mist_api/models/stats_ap_ble.rb', line 14

def beacon_enabled
  @beacon_enabled
end

#beacon_rateInteger

TODO: Write general description for this method

Returns:

  • (Integer)


18
19
20
# File 'lib/mist_api/models/stats_ap_ble.rb', line 18

def beacon_rate
  @beacon_rate
end

#eddystone_uid_enabledTrueClass | FalseClass

TODO: Write general description for this method

Returns:

  • (TrueClass | FalseClass)


22
23
24
# File 'lib/mist_api/models/stats_ap_ble.rb', line 22

def eddystone_uid_enabled
  @eddystone_uid_enabled
end

#eddystone_uid_freq_msecInteger

TODO: Write general description for this method

Returns:

  • (Integer)


26
27
28
# File 'lib/mist_api/models/stats_ap_ble.rb', line 26

def eddystone_uid_freq_msec
  @eddystone_uid_freq_msec
end

#eddystone_uid_instanceString

TODO: Write general description for this method

Returns:

  • (String)


30
31
32
# File 'lib/mist_api/models/stats_ap_ble.rb', line 30

def eddystone_uid_instance
  @eddystone_uid_instance
end

#eddystone_uid_namespaceString

TODO: Write general description for this method

Returns:

  • (String)


34
35
36
# File 'lib/mist_api/models/stats_ap_ble.rb', line 34

def eddystone_uid_namespace
  @eddystone_uid_namespace
end

#eddystone_url_enabledTrueClass | FalseClass

TODO: Write general description for this method

Returns:

  • (TrueClass | FalseClass)


38
39
40
# File 'lib/mist_api/models/stats_ap_ble.rb', line 38

def eddystone_url_enabled
  @eddystone_url_enabled
end

#eddystone_url_freq_msecInteger

Frequency (msec) of data emit by Eddystone-UID beacon

Returns:

  • (Integer)


42
43
44
# File 'lib/mist_api/models/stats_ap_ble.rb', line 42

def eddystone_url_freq_msec
  @eddystone_url_freq_msec
end

#eddystone_url_urlString

Frequency (msec) of data emit by Eddystone-UID beacon

Returns:

  • (String)


46
47
48
# File 'lib/mist_api/models/stats_ap_ble.rb', line 46

def eddystone_url_url
  @eddystone_url_url
end

#ibeacon_enabledTrueClass | FalseClass

Frequency (msec) of data emit by Eddystone-UID beacon

Returns:

  • (TrueClass | FalseClass)


50
51
52
# File 'lib/mist_api/models/stats_ap_ble.rb', line 50

def ibeacon_enabled
  @ibeacon_enabled
end

#ibeacon_freq_msecInteger

Frequency (msec) of data emit by Eddystone-UID beacon

Returns:

  • (Integer)


54
55
56
# File 'lib/mist_api/models/stats_ap_ble.rb', line 54

def ibeacon_freq_msec
  @ibeacon_freq_msec
end

#ibeacon_majorInteger

Major number for iBeacon

Returns:

  • (Integer)


58
59
60
# File 'lib/mist_api/models/stats_ap_ble.rb', line 58

def ibeacon_major
  @ibeacon_major
end

#ibeacon_minorInteger

Minor number for iBeacon

Returns:

  • (Integer)


62
63
64
# File 'lib/mist_api/models/stats_ap_ble.rb', line 62

def ibeacon_minor
  @ibeacon_minor
end

#ibeacon_uuidUUID | String

Minor number for iBeacon

Returns:

  • (UUID | String)


66
67
68
# File 'lib/mist_api/models/stats_ap_ble.rb', line 66

def ibeacon_uuid
  @ibeacon_uuid
end

#majorInteger

Minor number for iBeacon

Returns:

  • (Integer)


70
71
72
# File 'lib/mist_api/models/stats_ap_ble.rb', line 70

def major
  @major
end

#minorsArray[Integer]

Minor number for iBeacon

Returns:

  • (Array[Integer])


74
75
76
# File 'lib/mist_api/models/stats_ap_ble.rb', line 74

def minors
  @minors
end

#powerInteger

Minor number for iBeacon

Returns:

  • (Integer)


78
79
80
# File 'lib/mist_api/models/stats_ap_ble.rb', line 78

def power
  @power
end

#rx_bytesInteger

Amount of traffic received since connection

Returns:

  • (Integer)


82
83
84
# File 'lib/mist_api/models/stats_ap_ble.rb', line 82

def rx_bytes
  @rx_bytes
end

#rx_pktsInteger

Amount of packets received since connection

Returns:

  • (Integer)


86
87
88
# File 'lib/mist_api/models/stats_ap_ble.rb', line 86

def rx_pkts
  @rx_pkts
end

#tx_bytesInteger

Amount of traffic sent since connection

Returns:

  • (Integer)


90
91
92
# File 'lib/mist_api/models/stats_ap_ble.rb', line 90

def tx_bytes
  @tx_bytes
end

#tx_pktsInteger

Amount of packets sent since connection

Returns:

  • (Integer)


94
95
96
# File 'lib/mist_api/models/stats_ap_ble.rb', line 94

def tx_pkts
  @tx_pkts
end

#tx_resetsInteger

Resets due to tx hung

Returns:

  • (Integer)


98
99
100
# File 'lib/mist_api/models/stats_ap_ble.rb', line 98

def tx_resets
  @tx_resets
end

#uuidUUID | String

Resets due to tx hung

Returns:

  • (UUID | String)


102
103
104
# File 'lib/mist_api/models/stats_ap_ble.rb', line 102

def uuid
  @uuid
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



227
228
229
230
231
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
# File 'lib/mist_api/models/stats_ap_ble.rb', line 227

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  beacon_enabled =
    hash.key?('beacon_enabled') ? hash['beacon_enabled'] : SKIP
  beacon_rate = hash.key?('beacon_rate') ? hash['beacon_rate'] : SKIP
  eddystone_uid_enabled =
    hash.key?('eddystone_uid_enabled') ? hash['eddystone_uid_enabled'] : SKIP
  eddystone_uid_freq_msec =
    hash.key?('eddystone_uid_freq_msec') ? hash['eddystone_uid_freq_msec'] : 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_enabled =
    hash.key?('eddystone_url_enabled') ? hash['eddystone_url_enabled'] : SKIP
  eddystone_url_freq_msec =
    hash.key?('eddystone_url_freq_msec') ? hash['eddystone_url_freq_msec'] : SKIP
  eddystone_url_url =
    hash.key?('eddystone_url_url') ? hash['eddystone_url_url'] : SKIP
  ibeacon_enabled =
    hash.key?('ibeacon_enabled') ? hash['ibeacon_enabled'] : SKIP
  ibeacon_freq_msec =
    hash.key?('ibeacon_freq_msec') ? hash['ibeacon_freq_msec'] : 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
  major = hash.key?('major') ? hash['major'] : SKIP
  minors = hash.key?('minors') ? hash['minors'] : SKIP
  power = hash.key?('power') ? hash['power'] : SKIP
  rx_bytes = hash.key?('rx_bytes') ? hash['rx_bytes'] : SKIP
  rx_pkts = hash.key?('rx_pkts') ? hash['rx_pkts'] : SKIP
  tx_bytes = hash.key?('tx_bytes') ? hash['tx_bytes'] : SKIP
  tx_pkts = hash.key?('tx_pkts') ? hash['tx_pkts'] : SKIP
  tx_resets = hash.key?('tx_resets') ? hash['tx_resets'] : SKIP
  uuid = hash.key?('uuid') ? hash['uuid'] : SKIP

  # Create object from extracted values.
  StatsApBle.new(beacon_enabled,
                 beacon_rate,
                 eddystone_uid_enabled,
                 eddystone_uid_freq_msec,
                 eddystone_uid_instance,
                 eddystone_uid_namespace,
                 eddystone_url_enabled,
                 eddystone_url_freq_msec,
                 eddystone_url_url,
                 ibeacon_enabled,
                 ibeacon_freq_msec,
                 ibeacon_major,
                 ibeacon_minor,
                 ibeacon_uuid,
                 major,
                 minors,
                 power,
                 rx_bytes,
                 rx_pkts,
                 tx_bytes,
                 tx_pkts,
                 tx_resets,
                 uuid)
end

.namesObject

A mapping from model property names to API property names.



105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# File 'lib/mist_api/models/stats_ap_ble.rb', line 105

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['beacon_enabled'] = 'beacon_enabled'
  @_hash['beacon_rate'] = 'beacon_rate'
  @_hash['eddystone_uid_enabled'] = 'eddystone_uid_enabled'
  @_hash['eddystone_uid_freq_msec'] = 'eddystone_uid_freq_msec'
  @_hash['eddystone_uid_instance'] = 'eddystone_uid_instance'
  @_hash['eddystone_uid_namespace'] = 'eddystone_uid_namespace'
  @_hash['eddystone_url_enabled'] = 'eddystone_url_enabled'
  @_hash['eddystone_url_freq_msec'] = 'eddystone_url_freq_msec'
  @_hash['eddystone_url_url'] = 'eddystone_url_url'
  @_hash['ibeacon_enabled'] = 'ibeacon_enabled'
  @_hash['ibeacon_freq_msec'] = 'ibeacon_freq_msec'
  @_hash['ibeacon_major'] = 'ibeacon_major'
  @_hash['ibeacon_minor'] = 'ibeacon_minor'
  @_hash['ibeacon_uuid'] = 'ibeacon_uuid'
  @_hash['major'] = 'major'
  @_hash['minors'] = 'minors'
  @_hash['power'] = 'power'
  @_hash['rx_bytes'] = 'rx_bytes'
  @_hash['rx_pkts'] = 'rx_pkts'
  @_hash['tx_bytes'] = 'tx_bytes'
  @_hash['tx_pkts'] = 'tx_pkts'
  @_hash['tx_resets'] = 'tx_resets'
  @_hash['uuid'] = 'uuid'
  @_hash
end

.nullablesObject

An array for nullable fields



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
# File 'lib/mist_api/models/stats_ap_ble.rb', line 163

def self.nullables
  %w[
    beacon_enabled
    beacon_rate
    eddystone_uid_enabled
    eddystone_uid_freq_msec
    eddystone_uid_instance
    eddystone_uid_namespace
    eddystone_url_enabled
    eddystone_url_freq_msec
    eddystone_url_url
    ibeacon_enabled
    ibeacon_freq_msec
    ibeacon_major
    ibeacon_minor
    ibeacon_uuid
    major
    power
    rx_bytes
    rx_pkts
    tx_bytes
    tx_pkts
    tx_resets
    uuid
  ]
end

.optionalsObject

An array for optional fields



134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
# File 'lib/mist_api/models/stats_ap_ble.rb', line 134

def self.optionals
  %w[
    beacon_enabled
    beacon_rate
    eddystone_uid_enabled
    eddystone_uid_freq_msec
    eddystone_uid_instance
    eddystone_uid_namespace
    eddystone_url_enabled
    eddystone_url_freq_msec
    eddystone_url_url
    ibeacon_enabled
    ibeacon_freq_msec
    ibeacon_major
    ibeacon_minor
    ibeacon_uuid
    major
    minors
    power
    rx_bytes
    rx_pkts
    tx_bytes
    tx_pkts
    tx_resets
    uuid
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
# File 'lib/mist_api/models/stats_ap_ble.rb', line 307

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} beacon_enabled: #{@beacon_enabled.inspect}, beacon_rate:"\
  " #{@beacon_rate.inspect}, eddystone_uid_enabled: #{@eddystone_uid_enabled.inspect},"\
  " eddystone_uid_freq_msec: #{@eddystone_uid_freq_msec.inspect}, eddystone_uid_instance:"\
  " #{@eddystone_uid_instance.inspect}, eddystone_uid_namespace:"\
  " #{@eddystone_uid_namespace.inspect}, eddystone_url_enabled:"\
  " #{@eddystone_url_enabled.inspect}, eddystone_url_freq_msec:"\
  " #{@eddystone_url_freq_msec.inspect}, eddystone_url_url: #{@eddystone_url_url.inspect},"\
  " ibeacon_enabled: #{@ibeacon_enabled.inspect}, ibeacon_freq_msec:"\
  " #{@ibeacon_freq_msec.inspect}, ibeacon_major: #{@ibeacon_major.inspect}, ibeacon_minor:"\
  " #{@ibeacon_minor.inspect}, ibeacon_uuid: #{@ibeacon_uuid.inspect}, major:"\
  " #{@major.inspect}, minors: #{@minors.inspect}, power: #{@power.inspect}, rx_bytes:"\
  " #{@rx_bytes.inspect}, rx_pkts: #{@rx_pkts.inspect}, tx_bytes: #{@tx_bytes.inspect},"\
  " tx_pkts: #{@tx_pkts.inspect}, tx_resets: #{@tx_resets.inspect}, uuid: #{@uuid.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



292
293
294
295
296
297
298
299
300
301
302
303
304
# File 'lib/mist_api/models/stats_ap_ble.rb', line 292

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} beacon_enabled: #{@beacon_enabled}, beacon_rate: #{@beacon_rate},"\
  " eddystone_uid_enabled: #{@eddystone_uid_enabled}, eddystone_uid_freq_msec:"\
  " #{@eddystone_uid_freq_msec}, eddystone_uid_instance: #{@eddystone_uid_instance},"\
  " eddystone_uid_namespace: #{@eddystone_uid_namespace}, eddystone_url_enabled:"\
  " #{@eddystone_url_enabled}, eddystone_url_freq_msec: #{@eddystone_url_freq_msec},"\
  " eddystone_url_url: #{@eddystone_url_url}, ibeacon_enabled: #{@ibeacon_enabled},"\
  " ibeacon_freq_msec: #{@ibeacon_freq_msec}, ibeacon_major: #{@ibeacon_major}, ibeacon_minor:"\
  " #{@ibeacon_minor}, ibeacon_uuid: #{@ibeacon_uuid}, major: #{@major}, minors: #{@minors},"\
  " power: #{@power}, rx_bytes: #{@rx_bytes}, rx_pkts: #{@rx_pkts}, tx_bytes: #{@tx_bytes},"\
  " tx_pkts: #{@tx_pkts}, tx_resets: #{@tx_resets}, uuid: #{@uuid}>"
end