io.fabric8.kubernetes.api.model.ReplicationControllerSpecFluent 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.Builder;
import io.fabric8.common.Fluent;
import io.fabric8.common.BaseFluent;
import io.fabric8.common.Visitable;
public class ReplicationControllerSpecFluent> extends BaseFluent implements Fluent{
Integer replicas; Map selector = new HashMap(); PodTemplateSpecBuilder template; ObjectReferenceBuilder templateRef; Map additionalProperties = new HashMap();
public Integer getReplicas(){
return this.replicas;
}
public T withReplicas( Integer replicas){
this.replicas=replicas; return (T) this;
}
public T addToSelector( String key, String value){
if(key != null && value != null) {this.selector.put(key, value);} return (T)this;
}
public Map getSelector(){
return this.selector;
}
public T withSelector( Map selector){
this.selector.clear();if (selector != null) {this.selector.putAll(selector);} return (T) this;
}
public PodTemplateSpec getTemplate(){
return this.template!=null?this.template.build():null;
}
public T withTemplate( PodTemplateSpec template){
if (template!=null){ this.template= new PodTemplateSpecBuilder(template); _visitables.add(this.template);} return (T) this;
}
public TemplateNested withNewTemplate(){
return new TemplateNested();
}
public ObjectReference getTemplateRef(){
return this.templateRef!=null?this.templateRef.build():null;
}
public T withTemplateRef( ObjectReference templateRef){
if (templateRef!=null){ this.templateRef= new ObjectReferenceBuilder(templateRef); _visitables.add(this.templateRef);} return (T) this;
}
public TemplateRefNested withNewTemplateRef(){
return new TemplateRefNested();
}
public T addToAdditionalProperties( String key, Object value){
if(key != null && value != null) {this.additionalProperties.put(key, value);} 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 class TemplateNested extends PodTemplateSpecFluent> implements Nested{
private final PodTemplateSpecBuilder builder = new PodTemplateSpecBuilder(this);
public N endTemplate(){
return and();
}
public N and(){
return (N) ReplicationControllerSpecFluent.this.withTemplate(builder.build());
}
}
public class TemplateRefNested extends ObjectReferenceFluent> implements Nested{
private final ObjectReferenceBuilder builder = new ObjectReferenceBuilder(this);
public N endTemplateRef(){
return and();
}
public N and(){
return (N) ReplicationControllerSpecFluent.this.withTemplateRef(builder.build());
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy