io.fabric8.openshift.api.model.BuildSpecFluent Maven / Gradle / Ivy
package io.fabric8.openshift.api.model;
import io.fabric8.kubernetes.api.model.ResourceRequirements;
import java.util.HashMap;
import java.util.Map;
import io.fabric8.common.Nested;
import io.fabric8.common.Builder;
import io.fabric8.kubernetes.api.model.ResourceRequirementsBuilder;
import io.fabric8.common.Fluent;
import io.fabric8.common.Visitable;
import io.fabric8.common.BaseFluent;
import io.fabric8.kubernetes.api.model.ResourceRequirementsFluent;
public class BuildSpecFluent> extends BaseFluent implements Fluent{
BuildOutputBuilder output; ResourceRequirementsBuilder resources; SourceRevisionBuilder revision; BuildSourceBuilder source; BuildStrategyBuilder strategy; Map additionalProperties = new HashMap();
public BuildOutput getOutput(){
return this.output!=null?this.output.build():null;
}
public T withOutput( BuildOutput output){
if (output!=null){ this.output= new BuildOutputBuilder(output); _visitables.add(this.output);} return (T) this;
}
public OutputNested withNewOutput(){
return new OutputNested();
}
public ResourceRequirements getResources(){
return this.resources!=null?this.resources.build():null;
}
public T withResources( ResourceRequirements resources){
if (resources!=null){ this.resources= new ResourceRequirementsBuilder(resources); _visitables.add(this.resources);} return (T) this;
}
public ResourcesNested withNewResources(){
return new ResourcesNested();
}
public SourceRevision getRevision(){
return this.revision!=null?this.revision.build():null;
}
public T withRevision( SourceRevision revision){
if (revision!=null){ this.revision= new SourceRevisionBuilder(revision); _visitables.add(this.revision);} return (T) this;
}
public RevisionNested withNewRevision(){
return new RevisionNested();
}
public BuildSource getSource(){
return this.source!=null?this.source.build():null;
}
public T withSource( BuildSource source){
if (source!=null){ this.source= new BuildSourceBuilder(source); _visitables.add(this.source);} return (T) this;
}
public SourceNested withNewSource(){
return new SourceNested();
}
public BuildStrategy getStrategy(){
return this.strategy!=null?this.strategy.build():null;
}
public T withStrategy( BuildStrategy strategy){
if (strategy!=null){ this.strategy= new BuildStrategyBuilder(strategy); _visitables.add(this.strategy);} return (T) this;
}
public StrategyNested withNewStrategy(){
return new StrategyNested();
}
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 OutputNested extends BuildOutputFluent> implements Nested{
private final BuildOutputBuilder builder = new BuildOutputBuilder(this);
public N endOutput(){
return and();
}
public N and(){
return (N) BuildSpecFluent.this.withOutput(builder.build());
}
}
public class ResourcesNested extends ResourceRequirementsFluent> implements Nested{
private final ResourceRequirementsBuilder builder = new ResourceRequirementsBuilder(this);
public N endResources(){
return and();
}
public N and(){
return (N) BuildSpecFluent.this.withResources(builder.build());
}
}
public class RevisionNested extends SourceRevisionFluent> implements Nested{
private final SourceRevisionBuilder builder = new SourceRevisionBuilder(this);
public N and(){
return (N) BuildSpecFluent.this.withRevision(builder.build());
}
public N endRevision(){
return and();
}
}
public class SourceNested extends BuildSourceFluent> implements Nested{
private final BuildSourceBuilder builder = new BuildSourceBuilder(this);
public N endSource(){
return and();
}
public N and(){
return (N) BuildSpecFluent.this.withSource(builder.build());
}
}
public class StrategyNested extends BuildStrategyFluent> implements Nested{
private final BuildStrategyBuilder builder = new BuildStrategyBuilder(this);
public N endStrategy(){
return and();
}
public N and(){
return (N) BuildSpecFluent.this.withStrategy(builder.build());
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy