Class: OCI::DataSafe::Models::DiscoveryJobResult
- Inherits:
-
Object
- Object
- OCI::DataSafe::Models::DiscoveryJobResult
- Defined in:
- lib/oci/data_safe/models/discovery_job_result.rb
Overview
A discovery job result representing a sensitive column. 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.
Constant Summary collapse
- DISCOVERY_TYPE_ENUM =
[ DISCOVERY_TYPE_NEW = 'NEW'.freeze, DISCOVERY_TYPE_MODIFIED = 'MODIFIED'.freeze, DISCOVERY_TYPE_DELETED = 'DELETED'.freeze, DISCOVERY_TYPE_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
- 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
- PLANNED_ACTION_ENUM =
[ PLANNED_ACTION_NONE = 'NONE'.freeze, PLANNED_ACTION_ACCEPT = 'ACCEPT'.freeze, PLANNED_ACTION_INVALIDATE = 'INVALIDATE'.freeze, PLANNED_ACTION_REJECT = 'REJECT'.freeze, PLANNED_ACTION_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
The name of the application.
-
#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.
-
#discovery_type ⇒ String
[Required] The type of the discovery result.
-
#estimated_data_value_count ⇒ Integer
[Required] The estimated number of data values the column has in the associated database.
-
#is_result_applied ⇒ BOOLEAN
[Required] Indicates if the discovery result has been processed.
-
#key ⇒ String
[Required] The unique key that identifies the discovery result.
- #modified_attributes ⇒ OCI::DataSafe::Models::ModifiedAttributes
-
#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.
-
#planned_action ⇒ String
[Required] Specifies how to process the discovery result.
-
#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_columnkey ⇒ String
The unique key that identifies the sensitive column represented by the discovery result.
-
#sensitive_type_id ⇒ String
The OCID of the sensitive type associated with the sensitive column.
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 = {}) ⇒ DiscoveryJobResult
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 = {}) ⇒ DiscoveryJobResult
Initializes the object
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 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 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 215 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.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.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.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.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.modified_attributes = attributes[:'modifiedAttributes'] if attributes[:'modifiedAttributes'] raise 'You cannot provide both :modifiedAttributes and :modified_attributes' if attributes.key?(:'modifiedAttributes') && attributes.key?(:'modified_attributes') self.modified_attributes = attributes[:'modified_attributes'] if attributes[:'modified_attributes'] 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.
112 113 114 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 112 def app_defined_child_column_keys @app_defined_child_column_keys end |
#app_name ⇒ String
The name of the application. An application is an entity that is identified by a schema and stores sensitive information for that schema. Its value will be same as schemaName, if no value is passed.
61 62 63 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 61 def app_name @app_name end |
#column_name ⇒ String
[Required] The name of the sensitive column.
73 74 75 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 73 def column_name @column_name end |
#data_type ⇒ String
[Required] The data type of the sensitive column.
81 82 83 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 81 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.
116 117 118 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 116 def db_defined_child_column_keys @db_defined_child_column_keys end |
#discovery_type ⇒ String
[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.
53 54 55 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 53 def discovery_type @discovery_type end |
#estimated_data_value_count ⇒ Integer
[Required] The estimated number of data values the column has in the associated database.
100 101 102 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 100 def estimated_data_value_count @estimated_data_value_count end |
#is_result_applied ⇒ BOOLEAN
[Required] Indicates if 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.
131 132 133 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 131 def is_result_applied @is_result_applied end |
#key ⇒ String
[Required] The unique key that identifies the discovery result.
45 46 47 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 45 def key @key end |
#modified_attributes ⇒ OCI::DataSafe::Models::ModifiedAttributes
134 135 136 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 134 def modified_attributes @modified_attributes end |
#object_name ⇒ String
[Required] The database object that contains the sensitive column.
69 70 71 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 69 def object_name @object_name end |
#object_type ⇒ String
[Required] The type of the database object that contains the sensitive column.
77 78 79 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 77 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.
89 90 91 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 89 def parent_column_keys @parent_column_keys end |
#planned_action ⇒ String
[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.
125 126 127 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 125 def planned_action @planned_action 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.
96 97 98 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 96 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.
108 109 110 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 108 def sample_data_values @sample_data_values end |
#schema_name ⇒ String
[Required] The database schema that contains the sensitive column.
65 66 67 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 65 def schema_name @schema_name end |
#sensitive_columnkey ⇒ String
The unique key that identifies the sensitive column represented by the discovery result.
57 58 59 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 57 def sensitive_columnkey @sensitive_columnkey end |
#sensitive_type_id ⇒ String
The OCID of the sensitive type associated with the sensitive column.
85 86 87 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 85 def sensitive_type_id @sensitive_type_id end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 137 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'key': :'key', 'discovery_type': :'discoveryType', 'sensitive_columnkey': :'sensitiveColumnkey', 'app_name': :'appName', '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', 'app_defined_child_column_keys': :'appDefinedChildColumnKeys', 'db_defined_child_column_keys': :'dbDefinedChildColumnKeys', 'planned_action': :'plannedAction', 'is_result_applied': :'isResultApplied', 'modified_attributes': :'modifiedAttributes' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
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/data_safe/models/discovery_job_result.rb', line 164 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'key': :'String', 'discovery_type': :'String', 'sensitive_columnkey': :'String', 'app_name': :'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>', 'app_defined_child_column_keys': :'Array<String>', 'db_defined_child_column_keys': :'Array<String>', 'planned_action': :'String', 'is_result_applied': :'BOOLEAN', 'modified_attributes': :'OCI::DataSafe::Models::ModifiedAttributes' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 393 def ==(other) return true if equal?(other) self.class == other.class && key == other.key && discovery_type == other.discovery_type && sensitive_columnkey == other.sensitive_columnkey && 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 && 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 && app_defined_child_column_keys == other.app_defined_child_column_keys && db_defined_child_column_keys == other.db_defined_child_column_keys && planned_action == other.planned_action && is_result_applied == other.is_result_applied && modified_attributes == other.modified_attributes end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 441 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
421 422 423 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 421 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
430 431 432 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 430 def hash [key, discovery_type, sensitive_columnkey, app_name, 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, app_defined_child_column_keys, db_defined_child_column_keys, planned_action, is_result_applied, modified_attributes].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
474 475 476 477 478 479 480 481 482 483 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 474 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
468 469 470 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 468 def to_s to_hash.to_s end |