Class: OCI::DataSafe::Models::CreateSensitiveDataModelDetails
- Inherits:
-
Object
- Object
- OCI::DataSafe::Models::CreateSensitiveDataModelDetails
- Defined in:
- lib/oci/data_safe/models/create_sensitive_data_model_details.rb
Overview
Details to create a new sensitive data model. If schemas and sensitive types are provided, it automatically runs data discovery and adds the discovered columns to the sensitive data model. Otherwise, it creates an empty sensitive data model that can be updated later. To specify some schemas and sensitive types for data discovery, use schemasForDiscovery and sensitiveTypeIdsForDiscovery attributes. But if you want to include all schemas and sensitive types, you can set isIncludeAllSchemas and isIncludeAllSensitiveTypes attributes to true. In the latter case, you do not need to list all schemas and sensitive types.
Instance Attribute Summary collapse
-
#app_suite_name ⇒ String
The application suite name identifying a collection of applications.
-
#compartment_id ⇒ String
[Required] The OCID of the compartment where the sensitive data model should be created.
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource.
-
#description ⇒ String
The description of the sensitive data model.
-
#display_name ⇒ String
The display name of the sensitive data model.
-
#freeform_tags ⇒ Hash<String, String>
Free-form tags for this resource.
-
#is_app_defined_relation_discovery_enabled ⇒ BOOLEAN
Indicates if data discovery jobs should identify potential application-level (non-dictionary) referential relationships between columns.
-
#is_include_all_schemas ⇒ BOOLEAN
Indicates if all the schemas in the associated target database should be scanned by data discovery jobs.
-
#is_include_all_sensitive_types ⇒ BOOLEAN
Indicates if all the existing sensitive types should be used by data discovery jobs.
-
#is_sample_data_collection_enabled ⇒ BOOLEAN
Indicates if data discovery jobs should collect and store sample data values for the discovered columns.
-
#schemas_for_discovery ⇒ Array<String>
The schemas to be scanned by data discovery jobs.
-
#sensitive_type_group_ids_for_discovery ⇒ Array<String>
The OCIDs of the sensitive type groups to be used by data discovery jobs.
-
#sensitive_type_ids_for_discovery ⇒ Array<String>
The OCIDs of the sensitive types to be used by data discovery jobs.
-
#tables_for_discovery ⇒ Array<OCI::DataSafe::Models::TablesForDiscovery>
The data discovery jobs will scan the tables specified here, including both schemas and tables.
-
#target_id ⇒ String
[Required] The OCID of the reference target database to be associated with 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 = {}) ⇒ CreateSensitiveDataModelDetails
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 = {}) ⇒ CreateSensitiveDataModelDetails
Initializes the object
173 174 175 176 177 178 179 180 181 182 183 184 185 186 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 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 |
# File 'lib/oci/data_safe/models/create_sensitive_data_model_details.rb', line 173 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.display_name = attributes[:'displayName'] if attributes[:'displayName'] raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name') self.display_name = attributes[:'display_name'] if attributes[:'display_name'] self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId'] raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id') self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id'] self.target_id = attributes[:'targetId'] if attributes[:'targetId'] raise 'You cannot provide both :targetId and :target_id' if attributes.key?(:'targetId') && attributes.key?(:'target_id') self.target_id = attributes[:'target_id'] if attributes[:'target_id'] self.app_suite_name = attributes[:'appSuiteName'] if attributes[:'appSuiteName'] self.app_suite_name = "GENERIC" if app_suite_name.nil? && !attributes.key?(:'appSuiteName') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :appSuiteName and :app_suite_name' if attributes.key?(:'appSuiteName') && attributes.key?(:'app_suite_name') self.app_suite_name = attributes[:'app_suite_name'] if attributes[:'app_suite_name'] self.app_suite_name = "GENERIC" if app_suite_name.nil? && !attributes.key?(:'appSuiteName') && !attributes.key?(:'app_suite_name') # rubocop:disable Style/StringLiterals self.description = attributes[:'description'] if attributes[:'description'] self.schemas_for_discovery = attributes[:'schemasForDiscovery'] if attributes[:'schemasForDiscovery'] raise 'You cannot provide both :schemasForDiscovery and :schemas_for_discovery' if attributes.key?(:'schemasForDiscovery') && attributes.key?(:'schemas_for_discovery') self.schemas_for_discovery = attributes[:'schemas_for_discovery'] if attributes[:'schemas_for_discovery'] self.tables_for_discovery = attributes[:'tablesForDiscovery'] if attributes[:'tablesForDiscovery'] raise 'You cannot provide both :tablesForDiscovery and :tables_for_discovery' if attributes.key?(:'tablesForDiscovery') && attributes.key?(:'tables_for_discovery') self.tables_for_discovery = attributes[:'tables_for_discovery'] if attributes[:'tables_for_discovery'] self.sensitive_type_ids_for_discovery = attributes[:'sensitiveTypeIdsForDiscovery'] if attributes[:'sensitiveTypeIdsForDiscovery'] raise 'You cannot provide both :sensitiveTypeIdsForDiscovery and :sensitive_type_ids_for_discovery' if attributes.key?(:'sensitiveTypeIdsForDiscovery') && attributes.key?(:'sensitive_type_ids_for_discovery') self.sensitive_type_ids_for_discovery = attributes[:'sensitive_type_ids_for_discovery'] if attributes[:'sensitive_type_ids_for_discovery'] self.sensitive_type_group_ids_for_discovery = attributes[:'sensitiveTypeGroupIdsForDiscovery'] if attributes[:'sensitiveTypeGroupIdsForDiscovery'] raise 'You cannot provide both :sensitiveTypeGroupIdsForDiscovery and :sensitive_type_group_ids_for_discovery' if attributes.key?(:'sensitiveTypeGroupIdsForDiscovery') && attributes.key?(:'sensitive_type_group_ids_for_discovery') self.sensitive_type_group_ids_for_discovery = attributes[:'sensitive_type_group_ids_for_discovery'] if attributes[:'sensitive_type_group_ids_for_discovery'] self.is_sample_data_collection_enabled = attributes[:'isSampleDataCollectionEnabled'] unless attributes[:'isSampleDataCollectionEnabled'].nil? self.is_sample_data_collection_enabled = false if is_sample_data_collection_enabled.nil? && !attributes.key?(:'isSampleDataCollectionEnabled') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isSampleDataCollectionEnabled and :is_sample_data_collection_enabled' if attributes.key?(:'isSampleDataCollectionEnabled') && attributes.key?(:'is_sample_data_collection_enabled') self.is_sample_data_collection_enabled = attributes[:'is_sample_data_collection_enabled'] unless attributes[:'is_sample_data_collection_enabled'].nil? self.is_sample_data_collection_enabled = false if is_sample_data_collection_enabled.nil? && !attributes.key?(:'isSampleDataCollectionEnabled') && !attributes.key?(:'is_sample_data_collection_enabled') # rubocop:disable Style/StringLiterals self.is_app_defined_relation_discovery_enabled = attributes[:'isAppDefinedRelationDiscoveryEnabled'] unless attributes[:'isAppDefinedRelationDiscoveryEnabled'].nil? self.is_app_defined_relation_discovery_enabled = false if is_app_defined_relation_discovery_enabled.nil? && !attributes.key?(:'isAppDefinedRelationDiscoveryEnabled') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isAppDefinedRelationDiscoveryEnabled and :is_app_defined_relation_discovery_enabled' if attributes.key?(:'isAppDefinedRelationDiscoveryEnabled') && attributes.key?(:'is_app_defined_relation_discovery_enabled') self.is_app_defined_relation_discovery_enabled = attributes[:'is_app_defined_relation_discovery_enabled'] unless attributes[:'is_app_defined_relation_discovery_enabled'].nil? self.is_app_defined_relation_discovery_enabled = false if is_app_defined_relation_discovery_enabled.nil? && !attributes.key?(:'isAppDefinedRelationDiscoveryEnabled') && !attributes.key?(:'is_app_defined_relation_discovery_enabled') # rubocop:disable Style/StringLiterals self.is_include_all_schemas = attributes[:'isIncludeAllSchemas'] unless attributes[:'isIncludeAllSchemas'].nil? self.is_include_all_schemas = false if is_include_all_schemas.nil? && !attributes.key?(:'isIncludeAllSchemas') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isIncludeAllSchemas and :is_include_all_schemas' if attributes.key?(:'isIncludeAllSchemas') && attributes.key?(:'is_include_all_schemas') self.is_include_all_schemas = attributes[:'is_include_all_schemas'] unless attributes[:'is_include_all_schemas'].nil? self.is_include_all_schemas = false if is_include_all_schemas.nil? && !attributes.key?(:'isIncludeAllSchemas') && !attributes.key?(:'is_include_all_schemas') # rubocop:disable Style/StringLiterals self.is_include_all_sensitive_types = attributes[:'isIncludeAllSensitiveTypes'] unless attributes[:'isIncludeAllSensitiveTypes'].nil? self.is_include_all_sensitive_types = false if is_include_all_sensitive_types.nil? && !attributes.key?(:'isIncludeAllSensitiveTypes') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isIncludeAllSensitiveTypes and :is_include_all_sensitive_types' if attributes.key?(:'isIncludeAllSensitiveTypes') && attributes.key?(:'is_include_all_sensitive_types') self.is_include_all_sensitive_types = attributes[:'is_include_all_sensitive_types'] unless attributes[:'is_include_all_sensitive_types'].nil? self.is_include_all_sensitive_types = false if is_include_all_sensitive_types.nil? && !attributes.key?(:'isIncludeAllSensitiveTypes') && !attributes.key?(:'is_include_all_sensitive_types') # rubocop:disable Style/StringLiterals self. = attributes[:'freeformTags'] if attributes[:'freeformTags'] raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags') self. = attributes[:'freeform_tags'] if attributes[:'freeform_tags'] self. = attributes[:'definedTags'] if attributes[:'definedTags'] raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags') self. = attributes[:'defined_tags'] if attributes[:'defined_tags'] end |
Instance Attribute Details
#app_suite_name ⇒ String
The application suite name identifying a collection of applications. It's useful only if maintaining a sensitive data model for a suite of applications.
34 35 36 |
# File 'lib/oci/data_safe/models/create_sensitive_data_model_details.rb', line 34 def app_suite_name @app_suite_name end |
#compartment_id ⇒ String
[Required] The OCID of the compartment where the sensitive data model should be created.
24 25 26 |
# File 'lib/oci/data_safe/models/create_sensitive_data_model_details.rb', line 24 def compartment_id @compartment_id end |
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags Example: {\"Operations\": {\"CostCenter\": \"42\"}}
104 105 106 |
# File 'lib/oci/data_safe/models/create_sensitive_data_model_details.rb', line 104 def @defined_tags end |
#description ⇒ String
The description of the sensitive data model.
38 39 40 |
# File 'lib/oci/data_safe/models/create_sensitive_data_model_details.rb', line 38 def description @description end |
#display_name ⇒ String
The display name of the sensitive data model. The name does not have to be unique, and it's changeable.
20 21 22 |
# File 'lib/oci/data_safe/models/create_sensitive_data_model_details.rb', line 20 def display_name @display_name end |
#freeform_tags ⇒ Hash<String, String>
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags
Example: {\"Department\": \"Finance\"}
98 99 100 |
# File 'lib/oci/data_safe/models/create_sensitive_data_model_details.rb', line 98 def @freeform_tags end |
#is_app_defined_relation_discovery_enabled ⇒ BOOLEAN
Indicates if data discovery jobs should identify potential application-level (non-dictionary) referential relationships between columns. Note that data discovery automatically identifies and adds database-level (dictionary-defined) relationships. This option helps identify application-level relationships that are not defined in the database dictionary, which in turn, helps identify additional sensitive columns and preserve referential integrity during data masking. It's disabled by default and should be used only if there is a need to identify application-level relationships.
79 80 81 |
# File 'lib/oci/data_safe/models/create_sensitive_data_model_details.rb', line 79 def is_app_defined_relation_discovery_enabled @is_app_defined_relation_discovery_enabled end |
#is_include_all_schemas ⇒ BOOLEAN
Indicates if all the schemas in the associated target database should be scanned by data discovery jobs. If it is set to true, sensitive data is discovered in all schemas (except for schemas maintained by Oracle).
85 86 87 |
# File 'lib/oci/data_safe/models/create_sensitive_data_model_details.rb', line 85 def is_include_all_schemas @is_include_all_schemas end |
#is_include_all_sensitive_types ⇒ BOOLEAN
Indicates if all the existing sensitive types should be used by data discovery jobs. If it's set to true, the sensitiveTypeIdsForDiscovery attribute is ignored and all sensitive types are used for data discovery.
91 92 93 |
# File 'lib/oci/data_safe/models/create_sensitive_data_model_details.rb', line 91 def is_include_all_sensitive_types @is_include_all_sensitive_types end |
#is_sample_data_collection_enabled ⇒ BOOLEAN
Indicates if data discovery jobs should collect and store sample data values for the discovered columns. Sample data helps review the discovered columns and ensure that they actually contain sensitive data. As it collects original data from the target database, it's disabled by default and should be used only if it's acceptable to store sample data in Data Safe's repository in Oracle Cloud. Note that sample data values are not collected for columns with the following data types: LONG, LOB, RAW, XMLTYPE and BFILE.
70 71 72 |
# File 'lib/oci/data_safe/models/create_sensitive_data_model_details.rb', line 70 def is_sample_data_collection_enabled @is_sample_data_collection_enabled end |
#schemas_for_discovery ⇒ Array<String>
The schemas to be scanned by data discovery jobs.
42 43 44 |
# File 'lib/oci/data_safe/models/create_sensitive_data_model_details.rb', line 42 def schemas_for_discovery @schemas_for_discovery end |
#sensitive_type_group_ids_for_discovery ⇒ Array<String>
The OCIDs of the sensitive type groups to be used by data discovery jobs. All the sensitive types present in sensitive type group will be used for discovery.
61 62 63 |
# File 'lib/oci/data_safe/models/create_sensitive_data_model_details.rb', line 61 def sensitive_type_group_ids_for_discovery @sensitive_type_group_ids_for_discovery end |
#sensitive_type_ids_for_discovery ⇒ Array<String>
The OCIDs of the sensitive types to be used by data discovery jobs. If OCID of a sensitive category is provided, all its child sensitive types are used for data discovery.
55 56 57 |
# File 'lib/oci/data_safe/models/create_sensitive_data_model_details.rb', line 55 def sensitive_type_ids_for_discovery @sensitive_type_ids_for_discovery end |
#tables_for_discovery ⇒ Array<OCI::DataSafe::Models::TablesForDiscovery>
The data discovery jobs will scan the tables specified here, including both schemas and tables. For instance, the input could be in the format: ["HR", tableName: ["T1", "T2"], "OE", tableName : ["T3", "T4"]].
49 50 51 |
# File 'lib/oci/data_safe/models/create_sensitive_data_model_details.rb', line 49 def tables_for_discovery @tables_for_discovery end |
#target_id ⇒ String
[Required] The OCID of the reference target database to be associated with the sensitive data model. All operations such as performing data discovery and adding columns manually are done in the context of the associated target database.
30 31 32 |
# File 'lib/oci/data_safe/models/create_sensitive_data_model_details.rb', line 30 def target_id @target_id end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
# File 'lib/oci/data_safe/models/create_sensitive_data_model_details.rb', line 107 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'display_name': :'displayName', 'compartment_id': :'compartmentId', 'target_id': :'targetId', 'app_suite_name': :'appSuiteName', 'description': :'description', 'schemas_for_discovery': :'schemasForDiscovery', 'tables_for_discovery': :'tablesForDiscovery', 'sensitive_type_ids_for_discovery': :'sensitiveTypeIdsForDiscovery', 'sensitive_type_group_ids_for_discovery': :'sensitiveTypeGroupIdsForDiscovery', 'is_sample_data_collection_enabled': :'isSampleDataCollectionEnabled', 'is_app_defined_relation_discovery_enabled': :'isAppDefinedRelationDiscoveryEnabled', 'is_include_all_schemas': :'isIncludeAllSchemas', 'is_include_all_sensitive_types': :'isIncludeAllSensitiveTypes', 'freeform_tags': :'freeformTags', 'defined_tags': :'definedTags' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 |
# File 'lib/oci/data_safe/models/create_sensitive_data_model_details.rb', line 130 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'display_name': :'String', 'compartment_id': :'String', 'target_id': :'String', 'app_suite_name': :'String', 'description': :'String', 'schemas_for_discovery': :'Array<String>', 'tables_for_discovery': :'Array<OCI::DataSafe::Models::TablesForDiscovery>', 'sensitive_type_ids_for_discovery': :'Array<String>', 'sensitive_type_group_ids_for_discovery': :'Array<String>', 'is_sample_data_collection_enabled': :'BOOLEAN', 'is_app_defined_relation_discovery_enabled': :'BOOLEAN', 'is_include_all_schemas': :'BOOLEAN', 'is_include_all_sensitive_types': :'BOOLEAN', 'freeform_tags': :'Hash<String, String>', 'defined_tags': :'Hash<String, Hash<String, Object>>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 |
# File 'lib/oci/data_safe/models/create_sensitive_data_model_details.rb', line 283 def ==(other) return true if equal?(other) self.class == other.class && display_name == other.display_name && compartment_id == other.compartment_id && target_id == other.target_id && app_suite_name == other.app_suite_name && description == other.description && schemas_for_discovery == other.schemas_for_discovery && tables_for_discovery == other.tables_for_discovery && sensitive_type_ids_for_discovery == other.sensitive_type_ids_for_discovery && sensitive_type_group_ids_for_discovery == other.sensitive_type_group_ids_for_discovery && is_sample_data_collection_enabled == other.is_sample_data_collection_enabled && is_app_defined_relation_discovery_enabled == other.is_app_defined_relation_discovery_enabled && is_include_all_schemas == other.is_include_all_schemas && is_include_all_sensitive_types == other.is_include_all_sensitive_types && == other. && == other. end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 |
# File 'lib/oci/data_safe/models/create_sensitive_data_model_details.rb', line 327 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
307 308 309 |
# File 'lib/oci/data_safe/models/create_sensitive_data_model_details.rb', line 307 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
316 317 318 |
# File 'lib/oci/data_safe/models/create_sensitive_data_model_details.rb', line 316 def hash [display_name, compartment_id, target_id, app_suite_name, description, schemas_for_discovery, tables_for_discovery, sensitive_type_ids_for_discovery, sensitive_type_group_ids_for_discovery, is_sample_data_collection_enabled, is_app_defined_relation_discovery_enabled, is_include_all_schemas, is_include_all_sensitive_types, , ].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
360 361 362 363 364 365 366 367 368 369 |
# File 'lib/oci/data_safe/models/create_sensitive_data_model_details.rb', line 360 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
354 355 356 |
# File 'lib/oci/data_safe/models/create_sensitive_data_model_details.rb', line 354 def to_s to_hash.to_s end |