org.graylog.plugins.views.search.searchtypes.pivot.buckets.AutoValue_DateRangeBucket Maven / Gradle / Ivy
package org.graylog.plugins.views.search.searchtypes.pivot.buckets;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import javax.annotation.processing.Generated;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_DateRangeBucket extends DateRangeBucket {
private final DateRangeBucket.BucketKey bucketKey;
private final String type;
private final List fields;
private final List ranges;
private AutoValue_DateRangeBucket(
DateRangeBucket.BucketKey bucketKey,
String type,
List fields,
List ranges) {
this.bucketKey = bucketKey;
this.type = type;
this.fields = fields;
this.ranges = ranges;
}
@JsonProperty
@Override
public DateRangeBucket.BucketKey bucketKey() {
return bucketKey;
}
@Override
public String type() {
return type;
}
@JsonProperty
@Override
public List fields() {
return fields;
}
@JsonProperty
@Override
public List ranges() {
return ranges;
}
@Override
public String toString() {
return "DateRangeBucket{"
+ "bucketKey=" + bucketKey + ", "
+ "type=" + type + ", "
+ "fields=" + fields + ", "
+ "ranges=" + ranges
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof DateRangeBucket) {
DateRangeBucket that = (DateRangeBucket) o;
return this.bucketKey.equals(that.bucketKey())
&& this.type.equals(that.type())
&& this.fields.equals(that.fields())
&& this.ranges.equals(that.ranges());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= bucketKey.hashCode();
h$ *= 1000003;
h$ ^= type.hashCode();
h$ *= 1000003;
h$ ^= fields.hashCode();
h$ *= 1000003;
h$ ^= ranges.hashCode();
return h$;
}
static final class Builder extends DateRangeBucket.Builder {
private DateRangeBucket.BucketKey bucketKey;
private String type;
private List fields;
private List ranges;
Builder() {
}
@Override
public DateRangeBucket.Builder bucketKey(DateRangeBucket.BucketKey bucketKey) {
if (bucketKey == null) {
throw new NullPointerException("Null bucketKey");
}
this.bucketKey = bucketKey;
return this;
}
@Override
public DateRangeBucket.Builder type(String type) {
if (type == null) {
throw new NullPointerException("Null type");
}
this.type = type;
return this;
}
@Override
public DateRangeBucket.Builder fields(List fields) {
if (fields == null) {
throw new NullPointerException("Null fields");
}
this.fields = fields;
return this;
}
@Override
public DateRangeBucket.Builder ranges(List ranges) {
if (ranges == null) {
throw new NullPointerException("Null ranges");
}
this.ranges = ranges;
return this;
}
@Override
public DateRangeBucket build() {
String missing = "";
if (this.bucketKey == null) {
missing += " bucketKey";
}
if (this.type == null) {
missing += " type";
}
if (this.fields == null) {
missing += " fields";
}
if (this.ranges == null) {
missing += " ranges";
}
if (!missing.isEmpty()) {
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_DateRangeBucket(
this.bucketKey,
this.type,
this.fields,
this.ranges);
}
}
}