Class: OCI::AiAnomalyDetection::Models::DataSourceDetailsATP

Inherits:
DataSourceDetails show all
Defined in:
lib/oci/ai_anomaly_detection/models/data_source_details_atp.rb

Overview

Data Source details for ATP

Constant Summary

Constants inherited from DataSourceDetails

OCI::AiAnomalyDetection::Models::DataSourceDetails::DATA_SOURCE_TYPE_ENUM

Instance Attribute Summary collapse

Attributes inherited from DataSourceDetails

#data_source_type

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from DataSourceDetails

get_subtype

Constructor Details

#initialize(attributes = {}) ⇒ DataSourceDetailsATP

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
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
# File 'lib/oci/ai_anomaly_detection/models/data_source_details_atp.rb', line 113

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

  attributes['dataSourceType'] = 'ORACLE_ATP'

  super(attributes)

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

  self.wallet_password_secret_id = attributes[:'walletPasswordSecretId'] if attributes[:'walletPasswordSecretId']

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

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

  self.atp_user_name = attributes[:'atpUserName'] if attributes[:'atpUserName']

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

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

  self.atp_password_secret_id = attributes[:'atpPasswordSecretId'] if attributes[:'atpPasswordSecretId']

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

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

  self.cwallet_file_secret_id = attributes[:'cwalletFileSecretId'] if attributes[:'cwalletFileSecretId']

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

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

  self.ewallet_file_secret_id = attributes[:'ewalletFileSecretId'] if attributes[:'ewalletFileSecretId']

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

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

  self.key_store_file_secret_id = attributes[:'keyStoreFileSecretId'] if attributes[:'keyStoreFileSecretId']

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

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

  self.ojdbc_file_secret_id = attributes[:'ojdbcFileSecretId'] if attributes[:'ojdbcFileSecretId']

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

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

  self.tnsnames_file_secret_id = attributes[:'tnsnamesFileSecretId'] if attributes[:'tnsnamesFileSecretId']

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

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

  self.truststore_file_secret_id = attributes[:'truststoreFileSecretId'] if attributes[:'truststoreFileSecretId']

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

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

  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.table_name = attributes[:'tableName'] if attributes[:'tableName']

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

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

Instance Attribute Details

#atp_password_secret_idString

atp db password Secret Id

Returns:

  • (String)


22
23
24
# File 'lib/oci/ai_anomaly_detection/models/data_source_details_atp.rb', line 22

def atp_password_secret_id
  @atp_password_secret_id
end

#atp_user_nameString

atp db user name

Returns:

  • (String)


18
19
20
# File 'lib/oci/ai_anomaly_detection/models/data_source_details_atp.rb', line 18

def atp_user_name
  @atp_user_name
end

#cwallet_file_secret_idString

OCID of the secret containing the containers certificates of ATP wallet

Returns:

  • (String)


26
27
28
# File 'lib/oci/ai_anomaly_detection/models/data_source_details_atp.rb', line 26

def cwallet_file_secret_id
  @cwallet_file_secret_id
end

#database_nameString

atp database name

Returns:

  • (String)


50
51
52
# File 'lib/oci/ai_anomaly_detection/models/data_source_details_atp.rb', line 50

def database_name
  @database_name
end

#ewallet_file_secret_idString

OCID of the secret containing the PDB'S certificates of ATP wallet

Returns:

  • (String)


30
31
32
# File 'lib/oci/ai_anomaly_detection/models/data_source_details_atp.rb', line 30

def ewallet_file_secret_id
  @ewallet_file_secret_id
end

#key_store_file_secret_idString

OCID of the secret containing Keystore.jks file of the ATP wallet

Returns:

  • (String)


34
35
36
# File 'lib/oci/ai_anomaly_detection/models/data_source_details_atp.rb', line 34

def key_store_file_secret_id
  @key_store_file_secret_id
end

#ojdbc_file_secret_idString

OCID of the secret that contains jdbc properties file of ATP wallet

Returns:

  • (String)


38
39
40
# File 'lib/oci/ai_anomaly_detection/models/data_source_details_atp.rb', line 38

def ojdbc_file_secret_id
  @ojdbc_file_secret_id
end

#table_nameString

atp database table name

Returns:

  • (String)


