Class: OCI::DataSafe::Models::MaskDataDetails

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/data_safe/models/mask_data_details.rb

Overview

Details to mask data.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ MaskDataDetails

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):



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
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
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 167

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.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.is_decrypt = attributes[:'isDecrypt'] unless attributes[:'isDecrypt'].nil?
  self.is_decrypt = false if is_decrypt.nil? && !attributes.key?(:'isDecrypt') # rubocop:disable Style/StringLiterals

  raise 'You cannot provide both :isDecrypt and :is_decrypt' if attributes.key?(:'isDecrypt') && attributes.key?(:'is_decrypt')

  self.is_decrypt = attributes[:'is_decrypt'] unless attributes[:'is_decrypt'].nil?
  self.is_decrypt = false if is_decrypt.nil? && !attributes.key?(:'isDecrypt') && !attributes.key?(:'is_decrypt') # rubocop:disable Style/StringLiterals

  self.is_rerun = attributes[:'isRerun'] unless attributes[:'isRerun'].nil?
  self.is_rerun = false if is_rerun.nil? && !attributes.key?(:'isRerun') # rubocop:disable Style/StringLiterals

  raise 'You cannot provide both :isRerun and :is_rerun' if attributes.key?(:'isRerun') && attributes.key?(:'is_rerun')

  self.is_rerun = attributes[:'is_rerun'] unless attributes[:'is_rerun'].nil?
  self.is_rerun = false if is_rerun.nil? && !attributes.key?(:'isRerun') && !attributes.key?(:'is_rerun') # rubocop:disable Style/StringLiterals

  self.tablespace = attributes[:'tablespace'] if attributes[:'tablespace']

  self.is_ignore_errors_enabled = attributes[:'isIgnoreErrorsEnabled'] unless attributes[:'isIgnoreErrorsEnabled'].nil?
  self.is_ignore_errors_enabled = true if is_ignore_errors_enabled.nil? && !attributes.key?(:'isIgnoreErrorsEnabled') # rubocop:disable Style/StringLiterals

  raise 'You cannot provide both :isIgnoreErrorsEnabled and :is_ignore_errors_enabled' if attributes.key?(:'isIgnoreErrorsEnabled') && attributes.key?(:'is_ignore_errors_enabled')

  self.is_ignore_errors_enabled = attributes[:'is_ignore_errors_enabled'] unless attributes[:'is_ignore_errors_enabled'].nil?
  self.is_ignore_errors_enabled = true if is_ignore_errors_enabled.nil? && !attributes.key?(:'isIgnoreErrorsEnabled') && !attributes.key?(:'is_ignore_errors_enabled') # rubocop:disable Style/StringLiterals

  self.seed = attributes[:'seed'] if attributes[:'seed']

  self.is_move_interim_tables_enabled = attributes[:'isMoveInterimTablesEnabled'] unless attributes[:'isMoveInterimTablesEnabled'].nil?
  self.is_move_interim_tables_enabled = true if is_move_interim_tables_enabled.nil? && !attributes.key?(:'isMoveInterimTablesEnabled') # rubocop:disable Style/StringLiterals

  raise 'You cannot provide both :isMoveInterimTablesEnabled and :is_move_interim_tables_enabled' if attributes.key?(:'isMoveInterimTablesEnabled') && attributes.key?(:'is_move_interim_tables_enabled')

  self.is_move_interim_tables_enabled = attributes[:'is_move_interim_tables_enabled'] unless attributes[:'is_move_interim_tables_enabled'].nil?
  self.is_move_interim_tables_enabled = true if is_move_interim_tables_enabled.nil? && !attributes.key?(:'isMoveInterimTablesEnabled') && !attributes.key?(:'is_move_interim_tables_enabled') # rubocop:disable Style/StringLiterals

  self.is_execute_saved_script_enabled = attributes[:'isExecuteSavedScriptEnabled'] unless attributes[:'isExecuteSavedScriptEnabled'].nil?
  self.is_execute_saved_script_enabled = false if is_execute_saved_script_enabled.nil? && !attributes.key?(:'isExecuteSavedScriptEnabled') # rubocop:disable Style/StringLiterals

  raise 'You cannot provide both :isExecuteSavedScriptEnabled and :is_execute_saved_script_enabled' if attributes.key?(:'isExecuteSavedScriptEnabled') && attributes.key?(:'is_execute_saved_script_enabled')

  self.is_execute_saved_script_enabled = attributes[:'is_execute_saved_script_enabled'] unless attributes[:'is_execute_saved_script_enabled'].nil?
  self.is_execute_saved_script_enabled = false if is_execute_saved_script_enabled.nil? && !attributes.key?(:'isExecuteSavedScriptEnabled') && !attributes.key?(:'is_execute_saved_script_enabled') # rubocop:disable Style/StringLiterals

  self.is_drop_temp_tables_enabled = attributes[:'isDropTempTablesEnabled'] unless attributes[:'isDropTempTablesEnabled'].nil?

  raise 'You cannot provide both :isDropTempTablesEnabled and :is_drop_temp_tables_enabled' if attributes.key?(:'isDropTempTablesEnabled') && attributes.key?(:'is_drop_temp_tables_enabled')

  self.is_drop_temp_tables_enabled = attributes[:'is_drop_temp_tables_enabled'] unless attributes[:'is_drop_temp_tables_enabled'].nil?

  self.is_redo_logging_enabled = attributes[:'isRedoLoggingEnabled'] unless attributes[:'isRedoLoggingEnabled'].nil?

  raise 'You cannot provide both :isRedoLoggingEnabled and :is_redo_logging_enabled' if attributes.key?(:'isRedoLoggingEnabled') && attributes.key?(:'is_redo_logging_enabled')

  self.is_redo_logging_enabled = attributes[:'is_redo_logging_enabled'] unless attributes[:'is_redo_logging_enabled'].nil?

  self.is_refresh_stats_enabled = attributes[:'isRefreshStatsEnabled'] unless attributes[:'isRefreshStatsEnabled'].nil?

  raise 'You cannot provide both :isRefreshStatsEnabled and :is_refresh_stats_enabled' if attributes.key?(:'isRefreshStatsEnabled') && attributes.key?(:'is_refresh_stats_enabled')

  self.is_refresh_stats_enabled = attributes[:'is_refresh_stats_enabled'] unless attributes[:'is_refresh_stats_enabled'].nil?

  self.parallel_degree = attributes[:'parallelDegree'] if attributes[:'parallelDegree']

  raise 'You cannot provide both :parallelDegree and :parallel_degree' if attributes.key?(:'parallelDegree') && attributes.key?(:'parallel_degree')

  self.parallel_degree = attributes[:'parallel_degree'] if attributes[:'parallel_degree']

  self.recompile = attributes[:'recompile'] if attributes[:'recompile']
end

Instance Attribute Details

#is_decryptBOOLEAN

Indicates if the masking request is to decrypt the data values previously encrypted using Deterministic Encryption. Note that, to correctly decrypt the encrypted data values, it requires the same seed value that was provided to encrypt those data values.

Returns:

  • (BOOLEAN)


23
24
25
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 23

def is_decrypt
  @is_decrypt
end

#is_drop_temp_tables_enabledBOOLEAN

Indicates if the temporary tables created during a masking operation should be dropped after masking. Set this attribute to false to preserve the temporary tables. Masking creates temporary tables that map the original sensitive data values to mask values. These temporary tables are dropped after masking if this attribute is set as true. But, in some cases, you may want to preserve this information to track how masking changed your data. Note that doing so compromises security. These tables must be dropped before the database is available for unprivileged users. If it's not provided, the value of the isDropTempTablesEnabled attribute in the MaskingPolicy resource is used.

Returns:

  • (BOOLEAN)


71
72
73
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 71

def is_drop_temp_tables_enabled
  @is_drop_temp_tables_enabled
end

#is_execute_saved_script_enabledBOOLEAN

Indicates if data masking should be performed using a saved masking script. Setting this attribute to true skips masking script generation and executes the masking script stored in the Data Safe repository. It helps save time if there are no changes in the database tables and their dependencies.

Returns:

  • (BOOLEAN)


61
62
63
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 61

def is_execute_saved_script_enabled
  @is_execute_saved_script_enabled
end

#is_ignore_errors_enabledBOOLEAN

Indicates if the masking process should continue on hitting an error. It provides fault tolerance support and is enabled by default. In fault-tolerant mode, the masking process saves the failed step and continues. You can then submit another masking request (with isRerun attribute set to true) to execute only the failed steps.

Returns:

  • (BOOLEAN)


44
45
46
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 44

def is_ignore_errors_enabled
  @is_ignore_errors_enabled
end

#is_move_interim_tables_enabledBOOLEAN

Indicates if the interim DMASK tables should be moved to the user-specified tablespace. As interim tables can be large in size, set it to false if moving them causes performance overhead during masking.

Returns:

  • (BOOLEAN)


54
55
56
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 54

def is_move_interim_tables_enabled
  @is_move_interim_tables_enabled
end

#is_redo_logging_enabledBOOLEAN

Indicates if redo logging is enabled during a masking operation. Set this attribute to true to enable redo logging. If set as flase, masking disables redo logging and flashback logging to purge any original unmasked data from logs. However, in certain circumstances when you only want to test masking, rollback changes, and retry masking, you could enable logging and use a flashback database to retrieve the original unmasked data after it has been masked. If it's not provided, the value of the isRedoLoggingEnabled attribute in the MaskingPolicy resource is used.

Returns:

  • (BOOLEAN)


80
81
82
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 80

def is_redo_logging_enabled
  @is_redo_logging_enabled
end

#is_refresh_stats_enabledBOOLEAN

Indicates if statistics gathering is enabled. Set this attribute to false to disable statistics gathering. The masking process gathers statistics on masked database tables after masking completes. If it's not provided, the value of the isRefreshStatsEnabled attribute in the MaskingPolicy resource is used.

Returns:

  • (BOOLEAN)


87
88
89
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 87

def is_refresh_stats_enabled
  @is_refresh_stats_enabled
end

#is_rerunBOOLEAN

Indicates if the masking request is to rerun the previously failed masking steps. If a masking request is submitted with the isIgnoreErrorsEnabled attribute set to true, the masking process tracks the failed masking steps. Another masking request can be submitted with the isRun attribute set to true to rerun those failed masking steps. It helps save time by executing only the failed masking steps and not doing the whole masking again.

Returns:

  • (BOOLEAN)


31
32
33
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 31

def is_rerun
  @is_rerun
end

#parallel_degreeString

Specifies options to enable parallel execution when running data masking. Allowed values are 'NONE' (no parallelism), 'DEFAULT' (the Oracle Database computes the optimum degree of parallelism) or an integer value to be used as the degree of parallelism. Parallel execution helps effectively use multiple CPUs and improve masking performance. Refer to the Oracle Database parallel execution framework when choosing an explicit degree of parallelism. If it's not provided, the value of the parallelDegree attribute in the MaskingPolicy resource is used.

Returns:

  • (String)


96
97
98
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 96

def parallel_degree
  @parallel_degree
end

#recompileString

Specifies how to recompile invalid objects post data masking. Allowed values are 'SERIAL' (recompile in serial), 'PARALLEL' (recompile in parallel), 'NONE' (do not recompile). If it's set to PARALLEL, the value of parallelDegree attribute is used. Use the built-in UTL_RECOMP package to recompile any remaining invalid objects after masking completes. If it's not provided, the value of the parallelDegree attribute in the MaskingPolicy resource is used.

Returns:

  • (String)


104
105
106
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 104

def recompile
  @recompile
end

#seedString

The seed value to be used in case of Deterministic Encryption and Deterministic Substitution masking formats.

Returns:

  • (String)


48
49
50
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 48

def seed
  @seed
end

#tablespaceString

The tablespace that should be used to create the mapping tables, DMASK objects, and other temporary tables for data masking. If no tablespace is provided, the DEFAULT tablespace is used.

Returns:

  • (String)


37
38
39
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 37

def tablespace
  @tablespace
end

#target_idString

The OCID of the target database to be masked. If it's not provided, the value of the targetId attribute in the MaskingPolicy resource is used. The OCID of the target database to be masked. If it's not provided, the value of the targetId attribute in the MaskingPolicy resource is used.

Returns:

  • (String)


17
18
19
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 17

def target_id
  @target_id
end

Class Method Details

.attribute_mapObject

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
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 107

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'target_id': :'targetId',
    'is_decrypt': :'isDecrypt',
    'is_rerun': :'isRerun',
    'tablespace': :'tablespace',
    'is_ignore_errors_enabled': :'isIgnoreErrorsEnabled',
    'seed': :'seed',
    'is_move_interim_tables_enabled': :'isMoveInterimTablesEnabled',
    'is_execute_saved_script_enabled': :'isExecuteSavedScriptEnabled',
    'is_drop_temp_tables_enabled': :'isDropTempTablesEnabled',
    'is_redo_logging_enabled': :'isRedoLoggingEnabled',
    'is_refresh_stats_enabled': :'isRefreshStatsEnabled',
    'parallel_degree': :'parallelDegree',
    'recompile': :'recompile'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 128

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'target_id': :'String',
    'is_decrypt': :'BOOLEAN',
    'is_rerun': :'BOOLEAN',
    'tablespace': :'String',
    'is_ignore_errors_enabled': :'BOOLEAN',
    'seed': :'String',
    'is_move_interim_tables_enabled': :'BOOLEAN',
    'is_execute_saved_script_enabled': :'BOOLEAN',
    'is_drop_temp_tables_enabled': :'BOOLEAN',
    'is_redo_logging_enabled': :'BOOLEAN',
    'is_refresh_stats_enabled': :'BOOLEAN',
    'parallel_degree': :'String',
    'recompile': :'String'
    # rubocop:enable Style/SymbolLiteral
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • other (Object)

    the other object to be compared



257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 257

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    target_id == other.target_id &&
    is_decrypt == other.is_decrypt &&
    is_rerun == other.is_rerun &&
    tablespace == other.tablespace &&
    is_ignore_errors_enabled == other.is_ignore_errors_enabled &&
    seed == other.seed &&
    is_move_interim_tables_enabled == other.is_move_interim_tables_enabled &&
    is_execute_saved_script_enabled == other.is_execute_saved_script_enabled &&
    is_drop_temp_tables_enabled == other.is_drop_temp_tables_enabled &&
    is_redo_logging_enabled == other.is_redo_logging_enabled &&
    is_refresh_stats_enabled == other.is_refresh_stats_enabled &&
    parallel_degree == other.parallel_degree &&
    recompile == other.recompile
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 299

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

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


279
280
281
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 279

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



288
289
290
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 288

def hash
  [target_id, is_decrypt, is_rerun, tablespace, is_ignore_errors_enabled, seed, is_move_interim_tables_enabled, is_execute_saved_script_enabled, is_drop_temp_tables_enabled, is_redo_logging_enabled, is_refresh_stats_enabled, parallel_degree, recompile].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



332
333
334
335
336
337
338
339
340
341
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 332

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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



326
327
328
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 326

def to_s
  to_hash.to_s
end