Class: OCI::Core::Models::Shape
- Inherits:
-
Object
- Object
- OCI::Core::Models::Shape
- Defined in:
- lib/oci/core/models/shape.rb
Overview
A compute instance shape that can be used in #launch_instance launch_instance}. For more information, see {Overview of the Compute Service and Compute Shapes.
Constant Summary collapse
- BASELINE_OCPU_UTILIZATIONS_ENUM =
[ BASELINE_OCPU_UTILIZATIONS_BASELINE_1_8 = 'BASELINE_1_8'.freeze, BASELINE_OCPU_UTILIZATIONS_BASELINE_1_2 = 'BASELINE_1_2'.freeze, BASELINE_OCPU_UTILIZATIONS_BASELINE_1_1 = 'BASELINE_1_1'.freeze, BASELINE_OCPU_UTILIZATIONS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- BILLING_TYPE_ENUM =
[ BILLING_TYPE_ALWAYS_FREE = 'ALWAYS_FREE'.freeze, BILLING_TYPE_LIMITED_FREE = 'LIMITED_FREE'.freeze, BILLING_TYPE_PAID = 'PAID'.freeze, BILLING_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#baseline_ocpu_utilizations ⇒ Array<String>
For a subcore burstable VM, the supported baseline OCPU utilization for instances that use this shape.
-
#billing_type ⇒ String
How instances that use this shape are charged.
-
#gpu_description ⇒ String
A short description of the graphics processing unit (GPU) available for this shape.
-
#gpus ⇒ Integer
The number of GPUs available for this shape.
-
#is_billed_for_stopped_instance ⇒ BOOLEAN
Whether billing continues when the instances that use this shape are in the stopped state.
-
#is_flexible ⇒ BOOLEAN
Whether the shape supports creating flexible instances.
-
#is_live_migration_supported ⇒ BOOLEAN
Whether live migration is supported for this shape.
-
#is_subcore ⇒ BOOLEAN
Whether the shape supports creating subcore or burstable instances.
-
#local_disk_description ⇒ String
A short description of the local disks available for this shape.
-
#local_disks ⇒ Integer
The number of local disks available for this shape.
-
#local_disks_total_size_in_gbs ⇒ Float
The aggregate size of the local disks available for this shape, in gigabytes.
- #max_vnic_attachment_options ⇒ OCI::Core::Models::ShapeMaxVnicAttachmentOptions
-
#max_vnic_attachments ⇒ Integer
The maximum number of VNIC attachments available for this shape.
-
#memory_in_gbs ⇒ Float
The default amount of memory available for this shape, in gigabytes.
- #memory_options ⇒ OCI::Core::Models::ShapeMemoryOptions
-
#min_total_baseline_ocpus_required ⇒ Float
For a subcore burstable VM, the minimum total baseline OCPUs required.
-
#network_ports ⇒ Integer
The number of physical network interface card (NIC) ports available for this shape.
-
#networking_bandwidth_in_gbps ⇒ Float
The networking bandwidth available for this shape, in gigabits per second.
- #networking_bandwidth_options ⇒ OCI::Core::Models::ShapeNetworkingBandwidthOptions
- #ocpu_options ⇒ OCI::Core::Models::ShapeOcpuOptions
-
#ocpus ⇒ Float
The default number of OCPUs available for this shape.
- #platform_config_options ⇒ OCI::Core::Models::ShapePlatformConfigOptions
-
#processor_description ⇒ String
A short description of the shape's processor (CPU).
-
#quota_names ⇒ Array<String>
The list of of compartment quotas for the shape.
-
#rdma_bandwidth_in_gbps ⇒ Integer
The networking bandwidth available for the remote direct memory access (RDMA) network for this shape, in gigabits per second.
-
#rdma_ports ⇒ Integer
The number of networking ports available for the remote direct memory access (RDMA) network between nodes in a high performance computing (HPC) cluster network.
-
#recommended_alternatives ⇒ Array<OCI::Core::Models::ShapeAlternativeObject>
The list of shapes and shape details (if applicable) that Oracle recommends that you use as an alternative to the current shape.
-
#resize_compatible_shapes ⇒ Array<String>
The list of compatible shapes that this shape can be changed to.
-
#shape ⇒ String
[Required] The name of the shape.
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 = {}) ⇒ Shape
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 = {}) ⇒ Shape
Initializes the object
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 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 |
# File 'lib/oci/core/models/shape.rb', line 288 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.baseline_ocpu_utilizations = attributes[:'baselineOcpuUtilizations'] if attributes[:'baselineOcpuUtilizations'] raise 'You cannot provide both :baselineOcpuUtilizations and :baseline_ocpu_utilizations' if attributes.key?(:'baselineOcpuUtilizations') && attributes.key?(:'baseline_ocpu_utilizations') self.baseline_ocpu_utilizations = attributes[:'baseline_ocpu_utilizations'] if attributes[:'baseline_ocpu_utilizations'] self.min_total_baseline_ocpus_required = attributes[:'minTotalBaselineOcpusRequired'] if attributes[:'minTotalBaselineOcpusRequired'] raise 'You cannot provide both :minTotalBaselineOcpusRequired and :min_total_baseline_ocpus_required' if attributes.key?(:'minTotalBaselineOcpusRequired') && attributes.key?(:'min_total_baseline_ocpus_required') self.min_total_baseline_ocpus_required = attributes[:'min_total_baseline_ocpus_required'] if attributes[:'min_total_baseline_ocpus_required'] self.shape = attributes[:'shape'] if attributes[:'shape'] self.processor_description = attributes[:'processorDescription'] if attributes[:'processorDescription'] raise 'You cannot provide both :processorDescription and :processor_description' if attributes.key?(:'processorDescription') && attributes.key?(:'processor_description') self.processor_description = attributes[:'processor_description'] if attributes[:'processor_description'] self.ocpus = attributes[:'ocpus'] if attributes[:'ocpus'] self.memory_in_gbs = attributes[:'memoryInGBs'] if attributes[:'memoryInGBs'] raise 'You cannot provide both :memoryInGBs and :memory_in_gbs' if attributes.key?(:'memoryInGBs') && attributes.key?(:'memory_in_gbs') self.memory_in_gbs = attributes[:'memory_in_gbs'] if attributes[:'memory_in_gbs'] self.network_ports = attributes[:'networkPorts'] if attributes[:'networkPorts'] raise 'You cannot provide both :networkPorts and :network_ports' if attributes.key?(:'networkPorts') && attributes.key?(:'network_ports') self.network_ports = attributes[:'network_ports'] if attributes[:'network_ports'] self.networking_bandwidth_in_gbps = attributes[:'networkingBandwidthInGbps'] if attributes[:'networkingBandwidthInGbps'] raise 'You cannot provide both :networkingBandwidthInGbps and :networking_bandwidth_in_gbps' if attributes.key?(:'networkingBandwidthInGbps') && attributes.key?(:'networking_bandwidth_in_gbps') self.networking_bandwidth_in_gbps = attributes[:'networking_bandwidth_in_gbps'] if attributes[:'networking_bandwidth_in_gbps'] self. = attributes[:'maxVnicAttachments'] if attributes[:'maxVnicAttachments'] raise 'You cannot provide both :maxVnicAttachments and :max_vnic_attachments' if attributes.key?(:'maxVnicAttachments') && attributes.key?(:'max_vnic_attachments') self. = attributes[:'max_vnic_attachments'] if attributes[:'max_vnic_attachments'] self.gpus = attributes[:'gpus'] if attributes[:'gpus'] self.gpu_description = attributes[:'gpuDescription'] if attributes[:'gpuDescription'] raise 'You cannot provide both :gpuDescription and :gpu_description' if attributes.key?(:'gpuDescription') && attributes.key?(:'gpu_description') self.gpu_description = attributes[:'gpu_description'] if attributes[:'gpu_description'] self.local_disks = attributes[:'localDisks'] if attributes[:'localDisks'] raise 'You cannot provide both :localDisks and :local_disks' if attributes.key?(:'localDisks') && attributes.key?(:'local_disks') self.local_disks = attributes[:'local_disks'] if attributes[:'local_disks'] self.local_disks_total_size_in_gbs = attributes[:'localDisksTotalSizeInGBs'] if attributes[:'localDisksTotalSizeInGBs'] raise 'You cannot provide both :localDisksTotalSizeInGBs and :local_disks_total_size_in_gbs' if attributes.key?(:'localDisksTotalSizeInGBs') && attributes.key?(:'local_disks_total_size_in_gbs') self.local_disks_total_size_in_gbs = attributes[:'local_disks_total_size_in_gbs'] if attributes[:'local_disks_total_size_in_gbs'] self.local_disk_description = attributes[:'localDiskDescription'] if attributes[:'localDiskDescription'] raise 'You cannot provide both :localDiskDescription and :local_disk_description' if attributes.key?(:'localDiskDescription') && attributes.key?(:'local_disk_description') self.local_disk_description = attributes[:'local_disk_description'] if attributes[:'local_disk_description'] self.rdma_ports = attributes[:'rdmaPorts'] if attributes[:'rdmaPorts'] raise 'You cannot provide both :rdmaPorts and :rdma_ports' if attributes.key?(:'rdmaPorts') && attributes.key?(:'rdma_ports') self.rdma_ports = attributes[:'rdma_ports'] if attributes[:'rdma_ports'] self.rdma_bandwidth_in_gbps = attributes[:'rdmaBandwidthInGbps'] if attributes[:'rdmaBandwidthInGbps'] raise 'You cannot provide both :rdmaBandwidthInGbps and :rdma_bandwidth_in_gbps' if attributes.key?(:'rdmaBandwidthInGbps') && attributes.key?(:'rdma_bandwidth_in_gbps') self.rdma_bandwidth_in_gbps = attributes[:'rdma_bandwidth_in_gbps'] if attributes[:'rdma_bandwidth_in_gbps'] self.is_live_migration_supported = attributes[:'isLiveMigrationSupported'] unless attributes[:'isLiveMigrationSupported'].nil? raise 'You cannot provide both :isLiveMigrationSupported and :is_live_migration_supported' if attributes.key?(:'isLiveMigrationSupported') && attributes.key?(:'is_live_migration_supported') self.is_live_migration_supported = attributes[:'is_live_migration_supported'] unless attributes[:'is_live_migration_supported'].nil? self. = attributes[:'ocpuOptions'] if attributes[:'ocpuOptions'] raise 'You cannot provide both :ocpuOptions and :ocpu_options' if attributes.key?(:'ocpuOptions') && attributes.key?(:'ocpu_options') self. = attributes[:'ocpu_options'] if attributes[:'ocpu_options'] self. = attributes[:'memoryOptions'] if attributes[:'memoryOptions'] raise 'You cannot provide both :memoryOptions and :memory_options' if attributes.key?(:'memoryOptions') && attributes.key?(:'memory_options') self. = attributes[:'memory_options'] if attributes[:'memory_options'] self. = attributes[:'networkingBandwidthOptions'] if attributes[:'networkingBandwidthOptions'] raise 'You cannot provide both :networkingBandwidthOptions and :networking_bandwidth_options' if attributes.key?(:'networkingBandwidthOptions') && attributes.key?(:'networking_bandwidth_options') self. = attributes[:'networking_bandwidth_options'] if attributes[:'networking_bandwidth_options'] self. = attributes[:'maxVnicAttachmentOptions'] if attributes[:'maxVnicAttachmentOptions'] raise 'You cannot provide both :maxVnicAttachmentOptions and :max_vnic_attachment_options' if attributes.key?(:'maxVnicAttachmentOptions') && attributes.key?(:'max_vnic_attachment_options') self. = attributes[:'max_vnic_attachment_options'] if attributes[:'max_vnic_attachment_options'] self. = attributes[:'platformConfigOptions'] if attributes[:'platformConfigOptions'] raise 'You cannot provide both :platformConfigOptions and :platform_config_options' if attributes.key?(:'platformConfigOptions') && attributes.key?(:'platform_config_options') self. = attributes[:'platform_config_options'] if attributes[:'platform_config_options'] self.is_billed_for_stopped_instance = attributes[:'isBilledForStoppedInstance'] unless attributes[:'isBilledForStoppedInstance'].nil? raise 'You cannot provide both :isBilledForStoppedInstance and :is_billed_for_stopped_instance' if attributes.key?(:'isBilledForStoppedInstance') && attributes.key?(:'is_billed_for_stopped_instance') self.is_billed_for_stopped_instance = attributes[:'is_billed_for_stopped_instance'] unless attributes[:'is_billed_for_stopped_instance'].nil? self.billing_type = attributes[:'billingType'] if attributes[:'billingType'] raise 'You cannot provide both :billingType and :billing_type' if attributes.key?(:'billingType') && attributes.key?(:'billing_type') self.billing_type = attributes[:'billing_type'] if attributes[:'billing_type'] self.quota_names = attributes[:'quotaNames'] if attributes[:'quotaNames'] raise 'You cannot provide both :quotaNames and :quota_names' if attributes.key?(:'quotaNames') && attributes.key?(:'quota_names') self.quota_names = attributes[:'quota_names'] if attributes[:'quota_names'] self.is_subcore = attributes[:'isSubcore'] unless attributes[:'isSubcore'].nil? raise 'You cannot provide both :isSubcore and :is_subcore' if attributes.key?(:'isSubcore') && attributes.key?(:'is_subcore') self.is_subcore = attributes[:'is_subcore'] unless attributes[:'is_subcore'].nil? self.is_flexible = attributes[:'isFlexible'] unless attributes[:'isFlexible'].nil? raise 'You cannot provide both :isFlexible and :is_flexible' if attributes.key?(:'isFlexible') && attributes.key?(:'is_flexible') self.is_flexible = attributes[:'is_flexible'] unless attributes[:'is_flexible'].nil? self.resize_compatible_shapes = attributes[:'resizeCompatibleShapes'] if attributes[:'resizeCompatibleShapes'] raise 'You cannot provide both :resizeCompatibleShapes and :resize_compatible_shapes' if attributes.key?(:'resizeCompatibleShapes') && attributes.key?(:'resize_compatible_shapes') self.resize_compatible_shapes = attributes[:'resize_compatible_shapes'] if attributes[:'resize_compatible_shapes'] self.recommended_alternatives = attributes[:'recommendedAlternatives'] if attributes[:'recommendedAlternatives'] raise 'You cannot provide both :recommendedAlternatives and :recommended_alternatives' if attributes.key?(:'recommendedAlternatives') && attributes.key?(:'recommended_alternatives') self.recommended_alternatives = attributes[:'recommended_alternatives'] if attributes[:'recommended_alternatives'] end |
Instance Attribute Details
#baseline_ocpu_utilizations ⇒ Array<String>
For a subcore burstable VM, the supported baseline OCPU utilization for instances that use this shape.
32 33 34 |
# File 'lib/oci/core/models/shape.rb', line 32 def baseline_ocpu_utilizations @baseline_ocpu_utilizations end |
#billing_type ⇒ String
How instances that use this shape are charged.
148 149 150 |
# File 'lib/oci/core/models/shape.rb', line 148 def billing_type @billing_type end |
#gpu_description ⇒ String
A short description of the graphics processing unit (GPU) available for this shape.
If the shape does not have any GPUs, this field is null
.
86 87 88 |
# File 'lib/oci/core/models/shape.rb', line 86 def gpu_description @gpu_description end |
#gpus ⇒ Integer
The number of GPUs available for this shape.
79 80 81 |
# File 'lib/oci/core/models/shape.rb', line 79 def gpus @gpus end |
#is_billed_for_stopped_instance ⇒ BOOLEAN
Whether billing continues when the instances that use this shape are in the stopped state.
143 144 145 |
# File 'lib/oci/core/models/shape.rb', line 143 def is_billed_for_stopped_instance @is_billed_for_stopped_instance end |
#is_flexible ⇒ BOOLEAN
Whether the shape supports creating flexible instances. A flexible shape is a shape that lets you customize the number of OCPUs and the amount of memory when launching or resizing your instance.
166 167 168 |
# File 'lib/oci/core/models/shape.rb', line 166 def is_flexible @is_flexible end |
#is_live_migration_supported ⇒ BOOLEAN
Whether live migration is supported for this shape.
123 124 125 |
# File 'lib/oci/core/models/shape.rb', line 123 def is_live_migration_supported @is_live_migration_supported end |
#is_subcore ⇒ BOOLEAN
Whether the shape supports creating subcore or burstable instances. A burstable instance is a virtual machine (VM) instance that provides a baseline level of CPU performance with the ability to burst to a higher level to support occasional spikes in usage.
160 161 162 |
# File 'lib/oci/core/models/shape.rb', line 160 def is_subcore @is_subcore end |
#local_disk_description ⇒ String
A short description of the local disks available for this shape.
If the shape does not have any local disks, this field is null
.
105 106 107 |
# File 'lib/oci/core/models/shape.rb', line 105 def local_disk_description @local_disk_description end |
#local_disks ⇒ Integer
The number of local disks available for this shape.
91 92 93 |
# File 'lib/oci/core/models/shape.rb', line 91 def local_disks @local_disks end |
#local_disks_total_size_in_gbs ⇒ Float
The aggregate size of the local disks available for this shape, in gigabytes.
If the shape does not have any local disks, this field is null
.
98 99 100 |
# File 'lib/oci/core/models/shape.rb', line 98 def local_disks_total_size_in_gbs @local_disks_total_size_in_gbs end |
#max_vnic_attachment_options ⇒ OCI::Core::Models::ShapeMaxVnicAttachmentOptions
135 136 137 |
# File 'lib/oci/core/models/shape.rb', line 135 def @max_vnic_attachment_options end |
#max_vnic_attachments ⇒ Integer
The maximum number of VNIC attachments available for this shape.
74 75 76 |
# File 'lib/oci/core/models/shape.rb', line 74 def @max_vnic_attachments end |
#memory_in_gbs ⇒ Float
The default amount of memory available for this shape, in gigabytes.
59 60 61 |
# File 'lib/oci/core/models/shape.rb', line 59 def memory_in_gbs @memory_in_gbs end |
#memory_options ⇒ OCI::Core::Models::ShapeMemoryOptions
129 130 131 |
# File 'lib/oci/core/models/shape.rb', line 129 def @memory_options end |
#min_total_baseline_ocpus_required ⇒ Float
For a subcore burstable VM, the minimum total baseline OCPUs required. The total baseline OCPUs is equal to baselineOcpuUtilization chosen multiplied by the number of OCPUs chosen.
38 39 40 |
# File 'lib/oci/core/models/shape.rb', line 38 def min_total_baseline_ocpus_required @min_total_baseline_ocpus_required end |
#network_ports ⇒ Integer
The number of physical network interface card (NIC) ports available for this shape.
64 65 66 |
# File 'lib/oci/core/models/shape.rb', line 64 def network_ports @network_ports end |
#networking_bandwidth_in_gbps ⇒ Float
The networking bandwidth available for this shape, in gigabits per second.
69 70 71 |
# File 'lib/oci/core/models/shape.rb', line 69 def networking_bandwidth_in_gbps @networking_bandwidth_in_gbps end |
#networking_bandwidth_options ⇒ OCI::Core::Models::ShapeNetworkingBandwidthOptions
132 133 134 |
# File 'lib/oci/core/models/shape.rb', line 132 def @networking_bandwidth_options end |
#ocpu_options ⇒ OCI::Core::Models::ShapeOcpuOptions
126 127 128 |
# File 'lib/oci/core/models/shape.rb', line 126 def @ocpu_options end |
#ocpus ⇒ Float
The default number of OCPUs available for this shape.
54 55 56 |
# File 'lib/oci/core/models/shape.rb', line 54 def ocpus @ocpus end |
#platform_config_options ⇒ OCI::Core::Models::ShapePlatformConfigOptions
138 139 140 |
# File 'lib/oci/core/models/shape.rb', line 138 def @platform_config_options end |
#processor_description ⇒ String
A short description of the shape's processor (CPU).
49 50 51 |
# File 'lib/oci/core/models/shape.rb', line 49 def processor_description @processor_description end |
#quota_names ⇒ Array<String>
The list of of compartment quotas for the shape.
153 154 155 |
# File 'lib/oci/core/models/shape.rb', line 153 def quota_names @quota_names end |
#rdma_bandwidth_in_gbps ⇒ Integer
The networking bandwidth available for the remote direct memory access (RDMA) network for this shape, in gigabits per second.
118 119 120 |
# File 'lib/oci/core/models/shape.rb', line 118 def rdma_bandwidth_in_gbps @rdma_bandwidth_in_gbps end |
#rdma_ports ⇒ Integer
The number of networking ports available for the remote direct memory access (RDMA) network between nodes in a high performance computing (HPC) cluster network. If the shape does not support cluster networks, this value is 0
.
112 113 114 |
# File 'lib/oci/core/models/shape.rb', line 112 def rdma_ports @rdma_ports end |
#recommended_alternatives ⇒ Array<OCI::Core::Models::ShapeAlternativeObject>
The list of shapes and shape details (if applicable) that Oracle recommends that you use as an alternative to the current shape.
177 178 179 |
# File 'lib/oci/core/models/shape.rb', line 177 def recommended_alternatives @recommended_alternatives end |
#resize_compatible_shapes ⇒ Array<String>
The list of compatible shapes that this shape can be changed to. For more information, see Changing the Shape of an Instance.
172 173 174 |
# File 'lib/oci/core/models/shape.rb', line 172 def resize_compatible_shapes @resize_compatible_shapes end |
#shape ⇒ String
[Required] The name of the shape. You can enumerate all available shapes by calling list_shapes.
44 45 46 |
# File 'lib/oci/core/models/shape.rb', line 44 def shape @shape end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 |
# File 'lib/oci/core/models/shape.rb', line 180 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'baseline_ocpu_utilizations': :'baselineOcpuUtilizations', 'min_total_baseline_ocpus_required': :'minTotalBaselineOcpusRequired', 'shape': :'shape', 'processor_description': :'processorDescription', 'ocpus': :'ocpus', 'memory_in_gbs': :'memoryInGBs', 'network_ports': :'networkPorts', 'networking_bandwidth_in_gbps': :'networkingBandwidthInGbps', 'max_vnic_attachments': :'maxVnicAttachments', 'gpus': :'gpus', 'gpu_description': :'gpuDescription', 'local_disks': :'localDisks', 'local_disks_total_size_in_gbs': :'localDisksTotalSizeInGBs', 'local_disk_description': :'localDiskDescription', 'rdma_ports': :'rdmaPorts', 'rdma_bandwidth_in_gbps': :'rdmaBandwidthInGbps', 'is_live_migration_supported': :'isLiveMigrationSupported', 'ocpu_options': :'ocpuOptions', 'memory_options': :'memoryOptions', 'networking_bandwidth_options': :'networkingBandwidthOptions', 'max_vnic_attachment_options': :'maxVnicAttachmentOptions', 'platform_config_options': :'platformConfigOptions', 'is_billed_for_stopped_instance': :'isBilledForStoppedInstance', 'billing_type': :'billingType', 'quota_names': :'quotaNames', 'is_subcore': :'isSubcore', 'is_flexible': :'isFlexible', 'resize_compatible_shapes': :'resizeCompatibleShapes', 'recommended_alternatives': :'recommendedAlternatives' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/oci/core/models/shape.rb', line 217 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'baseline_ocpu_utilizations': :'Array<String>', 'min_total_baseline_ocpus_required': :'Float', 'shape': :'String', 'processor_description': :'String', 'ocpus': :'Float', 'memory_in_gbs': :'Float', 'network_ports': :'Integer', 'networking_bandwidth_in_gbps': :'Float', 'max_vnic_attachments': :'Integer', 'gpus': :'Integer', 'gpu_description': :'String', 'local_disks': :'Integer', 'local_disks_total_size_in_gbs': :'Float', 'local_disk_description': :'String', 'rdma_ports': :'Integer', 'rdma_bandwidth_in_gbps': :'Integer', 'is_live_migration_supported': :'BOOLEAN', 'ocpu_options': :'OCI::Core::Models::ShapeOcpuOptions', 'memory_options': :'OCI::Core::Models::ShapeMemoryOptions', 'networking_bandwidth_options': :'OCI::Core::Models::ShapeNetworkingBandwidthOptions', 'max_vnic_attachment_options': :'OCI::Core::Models::ShapeMaxVnicAttachmentOptions', 'platform_config_options': :'OCI::Core::Models::ShapePlatformConfigOptions', 'is_billed_for_stopped_instance': :'BOOLEAN', 'billing_type': :'String', 'quota_names': :'Array<String>', 'is_subcore': :'BOOLEAN', 'is_flexible': :'BOOLEAN', 'resize_compatible_shapes': :'Array<String>', 'recommended_alternatives': :'Array<OCI::Core::Models::ShapeAlternativeObject>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 |
# File 'lib/oci/core/models/shape.rb', line 497 def ==(other) return true if equal?(other) self.class == other.class && baseline_ocpu_utilizations == other.baseline_ocpu_utilizations && min_total_baseline_ocpus_required == other.min_total_baseline_ocpus_required && shape == other.shape && processor_description == other.processor_description && ocpus == other.ocpus && memory_in_gbs == other.memory_in_gbs && network_ports == other.network_ports && networking_bandwidth_in_gbps == other.networking_bandwidth_in_gbps && == other. && gpus == other.gpus && gpu_description == other.gpu_description && local_disks == other.local_disks && local_disks_total_size_in_gbs == other.local_disks_total_size_in_gbs && local_disk_description == other.local_disk_description && rdma_ports == other.rdma_ports && rdma_bandwidth_in_gbps == other.rdma_bandwidth_in_gbps && is_live_migration_supported == other.is_live_migration_supported && == other. && == other. && == other. && == other. && == other. && is_billed_for_stopped_instance == other.is_billed_for_stopped_instance && billing_type == other.billing_type && quota_names == other.quota_names && is_subcore == other.is_subcore && is_flexible == other.is_flexible && resize_compatible_shapes == other.resize_compatible_shapes && recommended_alternatives == other.recommended_alternatives end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 |
# File 'lib/oci/core/models/shape.rb', line 555 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
535 536 537 |
# File 'lib/oci/core/models/shape.rb', line 535 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
544 545 546 |
# File 'lib/oci/core/models/shape.rb', line 544 def hash [baseline_ocpu_utilizations, min_total_baseline_ocpus_required, shape, processor_description, ocpus, memory_in_gbs, network_ports, networking_bandwidth_in_gbps, , gpus, gpu_description, local_disks, local_disks_total_size_in_gbs, local_disk_description, rdma_ports, rdma_bandwidth_in_gbps, is_live_migration_supported, , , , , , is_billed_for_stopped_instance, billing_type, quota_names, is_subcore, is_flexible, resize_compatible_shapes, recommended_alternatives].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
588 589 590 591 592 593 594 595 596 597 |
# File 'lib/oci/core/models/shape.rb', line 588 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
582 583 584 |
# File 'lib/oci/core/models/shape.rb', line 582 def to_s to_hash.to_s end |