Class: OCI::DatabaseManagement::Models::ExternalStorageGridDiscoverySummary

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

Overview

The summary of the Exadata storage server grid 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 = {}) ⇒ ExternalStorageGridDiscoverySummary

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

  • :count_of_storage_servers_discovered (Integer)

    The value to assign to the #count_of_storage_servers_discovered property



73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# File 'lib/oci/database_management/models/external_storage_grid_discovery_summary.rb', line 73

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

  attributes['entityType'] = 'STORAGE_GRID_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.count_of_storage_servers_discovered = attributes[:'countOfStorageServersDiscovered'] if attributes[:'countOfStorageServersDiscovered']

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

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

Instance Attribute Details

#count_of_storage_servers_discoveredInteger

The total number of Exadata storage servers discovered.

Returns:

  • (Integer)


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

def count_of_storage_servers_discovered
  @count_of_storage_servers_discovered
end

Class Method Details

.attribute_mapObject

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



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/oci/database_management/models/external_storage_grid_discovery_summary.rb', line 17

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',
    'count_of_storage_servers_discovered': :'countOfStorageServersDiscovered'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



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_grid_discovery_summary.rb', line 37

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',
    'count_of_storage_servers_discovered': :'Integer'
    # 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



97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# File 'lib/oci/database_management/models/external_storage_grid_discovery_summary.rb', line 97

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



138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
# File 'lib/oci/database_management/models/external_storage_grid_discovery_summary.rb', line 138

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


118
119
120
# File 'lib/oci/database_management/models/external_storage_grid_discovery_summary.rb', line 118

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



127
128
129
# File 'lib/oci/database_management/models/external_storage_grid_discovery_summary.rb', line 127

def hash
  [id, agent_id, connector_id, display_name, version, internal_id, status, discover_status, discover_error_code, discover_error_msg, entity_type, count_of_storage_servers_discovered].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



171
172
173
174
175
176
177
178
179
180
# File 'lib/oci/database_management/models/external_storage_grid_discovery_summary.rb', line 171

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



165
166
167
# File 'lib/oci/database_management/models/external_storage_grid_discovery_summary.rb', line 165

def to_s
  to_hash.to_s
end