com.cognite.client.servicesV1.AutoValue_ResponseBinary Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cdf-sdk-java Show documentation
Show all versions of cdf-sdk-java Show documentation
Java SDK for reading and writing from/to CDF resources.
package com.cognite.client.servicesV1;
import com.google.protobuf.ByteString;
import javax.annotation.Nullable;
import javax.annotation.processing.Generated;
import okhttp3.Response;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_ResponseBinary extends ResponseBinary {
private final Response response;
private final ByteString responseBodyBytes;
private final int apiRetryCounter;
private final Long apiLatency;
private final Long apiJobQueueDurationMillies;
private final Long apiJobDurationMillies;
private AutoValue_ResponseBinary(
Response response,
ByteString responseBodyBytes,
int apiRetryCounter,
@Nullable Long apiLatency,
@Nullable Long apiJobQueueDurationMillies,
@Nullable Long apiJobDurationMillies) {
this.response = response;
this.responseBodyBytes = responseBodyBytes;
this.apiRetryCounter = apiRetryCounter;
this.apiLatency = apiLatency;
this.apiJobQueueDurationMillies = apiJobQueueDurationMillies;
this.apiJobDurationMillies = apiJobDurationMillies;
}
@Override
public Response getResponse() {
return response;
}
@Override
public ByteString getResponseBodyBytes() {
return responseBodyBytes;
}
@Override
public int getApiRetryCounter() {
return apiRetryCounter;
}
@Nullable
@Override
public Long getApiLatency() {
return apiLatency;
}
@Nullable
@Override
public Long getApiJobQueueDurationMillies() {
return apiJobQueueDurationMillies;
}
@Nullable
@Override
public Long getApiJobDurationMillies() {
return apiJobDurationMillies;
}
@Override
public String toString() {
return "ResponseBinary{"
+ "response=" + response + ", "
+ "responseBodyBytes=" + responseBodyBytes + ", "
+ "apiRetryCounter=" + apiRetryCounter + ", "
+ "apiLatency=" + apiLatency + ", "
+ "apiJobQueueDurationMillies=" + apiJobQueueDurationMillies + ", "
+ "apiJobDurationMillies=" + apiJobDurationMillies
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof ResponseBinary) {
ResponseBinary that = (ResponseBinary) o;
return this.response.equals(that.getResponse())
&& this.responseBodyBytes.equals(that.getResponseBodyBytes())
&& this.apiRetryCounter == that.getApiRetryCounter()
&& (this.apiLatency == null ? that.getApiLatency() == null : this.apiLatency.equals(that.getApiLatency()))
&& (this.apiJobQueueDurationMillies == null ? that.getApiJobQueueDurationMillies() == null : this.apiJobQueueDurationMillies.equals(that.getApiJobQueueDurationMillies()))
&& (this.apiJobDurationMillies == null ? that.getApiJobDurationMillies() == null : this.apiJobDurationMillies.equals(that.getApiJobDurationMillies()));
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= response.hashCode();
h$ *= 1000003;
h$ ^= responseBodyBytes.hashCode();
h$ *= 1000003;
h$ ^= apiRetryCounter;
h$ *= 1000003;
h$ ^= (apiLatency == null) ? 0 : apiLatency.hashCode();
h$ *= 1000003;
h$ ^= (apiJobQueueDurationMillies == null) ? 0 : apiJobQueueDurationMillies.hashCode();
h$ *= 1000003;
h$ ^= (apiJobDurationMillies == null) ? 0 : apiJobDurationMillies.hashCode();
return h$;
}
@Override
ResponseBinary.Builder toBuilder() {
return new Builder(this);
}
static final class Builder extends ResponseBinary.Builder {
private Response response;
private ByteString responseBodyBytes;
private Integer apiRetryCounter;
private Long apiLatency;
private Long apiJobQueueDurationMillies;
private Long apiJobDurationMillies;
Builder() {
}
private Builder(ResponseBinary source) {
this.response = source.getResponse();
this.responseBodyBytes = source.getResponseBodyBytes();
this.apiRetryCounter = source.getApiRetryCounter();
this.apiLatency = source.getApiLatency();
this.apiJobQueueDurationMillies = source.getApiJobQueueDurationMillies();
this.apiJobDurationMillies = source.getApiJobDurationMillies();
}
@Override
ResponseBinary.Builder setResponse(Response response) {
if (response == null) {
throw new NullPointerException("Null response");
}
this.response = response;
return this;
}
@Override
ResponseBinary.Builder setResponseBodyBytes(ByteString responseBodyBytes) {
if (responseBodyBytes == null) {
throw new NullPointerException("Null responseBodyBytes");
}
this.responseBodyBytes = responseBodyBytes;
return this;
}
@Override
ResponseBinary.Builder setApiRetryCounter(int apiRetryCounter) {
this.apiRetryCounter = apiRetryCounter;
return this;
}
@Override
ResponseBinary.Builder setApiLatency(Long apiLatency) {
this.apiLatency = apiLatency;
return this;
}
@Override
ResponseBinary.Builder setApiJobQueueDurationMillies(Long apiJobQueueDurationMillies) {
this.apiJobQueueDurationMillies = apiJobQueueDurationMillies;
return this;
}
@Override
ResponseBinary.Builder setApiJobDurationMillies(Long apiJobDurationMillies) {
this.apiJobDurationMillies = apiJobDurationMillies;
return this;
}
@Override
ResponseBinary build() {
if (this.response == null
|| this.responseBodyBytes == null
|| this.apiRetryCounter == null) {
StringBuilder missing = new StringBuilder();
if (this.response == null) {
missing.append(" response");
}
if (this.responseBodyBytes == null) {
missing.append(" responseBodyBytes");
}
if (this.apiRetryCounter == null) {
missing.append(" apiRetryCounter");
}
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_ResponseBinary(
this.response,
this.responseBodyBytes,
this.apiRetryCounter,
this.apiLatency,
this.apiJobQueueDurationMillies,
this.apiJobDurationMillies);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy