Class: OCI::DataSafe::Models::DifferenceColumnSummary

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

Overview

Summary of a SDM masking policy difference column.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ DifferenceColumnSummary

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

  • :difference_type (String)

    The value to assign to the #difference_type property

  • :sensitive_columnkey (String)

    The value to assign to the #sensitive_columnkey property

  • :masking_columnkey (String)

    The value to assign to the #masking_columnkey 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

  • :column_name (String)

    The value to assign to the #column_name property

  • :sensitive_type_id (String)

    The value to assign to the #sensitive_type_id property

  • :planned_action (String)

    The value to assign to the #planned_action property

  • :sync_status (String)

    The value to assign to the #sync_status property

  • :time_last_synced (DateTime)

    The value to assign to the #time_last_synced property



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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
# File 'lib/oci/data_safe/models/difference_column_summary.rb', line 120

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

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

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

  self.sensitive_columnkey = attributes[:'sensitiveColumnkey'] if attributes[:'sensitiveColumnkey']

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

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

  self.masking_columnkey = attributes[:'maskingColumnkey'] if attributes[:'maskingColumnkey']

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

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

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

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

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

  self.sync_status = attributes[:'syncStatus'] if attributes[:'syncStatus']

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

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

  self.time_last_synced = attributes[:'timeLastSynced'] if attributes[:'timeLastSynced']

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

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

Instance Attribute Details

#column_nameString

[Required] The name of the difference column.

Returns:

  • (String)


41
42
43
# File 'lib/oci/data_safe/models/difference_column_summary.rb', line 41

def column_name
  @column_name
end

#difference_typeString

[Required] The type of the SDM masking policy difference column. It can be one of the following three types: NEW: A new sensitive column in the sensitive data model that is not in the masking policy. DELETED: A column that is present in the masking policy but has been deleted from the sensitive data model. MODIFIED: A column that is present in the masking policy as well as the sensitive data model but some of its attributes have been modified.

Returns:

  • (String)


21
22
23
# File 'lib/oci/data_safe/models/difference_column_summary.rb', line 21

def difference_type
  @difference_type
end

#keyString

[Required] The unique key that identifies the SDM masking policy difference column.

Returns:

  • (String)


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

def key
  @key
end

#masking_columnkeyString

The unique key that identifies the masking column represented by the SDM masking policy difference column.

Returns:

  • (String)


29
30
31
# File 'lib/oci/data_safe/models/difference_column_summary.rb', line 29

def masking_columnkey
  @masking_columnkey
end

#object_nameString

[Required] The database object that contains the difference column.

Returns:

  • (String)


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

def object_name
  @object_name
end

#planned_actionString

[Required] Specifies how to process the difference column. It's set to SYNC by default. Use the PatchSdmMaskingPolicyDifferenceColumns operation to update this attribute. You can choose one of the following options: SYNC: To sync the difference column and update the masking policy to reflect the changes. NO_SYNC: To not sync the difference column so that it doesn't change the masking policy. After specifying the planned action, you can use the ApplySdmMaskingPolicyDifference operation to automatically process the difference columns.

Returns:

  • (String)


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

def planned_action
  @planned_action
end

#schema_nameString

[Required] The database schema that contains the difference column.

Returns:

  • (String)


33
34
35
# File 'lib/oci/data_safe/models/difference_column_summary.rb', line 33

def schema_name
  @schema_name
end

#sensitive_columnkeyString

The unique key that identifies the sensitive column represented by the SDM masking policy difference column.

Returns:

  • (String)


25
26
27
# File 'lib/oci/data_safe/models/difference_column_summary.rb', line 25

def sensitive_columnkey
  @sensitive_columnkey
end

#sensitive_type_idString

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

Returns:

  • (String)


45
46
47
# File 'lib/oci/data_safe/models/difference_column_summary.rb', line 45

def sensitive_type_id
  @sensitive_type_id
end

#sync_statusString

[Required] Indicates if the difference column has been processed.Use GetDifferenceColumn operation to track whether the difference column has already been processed and applied to the masking policy.

Returns:

  • (String)


59
60
61
# File 'lib/oci/data_safe/models/difference_column_summary.rb', line 59

def sync_status
  @sync_status
end

#time_last_syncedDateTime

The date and time the SDM masking policy difference column was last synced, in the format defined by RFC3339.

Returns:

  • (DateTime)


63
64
65
# File 'lib/oci/data_safe/models/difference_column_summary.rb', line 63

def time_last_synced
  @time_last_synced
end

Class Method Details

.attribute_mapObject

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



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# File 'lib/oci/data_safe/models/difference_column_summary.rb', line 66

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'key': :'key',
    'difference_type': :'differenceType',
    'sensitive_columnkey': :'sensitiveColumnkey',
    'masking_columnkey': :'maskingColumnkey',
    'schema_name': :'schemaName',
    'object_name': :'objectName',
    'column_name': :'columnName',
    'sensitive_type_id': :'sensitiveTypeId',
    'planned_action': :'plannedAction',
    'sync_status': :'syncStatus',
    'time_last_synced': :'timeLastSynced'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# File 'lib/oci/data_safe/models/difference_column_summary.rb', line 85

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'key': :'String',
    'difference_type': :'String',
    'sensitive_columnkey': :'String',
    'masking_columnkey': :'String',
    'schema_name': :'String',
    'object_name': :'String',
    'column_name': :'String',
    'sensitive_type_id': :'String',
    'planned_action': :'String',
    'sync_status': :'String',
    'time_last_synced': :'DateTime'
    # 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



196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
# File 'lib/oci/data_safe/models/difference_column_summary.rb', line 196

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

  self.class == other.class &&
    key == other.key &&
    difference_type == other.difference_type &&
    sensitive_columnkey == other.sensitive_columnkey &&
    masking_columnkey == other.masking_columnkey &&
    schema_name == other.schema_name &&
    object_name == other.object_name &&
    column_name == other.column_name &&
    sensitive_type_id == other.sensitive_type_id &&
    planned_action == other.planned_action &&
    sync_status == other.sync_status &&
    time_last_synced == other.time_last_synced
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



236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
# File 'lib/oci/data_safe/models/difference_column_summary.rb', line 236

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


216
217
218
# File 'lib/oci/data_safe/models/difference_column_summary.rb', line 216

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



225
226
227
# File 'lib/oci/data_safe/models/difference_column_summary.rb', line 225

def hash
  [key, difference_type, sensitive_columnkey, masking_columnkey, schema_name, object_name, column_name, sensitive_type_id, planned_action, sync_status, time_last_synced].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



269
270
271
272
273
274
275
276
277
278
# File 'lib/oci/data_safe/models/difference_column_summary.rb', line 269

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



263
264
265
# File 'lib/oci/data_safe/models/difference_column_summary.rb', line 263

def to_s
  to_hash.to_s
end