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

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

There is a newer version: 1.7.7.1
Show newest version
package me.snowdrop.istio.api.networking.v1alpha3;

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

public class HTTPRetryBuilder extends HTTPRetryFluentImpl implements VisitableBuilder{

    HTTPRetryFluent fluent;
    Boolean validationEnabled;

    public HTTPRetryBuilder(){
            this(true);
    }
    public HTTPRetryBuilder(Boolean validationEnabled){
            this(new HTTPRetry(), validationEnabled);
    }
    public HTTPRetryBuilder(HTTPRetryFluent fluent){
            this(fluent, true);
    }
    public HTTPRetryBuilder(HTTPRetryFluent fluent,Boolean validationEnabled){
            this(fluent, new HTTPRetry(), validationEnabled);
    }
    public HTTPRetryBuilder(HTTPRetryFluent fluent,HTTPRetry instance){
            this(fluent, instance, true);
    }
    public HTTPRetryBuilder(HTTPRetryFluent fluent,HTTPRetry instance,Boolean validationEnabled){
            this.fluent = fluent; 
            fluent.withAttempts(instance.getAttempts()); 
            fluent.withPerTryTimeout(instance.getPerTryTimeout()); 
            fluent.withRetryOn(instance.getRetryOn()); 
            fluent.withRetryRemoteLocalities(instance.getRetryRemoteLocalities()); 
            this.validationEnabled = validationEnabled; 
    }
    public HTTPRetryBuilder(HTTPRetry instance){
            this(instance,true);
    }
    public HTTPRetryBuilder(HTTPRetry instance,Boolean validationEnabled){
            this.fluent = this; 
            this.withAttempts(instance.getAttempts()); 
            this.withPerTryTimeout(instance.getPerTryTimeout()); 
            this.withRetryOn(instance.getRetryOn()); 
            this.withRetryRemoteLocalities(instance.getRetryRemoteLocalities()); 
            this.validationEnabled = validationEnabled; 
    }

    public HTTPRetry build(){
            HTTPRetry buildable = new HTTPRetry(fluent.getAttempts(),fluent.getPerTryTimeout(),fluent.getRetryOn(),fluent.getRetryRemoteLocalities());
            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;
            HTTPRetryBuilder that = (HTTPRetryBuilder) 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