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 TestscriptOperationCodesEnumFactory implements EnumFactory<TestscriptOperationCodes> {
037
038  public TestscriptOperationCodes fromCode(String codeString) throws IllegalArgumentException {
039    if (codeString == null || "".equals(codeString))
040      return null;
041    if ("read".equals(codeString))
042      return TestscriptOperationCodes.READ;
043    if ("vread".equals(codeString))
044      return TestscriptOperationCodes.VREAD;
045    if ("update".equals(codeString))
046      return TestscriptOperationCodes.UPDATE;
047    if ("updateCreate".equals(codeString))
048      return TestscriptOperationCodes.UPDATECREATE;
049    if ("patch".equals(codeString))
050      return TestscriptOperationCodes.PATCH;
051    if ("delete".equals(codeString))
052      return TestscriptOperationCodes.DELETE;
053    if ("deleteCondSingle".equals(codeString))
054      return TestscriptOperationCodes.DELETECONDSINGLE;
055    if ("deleteCondMultiple".equals(codeString))
056      return TestscriptOperationCodes.DELETECONDMULTIPLE;
057    if ("history".equals(codeString))
058      return TestscriptOperationCodes.HISTORY;
059    if ("create".equals(codeString))
060      return TestscriptOperationCodes.CREATE;
061    if ("search".equals(codeString))
062      return TestscriptOperationCodes.SEARCH;
063    if ("batch".equals(codeString))
064      return TestscriptOperationCodes.BATCH;
065    if ("transaction".equals(codeString))
066      return TestscriptOperationCodes.TRANSACTION;
067    if ("capabilities".equals(codeString))
068      return TestscriptOperationCodes.CAPABILITIES;
069    if ("apply".equals(codeString))
070      return TestscriptOperationCodes.APPLY;
071    if ("closure".equals(codeString))
072      return TestscriptOperationCodes.CLOSURE;
073    if ("find-matches".equals(codeString))
074      return TestscriptOperationCodes.FINDMATCHES;
075    if ("conforms".equals(codeString))
076      return TestscriptOperationCodes.CONFORMS;
077    if ("data-requirements".equals(codeString))
078      return TestscriptOperationCodes.DATAREQUIREMENTS;
079    if ("document".equals(codeString))
080      return TestscriptOperationCodes.DOCUMENT;
081    if ("evaluate".equals(codeString))
082      return TestscriptOperationCodes.EVALUATE;
083    if ("evaluate-measure".equals(codeString))
084      return TestscriptOperationCodes.EVALUATEMEASURE;
085    if ("everything".equals(codeString))
086      return TestscriptOperationCodes.EVERYTHING;
087    if ("expand".equals(codeString))
088      return TestscriptOperationCodes.EXPAND;
089    if ("find".equals(codeString))
090      return TestscriptOperationCodes.FIND;
091    if ("graphql".equals(codeString))
092      return TestscriptOperationCodes.GRAPHQL;
093    if ("implements".equals(codeString))
094      return TestscriptOperationCodes.IMPLEMENTS;
095    if ("lastn".equals(codeString))
096      return TestscriptOperationCodes.LASTN;
097    if ("lookup".equals(codeString))
098      return TestscriptOperationCodes.LOOKUP;
099    if ("match".equals(codeString))
100      return TestscriptOperationCodes.MATCH;
101    if ("meta".equals(codeString))
102      return TestscriptOperationCodes.META;
103    if ("meta-add".equals(codeString))
104      return TestscriptOperationCodes.METAADD;
105    if ("meta-delete".equals(codeString))
106      return TestscriptOperationCodes.METADELETE;
107    if ("populate".equals(codeString))
108      return TestscriptOperationCodes.POPULATE;
109    if ("populatehtml".equals(codeString))
110      return TestscriptOperationCodes.POPULATEHTML;
111    if ("populatelink".equals(codeString))
112      return TestscriptOperationCodes.POPULATELINK;
113    if ("process-message".equals(codeString))
114      return TestscriptOperationCodes.PROCESSMESSAGE;
115    if ("questionnaire".equals(codeString))
116      return TestscriptOperationCodes.QUESTIONNAIRE;
117    if ("stats".equals(codeString))
118      return TestscriptOperationCodes.STATS;
119    if ("subset".equals(codeString))
120      return TestscriptOperationCodes.SUBSET;
121    if ("subsumes".equals(codeString))
122      return TestscriptOperationCodes.SUBSUMES;
123    if ("transform".equals(codeString))
124      return TestscriptOperationCodes.TRANSFORM;
125    if ("translate".equals(codeString))
126      return TestscriptOperationCodes.TRANSLATE;
127    if ("validate".equals(codeString))
128      return TestscriptOperationCodes.VALIDATE;
129    if ("validate-code".equals(codeString))
130      return TestscriptOperationCodes.VALIDATECODE;
131    throw new IllegalArgumentException("Unknown TestscriptOperationCodes code '" + codeString + "'");
132  }
133
134  public String toCode(TestscriptOperationCodes code) {
135       if (code == TestscriptOperationCodes.NULL)
136           return null;
137       if (code == TestscriptOperationCodes.READ)
138      return "read";
139    if (code == TestscriptOperationCodes.VREAD)
140      return "vread";
141    if (code == TestscriptOperationCodes.UPDATE)
142      return "update";
143    if (code == TestscriptOperationCodes.UPDATECREATE)
144      return "updateCreate";
145    if (code == TestscriptOperationCodes.PATCH)
146      return "patch";
147    if (code == TestscriptOperationCodes.DELETE)
148      return "delete";
149    if (code == TestscriptOperationCodes.DELETECONDSINGLE)
150      return "deleteCondSingle";
151    if (code == TestscriptOperationCodes.DELETECONDMULTIPLE)
152      return "deleteCondMultiple";
153    if (code == TestscriptOperationCodes.HISTORY)
154      return "history";
155    if (code == TestscriptOperationCodes.CREATE)
156      return "create";
157    if (code == TestscriptOperationCodes.SEARCH)
158      return "search";
159    if (code == TestscriptOperationCodes.BATCH)
160      return "batch";
161    if (code == TestscriptOperationCodes.TRANSACTION)
162      return "transaction";
163    if (code == TestscriptOperationCodes.CAPABILITIES)
164      return "capabilities";
165    if (code == TestscriptOperationCodes.APPLY)
166      return "apply";
167    if (code == TestscriptOperationCodes.CLOSURE)
168      return "closure";
169    if (code == TestscriptOperationCodes.FINDMATCHES)
170      return "find-matches";
171    if (code == TestscriptOperationCodes.CONFORMS)
172      return "conforms";
173    if (code == TestscriptOperationCodes.DATAREQUIREMENTS)
174      return "data-requirements";
175    if (code == TestscriptOperationCodes.DOCUMENT)
176      return "document";
177    if (code == TestscriptOperationCodes.EVALUATE)
178      return "evaluate";
179    if (code == TestscriptOperationCodes.EVALUATEMEASURE)
180      return "evaluate-measure";
181    if (code == TestscriptOperationCodes.EVERYTHING)
182      return "everything";
183    if (code == TestscriptOperationCodes.EXPAND)
184      return "expand";
185    if (code == TestscriptOperationCodes.FIND)
186      return "find";
187    if (code == TestscriptOperationCodes.GRAPHQL)
188      return "graphql";
189    if (code == TestscriptOperationCodes.IMPLEMENTS)
190      return "implements";
191    if (code == TestscriptOperationCodes.LASTN)
192      return "lastn";
193    if (code == TestscriptOperationCodes.LOOKUP)
194      return "lookup";
195    if (code == TestscriptOperationCodes.MATCH)
196      return "match";
197    if (code == TestscriptOperationCodes.META)
198      return "meta";
199    if (code == TestscriptOperationCodes.METAADD)
200      return "meta-add";
201    if (code == TestscriptOperationCodes.METADELETE)
202      return "meta-delete";
203    if (code == TestscriptOperationCodes.POPULATE)
204      return "populate";
205    if (code == TestscriptOperationCodes.POPULATEHTML)
206      return "populatehtml";
207    if (code == TestscriptOperationCodes.POPULATELINK)
208      return "populatelink";
209    if (code == TestscriptOperationCodes.PROCESSMESSAGE)
210      return "process-message";
211    if (code == TestscriptOperationCodes.QUESTIONNAIRE)
212      return "questionnaire";
213    if (code == TestscriptOperationCodes.STATS)
214      return "stats";
215    if (code == TestscriptOperationCodes.SUBSET)
216      return "subset";
217    if (code == TestscriptOperationCodes.SUBSUMES)
218      return "subsumes";
219    if (code == TestscriptOperationCodes.TRANSFORM)
220      return "transform";
221    if (code == TestscriptOperationCodes.TRANSLATE)
222      return "translate";
223    if (code == TestscriptOperationCodes.VALIDATE)
224      return "validate";
225    if (code == TestscriptOperationCodes.VALIDATECODE)
226      return "validate-code";
227    return "?";
228   }
229
230  public String toSystem(TestscriptOperationCodes code) {
231    return code.getSystem();
232  }
233
234}