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

org.graylog.events.context.AutoValue_EventDefinitionContextService_SchedulerCtx Maven / Gradle / Ivy

package org.graylog.events.context;

import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Optional;
import javax.annotation.Generated;
import org.graylog.scheduler.JobTriggerData;
import org.graylog.scheduler.JobTriggerStatus;
import org.joda.time.DateTime;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_EventDefinitionContextService_SchedulerCtx extends EventDefinitionContextService.SchedulerCtx {

  private final boolean isScheduled;

  private final Optional status;

  private final Optional nextTime;

  private final Optional triggeredAt;

  private final long queuedNotifications;

  private final Optional data;

  AutoValue_EventDefinitionContextService_SchedulerCtx(
      boolean isScheduled,
      Optional status,
      Optional nextTime,
      Optional triggeredAt,
      long queuedNotifications,
      Optional data) {
    this.isScheduled = isScheduled;
    if (status == null) {
      throw new NullPointerException("Null status");
    }
    this.status = status;
    if (nextTime == null) {
      throw new NullPointerException("Null nextTime");
    }
    this.nextTime = nextTime;
    if (triggeredAt == null) {
      throw new NullPointerException("Null triggeredAt");
    }
    this.triggeredAt = triggeredAt;
    this.queuedNotifications = queuedNotifications;
    if (data == null) {
      throw new NullPointerException("Null data");
    }
    this.data = data;
  }

  @JsonProperty("is_scheduled")
  @Override
  public boolean isScheduled() {
    return isScheduled;
  }

  @JsonProperty("status")
  @Override
  public Optional status() {
    return status;
  }

  @JsonProperty("next_time")
  @Override
  public Optional nextTime() {
    return nextTime;
  }

  @JsonProperty("triggered_at")
  @Override
  public Optional triggeredAt() {
    return triggeredAt;
  }

  @JsonProperty("queued_notifications")
  @Override
  public long queuedNotifications() {
    return queuedNotifications;
  }

  @JsonProperty("data")
  @Override
  public Optional data() {
    return data;
  }

  @Override
  public String toString() {
    return "SchedulerCtx{"
        + "isScheduled=" + isScheduled + ", "
        + "status=" + status + ", "
        + "nextTime=" + nextTime + ", "
        + "triggeredAt=" + triggeredAt + ", "
        + "queuedNotifications=" + queuedNotifications + ", "
        + "data=" + data
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof EventDefinitionContextService.SchedulerCtx) {
      EventDefinitionContextService.SchedulerCtx that = (EventDefinitionContextService.SchedulerCtx) o;
      return this.isScheduled == that.isScheduled()
          && this.status.equals(that.status())
          && this.nextTime.equals(that.nextTime())
          && this.triggeredAt.equals(that.triggeredAt())
          && this.queuedNotifications == that.queuedNotifications()
          && this.data.equals(that.data());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= isScheduled ? 1231 : 1237;
    h$ *= 1000003;
    h$ ^= status.hashCode();
    h$ *= 1000003;
    h$ ^= nextTime.hashCode();
    h$ *= 1000003;
    h$ ^= triggeredAt.hashCode();
    h$ *= 1000003;
    h$ ^= (int) ((queuedNotifications >>> 32) ^ queuedNotifications);
    h$ *= 1000003;
    h$ ^= data.hashCode();
    return h$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy