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

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

There is a newer version: 0.0.54
Show newest version

package io.fabric8.kubernetes.api.model;

import java.util.HashMap;
import java.util.Map;
import javax.annotation.Generated;
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({
    "externalID",
    "podCIDR",
    "unschedulable"
})
public class NodeSpec {

    /**
     * external ID assigned to the node by some machine database (e.g. a cloud provider). Defaults to node name when empty.
     * 
     */
    @JsonProperty("externalID")
    private String externalID;
    /**
     * pod IP range assigned to the node
     * 
     */
    @JsonProperty("podCIDR")
    private String podCIDR;
    /**
     * disable pod scheduling on the node
     * 
     */
    @JsonProperty("unschedulable")
    private Boolean unschedulable;
    @JsonIgnore
    private Map additionalProperties = new HashMap();

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

    /**
     * 
     * @param podCIDR
     * @param unschedulable
     * @param externalID
     */
    public NodeSpec(String externalID, String podCIDR, Boolean unschedulable) {
        this.externalID = externalID;
        this.podCIDR = podCIDR;
        this.unschedulable = unschedulable;
    }

    /**
     * external ID assigned to the node by some machine database (e.g. a cloud provider). Defaults to node name when empty.
     * 
     * @return
     *     The externalID
     */
    @JsonProperty("externalID")
    public String getExternalID() {
        return externalID;
    }

    /**
     * external ID assigned to the node by some machine database (e.g. a cloud provider). Defaults to node name when empty.
     * 
     * @param externalID
     *     The externalID
     */
    @JsonProperty("externalID")
    public void setExternalID(String externalID) {
        this.externalID = externalID;
    }

    /**
     * pod IP range assigned to the node
     * 
     * @return
     *     The podCIDR
     */
    @JsonProperty("podCIDR")
    public String getPodCIDR() {
        return podCIDR;
    }

    /**
     * pod IP range assigned to the node
     * 
     * @param podCIDR
     *     The podCIDR
     */
    @JsonProperty("podCIDR")
    public void setPodCIDR(String podCIDR) {
        this.podCIDR = podCIDR;
    }

    /**
     * disable pod scheduling on the node
     * 
     * @return
     *     The unschedulable
     */
    @JsonProperty("unschedulable")
    public Boolean getUnschedulable() {
        return unschedulable;
    }

    /**
     * disable pod scheduling on the node
     * 
     * @param unschedulable
     *     The unschedulable
     */
    @JsonProperty("unschedulable")
    public void setUnschedulable(Boolean unschedulable) {
        this.unschedulable = unschedulable;
    }

    @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(externalID).append(podCIDR).append(unschedulable).append(additionalProperties).toHashCode();
    }

    @Override
    public boolean equals(Object other) {
        if (other == this) {
            return true;
        }
        if ((other instanceof NodeSpec) == false) {
            return false;
        }
        NodeSpec rhs = ((NodeSpec) other);
        return new EqualsBuilder().append(externalID, rhs.externalID).append(podCIDR, rhs.podCIDR).append(unschedulable, rhs.unschedulable).append(additionalProperties, rhs.additionalProperties).isEquals();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy