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

org.graylog.plugins.views.search.searchtypes.pivot.buckets.AutoValue_TimeUnitInterval Maven / Gradle / Ivy

There is a newer version: 6.0.1
Show newest version
package org.graylog.plugins.views.search.searchtypes.pivot.buckets;

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

@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_TimeUnitInterval extends TimeUnitInterval {

  private final String type;

  private final String timeunit;

  private AutoValue_TimeUnitInterval(
      String type,
      String timeunit) {
    this.type = type;
    this.timeunit = timeunit;
  }

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

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

  @Override
  public String toString() {
    return "TimeUnitInterval{"
        + "type=" + type + ", "
        + "timeunit=" + timeunit
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof TimeUnitInterval) {
      TimeUnitInterval that = (TimeUnitInterval) o;
      return this.type.equals(that.type())
          && this.timeunit.equals(that.timeunit());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= type.hashCode();
    h$ *= 1000003;
    h$ ^= timeunit.hashCode();
    return h$;
  }

  static final class Builder extends TimeUnitInterval.Builder {
    private String type;
    private String timeunit;
    Builder() {
    }
    @Override
    public TimeUnitInterval.Builder type(String type) {
      if (type == null) {
        throw new NullPointerException("Null type");
      }
      this.type = type;
      return this;
    }
    @Override
    public TimeUnitInterval.Builder timeunit(String timeunit) {
      if (timeunit == null) {
        throw new NullPointerException("Null timeunit");
      }
      this.timeunit = timeunit;
      return this;
    }
    @Override
    TimeUnitInterval autoBuild() {
      String missing = "";
      if (this.type == null) {
        missing += " type";
      }
      if (this.timeunit == null) {
        missing += " timeunit";
      }
      if (!missing.isEmpty()) {
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_TimeUnitInterval(
          this.type,
          this.timeunit);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy