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

org.graylog.events.legacy.AutoValue_LegacyAlarmCallbackEventNotificationConfig Maven / Gradle / Ivy

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

import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
import javax.annotation.processing.Generated;

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

  private final String type;

  private final String callbackType;

  private final Map configuration;

  private AutoValue_LegacyAlarmCallbackEventNotificationConfig(
      String type,
      String callbackType,
      Map configuration) {
    this.type = type;
    this.callbackType = callbackType;
    this.configuration = configuration;
  }

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

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

  @JsonProperty("configuration")
  @Override
  public Map configuration() {
    return configuration;
  }

  @Override
  public String toString() {
    return "LegacyAlarmCallbackEventNotificationConfig{"
        + "type=" + type + ", "
        + "callbackType=" + callbackType + ", "
        + "configuration=" + configuration
        + "}";
  }

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

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

  static final class Builder extends LegacyAlarmCallbackEventNotificationConfig.Builder {
    private String type;
    private String callbackType;
    private Map configuration;
    Builder() {
    }
    @Override
    public LegacyAlarmCallbackEventNotificationConfig.Builder type(String type) {
      if (type == null) {
        throw new NullPointerException("Null type");
      }
      this.type = type;
      return this;
    }
    @Override
    public LegacyAlarmCallbackEventNotificationConfig.Builder callbackType(String callbackType) {
      if (callbackType == null) {
        throw new NullPointerException("Null callbackType");
      }
      this.callbackType = callbackType;
      return this;
    }
    @Override
    public LegacyAlarmCallbackEventNotificationConfig.Builder configuration(Map configuration) {
      if (configuration == null) {
        throw new NullPointerException("Null configuration");
      }
      this.configuration = configuration;
      return this;
    }
    @Override
    public LegacyAlarmCallbackEventNotificationConfig build() {
      if (this.type == null
          || this.callbackType == null
          || this.configuration == null) {
        StringBuilder missing = new StringBuilder();
        if (this.type == null) {
          missing.append(" type");
        }
        if (this.callbackType == null) {
          missing.append(" callbackType");
        }
        if (this.configuration == null) {
          missing.append(" configuration");
        }
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_LegacyAlarmCallbackEventNotificationConfig(
          this.type,
          this.callbackType,
          this.configuration);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy