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_job_id ⇒ String
[Required] The OCID of the discovery job.
-
#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 whether 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
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 333 334 335 336 337 338 339 340 341 342 343 344 345 346 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 223 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.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'] 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.
113 114 115 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 113 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.
62 63 64 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 62 def app_name @app_name end |
#column_name ⇒ String
[Required] The name of the sensitive column.
74 75 76 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 74 def column_name @column_name end |
#data_type ⇒ String
[Required] The data type of the sensitive column.
82 83 84 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 82 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.
117 118 119 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 117 def db_defined_child_column_keys @db_defined_child_column_keys end |
#discovery_job_id ⇒ String
[Required] The OCID of the discovery job.
136 137 138 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 136 def discovery_job_id @discovery_job_id 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.
54 55 56 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 54 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.
101 102 103 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 101 def estimated_data_value_count @estimated_data_value_count end |
#is_result_applied ⇒ BOOLEAN
[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.
132 133 134 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 132 def is_result_applied @is_result_applied end |
#key ⇒ String
[Required] The unique key that identifies the discovery result.
46 47 48 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 46 def key @key end |
#modified_attributes ⇒ OCI::DataSafe::Models::ModifiedAttributes
139 140 141 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 139 def modified_attributes @modified_attributes end |
#object_name ⇒ String
[Required] The database object that contains the sensitive column.
70 71 72 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 70 def object_name @object_name end |
#object_type ⇒ String
[Required] The type of the database object that contains the sensitive column.
78 79 80 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 78 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.
90 91 92 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 90 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.
126 127 128 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 126 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.
97 98 99 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 97 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.
109 110 111 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 109 def sample_data_values @sample_data_values end |
#schema_name ⇒ String
[Required] The database schema that contains the sensitive column.
66 67 68 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 66 def schema_name @schema_name end |
#sensitive_columnkey ⇒ String
The unique key that identifies the sensitive column represented by the discovery result.
58 59 60 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 58 def sensitive_columnkey @sensitive_columnkey end |
#sensitive_type_id ⇒ String
The OCID of the sensitive type associated with the sensitive column.
86 87 88 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 86 def sensitive_type_id @sensitive_type_id end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 142 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', 'discovery_job_id': :'discoveryJobId', 'modified_attributes': :'modifiedAttributes' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 170 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', 'discovery_job_id': :'String', 'modified_attributes': :'OCI::DataSafe::Models::ModifiedAttributes' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 407 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 && discovery_job_id == other.discovery_job_id && modified_attributes == other.modified_attributes end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 456 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
436 437 438 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 436 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
445 446 447 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 445 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, discovery_job_id, modified_attributes].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
489 490 491 492 493 494 495 496 497 498 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 489 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
483 484 485 |
# File 'lib/oci/data_safe/models/discovery_job_result.rb', line 483 def to_s to_hash.to_s end |