Class: OCI::Core::Models::ComputeGpuMemoryClusterInstanceSummary
- Inherits:
-
Object
- Object
- OCI::Core::Models::ComputeGpuMemoryClusterInstanceSummary
- Defined in:
- lib/oci/core/models/compute_gpu_memory_cluster_instance_summary.rb
Overview
The customer facing GPU memory cluster instance object details.
Constant Summary collapse
- LIFECYCLE_STATE_ENUM =
[ LIFECYCLE_STATE_MOVING = 'MOVING'.freeze, LIFECYCLE_STATE_PROVISIONING = 'PROVISIONING'.freeze, LIFECYCLE_STATE_RUNNING = 'RUNNING'.freeze, LIFECYCLE_STATE_STARTING = 'STARTING'.freeze, LIFECYCLE_STATE_STOPPING = 'STOPPING'.freeze, LIFECYCLE_STATE_STOPPED = 'STOPPED'.freeze, LIFECYCLE_STATE_SUSPENDING = 'SUSPENDING'.freeze, LIFECYCLE_STATE_SUSPENDED = 'SUSPENDED'.freeze, LIFECYCLE_STATE_CREATING_IMAGE = 'CREATING_IMAGE'.freeze, LIFECYCLE_STATE_TERMINATING = 'TERMINATING'.freeze, LIFECYCLE_STATE_TERMINATED = 'TERMINATED'.freeze, LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#availability_domain ⇒ String
The availability domain of the GPU memory cluster instance.
-
#compartment_id ⇒ String
The OCID for the compartment compartment.
-
#display_name ⇒ String
A user-friendly name.
-
#fault_domain ⇒ String
The fault domain the GPU memory cluster instance is running in.
-
#id ⇒ String
The OCID for the Customer-unique GPU memory cluster instance.
-
#instance_configuration_id ⇒ String
Configuration to be used for this GPU Memory Cluster instance.
-
#instance_shape ⇒ String
The shape of an instance.
-
#lifecycle_state ⇒ String
The lifecycle state of the GPU memory cluster instance.
-
#region ⇒ String
The region that contains the availability domain the instance is running in.
-
#time_created ⇒ DateTime
The date and time the GPU memory cluster instance was created.
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 = {}) ⇒ ComputeGpuMemoryClusterInstanceSummary
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 = {}) ⇒ ComputeGpuMemoryClusterInstanceSummary
Initializes the object
135 136 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 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 |
# File 'lib/oci/core/models/compute_gpu_memory_cluster_instance_summary.rb', line 135 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.availability_domain = attributes[:'availabilityDomain'] if attributes[:'availabilityDomain'] raise 'You cannot provide both :availabilityDomain and :availability_domain' if attributes.key?(:'availabilityDomain') && attributes.key?(:'availability_domain') self.availability_domain = attributes[:'availability_domain'] if attributes[:'availability_domain'] 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.fault_domain = attributes[:'faultDomain'] if attributes[:'faultDomain'] raise 'You cannot provide both :faultDomain and :fault_domain' if attributes.key?(:'faultDomain') && attributes.key?(:'fault_domain') self.fault_domain = attributes[:'fault_domain'] if attributes[:'fault_domain'] self.instance_configuration_id = attributes[:'instanceConfigurationId'] if attributes[:'instanceConfigurationId'] raise 'You cannot provide both :instanceConfigurationId and :instance_configuration_id' if attributes.key?(:'instanceConfigurationId') && attributes.key?(:'instance_configuration_id') self.instance_configuration_id = attributes[:'instance_configuration_id'] if attributes[:'instance_configuration_id'] self.region = attributes[:'region'] if attributes[:'region'] self.instance_shape = attributes[:'instanceShape'] if attributes[:'instanceShape'] raise 'You cannot provide both :instanceShape and :instance_shape' if attributes.key?(:'instanceShape') && attributes.key?(:'instance_shape') self.instance_shape = attributes[:'instance_shape'] if attributes[:'instance_shape'] 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.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.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'] end |
Instance Attribute Details
#availability_domain ⇒ String
The availability domain of the GPU memory cluster instance.
31 32 33 |
# File 'lib/oci/core/models/compute_gpu_memory_cluster_instance_summary.rb', line 31 def availability_domain @availability_domain end |
#compartment_id ⇒ String
The OCID for the compartment compartment.
42 43 44 |
# File 'lib/oci/core/models/compute_gpu_memory_cluster_instance_summary.rb', line 42 def compartment_id @compartment_id end |
#display_name ⇒ String
A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
74 75 76 |
# File 'lib/oci/core/models/compute_gpu_memory_cluster_instance_summary.rb', line 74 def display_name @display_name end |
#fault_domain ⇒ String
The fault domain the GPU memory cluster instance is running in.
46 47 48 |
# File 'lib/oci/core/models/compute_gpu_memory_cluster_instance_summary.rb', line 46 def fault_domain @fault_domain end |
#id ⇒ String
The OCID for the Customer-unique GPU memory cluster instance
36 37 38 |
# File 'lib/oci/core/models/compute_gpu_memory_cluster_instance_summary.rb', line 36 def id @id end |
#instance_configuration_id ⇒ String
Configuration to be used for this GPU Memory Cluster instance.
51 52 53 |
# File 'lib/oci/core/models/compute_gpu_memory_cluster_instance_summary.rb', line 51 def instance_configuration_id @instance_configuration_id end |
#instance_shape ⇒ String
The shape of an instance. The shape determines the number of CPUs, amount of memory, and other resources allocated to the instance. The shape determines the number of CPUs, the amount of memory, and other resources allocated to the instance. You can list all available shapes by calling list_shapes.
63 64 65 |
# File 'lib/oci/core/models/compute_gpu_memory_cluster_instance_summary.rb', line 63 def instance_shape @instance_shape end |
#lifecycle_state ⇒ String
The lifecycle state of the GPU memory cluster instance
68 69 70 |
# File 'lib/oci/core/models/compute_gpu_memory_cluster_instance_summary.rb', line 68 def lifecycle_state @lifecycle_state end |
#region ⇒ String
The region that contains the availability domain the instance is running in.
55 56 57 |
# File 'lib/oci/core/models/compute_gpu_memory_cluster_instance_summary.rb', line 55 def region @region end |
#time_created ⇒ DateTime
The date and time the GPU memory cluster instance was created.
Example: 2016-09-15T21:10:29.600Z
81 82 83 |
# File 'lib/oci/core/models/compute_gpu_memory_cluster_instance_summary.rb', line 81 def time_created @time_created end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/oci/core/models/compute_gpu_memory_cluster_instance_summary.rb', line 84 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'availability_domain': :'availabilityDomain', 'id': :'id', 'compartment_id': :'compartmentId', 'fault_domain': :'faultDomain', 'instance_configuration_id': :'instanceConfigurationId', 'region': :'region', 'instance_shape': :'instanceShape', 'lifecycle_state': :'lifecycleState', 'display_name': :'displayName', 'time_created': :'timeCreated' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/oci/core/models/compute_gpu_memory_cluster_instance_summary.rb', line 102 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'availability_domain': :'String', 'id': :'String', 'compartment_id': :'String', 'fault_domain': :'String', 'instance_configuration_id': :'String', 'region': :'String', 'instance_shape': :'String', 'lifecycle_state': :'String', 'display_name': :'String', 'time_created': :'DateTime' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 |
# File 'lib/oci/core/models/compute_gpu_memory_cluster_instance_summary.rb', line 214 def ==(other) return true if equal?(other) self.class == other.class && availability_domain == other.availability_domain && id == other.id && compartment_id == other.compartment_id && fault_domain == other.fault_domain && instance_configuration_id == other.instance_configuration_id && region == other.region && instance_shape == other.instance_shape && lifecycle_state == other.lifecycle_state && display_name == other.display_name && time_created == other.time_created end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 |
# File 'lib/oci/core/models/compute_gpu_memory_cluster_instance_summary.rb', line 253 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
233 234 235 |
# File 'lib/oci/core/models/compute_gpu_memory_cluster_instance_summary.rb', line 233 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
242 243 244 |
# File 'lib/oci/core/models/compute_gpu_memory_cluster_instance_summary.rb', line 242 def hash [availability_domain, id, compartment_id, fault_domain, instance_configuration_id, region, instance_shape, lifecycle_state, display_name, time_created].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
286 287 288 289 290 291 292 293 294 295 |
# File 'lib/oci/core/models/compute_gpu_memory_cluster_instance_summary.rb', line 286 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
280 281 282 |
# File 'lib/oci/core/models/compute_gpu_memory_cluster_instance_summary.rb', line 280 def to_s to_hash.to_s end |