Class: MistApi::ApRadio
- Defined in:
- lib/mist_api/models/ap_radio.rb
Overview
Radio AP settings
Instance Attribute Summary collapse
-
#allow_rrm_disable ⇒ TrueClass | FalseClass
TODO: Write general description for this method.
-
#ant_gain_24 ⇒ Integer
Antenna gain for 2.4G - for models with external antenna only.
-
#ant_gain_5 ⇒ Integer
Antenna gain for 5G - for models with external antenna only.
-
#ant_gain_6 ⇒ Integer
Antenna gain for 6G - for models with external antenna only.
-
#antenna_mode ⇒ ApRadioAntennaModeEnum
enum: ‘1x1`, `2x2`, `3x3`, `4x4`, `default`.
-
#antenna_select ⇒ AntennaSelectEnum
Antenna Mode for AP which supports selectable antennas.
-
#band_24 ⇒ ApRadioBand24
Radio Band AP settings.
-
#band_24_usage ⇒ RadioBand24UsageEnum
enum: ‘24`, `5`, `6`, `auto`.
-
#band_5 ⇒ ApRadioBand5
Radio Band AP settings.
-
#band_5_on_24_radio ⇒ ApRadioBand5
Radio Band AP settings.
-
#band_6 ⇒ ApRadioBand6
Radio Band AP settings.
-
#full_automatic_rrm ⇒ TrueClass | FalseClass
Let RRM control everything, only the ‘channels` and `ant_gain` will be honored (i.e. disabled/bandwidth/power/band_24_usage are all controlled by RRM).
-
#indoor_use ⇒ TrueClass | FalseClass
To make an outdoor operate indoor.
-
#rrm_managed ⇒ TrueClass | FalseClass
Enable RRM to manage all radio settings (ignores all band_xxx configs).
-
#scanning_enabled ⇒ TrueClass | FalseClass
Whether scanning radio is enabled.
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(allow_rrm_disable = false, ant_gain_24 = SKIP, ant_gain_5 = SKIP, ant_gain_6 = SKIP, antenna_mode = ApRadioAntennaModeEnum::DEFAULT, antenna_select = SKIP, band_24 = SKIP, band_24_usage = SKIP, band_5 = SKIP, band_5_on_24_radio = SKIP, band_6 = SKIP, full_automatic_rrm = false, indoor_use = false, rrm_managed = SKIP, scanning_enabled = SKIP) ⇒ ApRadio
constructor
A new instance of ApRadio.
-
#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(allow_rrm_disable = false, ant_gain_24 = SKIP, ant_gain_5 = SKIP, ant_gain_6 = SKIP, antenna_mode = ApRadioAntennaModeEnum::DEFAULT, antenna_select = SKIP, band_24 = SKIP, band_24_usage = SKIP, band_5 = SKIP, band_5_on_24_radio = SKIP, band_6 = SKIP, full_automatic_rrm = false, indoor_use = false, rrm_managed = SKIP, scanning_enabled = SKIP) ⇒ ApRadio
Returns a new instance of ApRadio.
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
# File 'lib/mist_api/models/ap_radio.rb', line 123 def initialize(allow_rrm_disable = false, ant_gain_24 = SKIP, ant_gain_5 = SKIP, ant_gain_6 = SKIP, antenna_mode = ApRadioAntennaModeEnum::DEFAULT, antenna_select = SKIP, band_24 = SKIP, band_24_usage = SKIP, band_5 = SKIP, band_5_on_24_radio = SKIP, band_6 = SKIP, full_automatic_rrm = false, indoor_use = false, rrm_managed = SKIP, scanning_enabled = SKIP) @allow_rrm_disable = allow_rrm_disable unless allow_rrm_disable == SKIP @ant_gain_24 = ant_gain_24 unless ant_gain_24 == SKIP @ant_gain_5 = ant_gain_5 unless ant_gain_5 == SKIP @ant_gain_6 = ant_gain_6 unless ant_gain_6 == SKIP @antenna_mode = antenna_mode unless antenna_mode == SKIP @antenna_select = antenna_select unless antenna_select == SKIP @band_24 = band_24 unless band_24 == SKIP @band_24_usage = band_24_usage unless band_24_usage == SKIP @band_5 = band_5 unless band_5 == SKIP @band_5_on_24_radio = band_5_on_24_radio unless band_5_on_24_radio == SKIP @band_6 = band_6 unless band_6 == SKIP @full_automatic_rrm = full_automatic_rrm unless full_automatic_rrm == SKIP @indoor_use = indoor_use unless indoor_use == SKIP @rrm_managed = rrm_managed unless rrm_managed == SKIP @scanning_enabled = scanning_enabled unless scanning_enabled == SKIP end |
Instance Attribute Details
#allow_rrm_disable ⇒ TrueClass | FalseClass
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/ap_radio.rb', line 14 def allow_rrm_disable @allow_rrm_disable end |
#ant_gain_24 ⇒ Integer
Antenna gain for 2.4G - for models with external antenna only
18 19 20 |
# File 'lib/mist_api/models/ap_radio.rb', line 18 def ant_gain_24 @ant_gain_24 end |
#ant_gain_5 ⇒ Integer
Antenna gain for 5G - for models with external antenna only
22 23 24 |
# File 'lib/mist_api/models/ap_radio.rb', line 22 def ant_gain_5 @ant_gain_5 end |
#ant_gain_6 ⇒ Integer
Antenna gain for 6G - for models with external antenna only
26 27 28 |
# File 'lib/mist_api/models/ap_radio.rb', line 26 def ant_gain_6 @ant_gain_6 end |
#antenna_mode ⇒ ApRadioAntennaModeEnum
enum: ‘1x1`, `2x2`, `3x3`, `4x4`, `default`
30 31 32 |
# File 'lib/mist_api/models/ap_radio.rb', line 30 def antenna_mode @antenna_mode end |
#antenna_select ⇒ AntennaSelectEnum
Antenna Mode for AP which supports selectable antennas. enum: ‘“”` (default), `external`, `internal`
35 36 37 |
# File 'lib/mist_api/models/ap_radio.rb', line 35 def antenna_select @antenna_select end |
#band_24 ⇒ ApRadioBand24
Radio Band AP settings
39 40 41 |
# File 'lib/mist_api/models/ap_radio.rb', line 39 def band_24 @band_24 end |
#band_24_usage ⇒ RadioBand24UsageEnum
enum: ‘24`, `5`, `6`, `auto`
43 44 45 |
# File 'lib/mist_api/models/ap_radio.rb', line 43 def band_24_usage @band_24_usage end |
#band_5 ⇒ ApRadioBand5
Radio Band AP settings
47 48 49 |
# File 'lib/mist_api/models/ap_radio.rb', line 47 def band_5 @band_5 end |
#band_5_on_24_radio ⇒ ApRadioBand5
Radio Band AP settings
51 52 53 |
# File 'lib/mist_api/models/ap_radio.rb', line 51 def band_5_on_24_radio @band_5_on_24_radio end |
#band_6 ⇒ ApRadioBand6
Radio Band AP settings
55 56 57 |
# File 'lib/mist_api/models/ap_radio.rb', line 55 def band_6 @band_6 end |
#full_automatic_rrm ⇒ TrueClass | FalseClass
Let RRM control everything, only the ‘channels` and `ant_gain` will be honored (i.e. disabled/bandwidth/power/band_24_usage are all controlled by RRM)
61 62 63 |
# File 'lib/mist_api/models/ap_radio.rb', line 61 def full_automatic_rrm @full_automatic_rrm end |
#indoor_use ⇒ TrueClass | FalseClass
To make an outdoor operate indoor. For an outdoor-ap, some channels are disallowed by default, this allows the user to use it as an indoor-ap
66 67 68 |
# File 'lib/mist_api/models/ap_radio.rb', line 66 def indoor_use @indoor_use end |
#rrm_managed ⇒ TrueClass | FalseClass
Enable RRM to manage all radio settings (ignores all band_xxx configs)
70 71 72 |
# File 'lib/mist_api/models/ap_radio.rb', line 70 def rrm_managed @rrm_managed end |
#scanning_enabled ⇒ TrueClass | FalseClass
Whether scanning radio is enabled
74 75 76 |
# File 'lib/mist_api/models/ap_radio.rb', line 74 def scanning_enabled @scanning_enabled end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 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 |
# File 'lib/mist_api/models/ap_radio.rb', line 148 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. allow_rrm_disable = hash['allow_rrm_disable'] ||= false ant_gain_24 = hash.key?('ant_gain_24') ? hash['ant_gain_24'] : SKIP ant_gain_5 = hash.key?('ant_gain_5') ? hash['ant_gain_5'] : SKIP ant_gain_6 = hash.key?('ant_gain_6') ? hash['ant_gain_6'] : SKIP antenna_mode = hash['antenna_mode'] ||= ApRadioAntennaModeEnum::DEFAULT antenna_select = hash.key?('antenna_select') ? hash['antenna_select'] : SKIP band_24 = ApRadioBand24.from_hash(hash['band_24']) if hash['band_24'] band_24_usage = hash.key?('band_24_usage') ? hash['band_24_usage'] : SKIP band_5 = ApRadioBand5.from_hash(hash['band_5']) if hash['band_5'] band_5_on_24_radio = ApRadioBand5.from_hash(hash['band_5_on_24_radio']) if hash['band_5_on_24_radio'] band_6 = ApRadioBand6.from_hash(hash['band_6']) if hash['band_6'] full_automatic_rrm = hash['full_automatic_rrm'] ||= false indoor_use = hash['indoor_use'] ||= false rrm_managed = hash.key?('rrm_managed') ? hash['rrm_managed'] : SKIP scanning_enabled = hash.key?('scanning_enabled') ? hash['scanning_enabled'] : SKIP # Create object from extracted values. ApRadio.new(allow_rrm_disable, ant_gain_24, ant_gain_5, ant_gain_6, antenna_mode, antenna_select, band_24, band_24_usage, band_5, band_5_on_24_radio, band_6, full_automatic_rrm, indoor_use, rrm_managed, scanning_enabled) end |
.names ⇒ Object
A mapping from model property names to API property names.
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/mist_api/models/ap_radio.rb', line 77 def self.names @_hash = {} if @_hash.nil? @_hash['allow_rrm_disable'] = 'allow_rrm_disable' @_hash['ant_gain_24'] = 'ant_gain_24' @_hash['ant_gain_5'] = 'ant_gain_5' @_hash['ant_gain_6'] = 'ant_gain_6' @_hash['antenna_mode'] = 'antenna_mode' @_hash['antenna_select'] = 'antenna_select' @_hash['band_24'] = 'band_24' @_hash['band_24_usage'] = 'band_24_usage' @_hash['band_5'] = 'band_5' @_hash['band_5_on_24_radio'] = 'band_5_on_24_radio' @_hash['band_6'] = 'band_6' @_hash['full_automatic_rrm'] = 'full_automatic_rrm' @_hash['indoor_use'] = 'indoor_use' @_hash['rrm_managed'] = 'rrm_managed' @_hash['scanning_enabled'] = 'scanning_enabled' @_hash end |
.nullables ⇒ Object
An array for nullable fields
119 120 121 |
# File 'lib/mist_api/models/ap_radio.rb', line 119 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
# File 'lib/mist_api/models/ap_radio.rb', line 98 def self.optionals %w[ allow_rrm_disable ant_gain_24 ant_gain_5 ant_gain_6 antenna_mode antenna_select band_24 band_24_usage band_5 band_5_on_24_radio band_6 full_automatic_rrm indoor_use rrm_managed scanning_enabled ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
201 202 203 204 205 206 207 208 209 210 211 |
# File 'lib/mist_api/models/ap_radio.rb', line 201 def inspect class_name = self.class.name.split('::').last "<#{class_name} allow_rrm_disable: #{@allow_rrm_disable.inspect}, ant_gain_24:"\ " #{@ant_gain_24.inspect}, ant_gain_5: #{@ant_gain_5.inspect}, ant_gain_6:"\ " #{@ant_gain_6.inspect}, antenna_mode: #{@antenna_mode.inspect}, antenna_select:"\ " #{@antenna_select.inspect}, band_24: #{@band_24.inspect}, band_24_usage:"\ " #{@band_24_usage.inspect}, band_5: #{@band_5.inspect}, band_5_on_24_radio:"\ " #{@band_5_on_24_radio.inspect}, band_6: #{@band_6.inspect}, full_automatic_rrm:"\ " #{@full_automatic_rrm.inspect}, indoor_use: #{@indoor_use.inspect}, rrm_managed:"\ " #{@rrm_managed.inspect}, scanning_enabled: #{@scanning_enabled.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
190 191 192 193 194 195 196 197 198 |
# File 'lib/mist_api/models/ap_radio.rb', line 190 def to_s class_name = self.class.name.split('::').last "<#{class_name} allow_rrm_disable: #{@allow_rrm_disable}, ant_gain_24: #{@ant_gain_24},"\ " ant_gain_5: #{@ant_gain_5}, ant_gain_6: #{@ant_gain_6}, antenna_mode: #{@antenna_mode},"\ " antenna_select: #{@antenna_select}, band_24: #{@band_24}, band_24_usage:"\ " #{@band_24_usage}, band_5: #{@band_5}, band_5_on_24_radio: #{@band_5_on_24_radio}, band_6:"\ " #{@band_6}, full_automatic_rrm: #{@full_automatic_rrm}, indoor_use: #{@indoor_use},"\ " rrm_managed: #{@rrm_managed}, scanning_enabled: #{@scanning_enabled}>" end |