org.graylog.plugins.views.search.export.AutoValue_SimpleMessage Maven / Gradle / Ivy
package org.graylog.plugins.views.search.export;
import java.util.LinkedHashMap;
import javax.annotation.Generated;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_SimpleMessage extends SimpleMessage {
private final LinkedHashMap fields;
private final String index;
private AutoValue_SimpleMessage(
LinkedHashMap fields,
String index) {
this.fields = fields;
this.index = index;
}
@Override
public LinkedHashMap fields() {
return fields;
}
@Override
public String index() {
return index;
}
@Override
public String toString() {
return "SimpleMessage{"
+ "fields=" + fields + ", "
+ "index=" + index
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof SimpleMessage) {
SimpleMessage that = (SimpleMessage) o;
return this.fields.equals(that.fields())
&& this.index.equals(that.index());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= fields.hashCode();
h$ *= 1000003;
h$ ^= index.hashCode();
return h$;
}
@Override
public SimpleMessage.Builder toBuilder() {
return new Builder(this);
}
static final class Builder extends SimpleMessage.Builder {
private LinkedHashMap fields;
private String index;
Builder() {
}
private Builder(SimpleMessage source) {
this.fields = source.fields();
this.index = source.index();
}
@Override
public SimpleMessage.Builder fields(LinkedHashMap fields) {
if (fields == null) {
throw new NullPointerException("Null fields");
}
this.fields = fields;
return this;
}
@Override
public SimpleMessage.Builder index(String index) {
if (index == null) {
throw new NullPointerException("Null index");
}
this.index = index;
return this;
}
@Override
SimpleMessage autoBuild() {
String missing = "";
if (this.fields == null) {
missing += " fields";
}
if (this.index == null) {
missing += " index";
}
if (!missing.isEmpty()) {
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_SimpleMessage(
this.fields,
this.index);
}
}
}