All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.graylog2.lookup.adapters.dnslookup.$AutoValue_PtrDnsAnswer Maven / Gradle / Ivy

There is a newer version: 6.0.2
Show newest version
package org.graylog2.lookup.adapters.dnslookup;

import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.Generated;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
abstract class $AutoValue_PtrDnsAnswer extends PtrDnsAnswer {

  private final String domain;

  private final String fullDomain;

  private final long dnsTTL;

  $AutoValue_PtrDnsAnswer(
      String domain,
      String fullDomain,
      long dnsTTL) {
    if (domain == null) {
      throw new NullPointerException("Null domain");
    }
    this.domain = domain;
    if (fullDomain == null) {
      throw new NullPointerException("Null fullDomain");
    }
    this.fullDomain = fullDomain;
    this.dnsTTL = dnsTTL;
  }

  @JsonProperty("domain")
  @Override
  public String domain() {
    return domain;
  }

  @JsonProperty("full_domain")
  @Override
  public String fullDomain() {
    return fullDomain;
  }

  @JsonProperty("dns_ttl")
  @Override
  public long dnsTTL() {
    return dnsTTL;
  }

  @Override
  public String toString() {
    return "PtrDnsAnswer{"
         + "domain=" + domain + ", "
         + "fullDomain=" + fullDomain + ", "
         + "dnsTTL=" + dnsTTL
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof PtrDnsAnswer) {
      PtrDnsAnswer that = (PtrDnsAnswer) o;
      return this.domain.equals(that.domain())
          && this.fullDomain.equals(that.fullDomain())
          && this.dnsTTL == that.dnsTTL();
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= domain.hashCode();
    h$ *= 1000003;
    h$ ^= fullDomain.hashCode();
    h$ *= 1000003;
    h$ ^= (int) ((dnsTTL >>> 32) ^ dnsTTL);
    return h$;
  }

  static class Builder extends PtrDnsAnswer.Builder {
    private String domain;
    private String fullDomain;
    private Long dnsTTL;
    Builder() {
    }
    @Override
    public PtrDnsAnswer.Builder domain(String domain) {
      if (domain == null) {
        throw new NullPointerException("Null domain");
      }
      this.domain = domain;
      return this;
    }
    @Override
    public PtrDnsAnswer.Builder fullDomain(String fullDomain) {
      if (fullDomain == null) {
        throw new NullPointerException("Null fullDomain");
      }
      this.fullDomain = fullDomain;
      return this;
    }
    @Override
    public PtrDnsAnswer.Builder dnsTTL(long dnsTTL) {
      this.dnsTTL = dnsTTL;
      return this;
    }
    @Override
    PtrDnsAnswer autoBuild() {
      String missing = "";
      if (this.domain == null) {
        missing += " domain";
      }
      if (this.fullDomain == null) {
        missing += " fullDomain";
      }
      if (this.dnsTTL == null) {
        missing += " dnsTTL";
      }
      if (!missing.isEmpty()) {
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_PtrDnsAnswer(
          this.domain,
          this.fullDomain,
          this.dnsTTL);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy