Class: OCI::DatabaseManagement::Models::ExternalExadataStorageConnectorSummary

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

Overview

The connector of the Exadata storage server.

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 = {}) ⇒ ExternalExadataStorageConnectorSummary

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

  • :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

  • :lifecycle_state (String)

    The value to assign to the #lifecycle_state proprety

  • :time_created (DateTime)

    The value to assign to the #time_created proprety

  • :time_updated (DateTime)

    The value to assign to the #time_updated proprety

  • :lifecycle_details (String)

    The value to assign to the #lifecycle_details proprety

  • :additional_details (Hash<String, String>)

    The value to assign to the #additional_details proprety

  • :connection_uri (String)

    The value to assign to the #connection_uri property

  • :storage_server_id (String)

    The value to assign to the #storage_server_id property

  • :agent_id (String)

    The value to assign to the #agent_id property



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_connector_summary.rb', line 88

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

  attributes['resourceType'] = 'STORAGE_CONNECTOR_SUMMARY'

  super(attributes)

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

  self.connection_uri = attributes[:'connectionUri'] if attributes[:'connectionUri']

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

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

  self.storage_server_id = attributes[:'storageServerId'] if attributes[:'storageServerId']

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

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

  self.agent_id = attributes[:'agentId'] if attributes[:'agentId']

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

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

Instance Attribute Details

#agent_idString

The OCID of the agent for the Exadata storage server.

Returns:

  • (String)


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

def agent_id
  @agent_id
end

#connection_uriString

The unique string of the connection. For example, "

Returns:

  • (String)


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

def connection_uri
  @connection_uri
end

#storage_server_idString

The OCID of the Exadata storage server.

Returns:

  • (String)


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

def storage_server_id
  @storage_server_id
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_connector_summary.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',
    'connection_uri': :'connectionUri',
    'storage_server_id': :'storageServerId',
    'agent_id': :'agentId'
    # 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_connector_summary.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',
    'connection_uri': :'String',
    'storage_server_id': :'String',
    'agent_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



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_connector_summary.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 &&
    connection_uri == other.connection_uri &&
    storage_server_id == other.storage_server_id &&
    agent_id == other.agent_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



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_connector_summary.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_connector_summary.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_connector_summary.rb', line 156

def hash
  [id, display_name, version, internal_id, status, lifecycle_state, time_created, time_updated, lifecycle_details, additional_details, resource_type, connection_uri, storage_server_id, agent_id].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_connector_summary.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_connector_summary.rb', line 194

def to_s
  to_hash.to_s
end