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,601 @@
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
+ # Request object for advanced DLP audio detection with 29 PII detection types including health-related data.
17
+ class DlpAdvancedAudioDetectionRequest
18
+ # Audio file bytes (WAV, MP3, M4A, FLAC, OGG, or WMA) to transcribe and scan for PII and sensitive data.
19
+ attr_accessor :input_file
20
+
21
+ # Language code for speech recognition. Default is \"ENG\" (English).
22
+ attr_accessor :language_code
23
+
24
+ # Set to true to allow email addresses in the audio transcript and not flag them as PII.
25
+ attr_accessor :allow_email_address
26
+
27
+ # Set to true to allow phone numbers in the audio transcript and not flag them as PII.
28
+ attr_accessor :allow_phone_number
29
+
30
+ # Set to true to allow street addresses in the audio transcript and not flag them as PII.
31
+ attr_accessor :allow_street_address
32
+
33
+ # Set to true to allow standalone city names (e.g. \"San Francisco\") in the audio transcript and not flag them as PII. Applies to city names mentioned outside of a full street address.
34
+ attr_accessor :allow_city
35
+
36
+ # Set to true to allow person names in the audio transcript and not flag them as PII.
37
+ attr_accessor :allow_person_name
38
+
39
+ # Set to true to allow birth dates in the audio transcript and not flag them as PII.
40
+ attr_accessor :allow_birth_date
41
+
42
+ # Set to true to allow passport numbers in the audio transcript and not flag them as PII.
43
+ attr_accessor :allow_passport_number
44
+
45
+ # Set to true to allow drivers license numbers in the audio transcript and not flag them as PII.
46
+ attr_accessor :allow_drivers_license
47
+
48
+ # Set to true to allow social security numbers in the audio transcript and not flag them as PII.
49
+ attr_accessor :allow_social_security_number
50
+
51
+ # Set to true to allow taxpayer IDs in the audio transcript and not flag them as PII.
52
+ attr_accessor :allow_taxpayer_id
53
+
54
+ # Set to true to allow credit card numbers in the audio transcript and not flag them as PII.
55
+ attr_accessor :allow_credit_card_number
56
+
57
+ # Set to true to allow credit card expiration dates in the audio transcript and not flag them as PII.
58
+ attr_accessor :allow_credit_card_expiration_date
59
+
60
+ # Set to true to allow credit card verification codes in the audio transcript and not flag them as PII.
61
+ attr_accessor :allow_credit_card_verification_code
62
+
63
+ # Set to true to allow bank account numbers in the audio transcript and not flag them as PII.
64
+ attr_accessor :allow_bank_account_number
65
+
66
+ # Set to true to allow IBANs in the audio transcript and not flag them as PII.
67
+ attr_accessor :allow_iban
68
+
69
+ # Set to true to allow health insurance numbers in the audio transcript and not flag them as PII.
70
+ attr_accessor :allow_health_insurance_number
71
+
72
+ # Set to true to allow bearer tokens in the audio transcript and not flag them as PII.
73
+ attr_accessor :allow_bearer_token
74
+
75
+ # Set to true to allow HTTP cookies in the audio transcript and not flag them as PII.
76
+ attr_accessor :allow_http_cookie
77
+
78
+ # Set to true to allow private keys in the audio transcript and not flag them as PII.
79
+ attr_accessor :allow_private_keys
80
+
81
+ # Set to true to allow credentials (usernames/passwords) in the audio transcript and not flag them as PII.
82
+ attr_accessor :allow_credentials
83
+
84
+ # Set to true to allow deep web URLs (.onion) in the audio transcript and not flag them as PII.
85
+ attr_accessor :allow_deep_web_urls
86
+
87
+ # Set to true to allow source code in the audio transcript and not flag it as sensitive data.
88
+ attr_accessor :allow_source_code
89
+
90
+ # Set to true to allow IP addresses in the audio transcript and not flag them as PII.
91
+ attr_accessor :allow_ip_address
92
+
93
+ # Set to true to allow MAC addresses in the audio transcript and not flag them as PII.
94
+ attr_accessor :allow_mac_address
95
+
96
+ # Set to true to allow health insurance member IDs in the audio transcript and not flag them as PHI.
97
+ attr_accessor :allow_health_insurance_member_id
98
+
99
+ # Set to true to allow medical record numbers in the audio transcript and not flag them as PHI.
100
+ attr_accessor :allow_medical_record_number
101
+
102
+ # Set to true to allow billing account numbers (e.g. provider/customer billing account IDs, distinct from bank account numbers) in the audio transcript and not flag them as PII.
103
+ attr_accessor :allow_billing_account_number
104
+
105
+ # Set to true to allow references to injuries or diseases in the audio transcript and not flag them as PHI.
106
+ attr_accessor :allow_health_injury_or_disease
107
+
108
+ # Set to true to allow references to types of medical treatment in the audio transcript and not flag them as PHI.
109
+ attr_accessor :allow_health_type_of_treatment
110
+
111
+ # Set to true to allow dates and times of medical treatment in the audio transcript and not flag them as PHI.
112
+ attr_accessor :allow_health_date_and_time_of_treatment
113
+
114
+ # Set to true to allow health plan beneficiary numbers in the audio transcript and not flag them as PHI.
115
+ attr_accessor :allow_health_plan_beneficiary_number
116
+
117
+ # Set to true to allow payments made for medical treatment in the audio transcript and not flag them as PHI.
118
+ attr_accessor :allow_health_payments_made_for_treatment
119
+
120
+ # Set to true to allow vehicle identifiers (e.g. license plates, VINs) in the audio transcript and not flag them as PII.
121
+ attr_accessor :allow_vehicle_id
122
+
123
+ # Set to true to allow device identifiers (e.g. serial numbers, IMEIs, MAC-level device IDs) in the audio transcript and not flag them as PII.
124
+ attr_accessor :allow_device_id
125
+
126
+ # Set to true to allow names of relatives in the audio transcript and not flag them as PII.
127
+ attr_accessor :allow_names_of_relatives
128
+
129
+ # Set to true to allow health universal record locators (URLs) in the audio transcript and not flag them as PHI.
130
+ attr_accessor :allow_health_universal_record_locator
131
+
132
+ # Set to true to allow biometric data references (e.g. fingerprints, retinal scans, voiceprints) in the audio transcript and not flag them as PII.
133
+ attr_accessor :allow_biometrics
134
+
135
+ # Set to true to include a natural language rationale explaining why each detection conclusion was formed.
136
+ attr_accessor :provide_analysis_rationale
137
+
138
+ # Apply a Custom Policy for DLP Enforcement by providing the ID; to create a Custom Policy, navigate to the Cloudmersive Management Portal and select Custom Policies. Requires Managed Instance or Private Cloud
139
+ attr_accessor :custom_policy_id
140
+
141
+ # Attribute mapping from ruby-style variable name to JSON key.
142
+ def self.attribute_map
143
+ {
144
+ :'input_file' => :'InputFile',
145
+ :'language_code' => :'LanguageCode',
146
+ :'allow_email_address' => :'AllowEmailAddress',
147
+ :'allow_phone_number' => :'AllowPhoneNumber',
148
+ :'allow_street_address' => :'AllowStreetAddress',
149
+ :'allow_city' => :'AllowCity',
150
+ :'allow_person_name' => :'AllowPersonName',
151
+ :'allow_birth_date' => :'AllowBirthDate',
152
+ :'allow_passport_number' => :'AllowPassportNumber',
153
+ :'allow_drivers_license' => :'AllowDriversLicense',
154
+ :'allow_social_security_number' => :'AllowSocialSecurityNumber',
155
+ :'allow_taxpayer_id' => :'AllowTaxpayerID',
156
+ :'allow_credit_card_number' => :'AllowCreditCardNumber',
157
+ :'allow_credit_card_expiration_date' => :'AllowCreditCardExpirationDate',
158
+ :'allow_credit_card_verification_code' => :'AllowCreditCardVerificationCode',
159
+ :'allow_bank_account_number' => :'AllowBankAccountNumber',
160
+ :'allow_iban' => :'AllowIBAN',
161
+ :'allow_health_insurance_number' => :'AllowHealthInsuranceNumber',
162
+ :'allow_bearer_token' => :'AllowBearerToken',
163
+ :'allow_http_cookie' => :'AllowHttpCookie',
164
+ :'allow_private_keys' => :'AllowPrivateKeys',
165
+ :'allow_credentials' => :'AllowCredentials',
166
+ :'allow_deep_web_urls' => :'AllowDeepWebUrls',
167
+ :'allow_source_code' => :'AllowSourceCode',
168
+ :'allow_ip_address' => :'AllowIpAddress',
169
+ :'allow_mac_address' => :'AllowMacAddress',
170
+ :'allow_health_insurance_member_id' => :'AllowHealthInsuranceMemberID',
171
+ :'allow_medical_record_number' => :'AllowMedicalRecordNumber',
172
+ :'allow_billing_account_number' => :'AllowBillingAccountNumber',
173
+ :'allow_health_injury_or_disease' => :'AllowHealthInjuryOrDisease',
174
+ :'allow_health_type_of_treatment' => :'AllowHealthTypeOfTreatment',
175
+ :'allow_health_date_and_time_of_treatment' => :'AllowHealthDateAndTimeOfTreatment',
176
+ :'allow_health_plan_beneficiary_number' => :'AllowHealthPlanBeneficiaryNumber',
177
+ :'allow_health_payments_made_for_treatment' => :'AllowHealthPaymentsMadeForTreatment',
178
+ :'allow_vehicle_id' => :'AllowVehicleID',
179
+ :'allow_device_id' => :'AllowDeviceID',
180
+ :'allow_names_of_relatives' => :'AllowNamesOfRelatives',
181
+ :'allow_health_universal_record_locator' => :'AllowHealthUniversalRecordLocator',
182
+ :'allow_biometrics' => :'AllowBiometrics',
183
+ :'provide_analysis_rationale' => :'ProvideAnalysisRationale',
184
+ :'custom_policy_id' => :'CustomPolicyID'
185
+ }
186
+ end
187
+
188
+ # Attribute type mapping.
189
+ def self.swagger_types
190
+ {
191
+ :'input_file' => :'String',
192
+ :'language_code' => :'String',
193
+ :'allow_email_address' => :'BOOLEAN',
194
+ :'allow_phone_number' => :'BOOLEAN',
195
+ :'allow_street_address' => :'BOOLEAN',
196
+ :'allow_city' => :'BOOLEAN',
197
+ :'allow_person_name' => :'BOOLEAN',
198
+ :'allow_birth_date' => :'BOOLEAN',
199
+ :'allow_passport_number' => :'BOOLEAN',
200
+ :'allow_drivers_license' => :'BOOLEAN',
201
+ :'allow_social_security_number' => :'BOOLEAN',
202
+ :'allow_taxpayer_id' => :'BOOLEAN',
203
+ :'allow_credit_card_number' => :'BOOLEAN',
204
+ :'allow_credit_card_expiration_date' => :'BOOLEAN',
205
+ :'allow_credit_card_verification_code' => :'BOOLEAN',
206
+ :'allow_bank_account_number' => :'BOOLEAN',
207
+ :'allow_iban' => :'BOOLEAN',
208
+ :'allow_health_insurance_number' => :'BOOLEAN',
209
+ :'allow_bearer_token' => :'BOOLEAN',
210
+ :'allow_http_cookie' => :'BOOLEAN',
211
+ :'allow_private_keys' => :'BOOLEAN',
212
+ :'allow_credentials' => :'BOOLEAN',
213
+ :'allow_deep_web_urls' => :'BOOLEAN',
214
+ :'allow_source_code' => :'BOOLEAN',
215
+ :'allow_ip_address' => :'BOOLEAN',
216
+ :'allow_mac_address' => :'BOOLEAN',
217
+ :'allow_health_insurance_member_id' => :'BOOLEAN',
218
+ :'allow_medical_record_number' => :'BOOLEAN',
219
+ :'allow_billing_account_number' => :'BOOLEAN',
220
+ :'allow_health_injury_or_disease' => :'BOOLEAN',
221
+ :'allow_health_type_of_treatment' => :'BOOLEAN',
222
+ :'allow_health_date_and_time_of_treatment' => :'BOOLEAN',
223
+ :'allow_health_plan_beneficiary_number' => :'BOOLEAN',
224
+ :'allow_health_payments_made_for_treatment' => :'BOOLEAN',
225
+ :'allow_vehicle_id' => :'BOOLEAN',
226
+ :'allow_device_id' => :'BOOLEAN',
227
+ :'allow_names_of_relatives' => :'BOOLEAN',
228
+ :'allow_health_universal_record_locator' => :'BOOLEAN',
229
+ :'allow_biometrics' => :'BOOLEAN',
230
+ :'provide_analysis_rationale' => :'BOOLEAN',
231
+ :'custom_policy_id' => :'String'
232
+ }
233
+ end
234
+
235
+ # Initializes the object
236
+ # @param [Hash] attributes Model attributes in the form of hash
237
+ def initialize(attributes = {})
238
+ return unless attributes.is_a?(Hash)
239
+
240
+ # convert string to symbol for hash key
241
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
242
+
243
+ if attributes.has_key?(:'InputFile')
244
+ self.input_file = attributes[:'InputFile']
245
+ end
246
+
247
+ if attributes.has_key?(:'LanguageCode')
248
+ self.language_code = attributes[:'LanguageCode']
249
+ end
250
+
251
+ if attributes.has_key?(:'AllowEmailAddress')
252
+ self.allow_email_address = attributes[:'AllowEmailAddress']
253
+ end
254
+
255
+ if attributes.has_key?(:'AllowPhoneNumber')
256
+ self.allow_phone_number = attributes[:'AllowPhoneNumber']
257
+ end
258
+
259
+ if attributes.has_key?(:'AllowStreetAddress')
260
+ self.allow_street_address = attributes[:'AllowStreetAddress']
261
+ end
262
+
263
+ if attributes.has_key?(:'AllowCity')
264
+ self.allow_city = attributes[:'AllowCity']
265
+ end
266
+
267
+ if attributes.has_key?(:'AllowPersonName')
268
+ self.allow_person_name = attributes[:'AllowPersonName']
269
+ end
270
+
271
+ if attributes.has_key?(:'AllowBirthDate')
272
+ self.allow_birth_date = attributes[:'AllowBirthDate']
273
+ end
274
+
275
+ if attributes.has_key?(:'AllowPassportNumber')
276
+ self.allow_passport_number = attributes[:'AllowPassportNumber']
277
+ end
278
+
279
+ if attributes.has_key?(:'AllowDriversLicense')
280
+ self.allow_drivers_license = attributes[:'AllowDriversLicense']
281
+ end
282
+
283
+ if attributes.has_key?(:'AllowSocialSecurityNumber')
284
+ self.allow_social_security_number = attributes[:'AllowSocialSecurityNumber']
285
+ end
286
+
287
+ if attributes.has_key?(:'AllowTaxpayerID')
288
+ self.allow_taxpayer_id = attributes[:'AllowTaxpayerID']
289
+ end
290
+
291
+ if attributes.has_key?(:'AllowCreditCardNumber')
292
+ self.allow_credit_card_number = attributes[:'AllowCreditCardNumber']
293
+ end
294
+
295
+ if attributes.has_key?(:'AllowCreditCardExpirationDate')
296
+ self.allow_credit_card_expiration_date = attributes[:'AllowCreditCardExpirationDate']
297
+ end
298
+
299
+ if attributes.has_key?(:'AllowCreditCardVerificationCode')
300
+ self.allow_credit_card_verification_code = attributes[:'AllowCreditCardVerificationCode']
301
+ end
302
+
303
+ if attributes.has_key?(:'AllowBankAccountNumber')
304
+ self.allow_bank_account_number = attributes[:'AllowBankAccountNumber']
305
+ end
306
+
307
+ if attributes.has_key?(:'AllowIBAN')
308
+ self.allow_iban = attributes[:'AllowIBAN']
309
+ end
310
+
311
+ if attributes.has_key?(:'AllowHealthInsuranceNumber')
312
+ self.allow_health_insurance_number = attributes[:'AllowHealthInsuranceNumber']
313
+ end
314
+
315
+ if attributes.has_key?(:'AllowBearerToken')
316
+ self.allow_bearer_token = attributes[:'AllowBearerToken']
317
+ end
318
+
319
+ if attributes.has_key?(:'AllowHttpCookie')
320
+ self.allow_http_cookie = attributes[:'AllowHttpCookie']
321
+ end
322
+
323
+ if attributes.has_key?(:'AllowPrivateKeys')
324
+ self.allow_private_keys = attributes[:'AllowPrivateKeys']
325
+ end
326
+
327
+ if attributes.has_key?(:'AllowCredentials')
328
+ self.allow_credentials = attributes[:'AllowCredentials']
329
+ end
330
+
331
+ if attributes.has_key?(:'AllowDeepWebUrls')
332
+ self.allow_deep_web_urls = attributes[:'AllowDeepWebUrls']
333
+ end
334
+
335
+ if attributes.has_key?(:'AllowSourceCode')
336
+ self.allow_source_code = attributes[:'AllowSourceCode']
337
+ end
338
+
339
+ if attributes.has_key?(:'AllowIpAddress')
340
+ self.allow_ip_address = attributes[:'AllowIpAddress']
341
+ end
342
+
343
+ if attributes.has_key?(:'AllowMacAddress')
344
+ self.allow_mac_address = attributes[:'AllowMacAddress']
345
+ end
346
+
347
+ if attributes.has_key?(:'AllowHealthInsuranceMemberID')
348
+ self.allow_health_insurance_member_id = attributes[:'AllowHealthInsuranceMemberID']
349
+ end
350
+
351
+ if attributes.has_key?(:'AllowMedicalRecordNumber')
352
+ self.allow_medical_record_number = attributes[:'AllowMedicalRecordNumber']
353
+ end
354
+
355
+ if attributes.has_key?(:'AllowBillingAccountNumber')
356
+ self.allow_billing_account_number = attributes[:'AllowBillingAccountNumber']
357
+ end
358
+
359
+ if attributes.has_key?(:'AllowHealthInjuryOrDisease')
360
+ self.allow_health_injury_or_disease = attributes[:'AllowHealthInjuryOrDisease']
361
+ end
362
+
363
+ if attributes.has_key?(:'AllowHealthTypeOfTreatment')
364
+ self.allow_health_type_of_treatment = attributes[:'AllowHealthTypeOfTreatment']
365
+ end
366
+
367
+ if attributes.has_key?(:'AllowHealthDateAndTimeOfTreatment')
368
+ self.allow_health_date_and_time_of_treatment = attributes[:'AllowHealthDateAndTimeOfTreatment']
369
+ end
370
+
371
+ if attributes.has_key?(:'AllowHealthPlanBeneficiaryNumber')
372
+ self.allow_health_plan_beneficiary_number = attributes[:'AllowHealthPlanBeneficiaryNumber']
373
+ end
374
+
375
+ if attributes.has_key?(:'AllowHealthPaymentsMadeForTreatment')
376
+ self.allow_health_payments_made_for_treatment = attributes[:'AllowHealthPaymentsMadeForTreatment']
377
+ end
378
+
379
+ if attributes.has_key?(:'AllowVehicleID')
380
+ self.allow_vehicle_id = attributes[:'AllowVehicleID']
381
+ end
382
+
383
+ if attributes.has_key?(:'AllowDeviceID')
384
+ self.allow_device_id = attributes[:'AllowDeviceID']
385
+ end
386
+
387
+ if attributes.has_key?(:'AllowNamesOfRelatives')
388
+ self.allow_names_of_relatives = attributes[:'AllowNamesOfRelatives']
389
+ end
390
+
391
+ if attributes.has_key?(:'AllowHealthUniversalRecordLocator')
392
+ self.allow_health_universal_record_locator = attributes[:'AllowHealthUniversalRecordLocator']
393
+ end
394
+
395
+ if attributes.has_key?(:'AllowBiometrics')
396
+ self.allow_biometrics = attributes[:'AllowBiometrics']
397
+ end
398
+
399
+ if attributes.has_key?(:'ProvideAnalysisRationale')
400
+ self.provide_analysis_rationale = attributes[:'ProvideAnalysisRationale']
401
+ end
402
+
403
+ if attributes.has_key?(:'CustomPolicyID')
404
+ self.custom_policy_id = attributes[:'CustomPolicyID']
405
+ end
406
+ end
407
+
408
+ # Show invalid properties with the reasons. Usually used together with valid?
409
+ # @return Array for valid properties with the reasons
410
+ def list_invalid_properties
411
+ invalid_properties = Array.new
412
+ if !@input_file.nil? && @input_file !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
413
+ invalid_properties.push('invalid value for "input_file", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.')
414
+ end
415
+
416
+ invalid_properties
417
+ end
418
+
419
+ # Check to see if the all the properties in the model are valid
420
+ # @return true if the model is valid
421
+ def valid?
422
+ return false if !@input_file.nil? && @input_file !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
423
+ true
424
+ end
425
+
426
+ # Custom attribute writer method with validation
427
+ # @param [Object] input_file Value to be assigned
428
+ def input_file=(input_file)
429
+ if !input_file.nil? && input_file !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
430
+ fail ArgumentError, 'invalid value for "input_file", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.'
431
+ end
432
+
433
+ @input_file = input_file
434
+ end
435
+
436
+ # Checks equality by comparing each attribute.
437
+ # @param [Object] Object to be compared
438
+ def ==(o)
439
+ return true if self.equal?(o)
440
+ self.class == o.class &&
441
+ input_file == o.input_file &&
442
+ language_code == o.language_code &&
443
+ allow_email_address == o.allow_email_address &&
444
+ allow_phone_number == o.allow_phone_number &&
445
+ allow_street_address == o.allow_street_address &&
446
+ allow_city == o.allow_city &&
447
+ allow_person_name == o.allow_person_name &&
448
+ allow_birth_date == o.allow_birth_date &&
449
+ allow_passport_number == o.allow_passport_number &&
450
+ allow_drivers_license == o.allow_drivers_license &&
451
+ allow_social_security_number == o.allow_social_security_number &&
452
+ allow_taxpayer_id == o.allow_taxpayer_id &&
453
+ allow_credit_card_number == o.allow_credit_card_number &&
454
+ allow_credit_card_expiration_date == o.allow_credit_card_expiration_date &&
455
+ allow_credit_card_verification_code == o.allow_credit_card_verification_code &&
456
+ allow_bank_account_number == o.allow_bank_account_number &&
457
+ allow_iban == o.allow_iban &&
458
+ allow_health_insurance_number == o.allow_health_insurance_number &&
459
+ allow_bearer_token == o.allow_bearer_token &&
460
+ allow_http_cookie == o.allow_http_cookie &&
461
+ allow_private_keys == o.allow_private_keys &&
462
+ allow_credentials == o.allow_credentials &&
463
+ allow_deep_web_urls == o.allow_deep_web_urls &&
464
+ allow_source_code == o.allow_source_code &&
465
+ allow_ip_address == o.allow_ip_address &&
466
+ allow_mac_address == o.allow_mac_address &&
467
+ allow_health_insurance_member_id == o.allow_health_insurance_member_id &&
468
+ allow_medical_record_number == o.allow_medical_record_number &&
469
+ allow_billing_account_number == o.allow_billing_account_number &&
470
+ allow_health_injury_or_disease == o.allow_health_injury_or_disease &&
471
+ allow_health_type_of_treatment == o.allow_health_type_of_treatment &&
472
+ allow_health_date_and_time_of_treatment == o.allow_health_date_and_time_of_treatment &&
473
+ allow_health_plan_beneficiary_number == o.allow_health_plan_beneficiary_number &&
474
+ allow_health_payments_made_for_treatment == o.allow_health_payments_made_for_treatment &&
475
+ allow_vehicle_id == o.allow_vehicle_id &&
476
+ allow_device_id == o.allow_device_id &&
477
+ allow_names_of_relatives == o.allow_names_of_relatives &&
478
+ allow_health_universal_record_locator == o.allow_health_universal_record_locator &&
479
+ allow_biometrics == o.allow_biometrics &&
480
+ provide_analysis_rationale == o.provide_analysis_rationale &&
481
+ custom_policy_id == o.custom_policy_id
482
+ end
483
+
484
+ # @see the `==` method
485
+ # @param [Object] Object to be compared
486
+ def eql?(o)
487
+ self == o
488
+ end
489
+
490
+ # Calculates hash code according to all attributes.
491
+ # @return [Fixnum] Hash code
492
+ def hash
493
+ [input_file, language_code, allow_email_address, allow_phone_number, allow_street_address, allow_city, allow_person_name, allow_birth_date, allow_passport_number, allow_drivers_license, allow_social_security_number, allow_taxpayer_id, allow_credit_card_number, allow_credit_card_expiration_date, allow_credit_card_verification_code, allow_bank_account_number, allow_iban, allow_health_insurance_number, allow_bearer_token, allow_http_cookie, allow_private_keys, allow_credentials, allow_deep_web_urls, allow_source_code, allow_ip_address, allow_mac_address, allow_health_insurance_member_id, allow_medical_record_number, allow_billing_account_number, allow_health_injury_or_disease, allow_health_type_of_treatment, allow_health_date_and_time_of_treatment, allow_health_plan_beneficiary_number, allow_health_payments_made_for_treatment, allow_vehicle_id, allow_device_id, allow_names_of_relatives, allow_health_universal_record_locator, allow_biometrics, provide_analysis_rationale, custom_policy_id].hash
494
+ end
495
+
496
+ # Builds the object from hash
497
+ # @param [Hash] attributes Model attributes in the form of hash
498
+ # @return [Object] Returns the model itself
499
+ def build_from_hash(attributes)
500
+ return nil unless attributes.is_a?(Hash)
501
+ self.class.swagger_types.each_pair do |key, type|
502
+ if type =~ /\AArray<(.*)>/i
503
+ # check to ensure the input is an array given that the attribute
504
+ # is documented as an array but the input is not
505
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
506
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
507
+ end
508
+ elsif !attributes[self.class.attribute_map[key]].nil?
509
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
510
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
511
+ end
512
+
513
+ self
514
+ end
515
+
516
+ # Deserializes the data based on type
517
+ # @param string type Data type
518
+ # @param string value Value to be deserialized
519
+ # @return [Object] Deserialized data
520
+ def _deserialize(type, value)
521
+ case type.to_sym
522
+ when :DateTime
523
+ DateTime.parse(value)
524
+ when :Date
525
+ Date.parse(value)
526
+ when :String
527
+ value.to_s
528
+ when :Integer
529
+ value.to_i
530
+ when :Float
531
+ value.to_f
532
+ when :BOOLEAN
533
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
534
+ true
535
+ else
536
+ false
537
+ end
538
+ when :Object
539
+ # generic object (usually a Hash), return directly
540
+ value
541
+ when /\AArray<(?<inner_type>.+)>\z/
542
+ inner_type = Regexp.last_match[:inner_type]
543
+ value.map { |v| _deserialize(inner_type, v) }
544
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
545
+ k_type = Regexp.last_match[:k_type]
546
+ v_type = Regexp.last_match[:v_type]
547
+ {}.tap do |hash|
548
+ value.each do |k, v|
549
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
550
+ end
551
+ end
552
+ else # model
553
+ temp_model = CloudmersiveDlpApiClient.const_get(type).new
554
+ temp_model.build_from_hash(value)
555
+ end
556
+ end
557
+
558
+ # Returns the string representation of the object
559
+ # @return [String] String presentation of the object
560
+ def to_s
561
+ to_hash.to_s
562
+ end
563
+
564
+ # to_body is an alias to to_hash (backward compatibility)
565
+ # @return [Hash] Returns the object in the form of hash
566
+ def to_body
567
+ to_hash
568
+ end
569
+
570
+ # Returns the object in the form of hash
571
+ # @return [Hash] Returns the object in the form of hash
572
+ def to_hash
573
+ hash = {}
574
+ self.class.attribute_map.each_pair do |attr, param|
575
+ value = self.send(attr)
576
+ next if value.nil?
577
+ hash[param] = _to_hash(value)
578
+ end
579
+ hash
580
+ end
581
+
582
+ # Outputs non-array value in the form of hash
583
+ # For object, use to_hash. Otherwise, just return the value
584
+ # @param [Object] value Any valid value
585
+ # @return [Hash] Returns the value in the form of hash
586
+ def _to_hash(value)
587
+ if value.is_a?(Array)
588
+ value.compact.map { |v| _to_hash(v) }
589
+ elsif value.is_a?(Hash)
590
+ {}.tap do |hash|
591
+ value.each { |k, v| hash[k] = _to_hash(v) }
592
+ end
593
+ elsif value.respond_to? :to_hash
594
+ value.to_hash
595
+ else
596
+ value
597
+ end
598
+ end
599
+
600
+ end
601
+ end