com.airbus_cyber_security.graylog.events.contentpack.entities.AutoValue_LoggingNotificationConfigEntity Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of graylog-plugin-logging-alert Show documentation
Show all versions of graylog-plugin-logging-alert Show documentation
Graylog ${project.artifactId} plugin.
package com.airbus_cyber_security.graylog.events.contentpack.entities;
import com.airbus_cyber_security.graylog.events.config.SeverityType;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Set;
import javax.annotation.Generated;
import org.graylog2.contentpacks.model.entities.references.ValueReference;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_LoggingNotificationConfigEntity extends LoggingNotificationConfigEntity {
private final String type;
private final SeverityType severity;
private final Set splitFields;
private final ValueReference logBody;
private final int aggregationTime;
private final ValueReference alertTag;
private final boolean singleMessage;
private AutoValue_LoggingNotificationConfigEntity(
String type,
SeverityType severity,
Set splitFields,
ValueReference logBody,
int aggregationTime,
ValueReference alertTag,
boolean singleMessage) {
this.type = type;
this.severity = severity;
this.splitFields = splitFields;
this.logBody = logBody;
this.aggregationTime = aggregationTime;
this.alertTag = alertTag;
this.singleMessage = singleMessage;
}
@JsonProperty("type")
@Override
public String type() {
return type;
}
@JsonProperty("severity")
@Override
public SeverityType severity() {
return severity;
}
@JsonProperty("split_fields")
@Override
public Set splitFields() {
return splitFields;
}
@JsonProperty("log_body")
@Override
public ValueReference logBody() {
return logBody;
}
@JsonProperty("aggregation_time")
@Override
public int aggregationTime() {
return aggregationTime;
}
@JsonProperty("alert_tag")
@Override
public ValueReference alertTag() {
return alertTag;
}
@JsonProperty("single_notification")
@Override
public boolean singleMessage() {
return singleMessage;
}
@Override
public String toString() {
return "LoggingNotificationConfigEntity{"
+ "type=" + type + ", "
+ "severity=" + severity + ", "
+ "splitFields=" + splitFields + ", "
+ "logBody=" + logBody + ", "
+ "aggregationTime=" + aggregationTime + ", "
+ "alertTag=" + alertTag + ", "
+ "singleMessage=" + singleMessage
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof LoggingNotificationConfigEntity) {
LoggingNotificationConfigEntity that = (LoggingNotificationConfigEntity) o;
return this.type.equals(that.type())
&& this.severity.equals(that.severity())
&& this.splitFields.equals(that.splitFields())
&& this.logBody.equals(that.logBody())
&& this.aggregationTime == that.aggregationTime()
&& this.alertTag.equals(that.alertTag())
&& this.singleMessage == that.singleMessage();
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= type.hashCode();
h$ *= 1000003;
h$ ^= severity.hashCode();
h$ *= 1000003;
h$ ^= splitFields.hashCode();
h$ *= 1000003;
h$ ^= logBody.hashCode();
h$ *= 1000003;
h$ ^= aggregationTime;
h$ *= 1000003;
h$ ^= alertTag.hashCode();
h$ *= 1000003;
h$ ^= singleMessage ? 1231 : 1237;
return h$;
}
@Override
public LoggingNotificationConfigEntity.Builder toBuilder() {
return new Builder(this);
}
static final class Builder extends LoggingNotificationConfigEntity.Builder {
private String type;
private SeverityType severity;
private Set splitFields;
private ValueReference logBody;
private Integer aggregationTime;
private ValueReference alertTag;
private Boolean singleMessage;
Builder() {
}
private Builder(LoggingNotificationConfigEntity source) {
this.type = source.type();
this.severity = source.severity();
this.splitFields = source.splitFields();
this.logBody = source.logBody();
this.aggregationTime = source.aggregationTime();
this.alertTag = source.alertTag();
this.singleMessage = source.singleMessage();
}
@Override
public LoggingNotificationConfigEntity.Builder type(String type) {
if (type == null) {
throw new NullPointerException("Null type");
}
this.type = type;
return this;
}
@Override
public LoggingNotificationConfigEntity.Builder severity(SeverityType severity) {
if (severity == null) {
throw new NullPointerException("Null severity");
}
this.severity = severity;
return this;
}
@Override
public LoggingNotificationConfigEntity.Builder splitFields(Set splitFields) {
if (splitFields == null) {
throw new NullPointerException("Null splitFields");
}
this.splitFields = splitFields;
return this;
}
@Override
public LoggingNotificationConfigEntity.Builder logBody(ValueReference logBody) {
if (logBody == null) {
throw new NullPointerException("Null logBody");
}
this.logBody = logBody;
return this;
}
@Override
public LoggingNotificationConfigEntity.Builder aggregationTime(int aggregationTime) {
this.aggregationTime = aggregationTime;
return this;
}
@Override
public LoggingNotificationConfigEntity.Builder alertTag(ValueReference alertTag) {
if (alertTag == null) {
throw new NullPointerException("Null alertTag");
}
this.alertTag = alertTag;
return this;
}
@Override
public LoggingNotificationConfigEntity.Builder singleMessage(boolean singleMessage) {
this.singleMessage = singleMessage;
return this;
}
@Override
public LoggingNotificationConfigEntity build() {
String missing = "";
if (this.type == null) {
missing += " type";
}
if (this.severity == null) {
missing += " severity";
}
if (this.splitFields == null) {
missing += " splitFields";
}
if (this.logBody == null) {
missing += " logBody";
}
if (this.aggregationTime == null) {
missing += " aggregationTime";
}
if (this.alertTag == null) {
missing += " alertTag";
}
if (this.singleMessage == null) {
missing += " singleMessage";
}
if (!missing.isEmpty()) {
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_LoggingNotificationConfigEntity(
this.type,
this.severity,
this.splitFields,
this.logBody,
this.aggregationTime,
this.alertTag,
this.singleMessage);
}
}
}