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

org.graylog.events.notifications.types.AutoValue_HTTPEventNotificationConfig Maven / Gradle / Ivy

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

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

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

  private final String type;

  private final String url;

  private AutoValue_HTTPEventNotificationConfig(
      String type,
      String url) {
    this.type = type;
    this.url = url;
  }

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

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

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

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

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

  static final class Builder extends HTTPEventNotificationConfig.Builder {
    private String type;
    private String url;
    Builder() {
    }
    @Override
    public HTTPEventNotificationConfig.Builder type(String type) {
      if (type == null) {
        throw new NullPointerException("Null type");
      }
      this.type = type;
      return this;
    }
    @Override
    public HTTPEventNotificationConfig.Builder url(String url) {
      if (url == null) {
        throw new NullPointerException("Null url");
      }
      this.url = url;
      return this;
    }
    @Override
    public HTTPEventNotificationConfig build() {
      String missing = "";
      if (this.type == null) {
        missing += " type";
      }
      if (this.url == null) {
        missing += " url";
      }
      if (!missing.isEmpty()) {
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_HTTPEventNotificationConfig(
          this.type,
          this.url);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy