cloudmersive-dlp-api-client 2.2.0

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 (66) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/README.md +124 -0
  4. data/Rakefile +8 -0
  5. data/cloudmersive-dlp-api-client.gemspec +45 -0
  6. data/docs/DetectApi.md +232 -0
  7. data/docs/DlpAdvancedDetectionRequest.md +43 -0
  8. data/docs/DlpAdvancedDetectionResponse.md +44 -0
  9. data/docs/DlpAdvancedDocumentDetectionRequest.md +46 -0
  10. data/docs/DlpAdvancedDocumentRedactionRequest.md +47 -0
  11. data/docs/DlpAdvancedDocumentRedactionResponse.md +46 -0
  12. data/docs/DlpAdvancedRedactionRequest.md +44 -0
  13. data/docs/DlpAdvancedRedactionResponse.md +44 -0
  14. data/docs/DlpDetectionRequest.md +31 -0
  15. data/docs/DlpDetectionResponse.md +31 -0
  16. data/docs/DlpDocumentDetectionRequest.md +33 -0
  17. data/docs/DlpDocumentRedactionRequest.md +34 -0
  18. data/docs/DlpDocumentRedactionResponse.md +33 -0
  19. data/docs/DlpRedactionRequest.md +32 -0
  20. data/docs/DlpRedactionResponse.md +32 -0
  21. data/docs/RedactApi.md +232 -0
  22. data/docs/RedactedPageInfo.md +8 -0
  23. data/git_push.sh +55 -0
  24. data/lib/cloudmersive-dlp-api-client/api/detect_api.rb +223 -0
  25. data/lib/cloudmersive-dlp-api-client/api/redact_api.rb +223 -0
  26. data/lib/cloudmersive-dlp-api-client/api_client.rb +391 -0
  27. data/lib/cloudmersive-dlp-api-client/api_error.rb +38 -0
  28. data/lib/cloudmersive-dlp-api-client/configuration.rb +209 -0
  29. data/lib/cloudmersive-dlp-api-client/models/dlp_advanced_detection_request.rb +536 -0
  30. data/lib/cloudmersive-dlp-api-client/models/dlp_advanced_detection_response.rb +546 -0
  31. data/lib/cloudmersive-dlp-api-client/models/dlp_advanced_document_detection_request.rb +581 -0
  32. data/lib/cloudmersive-dlp-api-client/models/dlp_advanced_document_redaction_request.rb +591 -0
  33. data/lib/cloudmersive-dlp-api-client/models/dlp_advanced_document_redaction_response.rb +583 -0
  34. data/lib/cloudmersive-dlp-api-client/models/dlp_advanced_redaction_request.rb +546 -0
  35. data/lib/cloudmersive-dlp-api-client/models/dlp_advanced_redaction_response.rb +546 -0
  36. data/lib/cloudmersive-dlp-api-client/models/dlp_detection_request.rb +416 -0
  37. data/lib/cloudmersive-dlp-api-client/models/dlp_detection_response.rb +416 -0
  38. data/lib/cloudmersive-dlp-api-client/models/dlp_document_detection_request.rb +451 -0
  39. data/lib/cloudmersive-dlp-api-client/models/dlp_document_redaction_request.rb +461 -0
  40. data/lib/cloudmersive-dlp-api-client/models/dlp_document_redaction_response.rb +453 -0
  41. data/lib/cloudmersive-dlp-api-client/models/dlp_redaction_request.rb +426 -0
  42. data/lib/cloudmersive-dlp-api-client/models/dlp_redaction_response.rb +426 -0
  43. data/lib/cloudmersive-dlp-api-client/models/redacted_page_info.rb +186 -0
  44. data/lib/cloudmersive-dlp-api-client/version.rb +15 -0
  45. data/lib/cloudmersive-dlp-api-client.rb +56 -0
  46. data/spec/api/detect_api_spec.rb +83 -0
  47. data/spec/api/redact_api_spec.rb +83 -0
  48. data/spec/api_client_spec.rb +243 -0
  49. data/spec/configuration_spec.rb +42 -0
  50. data/spec/models/dlp_advanced_detection_request_spec.rb +251 -0
  51. data/spec/models/dlp_advanced_detection_response_spec.rb +257 -0
  52. data/spec/models/dlp_advanced_document_detection_request_spec.rb +269 -0
  53. data/spec/models/dlp_advanced_document_redaction_request_spec.rb +275 -0
  54. data/spec/models/dlp_advanced_document_redaction_response_spec.rb +269 -0
  55. data/spec/models/dlp_advanced_redaction_request_spec.rb +257 -0
  56. data/spec/models/dlp_advanced_redaction_response_spec.rb +257 -0
  57. data/spec/models/dlp_detection_request_spec.rb +179 -0
  58. data/spec/models/dlp_detection_response_spec.rb +179 -0
  59. data/spec/models/dlp_document_detection_request_spec.rb +191 -0
  60. data/spec/models/dlp_document_redaction_request_spec.rb +197 -0
  61. data/spec/models/dlp_document_redaction_response_spec.rb +191 -0
  62. data/spec/models/dlp_redaction_request_spec.rb +185 -0
  63. data/spec/models/dlp_redaction_response_spec.rb +185 -0
  64. data/spec/models/redacted_page_info_spec.rb +41 -0
  65. data/spec/spec_helper.rb +111 -0
  66. metadata +290 -0
@@ -0,0 +1,591 @@
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 document redaction with 35 PII detection types including health-related data.
17
+ class DlpAdvancedDocumentRedactionRequest
18
+ # Document file bytes (PDF, DOCX, PNG, or JPG) to scan for PII and redact.
19
+ attr_accessor :input_file
20
+
21
+ # Optional. Name of the input file including extension, used for format detection. If not provided, format is detected from file contents.
22
+ attr_accessor :file_name
23
+
24
+ # Optional. Recognition mode for image processing. Options: null (default), \"Fast\", \"FastPlus\", \"FastMini\".
25
+ attr_accessor :recognition_mode
26
+
27
+ # Redaction mode for PII regions. Options: \"BlackOut\" (default) draws black rectangles over PII rows, \"Blur\" applies Gaussian blur to PII rows, \"BlackOutEntirePage\" blacks out entire dirty pages, \"BlurEntirePage\" blurs entire dirty pages.
28
+ attr_accessor :redaction_mode
29
+
30
+ # Set to true to allow email addresses in the document and not redact them.
31
+ attr_accessor :allow_email_address
32
+
33
+ # Set to true to allow phone numbers in the document and not redact them.
34
+ attr_accessor :allow_phone_number
35
+
36
+ # Set to true to allow street addresses in the document and not redact them.
37
+ attr_accessor :allow_street_address
38
+
39
+ # Set to true to allow person names in the document and not redact them.
40
+ attr_accessor :allow_person_name
41
+
42
+ # Set to true to allow birth dates in the document and not redact them.
43
+ attr_accessor :allow_birth_date
44
+
45
+ # Set to true to allow passport numbers in the document and not redact them.
46
+ attr_accessor :allow_passport_number
47
+
48
+ # Set to true to allow drivers license numbers in the document and not redact them.
49
+ attr_accessor :allow_drivers_license
50
+
51
+ # Set to true to allow social security numbers in the document and not redact them.
52
+ attr_accessor :allow_social_security_number
53
+
54
+ # Set to true to allow taxpayer IDs in the document and not redact them.
55
+ attr_accessor :allow_taxpayer_id
56
+
57
+ # Set to true to allow credit card numbers in the document and not redact them.
58
+ attr_accessor :allow_credit_card_number
59
+
60
+ # Set to true to allow credit card expiration dates in the document and not redact them.
61
+ attr_accessor :allow_credit_card_expiration_date
62
+
63
+ # Set to true to allow credit card verification codes in the document and not redact them.
64
+ attr_accessor :allow_credit_card_verification_code
65
+
66
+ # Set to true to allow bank account numbers in the document and not redact them.
67
+ attr_accessor :allow_bank_account_number
68
+
69
+ # Set to true to allow IBANs in the document and not redact them.
70
+ attr_accessor :allow_iban
71
+
72
+ # Set to true to allow health insurance numbers in the document and not redact them.
73
+ attr_accessor :allow_health_insurance_number
74
+
75
+ # Set to true to allow bearer tokens in the document and not redact them.
76
+ attr_accessor :allow_bearer_token
77
+
78
+ # Set to true to allow HTTP cookies in the document and not redact them.
79
+ attr_accessor :allow_http_cookie
80
+
81
+ # Set to true to allow private keys in the document and not redact them.
82
+ attr_accessor :allow_private_keys
83
+
84
+ # Set to true to allow credentials (usernames/passwords) in the document and not redact them.
85
+ attr_accessor :allow_credentials
86
+
87
+ # Set to true to allow deep web URLs (.onion) in the document and not redact them.
88
+ attr_accessor :allow_deep_web_urls
89
+
90
+ # Set to true to allow source code in the document and not redact it.
91
+ attr_accessor :allow_source_code
92
+
93
+ # Set to true to allow IP addresses in the document and not redact them.
94
+ attr_accessor :allow_ip_address
95
+
96
+ # Set to true to allow MAC addresses in the document and not redact them.
97
+ attr_accessor :allow_mac_address
98
+
99
+ # Set to true to allow health insurance member IDs in the document and not redact them.
100
+ attr_accessor :allow_health_insurance_member_id
101
+
102
+ # Set to true to allow references to injuries or diseases in the document and not redact them.
103
+ attr_accessor :allow_health_injury_or_disease
104
+
105
+ # Set to true to allow references to types of medical treatment in the document and not redact them.
106
+ attr_accessor :allow_health_type_of_treatment
107
+
108
+ # Set to true to allow dates and times of medical treatment in the document and not redact them.
109
+ attr_accessor :allow_health_date_and_time_of_treatment
110
+
111
+ # Set to true to allow health plan beneficiary numbers in the document and not redact them.
112
+ attr_accessor :allow_health_plan_beneficiary_number
113
+
114
+ # Set to true to allow payments made for medical treatment in the document and not redact them.
115
+ attr_accessor :allow_health_payments_made_for_treatment
116
+
117
+ # Set to true to allow identifiable human faces in the document and not redact them.
118
+ attr_accessor :allow_faces
119
+
120
+ # Set to true to allow vehicle identifiers (e.g. license plates, VINs) in the document 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 document and not redact them.
124
+ attr_accessor :allow_device_id
125
+
126
+ # Set to true to allow names of relatives in the document 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 document 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 document and not redact them.
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
+ # Attribute mapping from ruby-style variable name to JSON key.
139
+ def self.attribute_map
140
+ {
141
+ :'input_file' => :'InputFile',
142
+ :'file_name' => :'FileName',
143
+ :'recognition_mode' => :'RecognitionMode',
144
+ :'redaction_mode' => :'RedactionMode',
145
+ :'allow_email_address' => :'AllowEmailAddress',
146
+ :'allow_phone_number' => :'AllowPhoneNumber',
147
+ :'allow_street_address' => :'AllowStreetAddress',
148
+ :'allow_person_name' => :'AllowPersonName',
149
+ :'allow_birth_date' => :'AllowBirthDate',
150
+ :'allow_passport_number' => :'AllowPassportNumber',
151
+ :'allow_drivers_license' => :'AllowDriversLicense',
152
+ :'allow_social_security_number' => :'AllowSocialSecurityNumber',
153
+ :'allow_taxpayer_id' => :'AllowTaxpayerID',
154
+ :'allow_credit_card_number' => :'AllowCreditCardNumber',
155
+ :'allow_credit_card_expiration_date' => :'AllowCreditCardExpirationDate',
156
+ :'allow_credit_card_verification_code' => :'AllowCreditCardVerificationCode',
157
+ :'allow_bank_account_number' => :'AllowBankAccountNumber',
158
+ :'allow_iban' => :'AllowIBAN',
159
+ :'allow_health_insurance_number' => :'AllowHealthInsuranceNumber',
160
+ :'allow_bearer_token' => :'AllowBearerToken',
161
+ :'allow_http_cookie' => :'AllowHttpCookie',
162
+ :'allow_private_keys' => :'AllowPrivateKeys',
163
+ :'allow_credentials' => :'AllowCredentials',
164
+ :'allow_deep_web_urls' => :'AllowDeepWebUrls',
165
+ :'allow_source_code' => :'AllowSourceCode',
166
+ :'allow_ip_address' => :'AllowIpAddress',
167
+ :'allow_mac_address' => :'AllowMacAddress',
168
+ :'allow_health_insurance_member_id' => :'AllowHealthInsuranceMemberID',
169
+ :'allow_health_injury_or_disease' => :'AllowHealthInjuryOrDisease',
170
+ :'allow_health_type_of_treatment' => :'AllowHealthTypeOfTreatment',
171
+ :'allow_health_date_and_time_of_treatment' => :'AllowHealthDateAndTimeOfTreatment',
172
+ :'allow_health_plan_beneficiary_number' => :'AllowHealthPlanBeneficiaryNumber',
173
+ :'allow_health_payments_made_for_treatment' => :'AllowHealthPaymentsMadeForTreatment',
174
+ :'allow_faces' => :'AllowFaces',
175
+ :'allow_vehicle_id' => :'AllowVehicleID',
176
+ :'allow_device_id' => :'AllowDeviceID',
177
+ :'allow_names_of_relatives' => :'AllowNamesOfRelatives',
178
+ :'allow_health_universal_record_locator' => :'AllowHealthUniversalRecordLocator',
179
+ :'allow_biometrics' => :'AllowBiometrics',
180
+ :'provide_analysis_rationale' => :'ProvideAnalysisRationale'
181
+ }
182
+ end
183
+
184
+ # Attribute type mapping.
185
+ def self.swagger_types
186
+ {
187
+ :'input_file' => :'String',
188
+ :'file_name' => :'String',
189
+ :'recognition_mode' => :'String',
190
+ :'redaction_mode' => :'String',
191
+ :'allow_email_address' => :'BOOLEAN',
192
+ :'allow_phone_number' => :'BOOLEAN',
193
+ :'allow_street_address' => :'BOOLEAN',
194
+ :'allow_person_name' => :'BOOLEAN',
195
+ :'allow_birth_date' => :'BOOLEAN',
196
+ :'allow_passport_number' => :'BOOLEAN',
197
+ :'allow_drivers_license' => :'BOOLEAN',
198
+ :'allow_social_security_number' => :'BOOLEAN',
199
+ :'allow_taxpayer_id' => :'BOOLEAN',
200
+ :'allow_credit_card_number' => :'BOOLEAN',
201
+ :'allow_credit_card_expiration_date' => :'BOOLEAN',
202
+ :'allow_credit_card_verification_code' => :'BOOLEAN',
203
+ :'allow_bank_account_number' => :'BOOLEAN',
204
+ :'allow_iban' => :'BOOLEAN',
205
+ :'allow_health_insurance_number' => :'BOOLEAN',
206
+ :'allow_bearer_token' => :'BOOLEAN',
207
+ :'allow_http_cookie' => :'BOOLEAN',
208
+ :'allow_private_keys' => :'BOOLEAN',
209
+ :'allow_credentials' => :'BOOLEAN',
210
+ :'allow_deep_web_urls' => :'BOOLEAN',
211
+ :'allow_source_code' => :'BOOLEAN',
212
+ :'allow_ip_address' => :'BOOLEAN',
213
+ :'allow_mac_address' => :'BOOLEAN',
214
+ :'allow_health_insurance_member_id' => :'BOOLEAN',
215
+ :'allow_health_injury_or_disease' => :'BOOLEAN',
216
+ :'allow_health_type_of_treatment' => :'BOOLEAN',
217
+ :'allow_health_date_and_time_of_treatment' => :'BOOLEAN',
218
+ :'allow_health_plan_beneficiary_number' => :'BOOLEAN',
219
+ :'allow_health_payments_made_for_treatment' => :'BOOLEAN',
220
+ :'allow_faces' => :'BOOLEAN',
221
+ :'allow_vehicle_id' => :'BOOLEAN',
222
+ :'allow_device_id' => :'BOOLEAN',
223
+ :'allow_names_of_relatives' => :'BOOLEAN',
224
+ :'allow_health_universal_record_locator' => :'BOOLEAN',
225
+ :'allow_biometrics' => :'BOOLEAN',
226
+ :'provide_analysis_rationale' => :'BOOLEAN'
227
+ }
228
+ end
229
+
230
+ # Initializes the object
231
+ # @param [Hash] attributes Model attributes in the form of hash
232
+ def initialize(attributes = {})
233
+ return unless attributes.is_a?(Hash)
234
+
235
+ # convert string to symbol for hash key
236
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
237
+
238
+ if attributes.has_key?(:'InputFile')
239
+ self.input_file = attributes[:'InputFile']
240
+ end
241
+
242
+ if attributes.has_key?(:'FileName')
243
+ self.file_name = attributes[:'FileName']
244
+ end
245
+
246
+ if attributes.has_key?(:'RecognitionMode')
247
+ self.recognition_mode = attributes[:'RecognitionMode']
248
+ end
249
+
250
+ if attributes.has_key?(:'RedactionMode')
251
+ self.redaction_mode = attributes[:'RedactionMode']
252
+ end
253
+
254
+ if attributes.has_key?(:'AllowEmailAddress')
255
+ self.allow_email_address = attributes[:'AllowEmailAddress']
256
+ end
257
+
258
+ if attributes.has_key?(:'AllowPhoneNumber')
259
+ self.allow_phone_number = attributes[:'AllowPhoneNumber']
260
+ end
261
+
262
+ if attributes.has_key?(:'AllowStreetAddress')
263
+ self.allow_street_address = attributes[:'AllowStreetAddress']
264
+ end
265
+
266
+ if attributes.has_key?(:'AllowPersonName')
267
+ self.allow_person_name = attributes[:'AllowPersonName']
268
+ end
269
+
270
+ if attributes.has_key?(:'AllowBirthDate')
271
+ self.allow_birth_date = attributes[:'AllowBirthDate']
272
+ end
273
+
274
+ if attributes.has_key?(:'AllowPassportNumber')
275
+ self.allow_passport_number = attributes[:'AllowPassportNumber']
276
+ end
277
+
278
+ if attributes.has_key?(:'AllowDriversLicense')
279
+ self.allow_drivers_license = attributes[:'AllowDriversLicense']
280
+ end
281
+
282
+ if attributes.has_key?(:'AllowSocialSecurityNumber')
283
+ self.allow_social_security_number = attributes[:'AllowSocialSecurityNumber']
284
+ end
285
+
286
+ if attributes.has_key?(:'AllowTaxpayerID')
287
+ self.allow_taxpayer_id = attributes[:'AllowTaxpayerID']
288
+ end
289
+
290
+ if attributes.has_key?(:'AllowCreditCardNumber')
291
+ self.allow_credit_card_number = attributes[:'AllowCreditCardNumber']
292
+ end
293
+
294
+ if attributes.has_key?(:'AllowCreditCardExpirationDate')
295
+ self.allow_credit_card_expiration_date = attributes[:'AllowCreditCardExpirationDate']
296
+ end
297
+
298
+ if attributes.has_key?(:'AllowCreditCardVerificationCode')
299
+ self.allow_credit_card_verification_code = attributes[:'AllowCreditCardVerificationCode']
300
+ end
301
+
302
+ if attributes.has_key?(:'AllowBankAccountNumber')
303
+ self.allow_bank_account_number = attributes[:'AllowBankAccountNumber']
304
+ end
305
+
306
+ if attributes.has_key?(:'AllowIBAN')
307
+ self.allow_iban = attributes[:'AllowIBAN']
308
+ end
309
+
310
+ if attributes.has_key?(:'AllowHealthInsuranceNumber')
311
+ self.allow_health_insurance_number = attributes[:'AllowHealthInsuranceNumber']
312
+ end
313
+
314
+ if attributes.has_key?(:'AllowBearerToken')
315
+ self.allow_bearer_token = attributes[:'AllowBearerToken']
316
+ end
317
+
318
+ if attributes.has_key?(:'AllowHttpCookie')
319
+ self.allow_http_cookie = attributes[:'AllowHttpCookie']
320
+ end
321
+
322
+ if attributes.has_key?(:'AllowPrivateKeys')
323
+ self.allow_private_keys = attributes[:'AllowPrivateKeys']
324
+ end
325
+
326
+ if attributes.has_key?(:'AllowCredentials')
327
+ self.allow_credentials = attributes[:'AllowCredentials']
328
+ end
329
+
330
+ if attributes.has_key?(:'AllowDeepWebUrls')
331
+ self.allow_deep_web_urls = attributes[:'AllowDeepWebUrls']
332
+ end
333
+
334
+ if attributes.has_key?(:'AllowSourceCode')
335
+ self.allow_source_code = attributes[:'AllowSourceCode']
336
+ end
337
+
338
+ if attributes.has_key?(:'AllowIpAddress')
339
+ self.allow_ip_address = attributes[:'AllowIpAddress']
340
+ end
341
+
342
+ if attributes.has_key?(:'AllowMacAddress')
343
+ self.allow_mac_address = attributes[:'AllowMacAddress']
344
+ end
345
+
346
+ if attributes.has_key?(:'AllowHealthInsuranceMemberID')
347
+ self.allow_health_insurance_member_id = attributes[:'AllowHealthInsuranceMemberID']
348
+ end
349
+
350
+ if attributes.has_key?(:'AllowHealthInjuryOrDisease')
351
+ self.allow_health_injury_or_disease = attributes[:'AllowHealthInjuryOrDisease']
352
+ end
353
+
354
+ if attributes.has_key?(:'AllowHealthTypeOfTreatment')
355
+ self.allow_health_type_of_treatment = attributes[:'AllowHealthTypeOfTreatment']
356
+ end
357
+
358
+ if attributes.has_key?(:'AllowHealthDateAndTimeOfTreatment')
359
+ self.allow_health_date_and_time_of_treatment = attributes[:'AllowHealthDateAndTimeOfTreatment']
360
+ end
361
+
362
+ if attributes.has_key?(:'AllowHealthPlanBeneficiaryNumber')
363
+ self.allow_health_plan_beneficiary_number = attributes[:'AllowHealthPlanBeneficiaryNumber']
364
+ end
365
+
366
+ if attributes.has_key?(:'AllowHealthPaymentsMadeForTreatment')
367
+ self.allow_health_payments_made_for_treatment = attributes[:'AllowHealthPaymentsMadeForTreatment']
368
+ end
369
+
370
+ if attributes.has_key?(:'AllowFaces')
371
+ self.allow_faces = attributes[:'AllowFaces']
372
+ end
373
+
374
+ if attributes.has_key?(:'AllowVehicleID')
375
+ self.allow_vehicle_id = attributes[:'AllowVehicleID']
376
+ end
377
+
378
+ if attributes.has_key?(:'AllowDeviceID')
379
+ self.allow_device_id = attributes[:'AllowDeviceID']
380
+ end
381
+
382
+ if attributes.has_key?(:'AllowNamesOfRelatives')
383
+ self.allow_names_of_relatives = attributes[:'AllowNamesOfRelatives']
384
+ end
385
+
386
+ if attributes.has_key?(:'AllowHealthUniversalRecordLocator')
387
+ self.allow_health_universal_record_locator = attributes[:'AllowHealthUniversalRecordLocator']
388
+ end
389
+
390
+ if attributes.has_key?(:'AllowBiometrics')
391
+ self.allow_biometrics = attributes[:'AllowBiometrics']
392
+ end
393
+
394
+ if attributes.has_key?(:'ProvideAnalysisRationale')
395
+ self.provide_analysis_rationale = attributes[:'ProvideAnalysisRationale']
396
+ end
397
+ end
398
+
399
+ # Show invalid properties with the reasons. Usually used together with valid?
400
+ # @return Array for valid properties with the reasons
401
+ def list_invalid_properties
402
+ invalid_properties = Array.new
403
+ if !@input_file.nil? && @input_file !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
404
+ 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}=)?$/.')
405
+ end
406
+
407
+ invalid_properties
408
+ end
409
+
410
+ # Check to see if the all the properties in the model are valid
411
+ # @return true if the model is valid
412
+ def valid?
413
+ 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}=)?$/)
414
+ true
415
+ end
416
+
417
+ # Custom attribute writer method with validation
418
+ # @param [Object] input_file Value to be assigned
419
+ def input_file=(input_file)
420
+ if !input_file.nil? && input_file !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
421
+ 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}=)?$/.'
422
+ end
423
+
424
+ @input_file = input_file
425
+ end
426
+
427
+ # Checks equality by comparing each attribute.
428
+ # @param [Object] Object to be compared
429
+ def ==(o)
430
+ return true if self.equal?(o)
431
+ self.class == o.class &&
432
+ input_file == o.input_file &&
433
+ file_name == o.file_name &&
434
+ recognition_mode == o.recognition_mode &&
435
+ redaction_mode == o.redaction_mode &&
436
+ allow_email_address == o.allow_email_address &&
437
+ allow_phone_number == o.allow_phone_number &&
438
+ allow_street_address == o.allow_street_address &&
439
+ allow_person_name == o.allow_person_name &&
440
+ allow_birth_date == o.allow_birth_date &&
441
+ allow_passport_number == o.allow_passport_number &&
442
+ allow_drivers_license == o.allow_drivers_license &&
443
+ allow_social_security_number == o.allow_social_security_number &&
444
+ allow_taxpayer_id == o.allow_taxpayer_id &&
445
+ allow_credit_card_number == o.allow_credit_card_number &&
446
+ allow_credit_card_expiration_date == o.allow_credit_card_expiration_date &&
447
+ allow_credit_card_verification_code == o.allow_credit_card_verification_code &&
448
+ allow_bank_account_number == o.allow_bank_account_number &&
449
+ allow_iban == o.allow_iban &&
450
+ allow_health_insurance_number == o.allow_health_insurance_number &&
451
+ allow_bearer_token == o.allow_bearer_token &&
452
+ allow_http_cookie == o.allow_http_cookie &&
453
+ allow_private_keys == o.allow_private_keys &&
454
+ allow_credentials == o.allow_credentials &&
455
+ allow_deep_web_urls == o.allow_deep_web_urls &&
456
+ allow_source_code == o.allow_source_code &&
457
+ allow_ip_address == o.allow_ip_address &&
458
+ allow_mac_address == o.allow_mac_address &&
459
+ allow_health_insurance_member_id == o.allow_health_insurance_member_id &&
460
+ allow_health_injury_or_disease == o.allow_health_injury_or_disease &&
461
+ allow_health_type_of_treatment == o.allow_health_type_of_treatment &&
462
+ allow_health_date_and_time_of_treatment == o.allow_health_date_and_time_of_treatment &&
463
+ allow_health_plan_beneficiary_number == o.allow_health_plan_beneficiary_number &&
464
+ allow_health_payments_made_for_treatment == o.allow_health_payments_made_for_treatment &&
465
+ allow_faces == o.allow_faces &&
466
+ allow_vehicle_id == o.allow_vehicle_id &&
467
+ allow_device_id == o.allow_device_id &&
468
+ allow_names_of_relatives == o.allow_names_of_relatives &&
469
+ allow_health_universal_record_locator == o.allow_health_universal_record_locator &&
470
+ allow_biometrics == o.allow_biometrics &&
471
+ provide_analysis_rationale == o.provide_analysis_rationale
472
+ end
473
+
474
+ # @see the `==` method
475
+ # @param [Object] Object to be compared
476
+ def eql?(o)
477
+ self == o
478
+ end
479
+
480
+ # Calculates hash code according to all attributes.
481
+ # @return [Fixnum] Hash code
482
+ def hash
483
+ [input_file, file_name, recognition_mode, redaction_mode, allow_email_address, allow_phone_number, allow_street_address, 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_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_faces, allow_vehicle_id, allow_device_id, allow_names_of_relatives, allow_health_universal_record_locator, allow_biometrics, provide_analysis_rationale].hash
484
+ end
485
+
486
+ # Builds the object from hash
487
+ # @param [Hash] attributes Model attributes in the form of hash
488
+ # @return [Object] Returns the model itself
489
+ def build_from_hash(attributes)
490
+ return nil unless attributes.is_a?(Hash)
491
+ self.class.swagger_types.each_pair do |key, type|
492
+ if type =~ /\AArray<(.*)>/i
493
+ # check to ensure the input is an array given that the attribute
494
+ # is documented as an array but the input is not
495
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
496
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
497
+ end
498
+ elsif !attributes[self.class.attribute_map[key]].nil?
499
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
500
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
501
+ end
502
+
503
+ self
504
+ end
505
+
506
+ # Deserializes the data based on type
507
+ # @param string type Data type
508
+ # @param string value Value to be deserialized
509
+ # @return [Object] Deserialized data
510
+ def _deserialize(type, value)
511
+ case type.to_sym
512
+ when :DateTime
513
+ DateTime.parse(value)
514
+ when :Date
515
+ Date.parse(value)
516
+ when :String
517
+ value.to_s
518
+ when :Integer
519
+ value.to_i
520
+ when :Float
521
+ value.to_f
522
+ when :BOOLEAN
523
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
524
+ true
525
+ else
526
+ false
527
+ end
528
+ when :Object
529
+ # generic object (usually a Hash), return directly
530
+ value
531
+ when /\AArray<(?<inner_type>.+)>\z/
532
+ inner_type = Regexp.last_match[:inner_type]
533
+ value.map { |v| _deserialize(inner_type, v) }
534
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
535
+ k_type = Regexp.last_match[:k_type]
536
+ v_type = Regexp.last_match[:v_type]
537
+ {}.tap do |hash|
538
+ value.each do |k, v|
539
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
540
+ end
541
+ end
542
+ else # model
543
+ temp_model = CloudmersiveDlpApiClient.const_get(type).new
544
+ temp_model.build_from_hash(value)
545
+ end
546
+ end
547
+
548
+ # Returns the string representation of the object
549
+ # @return [String] String presentation of the object
550
+ def to_s
551
+ to_hash.to_s
552
+ end
553
+
554
+ # to_body is an alias to to_hash (backward compatibility)
555
+ # @return [Hash] Returns the object in the form of hash
556
+ def to_body
557
+ to_hash
558
+ end
559
+
560
+ # Returns the object in the form of hash
561
+ # @return [Hash] Returns the object in the form of hash
562
+ def to_hash
563
+ hash = {}
564
+ self.class.attribute_map.each_pair do |attr, param|
565
+ value = self.send(attr)
566
+ next if value.nil?
567
+ hash[param] = _to_hash(value)
568
+ end
569
+ hash
570
+ end
571
+
572
+ # Outputs non-array value in the form of hash
573
+ # For object, use to_hash. Otherwise, just return the value
574
+ # @param [Object] value Any valid value
575
+ # @return [Hash] Returns the value in the form of hash
576
+ def _to_hash(value)
577
+ if value.is_a?(Array)
578
+ value.compact.map { |v| _to_hash(v) }
579
+ elsif value.is_a?(Hash)
580
+ {}.tap do |hash|
581
+ value.each { |k, v| hash[k] = _to_hash(v) }
582
+ end
583
+ elsif value.respond_to? :to_hash
584
+ value.to_hash
585
+ else
586
+ value
587
+ end
588
+ end
589
+
590
+ end
591
+ end