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

io.dekorate.s2i.config.S2iBuildConfigBuilder Maven / Gradle / Ivy

There is a newer version: 4.1.4
Show newest version
package io.dekorate.s2i.config;

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

public class S2iBuildConfigBuilder extends S2iBuildConfigFluentImpl implements VisitableBuilder{

    S2iBuildConfigFluent fluent;
    Boolean validationEnabled;

    public S2iBuildConfigBuilder(){
            this(true);
    }
    public S2iBuildConfigBuilder(Boolean validationEnabled){
            this(new S2iBuildConfig(), validationEnabled);
    }
    public S2iBuildConfigBuilder(S2iBuildConfigFluent fluent){
            this(fluent, true);
    }
    public S2iBuildConfigBuilder(S2iBuildConfigFluent fluent,Boolean validationEnabled){
            this(fluent, new S2iBuildConfig(), validationEnabled);
    }
    public S2iBuildConfigBuilder(S2iBuildConfigFluent fluent,S2iBuildConfig instance){
            this(fluent, instance, true);
    }
    public S2iBuildConfigBuilder(S2iBuildConfigFluent fluent,S2iBuildConfig instance,Boolean validationEnabled){
            this.fluent = fluent; 
            fluent.withProject(instance.getProject()); 
            fluent.withAttributes(instance.getAttributes()); 
            fluent.withRegistry(instance.getRegistry()); 
            fluent.withGroup(instance.getGroup()); 
            fluent.withName(instance.getName()); 
            fluent.withVersion(instance.getVersion()); 
            fluent.withImage(instance.getImage()); 
            fluent.withDockerFile(instance.getDockerFile()); 
            fluent.withAutoBuildEnabled(instance.isAutoBuildEnabled()); 
            fluent.withAutoPushEnabled(instance.isAutoPushEnabled()); 
            fluent.withEnabled(instance.isEnabled()); 
            fluent.withBuilderImage(instance.getBuilderImage()); 
            fluent.withBuildEnvVars(instance.getBuildEnvVars()); 
            fluent.withAutoDeployEnabled(instance.isAutoDeployEnabled()); 
            this.validationEnabled = validationEnabled; 
    }
    public S2iBuildConfigBuilder(S2iBuildConfig instance){
            this(instance,true);
    }
    public S2iBuildConfigBuilder(S2iBuildConfig instance,Boolean validationEnabled){
            this.fluent = this; 
            this.withProject(instance.getProject()); 
            this.withAttributes(instance.getAttributes()); 
            this.withRegistry(instance.getRegistry()); 
            this.withGroup(instance.getGroup()); 
            this.withName(instance.getName()); 
            this.withVersion(instance.getVersion()); 
            this.withImage(instance.getImage()); 
            this.withDockerFile(instance.getDockerFile()); 
            this.withAutoBuildEnabled(instance.isAutoBuildEnabled()); 
            this.withAutoPushEnabled(instance.isAutoPushEnabled()); 
            this.withEnabled(instance.isEnabled()); 
            this.withBuilderImage(instance.getBuilderImage()); 
            this.withBuildEnvVars(instance.getBuildEnvVars()); 
            this.withAutoDeployEnabled(instance.isAutoDeployEnabled()); 
            this.validationEnabled = validationEnabled; 
    }

    public EditableS2iBuildConfig build(){
            EditableS2iBuildConfig buildable = new EditableS2iBuildConfig(fluent.getProject(),fluent.getAttributes(),fluent.getRegistry(),fluent.getGroup(),fluent.getName(),fluent.getVersion(),fluent.getImage(),fluent.getDockerFile(),fluent.isAutoBuildEnabled(),fluent.isAutoPushEnabled(),fluent.isEnabled(),fluent.getBuilderImage(),fluent.getBuildEnvVars(),fluent.isAutoDeployEnabled());
            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;
            S2iBuildConfigBuilder that = (S2iBuildConfigBuilder) 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 - 2025 Weber Informatics LLC | Privacy Policy