Class: MistApi::ApMesh
- Defined in:
- lib/mist_api/models/ap_mesh.rb
Overview
Mesh AP settings
Instance Attribute Summary collapse
-
#bands ⇒ Array[Dot11BandEnum]
List of bands that the mesh should apply to.
-
#enabled ⇒ TrueClass | FalseClass
Whether mesh is enabled on this AP.
-
#group ⇒ Integer
Mesh group, base AP(s) will only allow remote AP(s) in the same mesh group to join, 1-9, optional.
-
#role ⇒ ApMeshRoleEnum
enum: ‘base`, `remote`.
-
#use_wpa3_on_5 ⇒ TrueClass | FalseClass
Whether to use WPA3 on the 5 GHz band for mesh links.
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(bands = SKIP, enabled = false, group = SKIP, role = SKIP, use_wpa3_on_5 = false) ⇒ ApMesh
constructor
A new instance of ApMesh.
-
#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(bands = SKIP, enabled = false, group = SKIP, role = SKIP, use_wpa3_on_5 = false) ⇒ ApMesh
Returns a new instance of ApMesh.
64 65 66 67 68 69 70 71 |
# File 'lib/mist_api/models/ap_mesh.rb', line 64 def initialize(bands = SKIP, enabled = false, group = SKIP, role = SKIP, use_wpa3_on_5 = false) @bands = bands unless bands == SKIP @enabled = enabled unless enabled == SKIP @group = group unless group == SKIP @role = role unless role == SKIP @use_wpa3_on_5 = use_wpa3_on_5 unless use_wpa3_on_5 == SKIP end |
Instance Attribute Details
#bands ⇒ Array[Dot11BandEnum]
List of bands that the mesh should apply to. For relay, the first viable one will be picked. For relay, the first viable one will be picked. enum: ‘24`, `5`, `6`
16 17 18 |
# File 'lib/mist_api/models/ap_mesh.rb', line 16 def bands @bands end |
#enabled ⇒ TrueClass | FalseClass
Whether mesh is enabled on this AP
20 21 22 |
# File 'lib/mist_api/models/ap_mesh.rb', line 20 def enabled @enabled end |
#group ⇒ Integer
Mesh group, base AP(s) will only allow remote AP(s) in the same mesh group to join, 1-9, optional
25 26 27 |
# File 'lib/mist_api/models/ap_mesh.rb', line 25 def group @group end |
#role ⇒ ApMeshRoleEnum
enum: ‘base`, `remote`
29 30 31 |
# File 'lib/mist_api/models/ap_mesh.rb', line 29 def role @role end |
#use_wpa3_on_5 ⇒ TrueClass | FalseClass
Whether to use WPA3 on the 5 GHz band for mesh links
33 34 35 |
# File 'lib/mist_api/models/ap_mesh.rb', line 33 def use_wpa3_on_5 @use_wpa3_on_5 end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/mist_api/models/ap_mesh.rb', line 74 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. bands = hash.key?('bands') ? hash['bands'] : SKIP enabled = hash['enabled'] ||= false group = hash.key?('group') ? hash['group'] : SKIP role = hash.key?('role') ? hash['role'] : SKIP use_wpa3_on_5 = hash['use_wpa3_on_5'] ||= false # Create object from extracted values. ApMesh.new(bands, enabled, group, role, use_wpa3_on_5) end |
.names ⇒ Object
A mapping from model property names to API property names.
36 37 38 39 40 41 42 43 44 |
# File 'lib/mist_api/models/ap_mesh.rb', line 36 def self.names @_hash = {} if @_hash.nil? @_hash['bands'] = 'bands' @_hash['enabled'] = 'enabled' @_hash['group'] = 'group' @_hash['role'] = 'role' @_hash['use_wpa3_on_5'] = 'use_wpa3_on_5' @_hash end |
.nullables ⇒ Object
An array for nullable fields
58 59 60 61 62 |
# File 'lib/mist_api/models/ap_mesh.rb', line 58 def self.nullables %w[ group ] end |
.optionals ⇒ Object
An array for optional fields
47 48 49 50 51 52 53 54 55 |
# File 'lib/mist_api/models/ap_mesh.rb', line 47 def self.optionals %w[ bands enabled group role use_wpa3_on_5 ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
100 101 102 103 104 |
# File 'lib/mist_api/models/ap_mesh.rb', line 100 def inspect class_name = self.class.name.split('::').last "<#{class_name} bands: #{@bands.inspect}, enabled: #{@enabled.inspect}, group:"\ " #{@group.inspect}, role: #{@role.inspect}, use_wpa3_on_5: #{@use_wpa3_on_5.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
93 94 95 96 97 |
# File 'lib/mist_api/models/ap_mesh.rb', line 93 def to_s class_name = self.class.name.split('::').last "<#{class_name} bands: #{@bands}, enabled: #{@enabled}, group: #{@group}, role: #{@role},"\ " use_wpa3_on_5: #{@use_wpa3_on_5}>" end |