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

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

package me.snowdrop.istio.api.networking.v1alpha3;

import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import java.io.Serializable;
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.Boolean;
import javax.validation.Valid;
import java.lang.Object;

public class PortTrafficPolicyFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements PortTrafficPolicyFluent{

    private ConnectionPoolSettingsBuilder connectionPool;
    private LoadBalancerSettingsBuilder loadBalancer;
    private OutlierDetectionBuilder outlierDetection;
    private me.snowdrop.istio.api.networking.v1alpha3.PortSelectorBuilder port;
    private TLSSettingsBuilder tls;

    public PortTrafficPolicyFluentImpl(){
    }
    public PortTrafficPolicyFluentImpl(PortTrafficPolicy instance){
            this.withConnectionPool(instance.getConnectionPool()); 
            this.withLoadBalancer(instance.getLoadBalancer()); 
            this.withOutlierDetection(instance.getOutlierDetection()); 
            this.withPort(instance.getPort()); 
            this.withTls(instance.getTls()); 
    }

    
/**
 * This method has been deprecated, please use method buildConnectionPool instead.
 * @return The buildable object.
 */
@Deprecated public ConnectionPoolSettings getConnectionPool(){
            return this.connectionPool!=null?this.connectionPool.build():null;
    }

    public ConnectionPoolSettings buildConnectionPool(){
            return this.connectionPool!=null?this.connectionPool.build():null;
    }

    public A withConnectionPool(ConnectionPoolSettings connectionPool){
            _visitables.remove(this.connectionPool);
            if (connectionPool!=null){ this.connectionPool= new ConnectionPoolSettingsBuilder(connectionPool); _visitables.add(this.connectionPool);} return (A) this;
    }

    public Boolean hasConnectionPool(){
            return this.connectionPool != null;
    }

    public PortTrafficPolicyFluent.ConnectionPoolNested withNewConnectionPool(){
            return new ConnectionPoolNestedImpl();
    }

    public PortTrafficPolicyFluent.ConnectionPoolNested withNewConnectionPoolLike(ConnectionPoolSettings item){
            return new ConnectionPoolNestedImpl(item);
    }

    public PortTrafficPolicyFluent.ConnectionPoolNested editConnectionPool(){
            return withNewConnectionPoolLike(getConnectionPool());
    }

    public PortTrafficPolicyFluent.ConnectionPoolNested editOrNewConnectionPool(){
            return withNewConnectionPoolLike(getConnectionPool() != null ? getConnectionPool(): new ConnectionPoolSettingsBuilder().build());
    }

    public PortTrafficPolicyFluent.ConnectionPoolNested editOrNewConnectionPoolLike(ConnectionPoolSettings item){
            return withNewConnectionPoolLike(getConnectionPool() != null ? getConnectionPool(): item);
    }

    
/**
 * This method has been deprecated, please use method buildLoadBalancer instead.
 * @return The buildable object.
 */
@Deprecated public LoadBalancerSettings getLoadBalancer(){
            return this.loadBalancer!=null?this.loadBalancer.build():null;
    }

    public LoadBalancerSettings buildLoadBalancer(){
            return this.loadBalancer!=null?this.loadBalancer.build():null;
    }

    public A withLoadBalancer(LoadBalancerSettings loadBalancer){
            _visitables.remove(this.loadBalancer);
            if (loadBalancer!=null){ this.loadBalancer= new LoadBalancerSettingsBuilder(loadBalancer); _visitables.add(this.loadBalancer);} return (A) this;
    }

    public Boolean hasLoadBalancer(){
            return this.loadBalancer != null;
    }

    public PortTrafficPolicyFluent.LoadBalancerNested withNewLoadBalancer(){
            return new LoadBalancerNestedImpl();
    }

    public PortTrafficPolicyFluent.LoadBalancerNested withNewLoadBalancerLike(LoadBalancerSettings item){
            return new LoadBalancerNestedImpl(item);
    }

    public PortTrafficPolicyFluent.LoadBalancerNested editLoadBalancer(){
            return withNewLoadBalancerLike(getLoadBalancer());
    }

    public PortTrafficPolicyFluent.LoadBalancerNested editOrNewLoadBalancer(){
            return withNewLoadBalancerLike(getLoadBalancer() != null ? getLoadBalancer(): new LoadBalancerSettingsBuilder().build());
    }

    public PortTrafficPolicyFluent.LoadBalancerNested editOrNewLoadBalancerLike(LoadBalancerSettings item){
            return withNewLoadBalancerLike(getLoadBalancer() != null ? getLoadBalancer(): item);
    }

    
/**
 * This method has been deprecated, please use method buildOutlierDetection instead.
 * @return The buildable object.
 */
@Deprecated public OutlierDetection getOutlierDetection(){
            return this.outlierDetection!=null?this.outlierDetection.build():null;
    }

    public OutlierDetection buildOutlierDetection(){
            return this.outlierDetection!=null?this.outlierDetection.build():null;
    }

    public A withOutlierDetection(OutlierDetection outlierDetection){
            _visitables.remove(this.outlierDetection);
            if (outlierDetection!=null){ this.outlierDetection= new OutlierDetectionBuilder(outlierDetection); _visitables.add(this.outlierDetection);} return (A) this;
    }

    public Boolean hasOutlierDetection(){
            return this.outlierDetection != null;
    }

    public PortTrafficPolicyFluent.OutlierDetectionNested withNewOutlierDetection(){
            return new OutlierDetectionNestedImpl();
    }

    public PortTrafficPolicyFluent.OutlierDetectionNested withNewOutlierDetectionLike(OutlierDetection item){
            return new OutlierDetectionNestedImpl(item);
    }

    public PortTrafficPolicyFluent.OutlierDetectionNested editOutlierDetection(){
            return withNewOutlierDetectionLike(getOutlierDetection());
    }

    public PortTrafficPolicyFluent.OutlierDetectionNested editOrNewOutlierDetection(){
            return withNewOutlierDetectionLike(getOutlierDetection() != null ? getOutlierDetection(): new OutlierDetectionBuilder().build());
    }

    public PortTrafficPolicyFluent.OutlierDetectionNested editOrNewOutlierDetectionLike(OutlierDetection item){
            return withNewOutlierDetectionLike(getOutlierDetection() != null ? getOutlierDetection(): item);
    }

    
/**
 * This method has been deprecated, please use method buildPort instead.
 * @return The buildable object.
 */
@Deprecated public me.snowdrop.istio.api.networking.v1alpha3.PortSelector getPort(){
            return this.port!=null?this.port.build():null;
    }

    public me.snowdrop.istio.api.networking.v1alpha3.PortSelector buildPort(){
            return this.port!=null?this.port.build():null;
    }

    public A withPort(me.snowdrop.istio.api.networking.v1alpha3.PortSelector port){
            _visitables.remove(this.port);
            if (port!=null){ this.port= new me.snowdrop.istio.api.networking.v1alpha3.PortSelectorBuilder(port); _visitables.add(this.port);} return (A) this;
    }

    public Boolean hasPort(){
            return this.port != null;
    }

    public PortTrafficPolicyFluent.PortNested withNewPort(){
            return new PortNestedImpl();
    }

    public PortTrafficPolicyFluent.PortNested withNewPortLike(me.snowdrop.istio.api.networking.v1alpha3.PortSelector item){
            return new PortNestedImpl(item);
    }

    public PortTrafficPolicyFluent.PortNested editPort(){
            return withNewPortLike(getPort());
    }

    public PortTrafficPolicyFluent.PortNested editOrNewPort(){
            return withNewPortLike(getPort() != null ? getPort(): new me.snowdrop.istio.api.networking.v1alpha3.PortSelectorBuilder().build());
    }

    public PortTrafficPolicyFluent.PortNested editOrNewPortLike(me.snowdrop.istio.api.networking.v1alpha3.PortSelector item){
            return withNewPortLike(getPort() != null ? getPort(): item);
    }

    
/**
 * This method has been deprecated, please use method buildTls instead.
 * @return The buildable object.
 */
@Deprecated public TLSSettings getTls(){
            return this.tls!=null?this.tls.build():null;
    }

    public TLSSettings buildTls(){
            return this.tls!=null?this.tls.build():null;
    }

    public A withTls(TLSSettings tls){
            _visitables.remove(this.tls);
            if (tls!=null){ this.tls= new TLSSettingsBuilder(tls); _visitables.add(this.tls);} return (A) this;
    }

    public Boolean hasTls(){
            return this.tls != null;
    }

    public PortTrafficPolicyFluent.TlsNested withNewTls(){
            return new TlsNestedImpl();
    }

    public PortTrafficPolicyFluent.TlsNested withNewTlsLike(TLSSettings item){
            return new TlsNestedImpl(item);
    }

    public PortTrafficPolicyFluent.TlsNested editTls(){
            return withNewTlsLike(getTls());
    }

    public PortTrafficPolicyFluent.TlsNested editOrNewTls(){
            return withNewTlsLike(getTls() != null ? getTls(): new TLSSettingsBuilder().build());
    }

    public PortTrafficPolicyFluent.TlsNested editOrNewTlsLike(TLSSettings item){
            return withNewTlsLike(getTls() != null ? getTls(): 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;
            PortTrafficPolicyFluentImpl that = (PortTrafficPolicyFluentImpl) o;
            if (connectionPool != null ? !connectionPool.equals(that.connectionPool) :that.connectionPool != null) return false;
            if (loadBalancer != null ? !loadBalancer.equals(that.loadBalancer) :that.loadBalancer != null) return false;
            if (outlierDetection != null ? !outlierDetection.equals(that.outlierDetection) :that.outlierDetection != null) return false;
            if (port != null ? !port.equals(that.port) :that.port != null) return false;
            if (tls != null ? !tls.equals(that.tls) :that.tls != null) return false;
            return true;
    }


    public class ConnectionPoolNestedImpl extends ConnectionPoolSettingsFluentImpl> implements PortTrafficPolicyFluent.ConnectionPoolNested,io.fabric8.kubernetes.api.builder.Nested{

            private final ConnectionPoolSettingsBuilder builder;
    
            ConnectionPoolNestedImpl(ConnectionPoolSettings item){
                    this.builder = new ConnectionPoolSettingsBuilder(this, item);
            }
            ConnectionPoolNestedImpl(){
                    this.builder = new ConnectionPoolSettingsBuilder(this);
            }
    
    public N and(){
            return (N) PortTrafficPolicyFluentImpl.this.withConnectionPool(builder.build());
    }
    public N endConnectionPool(){
            return and();
    }

}
    public class LoadBalancerNestedImpl extends LoadBalancerSettingsFluentImpl> implements PortTrafficPolicyFluent.LoadBalancerNested,io.fabric8.kubernetes.api.builder.Nested{

            private final LoadBalancerSettingsBuilder builder;
    
            LoadBalancerNestedImpl(LoadBalancerSettings item){
                    this.builder = new LoadBalancerSettingsBuilder(this, item);
            }
            LoadBalancerNestedImpl(){
                    this.builder = new LoadBalancerSettingsBuilder(this);
            }
    
    public N and(){
            return (N) PortTrafficPolicyFluentImpl.this.withLoadBalancer(builder.build());
    }
    public N endLoadBalancer(){
            return and();
    }

}
    public class OutlierDetectionNestedImpl extends OutlierDetectionFluentImpl> implements PortTrafficPolicyFluent.OutlierDetectionNested,io.fabric8.kubernetes.api.builder.Nested{

            private final OutlierDetectionBuilder builder;
    
            OutlierDetectionNestedImpl(OutlierDetection item){
                    this.builder = new OutlierDetectionBuilder(this, item);
            }
            OutlierDetectionNestedImpl(){
                    this.builder = new OutlierDetectionBuilder(this);
            }
    
    public N and(){
            return (N) PortTrafficPolicyFluentImpl.this.withOutlierDetection(builder.build());
    }
    public N endOutlierDetection(){
            return and();
    }

}
    public class PortNestedImpl extends me.snowdrop.istio.api.networking.v1alpha3.PortSelectorFluentImpl> implements PortTrafficPolicyFluent.PortNested,io.fabric8.kubernetes.api.builder.Nested{

            private final me.snowdrop.istio.api.networking.v1alpha3.PortSelectorBuilder builder;
    
            PortNestedImpl(me.snowdrop.istio.api.networking.v1alpha3.PortSelector item){
                    this.builder = new me.snowdrop.istio.api.networking.v1alpha3.PortSelectorBuilder(this, item);
            }
            PortNestedImpl(){
                    this.builder = new me.snowdrop.istio.api.networking.v1alpha3.PortSelectorBuilder(this);
            }
    
    public N and(){
            return (N) PortTrafficPolicyFluentImpl.this.withPort(builder.build());
    }
    public N endPort(){
            return and();
    }

}
    public class TlsNestedImpl extends TLSSettingsFluentImpl> implements PortTrafficPolicyFluent.TlsNested,io.fabric8.kubernetes.api.builder.Nested{

            private final TLSSettingsBuilder builder;
    
            TlsNestedImpl(TLSSettings item){
                    this.builder = new TLSSettingsBuilder(this, item);
            }
            TlsNestedImpl(){
                    this.builder = new TLSSettingsBuilder(this);
            }
    
    public N and(){
            return (N) PortTrafficPolicyFluentImpl.this.withTls(builder.build());
    }
    public N endTls(){
            return and();
    }

}


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy