org.graylog2.database.AutoValue_PaginatedList_PaginationInfo Maven / Gradle / Ivy
package org.graylog2.database;
import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.Generated;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_PaginatedList_PaginationInfo extends PaginatedList.PaginationInfo {
private final int total;
private final int count;
private final int page;
private final int perPage;
AutoValue_PaginatedList_PaginationInfo(
int total,
int count,
int page,
int perPage) {
this.total = total;
this.count = count;
this.page = page;
this.perPage = perPage;
}
@JsonProperty("total")
@Override
public int total() {
return total;
}
@JsonProperty("count")
@Override
public int count() {
return count;
}
@JsonProperty("page")
@Override
public int page() {
return page;
}
@JsonProperty("per_page")
@Override
public int perPage() {
return perPage;
}
@Override
public String toString() {
return "PaginationInfo{"
+ "total=" + total + ", "
+ "count=" + count + ", "
+ "page=" + page + ", "
+ "perPage=" + perPage
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof PaginatedList.PaginationInfo) {
PaginatedList.PaginationInfo that = (PaginatedList.PaginationInfo) o;
return this.total == that.total()
&& this.count == that.count()
&& this.page == that.page()
&& this.perPage == that.perPage();
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= total;
h$ *= 1000003;
h$ ^= count;
h$ *= 1000003;
h$ ^= page;
h$ *= 1000003;
h$ ^= perPage;
return h$;
}
}