package de.winniepat.citrus.beta;

public class VerificationResult {
    private final boolean success;
    private final String message;
    private final String token;
    private final long expiresIn;
    private final String betaKey;
    private final String playerUUID;
    private final String linkedUsername;

    private VerificationResult(boolean success, String message, String token,
                               long expiresIn, String betaKey, String playerUUID, String linkedUsername) {
        this.success = success;
        this.message = message;
        this.token = token;
        this.expiresIn = expiresIn;
        this.betaKey = betaKey;
        this.playerUUID = playerUUID;
        this.linkedUsername = linkedUsername;
    }

    public static VerificationResult success(String token, long expiresIn, String betaKey, String playerUUID, String linkedUsername) {
        return new VerificationResult(true, "Verification successful", token, expiresIn, betaKey, playerUUID, linkedUsername);
    }

    public static VerificationResult failure(String message) {
        return new VerificationResult(false, message, null, 0, null, null, null);
    }

    public boolean isSuccess() {
        return success;
    }

    public String getMessage() {
        return message;
    }

    public String getToken() {
        return token;
    }

    public long getExpiresIn() {
        return expiresIn;
    }

    public String getBetaKey() {
        return betaKey;
    }

    public String getPlayerUUID() {
        return playerUUID;
    }

    public String getLinkedUsername() {
        return linkedUsername;
    }
}