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

org.graylog.plugins.views.migrations.V20191125144500_MigrateDashboardsToViewsSupport.AutoValue_Widget Maven / Gradle / Ivy

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

import javax.annotation.processing.Generated;
import org.graylog.plugins.views.migrations.V20191125144500_MigrateDashboardsToViewsSupport.dashboardwidgets.WidgetConfig;

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

  private final String id;

  private final String type;

  private final String description;

  private final int cacheTime;

  private final String creatorUserId;

  private final WidgetConfig config;

  private AutoValue_Widget(
      String id,
      String type,
      String description,
      int cacheTime,
      String creatorUserId,
      WidgetConfig config) {
    this.id = id;
    this.type = type;
    this.description = description;
    this.cacheTime = cacheTime;
    this.creatorUserId = creatorUserId;
    this.config = config;
  }

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

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

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

  @Override
  public int cacheTime() {
    return cacheTime;
  }

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

  @Override
  public WidgetConfig config() {
    return config;
  }

  @Override
  public String toString() {
    return "Widget{"
        + "id=" + id + ", "
        + "type=" + type + ", "
        + "description=" + description + ", "
        + "cacheTime=" + cacheTime + ", "
        + "creatorUserId=" + creatorUserId + ", "
        + "config=" + config
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof Widget) {
      Widget that = (Widget) o;
      return this.id.equals(that.id())
          && this.type.equals(that.type())
          && this.description.equals(that.description())
          && this.cacheTime == that.cacheTime()
          && this.creatorUserId.equals(that.creatorUserId())
          && this.config.equals(that.config());
    }
    return false;
  }

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

  static final class Builder extends Widget.Builder {
    private String id;
    private String type;
    private String description;
    private Integer cacheTime;
    private String creatorUserId;
    private WidgetConfig config;
    Builder() {
    }
    @Override
    public Widget.Builder id(String id) {
      if (id == null) {
        throw new NullPointerException("Null id");
      }
      this.id = id;
      return this;
    }
    @Override
    public Widget.Builder type(String type) {
      if (type == null) {
        throw new NullPointerException("Null type");
      }
      this.type = type;
      return this;
    }
    @Override
    public Widget.Builder description(String description) {
      if (description == null) {
        throw new NullPointerException("Null description");
      }
      this.description = description;
      return this;
    }
    @Override
    public Widget.Builder cacheTime(int cacheTime) {
      this.cacheTime = cacheTime;
      return this;
    }
    @Override
    public Widget.Builder creatorUserId(String creatorUserId) {
      if (creatorUserId == null) {
        throw new NullPointerException("Null creatorUserId");
      }
      this.creatorUserId = creatorUserId;
      return this;
    }
    @Override
    public Widget.Builder config(WidgetConfig config) {
      if (config == null) {
        throw new NullPointerException("Null config");
      }
      this.config = config;
      return this;
    }
    @Override
    public Widget build() {
      String missing = "";
      if (this.id == null) {
        missing += " id";
      }
      if (this.type == null) {
        missing += " type";
      }
      if (this.description == null) {
        missing += " description";
      }
      if (this.cacheTime == null) {
        missing += " cacheTime";
      }
      if (this.creatorUserId == null) {
        missing += " creatorUserId";
      }
      if (this.config == null) {
        missing += " config";
      }
      if (!missing.isEmpty()) {
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_Widget(
          this.id,
          this.type,
          this.description,
          this.cacheTime,
          this.creatorUserId,
          this.config);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy