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

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

package org.graylog.security.authservice;

import java.util.Map;
import javax.annotation.Generated;
import javax.annotation.Nullable;

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

  private final String username;

  private final String userProfileId;

  private final String backendId;

  private final String backendType;

  private final String backendTitle;

  private final Map sessionAttributes;

  private AutoValue_AuthServiceResult(
      String username,
      @Nullable String userProfileId,
      String backendId,
      String backendType,
      String backendTitle,
      Map sessionAttributes) {
    this.username = username;
    this.userProfileId = userProfileId;
    this.backendId = backendId;
    this.backendType = backendType;
    this.backendTitle = backendTitle;
    this.sessionAttributes = sessionAttributes;
  }

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

  @Nullable
  @Override
  public String userProfileId() {
    return userProfileId;
  }

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

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

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

  @Override
  public Map sessionAttributes() {
    return sessionAttributes;
  }

  @Override
  public String toString() {
    return "AuthServiceResult{"
        + "username=" + username + ", "
        + "userProfileId=" + userProfileId + ", "
        + "backendId=" + backendId + ", "
        + "backendType=" + backendType + ", "
        + "backendTitle=" + backendTitle + ", "
        + "sessionAttributes=" + sessionAttributes
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof AuthServiceResult) {
      AuthServiceResult that = (AuthServiceResult) o;
      return this.username.equals(that.username())
          && (this.userProfileId == null ? that.userProfileId() == null : this.userProfileId.equals(that.userProfileId()))
          && this.backendId.equals(that.backendId())
          && this.backendType.equals(that.backendType())
          && this.backendTitle.equals(that.backendTitle())
          && this.sessionAttributes.equals(that.sessionAttributes());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= username.hashCode();
    h$ *= 1000003;
    h$ ^= (userProfileId == null) ? 0 : userProfileId.hashCode();
    h$ *= 1000003;
    h$ ^= backendId.hashCode();
    h$ *= 1000003;
    h$ ^= backendType.hashCode();
    h$ *= 1000003;
    h$ ^= backendTitle.hashCode();
    h$ *= 1000003;
    h$ ^= sessionAttributes.hashCode();
    return h$;
  }

  static final class Builder extends AuthServiceResult.Builder {
    private String username;
    private String userProfileId;
    private String backendId;
    private String backendType;
    private String backendTitle;
    private Map sessionAttributes;
    Builder() {
    }
    @Override
    public AuthServiceResult.Builder username(String username) {
      if (username == null) {
        throw new NullPointerException("Null username");
      }
      this.username = username;
      return this;
    }
    @Override
    public AuthServiceResult.Builder userProfileId(String userProfileId) {
      this.userProfileId = userProfileId;
      return this;
    }
    @Override
    public AuthServiceResult.Builder backendId(String backendId) {
      if (backendId == null) {
        throw new NullPointerException("Null backendId");
      }
      this.backendId = backendId;
      return this;
    }
    @Override
    public AuthServiceResult.Builder backendType(String backendType) {
      if (backendType == null) {
        throw new NullPointerException("Null backendType");
      }
      this.backendType = backendType;
      return this;
    }
    @Override
    public AuthServiceResult.Builder backendTitle(String backendTitle) {
      if (backendTitle == null) {
        throw new NullPointerException("Null backendTitle");
      }
      this.backendTitle = backendTitle;
      return this;
    }
    @Override
    public AuthServiceResult.Builder sessionAttributes(Map sessionAttributes) {
      if (sessionAttributes == null) {
        throw new NullPointerException("Null sessionAttributes");
      }
      this.sessionAttributes = sessionAttributes;
      return this;
    }
    @Override
    public AuthServiceResult build() {
      String missing = "";
      if (this.username == null) {
        missing += " username";
      }
      if (this.backendId == null) {
        missing += " backendId";
      }
      if (this.backendType == null) {
        missing += " backendType";
      }
      if (this.backendTitle == null) {
        missing += " backendTitle";
      }
      if (this.sessionAttributes == null) {
        missing += " sessionAttributes";
      }
      if (!missing.isEmpty()) {
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_AuthServiceResult(
          this.username,
          this.userProfileId,
          this.backendId,
          this.backendType,
          this.backendTitle,
          this.sessionAttributes);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy