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

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

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

import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import java.lang.Object;
import java.lang.Boolean;

public class MeshConfigBuilder extends MeshConfigFluentImpl implements VisitableBuilder{

    MeshConfigFluent fluent;
    Boolean validationEnabled;

    public MeshConfigBuilder(){
            this(true);
    }
    public MeshConfigBuilder(Boolean validationEnabled){
            this(new MeshConfig(), validationEnabled);
    }
    public MeshConfigBuilder(MeshConfigFluent fluent){
            this(fluent, true);
    }
    public MeshConfigBuilder(MeshConfigFluent fluent,Boolean validationEnabled){
            this(fluent, new MeshConfig(), validationEnabled);
    }
    public MeshConfigBuilder(MeshConfigFluent fluent,MeshConfig instance){
            this(fluent, instance, true);
    }
    public MeshConfigBuilder(MeshConfigFluent fluent,MeshConfig instance,Boolean validationEnabled){
            this.fluent = fluent; 
            fluent.withAccessLogFile(instance.getAccessLogFile()); 
            fluent.withAuthPolicy(instance.getAuthPolicy()); 
            fluent.withConnectTimeout(instance.getConnectTimeout()); 
            fluent.withDefaultConfig(instance.getDefaultConfig()); 
            fluent.withDisablePolicyChecks(instance.getDisablePolicyChecks()); 
            fluent.withEnableTracing(instance.getEnableTracing()); 
            fluent.withIngressClass(instance.getIngressClass()); 
            fluent.withIngressControllerMode(instance.getIngressControllerMode()); 
            fluent.withIngressService(instance.getIngressService()); 
            fluent.withMixerAddress(instance.getMixerAddress()); 
            fluent.withMixerCheckServer(instance.getMixerCheckServer()); 
            fluent.withMixerReportServer(instance.getMixerReportServer()); 
            fluent.withMtlsExcludedServices(instance.getMtlsExcludedServices()); 
            fluent.withOutboundTrafficPolicy(instance.getOutboundTrafficPolicy()); 
            fluent.withProxyHttpPort(instance.getProxyHttpPort()); 
            fluent.withProxyListenPort(instance.getProxyListenPort()); 
            fluent.withRdsRefreshDelay(instance.getRdsRefreshDelay()); 
            this.validationEnabled = validationEnabled; 
    }
    public MeshConfigBuilder(MeshConfig instance){
            this(instance,true);
    }
    public MeshConfigBuilder(MeshConfig instance,Boolean validationEnabled){
            this.fluent = this; 
            this.withAccessLogFile(instance.getAccessLogFile()); 
            this.withAuthPolicy(instance.getAuthPolicy()); 
            this.withConnectTimeout(instance.getConnectTimeout()); 
            this.withDefaultConfig(instance.getDefaultConfig()); 
            this.withDisablePolicyChecks(instance.getDisablePolicyChecks()); 
            this.withEnableTracing(instance.getEnableTracing()); 
            this.withIngressClass(instance.getIngressClass()); 
            this.withIngressControllerMode(instance.getIngressControllerMode()); 
            this.withIngressService(instance.getIngressService()); 
            this.withMixerAddress(instance.getMixerAddress()); 
            this.withMixerCheckServer(instance.getMixerCheckServer()); 
            this.withMixerReportServer(instance.getMixerReportServer()); 
            this.withMtlsExcludedServices(instance.getMtlsExcludedServices()); 
            this.withOutboundTrafficPolicy(instance.getOutboundTrafficPolicy()); 
            this.withProxyHttpPort(instance.getProxyHttpPort()); 
            this.withProxyListenPort(instance.getProxyListenPort()); 
            this.withRdsRefreshDelay(instance.getRdsRefreshDelay()); 
            this.validationEnabled = validationEnabled; 
    }

    public MeshConfig build(){
            MeshConfig buildable = new MeshConfig(fluent.getAccessLogFile(),fluent.getAuthPolicy(),fluent.getConnectTimeout(),fluent.getDefaultConfig(),fluent.isDisablePolicyChecks(),fluent.isEnableTracing(),fluent.getIngressClass(),fluent.getIngressControllerMode(),fluent.getIngressService(),fluent.getMixerAddress(),fluent.getMixerCheckServer(),fluent.getMixerReportServer(),fluent.getMtlsExcludedServices(),fluent.getOutboundTrafficPolicy(),fluent.getProxyHttpPort(),fluent.getProxyListenPort(),fluent.getRdsRefreshDelay());
            io.fabric8.kubernetes.api.builder.ValidationUtils.validate(buildable);
            return buildable;
    }

    public boolean equals(Object o){
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            if (!super.equals(o)) return false;
            MeshConfigBuilder that = (MeshConfigBuilder) o;
            if (fluent != null &&fluent != this ? !fluent.equals(that.fluent) :that.fluent != null &&fluent != this ) return false;

            if (validationEnabled != null ? !validationEnabled.equals(that.validationEnabled) :that.validationEnabled != null) return false;
            return true;
    }




}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy