Class: MistApi::ApRedundancyModule
- Defined in:
- lib/mist_api/models/ap_redundancy_module.rb
Overview
ApRedundancyModule Model.
Instance Attribute Summary collapse
-
#num_aps ⇒ Integer
TODO: Write general description for this method.
-
#num_aps_with_switch_redundancy ⇒ Integer
TODO: Write general description for this method.
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(num_aps = SKIP, num_aps_with_switch_redundancy = SKIP) ⇒ ApRedundancyModule
constructor
A new instance of ApRedundancyModule.
-
#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(num_aps = SKIP, num_aps_with_switch_redundancy = SKIP) ⇒ ApRedundancyModule
Returns a new instance of ApRedundancyModule.
42 43 44 45 46 47 48 |
# File 'lib/mist_api/models/ap_redundancy_module.rb', line 42 def initialize(num_aps = SKIP, num_aps_with_switch_redundancy = SKIP) @num_aps = num_aps unless num_aps == SKIP unless num_aps_with_switch_redundancy == SKIP @num_aps_with_switch_redundancy = num_aps_with_switch_redundancy end end |
Instance Attribute Details
#num_aps ⇒ Integer
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/ap_redundancy_module.rb', line 14 def num_aps @num_aps end |
#num_aps_with_switch_redundancy ⇒ Integer
TODO: Write general description for this method
18 19 20 |
# File 'lib/mist_api/models/ap_redundancy_module.rb', line 18 def num_aps_with_switch_redundancy @num_aps_with_switch_redundancy end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/mist_api/models/ap_redundancy_module.rb', line 51 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. num_aps = hash.key?('num_aps') ? hash['num_aps'] : SKIP num_aps_with_switch_redundancy = hash.key?('num_aps_with_switch_redundancy') ? hash['num_aps_with_switch_redundancy'] : SKIP # Create object from extracted values. ApRedundancyModule.new(num_aps, num_aps_with_switch_redundancy) end |
.names ⇒ Object
A mapping from model property names to API property names.
21 22 23 24 25 26 27 |
# File 'lib/mist_api/models/ap_redundancy_module.rb', line 21 def self.names @_hash = {} if @_hash.nil? @_hash['num_aps'] = 'num_aps' @_hash['num_aps_with_switch_redundancy'] = 'num_aps_with_switch_redundancy' @_hash end |
.nullables ⇒ Object
An array for nullable fields
38 39 40 |
# File 'lib/mist_api/models/ap_redundancy_module.rb', line 38 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
30 31 32 33 34 35 |
# File 'lib/mist_api/models/ap_redundancy_module.rb', line 30 def self.optionals %w[ num_aps num_aps_with_switch_redundancy ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
72 73 74 75 76 |
# File 'lib/mist_api/models/ap_redundancy_module.rb', line 72 def inspect class_name = self.class.name.split('::').last "<#{class_name} num_aps: #{@num_aps.inspect}, num_aps_with_switch_redundancy:"\ " #{@num_aps_with_switch_redundancy.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
65 66 67 68 69 |
# File 'lib/mist_api/models/ap_redundancy_module.rb', line 65 def to_s class_name = self.class.name.split('::').last "<#{class_name} num_aps: #{@num_aps}, num_aps_with_switch_redundancy:"\ " #{@num_aps_with_switch_redundancy}>" end |