Class: OCI::Ocvp::Models::EsxiHost

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/ocvp/models/esxi_host.rb

Overview

An ESXi host is a node in a Cluster. At a minimum, each Cluster has 3 ESXi hosts that are used to implement a functioning VMware environment.

In terms of implementation, an ESXi host is a Compute instance that is configured with the chosen bundle of VMware software.

Notice that an EsxiHost object has its own OCID (id), and a separate attribute for the OCID of the Compute instance (computeInstanceId).

Constant Summary collapse

LIFECYCLE_STATE_ENUM =
[
  LIFECYCLE_STATE_CREATING = 'CREATING'.freeze,
  LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze,
  LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.freeze,
  LIFECYCLE_STATE_DELETING = 'DELETING'.freeze,
  LIFECYCLE_STATE_DELETED = 'DELETED'.freeze,
  LIFECYCLE_STATE_FAILED = 'FAILED'.freeze,
  LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
CURRENT_COMMITMENT_ENUM =
[
  CURRENT_COMMITMENT_HOUR = 'HOUR'.freeze,
  CURRENT_COMMITMENT_MONTH = 'MONTH'.freeze,
  CURRENT_COMMITMENT_ONE_YEAR = 'ONE_YEAR'.freeze,
  CURRENT_COMMITMENT_THREE_YEARS = 'THREE_YEARS'.freeze,
  CURRENT_COMMITMENT_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
NEXT_COMMITMENT_ENUM =
[
  NEXT_COMMITMENT_HOUR = 'HOUR'.freeze,
  NEXT_COMMITMENT_MONTH = 'MONTH'.freeze,
  NEXT_COMMITMENT_ONE_YEAR = 'ONE_YEAR'.freeze,
  NEXT_COMMITMENT_THREE_YEARS = 'THREE_YEARS'.freeze,
  NEXT_COMMITMENT_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ EsxiHost

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



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
# File 'lib/oci/ocvp/models/esxi_host.rb', line 326

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  self.id = attributes[:'id'] if attributes[:'id']

  self.display_name = attributes[:'displayName'] if attributes[:'displayName']

  raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name')

  self.display_name = attributes[:'display_name'] if attributes[:'display_name']

  self.sddc_id = attributes[:'sddcId'] if attributes[:'sddcId']

  raise 'You cannot provide both :sddcId and :sddc_id' if attributes.key?(:'sddcId') && attributes.key?(:'sddc_id')

  self.sddc_id = attributes[:'sddc_id'] if attributes[:'sddc_id']

  self.cluster_id = attributes[:'clusterId'] if attributes[:'clusterId']

  raise 'You cannot provide both :clusterId and :cluster_id' if attributes.key?(:'clusterId') && attributes.key?(:'cluster_id')

  self.cluster_id = attributes[:'cluster_id'] if attributes[:'cluster_id']

  self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId']

  raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id')

  self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id']

  self.compute_instance_id = attributes[:'computeInstanceId'] if attributes[:'computeInstanceId']

  raise 'You cannot provide both :computeInstanceId and :compute_instance_id' if attributes.key?(:'computeInstanceId') && attributes.key?(:'compute_instance_id')

  self.compute_instance_id = attributes[:'compute_instance_id'] if attributes[:'compute_instance_id']

  self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated']

  raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created')

  self.time_created = attributes[:'time_created'] if attributes[:'time_created']

  self.time_updated = attributes[:'timeUpdated'] if attributes[:'timeUpdated']

  raise 'You cannot provide both :timeUpdated and :time_updated' if attributes.key?(:'timeUpdated') && attributes.key?(:'time_updated')

  self.time_updated = attributes[:'time_updated'] if attributes[:'time_updated']

  self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState']

  raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state')

  self.lifecycle_state = attributes[:'lifecycle_state'] if attributes[:'lifecycle_state']

  self.billing_donor_host_id = attributes[:'billingDonorHostId'] if attributes[:'billingDonorHostId']

  raise 'You cannot provide both :billingDonorHostId and :billing_donor_host_id' if attributes.key?(:'billingDonorHostId') && attributes.key?(:'billing_donor_host_id')

  self.billing_donor_host_id = attributes[:'billing_donor_host_id'] if attributes[:'billing_donor_host_id']

  self.swap_billing_host_id = attributes[:'swapBillingHostId'] if attributes[:'swapBillingHostId']

  raise 'You cannot provide both :swapBillingHostId and :swap_billing_host_id' if attributes.key?(:'swapBillingHostId') && attributes.key?(:'swap_billing_host_id')

  self.swap_billing_host_id = attributes[:'swap_billing_host_id'] if attributes[:'swap_billing_host_id']

  self.is_billing_continuation_in_progress = attributes[:'isBillingContinuationInProgress'] unless attributes[:'isBillingContinuationInProgress'].nil?
  self.is_billing_continuation_in_progress = false if is_billing_continuation_in_progress.nil? && !attributes.key?(:'isBillingContinuationInProgress') # rubocop:disable Style/StringLiterals

  raise 'You cannot provide both :isBillingContinuationInProgress and :is_billing_continuation_in_progress' if attributes.key?(:'isBillingContinuationInProgress') && attributes.key?(:'is_billing_continuation_in_progress')

  self.is_billing_continuation_in_progress = attributes[:'is_billing_continuation_in_progress'] unless attributes[:'is_billing_continuation_in_progress'].nil?
  self.is_billing_continuation_in_progress = false if is_billing_continuation_in_progress.nil? && !attributes.key?(:'isBillingContinuationInProgress') && !attributes.key?(:'is_billing_continuation_in_progress') # rubocop:disable Style/StringLiterals

  self.is_billing_swapping_in_progress = attributes[:'isBillingSwappingInProgress'] unless attributes[:'isBillingSwappingInProgress'].nil?
  self.is_billing_swapping_in_progress = false if is_billing_swapping_in_progress.nil? && !attributes.key?(:'isBillingSwappingInProgress') # rubocop:disable Style/StringLiterals

  raise 'You cannot provide both :isBillingSwappingInProgress and :is_billing_swapping_in_progress' if attributes.key?(:'isBillingSwappingInProgress') && attributes.key?(:'is_billing_swapping_in_progress')

  self.is_billing_swapping_in_progress = attributes[:'is_billing_swapping_in_progress'] unless attributes[:'is_billing_swapping_in_progress'].nil?
  self.is_billing_swapping_in_progress = false if is_billing_swapping_in_progress.nil? && !attributes.key?(:'isBillingSwappingInProgress') && !attributes.key?(:'is_billing_swapping_in_progress') # rubocop:disable Style/StringLiterals

  self.current_commitment = attributes[:'currentCommitment'] if attributes[:'currentCommitment']

  raise 'You cannot provide both :currentCommitment and :current_commitment' if attributes.key?(:'currentCommitment') && attributes.key?(:'current_commitment')

  self.current_commitment = attributes[:'current_commitment'] if attributes[:'current_commitment']

  self.next_commitment = attributes[:'nextCommitment'] if attributes[:'nextCommitment']

  raise 'You cannot provide both :nextCommitment and :next_commitment' if attributes.key?(:'nextCommitment') && attributes.key?(:'next_commitment')

  self.next_commitment = attributes[:'next_commitment'] if attributes[:'next_commitment']

  self.billing_contract_end_date = attributes[:'billingContractEndDate'] if attributes[:'billingContractEndDate']

  raise 'You cannot provide both :billingContractEndDate and :billing_contract_end_date' if attributes.key?(:'billingContractEndDate') && attributes.key?(:'billing_contract_end_date')

  self.billing_contract_end_date = attributes[:'billing_contract_end_date'] if attributes[:'billing_contract_end_date']

  self.failed_esxi_host_id = attributes[:'failedEsxiHostId'] if attributes[:'failedEsxiHostId']

  raise 'You cannot provide both :failedEsxiHostId and :failed_esxi_host_id' if attributes.key?(:'failedEsxiHostId') && attributes.key?(:'failed_esxi_host_id')

  self.failed_esxi_host_id = attributes[:'failed_esxi_host_id'] if attributes[:'failed_esxi_host_id']

  self.replacement_esxi_host_id = attributes[:'replacementEsxiHostId'] if attributes[:'replacementEsxiHostId']

  raise 'You cannot provide both :replacementEsxiHostId and :replacement_esxi_host_id' if attributes.key?(:'replacementEsxiHostId') && attributes.key?(:'replacement_esxi_host_id')

  self.replacement_esxi_host_id = attributes[:'replacement_esxi_host_id'] if attributes[:'replacement_esxi_host_id']

  self.grace_period_end_date = attributes[:'gracePeriodEndDate'] if attributes[:'gracePeriodEndDate']

  raise 'You cannot provide both :gracePeriodEndDate and :grace_period_end_date' if attributes.key?(:'gracePeriodEndDate') && attributes.key?(:'grace_period_end_date')

  self.grace_period_end_date = attributes[:'grace_period_end_date'] if attributes[:'grace_period_end_date']

  self.vmware_software_version = attributes[:'vmwareSoftwareVersion'] if attributes[:'vmwareSoftwareVersion']

  raise 'You cannot provide both :vmwareSoftwareVersion and :vmware_software_version' if attributes.key?(:'vmwareSoftwareVersion') && attributes.key?(:'vmware_software_version')

  self.vmware_software_version = attributes[:'vmware_software_version'] if attributes[:'vmware_software_version']

  self.esxi_software_version = attributes[:'esxiSoftwareVersion'] if attributes[:'esxiSoftwareVersion']

  raise 'You cannot provide both :esxiSoftwareVersion and :esxi_software_version' if attributes.key?(:'esxiSoftwareVersion') && attributes.key?(:'esxi_software_version')

  self.esxi_software_version = attributes[:'esxi_software_version'] if attributes[:'esxi_software_version']

  self.non_upgraded_esxi_host_id = attributes[:'nonUpgradedEsxiHostId'] if attributes[:'nonUpgradedEsxiHostId']

  raise 'You cannot provide both :nonUpgradedEsxiHostId and :non_upgraded_esxi_host_id' if attributes.key?(:'nonUpgradedEsxiHostId') && attributes.key?(:'non_upgraded_esxi_host_id')

  self.non_upgraded_esxi_host_id = attributes[:'non_upgraded_esxi_host_id'] if attributes[:'non_upgraded_esxi_host_id']

  self.upgraded_replacement_esxi_host_id = attributes[:'upgradedReplacementEsxiHostId'] if attributes[:'upgradedReplacementEsxiHostId']

  raise 'You cannot provide both :upgradedReplacementEsxiHostId and :upgraded_replacement_esxi_host_id' if attributes.key?(:'upgradedReplacementEsxiHostId') && attributes.key?(:'upgraded_replacement_esxi_host_id')

  self.upgraded_replacement_esxi_host_id = attributes[:'upgraded_replacement_esxi_host_id'] if attributes[:'upgraded_replacement_esxi_host_id']

  self.compute_availability_domain = attributes[:'computeAvailabilityDomain'] if attributes[:'computeAvailabilityDomain']

  raise 'You cannot provide both :computeAvailabilityDomain and :compute_availability_domain' if attributes.key?(:'computeAvailabilityDomain') && attributes.key?(:'compute_availability_domain')

  self.compute_availability_domain = attributes[:'compute_availability_domain'] if attributes[:'compute_availability_domain']

  self.host_shape_name = attributes[:'hostShapeName'] if attributes[:'hostShapeName']

  raise 'You cannot provide both :hostShapeName and :host_shape_name' if attributes.key?(:'hostShapeName') && attributes.key?(:'host_shape_name')

  self.host_shape_name = attributes[:'host_shape_name'] if attributes[:'host_shape_name']

  self.host_ocpu_count = attributes[:'hostOcpuCount'] if attributes[:'hostOcpuCount']

  raise 'You cannot provide both :hostOcpuCount and :host_ocpu_count' if attributes.key?(:'hostOcpuCount') && attributes.key?(:'host_ocpu_count')

  self.host_ocpu_count = attributes[:'host_ocpu_count'] if attributes[:'host_ocpu_count']

  self.capacity_reservation_id = attributes[:'capacityReservationId'] if attributes[:'capacityReservationId']

  raise 'You cannot provide both :capacityReservationId and :capacity_reservation_id' if attributes.key?(:'capacityReservationId') && attributes.key?(:'capacity_reservation_id')

  self.capacity_reservation_id = attributes[:'capacity_reservation_id'] if attributes[:'capacity_reservation_id']

  self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']

  raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags')

  self.freeform_tags = attributes[:'freeform_tags'] if attributes[:'freeform_tags']

  self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']

  raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags')

  self.defined_tags = attributes[:'defined_tags'] if attributes[:'defined_tags']
end

Instance Attribute Details

#billing_contract_end_dateDateTime

[Required] Current billing cycle end date. If the value in currentCommitment and nextCommitment are different, the value specified in nextCommitment becomes the new currentCommitment when the contractEndDate is reached. Example: 2016-08-25T21:10:29.600Z

Returns:

  • (DateTime)


138
139
140
# File 'lib/oci/ocvp/models/esxi_host.rb', line 138

def billing_contract_end_date
  @billing_contract_end_date
end

#billing_donor_host_idString

The OCID of the deleted ESXi Host with LeftOver billing cycle.

Returns:

  • (String)


103
104
105
# File 'lib/oci/ocvp/models/esxi_host.rb', line 103

def billing_donor_host_id
  @billing_donor_host_id
end

#capacity_reservation_idString

The OCID of the Capacity Reservation.

Returns:

  • (String)


199
200
201
# File 'lib/oci/ocvp/models/esxi_host.rb', line 199

def capacity_reservation_id
  @capacity_reservation_id
end

#cluster_idString

[Required] The OCID of the Cluster that the ESXi host belongs to.

Returns:

  • (String)


67
68
69
# File 'lib/oci/ocvp/models/esxi_host.rb', line 67

def cluster_id
  @cluster_id
end

#compartment_idString

The OCID of the compartment that contains the Cluster.

Returns:

  • (String)


73
74
75
# File 'lib/oci/ocvp/models/esxi_host.rb', line 73

def compartment_id
  @compartment_id
end

#compute_availability_domainString

[Required] The availability domain of the ESXi host.

Returns:

  • (String)


183
184
185
# File 'lib/oci/ocvp/models/esxi_host.rb', line 183

def compute_availability_domain
  @compute_availability_domain
end

#compute_instance_idString

In terms of implementation, an ESXi host is a Compute instance that is configured with the chosen bundle of VMware software. The computeInstanceId is the OCID of that Compute instance.

Returns:

  • (String)


80
81
82
# File 'lib/oci/ocvp/models/esxi_host.rb', line 80

def compute_instance_id
  @compute_instance_id
end

#current_commitmentString

[Required] The billing option currently used by the ESXi host. list_supported_commitments.

Returns:

  • (String)


124
125
126
# File 'lib/oci/ocvp/models/esxi_host.rb', line 124

def current_commitment
  @current_commitment
end

#defined_tagsHash<String, Hash<String, Object>>

[Required] Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.

Example: {\"Operations\": {\"CostCenter\": \"42\"}}

Returns:

  • (Hash<String, Hash<String, Object>>)


215
216
217
# File 'lib/oci/ocvp/models/esxi_host.rb', line 215

def defined_tags
  @defined_tags
end

#display_nameString

[Required] A descriptive name for the ESXi host. Does not have to be unique, and it's changeable. Avoid entering confidential information.

Returns:

  • (String)


55
56
57
# File 'lib/oci/ocvp/models/esxi_host.rb', line 55

def display_name
  @display_name
end

#esxi_software_versionString

The version of ESXi software that Oracle Cloud VMware Solution installed on the ESXi hosts.

Returns:

  • (String)


166
167
168
# File 'lib/oci/ocvp/models/esxi_host.rb', line 166

def esxi_software_version
  @esxi_software_version
end

#failed_esxi_host_idString

The OCID of the ESXi host that failed.

Returns:

  • (String)


143
144
145
# File 'lib/oci/ocvp/models/esxi_host.rb', line 143

def failed_esxi_host_id
  @failed_esxi_host_id
end

#freeform_tagsHash<String, String>

[Required] Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags.

Example: {\"Department\": \"Finance\"}

Returns:

  • (Hash<String, String>)


207
208
209
# File 'lib/oci/ocvp/models/esxi_host.rb', line 207

def freeform_tags
  @freeform_tags
end

#grace_period_end_dateDateTime

The date and time when the new esxi host should start billing cycle. RFC3339. Example: 2021-07-25T21:10:29.600Z

Returns:

  • (DateTime)


156
157
158
# File 'lib/oci/ocvp/models/esxi_host.rb', line 156

def grace_period_end_date
  @grace_period_end_date
end

#host_ocpu_countFloat

The OCPU count of the ESXi host.

Returns:

  • (Float)


194
195
196
# File 'lib/oci/ocvp/models/esxi_host.rb', line 194

def host_ocpu_count
  @host_ocpu_count
end

#host_shape_nameString

[Required] The compute shape name of the ESXi host. list_supported_host_shapes.

Returns:

  • (String)


189
190
191
# File 'lib/oci/ocvp/models/esxi_host.rb', line 189

def host_shape_name
  @host_shape_name
end

#idString

[Required] The OCID of the ESXi host.

Returns:

  • (String)


49
50
51
# File 'lib/oci/ocvp/models/esxi_host.rb', line 49

def id
  @id
end

#is_billing_continuation_in_progressBOOLEAN

Indicates whether this host is in the progress of billing continuation.

Returns:

  • (BOOLEAN)


113
114
115
# File 'lib/oci/ocvp/models/esxi_host.rb', line 113

def is_billing_continuation_in_progress
  @is_billing_continuation_in_progress
end

#is_billing_swapping_in_progressBOOLEAN

Indicates whether this host is in the progress of swapping billing.

Returns:

  • (BOOLEAN)


118
119
120
# File 'lib/oci/ocvp/models/esxi_host.rb', line 118

def is_billing_swapping_in_progress
  @is_billing_swapping_in_progress
end

#lifecycle_stateString

The current state of the ESXi host.

Returns:

  • (String)


98
99
100
# File 'lib/oci/ocvp/models/esxi_host.rb', line 98

def lifecycle_state
  @lifecycle_state
end

#next_commitmentString

[Required] The billing option to switch to after the current billing cycle ends. If nextCommitment is null or empty, currentCommitment continues to the next billing cycle. list_supported_commitments.

Returns:

  • (String)


131
132
133
# File 'lib/oci/ocvp/models/esxi_host.rb', line 131

def next_commitment
  @next_commitment
end

#non_upgraded_esxi_host_idString

The OCID of the ESXi host that will be upgraded.

Returns:

  • (String)


172
173
174
# File 'lib/oci/ocvp/models/esxi_host.rb', line 172

def non_upgraded_esxi_host_id
  @non_upgraded_esxi_host_id
end

#replacement_esxi_host_idString

The OCID of the ESXi host that is created to replace the failed host.

Returns:

  • (String)


149
150
151
# File 'lib/oci/ocvp/models/esxi_host.rb', line 149

def replacement_esxi_host_id
  @replacement_esxi_host_id
end

#sddc_idString

[Required] The OCID of the SDDC that the ESXi host belongs to.

Returns:

  • (String)


61
62
63
# File 'lib/oci/ocvp/models/esxi_host.rb', line 61

def sddc_id
  @sddc_id
end

#swap_billing_host_idString

The OCID of the active ESXi Host to swap billing with current host.

Returns:

  • (String)


108
109
110
# File 'lib/oci/ocvp/models/esxi_host.rb', line 108

def swap_billing_host_id
  @swap_billing_host_id
end

#time_createdDateTime

The date and time the ESXi host was created, in the format defined by RFC3339.

Example: 2016-08-25T21:10:29.600Z

Returns:

  • (DateTime)


88
89
90
# File 'lib/oci/ocvp/models/esxi_host.rb', line 88

def time_created
  @time_created
end

#time_updatedDateTime

The date and time the ESXi host was updated, in the format defined by RFC3339.

Returns:

  • (DateTime)


94
95
96
# File 'lib/oci/ocvp/models/esxi_host.rb', line 94

def time_updated
  @time_updated
end

#upgraded_replacement_esxi_host_idString

The OCID of the ESXi host that is newly created to upgrade the original host.

Returns:

  • (String)


178
179
180
# File 'lib/oci/ocvp/models/esxi_host.rb', line 178

def upgraded_replacement_esxi_host_id
  @upgraded_replacement_esxi_host_id
end

#vmware_software_versionString

[Required] The version of VMware software that Oracle Cloud VMware Solution installed on the ESXi hosts.

Returns:

  • (String)


161
162
163
# File 'lib/oci/ocvp/models/esxi_host.rb', line 161

def vmware_software_version
  @vmware_software_version
end

Class Method Details

.attribute_mapObject

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



218
219
220
221
222
223
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
# File 'lib/oci/ocvp/models/esxi_host.rb', line 218

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'id',
    'display_name': :'displayName',
    'sddc_id': :'sddcId',
    'cluster_id': :'clusterId',
    'compartment_id': :'compartmentId',
    'compute_instance_id': :'computeInstanceId',
    'time_created': :'timeCreated',
    'time_updated': :'timeUpdated',
    'lifecycle_state': :'lifecycleState',
    'billing_donor_host_id': :'billingDonorHostId',
    'swap_billing_host_id': :'swapBillingHostId',
    'is_billing_continuation_in_progress': :'isBillingContinuationInProgress',
    'is_billing_swapping_in_progress': :'isBillingSwappingInProgress',
    'current_commitment': :'currentCommitment',
    'next_commitment': :'nextCommitment',
    'billing_contract_end_date': :'billingContractEndDate',
    'failed_esxi_host_id': :'failedEsxiHostId',
    'replacement_esxi_host_id': :'replacementEsxiHostId',
    'grace_period_end_date': :'gracePeriodEndDate',
    'vmware_software_version': :'vmwareSoftwareVersion',
    'esxi_software_version': :'esxiSoftwareVersion',
    'non_upgraded_esxi_host_id': :'nonUpgradedEsxiHostId',
    'upgraded_replacement_esxi_host_id': :'upgradedReplacementEsxiHostId',
    'compute_availability_domain': :'computeAvailabilityDomain',
    'host_shape_name': :'hostShapeName',
    'host_ocpu_count': :'hostOcpuCount',
    'capacity_reservation_id': :'capacityReservationId',
    'freeform_tags': :'freeformTags',
    'defined_tags': :'definedTags'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



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
# File 'lib/oci/ocvp/models/esxi_host.rb', line 255

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'String',
    'display_name': :'String',
    'sddc_id': :'String',
    'cluster_id': :'String',
    'compartment_id': :'String',
    'compute_instance_id': :'String',
    'time_created': :'DateTime',
    'time_updated': :'DateTime',
    'lifecycle_state': :'String',
    'billing_donor_host_id': :'String',
    'swap_billing_host_id': :'String',
    'is_billing_continuation_in_progress': :'BOOLEAN',
    'is_billing_swapping_in_progress': :'BOOLEAN',
    'current_commitment': :'String',
    'next_commitment': :'String',
    'billing_contract_end_date': :'DateTime',
    'failed_esxi_host_id': :'String',
    'replacement_esxi_host_id': :'String',
    'grace_period_end_date': :'DateTime',
    'vmware_software_version': :'String',
    'esxi_software_version': :'String',
    'non_upgraded_esxi_host_id': :'String',
    'upgraded_replacement_esxi_host_id': :'String',
    'compute_availability_domain': :'String',
    'host_shape_name': :'String',
    'host_ocpu_count': :'Float',
    'capacity_reservation_id': :'String',
    'freeform_tags': :'Hash<String, String>',
    'defined_tags': :'Hash<String, Hash<String, Object>>'
    # rubocop:enable Style/SymbolLiteral
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • other (Object)

    the other object to be compared



553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
# File 'lib/oci/ocvp/models/esxi_host.rb', line 553

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    id == other.id &&
    display_name == other.display_name &&
    sddc_id == other.sddc_id &&
    cluster_id == other.cluster_id &&
    compartment_id == other.compartment_id &&
    compute_instance_id == other.compute_instance_id &&
    time_created == other.time_created &&
    time_updated == other.time_updated &&
    lifecycle_state == other.lifecycle_state &&
    billing_donor_host_id == other.billing_donor_host_id &&
    swap_billing_host_id == other.swap_billing_host_id &&
    is_billing_continuation_in_progress == other.is_billing_continuation_in_progress &&
    is_billing_swapping_in_progress == other.is_billing_swapping_in_progress &&
    current_commitment == other.current_commitment &&
    next_commitment == other.next_commitment &&
    billing_contract_end_date == other.billing_contract_end_date &&
    failed_esxi_host_id == other.failed_esxi_host_id &&
    replacement_esxi_host_id == other.replacement_esxi_host_id &&
    grace_period_end_date == other.grace_period_end_date &&
    vmware_software_version == other.vmware_software_version &&
    esxi_software_version == other.esxi_software_version &&
    non_upgraded_esxi_host_id == other.non_upgraded_esxi_host_id &&
    upgraded_replacement_esxi_host_id == other.upgraded_replacement_esxi_host_id &&
    compute_availability_domain == other.compute_availability_domain &&
    host_shape_name == other.host_shape_name &&
    host_ocpu_count == other.host_ocpu_count &&
    capacity_reservation_id == other.capacity_reservation_id &&
    freeform_tags == other.freeform_tags &&
    defined_tags == other.defined_tags
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



611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
# File 'lib/oci/ocvp/models/esxi_host.rb', line 611

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)

  self.class.swagger_types.each_pair do |key, type|
    if type =~ /^Array<(.*)>/i
      # check to ensure the input is an array given that the the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        public_method("#{key}=").call(
          attributes[self.class.attribute_map[key]]
            .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
        )
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      public_method("#{key}=").call(
        OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
      )
    end
    # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end

#eql?(other) ⇒ Boolean

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


591
592
593
# File 'lib/oci/ocvp/models/esxi_host.rb', line 591

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



600
601
602
# File 'lib/oci/ocvp/models/esxi_host.rb', line 600

def hash
  [id, display_name, sddc_id, cluster_id, compartment_id, compute_instance_id, time_created, time_updated, lifecycle_state, billing_donor_host_id, swap_billing_host_id, is_billing_continuation_in_progress, is_billing_swapping_in_progress, current_commitment, next_commitment, billing_contract_end_date, failed_esxi_host_id, replacement_esxi_host_id, grace_period_end_date, vmware_software_version, esxi_software_version, non_upgraded_esxi_host_id, upgraded_replacement_esxi_host_id, compute_availability_domain, host_shape_name, host_ocpu_count, capacity_reservation_id, freeform_tags, defined_tags].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



644
645
646
647
648
649
650
651
652
653
# File 'lib/oci/ocvp/models/esxi_host.rb', line 644

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = public_method(attr).call
    next if value.nil? && !instance_variable_defined?("@#{attr}")

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

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



638
639
640
# File 'lib/oci/ocvp/models/esxi_host.rb', line 638

def to_s
  to_hash.to_s
end