001package com.box.sdk; 002 003/** 004 * Defines the role of the signer in the sign request. Signers will need to sign the document, 005 * Approvers may just approve the document. 006 * Finally, FinalCopyReader will only receive the finished sign request with a sign log. 007 */ 008public enum BoxSignRequestSignerRole { 009 010 /** 011 * Signer role. Needs to sign the document. 012 */ 013 Signer("signer"), 014 015 /** 016 * Approver role. Approves the document. 017 */ 018 Approver("approver"), 019 020 /** 021 * Final copy reader role. Receives finished sign request with sign log. 022 */ 023 FinalCopyReader("final_copy_reader"); 024 025 private final String jsonValue; 026 027 BoxSignRequestSignerRole(String jsonValue) { 028 this.jsonValue = jsonValue; 029 } 030 031 static BoxSignRequestSignerRole fromJSONString(String jsonValue) { 032 if ("signer".equals(jsonValue)) { 033 return Signer; 034 } else if ("approver".equals(jsonValue)) { 035 return Approver; 036 } else if ("final_copy_reader".equals(jsonValue)) { 037 return FinalCopyReader; 038 } 039 throw new IllegalArgumentException("The provided JSON value isn't a valid BoxSignRequestSignerRole."); 040 } 041}