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

annotations.io.alauda.kubernetes.api.model.MultiBranchPipelineBuilder Maven / Gradle / Ivy

There is a newer version: 0.2.12
Show newest version
package io.alauda.kubernetes.api.model;

import io.alauda.kubernetes.api.builder.VisitableBuilder;
import java.lang.Object;
import java.lang.Boolean;

public class MultiBranchPipelineBuilder extends MultiBranchPipelineFluentImpl implements VisitableBuilder{

    MultiBranchPipelineFluent fluent;
    Boolean validationEnabled;

    public MultiBranchPipelineBuilder(){
            this(true);
    }
    public MultiBranchPipelineBuilder(Boolean validationEnabled){
            this(new MultiBranchPipeline(), validationEnabled);
    }
    public MultiBranchPipelineBuilder(MultiBranchPipelineFluent fluent){
            this(fluent, true);
    }
    public MultiBranchPipelineBuilder(MultiBranchPipelineFluent fluent,Boolean validationEnabled){
            this(fluent, new MultiBranchPipeline(), validationEnabled);
    }
    public MultiBranchPipelineBuilder(MultiBranchPipelineFluent fluent,MultiBranchPipeline instance){
            this(fluent, instance, true);
    }
    public MultiBranchPipelineBuilder(MultiBranchPipelineFluent fluent,MultiBranchPipeline instance,Boolean validationEnabled){
            this.fluent = fluent; 
            fluent.withBehaviours(instance.getBehaviours()); 
            fluent.withOrphaned(instance.getOrphaned()); 
            this.validationEnabled = validationEnabled; 
    }
    public MultiBranchPipelineBuilder(MultiBranchPipeline instance){
            this(instance,true);
    }
    public MultiBranchPipelineBuilder(MultiBranchPipeline instance,Boolean validationEnabled){
            this.fluent = this; 
            this.withBehaviours(instance.getBehaviours()); 
            this.withOrphaned(instance.getOrphaned()); 
            this.validationEnabled = validationEnabled; 
    }

    public MultiBranchPipeline build(){
            MultiBranchPipeline buildable = new MultiBranchPipeline(fluent.getBehaviours(),fluent.getOrphaned());
            io.alauda.kubernetes.api.builder.ValidationUtils.validate(buildable);
            return buildable;
    }

    public boolean equals(Object o){
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            if (!super.equals(o)) return false;
            MultiBranchPipelineBuilder that = (MultiBranchPipelineBuilder) o;
            if (fluent != null &&fluent != this ? !fluent.equals(that.fluent) :that.fluent != null &&fluent != this ) return false;

            if (validationEnabled != null ? !validationEnabled.equals(that.validationEnabled) :that.validationEnabled != null) return false;
            return true;
    }




}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy