Class: OCI::DataSafe::Models::UpdateMaskingPolicyDetails

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

Overview

Details to update a masking policy.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ UpdateMaskingPolicyDetails

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



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
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
# File 'lib/oci/data_safe/models/update_masking_policy_details.rb', line 146

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.description = attributes[:'description'] if attributes[:'description']

  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']

  self.pre_masking_script = attributes[:'preMaskingScript'] if attributes[:'preMaskingScript']

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

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

  self.post_masking_script = attributes[:'postMaskingScript'] if attributes[:'postMaskingScript']

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

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

  self.column_source = attributes[:'columnSource'] if attributes[:'columnSource']

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

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

  self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']

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

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

  self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']

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

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

Instance Attribute Details

#column_sourceOCI::DataSafe::Models::UpdateColumnSourceDetails



72
73
74
# File 'lib/oci/data_safe/models/update_masking_policy_details.rb', line 72

def column_source
  @column_source
end

#defined_tagsHash<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\"}}

Returns:

  • (Hash<String, Hash<String, Object>>)


86
87
88
# File 'lib/oci/data_safe/models/update_masking_policy_details.rb', line 86

def defined_tags
  @defined_tags
end

#descriptionString

The description of the masking policy.

Returns:

  • (String)


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

def description
  @description
end

#display_nameString

The display name of the masking policy. The name does not have to be unique, and it's changeable.

Returns:

  • (String)


13
14
15
# File 'lib/oci/data_safe/models/update_masking_policy_details.rb', line 13

def display_name
  @display_name
end

#freeform_tagsHash<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\"}

Returns:

  • (Hash<String, String>)


79
80
81
# File 'lib/oci/data_safe/models/update_masking_policy_details.rb', line 79

def freeform_tags
  @freeform_tags
end

#is_drop_temp_tables_enabledBOOLEAN

Indicates if the temporary tables created during a masking operation should be dropped after masking. It's enabled by default. Set this attribute to false to preserve the temporary tables. Masking creates temporary tables that map the original sensitive data values to mask values. By default, these temporary tables are dropped after masking. 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.

Returns:

  • (BOOLEAN)


26
27
28
# File 'lib/oci/data_safe/models/update_masking_policy_details.rb', line 26

def is_drop_temp_tables_enabled
  @is_drop_temp_tables_enabled
end

#is_redo_logging_enabledBOOLEAN

Indicates if redo logging is enabled during a masking operation. It's disabled by default. Set this attribute to true to enable redo logging. By default, 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.

Returns:

  • (BOOLEAN)


34
35
36
# File 'lib/oci/data_safe/models/update_masking_policy_details.rb', line 34

def is_redo_logging_enabled
  @is_redo_logging_enabled
end

#is_refresh_stats_enabledBOOLEAN

Indicates if statistics gathering is enabled. It's enabled by default. Set this attribute to false to disable statistics gathering. The masking process gathers statistics on masked database tables after masking completes.

Returns:

  • (BOOLEAN)


40
41
42
# File 'lib/oci/data_safe/models/update_masking_policy_details.rb', line 40

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

Returns:

  • (String)


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

def parallel_degree
  @parallel_degree
end

#post_masking_scriptString

A post-masking script, which can contain SQL and PL/SQL statements. It's executed after the core masking script generated using the masking policy. It's usually used to perform additional transformation or cleanup work after masking.

Returns:

  • (String)


69
70
71
# File 'lib/oci/data_safe/models/update_masking_policy_details.rb', line 69

def post_masking_script
  @post_masking_script
end

#pre_masking_scriptString

A pre-masking script, which can contain SQL and PL/SQL statements. It's executed before the core masking script generated using the masking policy. It's usually used to perform any preparation or prerequisite work before masking data.

Returns:

  • (String)


62
63
64
# File 'lib/oci/data_safe/models/update_masking_policy_details.rb', line 62

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

Returns:

  • (String)


55
56
57
# File 'lib/oci/data_safe/models/update_masking_policy_details.rb', line 55

def recompile
  @recompile
end

Class Method Details

.attribute_mapObject

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



89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# File 'lib/oci/data_safe/models/update_masking_policy_details.rb', line 89

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'display_name': :'displayName',
    'description': :'description',
    'is_drop_temp_tables_enabled': :'isDropTempTablesEnabled',
    'is_redo_logging_enabled': :'isRedoLoggingEnabled',
    'is_refresh_stats_enabled': :'isRefreshStatsEnabled',
    'parallel_degree': :'parallelDegree',
    'recompile': :'recompile',
    'pre_masking_script': :'preMaskingScript',
    'post_masking_script': :'postMaskingScript',
    'column_source': :'columnSource',
    'freeform_tags': :'freeformTags',
    'defined_tags': :'definedTags'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# File 'lib/oci/data_safe/models/update_masking_policy_details.rb', line 109

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'display_name': :'String',
    'description': :'String',
    'is_drop_temp_tables_enabled': :'BOOLEAN',
    'is_redo_logging_enabled': :'BOOLEAN',
    'is_refresh_stats_enabled': :'BOOLEAN',
    'parallel_degree': :'String',
    'recompile': :'String',
    'pre_masking_script': :'String',
    'post_masking_script': :'String',
    'column_source': :'OCI::DataSafe::Models::UpdateColumnSourceDetails',
    '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.

Parameters:

  • other (Object)

    the other object to be compared



224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
# File 'lib/oci/data_safe/models/update_masking_policy_details.rb', line 224

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

  self.class == other.class &&
    display_name == other.display_name &&
    description == other.description &&
    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 &&
    pre_masking_script == other.pre_masking_script &&
    post_masking_script == other.post_masking_script &&
    column_source == other.column_source &&
    freeform_tags == other.freeform_tags &&
    defined_tags == other.defined_tags
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



265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
# File 'lib/oci/data_safe/models/update_masking_policy_details.rb', line 265

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


245
246
247
# File 'lib/oci/data_safe/models/update_masking_policy_details.rb', line 245

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



254
255
256
# File 'lib/oci/data_safe/models/update_masking_policy_details.rb', line 254

def hash
  [display_name, description, is_drop_temp_tables_enabled, is_redo_logging_enabled, is_refresh_stats_enabled, parallel_degree, recompile, pre_masking_script, post_masking_script, column_source, freeform_tags, defined_tags].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



298
299
300
301
302
303
304
305
306
307
# File 'lib/oci/data_safe/models/update_masking_policy_details.rb', line 298

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



292
293
294
# File 'lib/oci/data_safe/models/update_masking_policy_details.rb', line 292

def to_s
  to_hash.to_s
end