Class: OCI::Database::Models::AutonomousVirtualMachineSummary
- Inherits:
-
Object
- Object
- OCI::Database::Models::AutonomousVirtualMachineSummary
- 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
-
#autonomous_vm_cluster_id ⇒ String
The OCID of the Autonomous VM Cluster associated with the Autonomous Virtual Machine.
-
#client_ip_address ⇒ String
Client IP Address.
-
#cloud_autonomous_vm_cluster_id ⇒ String
The OCID of the Cloud Autonomous VM Cluster associated with the Autonomous Virtual Machine.
-
#compartment_id ⇒ String
The OCID of the compartment.
-
#cpu_core_count ⇒ Integer
The number of CPU cores enabled on the Autonomous Virtual Machine.
-
#db_node_storage_size_in_gbs ⇒ Integer
The allocated local node storage in GBs on the Autonomous Virtual Machine.
-
#db_server_display_name ⇒ String
The display name of the dbServer associated with the Autonomous Virtual Machine.
-
#db_server_id ⇒ String
The OCID of the Db server associated with the Autonomous Virtual Machine.
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource.
-
#freeform_tags ⇒ Hash<String, String>
Free-form tags for this resource.
-
#id ⇒ String
[Required] The OCID of the Autonomous Virtual Machine.
-
#lifecycle_state ⇒ String
[Required] The current state of the Autonomous Virtual Machine.
-
#memory_size_in_gbs ⇒ Integer
The allocated memory in GBs on the Autonomous Virtual Machine.
-
#vm_name ⇒ String
The name of the Autonomous Virtual Machine.
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 = {}) ⇒ AutonomousVirtualMachineSummary
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 = {}) ⇒ AutonomousVirtualMachineSummary
Initializes the object
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. = 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'] 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_id ⇒ String
The OCID of the Autonomous VM Cluster associated with the Autonomous Virtual Machine.
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_address ⇒ String
Client IP Address.
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_id ⇒ String
The OCID of the Cloud Autonomous VM Cluster associated with the Autonomous Virtual Machine.
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_id ⇒ String
The OCID of the compartment.
62 63 64 |
# File 'lib/oci/database/models/autonomous_virtual_machine_summary.rb', line 62 def compartment_id @compartment_id end |
#cpu_core_count ⇒ Integer
The number of CPU cores enabled on the Autonomous Virtual Machine.
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_gbs ⇒ Integer
The allocated local node storage in GBs on the Autonomous Virtual Machine.
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_name ⇒ String
The display name of the dbServer associated with the Autonomous Virtual Machine.
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_id ⇒ String
The OCID of the Db server associated with the Autonomous Virtual Machine.
34 35 36 |
# File 'lib/oci/database/models/autonomous_virtual_machine_summary.rb', line 34 def db_server_id @db_server_id end |
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
80 81 82 |
# File 'lib/oci/database/models/autonomous_virtual_machine_summary.rb', line 80 def @defined_tags end |
#freeform_tags ⇒ Hash<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\"}
74 75 76 |
# File 'lib/oci/database/models/autonomous_virtual_machine_summary.rb', line 74 def @freeform_tags end |
#id ⇒ String
[Required] The OCID of the Autonomous Virtual Machine.
26 27 28 |
# File 'lib/oci/database/models/autonomous_virtual_machine_summary.rb', line 26 def id @id end |
#lifecycle_state ⇒ String
[Required] The current state of the Autonomous Virtual Machine.
54 55 56 |
# File 'lib/oci/database/models/autonomous_virtual_machine_summary.rb', line 54 def lifecycle_state @lifecycle_state end |
#memory_size_in_gbs ⇒ Integer
The allocated memory in GBs on the Autonomous Virtual Machine.
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_name ⇒ String
The name of the Autonomous Virtual Machine.
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_map ⇒ Object
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_types ⇒ Object
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.
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 && == other. && == other. && cloud_autonomous_vm_cluster_id == other.cloud_autonomous_vm_cluster_id end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
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
280 281 282 |
# File 'lib/oci/database/models/autonomous_virtual_machine_summary.rb', line 280 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
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, , , cloud_autonomous_vm_cluster_id].hash end |
#to_hash ⇒ 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_s ⇒ String
Returns the string representation 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 |