org.graylog.plugins.views.search.searchtypes.pivot.AutoValue_PivotResult_Row Maven / Gradle / Ivy
package org.graylog.plugins.views.search.searchtypes.pivot;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.collect.ImmutableList;
import javax.annotation.Generated;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_PivotResult_Row extends PivotResult.Row {
private final ImmutableList key;
private final ImmutableList values;
private final String source;
private AutoValue_PivotResult_Row(
ImmutableList key,
ImmutableList values,
String source) {
this.key = key;
this.values = values;
this.source = source;
}
@JsonProperty
@Override
public ImmutableList key() {
return key;
}
@JsonProperty
@Override
public ImmutableList values() {
return values;
}
@JsonProperty
@Override
public String source() {
return source;
}
@Override
public String toString() {
return "Row{"
+ "key=" + key + ", "
+ "values=" + values + ", "
+ "source=" + source
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof PivotResult.Row) {
PivotResult.Row that = (PivotResult.Row) o;
return this.key.equals(that.key())
&& this.values.equals(that.values())
&& this.source.equals(that.source());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= key.hashCode();
h$ *= 1000003;
h$ ^= values.hashCode();
h$ *= 1000003;
h$ ^= source.hashCode();
return h$;
}
static final class Builder extends PivotResult.Row.Builder {
private ImmutableList key;
private ImmutableList.Builder valuesBuilder$;
private ImmutableList values;
private String source;
Builder() {
}
@Override
public PivotResult.Row.Builder key(ImmutableList key) {
if (key == null) {
throw new NullPointerException("Null key");
}
this.key = key;
return this;
}
@Override
ImmutableList.Builder valuesBuilder() {
if (valuesBuilder$ == null) {
valuesBuilder$ = ImmutableList.builder();
}
return valuesBuilder$;
}
@Override
public PivotResult.Row.Builder source(String source) {
if (source == null) {
throw new NullPointerException("Null source");
}
this.source = source;
return this;
}
@Override
public PivotResult.Row build() {
if (valuesBuilder$ != null) {
this.values = valuesBuilder$.build();
} else if (this.values == null) {
this.values = ImmutableList.of();
}
String missing = "";
if (this.key == null) {
missing += " key";
}
if (this.source == null) {
missing += " source";
}
if (!missing.isEmpty()) {
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_PivotResult_Row(
this.key,
this.values,
this.source);
}
}
}