54
55
56
# File 'lib/oci/ai_anomaly_detection/models/data_source_details_atp.rb', line 54

def table_name
  @table_name
end

#tnsnames_file_secret_idString

OCID of the secret that contains the tnsnames file of ATP wallet

Returns:

  • (String)


42
43
44
# File 'lib/oci/ai_anomaly_detection/models/data_source_details_atp.rb', line 42

def tnsnames_file_secret_id
  @tnsnames_file_secret_id
end

#truststore_file_secret_idString

OCID of the secret containing truststore.jks file of the ATP wallet

Returns:

  • (String)


46
47
48
# File 'lib/oci/ai_anomaly_detection/models/data_source_details_atp.rb', line 46

def truststore_file_secret_id
  @truststore_file_secret_id
end

#wallet_password_secret_idString

wallet password Secret ID in String format

Returns:

  • (String)


14
15
16
# File 'lib/oci/ai_anomaly_detection/models/data_source_details_atp.rb', line 14

def wallet_password_secret_id
  @wallet_password_secret_id
end

Class Method Details

.attribute_mapObject

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



57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/oci/ai_anomaly_detection/models/data_source_details_atp.rb', line 57

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'data_source_type': :'dataSourceType',
    'wallet_password_secret_id': :'walletPasswordSecretId',
    'atp_user_name': :'atpUserName',
    'atp_password_secret_id': :'atpPasswordSecretId',
    'cwallet_file_secret_id': :'cwalletFileSecretId',
    'ewallet_file_secret_id': :'ewalletFileSecretId',
    'key_store_file_secret_id': :'keyStoreFileSecretId',
    'ojdbc_file_secret_id': :'ojdbcFileSecretId',
    'tnsnames_file_secret_id': :'tnsnamesFileSecretId',
    'truststore_file_secret_id': :'truststoreFileSecretId',
    'database_name': :'databaseName',
    'table_name': :'tableName'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# File 'lib/oci/ai_anomaly_detection/models/data_source_details_atp.rb', line 77

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'data_source_type': :'String',
    'wallet_password_secret_id': :'String',
    'atp_user_name': :'String',
    'atp_password_secret_id': :'String',
    'cwallet_file_secret_id': :'String',
    'ewallet_file_secret_id': :'String',
    'key_store_file_secret_id': :'String',
    'ojdbc_file_secret_id': :'String',
    'tnsnames_file_secret_id': :'String',
    'truststore_file_secret_id': :'String',
    'database_name': :'String',
    'table_name': :'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



197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
# File 'lib/oci/ai_anomaly_detection/models/data_source_details_atp.rb', line 197

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

  self.class == other.class &&
    data_source_type == other.data_source_type &&
    wallet_password_secret_id == other.wallet_password_secret_id &&
    atp_user_name == other.atp_user_name &&
    atp_password_secret_id == other.atp_password_secret_id &&
    cwallet_file_secret_id == other.cwallet_file_secret_id &&
    ewallet_file_secret_id == other.ewallet_file_secret_id &&
    key_store_file_secret_id == other.key_store_file_secret_id &&
    ojdbc_file_secret_id == other.ojdbc_file_secret_id &&
    tnsnames_file_secret_id == other.tnsnames_file_secret_id &&
    truststore_file_secret_id == other.truststore_file_secret_id &&
    database_name == other.database_name &&
    table_name == other.table_name
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



238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
# File 'lib/oci/ai_anomaly_detection/models/data_source_details_atp.rb', line 238

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


218
219
220
# File 'lib/oci/ai_anomaly_detection/models/data_source_details_atp.rb', line 218

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



227
228
229
# File 'lib/oci/ai_anomaly_detection/models/data_source_details_atp.rb', line 227

def hash
  [data_source_type, wallet_password_secret_id, atp_user_name, atp_password_secret_id, cwallet_file_secret_id, ewallet_file_secret_id, key_store_file_secret_id, ojdbc_file_secret_id, tnsnames_file_secret_id, truststore_file_secret_id, database_name, table_name].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



271
272
273
274
275
276
277
278
279
280
# File 'lib/oci/ai_anomaly_detection/models/data_source_details_atp.rb', line 271

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



265
266
267
# File 'lib/oci/ai_anomaly_detection/models/data_source_details_atp.rb', line 265

def to_s
  to_hash.to_s
end