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

org.graylog2.rest.resources.streams.responses.AutoValue_StreamRuleListResponse Maven / Gradle / Ivy

There is a newer version: 5.2.6
Show newest version

package org.graylog2.rest.resources.streams.responses;

import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Collection;
import javax.annotation.Generated;
import org.graylog2.plugin.streams.StreamRule;

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

  private final int total;
  private final Collection streamRules;

  AutoValue_StreamRuleListResponse(
      int total,
      Collection streamRules) {
    this.total = total;
    if (streamRules == null) {
      throw new NullPointerException("Null streamRules");
    }
    this.streamRules = streamRules;
  }

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

  @JsonProperty(value = "stream_rules")
  @Override
  public Collection streamRules() {
    return streamRules;
  }

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

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

  @Override
  public int hashCode() {
    int h = 1;
    h *= 1000003;
    h ^= this.total;
    h *= 1000003;
    h ^= this.streamRules.hashCode();
    return h;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy