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

io.fabric8.kubernetes.api.model.Container Maven / Gradle / Ivy


package io.fabric8.kubernetes.api.model;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Generated;
import javax.validation.Valid;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;


/**
 * 
 * 
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
@Generated("org.jsonschema2pojo")
@JsonPropertyOrder({
    "capabilities",
    "command",
    "cpu",
    "entrypoint:omitempty",
    "env",
    "image",
    "imagePullPolicy",
    "lifecycle",
    "livenessProbe",
    "memory",
    "name",
    "ports",
    "privileged",
    "readinessProbe",
    "resources",
    "terminationMessagePath",
    "volumeMounts",
    "workingDir"
})
public class Container {

    /**
     * 
     * 
     */
    @JsonProperty("capabilities")
    @Valid
    private Capabilities capabilities;
    /**
     * command argv array; not executed within a shell; the image's cmd is used if this is not provided; cannot be updated
     * 
     */
    @JsonProperty("command")
    @Valid
    private List command = new ArrayList();
    /**
     * CPU share in thousandths of a core; cannot be updated
     * 
     */
    @JsonProperty("cpu")
    private Integer cpu;
    /**
     * entrypoint array; not executed within a shell; the image's entrypoint is used if this is not provided; cannot be updated
     * 
     */
    @JsonProperty("entrypoint:omitempty")
    @Valid
    private List entrypointOmitempty = new ArrayList();
    /**
     * list of environment variables to set in the container; cannot be updated
     * 
     */
    @JsonProperty("env")
    @Valid
    private List env = new ArrayList();
    /**
     * Docker image name
     * 
     */
    @JsonProperty("image")
    private String image;
    /**
     * image pull policy; one of PullAlways
     * 
     */
    @JsonProperty("imagePullPolicy")
    private String imagePullPolicy;
    /**
     * 
     * 
     */
    @JsonProperty("lifecycle")
    @Valid
    private Lifecycle lifecycle;
    /**
     * 
     * 
     */
    @JsonProperty("livenessProbe")
    @Valid
    private LivenessProbe livenessProbe;
    /**
     * memory limit in bytes; defaults to unlimited; cannot be updated
     * 
     */
    @JsonProperty("memory")
    private Integer memory;
    /**
     * name of the container; must be a DNS_LABEL and unique within the pod; cannot be updated
     * 
     */
    @JsonProperty("name")
    private String name;
    /**
     * list of ports to expose from the container; cannot be updated
     * 
     */
    @JsonProperty("ports")
    @Valid
    private List ports = new ArrayList();
    /**
     * whether or not the container is granted privileged status; defaults to false; cannot be updated
     * 
     */
    @JsonProperty("privileged")
    private Boolean privileged;
    /**
     * 
     * 
     */
    @JsonProperty("readinessProbe")
    @Valid
    private LivenessProbe readinessProbe;
    /**
     * 
     * 
     */
    @JsonProperty("resources")
    @Valid
    private ResourceRequirements resources;
    /**
     * path at which the file to which the container's termination message will be written is mounted into the container's filesystem; message written is intended to be brief final status
     * 
     */
    @JsonProperty("terminationMessagePath")
    private String terminationMessagePath;
    /**
     * pod volumes to mount into the container's filesystem; cannot be updated
     * 
     */
    @JsonProperty("volumeMounts")
    @Valid
    private List volumeMounts = new ArrayList();
    /**
     * container's working directory; defaults to image's default; cannot be updated
     * 
     */
    @JsonProperty("workingDir")
    private String workingDir;
    @JsonIgnore
    private Map additionalProperties = new HashMap();

    /**
     * No args constructor for use in serialization
     * 
     */
    public Container() {
    }

    /**
     * 
     * @param volumeMounts
     * @param resources
     * @param imagePullPolicy
     * @param cpu
     * @param image
     * @param env
     * @param terminationMessagePath
     * @param readinessProbe
     * @param entrypointOmitempty
     * @param memory
     * @param livenessProbe
     * @param ports
     * @param lifecycle
     * @param name
     * @param command
     * @param workingDir
     * @param privileged
     * @param capabilities
     */
    public Container(Capabilities capabilities, List command, Integer cpu, List entrypointOmitempty, List env, String image, String imagePullPolicy, Lifecycle lifecycle, LivenessProbe livenessProbe, Integer memory, String name, List ports, Boolean privileged, LivenessProbe readinessProbe, ResourceRequirements resources, String terminationMessagePath, List volumeMounts, String workingDir) {
        this.capabilities = capabilities;
        this.command = command;
        this.cpu = cpu;
        this.entrypointOmitempty = entrypointOmitempty;
        this.env = env;
        this.image = image;
        this.imagePullPolicy = imagePullPolicy;
        this.lifecycle = lifecycle;
        this.livenessProbe = livenessProbe;
        this.memory = memory;
        this.name = name;
        this.ports = ports;
        this.privileged = privileged;
        this.readinessProbe = readinessProbe;
        this.resources = resources;
        this.terminationMessagePath = terminationMessagePath;
        this.volumeMounts = volumeMounts;
        this.workingDir = workingDir;
    }

    /**
     * 
     * 
     * @return
     *     The capabilities
     */
    @JsonProperty("capabilities")
    public Capabilities getCapabilities() {
        return capabilities;
    }

    /**
     * 
     * 
     * @param capabilities
     *     The capabilities
     */
    @JsonProperty("capabilities")
    public void setCapabilities(Capabilities capabilities) {
        this.capabilities = capabilities;
    }

    /**
     * command argv array; not executed within a shell; the image's cmd is used if this is not provided; cannot be updated
     * 
     * @return
     *     The command
     */
    @JsonProperty("command")
    public List getCommand() {
        return command;
    }

    /**
     * command argv array; not executed within a shell; the image's cmd is used if this is not provided; cannot be updated
     * 
     * @param command
     *     The command
     */
    @JsonProperty("command")
    public void setCommand(List command) {
        this.command = command;
    }

    /**
     * CPU share in thousandths of a core; cannot be updated
     * 
     * @return
     *     The cpu
     */
    @JsonProperty("cpu")
    public Integer getCpu() {
        return cpu;
    }

    /**
     * CPU share in thousandths of a core; cannot be updated
     * 
     * @param cpu
     *     The cpu
     */
    @JsonProperty("cpu")
    public void setCpu(Integer cpu) {
        this.cpu = cpu;
    }

    /**
     * entrypoint array; not executed within a shell; the image's entrypoint is used if this is not provided; cannot be updated
     * 
     * @return
     *     The entrypointOmitempty
     */
    @JsonProperty("entrypoint:omitempty")
    public List getEntrypointOmitempty() {
        return entrypointOmitempty;
    }

    /**
     * entrypoint array; not executed within a shell; the image's entrypoint is used if this is not provided; cannot be updated
     * 
     * @param entrypointOmitempty
     *     The entrypoint:omitempty
     */
    @JsonProperty("entrypoint:omitempty")
    public void setEntrypointOmitempty(List entrypointOmitempty) {
        this.entrypointOmitempty = entrypointOmitempty;
    }

    /**
     * list of environment variables to set in the container; cannot be updated
     * 
     * @return
     *     The env
     */
    @JsonProperty("env")
    public List getEnv() {
        return env;
    }

    /**
     * list of environment variables to set in the container; cannot be updated
     * 
     * @param env
     *     The env
     */
    @JsonProperty("env")
    public void setEnv(List env) {
        this.env = env;
    }

    /**
     * Docker image name
     * 
     * @return
     *     The image
     */
    @JsonProperty("image")
    public String getImage() {
        return image;
    }

    /**
     * Docker image name
     * 
     * @param image
     *     The image
     */
    @JsonProperty("image")
    public void setImage(String image) {
        this.image = image;
    }

    /**
     * image pull policy; one of PullAlways
     * 
     * @return
     *     The imagePullPolicy
     */
    @JsonProperty("imagePullPolicy")
    public String getImagePullPolicy() {
        return imagePullPolicy;
    }

    /**
     * image pull policy; one of PullAlways
     * 
     * @param imagePullPolicy
     *     The imagePullPolicy
     */
    @JsonProperty("imagePullPolicy")
    public void setImagePullPolicy(String imagePullPolicy) {
        this.imagePullPolicy = imagePullPolicy;
    }

    /**
     * 
     * 
     * @return
     *     The lifecycle
     */
    @JsonProperty("lifecycle")
    public Lifecycle getLifecycle() {
        return lifecycle;
    }

    /**
     * 
     * 
     * @param lifecycle
     *     The lifecycle
     */
    @JsonProperty("lifecycle")
    public void setLifecycle(Lifecycle lifecycle) {
        this.lifecycle = lifecycle;
    }

    /**
     * 
     * 
     * @return
     *     The livenessProbe
     */
    @JsonProperty("livenessProbe")
    public LivenessProbe getLivenessProbe() {
        return livenessProbe;
    }

    /**
     * 
     * 
     * @param livenessProbe
     *     The livenessProbe
     */
    @JsonProperty("livenessProbe")
    public void setLivenessProbe(LivenessProbe livenessProbe) {
        this.livenessProbe = livenessProbe;
    }

    /**
     * memory limit in bytes; defaults to unlimited; cannot be updated
     * 
     * @return
     *     The memory
     */
    @JsonProperty("memory")
    public Integer getMemory() {
        return memory;
    }

    /**
     * memory limit in bytes; defaults to unlimited; cannot be updated
     * 
     * @param memory
     *     The memory
     */
    @JsonProperty("memory")
    public void setMemory(Integer memory) {
        this.memory = memory;
    }

    /**
     * name of the container; must be a DNS_LABEL and unique within the pod; cannot be updated
     * 
     * @return
     *     The name
     */
    @JsonProperty("name")
    public String getName() {
        return name;
    }

    /**
     * name of the container; must be a DNS_LABEL and unique within the pod; cannot be updated
     * 
     * @param name
     *     The name
     */
    @JsonProperty("name")
    public void setName(String name) {
        this.name = name;
    }

    /**
     * list of ports to expose from the container; cannot be updated
     * 
     * @return
     *     The ports
     */
    @JsonProperty("ports")
    public List getPorts() {
        return ports;
    }

    /**
     * list of ports to expose from the container; cannot be updated
     * 
     * @param ports
     *     The ports
     */
    @JsonProperty("ports")
    public void setPorts(List ports) {
        this.ports = ports;
    }

    /**
     * whether or not the container is granted privileged status; defaults to false; cannot be updated
     * 
     * @return
     *     The privileged
     */
    @JsonProperty("privileged")
    public Boolean getPrivileged() {
        return privileged;
    }

    /**
     * whether or not the container is granted privileged status; defaults to false; cannot be updated
     * 
     * @param privileged
     *     The privileged
     */
    @JsonProperty("privileged")
    public void setPrivileged(Boolean privileged) {
        this.privileged = privileged;
    }

    /**
     * 
     * 
     * @return
     *     The readinessProbe
     */
    @JsonProperty("readinessProbe")
    public LivenessProbe getReadinessProbe() {
        return readinessProbe;
    }

    /**
     * 
     * 
     * @param readinessProbe
     *     The readinessProbe
     */
    @JsonProperty("readinessProbe")
    public void setReadinessProbe(LivenessProbe readinessProbe) {
        this.readinessProbe = readinessProbe;
    }

    /**
     * 
     * 
     * @return
     *     The resources
     */
    @JsonProperty("resources")
    public ResourceRequirements getResources() {
        return resources;
    }

    /**
     * 
     * 
     * @param resources
     *     The resources
     */
    @JsonProperty("resources")
    public void setResources(ResourceRequirements resources) {
        this.resources = resources;
    }

    /**
     * path at which the file to which the container's termination message will be written is mounted into the container's filesystem; message written is intended to be brief final status
     * 
     * @return
     *     The terminationMessagePath
     */
    @JsonProperty("terminationMessagePath")
    public String getTerminationMessagePath() {
        return terminationMessagePath;
    }

    /**
     * path at which the file to which the container's termination message will be written is mounted into the container's filesystem; message written is intended to be brief final status
     * 
     * @param terminationMessagePath
     *     The terminationMessagePath
     */
    @JsonProperty("terminationMessagePath")
    public void setTerminationMessagePath(String terminationMessagePath) {
        this.terminationMessagePath = terminationMessagePath;
    }

    /**
     * pod volumes to mount into the container's filesystem; cannot be updated
     * 
     * @return
     *     The volumeMounts
     */
    @JsonProperty("volumeMounts")
    public List getVolumeMounts() {
        return volumeMounts;
    }

    /**
     * pod volumes to mount into the container's filesystem; cannot be updated
     * 
     * @param volumeMounts
     *     The volumeMounts
     */
    @JsonProperty("volumeMounts")
    public void setVolumeMounts(List volumeMounts) {
        this.volumeMounts = volumeMounts;
    }

    /**
     * container's working directory; defaults to image's default; cannot be updated
     * 
     * @return
     *     The workingDir
     */
    @JsonProperty("workingDir")
    public String getWorkingDir() {
        return workingDir;
    }

    /**
     * container's working directory; defaults to image's default; cannot be updated
     * 
     * @param workingDir
     *     The workingDir
     */
    @JsonProperty("workingDir")
    public void setWorkingDir(String workingDir) {
        this.workingDir = workingDir;
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }

    @JsonAnyGetter
    public Map getAdditionalProperties() {
        return this.additionalProperties;
    }

    @JsonAnySetter
    public void setAdditionalProperty(String name, Object value) {
        this.additionalProperties.put(name, value);
    }

    @Override
    public int hashCode() {
        return new HashCodeBuilder().append(capabilities).append(command).append(cpu).append(entrypointOmitempty).append(env).append(image).append(imagePullPolicy).append(lifecycle).append(livenessProbe).append(memory).append(name).append(ports).append(privileged).append(readinessProbe).append(resources).append(terminationMessagePath).append(volumeMounts).append(workingDir).append(additionalProperties).toHashCode();
    }

    @Override
    public boolean equals(Object other) {
        if (other == this) {
            return true;
        }
        if ((other instanceof Container) == false) {
            return false;
        }
        Container rhs = ((Container) other);
        return new EqualsBuilder().append(capabilities, rhs.capabilities).append(command, rhs.command).append(cpu, rhs.cpu).append(entrypointOmitempty, rhs.entrypointOmitempty).append(env, rhs.env).append(image, rhs.image).append(imagePullPolicy, rhs.imagePullPolicy).append(lifecycle, rhs.lifecycle).append(livenessProbe, rhs.livenessProbe).append(memory, rhs.memory).append(name, rhs.name).append(ports, rhs.ports).append(privileged, rhs.privileged).append(readinessProbe, rhs.readinessProbe).append(resources, rhs.resources).append(terminationMessagePath, rhs.terminationMessagePath).append(volumeMounts, rhs.volumeMounts).append(workingDir, rhs.workingDir).append(additionalProperties, rhs.additionalProperties).isEquals();
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy