Class: OCI::Database::Models::AutonomousVirtualMachineSummary

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/database/models/autonomous_virtual_machine_summary.rb

Overview

Details of the Autonomous Virtual Machine.

Constant Summary collapse

LIFECYCLE_STATE_ENUM =
[
  LIFECYCLE_STATE_PROVISIONING = 'PROVISIONING'.freeze,
  LIFECYCLE_STATE_AVAILABLE = 'AVAILABLE'.freeze,
  LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze,
  LIFECYCLE_STATE_TERMINATING = 'TERMINATING'.freeze,
  LIFECYCLE_STATE_TERMINATED = 'TERMINATED'.freeze,
  LIFECYCLE_STATE_FAILED = 'FAILED'.freeze,
  LIFECYCLE_STATE_MAINTENANCE_IN_PROGRESS = 'MAINTENANCE_IN_PROGRESS'.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 = {}) ⇒ AutonomousVirtualMachineSummary

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

  • :vm_name (String)

    The value to assign to the #vm_name property

  • :db_server_id (String)

    The value to assign to the #db_server_id property

  • :db_server_display_name (String)

    The value to assign to the #db_server_display_name property

  • :cpu_core_count (Integer)

    The value to assign to the #cpu_core_count property

  • :memory_size_in_gbs (Integer)

    The value to assign to the #memory_size_in_gbs property

  • :db_node_storage_size_in_gbs (Integer)

    The value to assign to the #db_node_storage_size_in_gbs property

  • :lifecycle_state (String)

    The value to assign to the #lifecycle_state property

  • :client_ip_address (String)

    The value to assign to the #client_ip_address property

  • :compartment_id (String)

    The value to assign to the #compartment_id property

  • :autonomous_vm_cluster_id (String)

    The value to assign to the #autonomous_vm_cluster_id property

  • :freeform_tags (Hash<String, String>)

    The value to assign to the #freeform_tags property

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

    The value to assign to the #defined_tags property

  • :cloud_autonomous_vm_cluster_id (String)

    The value to assign to the #cloud_autonomous_vm_cluster_id property



150
151
152
153
154
155
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
181
182
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
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
# File 'lib/oci/database/models/autonomous_virtual_machine_summary.rb', line 150

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

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

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

  self.db_server_id = attributes[:'dbServerId'] if attributes[:'dbServerId']

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

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

  self.db_server_display_name = attributes[:'dbServerDisplayName'] if attributes[:'dbServerDisplayName']

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

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

  self.cpu_core_count = attributes[:'cpuCoreCount'] if attributes[:'cpuCoreCount']

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  self.cloud_autonomous_vm_cluster_id = attributes[:'cloudAutonomousVmClusterId'] if attributes[:'cloudAutonomousVmClusterId']

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

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

Instance Attribute Details

#autonomous_vm_cluster_idString

The OCID of the Autonomous VM Cluster associated with the Autonomous Virtual Machine.

Returns:

  • (String)


66
67
68
# File 'lib/oci/database/models/autonomous_virtual_machine_summary.rb', line 66

def autonomous_vm_cluster_id
  @autonomous_vm_cluster_id
end

#client_ip_addressString

Client IP Address.

Returns:

  • (String)


58
59
60
# File 'lib/oci/database/models/autonomous_virtual_machine_summary.rb', line 58

def client_ip_address
  @client_ip_address
end

#cloud_autonomous_vm_cluster_idString

The OCID of the Cloud Autonomous VM Cluster associated with the Autonomous Virtual Machine.

Returns:

  • (String)


84
85
86
# File 'lib/oci/database/models/autonomous_virtual_machine_summary.rb', line 84

def cloud_autonomous_vm_cluster_id
  @cloud_autonomous_vm_cluster_id
end

#compartment_idString

The OCID of the compartment.

Returns:

  • (String)


62
63
64
# File 'lib/oci/database/models/autonomous_virtual_machine_summary.rb', line 62

def compartment_id
  @compartment_id
end

#cpu_core_countInteger

The number of CPU cores enabled on the Autonomous Virtual Machine.

Returns:

  • (Integer)


42
43
44
# File 'lib/oci/database/models/autonomous_virtual_machine_summary.rb', line 42

def cpu_core_count
  @cpu_core_count
end

#db_node_storage_size_in_gbsInteger

The allocated local node storage in GBs on the Autonomous Virtual Machine.

Returns:

  • (Integer)


50
51
52
# File 'lib/oci/database/models/autonomous_virtual_machine_summary.rb', line 50

def db_node_storage_size_in_gbs
  @db_node_storage_size_in_gbs
end

#db_server_display_nameString

The display name of the dbServer associated with the Autonomous Virtual Machine.

Returns:

  • (String)


38
39
40
# File 'lib/oci/database/models/autonomous_virtual_machine_summary.rb', line 38

def db_server_display_name
  @db_server_display_name
end

#db_server_idString

The OCID of the Db server associated with the Autonomous Virtual Machine.

Returns:

  • (String)


34
35
36
# File 'lib/oci/database/models/autonomous_virtual_machine_summary.rb', line 34

def db_server_id
  @db_server_id
end

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

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

Returns:

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


80
81
82
# File 'lib/oci/database/models/autonomous_virtual_machine_summary.rb', line 80

def defined_tags
  @defined_tags
end

#freeform_tagsHash<String, String>

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


74
75
76
# File 'lib/oci/database/models/autonomous_virtual_machine_summary.rb', line 74

def freeform_tags
  @freeform_tags
end

#idString

[Required] The OCID of the Autonomous Virtual Machine.

Returns:

  • (String)


26
27
28
# File 'lib/oci/database/models/autonomous_virtual_machine_summary.rb', line 26

def id
  @id
end

#lifecycle_stateString

[Required] The current state of the Autonomous Virtual Machine.

Returns:

  • (String)


54
55
56
# File 'lib/oci/database/models/autonomous_virtual_machine_summary.rb', line 54

def lifecycle_state
  @lifecycle_state
end

#memory_size_in_gbsInteger

The allocated memory in GBs on the Autonomous Virtual Machine.

Returns:

  • (Integer)


46
47
48
# File 'lib/oci/database/models/autonomous_virtual_machine_summary.rb', line 46

def memory_size_in_gbs
  @memory_size_in_gbs
end

#vm_nameString

The name of the Autonomous Virtual Machine.

Returns:

  • (String)


30
31
32
# File 'lib/oci/database/models/autonomous_virtual_machine_summary.rb', line 30

def vm_name
  @vm_name
end

Class Method Details

.attribute_mapObject

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



87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# File 'lib/oci/database/models/autonomous_virtual_machine_summary.rb', line 87

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'id',
    'vm_name': :'vmName',
    'db_server_id': :'dbServerId',
    'db_server_display_name': :'dbServerDisplayName',
    'cpu_core_count': :'cpuCoreCount',
    'memory_size_in_gbs': :'memorySizeInGBs',
    'db_node_storage_size_in_gbs': :'dbNodeStorageSizeInGBs',
    'lifecycle_state': :'lifecycleState',
    'client_ip_address': :'clientIpAddress',
    'compartment_id': :'compartmentId',
    'autonomous_vm_cluster_id': :'autonomousVmClusterId',
    'freeform_tags': :'freeformTags',
    'defined_tags': :'definedTags',
    'cloud_autonomous_vm_cluster_id': :'cloudAutonomousVmClusterId'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# File 'lib/oci/database/models/autonomous_virtual_machine_summary.rb', line 109

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'String',
    'vm_name': :'String',
    'db_server_id': :'String',
    'db_server_display_name': :'String',
    'cpu_core_count': :'Integer',
    'memory_size_in_gbs': :'Integer',
    'db_node_storage_size_in_gbs': :'Integer',
    'lifecycle_state': :'String',
    'client_ip_address': :'String',
    'compartment_id': :'String',
    'autonomous_vm_cluster_id': :'String',
    'freeform_tags': :'Hash<String, String>',
    'defined_tags': :'Hash<String, Hash<String, Object>>',
    'cloud_autonomous_vm_cluster_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



257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
# File 'lib/oci/database/models/autonomous_virtual_machine_summary.rb', line 257

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

  self.class == other.class &&
    id == other.id &&
    vm_name == other.vm_name &&
    db_server_id == other.db_server_id &&
    db_server_display_name == other.db_server_display_name &&
    cpu_core_count == other.cpu_core_count &&
    memory_size_in_gbs == other.memory_size_in_gbs &&
    db_node_storage_size_in_gbs == other.db_node_storage_size_in_gbs &&
    lifecycle_state == other.lifecycle_state &&
    client_ip_address == other.client_ip_address &&
    compartment_id == other.compartment_id &&
    autonomous_vm_cluster_id == other.autonomous_vm_cluster_id &&
    freeform_tags == other.freeform_tags &&
    defined_tags == other.defined_tags &&
    cloud_autonomous_vm_cluster_id == other.cloud_autonomous_vm_cluster_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



300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
# File 'lib/oci/database/models/autonomous_virtual_machine_summary.rb', line 300

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


280
281
282
# File 'lib/oci/database/models/autonomous_virtual_machine_summary.rb', line 280

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



289
290
291
# File 'lib/oci/database/models/autonomous_virtual_machine_summary.rb', line 289

def hash
  [id, vm_name, db_server_id, db_server_display_name, cpu_core_count, memory_size_in_gbs, db_node_storage_size_in_gbs, lifecycle_state, client_ip_address, compartment_id, autonomous_vm_cluster_id, freeform_tags, defined_tags, cloud_autonomous_vm_cluster_id].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



333
334
335
336
337
338
339
340
341
342
# File 'lib/oci/database/models/autonomous_virtual_machine_summary.rb', line 333

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



327
328
329
# File 'lib/oci/database/models/autonomous_virtual_machine_summary.rb', line 327

def to_s
  to_hash.to_s
end