Class: OCI::Ocvp::Models::EsxiHostSummary
- Inherits:
-
Object
- Object
- OCI::Ocvp::Models::EsxiHostSummary
- 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_SKU_ENUM =
[ CURRENT_SKU_HOUR = 'HOUR'.freeze, CURRENT_SKU_MONTH = 'MONTH'.freeze, CURRENT_SKU_ONE_YEAR = 'ONE_YEAR'.freeze, CURRENT_SKU_THREE_YEARS = 'THREE_YEARS'.freeze, CURRENT_SKU_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- NEXT_SKU_ENUM =
[ NEXT_SKU_HOUR = 'HOUR'.freeze, NEXT_SKU_MONTH = 'MONTH'.freeze, NEXT_SKU_ONE_YEAR = 'ONE_YEAR'.freeze, NEXT_SKU_THREE_YEARS = 'THREE_YEARS'.freeze, NEXT_SKU_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#billing_contract_end_date ⇒ DateTime
**[Required]** Current billing cycle end date.
-
#compartment_id ⇒ String
The [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment that contains the SDDC.
-
#compute_availability_domain ⇒ String
**[Required]** The availability domain of the ESXi host.
-
#compute_instance_id ⇒ String
In terms of implementation, an ESXi host is a Compute instance that is configured with the chosen bundle of VMware software.
-
#current_sku ⇒ String
**[Required]** The billing option currently used by the ESXi host.
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
**[Required]** Defined tags for this resource.
-
#display_name ⇒ String
A descriptive name for the ESXi host.
-
#failed_esxi_host_id ⇒ String
The [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the ESXi host that failed.
-
#freeform_tags ⇒ Hash<String, String>
**[Required]** Free-form tags for this resource.
-
#grace_period_end_date ⇒ DateTime
The date and time when the new esxi host should start billing cycle.
-
#host_ocpu_count ⇒ Float
The OCPU count of the ESXi host.
-
#host_shape_name ⇒ String
**[Required]** The compute shape name of the ESXi host.
-
#id ⇒ String
**[Required]** The [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the ESXi host.
-
#lifecycle_state ⇒ String
The current state of the ESXi host.
-
#next_sku ⇒ String
**[Required]** The billing option to switch to after the current billing cycle ends.
-
#replacement_esxi_host_id ⇒ String
The [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the ESXi host that is newly created to replace the failed host.
-
#sddc_id ⇒ String
**[Required]** The [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the SDDC that the ESXi host belongs to.
-
#time_created ⇒ DateTime
The date and time the ESXi host was created, in the format defined by [RFC3339](tools.ietf.org/html/rfc3339).
-
#time_updated ⇒ DateTime
The date and time the ESXi host was updated, in the format defined by [RFC3339](tools.ietf.org/html/rfc3339).
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ EsxiHostSummary
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ EsxiHostSummary
Initializes the object
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 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 |
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 234 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.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_sku = attributes[:'currentSku'] if attributes[:'currentSku'] self.current_sku = "MONTH" if current_sku.nil? && !attributes.key?(:'currentSku') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :currentSku and :current_sku' if attributes.key?(:'currentSku') && attributes.key?(:'current_sku') self.current_sku = attributes[:'current_sku'] if attributes[:'current_sku'] self.current_sku = "MONTH" if current_sku.nil? && !attributes.key?(:'currentSku') && !attributes.key?(:'current_sku') # rubocop:disable Style/StringLiterals self.next_sku = attributes[:'nextSku'] if attributes[:'nextSku'] raise 'You cannot provide both :nextSku and :next_sku' if attributes.key?(:'nextSku') && attributes.key?(:'next_sku') self.next_sku = attributes[:'next_sku'] if attributes[:'next_sku'] 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.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. = attributes[:'freeformTags'] if attributes[:'freeformTags'] raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags') self. = attributes[:'freeform_tags'] if attributes[:'freeform_tags'] self. = attributes[:'definedTags'] if attributes[:'definedTags'] raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags') self. = attributes[:'defined_tags'] if attributes[:'defined_tags'] end |
Instance Attribute Details
#billing_contract_end_date ⇒ DateTime
**[Required]** Current billing cycle end date. If the value in `currentSku` and `nextSku` are different, the value specified in `nextSku` becomes the new `currentSKU` when the `contractEndDate` is reached. Example: `2016-08-25T21:10:29.600Z`
103 104 105 |
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 103 def billing_contract_end_date @billing_contract_end_date end |
#compartment_id ⇒ String
The [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment that contains the SDDC.
58 59 60 |
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 58 def compartment_id @compartment_id end |
#compute_availability_domain ⇒ String
**[Required]** The availability domain of the ESXi host.
126 127 128 |
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 126 def compute_availability_domain @compute_availability_domain end |
#compute_instance_id ⇒ String
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](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of that Compute instance.
65 66 67 |
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 65 def compute_instance_id @compute_instance_id end |
#current_sku ⇒ String
**[Required]** The billing option currently used by the ESXi host. list_supported_skus.
89 90 91 |
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 89 def current_sku @current_sku end |
#defined_tags ⇒ Hash<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](docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
Example: `{"CostCenter": "42"}`
153 154 155 |
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 153 def @defined_tags end |
#display_name ⇒ String
A descriptive name for the ESXi host. Does not have to be unique, and it's changeable. Avoid entering confidential information.
46 47 48 |
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 46 def display_name @display_name end |
#failed_esxi_host_id ⇒ String
The [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the ESXi host that failed.
108 109 110 |
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 108 def failed_esxi_host_id @failed_esxi_host_id end |
#freeform_tags ⇒ Hash<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](docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
Example: `"Finance"`
145 146 147 |
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 145 def @freeform_tags end |
#grace_period_end_date ⇒ DateTime
The date and time when the new esxi host should start billing cycle. [RFC3339](tools.ietf.org/html/rfc3339). Example: `2021-07-25T21:10:29.600Z`
121 122 123 |
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 121 def grace_period_end_date @grace_period_end_date end |
#host_ocpu_count ⇒ Float
The OCPU count of the ESXi host.
137 138 139 |
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 137 def host_ocpu_count @host_ocpu_count end |
#host_shape_name ⇒ String
**[Required]** The compute shape name of the ESXi host. list_supported_host_shapes.
132 133 134 |
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 132 def host_shape_name @host_shape_name end |
#id ⇒ String
**[Required]** The [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the ESXi host.
40 41 42 |
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 40 def id @id end |
#lifecycle_state ⇒ String
The current state of the ESXi host.
83 84 85 |
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 83 def lifecycle_state @lifecycle_state end |
#next_sku ⇒ String
**[Required]** The billing option to switch to after the current billing cycle ends. If `nextSku` is null or empty, `currentSku` continues to the next billing cycle. list_supported_skus.
96 97 98 |
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 96 def next_sku @next_sku end |
#replacement_esxi_host_id ⇒ String
The [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the ESXi host that is newly created to replace the failed host.
114 115 116 |
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 114 def replacement_esxi_host_id @replacement_esxi_host_id end |
#sddc_id ⇒ String
**[Required]** The [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the SDDC that the ESXi host belongs to.
52 53 54 |
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 52 def sddc_id @sddc_id end |
#time_created ⇒ DateTime
The date and time the ESXi host was created, in the format defined by [RFC3339](tools.ietf.org/html/rfc3339).
Example: `2016-08-25T21:10:29.600Z`
73 74 75 |
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 73 def time_created @time_created end |
#time_updated ⇒ DateTime
The date and time the ESXi host was updated, in the format defined by [RFC3339](tools.ietf.org/html/rfc3339).
79 80 81 |
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 79 def time_updated @time_updated end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 |
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 156 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'display_name': :'displayName', 'sddc_id': :'sddcId', 'compartment_id': :'compartmentId', 'compute_instance_id': :'computeInstanceId', 'time_created': :'timeCreated', 'time_updated': :'timeUpdated', 'lifecycle_state': :'lifecycleState', 'current_sku': :'currentSku', 'next_sku': :'nextSku', 'billing_contract_end_date': :'billingContractEndDate', 'failed_esxi_host_id': :'failedEsxiHostId', 'replacement_esxi_host_id': :'replacementEsxiHostId', 'grace_period_end_date': :'gracePeriodEndDate', 'compute_availability_domain': :'computeAvailabilityDomain', 'host_shape_name': :'hostShapeName', 'host_ocpu_count': :'hostOcpuCount', 'freeform_tags': :'freeformTags', 'defined_tags': :'definedTags' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 183 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'display_name': :'String', 'sddc_id': :'String', 'compartment_id': :'String', 'compute_instance_id': :'String', 'time_created': :'DateTime', 'time_updated': :'DateTime', 'lifecycle_state': :'String', 'current_sku': :'String', 'next_sku': :'String', 'billing_contract_end_date': :'DateTime', 'failed_esxi_host_id': :'String', 'replacement_esxi_host_id': :'String', 'grace_period_end_date': :'DateTime', 'compute_availability_domain': :'String', 'host_shape_name': :'String', 'host_ocpu_count': :'Float', '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.
399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 |
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 399 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && display_name == other.display_name && sddc_id == other.sddc_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_sku == other.current_sku && next_sku == other.next_sku && 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 && compute_availability_domain == other.compute_availability_domain && host_shape_name == other.host_shape_name && host_ocpu_count == other.host_ocpu_count && == other. && == other. end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
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 447 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
427 428 429 |
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 427 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
436 437 438 |
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 436 def hash [id, display_name, sddc_id, compartment_id, compute_instance_id, time_created, time_updated, lifecycle_state, current_sku, next_sku, billing_contract_end_date, failed_esxi_host_id, replacement_esxi_host_id, grace_period_end_date, compute_availability_domain, host_shape_name, host_ocpu_count, , ].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
480 481 482 483 484 485 486 487 488 489 |
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 480 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_s ⇒ String
Returns the string representation of the object
474 475 476 |
# File 'lib/oci/ocvp/models/esxi_host_summary.rb', line 474 def to_s to_hash.to_s end |