All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.wouterdanes.docker.remoteapi.model.ContainerInspectionResult Maven / Gradle / Ivy

package net.wouterdanes.docker.remoteapi.model;

import java.util.Calendar;
import java.util.Collections;
import java.util.List;
import java.util.Map;

import org.codehaus.jackson.annotate.JsonProperty;

/**
 * Holds a part of the inspect result on a container that's needed to query exposed ports
 */
@SuppressWarnings("unused")
public class ContainerInspectionResult {

    @JsonProperty("ID")
    private String id;
    @JsonProperty("Created")
    private Calendar createdAt;
    @JsonProperty("Path")
    private String path;
    @JsonProperty("Args")
    private List args;

    @JsonProperty("Config")
    private Config config;

    @JsonProperty("NetworkSettings")
    private NetworkSettings networkSettings;

    public String getId() {
        return id;
    }

    public Calendar getCreatedAt() {
        return createdAt;
    }

    public String getPath() {
        return path;
    }

    public List getArgs() {
        return args;
    }

    public Config getConfig() {
        return config;
    }

    public NetworkSettings getNetworkSettings() {
        return networkSettings;
    }

    public static class Config {
        @JsonProperty("Hostname")
        private String hostname;
        @JsonProperty("Domainname")
        private String domainName;
        @JsonProperty("User")
        private String user;
        @JsonProperty("Memory")
        private Long memory;
        @JsonProperty("MemorySwap")
        private Long memorySwap;
        @JsonProperty("AttachStdin")
        private Boolean attachStdin;
        @JsonProperty("AttachStdout")
        private Boolean attachStdout;
        @JsonProperty("AttachStderr")
        private Boolean attachStderr;
        @JsonProperty("ExposedPorts")
        private Map exposedPorts;
        @JsonProperty("Tty")
        private Boolean tty;
        @JsonProperty("OpenStdin")
        private Boolean openStdin;
        @JsonProperty("StdinOnce")
        private Boolean stdinOnce;
        @JsonProperty("Env")
        private List env;
        @JsonProperty("Cmd")
        private List cmd;
        @JsonProperty("Image")
        private String image;
        @JsonProperty("WorkingDir")
        private String workingDir;
        @JsonProperty("Entrypoint")
        private List entrypoint;

        public String getHostname() {
            return hostname;
        }

        public String getDomainName() {
            return domainName;
        }

        public String getUser() {
            return user;
        }

        public Long getMemory() {
            return memory;
        }

        public Long getMemorySwap() {
            return memorySwap;
        }

        public Boolean getAttachStdin() {
            return attachStdin;
        }

        public Boolean getAttachStdout() {
            return attachStdout;
        }

        public Boolean getAttachStderr() {
            return attachStderr;
        }

        public Map getExposedPorts() {
            return Collections.unmodifiableMap(exposedPorts);
        }

        public Boolean getTty() {
            return tty;
        }

        public Boolean getOpenStdin() {
            return openStdin;
        }

        public Boolean getStdinOnce() {
            return stdinOnce;
        }

        public List getEnv() {
            return env;
        }

        public List getCmd() {
            return cmd;
        }

        public String getImage() {
            return image;
        }

        public String getWorkingDir() {
            return workingDir;
        }

        public List getEntrypoint() {
            return entrypoint;
        }
    }

    public static class NetworkSettings {
        @JsonProperty("Bridge")
        private String bridge;
        @JsonProperty("Gateway")
        private String gateway;
        @JsonProperty("IPAddress")
        private String ipAddress;
        @JsonProperty("IPPrefixLen")
        private int ipPrefixLen;
        @JsonProperty("Ports")
        private Map> ports;

        public String getBridge() {
            return bridge;
        }

        public String getGateway() {
            return gateway;
        }

        public String getIpAddress() {
            return ipAddress;
        }

        public int getIpPrefixLen() {
            return ipPrefixLen;
        }

        public Map> getPorts() {
            return Collections.unmodifiableMap(ports);
        }

        public static class PortMappingInfo {
            @JsonProperty("HostIp")
            private String hostIp;
            @JsonProperty("HostPort")
            private int hostPort;

            public String getHostIp() {
                return hostIp;
            }

            public int getHostPort() {
                return hostPort;
            }
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy