Class: MistApi::RrmEvent
- Defined in:
- lib/mist_api/models/rrm_event.rb
Overview
RrmEvent Model.
Instance Attribute Summary collapse
-
#ap ⇒ String
AP MAC.
-
#band ⇒ Dot11BandEnum
enum: ‘24`, `5`, `5-dedicated`, `5-selectable`, `6`, `6-dedicated`, `6-selectable`.
-
#bandwidth ⇒ Dot11BandwidthEnum
channel width for the band.enum: ‘0`(disabled, response only), `20`, `40`, `80` (only applicable for band_5 and band_6), `160` (only for band_6).
-
#channel ⇒ Integer
Channel for the band from rrm.
-
#event ⇒ RrmEventTypeEnum
enum: ‘interference-ap-co-channel`, `interference-ap-non-wifi`, `neighbor-ap-down`, `neighbor-ap-recovered`, `radar-detected`, `rrm-radar`, `scheduled-site_rrm`, `triggered-site_rrm`.
-
#power ⇒ Integer
Tx power of the radio.
-
#pre_bandwidth ⇒ RrmEventPreBandwidthEnum
(previously) channel width for the band , 0 means no previously available.
-
#pre_channel ⇒ Integer
(previously) channel for the band, 0 means no previously available.
-
#pre_power ⇒ Float
(previously) tx power of the radio, 0 means no previously available.
-
#pre_usage ⇒ String
(previously) tx power of the radio, 0 means no previously available.
-
#timestamp ⇒ Float
Epoch (seconds).
-
#usage ⇒ String
Epoch (seconds).
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(ap = nil, band = nil, bandwidth = nil, channel = nil, event = nil, power = nil, pre_bandwidth = nil, pre_channel = nil, pre_power = nil, pre_usage = nil, timestamp = nil, usage = nil) ⇒ RrmEvent
constructor
A new instance of RrmEvent.
-
#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(ap = nil, band = nil, bandwidth = nil, channel = nil, event = nil, power = nil, pre_bandwidth = nil, pre_channel = nil, pre_power = nil, pre_usage = nil, timestamp = nil, usage = nil) ⇒ RrmEvent
Returns a new instance of RrmEvent.
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
# File 'lib/mist_api/models/rrm_event.rb', line 93 def initialize(ap = nil, band = nil, bandwidth = nil, channel = nil, event = nil, power = nil, pre_bandwidth = nil, pre_channel = nil, pre_power = nil, pre_usage = nil, = nil, usage = nil) @ap = ap @band = band @bandwidth = bandwidth @channel = channel @event = event @power = power @pre_bandwidth = pre_bandwidth @pre_channel = pre_channel @pre_power = pre_power @pre_usage = pre_usage @timestamp = @usage = usage end |
Instance Attribute Details
#ap ⇒ String
AP MAC
14 15 16 |
# File 'lib/mist_api/models/rrm_event.rb', line 14 def ap @ap end |
#band ⇒ Dot11BandEnum
enum: ‘24`, `5`, `5-dedicated`, `5-selectable`, `6`, `6-dedicated`, `6-selectable`
19 20 21 |
# File 'lib/mist_api/models/rrm_event.rb', line 19 def band @band end |
#bandwidth ⇒ Dot11BandwidthEnum
channel width for the band.enum: ‘0`(disabled, response only), `20`, `40`, `80` (only applicable for band_5 and band_6), `160` (only for band_6)
24 25 26 |
# File 'lib/mist_api/models/rrm_event.rb', line 24 def bandwidth @bandwidth end |
#channel ⇒ Integer
Channel for the band from rrm
28 29 30 |
# File 'lib/mist_api/models/rrm_event.rb', line 28 def channel @channel end |
#event ⇒ RrmEventTypeEnum
enum: ‘interference-ap-co-channel`, `interference-ap-non-wifi`, `neighbor-ap-down`, `neighbor-ap-recovered`, `radar-detected`, `rrm-radar`, `scheduled-site_rrm`, `triggered-site_rrm`
34 35 36 |
# File 'lib/mist_api/models/rrm_event.rb', line 34 def event @event end |
#power ⇒ Integer
Tx power of the radio
38 39 40 |
# File 'lib/mist_api/models/rrm_event.rb', line 38 def power @power end |
#pre_bandwidth ⇒ RrmEventPreBandwidthEnum
(previously) channel width for the band , 0 means no previously available. enum: ‘0`, `20`, `40`, `80`, `160`
43 44 45 |
# File 'lib/mist_api/models/rrm_event.rb', line 43 def pre_bandwidth @pre_bandwidth end |
#pre_channel ⇒ Integer
(previously) channel for the band, 0 means no previously available
47 48 49 |
# File 'lib/mist_api/models/rrm_event.rb', line 47 def pre_channel @pre_channel end |
#pre_power ⇒ Float
(previously) tx power of the radio, 0 means no previously available
51 52 53 |
# File 'lib/mist_api/models/rrm_event.rb', line 51 def pre_power @pre_power end |
#pre_usage ⇒ String
(previously) tx power of the radio, 0 means no previously available
55 56 57 |
# File 'lib/mist_api/models/rrm_event.rb', line 55 def pre_usage @pre_usage end |
#timestamp ⇒ Float
Epoch (seconds)
59 60 61 |
# File 'lib/mist_api/models/rrm_event.rb', line 59 def @timestamp end |
#usage ⇒ String
Epoch (seconds)
63 64 65 |
# File 'lib/mist_api/models/rrm_event.rb', line 63 def usage @usage end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
112 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 142 |
# File 'lib/mist_api/models/rrm_event.rb', line 112 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. ap = hash.key?('ap') ? hash['ap'] : nil band = hash.key?('band') ? hash['band'] : nil bandwidth = hash.key?('bandwidth') ? hash['bandwidth'] : nil channel = hash.key?('channel') ? hash['channel'] : nil event = hash.key?('event') ? hash['event'] : nil power = hash.key?('power') ? hash['power'] : nil pre_bandwidth = hash.key?('pre_bandwidth') ? hash['pre_bandwidth'] : nil pre_channel = hash.key?('pre_channel') ? hash['pre_channel'] : nil pre_power = hash.key?('pre_power') ? hash['pre_power'] : nil pre_usage = hash.key?('pre_usage') ? hash['pre_usage'] : nil = hash.key?('timestamp') ? hash['timestamp'] : nil usage = hash.key?('usage') ? hash['usage'] : nil # Create object from extracted values. RrmEvent.new(ap, band, bandwidth, channel, event, power, pre_bandwidth, pre_channel, pre_power, pre_usage, , usage) end |
.names ⇒ Object
A mapping from model property names to API property names.
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/mist_api/models/rrm_event.rb', line 66 def self.names @_hash = {} if @_hash.nil? @_hash['ap'] = 'ap' @_hash['band'] = 'band' @_hash['bandwidth'] = 'bandwidth' @_hash['channel'] = 'channel' @_hash['event'] = 'event' @_hash['power'] = 'power' @_hash['pre_bandwidth'] = 'pre_bandwidth' @_hash['pre_channel'] = 'pre_channel' @_hash['pre_power'] = 'pre_power' @_hash['pre_usage'] = 'pre_usage' @_hash['timestamp'] = 'timestamp' @_hash['usage'] = 'usage' @_hash end |
.nullables ⇒ Object
An array for nullable fields
89 90 91 |
# File 'lib/mist_api/models/rrm_event.rb', line 89 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
84 85 86 |
# File 'lib/mist_api/models/rrm_event.rb', line 84 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
154 155 156 157 158 159 160 161 |
# File 'lib/mist_api/models/rrm_event.rb', line 154 def inspect class_name = self.class.name.split('::').last "<#{class_name} ap: #{@ap.inspect}, band: #{@band.inspect}, bandwidth:"\ " #{@bandwidth.inspect}, channel: #{@channel.inspect}, event: #{@event.inspect}, power:"\ " #{@power.inspect}, pre_bandwidth: #{@pre_bandwidth.inspect}, pre_channel:"\ " #{@pre_channel.inspect}, pre_power: #{@pre_power.inspect}, pre_usage:"\ " #{@pre_usage.inspect}, timestamp: #{@timestamp.inspect}, usage: #{@usage.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
145 146 147 148 149 150 151 |
# File 'lib/mist_api/models/rrm_event.rb', line 145 def to_s class_name = self.class.name.split('::').last "<#{class_name} ap: #{@ap}, band: #{@band}, bandwidth: #{@bandwidth}, channel: #{@channel},"\ " event: #{@event}, power: #{@power}, pre_bandwidth: #{@pre_bandwidth}, pre_channel:"\ " #{@pre_channel}, pre_power: #{@pre_power}, pre_usage: #{@pre_usage}, timestamp:"\ " #{@timestamp}, usage: #{@usage}>" end |