zipkin.reporter.okhttp3.AutoValue_OkHttpSender Maven / Gradle / Ivy
package zipkin.reporter.okhttp3;
import javax.annotation.Generated;
import okhttp3.HttpUrl;
import zipkin.reporter.Encoding;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_OkHttpSender extends OkHttpSender {
private final Encoding encoding;
private final int messageMaxBytes;
private final HttpUrl endpoint;
private final int maxRequests;
private final boolean compressionEnabled;
private final RequestBodyMessageEncoder encoder;
private AutoValue_OkHttpSender(
Encoding encoding,
int messageMaxBytes,
HttpUrl endpoint,
int maxRequests,
boolean compressionEnabled,
RequestBodyMessageEncoder encoder) {
this.encoding = encoding;
this.messageMaxBytes = messageMaxBytes;
this.endpoint = endpoint;
this.maxRequests = maxRequests;
this.compressionEnabled = compressionEnabled;
this.encoder = encoder;
}
@Override
public Encoding encoding() {
return encoding;
}
@Override
public int messageMaxBytes() {
return messageMaxBytes;
}
@Override
HttpUrl endpoint() {
return endpoint;
}
@Override
int maxRequests() {
return maxRequests;
}
@Override
boolean compressionEnabled() {
return compressionEnabled;
}
@Override
RequestBodyMessageEncoder encoder() {
return encoder;
}
@Override
public String toString() {
return "OkHttpSender{"
+ "encoding=" + encoding + ", "
+ "messageMaxBytes=" + messageMaxBytes + ", "
+ "endpoint=" + endpoint + ", "
+ "maxRequests=" + maxRequests + ", "
+ "compressionEnabled=" + compressionEnabled + ", "
+ "encoder=" + encoder
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof OkHttpSender) {
OkHttpSender that = (OkHttpSender) o;
return (this.encoding.equals(that.encoding()))
&& (this.messageMaxBytes == that.messageMaxBytes())
&& (this.endpoint.equals(that.endpoint()))
&& (this.maxRequests == that.maxRequests())
&& (this.compressionEnabled == that.compressionEnabled())
&& (this.encoder.equals(that.encoder()));
}
return false;
}
@Override
public int hashCode() {
int h = 1;
h *= 1000003;
h ^= this.encoding.hashCode();
h *= 1000003;
h ^= this.messageMaxBytes;
h *= 1000003;
h ^= this.endpoint.hashCode();
h *= 1000003;
h ^= this.maxRequests;
h *= 1000003;
h ^= this.compressionEnabled ? 1231 : 1237;
h *= 1000003;
h ^= this.encoder.hashCode();
return h;
}
static final class Builder extends OkHttpSender.Builder {
private Encoding encoding;
private Integer messageMaxBytes;
private HttpUrl endpoint;
private Integer maxRequests;
private Boolean compressionEnabled;
private RequestBodyMessageEncoder encoder;
Builder() {
}
Builder(OkHttpSender source) {
this.encoding = source.encoding();
this.messageMaxBytes = source.messageMaxBytes();
this.endpoint = source.endpoint();
this.maxRequests = source.maxRequests();
this.compressionEnabled = source.compressionEnabled();
this.encoder = source.encoder();
}
@Override
public OkHttpSender.Builder encoding(Encoding encoding) {
this.encoding = encoding;
return this;
}
@Override
public Encoding encoding() {
if (encoding == null) {
throw new IllegalStateException("Property \"encoding\" has not been set");
}
return encoding;
}
@Override
public OkHttpSender.Builder messageMaxBytes(int messageMaxBytes) {
this.messageMaxBytes = messageMaxBytes;
return this;
}
@Override
public OkHttpSender.Builder endpoint(HttpUrl endpoint) {
this.endpoint = endpoint;
return this;
}
@Override
public OkHttpSender.Builder maxRequests(int maxRequests) {
this.maxRequests = maxRequests;
return this;
}
@Override
public int maxRequests() {
if (maxRequests == null) {
throw new IllegalStateException("Property \"maxRequests\" has not been set");
}
return maxRequests;
}
@Override
public OkHttpSender.Builder compressionEnabled(boolean compressionEnabled) {
this.compressionEnabled = compressionEnabled;
return this;
}
@Override
public OkHttpSender.Builder encoder(RequestBodyMessageEncoder encoder) {
this.encoder = encoder;
return this;
}
@Override
public OkHttpSender autoBuild() {
String missing = "";
if (encoding == null) {
missing += " encoding";
}
if (messageMaxBytes == null) {
missing += " messageMaxBytes";
}
if (endpoint == null) {
missing += " endpoint";
}
if (maxRequests == null) {
missing += " maxRequests";
}
if (compressionEnabled == null) {
missing += " compressionEnabled";
}
if (encoder == null) {
missing += " encoder";
}
if (!missing.isEmpty()) {
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_OkHttpSender(
this.encoding,
this.messageMaxBytes,
this.endpoint,
this.maxRequests,
this.compressionEnabled,
this.encoder);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy