Class: OCI::Opsi::Models::PeComanagedHostConfigurationSummary

Inherits:
HostConfigurationSummary show all
Defined in:
lib/oci/opsi/models/pe_comanaged_host_configuration_summary.rb

Overview

Configuration Summary of a PeComanaged host.

Constant Summary

Constants inherited from HostConfigurationSummary

HostConfigurationSummary::ENTITY_SOURCE_ENUM, HostConfigurationSummary::PLATFORM_TYPE_ENUM

Instance Attribute Summary collapse

Attributes inherited from HostConfigurationSummary

#compartment_id, #cores_per_socket, #cpu_architecture, #cpu_cache_in_mbs, #cpu_frequency_in_mhz, #cpu_implementation, #cpu_vendor, #defined_tags, #entity_source, #freeform_tags, #host_insight_id, #host_name, #is_hyper_threading_enabled, #platform_type, #platform_vendor, #platform_version, #threads_per_socket, #total_cpus, #total_memory_in_gbs, #total_sockets

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from HostConfigurationSummary

get_subtype

Constructor Details

#initialize(attributes = {}) ⇒ PeComanagedHostConfigurationSummary

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

[View source]

114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# File 'lib/oci/opsi/models/pe_comanaged_host_configuration_summary.rb', line 114

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  attributes['entitySource'] = 'PE_COMANAGED_HOST'

  super(attributes)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  self.opsi_private_endpoint_id = attributes[:'opsiPrivateEndpointId'] if attributes[:'opsiPrivateEndpointId']

  raise 'You cannot provide both :opsiPrivateEndpointId and :opsi_private_endpoint_id' if attributes.key?(:'opsiPrivateEndpointId') && attributes.key?(:'opsi_private_endpoint_id')

  self.opsi_private_endpoint_id = attributes[:'opsi_private_endpoint_id'] if attributes[:'opsi_private_endpoint_id']

  self.parent_id = attributes[:'parentId'] if attributes[:'parentId']

  raise 'You cannot provide both :parentId and :parent_id' if attributes.key?(:'parentId') && attributes.key?(:'parent_id')

  self.parent_id = attributes[:'parent_id'] if attributes[:'parent_id']

  self.exadata_details = attributes[:'exadataDetails'] if attributes[:'exadataDetails']

  raise 'You cannot provide both :exadataDetails and :exadata_details' if attributes.key?(:'exadataDetails') && attributes.key?(:'exadata_details')

  self.exadata_details = attributes[:'exadata_details'] if attributes[:'exadata_details']
end

Instance Attribute Details

#exadata_detailsOCI::Opsi::Models::ExadataDetails

This attribute is required.


22
23
24
# File 'lib/oci/opsi/models/pe_comanaged_host_configuration_summary.rb', line 22

def exadata_details
  @exadata_details
end

#opsi_private_endpoint_idString

[Required] The OCID of the OPSI private endpoint

Returns:

  • (String)

14
15
16
# File 'lib/oci/opsi/models/pe_comanaged_host_configuration_summary.rb', line 14

def opsi_private_endpoint_id
  @opsi_private_endpoint_id
end

#parent_idString

[Required] The OCID of the database.

Returns:

  • (String)

18
19
20
# File 'lib/oci/opsi/models/pe_comanaged_host_configuration_summary.rb', line 18

def parent_id
  @parent_id
end

Class Method Details

.attribute_mapObject

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

[View source]

25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/oci/opsi/models/pe_comanaged_host_configuration_summary.rb', line 25

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'host_insight_id': :'hostInsightId',
    'entity_source': :'entitySource',
    'compartment_id': :'compartmentId',
    'host_name': :'hostName',
    'platform_type': :'platformType',
    'platform_version': :'platformVersion',
    'platform_vendor': :'platformVendor',
    'total_cpus': :'totalCpus',
    'total_memory_in_gbs': :'totalMemoryInGBs',
    'cpu_architecture': :'cpuArchitecture',
    'cpu_cache_in_mbs': :'cpuCacheInMBs',
    'cpu_vendor': :'cpuVendor',
    'cpu_frequency_in_mhz': :'cpuFrequencyInMhz',
    'cpu_implementation': :'cpuImplementation',
    'cores_per_socket': :'coresPerSocket',
    'total_sockets': :'totalSockets',
    'threads_per_socket': :'threadsPerSocket',
    'is_hyper_threading_enabled': :'isHyperThreadingEnabled',
    'defined_tags': :'definedTags',
    'freeform_tags': :'freeformTags',
    'opsi_private_endpoint_id': :'opsiPrivateEndpointId',
    'parent_id': :'parentId',
    'exadata_details': :'exadataDetails'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.

[View source]

56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# File 'lib/oci/opsi/models/pe_comanaged_host_configuration_summary.rb', line 56

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'host_insight_id': :'String',
    'entity_source': :'String',
    'compartment_id': :'String',
    'host_name': :'String',
    'platform_type': :'String',
    'platform_version': :'String',
    'platform_vendor': :'String',
    'total_cpus': :'Integer',
    'total_memory_in_gbs': :'Float',
    'cpu_architecture': :'String',
    'cpu_cache_in_mbs': :'Float',
    'cpu_vendor': :'String',
    'cpu_frequency_in_mhz': :'Float',
    'cpu_implementation': :'String',
    'cores_per_socket': :'Integer',
    'total_sockets': :'Integer',
    'threads_per_socket': :'Integer',
    'is_hyper_threading_enabled': :'BOOLEAN',
    'defined_tags': :'Hash<String, Hash<String, Object>>',
    'freeform_tags': :'Hash<String, String>',
    'opsi_private_endpoint_id': :'String',
    'parent_id': :'String',
    'exadata_details': :'OCI::Opsi::Models::ExadataDetails'
    # 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

[View source]

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
# File 'lib/oci/opsi/models/pe_comanaged_host_configuration_summary.rb', line 150

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    host_insight_id == other.host_insight_id &&
    entity_source == other.entity_source &&
    compartment_id == other.compartment_id &&
    host_name == other.host_name &&
    platform_type == other.platform_type &&
    platform_version == other.platform_version &&
    platform_vendor == other.platform_vendor &&
    total_cpus == other.total_cpus &&
    total_memory_in_gbs == other.total_memory_in_gbs &&
    cpu_architecture == other.cpu_architecture &&
    cpu_cache_in_mbs == other.cpu_cache_in_mbs &&
    cpu_vendor == other.cpu_vendor &&
    cpu_frequency_in_mhz == other.cpu_frequency_in_mhz &&
    cpu_implementation == other.cpu_implementation &&
    cores_per_socket == other.cores_per_socket &&
    total_sockets == other.total_sockets &&
    threads_per_socket == other.threads_per_socket &&
    is_hyper_threading_enabled == other.is_hyper_threading_enabled &&
    defined_tags == other.defined_tags &&
    freeform_tags == other.freeform_tags &&
    opsi_private_endpoint_id == other.opsi_private_endpoint_id &&
    parent_id == other.parent_id &&
    exadata_details == other.exadata_details
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

[View source]

202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
# File 'lib/oci/opsi/models/pe_comanaged_host_configuration_summary.rb', line 202

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
[View source]

182
183
184
# File 'lib/oci/opsi/models/pe_comanaged_host_configuration_summary.rb', line 182

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code

[View source]

191
192
193
# File 'lib/oci/opsi/models/pe_comanaged_host_configuration_summary.rb', line 191

def hash
  [host_insight_id, entity_source, compartment_id, host_name, platform_type, platform_version, platform_vendor, total_cpus, total_memory_in_gbs, cpu_architecture, cpu_cache_in_mbs, cpu_vendor, cpu_frequency_in_mhz, cpu_implementation, cores_per_socket, total_sockets, threads_per_socket, is_hyper_threading_enabled, defined_tags, freeform_tags, opsi_private_endpoint_id, parent_id, exadata_details].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash

[View source]

235
236
237
238
239
240
241
242
243
244
# File 'lib/oci/opsi/models/pe_comanaged_host_configuration_summary.rb', line 235

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

[View source]

229
230
231
# File 'lib/oci/opsi/models/pe_comanaged_host_configuration_summary.rb', line 229

def to_s
  to_hash.to_s
end