org.graylog.plugins.sidecar.rest.responses.AutoValue_CollectorSummaryResponse Maven / Gradle / Ivy
package org.graylog.plugins.sidecar.rest.responses;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Collection;
import javax.annotation.Nullable;
import javax.annotation.processing.Generated;
import org.graylog.plugins.sidecar.rest.models.CollectorSummary;
import org.graylog2.database.PaginatedList;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_CollectorSummaryResponse extends CollectorSummaryResponse {
private final String query;
private final PaginatedList.PaginationInfo paginationInfo;
private final long total;
private final String sort;
private final String order;
private final Collection collectors;
AutoValue_CollectorSummaryResponse(
@Nullable String query,
PaginatedList.PaginationInfo paginationInfo,
long total,
@Nullable String sort,
@Nullable String order,
Collection collectors) {
this.query = query;
if (paginationInfo == null) {
throw new NullPointerException("Null paginationInfo");
}
this.paginationInfo = paginationInfo;
this.total = total;
this.sort = sort;
this.order = order;
if (collectors == null) {
throw new NullPointerException("Null collectors");
}
this.collectors = collectors;
}
@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 collectors() {
return collectors;
}
@Override
public String toString() {
return "CollectorSummaryResponse{"
+ "query=" + query + ", "
+ "paginationInfo=" + paginationInfo + ", "
+ "total=" + total + ", "
+ "sort=" + sort + ", "
+ "order=" + order + ", "
+ "collectors=" + collectors
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof CollectorSummaryResponse) {
CollectorSummaryResponse that = (CollectorSummaryResponse) 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.collectors.equals(that.collectors());
}
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$ ^= collectors.hashCode();
return h$;
}
}