Class: MistApi::StatsSwitchApRedundancy
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- MistApi::StatsSwitchApRedundancy
- Defined in:
- lib/mist_api/models/stats_switch_ap_redundancy.rb
Overview
StatsSwitchApRedundancy Model.
Instance Attribute Summary collapse
-
#modules ⇒ Hash[String, StatsSwitchApRedundancyModule]
For a VC / stacked switches.
-
#num_aps ⇒ Integer
For a VC / stacked switches.
-
#num_aps_with_switch_redundancy ⇒ Integer
For a VC / stacked switches.
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(modules = SKIP, num_aps = SKIP, num_aps_with_switch_redundancy = SKIP) ⇒ StatsSwitchApRedundancy
constructor
A new instance of StatsSwitchApRedundancy.
-
#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(modules = SKIP, num_aps = SKIP, num_aps_with_switch_redundancy = SKIP) ⇒ StatsSwitchApRedundancy
Returns a new instance of StatsSwitchApRedundancy.
48 49 50 51 52 53 54 55 56 |
# File 'lib/mist_api/models/stats_switch_ap_redundancy.rb', line 48 def initialize(modules = SKIP, num_aps = SKIP, num_aps_with_switch_redundancy = SKIP) @modules = modules unless modules == 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
#modules ⇒ Hash[String, StatsSwitchApRedundancyModule]
For a VC / stacked switches.
14 15 16 |
# File 'lib/mist_api/models/stats_switch_ap_redundancy.rb', line 14 def modules @modules end |
#num_aps ⇒ Integer
For a VC / stacked switches.
18 19 20 |
# File 'lib/mist_api/models/stats_switch_ap_redundancy.rb', line 18 def num_aps @num_aps end |
#num_aps_with_switch_redundancy ⇒ Integer
For a VC / stacked switches.
22 23 24 |
# File 'lib/mist_api/models/stats_switch_ap_redundancy.rb', line 22 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.
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/mist_api/models/stats_switch_ap_redundancy.rb', line 59 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. modules = StatsSwitchApRedundancyModule.from_hash(hash['modules']) if hash['modules'] modules = SKIP unless hash.key?('modules') 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. StatsSwitchApRedundancy.new(modules, num_aps, num_aps_with_switch_redundancy) end |
.names ⇒ Object
A mapping from model property names to API property names.
25 26 27 28 29 30 31 32 |
# File 'lib/mist_api/models/stats_switch_ap_redundancy.rb', line 25 def self.names @_hash = {} if @_hash.nil? @_hash['modules'] = 'modules' @_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
44 45 46 |
# File 'lib/mist_api/models/stats_switch_ap_redundancy.rb', line 44 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
35 36 37 38 39 40 41 |
# File 'lib/mist_api/models/stats_switch_ap_redundancy.rb', line 35 def self.optionals %w[ modules num_aps num_aps_with_switch_redundancy ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
84 85 86 87 88 |
# File 'lib/mist_api/models/stats_switch_ap_redundancy.rb', line 84 def inspect class_name = self.class.name.split('::').last "<#{class_name} modules: #{@modules.inspect}, 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.
77 78 79 80 81 |
# File 'lib/mist_api/models/stats_switch_ap_redundancy.rb', line 77 def to_s class_name = self.class.name.split('::').last "<#{class_name} modules: #{@modules}, num_aps: #{@num_aps}, num_aps_with_switch_redundancy:"\ " #{@num_aps_with_switch_redundancy}>" end |