package api.account;

import org.jetbrains.annotations.NotNull;
import api.ExecuteResult;
import api.APIResult;

/**
 * Информация об аккаунте которую умеет возвращать апи.
 *
 * @author eugene.ivanovsky
 */
public class AccountInfoResult extends ExecuteResult {
  private static final long serialVersionUID = 186006469198728112L;

  @NotNull
  private String userName;
  @NotNull
  private String lastShardName;

  public AccountInfoResult() {

  }

  public AccountInfoResult(@NotNull String userName, @NotNull String lastShardName) {
    super(APIResult.SUCCESS, "OK");

    this.userName = userName;
    this.lastShardName = lastShardName;
  }

  public AccountInfoResult(@NotNull APIResult status, @NotNull String reason) {
    super(status, reason);

    userName = "";
    lastShardName = "";
  }

  @NotNull
  public String getLastShardName() {
    return lastShardName;
  }

  @NotNull
  public String getUserName() {
    return userName;
  }

  @Override
  public String toString() {
    return userName + ", " + lastShardName;
  }
}
