Class: MistApi::SleImpactedChassisChassisItem
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- MistApi::SleImpactedChassisChassisItem
- Defined in:
- lib/mist_api/models/sle_impacted_chassis_chassis_item.rb
Overview
SleImpactedChassisChassisItem Model.
Instance Attribute Summary collapse
-
#chassis ⇒ String
TODO: Write general description for this method.
-
#degraded ⇒ Float
TODO: Write general description for this method.
-
#duration ⇒ Float
TODO: Write general description for this method.
-
#role ⇒ String
TODO: Write general description for this method.
-
#switch_mac ⇒ String
TODO: Write general description for this method.
-
#switch_name ⇒ String
TODO: Write general description for this method.
-
#total ⇒ Float
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(chassis = SKIP, degraded = SKIP, duration = SKIP, role = SKIP, switch_mac = SKIP, switch_name = SKIP, total = SKIP) ⇒ SleImpactedChassisChassisItem
constructor
A new instance of SleImpactedChassisChassisItem.
-
#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(chassis = SKIP, degraded = SKIP, duration = SKIP, role = SKIP, switch_mac = SKIP, switch_name = SKIP, total = SKIP) ⇒ SleImpactedChassisChassisItem
Returns a new instance of SleImpactedChassisChassisItem.
71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/mist_api/models/sle_impacted_chassis_chassis_item.rb', line 71 def initialize(chassis = SKIP, degraded = SKIP, duration = SKIP, role = SKIP, switch_mac = SKIP, switch_name = SKIP, total = SKIP) @chassis = chassis unless chassis == SKIP @degraded = degraded unless degraded == SKIP @duration = duration unless duration == SKIP @role = role unless role == SKIP @switch_mac = switch_mac unless switch_mac == SKIP @switch_name = switch_name unless switch_name == SKIP @total = total unless total == SKIP end |
Instance Attribute Details
#chassis ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/sle_impacted_chassis_chassis_item.rb', line 14 def chassis @chassis end |
#degraded ⇒ Float
TODO: Write general description for this method
18 19 20 |
# File 'lib/mist_api/models/sle_impacted_chassis_chassis_item.rb', line 18 def degraded @degraded end |
#duration ⇒ Float
TODO: Write general description for this method
22 23 24 |
# File 'lib/mist_api/models/sle_impacted_chassis_chassis_item.rb', line 22 def duration @duration end |
#role ⇒ String
TODO: Write general description for this method
26 27 28 |
# File 'lib/mist_api/models/sle_impacted_chassis_chassis_item.rb', line 26 def role @role end |
#switch_mac ⇒ String
TODO: Write general description for this method
30 31 32 |
# File 'lib/mist_api/models/sle_impacted_chassis_chassis_item.rb', line 30 def switch_mac @switch_mac end |
#switch_name ⇒ String
TODO: Write general description for this method
34 35 36 |
# File 'lib/mist_api/models/sle_impacted_chassis_chassis_item.rb', line 34 def switch_name @switch_name end |
#total ⇒ Float
TODO: Write general description for this method
38 39 40 |
# File 'lib/mist_api/models/sle_impacted_chassis_chassis_item.rb', line 38 def total @total end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
# File 'lib/mist_api/models/sle_impacted_chassis_chassis_item.rb', line 84 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. chassis = hash.key?('chassis') ? hash['chassis'] : SKIP degraded = hash.key?('degraded') ? hash['degraded'] : SKIP duration = hash.key?('duration') ? hash['duration'] : SKIP role = hash.key?('role') ? hash['role'] : SKIP switch_mac = hash.key?('switch_mac') ? hash['switch_mac'] : SKIP switch_name = hash.key?('switch_name') ? hash['switch_name'] : SKIP total = hash.key?('total') ? hash['total'] : SKIP # Create object from extracted values. SleImpactedChassisChassisItem.new(chassis, degraded, duration, role, switch_mac, switch_name, total) end |
.names ⇒ Object
A mapping from model property names to API property names.
41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/mist_api/models/sle_impacted_chassis_chassis_item.rb', line 41 def self.names @_hash = {} if @_hash.nil? @_hash['chassis'] = 'chassis' @_hash['degraded'] = 'degraded' @_hash['duration'] = 'duration' @_hash['role'] = 'role' @_hash['switch_mac'] = 'switch_mac' @_hash['switch_name'] = 'switch_name' @_hash['total'] = 'total' @_hash end |
.nullables ⇒ Object
An array for nullable fields
67 68 69 |
# File 'lib/mist_api/models/sle_impacted_chassis_chassis_item.rb', line 67 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/mist_api/models/sle_impacted_chassis_chassis_item.rb', line 54 def self.optionals %w[ chassis degraded duration role switch_mac switch_name total ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
114 115 116 117 118 119 |
# File 'lib/mist_api/models/sle_impacted_chassis_chassis_item.rb', line 114 def inspect class_name = self.class.name.split('::').last "<#{class_name} chassis: #{@chassis.inspect}, degraded: #{@degraded.inspect}, duration:"\ " #{@duration.inspect}, role: #{@role.inspect}, switch_mac: #{@switch_mac.inspect},"\ " switch_name: #{@switch_name.inspect}, total: #{@total.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
107 108 109 110 111 |
# File 'lib/mist_api/models/sle_impacted_chassis_chassis_item.rb', line 107 def to_s class_name = self.class.name.split('::').last "<#{class_name} chassis: #{@chassis}, degraded: #{@degraded}, duration: #{@duration}, role:"\ " #{@role}, switch_mac: #{@switch_mac}, switch_name: #{@switch_name}, total: #{@total}>" end |