org.graylog.events.event.AutoValue_EventReplayInfo Maven / Gradle / Ivy
package org.graylog.events.event;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Set;
import javax.annotation.processing.Generated;
import org.joda.time.DateTime;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_EventReplayInfo extends EventReplayInfo {
private final DateTime timerangeStart;
private final DateTime timerangeEnd;
private final String query;
private final Set streams;
private AutoValue_EventReplayInfo(
DateTime timerangeStart,
DateTime timerangeEnd,
String query,
Set streams) {
this.timerangeStart = timerangeStart;
this.timerangeEnd = timerangeEnd;
this.query = query;
this.streams = streams;
}
@JsonProperty("timerange_start")
@Override
public DateTime timerangeStart() {
return timerangeStart;
}
@JsonProperty("timerange_end")
@Override
public DateTime timerangeEnd() {
return timerangeEnd;
}
@JsonProperty("query")
@Override
public String query() {
return query;
}
@JsonProperty("streams")
@Override
public Set streams() {
return streams;
}
@Override
public String toString() {
return "EventReplayInfo{"
+ "timerangeStart=" + timerangeStart + ", "
+ "timerangeEnd=" + timerangeEnd + ", "
+ "query=" + query + ", "
+ "streams=" + streams
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof EventReplayInfo) {
EventReplayInfo that = (EventReplayInfo) o;
return this.timerangeStart.equals(that.timerangeStart())
&& this.timerangeEnd.equals(that.timerangeEnd())
&& this.query.equals(that.query())
&& this.streams.equals(that.streams());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= timerangeStart.hashCode();
h$ *= 1000003;
h$ ^= timerangeEnd.hashCode();
h$ *= 1000003;
h$ ^= query.hashCode();
h$ *= 1000003;
h$ ^= streams.hashCode();
return h$;
}
@Override
public EventReplayInfo.Builder toBuilder() {
return new Builder(this);
}
static final class Builder extends EventReplayInfo.Builder {
private DateTime timerangeStart;
private DateTime timerangeEnd;
private String query;
private Set streams;
Builder() {
}
private Builder(EventReplayInfo source) {
this.timerangeStart = source.timerangeStart();
this.timerangeEnd = source.timerangeEnd();
this.query = source.query();
this.streams = source.streams();
}
@Override
public EventReplayInfo.Builder timerangeStart(DateTime timerangeStart) {
if (timerangeStart == null) {
throw new NullPointerException("Null timerangeStart");
}
this.timerangeStart = timerangeStart;
return this;
}
@Override
public EventReplayInfo.Builder timerangeEnd(DateTime timerangeEnd) {
if (timerangeEnd == null) {
throw new NullPointerException("Null timerangeEnd");
}
this.timerangeEnd = timerangeEnd;
return this;
}
@Override
public EventReplayInfo.Builder query(String query) {
if (query == null) {
throw new NullPointerException("Null query");
}
this.query = query;
return this;
}
@Override
public EventReplayInfo.Builder streams(Set streams) {
if (streams == null) {
throw new NullPointerException("Null streams");
}
this.streams = streams;
return this;
}
@Override
public EventReplayInfo build() {
if (this.timerangeStart == null
|| this.timerangeEnd == null
|| this.query == null
|| this.streams == null) {
StringBuilder missing = new StringBuilder();
if (this.timerangeStart == null) {
missing.append(" timerangeStart");
}
if (this.timerangeEnd == null) {
missing.append(" timerangeEnd");
}
if (this.query == null) {
missing.append(" query");
}
if (this.streams == null) {
missing.append(" streams");
}
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_EventReplayInfo(
this.timerangeStart,
this.timerangeEnd,
this.query,
this.streams);
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy