me.snowdrop.istio.adapter.kubernetesenv.KubernetesenvBuilder Maven / Gradle / Ivy
package me.snowdrop.istio.adapter.kubernetesenv;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import java.lang.Object;
import java.lang.Boolean;
public class KubernetesenvBuilder extends KubernetesenvFluentImpl implements VisitableBuilder{
KubernetesenvFluent> fluent;
Boolean validationEnabled;
public KubernetesenvBuilder(){
this(true);
}
public KubernetesenvBuilder(Boolean validationEnabled){
this(new Kubernetesenv(), validationEnabled);
}
public KubernetesenvBuilder(KubernetesenvFluent> fluent){
this(fluent, true);
}
public KubernetesenvBuilder(KubernetesenvFluent> fluent,Boolean validationEnabled){
this(fluent, new Kubernetesenv(), validationEnabled);
}
public KubernetesenvBuilder(KubernetesenvFluent> fluent,Kubernetesenv instance){
this(fluent, instance, true);
}
public KubernetesenvBuilder(KubernetesenvFluent> fluent,Kubernetesenv instance,Boolean validationEnabled){
this.fluent = fluent;
fluent.withCacheRefreshDuration(instance.getCacheRefreshDuration());
fluent.withClusterDomainName(instance.getClusterDomainName());
fluent.withFullyQualifiedIstioIngressServiceName(instance.getFullyQualifiedIstioIngressServiceName());
fluent.withKubeconfigPath(instance.getKubeconfigPath());
fluent.withLookupIngressSourceAndOriginValues(instance.getLookupIngressSourceAndOriginValues());
fluent.withPodLabelForIstioComponentService(instance.getPodLabelForIstioComponentService());
fluent.withPodLabelForService(instance.getPodLabelForService());
this.validationEnabled = validationEnabled;
}
public KubernetesenvBuilder(Kubernetesenv instance){
this(instance,true);
}
public KubernetesenvBuilder(Kubernetesenv instance,Boolean validationEnabled){
this.fluent = this;
this.withCacheRefreshDuration(instance.getCacheRefreshDuration());
this.withClusterDomainName(instance.getClusterDomainName());
this.withFullyQualifiedIstioIngressServiceName(instance.getFullyQualifiedIstioIngressServiceName());
this.withKubeconfigPath(instance.getKubeconfigPath());
this.withLookupIngressSourceAndOriginValues(instance.getLookupIngressSourceAndOriginValues());
this.withPodLabelForIstioComponentService(instance.getPodLabelForIstioComponentService());
this.withPodLabelForService(instance.getPodLabelForService());
this.validationEnabled = validationEnabled;
}
public Kubernetesenv build(){
Kubernetesenv buildable = new Kubernetesenv(fluent.getCacheRefreshDuration(),fluent.getClusterDomainName(),fluent.getFullyQualifiedIstioIngressServiceName(),fluent.getKubeconfigPath(),fluent.isLookupIngressSourceAndOriginValues(),fluent.getPodLabelForIstioComponentService(),fluent.getPodLabelForService());
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;
KubernetesenvBuilder that = (KubernetesenvBuilder) 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