org.graylog2.indexer.ranges.AutoValue_EsIndexRange Maven / Gradle / Ivy
package org.graylog2.indexer.ranges;
import javax.annotation.Generated;
import org.joda.time.DateTime;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_EsIndexRange extends EsIndexRange {
private final String indexName;
private final DateTime begin;
private final DateTime end;
private final DateTime calculatedAt;
private final int calculationDuration;
AutoValue_EsIndexRange(
String indexName,
DateTime begin,
DateTime end,
DateTime calculatedAt,
int calculationDuration) {
if (indexName == null) {
throw new NullPointerException("Null indexName");
}
this.indexName = indexName;
if (begin == null) {
throw new NullPointerException("Null begin");
}
this.begin = begin;
if (end == null) {
throw new NullPointerException("Null end");
}
this.end = end;
if (calculatedAt == null) {
throw new NullPointerException("Null calculatedAt");
}
this.calculatedAt = calculatedAt;
this.calculationDuration = calculationDuration;
}
@com.fasterxml.jackson.annotation.JsonProperty(value = "gl2_index_range_index_name")
@Override
public String indexName() {
return indexName;
}
@com.fasterxml.jackson.annotation.JsonProperty(value = "gl2_index_range_begin")
@Override
public DateTime begin() {
return begin;
}
@com.fasterxml.jackson.annotation.JsonProperty(value = "gl2_index_range_end")
@Override
public DateTime end() {
return end;
}
@com.fasterxml.jackson.annotation.JsonProperty(value = "gl2_index_range_calculated_at")
@Override
public DateTime calculatedAt() {
return calculatedAt;
}
@com.fasterxml.jackson.annotation.JsonProperty(value = "gl2_index_range_took_ms")
@Override
public int calculationDuration() {
return calculationDuration;
}
@Override
public String toString() {
return "EsIndexRange{"
+ "indexName=" + indexName + ", "
+ "begin=" + begin + ", "
+ "end=" + end + ", "
+ "calculatedAt=" + calculatedAt + ", "
+ "calculationDuration=" + calculationDuration
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof EsIndexRange) {
EsIndexRange that = (EsIndexRange) o;
return (this.indexName.equals(that.indexName()))
&& (this.begin.equals(that.begin()))
&& (this.end.equals(that.end()))
&& (this.calculatedAt.equals(that.calculatedAt()))
&& (this.calculationDuration == that.calculationDuration());
}
return false;
}
@Override
public int hashCode() {
int h = 1;
h *= 1000003;
h ^= indexName.hashCode();
h *= 1000003;
h ^= begin.hashCode();
h *= 1000003;
h ^= end.hashCode();
h *= 1000003;
h ^= calculatedAt.hashCode();
h *= 1000003;
h ^= calculationDuration;
return h;
}
}