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

org.graylog.security.authservice.AutoValue_AuthServiceToken Maven / Gradle / Ivy

There is a newer version: 6.0.1
Show newest version
package org.graylog.security.authservice;

import javax.annotation.Generated;

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

  private final String token;

  private final String type;

  private AutoValue_AuthServiceToken(
      String token,
      String type) {
    this.token = token;
    this.type = type;
  }

  @Override
  public String token() {
    return token;
  }

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

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

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

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

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy