Custom container model

Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
This commit is contained in:
Georg Pfuetzenreuter 2022-05-12 00:00:24 +02:00
parent 5adf523a01
commit 9648a8b9d0
Signed by: Georg
GPG Key ID: 1ED2F138E7E6FF57

View File

@ -0,0 +1,90 @@
package net.libertacasa.pubsh.web;
import java.io.Serializable;
import java.time.Instant;
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.github.dockerjava.api.model.Container;
//public class MyContainer extends Container implements Serializable {
public class MyContainer implements Serializable {
private static final long serialVersionUID = 5870179635916284739L;
@Override
public String toString() {
// return ReflectionToStringBuilder.toString(this,ToStringStyle.SHORT_PREFIX_STYLE);
return new ReflectionToStringBuilder(this).
append("name", name).
append("id", id).
append("ExpirationDate", ExpirationDate).
append("image", image).
append("imageid", imageid).
append("status", status).
toString();
}
private String name;
private String id;
private Instant ExpirationDate;
private String image;
private String imageid;
private String status;
public void setName(String name) {
this.name = name;
}
public void setId(String id) {
this.id = id;
}
public void setExpirationDate(Instant ExpirationDate) {
this.ExpirationDate = ExpirationDate;
}
public void setImage(String image) {
this.image = image;
}
public void setImageId(String imageid) {
this.imageid = imageid;
}
public void setStatus(String status) {
this.status = status;
}
public String getName() {
return name;
}
public String getId() {
return id;
}
public Instant getExpirationDate() {
return ExpirationDate;
}
public String getImage() {
return image;
}
public String getImageId() {
return imageid;
}
public String getStatus() {
return status;
}
}