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

org.graylog.events.contentpack.entities.AutoValue_LegacyAlarmCallbackEventNotificationConfigEntity Maven / Gradle / Ivy

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

import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
import javax.annotation.processing.Generated;
import org.graylog2.contentpacks.model.entities.references.ValueReference;

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

  private final String type;

  private final ValueReference callbackType;

  private final Map configuration;

  private AutoValue_LegacyAlarmCallbackEventNotificationConfigEntity(
      String type,
      ValueReference 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 ValueReference callbackType() {
    return callbackType;
  }

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

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

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof LegacyAlarmCallbackEventNotificationConfigEntity) {
      LegacyAlarmCallbackEventNotificationConfigEntity that = (LegacyAlarmCallbackEventNotificationConfigEntity) 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$;
  }

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

  static final class Builder extends LegacyAlarmCallbackEventNotificationConfigEntity.Builder {
    private String type;
    private ValueReference callbackType;
    private Map configuration;
    Builder() {
    }
    private Builder(LegacyAlarmCallbackEventNotificationConfigEntity source) {
      this.type = source.type();
      this.callbackType = source.callbackType();
      this.configuration = source.configuration();
    }
    @Override
    public LegacyAlarmCallbackEventNotificationConfigEntity.Builder type(String type) {
      if (type == null) {
        throw new NullPointerException("Null type");
      }
      this.type = type;
      return this;
    }
    @Override
    public LegacyAlarmCallbackEventNotificationConfigEntity.Builder callbackType(ValueReference callbackType) {
      if (callbackType == null) {
        throw new NullPointerException("Null callbackType");
      }
      this.callbackType = callbackType;
      return this;
    }
    @Override
    public LegacyAlarmCallbackEventNotificationConfigEntity.Builder configuration(Map configuration) {
      if (configuration == null) {
        throw new NullPointerException("Null configuration");
      }
      this.configuration = configuration;
      return this;
    }
    @Override
    public LegacyAlarmCallbackEventNotificationConfigEntity 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_LegacyAlarmCallbackEventNotificationConfigEntity(
          this.type,
          this.callbackType,
          this.configuration);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy