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

org.graylog2.plugin.rest.AutoValue_MissingStreamPermissionError Maven / Gradle / Ivy

There is a newer version: 6.0.1
Show newest version
package org.graylog2.plugin.rest;

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

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

  private final String errorMessage;

  private final Set streams;

  private final String type;

  private AutoValue_MissingStreamPermissionError(
      String errorMessage,
      Set streams,
      String type) {
    this.errorMessage = errorMessage;
    this.streams = streams;
    this.type = type;
  }

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

  @JsonProperty("streams")
  @Override
  public Set streams() {
    return streams;
  }

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

  @Override
  public String toString() {
    return "MissingStreamPermissionError{"
        + "errorMessage=" + errorMessage + ", "
        + "streams=" + streams + ", "
        + "type=" + type
        + "}";
  }

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

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

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

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy