Class: OCI::DataSafe::Models::MaskingColumnSummary

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

Overview

Summary of a masking column.

Constant Summary collapse

LIFECYCLE_STATE_ENUM =
[
  LIFECYCLE_STATE_CREATING = 'CREATING'.freeze,
  LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.freeze,
  LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze,
  LIFECYCLE_STATE_DELETING = 'DELETING'.freeze,
  LIFECYCLE_STATE_NEEDS_ATTENTION = 'NEEDS_ATTENTION'.freeze,
  LIFECYCLE_STATE_FAILED = 'FAILED'.freeze,
  LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
OBJECT_TYPE_ENUM =
[
  OBJECT_TYPE_TABLE = 'TABLE'.freeze,
  OBJECT_TYPE_EDITIONING_VIEW = 'EDITIONING_VIEW'.freeze,
  OBJECT_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ MaskingColumnSummary

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :key (String)

    The value to assign to the #key property

  • :masking_policy_id (String)

    The value to assign to the #masking_policy_id property

  • :lifecycle_state (String)

    The value to assign to the #lifecycle_state property

  • :lifecycle_details (String)

    The value to assign to the #lifecycle_details property

  • :time_created (DateTime)

    The value to assign to the #time_created property

  • :time_updated (DateTime)

    The value to assign to the #time_updated property

  • :schema_name (String)

    The value to assign to the #schema_name property

  • :object_name (String)

    The value to assign to the #object_name property

  • :object_type (String)

    The value to assign to the #object_type property

  • :column_name (String)

    The value to assign to the #column_name property

  • :child_columns (Array<String>)

    The value to assign to the #child_columns property

  • :masking_column_group (String)

    The value to assign to the #masking_column_group property

  • :sensitive_type_id (String)

    The value to assign to the #sensitive_type_id property

  • :is_masking_enabled (BOOLEAN)

    The value to assign to the #is_masking_enabled property

  • :data_type (String)

    The value to assign to the #data_type property

  • :masking_formats (Array<OCI::DataSafe::Models::MaskingFormat>)

    The value to assign to the #masking_formats property



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
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
# File 'lib/oci/data_safe/models/masking_column_summary.rb', line 169

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

  self.masking_policy_id = attributes[:'maskingPolicyId'] if attributes[:'maskingPolicyId']

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

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

  self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState']

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

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

  self.lifecycle_details = attributes[:'lifecycleDetails'] if attributes[:'lifecycleDetails']

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

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

  self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated']

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

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

  self.time_updated = attributes[:'timeUpdated'] if attributes[:'timeUpdated']

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

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

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

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

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

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

  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?

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

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

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

  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

#child_columnsArray<String>

An array of child columns that are in referential relationship with the masking column.

Returns:

  • (Array<String>)


74
75
76
# File 'lib/oci/data_safe/models/masking_column_summary.rb', line 74

def child_columns
  @child_columns
end

#column_nameString

[Required] The name of the database column. Note that the same name is used for the masking column. There is no separate displayName attribute for the masking column.

Returns:

  • (String)


70
71
72
# File 'lib/oci/data_safe/models/masking_column_summary.rb', line 70

def column_name
  @column_name
end

#data_typeString

The data type of the masking column.

Returns:

  • (String)


93
94
95
# File 'lib/oci/data_safe/models/masking_column_summary.rb', line 93

def data_type
  @data_type
end

#is_masking_enabledBOOLEAN

[Required] Indicates whether data masking is enabled for the masking column.

Returns:

  • (BOOLEAN)


89
90
91
# File 'lib/oci/data_safe/models/masking_column_summary.rb', line 89

def is_masking_enabled
  @is_masking_enabled
end

#keyString

[Required] The unique key that identifies a masking column. The key is numeric and unique within a masking policy.

Returns:

  • (String)


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

def key
  @key
end

#lifecycle_detailsString

Details about the current state of the masking column.

Returns:

  • (String)


42
43
44
# File 'lib/oci/data_safe/models/masking_column_summary.rb', line 42

def lifecycle_details
  @lifecycle_details
end

#lifecycle_stateString

[Required] The current state of the masking column.

Returns:

  • (String)


38
39
40
# File 'lib/oci/data_safe/models/masking_column_summary.rb', line 38

def lifecycle_state
  @lifecycle_state
end

#masking_column_groupString

The group of the masking column. 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=

Returns:

  • (String)


81
82
83
# File 'lib/oci/data_safe/models/masking_column_summary.rb', line 81

def masking_column_group
  @masking_column_group
end

#masking_formatsArray<OCI::DataSafe::Models::MaskingFormat>

An array of masking formats assigned to the masking column.



97
98
99
# File 'lib/oci/data_safe/models/masking_column_summary.rb', line 97

def masking_formats
  @masking_formats
end

#masking_policy_idString

[Required] The OCID of the masking policy that contains the masking column.

Returns:

  • (String)


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

def masking_policy_id
  @masking_policy_id
end

#object_nameString

[Required] The name of the object (table or editioning view) that contains the database column.

Returns:

  • (String)


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

def object_name
  @object_name
end

#object_typeString

The type of the object that contains the database column.

Returns:

  • (String)


64
65
66
# File 'lib/oci/data_safe/models/masking_column_summary.rb', line 64

def object_type
  @object_type
end

#schema_nameString

[Required] The name of the schema that contains the database column.

Returns:

  • (String)


56
57
58
# File 'lib/oci/data_safe/models/masking_column_summary.rb', line 56

def schema_name
  @schema_name
end

#sensitive_type_idString

The OCID of the sensitive type associated with the masking column.

Returns:

  • (String)


85
86
87
# File 'lib/oci/data_safe/models/masking_column_summary.rb', line 85

def sensitive_type_id
  @sensitive_type_id
end

#time_createdDateTime

[Required] The date and time the masking column was created, in the format defined by RFC3339.

Returns:

  • (DateTime)


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

def time_created
  @time_created
end

#time_updatedDateTime

[Required] The date and time the masking column was last updated, in the format defined by RFC3339.

Returns:

  • (DateTime)


52
53
54
# File 'lib/oci/data_safe/models/masking_column_summary.rb', line 52

def time_updated
  @time_updated
end

Class Method Details

.attribute_mapObject

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



100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# File 'lib/oci/data_safe/models/masking_column_summary.rb', line 100

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'key': :'key',
    'masking_policy_id': :'maskingPolicyId',
    'lifecycle_state': :'lifecycleState',
    'lifecycle_details': :'lifecycleDetails',
    'time_created': :'timeCreated',
    'time_updated': :'timeUpdated',
    'schema_name': :'schemaName',
    'object_name': :'objectName',
    'object_type': :'objectType',
    'column_name': :'columnName',
    'child_columns': :'childColumns',
    'masking_column_group': :'maskingColumnGroup',
    'sensitive_type_id': :'sensitiveTypeId',
    'is_masking_enabled': :'isMaskingEnabled',
    'data_type': :'dataType',
    'masking_formats': :'maskingFormats'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



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

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'key': :'String',
    'masking_policy_id': :'String',
    'lifecycle_state': :'String',
    'lifecycle_details': :'String',
    'time_created': :'DateTime',
    'time_updated': :'DateTime',
    'schema_name': :'String',
    'object_name': :'String',
    'object_type': :'String',
    'column_name': :'String',
    'child_columns': :'Array<String>',
    'masking_column_group': :'String',
    'sensitive_type_id': :'String',
    'is_masking_enabled': :'BOOLEAN',
    'data_type': :'String',
    'masking_formats': :'Array<OCI::DataSafe::Models::MaskingFormat>'
    # 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



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/masking_column_summary.rb', line 301

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

  self.class == other.class &&
    key == other.key &&
    masking_policy_id == other.masking_policy_id &&
    lifecycle_state == other.lifecycle_state &&
    lifecycle_details == other.lifecycle_details &&
    time_created == other.time_created &&
    time_updated == other.time_updated &&
    schema_name == other.schema_name &&
    object_name == other.object_name &&
    object_type == other.object_type &&
    column_name == other.column_name &&
    child_columns == other.child_columns &&
    masking_column_group == other.masking_column_group &&
    sensitive_type_id == other.sensitive_type_id &&
    is_masking_enabled == other.is_masking_enabled &&
    data_type == other.data_type &&
    masking_formats == other.masking_formats
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



346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
# File 'lib/oci/data_safe/models/masking_column_summary.rb', line 346

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


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

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



335
336
337
# File 'lib/oci/data_safe/models/masking_column_summary.rb', line 335

def hash
  [key, masking_policy_id, lifecycle_state, lifecycle_details, time_created, time_updated, schema_name, object_name, object_type, column_name, child_columns, masking_column_group, sensitive_type_id, is_masking_enabled, data_type, masking_formats].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



379
380
381
382
383
384
385
386
387
388
# File 'lib/oci/data_safe/models/masking_column_summary.rb', line 379

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



373
374
375
# File 'lib/oci/data_safe/models/masking_column_summary.rb', line 373

def to_s
  to_hash.to_s
end