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

org.graylog2.rest.resources.tools.AutoValue_NaturalDateTesterResource_NaturalDateResponse Maven / Gradle / Ivy

There is a newer version: 6.0.1
Show newest version
package org.graylog2.rest.resources.tools;

import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.processing.Generated;
import org.joda.time.DateTime;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_NaturalDateTesterResource_NaturalDateResponse extends NaturalDateTesterResource.NaturalDateResponse {

  private final DateTime from;

  private final DateTime to;

  private final String timezone;

  AutoValue_NaturalDateTesterResource_NaturalDateResponse(
      DateTime from,
      DateTime to,
      String timezone) {
    if (from == null) {
      throw new NullPointerException("Null from");
    }
    this.from = from;
    if (to == null) {
      throw new NullPointerException("Null to");
    }
    this.to = to;
    if (timezone == null) {
      throw new NullPointerException("Null timezone");
    }
    this.timezone = timezone;
  }

  @JsonProperty
  @Override
  public DateTime from() {
    return from;
  }

  @JsonProperty
  @Override
  public DateTime to() {
    return to;
  }

  @JsonProperty
  @Override
  public String timezone() {
    return timezone;
  }

  @Override
  public String toString() {
    return "NaturalDateResponse{"
        + "from=" + from + ", "
        + "to=" + to + ", "
        + "timezone=" + timezone
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof NaturalDateTesterResource.NaturalDateResponse) {
      NaturalDateTesterResource.NaturalDateResponse that = (NaturalDateTesterResource.NaturalDateResponse) o;
      return this.from.equals(that.from())
          && this.to.equals(that.to())
          && this.timezone.equals(that.timezone());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= from.hashCode();
    h$ *= 1000003;
    h$ ^= to.hashCode();
    h$ *= 1000003;
    h$ ^= timezone.hashCode();
    return h$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy