org.graylog.events.processor.aggregation.AutoValue_AggregationConditions Maven / Gradle / Ivy
package org.graylog.events.processor.aggregation;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Optional;
import javax.annotation.Generated;
import javax.annotation.Nullable;
import org.graylog.events.conditions.Expression;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_AggregationConditions extends AggregationConditions {
private final Optional> expression;
private AutoValue_AggregationConditions(
Optional> expression) {
this.expression = expression;
}
@JsonProperty("expression")
@Override
public Optional> expression() {
return expression;
}
@Override
public String toString() {
return "AggregationConditions{"
+ "expression=" + expression
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof AggregationConditions) {
AggregationConditions that = (AggregationConditions) o;
return this.expression.equals(that.expression());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= expression.hashCode();
return h$;
}
@Override
public AggregationConditions.Builder toBuilder() {
return new Builder(this);
}
static final class Builder extends AggregationConditions.Builder {
private Optional> expression = Optional.empty();
Builder() {
}
private Builder(AggregationConditions source) {
this.expression = source.expression();
}
@Override
public AggregationConditions.Builder expression(@Nullable Expression expression) {
this.expression = Optional.ofNullable(expression);
return this;
}
@Override
public AggregationConditions build() {
return new AutoValue_AggregationConditions(
this.expression);
}
}
}