001package org.hl7.fhir.r4.model.codesystems;
002
003/*
004  Copyright (c) 2011+, HL7, Inc.
005  All rights reserved.
006  
007  Redistribution and use in source and binary forms, with or without modification, 
008  are permitted provided that the following conditions are met:
009  
010   * Redistributions of source code must retain the above copyright notice, this 
011     list of conditions and the following disclaimer.
012   * Redistributions in binary form must reproduce the above copyright notice, 
013     this list of conditions and the following disclaimer in the documentation 
014     and/or other materials provided with the distribution.
015   * Neither the name of HL7 nor the names of its contributors may be used to 
016     endorse or promote products derived from this software without specific 
017     prior written permission.
018  
019  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
020  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
021  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
022  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
023  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
024  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
025  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
026  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
027  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
028  POSSIBILITY OF SUCH DAMAGE.
029  
030*/
031
032// Generated on Wed, Jan 30, 2019 16:19-0500 for FHIR v4.0.0
033
034import org.hl7.fhir.r4.model.EnumFactory;
035
036public class ContractSignerTypeEnumFactory implements EnumFactory<ContractSignerType> {
037
038  public ContractSignerType fromCode(String codeString) throws IllegalArgumentException {
039    if (codeString == null || "".equals(codeString))
040      return null;
041    if ("AMENDER".equals(codeString))
042      return ContractSignerType.AMENDER;
043    if ("AUTHN".equals(codeString))
044      return ContractSignerType.AUTHN;
045    if ("AUT".equals(codeString))
046      return ContractSignerType.AUT;
047    if ("AFFL".equals(codeString))
048      return ContractSignerType.AFFL;
049    if ("AGNT".equals(codeString))
050      return ContractSignerType.AGNT;
051    if ("ASSIGNED".equals(codeString))
052      return ContractSignerType.ASSIGNED;
053    if ("CIT".equals(codeString))
054      return ContractSignerType.CIT;
055    if ("CLAIMANT".equals(codeString))
056      return ContractSignerType.CLAIMANT;
057    if ("COAUTH".equals(codeString))
058      return ContractSignerType.COAUTH;
059    if ("CONSENTER".equals(codeString))
060      return ContractSignerType.CONSENTER;
061    if ("CONSWIT".equals(codeString))
062      return ContractSignerType.CONSWIT;
063    if ("CONT".equals(codeString))
064      return ContractSignerType.CONT;
065    if ("COPART".equals(codeString))
066      return ContractSignerType.COPART;
067    if ("COVPTY".equals(codeString))
068      return ContractSignerType.COVPTY;
069    if ("DELEGATEE".equals(codeString))
070      return ContractSignerType.DELEGATEE;
071    if ("delegator".equals(codeString))
072      return ContractSignerType.DELEGATOR;
073    if ("DEPEND".equals(codeString))
074      return ContractSignerType.DEPEND;
075    if ("DPOWATT".equals(codeString))
076      return ContractSignerType.DPOWATT;
077    if ("EMGCON".equals(codeString))
078      return ContractSignerType.EMGCON;
079    if ("EVTWIT".equals(codeString))
080      return ContractSignerType.EVTWIT;
081    if ("EXCEST".equals(codeString))
082      return ContractSignerType.EXCEST;
083    if ("GRANTEE".equals(codeString))
084      return ContractSignerType.GRANTEE;
085    if ("GRANTOR".equals(codeString))
086      return ContractSignerType.GRANTOR;
087    if ("GUAR".equals(codeString))
088      return ContractSignerType.GUAR;
089    if ("GUARD".equals(codeString))
090      return ContractSignerType.GUARD;
091    if ("GUADLTM".equals(codeString))
092      return ContractSignerType.GUADLTM;
093    if ("INF".equals(codeString))
094      return ContractSignerType.INF;
095    if ("INTPRT".equals(codeString))
096      return ContractSignerType.INTPRT;
097    if ("INSBJ".equals(codeString))
098      return ContractSignerType.INSBJ;
099    if ("HPOWATT".equals(codeString))
100      return ContractSignerType.HPOWATT;
101    if ("HPROV".equals(codeString))
102      return ContractSignerType.HPROV;
103    if ("LEGAUTHN".equals(codeString))
104      return ContractSignerType.LEGAUTHN;
105    if ("NMDINS".equals(codeString))
106      return ContractSignerType.NMDINS;
107    if ("NOK".equals(codeString))
108      return ContractSignerType.NOK;
109    if ("NOTARY".equals(codeString))
110      return ContractSignerType.NOTARY;
111    if ("PAT".equals(codeString))
112      return ContractSignerType.PAT;
113    if ("POWATT".equals(codeString))
114      return ContractSignerType.POWATT;
115    if ("PRIMAUTH".equals(codeString))
116      return ContractSignerType.PRIMAUTH;
117    if ("PRIRECIP".equals(codeString))
118      return ContractSignerType.PRIRECIP;
119    if ("RECIP".equals(codeString))
120      return ContractSignerType.RECIP;
121    if ("RESPRSN".equals(codeString))
122      return ContractSignerType.RESPRSN;
123    if ("REVIEWER".equals(codeString))
124      return ContractSignerType.REVIEWER;
125    if ("TRANS".equals(codeString))
126      return ContractSignerType.TRANS;
127    if ("SOURCE".equals(codeString))
128      return ContractSignerType.SOURCE;
129    if ("SPOWATT".equals(codeString))
130      return ContractSignerType.SPOWATT;
131    if ("VALID".equals(codeString))
132      return ContractSignerType.VALID;
133    if ("VERF".equals(codeString))
134      return ContractSignerType.VERF;
135    if ("WIT".equals(codeString))
136      return ContractSignerType.WIT;
137    throw new IllegalArgumentException("Unknown ContractSignerType code '" + codeString + "'");
138  }
139
140  public String toCode(ContractSignerType code) {
141       if (code == ContractSignerType.NULL)
142           return null;
143       if (code == ContractSignerType.AMENDER)
144      return "AMENDER";
145    if (code == ContractSignerType.AUTHN)
146      return "AUTHN";
147    if (code == ContractSignerType.AUT)
148      return "AUT";
149    if (code == ContractSignerType.AFFL)
150      return "AFFL";
151    if (code == ContractSignerType.AGNT)
152      return "AGNT";
153    if (code == ContractSignerType.ASSIGNED)
154      return "ASSIGNED";
155    if (code == ContractSignerType.CIT)
156      return "CIT";
157    if (code == ContractSignerType.CLAIMANT)
158      return "CLAIMANT";
159    if (code == ContractSignerType.COAUTH)
160      return "COAUTH";
161    if (code == ContractSignerType.CONSENTER)
162      return "CONSENTER";
163    if (code == ContractSignerType.CONSWIT)
164      return "CONSWIT";
165    if (code == ContractSignerType.CONT)
166      return "CONT";
167    if (code == ContractSignerType.COPART)
168      return "COPART";
169    if (code == ContractSignerType.COVPTY)
170      return "COVPTY";
171    if (code == ContractSignerType.DELEGATEE)
172      return "DELEGATEE";
173    if (code == ContractSignerType.DELEGATOR)
174      return "delegator";
175    if (code == ContractSignerType.DEPEND)
176      return "DEPEND";
177    if (code == ContractSignerType.DPOWATT)
178      return "DPOWATT";
179    if (code == ContractSignerType.EMGCON)
180      return "EMGCON";
181    if (code == ContractSignerType.EVTWIT)
182      return "EVTWIT";
183    if (code == ContractSignerType.EXCEST)
184      return "EXCEST";
185    if (code == ContractSignerType.GRANTEE)
186      return "GRANTEE";
187    if (code == ContractSignerType.GRANTOR)
188      return "GRANTOR";
189    if (code == ContractSignerType.GUAR)
190      return "GUAR";
191    if (code == ContractSignerType.GUARD)
192      return "GUARD";
193    if (code == ContractSignerType.GUADLTM)
194      return "GUADLTM";
195    if (code == ContractSignerType.INF)
196      return "INF";
197    if (code == ContractSignerType.INTPRT)
198      return "INTPRT";
199    if (code == ContractSignerType.INSBJ)
200      return "INSBJ";
201    if (code == ContractSignerType.HPOWATT)
202      return "HPOWATT";
203    if (code == ContractSignerType.HPROV)
204      return "HPROV";
205    if (code == ContractSignerType.LEGAUTHN)
206      return "LEGAUTHN";
207    if (code == ContractSignerType.NMDINS)
208      return "NMDINS";
209    if (code == ContractSignerType.NOK)
210      return "NOK";
211    if (code == ContractSignerType.NOTARY)
212      return "NOTARY";
213    if (code == ContractSignerType.PAT)
214      return "PAT";
215    if (code == ContractSignerType.POWATT)
216      return "POWATT";
217    if (code == ContractSignerType.PRIMAUTH)
218      return "PRIMAUTH";
219    if (code == ContractSignerType.PRIRECIP)
220      return "PRIRECIP";
221    if (code == ContractSignerType.RECIP)
222      return "RECIP";
223    if (code == ContractSignerType.RESPRSN)
224      return "RESPRSN";
225    if (code == ContractSignerType.REVIEWER)
226      return "REVIEWER";
227    if (code == ContractSignerType.TRANS)
228      return "TRANS";
229    if (code == ContractSignerType.SOURCE)
230      return "SOURCE";
231    if (code == ContractSignerType.SPOWATT)
232      return "SPOWATT";
233    if (code == ContractSignerType.VALID)
234      return "VALID";
235    if (code == ContractSignerType.VERF)
236      return "VERF";
237    if (code == ContractSignerType.WIT)
238      return "WIT";
239    return "?";
240   }
241
242  public String toSystem(ContractSignerType code) {
243    return code.getSystem();
244  }
245
246}