Class: MistApi::RrmBand
- Defined in:
- lib/mist_api/models/rrm_band.rb
Overview
RrmBand Model.
Instance Attribute Summary collapse
-
#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
proposed channel.
-
#curr_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).
-
#curr_channel ⇒ Integer
Current channel.
-
#curr_power ⇒ Integer
Current tx power.
-
#curr_usage ⇒ String
Current radio band.
-
#power ⇒ Integer
proposed tx power.
-
#usage ⇒ String
proposed radio band.
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(bandwidth = SKIP, channel = SKIP, curr_bandwidth = SKIP, curr_channel = SKIP, curr_power = SKIP, curr_usage = SKIP, power = SKIP, usage = SKIP) ⇒ RrmBand
constructor
A new instance of RrmBand.
-
#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(bandwidth = SKIP, channel = SKIP, curr_bandwidth = SKIP, curr_channel = SKIP, curr_power = SKIP, curr_usage = SKIP, power = SKIP, usage = SKIP) ⇒ RrmBand
Returns a new instance of RrmBand.
79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/mist_api/models/rrm_band.rb', line 79 def initialize(bandwidth = SKIP, channel = SKIP, curr_bandwidth = SKIP, curr_channel = SKIP, curr_power = SKIP, curr_usage = SKIP, power = SKIP, usage = SKIP) @bandwidth = bandwidth unless bandwidth == SKIP @channel = channel unless channel == SKIP @curr_bandwidth = curr_bandwidth unless curr_bandwidth == SKIP @curr_channel = curr_channel unless curr_channel == SKIP @curr_power = curr_power unless curr_power == SKIP @curr_usage = curr_usage unless curr_usage == SKIP @power = power unless power == SKIP @usage = usage unless usage == SKIP end |
Instance Attribute Details
#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)
15 16 17 |
# File 'lib/mist_api/models/rrm_band.rb', line 15 def bandwidth @bandwidth end |
#channel ⇒ Integer
proposed channel
19 20 21 |
# File 'lib/mist_api/models/rrm_band.rb', line 19 def channel @channel end |
#curr_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_band.rb', line 24 def curr_bandwidth @curr_bandwidth end |
#curr_channel ⇒ Integer
Current channel
28 29 30 |
# File 'lib/mist_api/models/rrm_band.rb', line 28 def curr_channel @curr_channel end |
#curr_power ⇒ Integer
Current tx power
32 33 34 |
# File 'lib/mist_api/models/rrm_band.rb', line 32 def curr_power @curr_power end |
#curr_usage ⇒ String
Current radio band
36 37 38 |
# File 'lib/mist_api/models/rrm_band.rb', line 36 def curr_usage @curr_usage end |
#power ⇒ Integer
proposed tx power
40 41 42 |
# File 'lib/mist_api/models/rrm_band.rb', line 40 def power @power end |
#usage ⇒ String
proposed radio band
44 45 46 |
# File 'lib/mist_api/models/rrm_band.rb', line 44 def usage @usage end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
# File 'lib/mist_api/models/rrm_band.rb', line 93 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. bandwidth = hash.key?('bandwidth') ? hash['bandwidth'] : SKIP channel = hash.key?('channel') ? hash['channel'] : SKIP curr_bandwidth = hash.key?('curr_bandwidth') ? hash['curr_bandwidth'] : SKIP curr_channel = hash.key?('curr_channel') ? hash['curr_channel'] : SKIP curr_power = hash.key?('curr_power') ? hash['curr_power'] : SKIP curr_usage = hash.key?('curr_usage') ? hash['curr_usage'] : SKIP power = hash.key?('power') ? hash['power'] : SKIP usage = hash.key?('usage') ? hash['usage'] : SKIP # Create object from extracted values. RrmBand.new(bandwidth, channel, curr_bandwidth, curr_channel, curr_power, curr_usage, power, usage) end |
.names ⇒ Object
A mapping from model property names to API property names.
47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/mist_api/models/rrm_band.rb', line 47 def self.names @_hash = {} if @_hash.nil? @_hash['bandwidth'] = 'bandwidth' @_hash['channel'] = 'channel' @_hash['curr_bandwidth'] = 'curr_bandwidth' @_hash['curr_channel'] = 'curr_channel' @_hash['curr_power'] = 'curr_power' @_hash['curr_usage'] = 'curr_usage' @_hash['power'] = 'power' @_hash['usage'] = 'usage' @_hash end |
.nullables ⇒ Object
An array for nullable fields
75 76 77 |
# File 'lib/mist_api/models/rrm_band.rb', line 75 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/mist_api/models/rrm_band.rb', line 61 def self.optionals %w[ bandwidth channel curr_bandwidth curr_channel curr_power curr_usage power usage ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
127 128 129 130 131 132 133 |
# File 'lib/mist_api/models/rrm_band.rb', line 127 def inspect class_name = self.class.name.split('::').last "<#{class_name} bandwidth: #{@bandwidth.inspect}, channel: #{@channel.inspect},"\ " curr_bandwidth: #{@curr_bandwidth.inspect}, curr_channel: #{@curr_channel.inspect},"\ " curr_power: #{@curr_power.inspect}, curr_usage: #{@curr_usage.inspect}, power:"\ " #{@power.inspect}, usage: #{@usage.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
119 120 121 122 123 124 |
# File 'lib/mist_api/models/rrm_band.rb', line 119 def to_s class_name = self.class.name.split('::').last "<#{class_name} bandwidth: #{@bandwidth}, channel: #{@channel}, curr_bandwidth:"\ " #{@curr_bandwidth}, curr_channel: #{@curr_channel}, curr_power: #{@curr_power},"\ " curr_usage: #{@curr_usage}, power: #{@power}, usage: #{@usage}>" end |