Class: OCI::DataSafe::Models::SensitiveColumnSummary

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

Overview

Summary of a sensitive column present in a sensitive data model.

Constant Summary collapse

LIFECYCLE_STATE_ENUM =
[
  LIFECYCLE_STATE_CREATING = 'CREATING'.freeze,
  LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.freeze,
  LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze,
  LIFECYCLE_STATE_DELETING = 'DELETING'.freeze,
  LIFECYCLE_STATE_FAILED = 'FAILED'.freeze,
  LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
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
STATUS_ENUM =
[
  STATUS_VALID = 'VALID'.freeze,
  STATUS_INVALID = 'INVALID'.freeze,
  STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
SOURCE_ENUM =
[
  SOURCE_MANUAL = 'MANUAL'.freeze,
  SOURCE_DISCOVERY = 'DISCOVERY'.freeze,
  SOURCE_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 = {}) ⇒ SensitiveColumnSummary

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

  • :sensitive_data_model_id (String)

    The value to assign to the #sensitive_data_model_id property

  • :lifecycle_state (String)

    The value to assign to the #lifecycle_state property

  • :lifecycle_details (String)

    The value to assign to the #lifecycle_details property

  • :time_created (DateTime)

    The value to assign to the #time_created property

  • :time_updated (DateTime)

    The value to assign to the #time_updated property

  • :app_name (String)

    The value to assign to the #app_name 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

  • :status (String)

    The value to assign to the #status property

  • :sensitive_type_id (String)

    The value to assign to the #sensitive_type_id property

  • :source (String)

    The value to assign to the #source 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



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
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
# File 'lib/oci/data_safe/models/sensitive_column_summary.rb', line 219

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

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

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

  self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState']

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

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

  self.lifecycle_details = attributes[:'lifecycleDetails'] if attributes[:'lifecycleDetails']

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

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

  self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated']

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

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

  self.time_updated = attributes[:'timeUpdated'] if attributes[:'timeUpdated']

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

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

  self.app_name = attributes[:'appName'] if attributes[:'appName']

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

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

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

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

  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']
end

Instance Attribute Details

#app_nameString

[Required] The name of the application associated with the sensitive column. It's useful when the application name is different from the schema name. Otherwise, it can be ignored.

Returns:

  • (String)


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

def app_name
  @app_name
end

#column_nameString

[Required] The name of the sensitive column.

Returns:

  • (String)


90
91
92
# File 'lib/oci/data_safe/models/sensitive_column_summary.rb', line 90

def column_name
  @column_name
end

#data_typeString

[Required] The data type of the sensitive column.

Returns:

  • (String)


98
99
100
# File 'lib/oci/data_safe/models/sensitive_column_summary.rb', line 98

def data_type
  @data_type
end

#estimated_data_value_countInteger

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

Returns:

  • (Integer)


130
131
132
# File 'lib/oci/data_safe/models/sensitive_column_summary.rb', line 130

def estimated_data_value_count
  @estimated_data_value_count
end

#keyString

[Required] The unique key that identifies the sensitive column. It's numeric and unique within a sensitive data model.

Returns:

  • (String)


48
49
50
# File 'lib/oci/data_safe/models/sensitive_column_summary.rb', line 48

def key
  @key
end

#lifecycle_detailsString

Details about the current state of the sensitive column.

Returns:

  • (String)


60
61
62
# File 'lib/oci/data_safe/models/sensitive_column_summary.rb', line 60

def lifecycle_details
  @lifecycle_details
end

#lifecycle_stateString

[Required] The current state of the sensitive column.

Returns:

  • (String)


56
57
58
# File 'lib/oci/data_safe/models/sensitive_column_summary.rb', line 56

def lifecycle_state
  @lifecycle_state
end

#object_nameString

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

Returns:

  • (String)


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

def object_name
  @object_name
end

#object_typeString

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

Returns:

  • (String)


94
95
96
# File 'lib/oci/data_safe/models/sensitive_column_summary.rb', line 94

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>)


119
120
121
# File 'lib/oci/data_safe/models/sensitive_column_summary.rb', line 119

def parent_column_keys
  @parent_column_keys
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)


126
127
128
# File 'lib/oci/data_safe/models/sensitive_column_summary.rb', line 126

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>)


138
139
140
# File 'lib/oci/data_safe/models/sensitive_column_summary.rb', line 138

def sample_data_values
  @sample_data_values
end

#schema_nameString

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

Returns:

  • (String)


82
83
84
# File 'lib/oci/data_safe/models/sensitive_column_summary.rb', line 82

def schema_name
  @schema_name
end

#sensitive_data_model_idString

[Required] The OCID of the sensitive data model that contains the sensitive column.

