Class: OCI::DatabaseManagement::Models::ExternalExadataStorageGrid

Inherits:
DbmResource
  • Object
show all
Defined in:
lib/oci/database_management/models/external_exadata_storage_grid.rb

Overview

The details of the Exadata storage server grid.

Constant Summary

Constants inherited from DbmResource

DbmResource::LIFECYCLE_STATE_ENUM, DbmResource::RESOURCE_TYPE_ENUM

Instance Attribute Summary collapse

Attributes inherited from DbmResource

#additional_details, #display_name, #id, #internal_id, #lifecycle_details, #lifecycle_state, #resource_type, #status, #time_created, #time_updated, #version

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from DbmResource

get_subtype

Constructor Details

#initialize(attributes = {}) ⇒ ExternalExadataStorageGrid

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# File 'lib/oci/database_management/models/external_exadata_storage_grid.rb', line 88

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

  attributes['resourceType'] = 'STORAGE_GRID'

  super(attributes)

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

  self.exadata_infrastructure_id = attributes[:'exadataInfrastructureId'] if attributes[:'exadataInfrastructureId']

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

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

  self.server_count = attributes[:'serverCount'] if attributes[:'serverCount']

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

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

  self.storage_servers = attributes[:'storageServers'] if attributes[:'storageServers']

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

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

Instance Attribute Details

#exadata_infrastructure_idString

The OCID of the Exadata infrastructure.

Returns:

  • (String)


15
16
17
# File 'lib/oci/database_management/models/external_exadata_storage_grid.rb', line 15

def exadata_infrastructure_id
  @exadata_infrastructure_id
end

#server_countFloat

The number of Exadata storage servers in the Exadata infrastructure.

Returns:

  • (Float)


19
20
21
# File 'lib/oci/database_management/models/external_exadata_storage_grid.rb', line 19

def server_count
  @server_count
end

#storage_serversArray<OCI::DatabaseManagement::Models::ExternalExadataStorageServerSummary>

A list of monitored Exadata storage servers.



23
24
25
# File 'lib/oci/database_management/models/external_exadata_storage_grid.rb', line 23

def storage_servers
  @storage_servers
end

Class Method Details

.attribute_mapObject

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



26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/oci/database_management/models/external_exadata_storage_grid.rb', line 26

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'id',
    'display_name': :'displayName',
    'version': :'version',
    'internal_id': :'internalId',
    'status': :'status',
    'lifecycle_state': :'lifecycleState',
    'time_created': :'timeCreated',
    'time_updated': :'timeUpdated',
    'lifecycle_details': :'lifecycleDetails',
    'additional_details': :'additionalDetails',
    'resource_type': :'resourceType',
    'exadata_infrastructure_id': :'exadataInfrastructureId',
    'server_count': :'serverCount',
    'storage_servers': :'storageServers'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/oci/database_management/models/external_exadata_storage_grid.rb', line 48

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'String',
    'display_name': :'String',
    'version': :'String',
    'internal_id': :'String',
    'status': :'String',
    'lifecycle_state': :'String',
    'time_created': :'DateTime',
    'time_updated': :'DateTime',
    'lifecycle_details': :'String',
    'additional_details': :'Hash<String, String>',
    'resource_type': :'String',
    'exadata_infrastructure_id': :'String',
    'server_count': :'Float',
    'storage_servers': :'Array<OCI::DatabaseManagement::Models::ExternalExadataStorageServerSummary>'
    # 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



124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# File 'lib/oci/database_management/models/external_exadata_storage_grid.rb', line 124

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

  self.class == other.class &&
    id == other.id &&
    display_name == other.display_name &&
    version == other.version &&
    internal_id == other.internal_id &&
    status == other.status &&
    lifecycle_state == other.lifecycle_state &&
    time_created == other.time_created &&
    time_updated == other.time_updated &&
    lifecycle_details == other.lifecycle_details &&
    additional_details == other.additional_details &&
    resource_type == other.resource_type &&
    exadata_infrastructure_id == other.exadata_infrastructure_id &&
    server_count == other.server_count &&
    storage_servers == other.storage_servers
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



167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
# File 'lib/oci/database_management/models/external_exadata_storage_grid.rb', line 167

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


147
148
149
# File 'lib/oci/database_management/models/external_exadata_storage_grid.rb', line 147

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



156
157
158
# File 'lib/oci/database_management/models/external_exadata_storage_grid.rb', line 156

def hash
  [id, display_name, version, internal_id, status, lifecycle_state, time_created, time_updated, lifecycle_details, additional_details, resource_type, exadata_infrastructure_id, server_count, storage_servers].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



200
201
202
203
204
205
206
207
208
209
# File 'lib/oci/database_management/models/external_exadata_storage_grid.rb', line 200

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



194
195
196
# File 'lib/oci/database_management/models/external_exadata_storage_grid.rb', line 194

def to_s
  to_hash.to_s
end