io.fabric8.openshift.api.model.BuildConfigSpecFluent 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 java.util.List;
import java.util.ArrayList;
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 BuildConfigSpecFluent> extends BaseFluent implements Fluent{
BuildOutputBuilder output; ResourceRequirementsBuilder resources; SourceRevisionBuilder revision; BuildSourceBuilder source; BuildStrategyBuilder strategy; List triggers = new ArrayList(); 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 addToTriggers( BuildTriggerPolicy item){
if (item != null) {BuildTriggerPolicyBuilder builder = new BuildTriggerPolicyBuilder(item);_visitables.add(builder);this.triggers.add(builder);} return (T)this;
}
public List getTriggers(){
return build(triggers);
}
public T withTriggers( List triggers){
this.triggers.clear();if (triggers != null) {for (BuildTriggerPolicy item : triggers){this.addToTriggers(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 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) BuildConfigSpecFluent.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) BuildConfigSpecFluent.this.withResources(builder.build());
}
}
public class RevisionNested extends SourceRevisionFluent> implements Nested{
private final SourceRevisionBuilder builder = new SourceRevisionBuilder(this);
public N and(){
return (N) BuildConfigSpecFluent.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) BuildConfigSpecFluent.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) BuildConfigSpecFluent.this.withStrategy(builder.build());
}
}
public class TriggersNested extends BuildTriggerPolicyFluent> implements Nested{
private final BuildTriggerPolicyBuilder builder = new BuildTriggerPolicyBuilder(this);
public N endTrigger(){
return and();
}
public N and(){
return (N) BuildConfigSpecFluent.this.addToTriggers(builder.build());
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy