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

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

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

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 int width;

  private final int height;

  private final int col;

  private final int row;

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

  @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{"
         + "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.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$ ^= width;
    h$ *= 1000003;
    h$ ^= height;
    h$ *= 1000003;
    h$ ^= col;
    h$ *= 1000003;
    h$ ^= row;
    return h$;
  }

  static final class Builder extends WidgetPosition.Builder {
    private Integer width;
    private Integer height;
    private Integer col;
    private Integer row;
    Builder() {
    }
    @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.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.width,
          this.height,
          this.col,
          this.row);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy