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

org.graylog.plugins.views.search.views.AutoValue_DashboardWidgetDTO Maven / Gradle / Ivy

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

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

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

  private final String queryId;

  private final String widgetID;

  private AutoValue_DashboardWidgetDTO(
      String queryId,
      String widgetID) {
    this.queryId = queryId;
    this.widgetID = widgetID;
  }

  @JsonProperty("query_id")
  @Override
  public String queryId() {
    return queryId;
  }

  @JsonProperty("widget_id")
  @Override
  public String widgetID() {
    return widgetID;
  }

  @Override
  public String toString() {
    return "DashboardWidgetDTO{"
        + "queryId=" + queryId + ", "
        + "widgetID=" + widgetID
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof DashboardWidgetDTO) {
      DashboardWidgetDTO that = (DashboardWidgetDTO) o;
      return this.queryId.equals(that.queryId())
          && this.widgetID.equals(that.widgetID());
    }
    return false;
  }

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

  @Override
  public DashboardWidgetDTO.Builder toBuilder() {
    return new Builder(this);
  }

  static final class Builder extends DashboardWidgetDTO.Builder {
    private String queryId;
    private String widgetID;
    Builder() {
    }
    private Builder(DashboardWidgetDTO source) {
      this.queryId = source.queryId();
      this.widgetID = source.widgetID();
    }
    @Override
    public DashboardWidgetDTO.Builder queryId(String queryId) {
      if (queryId == null) {
        throw new NullPointerException("Null queryId");
      }
      this.queryId = queryId;
      return this;
    }
    @Override
    public DashboardWidgetDTO.Builder widgetID(String widgetID) {
      if (widgetID == null) {
        throw new NullPointerException("Null widgetID");
      }
      this.widgetID = widgetID;
      return this;
    }
    @Override
    public DashboardWidgetDTO build() {
      String missing = "";
      if (this.queryId == null) {
        missing += " queryId";
      }
      if (this.widgetID == null) {
        missing += " widgetID";
      }
      if (!missing.isEmpty()) {
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_DashboardWidgetDTO(
          this.queryId,
          this.widgetID);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy