Package com.onfido.model
Class Document
- java.lang.Object
-
- com.onfido.model.Document
-
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.9.0") public class Document extends Object
Document
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDocument.CustomTypeAdapterFactorystatic classDocument.FileTypeEnumThe file type of the uploaded filestatic classDocument.SideEnumThe side of the document, if applicable.
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>openapiFieldsstatic HashSet<String>openapiRequiredFieldsstatic StringSERIALIZED_NAME_APPLICANT_IDstatic StringSERIALIZED_NAME_CREATED_ATstatic StringSERIALIZED_NAME_DOWNLOAD_HREFstatic StringSERIALIZED_NAME_FILE_NAMEstatic StringSERIALIZED_NAME_FILE_SIZEstatic StringSERIALIZED_NAME_FILE_TYPEstatic StringSERIALIZED_NAME_HREFstatic StringSERIALIZED_NAME_IDstatic StringSERIALIZED_NAME_ISSUING_COUNTRYstatic StringSERIALIZED_NAME_SIDEstatic StringSERIALIZED_NAME_TYPE
-
Constructor Summary
Constructors Constructor Description Document()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DocumentapplicantId(UUID applicantId)DocumentcreatedAt(OffsetDateTime createdAt)DocumentdownloadHref(String downloadHref)booleanequals(Object o)DocumentfileName(String fileName)DocumentfileSize(Integer fileSize)DocumentfileType(Document.FileTypeEnum fileType)static DocumentfromJson(String jsonString)Create an instance of Document given an JSON stringMap<String,Object>getAdditionalProperties()Return the additional (undeclared) property.ObjectgetAdditionalProperty(String key)Return the additional (undeclared) property with the specified name.UUIDgetApplicantId()The ID of the applicant whose document is being uploaded.OffsetDateTimegetCreatedAt()The date and time at which the document was uploadedStringgetDownloadHref()The uri that can be used to download the documentStringgetFileName()The name of the uploaded fileIntegergetFileSize()The size of the file in bytesDocument.FileTypeEnumgetFileType()The file type of the uploaded fileStringgetHref()The uri of this resourceUUIDgetId()The unique identifier for the documentCountryCodesgetIssuingCountry()The issuing country of the document, a 3-letter ISO code.Document.SideEnumgetSide()The side of the document, if applicable.DocumentTypesgetType()The type of documentinthashCode()Documenthref(String href)Documentid(UUID id)DocumentissuingCountry(CountryCodes issuingCountry)DocumentputAdditionalProperty(String key, Object value)Set the additional (undeclared) property with the specified name and value.voidsetApplicantId(UUID applicantId)voidsetCreatedAt(OffsetDateTime createdAt)voidsetDownloadHref(String downloadHref)voidsetFileName(String fileName)voidsetFileSize(Integer fileSize)voidsetFileType(Document.FileTypeEnum fileType)voidsetHref(String href)voidsetId(UUID id)voidsetIssuingCountry(CountryCodes issuingCountry)voidsetSide(Document.SideEnum side)voidsetType(DocumentTypes type)Documentside(Document.SideEnum side)StringtoJson()Convert an instance of Document to an JSON stringStringtoString()Documenttype(DocumentTypes type)static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement)Validates the JSON Element and throws an exception if issues found
-
-
-
Field Detail
-
SERIALIZED_NAME_FILE_TYPE
public static final String SERIALIZED_NAME_FILE_TYPE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_TYPE
public static final String SERIALIZED_NAME_TYPE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_SIDE
public static final String SERIALIZED_NAME_SIDE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_ISSUING_COUNTRY
public static final String SERIALIZED_NAME_ISSUING_COUNTRY
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_APPLICANT_ID
public static final String SERIALIZED_NAME_APPLICANT_ID
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_ID
public static final String SERIALIZED_NAME_ID
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_CREATED_AT
public static final String SERIALIZED_NAME_CREATED_AT
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_HREF
public static final String SERIALIZED_NAME_HREF
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_DOWNLOAD_HREF
public static final String SERIALIZED_NAME_DOWNLOAD_HREF
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_FILE_NAME
public static final String SERIALIZED_NAME_FILE_NAME
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_FILE_SIZE
public static final String SERIALIZED_NAME_FILE_SIZE
- See Also:
- Constant Field Values
-
-
Method Detail
-
fileType
public Document fileType(Document.FileTypeEnum fileType)
-
getFileType
@Nullable public Document.FileTypeEnum getFileType()
The file type of the uploaded file- Returns:
- fileType
-
setFileType
public void setFileType(Document.FileTypeEnum fileType)
-
type
public Document type(DocumentTypes type)
-
getType
@Nullable public DocumentTypes getType()
The type of document- Returns:
- type
-
setType
public void setType(DocumentTypes type)
-
side
public Document side(Document.SideEnum side)
-
getSide
@Nullable public Document.SideEnum getSide()
The side of the document, if applicable. The possible values are front and back- Returns:
- side
-
setSide
public void setSide(Document.SideEnum side)
-
issuingCountry
public Document issuingCountry(CountryCodes issuingCountry)
-
getIssuingCountry
@Nullable public CountryCodes getIssuingCountry()
The issuing country of the document, a 3-letter ISO code.- Returns:
- issuingCountry
-
setIssuingCountry
public void setIssuingCountry(CountryCodes issuingCountry)
-
getApplicantId
@Nullable public UUID getApplicantId()
The ID of the applicant whose document is being uploaded.- Returns:
- applicantId
-
setApplicantId
public void setApplicantId(UUID applicantId)
-
setId
public void setId(UUID id)
-
createdAt
public Document createdAt(OffsetDateTime createdAt)
-
getCreatedAt
@Nullable public OffsetDateTime getCreatedAt()
The date and time at which the document was uploaded- Returns:
- createdAt
-
setCreatedAt
public void setCreatedAt(OffsetDateTime createdAt)
-
setHref
public void setHref(String href)
-
getDownloadHref
@Nullable public String getDownloadHref()
The uri that can be used to download the document- Returns:
- downloadHref
-
setDownloadHref
public void setDownloadHref(String downloadHref)
-
setFileName
public void setFileName(String fileName)
-
setFileSize
public void setFileSize(Integer fileSize)
-
putAdditionalProperty
public Document putAdditionalProperty(String key, Object value)
Set the additional (undeclared) property with the specified name and value. If the property does not already exist, create it otherwise replace it.- Parameters:
key- name of the propertyvalue- value of the property- Returns:
- the Document instance itself
-
getAdditionalProperties
public Map<String,Object> getAdditionalProperties()
Return the additional (undeclared) property.- Returns:
- a map of objects
-
getAdditionalProperty
public Object getAdditionalProperty(String key)
Return the additional (undeclared) property with the specified name.- Parameters:
key- name of the property- Returns:
- an object
-
validateJsonElement
public static void validateJsonElement(com.google.gson.JsonElement jsonElement) throws IOExceptionValidates the JSON Element and throws an exception if issues found- Parameters:
jsonElement- JSON Element- Throws:
IOException- if the JSON Element is invalid with respect to Document
-
fromJson
public static Document fromJson(String jsonString) throws IOException
Create an instance of Document given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of Document
- Throws:
IOException- if the JSON string is invalid with respect to Document
-
toJson
public String toJson()
Convert an instance of Document to an JSON string- Returns:
- JSON string
-
-