io.strimzi.api.kafka.model.KafkaMirrorMakerProducerSpecBuilder Maven / Gradle / Ivy
package io.strimzi.api.kafka.model;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import java.lang.Object;
import java.lang.Boolean;
public class KafkaMirrorMakerProducerSpecBuilder extends KafkaMirrorMakerProducerSpecFluentImpl implements VisitableBuilder{
KafkaMirrorMakerProducerSpecFluent> fluent;
Boolean validationEnabled;
public KafkaMirrorMakerProducerSpecBuilder(){
this(true);
}
public KafkaMirrorMakerProducerSpecBuilder(Boolean validationEnabled){
this(new KafkaMirrorMakerProducerSpec(), validationEnabled);
}
public KafkaMirrorMakerProducerSpecBuilder(KafkaMirrorMakerProducerSpecFluent> fluent){
this(fluent, true);
}
public KafkaMirrorMakerProducerSpecBuilder(KafkaMirrorMakerProducerSpecFluent> fluent,Boolean validationEnabled){
this(fluent, new KafkaMirrorMakerProducerSpec(), validationEnabled);
}
public KafkaMirrorMakerProducerSpecBuilder(KafkaMirrorMakerProducerSpecFluent> fluent,KafkaMirrorMakerProducerSpec instance){
this(fluent, instance, true);
}
public KafkaMirrorMakerProducerSpecBuilder(KafkaMirrorMakerProducerSpecFluent> fluent,KafkaMirrorMakerProducerSpec instance,Boolean validationEnabled){
this.fluent = fluent;
fluent.withAbortOnSendFailure(instance.getAbortOnSendFailure());
fluent.withBootstrapServers(instance.getBootstrapServers());
fluent.withConfig(instance.getConfig());
fluent.withTls(instance.getTls());
fluent.withAuthentication(instance.getAuthentication());
this.validationEnabled = validationEnabled;
}
public KafkaMirrorMakerProducerSpecBuilder(KafkaMirrorMakerProducerSpec instance){
this(instance,true);
}
public KafkaMirrorMakerProducerSpecBuilder(KafkaMirrorMakerProducerSpec instance,Boolean validationEnabled){
this.fluent = this;
this.withAbortOnSendFailure(instance.getAbortOnSendFailure());
this.withBootstrapServers(instance.getBootstrapServers());
this.withConfig(instance.getConfig());
this.withTls(instance.getTls());
this.withAuthentication(instance.getAuthentication());
this.validationEnabled = validationEnabled;
}
public KafkaMirrorMakerProducerSpec build(){
KafkaMirrorMakerProducerSpec buildable = new KafkaMirrorMakerProducerSpec();
buildable.setBootstrapServers(fluent.getBootstrapServers());
buildable.setConfig(fluent.getConfig());
buildable.setTls(fluent.getTls());
buildable.setAuthentication(fluent.getAuthentication());
buildable.setAbortOnSendFailure(fluent.isAbortOnSendFailure());
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;
KafkaMirrorMakerProducerSpecBuilder that = (KafkaMirrorMakerProducerSpecBuilder) 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