001package com.box.sdk;
002
003/**
004 * Specific, forced color for a signature.
005 */
006public enum BoxSignRequestSignatureColor {
007
008    /**
009     * Blue signature color.
010     */
011    Blue("blue"),
012
013    /**
014     * Black signature color.
015     */
016    Black("black"),
017
018    /**
019     * Red signature color.
020     */
021    Red("red");
022
023    private final String jsonValue;
024
025    BoxSignRequestSignatureColor(String jsonValue) {
026        this.jsonValue = jsonValue;
027    }
028
029    static BoxSignRequestSignatureColor fromJSONString(String jsonValue) {
030        if ("blue".equals(jsonValue)) {
031            return Blue;
032        } else if ("black".equals(jsonValue)) {
033            return Black;
034        } else if ("red".equals(jsonValue)) {
035            return Red;
036        }
037        throw new IllegalArgumentException("The provided JSON value isn't a valid "
038            + "BoxSignRequestSignatureColor.");
039    }
040}