Returns:

  • (String)


52
53
54
# File 'lib/oci/data_safe/models/sensitive_column_summary.rb', line 52

def sensitive_data_model_id
  @sensitive_data_model_id
end

#sensitive_type_idString

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

Returns:

  • (String)


109
110
111
# File 'lib/oci/data_safe/models/sensitive_column_summary.rb', line 109

def sensitive_type_id
  @sensitive_type_id
end

#sourceString

[Required] The source of the sensitive column. DISCOVERY indicates that the column was added to the sensitive data model using a data discovery job. MANUAL indicates that the column was added manually.

Returns:

  • (String)


115
116
117
# File 'lib/oci/data_safe/models/sensitive_column_summary.rb', line 115

def source
  @source
end

#statusString

[Required] The status of the sensitive column. VALID means the column is considered sensitive. INVALID means the column is not considered sensitive. Tracking invalid columns in a sensitive data model helps ensure that an incremental data discovery job does not identify these columns as sensitive again.

Returns:

  • (String)


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

def status
  @status
end

#time_createdDateTime

[Required] The date and time, in the format defined by RFC3339, the sensitive column was created in the sensitive data model.

Returns:

  • (DateTime)


66
67
68
# File 'lib/oci/data_safe/models/sensitive_column_summary.rb', line 66

def time_created
  @time_created
end

#time_updatedDateTime

[Required] The date and time, in the format defined by RFC3339, the sensitive column was last updated in the sensitive data model.

Returns:

  • (DateTime)


72
73
74
# File 'lib/oci/data_safe/models/sensitive_column_summary.rb', line 72

def time_updated
  @time_updated
end

Class Method Details

.attribute_mapObject

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



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
# File 'lib/oci/data_safe/models/sensitive_column_summary.rb', line 141

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'key': :'key',
    'sensitive_data_model_id': :'sensitiveDataModelId',
    'lifecycle_state': :'lifecycleState',
    'lifecycle_details': :'lifecycleDetails',
    'time_created': :'timeCreated',
    'time_updated': :'timeUpdated',
    'app_name': :'appName',
    'schema_name': :'schemaName',
    'object_name': :'objectName',
    'column_name': :'columnName',
    'object_type': :'objectType',
    'data_type': :'dataType',
    'status': :'status',
    'sensitive_type_id': :'sensitiveTypeId',
    'source': :'source',
    'parent_column_keys': :'parentColumnKeys',
    'relation_type': :'relationType',
    'estimated_data_value_count': :'estimatedDataValueCount',
    'sample_data_values': :'sampleDataValues'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



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
# File 'lib/oci/data_safe/models/sensitive_column_summary.rb', line 168

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'key': :'String',
    'sensitive_data_model_id': :'String',
    'lifecycle_state': :'String',
    'lifecycle_details': :'String',
    'time_created': :'DateTime',
    'time_updated': :'DateTime',
    'app_name': :'String',
    'schema_name': :'String',
    'object_name': :'String',
    'column_name': :'String',
    'object_type': :'String',
    'data_type': :'String',
    'status': :'String',
    'sensitive_type_id': :'String',
    'source': :'String',
    'parent_column_keys': :'Array<String>',
    'relation_type': :'String',
    'estimated_data_value_count': :'Integer',
    'sample_data_values': :'Array<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



400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
# File 'lib/oci/data_safe/models/sensitive_column_summary.rb', line 400

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

  self.class == other.class &&
    key == other.key &&
    sensitive_data_model_id == other.sensitive_data_model_id &&
    lifecycle_state == other.lifecycle_state &&
    lifecycle_details == other.lifecycle_details &&
    time_created == other.time_created &&
    time_updated == other.time_updated &&
    app_name == other.app_name &&
    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 &&
    status == other.status &&
    sensitive_type_id == other.sensitive_type_id &&
    source == other.source &&
    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
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



448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
# File 'lib/oci/data_safe/models/sensitive_column_summary.rb', line 448

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


428
429
430
# File 'lib/oci/data_safe/models/sensitive_column_summary.rb', line 428

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



437
438
439
# File 'lib/oci/data_safe/models/sensitive_column_summary.rb', line 437

def hash
  [key, sensitive_data_model_id, lifecycle_state, lifecycle_details, time_created, time_updated, app_name, schema_name, object_name, column_name, object_type, data_type, status, sensitive_type_id, source, parent_column_keys, relation_type, estimated_data_value_count, sample_data_values].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



481
482
483
484
485
486
487
488
489
490
# File 'lib/oci/data_safe/models/sensitive_column_summary.rb', line 481

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



475
476
477
# File 'lib/oci/data_safe/models/sensitive_column_summary.rb', line 475

def to_s
  to_hash.to_s
end