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

org.graylog2.rest.models.tools.responses.$AutoValue_PageListResponse Maven / Gradle / Ivy

There is a newer version: 6.0.1
Show newest version
package org.graylog2.rest.models.tools.responses;

import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import javax.annotation.Nullable;
import javax.annotation.processing.Generated;
import org.graylog2.database.PaginatedList;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
abstract class $AutoValue_PageListResponse extends PageListResponse {

  private final String query;

  private final PaginatedList.PaginationInfo paginationInfo;

  private final long total;

  private final String sort;

  private final String order;

  private final List elements;

  $AutoValue_PageListResponse(
      @Nullable String query,
      PaginatedList.PaginationInfo paginationInfo,
      long total,
      @Nullable String sort,
      @Nullable String order,
      List elements) {
    this.query = query;
    if (paginationInfo == null) {
      throw new NullPointerException("Null paginationInfo");
    }
    this.paginationInfo = paginationInfo;
    this.total = total;
    this.sort = sort;
    this.order = order;
    if (elements == null) {
      throw new NullPointerException("Null elements");
    }
    this.elements = elements;
  }

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

  @JsonProperty("pagination")
  @Override
  public PaginatedList.PaginationInfo paginationInfo() {
    return paginationInfo;
  }

  @JsonProperty("total")
  @Override
  public long total() {
    return total;
  }

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

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

  @JsonProperty("elements")
  @Override
  public List elements() {
    return elements;
  }

  @Override
  public String toString() {
    return "PageListResponse{"
        + "query=" + query + ", "
        + "paginationInfo=" + paginationInfo + ", "
        + "total=" + total + ", "
        + "sort=" + sort + ", "
        + "order=" + order + ", "
        + "elements=" + elements
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof PageListResponse) {
      PageListResponse that = (PageListResponse) o;
      return (this.query == null ? that.query() == null : this.query.equals(that.query()))
          && this.paginationInfo.equals(that.paginationInfo())
          && this.total == that.total()
          && (this.sort == null ? that.sort() == null : this.sort.equals(that.sort()))
          && (this.order == null ? that.order() == null : this.order.equals(that.order()))
          && this.elements.equals(that.elements());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= (query == null) ? 0 : query.hashCode();
    h$ *= 1000003;
    h$ ^= paginationInfo.hashCode();
    h$ *= 1000003;
    h$ ^= (int) ((total >>> 32) ^ total);
    h$ *= 1000003;
    h$ ^= (sort == null) ? 0 : sort.hashCode();
    h$ *= 1000003;
    h$ ^= (order == null) ? 0 : order.hashCode();
    h$ *= 1000003;
    h$ ^= elements.hashCode();
    return h$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy