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,663 @@
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 redaction with 29 PII detection types including health-related data.
17
+ class DlpAdvancedAudioRedactionRequest
18
+ # Audio file bytes (WAV, MP3, M4A, FLAC, OGG, or WMA) to transcribe, scan for PII, and redact.
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 redact them.
25
+ attr_accessor :allow_email_address
26
+
27
+ # Set to true to allow phone numbers in the audio transcript and not redact them.
28
+ attr_accessor :allow_phone_number
29
+
30
+ # Set to true to allow street addresses in the audio transcript and not redact them.
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 redact them. 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 redact them.
37
+ attr_accessor :allow_person_name
38
+
39
+ # Set to true to allow birth dates in the audio transcript and not redact them.
40
+ attr_accessor :allow_birth_date
41
+
42
+ # Set to true to allow passport numbers in the audio transcript and not redact them.
43
+ attr_accessor :allow_passport_number
44
+
45
+ # Set to true to allow drivers license numbers in the audio transcript and not redact them.
46
+ attr_accessor :allow_drivers_license
47
+
48
+ # Set to true to allow social security numbers in the audio transcript and not redact them.
49
+ attr_accessor :allow_social_security_number
50
+
51
+ # Set to true to allow taxpayer IDs in the audio transcript and not redact them.
52
+ attr_accessor :allow_taxpayer_id
53
+
54
+ # Set to true to allow credit card numbers in the audio transcript and not redact them.
55
+ attr_accessor :allow_credit_card_number
56
+
57
+ # Set to true to allow credit card expiration dates in the audio transcript and not redact them.
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 redact them.
61
+ attr_accessor :allow_credit_card_verification_code
62
+
63
+ # Set to true to allow bank account numbers in the audio transcript and not redact them.
64
+ attr_accessor :allow_bank_account_number
65
+
66
+ # Set to true to allow IBANs in the audio transcript and not redact them.
67
+ attr_accessor :allow_iban
68
+
69
+ # Set to true to allow health insurance numbers in the audio transcript and not redact them.
70
+ attr_accessor :allow_health_insurance_number
71
+
72
+ # Set to true to allow bearer tokens in the audio transcript and not redact them.
73
+ attr_accessor :allow_bearer_token
74
+
75
+ # Set to true to allow HTTP cookies in the audio transcript and not redact them.
76
+ attr_accessor :allow_http_cookie
77
+
78
+ # Set to true to allow private keys in the audio transcript and not redact them.
79
+ attr_accessor :allow_private_keys
80
+
81
+ # Set to true to allow credentials (usernames/passwords) in the audio transcript and not redact them.
82
+ attr_accessor :allow_credentials
83
+
84
+ # Set to true to allow deep web URLs (.onion) in the audio transcript and not redact them.
85
+ attr_accessor :allow_deep_web_urls
86
+
87
+ # Set to true to allow source code in the audio transcript and not redact it.
88
+ attr_accessor :allow_source_code
89
+
90
+ # Set to true to allow IP addresses in the audio transcript and not redact them.
91
+ attr_accessor :allow_ip_address
92
+
93
+ # Set to true to allow MAC addresses in the audio transcript and not redact them.
94
+ attr_accessor :allow_mac_address
95
+
96
+ # Set to true to allow health insurance member IDs in the audio transcript and not redact them.
97
+ attr_accessor :allow_health_insurance_member_id
98
+
99
+ # Set to true to allow medical record numbers in the audio transcript and not redact them.
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 redact them.
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 redact them.
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 redact them.
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 redact them.
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 redact them.
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 redact them.
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 redact them.
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 redact them.
124
+ attr_accessor :allow_device_id
125
+
126
+ # Set to true to allow names of relatives in the audio transcript and not redact them.
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 redact them.
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 redact them.
133
+ attr_accessor :allow_biometrics
134
+
135
+ # Redaction mode for audio: \"Bleep\" (default) replaces redacted audio segments with a bleep tone, or \"Mute\" zeroes out the audio for the redacted portions.
136
+ attr_accessor :redaction_mode
137
+
138
+ # Redaction mode for the transcript text: \"SemanticTag\" (default) replaces PII with a semantic tag in square brackets (e.g. [PHONE-NUMBER]), \"Delete\" removes PII entirely, or \"ReplaceWithAsterisk\" replaces PII characters with asterisks (*).
139
+ attr_accessor :transcript_redaction_mode
140
+
141
+ # Set to true to include a natural language rationale explaining why each detection conclusion was formed.
142
+ attr_accessor :provide_analysis_rationale
143
+
144
+ # 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
145
+ attr_accessor :custom_policy_id
146
+
147
+ # Optional list of caller-defined custom PII fields to detect and redact in addition to the built-in categories. Each entry has a Title (used to derive the redaction tag, e.g. \"internal participant code\" → [INTERNAL-PARTICIPANT-CODE]) and a Description telling the redaction LLM what the field looks like. Default null.
148
+ attr_accessor :custom_fields
149
+
150
+ # Optional override for the audio bleep/mute span padding. When set, expands each detected redaction range by this many CHARACTERS on each side before mapping to audio tokens (instead of the default token-radius expansion controlled by the DlpApi_Audio_ExpandRedactionByTokenRadius cloud configuration). Leave null to use the default token-radius behavior.
151
+ attr_accessor :expand_redaction_by_characters
152
+
153
+ # Optional override for the audio bleep/mute span padding, expressed in MILLISECONDS. When set, the audio segment for each detected redaction starts this many ms earlier and ends this many ms later than the raw token-aligned span (clamped to >= 0 ms at the start). When set, this REPLACES both the token-radius expansion and the ExpandRedactionByCharacters override. Leave null to fall back to the character or token-based expansion modes.
154
+ attr_accessor :expand_redaction_by_ms
155
+
156
+ # Optional. Speech recognition mode used when transcribing the audio for redaction. Available values: \"Fast\", \"Normal\", or \"Advanced\". Defaults to \"Normal\" when not specified.
157
+ attr_accessor :speech_recognition_mode
158
+
159
+ # Attribute mapping from ruby-style variable name to JSON key.
160
+ def self.attribute_map
161
+ {
162
+ :'input_file' => :'InputFile',
163
+ :'language_code' => :'LanguageCode',
164
+ :'allow_email_address' => :'AllowEmailAddress',
165
+ :'allow_phone_number' => :'AllowPhoneNumber',
166
+ :'allow_street_address' => :'AllowStreetAddress',
167
+ :'allow_city' => :'AllowCity',
168
+ :'allow_person_name' => :'AllowPersonName',
169
+ :'allow_birth_date' => :'AllowBirthDate',
170
+ :'allow_passport_number' => :'AllowPassportNumber',
171
+ :'allow_drivers_license' => :'AllowDriversLicense',
172
+ :'allow_social_security_number' => :'AllowSocialSecurityNumber',
173
+ :'allow_taxpayer_id' => :'AllowTaxpayerID',
174
+ :'allow_credit_card_number' => :'AllowCreditCardNumber',
175
+ :'allow_credit_card_expiration_date' => :'AllowCreditCardExpirationDate',
176
+ :'allow_credit_card_verification_code' => :'AllowCreditCardVerificationCode',
177
+ :'allow_bank_account_number' => :'AllowBankAccountNumber',
178
+ :'allow_iban' => :'AllowIBAN',
179
+ :'allow_health_insurance_number' => :'AllowHealthInsuranceNumber',
180
+ :'allow_bearer_token' => :'AllowBearerToken',
181
+ :'allow_http_cookie' => :'AllowHttpCookie',
182
+ :'allow_private_keys' => :'AllowPrivateKeys',
183
+ :'allow_credentials' => :'AllowCredentials',
184
+ :'allow_deep_web_urls' => :'AllowDeepWebUrls',
185
+ :'allow_source_code' => :'AllowSourceCode',
186
+ :'allow_ip_address' => :'AllowIpAddress',
187
+ :'allow_mac_address' => :'AllowMacAddress',
188
+ :'allow_health_insurance_member_id' => :'AllowHealthInsuranceMemberID',
189
+ :'allow_medical_record_number' => :'AllowMedicalRecordNumber',
190
+ :'allow_billing_account_number' => :'AllowBillingAccountNumber',
191
+ :'allow_health_injury_or_disease' => :'AllowHealthInjuryOrDisease',
192
+ :'allow_health_type_of_treatment' => :'AllowHealthTypeOfTreatment',
193
+ :'allow_health_date_and_time_of_treatment' => :'AllowHealthDateAndTimeOfTreatment',
194
+ :'allow_health_plan_beneficiary_number' => :'AllowHealthPlanBeneficiaryNumber',
195
+ :'allow_health_payments_made_for_treatment' => :'AllowHealthPaymentsMadeForTreatment',
196
+ :'allow_vehicle_id' => :'AllowVehicleID',
197
+ :'allow_device_id' => :'AllowDeviceID',
198
+ :'allow_names_of_relatives' => :'AllowNamesOfRelatives',
199
+ :'allow_health_universal_record_locator' => :'AllowHealthUniversalRecordLocator',
200
+ :'allow_biometrics' => :'AllowBiometrics',
201
+ :'redaction_mode' => :'RedactionMode',
202
+ :'transcript_redaction_mode' => :'TranscriptRedactionMode',
203
+ :'provide_analysis_rationale' => :'ProvideAnalysisRationale',
204
+ :'custom_policy_id' => :'CustomPolicyID',
205
+ :'custom_fields' => :'CustomFields',
206
+ :'expand_redaction_by_characters' => :'ExpandRedactionByCharacters',
207
+ :'expand_redaction_by_ms' => :'ExpandRedactionByMs',
208
+ :'speech_recognition_mode' => :'SpeechRecognitionMode'
209
+ }
210
+ end
211
+
212
+ # Attribute type mapping.
213
+ def self.swagger_types
214
+ {
215
+ :'input_file' => :'String',
216
+ :'language_code' => :'String',
217
+ :'allow_email_address' => :'BOOLEAN',
218
+ :'allow_phone_number' => :'BOOLEAN',
219
+ :'allow_street_address' => :'BOOLEAN',
220
+ :'allow_city' => :'BOOLEAN',
221
+ :'allow_person_name' => :'BOOLEAN',
222
+ :'allow_birth_date' => :'BOOLEAN',
223
+ :'allow_passport_number' => :'BOOLEAN',
224
+ :'allow_drivers_license' => :'BOOLEAN',
225
+ :'allow_social_security_number' => :'BOOLEAN',
226
+ :'allow_taxpayer_id' => :'BOOLEAN',
227
+ :'allow_credit_card_number' => :'BOOLEAN',
228
+ :'allow_credit_card_expiration_date' => :'BOOLEAN',
229
+ :'allow_credit_card_verification_code' => :'BOOLEAN',
230
+ :'allow_bank_account_number' => :'BOOLEAN',
231
+ :'allow_iban' => :'BOOLEAN',
232
+ :'allow_health_insurance_number' => :'BOOLEAN',
233
+ :'allow_bearer_token' => :'BOOLEAN',
234
+ :'allow_http_cookie' => :'BOOLEAN',
235
+ :'allow_private_keys' => :'BOOLEAN',
236
+ :'allow_credentials' => :'BOOLEAN',
237
+ :'allow_deep_web_urls' => :'BOOLEAN',
238
+ :'allow_source_code' => :'BOOLEAN',
239
+ :'allow_ip_address' => :'BOOLEAN',
240
+ :'allow_mac_address' => :'BOOLEAN',
241
+ :'allow_health_insurance_member_id' => :'BOOLEAN',
242
+ :'allow_medical_record_number' => :'BOOLEAN',
243
+ :'allow_billing_account_number' => :'BOOLEAN',
244
+ :'allow_health_injury_or_disease' => :'BOOLEAN',
245
+ :'allow_health_type_of_treatment' => :'BOOLEAN',
246
+ :'allow_health_date_and_time_of_treatment' => :'BOOLEAN',
247
+ :'allow_health_plan_beneficiary_number' => :'BOOLEAN',
248
+ :'allow_health_payments_made_for_treatment' => :'BOOLEAN',
249
+ :'allow_vehicle_id' => :'BOOLEAN',
250
+ :'allow_device_id' => :'BOOLEAN',
251
+ :'allow_names_of_relatives' => :'BOOLEAN',
252
+ :'allow_health_universal_record_locator' => :'BOOLEAN',
253
+ :'allow_biometrics' => :'BOOLEAN',
254
+ :'redaction_mode' => :'String',
255
+ :'transcript_redaction_mode' => :'String',
256
+ :'provide_analysis_rationale' => :'BOOLEAN',
257
+ :'custom_policy_id' => :'String',
258
+ :'custom_fields' => :'Array<CustomPiiField>',
259
+ :'expand_redaction_by_characters' => :'Integer',
260
+ :'expand_redaction_by_ms' => :'Integer',
261
+ :'speech_recognition_mode' => :'String'
262
+ }
263
+ end
264
+
265
+ # Initializes the object
266
+ # @param [Hash] attributes Model attributes in the form of hash
267
+ def initialize(attributes = {})
268
+ return unless attributes.is_a?(Hash)
269
+
270
+ # convert string to symbol for hash key
271
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
272
+
273
+ if attributes.has_key?(:'InputFile')
274
+ self.input_file = attributes[:'InputFile']
275
+ end
276
+
277
+ if attributes.has_key?(:'LanguageCode')
278
+ self.language_code = attributes[:'LanguageCode']
279
+ end
280
+
281
+ if attributes.has_key?(:'AllowEmailAddress')
282
+ self.allow_email_address = attributes[:'AllowEmailAddress']
283
+ end
284
+
285
+ if attributes.has_key?(:'AllowPhoneNumber')
286
+ self.allow_phone_number = attributes[:'AllowPhoneNumber']
287
+ end
288
+
289
+ if attributes.has_key?(:'AllowStreetAddress')
290
+ self.allow_street_address = attributes[:'AllowStreetAddress']
291
+ end
292
+
293
+ if attributes.has_key?(:'AllowCity')
294
+ self.allow_city = attributes[:'AllowCity']
295
+ end
296
+
297
+ if attributes.has_key?(:'AllowPersonName')
298
+ self.allow_person_name = attributes[:'AllowPersonName']
299
+ end
300
+
301
+ if attributes.has_key?(:'AllowBirthDate')
302
+ self.allow_birth_date = attributes[:'AllowBirthDate']
303
+ end
304
+
305
+ if attributes.has_key?(:'AllowPassportNumber')
306
+ self.allow_passport_number = attributes[:'AllowPassportNumber']
307
+ end
308
+
309
+ if attributes.has_key?(:'AllowDriversLicense')
310
+ self.allow_drivers_license = attributes[:'AllowDriversLicense']
311
+ end
312
+
313
+ if attributes.has_key?(:'AllowSocialSecurityNumber')
314
+ self.allow_social_security_number = attributes[:'AllowSocialSecurityNumber']
315
+ end
316
+
317
+ if attributes.has_key?(:'AllowTaxpayerID')
318
+ self.allow_taxpayer_id = attributes[:'AllowTaxpayerID']
319
+ end
320
+
321
+ if attributes.has_key?(:'AllowCreditCardNumber')
322
+ self.allow_credit_card_number = attributes[:'AllowCreditCardNumber']
323
+ end
324
+
325
+ if attributes.has_key?(:'AllowCreditCardExpirationDate')
326
+ self.allow_credit_card_expiration_date = attributes[:'AllowCreditCardExpirationDate']
327
+ end
328
+
329
+ if attributes.has_key?(:'AllowCreditCardVerificationCode')
330
+ self.allow_credit_card_verification_code = attributes[:'AllowCreditCardVerificationCode']
331
+ end
332
+
333
+ if attributes.has_key?(:'AllowBankAccountNumber')
334
+ self.allow_bank_account_number = attributes[:'AllowBankAccountNumber']
335
+ end
336
+
337
+ if attributes.has_key?(:'AllowIBAN')
338
+ self.allow_iban = attributes[:'AllowIBAN']
339
+ end
340
+
341
+ if attributes.has_key?(:'AllowHealthInsuranceNumber')
342
+ self.allow_health_insurance_number = attributes[:'AllowHealthInsuranceNumber']
343
+ end
344
+
345
+ if attributes.has_key?(:'AllowBearerToken')
346
+ self.allow_bearer_token = attributes[:'AllowBearerToken']
347
+ end
348
+
349
+ if attributes.has_key?(:'AllowHttpCookie')
350
+ self.allow_http_cookie = attributes[:'AllowHttpCookie']
351
+ end
352
+
353
+ if attributes.has_key?(:'AllowPrivateKeys')
354
+ self.allow_private_keys = attributes[:'AllowPrivateKeys']
355
+ end
356
+
357
+ if attributes.has_key?(:'AllowCredentials')
358
+ self.allow_credentials = attributes[:'AllowCredentials']
359
+ end
360
+
361
+ if attributes.has_key?(:'AllowDeepWebUrls')
362
+ self.allow_deep_web_urls = attributes[:'AllowDeepWebUrls']
363
+ end
364
+
365
+ if attributes.has_key?(:'AllowSourceCode')
366
+ self.allow_source_code = attributes[:'AllowSourceCode']
367
+ end
368
+
369
+ if attributes.has_key?(:'AllowIpAddress')
370
+ self.allow_ip_address = attributes[:'AllowIpAddress']
371
+ end
372
+
373
+ if attributes.has_key?(:'AllowMacAddress')
374
+ self.allow_mac_address = attributes[:'AllowMacAddress']
375
+ end
376
+
377
+ if attributes.has_key?(:'AllowHealthInsuranceMemberID')
378
+ self.allow_health_insurance_member_id = attributes[:'AllowHealthInsuranceMemberID']
379
+ end
380
+
381
+ if attributes.has_key?(:'AllowMedicalRecordNumber')
382
+ self.allow_medical_record_number = attributes[:'AllowMedicalRecordNumber']
383
+ end
384
+
385
+ if attributes.has_key?(:'AllowBillingAccountNumber')
386
+ self.allow_billing_account_number = attributes[:'AllowBillingAccountNumber']
387
+ end
388
+
389
+ if attributes.has_key?(:'AllowHealthInjuryOrDisease')
390
+ self.allow_health_injury_or_disease = attributes[:'AllowHealthInjuryOrDisease']
391
+ end
392
+
393
+ if attributes.has_key?(:'AllowHealthTypeOfTreatment')
394
+ self.allow_health_type_of_treatment = attributes[:'AllowHealthTypeOfTreatment']
395
+ end
396
+
397
+ if attributes.has_key?(:'AllowHealthDateAndTimeOfTreatment')
398
+ self.allow_health_date_and_time_of_treatment = attributes[:'AllowHealthDateAndTimeOfTreatment']
399
+ end
400
+
401
+ if attributes.has_key?(:'AllowHealthPlanBeneficiaryNumber')
402
+ self.allow_health_plan_beneficiary_number = attributes[:'AllowHealthPlanBeneficiaryNumber']
403
+ end
404
+
405
+ if attributes.has_key?(:'AllowHealthPaymentsMadeForTreatment')
406
+ self.allow_health_payments_made_for_treatment = attributes[:'AllowHealthPaymentsMadeForTreatment']
407
+ end
408
+
409
+ if attributes.has_key?(:'AllowVehicleID')
410
+ self.allow_vehicle_id = attributes[:'AllowVehicleID']
411
+ end
412
+
413
+ if attributes.has_key?(:'AllowDeviceID')
414
+ self.allow_device_id = attributes[:'AllowDeviceID']
415
+ end
416
+
417
+ if attributes.has_key?(:'AllowNamesOfRelatives')
418
+ self.allow_names_of_relatives = attributes[:'AllowNamesOfRelatives']
419
+ end
420
+
421
+ if attributes.has_key?(:'AllowHealthUniversalRecordLocator')
422
+ self.allow_health_universal_record_locator = attributes[:'AllowHealthUniversalRecordLocator']
423
+ end
424
+
425
+ if attributes.has_key?(:'AllowBiometrics')
426
+ self.allow_biometrics = attributes[:'AllowBiometrics']
427
+ end
428
+
429
+ if attributes.has_key?(:'RedactionMode')
430
+ self.redaction_mode = attributes[:'RedactionMode']
431
+ end
432
+
433
+ if attributes.has_key?(:'TranscriptRedactionMode')
434
+ self.transcript_redaction_mode = attributes[:'TranscriptRedactionMode']
435
+ end
436
+
437
+ if attributes.has_key?(:'ProvideAnalysisRationale')
438
+ self.provide_analysis_rationale = attributes[:'ProvideAnalysisRationale']
439
+ end
440
+
441
+ if attributes.has_key?(:'CustomPolicyID')
442
+ self.custom_policy_id = attributes[:'CustomPolicyID']
443
+ end
444
+
445
+ if attributes.has_key?(:'CustomFields')
446
+ if (value = attributes[:'CustomFields']).is_a?(Array)
447
+ self.custom_fields = value
448
+ end
449
+ end
450
+
451
+ if attributes.has_key?(:'ExpandRedactionByCharacters')
452
+ self.expand_redaction_by_characters = attributes[:'ExpandRedactionByCharacters']
453
+ end
454
+
455
+ if attributes.has_key?(:'ExpandRedactionByMs')
456
+ self.expand_redaction_by_ms = attributes[:'ExpandRedactionByMs']
457
+ end
458
+
459
+ if attributes.has_key?(:'SpeechRecognitionMode')
460
+ self.speech_recognition_mode = attributes[:'SpeechRecognitionMode']
461
+ end
462
+ end
463
+
464
+ # Show invalid properties with the reasons. Usually used together with valid?
465
+ # @return Array for valid properties with the reasons
466
+ def list_invalid_properties
467
+ invalid_properties = Array.new
468
+ if !@input_file.nil? && @input_file !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
469
+ 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}=)?$/.')
470
+ end
471
+
472
+ invalid_properties
473
+ end
474
+
475
+ # Check to see if the all the properties in the model are valid
476
+ # @return true if the model is valid
477
+ def valid?
478
+ 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}=)?$/)
479
+ true
480
+ end
481
+
482
+ # Custom attribute writer method with validation
483
+ # @param [Object] input_file Value to be assigned
484
+ def input_file=(input_file)
485
+ if !input_file.nil? && input_file !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
486
+ 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}=)?$/.'
487
+ end
488
+
489
+ @input_file = input_file
490
+ end
491
+
492
+ # Checks equality by comparing each attribute.
493
+ # @param [Object] Object to be compared
494
+ def ==(o)
495
+ return true if self.equal?(o)
496
+ self.class == o.class &&
497
+ input_file == o.input_file &&
498
+ language_code == o.language_code &&
499
+ allow_email_address == o.allow_email_address &&
500
+ allow_phone_number == o.allow_phone_number &&
501
+ allow_street_address == o.allow_street_address &&
502
+ allow_city == o.allow_city &&
503
+ allow_person_name == o.allow_person_name &&
504
+ allow_birth_date == o.allow_birth_date &&
505
+ allow_passport_number == o.allow_passport_number &&
506
+ allow_drivers_license == o.allow_drivers_license &&
507
+ allow_social_security_number == o.allow_social_security_number &&
508
+ allow_taxpayer_id == o.allow_taxpayer_id &&
509
+ allow_credit_card_number == o.allow_credit_card_number &&
510
+ allow_credit_card_expiration_date == o.allow_credit_card_expiration_date &&
511
+ allow_credit_card_verification_code == o.allow_credit_card_verification_code &&
512
+ allow_bank_account_number == o.allow_bank_account_number &&
513
+ allow_iban == o.allow_iban &&
514
+ allow_health_insurance_number == o.allow_health_insurance_number &&
515
+ allow_bearer_token == o.allow_bearer_token &&
516
+ allow_http_cookie == o.allow_http_cookie &&
517
+ allow_private_keys == o.allow_private_keys &&
518
+ allow_credentials == o.allow_credentials &&
519
+ allow_deep_web_urls == o.allow_deep_web_urls &&
520
+ allow_source_code == o.allow_source_code &&
521
+ allow_ip_address == o.allow_ip_address &&
522
+ allow_mac_address == o.allow_mac_address &&
523
+ allow_health_insurance_member_id == o.allow_health_insurance_member_id &&
524
+ allow_medical_record_number == o.allow_medical_record_number &&
525
+ allow_billing_account_number == o.allow_billing_account_number &&
526
+ allow_health_injury_or_disease == o.allow_health_injury_or_disease &&
527
+ allow_health_type_of_treatment == o.allow_health_type_of_treatment &&
528
+ allow_health_date_and_time_of_treatment == o.allow_health_date_and_time_of_treatment &&
529
+ allow_health_plan_beneficiary_number == o.allow_health_plan_beneficiary_number &&
530
+ allow_health_payments_made_for_treatment == o.allow_health_payments_made_for_treatment &&
531
+ allow_vehicle_id == o.allow_vehicle_id &&
532
+ allow_device_id == o.allow_device_id &&
533
+ allow_names_of_relatives == o.allow_names_of_relatives &&
534
+ allow_health_universal_record_locator == o.allow_health_universal_record_locator &&
535
+ allow_biometrics == o.allow_biometrics &&
536
+ redaction_mode == o.redaction_mode &&
537
+ transcript_redaction_mode == o.transcript_redaction_mode &&
538
+ provide_analysis_rationale == o.provide_analysis_rationale &&
539
+ custom_policy_id == o.custom_policy_id &&
540
+ custom_fields == o.custom_fields &&
541
+ expand_redaction_by_characters == o.expand_redaction_by_characters &&
542
+ expand_redaction_by_ms == o.expand_redaction_by_ms &&
543
+ speech_recognition_mode == o.speech_recognition_mode
544
+ end
545
+
546
+ # @see the `==` method
547
+ # @param [Object] Object to be compared
548
+ def eql?(o)
549
+ self == o
550
+ end
551
+
552
+ # Calculates hash code according to all attributes.
553
+ # @return [Fixnum] Hash code
554
+ def hash
555
+ [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, redaction_mode, transcript_redaction_mode, provide_analysis_rationale, custom_policy_id, custom_fields, expand_redaction_by_characters, expand_redaction_by_ms, speech_recognition_mode].hash
556
+ end
557
+
558
+ # Builds the object from hash
559
+ # @param [Hash] attributes Model attributes in the form of hash
560
+ # @return [Object] Returns the model itself
561
+ def build_from_hash(attributes)
562
+ return nil unless attributes.is_a?(Hash)
563
+ self.class.swagger_types.each_pair do |key, type|
564
+ if type =~ /\AArray<(.*)>/i
565
+ # check to ensure the input is an array given that the attribute
566
+ # is documented as an array but the input is not
567
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
568
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
569
+ end
570
+ elsif !attributes[self.class.attribute_map[key]].nil?
571
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
572
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
573
+ end
574
+
575
+ self
576
+ end
577
+
578
+ # Deserializes the data based on type
579
+ # @param string type Data type
580
+ # @param string value Value to be deserialized
581
+ # @return [Object] Deserialized data
582
+ def _deserialize(type, value)
583
+ case type.to_sym
584
+ when :DateTime
585
+ DateTime.parse(value)
586
+ when :Date
587
+ Date.parse(value)
588
+ when :String
589
+ value.to_s
590
+ when :Integer
591
+ value.to_i
592
+ when :Float
593
+ value.to_f
594
+ when :BOOLEAN
595
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
596
+ true
597
+ else
598
+ false
599
+ end
600
+ when :Object
601
+ # generic object (usually a Hash), return directly
602
+ value
603
+ when /\AArray<(?<inner_type>.+)>\z/
604
+ inner_type = Regexp.last_match[:inner_type]
605
+ value.map { |v| _deserialize(inner_type, v) }
606
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
607
+ k_type = Regexp.last_match[:k_type]
608
+ v_type = Regexp.last_match[:v_type]
609
+ {}.tap do |hash|
610
+ value.each do |k, v|
611
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
612
+ end
613
+ end
614
+ else # model
615
+ temp_model = CloudmersiveDlpApiClient.const_get(type).new
616
+ temp_model.build_from_hash(value)
617
+ end
618
+ end
619
+
620
+ # Returns the string representation of the object
621
+ # @return [String] String presentation of the object
622
+ def to_s
623
+ to_hash.to_s
624
+ end
625
+
626
+ # to_body is an alias to to_hash (backward compatibility)
627
+ # @return [Hash] Returns the object in the form of hash
628
+ def to_body
629
+ to_hash
630
+ end
631
+
632
+ # Returns the object in the form of hash
633
+ # @return [Hash] Returns the object in the form of hash
634
+ def to_hash
635
+ hash = {}
636
+ self.class.attribute_map.each_pair do |attr, param|
637
+ value = self.send(attr)
638
+ next if value.nil?
639
+ hash[param] = _to_hash(value)
640
+ end
641
+ hash
642
+ end
643
+
644
+ # Outputs non-array value in the form of hash
645
+ # For object, use to_hash. Otherwise, just return the value
646
+ # @param [Object] value Any valid value
647
+ # @return [Hash] Returns the value in the form of hash
648
+ def _to_hash(value)
649
+ if value.is_a?(Array)
650
+ value.compact.map { |v| _to_hash(v) }
651
+ elsif value.is_a?(Hash)
652
+ {}.tap do |hash|
653
+ value.each { |k, v| hash[k] = _to_hash(v) }
654
+ end
655
+ elsif value.respond_to? :to_hash
656
+ value.to_hash
657
+ else
658
+ value
659
+ end
660
+ end
661
+
662
+ end
663
+ end