org.graylog2.lookup.adapters.dnslookup.$AutoValue_ADnsAnswer Maven / Gradle / Ivy
package org.graylog2.lookup.adapters.dnslookup;
import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.Nullable;
import javax.annotation.processing.Generated;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
abstract class $AutoValue_ADnsAnswer extends ADnsAnswer {
private final String ipAddress;
@Nullable
private final String ipVersion;
private final long dnsTTL;
$AutoValue_ADnsAnswer(
String ipAddress,
@Nullable String ipVersion,
long dnsTTL) {
if (ipAddress == null) {
throw new NullPointerException("Null ipAddress");
}
this.ipAddress = ipAddress;
this.ipVersion = ipVersion;
this.dnsTTL = dnsTTL;
}
@JsonProperty("ip_address")
@Override
public String ipAddress() {
return ipAddress;
}
@JsonProperty("ip_version")
@Nullable
@Override
public String ipVersion() {
return ipVersion;
}
@JsonProperty("dns_ttl")
@Override
public long dnsTTL() {
return dnsTTL;
}
@Override
public String toString() {
return "ADnsAnswer{"
+ "ipAddress=" + ipAddress + ", "
+ "ipVersion=" + ipVersion + ", "
+ "dnsTTL=" + dnsTTL
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof ADnsAnswer) {
ADnsAnswer that = (ADnsAnswer) o;
return this.ipAddress.equals(that.ipAddress())
&& (this.ipVersion == null ? that.ipVersion() == null : this.ipVersion.equals(that.ipVersion()))
&& this.dnsTTL == that.dnsTTL();
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= ipAddress.hashCode();
h$ *= 1000003;
h$ ^= (ipVersion == null) ? 0 : ipVersion.hashCode();
h$ *= 1000003;
h$ ^= (int) ((dnsTTL >>> 32) ^ dnsTTL);
return h$;
}
static class Builder extends ADnsAnswer.Builder {
private String ipAddress;
private String ipVersion;
private long dnsTTL;
private byte set$0;
Builder() {
}
@Override
public ADnsAnswer.Builder ipAddress(String ipAddress) {
if (ipAddress == null) {
throw new NullPointerException("Null ipAddress");
}
this.ipAddress = ipAddress;
return this;
}
@Override
public ADnsAnswer.Builder ipVersion(String ipVersion) {
this.ipVersion = ipVersion;
return this;
}
@Override
public ADnsAnswer.Builder dnsTTL(long dnsTTL) {
this.dnsTTL = dnsTTL;
set$0 |= (byte) 1;
return this;
}
@Override
ADnsAnswer autoBuild() {
if (set$0 != 1
|| this.ipAddress == null) {
StringBuilder missing = new StringBuilder();
if (this.ipAddress == null) {
missing.append(" ipAddress");
}
if ((set$0 & 1) == 0) {
missing.append(" dnsTTL");
}
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_ADnsAnswer(
this.ipAddress,
this.ipVersion,
this.dnsTTL);
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy