com.lacunasoftware.signer.attachments.AttachmentModel Maven / Gradle / Ivy
/*
* Dropsigner (HML)
* Authentication
In order to call this APIs, you will need an API key. Set the API key in the header X-Api-Key:
X-Api-Key: your-app|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 is as defined in ErrorModel
Error Codes
Some of the error codes returned in a 422 response are provided bellow*:
- CertificateNotFound
- DocumentNotFound
- FolderNotFound
- CpfMismatch
- CpfNotExpected
- InvalidFlowAction
- DocumentInvalidKey
*The codes shown above are the main error codes. Nonetheless, this list is not comprehensive. New codes may be added anytime without previous warning.
Webhooks
It is recomended to subscribe to Webhook events instead of polling APIs. To do so, enable webhooks and register an URL that will receive a POST request whenever one of the events bellow occur.
All requests have the format described in Webhooks.WebhookModel. The data field varies according to the webhook event type:
Event type Description Payload DocumentSigned Triggered when a document is signed. Webhooks.DocumentSignedModel DocumentApproved Triggered when a document is approved. Webhooks.DocumentApprovedModel DocumentRefused Triggered when a document is refused. Webhooks.DocumentRefusedModel DocumentConcluded Triggered when the flow of a document is concluded. Webhooks.DocumentConcludedModel DocumentCanceled Triggered when the document is canceled. Webhooks.DocumentCanceledModel DocumentsCreated (v1.50.0) Triggered when one or more documents are created. Webhooks.DocumentsCreatedModel
To register your application URL and enable Webhooks, access the integrations section in your organization's details page.
*
* OpenAPI spec version: 1.55.2
*
*
* 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.signer.attachments;
import java.util.Objects;
import java.util.UUID;
import org.threeten.bp.OffsetDateTime;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.gson.annotations.SerializedName;
import com.lacunasoftware.signer.documents.CreatorModel;
import io.swagger.v3.oas.annotations.media.Schema;
/**
* AttachmentModel
*/
public class AttachmentModel {
@JsonProperty("id")
@SerializedName("id")
private UUID id = null;
@JsonProperty("name")
@SerializedName("name")
private String name = null;
@JsonProperty("filename")
@SerializedName("filename")
private String filename = null;
@JsonProperty("fileSize")
@SerializedName("fileSize")
private Long fileSize = null;
@JsonProperty("mimeType")
@SerializedName("mimeType")
private String mimeType = null;
@JsonProperty("creationDate")
@SerializedName("creationDate")
private OffsetDateTime creationDate = null;
@JsonProperty("updateDate")
@SerializedName("updateDate")
private OffsetDateTime updateDate = null;
@JsonProperty("createdBy")
@SerializedName("createdBy")
private CreatorModel createdBy = null;
@JsonProperty("isPrivate")
@SerializedName("isPrivate")
private Boolean isPrivate = null;
public AttachmentModel 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 AttachmentModel name(String name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
**/
@Schema(description = "")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public AttachmentModel filename(String filename) {
this.filename = filename;
return this;
}
/**
* The attachment's file name.
* @return filename
**/
@Schema(description = "The attachment's file name.")
public String getFilename() {
return filename;
}
public void setFilename(String filename) {
this.filename = filename;
}
public AttachmentModel fileSize(Long fileSize) {
this.fileSize = fileSize;
return this;
}
/**
* The attachment's file size in bytes.
* @return fileSize
**/
@Schema(description = "The attachment's file size in bytes.")
public Long getFileSize() {
return fileSize;
}
public void setFileSize(Long fileSize) {
this.fileSize = fileSize;
}
public AttachmentModel mimeType(String mimeType) {
this.mimeType = mimeType;
return this;
}
/**
* The attachment's file mime type.
* @return mimeType
**/
@Schema(description = "The attachment's file mime type.")
public String getMimeType() {
return mimeType;
}
public void setMimeType(String mimeType) {
this.mimeType = mimeType;
}
public AttachmentModel creationDate(OffsetDateTime creationDate) {
this.creationDate = creationDate;
return this;
}
/**
* The date the attachment was created.
* @return creationDate
**/
@Schema(description = "The date the attachment was created.")
public OffsetDateTime getCreationDate() {
return creationDate;
}
public void setCreationDate(OffsetDateTime creationDate) {
this.creationDate = creationDate;
}
public AttachmentModel updateDate(OffsetDateTime updateDate) {
this.updateDate = updateDate;
return this;
}
/**
* The date of the last update to the attachment.
* @return updateDate
**/
@Schema(description = "The date of the last update to the attachment.")
public OffsetDateTime getUpdateDate() {
return updateDate;
}
public void setUpdateDate(OffsetDateTime updateDate) {
this.updateDate = updateDate;
}
public AttachmentModel createdBy(CreatorModel createdBy) {
this.createdBy = createdBy;
return this;
}
/**
* Get createdBy
* @return createdBy
**/
@Schema(description = "")
public CreatorModel getCreatedBy() {
return createdBy;
}
public void setCreatedBy(CreatorModel createdBy) {
this.createdBy = createdBy;
}
public AttachmentModel isPrivate(Boolean isPrivate) {
this.isPrivate = isPrivate;
return this;
}
/**
* Get isPrivate
* @return isPrivate
**/
@Schema(description = "")
public Boolean isIsPrivate() {
return isPrivate;
}
public void setIsPrivate(Boolean isPrivate) {
this.isPrivate = isPrivate;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AttachmentModel attachmentsAttachmentModel = (AttachmentModel) o;
return Objects.equals(this.id, attachmentsAttachmentModel.id) &&
Objects.equals(this.name, attachmentsAttachmentModel.name) &&
Objects.equals(this.filename, attachmentsAttachmentModel.filename) &&
Objects.equals(this.fileSize, attachmentsAttachmentModel.fileSize) &&
Objects.equals(this.mimeType, attachmentsAttachmentModel.mimeType) &&
Objects.equals(this.creationDate, attachmentsAttachmentModel.creationDate) &&
Objects.equals(this.updateDate, attachmentsAttachmentModel.updateDate) &&
Objects.equals(this.createdBy, attachmentsAttachmentModel.createdBy) &&
Objects.equals(this.isPrivate, attachmentsAttachmentModel.isPrivate);
}
@Override
public int hashCode() {
return Objects.hash(id, name, filename, fileSize, mimeType, creationDate, updateDate, createdBy, isPrivate);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AttachmentModel {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" filename: ").append(toIndentedString(filename)).append("\n");
sb.append(" fileSize: ").append(toIndentedString(fileSize)).append("\n");
sb.append(" mimeType: ").append(toIndentedString(mimeType)).append("\n");
sb.append(" creationDate: ").append(toIndentedString(creationDate)).append("\n");
sb.append(" updateDate: ").append(toIndentedString(updateDate)).append("\n");
sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n");
sb.append(" isPrivate: ").append(toIndentedString(isPrivate)).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 ");
}
}