Class: OCI::Datacc::Models::VmInstance
- Inherits:
-
Object
- Object
- OCI::Datacc::Models::VmInstance
- Defined in:
- lib/oci/datacc/models/vm_instance.rb
Overview
VM instance details.
Constant Summary collapse
- LIFECYCLE_STATE_ENUM =
[ LIFECYCLE_STATE_CREATING = 'CREATING'.freeze, LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.freeze, LIFECYCLE_STATE_INACTIVE = 'INACTIVE'.freeze, LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze, LIFECYCLE_STATE_DELETING = 'DELETING'.freeze, LIFECYCLE_STATE_DELETED = 'DELETED'.freeze, LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#boot_storage_size_in_gbs ⇒ Float
Boot storage memory to be allocated in GBs.
-
#compartment_id ⇒ String
[Required] The OCID of the compartment containing the VM instance.
-
#cpus_enabled ⇒ Integer
[Required] The number of CPU cores enabled for each VM instance.
-
#data_storage_size_in_gbs ⇒ Float
Data storage to be allocated in GBs.
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource.
-
#description ⇒ String
VM instance description.
-
#display_name ⇒ String
VM instance display name.
-
#dns_servers ⇒ Array<String>
The list of DNS server IP addresses.
-
#domain_name ⇒ String
The domain name of the VM instance.
-
#freeform_tags ⇒ Hash<String, String>
Simple key-value pair that is applied without any predefined name, type or scope.
-
#gateway ⇒ String
The gateway IP address of the VM instance network.
-
#hostname ⇒ String
The host name of the instance.
-
#id ⇒ String
[Required] The OCID of the VM instance.
-
#image_id ⇒ String
The OCID of the VM custom instance uploaded.
-
#infrastructure_id ⇒ String
[Required] The OCID of the Database Infrastructure.
-
#ip_address ⇒ String
The IP address of the instance.
-
#lifecycle_details ⇒ String
Lifecycle state details of the VM instance.
-
#lifecycle_state ⇒ String
[Required] The current state of the VM instance.
-
#memory_size_in_gbs ⇒ Float
The memory to be allocated in GBs.
-
#metadata ⇒ Hash<String, String>
Custom metadata key/value pairs which can be used to: - Provide information to Cloud-Init to be used for various system initialization tasks.
-
#netmask ⇒ String
The netmask of the VM instance network.
-
#ntp_servers ⇒ Array<String>
The list of NTP server addresses.
-
#server_id ⇒ String
The OCID of the compute node on which VM instance should be launched.
-
#ssh_public_keys ⇒ Array<String>
[Required] List of public key used for SSH access to the VM instance.
-
#system_tags ⇒ Hash<String, Hash<String, Object>>
Usage of system tag keys.
-
#time_created ⇒ DateTime
[Required] The time that the VM instance was created.
-
#time_updated ⇒ DateTime
[Required] The time that the VM instance was last updated.
-
#time_zone ⇒ String
[Required] The time zone to use for the VM instance.
-
#userdata ⇒ String
Base64-encoded data to be used by Cloud-Init to run custom scripts or provide custom Cloud-Init configuration.
-
#vlan_id ⇒ String
The network VLAN ID.
-
#vm_network_id ⇒ String
The OCID of the VM Network.
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 = {}) ⇒ VmInstance
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 = {}) ⇒ VmInstance
Initializes the object
277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 |
# File 'lib/oci/datacc/models/vm_instance.rb', line 277 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.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.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.description = attributes[:'description'] if attributes[:'description'] self.infrastructure_id = attributes[:'infrastructureId'] if attributes[:'infrastructureId'] raise 'You cannot provide both :infrastructureId and :infrastructure_id' if attributes.key?(:'infrastructureId') && attributes.key?(:'infrastructure_id') self.infrastructure_id = attributes[:'infrastructure_id'] if attributes[:'infrastructure_id'] self.cpus_enabled = attributes[:'cpusEnabled'] if attributes[:'cpusEnabled'] raise 'You cannot provide both :cpusEnabled and :cpus_enabled' if attributes.key?(:'cpusEnabled') && attributes.key?(:'cpus_enabled') self.cpus_enabled = attributes[:'cpus_enabled'] if attributes[:'cpus_enabled'] self.memory_size_in_gbs = attributes[:'memorySizeInGBs'] if attributes[:'memorySizeInGBs'] raise 'You cannot provide both :memorySizeInGBs and :memory_size_in_gbs' if attributes.key?(:'memorySizeInGBs') && attributes.key?(:'memory_size_in_gbs') self.memory_size_in_gbs = attributes[:'memory_size_in_gbs'] if attributes[:'memory_size_in_gbs'] self.boot_storage_size_in_gbs = attributes[:'bootStorageSizeInGBs'] if attributes[:'bootStorageSizeInGBs'] raise 'You cannot provide both :bootStorageSizeInGBs and :boot_storage_size_in_gbs' if attributes.key?(:'bootStorageSizeInGBs') && attributes.key?(:'boot_storage_size_in_gbs') self.boot_storage_size_in_gbs = attributes[:'boot_storage_size_in_gbs'] if attributes[:'boot_storage_size_in_gbs'] self.data_storage_size_in_gbs = attributes[:'dataStorageSizeInGBs'] if attributes[:'dataStorageSizeInGBs'] raise 'You cannot provide both :dataStorageSizeInGBs and :data_storage_size_in_gbs' if attributes.key?(:'dataStorageSizeInGBs') && attributes.key?(:'data_storage_size_in_gbs') self.data_storage_size_in_gbs = attributes[:'data_storage_size_in_gbs'] if attributes[:'data_storage_size_in_gbs'] 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'] 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[:'systemTags'] if attributes[:'systemTags'] raise 'You cannot provide both :systemTags and :system_tags' if attributes.key?(:'systemTags') && attributes.key?(:'system_tags') self. = attributes[:'system_tags'] if attributes[:'system_tags'] self.image_id = attributes[:'imageId'] if attributes[:'imageId'] raise 'You cannot provide both :imageId and :image_id' if attributes.key?(:'imageId') && attributes.key?(:'image_id') self.image_id = attributes[:'image_id'] if attributes[:'image_id'] self.server_id = attributes[:'serverId'] if attributes[:'serverId'] raise 'You cannot provide both :serverId and :server_id' if attributes.key?(:'serverId') && attributes.key?(:'server_id') self.server_id = attributes[:'server_id'] if attributes[:'server_id'] self.ssh_public_keys = attributes[:'sshPublicKeys'] if attributes[:'sshPublicKeys'] raise 'You cannot provide both :sshPublicKeys and :ssh_public_keys' if attributes.key?(:'sshPublicKeys') && attributes.key?(:'ssh_public_keys') self.ssh_public_keys = attributes[:'ssh_public_keys'] if attributes[:'ssh_public_keys'] 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.lifecycle_details = attributes[:'lifecycleDetails'] if attributes[:'lifecycleDetails'] raise 'You cannot provide both :lifecycleDetails and :lifecycle_details' if attributes.key?(:'lifecycleDetails') && attributes.key?(:'lifecycle_details') self.lifecycle_details = attributes[:'lifecycle_details'] if attributes[:'lifecycle_details'] 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.domain_name = attributes[:'domainName'] if attributes[:'domainName'] raise 'You cannot provide both :domainName and :domain_name' if attributes.key?(:'domainName') && attributes.key?(:'domain_name') self.domain_name = attributes[:'domain_name'] if attributes[:'domain_name'] self.time_zone = attributes[:'timeZone'] if attributes[:'timeZone'] raise 'You cannot provide both :timeZone and :time_zone' if attributes.key?(:'timeZone') && attributes.key?(:'time_zone') self.time_zone = attributes[:'time_zone'] if attributes[:'time_zone'] self.dns_servers = attributes[:'dnsServers'] if attributes[:'dnsServers'] raise 'You cannot provide both :dnsServers and :dns_servers' if attributes.key?(:'dnsServers') && attributes.key?(:'dns_servers') self.dns_servers = attributes[:'dns_servers'] if attributes[:'dns_servers'] self.ntp_servers = attributes[:'ntpServers'] if attributes[:'ntpServers'] raise 'You cannot provide both :ntpServers and :ntp_servers' if attributes.key?(:'ntpServers') && attributes.key?(:'ntp_servers') self.ntp_servers = attributes[:'ntp_servers'] if attributes[:'ntp_servers'] self.hostname = attributes[:'hostname'] if attributes[:'hostname'] self.ip_address = attributes[:'ipAddress'] if attributes[:'ipAddress'] raise 'You cannot provide both :ipAddress and :ip_address' if attributes.key?(:'ipAddress') && attributes.key?(:'ip_address') self.ip_address = attributes[:'ip_address'] if attributes[:'ip_address'] self.netmask = attributes[:'netmask'] if attributes[:'netmask'] self.gateway = attributes[:'gateway'] if attributes[:'gateway'] self.vlan_id = attributes[:'vlanId'] if attributes[:'vlanId'] raise 'You cannot provide both :vlanId and :vlan_id' if attributes.key?(:'vlanId') && attributes.key?(:'vlan_id') self.vlan_id = attributes[:'vlan_id'] if attributes[:'vlan_id'] self.userdata = attributes[:'userdata'] if attributes[:'userdata'] self. = attributes[:'metadata'] if attributes[:'metadata'] self.vm_network_id = attributes[:'vmNetworkId'] if attributes[:'vmNetworkId'] raise 'You cannot provide both :vmNetworkId and :vm_network_id' if attributes.key?(:'vmNetworkId') && attributes.key?(:'vm_network_id') self.vm_network_id = attributes[:'vm_network_id'] if attributes[:'vm_network_id'] end |
Instance Attribute Details
#boot_storage_size_in_gbs ⇒ Float
Boot storage memory to be allocated in GBs.
55 56 57 |
# File 'lib/oci/datacc/models/vm_instance.rb', line 55 def boot_storage_size_in_gbs @boot_storage_size_in_gbs end |
#compartment_id ⇒ String
[Required] The OCID of the compartment containing the VM instance.
30 31 32 |
# File 'lib/oci/datacc/models/vm_instance.rb', line 30 def compartment_id @compartment_id end |
#cpus_enabled ⇒ Integer
[Required] The number of CPU cores enabled for each VM instance.
47 48 49 |
# File 'lib/oci/datacc/models/vm_instance.rb', line 47 def cpus_enabled @cpus_enabled end |
#data_storage_size_in_gbs ⇒ Float
Data storage to be allocated in GBs.
59 60 61 |
# File 'lib/oci/datacc/models/vm_instance.rb', line 59 def data_storage_size_in_gbs @data_storage_size_in_gbs end |
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {\"foo-namespace\": {\"bar-key\": \"value\"}}
65 66 67 |
# File 'lib/oci/datacc/models/vm_instance.rb', line 65 def @defined_tags end |
#description ⇒ String
VM instance description.
39 40 41 |
# File 'lib/oci/datacc/models/vm_instance.rb', line 39 def description @description end |
#display_name ⇒ String
VM instance display name. This name does not have to be unique, and is changeable.
35 36 37 |
# File 'lib/oci/datacc/models/vm_instance.rb', line 35 def display_name @display_name end |
#dns_servers ⇒ Array<String>
The list of DNS server IP addresses. Maximum of 3 allowed.
119 120 121 |
# File 'lib/oci/datacc/models/vm_instance.rb', line 119 def dns_servers @dns_servers end |
#domain_name ⇒ String
The domain name of the VM instance.
111 112 113 |
# File 'lib/oci/datacc/models/vm_instance.rb', line 111 def domain_name @domain_name end |
#freeform_tags ⇒ Hash<String, String>
Simple key-value pair that is applied without any predefined name, type or scope. This tag option exists for cross-compatibility only. Example: {\"bar-key\": \"value\"}
71 72 73 |
# File 'lib/oci/datacc/models/vm_instance.rb', line 71 def @freeform_tags end |
#gateway ⇒ String
The gateway IP address of the VM instance network.
139 140 141 |
# File 'lib/oci/datacc/models/vm_instance.rb', line 139 def gateway @gateway end |
#hostname ⇒ String
The host name of the instance.
127 128 129 |
# File 'lib/oci/datacc/models/vm_instance.rb', line 127 def hostname @hostname end |
#id ⇒ String
[Required] The OCID of the VM instance.
24 25 26 |
# File 'lib/oci/datacc/models/vm_instance.rb', line 24 def id @id end |
#image_id ⇒ String
The OCID of the VM custom instance uploaded.
81 82 83 |
# File 'lib/oci/datacc/models/vm_instance.rb', line 81 def image_id @image_id end |
#infrastructure_id ⇒ String
[Required] The OCID of the Database Infrastructure.
43 44 45 |
# File 'lib/oci/datacc/models/vm_instance.rb', line 43 def infrastructure_id @infrastructure_id end |
#ip_address ⇒ String
The IP address of the instance.
131 132 133 |
# File 'lib/oci/datacc/models/vm_instance.rb', line 131 def ip_address @ip_address end |
#lifecycle_details ⇒ String
Lifecycle state details of the VM instance.
97 98 99 |
# File 'lib/oci/datacc/models/vm_instance.rb', line 97 def lifecycle_details @lifecycle_details end |
#lifecycle_state ⇒ String
[Required] The current state of the VM instance.
93 94 95 |
# File 'lib/oci/datacc/models/vm_instance.rb', line 93 def lifecycle_state @lifecycle_state end |
#memory_size_in_gbs ⇒ Float
The memory to be allocated in GBs.
51 52 53 |
# File 'lib/oci/datacc/models/vm_instance.rb', line 51 def memory_size_in_gbs @memory_size_in_gbs end |
#metadata ⇒ Hash<String, String>
Custom metadata key/value pairs which can be used to: - Provide information to Cloud-Init to be used for various system initialization tasks. - Provide additional information which is exposed inside the instance context and can be queried or referenced by user-data scripts for dynamic configuration.
156 157 158 |
# File 'lib/oci/datacc/models/vm_instance.rb', line 156 def @metadata end |
#netmask ⇒ String
The netmask of the VM instance network.
135 136 137 |
# File 'lib/oci/datacc/models/vm_instance.rb', line 135 def netmask @netmask end |
#ntp_servers ⇒ Array<String>
The list of NTP server addresses. Maximum of 3 allowed.
123 124 125 |
# File 'lib/oci/datacc/models/vm_instance.rb', line 123 def ntp_servers @ntp_servers end |
#server_id ⇒ String
The OCID of the compute node on which VM instance should be launched.
85 86 87 |
# File 'lib/oci/datacc/models/vm_instance.rb', line 85 def server_id @server_id end |
#ssh_public_keys ⇒ Array<String>
[Required] List of public key used for SSH access to the VM instance.
89 90 91 |
# File 'lib/oci/datacc/models/vm_instance.rb', line 89 def ssh_public_keys @ssh_public_keys end |
#system_tags ⇒ Hash<String, Hash<String, Object>>
Usage of system tag keys. These predefined keys are scoped to namespaces. Example: { \"orcl-cloud\": { \"free-tier-retained\": \"true\" } }
77 78 79 |
# File 'lib/oci/datacc/models/vm_instance.rb', line 77 def @system_tags end |
#time_created ⇒ DateTime
[Required] The time that the VM instance was created. An RFC3339 formatted datetime string.
102 103 104 |
# File 'lib/oci/datacc/models/vm_instance.rb', line 102 def time_created @time_created end |
#time_updated ⇒ DateTime
[Required] The time that the VM instance was last updated. An RFC3339 formatted datetime string.
107 108 109 |
# File 'lib/oci/datacc/models/vm_instance.rb', line 107 def time_updated @time_updated end |
#time_zone ⇒ String
[Required] The time zone to use for the VM instance.
115 116 117 |
# File 'lib/oci/datacc/models/vm_instance.rb', line 115 def time_zone @time_zone end |
#userdata ⇒ String
Base64-encoded data to be used by Cloud-Init to run custom scripts or provide custom Cloud-Init configuration. For information about how to take advantage of user data, see the Cloud-Init Documentation.
149 150 151 |
# File 'lib/oci/datacc/models/vm_instance.rb', line 149 def userdata @userdata end |
#vlan_id ⇒ String
The network VLAN ID.
143 144 145 |
# File 'lib/oci/datacc/models/vm_instance.rb', line 143 def vlan_id @vlan_id end |
#vm_network_id ⇒ String
The OCID of the VM Network.
160 161 162 |
# File 'lib/oci/datacc/models/vm_instance.rb', line 160 def vm_network_id @vm_network_id end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
163 164 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 |
# File 'lib/oci/datacc/models/vm_instance.rb', line 163 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'compartment_id': :'compartmentId', 'display_name': :'displayName', 'description': :'description', 'infrastructure_id': :'infrastructureId', 'cpus_enabled': :'cpusEnabled', 'memory_size_in_gbs': :'memorySizeInGBs', 'boot_storage_size_in_gbs': :'bootStorageSizeInGBs', 'data_storage_size_in_gbs': :'dataStorageSizeInGBs', 'defined_tags': :'definedTags', 'freeform_tags': :'freeformTags', 'system_tags': :'systemTags', 'image_id': :'imageId', 'server_id': :'serverId', 'ssh_public_keys': :'sshPublicKeys', 'lifecycle_state': :'lifecycleState', 'lifecycle_details': :'lifecycleDetails', 'time_created': :'timeCreated', 'time_updated': :'timeUpdated', 'domain_name': :'domainName', 'time_zone': :'timeZone', 'dns_servers': :'dnsServers', 'ntp_servers': :'ntpServers', 'hostname': :'hostname', 'ip_address': :'ipAddress', 'netmask': :'netmask', 'gateway': :'gateway', 'vlan_id': :'vlanId', 'userdata': :'userdata', 'metadata': :'metadata', 'vm_network_id': :'vmNetworkId' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
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 233 234 235 236 237 238 |
# File 'lib/oci/datacc/models/vm_instance.rb', line 202 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'compartment_id': :'String', 'display_name': :'String', 'description': :'String', 'infrastructure_id': :'String', 'cpus_enabled': :'Integer', 'memory_size_in_gbs': :'Float', 'boot_storage_size_in_gbs': :'Float', 'data_storage_size_in_gbs': :'Float', 'defined_tags': :'Hash<String, Hash<String, Object>>', 'freeform_tags': :'Hash<String, String>', 'system_tags': :'Hash<String, Hash<String, Object>>', 'image_id': :'String', 'server_id': :'String', 'ssh_public_keys': :'Array<String>', 'lifecycle_state': :'String', 'lifecycle_details': :'String', 'time_created': :'DateTime', 'time_updated': :'DateTime', 'domain_name': :'String', 'time_zone': :'String', 'dns_servers': :'Array<String>', 'ntp_servers': :'Array<String>', 'hostname': :'String', 'ip_address': :'String', 'netmask': :'String', 'gateway': :'String', 'vlan_id': :'String', 'userdata': :'String', 'metadata': :'Hash<String, String>', 'vm_network_id': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
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 |
# File 'lib/oci/datacc/models/vm_instance.rb', line 462 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && compartment_id == other.compartment_id && display_name == other.display_name && description == other.description && infrastructure_id == other.infrastructure_id && cpus_enabled == other.cpus_enabled && memory_size_in_gbs == other.memory_size_in_gbs && boot_storage_size_in_gbs == other.boot_storage_size_in_gbs && data_storage_size_in_gbs == other.data_storage_size_in_gbs && == other. && == other. && == other. && image_id == other.image_id && server_id == other.server_id && ssh_public_keys == other.ssh_public_keys && lifecycle_state == other.lifecycle_state && lifecycle_details == other.lifecycle_details && time_created == other.time_created && time_updated == other.time_updated && domain_name == other.domain_name && time_zone == other.time_zone && dns_servers == other.dns_servers && ntp_servers == other.ntp_servers && hostname == other.hostname && ip_address == other.ip_address && netmask == other.netmask && gateway == other.gateway && vlan_id == other.vlan_id && userdata == other.userdata && == other. && vm_network_id == other.vm_network_id end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 |
# File 'lib/oci/datacc/models/vm_instance.rb', line 522 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
502 503 504 |
# File 'lib/oci/datacc/models/vm_instance.rb', line 502 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
511 512 513 |
# File 'lib/oci/datacc/models/vm_instance.rb', line 511 def hash [id, compartment_id, display_name, description, infrastructure_id, cpus_enabled, memory_size_in_gbs, boot_storage_size_in_gbs, data_storage_size_in_gbs, , , , image_id, server_id, ssh_public_keys, lifecycle_state, lifecycle_details, time_created, time_updated, domain_name, time_zone, dns_servers, ntp_servers, hostname, ip_address, netmask, gateway, vlan_id, userdata, , vm_network_id].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
555 556 557 558 559 560 561 562 563 564 |
# File 'lib/oci/datacc/models/vm_instance.rb', line 555 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
549 550 551 |
# File 'lib/oci/datacc/models/vm_instance.rb', line 549 def to_s to_hash.to_s end |