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

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

There is a newer version: 6.0.1
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_TxtDnsAnswer extends TxtDnsAnswer {

  private final String value;

  private final long dnsTTL;

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

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

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

  @Override
  public String toString() {
    return "TxtDnsAnswer{"
        + "value=" + value + ", "
        + "dnsTTL=" + dnsTTL
        + "}";
  }

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

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

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy