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

me.snowdrop.istio.api.model.v1.routing.RouteRuleBuilder 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 RouteRuleBuilder extends RouteRuleFluentImpl implements VisitableBuilder{

    RouteRuleFluent fluent;
    Boolean validationEnabled;

    public RouteRuleBuilder(){
            this(true);
    }
    public RouteRuleBuilder(Boolean validationEnabled){
            this(new RouteRule(), validationEnabled);
    }
    public RouteRuleBuilder(RouteRuleFluent fluent){
            this(fluent, true);
    }
    public RouteRuleBuilder(RouteRuleFluent fluent,Boolean validationEnabled){
            this(fluent, new RouteRule(), validationEnabled);
    }
    public RouteRuleBuilder(RouteRuleFluent fluent,RouteRule instance){
            this(fluent, instance, true);
    }
    public RouteRuleBuilder(RouteRuleFluent fluent,RouteRule instance,Boolean validationEnabled){
            this.fluent = fluent; 
            fluent.withAppendHeaders(instance.getAppendHeaders()); 
            fluent.withCorsPolicy(instance.getCorsPolicy()); 
            fluent.withDestination(instance.getDestination()); 
            fluent.withHttpFault(instance.getHttpFault()); 
            fluent.withHttpReqRetries(instance.getHttpReqRetries()); 
            fluent.withHttpReqTimeout(instance.getHttpReqTimeout()); 
            fluent.withL4Fault(instance.getL4Fault()); 
            fluent.withMatch(instance.getMatch()); 
            fluent.withMirror(instance.getMirror()); 
            fluent.withPrecedence(instance.getPrecedence()); 
            fluent.withRedirect(instance.getRedirect()); 
            fluent.withRewrite(instance.getRewrite()); 
            fluent.withRoute(instance.getRoute()); 
            fluent.withWebsocketUpgrade(instance.getWebsocketUpgrade()); 
            this.validationEnabled = validationEnabled; 
    }
    public RouteRuleBuilder(RouteRule instance){
            this(instance,true);
    }
    public RouteRuleBuilder(RouteRule instance,Boolean validationEnabled){
            this.fluent = this; 
            this.withAppendHeaders(instance.getAppendHeaders()); 
            this.withCorsPolicy(instance.getCorsPolicy()); 
            this.withDestination(instance.getDestination()); 
            this.withHttpFault(instance.getHttpFault()); 
            this.withHttpReqRetries(instance.getHttpReqRetries()); 
            this.withHttpReqTimeout(instance.getHttpReqTimeout()); 
            this.withL4Fault(instance.getL4Fault()); 
            this.withMatch(instance.getMatch()); 
            this.withMirror(instance.getMirror()); 
            this.withPrecedence(instance.getPrecedence()); 
            this.withRedirect(instance.getRedirect()); 
            this.withRewrite(instance.getRewrite()); 
            this.withRoute(instance.getRoute()); 
            this.withWebsocketUpgrade(instance.getWebsocketUpgrade()); 
            this.validationEnabled = validationEnabled; 
    }

    public RouteRule build(){
            RouteRule buildable = new RouteRule(fluent.getAppendHeaders(),fluent.getCorsPolicy(),fluent.getDestination(),fluent.getHttpFault(),fluent.getHttpReqRetries(),fluent.getHttpReqTimeout(),fluent.getL4Fault(),fluent.getMatch(),fluent.getMirror(),fluent.getPrecedence(),fluent.getRedirect(),fluent.getRewrite(),fluent.getRoute(),fluent.isWebsocketUpgrade());
            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;
            RouteRuleBuilder that = (RouteRuleBuilder) 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