org.graylog2.rest.resources.streams.responses.$AutoValue_StreamPageListResponse Maven / Gradle / Ivy
package org.graylog2.rest.resources.streams.responses;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Collection;
import javax.annotation.Generated;
import javax.annotation.Nullable;
import org.graylog2.database.PaginatedList;
import org.graylog2.streams.StreamDTO;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
abstract class $AutoValue_StreamPageListResponse extends StreamPageListResponse {
private final String query;
private final PaginatedList.PaginationInfo paginationInfo;
private final long total;
private final String sort;
private final String order;
private final Collection streams;
$AutoValue_StreamPageListResponse(
@Nullable String query,
PaginatedList.PaginationInfo paginationInfo,
long total,
@Nullable String sort,
@Nullable String order,
Collection streams) {
this.query = query;
if (paginationInfo == null) {
throw new NullPointerException("Null paginationInfo");
}
this.paginationInfo = paginationInfo;
this.total = total;
this.sort = sort;
this.order = order;
if (streams == null) {
throw new NullPointerException("Null streams");
}
this.streams = streams;
}
@Nullable
@JsonProperty
@Override
public String query() {
return query;
}
@JsonProperty("pagination")
@Override
public PaginatedList.PaginationInfo paginationInfo() {
return paginationInfo;
}
@JsonProperty
@Override
public long total() {
return total;
}
@Nullable
@JsonProperty
@Override
public String sort() {
return sort;
}
@Nullable
@JsonProperty
@Override
public String order() {
return order;
}
@JsonProperty
@Override
public Collection streams() {
return streams;
}
@Override
public String toString() {
return "StreamPageListResponse{"
+ "query=" + query + ", "
+ "paginationInfo=" + paginationInfo + ", "
+ "total=" + total + ", "
+ "sort=" + sort + ", "
+ "order=" + order + ", "
+ "streams=" + streams
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof StreamPageListResponse) {
StreamPageListResponse that = (StreamPageListResponse) o;
return (this.query == null ? that.query() == null : this.query.equals(that.query()))
&& this.paginationInfo.equals(that.paginationInfo())
&& this.total == that.total()
&& (this.sort == null ? that.sort() == null : this.sort.equals(that.sort()))
&& (this.order == null ? that.order() == null : this.order.equals(that.order()))
&& this.streams.equals(that.streams());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= (query == null) ? 0 : query.hashCode();
h$ *= 1000003;
h$ ^= paginationInfo.hashCode();
h$ *= 1000003;
h$ ^= (int) ((total >>> 32) ^ total);
h$ *= 1000003;
h$ ^= (sort == null) ? 0 : sort.hashCode();
h$ *= 1000003;
h$ ^= (order == null) ? 0 : order.hashCode();
h$ *= 1000003;
h$ ^= streams.hashCode();
return h$;
}
}