Class: OCI::Datacc::Models::VmInstance

Inherits:
Object
  • Object
show all
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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ VmInstance

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :id (String)

    The value to assign to the #id property

  • :compartment_id (String)

    The value to assign to the #compartment_id property

  • :display_name (String)

    The value to assign to the #display_name property

  • :description (String)

    The value to assign to the #description property

  • :infrastructure_id (String)

    The value to assign to the #infrastructure_id property

  • :cpus_enabled (Integer)

    The value to assign to the #cpus_enabled property

  • :memory_size_in_gbs (Float)

    The value to assign to the #memory_size_in_gbs property

  • :boot_storage_size_in_gbs (Float)

    The value to assign to the #boot_storage_size_in_gbs property

  • :data_storage_size_in_gbs (Float)

    The value to assign to the #data_storage_size_in_gbs property

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

    The value to assign to the #defined_tags property

  • :freeform_tags (Hash<String, String>)

    The value to assign to the #freeform_tags property

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

    The value to assign to the #system_tags property

  • :image_id (String)

    The value to assign to the #image_id property

  • :server_id (String)

    The value to assign to the #server_id property

  • :ssh_public_keys (Array<String>)

    The value to assign to the #ssh_public_keys property

  • :lifecycle_state (String)

    The value to assign to the #lifecycle_state property

  • :lifecycle_details (String)

    The value to assign to the #lifecycle_details property

  • :time_created (DateTime)

    The value to assign to the #time_created property

  • :time_updated (DateTime)

    The value to assign to the #time_updated property

  • :domain_name (String)

    The value to assign to the #domain_name property

  • :time_zone (String)

    The value to assign to the #time_zone property

  • :dns_servers (Array<String>)

    The value to assign to the #dns_servers property

  • :ntp_servers (Array<String>)

    The value to assign to the #ntp_servers property

  • :hostname (String)

    The value to assign to the #hostname property

  • :ip_address (String)

    The value to assign to the #ip_address property

  • :netmask (String)

    The value to assign to the #netmask property

  • :gateway (String)

    The value to assign to the #gateway property

  • :vlan_id (String)

    The value to assign to the #vlan_id property

  • :userdata (String)

    The value to assign to the #userdata property

  • :metadata (Hash<String, String>)

    The value to assign to the #metadata property

  • :vm_network_id (String)

    The value to assign to the #vm_network_id property



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.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']

  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.system_tags = attributes[:'systemTags'] if attributes[:'systemTags']

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

  self.system_tags = 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_gbsFloat

Boot storage memory to be allocated in GBs.

Returns:

  • (Float)


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_idString

[Required] The OCID of the compartment containing the VM instance.

Returns:

  • (String)


30
31
32
# File 'lib/oci/datacc/models/vm_instance.rb', line 30

def compartment_id
  @compartment_id
end

#cpus_enabledInteger

[Required] The number of CPU cores enabled for each VM instance.

Returns:

  • (Integer)


47
48
49
# File 'lib/oci/datacc/models/vm_instance.rb', line 47

def cpus_enabled
  @cpus_enabled
end

#data_storage_size_in_gbsFloat

Data storage to be allocated in GBs.

Returns:

  • (Float)


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_tagsHash<String, Hash<String, Object>>

Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {\"foo-namespace\": {\"bar-key\": \"value\"}}

Returns:

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


65
66
67
# File 'lib/oci/datacc/models/vm_instance.rb', line 65

def defined_tags
  @defined_tags
end

#descriptionString

VM instance description.

Returns:

  • (String)


39
40
41
# File 'lib/oci/datacc/models/vm_instance.rb', line 39

def description
  @description
end

#display_nameString

VM instance display name. This name does not have to be unique, and is changeable.

Returns:

  • (String)


35
36
37
# File 'lib/oci/datacc/models/vm_instance.rb', line 35

def display_name
  @display_name
end

#dns_serversArray<String>

The list of DNS server IP addresses. Maximum of 3 allowed.

Returns:

  • (Array<String>)


119
120
121
# File 'lib/oci/datacc/models/vm_instance.rb', line 119

def dns_servers
  @dns_servers
end

#domain_nameString

The domain name of the VM instance.

Returns:

  • (String)


111
112
113
# File 'lib/oci/datacc/models/vm_instance.rb', line 111

def domain_name
  @domain_name
end

#freeform_tagsHash<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\"}

Returns:

  • (Hash<String, String>)


71
72
73
# File 'lib/oci/datacc/models/vm_instance.rb', line 71

def freeform_tags
  @freeform_tags
end

#gatewayString

The gateway IP address of the VM instance network.

Returns:

  • (String)


139
140
141
# File 'lib/oci/datacc/models/vm_instance.rb', line 139

def gateway
  @gateway
end

#hostnameString

The host name of the instance.

Returns:

  • (String)


127
128
129
# File 'lib/oci/datacc/models/vm_instance.rb', line 127

def hostname
  @hostname
end

#idString

[Required] The OCID of the VM instance.

Returns:

  • (String)


24
25
26
# File 'lib/oci/datacc/models/vm_instance.rb', line 24

def id
  @id
end

#image_idString

The OCID of the VM custom instance uploaded.

Returns:

  • (String)


81
82
83
# File 'lib/oci/datacc/models/vm_instance.rb', line 81

def image_id
  @image_id
end

#infrastructure_idString

[Required] The OCID of the Database Infrastructure.

Returns:

  • (String)


43
44
45
# File 'lib/oci/datacc/models/vm_instance.rb', line 43

def infrastructure_id
  @infrastructure_id
end

#ip_addressString

The IP address of the instance.

Returns:

  • (String)


131
132
133
# File 'lib/oci/datacc/models/vm_instance.rb', line 131

def ip_address
  @ip_address
end

#lifecycle_detailsString

Lifecycle state details of the VM instance.

Returns:

  • (String)


97
98
99
# File 'lib/oci/datacc/models/vm_instance.rb', line 97

def lifecycle_details
  @lifecycle_details
end

#lifecycle_stateString

[Required] The current state of the VM instance.

Returns:

  • (String)


93
94
95
# File 'lib/oci/datacc/models/vm_instance.rb', line 93

def lifecycle_state
  @lifecycle_state
end

#memory_size_in_gbsFloat

The memory to be allocated in GBs.

Returns:

  • (Float)


51
52
53
# File 'lib/oci/datacc/models/vm_instance.rb', line 51

def memory_size_in_gbs
  @memory_size_in_gbs
end

#metadataHash<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.

Returns:

  • (Hash<String, String>)


156
157
158
# File 'lib/oci/datacc/models/vm_instance.rb', line 156

def 
  @metadata
end

#netmaskString

The netmask of the VM instance network.

Returns:

  • (String)


135
136
137
# File 'lib/oci/datacc/models/vm_instance.rb', line 135

def netmask
  @netmask
end

#ntp_serversArray<String>

The list of NTP server addresses. Maximum of 3 allowed.

Returns:

  • (Array<String>)


123
124
125
# File 'lib/oci/datacc/models/vm_instance.rb', line 123

def ntp_servers
  @ntp_servers
end

#server_idString

The OCID of the compute node on which VM instance should be launched.

Returns:

  • (String)


85
86
87
# File 'lib/oci/datacc/models/vm_instance.rb', line 85

def server_id
  @server_id
end

#ssh_public_keysArray<String>

[Required] List of public key used for SSH access to the VM instance.

Returns:

  • (Array<String>)


89
90
91
# File 'lib/oci/datacc/models/vm_instance.rb', line 89

def ssh_public_keys
  @ssh_public_keys
end

#system_tagsHash<String, Hash<String, Object>>

Usage of system tag keys. These predefined keys are scoped to namespaces. Example: { \"orcl-cloud\": { \"free-tier-retained\": \"true\" } }

Returns:

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


77
78
79
# File 'lib/oci/datacc/models/vm_instance.rb', line 77

def system_tags
  @system_tags
end

#time_createdDateTime

[Required] The time that the VM instance was created. An RFC3339 formatted datetime string.

Returns:

  • (DateTime)


102
103
104
# File 'lib/oci/datacc/models/vm_instance.rb', line 102

def time_created
  @time_created
end

#time_updatedDateTime

[Required] The time that the VM instance was last updated. An RFC3339 formatted datetime string.

Returns:

  • (DateTime)


107
108
109
# File 'lib/oci/datacc/models/vm_instance.rb', line 107

def time_updated
  @time_updated
end

#time_zoneString

[Required] The time zone to use for the VM instance.

Returns:

  • (String)


115
116
117
# File 'lib/oci/datacc/models/vm_instance.rb', line 115

def time_zone
  @time_zone
end

#userdataString

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.

Returns:

  • (String)


149
150
151
# File 'lib/oci/datacc/models/vm_instance.rb', line 149

def userdata
  @userdata
end

#vlan_idString

The network VLAN ID.

Returns:

  • (String)


143
144
145
# File 'lib/oci/datacc/models/vm_instance.rb', line 143

def vlan_id
  @vlan_id
end

#vm_network_idString

The OCID of the VM Network.

Returns:

  • (String)


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_mapObject

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_typesObject

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.

Parameters:

  • other (Object)

    the other object to be compared



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 &&
    defined_tags == other.defined_tags &&
    freeform_tags == other.freeform_tags &&
    system_tags == other.system_tags &&
    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

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



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

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


502
503
504
# File 'lib/oci/datacc/models/vm_instance.rb', line 502

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



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, defined_tags, freeform_tags, system_tags, 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_hashHash

Returns the object in the form of hash

Returns:

  • (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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



549
550
551
# File 'lib/oci/datacc/models/vm_instance.rb', line 549

def to_s
  to_hash.to_s
end