Class: OCI::DataSafe::Models::CreateMaskingColumnDetails
- Inherits:
-
Object
- Object
- OCI::DataSafe::Models::CreateMaskingColumnDetails
- Defined in:
- lib/oci/data_safe/models/create_masking_column_details.rb
Overview
Details to create a new masking column. You can use this to add a parent column only. It automatically adds the child columns from the associated sensitive data model or target database. If you provide the sensitiveTypeId attribute but not the maskingFormats attribute, it automatically assigns the default masking format associated with the specified sensitive type. Alternatively, if you provide the maskingFormats attribute, the specified masking formats are assigned to the column.
Using the maskingFormats attribute, you can assign one or more masking formats to a column. You can specify a condition as part of each masking format. It enables you to do <a href="docs.oracle.com/en/cloud/paas/data-safe/udscs/conditional-masking.html">conditional masking</a> so that you can mask the column data values differently using different masking formats and the associated conditions. A masking format can have one or more format entries. The combined output of all the format entries is used for masking. It provides the flexibility to define a masking format that can generate different parts of a data value separately and then combine them to get the final data value for masking.
You can use the maskingColumnGroup attribute to group the columns that you would like to mask together. It enables you to do <a href="docs.oracle.com/en/cloud/paas/data-safe/udscs/group-masking1.html#GUID-755056B9-9540-48C0-9491-262A44A85037">group or compound masking</a> that ensures that the masked data across the columns in a group continue to retain the same logical relationship.
Constant Summary collapse
- OBJECT_TYPE_ENUM =
[ OBJECT_TYPE_TABLE = 'TABLE'.freeze, OBJECT_TYPE_EDITIONING_VIEW = 'EDITIONING_VIEW'.freeze ].freeze
Instance Attribute Summary collapse
-
#column_name ⇒ String
[Required] The name of the database column.
-
#is_masking_enabled ⇒ BOOLEAN
Indicates if data masking is enabled for the masking column.
-
#masking_column_group ⇒ String
The group of the masking column.
-
#masking_formats ⇒ Array<OCI::DataSafe::Models::MaskingFormat>
The masking formats to be assigned to the masking column.
-
#object_name ⇒ String
[Required] The name of the object (table or editioning view) that contains the database column.
-
#object_type ⇒ String
The type of the object that contains the database column.
-
#schema_name ⇒ String
[Required] The name of the schema that contains the database column.
-
#sensitive_type_id ⇒ String
The OCID of the sensitive type to be associated with the masking 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 = {}) ⇒ CreateMaskingColumnDetails
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 = {}) ⇒ CreateMaskingColumnDetails
Initializes the object
136 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 162 163 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 189 190 191 192 193 |
# File 'lib/oci/data_safe/models/create_masking_column_details.rb', line 136 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.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.object_type = attributes[:'objectType'] if attributes[:'objectType'] self.object_type = "TABLE" if object_type.nil? && !attributes.key?(:'objectType') # rubocop:disable Style/StringLiterals 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.object_type = "TABLE" if object_type.nil? && !attributes.key?(:'objectType') && !attributes.key?(:'object_type') # rubocop:disable Style/StringLiterals 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.masking_column_group = attributes[:'maskingColumnGroup'] if attributes[:'maskingColumnGroup'] raise 'You cannot provide both :maskingColumnGroup and :masking_column_group' if attributes.key?(:'maskingColumnGroup') && attributes.key?(:'masking_column_group') self.masking_column_group = attributes[:'masking_column_group'] if attributes[:'masking_column_group'] 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.is_masking_enabled = attributes[:'isMaskingEnabled'] unless attributes[:'isMaskingEnabled'].nil? self.is_masking_enabled = true if is_masking_enabled.nil? && !attributes.key?(:'isMaskingEnabled') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isMaskingEnabled and :is_masking_enabled' if attributes.key?(:'isMaskingEnabled') && attributes.key?(:'is_masking_enabled') self.is_masking_enabled = attributes[:'is_masking_enabled'] unless attributes[:'is_masking_enabled'].nil? self.is_masking_enabled = true if is_masking_enabled.nil? && !attributes.key?(:'isMaskingEnabled') && !attributes.key?(:'is_masking_enabled') # rubocop:disable Style/StringLiterals self.masking_formats = attributes[:'maskingFormats'] if attributes[:'maskingFormats'] raise 'You cannot provide both :maskingFormats and :masking_formats' if attributes.key?(:'maskingFormats') && attributes.key?(:'masking_formats') self.masking_formats = attributes[:'masking_formats'] if attributes[:'masking_formats'] end |
Instance Attribute Details
#column_name ⇒ String
[Required] The name of the database column. This attribute cannot be updated for an existing
masking column. Note that the same name is used for the masking column. There
is no separate displayName attribute for the masking column.
53 54 55 |
# File 'lib/oci/data_safe/models/create_masking_column_details.rb', line 53 def column_name @column_name end |
#is_masking_enabled ⇒ BOOLEAN
Indicates if data masking is enabled for the masking column. Set it to false if you don’t want to mask the column.
76 77 78 |
# File 'lib/oci/data_safe/models/create_masking_column_details.rb', line 76 def is_masking_enabled @is_masking_enabled end |
#masking_column_group ⇒ String
The group of the masking column. It’s a masking group identifier and can be any string of acceptable length. All the columns in a group are masked together to ensure that the masked data across these columns continue to retain the same logical relationship. For more details, check <a href=docs.oracle.com/en/cloud/paas/data-safe/udscs/group-masking1.html#GUID-755056B9-9540-48C0-9491-262A44A85037>Group Masking in the Data Safe documentation.</a>
62 63 64 |
# File 'lib/oci/data_safe/models/create_masking_column_details.rb', line 62 def masking_column_group @masking_column_group end |
#masking_formats ⇒ Array<OCI::DataSafe::Models::MaskingFormat>
The masking formats to be assigned to the masking column. You can specify a condition as part of each masking format. It enables you to do <a href="docs.oracle.com/en/cloud/paas/data-safe/udscs/conditional-masking.html">conditional masking</a> so that you can mask the column data values differently using different masking formats and the associated conditions. A masking format can have one or more format entries. The combined output of all the format entries is used for masking. It provides the flexibility to define a masking format that can generate different parts of a data value separately and then combine them to get the final data value for masking.
88 89 90 |
# File 'lib/oci/data_safe/models/create_masking_column_details.rb', line 88 def masking_formats @masking_formats end |
#object_name ⇒ String
[Required] The name of the object (table or editioning view) that contains the database column. This attribute cannot be updated for an existing masking column.
42 43 44 |
# File 'lib/oci/data_safe/models/create_masking_column_details.rb', line 42 def object_name @object_name end |
#object_type ⇒ String
The type of the object that contains the database column.
46 47 48 |
# File 'lib/oci/data_safe/models/create_masking_column_details.rb', line 46 def object_type @object_type end |
#schema_name ⇒ String
[Required] The name of the schema that contains the database column. This attribute cannot be updated for an existing masking column.
38 39 40 |
# File 'lib/oci/data_safe/models/create_masking_column_details.rb', line 38 def schema_name @schema_name end |
#sensitive_type_id ⇒ String
The OCID of the sensitive type to be associated with the masking column. Note that if the maskingFormats attribute isn’t provided while creating a masking column, the default masking format associated with the specified sensitive type is assigned to the masking column.
70 71 72 |
# File 'lib/oci/data_safe/models/create_masking_column_details.rb', line 70 def sensitive_type_id @sensitive_type_id end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
# File 'lib/oci/data_safe/models/create_masking_column_details.rb', line 91 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'schema_name': :'schemaName', 'object_name': :'objectName', 'object_type': :'objectType', 'column_name': :'columnName', 'masking_column_group': :'maskingColumnGroup', 'sensitive_type_id': :'sensitiveTypeId', 'is_masking_enabled': :'isMaskingEnabled', 'masking_formats': :'maskingFormats' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
# File 'lib/oci/data_safe/models/create_masking_column_details.rb', line 107 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'schema_name': :'String', 'object_name': :'String', 'object_type': :'String', 'column_name': :'String', 'masking_column_group': :'String', 'sensitive_type_id': :'String', 'is_masking_enabled': :'BOOLEAN', 'masking_formats': :'Array<OCI::DataSafe::Models::MaskingFormat>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
210 211 212 213 214 215 216 217 218 219 220 221 222 |
# File 'lib/oci/data_safe/models/create_masking_column_details.rb', line 210 def ==(other) return true if equal?(other) self.class == other.class && schema_name == other.schema_name && object_name == other.object_name && object_type == other.object_type && column_name == other.column_name && masking_column_group == other.masking_column_group && sensitive_type_id == other.sensitive_type_id && is_masking_enabled == other.is_masking_enabled && masking_formats == other.masking_formats end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 |
# File 'lib/oci/data_safe/models/create_masking_column_details.rb', line 247 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
227 228 229 |
# File 'lib/oci/data_safe/models/create_masking_column_details.rb', line 227 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
236 237 238 |
# File 'lib/oci/data_safe/models/create_masking_column_details.rb', line 236 def hash [schema_name, object_name, object_type, column_name, masking_column_group, sensitive_type_id, is_masking_enabled, masking_formats].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
280 281 282 283 284 285 286 287 288 289 |
# File 'lib/oci/data_safe/models/create_masking_column_details.rb', line 280 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
274 275 276 |
# File 'lib/oci/data_safe/models/create_masking_column_details.rb', line 274 def to_s to_hash.to_s end |