Class: OCI::Datacc::Models::VmInstanceSummary
- Inherits:
-
Object
- Object
- OCI::Datacc::Models::VmInstanceSummary
- Defined in:
- lib/oci/datacc/models/vm_instance_summary.rb
Overview
VM instance on Database Infrastructure summary.
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
-
#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.
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource.
-
#description ⇒ String
VM instance description.
-
#display_name ⇒ String
VM instance display name.
-
#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.
-
#id ⇒ String
[Required] The OCID of the VM instance.
-
#image_id ⇒ String
The OCID of the VM custom instance uploaded.
-
#infrastructure_id ⇒ String
The OCID of the Database Infrastructure.
-
#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.
-
#server_id ⇒ String
The OCID of the compute node on which VM instance should be launched.
-
#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.
-
#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 = {}) ⇒ VmInstanceSummary
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 = {}) ⇒ VmInstanceSummary
Initializes the object
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 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 |
# File 'lib/oci/datacc/models/vm_instance_summary.rb', line 188 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. = 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.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.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
#compartment_id ⇒ String
[Required] The OCID of the compartment containing the VM instance.
30 31 32 |
# File 'lib/oci/datacc/models/vm_instance_summary.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_summary.rb', line 47 def cpus_enabled @cpus_enabled 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\"}}
57 58 59 |
# File 'lib/oci/datacc/models/vm_instance_summary.rb', line 57 def @defined_tags end |
#description ⇒ String
VM instance description.
39 40 41 |
# File 'lib/oci/datacc/models/vm_instance_summary.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_summary.rb', line 35 def display_name @display_name end |
#domain_name ⇒ String
The domain name of the VM instance.
99 100 101 |
# File 'lib/oci/datacc/models/vm_instance_summary.rb', line 99 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\"}
63 64 65 |
# File 'lib/oci/datacc/models/vm_instance_summary.rb', line 63 def @freeform_tags end |
#id ⇒ String
[Required] The OCID of the VM instance.
24 25 26 |
# File 'lib/oci/datacc/models/vm_instance_summary.rb', line 24 def id @id end |
#image_id ⇒ String
The OCID of the VM custom instance uploaded.
73 74 75 |
# File 'lib/oci/datacc/models/vm_instance_summary.rb', line 73 def image_id @image_id end |
#infrastructure_id ⇒ String
The OCID of the Database Infrastructure.
43 44 45 |
# File 'lib/oci/datacc/models/vm_instance_summary.rb', line 43 def infrastructure_id @infrastructure_id end |
#lifecycle_details ⇒ String
Lifecycle state details of the VM instance.
85 86 87 |
# File 'lib/oci/datacc/models/vm_instance_summary.rb', line 85 def lifecycle_details @lifecycle_details end |
#lifecycle_state ⇒ String
[Required] The current state of the VM instance.
81 82 83 |
# File 'lib/oci/datacc/models/vm_instance_summary.rb', line 81 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_summary.rb', line 51 def memory_size_in_gbs @memory_size_in_gbs end |
#server_id ⇒ String
The OCID of the compute node on which VM instance should be launched.
77 78 79 |
# File 'lib/oci/datacc/models/vm_instance_summary.rb', line 77 def server_id @server_id 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\" } }
69 70 71 |
# File 'lib/oci/datacc/models/vm_instance_summary.rb', line 69 def @system_tags end |
#time_created ⇒ DateTime
[Required] The time that the VM instance was created. An RFC3339 formatted datetime string.
90 91 92 |
# File 'lib/oci/datacc/models/vm_instance_summary.rb', line 90 def time_created @time_created end |
#time_updated ⇒ DateTime
[Required] The time that the VM instance was last updated. An RFC3339 formatted datetime string.
95 96 97 |
# File 'lib/oci/datacc/models/vm_instance_summary.rb', line 95 def time_updated @time_updated end |
#time_zone ⇒ String
[Required] The time zone to use for the VM instance.
103 104 105 |
# File 'lib/oci/datacc/models/vm_instance_summary.rb', line 103 def time_zone @time_zone end |
#vm_network_id ⇒ String
The OCID of the VM Network.
107 108 109 |
# File 'lib/oci/datacc/models/vm_instance_summary.rb', line 107 def vm_network_id @vm_network_id end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 |
# File 'lib/oci/datacc/models/vm_instance_summary.rb', line 110 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', 'defined_tags': :'definedTags', 'freeform_tags': :'freeformTags', 'system_tags': :'systemTags', 'image_id': :'imageId', 'server_id': :'serverId', 'lifecycle_state': :'lifecycleState', 'lifecycle_details': :'lifecycleDetails', 'time_created': :'timeCreated', 'time_updated': :'timeUpdated', 'domain_name': :'domainName', 'time_zone': :'timeZone', 'vm_network_id': :'vmNetworkId' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 |
# File 'lib/oci/datacc/models/vm_instance_summary.rb', line 137 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', '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', 'lifecycle_state': :'String', 'lifecycle_details': :'String', 'time_created': :'DateTime', 'time_updated': :'DateTime', 'domain_name': :'String', 'time_zone': :'String', 'vm_network_id': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 |
# File 'lib/oci/datacc/models/vm_instance_summary.rb', line 321 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 && == other. && == other. && == other. && image_id == other.image_id && server_id == other.server_id && 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 && vm_network_id == other.vm_network_id end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 |
# File 'lib/oci/datacc/models/vm_instance_summary.rb', line 369 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
349 350 351 |
# File 'lib/oci/datacc/models/vm_instance_summary.rb', line 349 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
358 359 360 |
# File 'lib/oci/datacc/models/vm_instance_summary.rb', line 358 def hash [id, compartment_id, display_name, description, infrastructure_id, cpus_enabled, memory_size_in_gbs, , , , image_id, server_id, lifecycle_state, lifecycle_details, time_created, time_updated, domain_name, time_zone, vm_network_id].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
402 403 404 405 406 407 408 409 410 411 |
# File 'lib/oci/datacc/models/vm_instance_summary.rb', line 402 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
396 397 398 |
# File 'lib/oci/datacc/models/vm_instance_summary.rb', line 396 def to_s to_hash.to_s end |