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

Options Hash (attributes):

  • :target_id (String)

    The value to assign to the #target_id property

  • :is_decrypt (BOOLEAN)

    The value to assign to the #is_decrypt property

  • :is_rerun (BOOLEAN)

    The value to assign to the #is_rerun property

  • :tablespace (String)

    The value to assign to the #tablespace property

  • :is_ignore_errors_enabled (BOOLEAN)

    The value to assign to the #is_ignore_errors_enabled property

  • :seed (String)

    The value to assign to the #seed property

  • :is_move_interim_tables_enabled (BOOLEAN)

    The value to assign to the #is_move_interim_tables_enabled property

  • :is_execute_saved_script_enabled (BOOLEAN)

    The value to assign to the #is_execute_saved_script_enabled property



108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
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
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 108

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
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.



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

def is_decrypt
  @is_decrypt
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.



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

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.



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

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.



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

def is_move_interim_tables_enabled
  @is_move_interim_tables_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.



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

def is_rerun
  @is_rerun
end

#seedString

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



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

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.



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

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.



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

def target_id
  @target_id
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



63
64
65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 63

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'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



79
80
81
82
83
84
85
86
87
88
89
90
91
92
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 79

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'
    # rubocop:enable Style/SymbolLiteral
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.



172
173
174
175
176
177
178
179
180
181
182
183
184
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 172

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
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash



209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 209

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

See Also:

  • `==` method


189
190
191
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 189

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.



198
199
200
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 198

def hash
  [target_id, is_decrypt, is_rerun, tablespace, is_ignore_errors_enabled, seed, is_move_interim_tables_enabled, is_execute_saved_script_enabled].hash
end

#to_hashHash

Returns the object in the form of hash



242
243
244
245
246
247
248
249
250
251
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 242

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



236
237
238
# File 'lib/oci/data_safe/models/mask_data_details.rb', line 236

def to_s
  to_hash.to_s
end