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

org.graylog2.rest.models.alarmcallbacks.requests.$AutoValue_AlertReceivers Maven / Gradle / Ivy

There is a newer version: 6.0.2
Show newest version
package org.graylog2.rest.models.alarmcallbacks.requests;

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

@Generated("com.google.auto.value.processor.AutoValueProcessor")
abstract class $AutoValue_AlertReceivers extends AlertReceivers {

  private final List emails;

  private final List users;

  $AutoValue_AlertReceivers(
      List emails,
      List users) {
    if (emails == null) {
      throw new NullPointerException("Null emails");
    }
    this.emails = emails;
    if (users == null) {
      throw new NullPointerException("Null users");
    }
    this.users = users;
  }

  @JsonProperty("emails")
  @Override
  public List emails() {
    return emails;
  }

  @JsonProperty("users")
  @Override
  public List users() {
    return users;
  }

  @Override
  public String toString() {
    return "AlertReceivers{"
        + "emails=" + emails + ", "
        + "users=" + users
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof AlertReceivers) {
      AlertReceivers that = (AlertReceivers) o;
      return this.emails.equals(that.emails())
          && this.users.equals(that.users());
    }
    return false;
  }

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

  static class Builder extends AlertReceivers.Builder {
    private List emails;
    private List users;
    Builder() {
    }
    @Override
    public AlertReceivers.Builder emails(List emails) {
      if (emails == null) {
        throw new NullPointerException("Null emails");
      }
      this.emails = emails;
      return this;
    }
    @Override
    public AlertReceivers.Builder users(List users) {
      if (users == null) {
        throw new NullPointerException("Null users");
      }
      this.users = users;
      return this;
    }
    @Override
    public AlertReceivers build() {
      String missing = "";
      if (this.emails == null) {
        missing += " emails";
      }
      if (this.users == null) {
        missing += " users";
      }
      if (!missing.isEmpty()) {
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_AlertReceivers(
          this.emails,
          this.users);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy