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

me.snowdrop.istio.api.networking.v1alpha3.TLSRouteBuilder Maven / Gradle / Ivy

package me.snowdrop.istio.api.networking.v1alpha3;

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

public class TLSRouteBuilder extends TLSRouteFluentImpl implements VisitableBuilder{

    TLSRouteFluent fluent;
    Boolean validationEnabled;
    Validator validator;

    public TLSRouteBuilder(){
            this(true);
    }
    public TLSRouteBuilder(Boolean validationEnabled){
            this(new TLSRoute(), validationEnabled);
    }
    public TLSRouteBuilder(TLSRouteFluent fluent){
            this(fluent, true);
    }
    public TLSRouteBuilder(TLSRouteFluent fluent,Boolean validationEnabled){
            this(fluent, new TLSRoute(), validationEnabled);
    }
    public TLSRouteBuilder(TLSRouteFluent fluent,TLSRoute instance){
            this(fluent, instance, true);
    }
    public TLSRouteBuilder(TLSRouteFluent fluent,TLSRoute instance,Boolean validationEnabled){
            this.fluent = fluent; 
            fluent.withMatch(instance.getMatch()); 
            fluent.withRoute(instance.getRoute()); 
            this.validationEnabled = validationEnabled; 
    }
    public TLSRouteBuilder(TLSRoute instance){
            this(instance,true);
    }
    public TLSRouteBuilder(TLSRoute instance,Boolean validationEnabled){
            this.fluent = this; 
            this.withMatch(instance.getMatch()); 
            this.withRoute(instance.getRoute()); 
            this.validationEnabled = validationEnabled; 
    }
    public TLSRouteBuilder(Validator validator){
            this(new TLSRoute(), true);
    }
    public TLSRouteBuilder(TLSRouteFluent fluent,TLSRoute instance,Validator validator){
            this.fluent = fluent; 
            fluent.withMatch(instance.getMatch()); 
            fluent.withRoute(instance.getRoute()); 
            this.validator = validator;
            this.validationEnabled = validator != null; 
    }
    public TLSRouteBuilder(TLSRoute instance,Validator validator){
            this.fluent = this; 
            this.withMatch(instance.getMatch()); 
            this.withRoute(instance.getRoute()); 
            this.validator = validator; 
            this.validationEnabled = validator != null; 
    }

    public TLSRoute build(){
            TLSRoute buildable = new TLSRoute(fluent.getMatch(),fluent.getRoute());
            if (validationEnabled) {io.fabric8.kubernetes.api.builder.ValidationUtils.validate(buildable);}
            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;
            TLSRouteBuilder that = (TLSRouteBuilder) 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