com.lacunasoftware.restpkicore.SignatureSessionDocumentSummary Maven / Gradle / Ivy
Show all versions of restpkicore-client Show documentation
/*
* Rest PKI Core API
* Para Português, clique aqui Rest PKI Core is an upcoming version of Rest PKI that will have extended compatibility with environments and databases.
In addition to Windows Server (which is already supported by Rest PKI), Rest PKI Core will also run on Linux (Debian- and RedHat-based distributions) and on Docker. As for database servers, in addition to SQL Server, PostgreSQL will also be supported.
Before getting started, see the integration overview on the Integration Guide
For questions regarding the usage of this API, please reach us at lacuna.help
Parameters
You will need the following parameters:
- Endpoint: address of the Rest PKI Core instance that will be used
- API Key: authorization key for using the API
The endpoint must be prefixed to all relative URLs mentioned here. As for the API Key, see how to use it below.
Authentication
The API key must be sent on the X-Api-Key header on each request:
X-Api-Key: yourapp|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
HTTP Codes
The APIs will return the following HTTP codes:
Code Description 200 (OK) Request processed successfully. The response is different for each API, please refer to the operation's documentation 400 (Bad Request) Syntax error. For instance, when a required field was not provided 401 (Unauthorized) API key not provided or invalid 403 (Forbidden) API key is valid, but the application has insufficient permissions to complete the requested operation 422 (Unprocessable Entity) API error. The response body is an ErrorModelV2 500 (Internal Server Error) An unexpected error occurred. The exceptionCode contained on the response body may be of help for our support team during diagnostic.
Error Codes
Some of the error codes returned in the code field of an ErrorModelV2 (body of responses with HTTP status code 422) are provided below*:
Code Description DocumentNotFound A referenced document was not found (check the document ID) SecurityContextNotFound A referenced security context was not found (check the security context ID) SignatureSessionNotFound A referenced signature session was not found (check the signature session ID) BadSignatureSessionOperation The operation is invalid for the current signature session or document status. For instance, trying to await the session's completion if it is still Pending results in this error BackgroundProcessing The operation cannot be completed at this time because the resource is being processed in background SignatureSessionTokenRequired The signature session token was not passed on the X-Signature-Session-Token request header BadSignatureSessionToken An invalid signature session token was passed on the X-Signature-Session-Token request header. Check your application for possible corruption of the session token, which may contain characters - (hyphen) and _ (underscore) ExpiredSignatureSessionToken An expired signature session token was passed on the X-Signature-Session-Token request header. Signature session tokens are normally valid for 4 hours.
*The codes shown above are the most common error codes. Nonetheless, this list is not comprehensive. New codes may be added anytime without previous warning.
Culture / Internationalization (i18n)
The Accept-Language request header is observed by this API. The following cultures are supported:
- en-US (or simply en)
- pt-BR (or simply pt)
Notice: error messages are not affected by this header and therefore should not be displayed to users, being better suited for logging.
*
* OpenAPI spec version: 1.10.0 RC 1
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package com.lacunasoftware.restpkicore;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.lacunasoftware.restpkicore.DocumentFileModel;
import com.lacunasoftware.restpkicore.DocumentStatus;
import com.lacunasoftware.restpkicore.SignatureTypes;
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.Date;
import java.util.UUID;
/**
* SignatureSessionDocumentSummary
*/
@com.fasterxml.jackson.annotation.JsonIgnoreProperties(ignoreUnknown = true)
public class SignatureSessionDocumentSummary {
@JsonProperty("status")
private DocumentStatus status = null;
@JsonProperty("dateSigned")
private Date dateSigned = null;
@JsonProperty("id")
private UUID id = null;
@JsonProperty("key")
private String key = null;
@JsonProperty("formattedKey")
private String formattedKey = null;
@JsonProperty("originalFile")
private DocumentFileModel originalFile = null;
@JsonProperty("markedFile")
private DocumentFileModel markedFile = null;
@JsonProperty("signedFile")
private DocumentFileModel signedFile = null;
@JsonProperty("signatureType")
private SignatureTypes signatureType = null;
@JsonProperty("availableUntil")
private Date availableUntil = null;
public SignatureSessionDocumentSummary status(DocumentStatus status) {
this.status = status;
return this;
}
/**
* Get status
* @return status
**/
@Schema(description = "")
public DocumentStatus getStatus() {
return status;
}
public void setStatus(DocumentStatus status) {
this.status = status;
}
public SignatureSessionDocumentSummary dateSigned(Date dateSigned) {
this.dateSigned = dateSigned;
return this;
}
/**
* Get dateSigned
* @return dateSigned
**/
@Schema(description = "")
public Date getDateSigned() {
return dateSigned;
}
public void setDateSigned(Date dateSigned) {
this.dateSigned = dateSigned;
}
public SignatureSessionDocumentSummary id(UUID id) {
this.id = id;
return this;
}
/**
* Get id
* @return id
**/
@Schema(description = "")
public UUID getId() {
return id;
}
public void setId(UUID id) {
this.id = id;
}
public SignatureSessionDocumentSummary key(String key) {
this.key = key;
return this;
}
/**
* Get key
* @return key
**/
@Schema(description = "")
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public SignatureSessionDocumentSummary formattedKey(String formattedKey) {
this.formattedKey = formattedKey;
return this;
}
/**
* Get formattedKey
* @return formattedKey
**/
@Schema(description = "")
public String getFormattedKey() {
return formattedKey;
}
public void setFormattedKey(String formattedKey) {
this.formattedKey = formattedKey;
}
public SignatureSessionDocumentSummary originalFile(DocumentFileModel originalFile) {
this.originalFile = originalFile;
return this;
}
/**
* Get originalFile
* @return originalFile
**/
@Schema(description = "")
public DocumentFileModel getOriginalFile() {
return originalFile;
}
public void setOriginalFile(DocumentFileModel originalFile) {
this.originalFile = originalFile;
}
public SignatureSessionDocumentSummary markedFile(DocumentFileModel markedFile) {
this.markedFile = markedFile;
return this;
}
/**
* Get markedFile
* @return markedFile
**/
@Schema(description = "")
public DocumentFileModel getMarkedFile() {
return markedFile;
}
public void setMarkedFile(DocumentFileModel markedFile) {
this.markedFile = markedFile;
}
public SignatureSessionDocumentSummary signedFile(DocumentFileModel signedFile) {
this.signedFile = signedFile;
return this;
}
/**
* Get signedFile
* @return signedFile
**/
@Schema(description = "")
public DocumentFileModel getSignedFile() {
return signedFile;
}
public void setSignedFile(DocumentFileModel signedFile) {
this.signedFile = signedFile;
}
public SignatureSessionDocumentSummary signatureType(SignatureTypes signatureType) {
this.signatureType = signatureType;
return this;
}
/**
* Get signatureType
* @return signatureType
**/
@Schema(description = "")
public SignatureTypes getSignatureType() {
return signatureType;
}
public void setSignatureType(SignatureTypes signatureType) {
this.signatureType = signatureType;
}
public SignatureSessionDocumentSummary availableUntil(Date availableUntil) {
this.availableUntil = availableUntil;
return this;
}
/**
* Get availableUntil
* @return availableUntil
**/
@Schema(description = "")
public Date getAvailableUntil() {
return availableUntil;
}
public void setAvailableUntil(Date availableUntil) {
this.availableUntil = availableUntil;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
SignatureSessionDocumentSummary signatureSessionDocumentSummary = (SignatureSessionDocumentSummary) o;
return Objects.equals(this.status, signatureSessionDocumentSummary.status) &&
Objects.equals(this.dateSigned, signatureSessionDocumentSummary.dateSigned) &&
Objects.equals(this.id, signatureSessionDocumentSummary.id) &&
Objects.equals(this.key, signatureSessionDocumentSummary.key) &&
Objects.equals(this.formattedKey, signatureSessionDocumentSummary.formattedKey) &&
Objects.equals(this.originalFile, signatureSessionDocumentSummary.originalFile) &&
Objects.equals(this.markedFile, signatureSessionDocumentSummary.markedFile) &&
Objects.equals(this.signedFile, signatureSessionDocumentSummary.signedFile) &&
Objects.equals(this.signatureType, signatureSessionDocumentSummary.signatureType) &&
Objects.equals(this.availableUntil, signatureSessionDocumentSummary.availableUntil);
}
@Override
public int hashCode() {
return Objects.hash(status, dateSigned, id, key, formattedKey, originalFile, markedFile, signedFile, signatureType, availableUntil);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class SignatureSessionDocumentSummary {\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append(" dateSigned: ").append(toIndentedString(dateSigned)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" key: ").append(toIndentedString(key)).append("\n");
sb.append(" formattedKey: ").append(toIndentedString(formattedKey)).append("\n");
sb.append(" originalFile: ").append(toIndentedString(originalFile)).append("\n");
sb.append(" markedFile: ").append(toIndentedString(markedFile)).append("\n");
sb.append(" signedFile: ").append(toIndentedString(signedFile)).append("\n");
sb.append(" signatureType: ").append(toIndentedString(signatureType)).append("\n");
sb.append(" availableUntil: ").append(toIndentedString(availableUntil)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}