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

org.graylog.events.notifications.AutoValue_EventNotificationSettings Maven / Gradle / Ivy

There is a newer version: 6.1.4
Show newest version
package org.graylog.events.notifications;

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

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

  private final long gracePeriodMs;

  private final long backlogSize;

  private AutoValue_EventNotificationSettings(
      long gracePeriodMs,
      long backlogSize) {
    this.gracePeriodMs = gracePeriodMs;
    this.backlogSize = backlogSize;
  }

  @JsonProperty("grace_period_ms")
  @Override
  public long gracePeriodMs() {
    return gracePeriodMs;
  }

  @JsonProperty("backlog_size")
  @Override
  public long backlogSize() {
    return backlogSize;
  }

  @Override
  public String toString() {
    return "EventNotificationSettings{"
        + "gracePeriodMs=" + gracePeriodMs + ", "
        + "backlogSize=" + backlogSize
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof EventNotificationSettings) {
      EventNotificationSettings that = (EventNotificationSettings) o;
      return this.gracePeriodMs == that.gracePeriodMs()
          && this.backlogSize == that.backlogSize();
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= (int) ((gracePeriodMs >>> 32) ^ gracePeriodMs);
    h$ *= 1000003;
    h$ ^= (int) ((backlogSize >>> 32) ^ backlogSize);
    return h$;
  }

  @Override
  public EventNotificationSettings.Builder toBuilder() {
    return new Builder(this);
  }

  static final class Builder extends EventNotificationSettings.Builder {
    private long gracePeriodMs;
    private long backlogSize;
    private byte set$0;
    Builder() {
    }
    private Builder(EventNotificationSettings source) {
      this.gracePeriodMs = source.gracePeriodMs();
      this.backlogSize = source.backlogSize();
      set$0 = (byte) 3;
    }
    @Override
    public EventNotificationSettings.Builder gracePeriodMs(long gracePeriodMs) {
      this.gracePeriodMs = gracePeriodMs;
      set$0 |= (byte) 1;
      return this;
    }
    @Override
    public EventNotificationSettings.Builder backlogSize(long backlogSize) {
      this.backlogSize = backlogSize;
      set$0 |= (byte) 2;
      return this;
    }
    @Override
    public EventNotificationSettings build() {
      if (set$0 != 3) {
        StringBuilder missing = new StringBuilder();
        if ((set$0 & 1) == 0) {
          missing.append(" gracePeriodMs");
        }
        if ((set$0 & 2) == 0) {
          missing.append(" backlogSize");
        }
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_EventNotificationSettings(
          this.gracePeriodMs,
          this.backlogSize);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy