Class: OCI::DatabaseToolsRuntime::Models::ValidateDatabaseToolsConnectionOracleDatabaseResult

Inherits:
ValidateDatabaseToolsConnectionResult show all
Defined in:
lib/oci/database_tools_runtime/models/validate_database_tools_connection_oracle_database_result.rb

Overview

Connection validation result for the Oracle Database.

Constant Summary collapse

DBMS_CLOUD_STATUS_ENUM =
[
  DBMS_CLOUD_STATUS_AVAILABLE = 'AVAILABLE'.freeze,
  DBMS_CLOUD_STATUS_UNAVAILABLE = 'UNAVAILABLE'.freeze,
  DBMS_CLOUD_STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Constants inherited from ValidateDatabaseToolsConnectionResult

OCI::DatabaseToolsRuntime::Models::ValidateDatabaseToolsConnectionResult::TYPE_ENUM

Instance Attribute Summary collapse

Attributes inherited from ValidateDatabaseToolsConnectionResult

#action, #cause, #code, #message, #type

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ValidateDatabaseToolsConnectionResult

get_subtype

Constructor Details

#initialize(attributes = {}) ⇒ ValidateDatabaseToolsConnectionOracleDatabaseResult

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
# File 'lib/oci/database_tools_runtime/models/validate_database_tools_connection_oracle_database_result.rb', line 146

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

  attributes['type'] = 'ORACLE_DATABASE'

  super(attributes)

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

  self.database_name = attributes[:'databaseName'] if attributes[:'databaseName']

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

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

  self.database_version = attributes[:'databaseVersion'] if attributes[:'databaseVersion']

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

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

  self.current_schema = attributes[:'currentSchema'] if attributes[:'currentSchema']

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

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

  self.session_user = attributes[:'sessionUser'] if attributes[:'sessionUser']

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

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

  self.proxy_user = attributes[:'proxyUser'] if attributes[:'proxyUser']

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

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

  self.authenticated_identity = attributes[:'authenticatedIdentity'] if attributes[:'authenticatedIdentity']

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

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

  self.authentication_method = attributes[:'authenticationMethod'] if attributes[:'authenticationMethod']

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

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

  self.dbms_cloud_status = attributes[:'dbmsCloudStatus'] if attributes[:'dbmsCloudStatus']

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

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

  self.cloud_service = attributes[:'cloudService'] if attributes[:'cloudService']

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

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

  self.database_tools_identity_statuses = attributes[:'databaseToolsIdentityStatuses'] if attributes[:'databaseToolsIdentityStatuses']

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

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

  self.enterprise_identity = attributes[:'enterpriseIdentity'] if attributes[:'enterpriseIdentity']

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

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

  self.proxy_enterprise_identity = attributes[:'proxyEnterpriseIdentity'] if attributes[:'proxyEnterpriseIdentity']

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

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

  self.external_authentication_statuses = attributes[:'externalAuthenticationStatuses'] if attributes[:'externalAuthenticationStatuses']

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

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

Instance Attribute Details

#authenticated_identityString

Returns the identity used in authentication.

Returns:

  • (String)


41
42
43
# File 'lib/oci/database_tools_runtime/models/validate_database_tools_connection_oracle_database_result.rb', line 41

def authenticated_identity
  @authenticated_identity
end

#authentication_methodString

Returns the method of authentication.

Returns:

  • (String)


45
46
47
# File 'lib/oci/database_tools_runtime/models/validate_database_tools_connection_oracle_database_result.rb', line 45

def authentication_method
  @authentication_method
end

#cloud_serviceString

Displays the CLOUD_SERVICE value within the USERENV context

Returns:

  • (String)


53
54
55
# File 'lib/oci/database_tools_runtime/models/validate_database_tools_connection_oracle_database_result.rb', line 53

def cloud_service
  @cloud_service
end

#current_schemaString

The name of the currently active default schema.

Returns:

  • (String)


29
30
31
# File 'lib/oci/database_tools_runtime/models/validate_database_tools_connection_oracle_database_result.rb', line 29

def current_schema
  @current_schema
end

#database_nameString

The database name.

Returns:

  • (String)


21
22
23
# File 'lib/oci/database_tools_runtime/models/validate_database_tools_connection_oracle_database_result.rb', line 21

def database_name
  @database_name
end

#database_tools_identity_statusesArray<OCI::DatabaseToolsRuntime::Models::ValidationIdentityStatus>

Status on whether an identity type can be used with this connection or not.



57
58
59
# File 'lib/oci/database_tools_runtime/models/validate_database_tools_connection_oracle_database_result.rb', line 57

def database_tools_identity_statuses
  @database_tools_identity_statuses
end

#database_versionString

[Required] The database version.

Returns:

  • (String)


25
26
27
# File 'lib/oci/database_tools_runtime/models/validate_database_tools_connection_oracle_database_result.rb', line 25

def database_version
  @database_version
end

#dbms_cloud_statusString

[Required] The DBMS_CLOUD package installation status.

Returns:

  • (String)


49
50
51
# File 'lib/oci/database_tools_runtime/models/validate_database_tools_connection_oracle_database_result.rb', line 49

def dbms_cloud_status
  @dbms_cloud_status
end

#enterprise_identityString

Displays the enterprise identity value within the USERENV context

Returns:

  • (String)


61
62
63
# File 'lib/oci/database_tools_runtime/models/validate_database_tools_connection_oracle_database_result.rb', line 61

def enterprise_identity
  @enterprise_identity
end

#external_authentication_statusesArray<OCI::DatabaseToolsRuntime::Models::ValidationExternalAuthenticationStatus>

Status on whether an external authentication can be used with this connection or not.



69
70
71
# File 'lib/oci/database_tools_runtime/models/validate_database_tools_connection_oracle_database_result.rb', line 69

def external_authentication_statuses
  @external_authentication_statuses
end

#proxy_enterprise_identityString

Displays the proxy enterprise identity value within the USERENV context

Returns:

  • (String)


65
66
67
# File 'lib/oci/database_tools_runtime/models/validate_database_tools_connection_oracle_database_result.rb', line 65

def proxy_enterprise_identity
  @proxy_enterprise_identity
end

#proxy_userString

Name of the database user who opened the current session on behalf of sessionUser.

Returns:

  • (String)


37
38
39
# File 'lib/oci/database_tools_runtime/models/validate_database_tools_connection_oracle_database_result.rb', line 37

def proxy_user
  @proxy_user
end

#session_userString

The name of the session user (the user who logged on).

Returns:

  • (String)


33
34
35
# File 'lib/oci/database_tools_runtime/models/validate_database_tools_connection_oracle_database_result.rb', line 33

def session_user
  @session_user
end

Class Method Details

.attribute_mapObject

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



72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# File 'lib/oci/database_tools_runtime/models/validate_database_tools_connection_oracle_database_result.rb', line 72

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'type': :'type',
    'code': :'code',
    'message': :'message',
    'cause': :'cause',
    'action': :'action',
    'database_name': :'databaseName',
    'database_version': :'databaseVersion',
    'current_schema': :'currentSchema',
    'session_user': :'sessionUser',
    'proxy_user': :'proxyUser',
    'authenticated_identity': :'authenticatedIdentity',
    'authentication_method': :'authenticationMethod',
    'dbms_cloud_status': :'dbmsCloudStatus',
    'cloud_service': :'cloudService',
    'database_tools_identity_statuses': :'databaseToolsIdentityStatuses',
    'enterprise_identity': :'enterpriseIdentity',
    'proxy_enterprise_identity': :'proxyEnterpriseIdentity',
    'external_authentication_statuses': :'externalAuthenticationStatuses'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# File 'lib/oci/database_tools_runtime/models/validate_database_tools_connection_oracle_database_result.rb', line 98

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'type': :'String',
    'code': :'String',
    'message': :'String',
    'cause': :'String',
    'action': :'String',
    'database_name': :'String',
    'database_version': :'String',
    'current_schema': :'String',
    'session_user': :'String',
    'proxy_user': :'String',
    'authenticated_identity': :'String',
    'authentication_method': :'String',
    'dbms_cloud_status': :'String',
    'cloud_service': :'String',
    'database_tools_identity_statuses': :'Array<OCI::DatabaseToolsRuntime::Models::ValidationIdentityStatus>',
    'enterprise_identity': :'String',
    'proxy_enterprise_identity': :'String',
    'external_authentication_statuses': :'Array<OCI::DatabaseToolsRuntime::Models::ValidationExternalAuthenticationStatus>'
    # 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



255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
# File 'lib/oci/database_tools_runtime/models/validate_database_tools_connection_oracle_database_result.rb', line 255

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

  self.class == other.class &&
    type == other.type &&
    code == other.code &&
    message == other.message &&
    cause == other.cause &&
    action == other.action &&
    database_name == other.database_name &&
    database_version == other.database_version &&
    current_schema == other.current_schema &&
    session_user == other.session_user &&
    proxy_user == other.proxy_user &&
    authenticated_identity == other.authenticated_identity &&
    authentication_method == other.authentication_method &&
    dbms_cloud_status == other.dbms_cloud_status &&
    cloud_service == other.cloud_service &&
    database_tools_identity_statuses == other.database_tools_identity_statuses &&
    enterprise_identity == other.enterprise_identity &&
    proxy_enterprise_identity == other.proxy_enterprise_identity &&
    external_authentication_statuses == other.external_authentication_statuses
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



302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
# File 'lib/oci/database_tools_runtime/models/validate_database_tools_connection_oracle_database_result.rb', line 302

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


282
283
284
# File 'lib/oci/database_tools_runtime/models/validate_database_tools_connection_oracle_database_result.rb', line 282

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



291
292
293
# File 'lib/oci/database_tools_runtime/models/validate_database_tools_connection_oracle_database_result.rb', line 291

def hash
  [type, code, message, cause, action, database_name, database_version, current_schema, session_user, proxy_user, authenticated_identity, authentication_method, dbms_cloud_status, cloud_service, database_tools_identity_statuses, enterprise_identity, proxy_enterprise_identity, external_authentication_statuses].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



335
336
337
338
339
340
341
342
343
344
# File 'lib/oci/database_tools_runtime/models/validate_database_tools_connection_oracle_database_result.rb', line 335

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



329
330
331
# File 'lib/oci/database_tools_runtime/models/validate_database_tools_connection_oracle_database_result.rb', line 329

def to_s
  to_hash.to_s
end