Class: IntersightClient::ComputePhysicalAllOf

Inherits:
Object
  • Object
show all
Defined in:
lib/intersight_client/models/compute_physical_all_of.rb

Overview

Definition of the list of properties defined in ‘compute.Physical’, excluding properties defined in parent classes.

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ ComputePhysicalAllOf

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



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
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 294

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `IntersightClient::ComputePhysicalAllOf` 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
  }

  if attributes.key?(:'class_id')
    self.class_id = attributes[:'class_id']
  end

  if attributes.key?(:'object_type')
    self.object_type = attributes[:'object_type']
  end

  if attributes.key?(:'admin_power_state')
    self.admin_power_state = attributes[:'admin_power_state']
  end

  if attributes.key?(:'alarm_summary')
    self.alarm_summary = attributes[:'alarm_summary']
  end

  if attributes.key?(:'asset_tag')
    self.asset_tag = attributes[:'asset_tag']
  end

  if attributes.key?(:'available_memory')
    self.available_memory = attributes[:'available_memory']
  end

  if attributes.key?(:'bios_post_complete')
    self.bios_post_complete = attributes[:'bios_post_complete']
  end

  if attributes.key?(:'fault_summary')
    self.fault_summary = attributes[:'fault_summary']
  end

  if attributes.key?(:'hardware_uuid')
    self.hardware_uuid = attributes[:'hardware_uuid']
  end

  if attributes.key?(:'kvm_ip_addresses')
    if (value = attributes[:'kvm_ip_addresses']).is_a?(Array)
      self.kvm_ip_addresses = value
    end
  end

  if attributes.key?(:'management_mode')
    self.management_mode = attributes[:'management_mode']
  else
    self.management_mode = 'IntersightStandalone'
  end

  if attributes.key?(:'memory_speed')
    self.memory_speed = attributes[:'memory_speed']
  end

  if attributes.key?(:'mgmt_ip_address')
    self.mgmt_ip_address = attributes[:'mgmt_ip_address']
  end

  if attributes.key?(:'num_adaptors')
    self.num_adaptors = attributes[:'num_adaptors']
  end

  if attributes.key?(:'num_cpu_cores')
    self.num_cpu_cores = attributes[:'num_cpu_cores']
  end

  if attributes.key?(:'num_cpu_cores_enabled')
    self.num_cpu_cores_enabled = attributes[:'num_cpu_cores_enabled']
  end

  if attributes.key?(:'num_cpus')
    self.num_cpus = attributes[:'num_cpus']
  end

  if attributes.key?(:'num_eth_host_interfaces')
    self.num_eth_host_interfaces = attributes[:'num_eth_host_interfaces']
  end

  if attributes.key?(:'num_fc_host_interfaces')
    self.num_fc_host_interfaces = attributes[:'num_fc_host_interfaces']
  end

  if attributes.key?(:'num_threads')
    self.num_threads = attributes[:'num_threads']
  end

  if attributes.key?(:'oper_power_state')
    self.oper_power_state = attributes[:'oper_power_state']
  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?(:'operability')
    self.operability = attributes[:'operability']
  end

  if attributes.key?(:'platform_type')
    self.platform_type = attributes[:'platform_type']
  end

  if attributes.key?(:'service_profile')
    self.service_profile = attributes[:'service_profile']
  end

  if attributes.key?(:'total_memory')
    self.total_memory = attributes[:'total_memory']
  end

  if attributes.key?(:'user_label')
    self.user_label = attributes[:'user_label']
  end

  if attributes.key?(:'uuid')
    self.uuid = attributes[:'uuid']
  end

  if attributes.key?(:'boot_cdd_devices')
    if (value = attributes[:'boot_cdd_devices']).is_a?(Array)
      self.boot_cdd_devices = value
    end
  end

  if attributes.key?(:'boot_device_boot_security')
    self.boot_device_boot_security = attributes[:'boot_device_boot_security']
  end

  if attributes.key?(:'boot_hdd_devices')
    if (value = attributes[:'boot_hdd_devices']).is_a?(Array)
      self.boot_hdd_devices = value
    end
  end

  if attributes.key?(:'boot_iscsi_devices')
    if (value = attributes[:'boot_iscsi_devices']).is_a?(Array)
      self.boot_iscsi_devices = value
    end
  end

  if attributes.key?(:'boot_nvme_devices')
    if (value = attributes[:'boot_nvme_devices']).is_a?(Array)
      self.boot_nvme_devices = value
    end
  end

  if attributes.key?(:'boot_pch_storage_devices')
    if (value = attributes[:'boot_pch_storage_devices']).is_a?(Array)
      self.boot_pch_storage_devices = value
    end
  end

  if attributes.key?(:'boot_pxe_devices')
    if (value = attributes[:'boot_pxe_devices']).is_a?(Array)
      self.boot_pxe_devices = value
    end
  end

  if attributes.key?(:'boot_san_devices')
    if (value = attributes[:'boot_san_devices']).is_a?(Array)
      self.boot_san_devices = value
    end
  end

  if attributes.key?(:'boot_sd_devices')
    if (value = attributes[:'boot_sd_devices']).is_a?(Array)
      self.boot_sd_devices = value
    end
  end

  if attributes.key?(:'boot_uefi_shell_devices')
    if (value = attributes[:'boot_uefi_shell_devices']).is_a?(Array)
      self.boot_uefi_shell_devices = value
    end
  end

  if attributes.key?(:'boot_usb_devices')
    if (value = attributes[:'boot_usb_devices']).is_a?(Array)
      self.boot_usb_devices = value
    end
  end

  if attributes.key?(:'boot_vmedia_devices')
    if (value = attributes[:'boot_vmedia_devices']).is_a?(Array)
      self.boot_vmedia_devices = value
    end
  end

  if attributes.key?(:'mgmt_identity')
    self.mgmt_identity = attributes[:'mgmt_identity']
  end

  if attributes.key?(:'vmedia')
    self.vmedia = attributes[:'vmedia']
  end
