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

org.graylog.events.notifications.AutoValue_EventNotificationExecutionJob_Config 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;
import javax.validation.constraints.NotBlank;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_EventNotificationExecutionJob_Config extends EventNotificationExecutionJob.Config {

  private final String type;

  private final @NotBlank String notificationId;

  private AutoValue_EventNotificationExecutionJob_Config(
      String type,
      @NotBlank String notificationId) {
    this.type = type;
    this.notificationId = notificationId;
  }

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

  @JsonProperty("notification_id")
  @Override
  public @NotBlank String notificationId() {
    return notificationId;
  }

  @Override
  public String toString() {
    return "Config{"
        + "type=" + type + ", "
        + "notificationId=" + notificationId
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof EventNotificationExecutionJob.Config) {
      EventNotificationExecutionJob.Config that = (EventNotificationExecutionJob.Config) o;
      return this.type.equals(that.type())
          && this.notificationId.equals(that.notificationId());
    }
    return false;
  }

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

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

  static final class Builder extends EventNotificationExecutionJob.Config.Builder {
    private String type;
    private @NotBlank String notificationId;
    Builder() {
    }
    private Builder(EventNotificationExecutionJob.Config source) {
      this.type = source.type();
      this.notificationId = source.notificationId();
    }
    @Override
    public EventNotificationExecutionJob.Config.Builder type(String type) {
      if (type == null) {
        throw new NullPointerException("Null type");
      }
      this.type = type;
      return this;
    }
    @Override
    public EventNotificationExecutionJob.Config.Builder notificationId(String notificationId) {
      if (notificationId == null) {
        throw new NullPointerException("Null notificationId");
      }
      this.notificationId = notificationId;
      return this;
    }
    @Override
    EventNotificationExecutionJob.Config autoBuild() {
      if (this.type == null
          || this.notificationId == null) {
        StringBuilder missing = new StringBuilder();
        if (this.type == null) {
          missing.append(" type");
        }
        if (this.notificationId == null) {
          missing.append(" notificationId");
        }
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_EventNotificationExecutionJob_Config(
          this.type,
          this.notificationId);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy