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

io.dekorate.halkyon.model.ParameterBuilder 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 ParameterBuilder extends ParameterFluentImpl implements VisitableBuilder {

    ParameterFluent fluent;
    Boolean validationEnabled;

    public ParameterBuilder() { 
        this(true);
    }


    public ParameterBuilder(Boolean validationEnabled) { 
        this(new Parameter(), validationEnabled);
    }


    public ParameterBuilder(ParameterFluent fluent) { 
        this(fluent, true);
    }


    public ParameterBuilder(ParameterFluent fluent,Boolean validationEnabled) { 
        this(fluent, new Parameter(), validationEnabled);
    }


    public ParameterBuilder(ParameterFluent fluent,io.dekorate.halkyon.model.Parameter instance) { 
        this(fluent, instance, true);
    }


    public ParameterBuilder(ParameterFluent fluent,io.dekorate.halkyon.model.Parameter instance,Boolean validationEnabled) { 
        this.fluent = fluent; 
        fluent.withName(instance.getName()); 
        fluent.withValue(instance.getValue()); 
        this.validationEnabled = validationEnabled; 
    }


    public ParameterBuilder(io.dekorate.halkyon.model.Parameter instance) { 
        this(instance,true);
    }


    public ParameterBuilder(io.dekorate.halkyon.model.Parameter instance,Boolean validationEnabled) { 
        this.fluent = this; 
        this.withName(instance.getName()); 
        this.withValue(instance.getValue()); 
        this.validationEnabled = validationEnabled; 
    }


    public io.dekorate.halkyon.model.Parameter build() {
        Parameter buildable = new Parameter(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;
        ParameterBuilder that = (ParameterBuilder) 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;
    }

    public int hashCode() {
        return java.util.Objects.hash(fluent,  validationEnabled,  super.hashCode());
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy