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

annotations.me.snowdrop.istio.api.model.v1.mesh.MeshConfigFluentImpl Maven / Gradle / Ivy

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

import me.snowdrop.istio.api.model.DurationFluentImpl;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.ArrayList;
import me.snowdrop.istio.api.builder.Nested;
import com.fasterxml.jackson.databind.JsonSerializer;
import java.lang.String;
import com.fasterxml.jackson.databind.JsonDeserializer;
import me.snowdrop.istio.api.builder.Predicate;
import java.lang.Deprecated;
import me.snowdrop.istio.api.builder.BaseFluent;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.DeserializationContext;
import java.util.List;
import com.fasterxml.jackson.databind.SerializerProvider;
import java.lang.Boolean;
import java.lang.Override;
import com.fasterxml.jackson.core.JsonParser;
import me.snowdrop.istio.api.model.Duration;
import java.lang.Integer;
import javax.validation.Valid;
import java.lang.Long;
import java.util.Collection;
import java.lang.Object;
import me.snowdrop.istio.api.model.DurationBuilder;

public class MeshConfigFluentImpl> extends me.snowdrop.istio.api.builder.BaseFluent implements MeshConfigFluent{

    private String accessLogFile;
    private Integer authPolicy;
    private DurationBuilder connectTimeout;
    private ProxyConfigBuilder defaultConfig;
    private Boolean disablePolicyChecks;
    private String egressProxyAddress;
    private Boolean enableTracing;
    private String ingressClass;
    private Integer ingressControllerMode;
    private String ingressService;
    private String mixerAddress;
    private List mtlsExcludedServices;
    private Integer proxyHttpPort;
    private Integer proxyListenPort;
    private DurationBuilder rdsRefreshDelay;

    public MeshConfigFluentImpl(){
    }
    public MeshConfigFluentImpl(MeshConfig instance){
            this.withAccessLogFile(instance.getAccessLogFile()); 
            this.withAuthPolicy(instance.getAuthPolicy()); 
            this.withConnectTimeout(instance.getConnectTimeout()); 
            this.withDefaultConfig(instance.getDefaultConfig()); 
            this.withDisablePolicyChecks(instance.getDisablePolicyChecks()); 
            this.withEgressProxyAddress(instance.getEgressProxyAddress()); 
            this.withEnableTracing(instance.getEnableTracing()); 
            this.withIngressClass(instance.getIngressClass()); 
            this.withIngressControllerMode(instance.getIngressControllerMode()); 
            this.withIngressService(instance.getIngressService()); 
            this.withMixerAddress(instance.getMixerAddress()); 
            this.withMtlsExcludedServices(instance.getMtlsExcludedServices()); 
            this.withProxyHttpPort(instance.getProxyHttpPort()); 
            this.withProxyListenPort(instance.getProxyListenPort()); 
            this.withRdsRefreshDelay(instance.getRdsRefreshDelay()); 
    }

    public String getAccessLogFile(){
            return this.accessLogFile;
    }

    public A withAccessLogFile(String accessLogFile){
            this.accessLogFile=accessLogFile; return (A) this;
    }

    public Boolean hasAccessLogFile(){
            return this.accessLogFile != null;
    }

    public Integer getAuthPolicy(){
            return this.authPolicy;
    }

    public A withAuthPolicy(Integer authPolicy){
            this.authPolicy=authPolicy; return (A) this;
    }

    public Boolean hasAuthPolicy(){
            return this.authPolicy != null;
    }

    
/**
 * This method has been deprecated, please use method buildConnectTimeout instead.
 */
@Deprecated public Duration getConnectTimeout(){
            return this.connectTimeout!=null?this.connectTimeout.build():null;
    }

    public Duration buildConnectTimeout(){
            return this.connectTimeout!=null?this.connectTimeout.build():null;
    }

    public A withConnectTimeout(Duration connectTimeout){
            _visitables.remove(this.connectTimeout);
            if (connectTimeout!=null){ this.connectTimeout= new DurationBuilder(connectTimeout); _visitables.add(this.connectTimeout);} return (A) this;
    }

    public Boolean hasConnectTimeout(){
            return this.connectTimeout != null;
    }

    public A withNewConnectTimeout(Integer nanos,Long seconds){
            return (A)withConnectTimeout(new Duration(nanos, seconds));
    }

    public MeshConfigFluent.ConnectTimeoutNested withNewConnectTimeout(){
            return new ConnectTimeoutNestedImpl();
    }

    public MeshConfigFluent.ConnectTimeoutNested withNewConnectTimeoutLike(Duration item){
            return new ConnectTimeoutNestedImpl(item);
    }

    public MeshConfigFluent.ConnectTimeoutNested editConnectTimeout(){
            return withNewConnectTimeoutLike(getConnectTimeout());
    }

    public MeshConfigFluent.ConnectTimeoutNested editOrNewConnectTimeout(){
            return withNewConnectTimeoutLike(getConnectTimeout() != null ? getConnectTimeout(): new DurationBuilder().build());
    }

    public MeshConfigFluent.ConnectTimeoutNested editOrNewConnectTimeoutLike(Duration item){
            return withNewConnectTimeoutLike(getConnectTimeout() != null ? getConnectTimeout(): item);
    }

    
/**
 * This method has been deprecated, please use method buildDefaultConfig instead.
 */
@Deprecated public ProxyConfig getDefaultConfig(){
            return this.defaultConfig!=null?this.defaultConfig.build():null;
    }

    public ProxyConfig buildDefaultConfig(){
            return this.defaultConfig!=null?this.defaultConfig.build():null;
    }

    public A withDefaultConfig(ProxyConfig defaultConfig){
            _visitables.remove(this.defaultConfig);
            if (defaultConfig!=null){ this.defaultConfig= new ProxyConfigBuilder(defaultConfig); _visitables.add(this.defaultConfig);} return (A) this;
    }

    public Boolean hasDefaultConfig(){
            return this.defaultConfig != null;
    }

    public MeshConfigFluent.DefaultConfigNested withNewDefaultConfig(){
            return new DefaultConfigNestedImpl();
    }

    public MeshConfigFluent.DefaultConfigNested withNewDefaultConfigLike(ProxyConfig item){
            return new DefaultConfigNestedImpl(item);
    }

    public MeshConfigFluent.DefaultConfigNested editDefaultConfig(){
            return withNewDefaultConfigLike(getDefaultConfig());
    }

    public MeshConfigFluent.DefaultConfigNested editOrNewDefaultConfig(){
            return withNewDefaultConfigLike(getDefaultConfig() != null ? getDefaultConfig(): new ProxyConfigBuilder().build());
    }

    public MeshConfigFluent.DefaultConfigNested editOrNewDefaultConfigLike(ProxyConfig item){
            return withNewDefaultConfigLike(getDefaultConfig() != null ? getDefaultConfig(): item);
    }

    public Boolean isDisablePolicyChecks(){
            return this.disablePolicyChecks;
    }

    public A withDisablePolicyChecks(Boolean disablePolicyChecks){
            this.disablePolicyChecks=disablePolicyChecks; return (A) this;
    }

    public Boolean hasDisablePolicyChecks(){
            return this.disablePolicyChecks != null;
    }

    public String getEgressProxyAddress(){
            return this.egressProxyAddress;
    }

    public A withEgressProxyAddress(String egressProxyAddress){
            this.egressProxyAddress=egressProxyAddress; return (A) this;
    }

    public Boolean hasEgressProxyAddress(){
            return this.egressProxyAddress != null;
    }

    public Boolean isEnableTracing(){
            return this.enableTracing;
    }

    public A withEnableTracing(Boolean enableTracing){
            this.enableTracing=enableTracing; return (A) this;
    }

    public Boolean hasEnableTracing(){
            return this.enableTracing != null;
    }

    public String getIngressClass(){
            return this.ingressClass;
    }

    public A withIngressClass(String ingressClass){
            this.ingressClass=ingressClass; return (A) this;
    }

    public Boolean hasIngressClass(){
            return this.ingressClass != null;
    }

    public Integer getIngressControllerMode(){
            return this.ingressControllerMode;
    }

    public A withIngressControllerMode(Integer ingressControllerMode){
            this.ingressControllerMode=ingressControllerMode; return (A) this;
    }

    public Boolean hasIngressControllerMode(){
            return this.ingressControllerMode != null;
    }

    public String getIngressService(){
            return this.ingressService;
    }

    public A withIngressService(String ingressService){
            this.ingressService=ingressService; return (A) this;
    }

    public Boolean hasIngressService(){
            return this.ingressService != null;
    }

    public String getMixerAddress(){
            return this.mixerAddress;
    }

    public A withMixerAddress(String mixerAddress){
            this.mixerAddress=mixerAddress; return (A) this;
    }

    public Boolean hasMixerAddress(){
            return this.mixerAddress != null;
    }

    public A addToMtlsExcludedServices(int index,String item){
            if (this.mtlsExcludedServices == null) {this.mtlsExcludedServices = new ArrayList();}
            this.mtlsExcludedServices.add(index, item);
            return (A)this;
    }

    public A setToMtlsExcludedServices(int index,String item){
            this.mtlsExcludedServices.set(index, item); return (A)this;
    }

    public A addToMtlsExcludedServices(String... items){
            for (String item : items) {this.mtlsExcludedServices.add(item);} return (A)this;
    }

    public A addAllToMtlsExcludedServices(Collection items){
            for (String item : items) {this.mtlsExcludedServices.add(item);} return (A)this;
    }

    public A removeFromMtlsExcludedServices(String... items){
            for (String item : items) {if (this.mtlsExcludedServices!= null){ this.mtlsExcludedServices.remove(item);}} return (A)this;
    }

    public A removeAllFromMtlsExcludedServices(Collection items){
            for (String item : items) {if (this.mtlsExcludedServices!= null){ this.mtlsExcludedServices.remove(item);}} return (A)this;
    }

    public List getMtlsExcludedServices(){
            return this.mtlsExcludedServices;
    }

    public String getMtlsExcludedService(int index){
            return this.mtlsExcludedServices.get(index);
    }

    public String getFirstMtlsExcludedService(){
            return this.mtlsExcludedServices.get(0);
    }

    public String getLastMtlsExcludedService(){
            return this.mtlsExcludedServices.get(mtlsExcludedServices.size() - 1);
    }

    public String getMatchingMtlsExcludedService(me.snowdrop.istio.api.builder.Predicate predicate){
            for (String item: mtlsExcludedServices) { if(predicate.apply(item)){return item;} } return null;
    }

    public A withMtlsExcludedServices(List mtlsExcludedServices){
            if (this.mtlsExcludedServices == null) { this.mtlsExcludedServices = new ArrayList();} else {_visitables.removeAll(this.mtlsExcludedServices); this.mtlsExcludedServices.clear();}
            if (mtlsExcludedServices != null) {for (String item : mtlsExcludedServices){this.addToMtlsExcludedServices(item);}} return (A) this;
    }

    public A withMtlsExcludedServices(String... mtlsExcludedServices){
            this.mtlsExcludedServices.clear(); if (mtlsExcludedServices != null) {for (String item :mtlsExcludedServices){ this.addToMtlsExcludedServices(item);}} return (A) this;
    }

    public Boolean hasMtlsExcludedServices(){
            return mtlsExcludedServices != null && !mtlsExcludedServices.isEmpty();
    }

    public Integer getProxyHttpPort(){
            return this.proxyHttpPort;
    }

    public A withProxyHttpPort(Integer proxyHttpPort){
            this.proxyHttpPort=proxyHttpPort; return (A) this;
    }

    public Boolean hasProxyHttpPort(){
            return this.proxyHttpPort != null;
    }

    public Integer getProxyListenPort(){
            return this.proxyListenPort;
    }

    public A withProxyListenPort(Integer proxyListenPort){
            this.proxyListenPort=proxyListenPort; return (A) this;
    }

    public Boolean hasProxyListenPort(){
            return this.proxyListenPort != null;
    }

    
/**
 * This method has been deprecated, please use method buildRdsRefreshDelay instead.
 */
@Deprecated public Duration getRdsRefreshDelay(){
            return this.rdsRefreshDelay!=null?this.rdsRefreshDelay.build():null;
    }

    public Duration buildRdsRefreshDelay(){
            return this.rdsRefreshDelay!=null?this.rdsRefreshDelay.build():null;
    }

    public A withRdsRefreshDelay(Duration rdsRefreshDelay){
            _visitables.remove(this.rdsRefreshDelay);
            if (rdsRefreshDelay!=null){ this.rdsRefreshDelay= new DurationBuilder(rdsRefreshDelay); _visitables.add(this.rdsRefreshDelay);} return (A) this;
    }

    public Boolean hasRdsRefreshDelay(){
            return this.rdsRefreshDelay != null;
    }

    public A withNewRdsRefreshDelay(Integer nanos,Long seconds){
            return (A)withRdsRefreshDelay(new Duration(nanos, seconds));
    }

    public MeshConfigFluent.RdsRefreshDelayNested withNewRdsRefreshDelay(){
            return new RdsRefreshDelayNestedImpl();
    }

    public MeshConfigFluent.RdsRefreshDelayNested withNewRdsRefreshDelayLike(Duration item){
            return new RdsRefreshDelayNestedImpl(item);
    }

    public MeshConfigFluent.RdsRefreshDelayNested editRdsRefreshDelay(){
            return withNewRdsRefreshDelayLike(getRdsRefreshDelay());
    }

    public MeshConfigFluent.RdsRefreshDelayNested editOrNewRdsRefreshDelay(){
            return withNewRdsRefreshDelayLike(getRdsRefreshDelay() != null ? getRdsRefreshDelay(): new DurationBuilder().build());
    }

    public MeshConfigFluent.RdsRefreshDelayNested editOrNewRdsRefreshDelayLike(Duration item){
            return withNewRdsRefreshDelayLike(getRdsRefreshDelay() != null ? getRdsRefreshDelay(): 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;
            MeshConfigFluentImpl that = (MeshConfigFluentImpl) o;
            if (accessLogFile != null ? !accessLogFile.equals(that.accessLogFile) :that.accessLogFile != null) return false;
            if (authPolicy != null ? !authPolicy.equals(that.authPolicy) :that.authPolicy != null) return false;
            if (connectTimeout != null ? !connectTimeout.equals(that.connectTimeout) :that.connectTimeout != null) return false;
            if (defaultConfig != null ? !defaultConfig.equals(that.defaultConfig) :that.defaultConfig != null) return false;
            if (disablePolicyChecks != null ? !disablePolicyChecks.equals(that.disablePolicyChecks) :that.disablePolicyChecks != null) return false;
            if (egressProxyAddress != null ? !egressProxyAddress.equals(that.egressProxyAddress) :that.egressProxyAddress != null) return false;
            if (enableTracing != null ? !enableTracing.equals(that.enableTracing) :that.enableTracing != null) return false;
            if (ingressClass != null ? !ingressClass.equals(that.ingressClass) :that.ingressClass != null) return false;
            if (ingressControllerMode != null ? !ingressControllerMode.equals(that.ingressControllerMode) :that.ingressControllerMode != null) return false;
            if (ingressService != null ? !ingressService.equals(that.ingressService) :that.ingressService != null) return false;
            if (mixerAddress != null ? !mixerAddress.equals(that.mixerAddress) :that.mixerAddress != null) return false;
            if (mtlsExcludedServices != null ? !mtlsExcludedServices.equals(that.mtlsExcludedServices) :that.mtlsExcludedServices != null) return false;
            if (proxyHttpPort != null ? !proxyHttpPort.equals(that.proxyHttpPort) :that.proxyHttpPort != null) return false;
            if (proxyListenPort != null ? !proxyListenPort.equals(that.proxyListenPort) :that.proxyListenPort != null) return false;
            if (rdsRefreshDelay != null ? !rdsRefreshDelay.equals(that.rdsRefreshDelay) :that.rdsRefreshDelay != null) return false;
            return true;
    }


    public class ConnectTimeoutNestedImpl extends DurationFluentImpl> implements MeshConfigFluent.ConnectTimeoutNested,me.snowdrop.istio.api.builder.Nested{

            private final DurationBuilder builder;
    
            ConnectTimeoutNestedImpl(Duration item){
                    this.builder = new DurationBuilder(this, item);
            }
            ConnectTimeoutNestedImpl(){
                    this.builder = new DurationBuilder(this);
            }
    
    public N and(){
            return (N) MeshConfigFluentImpl.this.withConnectTimeout(builder.build());
    }
    public N endConnectTimeout(){
            return and();
    }

}
    public class DefaultConfigNestedImpl extends ProxyConfigFluentImpl> implements MeshConfigFluent.DefaultConfigNested,me.snowdrop.istio.api.builder.Nested{

            private final ProxyConfigBuilder builder;
    
            DefaultConfigNestedImpl(ProxyConfig item){
                    this.builder = new ProxyConfigBuilder(this, item);
            }
            DefaultConfigNestedImpl(){
                    this.builder = new ProxyConfigBuilder(this);
            }
    
    public N and(){
            return (N) MeshConfigFluentImpl.this.withDefaultConfig(builder.build());
    }
    public N endDefaultConfig(){
            return and();
    }

}
    public class RdsRefreshDelayNestedImpl extends DurationFluentImpl> implements MeshConfigFluent.RdsRefreshDelayNested,me.snowdrop.istio.api.builder.Nested{

            private final DurationBuilder builder;
    
            RdsRefreshDelayNestedImpl(Duration item){
                    this.builder = new DurationBuilder(this, item);
            }
            RdsRefreshDelayNestedImpl(){
                    this.builder = new DurationBuilder(this);
            }
    
    public N and(){
            return (N) MeshConfigFluentImpl.this.withRdsRefreshDelay(builder.build());
    }
    public N endRdsRefreshDelay(){
            return and();
    }

}


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy