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

org.graylog.plugins.views.search.searchtypes.pivot.series.AutoValue_StdDev Maven / Gradle / Ivy

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

import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Optional;
import javax.annotation.Generated;

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

  private final String type;

  private final String id;

  private final String field;

  private AutoValue_StdDev(
      String type,
      String id,
      String field) {
    this.type = type;
    this.id = id;
    this.field = field;
  }

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

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

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

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

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

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

  static final class Builder extends StdDev.Builder {
    private String type;
    private String id;
    private String field;
    Builder() {
    }
    @Override
    public StdDev.Builder type(String type) {
      if (type == null) {
        throw new NullPointerException("Null type");
      }
      this.type = type;
      return this;
    }
    @Override
    public StdDev.Builder id(String id) {
      if (id == null) {
        throw new NullPointerException("Null id");
      }
      this.id = id;
      return this;
    }
    @Override
    Optional id() {
      if (id == null) {
        return Optional.empty();
      } else {
        return Optional.of(id);
      }
    }
    @Override
    public StdDev.Builder field(String field) {
      if (field == null) {
        throw new NullPointerException("Null field");
      }
      this.field = field;
      return this;
    }
    @Override
    String field() {
      if (field == null) {
        throw new IllegalStateException("Property \"field\" has not been set");
      }
      return field;
    }
    @Override
    StdDev autoBuild() {
      String missing = "";
      if (this.type == null) {
        missing += " type";
      }
      if (this.id == null) {
        missing += " id";
      }
      if (this.field == null) {
        missing += " field";
      }
      if (!missing.isEmpty()) {
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_StdDev(
          this.type,
          this.id,
          this.field);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy