Class: OCI::DatabaseManagement::Models::ExternalDatabaseSystemDiscoverySummary

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

Overview

The summary of the DB system discovery.

Constant Summary collapse

LICENSE_MODEL_ENUM =
[
  LICENSE_MODEL_LICENSE_INCLUDED = 'LICENSE_INCLUDED'.freeze,
  LICENSE_MODEL_BRING_YOUR_OWN_LICENSE = 'BRING_YOUR_OWN_LICENSE'.freeze,
  LICENSE_MODEL_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

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

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

  • :oracle_home (String)

    The value to assign to the #oracle_home property

  • :asm_connector_name (String)

    The value to assign to the #asm_connector_name property

  • :license_model (String)

    The value to assign to the #license_model property

  • :compartment_id (String)

    The value to assign to the #compartment_id property



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
# File 'lib/oci/database_management/models/external_database_system_discovery_summary.rb', line 102

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

  attributes['entityType'] = 'DATABASE_SYSTEM_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.oracle_home = attributes[:'oracleHome'] if attributes[:'oracleHome']

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

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

  self.asm_connector_name = attributes[:'asmConnectorName'] if attributes[:'asmConnectorName']

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

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

  self.license_model = attributes[:'licenseModel'] if attributes[:'licenseModel']

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

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

  self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId']

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

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

Instance Attribute Details

#asm_connector_nameString

The display name of the ASM connector.

Returns:

  • (String)


25
26
27
# File 'lib/oci/database_management/models/external_database_system_discovery_summary.rb', line 25

def asm_connector_name
  @asm_connector_name
end

#compartment_idString

The OCID of the compartment.

Returns:

  • (String)


34
35
36
# File 'lib/oci/database_management/models/external_database_system_discovery_summary.rb', line 34

def compartment_id
  @compartment_id
end

#license_modelString

The Oracle license model that applies to the database management resources.

Returns:

  • (String)


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

def license_model
  @license_model
end

#oracle_homeString

The Oracle home path.

Returns:

  • (String)


21
22
23
# File 'lib/oci/database_management/models/external_database_system_discovery_summary.rb', line 21

def oracle_home
  @oracle_home
end

Class Method Details

.attribute_mapObject

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



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/oci/database_management/models/external_database_system_discovery_summary.rb', line 37

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',
    'oracle_home': :'oracleHome',
    'asm_connector_name': :'asmConnectorName',
    'license_model': :'licenseModel',
    'compartment_id': :'compartmentId'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# File 'lib/oci/database_management/models/external_database_system_discovery_summary.rb', line 60

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',
    'oracle_home': :'String',
    'asm_connector_name': :'String',
    'license_model': :'String',
    'compartment_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



157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
# File 'lib/oci/database_management/models/external_database_system_discovery_summary.rb', line 157

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 &&
    oracle_home == other.oracle_home &&
    asm_connector_name == other.asm_connector_name &&
    license_model == other.license_model &&
    compartment_id == other.compartment_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



201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
# File 'lib/oci/database_management/models/external_database_system_discovery_summary.rb', line 201

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


181
182
183
# File 'lib/oci/database_management/models/external_database_system_discovery_summary.rb', line 181

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



190
191
192
# File 'lib/oci/database_management/models/external_database_system_discovery_summary.rb', line 190

def hash
  [id, agent_id, connector_id, display_name, version, internal_id, status, discover_status, discover_error_code, discover_error_msg, entity_type, oracle_home, asm_connector_name, license_model, compartment_id].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



234
235
236
237
238
239
240
241
242
243
# File 'lib/oci/database_management/models/external_database_system_discovery_summary.rb', line 234

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



228
229
230
# File 'lib/oci/database_management/models/external_database_system_discovery_summary.rb', line 228

def to_s
  to_hash.to_s
end