org.graylog.events.event.AutoValue_EventDto Maven / Gradle / Ivy
package org.graylog.events.event;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import javax.annotation.Nullable;
import javax.annotation.processing.Generated;
import org.joda.time.DateTime;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_EventDto extends EventDto {
private final String id;
private final String eventDefinitionType;
private final String eventDefinitionId;
private final Optional originContext;
private final DateTime eventTimestamp;
private final DateTime processingTimestamp;
private final Optional timerangeStart;
private final Optional timerangeEnd;
private final Set streams;
private final Set sourceStreams;
private final String message;
private final String source;
private final List keyTuple;
@Nullable
private final String key;
private final long priority;
private final boolean alert;
private final Map fields;
private final Map groupByFields;
private final Optional replayInfo;
private AutoValue_EventDto(
String id,
String eventDefinitionType,
String eventDefinitionId,
Optional originContext,
DateTime eventTimestamp,
DateTime processingTimestamp,
Optional timerangeStart,
Optional timerangeEnd,
Set streams,
Set sourceStreams,
String message,
String source,
List keyTuple,
@Nullable String key,
long priority,
boolean alert,
Map fields,
Map groupByFields,
Optional replayInfo) {
this.id = id;
this.eventDefinitionType = eventDefinitionType;
this.eventDefinitionId = eventDefinitionId;
this.originContext = originContext;
this.eventTimestamp = eventTimestamp;
this.processingTimestamp = processingTimestamp;
this.timerangeStart = timerangeStart;
this.timerangeEnd = timerangeEnd;
this.streams = streams;
this.sourceStreams = sourceStreams;
this.message = message;
this.source = source;
this.keyTuple = keyTuple;
this.key = key;
this.priority = priority;
this.alert = alert;
this.fields = fields;
this.groupByFields = groupByFields;
this.replayInfo = replayInfo;
}
@JsonProperty("id")
@Override
public String id() {
return id;
}
@JsonProperty("event_definition_type")
@Override
public String eventDefinitionType() {
return eventDefinitionType;
}
@JsonProperty("event_definition_id")
@Override
public String eventDefinitionId() {
return eventDefinitionId;
}
@JsonProperty("origin_context")
@Override
public Optional originContext() {
return originContext;
}
@JsonProperty("timestamp")
@Override
public DateTime eventTimestamp() {
return eventTimestamp;
}
@JsonProperty("timestamp_processing")
@Override
public DateTime processingTimestamp() {
return processingTimestamp;
}
@JsonProperty("timerange_start")
@Override
public Optional timerangeStart() {
return timerangeStart;
}
@JsonProperty("timerange_end")
@Override
public Optional timerangeEnd() {
return timerangeEnd;
}
@JsonProperty("streams")
@Override
public Set streams() {
return streams;
}
@JsonProperty("source_streams")
@Override
public Set sourceStreams() {
return sourceStreams;
}
@JsonProperty("message")
@Override
public String message() {
return message;
}
@JsonProperty("source")
@Override
public String source() {
return source;
}
@JsonProperty("key_tuple")
@Override
public List keyTuple() {
return keyTuple;
}
@JsonProperty("key")
@Nullable
@Override
public String key() {
return key;
}
@JsonProperty("priority")
@Override
public long priority() {
return priority;
}
@JsonProperty("alert")
@Override
public boolean alert() {
return alert;
}
@JsonProperty("fields")
@Override
public Map fields() {
return fields;
}
@JsonProperty("group_by_fields")
@Override
public Map groupByFields() {
return groupByFields;
}
@JsonProperty("replay_info")
@Override
public Optional replayInfo() {
return replayInfo;
}
@Override
public String toString() {
return "EventDto{"
+ "id=" + id + ", "
+ "eventDefinitionType=" + eventDefinitionType + ", "
+ "eventDefinitionId=" + eventDefinitionId + ", "
+ "originContext=" + originContext + ", "
+ "eventTimestamp=" + eventTimestamp + ", "
+ "processingTimestamp=" + processingTimestamp + ", "
+ "timerangeStart=" + timerangeStart + ", "
+ "timerangeEnd=" + timerangeEnd + ", "
+ "streams=" + streams + ", "
+ "sourceStreams=" + sourceStreams + ", "
+ "message=" + message + ", "
+ "source=" + source + ", "
+ "keyTuple=" + keyTuple + ", "
+ "key=" + key + ", "
+ "priority=" + priority + ", "
+ "alert=" + alert + ", "
+ "fields=" + fields + ", "
+ "groupByFields=" + groupByFields + ", "
+ "replayInfo=" + replayInfo
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof EventDto) {
EventDto that = (EventDto) o;
return this.id.equals(that.id())
&& this.eventDefinitionType.equals(that.eventDefinitionType())
&& this.eventDefinitionId.equals(that.eventDefinitionId())
&& this.originContext.equals(that.originContext())
&& this.eventTimestamp.equals(that.eventTimestamp())
&& this.processingTimestamp.equals(that.processingTimestamp())
&& this.timerangeStart.equals(that.timerangeStart())
&& this.timerangeEnd.equals(that.timerangeEnd())
&& this.streams.equals(that.streams())
&& this.sourceStreams.equals(that.sourceStreams())
&& this.message.equals(that.message())
&& this.source.equals(that.source())
&& this.keyTuple.equals(that.keyTuple())
&& (this.key == null ? that.key() == null : this.key.equals(that.key()))
&& this.priority == that.priority()
&& this.alert == that.alert()
&& this.fields.equals(that.fields())
&& this.groupByFields.equals(that.groupByFields())
&& this.replayInfo.equals(that.replayInfo());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= id.hashCode();
h$ *= 1000003;
h$ ^= eventDefinitionType.hashCode();
h$ *= 1000003;
h$ ^= eventDefinitionId.hashCode();
h$ *= 1000003;
h$ ^= originContext.hashCode();
h$ *= 1000003;
h$ ^= eventTimestamp.hashCode();
h$ *= 1000003;
h$ ^= processingTimestamp.hashCode();
h$ *= 1000003;
h$ ^= timerangeStart.hashCode();
h$ *= 1000003;
h$ ^= timerangeEnd.hashCode();
h$ *= 1000003;
h$ ^= streams.hashCode();
h$ *= 1000003;
h$ ^= sourceStreams.hashCode();
h$ *= 1000003;
h$ ^= message.hashCode();
h$ *= 1000003;
h$ ^= source.hashCode();
h$ *= 1000003;
h$ ^= keyTuple.hashCode();
h$ *= 1000003;
h$ ^= (key == null) ? 0 : key.hashCode();
h$ *= 1000003;
h$ ^= (int) ((priority >>> 32) ^ priority);
h$ *= 1000003;
h$ ^= alert ? 1231 : 1237;
h$ *= 1000003;
h$ ^= fields.hashCode();
h$ *= 1000003;
h$ ^= groupByFields.hashCode();
h$ *= 1000003;
h$ ^= replayInfo.hashCode();
return h$;
}
@Override
public EventDto.Builder toBuilder() {
return new Builder(this);
}
static final class Builder extends EventDto.Builder {
private String id;
private String eventDefinitionType;
private String eventDefinitionId;
private Optional originContext = Optional.empty();
private DateTime eventTimestamp;
private DateTime processingTimestamp;
private Optional timerangeStart = Optional.empty();
private Optional timerangeEnd = Optional.empty();
private Set streams;
private Set sourceStreams;
private String message;
private String source;
private List keyTuple;
private String key;
private long priority;
private boolean alert;
private Map fields;
private Map groupByFields;
private Optional replayInfo = Optional.empty();
private byte set$0;
Builder() {
}
private Builder(EventDto source) {
this.id = source.id();
this.eventDefinitionType = source.eventDefinitionType();
this.eventDefinitionId = source.eventDefinitionId();
this.originContext = source.originContext();
this.eventTimestamp = source.eventTimestamp();
this.processingTimestamp = source.processingTimestamp();
this.timerangeStart = source.timerangeStart();
this.timerangeEnd = source.timerangeEnd();
this.streams = source.streams();
this.sourceStreams = source.sourceStreams();
this.message = source.message();
this.source = source.source();
this.keyTuple = source.keyTuple();
this.key = source.key();
this.priority = source.priority();
this.alert = source.alert();
this.fields = source.fields();
this.groupByFields = source.groupByFields();
this.replayInfo = source.replayInfo();
set$0 = (byte) 3;
}
@Override
public EventDto.Builder id(String id) {
if (id == null) {
throw new NullPointerException("Null id");
}
this.id = id;
return this;
}
@Override
public EventDto.Builder eventDefinitionType(String eventDefinitionType) {
if (eventDefinitionType == null) {
throw new NullPointerException("Null eventDefinitionType");
}
this.eventDefinitionType = eventDefinitionType;
return this;
}
@Override
public EventDto.Builder eventDefinitionId(String eventDefinitionId) {
if (eventDefinitionId == null) {
throw new NullPointerException("Null eventDefinitionId");
}
this.eventDefinitionId = eventDefinitionId;
return this;
}
@Override
public EventDto.Builder originContext(@Nullable String originContext) {
this.originContext = Optional.ofNullable(originContext);
return this;
}
@Override
public EventDto.Builder eventTimestamp(DateTime eventTimestamp) {
if (eventTimestamp == null) {
throw new NullPointerException("Null eventTimestamp");
}
this.eventTimestamp = eventTimestamp;
return this;
}
@Override
public EventDto.Builder processingTimestamp(DateTime processingTimestamp) {
if (processingTimestamp == null) {
throw new NullPointerException("Null processingTimestamp");
}
this.processingTimestamp = processingTimestamp;
return this;
}
@Override
public EventDto.Builder timerangeStart(@Nullable DateTime timerangeStart) {
this.timerangeStart = Optional.ofNullable(timerangeStart);
return this;
}
@Override
public EventDto.Builder timerangeEnd(@Nullable DateTime timerangeEnd) {
this.timerangeEnd = Optional.ofNullable(timerangeEnd);
return this;
}
@Override
public EventDto.Builder streams(Set streams) {
if (streams == null) {
throw new NullPointerException("Null streams");
}
this.streams = streams;
return this;
}
@Override
public EventDto.Builder sourceStreams(Set sourceStreams) {
if (sourceStreams == null) {
throw new NullPointerException("Null sourceStreams");
}
this.sourceStreams = sourceStreams;
return this;
}
@Override
public EventDto.Builder message(String message) {
if (message == null) {
throw new NullPointerException("Null message");
}
this.message = message;
return this;
}
@Override
public EventDto.Builder source(String source) {
if (source == null) {
throw new NullPointerException("Null source");
}
this.source = source;
return this;
}
@Override
public EventDto.Builder keyTuple(List keyTuple) {
if (keyTuple == null) {
throw new NullPointerException("Null keyTuple");
}
this.keyTuple = keyTuple;
return this;
}
@Override
public EventDto.Builder key(@Nullable String key) {
this.key = key;
return this;
}
@Override
public EventDto.Builder priority(long priority) {
this.priority = priority;
set$0 |= (byte) 1;
return this;
}
@Override
public EventDto.Builder alert(boolean alert) {
this.alert = alert;
set$0 |= (byte) 2;
return this;
}
@Override
public EventDto.Builder fields(Map fields) {
if (fields == null) {
throw new NullPointerException("Null fields");
}
this.fields = fields;
return this;
}
@Override
public EventDto.Builder groupByFields(Map groupByFields) {
if (groupByFields == null) {
throw new NullPointerException("Null groupByFields");
}
this.groupByFields = groupByFields;
return this;
}
@Override
public EventDto.Builder replayInfo(@Nullable EventReplayInfo replayInfo) {
this.replayInfo = Optional.ofNullable(replayInfo);
return this;
}
@Override
public EventDto build() {
if (set$0 != 3
|| this.id == null
|| this.eventDefinitionType == null
|| this.eventDefinitionId == null
|| this.eventTimestamp == null
|| this.processingTimestamp == null
|| this.streams == null
|| this.sourceStreams == null
|| this.message == null
|| this.source == null
|| this.keyTuple == null
|| this.fields == null
|| this.groupByFields == null) {
StringBuilder missing = new StringBuilder();
if (this.id == null) {
missing.append(" id");
}
if (this.eventDefinitionType == null) {
missing.append(" eventDefinitionType");
}
if (this.eventDefinitionId == null) {
missing.append(" eventDefinitionId");
}
if (this.eventTimestamp == null) {
missing.append(" eventTimestamp");
}
if (this.processingTimestamp == null) {
missing.append(" processingTimestamp");
}
if (this.streams == null) {
missing.append(" streams");
}
if (this.sourceStreams == null) {
missing.append(" sourceStreams");
}
if (this.message == null) {
missing.append(" message");
}
if (this.source == null) {
missing.append(" source");
}
if (this.keyTuple == null) {
missing.append(" keyTuple");
}
if ((set$0 & 1) == 0) {
missing.append(" priority");
}
if ((set$0 & 2) == 0) {
missing.append(" alert");
}
if (this.fields == null) {
missing.append(" fields");
}
if (this.groupByFields == null) {
missing.append(" groupByFields");
}
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_EventDto(
this.id,
this.eventDefinitionType,
this.eventDefinitionId,
this.originContext,
this.eventTimestamp,
this.processingTimestamp,
this.timerangeStart,
this.timerangeEnd,
this.streams,
this.sourceStreams,
this.message,
this.source,
this.keyTuple,
this.key,
this.priority,
this.alert,
this.fields,
this.groupByFields,
this.replayInfo);
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy