com.spotify.apollo.entity.AutoValue_EncodedResponse Maven / Gradle / Ivy
package com.spotify.apollo.entity;
import java.util.Optional;
import javax.annotation.Generated;
import okio.ByteString;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_EncodedResponse extends EncodedResponse {
private final ByteString data;
private final Optional contentType;
AutoValue_EncodedResponse(
ByteString data,
Optional contentType) {
if (data == null) {
throw new NullPointerException("Null data");
}
this.data = data;
if (contentType == null) {
throw new NullPointerException("Null contentType");
}
this.contentType = contentType;
}
@Override
public ByteString data() {
return data;
}
@Override
public Optional contentType() {
return contentType;
}
@Override
public String toString() {
return "EncodedResponse{"
+ "data=" + data + ", "
+ "contentType=" + contentType
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof EncodedResponse) {
EncodedResponse that = (EncodedResponse) o;
return this.data.equals(that.data())
&& this.contentType.equals(that.contentType());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= data.hashCode();
h$ *= 1000003;
h$ ^= contentType.hashCode();
return h$;
}
}