zipkin.finagle.kafka.AutoValue_KafkaZipkinTracer_Config Maven / Gradle / Ivy
The newest version!
package zipkin.finagle.kafka;
import javax.annotation.Generated;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_KafkaZipkinTracer_Config extends KafkaZipkinTracer.Config {
private final float initialSampleRate;
private final String bootstrapServers;
private final String topic;
private AutoValue_KafkaZipkinTracer_Config(
float initialSampleRate,
String bootstrapServers,
String topic) {
this.initialSampleRate = initialSampleRate;
this.bootstrapServers = bootstrapServers;
this.topic = topic;
}
@Override
public float initialSampleRate() {
return initialSampleRate;
}
@Override
String bootstrapServers() {
return bootstrapServers;
}
@Override
String topic() {
return topic;
}
@Override
public String toString() {
return "Config{"
+ "initialSampleRate=" + initialSampleRate + ", "
+ "bootstrapServers=" + bootstrapServers + ", "
+ "topic=" + topic
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof KafkaZipkinTracer.Config) {
KafkaZipkinTracer.Config that = (KafkaZipkinTracer.Config) o;
return (Float.floatToIntBits(this.initialSampleRate) == Float.floatToIntBits(that.initialSampleRate()))
&& (this.bootstrapServers.equals(that.bootstrapServers()))
&& (this.topic.equals(that.topic()));
}
return false;
}
@Override
public int hashCode() {
int h = 1;
h *= 1000003;
h ^= Float.floatToIntBits(this.initialSampleRate);
h *= 1000003;
h ^= this.bootstrapServers.hashCode();
h *= 1000003;
h ^= this.topic.hashCode();
return h;
}
@Override
public KafkaZipkinTracer.Config.Builder toBuilder() {
return new Builder(this);
}
static final class Builder implements KafkaZipkinTracer.Config.Builder {
private Float initialSampleRate;
private String bootstrapServers;
private String topic;
Builder() {
}
private Builder(KafkaZipkinTracer.Config source) {
this.initialSampleRate = source.initialSampleRate();
this.bootstrapServers = source.bootstrapServers();
this.topic = source.topic();
}
@Override
public KafkaZipkinTracer.Config.Builder initialSampleRate(float initialSampleRate) {
this.initialSampleRate = initialSampleRate;
return this;
}
@Override
public KafkaZipkinTracer.Config.Builder bootstrapServers(String bootstrapServers) {
if (bootstrapServers == null) {
throw new NullPointerException("Null bootstrapServers");
}
this.bootstrapServers = bootstrapServers;
return this;
}
@Override
public KafkaZipkinTracer.Config.Builder topic(String topic) {
if (topic == null) {
throw new NullPointerException("Null topic");
}
this.topic = topic;
return this;
}
@Override
public KafkaZipkinTracer.Config build() {
String missing = "";
if (this.initialSampleRate == null) {
missing += " initialSampleRate";
}
if (this.bootstrapServers == null) {
missing += " bootstrapServers";
}
if (this.topic == null) {
missing += " topic";
}
if (!missing.isEmpty()) {
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_KafkaZipkinTracer_Config(
this.initialSampleRate,
this.bootstrapServers,
this.topic);
}
}
}