package cn.reghao.bnt.common.docker.model;

import com.google.gson.annotations.SerializedName;
import lombok.Data;

import java.util.List;

/**
 * docker 容器创建时的配置
 *
 * @author reghao
 * @date 2020-01-14 23:11:21
 */
@Data
public class Config implements Cloneable {
    @SerializedName("AttachStderr") private boolean attachStderr;
    @SerializedName("AttachStdin") private boolean attachStdin;
    @SerializedName("AttachStdout") private boolean attachStdout;
    @SerializedName("Cmd") private List<String> cmd;
    @SerializedName("Domainname") private String domainname;
    @SerializedName("Env") private List<String> env;
    @SerializedName("Healthcheck") private Healthcheck healthcheck;
    @SerializedName("Hostname") private String hostname;
    @SerializedName("Image") private String image;
    @SerializedName("Labels") private Labels labels;
    @SerializedName("MacAddress") private String macAddress;
    @SerializedName("NetworkDisabled") private boolean networkDisabled;
    @SerializedName("OpenStdin") private boolean openStdin;
    @SerializedName("StdinOnce") private boolean stdinOnce;
    @SerializedName("Tty") private boolean tty;
    @SerializedName("User") private String user;
    @SerializedName("Volumes") private Volumes volumes;
    @SerializedName("WorkingDir") private String workingDir;
    @SerializedName("StopSignal") private String stopSignal;
    @SerializedName("StopTimeout") private int stopTimeout;

    @SerializedName("Entrypoint") private String entrypoint;
    @SerializedName("ExposedPorts") private ExposedPorts exposedPorts;
    @SerializedName("HostConfig") private HostConfig hostConfig;
    @SerializedName("NetworkingConfig") private NetworkingConfig networkingConfig;

    public Config() {
        this.hostConfig = new HostConfig();
    }

    public Config(String image) {
        this.image = image;
        this.hostConfig = new HostConfig();
    }

    @Override
    public Object clone() throws CloneNotSupportedException {
        return super.clone();
    }
}
