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

io.dekorate.jib.config.JibBuildConfigBuilder Maven / Gradle / Ivy

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

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

public class JibBuildConfigBuilder extends JibBuildConfigFluentImpl implements VisitableBuilder{

    JibBuildConfigFluent fluent;
    Boolean validationEnabled;

    public JibBuildConfigBuilder(){
            this(true);
    }
    public JibBuildConfigBuilder(Boolean validationEnabled){
            this(new JibBuildConfig(), validationEnabled);
    }
    public JibBuildConfigBuilder(JibBuildConfigFluent fluent){
            this(fluent, true);
    }
    public JibBuildConfigBuilder(JibBuildConfigFluent fluent,Boolean validationEnabled){
            this(fluent, new JibBuildConfig(), validationEnabled);
    }
    public JibBuildConfigBuilder(JibBuildConfigFluent fluent,JibBuildConfig instance){
            this(fluent, instance, true);
    }
    public JibBuildConfigBuilder(JibBuildConfigFluent fluent,JibBuildConfig 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.withDockerBuild(instance.isDockerBuild()); 
            fluent.withFrom(instance.getFrom()); 
            fluent.withAutoDeployEnabled(instance.isAutoDeployEnabled()); 
            this.validationEnabled = validationEnabled; 
    }
    public JibBuildConfigBuilder(JibBuildConfig instance){
            this(instance,true);
    }
    public JibBuildConfigBuilder(JibBuildConfig 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.withDockerBuild(instance.isDockerBuild()); 
            this.withFrom(instance.getFrom()); 
            this.withAutoDeployEnabled(instance.isAutoDeployEnabled()); 
            this.validationEnabled = validationEnabled; 
    }

    public EditableJibBuildConfig build(){
            EditableJibBuildConfig buildable = new EditableJibBuildConfig(fluent.getProject(),fluent.getAttributes(),fluent.getRegistry(),fluent.getGroup(),fluent.getName(),fluent.getVersion(),fluent.getImage(),fluent.getDockerFile(),fluent.isAutoBuildEnabled(),fluent.isAutoPushEnabled(),fluent.isEnabled(),fluent.isDockerBuild(),fluent.getFrom(),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;
            JibBuildConfigBuilder that = (JibBuildConfigBuilder) 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