io.fabric8.kubernetes.api.model.PodTemplate Maven / Gradle / Ivy
package io.fabric8.kubernetes.api.model;
import java.util.HashMap;
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({
"annotations",
"desiredState",
"labels",
"nodeSelector"
})
public class PodTemplate {
/**
* map of string keys and values that can be used by external tooling to store and retrieve arbitrary metadata about pods created from the template
*
*/
@JsonProperty("annotations")
@Valid
private Map annotations;
/**
*
*
*/
@JsonProperty("desiredState")
@Valid
private PodState desiredState;
/**
* map of string keys and values that can be used to organize and categorize the pods created from the template; must match the selector of the replication controller to which the template belongs; may match selectors of services
*
*/
@JsonProperty("labels")
@Valid
private Map labels;
/**
* a selector which must be true for the pod to fit on a node
*
*/
@JsonProperty("nodeSelector")
@Valid
private Map nodeSelector;
@JsonIgnore
private Map additionalProperties = new HashMap();
/**
* No args constructor for use in serialization
*
*/
public PodTemplate() {
}
/**
*
* @param desiredState
* @param labels
* @param annotations
* @param nodeSelector
*/
public PodTemplate(Map annotations, PodState desiredState, Map labels, Map nodeSelector) {
this.annotations = annotations;
this.desiredState = desiredState;
this.labels = labels;
this.nodeSelector = nodeSelector;
}
/**
* map of string keys and values that can be used by external tooling to store and retrieve arbitrary metadata about pods created from the template
*
* @return
* The annotations
*/
@JsonProperty("annotations")
public Map getAnnotations() {
return annotations;
}
/**
* map of string keys and values that can be used by external tooling to store and retrieve arbitrary metadata about pods created from the template
*
* @param annotations
* The annotations
*/
@JsonProperty("annotations")
public void setAnnotations(Map annotations) {
this.annotations = annotations;
}
/**
*
*
* @return
* The desiredState
*/
@JsonProperty("desiredState")
public PodState getDesiredState() {
return desiredState;
}
/**
*
*
* @param desiredState
* The desiredState
*/
@JsonProperty("desiredState")
public void setDesiredState(PodState desiredState) {
this.desiredState = desiredState;
}
/**
* map of string keys and values that can be used to organize and categorize the pods created from the template; must match the selector of the replication controller to which the template belongs; may match selectors of services
*
* @return
* The labels
*/
@JsonProperty("labels")
public Map getLabels() {
return labels;
}
/**
* map of string keys and values that can be used to organize and categorize the pods created from the template; must match the selector of the replication controller to which the template belongs; may match selectors of services
*
* @param labels
* The labels
*/
@JsonProperty("labels")
public void setLabels(Map labels) {
this.labels = labels;
}
/**
* a selector which must be true for the pod to fit on a node
*
* @return
* The nodeSelector
*/
@JsonProperty("nodeSelector")
public Map getNodeSelector() {
return nodeSelector;
}
/**
* a selector which must be true for the pod to fit on a node
*
* @param nodeSelector
* The nodeSelector
*/
@JsonProperty("nodeSelector")
public void setNodeSelector(Map nodeSelector) {
this.nodeSelector = nodeSelector;
}
@Override
public java.lang.String toString() {
return ToStringBuilder.reflectionToString(this);
}
@JsonAnyGetter
public Map getAdditionalProperties() {
return this.additionalProperties;
}
@JsonAnySetter
public void setAdditionalProperty(java.lang.String name, Object value) {
this.additionalProperties.put(name, value);
}
@Override
public int hashCode() {
return new HashCodeBuilder().append(annotations).append(desiredState).append(labels).append(nodeSelector).append(additionalProperties).toHashCode();
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof PodTemplate) == false) {
return false;
}
PodTemplate rhs = ((PodTemplate) other);
return new EqualsBuilder().append(annotations, rhs.annotations).append(desiredState, rhs.desiredState).append(labels, rhs.labels).append(nodeSelector, rhs.nodeSelector).append(additionalProperties, rhs.additionalProperties).isEquals();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy