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