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