org.graylog2.rest.resources.tools.responses.$AutoValue_GrokTesterResponse Maven / Gradle / Ivy
package org.graylog2.rest.resources.tools.responses;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import javax.annotation.Generated;
import javax.annotation.Nullable;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
abstract class $AutoValue_GrokTesterResponse extends GrokTesterResponse {
private final boolean matched;
private final List matches;
private final String pattern;
private final String string;
private final String errorMessage;
$AutoValue_GrokTesterResponse(
boolean matched,
@Nullable List matches,
String pattern,
String string,
@Nullable String errorMessage) {
this.matched = matched;
this.matches = matches;
if (pattern == null) {
throw new NullPointerException("Null pattern");
}
this.pattern = pattern;
if (string == null) {
throw new NullPointerException("Null string");
}
this.string = string;
this.errorMessage = errorMessage;
}
@JsonProperty("matched")
@Override
public boolean matched() {
return matched;
}
@JsonProperty("matches")
@Nullable
@Override
public List matches() {
return matches;
}
@JsonProperty("pattern")
@Override
public String pattern() {
return pattern;
}
@JsonProperty("string")
@Override
public String string() {
return string;
}
@JsonProperty("error_message")
@Nullable
@Override
public String errorMessage() {
return errorMessage;
}
@Override
public String toString() {
return "GrokTesterResponse{"
+ "matched=" + matched + ", "
+ "matches=" + matches + ", "
+ "pattern=" + pattern + ", "
+ "string=" + string + ", "
+ "errorMessage=" + errorMessage
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof GrokTesterResponse) {
GrokTesterResponse that = (GrokTesterResponse) o;
return this.matched == that.matched()
&& (this.matches == null ? that.matches() == null : this.matches.equals(that.matches()))
&& this.pattern.equals(that.pattern())
&& this.string.equals(that.string())
&& (this.errorMessage == null ? that.errorMessage() == null : this.errorMessage.equals(that.errorMessage()));
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= matched ? 1231 : 1237;
h$ *= 1000003;
h$ ^= (matches == null) ? 0 : matches.hashCode();
h$ *= 1000003;
h$ ^= pattern.hashCode();
h$ *= 1000003;
h$ ^= string.hashCode();
h$ *= 1000003;
h$ ^= (errorMessage == null) ? 0 : errorMessage.hashCode();
return h$;
}
}