Class: OCI::Ocvp::Models::EsxiHostSummary

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

Overview

A summary of the ESXi host.

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 = {}) ⇒ EsxiHostSummary

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



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

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.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.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.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.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)


110
111
112
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 110

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)


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

def billing_donor_host_id
  @billing_donor_host_id
end

#cluster_idString

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

Returns:

  • (String)


59
60
61
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 59

def cluster_id
  @cluster_id
end

#compartment_idString

The OCID of the compartment that contains the Cluster.

Returns:

  • (String)


65
66
67
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 65

def compartment_id
  @compartment_id
end

#compute_availability_domainString

[Required] The availability domain of the ESXi host.

Returns:

  • (String)


150
151
152
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 150

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)


72
73
74
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 72

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)


96
97
98
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 96

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


197
198
199
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 197

def defined_tags
  @defined_tags
end

#display_nameString

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

Returns:

  • (String)


47
48
49
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 47

def display_name
  @display_name
end

#failed_esxi_host_idString

The OCID of the ESXi host that failed.

Returns:

  • (String)


115
116
117
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 115

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


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

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)


128
129
130
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 128

def grace_period_end_date
  @grace_period_end_date
end

#host_ocpu_countFloat

The OCPU count of the ESXi host.

Returns:

  • (Float)


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

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)


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

def host_shape_name
  @host_shape_name
end

#idString

[Required] The OCID of the ESXi host.

Returns:

  • (String)


41
42
43
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 41

def id
  @id
end

#is_billing_continuation_in_progressBOOLEAN

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

Returns:

  • (BOOLEAN)


176
177
178
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 176

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)


181
182
183
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 181

def is_billing_swapping_in_progress
  @is_billing_swapping_in_progress
end

#lifecycle_stateString

The current state of the ESXi host.

Returns:

  • (String)


90
91
92
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 90

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)


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

def next_commitment
  @next_commitment
end

#non_upgraded_esxi_host_idString

The OCID of the ESXi host that will be upgraded.

Returns:

  • (String)


139
140
141
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 139

def non_upgraded_esxi_host_id
  @non_upgraded_esxi_host_id
end

#replacement_esxi_host_idString

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

Returns:

  • (String)


121
122
123
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 121

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)


53
54
55
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 53

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)


171
172
173
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 171

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)


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

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)


86
87
88
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 86

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)


145
146
147
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 145

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)


133
134
135
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 133

def vmware_software_version
  @vmware_software_version
end

Class Method Details

.attribute_mapObject

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



200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 200

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',
    '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',
    'non_upgraded_esxi_host_id': :'nonUpgradedEsxiHostId',
    'upgraded_replacement_esxi_host_id': :'upgradedReplacementEsxiHostId',
    'compute_availability_domain': :'computeAvailabilityDomain',
    'host_shape_name': :'hostShapeName',
    'host_ocpu_count': :'hostOcpuCount',
    'billing_donor_host_id': :'billingDonorHostId',
    'swap_billing_host_id': :'swapBillingHostId',
    'is_billing_continuation_in_progress': :'isBillingContinuationInProgress',
    'is_billing_swapping_in_progress': :'isBillingSwappingInProgress',
    'freeform_tags': :'freeformTags',
    'defined_tags': :'definedTags'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



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

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',
    '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',
    'non_upgraded_esxi_host_id': :'String',
    'upgraded_replacement_esxi_host_id': :'String',
    'compute_availability_domain': :'String',
    'host_shape_name': :'String',
    'host_ocpu_count': :'Float',
    'billing_donor_host_id': :'String',
    'swap_billing_host_id': :'String',
    'is_billing_continuation_in_progress': :'BOOLEAN',
    'is_billing_swapping_in_progress': :'BOOLEAN',
    '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



517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 517

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 &&
    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 &&
    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 &&
    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 &&
    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



573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 573

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


553
554
555
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 553

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



562
563
564
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 562

def hash
  [id, display_name, sddc_id, cluster_id, compartment_id, compute_instance_id, time_created, time_updated, lifecycle_state, current_commitment, next_commitment, billing_contract_end_date, failed_esxi_host_id, replacement_esxi_host_id, grace_period_end_date, vmware_software_version, non_upgraded_esxi_host_id, upgraded_replacement_esxi_host_id, compute_availability_domain, host_shape_name, host_ocpu_count, billing_donor_host_id, swap_billing_host_id, is_billing_continuation_in_progress, is_billing_swapping_in_progress, 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



606
607
608
609
610
611
612
613
614
615
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 606

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



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

def to_s
  to_hash.to_s
end