zipkin.reporter.local.AutoValue_LocalSender Maven / Gradle / Ivy
The newest version!
package zipkin.reporter.local;
import javax.annotation.Generated;
import zipkin.storage.StorageComponent;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_LocalSender extends LocalSender {
private final int messageMaxBytes;
private final StorageComponent storage;
private AutoValue_LocalSender(
int messageMaxBytes,
StorageComponent storage) {
this.messageMaxBytes = messageMaxBytes;
this.storage = storage;
}
@Override
public int messageMaxBytes() {
return messageMaxBytes;
}
@Override
StorageComponent storage() {
return storage;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof LocalSender) {
LocalSender that = (LocalSender) o;
return (this.messageMaxBytes == that.messageMaxBytes())
&& (this.storage.equals(that.storage()));
}
return false;
}
@Override
public int hashCode() {
int h = 1;
h *= 1000003;
h ^= this.messageMaxBytes;
h *= 1000003;
h ^= this.storage.hashCode();
return h;
}
@Override
public LocalSender.Builder toBuilder() {
return new Builder(this);
}
static final class Builder implements LocalSender.Builder {
private Integer messageMaxBytes;
private StorageComponent storage;
Builder() {
}
private Builder(LocalSender source) {
this.messageMaxBytes = source.messageMaxBytes();
this.storage = source.storage();
}
@Override
public LocalSender.Builder messageMaxBytes(int messageMaxBytes) {
this.messageMaxBytes = messageMaxBytes;
return this;
}
@Override
public LocalSender.Builder storage(StorageComponent storage) {
if (storage == null) {
throw new NullPointerException("Null storage");
}
this.storage = storage;
return this;
}
@Override
public LocalSender build() {
String missing = "";
if (this.messageMaxBytes == null) {
missing += " messageMaxBytes";
}
if (this.storage == null) {
missing += " storage";
}
if (!missing.isEmpty()) {
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_LocalSender(
this.messageMaxBytes,
this.storage);
}
}
}