com.codeslap.apps.bean.Attachment Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of codeslap-api Show documentation
Show all versions of codeslap-api Show documentation
Java library to use the apps.codeslap.com API
package com.codeslap.apps.bean;
import org.simpleframework.xml.Default;
import org.simpleframework.xml.DefaultType;
import org.simpleframework.xml.Element;
import org.simpleframework.xml.Root;
/**
* Xml example:
*
*
* {@code
*
*
* 4f0150968cfe354758000021
* Doing good, man... doing good.
* 2012-01-02T06:59:47Z
* 4f0155e38cfe354758000069
* 4f0155e38cfe354758000067
* RackMultipart20120102-83800-1xt1y4q
* 25533
* application/vnd.oasis.opendocument.text
* 2012-01-02T06:59:47Z
*
* }
*
*/
@Root(name = "app")
@Default(value = DefaultType.FIELD, required = true)
public class Attachment {
@Element(name = "id")
private String id;
@Element(name = "comment", required = false)
private String comment;
@Element(name = "type")
private String type;
@Element(name = "file-id")
private String fileId;
@Element(name = "file-name")
private String fileName;
@Element(name = "file-size")
private String fileSize;
@Element(name = "file-type")
private String fileType;
@Element(name = "created-at")
private String createdAt;
@Element(name = "updated-at")
private String updatedAt;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getComment() {
return comment;
}
public void setComment(String comment) {
this.comment = comment;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getFileId() {
return fileId;
}
public void setFileId(String fileId) {
this.fileId = fileId;
}
public String getFileName() {
return fileName;
}
public void setFileName(String fileName) {
this.fileName = fileName;
}
public String getFileSize() {
return fileSize;
}
public void setFileSize(String fileSize) {
this.fileSize = fileSize;
}
public String getFileType() {
return fileType;
}
public void setFileType(String fileType) {
this.fileType = fileType;
}
public String getCreatedAt() {
return createdAt;
}
public void setCreatedAt(String createdAt) {
this.createdAt = createdAt;
}
public String getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(String updatedAt) {
this.updatedAt = updatedAt;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof Attachment)) return false;
Attachment that = (Attachment) o;
if (comment != null ? !comment.equals(that.comment) : that.comment != null) return false;
if (createdAt != null ? !createdAt.equals(that.createdAt) : that.createdAt != null) return false;
if (fileId != null ? !fileId.equals(that.fileId) : that.fileId != null) return false;
if (fileName != null ? !fileName.equals(that.fileName) : that.fileName != null) return false;
if (fileSize != null ? !fileSize.equals(that.fileSize) : that.fileSize != null) return false;
if (fileType != null ? !fileType.equals(that.fileType) : that.fileType != null) return false;
if (id != null ? !id.equals(that.id) : that.id != null) return false;
if (type != null ? !type.equals(that.type) : that.type != null) return false;
if (updatedAt != null ? !updatedAt.equals(that.updatedAt) : that.updatedAt != null) return false;
return true;
}
@Override
public int hashCode() {
int result = id != null ? id.hashCode() : 0;
result = 31 * result + (comment != null ? comment.hashCode() : 0);
result = 31 * result + (type != null ? type.hashCode() : 0);
result = 31 * result + (fileId != null ? fileId.hashCode() : 0);
result = 31 * result + (fileName != null ? fileName.hashCode() : 0);
result = 31 * result + (fileSize != null ? fileSize.hashCode() : 0);
result = 31 * result + (fileType != null ? fileType.hashCode() : 0);
result = 31 * result + (createdAt != null ? createdAt.hashCode() : 0);
result = 31 * result + (updatedAt != null ? updatedAt.hashCode() : 0);
return result;
}
@Override
public String toString() {
return "Attachment{" +
"id='" + id + '\'' +
", comment='" + comment + '\'' +
", type='" + type + '\'' +
", fileId='" + fileId + '\'' +
", fileName='" + fileName + '\'' +
", fileSize='" + fileSize + '\'' +
", fileType='" + fileType + '\'' +
", createdAt='" + createdAt + '\'' +
", updatedAt='" + updatedAt + '\'' +
'}';
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy