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

org.graylog2.rest.models.streams.alerts.AutoValue_AlertSummary Maven / Gradle / Ivy

There is a newer version: 6.0.5
Show newest version

package org.graylog2.rest.models.streams.alerts;

import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
import javax.annotation.Generated;
import org.joda.time.DateTime;

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

  private final String id;
  private final String conditionId;
  private final String streamId;
  private final String description;
  private final Map conditionParameters;
  private final DateTime triggeredAt;

  AutoValue_AlertSummary(
      String id,
      String conditionId,
      String streamId,
      String description,
      Map conditionParameters,
      DateTime triggeredAt) {
    if (id == null) {
      throw new NullPointerException("Null id");
    }
    this.id = id;
    if (conditionId == null) {
      throw new NullPointerException("Null conditionId");
    }
    this.conditionId = conditionId;
    if (streamId == null) {
      throw new NullPointerException("Null streamId");
    }
    this.streamId = streamId;
    if (description == null) {
      throw new NullPointerException("Null description");
    }
    this.description = description;
    if (conditionParameters == null) {
      throw new NullPointerException("Null conditionParameters");
    }
    this.conditionParameters = conditionParameters;
    if (triggeredAt == null) {
      throw new NullPointerException("Null triggeredAt");
    }
    this.triggeredAt = triggeredAt;
  }

  @JsonProperty
  @Override
  public String id() {
    return id;
  }

  @JsonProperty(value = "condition_id")
  @Override
  public String conditionId() {
    return conditionId;
  }

  @JsonProperty(value = "stream_id")
  @Override
  public String streamId() {
    return streamId;
  }

  @JsonProperty
  @Override
  public String description() {
    return description;
  }

  @JsonProperty(value = "condition_parameters")
  @Override
  public Map conditionParameters() {
    return conditionParameters;
  }

  @JsonProperty(value = "triggered_at")
  @Override
  public DateTime triggeredAt() {
    return triggeredAt;
  }

  @Override
  public String toString() {
    return "AlertSummary{"
        + "id=" + id + ", "
        + "conditionId=" + conditionId + ", "
        + "streamId=" + streamId + ", "
        + "description=" + description + ", "
        + "conditionParameters=" + conditionParameters + ", "
        + "triggeredAt=" + triggeredAt
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof AlertSummary) {
      AlertSummary that = (AlertSummary) o;
      return (this.id.equals(that.id()))
           && (this.conditionId.equals(that.conditionId()))
           && (this.streamId.equals(that.streamId()))
           && (this.description.equals(that.description()))
           && (this.conditionParameters.equals(that.conditionParameters()))
           && (this.triggeredAt.equals(that.triggeredAt()));
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h = 1;
    h *= 1000003;
    h ^= this.id.hashCode();
    h *= 1000003;
    h ^= this.conditionId.hashCode();
    h *= 1000003;
    h ^= this.streamId.hashCode();
    h *= 1000003;
    h ^= this.description.hashCode();
    h *= 1000003;
    h ^= this.conditionParameters.hashCode();
    h *= 1000003;
    h ^= this.triggeredAt.hashCode();
    return h;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy