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

org.graylog2.migrations.V20180214093600_AdjustDashboardPositionToNewResolution.AutoValue_WidgetPosition Maven / Gradle / Ivy

There is a newer version: 6.0.1
Show newest version
package org.graylog2.migrations.V20180214093600_AdjustDashboardPositionToNewResolution;

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

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

  private final String id;

  private final int width;

  private final int height;

  private final int col;

  private final int row;

  private AutoValue_WidgetPosition(
      String id,
      int width,
      int height,
      int col,
      int row) {
    this.id = id;
    this.width = width;
    this.height = height;
    this.col = col;
    this.row = row;
  }

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

  @JsonProperty("width")
  @Override
  public int width() {
    return width;
  }

  @JsonProperty("height")
  @Override
  public int height() {
    return height;
  }

  @JsonProperty("col")
  @Override
  public int col() {
    return col;
  }

  @JsonProperty("row")
  @Override
  public int row() {
    return row;
  }

  @Override
  public String toString() {
    return "WidgetPosition{"
        + "id=" + id + ", "
        + "width=" + width + ", "
        + "height=" + height + ", "
        + "col=" + col + ", "
        + "row=" + row
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof WidgetPosition) {
      WidgetPosition that = (WidgetPosition) o;
      return this.id.equals(that.id())
          && this.width == that.width()
          && this.height == that.height()
          && this.col == that.col()
          && this.row == that.row();
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= id.hashCode();
    h$ *= 1000003;
    h$ ^= width;
    h$ *= 1000003;
    h$ ^= height;
    h$ *= 1000003;
    h$ ^= col;
    h$ *= 1000003;
    h$ ^= row;
    return h$;
  }

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

  static final class Builder extends WidgetPosition.Builder {
    private String id;
    private Integer width;
    private Integer height;
    private Integer col;
    private Integer row;
    Builder() {
    }
    private Builder(WidgetPosition source) {
      this.id = source.id();
      this.width = source.width();
      this.height = source.height();
      this.col = source.col();
      this.row = source.row();
    }
    @Override
    public WidgetPosition.Builder id(String id) {
      if (id == null) {
        throw new NullPointerException("Null id");
      }
      this.id = id;
      return this;
    }
    @Override
    public WidgetPosition.Builder width(int width) {
      this.width = width;
      return this;
    }
    @Override
    public WidgetPosition.Builder height(int height) {
      this.height = height;
      return this;
    }
    @Override
    public WidgetPosition.Builder col(int col) {
      this.col = col;
      return this;
    }
    @Override
    public WidgetPosition.Builder row(int row) {
      this.row = row;
      return this;
    }
    @Override
    public WidgetPosition build() {
      String missing = "";
      if (this.id == null) {
        missing += " id";
      }
      if (this.width == null) {
        missing += " width";
      }
      if (this.height == null) {
        missing += " height";
      }
      if (this.col == null) {
        missing += " col";
      }
      if (this.row == null) {
        missing += " row";
      }
      if (!missing.isEmpty()) {
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_WidgetPosition(
          this.id,
          this.width,
          this.height,
          this.col,
          this.row);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy