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

org.graylog2.cluster.$AutoValue_ClusterConfigChangedEvent Maven / Gradle / Ivy

There is a newer version: 6.1.4
Show newest version
package org.graylog2.cluster;

import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.processing.Generated;
import javax.validation.constraints.NotEmpty;
import org.joda.time.DateTime;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
abstract class $AutoValue_ClusterConfigChangedEvent extends ClusterConfigChangedEvent {

  private final DateTime date;

  private final @NotEmpty String nodeId;

  private final @NotEmpty String type;

  $AutoValue_ClusterConfigChangedEvent(
      DateTime date,
      @NotEmpty String nodeId,
      @NotEmpty String type) {
    if (date == null) {
      throw new NullPointerException("Null date");
    }
    this.date = date;
    if (nodeId == null) {
      throw new NullPointerException("Null nodeId");
    }
    this.nodeId = nodeId;
    if (type == null) {
      throw new NullPointerException("Null type");
    }
    this.type = type;
  }

  @JsonProperty
  @Override
  public DateTime date() {
    return date;
  }

  @JsonProperty
  @Override
  public @NotEmpty String nodeId() {
    return nodeId;
  }

  @JsonProperty
  @Override
  public @NotEmpty String type() {
    return type;
  }

  @Override
  public String toString() {
    return "ClusterConfigChangedEvent{"
        + "date=" + date + ", "
        + "nodeId=" + nodeId + ", "
        + "type=" + type
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof ClusterConfigChangedEvent) {
      ClusterConfigChangedEvent that = (ClusterConfigChangedEvent) o;
      return this.date.equals(that.date())
          && this.nodeId.equals(that.nodeId())
          && this.type.equals(that.type());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= date.hashCode();
    h$ *= 1000003;
    h$ ^= nodeId.hashCode();
    h$ *= 1000003;
    h$ ^= type.hashCode();
    return h$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy