All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
org.graylog.events.processor.$AutoValue_EventDefinitionDto Maven / Gradle / Ivy
package org.graylog.events.processor;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import javax.annotation.Generated;
import javax.annotation.Nullable;
import org.graylog.events.fields.EventFieldSpec;
import org.graylog.events.notifications.EventNotificationHandler;
import org.graylog.events.notifications.EventNotificationSettings;
import org.graylog.events.processor.storage.EventStorageHandler;
import org.mongojack.Id;
import org.mongojack.ObjectId;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
abstract class $AutoValue_EventDefinitionDto extends EventDefinitionDto {
private final String id;
private final String title;
private final String description;
private final int priority;
private final boolean alert;
private final EventProcessorConfig config;
private final ImmutableMap fieldSpec;
private final ImmutableList keySpec;
private final EventNotificationSettings notificationSettings;
private final ImmutableList notifications;
private final ImmutableList storage;
$AutoValue_EventDefinitionDto(
@Nullable String id,
String title,
String description,
int priority,
boolean alert,
EventProcessorConfig config,
ImmutableMap fieldSpec,
ImmutableList keySpec,
EventNotificationSettings notificationSettings,
ImmutableList notifications,
ImmutableList storage) {
this.id = id;
if (title == null) {
throw new NullPointerException("Null title");
}
this.title = title;
if (description == null) {
throw new NullPointerException("Null description");
}
this.description = description;
this.priority = priority;
this.alert = alert;
if (config == null) {
throw new NullPointerException("Null config");
}
this.config = config;
if (fieldSpec == null) {
throw new NullPointerException("Null fieldSpec");
}
this.fieldSpec = fieldSpec;
if (keySpec == null) {
throw new NullPointerException("Null keySpec");
}
this.keySpec = keySpec;
if (notificationSettings == null) {
throw new NullPointerException("Null notificationSettings");
}
this.notificationSettings = notificationSettings;
if (notifications == null) {
throw new NullPointerException("Null notifications");
}
this.notifications = notifications;
if (storage == null) {
throw new NullPointerException("Null storage");
}
this.storage = storage;
}
@Id
@ObjectId
@Nullable
@JsonProperty(value = "id")
@Override
public String id() {
return id;
}
@JsonProperty(value = "title")
@Override
public String title() {
return title;
}
@JsonProperty(value = "description")
@Override
public String description() {
return description;
}
@JsonProperty(value = "priority")
@Override
public int priority() {
return priority;
}
@JsonProperty(value = "alert")
@Override
public boolean alert() {
return alert;
}
@JsonProperty(value = "config")
@Override
public EventProcessorConfig config() {
return config;
}
@JsonProperty(value = "field_spec")
@Override
public ImmutableMap fieldSpec() {
return fieldSpec;
}
@JsonProperty(value = "key_spec")
@Override
public ImmutableList keySpec() {
return keySpec;
}
@JsonProperty(value = "notification_settings")
@Override
public EventNotificationSettings notificationSettings() {
return notificationSettings;
}
@JsonProperty(value = "notifications")
@Override
public ImmutableList notifications() {
return notifications;
}
@JsonProperty(value = "storage")
@Override
public ImmutableList storage() {
return storage;
}
@Override
public String toString() {
return "EventDefinitionDto{"
+ "id=" + id + ", "
+ "title=" + title + ", "
+ "description=" + description + ", "
+ "priority=" + priority + ", "
+ "alert=" + alert + ", "
+ "config=" + config + ", "
+ "fieldSpec=" + fieldSpec + ", "
+ "keySpec=" + keySpec + ", "
+ "notificationSettings=" + notificationSettings + ", "
+ "notifications=" + notifications + ", "
+ "storage=" + storage
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof EventDefinitionDto) {
EventDefinitionDto that = (EventDefinitionDto) o;
return ((this.id == null) ? (that.id() == null) : this.id.equals(that.id()))
&& (this.title.equals(that.title()))
&& (this.description.equals(that.description()))
&& (this.priority == that.priority())
&& (this.alert == that.alert())
&& (this.config.equals(that.config()))
&& (this.fieldSpec.equals(that.fieldSpec()))
&& (this.keySpec.equals(that.keySpec()))
&& (this.notificationSettings.equals(that.notificationSettings()))
&& (this.notifications.equals(that.notifications()))
&& (this.storage.equals(that.storage()));
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= (id == null) ? 0 : id.hashCode();
h$ *= 1000003;
h$ ^= title.hashCode();
h$ *= 1000003;
h$ ^= description.hashCode();
h$ *= 1000003;
h$ ^= priority;
h$ *= 1000003;
h$ ^= alert ? 1231 : 1237;
h$ *= 1000003;
h$ ^= config.hashCode();
h$ *= 1000003;
h$ ^= fieldSpec.hashCode();
h$ *= 1000003;
h$ ^= keySpec.hashCode();
h$ *= 1000003;
h$ ^= notificationSettings.hashCode();
h$ *= 1000003;
h$ ^= notifications.hashCode();
h$ *= 1000003;
h$ ^= storage.hashCode();
return h$;
}
@Override
public EventDefinitionDto.Builder toBuilder() {
return new Builder(this);
}
static final class Builder extends EventDefinitionDto.Builder {
private String id;
private String title;
private String description;
private Integer priority;
private Boolean alert;
private EventProcessorConfig config;
private ImmutableMap fieldSpec;
private ImmutableList keySpec;
private EventNotificationSettings notificationSettings;
private ImmutableList notifications;
private ImmutableList storage;
Builder() {
}
private Builder(EventDefinitionDto source) {
this.id = source.id();
this.title = source.title();
this.description = source.description();
this.priority = source.priority();
this.alert = source.alert();
this.config = source.config();
this.fieldSpec = source.fieldSpec();
this.keySpec = source.keySpec();
this.notificationSettings = source.notificationSettings();
this.notifications = source.notifications();
this.storage = source.storage();
}
@Override
public EventDefinitionDto.Builder id(String id) {
this.id = id;
return this;
}
@Override
public EventDefinitionDto.Builder title(String title) {
if (title == null) {
throw new NullPointerException("Null title");
}
this.title = title;
return this;
}
@Override
public EventDefinitionDto.Builder description(String description) {
if (description == null) {
throw new NullPointerException("Null description");
}
this.description = description;
return this;
}
@Override
public EventDefinitionDto.Builder priority(int priority) {
this.priority = priority;
return this;
}
@Override
public EventDefinitionDto.Builder alert(boolean alert) {
this.alert = alert;
return this;
}
@Override
public EventDefinitionDto.Builder config(EventProcessorConfig config) {
if (config == null) {
throw new NullPointerException("Null config");
}
this.config = config;
return this;
}
@Override
public EventDefinitionDto.Builder fieldSpec(ImmutableMap fieldSpec) {
if (fieldSpec == null) {
throw new NullPointerException("Null fieldSpec");
}
this.fieldSpec = fieldSpec;
return this;
}
@Override
public EventDefinitionDto.Builder keySpec(ImmutableList keySpec) {
if (keySpec == null) {
throw new NullPointerException("Null keySpec");
}
this.keySpec = keySpec;
return this;
}
@Override
public EventDefinitionDto.Builder notificationSettings(EventNotificationSettings notificationSettings) {
if (notificationSettings == null) {
throw new NullPointerException("Null notificationSettings");
}
this.notificationSettings = notificationSettings;
return this;
}
@Override
public EventDefinitionDto.Builder notifications(ImmutableList notifications) {
if (notifications == null) {
throw new NullPointerException("Null notifications");
}
this.notifications = notifications;
return this;
}
@Override
public EventDefinitionDto.Builder storage(ImmutableList storage) {
if (storage == null) {
throw new NullPointerException("Null storage");
}
this.storage = storage;
return this;
}
@Override
EventDefinitionDto autoBuild() {
String missing = "";
if (this.title == null) {
missing += " title";
}
if (this.description == null) {
missing += " description";
}
if (this.priority == null) {
missing += " priority";
}
if (this.alert == null) {
missing += " alert";
}
if (this.config == null) {
missing += " config";
}
if (this.fieldSpec == null) {
missing += " fieldSpec";
}
if (this.keySpec == null) {
missing += " keySpec";
}
if (this.notificationSettings == null) {
missing += " notificationSettings";
}
if (this.notifications == null) {
missing += " notifications";
}
if (this.storage == null) {
missing += " storage";
}
if (!missing.isEmpty()) {
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_EventDefinitionDto(
this.id,
this.title,
this.description,
this.priority,
this.alert,
this.config,
this.fieldSpec,
this.keySpec,
this.notificationSettings,
this.notifications,
this.storage);
}
}
}