Class: OCI::Ocvp::Models::SupportedHostShapeSummary

Inherits:
Object
  • Object
show all
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_CREATE_DATASTORE = 'CREATE_DATASTORE'.freeze,
  SUPPORTED_OPERATIONS_UPDATE_DATASTORE = 'UPDATE_DATASTORE'.freeze,
  SUPPORTED_OPERATIONS_ADD_BLOCK_VOLUME_TO_DATASTORE = 'ADD_BLOCK_VOLUME_TO_DATASTORE'.freeze,
  SUPPORTED_OPERATIONS_DELETE_DATASTORE = 'DELETE_DATASTORE'.freeze,
  SUPPORTED_OPERATIONS_CREATE_DATASTORE_CLUSTER = 'CREATE_DATASTORE_CLUSTER'.freeze,
  SUPPORTED_OPERATIONS_UPDATE_DATASTORE_CLUSTER = 'UPDATE_DATASTORE_CLUSTER'.freeze,
  SUPPORTED_OPERATIONS_ATTACH_DATASTORE_CLUSTER_TO_ESXI_HOST = 'ATTACH_DATASTORE_CLUSTER_TO_ESXI_HOST'.freeze,
  SUPPORTED_OPERATIONS_ATTACH_DATASTORE_CLUSTER_TO_CLUSTER = 'ATTACH_DATASTORE_CLUSTER_TO_CLUSTER'.freeze,
  SUPPORTED_OPERATIONS_DETACH_DATASTORE_CLUSTER_FROM_ESXI_HOST = 'DETACH_DATASTORE_CLUSTER_FROM_ESXI_HOST'.freeze,
  SUPPORTED_OPERATIONS_DETACH_DATASTORE_CLUSTER_FROM_CLUSTER = 'DETACH_DATASTORE_CLUSTER_FROM_CLUSTER'.freeze,
  SUPPORTED_OPERATIONS_DELETE_DATASTORE_CLUSTER = 'DELETE_DATASTORE_CLUSTER'.freeze,
  SUPPORTED_OPERATIONS_ADD_DATASTORE_TO_DATASTORE_CLUSTER = 'ADD_DATASTORE_TO_DATASTORE_CLUSTER'.freeze,
  SUPPORTED_OPERATIONS_REMOVE_DATASTORE_FROM_DATASTORE_CLUSTER = 'REMOVE_DATASTORE_FROM_DATASTORE_CLUSTER'.freeze,
  SUPPORTED_OPERATIONS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ SupportedHostShapeSummary

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):



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
193
194
195
196
197
198
199
200
201
202
203
204
# File 'lib/oci/ocvp/models/supported_host_shape_summary.rb', line 143

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_countFloat

The default OCPU count of the shape.

Returns:

  • (Float)


61
62
63
# File 'lib/oci/ocvp/models/supported_host_shape_summary.rb', line 61

def default_ocpu_count
  @default_ocpu_count
end

#descriptionString

Description of the shape.

Returns:

  • (String)


81
82
83
# File 'lib/oci/ocvp/models/supported_host_shape_summary.rb', line 81

def description
  @description
end

#is_single_host_sddc_supportedBOOLEAN

Indicates whether the shape supports single host SDDCs.

Returns:

  • (BOOLEAN)


71
72
73
# File 'lib/oci/ocvp/models/supported_host_shape_summary.rb', line 71

def is_single_host_sddc_supported
  @is_single_host_sddc_supported
end

#is_support_monthly_commitmentBOOLEAN

Whether the shape supports "MONTH" Commitment.

Returns:

  • (BOOLEAN)


89
90
91
# File 'lib/oci/ocvp/models/supported_host_shape_summary.rb', line 89

def is_support_monthly_commitment
  @is_support_monthly_commitment
end

#is_support_shielded_instancesBOOLEAN

Indicates whether the shape supports shielded instances.

Returns:

  • (BOOLEAN)


85
86
87
# File 'lib/oci/ocvp/models/supported_host_shape_summary.rb', line 85

def is_support_shielded_instances
  @is_support_shielded_instances
end

#nameString

[Required] The name of the supported compute shape.

Returns:

  • (String)


46
47
48
# File 'lib/oci/ocvp/models/supported_host_shape_summary.rb', line 46

def name
  @name
end

#shape_familyString

[Required] The family of the shape. ESXi hosts of one SDDC must have the same shape family.

Returns:

  • (String)


56
57
58
# File 'lib/oci/ocvp/models/supported_host_shape_summary.rb', line 56

def shape_family
  @shape_family
end

#supported_ocpu_countArray<Float>

Support OCPU count of the shape.

Returns:

  • (Array<Float>)


66
67
68
# File 'lib/oci/ocvp/models/supported_host_shape_summary.rb', line 66

def supported_ocpu_count
  @supported_ocpu_count
end

#supported_operationsArray<String>

[Required] The operations where you can use the shape. The operations can be CREATE_SDDC or CREATE_ESXI_HOST.

Returns:

  • (Array<String>)


51
52
53
# File 'lib/oci/ocvp/models/supported_host_shape_summary.rb', line 51

def supported_operations
  @supported_operations
end

#supported_vmware_software_versionsArray<String>

The VMware software versions supported by the shape.

Returns:

  • (Array<String>)


76
77
78
# File 'lib/oci/ocvp/models/supported_host_shape_summary.rb', line 76

def supported_vmware_software_versions
  @supported_vmware_software_versions
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# File 'lib/oci/ocvp/models/supported_host_shape_summary.rb', line 92

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_typesObject

Attribute type mapping.



110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# File 'lib/oci/ocvp/models/supported_host_shape_summary.rb', line 110

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.

Parameters:

  • other (Object)

    the other object to be compared



233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
# File 'lib/oci/ocvp/models/supported_host_shape_summary.rb', line 233

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

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
# File 'lib/oci/ocvp/models/supported_host_shape_summary.rb', line 272

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

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


252
253
254
# File 'lib/oci/ocvp/models/supported_host_shape_summary.rb', line 252

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



261
262
263
# File 'lib/oci/ocvp/models/supported_host_shape_summary.rb', line 261

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_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



305
306
307
308
309
310
311
312
313
314
# File 'lib/oci/ocvp/models/supported_host_shape_summary.rb', line 305

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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



299
300
301
# File 'lib/oci/ocvp/models/supported_host_shape_summary.rb', line 299

def to_s
  to_hash.to_s
end