Class: OCI::Ocvp::Models::SupportedHostShapeSummary
- Inherits:
-
Object
- Object
- OCI::Ocvp::Models::SupportedHostShapeSummary
- Defined in:
- lib/oci/ocvp/models/supported_host_shape_summary.rb
Overview
A specific compute shape supported by the Oracle Cloud VMware Solution.
Constant Summary collapse
- SUPPORTED_OPERATIONS_ENUM =
[ SUPPORTED_OPERATIONS_CREATE_SDDC = 'CREATE_SDDC'.freeze, SUPPORTED_OPERATIONS_DELETE_SDDC = 'DELETE_SDDC'.freeze, SUPPORTED_OPERATIONS_CREATE_CLUSTER = 'CREATE_CLUSTER'.freeze, SUPPORTED_OPERATIONS_DELETE_CLUSTER = 'DELETE_CLUSTER'.freeze, SUPPORTED_OPERATIONS_CREATE_ESXI_HOST = 'CREATE_ESXI_HOST'.freeze, SUPPORTED_OPERATIONS_DELETE_ESXI_HOST = 'DELETE_ESXI_HOST'.freeze, SUPPORTED_OPERATIONS_UPGRADE_HCX = 'UPGRADE_HCX'.freeze, SUPPORTED_OPERATIONS_DOWNGRADE_HCX = 'DOWNGRADE_HCX'.freeze, SUPPORTED_OPERATIONS_CANCEL_DOWNGRADE_HCX = 'CANCEL_DOWNGRADE_HCX'.freeze, SUPPORTED_OPERATIONS_REFRESH_HCX_LICENSE_STATUS = 'REFRESH_HCX_LICENSE_STATUS'.freeze, SUPPORTED_OPERATIONS_SWAP_BILLING = 'SWAP_BILLING'.freeze, SUPPORTED_OPERATIONS_REPLACE_HOST = 'REPLACE_HOST'.freeze, SUPPORTED_OPERATIONS_IN_PLACE_UPGRADE = 'IN_PLACE_UPGRADE'.freeze, SUPPORTED_OPERATIONS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#default_ocpu_count ⇒ Float
The default OCPU count of the shape.
-
#description ⇒ String
Description of the shape.
-
#is_single_host_sddc_supported ⇒ BOOLEAN
Indicates whether the shape supports single host SDDCs.
-
#is_support_monthly_commitment ⇒ BOOLEAN
Whether the shape supports "MONTH" Commitment.
-
#is_support_shielded_instances ⇒ BOOLEAN
Indicates whether the shape supports shielded instances.
-
#name ⇒ String
[Required] The name of the supported compute shape.
-
#shape_family ⇒ String
[Required] The family of the shape.
-
#supported_ocpu_count ⇒ Array<Float>
Support OCPU count of the shape.
-
#supported_operations ⇒ Array<String>
[Required] The operations where you can use the shape.
-
#supported_vmware_software_versions ⇒ Array<String>
The VMware software versions supported by 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 = {}) ⇒ SupportedHostShapeSummary
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 = {}) ⇒ SupportedHostShapeSummary
Initializes the object
130 131 132 133 134 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 |
# File 'lib/oci/ocvp/models/supported_host_shape_summary.rb', line 130 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.name = attributes[:'name'] if attributes[:'name'] self.supported_operations = attributes[:'supportedOperations'] if attributes[:'supportedOperations'] raise 'You cannot provide both :supportedOperations and :supported_operations' if attributes.key?(:'supportedOperations') && attributes.key?(:'supported_operations') self.supported_operations = attributes[:'supported_operations'] if attributes[:'supported_operations'] self.shape_family = attributes[:'shapeFamily'] if attributes[:'shapeFamily'] raise 'You cannot provide both :shapeFamily and :shape_family' if attributes.key?(:'shapeFamily') && attributes.key?(:'shape_family') self.shape_family = attributes[:'shape_family'] if attributes[:'shape_family'] self.default_ocpu_count = attributes[:'defaultOcpuCount'] if attributes[:'defaultOcpuCount'] raise 'You cannot provide both :defaultOcpuCount and :default_ocpu_count' if attributes.key?(:'defaultOcpuCount') && attributes.key?(:'default_ocpu_count') self.default_ocpu_count = attributes[:'default_ocpu_count'] if attributes[:'default_ocpu_count'] self.supported_ocpu_count = attributes[:'supportedOcpuCount'] if attributes[:'supportedOcpuCount'] raise 'You cannot provide both :supportedOcpuCount and :supported_ocpu_count' if attributes.key?(:'supportedOcpuCount') && attributes.key?(:'supported_ocpu_count') self.supported_ocpu_count = attributes[:'supported_ocpu_count'] if attributes[:'supported_ocpu_count'] self.is_single_host_sddc_supported = attributes[:'isSingleHostSddcSupported'] unless attributes[:'isSingleHostSddcSupported'].nil? raise 'You cannot provide both :isSingleHostSddcSupported and :is_single_host_sddc_supported' if attributes.key?(:'isSingleHostSddcSupported') && attributes.key?(:'is_single_host_sddc_supported') self.is_single_host_sddc_supported = attributes[:'is_single_host_sddc_supported'] unless attributes[:'is_single_host_sddc_supported'].nil? self.supported_vmware_software_versions = attributes[:'supportedVmwareSoftwareVersions'] if attributes[:'supportedVmwareSoftwareVersions'] raise 'You cannot provide both :supportedVmwareSoftwareVersions and :supported_vmware_software_versions' if attributes.key?(:'supportedVmwareSoftwareVersions') && attributes.key?(:'supported_vmware_software_versions') self.supported_vmware_software_versions = attributes[:'supported_vmware_software_versions'] if attributes[:'supported_vmware_software_versions'] self.description = attributes[:'description'] if attributes[:'description'] self.is_support_shielded_instances = attributes[:'isSupportShieldedInstances'] unless attributes[:'isSupportShieldedInstances'].nil? self.is_support_shielded_instances = false if is_support_shielded_instances.nil? && !attributes.key?(:'isSupportShieldedInstances') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isSupportShieldedInstances and :is_support_shielded_instances' if attributes.key?(:'isSupportShieldedInstances') && attributes.key?(:'is_support_shielded_instances') self.is_support_shielded_instances = attributes[:'is_support_shielded_instances'] unless attributes[:'is_support_shielded_instances'].nil? self.is_support_shielded_instances = false if is_support_shielded_instances.nil? && !attributes.key?(:'isSupportShieldedInstances') && !attributes.key?(:'is_support_shielded_instances') # rubocop:disable Style/StringLiterals self.is_support_monthly_commitment = attributes[:'isSupportMonthlyCommitment'] unless attributes[:'isSupportMonthlyCommitment'].nil? self.is_support_monthly_commitment = false if is_support_monthly_commitment.nil? && !attributes.key?(:'isSupportMonthlyCommitment') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isSupportMonthlyCommitment and :is_support_monthly_commitment' if attributes.key?(:'isSupportMonthlyCommitment') && attributes.key?(:'is_support_monthly_commitment') self.is_support_monthly_commitment = attributes[:'is_support_monthly_commitment'] unless attributes[:'is_support_monthly_commitment'].nil? self.is_support_monthly_commitment = false if is_support_monthly_commitment.nil? && !attributes.key?(:'isSupportMonthlyCommitment') && !attributes.key?(:'is_support_monthly_commitment') # rubocop:disable Style/StringLiterals end |
Instance Attribute Details
#default_ocpu_count ⇒ Float
The default OCPU count of the shape.
48 49 50 |
# File 'lib/oci/ocvp/models/supported_host_shape_summary.rb', line 48 def default_ocpu_count @default_ocpu_count end |
#description ⇒ String
Description of the shape.
68 69 70 |
# File 'lib/oci/ocvp/models/supported_host_shape_summary.rb', line 68 def description @description end |
#is_single_host_sddc_supported ⇒ BOOLEAN
Indicates whether the shape supports single host SDDCs.
58 59 60 |
# File 'lib/oci/ocvp/models/supported_host_shape_summary.rb', line 58 def is_single_host_sddc_supported @is_single_host_sddc_supported end |
#is_support_monthly_commitment ⇒ BOOLEAN
Whether the shape supports "MONTH" Commitment.
76 77 78 |
# File 'lib/oci/ocvp/models/supported_host_shape_summary.rb', line 76 def is_support_monthly_commitment @is_support_monthly_commitment end |
#is_support_shielded_instances ⇒ BOOLEAN
Indicates whether the shape supports shielded instances.
72 73 74 |
# File 'lib/oci/ocvp/models/supported_host_shape_summary.rb', line 72 def is_support_shielded_instances @is_support_shielded_instances end |
#name ⇒ String
[Required] The name of the supported compute shape.
33 34 35 |
# File 'lib/oci/ocvp/models/supported_host_shape_summary.rb', line 33 def name @name end |
#shape_family ⇒ String
[Required] The family of the shape. ESXi hosts of one SDDC must have the same shape family.
43 44 45 |
# File 'lib/oci/ocvp/models/supported_host_shape_summary.rb', line 43 def shape_family @shape_family end |
#supported_ocpu_count ⇒ Array<Float>
Support OCPU count of the shape.
53 54 55 |
# File 'lib/oci/ocvp/models/supported_host_shape_summary.rb', line 53 def supported_ocpu_count @supported_ocpu_count end |
#supported_operations ⇒ Array<String>
[Required] The operations where you can use the shape. The operations can be CREATE_SDDC or CREATE_ESXI_HOST.
38 39 40 |
# File 'lib/oci/ocvp/models/supported_host_shape_summary.rb', line 38 def supported_operations @supported_operations end |
#supported_vmware_software_versions ⇒ Array<String>
The VMware software versions supported by the shape.
63 64 65 |
# File 'lib/oci/ocvp/models/supported_host_shape_summary.rb', line 63 def supported_vmware_software_versions @supported_vmware_software_versions end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/oci/ocvp/models/supported_host_shape_summary.rb', line 79 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'name': :'name', 'supported_operations': :'supportedOperations', 'shape_family': :'shapeFamily', 'default_ocpu_count': :'defaultOcpuCount', 'supported_ocpu_count': :'supportedOcpuCount', 'is_single_host_sddc_supported': :'isSingleHostSddcSupported', 'supported_vmware_software_versions': :'supportedVmwareSoftwareVersions', 'description': :'description', 'is_support_shielded_instances': :'isSupportShieldedInstances', 'is_support_monthly_commitment': :'isSupportMonthlyCommitment' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/oci/ocvp/models/supported_host_shape_summary.rb', line 97 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'name': :'String', 'supported_operations': :'Array<String>', 'shape_family': :'String', 'default_ocpu_count': :'Float', 'supported_ocpu_count': :'Array<Float>', 'is_single_host_sddc_supported': :'BOOLEAN', 'supported_vmware_software_versions': :'Array<String>', 'description': :'String', 'is_support_shielded_instances': :'BOOLEAN', 'is_support_monthly_commitment': :'BOOLEAN' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 |
# File 'lib/oci/ocvp/models/supported_host_shape_summary.rb', line 220 def ==(other) return true if equal?(other) self.class == other.class && name == other.name && supported_operations == other.supported_operations && shape_family == other.shape_family && default_ocpu_count == other.default_ocpu_count && supported_ocpu_count == other.supported_ocpu_count && is_single_host_sddc_supported == other.is_single_host_sddc_supported && supported_vmware_software_versions == other.supported_vmware_software_versions && description == other.description && is_support_shielded_instances == other.is_support_shielded_instances && is_support_monthly_commitment == other.is_support_monthly_commitment end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 |
# File 'lib/oci/ocvp/models/supported_host_shape_summary.rb', line 259 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
239 240 241 |
# File 'lib/oci/ocvp/models/supported_host_shape_summary.rb', line 239 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
248 249 250 |
# File 'lib/oci/ocvp/models/supported_host_shape_summary.rb', line 248 def hash [name, supported_operations, shape_family, default_ocpu_count, supported_ocpu_count, is_single_host_sddc_supported, supported_vmware_software_versions, description, is_support_shielded_instances, is_support_monthly_commitment].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
292 293 294 295 296 297 298 299 300 301 |
# File 'lib/oci/ocvp/models/supported_host_shape_summary.rb', line 292 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
286 287 288 |
# File 'lib/oci/ocvp/models/supported_host_shape_summary.rb', line 286 def to_s to_hash.to_s end |