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

org.graylog.plugins.sidecar.rest.responses.AutoValue_CollectorUploadListResponse Maven / Gradle / Ivy

There is a newer version: 6.0.1
Show newest version
package org.graylog.plugins.sidecar.rest.responses;

import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Collection;
import javax.annotation.Generated;
import org.graylog.plugins.sidecar.rest.models.CollectorUpload;
import org.graylog2.database.PaginatedList;

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

  private final PaginatedList.PaginationInfo paginationInfo;

  private final long total;

  private final Collection uploads;

  AutoValue_CollectorUploadListResponse(
      PaginatedList.PaginationInfo paginationInfo,
      long total,
      Collection uploads) {
    if (paginationInfo == null) {
      throw new NullPointerException("Null paginationInfo");
    }
    this.paginationInfo = paginationInfo;
    this.total = total;
    if (uploads == null) {
      throw new NullPointerException("Null uploads");
    }
    this.uploads = uploads;
  }

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

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

  @JsonProperty
  @Override
  public Collection uploads() {
    return uploads;
  }

  @Override
  public String toString() {
    return "CollectorUploadListResponse{"
         + "paginationInfo=" + paginationInfo + ", "
         + "total=" + total + ", "
         + "uploads=" + uploads
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof CollectorUploadListResponse) {
      CollectorUploadListResponse that = (CollectorUploadListResponse) o;
      return this.paginationInfo.equals(that.paginationInfo())
          && this.total == that.total()
          && this.uploads.equals(that.uploads());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= paginationInfo.hashCode();
    h$ *= 1000003;
    h$ ^= (int) ((total >>> 32) ^ total);
    h$ *= 1000003;
    h$ ^= uploads.hashCode();
    return h$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy