Class: MistApi::StatsSwitchPort

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

Overview

Switch port statistics

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(mac = nil, org_id = nil, port_id = nil, site_id = nil, active = SKIP, auth_state = SKIP, disabled = SKIP, for_site = SKIP, full_duplex = SKIP, jitter = SKIP, last_flapped = SKIP, latency = SKIP, loss = SKIP, lte_iccid = SKIP, lte_imei = SKIP, lte_imsi = SKIP, mac_count = SKIP, mac_limit = SKIP, neighbor_mac = SKIP, neighbor_port_desc = SKIP, neighbor_system_name = SKIP, poe_disabled = SKIP, poe_mode = SKIP, poe_on = SKIP, poe_priority = SKIP, port_mac = SKIP, port_usage = SKIP, power_draw = SKIP, rx_bcast_pkts = SKIP, rx_bps = SKIP, rx_bytes = SKIP, rx_errors = SKIP, rx_mcast_pkts = SKIP, rx_pkts = SKIP, speed = SKIP, stp_role = SKIP, stp_state = SKIP, tx_bcast_pkts = SKIP, tx_bps = SKIP, tx_bytes = SKIP, tx_errors = SKIP, tx_mcast_pkts = SKIP, tx_pkts = SKIP, type = SKIP, unconfigured = SKIP, up = SKIP, uplink = SKIP, xcvr_model = SKIP, xcvr_part_number = SKIP, xcvr_serial = SKIP) ⇒ StatsSwitchPort

Returns a new instance of StatsSwitchPort.



340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
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
# File 'lib/mist_api/models/stats_switch_port.rb', line 340

def initialize(mac = nil, org_id = nil, port_id = nil, site_id = nil,
               active = SKIP, auth_state = SKIP, disabled = SKIP,
               for_site = SKIP, full_duplex = SKIP, jitter = SKIP,
               last_flapped = SKIP, latency = SKIP, loss = SKIP,
               lte_iccid = SKIP, lte_imei = SKIP, lte_imsi = SKIP,
               mac_count = SKIP, mac_limit = SKIP, neighbor_mac = SKIP,
               neighbor_port_desc = SKIP, neighbor_system_name = SKIP,
               poe_disabled = SKIP, poe_mode = SKIP, poe_on = SKIP,
               poe_priority = SKIP, port_mac = SKIP, port_usage = SKIP,
               power_draw = SKIP, rx_bcast_pkts = SKIP, rx_bps = SKIP,
               rx_bytes = SKIP, rx_errors = SKIP, rx_mcast_pkts = SKIP,
               rx_pkts = SKIP, speed = SKIP, stp_role = SKIP,
               stp_state = SKIP, tx_bcast_pkts = SKIP, tx_bps = SKIP,
               tx_bytes = SKIP, tx_errors = SKIP, tx_mcast_pkts = SKIP,
               tx_pkts = SKIP, type = SKIP, unconfigured = SKIP, up = SKIP,
               uplink = SKIP, xcvr_model = SKIP, xcvr_part_number = SKIP,
               xcvr_serial = SKIP)
  @active = active unless active == SKIP
  @auth_state = auth_state unless auth_state == SKIP
  @disabled = disabled unless disabled == SKIP
  @for_site = for_site unless for_site == SKIP
  @full_duplex = full_duplex unless full_duplex == SKIP
  @jitter = jitter unless jitter == SKIP
  @last_flapped = last_flapped unless last_flapped == SKIP
  @latency = latency unless latency == SKIP
  @loss = loss unless loss == SKIP
  @lte_iccid = lte_iccid unless lte_iccid == SKIP
  @lte_imei = lte_imei unless lte_imei == SKIP
  @lte_imsi = lte_imsi unless lte_imsi == SKIP
  @mac = mac
  @mac_count = mac_count unless mac_count == SKIP
  @mac_limit = mac_limit unless mac_limit == SKIP
  @neighbor_mac = neighbor_mac unless neighbor_mac == SKIP
  @neighbor_port_desc = neighbor_port_desc unless neighbor_port_desc == SKIP
  @neighbor_system_name = neighbor_system_name unless neighbor_system_name == SKIP
  @org_id = org_id
  @poe_disabled = poe_disabled unless poe_disabled == SKIP
  @poe_mode = poe_mode unless poe_mode == SKIP
  @poe_on = poe_on unless poe_on == SKIP
  @poe_priority = poe_priority unless poe_priority == SKIP
  @port_id = port_id
  @port_mac = port_mac unless port_mac == SKIP
  @port_usage = port_usage unless port_usage == SKIP
  @power_draw = power_draw unless power_draw == SKIP
  @rx_bcast_pkts = rx_bcast_pkts unless rx_bcast_pkts == SKIP
  @rx_bps = rx_bps unless rx_bps == SKIP
  @rx_bytes = rx_bytes unless rx_bytes == SKIP
  @rx_errors = rx_errors unless rx_errors == SKIP
  @rx_mcast_pkts = rx_mcast_pkts unless rx_mcast_pkts == SKIP
  @rx_pkts = rx_pkts unless rx_pkts == SKIP
  @site_id = site_id
  @speed = speed unless speed == SKIP
  @stp_role = stp_role unless stp_role == SKIP
  @stp_state = stp_state unless stp_state == SKIP
  @tx_bcast_pkts = tx_bcast_pkts unless tx_bcast_pkts == SKIP
  @tx_bps = tx_bps unless tx_bps == SKIP
  @tx_bytes = tx_bytes unless tx_bytes == SKIP
  @tx_errors = tx_errors unless tx_errors == SKIP
  @tx_mcast_pkts = tx_mcast_pkts unless tx_mcast_pkts == SKIP
  @tx_pkts = tx_pkts unless tx_pkts == SKIP
  @type = type unless type == SKIP
  @unconfigured = unconfigured unless unconfigured == SKIP
  @up = up unless up == SKIP
  @uplink = uplink unless uplink == SKIP
  @xcvr_model = xcvr_model unless xcvr_model == SKIP
  @xcvr_part_number = xcvr_part_number unless xcvr_part_number == SKIP
  @xcvr_serial = xcvr_serial unless xcvr_serial == SKIP
end

Instance Attribute Details

#activeTrueClass | FalseClass

Indicates if interface is active/inactive

Returns:

  • (TrueClass | FalseClass)


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

def active
  @active
end

#auth_statePortAuthStateEnum

enum: ‘authenticated`, `authenticating`, `held`, `init`

Returns:



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

def auth_state
  @auth_state
end

#disabledTrueClass | FalseClass

Indicates if interface is disabled

Returns:

  • (TrueClass | FalseClass)


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

def disabled
  @disabled
end

#for_siteTrueClass | FalseClass

Indicates if interface is disabled

Returns:

  • (TrueClass | FalseClass)


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

def for_site
  @for_site
end

#full_duplexTrueClass | FalseClass

Indicates full or half duplex

Returns:

  • (TrueClass | FalseClass)


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

def full_duplex
  @full_duplex
end

#jitterFloat

Last sampled jitter of the interface

Returns:

  • (Float)


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

def jitter
  @jitter
end

#last_flappedFloat

Indicates when the port was last flapped

Returns:

  • (Float)


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

def last_flapped
  @last_flapped
end

#latencyFloat

Last sampled latency of the interface

Returns:

  • (Float)


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

def latency
  @latency
end

#lossFloat

Last sampled loss of the interface

Returns:

  • (Float)


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

def loss
  @loss
end

#lte_iccidString

LTE ICCID value, Check for null/empty

Returns:

  • (String)


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

def lte_iccid
  @lte_iccid
end

#lte_imeiString

LTE IMEI value, Check for null/empty

Returns:

  • (String)


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

def lte_imei
  @lte_imei
end

#lte_imsiString

LTE IMSI value, Check for null/empty

Returns:

  • (String)


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

def lte_imsi
  @lte_imsi
end

#macString

LTE IMSI value, Check for null/empty

Returns:

  • (String)


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

def mac
  @mac
end

#mac_countInteger

Number of mac addresses in the forwarding table

Returns:

  • (Integer)


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

def mac_count
  @mac_count
end

#mac_limitInteger

Limit on number of dynamically learned macs

Returns:

  • (Integer)


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

def mac_limit
  @mac_limit
end

#neighbor_macString

chassis identifier of the chassis type listed

Returns:

  • (String)


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

def neighbor_mac
  @neighbor_mac
end

#neighbor_port_descString

Description supplied by the system on the interface E.g. “GigabitEthernet2/0/39”

Returns:

  • (String)


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

def neighbor_port_desc
  @neighbor_port_desc
end

#neighbor_system_nameString

Name supplied by the system on the interface E.g. neighbor system name E.g. “Kumar-Acc-SW.mist.local”

Returns:

  • (String)


84
85
86
# File 'lib/mist_api/models/stats_switch_port.rb', line 84

def neighbor_system_name
  @neighbor_system_name
end

#org_idUUID | String

Name supplied by the system on the interface E.g. neighbor system name E.g. “Kumar-Acc-SW.mist.local”

Returns:

  • (UUID | String)


89
90
91
# File 'lib/mist_api/models/stats_switch_port.rb', line 89

def org_id
  @org_id
end

#poe_disabledTrueClass | FalseClass

Is the POE disabled

Returns:

  • (TrueClass | FalseClass)


93
94
95
# File 'lib/mist_api/models/stats_switch_port.rb', line 93

def poe_disabled
  @poe_disabled
end

#poe_modeStatsSwitchPortPoeModeEnum

enum: ‘802.3af`, `802.3at`, `802.3bt`



97
98
99
# File 'lib/mist_api/models/stats_switch_port.rb', line 97

def poe_mode
  @poe_mode
end

#poe_onTrueClass | FalseClass

Is the device attached to POE

Returns:

  • (TrueClass | FalseClass)


101
102
103
# File 'lib/mist_api/models/stats_switch_port.rb', line 101

def poe_on
  @poe_on
end

#poe_priorityPoePriorityEnum

PoE priority. enum: ‘low`, `high`

Returns:



105
106
107
# File 'lib/mist_api/models/stats_switch_port.rb', line 105

def poe_priority
  @poe_priority
end

#port_idString

PoE priority. enum: ‘low`, `high`

Returns:

  • (String)


109
110
111
# File 'lib/mist_api/models/stats_switch_port.rb', line 109

def port_id
  @port_id
end

#port_macString

Interface MAC address

Returns:

  • (String)


113
114
115
# File 'lib/mist_api/models/stats_switch_port.rb', line 113

def port_mac
  @port_mac
end

#port_usageString

Interface MAC address

Returns:

  • (String)


117
118
119
# File 'lib/mist_api/models/stats_switch_port.rb', line 117

def port_usage
  @port_usage
end

#power_drawFloat

Amount of power being used by the interface at the time the command is executed. Unit in watts.

Returns:

  • (Float)


122
123
124
# File 'lib/mist_api/models/stats_switch_port.rb', line 122

def power_draw
  @power_draw
end

#rx_bcast_pktsInteger

Broadcast input packets

Returns:

  • (Integer)


126
127
128
# File 'lib/mist_api/models/stats_switch_port.rb', line 126

def rx_bcast_pkts
  @rx_bcast_pkts
end

#rx_bpsInteger

Rate of receiving traffic, bits/seconds, last known

Returns:

  • (Integer)


130
131
132
# File 'lib/mist_api/models/stats_switch_port.rb', line 130

def rx_bps
  @rx_bps
end

#rx_bytesInteger

Amount of traffic received since connection

Returns:

  • (Integer)


134
135
136
# File 'lib/mist_api/models/stats_switch_port.rb', line 134

def rx_bytes
  @rx_bytes
end

#rx_errorsInteger

Input errors

Returns:

  • (Integer)


138
139
140
# File 'lib/mist_api/models/stats_switch_port.rb', line 138

def rx_errors
  @rx_errors
end

#rx_mcast_pktsInteger

Multicast input packets

Returns:

  • (Integer)


142
143
144
# File 'lib/mist_api/models/stats_switch_port.rb', line 142

def rx_mcast_pkts
  @rx_mcast_pkts
end

#rx_pktsInteger

Amount of packets received since connection

Returns:

  • (Integer)


146
147
148
# File 'lib/mist_api/models/stats_switch_port.rb', line 146

def rx_pkts
  @rx_pkts
end

#site_idUUID | String

Amount of packets received since connection

Returns:

  • (UUID | String)


150
151
152
# File 'lib/mist_api/models/stats_switch_port.rb', line 150

def site_id
  @site_id
end

#speedInteger

Port speed

Returns:

  • (Integer)


154
155
156
# File 'lib/mist_api/models/stats_switch_port.rb', line 154

def speed
  @speed
end

#stp_rolePortStpRoleEnum

enum: ‘alternate`, `backup`, `designated`, `disabled`, `root`, `root-prevented`

Returns:



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

def stp_role
  @stp_role
end

#stp_statePortStpStateEnum

enum: ‘blocking`, `disabled`, `forwarding`, `learning`, `listening`

Returns:



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

def stp_state
  @stp_state
end

#tx_bcast_pktsInteger

Broadcast output packets

Returns:

  • (Integer)


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

def tx_bcast_pkts
  @tx_bcast_pkts
end

#tx_bpsInteger

Rate of transmitting traffic, bits/seconds, last known

Returns:

  • (Integer)


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

def tx_bps
  @tx_bps
end

#tx_bytesInteger

Amount of traffic sent since connection

Returns:

  • (Integer)


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

def tx_bytes
  @tx_bytes
end

#tx_errorsInteger

Output errors

Returns:

  • (Integer)


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

def tx_errors
  @tx_errors
end

#tx_mcast_pktsInteger

Multicast output packets

Returns:

  • (Integer)


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

def tx_mcast_pkts
  @tx_mcast_pkts
end

#tx_pktsInteger

Amount of packets sent since connection

Returns:

  • (Integer)


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

def tx_pkts
  @tx_pkts
end

#typeStatsSwitchPortTypeEnum

