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