package com.getbubblenow.android.model;

import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;

public class UserErrorBody {

    private static final String ERR_TOTP_TOKEN_IS_REQUIRED = "err.totpToken.required";
    private static final String ERR_TOTP_TOKEN_IS_INVALID = "err.totpToken.invalid";
    private static final String ERR_APPROVAL_TOKEN_IS_INVALID = "err.approvalToken.invalid";
    private static final String ERR_ACCOUNT_IS_LOCKED = "err.account.locked";

    @SerializedName("messageTemplate")
    @Expose
    private String messageTemplate;

    @SerializedName("message")
    @Expose
    private String message;

    @SerializedName("invalidValue")
    @Expose
    private String invalidValue;

    @SerializedName("params")
    @Expose
    private String params;

    public String getMessageTemplate() {
        return messageTemplate;
    }

    public void setMessageTemplate(final String messageTemplate) {
        this.messageTemplate = messageTemplate;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(final String message) {
        this.message = message;
    }

    public String getInvalidValue() {
        return invalidValue;
    }

    public void setInvalidValue(final String invalidValue) {
        this.invalidValue = invalidValue;
    }

    public String getParams() {
        return params;
    }

    public void setParams(final String params) {
        this.params = params;
    }

    public boolean isTotpInvalid() {
        return ERR_TOTP_TOKEN_IS_INVALID.equals(messageTemplate);
    }

    public boolean isTotpRequired() {
        return ERR_TOTP_TOKEN_IS_REQUIRED.equals(messageTemplate);
    }

    public boolean isApprovalInvalid() {
        return ERR_APPROVAL_TOKEN_IS_INVALID.equals(messageTemplate);
    }

    public boolean isAccountLocked() {
        return ERR_ACCOUNT_IS_LOCKED.equals(messageTemplate);
    }

}