device type. enum: ‘ap`, `ble`, `gateway`, `mxedge`, `nac`, `switch`



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

def type
  @type
end

#unconfiguredTrueClass | FalseClass

Indicates if interface is unconfigured

Returns:

  • (TrueClass | FalseClass)


195
196
197
# File 'lib/mist_api/models/stats_switch_port.rb', line 195

def unconfigured
  @unconfigured
end

#upTrueClass | FalseClass

Indicates if interface is up

Returns:

  • (TrueClass | FalseClass)


199
200
201
# File 'lib/mist_api/models/stats_switch_port.rb', line 199

def up
  @up
end

Indicates if interface is an uplink port

Returns:

  • (TrueClass | FalseClass)


203
204
205
# File 'lib/mist_api/models/stats_switch_port.rb', line 203

def uplink
  @uplink
end

#xcvr_modelString

Optic Slot ModelName, Check for null/empty

Returns:

  • (String)


207
208
209
# File 'lib/mist_api/models/stats_switch_port.rb', line 207

def xcvr_model
  @xcvr_model
end

#xcvr_part_numberString

Optic Slot Partnumber, Check for null/empty

Returns:

  • (String)


211
212
213
# File 'lib/mist_api/models/stats_switch_port.rb', line 211

def xcvr_part_number
  @xcvr_part_number
end

#xcvr_serialString

Optic Slot SerialNumber, Check for null/empty

Returns:

  • (String)


215
216
217
# File 'lib/mist_api/models/stats_switch_port.rb', line 215

def xcvr_serial
  @xcvr_serial
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



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
459
460
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
# File 'lib/mist_api/models/stats_switch_port.rb', line 410

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  mac = hash.key?('mac') ? hash['mac'] : nil
  org_id = hash.key?('org_id') ? hash['org_id'] : nil
  port_id = hash.key?('port_id') ? hash['port_id'] : nil
  site_id = hash.key?('site_id') ? hash['site_id'] : nil
  active = hash.key?('active') ? hash['active'] : SKIP
  auth_state = hash.key?('auth_state') ? hash['auth_state'] : SKIP
  disabled = hash.key?('disabled') ? hash['disabled'] : SKIP
  for_site = hash.key?('for_site') ? hash['for_site'] : SKIP
  full_duplex = hash.key?('full_duplex') ? hash['full_duplex'] : SKIP
  jitter = hash.key?('jitter') ? hash['jitter'] : SKIP
  last_flapped = hash.key?('last_flapped') ? hash['last_flapped'] : SKIP
  latency = hash.key?('latency') ? hash['latency'] : SKIP
  loss = hash.key?('loss') ? hash['loss'] : SKIP
  lte_iccid = hash.key?('lte_iccid') ? hash['lte_iccid'] : SKIP
  lte_imei = hash.key?('lte_imei') ? hash['lte_imei'] : SKIP
  lte_imsi = hash.key?('lte_imsi') ? hash['lte_imsi'] : SKIP
  mac_count = hash.key?('mac_count') ? hash['mac_count'] : SKIP
  mac_limit = hash.key?('mac_limit') ? hash['mac_limit'] : SKIP
  neighbor_mac = hash.key?('neighbor_mac') ? hash['neighbor_mac'] : SKIP
  neighbor_port_desc =
    hash.key?('neighbor_port_desc') ? hash['neighbor_port_desc'] : SKIP
  neighbor_system_name =
    hash.key?('neighbor_system_name') ? hash['neighbor_system_name'] : SKIP
  poe_disabled = hash.key?('poe_disabled') ? hash['poe_disabled'] : SKIP
  poe_mode = hash.key?('poe_mode') ? hash['poe_mode'] : SKIP
  poe_on = hash.key?('poe_on') ? hash['poe_on'] : SKIP
  poe_priority = hash.key?('poe_priority') ? hash['poe_priority'] : SKIP
  port_mac = hash.key?('port_mac') ? hash['port_mac'] : SKIP
  port_usage = hash.key?('port_usage') ? hash['port_usage'] : SKIP
  power_draw = hash.key?('power_draw') ? hash['power_draw'] : SKIP
  rx_bcast_pkts = hash.key?('rx_bcast_pkts') ? hash['rx_bcast_pkts'] : SKIP
  rx_bps = hash.key?('rx_bps') ? hash['rx_bps'] : SKIP
  rx_bytes = hash.key?('rx_bytes') ? hash['rx_bytes'] : SKIP
  rx_errors = hash.key?('rx_errors') ? hash['rx_errors'] : SKIP
  rx_mcast_pkts = hash.key?('rx_mcast_pkts') ? hash['rx_mcast_pkts'] : SKIP
  rx_pkts = hash.key?('rx_pkts') ? hash['rx_pkts'] : SKIP
  speed = hash.key?('speed') ? hash['speed'] : SKIP
  stp_role = hash.key?('stp_role') ? hash['stp_role'] : SKIP
  stp_state = hash.key?('stp_state') ? hash['stp_state'] : SKIP
  tx_bcast_pkts = hash.key?('tx_bcast_pkts') ? hash['tx_bcast_pkts'] : SKIP
  tx_bps = hash.key?('tx_bps') ? hash['tx_bps'] : SKIP
  tx_bytes = hash.key?('tx_bytes') ? hash['tx_bytes'] : SKIP
  tx_errors = hash.key?('tx_errors') ? hash['tx_errors'] : SKIP
  tx_mcast_pkts = hash.key?('tx_mcast_pkts') ? hash['tx_mcast_pkts'] : SKIP
  tx_pkts = hash.key?('tx_pkts') ? hash['tx_pkts'] : SKIP
  type = hash.key?('type') ? hash['type'] : SKIP
  unconfigured = hash.key?('unconfigured') ? hash['unconfigured'] : SKIP
  up = hash.key?('up') ? hash['up'] : SKIP
  uplink = hash.key?('uplink') ? hash['uplink'] : SKIP
  xcvr_model = hash.key?('xcvr_model') ? hash['xcvr_model'] : SKIP
  xcvr_part_number =
    hash.key?('xcvr_part_number') ? hash['xcvr_part_number'] : SKIP
  xcvr_serial = hash.key?('xcvr_serial') ? hash['xcvr_serial'] : SKIP

  # Create object from extracted values.
  StatsSwitchPort.new(mac,
                      org_id,
                      port_id,
                      site_id,
                      active,
                      auth_state,
                      disabled,
                      for_site,
                      full_duplex,
                      jitter,
                      last_flapped,
                      latency,
                      loss,
                      lte_iccid,
                      lte_imei,
                      lte_imsi,
                      mac_count,
                      mac_limit,
                      neighbor_mac,
                      neighbor_port_desc,
                      neighbor_system_name,
                      poe_disabled,
                      poe_mode,
                      poe_on,
                      poe_priority,
                      port_mac,
                      port_usage,
                      power_draw,
                      rx_bcast_pkts,
                      rx_bps,
                      rx_bytes,
                      rx_errors,
                      rx_mcast_pkts,
                      rx_pkts,
                      speed,
                      stp_role,
                      stp_state,
                      tx_bcast_pkts,
                      tx_bps,
                      tx_bytes,
                      tx_errors,
                      tx_mcast_pkts,
                      tx_pkts,
                      type,
                      unconfigured,
                      up,
                      uplink,
                      xcvr_model,
                      xcvr_part_number,
                      xcvr_serial)
end

.namesObject

A mapping from model property names to API property names.



218
219
220
221
222
223
224
225
226
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
# File 'lib/mist_api/models/stats_switch_port.rb', line 218

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['active'] = 'active'
  @_hash['auth_state'] = 'auth_state'
  @_hash['disabled'] = 'disabled'
  @_hash['for_site'] = 'for_site'
  @_hash['full_duplex'] = 'full_duplex'
  @_hash['jitter'] = 'jitter'
  @_hash['last_flapped'] = 'last_flapped'
  @_hash['latency'] = 'latency'
  @_hash['loss'] = 'loss'
  @_hash['lte_iccid'] = 'lte_iccid'
  @_hash['lte_imei'] = 'lte_imei'
  @_hash['lte_imsi'] = 'lte_imsi'
  @_hash['mac'] = 'mac'
  @_hash['mac_count'] = 'mac_count'
  @_hash['mac_limit'] = 'mac_limit'
  @_hash['neighbor_mac'] = 'neighbor_mac'
  @_hash['neighbor_port_desc'] = 'neighbor_port_desc'
  @_hash['neighbor_system_name'] = 'neighbor_system_name'
  @_hash['org_id'] = 'org_id'
  @_hash['poe_disabled'] = 'poe_disabled'
  @_hash['poe_mode'] = 'poe_mode'
  @_hash['poe_on'] = 'poe_on'
  @_hash['poe_priority'] = 'poe_priority'
  @_hash['port_id'] = 'port_id'
  @_hash['port_mac'] = 'port_mac'
  @_hash['port_usage'] = 'port_usage'
  @_hash['power_draw'] = 'power_draw'
  @_hash['rx_bcast_pkts'] = 'rx_bcast_pkts'
  @_hash['rx_bps'] = 'rx_bps'
  @_hash['rx_bytes'] = 'rx_bytes'
  @_hash['rx_errors'] = 'rx_errors'
  @_hash['rx_mcast_pkts'] = 'rx_mcast_pkts'
  @_hash['rx_pkts'] = 'rx_pkts'
  @_hash['site_id'] = 'site_id'
  @_hash['speed'] = 'speed'
  @_hash['stp_role'] = 'stp_role'
  @_hash['stp_state'] = 'stp_state'
  @_hash['tx_bcast_pkts'] = 'tx_bcast_pkts'
  @_hash['tx_bps'] = 'tx_bps'
  @_hash['tx_bytes'] = 'tx_bytes'
  @_hash['tx_errors'] = 'tx_errors'
  @_hash['tx_mcast_pkts'] = 'tx_mcast_pkts'
  @_hash['tx_pkts'] = 'tx_pkts'
  @_hash['type'] = 'type'
  @_hash['unconfigured'] = 'unconfigured'
  @_hash['up'] = 'up'
  @_hash['uplink'] = 'uplink'
  @_hash['xcvr_model'] = 'xcvr_model'
  @_hash['xcvr_part_number'] = 'xcvr_part_number'
  @_hash['xcvr_serial'] = 'xcvr_serial'
  @_hash
end

.nullablesObject

An array for nullable fields



326
327
328
329
330
331
332
333
334
335
336
337
338
# File 'lib/mist_api/models/stats_switch_port.rb', line 326

def self.nullables
  %w[
    lte_iccid
    lte_imei
    lte_imsi
    rx_bps
    rx_bytes
    rx_pkts
    tx_bps
    tx_bytes
    tx_pkts
  ]
end

.optionalsObject

An array for optional fields



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
310
311
312
313
314
315
316
317
318
319
320
321
322
323
# File 'lib/mist_api/models/stats_switch_port.rb', line 274

def self.optionals
  %w[
    active
    auth_state
    disabled
    for_site
    full_duplex
    jitter
    last_flapped
    latency
    loss
    lte_iccid
    lte_imei
    lte_imsi
    mac_count
    mac_limit
    neighbor_mac
    neighbor_port_desc
    neighbor_system_name
    poe_disabled
    poe_mode
    poe_on
    poe_priority
    port_mac
    port_usage
    power_draw
    rx_bcast_pkts
    rx_bps
    rx_bytes
    rx_errors
    rx_mcast_pkts
    rx_pkts
    speed
    stp_role
    stp_state
    tx_bcast_pkts
    tx_bps
    tx_bytes
    tx_errors
    tx_mcast_pkts
    tx_pkts
    type
    unconfigured
    up
    uplink
    xcvr_model
    xcvr_part_number
    xcvr_serial
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
# File 'lib/mist_api/models/stats_switch_port.rb', line 543

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} active: #{@active.inspect}, auth_state: #{@auth_state.inspect}, disabled:"\
  " #{@disabled.inspect}, for_site: #{@for_site.inspect}, full_duplex:"\
  " #{@full_duplex.inspect}, jitter: #{@jitter.inspect}, last_flapped:"\
  " #{@last_flapped.inspect}, latency: #{@latency.inspect}, loss: #{@loss.inspect}, lte_iccid:"\
  " #{@lte_iccid.inspect}, lte_imei: #{@lte_imei.inspect}, lte_imsi: #{@lte_imsi.inspect},"\
  " mac: #{@mac.inspect}, mac_count: #{@mac_count.inspect}, mac_limit: #{@mac_limit.inspect},"\
  " neighbor_mac: #{@neighbor_mac.inspect}, neighbor_port_desc:"\
  " #{@neighbor_port_desc.inspect}, neighbor_system_name: #{@neighbor_system_name.inspect},"\
  " org_id: #{@org_id.inspect}, poe_disabled: #{@poe_disabled.inspect}, poe_mode:"\
  " #{@poe_mode.inspect}, poe_on: #{@poe_on.inspect}, poe_priority: #{@poe_priority.inspect},"\
  " port_id: #{@port_id.inspect}, port_mac: #{@port_mac.inspect}, port_usage:"\
  " #{@port_usage.inspect}, power_draw: #{@power_draw.inspect}, rx_bcast_pkts:"\
  " #{@rx_bcast_pkts.inspect}, rx_bps: #{@rx_bps.inspect}, rx_bytes: #{@rx_bytes.inspect},"\
  " rx_errors: #{@rx_errors.inspect}, rx_mcast_pkts: #{@rx_mcast_pkts.inspect}, rx_pkts:"\
  " #{@rx_pkts.inspect}, site_id: #{@site_id.inspect}, speed: #{@speed.inspect}, stp_role:"\
  " #{@stp_role.inspect}, stp_state: #{@stp_state.inspect}, tx_bcast_pkts:"\
  " #{@tx_bcast_pkts.inspect}, tx_bps: #{@tx_bps.inspect}, tx_bytes: #{@tx_bytes.inspect},"\
  " tx_errors: #{@tx_errors.inspect}, tx_mcast_pkts: #{@tx_mcast_pkts.inspect}, tx_pkts:"\
  " #{@tx_pkts.inspect}, type: #{@type.inspect}, unconfigured: #{@unconfigured.inspect}, up:"\
  " #{@up.inspect}, uplink: #{@uplink.inspect}, xcvr_model: #{@xcvr_model.inspect},"\
  " xcvr_part_number: #{@xcvr_part_number.inspect}, xcvr_serial: #{@xcvr_serial.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
# File 'lib/mist_api/models/stats_switch_port.rb', line 522

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} active: #{@active}, auth_state: #{@auth_state}, disabled: #{@disabled},"\
  " for_site: #{@for_site}, full_duplex: #{@full_duplex}, jitter: #{@jitter}, last_flapped:"\
  " #{@last_flapped}, latency: #{@latency}, loss: #{@loss}, lte_iccid: #{@lte_iccid},"\
  " lte_imei: #{@lte_imei}, lte_imsi: #{@lte_imsi}, mac: #{@mac}, mac_count: #{@mac_count},"\
  " mac_limit: #{@mac_limit}, neighbor_mac: #{@neighbor_mac}, neighbor_port_desc:"\
  " #{@neighbor_port_desc}, neighbor_system_name: #{@neighbor_system_name}, org_id:"\
  " #{@org_id}, poe_disabled: #{@poe_disabled}, poe_mode: #{@poe_mode}, poe_on: #{@poe_on},"\
  " poe_priority: #{@poe_priority}, port_id: #{@port_id}, port_mac: #{@port_mac}, port_usage:"\
  " #{@port_usage}, power_draw: #{@power_draw}, rx_bcast_pkts: #{@rx_bcast_pkts}, rx_bps:"\
  " #{@rx_bps}, rx_bytes: #{@rx_bytes}, rx_errors: #{@rx_errors}, rx_mcast_pkts:"\
  " #{@rx_mcast_pkts}, rx_pkts: #{@rx_pkts}, site_id: #{@site_id}, speed: #{@speed}, stp_role:"\
  " #{@stp_role}, stp_state: #{@stp_state}, tx_bcast_pkts: #{@tx_bcast_pkts}, tx_bps:"\
  " #{@tx_bps}, tx_bytes: #{@tx_bytes}, tx_errors: #{@tx_errors}, tx_mcast_pkts:"\
  " #{@tx_mcast_pkts}, tx_pkts: #{@tx_pkts}, type: #{@type}, unconfigured: #{@unconfigured},"\
  " up: #{@up}, uplink: #{@uplink}, xcvr_model: #{@xcvr_model}, xcvr_part_number:"\
  " #{@xcvr_part_number}, xcvr_serial: #{@xcvr_serial}>"
end