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

org.graylog.plugins.views.migrations.V20191203120602_MigrateSavedSearchesToViewsSupport.view.AutoValue_AutoInterval Maven / Gradle / Ivy

There is a newer version: 6.0.1
Show newest version
package org.graylog.plugins.views.migrations.V20191203120602_MigrateSavedSearchesToViewsSupport.view;

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

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

  private final String type;

  private final Optional scaling;

  private AutoValue_AutoInterval(
      String type,
      Optional scaling) {
    this.type = type;
    this.scaling = scaling;
  }

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

  @JsonProperty("scaling")
  @Override
  public Optional scaling() {
    return scaling;
  }

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

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

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

  static final class Builder extends AutoInterval.Builder {
    private String type;
    private Optional scaling = Optional.empty();
    Builder() {
    }
    @Override
    public AutoInterval.Builder type(String type) {
      if (type == null) {
        throw new NullPointerException("Null type");
      }
      this.type = type;
      return this;
    }
    @Override
    public AutoInterval.Builder scaling(@Nullable Double scaling) {
      this.scaling = Optional.ofNullable(scaling);
      return this;
    }
    @Override
    public AutoInterval build() {
      String missing = "";
      if (this.type == null) {
        missing += " type";
      }
      if (!missing.isEmpty()) {
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_AutoInterval(
          this.type,
          this.scaling);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy