cloudmersive-dlp-api-client 2.2.0 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +30 -8
  3. data/docs/AudioTimestamp.md +12 -0
  4. data/docs/CustomPiiField.md +9 -0
  5. data/docs/DetectApi.md +114 -2
  6. data/docs/DlpAdvancedAudioDetectionRequest.md +48 -0
  7. data/docs/DlpAdvancedAudioDetectionResponse.md +48 -0
  8. data/docs/DlpAdvancedAudioRedactionRequest.md +54 -0
  9. data/docs/DlpAdvancedAudioRedactionResponse.md +51 -0
  10. data/docs/DlpAdvancedDetectionRequest.md +4 -0
  11. data/docs/DlpAdvancedDetectionResponse.md +3 -0
  12. data/docs/DlpAdvancedDocumentDetectionRequest.md +6 -2
  13. data/docs/DlpAdvancedDocumentRedactionRequest.md +7 -2
  14. data/docs/DlpAdvancedDocumentRedactionResponse.md +3 -0
  15. data/docs/DlpAdvancedRedactionRequest.md +6 -1
  16. data/docs/DlpAdvancedRedactionResponse.md +3 -0
  17. data/docs/DlpAudioDetectionRequest.md +32 -0
  18. data/docs/DlpAudioDetectionResponse.md +33 -0
  19. data/docs/DlpAudioRedactionRequest.md +35 -0
  20. data/docs/DlpAudioRedactionResponse.md +36 -0
  21. data/docs/DlpBatchJobResult.md +9 -0
  22. data/docs/DlpBatchJobStatusResult.md +15 -0
  23. data/docs/DlpDocumentDetectionRequest.md +2 -2
  24. data/docs/DlpDocumentRedactionRequest.md +2 -2
  25. data/docs/DlpRedactionRequest.md +1 -1
  26. data/docs/RedactApi.md +114 -2
  27. data/docs/RedactedAudioSegment.md +10 -0
  28. data/docs/TasksBatchJobApi.md +288 -0
  29. data/lib/cloudmersive-dlp-api-client/api/detect_api.rb +104 -4
  30. data/lib/cloudmersive-dlp-api-client/api/redact_api.rb +104 -4
  31. data/lib/cloudmersive-dlp-api-client/api/tasks_batch_job_api.rb +272 -0
  32. data/lib/cloudmersive-dlp-api-client/models/audio_timestamp.rb +226 -0
  33. data/lib/cloudmersive-dlp-api-client/models/custom_pii_field.rb +196 -0
  34. data/lib/cloudmersive-dlp-api-client/models/dlp_advanced_audio_detection_request.rb +601 -0
  35. data/lib/cloudmersive-dlp-api-client/models/dlp_advanced_audio_detection_response.rb +588 -0
  36. data/lib/cloudmersive-dlp-api-client/models/dlp_advanced_audio_redaction_request.rb +663 -0
  37. data/lib/cloudmersive-dlp-api-client/models/dlp_advanced_audio_redaction_response.rb +635 -0
  38. data/lib/cloudmersive-dlp-api-client/models/dlp_advanced_detection_request.rb +44 -4
  39. data/lib/cloudmersive-dlp-api-client/models/dlp_advanced_detection_response.rb +31 -1
  40. data/lib/cloudmersive-dlp-api-client/models/dlp_advanced_document_detection_request.rb +46 -6
  41. data/lib/cloudmersive-dlp-api-client/models/dlp_advanced_document_redaction_request.rb +58 -6
  42. data/lib/cloudmersive-dlp-api-client/models/dlp_advanced_document_redaction_response.rb +31 -1
  43. data/lib/cloudmersive-dlp-api-client/models/dlp_advanced_redaction_request.rb +57 -5
  44. data/lib/cloudmersive-dlp-api-client/models/dlp_advanced_redaction_response.rb +31 -1
  45. data/lib/cloudmersive-dlp-api-client/models/dlp_audio_detection_request.rb +441 -0
  46. data/lib/cloudmersive-dlp-api-client/models/dlp_audio_detection_response.rb +438 -0
  47. data/lib/cloudmersive-dlp-api-client/models/dlp_audio_redaction_request.rb +471 -0
  48. data/lib/cloudmersive-dlp-api-client/models/dlp_audio_redaction_response.rb +485 -0
  49. data/lib/cloudmersive-dlp-api-client/models/dlp_batch_job_result.rb +196 -0
  50. data/lib/cloudmersive-dlp-api-client/models/dlp_batch_job_status_result.rb +252 -0
  51. data/lib/cloudmersive-dlp-api-client/models/dlp_document_detection_request.rb +2 -2
  52. data/lib/cloudmersive-dlp-api-client/models/dlp_document_redaction_request.rb +2 -2
  53. data/lib/cloudmersive-dlp-api-client/models/dlp_redaction_request.rb +1 -1
  54. data/lib/cloudmersive-dlp-api-client/models/redacted_audio_segment.rb +206 -0
  55. data/lib/cloudmersive-dlp-api-client/version.rb +1 -1
  56. data/lib/cloudmersive-dlp-api-client.rb +14 -0
  57. data/spec/api/detect_api_spec.rb +26 -2
  58. data/spec/api/redact_api_spec.rb +26 -2
  59. data/spec/api/tasks_batch_job_api_spec.rb +95 -0
  60. data/spec/models/audio_timestamp_spec.rb +65 -0
  61. data/spec/models/custom_pii_field_spec.rb +47 -0
  62. data/spec/models/dlp_advanced_audio_detection_request_spec.rb +281 -0
  63. data/spec/models/dlp_advanced_audio_detection_response_spec.rb +281 -0
  64. data/spec/models/dlp_advanced_audio_redaction_request_spec.rb +317 -0
  65. data/spec/models/dlp_advanced_audio_redaction_response_spec.rb +299 -0
  66. data/spec/models/dlp_advanced_detection_request_spec.rb +24 -0
  67. data/spec/models/dlp_advanced_detection_response_spec.rb +18 -0
  68. data/spec/models/dlp_advanced_document_detection_request_spec.rb +24 -0
  69. data/spec/models/dlp_advanced_document_redaction_request_spec.rb +30 -0
  70. data/spec/models/dlp_advanced_document_redaction_response_spec.rb +18 -0
  71. data/spec/models/dlp_advanced_redaction_request_spec.rb +30 -0
  72. data/spec/models/dlp_advanced_redaction_response_spec.rb +18 -0
  73. data/spec/models/dlp_audio_detection_request_spec.rb +185 -0
  74. data/spec/models/dlp_audio_detection_response_spec.rb +191 -0
  75. data/spec/models/dlp_audio_redaction_request_spec.rb +203 -0
  76. data/spec/models/dlp_audio_redaction_response_spec.rb +209 -0
  77. data/spec/models/dlp_batch_job_result_spec.rb +47 -0
  78. data/spec/models/dlp_batch_job_status_result_spec.rb +83 -0
  79. data/spec/models/redacted_audio_segment_spec.rb +53 -0
  80. metadata +44 -2
@@ -0,0 +1,635 @@
1
+ =begin
2
+ #dlpapi
3
+
4
+ #Easily and directly scan and detect sensitive data (PII) in input text.
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.14
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module CloudmersiveDlpApiClient
16
+ # Response object for advanced DLP audio redaction with 34 PII detection results, redacted audio, redacted transcript, and optional rationale.
17
+ class DlpAdvancedAudioRedactionResponse
18
+ # The redacted audio file bytes with PII segments bleeped or muted, or the original audio if no disallowed PII was found.
19
+ attr_accessor :redacted_audio
20
+
21
+ # The redacted transcript text with PII removed or replaced.
22
+ attr_accessor :redacted_transcript
23
+
24
+ # Full original transcript of the audio file.
25
+ attr_accessor :original_transcript
26
+
27
+ # Token-level timestamps from speech recognition.
28
+ attr_accessor :timestamps
29
+
30
+ # List of audio segments that were redacted, with their time ranges.
31
+ attr_accessor :redacted_segments
32
+
33
+ # True if no disallowed PII or sensitive data types were detected; false if any disallowed type was found and redacted.
34
+ attr_accessor :clean_result
35
+
36
+ # True if the audio transcript contains email addresses.
37
+ attr_accessor :contains_email_address
38
+
39
+ # True if the audio transcript contains phone numbers.
40
+ attr_accessor :contains_phone_number
41
+
42
+ # True if the audio transcript contains street addresses.
43
+ attr_accessor :contains_street_address
44
+
45
+ # True if the audio transcript contains standalone city names (e.g. \"San Francisco\") outside of a full street address.
46
+ attr_accessor :contains_city
47
+
48
+ # True if the audio transcript contains person names.
49
+ attr_accessor :contains_person_name
50
+
51
+ # True if the audio transcript contains birth dates.
52
+ attr_accessor :contains_birth_date
53
+
54
+ # True if the audio transcript contains passport numbers.
55
+ attr_accessor :contains_passport_number
56
+
57
+ # True if the audio transcript contains drivers license numbers.
58
+ attr_accessor :contains_drivers_license
59
+
60
+ # True if the audio transcript contains social security numbers.
61
+ attr_accessor :contains_social_security_number
62
+
63
+ # True if the audio transcript contains taxpayer IDs.
64
+ attr_accessor :contains_taxpayer_id
65
+
66
+ # True if the audio transcript contains credit card numbers.
67
+ attr_accessor :contains_credit_card_number
68
+
69
+ # True if the audio transcript contains credit card expiration dates.
70
+ attr_accessor :contains_credit_card_expiration_date
71
+
72
+ # True if the audio transcript contains credit card verification codes.
73
+ attr_accessor :contains_credit_card_verification_code
74
+
75
+ # True if the audio transcript contains bank account numbers.
76
+ attr_accessor :contains_bank_account_number
77
+
78
+ # True if the audio transcript contains IBANs.
79
+ attr_accessor :contains_iban
80
+
81
+ # True if the audio transcript contains health insurance numbers.
82
+ attr_accessor :contains_health_insurance_number
83
+
84
+ # True if the audio transcript contains bearer tokens.
85
+ attr_accessor :contains_bearer_token
86
+
87
+ # True if the audio transcript contains HTTP cookies.
88
+ attr_accessor :contains_http_cookie
89
+
90
+ # True if the audio transcript contains private keys.
91
+ attr_accessor :contains_private_keys
92
+
93
+ # True if the audio transcript contains credentials (usernames/passwords).
94
+ attr_accessor :contains_credentials
95
+
96
+ # True if the audio transcript contains deep web URLs (.onion).
97
+ attr_accessor :contains_deep_web_urls
98
+
99
+ # True if the audio transcript contains source code.
100
+ attr_accessor :contains_source_code
101
+
102
+ # True if the audio transcript contains IP addresses.
103
+ attr_accessor :contains_ip_address
104
+
105
+ # True if the audio transcript contains MAC addresses.
106
+ attr_accessor :contains_mac_address
107
+
108
+ # True if the audio transcript contains health insurance member IDs.
109
+ attr_accessor :contains_health_insurance_member_id
110
+
111
+ # True if the audio transcript contains medical record numbers.
112
+ attr_accessor :contains_medical_record_number
113
+
114
+ # True if the audio transcript contains billing account numbers (provider/customer billing account IDs, distinct from bank account numbers).
115
+ attr_accessor :contains_billing_account_number
116
+
117
+ # True if the audio transcript contains references to injuries or diseases.
118
+ attr_accessor :contains_health_injury_or_disease
119
+
120
+ # True if the audio transcript contains references to types of medical treatment.
121
+ attr_accessor :contains_health_type_of_treatment
122
+
123
+ # True if the audio transcript contains dates and times of medical treatment.
124
+ attr_accessor :contains_health_date_and_time_of_treatment
125
+
126
+ # True if the audio transcript contains health plan beneficiary numbers.
127
+ attr_accessor :contains_health_plan_beneficiary_number
128
+
129
+ # True if the audio transcript contains payments made for medical treatment.
130
+ attr_accessor :contains_health_payments_made_for_treatment
131
+
132
+ # True if the audio transcript contains vehicle identifiers (e.g. license plates, VINs).
133
+ attr_accessor :contains_vehicle_id
134
+
135
+ # True if the audio transcript contains device identifiers (e.g. serial numbers, IMEIs, MAC-level device IDs).
136
+ attr_accessor :contains_device_id
137
+
138
+ # True if the audio transcript contains names of relatives.
139
+ attr_accessor :contains_names_of_relatives
140
+
141
+ # True if the audio transcript contains health universal record locators (URLs).
142
+ attr_accessor :contains_health_universal_record_locator
143
+
144
+ # True if the audio transcript contains biometric data references (e.g. fingerprints, retinal scans, voiceprints).
145
+ attr_accessor :contains_biometrics
146
+
147
+ # Rationale for why the conclusion was formed. Only populated when ProvideAnalysisRationale is set to true in the request.
148
+ attr_accessor :analysis_rationale
149
+
150
+ # Attribute mapping from ruby-style variable name to JSON key.
151
+ def self.attribute_map
152
+ {
153
+ :'redacted_audio' => :'RedactedAudio',
154
+ :'redacted_transcript' => :'RedactedTranscript',
155
+ :'original_transcript' => :'OriginalTranscript',
156
+ :'timestamps' => :'Timestamps',
157
+ :'redacted_segments' => :'RedactedSegments',
158
+ :'clean_result' => :'CleanResult',
159
+ :'contains_email_address' => :'ContainsEmailAddress',
160
+ :'contains_phone_number' => :'ContainsPhoneNumber',
161
+ :'contains_street_address' => :'ContainsStreetAddress',
162
+ :'contains_city' => :'ContainsCity',
163
+ :'contains_person_name' => :'ContainsPersonName',
164
+ :'contains_birth_date' => :'ContainsBirthDate',
165
+ :'contains_passport_number' => :'ContainsPassportNumber',
166
+ :'contains_drivers_license' => :'ContainsDriversLicense',
167
+ :'contains_social_security_number' => :'ContainsSocialSecurityNumber',
168
+ :'contains_taxpayer_id' => :'ContainsTaxpayerID',
169
+ :'contains_credit_card_number' => :'ContainsCreditCardNumber',
170
+ :'contains_credit_card_expiration_date' => :'ContainsCreditCardExpirationDate',
171
+ :'contains_credit_card_verification_code' => :'ContainsCreditCardVerificationCode',
172
+ :'contains_bank_account_number' => :'ContainsBankAccountNumber',
173
+ :'contains_iban' => :'ContainsIBAN',
174
+ :'contains_health_insurance_number' => :'ContainsHealthInsuranceNumber',
175
+ :'contains_bearer_token' => :'ContainsBearerToken',
176
+ :'contains_http_cookie' => :'ContainsHttpCookie',
177
+ :'contains_private_keys' => :'ContainsPrivateKeys',
178
+ :'contains_credentials' => :'ContainsCredentials',
179
+ :'contains_deep_web_urls' => :'ContainsDeepWebUrls',
180
+ :'contains_source_code' => :'ContainsSourceCode',
181
+ :'contains_ip_address' => :'ContainsIpAddress',
182
+ :'contains_mac_address' => :'ContainsMacAddress',
183
+ :'contains_health_insurance_member_id' => :'ContainsHealthInsuranceMemberID',
184
+ :'contains_medical_record_number' => :'ContainsMedicalRecordNumber',
185
+ :'contains_billing_account_number' => :'ContainsBillingAccountNumber',
186
+ :'contains_health_injury_or_disease' => :'ContainsHealthInjuryOrDisease',
187
+ :'contains_health_type_of_treatment' => :'ContainsHealthTypeOfTreatment',
188
+ :'contains_health_date_and_time_of_treatment' => :'ContainsHealthDateAndTimeOfTreatment',
189
+ :'contains_health_plan_beneficiary_number' => :'ContainsHealthPlanBeneficiaryNumber',
190
+ :'contains_health_payments_made_for_treatment' => :'ContainsHealthPaymentsMadeForTreatment',
191
+ :'contains_vehicle_id' => :'ContainsVehicleID',
192
+ :'contains_device_id' => :'ContainsDeviceID',
193
+ :'contains_names_of_relatives' => :'ContainsNamesOfRelatives',
194
+ :'contains_health_universal_record_locator' => :'ContainsHealthUniversalRecordLocator',
195
+ :'contains_biometrics' => :'ContainsBiometrics',
196
+ :'analysis_rationale' => :'AnalysisRationale'
197
+ }
198
+ end
199
+
200
+ # Attribute type mapping.
201
+ def self.swagger_types
202
+ {
203
+ :'redacted_audio' => :'String',
204
+ :'redacted_transcript' => :'String',
205
+ :'original_transcript' => :'String',
206
+ :'timestamps' => :'Array<AudioTimestamp>',
207
+ :'redacted_segments' => :'Array<RedactedAudioSegment>',
208
+ :'clean_result' => :'BOOLEAN',
209
+ :'contains_email_address' => :'BOOLEAN',
210
+ :'contains_phone_number' => :'BOOLEAN',
211
+ :'contains_street_address' => :'BOOLEAN',
212
+ :'contains_city' => :'BOOLEAN',
213
+ :'contains_person_name' => :'BOOLEAN',
214
+ :'contains_birth_date' => :'BOOLEAN',
215
+ :'contains_passport_number' => :'BOOLEAN',
216
+ :'contains_drivers_license' => :'BOOLEAN',
217
+ :'contains_social_security_number' => :'BOOLEAN',
218
+ :'contains_taxpayer_id' => :'BOOLEAN',
219
+ :'contains_credit_card_number' => :'BOOLEAN',
220
+ :'contains_credit_card_expiration_date' => :'BOOLEAN',
221
+ :'contains_credit_card_verification_code' => :'BOOLEAN',
222
+ :'contains_bank_account_number' => :'BOOLEAN',
223
+ :'contains_iban' => :'BOOLEAN',
224
+ :'contains_health_insurance_number' => :'BOOLEAN',
225
+ :'contains_bearer_token' => :'BOOLEAN',
226
+ :'contains_http_cookie' => :'BOOLEAN',
227
+ :'contains_private_keys' => :'BOOLEAN',
228
+ :'contains_credentials' => :'BOOLEAN',
229
+ :'contains_deep_web_urls' => :'BOOLEAN',
230
+ :'contains_source_code' => :'BOOLEAN',
231
+ :'contains_ip_address' => :'BOOLEAN',
232
+ :'contains_mac_address' => :'BOOLEAN',
233
+ :'contains_health_insurance_member_id' => :'BOOLEAN',
234
+ :'contains_medical_record_number' => :'BOOLEAN',
235
+ :'contains_billing_account_number' => :'BOOLEAN',
236
+ :'contains_health_injury_or_disease' => :'BOOLEAN',
237
+ :'contains_health_type_of_treatment' => :'BOOLEAN',
238
+ :'contains_health_date_and_time_of_treatment' => :'BOOLEAN',
239
+ :'contains_health_plan_beneficiary_number' => :'BOOLEAN',
240
+ :'contains_health_payments_made_for_treatment' => :'BOOLEAN',
241
+ :'contains_vehicle_id' => :'BOOLEAN',
242
+ :'contains_device_id' => :'BOOLEAN',
243
+ :'contains_names_of_relatives' => :'BOOLEAN',
244
+ :'contains_health_universal_record_locator' => :'BOOLEAN',
245
+ :'contains_biometrics' => :'BOOLEAN',
246
+ :'analysis_rationale' => :'String'
247
+ }
248
+ end
249
+
250
+ # Initializes the object
251
+ # @param [Hash] attributes Model attributes in the form of hash
252
+ def initialize(attributes = {})
253
+ return unless attributes.is_a?(Hash)
254
+
255
+ # convert string to symbol for hash key
256
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
257
+
258
+ if attributes.has_key?(:'RedactedAudio')
259
+ self.redacted_audio = attributes[:'RedactedAudio']
260
+ end
261
+
262
+ if attributes.has_key?(:'RedactedTranscript')
263
+ self.redacted_transcript = attributes[:'RedactedTranscript']
264
+ end
265
+
266
+ if attributes.has_key?(:'OriginalTranscript')
267
+ self.original_transcript = attributes[:'OriginalTranscript']
268
+ end
269
+
270
+ if attributes.has_key?(:'Timestamps')
271
+ if (value = attributes[:'Timestamps']).is_a?(Array)
272
+ self.timestamps = value
273
+ end
274
+ end
275
+
276
+ if attributes.has_key?(:'RedactedSegments')
277
+ if (value = attributes[:'RedactedSegments']).is_a?(Array)
278
+ self.redacted_segments = value
279
+ end
280
+ end
281
+
282
+ if attributes.has_key?(:'CleanResult')
283
+ self.clean_result = attributes[:'CleanResult']
284
+ end
285
+
286
+ if attributes.has_key?(:'ContainsEmailAddress')
287
+ self.contains_email_address = attributes[:'ContainsEmailAddress']
288
+ end
289
+
290
+ if attributes.has_key?(:'ContainsPhoneNumber')
291
+ self.contains_phone_number = attributes[:'ContainsPhoneNumber']
292
+ end
293
+
294
+ if attributes.has_key?(:'ContainsStreetAddress')
295
+ self.contains_street_address = attributes[:'ContainsStreetAddress']
296
+ end
297
+
298
+ if attributes.has_key?(:'ContainsCity')
299
+ self.contains_city = attributes[:'ContainsCity']
300
+ end
301
+
302
+ if attributes.has_key?(:'ContainsPersonName')
303
+ self.contains_person_name = attributes[:'ContainsPersonName']
304
+ end
305
+
306
+ if attributes.has_key?(:'ContainsBirthDate')
307
+ self.contains_birth_date = attributes[:'ContainsBirthDate']
308
+ end
309
+
310
+ if attributes.has_key?(:'ContainsPassportNumber')
311
+ self.contains_passport_number = attributes[:'ContainsPassportNumber']
312
+ end
313
+
314
+ if attributes.has_key?(:'ContainsDriversLicense')
315
+ self.contains_drivers_license = attributes[:'ContainsDriversLicense']
316
+ end
317
+
318
+ if attributes.has_key?(:'ContainsSocialSecurityNumber')
319
+ self.contains_social_security_number = attributes[:'ContainsSocialSecurityNumber']
320
+ end
321
+
322
+ if attributes.has_key?(:'ContainsTaxpayerID')
323
+ self.contains_taxpayer_id = attributes[:'ContainsTaxpayerID']
324
+ end
325
+
326
+ if attributes.has_key?(:'ContainsCreditCardNumber')
327
+ self.contains_credit_card_number = attributes[:'ContainsCreditCardNumber']
328
+ end
329
+
330
+ if attributes.has_key?(:'ContainsCreditCardExpirationDate')
331
+ self.contains_credit_card_expiration_date = attributes[:'ContainsCreditCardExpirationDate']
332
+ end
333
+
334
+ if attributes.has_key?(:'ContainsCreditCardVerificationCode')
335
+ self.contains_credit_card_verification_code = attributes[:'ContainsCreditCardVerificationCode']
336
+ end
337
+
338
+ if attributes.has_key?(:'ContainsBankAccountNumber')
339
+ self.contains_bank_account_number = attributes[:'ContainsBankAccountNumber']
340
+ end
341
+
342
+ if attributes.has_key?(:'ContainsIBAN')
343
+ self.contains_iban = attributes[:'ContainsIBAN']
344
+ end
345
+
346
+ if attributes.has_key?(:'ContainsHealthInsuranceNumber')
347
+ self.contains_health_insurance_number = attributes[:'ContainsHealthInsuranceNumber']
348
+ end
349
+
350
+ if attributes.has_key?(:'ContainsBearerToken')
351
+ self.contains_bearer_token = attributes[:'ContainsBearerToken']
352
+ end
353
+
354
+ if attributes.has_key?(:'ContainsHttpCookie')
355
+ self.contains_http_cookie = attributes[:'ContainsHttpCookie']
356
+ end
357
+
358
+ if attributes.has_key?(:'ContainsPrivateKeys')
359
+ self.contains_private_keys = attributes[:'ContainsPrivateKeys']
360
+ end
361
+
362
+ if attributes.has_key?(:'ContainsCredentials')
363
+ self.contains_credentials = attributes[:'ContainsCredentials']
364
+ end
365
+
366
+ if attributes.has_key?(:'ContainsDeepWebUrls')
367
+ self.contains_deep_web_urls = attributes[:'ContainsDeepWebUrls']
368
+ end
369
+
370
+ if attributes.has_key?(:'ContainsSourceCode')
371
+ self.contains_source_code = attributes[:'ContainsSourceCode']
372
+ end
373
+
374
+ if attributes.has_key?(:'ContainsIpAddress')
375
+ self.contains_ip_address = attributes[:'ContainsIpAddress']
376
+ end
377
+
378
+ if attributes.has_key?(:'ContainsMacAddress')
379
+ self.contains_mac_address = attributes[:'ContainsMacAddress']
380
+ end
381
+
382
+ if attributes.has_key?(:'ContainsHealthInsuranceMemberID')
383
+ self.contains_health_insurance_member_id = attributes[:'ContainsHealthInsuranceMemberID']
384
+ end
385
+
386
+ if attributes.has_key?(:'ContainsMedicalRecordNumber')
387
+ self.contains_medical_record_number = attributes[:'ContainsMedicalRecordNumber']
388
+ end
389
+
390
+ if attributes.has_key?(:'ContainsBillingAccountNumber')
391
+ self.contains_billing_account_number = attributes[:'ContainsBillingAccountNumber']
392
+ end
393
+
394
+ if attributes.has_key?(:'ContainsHealthInjuryOrDisease')
395
+ self.contains_health_injury_or_disease = attributes[:'ContainsHealthInjuryOrDisease']
396
+ end
397
+
398
+ if attributes.has_key?(:'ContainsHealthTypeOfTreatment')
399
+ self.contains_health_type_of_treatment = attributes[:'ContainsHealthTypeOfTreatment']
400
+ end
401
+
402
+ if attributes.has_key?(:'ContainsHealthDateAndTimeOfTreatment')
403
+ self.contains_health_date_and_time_of_treatment = attributes[:'ContainsHealthDateAndTimeOfTreatment']
404
+ end
405
+
406
+ if attributes.has_key?(:'ContainsHealthPlanBeneficiaryNumber')
407
+ self.contains_health_plan_beneficiary_number = attributes[:'ContainsHealthPlanBeneficiaryNumber']
408
+ end
409
+
410
+ if attributes.has_key?(:'ContainsHealthPaymentsMadeForTreatment')
411
+ self.contains_health_payments_made_for_treatment = attributes[:'ContainsHealthPaymentsMadeForTreatment']
412
+ end
413
+
414
+ if attributes.has_key?(:'ContainsVehicleID')
415
+ self.contains_vehicle_id = attributes[:'ContainsVehicleID']
416
+ end
417
+
418
+ if attributes.has_key?(:'ContainsDeviceID')
419
+ self.contains_device_id = attributes[:'ContainsDeviceID']
420
+ end
421
+
422
+ if attributes.has_key?(:'ContainsNamesOfRelatives')
423
+ self.contains_names_of_relatives = attributes[:'ContainsNamesOfRelatives']
424
+ end
425
+
426
+ if attributes.has_key?(:'ContainsHealthUniversalRecordLocator')
427
+ self.contains_health_universal_record_locator = attributes[:'ContainsHealthUniversalRecordLocator']
428
+ end
429
+
430
+ if attributes.has_key?(:'ContainsBiometrics')
431
+ self.contains_biometrics = attributes[:'ContainsBiometrics']
432
+ end
433
+
434
+ if attributes.has_key?(:'AnalysisRationale')
435
+ self.analysis_rationale = attributes[:'AnalysisRationale']
436
+ end
437
+ end
438
+
439
+ # Show invalid properties with the reasons. Usually used together with valid?
440
+ # @return Array for valid properties with the reasons
441
+ def list_invalid_properties
442
+ invalid_properties = Array.new
443
+ if !@redacted_audio.nil? && @redacted_audio !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
444
+ invalid_properties.push('invalid value for "redacted_audio", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.')
445
+ end
446
+
447
+ invalid_properties
448
+ end
449
+
450
+ # Check to see if the all the properties in the model are valid
451
+ # @return true if the model is valid
452
+ def valid?
453
+ return false if !@redacted_audio.nil? && @redacted_audio !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
454
+ true
455
+ end
456
+
457
+ # Custom attribute writer method with validation
458
+ # @param [Object] redacted_audio Value to be assigned
459
+ def redacted_audio=(redacted_audio)
460
+ if !redacted_audio.nil? && redacted_audio !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
461
+ fail ArgumentError, 'invalid value for "redacted_audio", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.'
462
+ end
463
+
464
+ @redacted_audio = redacted_audio
465
+ end
466
+
467
+ # Checks equality by comparing each attribute.
468
+ # @param [Object] Object to be compared
469
+ def ==(o)
470
+ return true if self.equal?(o)
471
+ self.class == o.class &&
472
+ redacted_audio == o.redacted_audio &&
473
+ redacted_transcript == o.redacted_transcript &&
474
+ original_transcript == o.original_transcript &&
475
+ timestamps == o.timestamps &&
476
+ redacted_segments == o.redacted_segments &&
477
+ clean_result == o.clean_result &&
478
+ contains_email_address == o.contains_email_address &&
479
+ contains_phone_number == o.contains_phone_number &&
480
+ contains_street_address == o.contains_street_address &&
481
+ contains_city == o.contains_city &&
482
+ contains_person_name == o.contains_person_name &&
483
+ contains_birth_date == o.contains_birth_date &&
484
+ contains_passport_number == o.contains_passport_number &&
485
+ contains_drivers_license == o.contains_drivers_license &&
486
+ contains_social_security_number == o.contains_social_security_number &&
487
+ contains_taxpayer_id == o.contains_taxpayer_id &&
488
+ contains_credit_card_number == o.contains_credit_card_number &&
489
+ contains_credit_card_expiration_date == o.contains_credit_card_expiration_date &&
490
+ contains_credit_card_verification_code == o.contains_credit_card_verification_code &&
491
+ contains_bank_account_number == o.contains_bank_account_number &&
492
+ contains_iban == o.contains_iban &&
493
+ contains_health_insurance_number == o.contains_health_insurance_number &&
494
+ contains_bearer_token == o.contains_bearer_token &&
495
+ contains_http_cookie == o.contains_http_cookie &&
496
+ contains_private_keys == o.contains_private_keys &&
497
+ contains_credentials == o.contains_credentials &&
498
+ contains_deep_web_urls == o.contains_deep_web_urls &&
499
+ contains_source_code == o.contains_source_code &&
500
+ contains_ip_address == o.contains_ip_address &&
501
+ contains_mac_address == o.contains_mac_address &&
502
+ contains_health_insurance_member_id == o.contains_health_insurance_member_id &&
503
+ contains_medical_record_number == o.contains_medical_record_number &&
504
+ contains_billing_account_number == o.contains_billing_account_number &&
505
+ contains_health_injury_or_disease == o.contains_health_injury_or_disease &&
506
+ contains_health_type_of_treatment == o.contains_health_type_of_treatment &&
507
+ contains_health_date_and_time_of_treatment == o.contains_health_date_and_time_of_treatment &&
508
+ contains_health_plan_beneficiary_number == o.contains_health_plan_beneficiary_number &&
509
+ contains_health_payments_made_for_treatment == o.contains_health_payments_made_for_treatment &&
510
+ contains_vehicle_id == o.contains_vehicle_id &&
511
+ contains_device_id == o.contains_device_id &&
512
+ contains_names_of_relatives == o.contains_names_of_relatives &&
513
+ contains_health_universal_record_locator == o.contains_health_universal_record_locator &&
514
+ contains_biometrics == o.contains_biometrics &&
515
+ analysis_rationale == o.analysis_rationale
516
+ end
517
+
518
+ # @see the `==` method
519
+ # @param [Object] Object to be compared
520
+ def eql?(o)
521
+ self == o
522
+ end
523
+
524
+ # Calculates hash code according to all attributes.
525
+ # @return [Fixnum] Hash code
526
+ def hash
527
+ [redacted_audio, redacted_transcript, original_transcript, timestamps, redacted_segments, clean_result, contains_email_address, contains_phone_number, contains_street_address, contains_city, contains_person_name, contains_birth_date, contains_passport_number, contains_drivers_license, contains_social_security_number, contains_taxpayer_id, contains_credit_card_number, contains_credit_card_expiration_date, contains_credit_card_verification_code, contains_bank_account_number, contains_iban, contains_health_insurance_number, contains_bearer_token, contains_http_cookie, contains_private_keys, contains_credentials, contains_deep_web_urls, contains_source_code, contains_ip_address, contains_mac_address, contains_health_insurance_member_id, contains_medical_record_number, contains_billing_account_number, contains_health_injury_or_disease, contains_health_type_of_treatment, contains_health_date_and_time_of_treatment, contains_health_plan_beneficiary_number, contains_health_payments_made_for_treatment, contains_vehicle_id, contains_device_id, contains_names_of_relatives, contains_health_universal_record_locator, contains_biometrics, analysis_rationale].hash
528
+ end
529
+
530
+ # Builds the object from hash
531
+ # @param [Hash] attributes Model attributes in the form of hash
532
+ # @return [Object] Returns the model itself
533
+ def build_from_hash(attributes)
534
+ return nil unless attributes.is_a?(Hash)
535
+ self.class.swagger_types.each_pair do |key, type|
536
+ if type =~ /\AArray<(.*)>/i
537
+ # check to ensure the input is an array given that the attribute
538
+ # is documented as an array but the input is not
539
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
540
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
541
+ end
542
+ elsif !attributes[self.class.attribute_map[key]].nil?
543
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
544
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
545
+ end
546
+
547
+ self
548
+ end
549
+
550
+ # Deserializes the data based on type
551
+ # @param string type Data type
552
+ # @param string value Value to be deserialized
553
+ # @return [Object] Deserialized data
554
+ def _deserialize(type, value)
555
+ case type.to_sym
556
+ when :DateTime
557
+ DateTime.parse(value)
558
+ when :Date
559
+ Date.parse(value)
560
+ when :String
561
+ value.to_s
562
+ when :Integer
563
+ value.to_i
564
+ when :Float
565
+ value.to_f
566
+ when :BOOLEAN
567
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
568
+ true
569
+ else
570
+ false
571
+ end
572
+ when :Object
573
+ # generic object (usually a Hash), return directly
574
+ value
575
+ when /\AArray<(?<inner_type>.+)>\z/
576
+ inner_type = Regexp.last_match[:inner_type]
577
+ value.map { |v| _deserialize(inner_type, v) }
578
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
579
+ k_type = Regexp.last_match[:k_type]
580
+ v_type = Regexp.last_match[:v_type]
581
+ {}.tap do |hash|
582
+ value.each do |k, v|
583
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
584
+ end
585
+ end
586
+ else # model
587
+ temp_model = CloudmersiveDlpApiClient.const_get(type).new
588
+ temp_model.build_from_hash(value)
589
+ end
590
+ end
591
+
592
+ # Returns the string representation of the object
593
+ # @return [String] String presentation of the object
594
+ def to_s
595
+ to_hash.to_s
596
+ end
597
+
598
+ # to_body is an alias to to_hash (backward compatibility)
599
+ # @return [Hash] Returns the object in the form of hash
600
+ def to_body
601
+ to_hash
602
+ end
603
+
604
+ # Returns the object in the form of hash
605
+ # @return [Hash] Returns the object in the form of hash
606
+ def to_hash
607
+ hash = {}
608
+ self.class.attribute_map.each_pair do |attr, param|
609
+ value = self.send(attr)
610
+ next if value.nil?
611
+ hash[param] = _to_hash(value)
612
+ end
613
+ hash
614
+ end
615
+
616
+ # Outputs non-array value in the form of hash
617
+ # For object, use to_hash. Otherwise, just return the value
618
+ # @param [Object] value Any valid value
619
+ # @return [Hash] Returns the value in the form of hash
620
+ def _to_hash(value)
621
+ if value.is_a?(Array)
622
+ value.compact.map { |v| _to_hash(v) }
623
+ elsif value.is_a?(Hash)
624
+ {}.tap do |hash|
625
+ value.each { |k, v| hash[k] = _to_hash(v) }
626
+ end
627
+ elsif value.respond_to? :to_hash
628
+ value.to_hash
629
+ else
630
+ value
631
+ end
632
+ end
633
+
634
+ end
635
+ end