001package org.hl7.fhir.convertors.conv10_30;
002
003import org.hl7.fhir.convertors.VersionConvertor_10_30;
004import org.hl7.fhir.dstu3.model.CapabilityStatement.SystemRestfulInteraction;
005import org.hl7.fhir.exceptions.FHIRException;
006
007public class Conformance10_30 {
008
009    static public org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Conformance.ConditionalDeleteStatus> convertConditionalDeleteStatus(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.ConditionalDeleteStatus> src) throws FHIRException {
010        if (src == null || src.isEmpty())
011            return null;
012        org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Conformance.ConditionalDeleteStatus> tgt = new org.hl7.fhir.dstu2.model.Enumeration<>(new org.hl7.fhir.dstu2.model.Conformance.ConditionalDeleteStatusEnumFactory());
013        VersionConvertor_10_30.copyElement(src, tgt);
014        switch(src.getValue()) {
015            case NOTSUPPORTED:
016                tgt.setValue(org.hl7.fhir.dstu2.model.Conformance.ConditionalDeleteStatus.NOTSUPPORTED);
017                break;
018            case SINGLE:
019                tgt.setValue(org.hl7.fhir.dstu2.model.Conformance.ConditionalDeleteStatus.SINGLE);
020                break;
021            case MULTIPLE:
022                tgt.setValue(org.hl7.fhir.dstu2.model.Conformance.ConditionalDeleteStatus.MULTIPLE);
023                break;
024            default:
025                tgt.setValue(org.hl7.fhir.dstu2.model.Conformance.ConditionalDeleteStatus.NULL);
026                break;
027        }
028        return tgt;
029    }
030
031    static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.ConditionalDeleteStatus> convertConditionalDeleteStatus(org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Conformance.ConditionalDeleteStatus> src) throws FHIRException {
032        if (src == null || src.isEmpty())
033            return null;
034        org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.ConditionalDeleteStatus> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.CapabilityStatement.ConditionalDeleteStatusEnumFactory());
035        VersionConvertor_10_30.copyElement(src, tgt);
036        switch(src.getValue()) {
037            case NOTSUPPORTED:
038                tgt.setValue(org.hl7.fhir.dstu3.model.CapabilityStatement.ConditionalDeleteStatus.NOTSUPPORTED);
039                break;
040            case SINGLE:
041                tgt.setValue(org.hl7.fhir.dstu3.model.CapabilityStatement.ConditionalDeleteStatus.SINGLE);
042                break;
043            case MULTIPLE:
044                tgt.setValue(org.hl7.fhir.dstu3.model.CapabilityStatement.ConditionalDeleteStatus.MULTIPLE);
045                break;
046            default:
047                tgt.setValue(org.hl7.fhir.dstu3.model.CapabilityStatement.ConditionalDeleteStatus.NULL);
048                break;
049        }
050        return tgt;
051    }
052
053    public static org.hl7.fhir.dstu2.model.Conformance convertConformance(org.hl7.fhir.dstu3.model.CapabilityStatement src) throws FHIRException {
054        if (src == null || src.isEmpty())
055            return null;
056        org.hl7.fhir.dstu2.model.Conformance tgt = new org.hl7.fhir.dstu2.model.Conformance();
057        VersionConvertor_10_30.copyDomainResource(src, tgt);
058        if (src.hasUrlElement())
059            tgt.setUrlElement(VersionConvertor_10_30.convertUri(src.getUrlElement()));
060        if (src.hasVersionElement())
061            tgt.setVersionElement(VersionConvertor_10_30.convertString(src.getVersionElement()));
062        if (src.hasNameElement())
063            tgt.setNameElement(VersionConvertor_10_30.convertString(src.getNameElement()));
064        if (src.hasStatus())
065            tgt.setStatusElement(VersionConvertor_10_30.convertConformanceResourceStatus(src.getStatusElement()));
066        if (src.hasExperimental())
067            tgt.setExperimentalElement(VersionConvertor_10_30.convertBoolean(src.getExperimentalElement()));
068        if (src.hasDate())
069            tgt.setDateElement(VersionConvertor_10_30.convertDateTime(src.getDateElement()));
070        if (src.hasPublisherElement())
071            tgt.setPublisherElement(VersionConvertor_10_30.convertString(src.getPublisherElement()));
072        for (org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact()) tgt.addContact(convertConformanceContactComponent(t));
073        if (src.hasDescription())
074            tgt.setDescription(src.getDescription());
075        if (src.hasPurpose())
076            tgt.setRequirements(src.getPurpose());
077        if (src.hasCopyright())
078            tgt.setCopyright(src.getCopyright());
079        if (src.hasKind())
080            tgt.setKindElement(convertConformanceStatementKind(src.getKindElement()));
081        if (src.hasSoftware())
082            tgt.setSoftware(convertConformanceSoftwareComponent(src.getSoftware()));
083        if (src.hasImplementation())
084            tgt.setImplementation(convertConformanceImplementationComponent(src.getImplementation()));
085        if (src.hasFhirVersionElement())
086            tgt.setFhirVersionElement(VersionConvertor_10_30.convertId(src.getFhirVersionElement()));
087        if (src.hasAcceptUnknown())
088            tgt.setAcceptUnknownElement(convertUnknownContentCode(src.getAcceptUnknownElement()));
089        for (org.hl7.fhir.dstu3.model.CodeType t : src.getFormat()) tgt.addFormat(t.getValue());
090        for (org.hl7.fhir.dstu3.model.Reference t : src.getProfile()) tgt.addProfile(VersionConvertor_10_30.convertReference(t));
091        for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestComponent t : src.getRest()) tgt.addRest(convertConformanceRestComponent(t));
092        for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingComponent t : src.getMessaging()) tgt.addMessaging(convertConformanceMessagingComponent(t));
093        for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementDocumentComponent t : src.getDocument()) tgt.addDocument(convertConformanceDocumentComponent(t));
094        return tgt;
095    }
096
097    public static org.hl7.fhir.dstu3.model.CapabilityStatement convertConformance(org.hl7.fhir.dstu2.model.Conformance src) throws FHIRException {
098        if (src == null || src.isEmpty())
099            return null;
100        org.hl7.fhir.dstu3.model.CapabilityStatement tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement();
101        VersionConvertor_10_30.copyDomainResource(src, tgt);
102        if (src.hasUrlElement())
103            tgt.setUrlElement(VersionConvertor_10_30.convertUri(src.getUrlElement()));
104        if (src.hasVersionElement())
105            tgt.setVersionElement(VersionConvertor_10_30.convertString(src.getVersionElement()));
106        if (src.hasNameElement())
107            tgt.setNameElement(VersionConvertor_10_30.convertString(src.getNameElement()));
108        if (src.hasStatus())
109            tgt.setStatusElement(VersionConvertor_10_30.convertConformanceResourceStatus(src.getStatusElement()));
110        if (src.hasExperimental())
111            tgt.setExperimentalElement(VersionConvertor_10_30.convertBoolean(src.getExperimentalElement()));
112        if (src.hasDate())
113            tgt.setDateElement(VersionConvertor_10_30.convertDateTime(src.getDateElement()));
114        if (src.hasPublisherElement())
115            tgt.setPublisherElement(VersionConvertor_10_30.convertString(src.getPublisherElement()));
116        for (org.hl7.fhir.dstu2.model.Conformance.ConformanceContactComponent t : src.getContact()) tgt.addContact(convertConformanceContactComponent(t));
117        if (src.hasDescription())
118            tgt.setDescription(src.getDescription());
119        if (src.hasRequirements())
120            tgt.setPurpose(src.getRequirements());
121        if (src.hasCopyright())
122            tgt.setCopyright(src.getCopyright());
123        if (src.hasKind())
124            tgt.setKindElement(convertConformanceStatementKind(src.getKindElement()));
125        if (src.hasSoftware())
126            tgt.setSoftware(convertConformanceSoftwareComponent(src.getSoftware()));
127        if (src.hasImplementation())
128            tgt.setImplementation(convertConformanceImplementationComponent(src.getImplementation()));
129        if (src.hasFhirVersionElement())
130            tgt.setFhirVersionElement(VersionConvertor_10_30.convertId(src.getFhirVersionElement()));
131        if (src.hasAcceptUnknown())
132            tgt.setAcceptUnknownElement(convertUnknownContentCode(src.getAcceptUnknownElement()));
133        for (org.hl7.fhir.dstu2.model.CodeType t : src.getFormat()) tgt.addFormat(t.getValue());
134        for (org.hl7.fhir.dstu2.model.Reference t : src.getProfile()) tgt.addProfile(VersionConvertor_10_30.convertReference(t));
135        for (org.hl7.fhir.dstu2.model.Conformance.ConformanceRestComponent t : src.getRest()) tgt.addRest(convertConformanceRestComponent(t));
136        for (org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingComponent t : src.getMessaging()) tgt.addMessaging(convertConformanceMessagingComponent(t));
137        for (org.hl7.fhir.dstu2.model.Conformance.ConformanceDocumentComponent t : src.getDocument()) tgt.addDocument(convertConformanceDocumentComponent(t));
138        return tgt;
139    }
140
141    public static org.hl7.fhir.dstu2.model.Conformance.ConformanceContactComponent convertConformanceContactComponent(org.hl7.fhir.dstu3.model.ContactDetail src) throws FHIRException {
142        if (src == null || src.isEmpty())
143            return null;
144        org.hl7.fhir.dstu2.model.Conformance.ConformanceContactComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceContactComponent();
145        VersionConvertor_10_30.copyElement(src, tgt);
146        if (src.hasNameElement())
147            tgt.setNameElement(VersionConvertor_10_30.convertString(src.getNameElement()));
148        for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t));
149        return tgt;
150    }
151
152    public static org.hl7.fhir.dstu3.model.ContactDetail convertConformanceContactComponent(org.hl7.fhir.dstu2.model.Conformance.ConformanceContactComponent src) throws FHIRException {
153        if (src == null || src.isEmpty())
154            return null;
155        org.hl7.fhir.dstu3.model.ContactDetail tgt = new org.hl7.fhir.dstu3.model.ContactDetail();
156        VersionConvertor_10_30.copyElement(src, tgt);
157        if (src.hasNameElement())
158            tgt.setNameElement(VersionConvertor_10_30.convertString(src.getNameElement()));
159        for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_30.convertContactPoint(t));
160        return tgt;
161    }
162
163    public static org.hl7.fhir.dstu2.model.Conformance.ConformanceDocumentComponent convertConformanceDocumentComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementDocumentComponent src) throws FHIRException {
164        if (src == null || src.isEmpty())
165            return null;
166        org.hl7.fhir.dstu2.model.Conformance.ConformanceDocumentComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceDocumentComponent();
167        VersionConvertor_10_30.copyElement(src, tgt);
168        if (src.hasMode())
169            tgt.setModeElement(convertDocumentMode(src.getModeElement()));
170        if (src.hasDocumentationElement())
171            tgt.setDocumentationElement(VersionConvertor_10_30.convertString(src.getDocumentationElement()));
172        if (src.hasProfile())
173            tgt.setProfile(VersionConvertor_10_30.convertReference(src.getProfile()));
174        return tgt;
175    }
176
177    public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementDocumentComponent convertConformanceDocumentComponent(org.hl7.fhir.dstu2.model.Conformance.ConformanceDocumentComponent src) throws FHIRException {
178        if (src == null || src.isEmpty())
179            return null;
180        org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementDocumentComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementDocumentComponent();
181        VersionConvertor_10_30.copyElement(src, tgt);
182        if (src.hasMode())
183            tgt.setModeElement(convertDocumentMode(src.getModeElement()));
184        if (src.hasDocumentationElement())
185            tgt.setDocumentationElement(VersionConvertor_10_30.convertString(src.getDocumentationElement()));
186        if (src.hasProfile())
187            tgt.setProfile(VersionConvertor_10_30.convertReference(src.getProfile()));
188        return tgt;
189    }
190
191    static public org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Conformance.ConformanceEventMode> convertConformanceEventMode(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.EventCapabilityMode> src) throws FHIRException {
192        if (src == null || src.isEmpty())
193            return null;
194        org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Conformance.ConformanceEventMode> tgt = new org.hl7.fhir.dstu2.model.Enumeration<>(new org.hl7.fhir.dstu2.model.Conformance.ConformanceEventModeEnumFactory());
195        VersionConvertor_10_30.copyElement(src, tgt);
196        switch(src.getValue()) {
197            case SENDER:
198                tgt.setValue(org.hl7.fhir.dstu2.model.Conformance.ConformanceEventMode.SENDER);
199                break;
200            case RECEIVER:
201                tgt.setValue(org.hl7.fhir.dstu2.model.Conformance.ConformanceEventMode.RECEIVER);
202                break;
203            default:
204                tgt.setValue(org.hl7.fhir.dstu2.model.Conformance.ConformanceEventMode.NULL);
205                break;
206        }
207        return tgt;
208    }
209
210    static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.EventCapabilityMode> convertConformanceEventMode(org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Conformance.ConformanceEventMode> src) throws FHIRException {
211        if (src == null || src.isEmpty())
212            return null;
213        org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.EventCapabilityMode> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.CapabilityStatement.EventCapabilityModeEnumFactory());
214        VersionConvertor_10_30.copyElement(src, tgt);
215        switch(src.getValue()) {
216            case SENDER:
217                tgt.setValue(org.hl7.fhir.dstu3.model.CapabilityStatement.EventCapabilityMode.SENDER);
218                break;
219            case RECEIVER:
220                tgt.setValue(org.hl7.fhir.dstu3.model.CapabilityStatement.EventCapabilityMode.RECEIVER);
221                break;
222            default:
223                tgt.setValue(org.hl7.fhir.dstu3.model.CapabilityStatement.EventCapabilityMode.NULL);
224                break;
225        }
226        return tgt;
227    }
228
229    public static org.hl7.fhir.dstu2.model.Conformance.ConformanceImplementationComponent convertConformanceImplementationComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementImplementationComponent src) throws FHIRException {
230        if (src == null || src.isEmpty())
231            return null;
232        org.hl7.fhir.dstu2.model.Conformance.ConformanceImplementationComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceImplementationComponent();
233        VersionConvertor_10_30.copyElement(src, tgt);
234        if (src.hasDescriptionElement())
235            tgt.setDescriptionElement(VersionConvertor_10_30.convertString(src.getDescriptionElement()));
236        if (src.hasUrlElement())
237            tgt.setUrlElement(VersionConvertor_10_30.convertUri(src.getUrlElement()));
238        return tgt;
239    }
240
241    public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementImplementationComponent convertConformanceImplementationComponent(org.hl7.fhir.dstu2.model.Conformance.ConformanceImplementationComponent src) throws FHIRException {
242        if (src == null || src.isEmpty())
243            return null;
244        org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementImplementationComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementImplementationComponent();
245        VersionConvertor_10_30.copyElement(src, tgt);
246        if (src.hasDescriptionElement())
247            tgt.setDescriptionElement(VersionConvertor_10_30.convertString(src.getDescriptionElement()));
248        if (src.hasUrlElement())
249            tgt.setUrlElement(VersionConvertor_10_30.convertUri(src.getUrlElement()));
250        return tgt;
251    }
252
253    public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingComponent convertConformanceMessagingComponent(org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingComponent src) throws FHIRException {
254        if (src == null || src.isEmpty())
255            return null;
256        org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingComponent();
257        VersionConvertor_10_30.copyElement(src, tgt);
258        for (org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingEndpointComponent t : src.getEndpoint()) tgt.addEndpoint(convertConformanceMessagingEndpointComponent(t));
259        if (src.hasReliableCacheElement())
260            tgt.setReliableCacheElement(VersionConvertor_10_30.convertUnsignedInt(src.getReliableCacheElement()));
261        if (src.hasDocumentationElement())
262            tgt.setDocumentationElement(VersionConvertor_10_30.convertString(src.getDocumentationElement()));
263        for (org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingEventComponent t : src.getEvent()) tgt.addEvent(convertConformanceMessagingEventComponent(t));
264        return tgt;
265    }
266
267    public static org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingComponent convertConformanceMessagingComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingComponent src) throws FHIRException {
268        if (src == null || src.isEmpty())
269            return null;
270        org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingComponent();
271        VersionConvertor_10_30.copyElement(src, tgt);
272        for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent t : src.getEndpoint()) tgt.addEndpoint(convertConformanceMessagingEndpointComponent(t));
273        if (src.hasReliableCacheElement())
274            tgt.setReliableCacheElement(VersionConvertor_10_30.convertUnsignedInt(src.getReliableCacheElement()));
275        if (src.hasDocumentationElement())
276            tgt.setDocumentationElement(VersionConvertor_10_30.convertString(src.getDocumentationElement()));
277        for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEventComponent t : src.getEvent()) tgt.addEvent(convertConformanceMessagingEventComponent(t));
278        return tgt;
279    }
280
281    public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent convertConformanceMessagingEndpointComponent(org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingEndpointComponent src) throws FHIRException {
282        if (src == null || src.isEmpty())
283            return null;
284        org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent();
285        VersionConvertor_10_30.copyElement(src, tgt);
286        if (src.hasProtocol())
287            tgt.setProtocol(VersionConvertor_10_30.convertCoding(src.getProtocol()));
288        if (src.hasAddressElement())
289            tgt.setAddressElement(VersionConvertor_10_30.convertUri(src.getAddressElement()));
290        return tgt;
291    }
292
293    public static org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingEndpointComponent convertConformanceMessagingEndpointComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent src) throws FHIRException {
294        if (src == null || src.isEmpty())
295            return null;
296        org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingEndpointComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingEndpointComponent();
297        VersionConvertor_10_30.copyElement(src, tgt);
298        if (src.hasProtocol())
299            tgt.setProtocol(VersionConvertor_10_30.convertCoding(src.getProtocol()));
300        if (src.hasAddressElement())
301            tgt.setAddressElement(VersionConvertor_10_30.convertUri(src.getAddressElement()));
302        return tgt;
303    }
304
305    public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEventComponent convertConformanceMessagingEventComponent(org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingEventComponent src) throws FHIRException {
306        if (src == null || src.isEmpty())
307            return null;
308        org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEventComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEventComponent();
309        VersionConvertor_10_30.copyElement(src, tgt);
310        if (src.hasCode())
311            tgt.setCode(VersionConvertor_10_30.convertCoding(src.getCode()));
312        if (src.hasCategory())
313            tgt.setCategoryElement(convertMessageSignificanceCategory(src.getCategoryElement()));
314        if (src.hasMode())
315            tgt.setModeElement(convertConformanceEventMode(src.getModeElement()));
316        if (src.hasFocusElement())
317            tgt.setFocusElement(VersionConvertor_10_30.convertCode(src.getFocusElement()));
318        if (src.hasRequest())
319            tgt.setRequest(VersionConvertor_10_30.convertReference(src.getRequest()));
320        if (src.hasResponse())
321            tgt.setResponse(VersionConvertor_10_30.convertReference(src.getResponse()));
322        if (src.hasDocumentationElement())
323            tgt.setDocumentationElement(VersionConvertor_10_30.convertString(src.getDocumentationElement()));
324        return tgt;
325    }
326
327    public static org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingEventComponent convertConformanceMessagingEventComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingEventComponent src) throws FHIRException {
328        if (src == null || src.isEmpty())
329            return null;
330        org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingEventComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingEventComponent();
331        VersionConvertor_10_30.copyElement(src, tgt);
332        if (src.hasCode())
333            tgt.setCode(VersionConvertor_10_30.convertCoding(src.getCode()));
334        if (src.hasCategory())
335            tgt.setCategoryElement(convertMessageSignificanceCategory(src.getCategoryElement()));
336        if (src.hasMode())
337            tgt.setModeElement(convertConformanceEventMode(src.getModeElement()));
338        if (src.hasFocusElement())
339            tgt.setFocusElement(VersionConvertor_10_30.convertCode(src.getFocusElement()));
340        if (src.hasRequest())
341            tgt.setRequest(VersionConvertor_10_30.convertReference(src.getRequest()));
342        if (src.hasResponse())
343            tgt.setResponse(VersionConvertor_10_30.convertReference(src.getResponse()));
344        if (src.hasDocumentationElement())
345            tgt.setDocumentationElement(VersionConvertor_10_30.convertString(src.getDocumentationElement()));
346        return tgt;
347    }
348
349    public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestComponent convertConformanceRestComponent(org.hl7.fhir.dstu2.model.Conformance.ConformanceRestComponent src) throws FHIRException {
350        if (src == null || src.isEmpty())
351            return null;
352        org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestComponent();
353        VersionConvertor_10_30.copyElement(src, tgt);
354        if (src.hasMode())
355            tgt.setModeElement(convertRestfulConformanceMode(src.getModeElement()));
356        if (src.hasDocumentationElement())
357            tgt.setDocumentationElement(VersionConvertor_10_30.convertString(src.getDocumentationElement()));
358        if (src.hasSecurity())
359            tgt.setSecurity(convertConformanceRestSecurityComponent(src.getSecurity()));
360        for (org.hl7.fhir.dstu2.model.Conformance.ConformanceRestResourceComponent t : src.getResource()) tgt.addResource(convertConformanceRestResourceComponent(t));
361        for (org.hl7.fhir.dstu2.model.Conformance.SystemInteractionComponent t : src.getInteraction()) tgt.addInteraction(convertSystemInteractionComponent(t));
362        if (src.getTransactionMode() == org.hl7.fhir.dstu2.model.Conformance.TransactionMode.BATCH || src.getTransactionMode() == org.hl7.fhir.dstu2.model.Conformance.TransactionMode.BOTH)
363            tgt.addInteraction().setCode(SystemRestfulInteraction.BATCH);
364        for (org.hl7.fhir.dstu2.model.Conformance.ConformanceRestResourceSearchParamComponent t : src.getSearchParam()) tgt.addSearchParam(convertConformanceRestResourceSearchParamComponent(t));
365        for (org.hl7.fhir.dstu2.model.Conformance.ConformanceRestOperationComponent t : src.getOperation()) tgt.addOperation(convertConformanceRestOperationComponent(t));
366        for (org.hl7.fhir.dstu2.model.UriType t : src.getCompartment()) tgt.addCompartment(t.getValue());
367        return tgt;
368    }
369
370    public static org.hl7.fhir.dstu2.model.Conformance.ConformanceRestComponent convertConformanceRestComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestComponent src) throws FHIRException {
371        if (src == null || src.isEmpty())
372            return null;
373        org.hl7.fhir.dstu2.model.Conformance.ConformanceRestComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceRestComponent();
374        VersionConvertor_10_30.copyElement(src, tgt);
375        if (src.hasMode())
376            tgt.setModeElement(convertRestfulConformanceMode(src.getModeElement()));
377        if (src.hasDocumentationElement())
378            tgt.setDocumentationElement(VersionConvertor_10_30.convertString(src.getDocumentationElement()));
379        if (src.hasSecurity())
380            tgt.setSecurity(convertConformanceRestSecurityComponent(src.getSecurity()));
381        for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceComponent t : src.getResource()) tgt.addResource(convertConformanceRestResourceComponent(t));
382        boolean batch = false;
383        boolean transaction = false;
384        for (org.hl7.fhir.dstu3.model.CapabilityStatement.SystemInteractionComponent t : src.getInteraction()) {
385            if (t.getCode().equals(SystemRestfulInteraction.BATCH))
386                batch = true;
387            else
388                tgt.addInteraction(convertSystemInteractionComponent(t));
389            if (t.getCode().equals(SystemRestfulInteraction.TRANSACTION))
390                transaction = true;
391        }
392        if (batch)
393            tgt.setTransactionMode(transaction ? org.hl7.fhir.dstu2.model.Conformance.TransactionMode.BOTH : org.hl7.fhir.dstu2.model.Conformance.TransactionMode.BATCH);
394        else
395            tgt.setTransactionMode(transaction ? org.hl7.fhir.dstu2.model.Conformance.TransactionMode.TRANSACTION : org.hl7.fhir.dstu2.model.Conformance.TransactionMode.NOTSUPPORTED);
396        for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent t : src.getSearchParam()) tgt.addSearchParam(convertConformanceRestResourceSearchParamComponent(t));
397        for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestOperationComponent t : src.getOperation()) tgt.addOperation(convertConformanceRestOperationComponent(t));
398        for (org.hl7.fhir.dstu3.model.UriType t : src.getCompartment()) tgt.addCompartment(t.getValue());
399        return tgt;
400    }
401
402    public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestOperationComponent convertConformanceRestOperationComponent(org.hl7.fhir.dstu2.model.Conformance.ConformanceRestOperationComponent src) throws FHIRException {
403        if (src == null || src.isEmpty())
404            return null;
405        org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestOperationComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestOperationComponent();
406        VersionConvertor_10_30.copyElement(src, tgt);
407        if (src.hasNameElement())
408            tgt.setNameElement(VersionConvertor_10_30.convertString(src.getNameElement()));
409        if (src.hasDefinition())
410            tgt.setDefinition(VersionConvertor_10_30.convertReference(src.getDefinition()));
411        return tgt;
412    }
413
414    public static org.hl7.fhir.dstu2.model.Conformance.ConformanceRestOperationComponent convertConformanceRestOperationComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestOperationComponent src) throws FHIRException {
415        if (src == null || src.isEmpty())
416            return null;
417        org.hl7.fhir.dstu2.model.Conformance.ConformanceRestOperationComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceRestOperationComponent();
418        VersionConvertor_10_30.copyElement(src, tgt);
419        if (src.hasNameElement())
420            tgt.setNameElement(VersionConvertor_10_30.convertString(src.getNameElement()));
421        if (src.hasDefinition())
422            tgt.setDefinition(VersionConvertor_10_30.convertReference(src.getDefinition()));
423        return tgt;
424    }
425
426    public static org.hl7.fhir.dstu2.model.Conformance.ConformanceRestResourceComponent convertConformanceRestResourceComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceComponent src) throws FHIRException {
427        if (src == null || src.isEmpty())
428            return null;
429        org.hl7.fhir.dstu2.model.Conformance.ConformanceRestResourceComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceRestResourceComponent();
430        VersionConvertor_10_30.copyElement(src, tgt);
431        if (src.hasTypeElement())
432            tgt.setTypeElement(VersionConvertor_10_30.convertCode(src.getTypeElement()));
433        if (src.hasProfile())
434            tgt.setProfile(VersionConvertor_10_30.convertReference(src.getProfile()));
435        for (org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceInteractionComponent t : src.getInteraction()) tgt.addInteraction(convertResourceInteractionComponent(t));
436        if (src.hasVersioning())
437            tgt.setVersioningElement(convertResourceVersionPolicy(src.getVersioningElement()));
438        if (src.hasReadHistoryElement())
439            tgt.setReadHistoryElement(VersionConvertor_10_30.convertBoolean(src.getReadHistoryElement()));
440        if (src.hasUpdateCreateElement())
441            tgt.setUpdateCreateElement(VersionConvertor_10_30.convertBoolean(src.getUpdateCreateElement()));
442        if (src.hasConditionalCreateElement())
443            tgt.setConditionalCreateElement(VersionConvertor_10_30.convertBoolean(src.getConditionalCreateElement()));
444        if (src.hasConditionalUpdateElement())
445            tgt.setConditionalUpdateElement(VersionConvertor_10_30.convertBoolean(src.getConditionalUpdateElement()));
446        if (src.hasConditionalDelete())
447            tgt.setConditionalDeleteElement(convertConditionalDeleteStatus(src.getConditionalDeleteElement()));
448        for (org.hl7.fhir.dstu3.model.StringType t : src.getSearchInclude()) tgt.addSearchInclude(t.getValue());
449        for (org.hl7.fhir.dstu3.model.StringType t : src.getSearchRevInclude()) tgt.addSearchRevInclude(t.getValue());
450        for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent t : src.getSearchParam()) tgt.addSearchParam(convertConformanceRestResourceSearchParamComponent(t));
451        return tgt;
452    }
453
454    public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceComponent convertConformanceRestResourceComponent(org.hl7.fhir.dstu2.model.Conformance.ConformanceRestResourceComponent src) throws FHIRException {
455        if (src == null || src.isEmpty())
456            return null;
457        org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceComponent();
458        VersionConvertor_10_30.copyElement(src, tgt);
459        if (src.hasTypeElement())
460            tgt.setTypeElement(VersionConvertor_10_30.convertCode(src.getTypeElement()));
461        if (src.hasProfile())
462            tgt.setProfile(VersionConvertor_10_30.convertReference(src.getProfile()));
463        for (org.hl7.fhir.dstu2.model.Conformance.ResourceInteractionComponent t : src.getInteraction()) tgt.addInteraction(convertResourceInteractionComponent(t));
464        if (src.hasVersioning())
465            tgt.setVersioningElement(convertResourceVersionPolicy(src.getVersioningElement()));
466        if (src.hasReadHistoryElement())
467            tgt.setReadHistoryElement(VersionConvertor_10_30.convertBoolean(src.getReadHistoryElement()));
468        if (src.hasUpdateCreateElement())
469            tgt.setUpdateCreateElement(VersionConvertor_10_30.convertBoolean(src.getUpdateCreateElement()));
470        if (src.hasConditionalCreateElement())
471            tgt.setConditionalCreateElement(VersionConvertor_10_30.convertBoolean(src.getConditionalCreateElement()));
472        if (src.hasConditionalUpdateElement())
473            tgt.setConditionalUpdateElement(VersionConvertor_10_30.convertBoolean(src.getConditionalUpdateElement()));
474        if (src.hasConditionalDelete())
475            tgt.setConditionalDeleteElement(convertConditionalDeleteStatus(src.getConditionalDeleteElement()));
476        for (org.hl7.fhir.dstu2.model.StringType t : src.getSearchInclude()) tgt.addSearchInclude(t.getValue());
477        for (org.hl7.fhir.dstu2.model.StringType t : src.getSearchRevInclude()) tgt.addSearchRevInclude(t.getValue());
478        for (org.hl7.fhir.dstu2.model.Conformance.ConformanceRestResourceSearchParamComponent t : src.getSearchParam()) tgt.addSearchParam(convertConformanceRestResourceSearchParamComponent(t));
479        return tgt;
480    }
481
482    public static org.hl7.fhir.dstu2.model.Conformance.ConformanceRestResourceSearchParamComponent convertConformanceRestResourceSearchParamComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent src) throws FHIRException {
483        if (src == null || src.isEmpty())
484            return null;
485        org.hl7.fhir.dstu2.model.Conformance.ConformanceRestResourceSearchParamComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceRestResourceSearchParamComponent();
486        VersionConvertor_10_30.copyElement(src, tgt);
487        if (src.hasNameElement())
488            tgt.setNameElement(VersionConvertor_10_30.convertString(src.getNameElement()));
489        if (src.hasDefinitionElement())
490            tgt.setDefinitionElement(VersionConvertor_10_30.convertUri(src.getDefinitionElement()));
491        if (src.hasType())
492            tgt.setTypeElement(VersionConvertor_10_30.convertSearchParamType(src.getTypeElement()));
493        if (src.hasDocumentationElement())
494            tgt.setDocumentationElement(VersionConvertor_10_30.convertString(src.getDocumentationElement()));
495        return tgt;
496    }
497
498    public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent convertConformanceRestResourceSearchParamComponent(org.hl7.fhir.dstu2.model.Conformance.ConformanceRestResourceSearchParamComponent src) throws FHIRException {
499        if (src == null || src.isEmpty())
500            return null;
501        org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent();
502        VersionConvertor_10_30.copyElement(src, tgt);
503        if (src.hasNameElement())
504            tgt.setNameElement(VersionConvertor_10_30.convertString(src.getNameElement()));
505        if (src.hasDefinitionElement())
506            tgt.setDefinitionElement(VersionConvertor_10_30.convertUri(src.getDefinitionElement()));
507        if (src.hasType())
508            tgt.setTypeElement(VersionConvertor_10_30.convertSearchParamType(src.getTypeElement()));
509        if (src.hasDocumentationElement())
510            tgt.setDocumentationElement(VersionConvertor_10_30.convertString(src.getDocumentationElement()));
511        return tgt;
512    }
513
514    public static org.hl7.fhir.dstu2.model.Conformance.ConformanceRestSecurityCertificateComponent convertConformanceRestSecurityCertificateComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent src) throws FHIRException {
515        if (src == null || src.isEmpty())
516            return null;
517        org.hl7.fhir.dstu2.model.Conformance.ConformanceRestSecurityCertificateComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceRestSecurityCertificateComponent();
518        VersionConvertor_10_30.copyElement(src, tgt);
519        if (src.hasTypeElement())
520            tgt.setTypeElement(VersionConvertor_10_30.convertCode(src.getTypeElement()));
521        if (src.hasBlobElement())
522            tgt.setBlobElement(VersionConvertor_10_30.convertBase64Binary(src.getBlobElement()));
523        return tgt;
524    }
525
526    public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent convertConformanceRestSecurityCertificateComponent(org.hl7.fhir.dstu2.model.Conformance.ConformanceRestSecurityCertificateComponent src) throws FHIRException {
527        if (src == null || src.isEmpty())
528            return null;
529        org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent();
530        VersionConvertor_10_30.copyElement(src, tgt);
531        if (src.hasTypeElement())
532            tgt.setTypeElement(VersionConvertor_10_30.convertCode(src.getTypeElement()));
533        if (src.hasBlobElement())
534            tgt.setBlobElement(VersionConvertor_10_30.convertBase64Binary(src.getBlobElement()));
535        return tgt;
536    }
537
538    public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityComponent convertConformanceRestSecurityComponent(org.hl7.fhir.dstu2.model.Conformance.ConformanceRestSecurityComponent src) throws FHIRException {
539        if (src == null || src.isEmpty())
540            return null;
541        org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityComponent();
542        VersionConvertor_10_30.copyElement(src, tgt);
543        if (src.hasCorsElement())
544            tgt.setCorsElement(VersionConvertor_10_30.convertBoolean(src.getCorsElement()));
545        for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getService()) tgt.addService(VersionConvertor_10_30.convertCodeableConcept(t));
546        if (src.hasDescriptionElement())
547            tgt.setDescriptionElement(VersionConvertor_10_30.convertString(src.getDescriptionElement()));
548        for (org.hl7.fhir.dstu2.model.Conformance.ConformanceRestSecurityCertificateComponent t : src.getCertificate()) tgt.addCertificate(convertConformanceRestSecurityCertificateComponent(t));
549        return tgt;
550    }
551
552    public static org.hl7.fhir.dstu2.model.Conformance.ConformanceRestSecurityComponent convertConformanceRestSecurityComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityComponent src) throws FHIRException {
553        if (src == null || src.isEmpty())
554            return null;
555        org.hl7.fhir.dstu2.model.Conformance.ConformanceRestSecurityComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceRestSecurityComponent();
556        VersionConvertor_10_30.copyElement(src, tgt);
557        if (src.hasCorsElement())
558            tgt.setCorsElement(VersionConvertor_10_30.convertBoolean(src.getCorsElement()));
559        for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getService()) tgt.addService(VersionConvertor_10_30.convertCodeableConcept(t));
560        if (src.hasDescriptionElement())
561            tgt.setDescriptionElement(VersionConvertor_10_30.convertString(src.getDescriptionElement()));
562        for (org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent t : src.getCertificate()) tgt.addCertificate(convertConformanceRestSecurityCertificateComponent(t));
563        return tgt;
564    }
565
566    public static org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementSoftwareComponent convertConformanceSoftwareComponent(org.hl7.fhir.dstu2.model.Conformance.ConformanceSoftwareComponent src) throws FHIRException {
567        if (src == null || src.isEmpty())
568            return null;
569        org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementSoftwareComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementSoftwareComponent();
570        VersionConvertor_10_30.copyElement(src, tgt);
571        if (src.hasNameElement())
572            tgt.setNameElement(VersionConvertor_10_30.convertString(src.getNameElement()));
573        if (src.hasVersionElement())
574            tgt.setVersionElement(VersionConvertor_10_30.convertString(src.getVersionElement()));
575        if (src.hasReleaseDateElement())
576            tgt.setReleaseDateElement(VersionConvertor_10_30.convertDateTime(src.getReleaseDateElement()));
577        return tgt;
578    }
579
580    public static org.hl7.fhir.dstu2.model.Conformance.ConformanceSoftwareComponent convertConformanceSoftwareComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementSoftwareComponent src) throws FHIRException {
581        if (src == null || src.isEmpty())
582            return null;
583        org.hl7.fhir.dstu2.model.Conformance.ConformanceSoftwareComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceSoftwareComponent();
584        VersionConvertor_10_30.copyElement(src, tgt);
585        if (src.hasNameElement())
586            tgt.setNameElement(VersionConvertor_10_30.convertString(src.getNameElement()));
587        if (src.hasVersionElement())
588            tgt.setVersionElement(VersionConvertor_10_30.convertString(src.getVersionElement()));
589        if (src.hasReleaseDateElement())
590            tgt.setReleaseDateElement(VersionConvertor_10_30.convertDateTime(src.getReleaseDateElement()));
591        return tgt;
592    }
593
594    static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementKind> convertConformanceStatementKind(org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Conformance.ConformanceStatementKind> src) throws FHIRException {
595        if (src == null || src.isEmpty())
596            return null;
597        org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementKind> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementKindEnumFactory());
598        VersionConvertor_10_30.copyElement(src, tgt);
599        switch(src.getValue()) {
600            case INSTANCE:
601                tgt.setValue(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementKind.INSTANCE);
602                break;
603            case CAPABILITY:
604                tgt.setValue(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementKind.CAPABILITY);
605                break;
606            case REQUIREMENTS:
607                tgt.setValue(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementKind.REQUIREMENTS);
608                break;
609            default:
610                tgt.setValue(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementKind.NULL);
611                break;
612        }
613        return tgt;
614    }
615
616    static public org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Conformance.ConformanceStatementKind> convertConformanceStatementKind(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementKind> src) throws FHIRException {
617        if (src == null || src.isEmpty())
618            return null;
619        org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Conformance.ConformanceStatementKind> tgt = new org.hl7.fhir.dstu2.model.Enumeration<>(new org.hl7.fhir.dstu2.model.Conformance.ConformanceStatementKindEnumFactory());
620        VersionConvertor_10_30.copyElement(src, tgt);
621        switch(src.getValue()) {
622            case INSTANCE:
623                tgt.setValue(org.hl7.fhir.dstu2.model.Conformance.ConformanceStatementKind.INSTANCE);
624                break;
625            case CAPABILITY:
626                tgt.setValue(org.hl7.fhir.dstu2.model.Conformance.ConformanceStatementKind.CAPABILITY);
627                break;
628            case REQUIREMENTS:
629                tgt.setValue(org.hl7.fhir.dstu2.model.Conformance.ConformanceStatementKind.REQUIREMENTS);
630                break;
631            default:
632                tgt.setValue(org.hl7.fhir.dstu2.model.Conformance.ConformanceStatementKind.NULL);
633                break;
634        }
635        return tgt;
636    }
637
638    static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.DocumentMode> convertDocumentMode(org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Conformance.DocumentMode> src) throws FHIRException {
639        if (src == null || src.isEmpty())
640            return null;
641        org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.DocumentMode> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.CapabilityStatement.DocumentModeEnumFactory());
642        VersionConvertor_10_30.copyElement(src, tgt);
643        switch(src.getValue()) {
644            case PRODUCER:
645                tgt.setValue(org.hl7.fhir.dstu3.model.CapabilityStatement.DocumentMode.PRODUCER);
646                break;
647            case CONSUMER:
648                tgt.setValue(org.hl7.fhir.dstu3.model.CapabilityStatement.DocumentMode.CONSUMER);
649                break;
650            default:
651                tgt.setValue(org.hl7.fhir.dstu3.model.CapabilityStatement.DocumentMode.NULL);
652                break;
653        }
654        return tgt;
655    }
656
657    static public org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Conformance.DocumentMode> convertDocumentMode(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.DocumentMode> src) throws FHIRException {
658        if (src == null || src.isEmpty())
659            return null;
660        org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Conformance.DocumentMode> tgt = new org.hl7.fhir.dstu2.model.Enumeration<>(new org.hl7.fhir.dstu2.model.Conformance.DocumentModeEnumFactory());
661        VersionConvertor_10_30.copyElement(src, tgt);
662        switch(src.getValue()) {
663            case PRODUCER:
664                tgt.setValue(org.hl7.fhir.dstu2.model.Conformance.DocumentMode.PRODUCER);
665                break;
666            case CONSUMER:
667                tgt.setValue(org.hl7.fhir.dstu2.model.Conformance.DocumentMode.CONSUMER);
668                break;
669            default:
670                tgt.setValue(org.hl7.fhir.dstu2.model.Conformance.DocumentMode.NULL);
671                break;
672        }
673        return tgt;
674    }
675
676    static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.MessageSignificanceCategory> convertMessageSignificanceCategory(org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Conformance.MessageSignificanceCategory> src) throws FHIRException {
677        if (src == null || src.isEmpty())
678            return null;
679        org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.MessageSignificanceCategory> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.CapabilityStatement.MessageSignificanceCategoryEnumFactory());
680        VersionConvertor_10_30.copyElement(src, tgt);
681        switch(src.getValue()) {
682            case CONSEQUENCE:
683                tgt.setValue(org.hl7.fhir.dstu3.model.CapabilityStatement.MessageSignificanceCategory.CONSEQUENCE);
684                break;
685            case CURRENCY:
686                tgt.setValue(org.hl7.fhir.dstu3.model.CapabilityStatement.MessageSignificanceCategory.CURRENCY);
687                break;
688            case NOTIFICATION:
689                tgt.setValue(org.hl7.fhir.dstu3.model.CapabilityStatement.MessageSignificanceCategory.NOTIFICATION);
690                break;
691            default:
692                tgt.setValue(org.hl7.fhir.dstu3.model.CapabilityStatement.MessageSignificanceCategory.NULL);
693                break;
694        }
695        return tgt;
696    }
697
698    static public org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Conformance.MessageSignificanceCategory> convertMessageSignificanceCategory(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.MessageSignificanceCategory> src) throws FHIRException {
699        if (src == null || src.isEmpty())
700            return null;
701        org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Conformance.MessageSignificanceCategory> tgt = new org.hl7.fhir.dstu2.model.Enumeration<>(new org.hl7.fhir.dstu2.model.Conformance.MessageSignificanceCategoryEnumFactory());
702        VersionConvertor_10_30.copyElement(src, tgt);
703        switch(src.getValue()) {
704            case CONSEQUENCE:
705                tgt.setValue(org.hl7.fhir.dstu2.model.Conformance.MessageSignificanceCategory.CONSEQUENCE);
706                break;
707            case CURRENCY:
708                tgt.setValue(org.hl7.fhir.dstu2.model.Conformance.MessageSignificanceCategory.CURRENCY);
709                break;
710            case NOTIFICATION:
711                tgt.setValue(org.hl7.fhir.dstu2.model.Conformance.MessageSignificanceCategory.NOTIFICATION);
712                break;
713            default:
714                tgt.setValue(org.hl7.fhir.dstu2.model.Conformance.MessageSignificanceCategory.NULL);
715                break;
716        }
717        return tgt;
718    }
719
720    public static org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceInteractionComponent convertResourceInteractionComponent(org.hl7.fhir.dstu2.model.Conformance.ResourceInteractionComponent src) throws FHIRException {
721        if (src == null || src.isEmpty())
722            return null;
723        org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceInteractionComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceInteractionComponent();
724        VersionConvertor_10_30.copyElement(src, tgt);
725        if (src.hasCode())
726            tgt.setCodeElement(convertTypeRestfulInteraction(src.getCodeElement()));
727        if (src.hasDocumentationElement())
728            tgt.setDocumentationElement(VersionConvertor_10_30.convertString(src.getDocumentationElement()));
729        return tgt;
730    }
731
732    public static org.hl7.fhir.dstu2.model.Conformance.ResourceInteractionComponent convertResourceInteractionComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceInteractionComponent src) throws FHIRException {
733        if (src == null || src.isEmpty())
734            return null;
735        org.hl7.fhir.dstu2.model.Conformance.ResourceInteractionComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ResourceInteractionComponent();
736        VersionConvertor_10_30.copyElement(src, tgt);
737        if (src.hasCode())
738            tgt.setCodeElement(convertTypeRestfulInteraction(src.getCodeElement()));
739        if (src.hasDocumentationElement())
740            tgt.setDocumentationElement(VersionConvertor_10_30.convertString(src.getDocumentationElement()));
741        return tgt;
742    }
743
744    static public org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Conformance.ResourceVersionPolicy> convertResourceVersionPolicy(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceVersionPolicy> src) throws FHIRException {
745        if (src == null || src.isEmpty())
746            return null;
747        org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Conformance.ResourceVersionPolicy> tgt = new org.hl7.fhir.dstu2.model.Enumeration<>(new org.hl7.fhir.dstu2.model.Conformance.ResourceVersionPolicyEnumFactory());
748        VersionConvertor_10_30.copyElement(src, tgt);
749        switch(src.getValue()) {
750            case NOVERSION:
751                tgt.setValue(org.hl7.fhir.dstu2.model.Conformance.ResourceVersionPolicy.NOVERSION);
752                break;
753            case VERSIONED:
754                tgt.setValue(org.hl7.fhir.dstu2.model.Conformance.ResourceVersionPolicy.VERSIONED);
755                break;
756            case VERSIONEDUPDATE:
757                tgt.setValue(org.hl7.fhir.dstu2.model.Conformance.ResourceVersionPolicy.VERSIONEDUPDATE);
758                break;
759            default:
760                tgt.setValue(org.hl7.fhir.dstu2.model.Conformance.ResourceVersionPolicy.NULL);
761                break;
762        }
763        return tgt;
764    }
765
766    static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceVersionPolicy> convertResourceVersionPolicy(org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Conformance.ResourceVersionPolicy> src) throws FHIRException {
767        if (src == null || src.isEmpty())
768            return null;
769        org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceVersionPolicy> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceVersionPolicyEnumFactory());
770        VersionConvertor_10_30.copyElement(src, tgt);
771        switch(src.getValue()) {
772            case NOVERSION:
773                tgt.setValue(org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceVersionPolicy.NOVERSION);
774                break;
775            case VERSIONED:
776                tgt.setValue(org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceVersionPolicy.VERSIONED);
777                break;
778            case VERSIONEDUPDATE:
779                tgt.setValue(org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceVersionPolicy.VERSIONEDUPDATE);
780                break;
781            default:
782                tgt.setValue(org.hl7.fhir.dstu3.model.CapabilityStatement.ResourceVersionPolicy.NULL);
783                break;
784        }
785        return tgt;
786    }
787
788    static public org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Conformance.RestfulConformanceMode> convertRestfulConformanceMode(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.RestfulCapabilityMode> src) throws FHIRException {
789        if (src == null || src.isEmpty())
790            return null;
791        org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Conformance.RestfulConformanceMode> tgt = new org.hl7.fhir.dstu2.model.Enumeration<>(new org.hl7.fhir.dstu2.model.Conformance.RestfulConformanceModeEnumFactory());
792        VersionConvertor_10_30.copyElement(src, tgt);
793        switch(src.getValue()) {
794            case CLIENT:
795                tgt.setValue(org.hl7.fhir.dstu2.model.Conformance.RestfulConformanceMode.CLIENT);
796                break;
797            case SERVER:
798                tgt.setValue(org.hl7.fhir.dstu2.model.Conformance.RestfulConformanceMode.SERVER);
799                break;
800            default:
801                tgt.setValue(org.hl7.fhir.dstu2.model.Conformance.RestfulConformanceMode.NULL);
802                break;
803        }
804        return tgt;
805    }
806
807    static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.RestfulCapabilityMode> convertRestfulConformanceMode(org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Conformance.RestfulConformanceMode> src) throws FHIRException {
808        if (src == null || src.isEmpty())
809            return null;
810        org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.RestfulCapabilityMode> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.CapabilityStatement.RestfulCapabilityModeEnumFactory());
811        VersionConvertor_10_30.copyElement(src, tgt);
812        switch(src.getValue()) {
813            case CLIENT:
814                tgt.setValue(org.hl7.fhir.dstu3.model.CapabilityStatement.RestfulCapabilityMode.CLIENT);
815                break;
816            case SERVER:
817                tgt.setValue(org.hl7.fhir.dstu3.model.CapabilityStatement.RestfulCapabilityMode.SERVER);
818                break;
819            default:
820                tgt.setValue(org.hl7.fhir.dstu3.model.CapabilityStatement.RestfulCapabilityMode.NULL);
821                break;
822        }
823        return tgt;
824    }
825
826    public static org.hl7.fhir.dstu2.model.Conformance.SystemInteractionComponent convertSystemInteractionComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.SystemInteractionComponent src) throws FHIRException {
827        if (src == null || src.isEmpty())
828            return null;
829        org.hl7.fhir.dstu2.model.Conformance.SystemInteractionComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.SystemInteractionComponent();
830        VersionConvertor_10_30.copyElement(src, tgt);
831        if (src.hasCode())
832            tgt.setCodeElement(convertSystemRestfulInteraction(src.getCodeElement()));
833        if (src.hasDocumentationElement())
834            tgt.setDocumentationElement(VersionConvertor_10_30.convertString(src.getDocumentationElement()));
835        return tgt;
836    }
837
838    public static org.hl7.fhir.dstu3.model.CapabilityStatement.SystemInteractionComponent convertSystemInteractionComponent(org.hl7.fhir.dstu2.model.Conformance.SystemInteractionComponent src) throws FHIRException {
839        if (src == null || src.isEmpty())
840            return null;
841        org.hl7.fhir.dstu3.model.CapabilityStatement.SystemInteractionComponent tgt = new org.hl7.fhir.dstu3.model.CapabilityStatement.SystemInteractionComponent();
842        VersionConvertor_10_30.copyElement(src, tgt);
843        if (src.hasCode())
844            tgt.setCodeElement(convertSystemRestfulInteraction(src.getCodeElement()));
845        if (src.hasDocumentationElement())
846            tgt.setDocumentationElement(VersionConvertor_10_30.convertString(src.getDocumentationElement()));
847        return tgt;
848    }
849
850    static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.SystemRestfulInteraction> convertSystemRestfulInteraction(org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Conformance.SystemRestfulInteraction> src) throws FHIRException {
851        if (src == null || src.isEmpty())
852            return null;
853        org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.SystemRestfulInteraction> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.CapabilityStatement.SystemRestfulInteractionEnumFactory());
854        VersionConvertor_10_30.copyElement(src, tgt);
855        switch(src.getValue()) {
856            case TRANSACTION:
857                tgt.setValue(org.hl7.fhir.dstu3.model.CapabilityStatement.SystemRestfulInteraction.TRANSACTION);
858                break;
859            case SEARCHSYSTEM:
860                tgt.setValue(org.hl7.fhir.dstu3.model.CapabilityStatement.SystemRestfulInteraction.SEARCHSYSTEM);
861                break;
862            case HISTORYSYSTEM:
863                tgt.setValue(org.hl7.fhir.dstu3.model.CapabilityStatement.SystemRestfulInteraction.HISTORYSYSTEM);
864                break;
865            default:
866                tgt.setValue(org.hl7.fhir.dstu3.model.CapabilityStatement.SystemRestfulInteraction.NULL);
867                break;
868        }
869        return tgt;
870    }
871
872    static public org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Conformance.SystemRestfulInteraction> convertSystemRestfulInteraction(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.SystemRestfulInteraction> src) throws FHIRException {
873        if (src == null || src.isEmpty())
874            return null;
875        org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Conformance.SystemRestfulInteraction> tgt = new org.hl7.fhir.dstu2.model.Enumeration<>(new org.hl7.fhir.dstu2.model.Conformance.SystemRestfulInteractionEnumFactory());
876        VersionConvertor_10_30.copyElement(src, tgt);
877        switch(src.getValue()) {
878            case TRANSACTION:
879                tgt.setValue(org.hl7.fhir.dstu2.model.Conformance.SystemRestfulInteraction.TRANSACTION);
880                break;
881            case SEARCHSYSTEM:
882                tgt.setValue(org.hl7.fhir.dstu2.model.Conformance.SystemRestfulInteraction.SEARCHSYSTEM);
883                break;
884            case HISTORYSYSTEM:
885                tgt.setValue(org.hl7.fhir.dstu2.model.Conformance.SystemRestfulInteraction.HISTORYSYSTEM);
886                break;
887            default:
888                tgt.setValue(org.hl7.fhir.dstu2.model.Conformance.SystemRestfulInteraction.NULL);
889                break;
890        }
891        return tgt;
892    }
893
894    static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.TypeRestfulInteraction> convertTypeRestfulInteraction(org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Conformance.TypeRestfulInteraction> src) throws FHIRException {
895        if (src == null || src.isEmpty())
896            return null;
897        org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.TypeRestfulInteraction> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.CapabilityStatement.TypeRestfulInteractionEnumFactory());
898        VersionConvertor_10_30.copyElement(src, tgt);
899        switch(src.getValue()) {
900            case READ:
901                tgt.setValue(org.hl7.fhir.dstu3.model.CapabilityStatement.TypeRestfulInteraction.READ);
902                break;
903            case VREAD:
904                tgt.setValue(org.hl7.fhir.dstu3.model.CapabilityStatement.TypeRestfulInteraction.VREAD);
905                break;
906            case UPDATE:
907                tgt.setValue(org.hl7.fhir.dstu3.model.CapabilityStatement.TypeRestfulInteraction.UPDATE);
908                break;
909            case DELETE:
910                tgt.setValue(org.hl7.fhir.dstu3.model.CapabilityStatement.TypeRestfulInteraction.DELETE);
911                break;
912            case HISTORYINSTANCE:
913                tgt.setValue(org.hl7.fhir.dstu3.model.CapabilityStatement.TypeRestfulInteraction.HISTORYINSTANCE);
914                break;
915            case HISTORYTYPE:
916                tgt.setValue(org.hl7.fhir.dstu3.model.CapabilityStatement.TypeRestfulInteraction.HISTORYTYPE);
917                break;
918            case CREATE:
919                tgt.setValue(org.hl7.fhir.dstu3.model.CapabilityStatement.TypeRestfulInteraction.CREATE);
920                break;
921            case SEARCHTYPE:
922                tgt.setValue(org.hl7.fhir.dstu3.model.CapabilityStatement.TypeRestfulInteraction.SEARCHTYPE);
923                break;
924            default:
925                tgt.setValue(org.hl7.fhir.dstu3.model.CapabilityStatement.TypeRestfulInteraction.NULL);
926                break;
927        }
928        return tgt;
929    }
930
931    static public org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Conformance.TypeRestfulInteraction> convertTypeRestfulInteraction(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.TypeRestfulInteraction> src) throws FHIRException {
932        if (src == null || src.isEmpty())
933            return null;
934        org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Conformance.TypeRestfulInteraction> tgt = new org.hl7.fhir.dstu2.model.Enumeration<>(new org.hl7.fhir.dstu2.model.Conformance.TypeRestfulInteractionEnumFactory());
935        VersionConvertor_10_30.copyElement(src, tgt);
936        switch(src.getValue()) {
937            case READ:
938                tgt.setValue(org.hl7.fhir.dstu2.model.Conformance.TypeRestfulInteraction.READ);
939                break;
940            case VREAD:
941                tgt.setValue(org.hl7.fhir.dstu2.model.Conformance.TypeRestfulInteraction.VREAD);
942                break;
943            case UPDATE:
944                tgt.setValue(org.hl7.fhir.dstu2.model.Conformance.TypeRestfulInteraction.UPDATE);
945                break;
946            case DELETE:
947                tgt.setValue(org.hl7.fhir.dstu2.model.Conformance.TypeRestfulInteraction.DELETE);
948                break;
949            case HISTORYINSTANCE:
950                tgt.setValue(org.hl7.fhir.dstu2.model.Conformance.TypeRestfulInteraction.HISTORYINSTANCE);
951                break;
952            case HISTORYTYPE:
953                tgt.setValue(org.hl7.fhir.dstu2.model.Conformance.TypeRestfulInteraction.HISTORYTYPE);
954                break;
955            case CREATE:
956                tgt.setValue(org.hl7.fhir.dstu2.model.Conformance.TypeRestfulInteraction.CREATE);
957                break;
958            case SEARCHTYPE:
959                tgt.setValue(org.hl7.fhir.dstu2.model.Conformance.TypeRestfulInteraction.SEARCHTYPE);
960                break;
961            default:
962                tgt.setValue(org.hl7.fhir.dstu2.model.Conformance.TypeRestfulInteraction.NULL);
963                break;
964        }
965        return tgt;
966    }
967
968    static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.UnknownContentCode> convertUnknownContentCode(org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Conformance.UnknownContentCode> src) throws FHIRException {
969        if (src == null || src.isEmpty())
970            return null;
971        org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.UnknownContentCode> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.CapabilityStatement.UnknownContentCodeEnumFactory());
972        VersionConvertor_10_30.copyElement(src, tgt);
973        switch(src.getValue()) {
974            case NO:
975                tgt.setValue(org.hl7.fhir.dstu3.model.CapabilityStatement.UnknownContentCode.NO);
976                break;
977            case EXTENSIONS:
978                tgt.setValue(org.hl7.fhir.dstu3.model.CapabilityStatement.UnknownContentCode.EXTENSIONS);
979                break;
980            case ELEMENTS:
981                tgt.setValue(org.hl7.fhir.dstu3.model.CapabilityStatement.UnknownContentCode.ELEMENTS);
982                break;
983            case BOTH:
984                tgt.setValue(org.hl7.fhir.dstu3.model.CapabilityStatement.UnknownContentCode.BOTH);
985                break;
986            default:
987                tgt.setValue(org.hl7.fhir.dstu3.model.CapabilityStatement.UnknownContentCode.NULL);
988                break;
989        }
990        return tgt;
991    }
992
993    static public org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Conformance.UnknownContentCode> convertUnknownContentCode(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.CapabilityStatement.UnknownContentCode> src) throws FHIRException {
994        if (src == null || src.isEmpty())
995            return null;
996        org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Conformance.UnknownContentCode> tgt = new org.hl7.fhir.dstu2.model.Enumeration<>(new org.hl7.fhir.dstu2.model.Conformance.UnknownContentCodeEnumFactory());
997        VersionConvertor_10_30.copyElement(src, tgt);
998        switch(src.getValue()) {
999            case NO:
1000                tgt.setValue(org.hl7.fhir.dstu2.model.Conformance.UnknownContentCode.NO);
1001                break;
1002            case EXTENSIONS:
1003                tgt.setValue(org.hl7.fhir.dstu2.model.Conformance.UnknownContentCode.EXTENSIONS);
1004                break;
1005            case ELEMENTS:
1006                tgt.setValue(org.hl7.fhir.dstu2.model.Conformance.UnknownContentCode.ELEMENTS);
1007                break;
1008            case BOTH:
1009                tgt.setValue(org.hl7.fhir.dstu2.model.Conformance.UnknownContentCode.BOTH);
1010                break;
1011            default:
1012                tgt.setValue(org.hl7.fhir.dstu2.model.Conformance.UnknownContentCode.NULL);
1013                break;
1014        }
1015        return tgt;
1016    }
1017}