Class: MistApi::StatsWirelessClient

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

Overview

StatsWirelessClient 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(ap_id = nil, ap_mac = nil, band = nil, channel = nil, is_guest = false, key_mgmt = nil, mac = nil, proto = nil, rssi = nil, snr = nil, ssid = nil, wlan_id = nil, accuracy = SKIP, airespace_ifname = SKIP, airwatch = SKIP, annotation = SKIP, assoc_time = SKIP, bssid = SKIP, dual_band = SKIP, family = SKIP, group = SKIP, guest = SKIP, hostname = SKIP, idle_time = SKIP, ip = SKIP, last_seen = SKIP, manufacture = SKIP, map_id = SKIP, model = SKIP, num_locating_aps = SKIP, os = SKIP, power_saving = SKIP, psk_id = SKIP, rssizones = SKIP, rx_bps = SKIP, rx_bytes = SKIP, rx_pkts = SKIP, rx_rate = SKIP, rx_retries = SKIP, site_id = SKIP, tx_bps = SKIP, tx_bytes = SKIP, tx_pkts = SKIP, tx_rate = SKIP, tx_retries = SKIP, type = SKIP, uptime = SKIP, username = SKIP, vbeacons = SKIP, vlan_id = SKIP, wxrule_id = SKIP, wxrule_usage = SKIP, x = SKIP, x_m = SKIP, y = SKIP, y_m = SKIP, zones = SKIP, additional_properties = nil) ⇒ StatsWirelessClient

Returns a new instance of StatsWirelessClient.



379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
# File 'lib/mist_api/models/stats_wireless_client.rb', line 379

def initialize(ap_id = nil, ap_mac = nil, band = nil, channel = nil,
               is_guest = false, key_mgmt = nil, mac = nil, proto = nil,
               rssi = nil, snr = nil, ssid = nil, wlan_id = nil,
               accuracy = SKIP, airespace_ifname = SKIP, airwatch = SKIP,
               annotation = SKIP, assoc_time = SKIP, bssid = SKIP,
               dual_band = SKIP, family = SKIP, group = SKIP, guest = SKIP,
               hostname = SKIP, idle_time = SKIP, ip = SKIP,
               last_seen = SKIP, manufacture = SKIP, map_id = SKIP,
               model = SKIP, num_locating_aps = SKIP, os = SKIP,
               power_saving = SKIP, psk_id = SKIP, rssizones = SKIP,
               rx_bps = SKIP, rx_bytes = SKIP, rx_pkts = SKIP,
               rx_rate = SKIP, rx_retries = SKIP, site_id = SKIP,
               tx_bps = SKIP, tx_bytes = SKIP, tx_pkts = SKIP,
               tx_rate = SKIP, tx_retries = SKIP, type = SKIP,
               uptime = SKIP, username = SKIP, vbeacons = SKIP,
               vlan_id = SKIP, wxrule_id = SKIP, wxrule_usage = SKIP,
               x = SKIP, x_m = SKIP, y = SKIP, y_m = SKIP, zones = SKIP,
               additional_properties = nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @accuracy = accuracy unless accuracy == SKIP
  @airespace_ifname = airespace_ifname unless airespace_ifname == SKIP
  @airwatch = airwatch unless airwatch == SKIP
  @annotation = annotation unless annotation == SKIP
  @ap_id = ap_id
  @ap_mac = ap_mac
  @assoc_time = assoc_time unless assoc_time == SKIP
  @band = band
  @bssid = bssid unless bssid == SKIP
  @channel = channel
  @dual_band = dual_band unless dual_band == SKIP
  @family = family unless family == SKIP
  @group = group unless group == SKIP
  @guest = guest unless guest == SKIP
  @hostname = hostname unless hostname == SKIP
  @idle_time = idle_time unless idle_time == SKIP
  @ip = ip unless ip == SKIP
  @is_guest = is_guest
  @key_mgmt = key_mgmt
  @last_seen = last_seen unless last_seen == SKIP
  @mac = mac
  @manufacture = manufacture unless manufacture == SKIP
  @map_id = map_id unless map_id == SKIP
  @model = model unless model == SKIP
  @num_locating_aps = num_locating_aps unless num_locating_aps == SKIP
  @os = os unless os == SKIP
  @power_saving = power_saving unless power_saving == SKIP
  @proto = proto
  @psk_id = psk_id unless psk_id == SKIP
  @rssi = rssi
  @rssizones = rssizones unless rssizones == SKIP
  @rx_bps = rx_bps unless rx_bps == SKIP
  @rx_bytes = rx_bytes unless rx_bytes == SKIP
  @rx_pkts = rx_pkts unless rx_pkts == SKIP
  @rx_rate = rx_rate unless rx_rate == SKIP
  @rx_retries = rx_retries unless rx_retries == SKIP
  @site_id = site_id unless site_id == SKIP
  @snr = snr
  @ssid = ssid
  @tx_bps = tx_bps unless tx_bps == SKIP
  @tx_bytes = tx_bytes unless tx_bytes == SKIP
  @tx_pkts = tx_pkts unless tx_pkts == SKIP
  @tx_rate = tx_rate unless tx_rate == SKIP
  @tx_retries = tx_retries unless tx_retries == SKIP
  @type = type unless type == SKIP
  @uptime = uptime unless uptime == SKIP
  @username = username unless username == SKIP
  @vbeacons = vbeacons unless vbeacons == SKIP
  @vlan_id = vlan_id unless vlan_id == SKIP
  @wlan_id = wlan_id
  @wxrule_id = wxrule_id unless wxrule_id == SKIP
  @wxrule_usage = wxrule_usage unless wxrule_usage == SKIP
  @x = x unless x == SKIP
  @x_m = x_m unless x_m == SKIP
  @y = y unless y == SKIP
  @y_m = y_m unless y_m == SKIP
  @zones = zones unless zones == SKIP
  @additional_properties = additional_properties
end

Instance Attribute Details

#accuracyInteger

Estimated client location accuracy, in meter

Returns:

  • (Integer)


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

def accuracy
  @accuracy
end

#airespace_ifnameString

Estimated client location accuracy, in meter

Returns:

  • (String)


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

def airespace_ifname
  @airespace_ifname
end

#airwatchStatsWirelessClientAirwatch

Information if airwatch enabled



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

def airwatch
  @airwatch
end

#annotationString

Information if airwatch enabled

Returns:

  • (String)


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

def annotation
  @annotation
end

#ap_idUUID | String

AP ID the client is connected to

Returns:

  • (UUID | String)


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

def ap_id
  @ap_id
end

#ap_macString

AP the client is connected to

Returns:

  • (String)


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

def ap_mac
  @ap_mac
end

#assoc_timeInteger

AP the client is connected to

Returns:

  • (Integer)


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

def assoc_time
  @assoc_time
end

#bandDot11BandEnum

enum: ‘24`, `5`, `5-dedicated`, `5-selectable`, `6`, `6-dedicated`, `6-selectable`

Returns:



43
44
45
# File 'lib/mist_api/models/stats_wireless_client.rb', line 43

def band
  @band
end

#bssidString

enum: ‘24`, `5`, `5-dedicated`, `5-selectable`, `6`, `6-dedicated`, `6-selectable`

Returns:

  • (String)


48
49
50
# File 'lib/mist_api/models/stats_wireless_client.rb', line 48

def bssid
  @bssid
end

#channelInteger

Current channel

Returns:

  • (Integer)


52
53
54
# File 'lib/mist_api/models/stats_wireless_client.rb', line 52

def channel
  @channel
end

#dual_bandTrueClass | FalseClass

Whether the client is dual_band capable (determined by whether we’ve seen probe requests from both bands)

Returns:

  • (TrueClass | FalseClass)


57
58
59
# File 'lib/mist_api/models/stats_wireless_client.rb', line 57

def dual_band
  @dual_band
end

#familyString

Device family, through fingerprinting. iPod / Nexus Galaxy / Windows Mobile or CE …

Returns:

  • (String)


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

def family
  @family
end

#groupString

Device family, through fingerprinting. iPod / Nexus Galaxy / Windows Mobile or CE …

Returns:

  • (String)


67
68
69
# File 'lib/mist_api/models/stats_wireless_client.rb', line 67

def group
  @group
end

#guestGuest

Guest

Returns:



71
72
73
# File 'lib/mist_api/models/stats_wireless_client.rb', line 71

def guest
  @guest
end

#hostnameString

Hostname that we learned from sniffing DHCP

Returns:

  • (String)


75
76
77
# File 'lib/mist_api/models/stats_wireless_client.rb', line 75

def hostname
  @hostname
end

#idle_timeFloat

How long, in seconds, has the client been idle (since the last RX packet)

Returns:

  • (Float)


79
80
81
# File 'lib/mist_api/models/stats_wireless_client.rb', line 79

def idle_time
  @idle_time
end

#ipString

How long, in seconds, has the client been idle (since the last RX packet)

Returns:

  • (String)


83
84
85
# File 'lib/mist_api/models/stats_wireless_client.rb', line 83

def ip
  @ip
end

#is_guestTrueClass | FalseClass

Whether this is a guest

Returns:

  • (TrueClass | FalseClass)


87
88
89
# File 'lib/mist_api/models/stats_wireless_client.rb', line 87

def is_guest
  @is_guest
end

#key_mgmtString

E.g. WPA2-PSK/CCMP

Returns:

  • (String)


91
92
93
# File 'lib/mist_api/models/stats_wireless_client.rb', line 91

def key_mgmt
  @key_mgmt
end

#last_seenFloat

Last seen timestamp

Returns:

  • (Float)


95
96
97
# File 'lib/mist_api/models/stats_wireless_client.rb', line 95

def last_seen
  @last_seen
end

#macString

Client mac

Returns:

  • (String)


99
100
101
# File 'lib/mist_api/models/stats_wireless_client.rb', line 99

def mac
  @mac
end

#manufactureString

Device manufacture, through fingerprinting or OUI

Returns:

  • (String)


103
104
105
# File 'lib/mist_api/models/stats_wireless_client.rb', line 103

def manufacture
  @manufacture
end

#map_idUUID | String

Estimated client location - map_id

Returns:

  • (UUID | String)


107
108
109
# File 'lib/mist_api/models/stats_wireless_client.rb', line 107

def map_id
  @map_id
end

#modelString

Device model, may be available if we can identify them

Returns:

  • (String)


111
112
113
# File 'lib/mist_api/models/stats_wireless_client.rb', line 111

def model
  @model
end

#num_locating_apsInteger

Number of APs used to locate this client

Returns:

  • (Integer)


115
116
117
# File 'lib/mist_api/models/stats_wireless_client.rb', line 115

def num_locating_aps
  @num_locating_aps
end

#osString

Device os, through fingerprinting

Returns:

  • (String)


119
120
121
# File 'lib/mist_api/models/stats_wireless_client.rb', line 119

def os
  @os
end

#power_savingTrueClass | FalseClass

If it’s currently in power-save mode

Returns:

  • (TrueClass | FalseClass)


123
124
125
# File 'lib/mist_api/models/stats_wireless_client.rb', line 123

def power_saving
  @power_saving
end

#protoDot11ProtoEnum

enum: ‘a`, `ac`, `ax`, `b`, `be`, `g`, `n`

Returns:



127
128
129
# File 'lib/mist_api/models/stats_wireless_client.rb', line 127

def proto
  @proto
end

#psk_idUUID | String

PSK id (if multi-psk is used)

Returns:

  • (UUID | String)


131
132
133
# File 'lib/mist_api/models/stats_wireless_client.rb', line 131

def psk_id
  @psk_id
end

#rssiFloat

Signal strength

Returns:

  • (Float)


135
136
137
# File 'lib/mist_api/models/stats_wireless_client.rb', line 135

def rssi
  @rssi
end

#rssizonesArray[StatsWirelessClientRssiZone]

List of rssizone_id’s where client is in and since when (if known)

Returns:



139
140
141
# File 'lib/mist_api/models/stats_wireless_client.rb', line 139

def rssizones
  @rssizones
end

#rx_bpsInteger

Rate of receiving traffic, bits/seconds, last known

Returns:

  • (Integer)


143
144
145
# File 'lib/mist_api/models/stats_wireless_client.rb', line 143

def rx_bps
  @rx_bps
end

#rx_bytesInteger

Amount of traffic received since connection

Returns:

  • (Integer)


147
148
149
# File 'lib/mist_api/models/stats_wireless_client.rb', line 147

def rx_bytes
  @rx_bytes
end

#rx_pktsInteger

Amount of packets received since connection

Returns:

  • (Integer)


151
152
153
# File 'lib/mist_api/models/stats_wireless_client.rb', line 151

def rx_pkts
  @rx_pkts
end

#rx_rateFloat

RX Rate, Mbps

Returns:

  • (Float)


155
156
157
# File 'lib/mist_api/models/stats_wireless_client.rb', line 155

def rx_rate
  @rx_rate
end

#rx_retriesInteger

Amount of rx retries

Returns:

  • (Integer)


159
160
161
# File 'lib/mist_api/models/stats_wireless_client.rb', line 159

def rx_retries
  @rx_retries
end

#site_idUUID | String

Amount of rx retries

Returns:

  • (UUID | String)


163
164
165
# File 'lib/mist_api/models/stats_wireless_client.rb', line 163

def site_id
  @site_id
end

#snrFloat

Signal over noise

Returns:

  • (Float)


167
168
169
# File 'lib/mist_api/models/stats_wireless_client.rb', line 167

def snr
  @snr
end

#ssidString

SSID the client is connected to

Returns:

  • (String)


171
172
173
# File 'lib/mist_api/models/stats_wireless_client.rb', line 171

def ssid
  @ssid
end

#tx_bpsInteger

Rate of transmitting traffic, bits/seconds, last known

Returns:

  • (Integer)


175
176
177
# File 'lib/mist_api/models/stats_wireless_client.rb', line 175

def tx_bps
  @tx_bps
end

#tx_bytesInteger

Amount of traffic sent since connection

Returns:

  • (Integer)


179
180
181
# File 'lib/mist_api/models/stats_wireless_client.rb', line 179

def tx_bytes
  @tx_bytes
end

#tx_pktsInteger

Amount of packets sent since connection

Returns:

  • (Integer)


183
184
185
# File 'lib/mist_api/models/stats_wireless_client.rb', line 183

def tx_pkts
  @tx_pkts
end

#tx_rateFloat

TX Rate, Mbps

Returns:

  • (Float)


187
188
189
# File 'lib/mist_api/models/stats_wireless_client.rb', line 187

def tx_rate
  @tx_rate
end

#tx_retriesInteger

Amount of tx retries

Returns:

  • (Integer)


191
192
193
# File 'lib/mist_api/models/stats_wireless_client.rb', line 191

def tx_retries
  @tx_retries
end

#typeString

Client’s type, regular / vip / resource / blocked (if client object is created)

Returns:

  • (String)


196
197
198
# File 'lib/mist_api/models/stats_wireless_client.rb', line 196

def type
  @type
end

#uptimeFloat

How long, in seconds, has the client been connected

Returns:

  • (Float)


200
201
202
# File 'lib/mist_api/models/stats_wireless_client.rb', line 200

def uptime
  @uptime
end

#usernameString

Username that we learned from 802.1X exchange or Per_user PSK or User Portal

Returns:

  • (String)


205
206
207
# File 'lib/mist_api/models/stats_wireless_client.rb', line 205

def username
  @username
end

#vbeaconsArray[StatsWirelessClientVbeacon]

List of beacon_id’s where the client is in and since when (if known)

Returns:



209
210
211
# File 'lib/mist_api/models/stats_wireless_client.rb', line 209

def vbeacons
  @vbeacons
end

#vlan_idString

VLAN id, could be empty (from older AP)

Returns:

  • (String)


213
214
215
# File 'lib/mist_api/models/stats_wireless_client.rb', line 213

def vlan_id
  @vlan_id
end

#wlan_idUUID | String

WLAN ID the client is connected to

Returns:

  • (UUID | String)


217
218
219
# File 'lib/mist_api/models/stats_wireless_client.rb', line 217

def wlan_id
  @wlan_id
end

#wxrule_idUUID | String

Current WxlanRule using for a Client or an authorized Guest (portal user). null if default rule is matched.

Returns:

  • (UUID | String)


222
223
224
# File 'lib/mist_api/models/stats_wireless_client.rb', line 222

def wxrule_id
  @wxrule_id
end

#wxrule_usageArray[StatsWirelessClientWxruleUsage]

Current WxlanRule usage per tag_id

Returns:



226
227
228
# File 'lib/mist_api/models/stats_wireless_client.rb', line 226

def wxrule_usage
  @wxrule_usage
end

#xFloat

Estimated client location in pixels

Returns:

  • (Float)


230
231
232
# File 'lib/mist_api/models/stats_wireless_client.rb', line 230

def x
  @x
end

#x_mFloat

Estimated client location in meter

Returns:

  • (Float)


234
235
236
# File 'lib/mist_api/models/stats_wireless_client.rb', line 234

def x_m
  @x_m
end

#yFloat

Estimated client location in pixels

Returns:

  • (Float)


238
239
240
# File 'lib/mist_api/models/stats_wireless_client.rb', line 238

def y
  @y
end

#y_mFloat

Estimated client location in meter

Returns:

  • (Float)


242
243
244
# File 'lib/mist_api/models/stats_wireless_client.rb', line 242

def y_m
  @y_m
end

#zonesArray[StatsWirelessClientZone]

List of zone_id’s where client is in and since when (if known)

Returns:



246
247
248
# File 'lib/mist_api/models/stats_wireless_client.rb', line 246

def zones
  @zones
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
# File 'lib/mist_api/models/stats_wireless_client.rb', line 461

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  ap_id = hash.key?('ap_id') ? hash['ap_id'] : nil
  ap_mac = hash.key?('ap_mac') ? hash['ap_mac'] : nil
  band = hash.key?('band') ? hash['band'] : nil
  channel = hash.key?('channel') ? hash['channel'] : nil
  is_guest = hash['is_guest'] ||= false
  key_mgmt = hash.key?('key_mgmt') ? hash['key_mgmt'] : nil
  mac = hash.key?('mac') ? hash['mac'] : nil
  proto = hash.key?('proto') ? hash['proto'] : nil
  rssi = hash.key?('rssi') ? hash['rssi'] : nil
  snr = hash.key?('snr') ? hash['snr'] : nil
  ssid = hash.key?('ssid') ? hash['ssid'] : nil
  wlan_id = hash.key?('wlan_id') ? hash['wlan_id'] : nil
  accuracy = hash.key?('accuracy') ? hash['accuracy'] : SKIP
  airespace_ifname =
    hash.key?('airespace_ifname') ? hash['airespace_ifname'] : SKIP
  airwatch = StatsWirelessClientAirwatch.from_hash(hash['airwatch']) if hash['airwatch']
  annotation = hash.key?('annotation') ? hash['annotation'] : SKIP
  assoc_time = hash.key?('assoc_time') ? hash['assoc_time'] : SKIP
  bssid = hash.key?('bssid') ? hash['bssid'] : SKIP
  dual_band = hash.key?('dual_band') ? hash['dual_band'] : SKIP
  family = hash.key?('family') ? hash['family'] : SKIP
  group = hash.key?('group') ? hash['group'] : SKIP
  guest = Guest.from_hash(hash['guest']) if hash['guest']
  hostname = hash.key?('hostname') ? hash['hostname'] : SKIP
  idle_time = hash.key?('idle_time') ? hash['idle_time'] : SKIP
  ip = hash.key?('ip') ? hash['ip'] : SKIP
  last_seen = hash.key?('last_seen') ? hash['last_seen'] : SKIP
  manufacture = hash.key?('manufacture') ? hash['manufacture'] : SKIP
  map_id = hash.key?('map_id') ? hash['map_id'] : SKIP
  model = hash.key?('model') ? hash['model'] : SKIP
  num_locating_aps =
    hash.key?('num_locating_aps') ? hash['num_locating_aps'] : SKIP
  os = hash.key?('os') ? hash['os'] : SKIP
  power_saving = hash.key?('power_saving') ? hash['power_saving'] : SKIP
  psk_id = hash.key?('psk_id') ? hash['psk_id'] : SKIP
  # Parameter is an array, so we need to iterate through it
  rssizones = nil
  unless hash['rssizones'].nil?
    rssizones = []
    hash['rssizones'].each do |structure|
      rssizones << (StatsWirelessClientRssiZone.from_hash(structure) if structure)
    end
  end

  rssizones = SKIP unless hash.key?('rssizones')
  rx_bps = hash.key?('rx_bps') ? hash['rx_bps'] : SKIP
  rx_bytes = hash.key?('rx_bytes') ? hash['rx_bytes'] : SKIP
  rx_pkts = hash.key?('rx_pkts') ? hash['rx_pkts'] : SKIP
  rx_rate = hash.key?('rx_rate') ? hash['rx_rate'] : SKIP
  rx_retries = hash.key?('rx_retries') ? hash['rx_retries'] : SKIP
  site_id = hash.key?('site_id') ? hash['site_id'] : SKIP
  tx_bps = hash.key?('tx_bps') ? hash['tx_bps'] : SKIP
  tx_bytes = hash.key?('tx_bytes') ? hash['tx_bytes'] : SKIP
  tx_pkts = hash.key?('tx_pkts') ? hash['tx_pkts'] : SKIP
  tx_rate = hash.key?('tx_rate') ? hash['tx_rate'] : SKIP
  tx_retries = hash.key?('tx_retries') ? hash['tx_retries'] : SKIP
  type = hash.key?('type') ? hash['type'] : SKIP
  uptime = hash.key?('uptime') ? hash['uptime'] : SKIP
  username = hash.key?('username') ? hash['username'] : SKIP
  # Parameter is an array, so we need to iterate through it
  vbeacons = nil
  unless hash['vbeacons'].nil?
    vbeacons = []
    hash['vbeacons'].each do |structure|
      vbeacons << (StatsWirelessClientVbeacon.from_hash(structure) if structure)
    end
  end

  vbeacons = SKIP unless hash.key?('vbeacons')
  vlan_id = hash.key?('vlan_id') ? hash['vlan_id'] : SKIP
  wxrule_id = hash.key?('wxrule_id') ? hash['wxrule_id'] : SKIP
  # Parameter is an array, so we need to iterate through it
  wxrule_usage = nil
  unless hash['wxrule_usage'].nil?
    wxrule_usage = []
    hash['wxrule_usage'].each do |structure|
      wxrule_usage << (StatsWirelessClientWxruleUsage.from_hash(structure) if structure)
    end
  end

  wxrule_usage = SKIP unless hash.key?('wxrule_usage')
  x = hash.key?('x') ? hash['x'] : SKIP
  x_m = hash.key?('x_m') ? hash['x_m'] : SKIP
  y = hash.key?('y') ? hash['y'] : SKIP
  y_m = hash.key?('y_m') ? hash['y_m'] : SKIP
  # Parameter is an array, so we need to iterate through it
  zones = nil
  unless hash['zones'].nil?
    zones = []
    hash['zones'].each do |structure|
      zones << (StatsWirelessClientZone.from_hash(structure) if structure)
    end
  end

  zones = SKIP unless hash.key?('zones')

  # Create a new hash for additional properties, removing known properties.
  new_hash = hash.reject { |k, _| names.value?(k) }

  additional_properties = APIHelper.get_additional_properties(
    new_hash, proc { |value| value }
  )

  # Create object from extracted values.
  StatsWirelessClient.new(ap_id,
                          ap_mac,
                          band,
                          channel,
                          is_guest,
                          key_mgmt,
                          mac,
                          proto,
                          rssi,
                          snr,
                          ssid,
                          wlan_id,
                          accuracy,
                          airespace_ifname,
                          airwatch,
                          annotation,
                          assoc_time,
                          bssid,
                          dual_band,
                          family,
                          group,
                          guest,
                          hostname,
                          idle_time,
                          ip,
                          last_seen,
                          manufacture,
                          map_id,
                          model,
                          num_locating_aps,
                          os,
                          power_saving,
                          psk_id,
                          rssizones,
                          rx_bps,
                          rx_bytes,
                          rx_pkts,
                          rx_rate,
                          rx_retries,
                          site_id,
                          tx_bps,
                          tx_bytes,
                          tx_pkts,
                          tx_rate,
                          tx_retries,
                          type,
                          uptime,
                          username,
                          vbeacons,
                          vlan_id,
                          wxrule_id,
                          wxrule_usage,
                          x,
                          x_m,
                          y,
                          y_m,
                          zones,
                          additional_properties)
end

.namesObject

A mapping from model property names to API property names.



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
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
# File 'lib/mist_api/models/stats_wireless_client.rb', line 249

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['accuracy'] = 'accuracy'
  @_hash['airespace_ifname'] = 'airespace_ifname'
  @_hash['airwatch'] = 'airwatch'
  @_hash['annotation'] = 'annotation'
  @_hash['ap_id'] = 'ap_id'
  @_hash['ap_mac'] = 'ap_mac'
  @_hash['assoc_time'] = 'assoc_time'
  @_hash['band'] = 'band'
  @_hash['bssid'] = 'bssid'
  @_hash['channel'] = 'channel'
  @_hash['dual_band'] = 'dual_band'
  @_hash['family'] = 'family'
  @_hash['group'] = 'group'
  @_hash['guest'] = 'guest'
  @_hash['hostname'] = 'hostname'
  @_hash['idle_time'] = 'idle_time'
  @_hash['ip'] = 'ip'
  @_hash['is_guest'] = 'is_guest'
  @_hash['key_mgmt'] = 'key_mgmt'
  @_hash['last_seen'] = 'last_seen'
  @_hash['mac'] = 'mac'
  @_hash['manufacture'] = 'manufacture'
  @_hash['map_id'] = 'map_id'
  @_hash['model'] = 'model'
  @_hash['num_locating_aps'] = 'num_locating_aps'
  @_hash['os'] = 'os'
  @_hash['power_saving'] = 'power_saving'
  @_hash['proto'] = 'proto'
  @_hash['psk_id'] = 'psk_id'
  @_hash['rssi'] = 'rssi'
  @_hash['rssizones'] = 'rssizones'
  @_hash['rx_bps'] = 'rx_bps'
  @_hash['rx_bytes'] = 'rx_bytes'
  @_hash['rx_pkts'] = 'rx_pkts'
  @_hash['rx_rate'] = 'rx_rate'
  @_hash['rx_retries'] = 'rx_retries'
  @_hash['site_id'] = 'site_id'
  @_hash['snr'] = 'snr'
  @_hash['ssid'] = 'ssid'
  @_hash['tx_bps'] = 'tx_bps'
  @_hash['tx_bytes'] = 'tx_bytes'
  @_hash['tx_pkts'] = 'tx_pkts'
  @_hash['tx_rate'] = 'tx_rate'
  @_hash['tx_retries'] = 'tx_retries'
  @_hash['type'] = 'type'
  @_hash['uptime'] = 'uptime'
  @_hash['username'] = 'username'
  @_hash['vbeacons'] = 'vbeacons'
  @_hash['vlan_id'] = 'vlan_id'
  @_hash['wlan_id'] = 'wlan_id'
  @_hash['wxrule_id'] = 'wxrule_id'
  @_hash['wxrule_usage'] = 'wxrule_usage'
  @_hash['x'] = 'x'
  @_hash['x_m'] = 'x_m'
  @_hash['y'] = 'y'
  @_hash['y_m'] = 'y_m'
  @_hash['zones'] = 'zones'
  @_hash
end

.nullablesObject

An array for nullable fields



363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
# File 'lib/mist_api/models/stats_wireless_client.rb', line 363

def self.nullables
  %w[
    last_seen
    rx_bps
    rx_bytes
    rx_pkts
    rx_rate
    rx_retries
    tx_bps
    tx_bytes
    tx_pkts
    tx_rate
    tx_retries
  ]
end

.optionalsObject

An array for optional fields



312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
# File 'lib/mist_api/models/stats_wireless_client.rb', line 312

def self.optionals
  %w[
    accuracy
    airespace_ifname
    airwatch
    annotation
    assoc_time
    bssid
    dual_band
    family
    group
    guest
    hostname
    idle_time
    ip
    last_seen
    manufacture
    map_id
    model
    num_locating_aps
    os
    power_saving
    psk_id
    rssizones
    rx_bps
    rx_bytes
    rx_pkts
    rx_rate
    rx_retries
    site_id
    tx_bps
    tx_bytes
    tx_pkts
    tx_rate
    tx_retries
    type
    uptime
    username
    vbeacons
    vlan_id
    wxrule_id
    wxrule_usage
    x
    x_m
    y
    y_m
    zones
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
# File 'lib/mist_api/models/stats_wireless_client.rb', line 651

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} accuracy: #{@accuracy.inspect}, airespace_ifname:"\
  " #{@airespace_ifname.inspect}, airwatch: #{@airwatch.inspect}, annotation:"\
  " #{@annotation.inspect}, ap_id: #{@ap_id.inspect}, ap_mac: #{@ap_mac.inspect}, assoc_time:"\
  " #{@assoc_time.inspect}, band: #{@band.inspect}, bssid: #{@bssid.inspect}, channel:"\
  " #{@channel.inspect}, dual_band: #{@dual_band.inspect}, family: #{@family.inspect}, group:"\
  " #{@group.inspect}, guest: #{@guest.inspect}, hostname: #{@hostname.inspect}, idle_time:"\
  " #{@idle_time.inspect}, ip: #{@ip.inspect}, is_guest: #{@is_guest.inspect}, key_mgmt:"\
  " #{@key_mgmt.inspect}, last_seen: #{@last_seen.inspect}, mac: #{@mac.inspect}, manufacture:"\
  " #{@manufacture.inspect}, map_id: #{@map_id.inspect}, model: #{@model.inspect},"\
  " num_locating_aps: #{@num_locating_aps.inspect}, os: #{@os.inspect}, power_saving:"\
  " #{@power_saving.inspect}, proto: #{@proto.inspect}, psk_id: #{@psk_id.inspect}, rssi:"\
  " #{@rssi.inspect}, rssizones: #{@rssizones.inspect}, rx_bps: #{@rx_bps.inspect}, rx_bytes:"\
  " #{@rx_bytes.inspect}, rx_pkts: #{@rx_pkts.inspect}, rx_rate: #{@rx_rate.inspect},"\
  " rx_retries: #{@rx_retries.inspect}, site_id: #{@site_id.inspect}, snr: #{@snr.inspect},"\
  " ssid: #{@ssid.inspect}, tx_bps: #{@tx_bps.inspect}, tx_bytes: #{@tx_bytes.inspect},"\
  " tx_pkts: #{@tx_pkts.inspect}, tx_rate: #{@tx_rate.inspect}, tx_retries:"\
  " #{@tx_retries.inspect}, type: #{@type.inspect}, uptime: #{@uptime.inspect}, username:"\
  " #{@username.inspect}, vbeacons: #{@vbeacons.inspect}, vlan_id: #{@vlan_id.inspect},"\
  " wlan_id: #{@wlan_id.inspect}, wxrule_id: #{@wxrule_id.inspect}, wxrule_usage:"\
  " #{@wxrule_usage.inspect}, x: #{@x.inspect}, x_m: #{@x_m.inspect}, y: #{@y.inspect}, y_m:"\
  " #{@y_m.inspect}, zones: #{@zones.inspect}, additional_properties:"\
  " #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
# File 'lib/mist_api/models/stats_wireless_client.rb', line 630

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} accuracy: #{@accuracy}, airespace_ifname: #{@airespace_ifname}, airwatch:"\
  " #{@airwatch}, annotation: #{@annotation}, ap_id: #{@ap_id}, ap_mac: #{@ap_mac},"\
  " assoc_time: #{@assoc_time}, band: #{@band}, bssid: #{@bssid}, channel: #{@channel},"\
  " dual_band: #{@dual_band}, family: #{@family}, group: #{@group}, guest: #{@guest},"\
  " hostname: #{@hostname}, idle_time: #{@idle_time}, ip: #{@ip}, is_guest: #{@is_guest},"\
  " key_mgmt: #{@key_mgmt}, last_seen: #{@last_seen}, mac: #{@mac}, manufacture:"\
  " #{@manufacture}, map_id: #{@map_id}, model: #{@model}, num_locating_aps:"\
  " #{@num_locating_aps}, os: #{@os}, power_saving: #{@power_saving}, proto: #{@proto},"\
  " psk_id: #{@psk_id}, rssi: #{@rssi}, rssizones: #{@rssizones}, rx_bps: #{@rx_bps},"\
  " rx_bytes: #{@rx_bytes}, rx_pkts: #{@rx_pkts}, rx_rate: #{@rx_rate}, rx_retries:"\
  " #{@rx_retries}, site_id: #{@site_id}, snr: #{@snr}, ssid: #{@ssid}, tx_bps: #{@tx_bps},"\
  " tx_bytes: #{@tx_bytes}, tx_pkts: #{@tx_pkts}, tx_rate: #{@tx_rate}, tx_retries:"\
  " #{@tx_retries}, type: #{@type}, uptime: #{@uptime}, username: #{@username}, vbeacons:"\
  " #{@vbeacons}, vlan_id: #{@vlan_id}, wlan_id: #{@wlan_id}, wxrule_id: #{@wxrule_id},"\
  " wxrule_usage: #{@wxrule_usage}, x: #{@x}, x_m: #{@x_m}, y: #{@y}, y_m: #{@y_m}, zones:"\
  " #{@zones}, additional_properties: #{@additional_properties}>"
end