io.fabric8.openshift.api.model.DeploymentConfigSpecFluent Maven / Gradle / Ivy
package io.fabric8.openshift.api.model;
import io.fabric8.kubernetes.api.model.ObjectReference;
import java.util.HashMap;
import java.util.Map;
import java.util.List;
import java.util.ArrayList;
import io.fabric8.kubernetes.api.model.PodTemplateSpec;
import io.fabric8.common.Nested;
import io.fabric8.kubernetes.api.model.PodTemplateSpecBuilder;
import io.fabric8.common.Fluent;
import io.fabric8.kubernetes.api.model.PodTemplateSpecFluent;
import io.fabric8.kubernetes.api.model.ObjectReferenceFluent;
import io.fabric8.kubernetes.api.model.ObjectReferenceBuilder;
public class DeploymentConfigSpecFluent> implements Fluent{
private Integer replicas ;
private Map selector = new HashMap();
private DeploymentStrategy strategy ;
private PodTemplateSpec template ;
private ObjectReference templateRef ;
private List triggers = new ArrayList();
private Map additionalProperties = new HashMap();
public Integer getReplicas(){
return this.replicas;
}
public T withReplicas(Integer replicas){
this.replicas=replicas; 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 DeploymentStrategy getStrategy(){
return this.strategy;
}
public T withStrategy(DeploymentStrategy strategy){
this.strategy=strategy; return (T) this;
}
public PodTemplateSpec getTemplate(){
return this.template;
}
public T withTemplate(PodTemplateSpec template){
this.template=template; return (T) this;
}
public ObjectReference getTemplateRef(){
return this.templateRef;
}
public T withTemplateRef(ObjectReference templateRef){
this.templateRef=templateRef; return (T) this;
}
public List getTriggers(){
return this.triggers;
}
public T withTriggers(List triggers){
this.triggers.clear();if (triggers != null) {this.triggers.addAll(triggers);} 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 addToSelector(String key, String value){
if(key != null && value != null) {this.selector.put(key, value);} return (T)this;
}
public StrategyNested withNewStrategy(){
return new StrategyNested();
}
public TemplateNested withNewTemplate(){
return new TemplateNested();
}
public TemplateRefNested withNewTemplateRef(){
return new TemplateRefNested();
}
public T addToTriggers(DeploymentTriggerPolicy item){
if (item != null) {this.triggers.add(item);} return (T)this;
}
public TriggersNested addNewTrigger(){
return new TriggersNested();
}
public T addToAdditionalProperties(String key, Object value){
if(key != null && value != null) {this.additionalProperties.put(key, value);} return (T)this;
}
public class StrategyNested extends DeploymentStrategyFluent> implements Nested{
private final DeploymentStrategyBuilder builder = new DeploymentStrategyBuilder(this);
public N endStrategy(){
return and();
}
public N and(){
return (N) DeploymentConfigSpecFluent.this.withStrategy(builder.build());
}
}
public class TemplateNested extends PodTemplateSpecFluent> implements Nested{
private final PodTemplateSpecBuilder builder = new PodTemplateSpecBuilder(this);
public N and(){
return (N) DeploymentConfigSpecFluent.this.withTemplate(builder.build());
}
public N endTemplate(){
return and();
}
}
public class TemplateRefNested extends ObjectReferenceFluent> implements Nested{
private final ObjectReferenceBuilder builder = new ObjectReferenceBuilder(this);
public N endTemplateRef(){
return and();
}
public N and(){
return (N) DeploymentConfigSpecFluent.this.withTemplateRef(builder.build());
}
}
public class TriggersNested extends DeploymentTriggerPolicyFluent> implements Nested{
private final DeploymentTriggerPolicyBuilder builder = new DeploymentTriggerPolicyBuilder(this);
public N and(){
return (N) DeploymentConfigSpecFluent.this.addToTriggers(builder.build());
}
public N endTrigger(){
return and();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy