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

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

There is a newer version: 6.0.2
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.Collector;

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

  private final long total;

  private final Collection collectors;

  AutoValue_CollectorListResponse(
      long total,
      Collection collectors) {
    this.total = total;
    if (collectors == null) {
      throw new NullPointerException("Null collectors");
    }
    this.collectors = collectors;
  }

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

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

  @Override
  public String toString() {
    return "CollectorListResponse{"
        + "total=" + total + ", "
        + "collectors=" + collectors
        + "}";
  }

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

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy