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

org.graylog2.indexer.indices.stats.AutoValue_IndexStatistics Maven / Gradle / Ivy

There is a newer version: 6.0.2
Show newest version
package org.graylog2.indexer.indices.stats;

import java.util.List;
import javax.annotation.Generated;
import org.graylog2.rest.models.system.indexer.responses.IndexStats;
import org.graylog2.rest.models.system.indexer.responses.ShardRouting;

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

  private final String index;

  private final IndexStats primaryShards;

  private final IndexStats allShards;

  private final List routing;

  AutoValue_IndexStatistics(
      String index,
      IndexStats primaryShards,
      IndexStats allShards,
      List routing) {
    if (index == null) {
      throw new NullPointerException("Null index");
    }
    this.index = index;
    if (primaryShards == null) {
      throw new NullPointerException("Null primaryShards");
    }
    this.primaryShards = primaryShards;
    if (allShards == null) {
      throw new NullPointerException("Null allShards");
    }
    this.allShards = allShards;
    if (routing == null) {
      throw new NullPointerException("Null routing");
    }
    this.routing = routing;
  }

  @Override
  public String index() {
    return index;
  }

  @Override
  public IndexStats primaryShards() {
    return primaryShards;
  }

  @Override
  public IndexStats allShards() {
    return allShards;
  }

  @Override
  public List routing() {
    return routing;
  }

  @Override
  public String toString() {
    return "IndexStatistics{"
         + "index=" + index + ", "
         + "primaryShards=" + primaryShards + ", "
         + "allShards=" + allShards + ", "
         + "routing=" + routing
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof IndexStatistics) {
      IndexStatistics that = (IndexStatistics) o;
      return this.index.equals(that.index())
          && this.primaryShards.equals(that.primaryShards())
          && this.allShards.equals(that.allShards())
          && this.routing.equals(that.routing());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= index.hashCode();
    h$ *= 1000003;
    h$ ^= primaryShards.hashCode();
    h$ *= 1000003;
    h$ ^= allShards.hashCode();
    h$ *= 1000003;
    h$ ^= routing.hashCode();
    return h$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy