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

io.dekorate.halkyon.model.EnvBuilder Maven / Gradle / Ivy

There is a newer version: 2.0.0.beta2
Show newest version
package io.dekorate.halkyon.model;

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

public class EnvBuilder extends EnvFluentImpl implements VisitableBuilder{

    EnvFluent fluent;
    Boolean validationEnabled;

    public EnvBuilder(){
            this(true);
    }
    public EnvBuilder(Boolean validationEnabled){
            this(new Env(), validationEnabled);
    }
    public EnvBuilder(EnvFluent fluent){
            this(fluent, true);
    }
    public EnvBuilder(EnvFluent fluent,Boolean validationEnabled){
            this(fluent, new Env(), validationEnabled);
    }
    public EnvBuilder(EnvFluent fluent,Env instance){
            this(fluent, instance, true);
    }
    public EnvBuilder(EnvFluent fluent,Env instance,Boolean validationEnabled){
            this.fluent = fluent; 
            fluent.withName(instance.getName()); 
            fluent.withValue(instance.getValue()); 
            this.validationEnabled = validationEnabled; 
    }
    public EnvBuilder(Env instance){
            this(instance,true);
    }
    public EnvBuilder(Env instance,Boolean validationEnabled){
            this.fluent = this; 
            this.withName(instance.getName()); 
            this.withValue(instance.getValue()); 
            this.validationEnabled = validationEnabled; 
    }

    public Env build(){
            Env buildable = new Env(fluent.getName(),fluent.getValue());
            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;
            EnvBuilder that = (EnvBuilder) 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