Class: OCI::DataSafe::Models::CreateDiscoveryJobDetails

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

Overview

Details to create a new data discovery job.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ CreateDiscoveryJobDetails

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



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
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
# File 'lib/oci/data_safe/models/create_discovery_job_details.rb', line 149

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.discovery_type = attributes[:'discoveryType'] if attributes[:'discoveryType']
  self.discovery_type = "ALL" if discovery_type.nil? && !attributes.key?(:'discoveryType') # rubocop:disable Style/StringLiterals

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

  self.discovery_type = attributes[:'discovery_type'] if attributes[:'discovery_type']
  self.discovery_type = "ALL" if discovery_type.nil? && !attributes.key?(:'discoveryType') && !attributes.key?(:'discovery_type') # rubocop:disable Style/StringLiterals

  self.sensitive_data_model_id = attributes[:'sensitiveDataModelId'] if attributes[:'sensitiveDataModelId']

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

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

  self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId']

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

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

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

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

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

  self.sensitive_type_ids_for_discovery = attributes[:'sensitiveTypeIdsForDiscovery'] if attributes[:'sensitiveTypeIdsForDiscovery']

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  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

#compartment_idString

[Required] The OCID of the compartment where the discovery job resource should be created.

Returns:

  • (String)


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

def compartment_id
  @compartment_id
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>>)


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

def defined_tags
  @defined_tags
end

#discovery_typeString

The type of the discovery job. It defines the job's scope. NEW identifies new sensitive columns in the target database that are not in the sensitive data model. DELETED identifies columns that are present in the sensitive data model but have been deleted from the target database. MODIFIED identifies columns that are present in the target database as well as the sensitive data model but some of their attributes have been modified. ALL covers all the above three scenarios and reports new, deleted and modified columns.

Returns:

  • (String)


18
19
20
# File 'lib/oci/data_safe/models/create_discovery_job_details.rb', line 18

def discovery_type
  @discovery_type
end

#display_nameString

A user-friendly name for the discovery job. Does not have to be unique, and it is changeable. Avoid entering confidential information.

Returns:

  • (String)


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

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


82
83
84
# File 'lib/oci/data_safe/models/create_discovery_job_details.rb', line 82

def freeform_tags
  @freeform_tags
end

#is_app_defined_relation_discovery_enabledBOOLEAN

Indicates if the discovery job should identify potential application-level (non-dictionary) referential relationships between columns. Note that data discovery automatically identifies and adds database-level (dictionary-defined) relationships. This option helps identify application-level relationships that are not defined in the database dictionary, which in turn, helps identify additional sensitive columns and preserve referential integrity during data masking. It's disabled by default and should be used only if there is a need to identify application-level relationships.

Returns:

  • (BOOLEAN)


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

def is_app_defined_relation_discovery_enabled
  @is_app_defined_relation_discovery_enabled
end

#is_include_all_schemasBOOLEAN

Indicates if all the schemas should be scanned by the discovery job. If it is set to true, sensitive data is discovered in all schemas (except for schemas maintained by Oracle). If both attributes are not provided, the configuration from the sensitive data model is used.

Returns:

  • (BOOLEAN)


68
69
70
# File 'lib/oci/data_safe/models/create_discovery_job_details.rb', line 68

def is_include_all_schemas
  @is_include_all_schemas
end

#is_include_all_sensitive_typesBOOLEAN

Indicates if all the existing sensitive types should be used by the discovery job. If it's set to true, the sensitiveTypeIdsForDiscovery attribute is ignored and all sensitive types are used for data discovery. If both attributes are not provided, the configuration from the sensitive data model is used.

Returns:

  • (BOOLEAN)


75
76
77
# File 'lib/oci/data_safe/models/create_discovery_job_details.rb', line 75

def is_include_all_sensitive_types
  @is_include_all_sensitive_types
end

#is_sample_data_collection_enabledBOOLEAN

Indicates if the discovery job should collect and store sample data values for the discovered columns. Sample data helps review the discovered columns and ensure that they actually contain sensitive data. As it collects original data from the target database, it's disabled by default and should be used only if it's acceptable to store sample data in Data Safe's repository in Oracle Cloud. Note that sample data values are not collected for columns with the following data types: LONG, LOB, RAW, XMLTYPE and BFILE.

Returns:

  • (BOOLEAN)


51
52
53
# File 'lib/oci/data_safe/models/create_discovery_job_details.rb', line 51

def is_sample_data_collection_enabled
  @is_sample_data_collection_enabled
end

#schemas_for_discoveryArray<String>

The schemas to be scanned by the discovery job. If not provided, the schemasForDiscovery attribute of the sensitive data model is used to get the list of schemas.

Returns:

  • (Array<String>)


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

def schemas_for_discovery
  @schemas_for_discovery
end

#sensitive_data_model_idString

[Required] The OCID of the sensitive data model.

Returns:

  • (String)


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

def sensitive_data_model_id
  @sensitive_data_model_id
end

#sensitive_type_ids_for_discoveryArray<String>

The OCIDs of the sensitive types to be used by the discovery job. If not provided, the sensitiveTypeIdsForDiscovery attribute of the sensitive data model is used to get the list of sensitive types.

Returns:

  • (Array<String>)


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

def sensitive_type_ids_for_discovery
  @sensitive_type_ids_for_discovery
end

Class Method Details

.attribute_mapObject

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



92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# File 'lib/oci/data_safe/models/create_discovery_job_details.rb', line 92

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'discovery_type': :'discoveryType',
    'sensitive_data_model_id': :'sensitiveDataModelId',
    'compartment_id': :'compartmentId',
    'display_name': :'displayName',
    'schemas_for_discovery': :'schemasForDiscovery',
    'sensitive_type_ids_for_discovery': :'sensitiveTypeIdsForDiscovery',
    'is_sample_data_collection_enabled': :'isSampleDataCollectionEnabled',
    'is_app_defined_relation_discovery_enabled': :'isAppDefinedRelationDiscoveryEnabled',
    'is_include_all_schemas': :'isIncludeAllSchemas',
    'is_include_all_sensitive_types': :'isIncludeAllSensitiveTypes',
    'freeform_tags': :'freeformTags',
    'defined_tags': :'definedTags'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# File 'lib/oci/data_safe/models/create_discovery_job_details.rb', line 112

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'discovery_type': :'String',
    'sensitive_data_model_id': :'String',
    'compartment_id': :'String',
    'display_name': :'String',
    'schemas_for_discovery': :'Array<String>',
    'sensitive_type_ids_for_discovery': :'Array<String>',
    'is_sample_data_collection_enabled': :'BOOLEAN',
    'is_app_defined_relation_discovery_enabled': :'BOOLEAN',
    'is_include_all_schemas': :'BOOLEAN',
    'is_include_all_sensitive_types': :'BOOLEAN',
    '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



245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
# File 'lib/oci/data_safe/models/create_discovery_job_details.rb', line 245

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

  self.class == other.class &&
    discovery_type == other.discovery_type &&
    sensitive_data_model_id == other.sensitive_data_model_id &&
    compartment_id == other.compartment_id &&
    display_name == other.display_name &&
    schemas_for_discovery == other.schemas_for_discovery &&
    sensitive_type_ids_for_discovery == other.sensitive_type_ids_for_discovery &&
    is_sample_data_collection_enabled == other.is_sample_data_collection_enabled &&
    is_app_defined_relation_discovery_enabled == other.is_app_defined_relation_discovery_enabled &&
    is_include_all_schemas == other.is_include_all_schemas &&
    is_include_all_sensitive_types == other.is_include_all_sensitive_types &&
    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



286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
# File 'lib/oci/data_safe/models/create_discovery_job_details.rb', line 286

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


266
267
268
# File 'lib/oci/data_safe/models/create_discovery_job_details.rb', line 266

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



275
276
277
# File 'lib/oci/data_safe/models/create_discovery_job_details.rb', line 275

def hash
  [discovery_type, sensitive_data_model_id, compartment_id, display_name, schemas_for_discovery, sensitive_type_ids_for_discovery, is_sample_data_collection_enabled, is_app_defined_relation_discovery_enabled, is_include_all_schemas, is_include_all_sensitive_types, 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



319
320
321
322
323
324
325
326
327
328
# File 'lib/oci/data_safe/models/create_discovery_job_details.rb', line 319

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



313
314
315
# File 'lib/oci/data_safe/models/create_discovery_job_details.rb', line 313

def to_s
  to_hash.to_s
end