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

org.graylog2.rest.models.system.deflector.responses.AutoValue_DeflectorSummary Maven / Gradle / Ivy

There is a newer version: 6.0.2
Show newest version

package org.graylog2.rest.models.system.deflector.responses;

import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.Generated;

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

  private final boolean isUp;
  private final String currentTarget;

  AutoValue_DeflectorSummary(
      boolean isUp,
      String currentTarget) {
    this.isUp = isUp;
    if (currentTarget == null) {
      throw new NullPointerException("Null currentTarget");
    }
    this.currentTarget = currentTarget;
  }

  @JsonProperty(value = "is_up")
  @Override
  public boolean isUp() {
    return isUp;
  }

  @JsonProperty(value = "current_target")
  @Override
  public String currentTarget() {
    return currentTarget;
  }

  @Override
  public String toString() {
    return "DeflectorSummary{"
        + "isUp=" + isUp + ", "
        + "currentTarget=" + currentTarget
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof DeflectorSummary) {
      DeflectorSummary that = (DeflectorSummary) o;
      return (this.isUp == that.isUp())
           && (this.currentTarget.equals(that.currentTarget()));
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h = 1;
    h *= 1000003;
    h ^= this.isUp ? 1231 : 1237;
    h *= 1000003;
    h ^= this.currentTarget.hashCode();
    return h;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy