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_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_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- SUPPORTED_SDDC_TYPES_ENUM =
[ SUPPORTED_SDDC_TYPES_PRODUCTION = 'PRODUCTION'.freeze, SUPPORTED_SDDC_TYPES_NON_PRODUCTION = 'NON_PRODUCTION'.freeze, SUPPORTED_SDDC_TYPES_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_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_sddc_types ⇒ Array<String>
The supported SDDC types for 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
123 124 125 126 127 128 129 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 |
# File 'lib/oci/ocvp/models/supported_host_shape_summary.rb', line 123 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.supported_sddc_types = attributes[:'supportedSddcTypes'] if attributes[:'supportedSddcTypes'] raise 'You cannot provide both :supportedSddcTypes and :supported_sddc_types' if attributes.key?(:'supportedSddcTypes') && attributes.key?(:'supported_sddc_types') self.supported_sddc_types = attributes[:'supported_sddc_types'] if attributes[:'supported_sddc_types'] 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 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_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_sddc_types ⇒ Array<String>
The supported SDDC types for the shape.
58 59 60 |
# File 'lib/oci/ocvp/models/supported_host_shape_summary.rb', line 58 def supported_sddc_types @supported_sddc_types 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.
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/oci/ocvp/models/supported_host_shape_summary.rb', line 75 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'name': :'name', 'supported_operations': :'supportedOperations', 'shape_family': :'shapeFamily', 'default_ocpu_count': :'defaultOcpuCount', 'supported_ocpu_count': :'supportedOcpuCount', 'supported_sddc_types': :'supportedSddcTypes', 'supported_vmware_software_versions': :'supportedVmwareSoftwareVersions', 'description': :'description', 'is_support_shielded_instances': :'isSupportShieldedInstances' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/oci/ocvp/models/supported_host_shape_summary.rb', line 92 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>', 'supported_sddc_types': :'Array<String>', 'supported_vmware_software_versions': :'Array<String>', 'description': :'String', 'is_support_shielded_instances': :'BOOLEAN' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
225 226 227 228 229 230 231 232 233 234 235 236 237 238 |
# File 'lib/oci/ocvp/models/supported_host_shape_summary.rb', line 225 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 && supported_sddc_types == other.supported_sddc_types && supported_vmware_software_versions == other.supported_vmware_software_versions && description == other.description && is_support_shielded_instances == other.is_support_shielded_instances end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 |
# File 'lib/oci/ocvp/models/supported_host_shape_summary.rb', line 263 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
243 244 245 |
# File 'lib/oci/ocvp/models/supported_host_shape_summary.rb', line 243 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
252 253 254 |
# File 'lib/oci/ocvp/models/supported_host_shape_summary.rb', line 252 def hash [name, supported_operations, shape_family, default_ocpu_count, supported_ocpu_count, supported_sddc_types, supported_vmware_software_versions, description, is_support_shielded_instances].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
296 297 298 299 300 301 302 303 304 305 |
# File 'lib/oci/ocvp/models/supported_host_shape_summary.rb', line 296 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
290 291 292 |
# File 'lib/oci/ocvp/models/supported_host_shape_summary.rb', line 290 def to_s to_hash.to_s end |