All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.fabric8.openshift.api.model.BuildSpecFluentImpl Maven / Gradle / Ivy

There is a newer version: 6.13.4
Show newest version
package io.fabric8.openshift.api.model;

import io.fabric8.kubernetes.api.model.ResourceRequirements;
import java.util.Map;
import java.util.Map;
import java.util.HashMap;
import java.io.Serializable;
import java.util.AbstractMap;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import io.fabric8.kubernetes.api.builder.Visitable;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import io.fabric8.kubernetes.api.model.ResourceRequirementsFluentImpl;
import io.fabric8.kubernetes.api.builder.Fluent;
import io.fabric8.kubernetes.api.model.ResourceRequirementsFluent;
import io.fabric8.kubernetes.api.builder.Nested;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import io.fabric8.kubernetes.api.builder.Visitable;
import io.fabric8.kubernetes.api.builder.Builder;
import io.fabric8.kubernetes.api.model.ResourceRequirementsBuilder;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;

public class BuildSpecFluentImpl> extends BaseFluent implements BuildSpecFluent{

     Long completionDeadlineSeconds;     VisitableBuilder output;     VisitableBuilder postCommit;     VisitableBuilder resources;     VisitableBuilder revision;     String serviceAccount;     VisitableBuilder source;     VisitableBuilder strategy;     Map additionalProperties = new HashMap();
public BuildSpecFluentImpl(){
    
}
public BuildSpecFluentImpl( BuildSpec instance ){
    this.withCompletionDeadlineSeconds(instance.getCompletionDeadlineSeconds()); this.withOutput(instance.getOutput()); this.withPostCommit(instance.getPostCommit()); this.withResources(instance.getResources()); this.withRevision(instance.getRevision()); this.withServiceAccount(instance.getServiceAccount()); this.withSource(instance.getSource()); this.withStrategy(instance.getStrategy()); 
}

    public Long getCompletionDeadlineSeconds(){
    return this.completionDeadlineSeconds;
    }
    public T withCompletionDeadlineSeconds( Long completionDeadlineSeconds){
    this.completionDeadlineSeconds=completionDeadlineSeconds; return (T) this;
    }
    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 OutputNestedImpl();
    }
    public OutputNested withNewOutputLike( BuildOutput item){
    return new OutputNestedImpl(item);
    }
    public OutputNested editOutput(){
    return withNewOutputLike(getOutput());
    }
    public BuildPostCommitSpec getPostCommit(){
    return this.postCommit!=null?this.postCommit.build():null;
    }
    public T withPostCommit( BuildPostCommitSpec postCommit){
    if (postCommit!=null){ this.postCommit= new BuildPostCommitSpecBuilder(postCommit); _visitables.add(this.postCommit);} return (T) this;
    }
    public PostCommitNested withNewPostCommit(){
    return new PostCommitNestedImpl();
    }
    public PostCommitNested withNewPostCommitLike( BuildPostCommitSpec item){
    return new PostCommitNestedImpl(item);
    }
    public PostCommitNested editPostCommit(){
    return withNewPostCommitLike(getPostCommit());
    }
    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 ResourcesNestedImpl();
    }
    public ResourcesNested withNewResourcesLike( ResourceRequirements item){
    return new ResourcesNestedImpl(item);
    }
    public ResourcesNested editResources(){
    return withNewResourcesLike(getResources());
    }
    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 RevisionNestedImpl();
    }
    public RevisionNested withNewRevisionLike( SourceRevision item){
    return new RevisionNestedImpl(item);
    }
    public RevisionNested editRevision(){
    return withNewRevisionLike(getRevision());
    }
    public String getServiceAccount(){
    return this.serviceAccount;
    }
    public T withServiceAccount( String serviceAccount){
    this.serviceAccount=serviceAccount; return (T) this;
    }
    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 SourceNestedImpl();
    }
    public SourceNested withNewSourceLike( BuildSource item){
    return new SourceNestedImpl(item);
    }
    public SourceNested editSource(){
    return withNewSourceLike(getSource());
    }
    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 StrategyNestedImpl();
    }
    public StrategyNested withNewStrategyLike( BuildStrategy item){
    return new StrategyNestedImpl(item);
    }
    public StrategyNested editStrategy(){
    return withNewStrategyLike(getStrategy());
    }
    public T addToAdditionalProperties( String key,  Object value){
    if(key != null && value != null) {this.additionalProperties.put(key, value);} return (T)this;
    }
    public T addToAdditionalProperties( Map map){
    if(map != null) { this.additionalProperties.putAll(map);} return (T)this;
    }
    public T removeFromAdditionalProperties( String key){
    if(key != null) {this.additionalProperties.remove(key);} return (T)this;
    }
    public T removeFromAdditionalProperties( Map map){
    if(map != null) { for(Object key : map.keySet()) {this.additionalProperties.remove(key);}} 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 boolean equals( Object o){
    
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
BuildSpecFluentImpl that = (BuildSpecFluentImpl) o;
if (completionDeadlineSeconds != null ? !completionDeadlineSeconds.equals(that.completionDeadlineSeconds) :that.completionDeadlineSeconds != null) return false;
if (output != null ? !output.equals(that.output) :that.output != null) return false;
if (postCommit != null ? !postCommit.equals(that.postCommit) :that.postCommit != null) return false;
if (resources != null ? !resources.equals(that.resources) :that.resources != null) return false;
if (revision != null ? !revision.equals(that.revision) :that.revision != null) return false;
if (serviceAccount != null ? !serviceAccount.equals(that.serviceAccount) :that.serviceAccount != null) return false;
if (source != null ? !source.equals(that.source) :that.source != null) return false;
if (strategy != null ? !strategy.equals(that.strategy) :that.strategy != null) return false;
if (additionalProperties != null ? !additionalProperties.equals(that.additionalProperties) :that.additionalProperties != null) return false;
return true;

    }

    public class OutputNestedImpl extends BuildOutputFluentImpl> implements OutputNested{

        private final BuildOutputBuilder builder;
    
             OutputNestedImpl (){
        this.builder = new BuildOutputBuilder(this);
        }
             OutputNestedImpl ( BuildOutput item){
        this.builder = new BuildOutputBuilder(this, item);
        }
    
            public N endOutput(){
            return and();
        }
            public N and(){
            return (N) BuildSpecFluentImpl.this.withOutput(builder.build());
        }
    
}
    public class PostCommitNestedImpl extends BuildPostCommitSpecFluentImpl> implements PostCommitNested{

        private final BuildPostCommitSpecBuilder builder;
    
             PostCommitNestedImpl (){
        this.builder = new BuildPostCommitSpecBuilder(this);
        }
             PostCommitNestedImpl ( BuildPostCommitSpec item){
        this.builder = new BuildPostCommitSpecBuilder(this, item);
        }
    
            public N and(){
            return (N) BuildSpecFluentImpl.this.withPostCommit(builder.build());
        }
            public N endPostCommit(){
            return and();
        }
    
}
    public class ResourcesNestedImpl extends ResourceRequirementsFluentImpl> implements ResourcesNested{

        private final ResourceRequirementsBuilder builder;
    
             ResourcesNestedImpl (){
        this.builder = new ResourceRequirementsBuilder(this);
        }
             ResourcesNestedImpl ( ResourceRequirements item){
        this.builder = new ResourceRequirementsBuilder(this, item);
        }
    
            public N and(){
            return (N) BuildSpecFluentImpl.this.withResources(builder.build());
        }
            public N endResources(){
            return and();
        }
    
}
    public class RevisionNestedImpl extends SourceRevisionFluentImpl> implements RevisionNested{

        private final SourceRevisionBuilder builder;
    
             RevisionNestedImpl (){
        this.builder = new SourceRevisionBuilder(this);
        }
             RevisionNestedImpl ( SourceRevision item){
        this.builder = new SourceRevisionBuilder(this, item);
        }
    
            public N endRevision(){
            return and();
        }
            public N and(){
            return (N) BuildSpecFluentImpl.this.withRevision(builder.build());
        }
    
}
    public class SourceNestedImpl extends BuildSourceFluentImpl> implements SourceNested{

        private final BuildSourceBuilder builder;
    
             SourceNestedImpl (){
        this.builder = new BuildSourceBuilder(this);
        }
             SourceNestedImpl ( BuildSource item){
        this.builder = new BuildSourceBuilder(this, item);
        }
    
            public N and(){
            return (N) BuildSpecFluentImpl.this.withSource(builder.build());
        }
            public N endSource(){
            return and();
        }
    
}
    public class StrategyNestedImpl extends BuildStrategyFluentImpl> implements StrategyNested{

        private final BuildStrategyBuilder builder;
    
             StrategyNestedImpl (){
        this.builder = new BuildStrategyBuilder(this);
        }
             StrategyNestedImpl ( BuildStrategy item){
        this.builder = new BuildStrategyBuilder(this, item);
        }
    
            public N endStrategy(){
            return and();
        }
            public N and(){
            return (N) BuildSpecFluentImpl.this.withStrategy(builder.build());
        }
    
}


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy