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

me.snowdrop.istio.api.AnyBuilder Maven / Gradle / Ivy

The newest version!
package me.snowdrop.istio.api;

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

public class AnyBuilder extends AnyFluentImpl implements VisitableBuilder{

    AnyFluent fluent;
    Boolean validationEnabled;

    public AnyBuilder(){
            this(true);
    }
    public AnyBuilder(Boolean validationEnabled){
            this(new Any(), validationEnabled);
    }
    public AnyBuilder(AnyFluent fluent){
            this(fluent, true);
    }
    public AnyBuilder(AnyFluent fluent,Boolean validationEnabled){
            this(fluent, new Any(), validationEnabled);
    }
    public AnyBuilder(AnyFluent fluent,Any instance){
            this(fluent, instance, true);
    }
    public AnyBuilder(AnyFluent fluent,Any instance,Boolean validationEnabled){
            this.fluent = fluent; 
            fluent.withTypeUrl(instance.getTypeUrl()); 
            fluent.withValue(instance.getValue()); 
            this.validationEnabled = validationEnabled; 
    }
    public AnyBuilder(Any instance){
            this(instance,true);
    }
    public AnyBuilder(Any instance,Boolean validationEnabled){
            this.fluent = this; 
            this.withTypeUrl(instance.getTypeUrl()); 
            this.withValue(instance.getValue()); 
            this.validationEnabled = validationEnabled; 
    }

    public Any build(){
            Any buildable = new Any(fluent.getTypeUrl(),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;
            AnyBuilder that = (AnyBuilder) 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