end

Instance Attribute Details

#admin_power_stateObject

The desired power state of the server.



26
27
28
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 26

def admin_power_state
  @admin_power_state
end

#alarm_summaryObject

Returns the value of attribute alarm_summary.



28
29
30
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 28

def alarm_summary
  @alarm_summary
end

#asset_tagObject

The user defined asset tag assigned to the server.



31
32
33
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 31

def asset_tag
  @asset_tag
end

#available_memoryObject

The amount of memory available on the server.



34
35
36
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 34

def available_memory
  @available_memory
end

#bios_post_completeObject

The BIOS POST completion status of the server.



37
38
39
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 37

def bios_post_complete
  @bios_post_complete
end

#boot_cdd_devicesObject

An array of relationships to bootCddDevice resources.



104
105
106
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 104

def boot_cdd_devices
  @boot_cdd_devices
end

#boot_device_boot_securityObject

Returns the value of attribute boot_device_boot_security.



106
107
108
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 106

def boot_device_boot_security
  @boot_device_boot_security
end

#boot_hdd_devicesObject

An array of relationships to bootHddDevice resources.



109
110
111
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 109

def boot_hdd_devices
  @boot_hdd_devices
end

#boot_iscsi_devicesObject

An array of relationships to bootIscsiDevice resources.



112
113
114
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 112

def boot_iscsi_devices
  @boot_iscsi_devices
end

#boot_nvme_devicesObject

An array of relationships to bootNvmeDevice resources.



115
116
117
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 115

def boot_nvme_devices
  @boot_nvme_devices
end

#boot_pch_storage_devicesObject

An array of relationships to bootPchStorageDevice resources.



118
119
120
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 118

def boot_pch_storage_devices
  @boot_pch_storage_devices
end

#boot_pxe_devicesObject

An array of relationships to bootPxeDevice resources.



121
122
123
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 121

def boot_pxe_devices
  @boot_pxe_devices
end

#boot_san_devicesObject

An array of relationships to bootSanDevice resources.



124
125
126
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 124

def boot_san_devices
  @boot_san_devices
end

#boot_sd_devicesObject

An array of relationships to bootSdDevice resources.



127
128
129
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 127

def boot_sd_devices
  @boot_sd_devices
end

#boot_uefi_shell_devicesObject

An array of relationships to bootUefiShellDevice resources.



130
131
132
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 130

def boot_uefi_shell_devices
  @boot_uefi_shell_devices
end

#boot_usb_devicesObject

An array of relationships to bootUsbDevice resources.



133
134
135
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 133

def boot_usb_devices
  @boot_usb_devices
end

#boot_vmedia_devicesObject

An array of relationships to bootVmediaDevice resources.



136
137
138
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 136

def boot_vmedia_devices
  @boot_vmedia_devices
end

#class_idObject

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. The enum values provides the list of concrete types that can be instantiated from this abstract type.



20
21
22
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 20

def class_id
  @class_id
end

#fault_summaryObject

The fault summary for the server.



40
41
42
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 40

def fault_summary
  @fault_summary
end

#hardware_uuidObject

The universally unique hardware identity of the server provided by the manufacturer.



43
44
45
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 43

def hardware_uuid
  @hardware_uuid
end

#kvm_ip_addressesObject

Returns the value of attribute kvm_ip_addresses.



45
46
47
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 45

def kvm_ip_addresses
  @kvm_ip_addresses
end

#management_modeObject

The management mode of the server. * ‘IntersightStandalone` - Intersight Standalone mode of operation. * `UCSM` - Unified Computing System Manager mode of operation. * `Intersight` - Intersight managed mode of operation.



48
49
50
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 48

def management_mode
  @management_mode
end

#memory_speedObject

The maximum memory speed in MHz available on the server.



51
52
53
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 51

def memory_speed
  @memory_speed
end

#mgmt_identityObject

Returns the value of attribute mgmt_identity.



138
139
140
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 138

def mgmt_identity
  @mgmt_identity
end

#mgmt_ip_addressObject

Management address of the server.



54
55
56
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 54

def mgmt_ip_address
  @mgmt_ip_address
end

#num_adaptorsObject

The total number of network adapters present on the server.



57
58
59
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 57

def num_adaptors
  @num_adaptors
end

#num_cpu_coresObject

The total number of CPU cores present on the server.



60
61
62
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 60

def num_cpu_cores
  @num_cpu_cores
end

#num_cpu_cores_enabledObject

The total number of CPU cores enabled on the server.



63
64
65
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 63

def num_cpu_cores_enabled
  @num_cpu_cores_enabled
end

#num_cpusObject

The total number of CPUs present on the server.



66
67
68
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 66

def num_cpus
  @num_cpus
end

#num_eth_host_interfacesObject

The total number of vNICs which are visible to a host on the server.



69
70
71
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 69

def num_eth_host_interfaces
  @num_eth_host_interfaces
end

#num_fc_host_interfacesObject

The total number of vHBAs which are visible to a host on the server.



72
73
74
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 72

def num_fc_host_interfaces
  @num_fc_host_interfaces
end

#num_threadsObject

The total number of threads the server is capable of handling.



75
76
77
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 75

def num_threads
  @num_threads
end

#object_typeObject

The fully-qualified name of the instantiated, concrete type. The value should be the same as the ‘ClassId’ property. The enum values provides the list of concrete types that can be instantiated from this abstract type.



23
24
25
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 23

def object_type
  @object_type
end

#oper_power_stateObject

The actual power state of the server.



78
79
80
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 78

def oper_power_state
  @oper_power_state
end

#oper_reasonObject

Returns the value of attribute oper_reason.



80
81
82
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 80

def oper_reason
  @oper_reason
end

#oper_stateObject

The operational state of the server.



83
84
85
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 83

def oper_state
  @oper_state
end

#operabilityObject

The operability of the server.



86
87
88
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 86

def operability
  @operability
end

#platform_typeObject

The platform type of the registered device - whether managed by UCSM or operating in standalone mode.



89
90
91
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 89

def platform_type
  @platform_type
end

#service_profileObject

The distinguished name of the service profile to which the server is associated to. It is applicable only for servers which are managed via UCSM.



92
93
94
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 92

def service_profile
  @service_profile
end

#total_memoryObject

The total memory available on the server.



95
96
97
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 95

def total_memory
  @total_memory
end

#user_labelObject

The user defined label assigned to the server.



98
99
100
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 98

def user_label
  @user_label
end

#uuidObject

The universally unique identity of the server.



101
102
103
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 101

def uuid
  @uuid
end

#vmediaObject

Returns the value of attribute vmedia.



140
141
142
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 140

def vmedia
  @vmedia
end

Class Method Details

.acceptable_attribute_mapObject

Returns the key-value map of all the JSON attributes this model knows about



219
220
221
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 219

def self.acceptable_attribute_map
  attribute_map
end

.acceptable_attributesObject

Returns all the JSON keys this model knows about



214
215
216
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 214

def self.acceptable_attributes
  attribute_map.values
end

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
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
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 165

def self.attribute_map
  {
    :'class_id' => :'ClassId',
    :'object_type' => :'ObjectType',
    :'admin_power_state' => :'AdminPowerState',
    :'alarm_summary' => :'AlarmSummary',
    :'asset_tag' => :'AssetTag',
    :'available_memory' => :'AvailableMemory',
    :'bios_post_complete' => :'BiosPostComplete',
    :'fault_summary' => :'FaultSummary',
    :'hardware_uuid' => :'HardwareUuid',
    :'kvm_ip_addresses' => :'KvmIpAddresses',
    :'management_mode' => :'ManagementMode',
    :'memory_speed' => :'MemorySpeed',
    :'mgmt_ip_address' => :'MgmtIpAddress',
    :'num_adaptors' => :'NumAdaptors',
    :'num_cpu_cores' => :'NumCpuCores',
    :'num_cpu_cores_enabled' => :'NumCpuCoresEnabled',
    :'num_cpus' => :'NumCpus',
    :'num_eth_host_interfaces' => :'NumEthHostInterfaces',
    :'num_fc_host_interfaces' => :'NumFcHostInterfaces',
    :'num_threads' => :'NumThreads',
    :'oper_power_state' => :'OperPowerState',
    :'oper_reason' => :'OperReason',
    :'oper_state' => :'OperState',
    :'operability' => :'Operability',
    :'platform_type' => :'PlatformType',
    :'service_profile' => :'ServiceProfile',
    :'total_memory' => :'TotalMemory',
    :'user_label' => :'UserLabel',
    :'uuid' => :'Uuid',
    :'boot_cdd_devices' => :'BootCddDevices',
    :'boot_device_boot_security' => :'BootDeviceBootSecurity',
    :'boot_hdd_devices' => :'BootHddDevices',
    :'boot_iscsi_devices' => :'BootIscsiDevices',
    :'boot_nvme_devices' => :'BootNvmeDevices',
    :'boot_pch_storage_devices' => :'BootPchStorageDevices',
    :'boot_pxe_devices' => :'BootPxeDevices',
    :'boot_san_devices' => :'BootSanDevices',
    :'boot_sd_devices' => :'BootSdDevices',
    :'boot_uefi_shell_devices' => :'BootUefiShellDevices',
    :'boot_usb_devices' => :'BootUsbDevices',
    :'boot_vmedia_devices' => :'BootVmediaDevices',
    :'mgmt_identity' => :'MgmtIdentity',
    :'vmedia' => :'Vmedia'
  }
end

.build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



632
633
634
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 632

def self.build_from_hash(attributes)
  new.build_from_hash(attributes)
end

.openapi_nullableObject

List of attributes with nullable: true



273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 273

def self.openapi_nullable
  Set.new([
    :'alarm_summary',
    :'kvm_ip_addresses',
    :'oper_reason',
    :'boot_cdd_devices',
    :'boot_hdd_devices',
    :'boot_iscsi_devices',
    :'boot_nvme_devices',
    :'boot_pch_storage_devices',
    :'boot_pxe_devices',
    :'boot_san_devices',
    :'boot_sd_devices',
    :'boot_uefi_shell_devices',
    :'boot_usb_devices',
    :'boot_vmedia_devices',
  ])
end

.openapi_typesObject

Attribute type mapping.



224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 224

def self.openapi_types
  {
    :'class_id' => :'String',
    :'object_type' => :'String',
    :'admin_power_state' => :'String',
    :'alarm_summary' => :'ComputeAlarmSummary',
    :'asset_tag' => :'String',
    :'available_memory' => :'Integer',
    :'bios_post_complete' => :'Boolean',
    :'fault_summary' => :'Integer',
    :'hardware_uuid' => :'String',
    :'kvm_ip_addresses' => :'Array<ComputeIpAddress>',
    :'management_mode' => :'String',
    :'memory_speed' => :'String',
    :'mgmt_ip_address' => :'String',
    :'num_adaptors' => :'Integer',
    :'num_cpu_cores' => :'Integer',
    :'num_cpu_cores_enabled' => :'Integer',
    :'num_cpus' => :'Integer',
    :'num_eth_host_interfaces' => :'Integer',
    :'num_fc_host_interfaces' => :'Integer',
    :'num_threads' => :'Integer',
    :'oper_power_state' => :'String',
    :'oper_reason' => :'Array<String>',
    :'oper_state' => :'String',
    :'operability' => :'String',
    :'platform_type' => :'String',
    :'service_profile' => :'String',
    :'total_memory' => :'Integer',
    :'user_label' => :'String',
    :'uuid' => :'String',
    :'boot_cdd_devices' => :'Array<BootCddDeviceRelationship>',
    :'boot_device_boot_security' => :'BootDeviceBootSecurityRelationship',
    :'boot_hdd_devices' => :'Array<BootHddDeviceRelationship>',
    :'boot_iscsi_devices' => :'Array<BootIscsiDeviceRelationship>',
    :'boot_nvme_devices' => :'Array<BootNvmeDeviceRelationship>',
    :'boot_pch_storage_devices' => :'Array<BootPchStorageDeviceRelationship>',
    :'boot_pxe_devices' => :'Array<BootPxeDeviceRelationship>',
    :'boot_san_devices' => :'Array<BootSanDeviceRelationship>',
    :'boot_sd_devices' => :'Array<BootSdDeviceRelationship>',
    :'boot_uefi_shell_devices' => :'Array<BootUefiShellDeviceRelationship>',
    :'boot_usb_devices' => :'Array<BootUsbDeviceRelationship>',
    :'boot_vmedia_devices' => :'Array<BootVmediaDeviceRelationship>',
    :'mgmt_identity' => :'EquipmentPhysicalIdentityRelationship',
    :'vmedia' => :'ComputeVmediaRelationship'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



569
570
571
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
610
611
612
613
614
615
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 569

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      class_id == o.class_id &&
      object_type == o.object_type &&
      admin_power_state == o.admin_power_state &&
      alarm_summary == o.alarm_summary &&
      asset_tag == o.asset_tag &&
      available_memory == o.available_memory &&
      bios_post_complete == o.bios_post_complete &&
      fault_summary == o.fault_summary &&
      hardware_uuid == o.hardware_uuid &&
      kvm_ip_addresses == o.kvm_ip_addresses &&
      management_mode == o.management_mode &&
      memory_speed == o.memory_speed &&
      mgmt_ip_address == o.mgmt_ip_address &&
      num_adaptors == o.num_adaptors &&
      num_cpu_cores == o.num_cpu_cores &&
      num_cpu_cores_enabled == o.num_cpu_cores_enabled &&
      num_cpus == o.num_cpus &&
      num_eth_host_interfaces == o.num_eth_host_interfaces &&
      num_fc_host_interfaces == o.num_fc_host_interfaces &&
      num_threads == o.num_threads &&
      oper_power_state == o.oper_power_state &&
      oper_reason == o.oper_reason &&
      oper_state == o.oper_state &&
      operability == o.operability &&
      platform_type == o.platform_type &&
      service_profile == o.service_profile &&
      total_memory == o.total_memory &&
      user_label == o.user_label &&
      uuid == o.uuid &&
      boot_cdd_devices == o.boot_cdd_devices &&
      boot_device_boot_security == o.boot_device_boot_security &&
      boot_hdd_devices == o.boot_hdd_devices &&
      boot_iscsi_devices == o.boot_iscsi_devices &&
      boot_nvme_devices == o.boot_nvme_devices &&
      boot_pch_storage_devices == o.boot_pch_storage_devices &&
      boot_pxe_devices == o.boot_pxe_devices &&
      boot_san_devices == o.boot_san_devices &&
      boot_sd_devices == o.boot_sd_devices &&
      boot_uefi_shell_devices == o.boot_uefi_shell_devices &&
      boot_usb_devices == o.boot_usb_devices &&
      boot_vmedia_devices == o.boot_vmedia_devices &&
      mgmt_identity == o.mgmt_identity &&
      vmedia == o.vmedia
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 662

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

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



733
734
735
736
737
738
739
740
741
742
743
744
745
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 733

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

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 639

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  ComputePhysicalAllOf.openapi_types.each_pair do |key, type|
    if attributes[ComputePhysicalAllOf.attribute_map[key]].nil? && ComputePhysicalAllOf.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[ComputePhysicalAllOf.attribute_map[key]].is_a?(Array)
        self.send("#{key}=", attributes[ComputePhysicalAllOf.attribute_map[key]].map { |v| _deserialize($1, v) })
      end
    elsif !attributes[ComputePhysicalAllOf.attribute_map[key]].nil?
      self.send("#{key}=", _deserialize(type, attributes[ComputePhysicalAllOf.attribute_map[key]]))
    end
  end

  self
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


619
620
621
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 619

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



625
626
627
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 625

def hash
  [class_id, object_type, admin_power_state, alarm_summary, asset_tag, available_memory, bios_post_complete, fault_summary, hardware_uuid, kvm_ip_addresses, management_mode, memory_speed, mgmt_ip_address, num_adaptors, num_cpu_cores, num_cpu_cores_enabled, num_cpus, num_eth_host_interfaces, num_fc_host_interfaces, num_threads, oper_power_state, oper_reason, oper_state, operability, platform_type, service_profile, total_memory, user_label, uuid, boot_cdd_devices, boot_device_boot_security, boot_hdd_devices, boot_iscsi_devices, boot_nvme_devices, boot_pch_storage_devices, boot_pxe_devices, boot_san_devices, boot_sd_devices, boot_uefi_shell_devices, boot_usb_devices, boot_vmedia_devices, mgmt_identity, vmedia].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



510
511
512
513
514
515
516
517
518
519
520
521
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 510

def list_invalid_properties
  invalid_properties = Array.new
  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_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



709
710
711
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 709

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



715
716
717
718
719
720
721
722
723
724
725
726
727
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 715

def to_hash
  hash = {}
  ComputePhysicalAllOf.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    if value.nil?
      is_nullable = ComputePhysicalAllOf.openapi_nullable.include?(attr)
      next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
    end

    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



703
704
705
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 703

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



525
526
527
528
529
530
531
532
533
534
535
# File 'lib/intersight_client/models/compute_physical_all_of.rb', line 525

def valid?
  return false if @class_id.nil?
  class_id_validator = EnumAttributeValidator.new('String', ["compute.Blade", "compute.RackUnit"])
  return false unless class_id_validator.valid?(@class_id)
  return false if @object_type.nil?
  object_type_validator = EnumAttributeValidator.new('String', ["compute.Blade", "compute.RackUnit"])
  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
end