Class: OCI::Opsi::Models::MacsManagedExternalHostConfigurationSummary

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

Overview

Configuration Summary of a Macs Managed External 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 = {}) ⇒ MacsManagedExternalHostConfigurationSummary

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :host_insight_id (String)

    The value to assign to the #host_insight_id proprety

  • :compartment_id (String)

    The value to assign to the #compartment_id proprety

  • :host_name (String)

    The value to assign to the #host_name proprety

  • :platform_type (String)

    The value to assign to the #platform_type proprety

  • :platform_version (String)

    The value to assign to the #platform_version proprety

  • :platform_vendor (String)

    The value to assign to the #platform_vendor proprety

  • :total_cpus (Integer)

    The value to assign to the #total_cpus proprety

  • :total_memory_in_gbs (Float)

    The value to assign to the #total_memory_in_gbs proprety

  • :cpu_architecture (String)

    The value to assign to the #cpu_architecture proprety

  • :cpu_cache_in_mbs (Float)

    The value to assign to the #cpu_cache_in_mbs proprety

  • :cpu_vendor (String)

    The value to assign to the #cpu_vendor proprety

  • :cpu_frequency_in_mhz (Float)

    The value to assign to the #cpu_frequency_in_mhz proprety

  • :cpu_implementation (String)

    The value to assign to the #cpu_implementation proprety

  • :cores_per_socket (Integer)

    The value to assign to the #cores_per_socket proprety

  • :total_sockets (Integer)

    The value to assign to the #total_sockets proprety

  • :threads_per_socket (Integer)

    The value to assign to the #threads_per_socket proprety

  • :is_hyper_threading_enabled (BOOLEAN)

    The value to assign to the #is_hyper_threading_enabled proprety

  • :defined_tags (Hash<String, Hash<String, Object>>)

    The value to assign to the #defined_tags proprety

  • :freeform_tags (Hash<String, String>)

    The value to assign to the #freeform_tags proprety

  • :management_agent_id (String)

    The value to assign to the #management_agent_id property

  • :connector_id (String)

    The value to assign to the #connector_id property



107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# File 'lib/oci/opsi/models/macs_managed_external_host_configuration_summary.rb', line 107

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

  attributes['entitySource'] = 'MACS_MANAGED_EXTERNAL_HOST'

  super(attributes)

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

  self.management_agent_id = attributes[:'managementAgentId'] if attributes[:'managementAgentId']

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

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

  self.connector_id = attributes[:'connectorId'] if attributes[:'connectorId']

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

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

Instance Attribute Details

#connector_idString

The OCID of External Database Connector

Returns:

  • (String)


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

def connector_id
  @connector_id
end

#management_agent_idString

[Required] The OCID of the Management Agent

Returns:

  • (String)


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

def management_agent_id
  @management_agent_id
end

Class Method Details

.attribute_mapObject

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



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/oci/opsi/models/macs_managed_external_host_configuration_summary.rb', line 21

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',
    'management_agent_id': :'managementAgentId',
    'connector_id': :'connectorId'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# File 'lib/oci/opsi/models/macs_managed_external_host_configuration_summary.rb', line 51

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>',
    'management_agent_id': :'String',
    'connector_id': :'String'
    # 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



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

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 &&
    management_agent_id == other.management_agent_id &&
    connector_id == other.connector_id
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



188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
# File 'lib/oci/opsi/models/macs_managed_external_host_configuration_summary.rb', line 188

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


168
169
170
# File 'lib/oci/opsi/models/macs_managed_external_host_configuration_summary.rb', line 168

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



177
178
179
# File 'lib/oci/opsi/models/macs_managed_external_host_configuration_summary.rb', line 177

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, management_agent_id, connector_id].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



221
222
223
224
225
226
227
228
229
230
# File 'lib/oci/opsi/models/macs_managed_external_host_configuration_summary.rb', line 221

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



215
216
217
# File 'lib/oci/opsi/models/macs_managed_external_host_configuration_summary.rb', line 215

def to_s
  to_hash.to_s
end