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