Class: IntersightClient::EquipmentChassis
- Inherits:
-
EquipmentBase
- Object
- MoBaseMo
- InventoryBase
- EquipmentBase
- IntersightClient::EquipmentChassis
- Defined in:
- lib/intersight_client/models/equipment_chassis.rb
Overview
A physical holder housing blade servers.
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#alarm_summary ⇒ Object
Returns the value of attribute alarm_summary.
-
#blades ⇒ Object
An array of relationships to computeBlade resources.
-
#chassis_id ⇒ Object
The assigned identifier for a chassis.
-
#class_id ⇒ Object
The fully-qualified name of the instantiated, concrete type.
-
#connection_path ⇒ Object
This field identifies the connectivity path for the chassis enclosure.
-
#connection_status ⇒ Object
This field identifies the connectivity status for the chassis enclosure.
-
#description ⇒ Object
This field is to provide description for chassis model.
-
#expander_modules ⇒ Object
An array of relationships to equipmentExpanderModule resources.
-
#fan_control ⇒ Object
Returns the value of attribute fan_control.
-
#fanmodules ⇒ Object
An array of relationships to equipmentFanModule resources.
-
#fault_summary ⇒ Object
This field summarizes the faults on the chassis enclosure.
-
#inventory_device_info ⇒ Object
Returns the value of attribute inventory_device_info.
-
#ioms ⇒ Object
An array of relationships to equipmentIoCard resources.
-
#locator_led ⇒ Object
Returns the value of attribute locator_led.
-
#management_mode ⇒ Object
The management mode of the blade server chassis.
-
#name ⇒ Object
This field identifies the name for the chassis enclosure.
-
#object_type ⇒ Object
The fully-qualified name of the instantiated, concrete type.
-
#oper_reason ⇒ Object
Returns the value of attribute oper_reason.
-
#oper_state ⇒ Object
This field identifies the Chassis Operational State.
-
#part_number ⇒ Object
Part Number identifier for the chassis enclosure.
-
#pid ⇒ Object
This field identifies the Product ID for the chassis enclosure.
-
#platform_type ⇒ Object
The platform type that the chassis is a part of.
-
#power_control_state ⇒ Object
Returns the value of attribute power_control_state.
-
#product_name ⇒ Object
This field identifies the Product Name for the chassis enclosure.
-
#psu_control ⇒ Object
Returns the value of attribute psu_control.
-
#psus ⇒ Object
An array of relationships to equipmentPsu resources.
-
#registered_device ⇒ Object
Returns the value of attribute registered_device.
-
#sasexpanders ⇒ Object
An array of relationships to storageSasExpander resources.
-
#siocs ⇒ Object
An array of relationships to equipmentSystemIoController resources.
-
#sku ⇒ Object
This field identifies the Stock Keeping Unit for the chassis enclosure.
-
#storage_enclosures ⇒ Object
An array of relationships to storageEnclosure resources.
-
#vid ⇒ Object
This field identifies the Vendor ID for the chassis enclosure.
-
#virtual_drive_container ⇒ Object
An array of relationships to storageVirtualDriveContainer resources.
Attributes inherited from EquipmentBase
#model, #presence, #previous_fru, #revision, #serial, #vendor
Attributes inherited from InventoryBase
Attributes inherited from MoBaseMo
#account_moid, #ancestors, #create_time, #display_names, #domain_group_moid, #mod_time, #moid, #owners, #parent, #permission_resources, #shared_scope, #tags, #version_context
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns the key-value map of all the JSON attributes this model knows about, including the ones defined in its parent(s).
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about, including the ones defined in its parent(s).
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_all_of ⇒ Object
List of class defined in allOf (OpenAPI v3).
-
.openapi_discriminator_name ⇒ Object
discriminator’s property name in OpenAPI v3.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ EquipmentChassis
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ EquipmentChassis
Initializes the object
252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 252 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `IntersightClient::EquipmentChassis` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `#{self.class.name}`. Please check the name to make sure it's valid. List of attributes: " + self.class.acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } # call parent's initialize super(attributes) if attributes.key?(:'class_id') self.class_id = attributes[:'class_id'] else self.class_id = 'equipment.Chassis' end if attributes.key?(:'object_type') self.object_type = attributes[:'object_type'] else self.object_type = 'equipment.Chassis' end if attributes.key?(:'alarm_summary') self.alarm_summary = attributes[:'alarm_summary'] end if attributes.key?(:'chassis_id') self.chassis_id = attributes[:'chassis_id'] end if attributes.key?(:'connection_path') self.connection_path = attributes[:'connection_path'] end if attributes.key?(:'connection_status') self.connection_status = attributes[:'connection_status'] end if attributes.key?(:'description') self.description = attributes[:'description'] end if attributes.key?(:'fault_summary') self.fault_summary = attributes[:'fault_summary'] end if attributes.key?(:'management_mode') self.management_mode = attributes[:'management_mode'] else self.management_mode = 'IntersightStandalone' end if attributes.key?(:'name') self.name = attributes[:'name'] end if attributes.key?(:'oper_reason') if (value = attributes[:'oper_reason']).is_a?(Array) self.oper_reason = value end end if attributes.key?(:'oper_state') self.oper_state = attributes[:'oper_state'] end if attributes.key?(:'part_number') self.part_number = attributes[:'part_number'] end if attributes.key?(:'pid') self.pid = attributes[:'pid'] end if attributes.key?(:'platform_type') self.platform_type = attributes[:'platform_type'] end if attributes.key?(:'product_name') self.product_name = attributes[:'product_name'] end if attributes.key?(:'sku') self.sku = attributes[:'sku'] end if attributes.key?(:'vid') self.vid = attributes[:'vid'] end if attributes.key?(:'blades') if (value = attributes[:'blades']).is_a?(Array) self.blades = value end end if attributes.key?(:'expander_modules') if (value = attributes[:'expander_modules']).is_a?(Array) self. = value end end if attributes.key?(:'fan_control') self.fan_control = attributes[:'fan_control'] end if attributes.key?(:'fanmodules') if (value = attributes[:'fanmodules']).is_a?(Array) self.fanmodules = value end end if attributes.key?(:'inventory_device_info') self.inventory_device_info = attributes[:'inventory_device_info'] end if attributes.key?(:'ioms') if (value = attributes[:'ioms']).is_a?(Array) self.ioms = value end end if attributes.key?(:'locator_led') self.locator_led = attributes[:'locator_led'] end if attributes.key?(:'power_control_state') self.power_control_state = attributes[:'power_control_state'] end if attributes.key?(:'psu_control') self.psu_control = attributes[:'psu_control'] end if attributes.key?(:'psus') if (value = attributes[:'psus']).is_a?(Array) self.psus = value end end if attributes.key?(:'registered_device') self.registered_device = attributes[:'registered_device'] end if attributes.key?(:'sasexpanders') if (value = attributes[:'sasexpanders']).is_a?(Array) self. = value end end if attributes.key?(:'siocs') if (value = attributes[:'siocs']).is_a?(Array) self.siocs = value end end if attributes.key?(:'storage_enclosures') if (value = attributes[:'storage_enclosures']).is_a?(Array) self.storage_enclosures = value end end if attributes.key?(:'virtual_drive_container') if (value = attributes[:'virtual_drive_container']).is_a?(Array) self.virtual_drive_container = value end end end |
Instance Attribute Details
#alarm_summary ⇒ Object
Returns the value of attribute alarm_summary.
25 26 27 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 25 def alarm_summary @alarm_summary end |
#blades ⇒ Object
An array of relationships to computeBlade resources.
72 73 74 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 72 def blades @blades end |
#chassis_id ⇒ Object
The assigned identifier for a chassis.
28 29 30 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 28 def chassis_id @chassis_id end |
#class_id ⇒ Object
The fully-qualified name of the instantiated, concrete type. This property is used as a discriminator to identify the type of the payload when marshaling and unmarshaling data.
20 21 22 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 20 def class_id @class_id end |
#connection_path ⇒ Object
This field identifies the connectivity path for the chassis enclosure.
31 32 33 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 31 def connection_path @connection_path end |
#connection_status ⇒ Object
This field identifies the connectivity status for the chassis enclosure.
34 35 36 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 34 def connection_status @connection_status end |
#description ⇒ Object
This field is to provide description for chassis model.
37 38 39 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 37 def description @description end |
#expander_modules ⇒ Object
An array of relationships to equipmentExpanderModule resources.
75 76 77 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 75 def end |
#fan_control ⇒ Object
Returns the value of attribute fan_control.
77 78 79 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 77 def fan_control @fan_control end |
#fanmodules ⇒ Object
An array of relationships to equipmentFanModule resources.
80 81 82 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 80 def fanmodules @fanmodules end |
#fault_summary ⇒ Object
This field summarizes the faults on the chassis enclosure.
40 41 42 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 40 def fault_summary @fault_summary end |
#inventory_device_info ⇒ Object
Returns the value of attribute inventory_device_info.
82 83 84 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 82 def inventory_device_info @inventory_device_info end |
#ioms ⇒ Object
An array of relationships to equipmentIoCard resources.
85 86 87 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 85 def ioms @ioms end |
#locator_led ⇒ Object
Returns the value of attribute locator_led.
87 88 89 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 87 def locator_led @locator_led end |
#management_mode ⇒ Object
The management mode of the blade server chassis. * ‘IntersightStandalone` - Intersight Standalone mode of operation. * `UCSM` - Unified Computing System Manager mode of operation. * `Intersight` - Intersight managed mode of operation.
43 44 45 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 43 def management_mode @management_mode end |
#name ⇒ Object
This field identifies the name for the chassis enclosure.
46 47 48 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 46 def name @name end |
#object_type ⇒ Object
The fully-qualified name of the instantiated, concrete type. The value should be the same as the ‘ClassId’ property.
23 24 25 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 23 def object_type @object_type end |
#oper_reason ⇒ Object
Returns the value of attribute oper_reason.
48 49 50 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 48 def oper_reason @oper_reason end |
#oper_state ⇒ Object
This field identifies the Chassis Operational State.
51 52 53 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 51 def oper_state @oper_state end |
#part_number ⇒ Object
Part Number identifier for the chassis enclosure.
54 55 56 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 54 def part_number @part_number end |
#pid ⇒ Object
This field identifies the Product ID for the chassis enclosure.
57 58 59 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 57 def pid @pid end |
#platform_type ⇒ Object
The platform type that the chassis is a part of.
60 61 62 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 60 def platform_type @platform_type end |
#power_control_state ⇒ Object
Returns the value of attribute power_control_state.
89 90 91 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 89 def power_control_state @power_control_state end |
#product_name ⇒ Object
This field identifies the Product Name for the chassis enclosure.
63 64 65 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 63 def product_name @product_name end |
#psu_control ⇒ Object
Returns the value of attribute psu_control.
91 92 93 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 91 def psu_control @psu_control end |
#psus ⇒ Object
An array of relationships to equipmentPsu resources.
94 95 96 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 94 def psus @psus end |
#registered_device ⇒ Object
Returns the value of attribute registered_device.
96 97 98 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 96 def registered_device @registered_device end |
#sasexpanders ⇒ Object
An array of relationships to storageSasExpander resources.
99 100 101 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 99 def end |
#siocs ⇒ Object
An array of relationships to equipmentSystemIoController resources.
102 103 104 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 102 def siocs @siocs end |
#sku ⇒ Object
This field identifies the Stock Keeping Unit for the chassis enclosure.
66 67 68 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 66 def sku @sku end |
#storage_enclosures ⇒ Object
An array of relationships to storageEnclosure resources.
105 106 107 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 105 def storage_enclosures @storage_enclosures end |
#vid ⇒ Object
This field identifies the Vendor ID for the chassis enclosure.
69 70 71 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 69 def vid @vid end |
#virtual_drive_container ⇒ Object
An array of relationships to storageVirtualDriveContainer resources.
108 109 110 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 108 def virtual_drive_container @virtual_drive_container end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns the key-value map of all the JSON attributes this model knows about, including the ones defined in its parent(s)
177 178 179 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 177 def self.acceptable_attribute_map attribute_map.merge(superclass.acceptable_attribute_map) end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about, including the ones defined in its parent(s)
172 173 174 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 172 def self.acceptable_attributes attribute_map.values.concat(superclass.acceptable_attributes) end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 133 def self.attribute_map { :'class_id' => :'ClassId', :'object_type' => :'ObjectType', :'alarm_summary' => :'AlarmSummary', :'chassis_id' => :'ChassisId', :'connection_path' => :'ConnectionPath', :'connection_status' => :'ConnectionStatus', :'description' => :'Description', :'fault_summary' => :'FaultSummary', :'management_mode' => :'ManagementMode', :'name' => :'Name', :'oper_reason' => :'OperReason', :'oper_state' => :'OperState', :'part_number' => :'PartNumber', :'pid' => :'Pid', :'platform_type' => :'PlatformType', :'product_name' => :'ProductName', :'sku' => :'Sku', :'vid' => :'Vid', :'blades' => :'Blades', :'expander_modules' => :'ExpanderModules', :'fan_control' => :'FanControl', :'fanmodules' => :'Fanmodules', :'inventory_device_info' => :'InventoryDeviceInfo', :'ioms' => :'Ioms', :'locator_led' => :'LocatorLed', :'power_control_state' => :'PowerControlState', :'psu_control' => :'PsuControl', :'psus' => :'Psus', :'registered_device' => :'RegisteredDevice', :'sasexpanders' => :'Sasexpanders', :'siocs' => :'Siocs', :'storage_enclosures' => :'StorageEnclosures', :'virtual_drive_container' => :'VirtualDriveContainer' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
541 542 543 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 541 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_all_of ⇒ Object
List of class defined in allOf (OpenAPI v3)
238 239 240 241 242 243 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 238 def self.openapi_all_of [ :'EquipmentBase', :'EquipmentChassisAllOf' ] end |
.openapi_discriminator_name ⇒ Object
discriminator’s property name in OpenAPI v3
246 247 248 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 246 def self.openapi_discriminator_name :'ClassId' end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 221 def self.openapi_nullable Set.new([ :'alarm_summary', :'oper_reason', :'blades', :'expander_modules', :'fanmodules', :'ioms', :'psus', :'sasexpanders', :'siocs', :'storage_enclosures', :'virtual_drive_container' ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 182 def self.openapi_types { :'class_id' => :'String', :'object_type' => :'String', :'alarm_summary' => :'ComputeAlarmSummary', :'chassis_id' => :'Integer', :'connection_path' => :'String', :'connection_status' => :'String', :'description' => :'String', :'fault_summary' => :'Integer', :'management_mode' => :'String', :'name' => :'String', :'oper_reason' => :'Array<String>', :'oper_state' => :'String', :'part_number' => :'String', :'pid' => :'String', :'platform_type' => :'String', :'product_name' => :'String', :'sku' => :'String', :'vid' => :'String', :'blades' => :'Array<ComputeBladeRelationship>', :'expander_modules' => :'Array<EquipmentExpanderModuleRelationship>', :'fan_control' => :'EquipmentFanControlRelationship', :'fanmodules' => :'Array<EquipmentFanModuleRelationship>', :'inventory_device_info' => :'InventoryDeviceInfoRelationship', :'ioms' => :'Array<EquipmentIoCardRelationship>', :'locator_led' => :'EquipmentLocatorLedRelationship', :'power_control_state' => :'PowerControlStateRelationship', :'psu_control' => :'EquipmentPsuControlRelationship', :'psus' => :'Array<EquipmentPsuRelationship>', :'registered_device' => :'AssetDeviceRegistrationRelationship', :'sasexpanders' => :'Array<StorageSasExpanderRelationship>', :'siocs' => :'Array<EquipmentSystemIoControllerRelationship>', :'storage_enclosures' => :'Array<StorageEnclosureRelationship>', :'virtual_drive_container' => :'Array<StorageVirtualDriveContainerRelationship>' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 488 def ==(o) return true if self.equal?(o) self.class == o.class && class_id == o.class_id && object_type == o.object_type && alarm_summary == o.alarm_summary && chassis_id == o.chassis_id && connection_path == o.connection_path && connection_status == o.connection_status && description == o.description && fault_summary == o.fault_summary && management_mode == o.management_mode && name == o.name && oper_reason == o.oper_reason && oper_state == o.oper_state && part_number == o.part_number && pid == o.pid && platform_type == o.platform_type && product_name == o.product_name && sku == o.sku && vid == o.vid && blades == o.blades && == o. && fan_control == o.fan_control && fanmodules == o.fanmodules && inventory_device_info == o.inventory_device_info && ioms == o.ioms && locator_led == o.locator_led && power_control_state == o.power_control_state && psu_control == o.psu_control && psus == o.psus && registered_device == o.registered_device && == o. && siocs == o.siocs && storage_enclosures == o.storage_enclosures && virtual_drive_container == o.virtual_drive_container && super(o) end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 572 def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model # models (e.g. Pet) or oneOf klass = IntersightClient.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
643 644 645 646 647 648 649 650 651 652 653 654 655 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 643 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 548 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) super(attributes) EquipmentChassis.openapi_types.each_pair do |key, type| if attributes[EquipmentChassis.attribute_map[key]].nil? && EquipmentChassis.openapi_nullable.include?(key) self.send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[EquipmentChassis.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[EquipmentChassis.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[EquipmentChassis.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[EquipmentChassis.attribute_map[key]])) end end self end |
#eql?(o) ⇒ Boolean
528 529 530 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 528 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
534 535 536 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 534 def hash [class_id, object_type, alarm_summary, chassis_id, connection_path, connection_status, description, fault_summary, management_mode, name, oper_reason, oper_state, part_number, pid, platform_type, product_name, sku, vid, blades, , fan_control, fanmodules, inventory_device_info, ioms, locator_led, power_control_state, psu_control, psus, registered_device, , siocs, storage_enclosures, virtual_drive_container].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
429 430 431 432 433 434 435 436 437 438 439 440 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 429 def list_invalid_properties invalid_properties = super if @class_id.nil? invalid_properties.push('invalid value for "class_id", class_id cannot be nil.') end if @object_type.nil? invalid_properties.push('invalid value for "object_type", object_type cannot be nil.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
619 620 621 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 619 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
625 626 627 628 629 630 631 632 633 634 635 636 637 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 625 def to_hash hash = super EquipmentChassis.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = EquipmentChassis.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
613 614 615 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 613 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
444 445 446 447 448 449 450 451 452 453 454 |
# File 'lib/intersight_client/models/equipment_chassis.rb', line 444 def valid? return false if @class_id.nil? class_id_validator = EnumAttributeValidator.new('String', ["equipment.Chassis"]) return false unless class_id_validator.valid?(@class_id) return false if @object_type.nil? object_type_validator = EnumAttributeValidator.new('String', ["equipment.Chassis"]) return false unless object_type_validator.valid?(@object_type) management_mode_validator = EnumAttributeValidator.new('String', ["IntersightStandalone", "UCSM", "Intersight"]) return false unless management_mode_validator.valid?(@management_mode) true && super end |