Class: OCI::DatabaseManagement::Models::ExternalStorageServerDiscoverySummary

Inherits:
EntityDiscovered
  • Object
show all
Defined in:
lib/oci/database_management/models/external_storage_server_discovery_summary.rb

Overview

The summary of the Exadata storage server discovery.

Constant Summary

Constants inherited from EntityDiscovered

OCI::DatabaseManagement::Models::EntityDiscovered::DISCOVER_STATUS_ENUM, OCI::DatabaseManagement::Models::EntityDiscovered::ENTITY_TYPE_ENUM

Instance Attribute Summary collapse

Attributes inherited from EntityDiscovered

#agent_id, #connector_id, #discover_error_code, #discover_error_msg, #discover_status, #display_name, #entity_type, #id, #internal_id, #status, #version

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from EntityDiscovered

get_subtype

Constructor Details

#initialize(attributes = {}) ⇒ ExternalStorageServerDiscoverySummary

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :id (String)

    The value to assign to the #id proprety

  • :agent_id (String)

    The value to assign to the #agent_id proprety

  • :connector_id (String)

    The value to assign to the #connector_id proprety

  • :display_name (String)

    The value to assign to the #display_name proprety

  • :version (String)

    The value to assign to the #version proprety

  • :internal_id (String)

    The value to assign to the #internal_id proprety

  • :status (String)

    The value to assign to the #status proprety

  • :discover_status (String)

    The value to assign to the #discover_status proprety

  • :discover_error_code (String)

    The value to assign to the #discover_error_code proprety

  • :discover_error_msg (String)

    The value to assign to the #discover_error_msg proprety

  • :ip_address (String)

    The value to assign to the #ip_address property

  • :make_model (String)

    The value to assign to the #make_model property

  • :cpu_count (Integer)

    The value to assign to the #cpu_count property

  • :memory_gb (Float)

    The value to assign to the #memory_gb property

  • :connector_name (String)

    The value to assign to the #connector_name property



101
102
103
104
105
106
107
108
109
110
111
112
113
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
# File 'lib/oci/database_management/models/external_storage_server_discovery_summary.rb', line 101

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

  attributes['entityType'] = 'STORAGE_SERVER_DISCOVER_SUMMARY'

  super(attributes)

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

  self.ip_address = attributes[:'ipAddress'] if attributes[:'ipAddress']

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

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

  self.make_model = attributes[:'makeModel'] if attributes[:'makeModel']

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

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

  self.cpu_count = attributes[:'cpuCount'] if attributes[:'cpuCount']

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

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

  self.memory_gb = attributes[:'memoryGB'] if attributes[:'memoryGB']

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

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

  self.connector_name = attributes[:'connectorName'] if attributes[:'connectorName']

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

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

Instance Attribute Details

#connector_nameString

The name of the Exadata storage server connector in case of rediscovery.

Returns:

  • (String)


30
31
32
# File 'lib/oci/database_management/models/external_storage_server_discovery_summary.rb', line 30

def connector_name
  @connector_name
end

#cpu_countInteger

The CPU count of the Exadata storage server.

Returns:

  • (Integer)


22
23
24
# File 'lib/oci/database_management/models/external_storage_server_discovery_summary.rb', line 22

def cpu_count
  @cpu_count
end

#ip_addressString

The IP address of the Exadata storage server.

Returns:

  • (String)


14
15
16
# File 'lib/oci/database_management/models/external_storage_server_discovery_summary.rb', line 14

def ip_address
  @ip_address
end

#make_modelString

The make model of the Exadata storage server.

Returns:

  • (String)


18
19
20
# File 'lib/oci/database_management/models/external_storage_server_discovery_summary.rb', line 18

def make_model
  @make_model
end

#memory_gbFloat

The memory size in GB of the Exadata storage server.

Returns:

  • (Float)


26
27
28
# File 'lib/oci/database_management/models/external_storage_server_discovery_summary.rb', line 26

def memory_gb
  @memory_gb
end

Class Method Details

.attribute_mapObject

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



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/oci/database_management/models/external_storage_server_discovery_summary.rb', line 33

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'id',
    'agent_id': :'agentId',
    'connector_id': :'connectorId',
    'display_name': :'displayName',
    'version': :'version',
    'internal_id': :'internalId',
    'status': :'status',
    'discover_status': :'discoverStatus',
    'discover_error_code': :'discoverErrorCode',
    'discover_error_msg': :'discoverErrorMsg',
    'entity_type': :'entityType',
    'ip_address': :'ipAddress',
    'make_model': :'makeModel',
    'cpu_count': :'cpuCount',
    'memory_gb': :'memoryGB',
    'connector_name': :'connectorName'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



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/database_management/models/external_storage_server_discovery_summary.rb', line 57

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'String',
    'agent_id': :'String',
    'connector_id': :'String',
    'display_name': :'String',
    'version': :'String',
    'internal_id': :'String',
    'status': :'String',
    'discover_status': :'String',
    'discover_error_code': :'String',
    'discover_error_msg': :'String',
    'entity_type': :'String',
    'ip_address': :'String',
    'make_model': :'String',
    'cpu_count': :'Integer',
    'memory_gb': :'Float',
    'connector_name': :'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



149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
# File 'lib/oci/database_management/models/external_storage_server_discovery_summary.rb', line 149

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

  self.class == other.class &&
    id == other.id &&
    agent_id == other.agent_id &&
    connector_id == other.connector_id &&
    display_name == other.display_name &&
    version == other.version &&
    internal_id == other.internal_id &&
    status == other.status &&
    discover_status == other.discover_status &&
    discover_error_code == other.discover_error_code &&
    discover_error_msg == other.discover_error_msg &&
    entity_type == other.entity_type &&
    ip_address == other.ip_address &&
    make_model == other.make_model &&
    cpu_count == other.cpu_count &&
    memory_gb == other.memory_gb &&
    connector_name == other.connector_name
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



194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
# File 'lib/oci/database_management/models/external_storage_server_discovery_summary.rb', line 194

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


174
175
176
# File 'lib/oci/database_management/models/external_storage_server_discovery_summary.rb', line 174

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



183
184
185
# File 'lib/oci/database_management/models/external_storage_server_discovery_summary.rb', line 183

def hash
  [id, agent_id, connector_id, display_name, version, internal_id, status, discover_status, discover_error_code, discover_error_msg, entity_type, ip_address, make_model, cpu_count, memory_gb, connector_name].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



227
228
229
230
231
232
233
234
235
236
# File 'lib/oci/database_management/models/external_storage_server_discovery_summary.rb', line 227

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



221
222
223
# File 'lib/oci/database_management/models/external_storage_server_discovery_summary.rb', line 221

def to_s
  to_hash.to_s
end