Class: OCI::DataSafe::Models::SensitiveColumn
- Inherits:
-
Object
- Object
- OCI::DataSafe::Models::SensitiveColumn
- Defined in:
- lib/oci/data_safe/models/sensitive_column.rb
Overview
A sensitive column is a resource corresponding to a database column that is considered sensitive. It's a subresource of sensitive data model resource and is always associated with a sensitive data model. Note that referential relationships are also managed as part of sensitive columns.
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
-
#app_defined_child_column_keys ⇒ Array<String>
Unique keys identifying the columns that are application-level (non-dictionary) children of the sensitive column.
-
#app_name ⇒ String
[Required] The name of the application associated with the sensitive column.
-
#column_groups ⇒ Array<String>
The composite key groups to which the sensitive column belongs.
-
#column_name ⇒ String
[Required] The name of the sensitive column.
-
#data_type ⇒ String
[Required] The data type of the sensitive column.
-
#db_defined_child_column_keys ⇒ Array<String>
Unique keys identifying the columns that are database-level (dictionary-defined) children of the sensitive column.
-
#estimated_data_value_count ⇒ Integer
[Required] The estimated number of data values the column has in the associated database.
-
#key ⇒ String
[Required] The unique key that identifies the sensitive column.
-
#lifecycle_details ⇒ String
Details about the current state of the sensitive column.
-
#lifecycle_state ⇒ String
[Required] The current state of the sensitive column.
-
#object_name ⇒ String
[Required] The database object that contains the sensitive column.
-
#object_type ⇒ String
[Required] The type of the database object that contains the sensitive column.
-
#parent_column_keys ⇒ Array<String>
Unique keys identifying the columns that are parents of the sensitive column.
-
#relation_type ⇒ String
[Required] The type of referential relationship the sensitive column has with its parent.
-
#sample_data_values ⇒ Array<String>
Original data values collected for the sensitive column from the associated database.
-
#schema_name ⇒ String
[Required] The database schema that contains the sensitive column.
-
#sensitive_data_model_id ⇒ String
[Required] The OCID of the sensitive data model that contains the sensitive column.
-
#sensitive_type_id ⇒ String
The OCID of the sensitive type associated with the sensitive column.
-
#source ⇒ String
[Required] The source of the sensitive column.
-
#status ⇒ String
[Required] The status of the sensitive column.
-
#time_created ⇒ DateTime
[Required] The date and time, in the format defined by RFC3339, the sensitive column was created in the sensitive data model.
-
#time_updated ⇒ DateTime
[Required] The date and time, in the format defined by RFC3339, the sensitive column was last updated in the sensitive data model.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ SensitiveColumn
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ SensitiveColumn
Initializes the object
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 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 245 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.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.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.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'] self.app_defined_child_column_keys = attributes[:'appDefinedChildColumnKeys'] if attributes[:'appDefinedChildColumnKeys'] raise 'You cannot provide both :appDefinedChildColumnKeys and :app_defined_child_column_keys' if attributes.key?(:'appDefinedChildColumnKeys') && attributes.key?(:'app_defined_child_column_keys') self.app_defined_child_column_keys = attributes[:'app_defined_child_column_keys'] if attributes[:'app_defined_child_column_keys'] self.db_defined_child_column_keys = attributes[:'dbDefinedChildColumnKeys'] if attributes[:'dbDefinedChildColumnKeys'] raise 'You cannot provide both :dbDefinedChildColumnKeys and :db_defined_child_column_keys' if attributes.key?(:'dbDefinedChildColumnKeys') && attributes.key?(:'db_defined_child_column_keys') self.db_defined_child_column_keys = attributes[:'db_defined_child_column_keys'] if attributes[:'db_defined_child_column_keys'] self.column_groups = attributes[:'columnGroups'] if attributes[:'columnGroups'] raise 'You cannot provide both :columnGroups and :column_groups' if attributes.key?(:'columnGroups') && attributes.key?(:'column_groups') self.column_groups = attributes[:'column_groups'] if attributes[:'column_groups'] end |
Instance Attribute Details
#app_defined_child_column_keys ⇒ Array<String>
Unique keys identifying the columns that are application-level (non-dictionary) children of the sensitive column.
145 146 147 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 145 def app_defined_child_column_keys @app_defined_child_column_keys end |
#app_name ⇒ String
[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.
81 82 83 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 81 def app_name @app_name end |
#column_groups ⇒ Array<String>
The composite key groups to which the sensitive column belongs. If the column is part of a composite key, it's assigned a column group. It helps identify and manage referential relationships that involve composite keys.
155 156 157 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 155 def column_groups @column_groups end |
#column_name ⇒ String
[Required] The name of the sensitive column.
93 94 95 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 93 def column_name @column_name end |
#data_type ⇒ String
[Required] The data type of the sensitive column.
101 102 103 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 101 def data_type @data_type end |
#db_defined_child_column_keys ⇒ Array<String>
Unique keys identifying the columns that are database-level (dictionary-defined) children of the sensitive column.
149 150 151 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 149 def db_defined_child_column_keys @db_defined_child_column_keys end |
#estimated_data_value_count ⇒ Integer
[Required] The estimated number of data values the column has in the associated database.
133 134 135 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 133 def estimated_data_value_count @estimated_data_value_count end |
#key ⇒ String
[Required] The unique key that identifies the sensitive column. It's numeric and unique within a sensitive data model.
51 52 53 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 51 def key @key end |
#lifecycle_details ⇒ String
Details about the current state of the sensitive column.
75 76 77 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 75 def lifecycle_details @lifecycle_details end |
#lifecycle_state ⇒ String
[Required] The current state of the sensitive column.
71 72 73 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 71 def lifecycle_state @lifecycle_state end |
#object_name ⇒ String
[Required] The database object that contains the sensitive column.
89 90 91 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 89 def object_name @object_name end |
#object_type ⇒ String
[Required] The type of the database object that contains the sensitive column.
97 98 99 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 97 def object_type @object_type end |
#parent_column_keys ⇒ Array<String>
Unique keys identifying the columns that are parents of the sensitive column. At present, it tracks a single parent only.
122 123 124 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 122 def parent_column_keys @parent_column_keys end |
#relation_type ⇒ String
[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.
129 130 131 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 129 def relation_type @relation_type end |
#sample_data_values ⇒ Array<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.
141 142 143 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 141 def sample_data_values @sample_data_values end |
#schema_name ⇒ String
[Required] The database schema that contains the sensitive column.
85 86 87 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 85 def schema_name @schema_name end |
#sensitive_data_model_id ⇒ String
[Required] The OCID of the sensitive data model that contains the sensitive column.
55 56 57 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 55 def sensitive_data_model_id @sensitive_data_model_id end |
#sensitive_type_id ⇒ String
The OCID of the sensitive type associated with the sensitive column.
112 113 114 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 112 def sensitive_type_id @sensitive_type_id end |
#source ⇒ String
[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.
118 119 120 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 118 def source @source end |
#status ⇒ String
[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.
108 109 110 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 108 def status @status end |
#time_created ⇒ DateTime
[Required] The date and time, in the format defined by RFC3339, the sensitive column was created in the sensitive data model.
61 62 63 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 61 def time_created @time_created end |
#time_updated ⇒ DateTime
[Required] The date and time, in the format defined by RFC3339, the sensitive column was last updated in the sensitive data model.
67 68 69 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 67 def time_updated @time_updated end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 158 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'key': :'key', 'sensitive_data_model_id': :'sensitiveDataModelId', 'time_created': :'timeCreated', 'time_updated': :'timeUpdated', 'lifecycle_state': :'lifecycleState', 'lifecycle_details': :'lifecycleDetails', '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', 'app_defined_child_column_keys': :'appDefinedChildColumnKeys', 'db_defined_child_column_keys': :'dbDefinedChildColumnKeys', 'column_groups': :'columnGroups' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 188 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'key': :'String', 'sensitive_data_model_id': :'String', 'time_created': :'DateTime', 'time_updated': :'DateTime', 'lifecycle_state': :'String', 'lifecycle_details': :'String', '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>', 'app_defined_child_column_keys': :'Array<String>', 'db_defined_child_column_keys': :'Array<String>', 'column_groups': :'Array<String>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
444 445 446 447 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.rb', line 444 def ==(other) return true if equal?(other) self.class == other.class && key == other.key && sensitive_data_model_id == other.sensitive_data_model_id && time_created == other.time_created && time_updated == other.time_updated && lifecycle_state == other.lifecycle_state && lifecycle_details == other.lifecycle_details && 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 && app_defined_child_column_keys == other.app_defined_child_column_keys && db_defined_child_column_keys == other.db_defined_child_column_keys && column_groups == other.column_groups end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 495 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
475 476 477 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 475 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
484 485 486 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 484 def hash [key, sensitive_data_model_id, time_created, time_updated, lifecycle_state, lifecycle_details, 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, app_defined_child_column_keys, db_defined_child_column_keys, column_groups].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
528 529 530 531 532 533 534 535 536 537 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 528 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_s ⇒ String
Returns the string representation of the object
522 523 524 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 522 def to_s to_hash.to_s end |