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

me.snowdrop.istio.api.model.v1.networking.HTTPFaultInjectionFluentImpl Maven / Gradle / Ivy

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

import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.fabric8.kubernetes.api.builder.Nested;
import java.lang.Integer;
import java.lang.Deprecated;
import javax.validation.Valid;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;

public class HTTPFaultInjectionFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements HTTPFaultInjectionFluent{

    private AbortBuilder abort;
    private DelayBuilder delay;

    public HTTPFaultInjectionFluentImpl(){
    }
    public HTTPFaultInjectionFluentImpl(HTTPFaultInjection instance){
            this.withAbort(instance.getAbort()); 
            this.withDelay(instance.getDelay()); 
    }

    
/**
 * This method has been deprecated, please use method buildAbort instead.
 */
@Deprecated public Abort getAbort(){
            return this.abort!=null?this.abort.build():null;
    }

    public Abort buildAbort(){
            return this.abort!=null?this.abort.build():null;
    }

    public A withAbort(Abort abort){
            _visitables.remove(this.abort);
            if (abort!=null){ this.abort= new AbortBuilder(abort); _visitables.add(this.abort);} return (A) this;
    }

    public Boolean hasAbort(){
            return this.abort != null;
    }

    public A withNewAbort(Object errorType,Integer percent){
            return (A)withAbort(new Abort(errorType, percent));
    }

    public HTTPFaultInjectionFluent.AbortNested withNewAbort(){
            return new AbortNestedImpl();
    }

    public HTTPFaultInjectionFluent.AbortNested withNewAbortLike(Abort item){
            return new AbortNestedImpl(item);
    }

    public HTTPFaultInjectionFluent.AbortNested editAbort(){
            return withNewAbortLike(getAbort());
    }

    public HTTPFaultInjectionFluent.AbortNested editOrNewAbort(){
            return withNewAbortLike(getAbort() != null ? getAbort(): new AbortBuilder().build());
    }

    public HTTPFaultInjectionFluent.AbortNested editOrNewAbortLike(Abort item){
            return withNewAbortLike(getAbort() != null ? getAbort(): item);
    }

    
/**
 * This method has been deprecated, please use method buildDelay instead.
 */
@Deprecated public Delay getDelay(){
            return this.delay!=null?this.delay.build():null;
    }

    public Delay buildDelay(){
            return this.delay!=null?this.delay.build():null;
    }

    public A withDelay(Delay delay){
            _visitables.remove(this.delay);
            if (delay!=null){ this.delay= new DelayBuilder(delay); _visitables.add(this.delay);} return (A) this;
    }

    public Boolean hasDelay(){
            return this.delay != null;
    }

    public A withNewDelay(Object httpDelayType,Integer percent){
            return (A)withDelay(new Delay(httpDelayType, percent));
    }

    public HTTPFaultInjectionFluent.DelayNested withNewDelay(){
            return new DelayNestedImpl();
    }

    public HTTPFaultInjectionFluent.DelayNested withNewDelayLike(Delay item){
            return new DelayNestedImpl(item);
    }

    public HTTPFaultInjectionFluent.DelayNested editDelay(){
            return withNewDelayLike(getDelay());
    }

    public HTTPFaultInjectionFluent.DelayNested editOrNewDelay(){
            return withNewDelayLike(getDelay() != null ? getDelay(): new DelayBuilder().build());
    }

    public HTTPFaultInjectionFluent.DelayNested editOrNewDelayLike(Delay item){
            return withNewDelayLike(getDelay() != null ? getDelay(): item);
    }

    public boolean equals(Object o){
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            if (!super.equals(o)) return false;
            HTTPFaultInjectionFluentImpl that = (HTTPFaultInjectionFluentImpl) o;
            if (abort != null ? !abort.equals(that.abort) :that.abort != null) return false;
            if (delay != null ? !delay.equals(that.delay) :that.delay != null) return false;
            return true;
    }


    public class AbortNestedImpl extends AbortFluentImpl> implements HTTPFaultInjectionFluent.AbortNested,io.fabric8.kubernetes.api.builder.Nested{

            private final AbortBuilder builder;
    
            AbortNestedImpl(Abort item){
                    this.builder = new AbortBuilder(this, item);
            }
            AbortNestedImpl(){
                    this.builder = new AbortBuilder(this);
            }
    
    public N and(){
            return (N) HTTPFaultInjectionFluentImpl.this.withAbort(builder.build());
    }
    public N endAbort(){
            return and();
    }

}
    public class DelayNestedImpl extends DelayFluentImpl> implements HTTPFaultInjectionFluent.DelayNested,io.fabric8.kubernetes.api.builder.Nested{

            private final DelayBuilder builder;
    
            DelayNestedImpl(Delay item){
                    this.builder = new DelayBuilder(this, item);
            }
            DelayNestedImpl(){
                    this.builder = new DelayBuilder(this);
            }
    
    public N and(){
            return (N) HTTPFaultInjectionFluentImpl.this.withDelay(builder.build());
    }
    public N endDelay(){
            return and();
    }

}


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy