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