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

me.snowdrop.istio.mixer.adapter.bypass.BypassSpecFluentImpl Maven / Gradle / Ivy

package me.snowdrop.istio.mixer.adapter.bypass;

import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.fabric8.kubernetes.api.builder.Nested;
import java.lang.String;
import me.snowdrop.istio.api.Any;
import java.lang.Deprecated;
import javax.validation.Valid;
import me.snowdrop.istio.api.AnyBuilder;
import me.snowdrop.istio.api.AnyFluentImpl;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;

public class BypassSpecFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements BypassSpecFluent{

    private String backendAddress;
    private AnyBuilder params;
    private Boolean sessionBased;

    public BypassSpecFluentImpl(){
    }
    public BypassSpecFluentImpl(BypassSpec instance){
            this.withBackendAddress(instance.getBackendAddress()); 
            this.withParams(instance.getParams()); 
            this.withSessionBased(instance.getSessionBased()); 
    }

    public String getBackendAddress(){
            return this.backendAddress;
    }

    public A withBackendAddress(String backendAddress){
            this.backendAddress=backendAddress; return (A) this;
    }

    public Boolean hasBackendAddress(){
            return this.backendAddress != null;
    }

    
/**
 * This method has been deprecated, please use method buildParams instead.
 * @return The buildable object.
 */
@Deprecated public Any getParams(){
            return this.params!=null?this.params.build():null;
    }

    public Any buildParams(){
            return this.params!=null?this.params.build():null;
    }

    public A withParams(Any params){
            _visitables.remove(this.params);
            if (params!=null){ this.params= new AnyBuilder(params); _visitables.add(this.params);} return (A) this;
    }

    public Boolean hasParams(){
            return this.params != null;
    }

    public A withNewParams(String typeUrl,String value){
            return (A)withParams(new Any(typeUrl, value));
    }

    public BypassSpecFluent.ParamsNested withNewParams(){
            return new ParamsNestedImpl();
    }

    public BypassSpecFluent.ParamsNested withNewParamsLike(Any item){
            return new ParamsNestedImpl(item);
    }

    public BypassSpecFluent.ParamsNested editParams(){
            return withNewParamsLike(getParams());
    }

    public BypassSpecFluent.ParamsNested editOrNewParams(){
            return withNewParamsLike(getParams() != null ? getParams(): new AnyBuilder().build());
    }

    public BypassSpecFluent.ParamsNested editOrNewParamsLike(Any item){
            return withNewParamsLike(getParams() != null ? getParams(): item);
    }

    public Boolean isSessionBased(){
            return this.sessionBased;
    }

    public A withSessionBased(Boolean sessionBased){
            this.sessionBased=sessionBased; return (A) this;
    }

    public Boolean hasSessionBased(){
            return this.sessionBased != null;
    }

    public A withNewSessionBased(String arg1){
            return (A)withSessionBased(new Boolean(arg1));
    }

    public A withNewSessionBased(boolean arg1){
            return (A)withSessionBased(new Boolean(arg1));
    }

    public boolean equals(Object o){
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            if (!super.equals(o)) return false;
            BypassSpecFluentImpl that = (BypassSpecFluentImpl) o;
            if (backendAddress != null ? !backendAddress.equals(that.backendAddress) :that.backendAddress != null) return false;
            if (params != null ? !params.equals(that.params) :that.params != null) return false;
            if (sessionBased != null ? !sessionBased.equals(that.sessionBased) :that.sessionBased != null) return false;
            return true;
    }


    public class ParamsNestedImpl extends AnyFluentImpl> implements BypassSpecFluent.ParamsNested,io.fabric8.kubernetes.api.builder.Nested{

            private final AnyBuilder builder;
    
            ParamsNestedImpl(Any item){
                    this.builder = new AnyBuilder(this, item);
            }
            ParamsNestedImpl(){
                    this.builder = new AnyBuilder(this);
            }
    
    public N and(){
            return (N) BypassSpecFluentImpl.this.withParams(builder.build());
    }
    public N endParams(){
            return and();
    }

}


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy