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

me.snowdrop.istio.api.authentication.v1alpha1.PeerAuthenticationMethodFluentImpl Maven / Gradle / Ivy

package me.snowdrop.istio.api.authentication.v1alpha1;

import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.fabric8.kubernetes.api.builder.Nested;
import java.lang.Deprecated;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.lang.Object;
import com.fasterxml.jackson.annotation.JsonUnwrapped;
import java.lang.Boolean;

public class PeerAuthenticationMethodFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements PeerAuthenticationMethodFluent{

    private VisitableBuilder params;

    public PeerAuthenticationMethodFluentImpl(){
    }
    public PeerAuthenticationMethodFluentImpl(PeerAuthenticationMethod instance){
            this.withParams(instance.getParams()); 
    }

    
/**
 * This method has been deprecated, please use method buildParams instead.
 * @return The buildable object.
 */
@Deprecated public me.snowdrop.istio.api.authentication.v1alpha1.PeerAuthenticationMethod.Params getParams(){
            return this.params!=null?this.params.build():null;
    }

    public me.snowdrop.istio.api.authentication.v1alpha1.PeerAuthenticationMethod.Params buildParams(){
            return this.params!=null?this.params.build():null;
    }

    public A withParams(me.snowdrop.istio.api.authentication.v1alpha1.PeerAuthenticationMethod.Params params){
            if (params instanceof JwtParams){ this.params= new JwtParamsBuilder((JwtParams)params); _visitables.add(this.params);}
            if (params instanceof MtlsParams){ this.params= new MtlsParamsBuilder((MtlsParams)params); _visitables.add(this.params);}
            return (A) this;
    }

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

    public A withJwtParams(JwtParams jwtParams){
            _visitables.remove(this.params);
            if (jwtParams!=null){ this.params= new JwtParamsBuilder(jwtParams); _visitables.add(this.params);} return (A) this;
    }

    public PeerAuthenticationMethodFluent.JwtParamsNested withNewJwtParams(){
            return new JwtParamsNestedImpl();
    }

    public PeerAuthenticationMethodFluent.JwtParamsNested withNewJwtParamsLike(JwtParams item){
            return new JwtParamsNestedImpl(item);
    }

    public A withMtlsParams(MtlsParams mtlsParams){
            _visitables.remove(this.params);
            if (mtlsParams!=null){ this.params= new MtlsParamsBuilder(mtlsParams); _visitables.add(this.params);} return (A) this;
    }

    public PeerAuthenticationMethodFluent.MtlsParamsNested withNewMtlsParams(){
            return new MtlsParamsNestedImpl();
    }

    public PeerAuthenticationMethodFluent.MtlsParamsNested withNewMtlsParamsLike(MtlsParams item){
            return new MtlsParamsNestedImpl(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;
            PeerAuthenticationMethodFluentImpl that = (PeerAuthenticationMethodFluentImpl) o;
            if (params != null ? !params.equals(that.params) :that.params != null) return false;
            return true;
    }


    public class JwtParamsNestedImpl extends JwtParamsFluentImpl> implements PeerAuthenticationMethodFluent.JwtParamsNested,io.fabric8.kubernetes.api.builder.Nested{

            private final JwtParamsBuilder builder;
    
            JwtParamsNestedImpl(JwtParams item){
                    this.builder = new JwtParamsBuilder(this, item);
            }
            JwtParamsNestedImpl(){
                    this.builder = new JwtParamsBuilder(this);
            }
    
    public N and(){
            return (N) PeerAuthenticationMethodFluentImpl.this.withJwtParams(builder.build());
    }
    public N endJwtParams(){
            return and();
    }

}
    public class MtlsParamsNestedImpl extends MtlsParamsFluentImpl> implements PeerAuthenticationMethodFluent.MtlsParamsNested,io.fabric8.kubernetes.api.builder.Nested{

            private final MtlsParamsBuilder builder;
    
            MtlsParamsNestedImpl(MtlsParams item){
                    this.builder = new MtlsParamsBuilder(this, item);
            }
            MtlsParamsNestedImpl(){
                    this.builder = new MtlsParamsBuilder(this);
            }
    
    public N and(){
            return (N) PeerAuthenticationMethodFluentImpl.this.withMtlsParams(builder.build());
    }
    public N endMtlsParams(){
            return and();
    }

}


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy