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

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

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

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

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

  private final String type;

  private final String field;

  private final Interval interval;

  private AutoValue_Time(
      String type,
      String field,
      Interval interval) {
    this.type = type;
    this.field = field;
    this.interval = interval;
  }

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

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

  @JsonProperty
  @Override
  public Interval interval() {
    return interval;
  }

  @Override
  public String toString() {
    return "Time{"
         + "type=" + type + ", "
         + "field=" + field + ", "
         + "interval=" + interval
        + "}";
  }

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

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

  static final class Builder extends Time.Builder {
    private String type;
    private String field;
    private Interval interval;
    Builder() {
    }
    @Override
    public Time.Builder type(String type) {
      if (type == null) {
        throw new NullPointerException("Null type");
      }
      this.type = type;
      return this;
    }
    @Override
    public Time.Builder field(String field) {
      if (field == null) {
        throw new NullPointerException("Null field");
      }
      this.field = field;
      return this;
    }
    @Override
    public Time.Builder interval(Interval interval) {
      if (interval == null) {
        throw new NullPointerException("Null interval");
      }
      this.interval = interval;
      return this;
    }
    @Override
    public Time build() {
      String missing = "";
      if (this.type == null) {
        missing += " type";
      }
      if (this.field == null) {
        missing += " field";
      }
      if (this.interval == null) {
        missing += " interval";
      }
      if (!missing.isEmpty()) {
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_Time(
          this.type,
          this.field,
          this.interval);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy