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

me.snowdrop.istio.api.model.v1.routing.AbortBuilder Maven / Gradle / Ivy

package me.snowdrop.istio.api.model.v1.routing;

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

public class AbortBuilder extends me.snowdrop.istio.api.model.v1.routing.AbortFluentImpl implements VisitableBuilder{

    me.snowdrop.istio.api.model.v1.routing.AbortFluent fluent;
    Boolean validationEnabled;

    public AbortBuilder(){
            this(true);
    }
    public AbortBuilder(Boolean validationEnabled){
            this(new Abort(), validationEnabled);
    }
    public AbortBuilder(me.snowdrop.istio.api.model.v1.routing.AbortFluent fluent){
            this(fluent, true);
    }
    public AbortBuilder(me.snowdrop.istio.api.model.v1.routing.AbortFluent fluent,Boolean validationEnabled){
            this(fluent, new Abort(), validationEnabled);
    }
    public AbortBuilder(me.snowdrop.istio.api.model.v1.routing.AbortFluent fluent,me.snowdrop.istio.api.model.v1.routing.Abort instance){
            this(fluent, instance, true);
    }
    public AbortBuilder(me.snowdrop.istio.api.model.v1.routing.AbortFluent fluent,me.snowdrop.istio.api.model.v1.routing.Abort instance,Boolean validationEnabled){
            this.fluent = fluent; 
            fluent.withErrorType(instance.getErrorType()); 
            fluent.withOverrideHeaderName(instance.getOverrideHeaderName()); 
            fluent.withPercent(instance.getPercent()); 
            this.validationEnabled = validationEnabled; 
    }
    public AbortBuilder(me.snowdrop.istio.api.model.v1.routing.Abort instance){
            this(instance,true);
    }
    public AbortBuilder(me.snowdrop.istio.api.model.v1.routing.Abort instance,Boolean validationEnabled){
            this.fluent = this; 
            this.withErrorType(instance.getErrorType()); 
            this.withOverrideHeaderName(instance.getOverrideHeaderName()); 
            this.withPercent(instance.getPercent()); 
            this.validationEnabled = validationEnabled; 
    }

    public me.snowdrop.istio.api.model.v1.routing.Abort build(){
            Abort buildable = new Abort(fluent.getErrorType(),fluent.getOverrideHeaderName(),fluent.getPercent());
            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;
            AbortBuilder that = (AbortBuilder) 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