com.verifalia.api.emailvalidations.models.ValidationEntry Maven / Gradle / Ivy
Show all versions of verifalia-java-sdk Show documentation
/*
* Verifalia - Email list cleaning and real-time email verification service
* https://verifalia.com/
* [email protected]
*
* Copyright (c) 2005-2020 Cobisi Research
*
* Cobisi Research
* Via Prima Strada, 35
* 35129, Padova
* Italy - European Union
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.verifalia.api.emailvalidations.models;
import com.verifalia.api.emailvalidations.serialization.QualityLevelNameDeserializer;
import com.verifalia.api.emailvalidations.serialization.ValidationEntryStatusDeserializer;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.codehaus.jackson.annotate.JsonIgnoreProperties;
import org.codehaus.jackson.map.annotate.JsonDeserialize;
import java.util.Date;
import static java.util.Objects.nonNull;
/**
* Represents a single validated entry within a Validation.
*/
@Getter
@Setter
@ToString
@JsonIgnoreProperties(ignoreUnknown = true)
public class ValidationEntry {
/**
* The index of this entry within its Validation container. This property is mostly useful in the event
* the API returns a filtered view of the items.
*/
private Integer index;
/**
* The input string being validated.
*/
private String inputData;
/**
* The ValidationEntryClassification for the status of this email address.
*/
private ValidationEntryClassification classification;
/**
* The validation status for this entry.
*/
@JsonDeserialize(using = ValidationEntryStatusDeserializer.class)
private ValidationEntryStatus status;
/**
* Gets the email address, without any eventual comment or folding white space.
*/
private String emailAddress;
/**
* Gets the local part of the email address, without comments and folding white spaces.
*/
private String emailAddressLocalPart;
/**
* Gets the local part of the email address, without comments and folding white spaces. If the ASCII-only (punycode)
* version of the domain part is needed, use AsciiEmailAddressDomainPart.
*/
private String emailAddressDomainPart;
/**
* Gets the domain part of the email address, converted to ASCII if needed and with comments and folding white
* spaces stripped off.
* The ASCII encoding is performed using the standard Punycode algorithm.
*
To get the domain part without any ASCII encoding, use EmailAddressDomainPart.
*/
private String asciiEmailAddressDomainPart;
/**
* If true, the email address has an international domain name.
*/
private Boolean hasInternationalDomainName;
/**
* If true, the email address has an international mailbox name.
*/
private Boolean hasInternationalMailboxName;
/**
* If true, the email address comes from a disposable email address (DEA) provider.
* See for
* additional information about disposable email addresses.
*/
private Boolean isDisposableEmailAddress;
/**
* If true, the local part of the email address is a well-known role account.
*/
private Boolean isRoleAccount;
/**
* If true, the email address comes from a free email address provider (e.g. gmail, yahoo, outlook / hotmail, ...).
*/
private Boolean isFreeEmailAddress;
/**
* The position of the character in the email address that eventually caused the syntax validation to fail.
* Returns null if there isn't any syntax failure.
*/
private Integer syntaxFailureIndex;
/**
* A custom, optional string which is passed back upon completing the validation. To pass back and forth a custom
* value, use the ValidationRequestEntry.Custom property of ValidationRequestEntry.
*/
private String custom;
/**
* The zero-based index of the first occurrence of this email address in the parent Validation, in the
* event the Status for this entry is Duplicate; duplicated items do not expose any result detail
* apart from this and the eventual Custom values.
*/
private Integer duplicateOf;
/**
* The date this entry has been completed, if available.
*/
private Date completedOn;
/**
* Constructs new object.
*/
protected ValidationEntry() {
}
}