Class: OCI::DataSafe::Models::DiscoveryJobResultSummary

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/data_safe/models/discovery_job_result_summary.rb

Overview

Summary of a discovery job result.

Constant Summary collapse

OBJECT_TYPE_ENUM =
[
  OBJECT_TYPE_TABLE = 'TABLE'.freeze,
  OBJECT_TYPE_EDITIONING_VIEW = 'EDITIONING_VIEW'.freeze,
  OBJECT_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
RELATION_TYPE_ENUM =
[
  RELATION_TYPE_NONE = 'NONE'.freeze,
  RELATION_TYPE_APP_DEFINED = 'APP_DEFINED'.freeze,
  RELATION_TYPE_DB_DEFINED = 'DB_DEFINED'.freeze,
  RELATION_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ DiscoveryJobResultSummary

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :key (String)

    The value to assign to the #key property

  • :discovery_type (String)

    The value to assign to the #discovery_type property

  • :sensitive_columnkey (String)

    The value to assign to the #sensitive_columnkey property

  • :schema_name (String)

    The value to assign to the #schema_name property

  • :object_name (String)

    The value to assign to the #object_name property

  • :column_name (String)

    The value to assign to the #column_name property

  • :object_type (String)

    The value to assign to the #object_type property

  • :data_type (String)

    The value to assign to the #data_type property

  • :sensitive_type_id (String)

    The value to assign to the #sensitive_type_id property

  • :parent_column_keys (Array<String>)

    The value to assign to the #parent_column_keys property

  • :relation_type (String)

    The value to assign to the #relation_type property

  • :estimated_data_value_count (Integer)

    The value to assign to the #estimated_data_value_count property

  • :sample_data_values (Array<String>)

    The value to assign to the #sample_data_values property

  • :planned_action (String)

    The value to assign to the #planned_action property

  • :is_result_applied (BOOLEAN)

    The value to assign to the #is_result_applied property

  • :discovery_job_id (String)

    The value to assign to the #discovery_job_id property



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
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
# File 'lib/oci/data_safe/models/discovery_job_result_summary.rb', line 177

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

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

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

  self.discovery_type = attributes[:'discoveryType'] if attributes[:'discoveryType']

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

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

  self.sensitive_columnkey = attributes[:'sensitiveColumnkey'] if attributes[:'sensitiveColumnkey']

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

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

  self.schema_name = attributes[:'schemaName'] if attributes[:'schemaName']

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

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

  self.object_name = attributes[:'objectName'] if attributes[:'objectName']

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

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

  self.column_name = attributes[:'columnName'] if attributes[:'columnName']

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

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

  self.object_type = attributes[:'objectType'] if attributes[:'objectType']

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

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

  self.data_type = attributes[:'dataType'] if attributes[:'dataType']

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

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

  self.sensitive_type_id = attributes[:'sensitiveTypeId'] if attributes[:'sensitiveTypeId']

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

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

  self.parent_column_keys = attributes[:'parentColumnKeys'] if attributes[:'parentColumnKeys']

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

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

  self.relation_type = attributes[:'relationType'] if attributes[:'relationType']

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

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

  self.estimated_data_value_count = attributes[:'estimatedDataValueCount'] if attributes[:'estimatedDataValueCount']

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

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

  self.sample_data_values = attributes[:'sampleDataValues'] if attributes[:'sampleDataValues']

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

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

  self.planned_action = attributes[:'plannedAction'] if attributes[:'plannedAction']

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

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

  self.is_result_applied = attributes[:'isResultApplied'] unless attributes[:'isResultApplied'].nil?
  self.is_result_applied = false if is_result_applied.nil? && !attributes.key?(:'isResultApplied') # rubocop:disable Style/StringLiterals

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

  self.is_result_applied = attributes[:'is_result_applied'] unless attributes[:'is_result_applied'].nil?
  self.is_result_applied = false if is_result_applied.nil? && !attributes.key?(:'isResultApplied') && !attributes.key?(:'is_result_applied') # rubocop:disable Style/StringLiterals

  self.discovery_job_id = attributes[:'discoveryJobId'] if attributes[:'discoveryJobId']

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

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

Instance Attribute Details

#column_nameString

[Required] The name of the sensitive column.

Returns:

  • (String)


51
52
53
# File 'lib/oci/data_safe/models/discovery_job_result_summary.rb', line 51

def column_name
  @column_name
end

#data_typeString

[Required] The data type of the sensitive column.

Returns:

  • (String)


59
60
61
# File 'lib/oci/data_safe/models/discovery_job_result_summary.rb', line 59

def data_type
  @data_type
end

#discovery_job_idString

[Required] The OCID of the discovery job.

Returns:

  • (String)


105
106
107
# File 'lib/oci/data_safe/models/discovery_job_result_summary.rb', line 105

def discovery_job_id
  @discovery_job_id
end

#discovery_typeString

[Required] The type of the discovery result. It can be one of the following three types: NEW: A new sensitive column in the target database that is not in the sensitive data model. DELETED: A column that is present in the sensitive data model but has been deleted from the target database. MODIFIED: A column that is present in the target database as well as the sensitive data model but some of its attributes have been modified.

Returns:

  • (String)


35
36
37
# File 'lib/oci/data_safe/models/discovery_job_result_summary.rb', line 35

def discovery_type
  @discovery_type
end

#estimated_data_value_countInteger

[Required] The estimated number of data values the column has in the associated database.

Returns:

  • (Integer)


78
79
80
# File 'lib/oci/data_safe/models/discovery_job_result_summary.rb', line 78

def estimated_data_value_count
  @estimated_data_value_count
end

#is_result_appliedBOOLEAN

[Required] Indicates whether the discovery result has been processed. You can update this attribute using the PatchDiscoveryJobResults operation to track whether the discovery result has already been processed and applied to the sensitive data model.

Returns:

  • (BOOLEAN)


101
102
103
# File 'lib/oci/data_safe/models/discovery_job_result_summary.rb', line 101

def is_result_applied
  @is_result_applied
end

#keyString

[Required] The unique key that identifies the discovery result.

Returns:

  • (String)


27
28
29
# File 'lib/oci/data_safe/models/discovery_job_result_summary.rb', line 27

def key
  @key
end

#object_nameString

[Required] The database object that contains the sensitive column.

Returns:

  • (String)


47
48
49
# File 'lib/oci/data_safe/models/discovery_job_result_summary.rb', line 47

def object_name
  @object_name
end

#object_typeString

[Required] The type of the database object that contains the sensitive column.

Returns:

  • (String)


55
56
57
# File 'lib/oci/data_safe/models/discovery_job_result_summary.rb', line 55

def object_type
  @object_type
end

#parent_column_keysArray<String>

Unique keys identifying the columns that are parents of the sensitive column. At present, it tracks a single parent only.

Returns:

  • (Array<String>)


67
68
69
# File 'lib/oci/data_safe/models/discovery_job_result_summary.rb', line 67

def parent_column_keys
  @parent_column_keys
end

#planned_actionString

[Required] Specifies how to process the discovery result. It's set to NONE by default. Use the PatchDiscoveryJobResults operation to update this attribute. You can choose one of the following options: ACCEPT: To accept the discovery result and update the sensitive data model to reflect the changes. REJECT: To reject the discovery result so that it doesn't change the sensitive data model. INVALIDATE: To invalidate a newly discovered column. It adds the column to the sensitive data model but marks it as invalid. It helps track false positives and ensure that they aren't reported by future discovery jobs. After specifying the planned action, you can use the ApplyDiscoveryJobResults operation to automatically process the discovery results.

Returns:

  • (String)


95
96
97
# File 'lib/oci/data_safe/models/discovery_job_result_summary.rb', line 95

def planned_action
  @planned_action
end

#relation_typeString

[Required] The type of referential relationship the sensitive column has with its parent. NONE indicates that the sensitive column does not have a parent. DB_DEFINED indicates that the relationship is defined in the database dictionary. APP_DEFINED indicates that the relationship is defined at the application level and not in the database dictionary.

Returns:

  • (String)


74
75
76
# File 'lib/oci/data_safe/models/discovery_job_result_summary.rb', line 74

def relation_type
  @relation_type
end

#sample_data_valuesArray<String>

Original data values collected for the sensitive column from the associated database. Sample data helps review the column and ensure that it actually contains sensitive data. Note that sample data is retrieved by a data discovery job only if the isSampleDataCollectionEnabled attribute is set to true. At present, only one data value is collected per sensitive column.

Returns:

  • (Array<String>)


86
87
88
# File 'lib/oci/data_safe/models/discovery_job_result_summary.rb', line 86

def sample_data_values
  @sample_data_values
end

#schema_nameString

[Required] The database schema that contains the sensitive column.

Returns:

  • (String)


43
44
45
# File 'lib/oci/data_safe/models/discovery_job_result_summary.rb', line 43

def schema_name
  @schema_name
end

#sensitive_columnkeyString

The unique key that identifies the sensitive column represented by the discovery result.

Returns:

  • (String)


39
40
41
# File 'lib/oci/data_safe/models/discovery_job_result_summary.rb', line 39

def sensitive_columnkey
  @sensitive_columnkey
end

#sensitive_type_idString

The OCID of the sensitive type associated with the sensitive column.

Returns:

  • (String)


63
64
65
# File 'lib/oci/data_safe/models/discovery_job_result_summary.rb', line 63

def sensitive_type_id
  @sensitive_type_id
end

Class Method Details

.attribute_mapObject

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



108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# File 'lib/oci/data_safe/models/discovery_job_result_summary.rb', line 108

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'key': :'key',
    'discovery_type': :'discoveryType',
    'sensitive_columnkey': :'sensitiveColumnkey',
    'schema_name': :'schemaName',
    'object_name': :'objectName',
    'column_name': :'columnName',
    'object_type': :'objectType',
    'data_type': :'dataType',
    'sensitive_type_id': :'sensitiveTypeId',
    'parent_column_keys': :'parentColumnKeys',
    'relation_type': :'relationType',
    'estimated_data_value_count': :'estimatedDataValueCount',
    'sample_data_values': :'sampleDataValues',
    'planned_action': :'plannedAction',
    'is_result_applied': :'isResultApplied',
    'discovery_job_id': :'discoveryJobId'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
# File 'lib/oci/data_safe/models/discovery_job_result_summary.rb', line 132

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'key': :'String',
    'discovery_type': :'String',
    'sensitive_columnkey': :'String',
    'schema_name': :'String',
    'object_name': :'String',
    'column_name': :'String',
    'object_type': :'String',
    'data_type': :'String',
    'sensitive_type_id': :'String',
    'parent_column_keys': :'Array<String>',
    'relation_type': :'String',
    'estimated_data_value_count': :'Integer',
    'sample_data_values': :'Array<String>',
    'planned_action': :'String',
    'is_result_applied': :'BOOLEAN',
    'discovery_job_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



311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
# File 'lib/oci/data_safe/models/discovery_job_result_summary.rb', line 311

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

  self.class == other.class &&
    key == other.key &&
    discovery_type == other.discovery_type &&
    sensitive_columnkey == other.sensitive_columnkey &&
    schema_name == other.schema_name &&
    object_name == other.object_name &&
    column_name == other.column_name &&
    object_type == other.object_type &&
    data_type == other.data_type &&
    sensitive_type_id == other.sensitive_type_id &&
    parent_column_keys == other.parent_column_keys &&
    relation_type == other.relation_type &&
    estimated_data_value_count == other.estimated_data_value_count &&
    sample_data_values == other.sample_data_values &&
    planned_action == other.planned_action &&
    is_result_applied == other.is_result_applied &&
    discovery_job_id == other.discovery_job_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



356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
# File 'lib/oci/data_safe/models/discovery_job_result_summary.rb', line 356

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


336
337
338
# File 'lib/oci/data_safe/models/discovery_job_result_summary.rb', line 336

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



345
346
347
# File 'lib/oci/data_safe/models/discovery_job_result_summary.rb', line 345

def hash
  [key, discovery_type, sensitive_columnkey, schema_name, object_name, column_name, object_type, data_type, sensitive_type_id, parent_column_keys, relation_type, estimated_data_value_count, sample_data_values, planned_action, is_result_applied, discovery_job_id].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



389
390
391
392
393
394
395
396
397
398
# File 'lib/oci/data_safe/models/discovery_job_result_summary.rb', line 389

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



383
384
385
# File 'lib/oci/data_safe/models/discovery_job_result_summary.rb', line 383

def to_s
  to_hash.to_s
end