Class: CloudmersiveDlpApiClient::DlpDetectionResponse
- Inherits:
-
Object
- Object
- CloudmersiveDlpApiClient::DlpDetectionResponse
- Defined in:
- lib/cloudmersive-dlp-api-client/models/dlp_detection_response.rb
Overview
Response object for DLP text and document detection with 23 PII detection types.
Instance Attribute Summary collapse
-
#clean_result ⇒ Object
True if no disallowed PII or sensitive data types were detected; false if any disallowed type was found.
-
#contains_bank_account_number ⇒ Object
True if the input contains bank account numbers.
-
#contains_bearer_token ⇒ Object
True if the input contains bearer tokens.
-
#contains_birth_date ⇒ Object
True if the input contains birth dates.
-
#contains_credentials ⇒ Object
True if the input contains credentials (usernames/passwords).
-
#contains_credit_card_expiration_date ⇒ Object
True if the input contains credit card expiration dates.
-
#contains_credit_card_number ⇒ Object
True if the input contains credit card numbers.
-
#contains_credit_card_verification_code ⇒ Object
True if the input contains credit card verification codes.
-
#contains_deep_web_urls ⇒ Object
True if the input contains deep web URLs (.onion).
-
#contains_drivers_license ⇒ Object
True if the input contains drivers license numbers.
-
#contains_email_address ⇒ Object
True if the input contains email addresses.
-
#contains_health_insurance_number ⇒ Object
True if the input contains health insurance numbers.
-
#contains_http_cookie ⇒ Object
True if the input contains HTTP cookies.
-
#contains_iban ⇒ Object
True if the input contains IBANs.
-
#contains_ip_address ⇒ Object
True if the input contains IP addresses.
-
#contains_mac_address ⇒ Object
True if the input contains MAC addresses.
-
#contains_passport_number ⇒ Object
True if the input contains passport numbers.
-
#contains_person_name ⇒ Object
True if the input contains person names.
-
#contains_phone_number ⇒ Object
True if the input contains phone numbers.
-
#contains_private_keys ⇒ Object
True if the input contains private keys.
-
#contains_social_security_number ⇒ Object
True if the input contains social security numbers.
-
#contains_source_code ⇒ Object
True if the input contains source code.
-
#contains_street_address ⇒ Object
True if the input contains street addresses.
-
#contains_taxpayer_id ⇒ Object
True if the input contains taxpayer IDs.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ DlpDetectionResponse
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ DlpDetectionResponse
Initializes the object
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 |
# File 'lib/cloudmersive-dlp-api-client/models/dlp_detection_response.rb', line 152 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } if attributes.has_key?(:'CleanResult') self.clean_result = attributes[:'CleanResult'] end if attributes.has_key?(:'ContainsEmailAddress') self.contains_email_address = attributes[:'ContainsEmailAddress'] end if attributes.has_key?(:'ContainsPhoneNumber') self.contains_phone_number = attributes[:'ContainsPhoneNumber'] end if attributes.has_key?(:'ContainsStreetAddress') self.contains_street_address = attributes[:'ContainsStreetAddress'] end if attributes.has_key?(:'ContainsPersonName') self.contains_person_name = attributes[:'ContainsPersonName'] end if attributes.has_key?(:'ContainsBirthDate') self.contains_birth_date = attributes[:'ContainsBirthDate'] end if attributes.has_key?(:'ContainsPassportNumber') self.contains_passport_number = attributes[:'ContainsPassportNumber'] end if attributes.has_key?(:'ContainsDriversLicense') self.contains_drivers_license = attributes[:'ContainsDriversLicense'] end if attributes.has_key?(:'ContainsSocialSecurityNumber') self. = attributes[:'ContainsSocialSecurityNumber'] end if attributes.has_key?(:'ContainsTaxpayerID') self.contains_taxpayer_id = attributes[:'ContainsTaxpayerID'] end if attributes.has_key?(:'ContainsCreditCardNumber') self.contains_credit_card_number = attributes[:'ContainsCreditCardNumber'] end if attributes.has_key?(:'ContainsCreditCardExpirationDate') self.contains_credit_card_expiration_date = attributes[:'ContainsCreditCardExpirationDate'] end if attributes.has_key?(:'ContainsCreditCardVerificationCode') self.contains_credit_card_verification_code = attributes[:'ContainsCreditCardVerificationCode'] end if attributes.has_key?(:'ContainsBankAccountNumber') self.contains_bank_account_number = attributes[:'ContainsBankAccountNumber'] end if attributes.has_key?(:'ContainsIBAN') self.contains_iban = attributes[:'ContainsIBAN'] end if attributes.has_key?(:'ContainsHealthInsuranceNumber') self.contains_health_insurance_number = attributes[:'ContainsHealthInsuranceNumber'] end if attributes.has_key?(:'ContainsBearerToken') self.contains_bearer_token = attributes[:'ContainsBearerToken'] end if attributes.has_key?(:'ContainsHttpCookie') self. = attributes[:'ContainsHttpCookie'] end if attributes.has_key?(:'ContainsPrivateKeys') self.contains_private_keys = attributes[:'ContainsPrivateKeys'] end if attributes.has_key?(:'ContainsCredentials') self.contains_credentials = attributes[:'ContainsCredentials'] end if attributes.has_key?(:'ContainsDeepWebUrls') self.contains_deep_web_urls = attributes[:'ContainsDeepWebUrls'] end if attributes.has_key?(:'ContainsSourceCode') self.contains_source_code = attributes[:'ContainsSourceCode'] end if attributes.has_key?(:'ContainsIpAddress') self.contains_ip_address = attributes[:'ContainsIpAddress'] end if attributes.has_key?(:'ContainsMacAddress') self.contains_mac_address = attributes[:'ContainsMacAddress'] end end |
Instance Attribute Details
#clean_result ⇒ Object
True if no disallowed PII or sensitive data types were detected; false if any disallowed type was found.
19 20 21 |
# File 'lib/cloudmersive-dlp-api-client/models/dlp_detection_response.rb', line 19 def clean_result @clean_result end |
#contains_bank_account_number ⇒ Object
True if the input contains bank account numbers.
58 59 60 |
# File 'lib/cloudmersive-dlp-api-client/models/dlp_detection_response.rb', line 58 def contains_bank_account_number @contains_bank_account_number end |
#contains_bearer_token ⇒ Object
True if the input contains bearer tokens.
67 68 69 |
# File 'lib/cloudmersive-dlp-api-client/models/dlp_detection_response.rb', line 67 def contains_bearer_token @contains_bearer_token end |
#contains_birth_date ⇒ Object
True if the input contains birth dates.
34 35 36 |
# File 'lib/cloudmersive-dlp-api-client/models/dlp_detection_response.rb', line 34 def contains_birth_date @contains_birth_date end |
#contains_credentials ⇒ Object
True if the input contains credentials (usernames/passwords).
76 77 78 |
# File 'lib/cloudmersive-dlp-api-client/models/dlp_detection_response.rb', line 76 def contains_credentials @contains_credentials end |
#contains_credit_card_expiration_date ⇒ Object
True if the input contains credit card expiration dates.
52 53 54 |
# File 'lib/cloudmersive-dlp-api-client/models/dlp_detection_response.rb', line 52 def contains_credit_card_expiration_date @contains_credit_card_expiration_date end |
#contains_credit_card_number ⇒ Object
True if the input contains credit card numbers.
49 50 51 |
# File 'lib/cloudmersive-dlp-api-client/models/dlp_detection_response.rb', line 49 def contains_credit_card_number @contains_credit_card_number end |
#contains_credit_card_verification_code ⇒ Object
True if the input contains credit card verification codes.
55 56 57 |
# File 'lib/cloudmersive-dlp-api-client/models/dlp_detection_response.rb', line 55 def contains_credit_card_verification_code @contains_credit_card_verification_code end |
#contains_deep_web_urls ⇒ Object
True if the input contains deep web URLs (.onion).
79 80 81 |
# File 'lib/cloudmersive-dlp-api-client/models/dlp_detection_response.rb', line 79 def contains_deep_web_urls @contains_deep_web_urls end |
#contains_drivers_license ⇒ Object
True if the input contains drivers license numbers.
40 41 42 |
# File 'lib/cloudmersive-dlp-api-client/models/dlp_detection_response.rb', line 40 def contains_drivers_license @contains_drivers_license end |
#contains_email_address ⇒ Object
True if the input contains email addresses.
22 23 24 |
# File 'lib/cloudmersive-dlp-api-client/models/dlp_detection_response.rb', line 22 def contains_email_address @contains_email_address end |
#contains_health_insurance_number ⇒ Object
True if the input contains health insurance numbers.
64 65 66 |
# File 'lib/cloudmersive-dlp-api-client/models/dlp_detection_response.rb', line 64 def contains_health_insurance_number @contains_health_insurance_number end |
#contains_http_cookie ⇒ Object
True if the input contains HTTP cookies.
70 71 72 |
# File 'lib/cloudmersive-dlp-api-client/models/dlp_detection_response.rb', line 70 def @contains_http_cookie end |
#contains_iban ⇒ Object
True if the input contains IBANs.
61 62 63 |
# File 'lib/cloudmersive-dlp-api-client/models/dlp_detection_response.rb', line 61 def contains_iban @contains_iban end |
#contains_ip_address ⇒ Object
True if the input contains IP addresses.
85 86 87 |
# File 'lib/cloudmersive-dlp-api-client/models/dlp_detection_response.rb', line 85 def contains_ip_address @contains_ip_address end |
#contains_mac_address ⇒ Object
True if the input contains MAC addresses.
88 89 90 |
# File 'lib/cloudmersive-dlp-api-client/models/dlp_detection_response.rb', line 88 def contains_mac_address @contains_mac_address end |
#contains_passport_number ⇒ Object
True if the input contains passport numbers.
37 38 39 |
# File 'lib/cloudmersive-dlp-api-client/models/dlp_detection_response.rb', line 37 def contains_passport_number @contains_passport_number end |
#contains_person_name ⇒ Object
True if the input contains person names.
31 32 33 |
# File 'lib/cloudmersive-dlp-api-client/models/dlp_detection_response.rb', line 31 def contains_person_name @contains_person_name end |
#contains_phone_number ⇒ Object
True if the input contains phone numbers.
25 26 27 |
# File 'lib/cloudmersive-dlp-api-client/models/dlp_detection_response.rb', line 25 def contains_phone_number @contains_phone_number end |
#contains_private_keys ⇒ Object
True if the input contains private keys.
73 74 75 |
# File 'lib/cloudmersive-dlp-api-client/models/dlp_detection_response.rb', line 73 def contains_private_keys @contains_private_keys end |
#contains_social_security_number ⇒ Object
True if the input contains social security numbers.
43 44 45 |
# File 'lib/cloudmersive-dlp-api-client/models/dlp_detection_response.rb', line 43 def @contains_social_security_number end |
#contains_source_code ⇒ Object
True if the input contains source code.
82 83 84 |
# File 'lib/cloudmersive-dlp-api-client/models/dlp_detection_response.rb', line 82 def contains_source_code @contains_source_code end |
#contains_street_address ⇒ Object
True if the input contains street addresses.
28 29 30 |
# File 'lib/cloudmersive-dlp-api-client/models/dlp_detection_response.rb', line 28 def contains_street_address @contains_street_address end |
#contains_taxpayer_id ⇒ Object
True if the input contains taxpayer IDs.
46 47 48 |
# File 'lib/cloudmersive-dlp-api-client/models/dlp_detection_response.rb', line 46 def contains_taxpayer_id @contains_taxpayer_id end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
# File 'lib/cloudmersive-dlp-api-client/models/dlp_detection_response.rb', line 91 def self.attribute_map { :'clean_result' => :'CleanResult', :'contains_email_address' => :'ContainsEmailAddress', :'contains_phone_number' => :'ContainsPhoneNumber', :'contains_street_address' => :'ContainsStreetAddress', :'contains_person_name' => :'ContainsPersonName', :'contains_birth_date' => :'ContainsBirthDate', :'contains_passport_number' => :'ContainsPassportNumber', :'contains_drivers_license' => :'ContainsDriversLicense', :'contains_social_security_number' => :'ContainsSocialSecurityNumber', :'contains_taxpayer_id' => :'ContainsTaxpayerID', :'contains_credit_card_number' => :'ContainsCreditCardNumber', :'contains_credit_card_expiration_date' => :'ContainsCreditCardExpirationDate', :'contains_credit_card_verification_code' => :'ContainsCreditCardVerificationCode', :'contains_bank_account_number' => :'ContainsBankAccountNumber', :'contains_iban' => :'ContainsIBAN', :'contains_health_insurance_number' => :'ContainsHealthInsuranceNumber', :'contains_bearer_token' => :'ContainsBearerToken', :'contains_http_cookie' => :'ContainsHttpCookie', :'contains_private_keys' => :'ContainsPrivateKeys', :'contains_credentials' => :'ContainsCredentials', :'contains_deep_web_urls' => :'ContainsDeepWebUrls', :'contains_source_code' => :'ContainsSourceCode', :'contains_ip_address' => :'ContainsIpAddress', :'contains_mac_address' => :'ContainsMacAddress' } end |
.swagger_types ⇒ Object
Attribute type mapping.
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
# File 'lib/cloudmersive-dlp-api-client/models/dlp_detection_response.rb', line 121 def self.swagger_types { :'clean_result' => :'BOOLEAN', :'contains_email_address' => :'BOOLEAN', :'contains_phone_number' => :'BOOLEAN', :'contains_street_address' => :'BOOLEAN', :'contains_person_name' => :'BOOLEAN', :'contains_birth_date' => :'BOOLEAN', :'contains_passport_number' => :'BOOLEAN', :'contains_drivers_license' => :'BOOLEAN', :'contains_social_security_number' => :'BOOLEAN', :'contains_taxpayer_id' => :'BOOLEAN', :'contains_credit_card_number' => :'BOOLEAN', :'contains_credit_card_expiration_date' => :'BOOLEAN', :'contains_credit_card_verification_code' => :'BOOLEAN', :'contains_bank_account_number' => :'BOOLEAN', :'contains_iban' => :'BOOLEAN', :'contains_health_insurance_number' => :'BOOLEAN', :'contains_bearer_token' => :'BOOLEAN', :'contains_http_cookie' => :'BOOLEAN', :'contains_private_keys' => :'BOOLEAN', :'contains_credentials' => :'BOOLEAN', :'contains_deep_web_urls' => :'BOOLEAN', :'contains_source_code' => :'BOOLEAN', :'contains_ip_address' => :'BOOLEAN', :'contains_mac_address' => :'BOOLEAN' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 |
# File 'lib/cloudmersive-dlp-api-client/models/dlp_detection_response.rb', line 270 def ==(o) return true if self.equal?(o) self.class == o.class && clean_result == o.clean_result && contains_email_address == o.contains_email_address && contains_phone_number == o.contains_phone_number && contains_street_address == o.contains_street_address && contains_person_name == o.contains_person_name && contains_birth_date == o.contains_birth_date && contains_passport_number == o.contains_passport_number && contains_drivers_license == o.contains_drivers_license && == o. && contains_taxpayer_id == o.contains_taxpayer_id && contains_credit_card_number == o.contains_credit_card_number && contains_credit_card_expiration_date == o.contains_credit_card_expiration_date && contains_credit_card_verification_code == o.contains_credit_card_verification_code && contains_bank_account_number == o.contains_bank_account_number && contains_iban == o.contains_iban && contains_health_insurance_number == o.contains_health_insurance_number && contains_bearer_token == o.contains_bearer_token && == o. && contains_private_keys == o.contains_private_keys && contains_credentials == o.contains_credentials && contains_deep_web_urls == o.contains_deep_web_urls && contains_source_code == o.contains_source_code && contains_ip_address == o.contains_ip_address && contains_mac_address == o.contains_mac_address end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 |
# File 'lib/cloudmersive-dlp-api-client/models/dlp_detection_response.rb', line 335 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :BOOLEAN if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model temp_model = CloudmersiveDlpApiClient.const_get(type).new temp_model.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
401 402 403 404 405 406 407 408 409 410 411 412 413 |
# File 'lib/cloudmersive-dlp-api-client/models/dlp_detection_response.rb', line 401 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 |
# File 'lib/cloudmersive-dlp-api-client/models/dlp_detection_response.rb', line 314 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(o) ⇒ Boolean
301 302 303 |
# File 'lib/cloudmersive-dlp-api-client/models/dlp_detection_response.rb', line 301 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
307 308 309 |
# File 'lib/cloudmersive-dlp-api-client/models/dlp_detection_response.rb', line 307 def hash [clean_result, contains_email_address, contains_phone_number, contains_street_address, contains_person_name, contains_birth_date, contains_passport_number, contains_drivers_license, , contains_taxpayer_id, contains_credit_card_number, contains_credit_card_expiration_date, contains_credit_card_verification_code, contains_bank_account_number, contains_iban, contains_health_insurance_number, contains_bearer_token, , contains_private_keys, contains_credentials, contains_deep_web_urls, contains_source_code, contains_ip_address, contains_mac_address].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
257 258 259 260 |
# File 'lib/cloudmersive-dlp-api-client/models/dlp_detection_response.rb', line 257 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
381 382 383 |
# File 'lib/cloudmersive-dlp-api-client/models/dlp_detection_response.rb', line 381 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
387 388 389 390 391 392 393 394 395 |
# File 'lib/cloudmersive-dlp-api-client/models/dlp_detection_response.rb', line 387 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) next if value.nil? hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
375 376 377 |
# File 'lib/cloudmersive-dlp-api-client/models/dlp_detection_response.rb', line 375 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
264 265 266 |
# File 'lib/cloudmersive-dlp-api-client/models/dlp_detection_response.rb', line 264 def valid? true end |