org.graylog.plugins.views.search.views.widgets.messagelist.AutoValue_MessageListConfigDTO Maven / Gradle / Ivy
package org.graylog.plugins.views.search.views.widgets.messagelist;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.collect.ImmutableSet;
import java.util.List;
import javax.annotation.Generated;
import org.graylog.plugins.views.search.views.widgets.aggregation.sort.SortConfigDTO;
import org.graylog2.decorators.Decorator;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_MessageListConfigDTO extends MessageListConfigDTO {
private final ImmutableSet fields;
private final boolean showMessageRow;
private final List decorators;
private final List sort;
private AutoValue_MessageListConfigDTO(
ImmutableSet fields,
boolean showMessageRow,
List decorators,
List sort) {
this.fields = fields;
this.showMessageRow = showMessageRow;
this.decorators = decorators;
this.sort = sort;
}
@JsonProperty("fields")
@Override
public ImmutableSet fields() {
return fields;
}
@JsonProperty("show_message_row")
@Override
public boolean showMessageRow() {
return showMessageRow;
}
@JsonProperty("decorators")
@Override
public List decorators() {
return decorators;
}
@JsonProperty("sort")
@Override
public List sort() {
return sort;
}
@Override
public String toString() {
return "MessageListConfigDTO{"
+ "fields=" + fields + ", "
+ "showMessageRow=" + showMessageRow + ", "
+ "decorators=" + decorators + ", "
+ "sort=" + sort
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof MessageListConfigDTO) {
MessageListConfigDTO that = (MessageListConfigDTO) o;
return this.fields.equals(that.fields())
&& this.showMessageRow == that.showMessageRow()
&& this.decorators.equals(that.decorators())
&& this.sort.equals(that.sort());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= fields.hashCode();
h$ *= 1000003;
h$ ^= showMessageRow ? 1231 : 1237;
h$ *= 1000003;
h$ ^= decorators.hashCode();
h$ *= 1000003;
h$ ^= sort.hashCode();
return h$;
}
static final class Builder extends MessageListConfigDTO.Builder {
private ImmutableSet fields;
private Boolean showMessageRow;
private List decorators;
private List sort;
Builder() {
}
@Override
public MessageListConfigDTO.Builder fields(ImmutableSet fields) {
if (fields == null) {
throw new NullPointerException("Null fields");
}
this.fields = fields;
return this;
}
@Override
public MessageListConfigDTO.Builder showMessageRow(boolean showMessageRow) {
this.showMessageRow = showMessageRow;
return this;
}
@Override
public MessageListConfigDTO.Builder decorators(List decorators) {
if (decorators == null) {
throw new NullPointerException("Null decorators");
}
this.decorators = decorators;
return this;
}
@Override
public MessageListConfigDTO.Builder sort(List sort) {
if (sort == null) {
throw new NullPointerException("Null sort");
}
this.sort = sort;
return this;
}
@Override
public MessageListConfigDTO build() {
String missing = "";
if (this.fields == null) {
missing += " fields";
}
if (this.showMessageRow == null) {
missing += " showMessageRow";
}
if (this.decorators == null) {
missing += " decorators";
}
if (this.sort == null) {
missing += " sort";
}
if (!missing.isEmpty()) {
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_MessageListConfigDTO(
this.fields,
this.showMessageRow,
this.decorators,
this.sort);
}
}
}