Class: MistApi::StatsSwitchApRedundancyModule

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/mist_api/models/stats_switch_ap_redundancy_module.rb

Overview

StatsSwitchApRedundancyModule Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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) ⇒ StatsSwitchApRedundancyModule

Returns a new instance of StatsSwitchApRedundancyModule.



42
43
44
45
46
47
48
# File 'lib/mist_api/models/stats_switch_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_apsInteger

TODO: Write general description for this method

Returns:

  • (Integer)


14
15
16
# File 'lib/mist_api/models/stats_switch_ap_redundancy_module.rb', line 14

def num_aps
  @num_aps
end

#num_aps_with_switch_redundancyInteger

TODO: Write general description for this method

Returns:

  • (Integer)


18
19
20
# File 'lib/mist_api/models/stats_switch_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/stats_switch_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.
  StatsSwitchApRedundancyModule.new(num_aps,
                                    num_aps_with_switch_redundancy)
end

.namesObject

A mapping from model property names to API property names.



21
22
23
24
25
26
27
# File 'lib/mist_api/models/stats_switch_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

.nullablesObject

An array for nullable fields



38
39
40
# File 'lib/mist_api/models/stats_switch_ap_redundancy_module.rb', line 38

def self.nullables
  []
end

.optionalsObject

An array for optional fields



30
31
32
33
34
35
# File 'lib/mist_api/models/stats_switch_ap_redundancy_module.rb', line 30

def self.optionals
  %w[
    num_aps
    num_aps_with_switch_redundancy
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



72
73
74
75
76
# File 'lib/mist_api/models/stats_switch_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_sObject

Provides a human-readable string representation of the object.



65
66
67
68
69
# File 'lib/mist_api/models/stats_switch_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