Class: MistApi::RfTemplate
- Defined in:
- lib/mist_api/models/rf_template.rb
Overview
RF Template
Instance Attribute Summary collapse
-
#ant_gain_24 ⇒ Integer
TODO: Write general description for this method.
-
#ant_gain_5 ⇒ Integer
TODO: Write general description for this method.
-
#ant_gain_6 ⇒ Integer
TODO: Write general description for this method.
-
#band_24 ⇒ RftemplateRadioBand24
Radio Band AP settings.
-
#band_24_usage ⇒ RadioBand24UsageEnum
enum: ‘24`, `5`, `6`, `auto`.
-
#band_5 ⇒ RftemplateRadioBand5
Radio Band AP settings.
-
#band_5_on_24_radio ⇒ RftemplateRadioBand5
Radio Band AP settings.
-
#band_6 ⇒ RftemplateRadioBand6
Radio Band AP settings.
-
#country_code ⇒ String
Optional, country code to use.
-
#created_time ⇒ Float
When the object has been created, in epoch.
-
#for_site ⇒ TrueClass | FalseClass
When the object has been created, in epoch.
-
#id ⇒ UUID | String
Unique ID of the object instance in the Mist Organization.
-
#model_specific ⇒ Hash[String, RfTemplateModelSpecificProperty]
overwrites for a specific model.
-
#modified_time ⇒ Float
When the object has been modified for the last time, in epoch.
-
#name ⇒ String
The name of the RF template.
-
#org_id ⇒ UUID | String
The name of the RF template.
-
#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(name = nil, ant_gain_24 = SKIP, ant_gain_5 = SKIP, ant_gain_6 = SKIP, band_24 = SKIP, band_24_usage = SKIP, band_5 = SKIP, band_5_on_24_radio = SKIP, band_6 = SKIP, country_code = SKIP, created_time = SKIP, for_site = SKIP, id = SKIP, model_specific = SKIP, modified_time = SKIP, org_id = SKIP, scanning_enabled = SKIP, additional_properties = nil) ⇒ RfTemplate
constructor
A new instance of RfTemplate.
-
#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(name = nil, ant_gain_24 = SKIP, ant_gain_5 = SKIP, ant_gain_6 = SKIP, band_24 = SKIP, band_24_usage = SKIP, band_5 = SKIP, band_5_on_24_radio = SKIP, band_6 = SKIP, country_code = SKIP, created_time = SKIP, for_site = SKIP, id = SKIP, model_specific = SKIP, modified_time = SKIP, org_id = SKIP, scanning_enabled = SKIP, additional_properties = nil) ⇒ RfTemplate
Returns a new instance of RfTemplate.
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 |
# File 'lib/mist_api/models/rf_template.rb', line 132 def initialize(name = nil, ant_gain_24 = SKIP, ant_gain_5 = SKIP, ant_gain_6 = SKIP, band_24 = SKIP, band_24_usage = SKIP, band_5 = SKIP, band_5_on_24_radio = SKIP, band_6 = SKIP, country_code = SKIP, created_time = SKIP, for_site = SKIP, id = SKIP, model_specific = SKIP, modified_time = SKIP, org_id = SKIP, scanning_enabled = SKIP, additional_properties = nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @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 @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 @country_code = country_code unless country_code == SKIP @created_time = created_time unless created_time == SKIP @for_site = for_site unless for_site == SKIP @id = id unless id == SKIP @model_specific = model_specific unless model_specific == SKIP @modified_time = modified_time unless modified_time == SKIP @name = name @org_id = org_id unless org_id == SKIP @scanning_enabled = scanning_enabled unless scanning_enabled == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#ant_gain_24 ⇒ Integer
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/rf_template.rb', line 14 def ant_gain_24 @ant_gain_24 end |
#ant_gain_5 ⇒ Integer
TODO: Write general description for this method
18 19 20 |
# File 'lib/mist_api/models/rf_template.rb', line 18 def ant_gain_5 @ant_gain_5 end |
#ant_gain_6 ⇒ Integer
TODO: Write general description for this method
22 23 24 |
# File 'lib/mist_api/models/rf_template.rb', line 22 def ant_gain_6 @ant_gain_6 end |
#band_24 ⇒ RftemplateRadioBand24
Radio Band AP settings
26 27 28 |
# File 'lib/mist_api/models/rf_template.rb', line 26 def band_24 @band_24 end |
#band_24_usage ⇒ RadioBand24UsageEnum
enum: ‘24`, `5`, `6`, `auto`
30 31 32 |
# File 'lib/mist_api/models/rf_template.rb', line 30 def band_24_usage @band_24_usage end |
#band_5 ⇒ RftemplateRadioBand5
Radio Band AP settings
34 35 36 |
# File 'lib/mist_api/models/rf_template.rb', line 34 def band_5 @band_5 end |
#band_5_on_24_radio ⇒ RftemplateRadioBand5
Radio Band AP settings
38 39 40 |
# File 'lib/mist_api/models/rf_template.rb', line 38 def band_5_on_24_radio @band_5_on_24_radio end |
#band_6 ⇒ RftemplateRadioBand6
Radio Band AP settings
42 43 44 |
# File 'lib/mist_api/models/rf_template.rb', line 42 def band_6 @band_6 end |
#country_code ⇒ String
Optional, country code to use. If specified, this gets applied to all sites using the RF Template
47 48 49 |
# File 'lib/mist_api/models/rf_template.rb', line 47 def country_code @country_code end |
#created_time ⇒ Float
When the object has been created, in epoch
51 52 53 |
# File 'lib/mist_api/models/rf_template.rb', line 51 def created_time @created_time end |
#for_site ⇒ TrueClass | FalseClass
When the object has been created, in epoch
55 56 57 |
# File 'lib/mist_api/models/rf_template.rb', line 55 def for_site @for_site end |
#id ⇒ UUID | String
Unique ID of the object instance in the Mist Organization
59 60 61 |
# File 'lib/mist_api/models/rf_template.rb', line 59 def id @id end |
#model_specific ⇒ Hash[String, RfTemplateModelSpecificProperty]
overwrites for a specific model. If a band is specified, it will shadow the default. Property key is the model name (e.g. “AP63”)
64 65 66 |
# File 'lib/mist_api/models/rf_template.rb', line 64 def model_specific @model_specific end |
#modified_time ⇒ Float
When the object has been modified for the last time, in epoch
68 69 70 |
# File 'lib/mist_api/models/rf_template.rb', line 68 def modified_time @modified_time end |
#name ⇒ String
The name of the RF template
72 73 74 |
# File 'lib/mist_api/models/rf_template.rb', line 72 def name @name end |
#org_id ⇒ UUID | String
The name of the RF template
76 77 78 |
# File 'lib/mist_api/models/rf_template.rb', line 76 def org_id @org_id end |
#scanning_enabled ⇒ TrueClass | FalseClass
Whether scanning radio is enabled
80 81 82 |
# File 'lib/mist_api/models/rf_template.rb', line 80 def scanning_enabled @scanning_enabled end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 |
# File 'lib/mist_api/models/rf_template.rb', line 163 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. name = hash.key?('name') ? hash['name'] : nil 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 band_24 = RftemplateRadioBand24.from_hash(hash['band_24']) if hash['band_24'] band_24_usage = hash.key?('band_24_usage') ? hash['band_24_usage'] : SKIP band_5 = RftemplateRadioBand5.from_hash(hash['band_5']) if hash['band_5'] band_5_on_24_radio = RftemplateRadioBand5.from_hash(hash['band_5_on_24_radio']) if hash['band_5_on_24_radio'] band_6 = RftemplateRadioBand6.from_hash(hash['band_6']) if hash['band_6'] country_code = hash.key?('country_code') ? hash['country_code'] : SKIP created_time = hash.key?('created_time') ? hash['created_time'] : SKIP for_site = hash.key?('for_site') ? hash['for_site'] : SKIP id = hash.key?('id') ? hash['id'] : SKIP model_specific = RfTemplateModelSpecificProperty.from_hash(hash['model_specific']) if hash['model_specific'] model_specific = SKIP unless hash.key?('model_specific') modified_time = hash.key?('modified_time') ? hash['modified_time'] : SKIP org_id = hash.key?('org_id') ? hash['org_id'] : SKIP scanning_enabled = hash.key?('scanning_enabled') ? hash['scanning_enabled'] : SKIP # 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. RfTemplate.new(name, ant_gain_24, ant_gain_5, ant_gain_6, band_24, band_24_usage, band_5, band_5_on_24_radio, band_6, country_code, created_time, for_site, id, model_specific, modified_time, org_id, scanning_enabled, additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/mist_api/models/rf_template.rb', line 83 def self.names @_hash = {} if @_hash.nil? @_hash['ant_gain_24'] = 'ant_gain_24' @_hash['ant_gain_5'] = 'ant_gain_5' @_hash['ant_gain_6'] = 'ant_gain_6' @_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['country_code'] = 'country_code' @_hash['created_time'] = 'created_time' @_hash['for_site'] = 'for_site' @_hash['id'] = 'id' @_hash['model_specific'] = 'model_specific' @_hash['modified_time'] = 'modified_time' @_hash['name'] = 'name' @_hash['org_id'] = 'org_id' @_hash['scanning_enabled'] = 'scanning_enabled' @_hash end |
.nullables ⇒ Object
An array for nullable fields
128 129 130 |
# File 'lib/mist_api/models/rf_template.rb', line 128 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/mist_api/models/rf_template.rb', line 106 def self.optionals %w[ ant_gain_24 ant_gain_5 ant_gain_6 band_24 band_24_usage band_5 band_5_on_24_radio band_6 country_code created_time for_site id model_specific modified_time org_id scanning_enabled ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'lib/mist_api/models/rf_template.rb', line 231 def inspect class_name = self.class.name.split('::').last "<#{class_name} ant_gain_24: #{@ant_gain_24.inspect}, ant_gain_5: #{@ant_gain_5.inspect},"\ " ant_gain_6: #{@ant_gain_6.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}, country_code:"\ " #{@country_code.inspect}, created_time: #{@created_time.inspect}, for_site:"\ " #{@for_site.inspect}, id: #{@id.inspect}, model_specific: #{@model_specific.inspect},"\ " modified_time: #{@modified_time.inspect}, name: #{@name.inspect}, org_id:"\ " #{@org_id.inspect}, scanning_enabled: #{@scanning_enabled.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
219 220 221 222 223 224 225 226 227 228 |
# File 'lib/mist_api/models/rf_template.rb', line 219 def to_s class_name = self.class.name.split('::').last "<#{class_name} ant_gain_24: #{@ant_gain_24}, ant_gain_5: #{@ant_gain_5}, ant_gain_6:"\ " #{@ant_gain_6}, 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}, country_code:"\ " #{@country_code}, created_time: #{@created_time}, for_site: #{@for_site}, id: #{@id},"\ " model_specific: #{@model_specific}, modified_time: #{@modified_time}, name: #{@name},"\ " org_id: #{@org_id}, scanning_enabled: #{@scanning_enabled}, additional_properties:"\ " #{@additional_properties}>" end |