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](tools.ietf.org/html/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](tools.ietf.org/html/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
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 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 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 244 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.
144 145 146 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 144 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.
80 81 82 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 80 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.
154 155 156 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 154 def column_groups @column_groups end |
#column_name ⇒ String
[Required] The name of the sensitive column.
92 93 94 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 92 def column_name @column_name end |
#data_type ⇒ String
[Required] The data type of the sensitive column.
100 101 102 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 100 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.
148 149 150 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 148 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.
132 133 134 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 132 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.
50 51 52 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 50 def key @key end |
#lifecycle_details ⇒ String
Details about the current state of the sensitive column.
74 75 76 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 74 def lifecycle_details @lifecycle_details end |
#lifecycle_state ⇒ String
[Required] The current state of the sensitive column.
70 71 72 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 70 def lifecycle_state @lifecycle_state end |
#object_name ⇒ String
[Required] The database object that contains the sensitive column.
88 89 90 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 88 def object_name @object_name end |
#object_type ⇒ String
[Required] The type of the database object that contains the sensitive column.
96 97 98 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 96 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.
121 122 123 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 121 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.
128 129 130 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 128 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.
140 141 142 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 140 def sample_data_values @sample_data_values end |
#schema_name ⇒ String
[Required] The database schema that contains the sensitive column.
84 85 86 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 84 def schema_name @schema_name end |
#sensitive_data_model_id ⇒ String
[Required] The OCID of the sensitive data model that contains the sensitive column.
54 55 56 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 54 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.
111 112 113 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 111 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.
117 118 119 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 117 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.
107 108 109 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 107 def status @status end |
#time_created ⇒ DateTime
[Required] The date and time, in the format defined by [RFC3339](tools.ietf.org/html/rfc3339), the sensitive column was created in the sensitive data model.
60 61 62 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 60 def time_created @time_created end |
#time_updated ⇒ DateTime
[Required] The date and time, in the format defined by [RFC3339](tools.ietf.org/html/rfc3339), the sensitive column was last updated in the sensitive data model.
66 67 68 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 66 def time_updated @time_updated end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 157 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.
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 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 187 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.
443 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 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 443 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
494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 494 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
474 475 476 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 474 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
483 484 485 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 483 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
527 528 529 530 531 532 533 534 535 536 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 527 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
521 522 523 |
# File 'lib/oci/data_safe/models/sensitive_column.rb', line 521 def to_s to_hash.to_s end |