org.graylog2.rest.resources.streams.responses.AutoValue_AlertConditionTestResponse Maven / Gradle / Ivy
package org.graylog2.rest.resources.streams.responses;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.collect.ImmutableList;
import java.util.Optional;
import javax.annotation.processing.Generated;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_AlertConditionTestResponse extends AlertConditionTestResponse {
private final boolean triggered;
private final Optional description;
private final ImmutableList errorMessages;
AutoValue_AlertConditionTestResponse(
boolean triggered,
Optional description,
ImmutableList errorMessages) {
this.triggered = triggered;
if (description == null) {
throw new NullPointerException("Null description");
}
this.description = description;
if (errorMessages == null) {
throw new NullPointerException("Null errorMessages");
}
this.errorMessages = errorMessages;
}
@JsonProperty("triggered")
@Override
public boolean triggered() {
return triggered;
}
@JsonProperty("description")
@Override
public Optional description() {
return description;
}
@JsonProperty("error_messages")
@Override
public ImmutableList errorMessages() {
return errorMessages;
}
@Override
public String toString() {
return "AlertConditionTestResponse{"
+ "triggered=" + triggered + ", "
+ "description=" + description + ", "
+ "errorMessages=" + errorMessages
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof AlertConditionTestResponse) {
AlertConditionTestResponse that = (AlertConditionTestResponse) o;
return this.triggered == that.triggered()
&& this.description.equals(that.description())
&& this.errorMessages.equals(that.errorMessages());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= triggered ? 1231 : 1237;
h$ *= 1000003;
h$ ^= description.hashCode();
h$ *= 1000003;
h$ ^= errorMessages.hashCode();
return h$;
}
}