/*copy right 2020 Jacky Zong .All rights reserved.
package com.dockerjava.api.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import com..dockerjava.api.command.ListContainersCmd;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import javax.annotation.CheckForNull;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
@EqualsAndHashCode
@ToString
public class Container implements Serializable {
private static final long serialVersionUID = 1L;
@JsonProperty("Command")
private String command;
@JsonProperty("Created")
private Long created;
@JsonProperty("Id")
private String id;
@JsonProperty("Image")
private String image;
@JsonProperty("ImageID")
private String imageId;
@JsonProperty("Names")
private String[] names;
@JsonProperty("Ports")
public ContainerPort[] ports;
@JsonProperty("Labels")
public Map<String, String> labels;
@JsonProperty("Status")
private String status;
@JsonProperty("State")
private String state;
@JsonProperty("SizeRw")
private Long sizeRw;
@JsonProperty("SizeRootFs")
private Long sizeRootFs;
@JsonProperty("HostConfig")
private ContainerHostConfig hostConfig;
/**
* Docker API docs says "list of networks", but json names `networkSettings`.
* So, reusing existed NetworkSettings model object.
*/
@JsonProperty("NetworkSettings")
private ContainerNetworkSettings networkSettings;
@JsonProperty("Mounts")
private List<ContainerMount> mounts;
public String getId() {
return id;
}
public String getCommand() {
return command;
}
public String getImage() {
return image;
}
@CheckForNull
public String getImageId() {
return imageId;
}
public Long getCreated() {
return created;
}
public String getStatus() {
return status;
}
public String getState() {
return state;
}
public ContainerPort[] getPorts() {
return ports;
}
public Map<String, String> getLabels() {
return labels;
}
public String[] getNames() {
return names;
}
/**
* @see #sizeRw
*/
@CheckForNull
public Long getSizeRw() {
return sizeRw;
}
@CheckForNull
public Long getSizeRootFs() {
return sizeRootFs;
}
@CheckForNull
public ContainerNetworkSettings getNetworkSettings() {
return networkSettings;
}
@CheckForNull
public ContainerHostConfig getHostConfig() {
return hostConfig;
}
public List<ContainerMount> getMounts() {
return mounts;
}
}