annotations.io.fabric8.kubernetes.api.model.PodTemplateFluent Maven / Gradle / Ivy
package io.fabric8.kubernetes.api.model;
import java.util.HashMap;
import java.util.Map;
import io.fabric8.common.Nested;
import io.fabric8.common.Fluent;
public class PodTemplateFluent> implements Fluent{
private Map annotations = new HashMap();
private PodState desiredState ;
private Map labels = new HashMap();
private Map nodeSelector = new HashMap();
private Map additionalProperties = new HashMap();
public Map getAnnotations(){
return this.annotations;
}
public T withAnnotations(Map annotations){
this.annotations.clear();if (annotations != null) {this.annotations.putAll(annotations);} return (T) this;
}
public PodState getDesiredState(){
return this.desiredState;
}
public T withDesiredState(PodState desiredState){
this.desiredState=desiredState; return (T) this;
}
public Map getLabels(){
return this.labels;
}
public T withLabels(Map labels){
this.labels.clear();if (labels != null) {this.labels.putAll(labels);} return (T) this;
}
public Map getNodeSelector(){
return this.nodeSelector;
}
public T withNodeSelector(Map nodeSelector){
this.nodeSelector.clear();if (nodeSelector != null) {this.nodeSelector.putAll(nodeSelector);} return (T) this;
}
public Map getAdditionalProperties(){
return this.additionalProperties;
}
public T withAdditionalProperties(Map additionalProperties){
this.additionalProperties.clear();if (additionalProperties != null) {this.additionalProperties.putAll(additionalProperties);} return (T) this;
}
public T addToAnnotations(String key, String value){
if(key != null && value != null) {this.annotations.put(key, value);} return (T)this;
}
public DesiredStateNested withNewDesiredState(){
return new DesiredStateNested();
}
public T addToLabels(String key, String value){
if(key != null && value != null) {this.labels.put(key, value);} return (T)this;
}
public T addToNodeSelector(String key, String value){
if(key != null && value != null) {this.nodeSelector.put(key, value);} return (T)this;
}
public T addToAdditionalProperties(String key, Object value){
if(key != null && value != null) {this.additionalProperties.put(key, value);} return (T)this;
}
public class DesiredStateNested extends PodStateFluent> implements Nested{
private final PodStateBuilder builder = new PodStateBuilder(this);
public N endDesiredState(){
return and();
}
public N and(){
return (N) PodTemplateFluent.this.withDesiredState(builder.build());
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy