001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017package ca.uhn.fhir.model.dstu2.resource;
018
019import java.math.BigDecimal;
020import java.net.URI;
021import java.util.*;
022import ca.uhn.fhir.model.api.*;
023import ca.uhn.fhir.model.api.annotation.*;
024import ca.uhn.fhir.rest.gclient.*;
025
026import ca.uhn.fhir.model.dstu2.valueset.AccountStatusEnum;
027import ca.uhn.fhir.model.dstu2.valueset.ActionListEnum;
028import ca.uhn.fhir.model.dstu2.composite.AddressDt;
029import ca.uhn.fhir.model.dstu2.valueset.AdjudicationCodesEnum;
030import ca.uhn.fhir.model.dstu2.valueset.AdjudicationErrorCodesEnum;
031import ca.uhn.fhir.model.dstu2.valueset.AdjustmentReasonCodesEnum;
032import ca.uhn.fhir.model.dstu2.valueset.AdministrativeGenderEnum;
033import ca.uhn.fhir.model.dstu2.valueset.AdmitSourceEnum;
034import ca.uhn.fhir.model.dstu2.resource.AllergyIntolerance;
035import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceCategoryEnum;
036import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceCertaintyEnum;
037import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceCriticalityEnum;
038import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceSeverityEnum;
039import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceStatusEnum;
040import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceTypeEnum;
041import ca.uhn.fhir.model.dstu2.composite.AnnotationDt;
042import ca.uhn.fhir.model.dstu2.valueset.AnswerFormatEnum;
043import ca.uhn.fhir.model.dstu2.resource.Appointment;
044import ca.uhn.fhir.model.dstu2.valueset.AppointmentStatusEnum;
045import ca.uhn.fhir.model.dstu2.valueset.AssertionDirectionTypeEnum;
046import ca.uhn.fhir.model.dstu2.valueset.AssertionOperatorTypeEnum;
047import ca.uhn.fhir.model.dstu2.valueset.AssertionResponseTypesEnum;
048import ca.uhn.fhir.model.dstu2.composite.AttachmentDt;
049import ca.uhn.fhir.model.dstu2.valueset.AuditEventActionEnum;
050import ca.uhn.fhir.model.dstu2.valueset.AuditEventObjectLifecycleEnum;
051import ca.uhn.fhir.model.dstu2.valueset.AuditEventObjectRoleEnum;
052import ca.uhn.fhir.model.dstu2.valueset.AuditEventObjectTypeEnum;
053import ca.uhn.fhir.model.dstu2.valueset.AuditEventOutcomeEnum;
054import ca.uhn.fhir.model.dstu2.valueset.AuditEventParticipantNetworkTypeEnum;
055import ca.uhn.fhir.model.dstu2.valueset.AuditEventSourceTypeEnum;
056import ca.uhn.fhir.model.dstu2.valueset.BindingStrengthEnum;
057import ca.uhn.fhir.model.dstu2.resource.BodySite;
058import ca.uhn.fhir.model.dstu2.valueset.BundleTypeEnum;
059import ca.uhn.fhir.model.dstu2.resource.CarePlan;
060import ca.uhn.fhir.model.dstu2.valueset.CarePlanActivityStatusEnum;
061import ca.uhn.fhir.model.dstu2.valueset.CarePlanRelationshipEnum;
062import ca.uhn.fhir.model.dstu2.valueset.CarePlanStatusEnum;
063import ca.uhn.fhir.model.dstu2.resource.Claim;
064import ca.uhn.fhir.model.dstu2.resource.ClaimResponse;
065import ca.uhn.fhir.model.dstu2.valueset.ClaimTypeEnum;
066import ca.uhn.fhir.model.dstu2.resource.ClinicalImpression;
067import ca.uhn.fhir.model.dstu2.valueset.ClinicalImpressionStatusEnum;
068import ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt;
069import ca.uhn.fhir.model.dstu2.composite.CodingDt;
070import ca.uhn.fhir.model.dstu2.resource.CommunicationRequest;
071import ca.uhn.fhir.model.dstu2.valueset.CommunicationRequestStatusEnum;
072import ca.uhn.fhir.model.dstu2.valueset.CommunicationStatusEnum;
073import ca.uhn.fhir.model.dstu2.resource.Composition;
074import ca.uhn.fhir.model.dstu2.valueset.CompositionAttestationModeEnum;
075import ca.uhn.fhir.model.dstu2.valueset.CompositionStatusEnum;
076import ca.uhn.fhir.model.dstu2.valueset.ConceptMapEquivalenceEnum;
077import ca.uhn.fhir.model.dstu2.resource.Condition;
078import ca.uhn.fhir.model.dstu2.valueset.ConditionCategoryCodesEnum;
079import ca.uhn.fhir.model.dstu2.valueset.ConditionClinicalStatusCodesEnum;
080import ca.uhn.fhir.model.dstu2.valueset.ConditionVerificationStatusEnum;
081import ca.uhn.fhir.model.dstu2.valueset.ConditionalDeleteStatusEnum;
082import ca.uhn.fhir.model.dstu2.resource.Conformance;
083import ca.uhn.fhir.model.dstu2.valueset.ConformanceEventModeEnum;
084import ca.uhn.fhir.model.dstu2.valueset.ConformanceResourceStatusEnum;
085import ca.uhn.fhir.model.dstu2.valueset.ConformanceStatementKindEnum;
086import ca.uhn.fhir.model.dstu2.composite.ContactPointDt;
087import ca.uhn.fhir.model.dstu2.valueset.ContentTypeEnum;
088import ca.uhn.fhir.model.dstu2.resource.Contract;
089import ca.uhn.fhir.model.dstu2.resource.Coverage;
090import ca.uhn.fhir.model.dstu2.valueset.DataElementStringencyEnum;
091import ca.uhn.fhir.model.dstu2.valueset.DaysOfWeekEnum;
092import ca.uhn.fhir.model.dstu2.valueset.DetectedIssueSeverityEnum;
093import ca.uhn.fhir.model.dstu2.resource.Device;
094import ca.uhn.fhir.model.dstu2.resource.DeviceComponent;
095import ca.uhn.fhir.model.dstu2.resource.DeviceMetric;
096import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricCalibrationStateEnum;
097import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricCalibrationTypeEnum;
098import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricCategoryEnum;
099import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricColorEnum;
100import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricOperationalStatusEnum;
101import ca.uhn.fhir.model.dstu2.valueset.DeviceStatusEnum;
102import ca.uhn.fhir.model.dstu2.resource.DeviceUseRequest;
103import ca.uhn.fhir.model.dstu2.valueset.DeviceUseRequestPriorityEnum;
104import ca.uhn.fhir.model.dstu2.valueset.DeviceUseRequestStatusEnum;
105import ca.uhn.fhir.model.dstu2.resource.DiagnosticOrder;
106import ca.uhn.fhir.model.dstu2.valueset.DiagnosticOrderPriorityEnum;
107import ca.uhn.fhir.model.dstu2.valueset.DiagnosticOrderStatusEnum;
108import ca.uhn.fhir.model.dstu2.resource.DiagnosticReport;
109import ca.uhn.fhir.model.dstu2.valueset.DiagnosticReportStatusEnum;
110import ca.uhn.fhir.model.dstu2.valueset.DigitalMediaTypeEnum;
111import ca.uhn.fhir.model.dstu2.valueset.DocumentModeEnum;
112import ca.uhn.fhir.model.dstu2.resource.DocumentReference;
113import ca.uhn.fhir.model.dstu2.valueset.DocumentReferenceStatusEnum;
114import ca.uhn.fhir.model.dstu2.valueset.DocumentRelationshipTypeEnum;
115import ca.uhn.fhir.model.dstu2.composite.ElementDefinitionDt;
116import ca.uhn.fhir.model.dstu2.resource.EligibilityRequest;
117import ca.uhn.fhir.model.dstu2.resource.Encounter;
118import ca.uhn.fhir.model.dstu2.valueset.EncounterClassEnum;
119import ca.uhn.fhir.model.dstu2.valueset.EncounterLocationStatusEnum;
120import ca.uhn.fhir.model.dstu2.valueset.EncounterStateEnum;
121import ca.uhn.fhir.model.dstu2.resource.EnrollmentRequest;
122import ca.uhn.fhir.model.dstu2.resource.EpisodeOfCare;
123import ca.uhn.fhir.model.dstu2.valueset.EpisodeOfCareStatusEnum;
124import ca.uhn.fhir.model.dstu2.valueset.ExtensionContextEnum;
125import ca.uhn.fhir.model.dstu2.valueset.FamilyHistoryStatusEnum;
126import ca.uhn.fhir.model.dstu2.resource.FamilyMemberHistory;
127import ca.uhn.fhir.model.dstu2.valueset.FilterOperatorEnum;
128import ca.uhn.fhir.model.dstu2.valueset.FlagStatusEnum;
129import ca.uhn.fhir.model.dstu2.resource.Goal;
130import ca.uhn.fhir.model.dstu2.valueset.GoalPriorityEnum;
131import ca.uhn.fhir.model.dstu2.valueset.GoalStatusEnum;
132import ca.uhn.fhir.model.dstu2.resource.Group;
133import ca.uhn.fhir.model.dstu2.valueset.GroupTypeEnum;
134import ca.uhn.fhir.model.dstu2.valueset.GuideDependencyTypeEnum;
135import ca.uhn.fhir.model.dstu2.valueset.GuidePageKindEnum;
136import ca.uhn.fhir.model.dstu2.valueset.GuideResourcePurposeEnum;
137import ca.uhn.fhir.model.dstu2.valueset.HTTPVerbEnum;
138import ca.uhn.fhir.model.dstu2.resource.HealthcareService;
139import ca.uhn.fhir.model.dstu2.composite.HumanNameDt;
140import ca.uhn.fhir.model.dstu2.composite.IdentifierDt;
141import ca.uhn.fhir.model.dstu2.valueset.IdentifierTypeCodesEnum;
142import ca.uhn.fhir.model.dstu2.valueset.IdentityAssuranceLevelEnum;
143import ca.uhn.fhir.model.dstu2.resource.ImagingObjectSelection;
144import ca.uhn.fhir.model.dstu2.resource.ImagingStudy;
145import ca.uhn.fhir.model.dstu2.resource.Immunization;
146import ca.uhn.fhir.model.dstu2.valueset.InstanceAvailabilityEnum;
147import ca.uhn.fhir.model.dstu2.valueset.IssueSeverityEnum;
148import ca.uhn.fhir.model.dstu2.valueset.IssueTypeEnum;
149import ca.uhn.fhir.model.dstu2.valueset.KOStitleEnum;
150import ca.uhn.fhir.model.dstu2.valueset.LinkTypeEnum;
151import ca.uhn.fhir.model.dstu2.valueset.ListModeEnum;
152import ca.uhn.fhir.model.dstu2.valueset.ListOrderCodesEnum;
153import ca.uhn.fhir.model.dstu2.valueset.ListStatusEnum;
154import ca.uhn.fhir.model.dstu2.resource.Location;
155import ca.uhn.fhir.model.dstu2.valueset.LocationModeEnum;
156import ca.uhn.fhir.model.dstu2.valueset.LocationStatusEnum;
157import ca.uhn.fhir.model.dstu2.valueset.LocationTypeEnum;
158import ca.uhn.fhir.model.dstu2.valueset.MaritalStatusCodesEnum;
159import ca.uhn.fhir.model.dstu2.valueset.MeasmntPrincipleEnum;
160import ca.uhn.fhir.model.dstu2.resource.Media;
161import ca.uhn.fhir.model.dstu2.resource.Medication;
162import ca.uhn.fhir.model.dstu2.valueset.MedicationAdministrationStatusEnum;
163import ca.uhn.fhir.model.dstu2.valueset.MedicationDispenseStatusEnum;
164import ca.uhn.fhir.model.dstu2.resource.MedicationOrder;
165import ca.uhn.fhir.model.dstu2.valueset.MedicationOrderStatusEnum;
166import ca.uhn.fhir.model.dstu2.resource.MedicationStatement;
167import ca.uhn.fhir.model.dstu2.valueset.MedicationStatementStatusEnum;
168import ca.uhn.fhir.model.dstu2.valueset.MessageEventEnum;
169import ca.uhn.fhir.model.dstu2.valueset.MessageSignificanceCategoryEnum;
170import ca.uhn.fhir.model.dstu2.valueset.MessageTransportEnum;
171import ca.uhn.fhir.model.dstu2.resource.NamingSystem;
172import ca.uhn.fhir.model.dstu2.valueset.NamingSystemIdentifierTypeEnum;
173import ca.uhn.fhir.model.dstu2.valueset.NamingSystemTypeEnum;
174import ca.uhn.fhir.model.dstu2.valueset.NoteTypeEnum;
175import ca.uhn.fhir.model.dstu2.resource.NutritionOrder;
176import ca.uhn.fhir.model.dstu2.valueset.NutritionOrderStatusEnum;
177import ca.uhn.fhir.model.dstu2.resource.Observation;
178import ca.uhn.fhir.model.dstu2.valueset.ObservationRelationshipTypeEnum;
179import ca.uhn.fhir.model.dstu2.valueset.ObservationStatusEnum;
180import ca.uhn.fhir.model.dstu2.resource.OperationDefinition;
181import ca.uhn.fhir.model.dstu2.valueset.OperationKindEnum;
182import ca.uhn.fhir.model.dstu2.resource.OperationOutcome;
183import ca.uhn.fhir.model.dstu2.valueset.OperationParameterUseEnum;
184import ca.uhn.fhir.model.dstu2.resource.Order;
185import ca.uhn.fhir.model.dstu2.valueset.OrderStatusEnum;
186import ca.uhn.fhir.model.dstu2.resource.Organization;
187import ca.uhn.fhir.model.dstu2.valueset.ParticipantRequiredEnum;
188import ca.uhn.fhir.model.dstu2.valueset.ParticipantStatusEnum;
189import ca.uhn.fhir.model.dstu2.valueset.ParticipantTypeEnum;
190import ca.uhn.fhir.model.dstu2.valueset.ParticipationStatusEnum;
191import ca.uhn.fhir.model.dstu2.resource.Patient;
192import ca.uhn.fhir.model.dstu2.valueset.PayeeTypeCodesEnum;
193import ca.uhn.fhir.model.dstu2.composite.PeriodDt;
194import ca.uhn.fhir.model.dstu2.resource.Person;
195import ca.uhn.fhir.model.dstu2.resource.Practitioner;
196import ca.uhn.fhir.model.dstu2.resource.Procedure;
197import ca.uhn.fhir.model.dstu2.resource.ProcedureRequest;
198import ca.uhn.fhir.model.dstu2.valueset.ProcedureRequestPriorityEnum;
199import ca.uhn.fhir.model.dstu2.valueset.ProcedureRequestStatusEnum;
200import ca.uhn.fhir.model.dstu2.valueset.ProcedureStatusEnum;
201import ca.uhn.fhir.model.dstu2.resource.ProcessRequest;
202import ca.uhn.fhir.model.dstu2.valueset.ProvenanceEntityRoleEnum;
203import ca.uhn.fhir.model.dstu2.composite.QuantityDt;
204import ca.uhn.fhir.model.dstu2.resource.Questionnaire;
205import ca.uhn.fhir.model.dstu2.resource.QuestionnaireResponse;
206import ca.uhn.fhir.model.dstu2.valueset.QuestionnaireResponseStatusEnum;
207import ca.uhn.fhir.model.dstu2.valueset.QuestionnaireStatusEnum;
208import ca.uhn.fhir.model.dstu2.composite.RangeDt;
209import ca.uhn.fhir.model.dstu2.composite.RatioDt;
210import ca.uhn.fhir.model.dstu2.valueset.ReferralMethodEnum;
211import ca.uhn.fhir.model.dstu2.resource.ReferralRequest;
212import ca.uhn.fhir.model.dstu2.valueset.ReferralStatusEnum;
213import ca.uhn.fhir.model.dstu2.resource.RelatedPerson;
214import ca.uhn.fhir.model.dstu2.valueset.RemittanceOutcomeEnum;
215import ca.uhn.fhir.model.dstu2.valueset.ResourceTypeEnum;
216import ca.uhn.fhir.model.dstu2.valueset.ResourceVersionPolicyEnum;
217import ca.uhn.fhir.model.dstu2.valueset.ResponseTypeEnum;
218import ca.uhn.fhir.model.dstu2.valueset.RestfulConformanceModeEnum;
219import ca.uhn.fhir.model.dstu2.valueset.RestfulSecurityServiceEnum;
220import ca.uhn.fhir.model.dstu2.resource.RiskAssessment;
221import ca.uhn.fhir.model.dstu2.valueset.RulesetCodesEnum;
222import ca.uhn.fhir.model.dstu2.composite.SampledDataDt;
223import ca.uhn.fhir.model.dstu2.resource.Schedule;
224import ca.uhn.fhir.model.dstu2.valueset.SearchEntryModeEnum;
225import ca.uhn.fhir.model.dstu2.valueset.SearchModifierCodeEnum;
226import ca.uhn.fhir.model.dstu2.valueset.SearchParamTypeEnum;
227import ca.uhn.fhir.model.dstu2.valueset.ServiceProvisionConditionsEnum;
228import ca.uhn.fhir.model.dstu2.composite.SignatureDt;
229import ca.uhn.fhir.model.dstu2.resource.Slot;
230import ca.uhn.fhir.model.dstu2.valueset.SlotStatusEnum;
231import ca.uhn.fhir.model.dstu2.resource.Specimen;
232import ca.uhn.fhir.model.dstu2.valueset.SpecimenStatusEnum;
233import ca.uhn.fhir.model.dstu2.resource.StructureDefinition;
234import ca.uhn.fhir.model.dstu2.valueset.StructureDefinitionKindEnum;
235import ca.uhn.fhir.model.dstu2.valueset.SubscriptionChannelTypeEnum;
236import ca.uhn.fhir.model.dstu2.valueset.SubscriptionStatusEnum;
237import ca.uhn.fhir.model.dstu2.resource.Substance;
238import ca.uhn.fhir.model.dstu2.valueset.SubstanceCategoryCodesEnum;
239import ca.uhn.fhir.model.dstu2.valueset.SupplyDeliveryStatusEnum;
240import ca.uhn.fhir.model.dstu2.resource.SupplyRequest;
241import ca.uhn.fhir.model.dstu2.valueset.SupplyRequestStatusEnum;
242import ca.uhn.fhir.model.dstu2.valueset.SystemRestfulInteractionEnum;
243import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
244import ca.uhn.fhir.model.dstu2.composite.TimingDt;
245import ca.uhn.fhir.model.dstu2.valueset.TransactionModeEnum;
246import ca.uhn.fhir.model.dstu2.valueset.TypeRestfulInteractionEnum;
247import ca.uhn.fhir.model.dstu2.valueset.UnknownContentCodeEnum;
248import ca.uhn.fhir.model.dstu2.valueset.UseEnum;
249import ca.uhn.fhir.model.dstu2.resource.ValueSet;
250import ca.uhn.fhir.model.dstu2.valueset.VisionBaseEnum;
251import ca.uhn.fhir.model.dstu2.valueset.VisionEyesEnum;
252import ca.uhn.fhir.model.dstu2.resource.VisionPrescription;
253import ca.uhn.fhir.model.dstu2.valueset.XPathUsageTypeEnum;
254import ca.uhn.fhir.model.api.IResource;
255import ca.uhn.fhir.model.dstu2.composite.AgeDt;
256import ca.uhn.fhir.model.dstu2.composite.BoundCodeableConceptDt;
257import ca.uhn.fhir.model.dstu2.composite.DurationDt;
258import ca.uhn.fhir.model.dstu2.composite.MoneyDt;
259import ca.uhn.fhir.model.dstu2.composite.NarrativeDt;
260import ca.uhn.fhir.model.dstu2.composite.ResourceReferenceDt;
261import ca.uhn.fhir.model.dstu2.composite.SimpleQuantityDt;
262import ca.uhn.fhir.model.primitive.Base64BinaryDt;
263import ca.uhn.fhir.model.primitive.BooleanDt;
264import ca.uhn.fhir.model.primitive.BoundCodeDt;
265import ca.uhn.fhir.model.primitive.CodeDt;
266import ca.uhn.fhir.model.primitive.DateDt;
267import ca.uhn.fhir.model.primitive.DateTimeDt;
268import ca.uhn.fhir.model.primitive.DecimalDt;
269import ca.uhn.fhir.model.primitive.IdDt;
270import ca.uhn.fhir.model.primitive.InstantDt;
271import ca.uhn.fhir.model.primitive.IntegerDt;
272import ca.uhn.fhir.model.primitive.OidDt;
273import ca.uhn.fhir.model.primitive.PositiveIntDt;
274import ca.uhn.fhir.model.primitive.StringDt;
275import ca.uhn.fhir.model.primitive.TimeDt;
276import ca.uhn.fhir.model.primitive.UnsignedIntDt;
277import ca.uhn.fhir.model.primitive.UriDt;
278
279
280/**
281 * HAPI/FHIR <b>StructureDefinition</b> Resource
282 * (conformance.content)
283 *
284 * <p>
285 * <b>Definition:</b>
286 * A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions, and constraints on resources and data types.
287 * </p> 
288 *
289 * <p>
290 * <b>Requirements:</b>
291 * 
292 * </p> 
293 *
294 * <p>
295 * <b>Profile Definition:</b>
296 * <a href="http://hl7.org/fhir/profiles/StructureDefinition">http://hl7.org/fhir/profiles/StructureDefinition</a> 
297 * </p>
298 *
299 */
300@ResourceDef(name="StructureDefinition", profile="http://hl7.org/fhir/profiles/StructureDefinition", id="structuredefinition")
301public class StructureDefinition extends ca.uhn.fhir.model.dstu2.resource.BaseResource
302    implements  IResource 
303    {
304
305        /**
306         * Search parameter constant for <b>url</b>
307         * <p>
308         * Description: <b></b><br>
309         * Type: <b>uri</b><br>
310         * Path: <b>StructureDefinition.url</b><br>
311         * </p>
312         */
313        @SearchParamDefinition(name="url", path="StructureDefinition.url", description="", type="uri" 
314 )
315        public static final String SP_URL = "url";
316
317        /**
318         * <b>Fluent Client</b> search parameter constant for <b>url</b>
319         * <p>
320         * Description: <b></b><br>
321         * Type: <b>uri</b><br>
322         * Path: <b>StructureDefinition.url</b><br>
323         * </p>
324         */
325        public static final UriClientParam URL = new UriClientParam(SP_URL);
326
327        /**
328         * Search parameter constant for <b>identifier</b>
329         * <p>
330         * Description: <b>The identifier of the profile</b><br>
331         * Type: <b>token</b><br>
332         * Path: <b>StructureDefinition.identifier</b><br>
333         * </p>
334         */
335        @SearchParamDefinition(name="identifier", path="StructureDefinition.identifier", description="The identifier of the profile", type="token" 
336 )
337        public static final String SP_IDENTIFIER = "identifier";
338
339        /**
340         * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
341         * <p>
342         * Description: <b>The identifier of the profile</b><br>
343         * Type: <b>token</b><br>
344         * Path: <b>StructureDefinition.identifier</b><br>
345         * </p>
346         */
347        public static final TokenClientParam IDENTIFIER = new TokenClientParam(SP_IDENTIFIER);
348
349        /**
350         * Search parameter constant for <b>version</b>
351         * <p>
352         * Description: <b>The version identifier of the profile</b><br>
353         * Type: <b>token</b><br>
354         * Path: <b>StructureDefinition.version</b><br>
355         * </p>
356         */
357        @SearchParamDefinition(name="version", path="StructureDefinition.version", description="The version identifier of the profile", type="token" 
358 )
359        public static final String SP_VERSION = "version";
360
361        /**
362         * <b>Fluent Client</b> search parameter constant for <b>version</b>
363         * <p>
364         * Description: <b>The version identifier of the profile</b><br>
365         * Type: <b>token</b><br>
366         * Path: <b>StructureDefinition.version</b><br>
367         * </p>
368         */
369        public static final TokenClientParam VERSION = new TokenClientParam(SP_VERSION);
370
371        /**
372         * Search parameter constant for <b>name</b>
373         * <p>
374         * Description: <b>Name of the profile</b><br>
375         * Type: <b>string</b><br>
376         * Path: <b>StructureDefinition.name</b><br>
377         * </p>
378         */
379        @SearchParamDefinition(name="name", path="StructureDefinition.name", description="Name of the profile", type="string" 
380 )
381        public static final String SP_NAME = "name";
382
383        /**
384         * <b>Fluent Client</b> search parameter constant for <b>name</b>
385         * <p>
386         * Description: <b>Name of the profile</b><br>
387         * Type: <b>string</b><br>
388         * Path: <b>StructureDefinition.name</b><br>
389         * </p>
390         */
391        public static final StringClientParam NAME = new StringClientParam(SP_NAME);
392
393        /**
394         * Search parameter constant for <b>publisher</b>
395         * <p>
396         * Description: <b>Name of the publisher of the profile</b><br>
397         * Type: <b>string</b><br>
398         * Path: <b>StructureDefinition.publisher</b><br>
399         * </p>
400         */
401        @SearchParamDefinition(name="publisher", path="StructureDefinition.publisher", description="Name of the publisher of the profile", type="string" 
402 )
403        public static final String SP_PUBLISHER = "publisher";
404
405        /**
406         * <b>Fluent Client</b> search parameter constant for <b>publisher</b>
407         * <p>
408         * Description: <b>Name of the publisher of the profile</b><br>
409         * Type: <b>string</b><br>
410         * Path: <b>StructureDefinition.publisher</b><br>
411         * </p>
412         */
413        public static final StringClientParam PUBLISHER = new StringClientParam(SP_PUBLISHER);
414
415        /**
416         * Search parameter constant for <b>description</b>
417         * <p>
418         * Description: <b>Text search in the description of the profile</b><br>
419         * Type: <b>string</b><br>
420         * Path: <b>StructureDefinition.description</b><br>
421         * </p>
422         */
423        @SearchParamDefinition(name="description", path="StructureDefinition.description", description="Text search in the description of the profile", type="string" 
424 )
425        public static final String SP_DESCRIPTION = "description";
426
427        /**
428         * <b>Fluent Client</b> search parameter constant for <b>description</b>
429         * <p>
430         * Description: <b>Text search in the description of the profile</b><br>
431         * Type: <b>string</b><br>
432         * Path: <b>StructureDefinition.description</b><br>
433         * </p>
434         */
435        public static final StringClientParam DESCRIPTION = new StringClientParam(SP_DESCRIPTION);
436
437        /**
438         * Search parameter constant for <b>status</b>
439         * <p>
440         * Description: <b>The current status of the profile</b><br>
441         * Type: <b>token</b><br>
442         * Path: <b>StructureDefinition.status</b><br>
443         * </p>
444         */
445        @SearchParamDefinition(name="status", path="StructureDefinition.status", description="The current status of the profile", type="token" 
446 )
447        public static final String SP_STATUS = "status";
448
449        /**
450         * <b>Fluent Client</b> search parameter constant for <b>status</b>
451         * <p>
452         * Description: <b>The current status of the profile</b><br>
453         * Type: <b>token</b><br>
454         * Path: <b>StructureDefinition.status</b><br>
455         * </p>
456         */
457        public static final TokenClientParam STATUS = new TokenClientParam(SP_STATUS);
458
459        /**
460         * Search parameter constant for <b>date</b>
461         * <p>
462         * Description: <b>The profile publication date</b><br>
463         * Type: <b>date</b><br>
464         * Path: <b>StructureDefinition.date</b><br>
465         * </p>
466         */
467        @SearchParamDefinition(name="date", path="StructureDefinition.date", description="The profile publication date", type="date" 
468 )
469        public static final String SP_DATE = "date";
470
471        /**
472         * <b>Fluent Client</b> search parameter constant for <b>date</b>
473         * <p>
474         * Description: <b>The profile publication date</b><br>
475         * Type: <b>date</b><br>
476         * Path: <b>StructureDefinition.date</b><br>
477         * </p>
478         */
479        public static final DateClientParam DATE = new DateClientParam(SP_DATE);
480
481        /**
482         * Search parameter constant for <b>code</b>
483         * <p>
484         * Description: <b>A code for the profile</b><br>
485         * Type: <b>token</b><br>
486         * Path: <b>StructureDefinition.code</b><br>
487         * </p>
488         */
489        @SearchParamDefinition(name="code", path="StructureDefinition.code", description="A code for the profile", type="token" 
490 )
491        public static final String SP_CODE = "code";
492
493        /**
494         * <b>Fluent Client</b> search parameter constant for <b>code</b>
495         * <p>
496         * Description: <b>A code for the profile</b><br>
497         * Type: <b>token</b><br>
498         * Path: <b>StructureDefinition.code</b><br>
499         * </p>
500         */
501        public static final TokenClientParam CODE = new TokenClientParam(SP_CODE);
502
503        /**
504         * Search parameter constant for <b>valueset</b>
505         * <p>
506         * Description: <b>A vocabulary binding reference</b><br>
507         * Type: <b>reference</b><br>
508         * Path: <b>StructureDefinition.snapshot.element.binding.valueSet[x]</b><br>
509         * </p>
510         */
511        @SearchParamDefinition(name="valueset", path="StructureDefinition.snapshot.element.binding.valueSet[x]", description="A vocabulary binding reference", type="reference" 
512 )
513        public static final String SP_VALUESET = "valueset";
514
515        /**
516         * <b>Fluent Client</b> search parameter constant for <b>valueset</b>
517         * <p>
518         * Description: <b>A vocabulary binding reference</b><br>
519         * Type: <b>reference</b><br>
520         * Path: <b>StructureDefinition.snapshot.element.binding.valueSet[x]</b><br>
521         * </p>
522         */
523        public static final ReferenceClientParam VALUESET = new ReferenceClientParam(SP_VALUESET);
524
525        /**
526         * Search parameter constant for <b>type</b>
527         * <p>
528         * Description: <b></b><br>
529         * Type: <b>token</b><br>
530         * Path: <b>StructureDefinition.constrainedType</b><br>
531         * </p>
532         */
533        @SearchParamDefinition(name="type", path="StructureDefinition.constrainedType", description="", type="token" 
534 )
535        public static final String SP_TYPE = "type";
536
537        /**
538         * <b>Fluent Client</b> search parameter constant for <b>type</b>
539         * <p>
540         * Description: <b></b><br>
541         * Type: <b>token</b><br>
542         * Path: <b>StructureDefinition.constrainedType</b><br>
543         * </p>
544         */
545        public static final TokenClientParam TYPE = new TokenClientParam(SP_TYPE);
546
547        /**
548         * Search parameter constant for <b>kind</b>
549         * <p>
550         * Description: <b></b><br>
551         * Type: <b>token</b><br>
552         * Path: <b>StructureDefinition.kind</b><br>
553         * </p>
554         */
555        @SearchParamDefinition(name="kind", path="StructureDefinition.kind", description="", type="token" 
556 )
557        public static final String SP_KIND = "kind";
558
559        /**
560         * <b>Fluent Client</b> search parameter constant for <b>kind</b>
561         * <p>
562         * Description: <b></b><br>
563         * Type: <b>token</b><br>
564         * Path: <b>StructureDefinition.kind</b><br>
565         * </p>
566         */
567        public static final TokenClientParam KIND = new TokenClientParam(SP_KIND);
568
569        /**
570         * Search parameter constant for <b>path</b>
571         * <p>
572         * Description: <b>A path that is constrained in the profile</b><br>
573         * Type: <b>token</b><br>
574         * Path: <b>StructureDefinition.snapshot.element.path | StructureDefinition.differential.element.path </b><br>
575         * </p>
576         */
577        @SearchParamDefinition(name="path", path="StructureDefinition.snapshot.element.path | StructureDefinition.differential.element.path ", description="A path that is constrained in the profile", type="token" 
578 )
579        public static final String SP_PATH = "path";
580
581        /**
582         * <b>Fluent Client</b> search parameter constant for <b>path</b>
583         * <p>
584         * Description: <b>A path that is constrained in the profile</b><br>
585         * Type: <b>token</b><br>
586         * Path: <b>StructureDefinition.snapshot.element.path | StructureDefinition.differential.element.path </b><br>
587         * </p>
588         */
589        public static final TokenClientParam PATH = new TokenClientParam(SP_PATH);
590
591        /**
592         * Search parameter constant for <b>context</b>
593         * <p>
594         * Description: <b>A use context assigned to the structure</b><br>
595         * Type: <b>token</b><br>
596         * Path: <b>StructureDefinition.useContext</b><br>
597         * </p>
598         */
599        @SearchParamDefinition(name="context", path="StructureDefinition.useContext", description="A use context assigned to the structure", type="token" 
600 )
601        public static final String SP_CONTEXT = "context";
602
603        /**
604         * <b>Fluent Client</b> search parameter constant for <b>context</b>
605         * <p>
606         * Description: <b>A use context assigned to the structure</b><br>
607         * Type: <b>token</b><br>
608         * Path: <b>StructureDefinition.useContext</b><br>
609         * </p>
610         */
611        public static final TokenClientParam CONTEXT = new TokenClientParam(SP_CONTEXT);
612
613        /**
614         * Search parameter constant for <b>display</b>
615         * <p>
616         * Description: <b></b><br>
617         * Type: <b>string</b><br>
618         * Path: <b>StructureDefinition.display</b><br>
619         * </p>
620         */
621        @SearchParamDefinition(name="display", path="StructureDefinition.display", description="", type="string" 
622 )
623        public static final String SP_DISPLAY = "display";
624
625        /**
626         * <b>Fluent Client</b> search parameter constant for <b>display</b>
627         * <p>
628         * Description: <b></b><br>
629         * Type: <b>string</b><br>
630         * Path: <b>StructureDefinition.display</b><br>
631         * </p>
632         */
633        public static final StringClientParam DISPLAY = new StringClientParam(SP_DISPLAY);
634
635        /**
636         * Search parameter constant for <b>experimental</b>
637         * <p>
638         * Description: <b></b><br>
639         * Type: <b>token</b><br>
640         * Path: <b>StructureDefinition.experimental</b><br>
641         * </p>
642         */
643        @SearchParamDefinition(name="experimental", path="StructureDefinition.experimental", description="", type="token" 
644 )
645        public static final String SP_EXPERIMENTAL = "experimental";
646
647        /**
648         * <b>Fluent Client</b> search parameter constant for <b>experimental</b>
649         * <p>
650         * Description: <b></b><br>
651         * Type: <b>token</b><br>
652         * Path: <b>StructureDefinition.experimental</b><br>
653         * </p>
654         */
655        public static final TokenClientParam EXPERIMENTAL = new TokenClientParam(SP_EXPERIMENTAL);
656
657        /**
658         * Search parameter constant for <b>abstract</b>
659         * <p>
660         * Description: <b></b><br>
661         * Type: <b>token</b><br>
662         * Path: <b>StructureDefinition.abstract</b><br>
663         * </p>
664         */
665        @SearchParamDefinition(name="abstract", path="StructureDefinition.abstract", description="", type="token" 
666 )
667        public static final String SP_ABSTRACT = "abstract";
668
669        /**
670         * <b>Fluent Client</b> search parameter constant for <b>abstract</b>
671         * <p>
672         * Description: <b></b><br>
673         * Type: <b>token</b><br>
674         * Path: <b>StructureDefinition.abstract</b><br>
675         * </p>
676         */
677        public static final TokenClientParam ABSTRACT = new TokenClientParam(SP_ABSTRACT);
678
679        /**
680         * Search parameter constant for <b>context-type</b>
681         * <p>
682         * Description: <b></b><br>
683         * Type: <b>token</b><br>
684         * Path: <b>StructureDefinition.contextType</b><br>
685         * </p>
686         */
687        @SearchParamDefinition(name="context-type", path="StructureDefinition.contextType", description="", type="token" 
688 )
689        public static final String SP_CONTEXT_TYPE = "context-type";
690
691        /**
692         * <b>Fluent Client</b> search parameter constant for <b>context-type</b>
693         * <p>
694         * Description: <b></b><br>
695         * Type: <b>token</b><br>
696         * Path: <b>StructureDefinition.contextType</b><br>
697         * </p>
698         */
699        public static final TokenClientParam CONTEXT_TYPE = new TokenClientParam(SP_CONTEXT_TYPE);
700
701        /**
702         * Search parameter constant for <b>ext-context</b>
703         * <p>
704         * Description: <b></b><br>
705         * Type: <b>string</b><br>
706         * Path: <b>StructureDefinition.context</b><br>
707         * </p>
708         */
709        @SearchParamDefinition(name="ext-context", path="StructureDefinition.context", description="", type="string" 
710 )
711        public static final String SP_EXT_CONTEXT = "ext-context";
712
713        /**
714         * <b>Fluent Client</b> search parameter constant for <b>ext-context</b>
715         * <p>
716         * Description: <b></b><br>
717         * Type: <b>string</b><br>
718         * Path: <b>StructureDefinition.context</b><br>
719         * </p>
720         */
721        public static final StringClientParam EXT_CONTEXT = new StringClientParam(SP_EXT_CONTEXT);
722
723        /**
724         * Search parameter constant for <b>base</b>
725         * <p>
726         * Description: <b></b><br>
727         * Type: <b>uri</b><br>
728         * Path: <b>StructureDefinition.base</b><br>
729         * </p>
730         */
731        @SearchParamDefinition(name="base", path="StructureDefinition.base", description="", type="uri" 
732 )
733        public static final String SP_BASE = "base";
734
735        /**
736         * <b>Fluent Client</b> search parameter constant for <b>base</b>
737         * <p>
738         * Description: <b></b><br>
739         * Type: <b>uri</b><br>
740         * Path: <b>StructureDefinition.base</b><br>
741         * </p>
742         */
743        public static final UriClientParam BASE = new UriClientParam(SP_BASE);
744
745        /**
746         * Search parameter constant for <b>base-path</b>
747         * <p>
748         * Description: <b></b><br>
749         * Type: <b>token</b><br>
750         * Path: <b>StructureDefinition.snapshot.element.base.path | StructureDefinition.differential.element.base.path </b><br>
751         * </p>
752         */
753        @SearchParamDefinition(name="base-path", path="StructureDefinition.snapshot.element.base.path | StructureDefinition.differential.element.base.path ", description="", type="token" 
754 )
755        public static final String SP_BASE_PATH = "base-path";
756
757        /**
758         * <b>Fluent Client</b> search parameter constant for <b>base-path</b>
759         * <p>
760         * Description: <b></b><br>
761         * Type: <b>token</b><br>
762         * Path: <b>StructureDefinition.snapshot.element.base.path | StructureDefinition.differential.element.base.path </b><br>
763         * </p>
764         */
765        public static final TokenClientParam BASE_PATH = new TokenClientParam(SP_BASE_PATH);
766
767
768        /**
769         * Constant for fluent queries to be used to add include statements. Specifies
770         * the path value of "<b>StructureDefinition:valueset</b>".
771         */
772        public static final Include INCLUDE_VALUESET = new Include("StructureDefinition:valueset");
773
774
775        @Child(name="url", type=UriDt.class, order=0, min=1, max=1, summary=true, modifier=false)       
776        @Description(
777                shortDefinition="id",
778                formalDefinition="An absolute URL that is used to identify this structure definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this structure definition is (or will be) published"
779        )
780        private UriDt myUrl;
781        
782        @Child(name="identifier", type=IdentifierDt.class, order=1, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)       
783        @Description(
784                shortDefinition="id",
785                formalDefinition="Formal identifier that is used to identify this StructureDefinition when it is represented in other formats, or referenced in a specification, model, design or an instance  (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI)"
786        )
787        private java.util.List<IdentifierDt> myIdentifier;
788        
789        @Child(name="version", type=StringDt.class, order=2, min=0, max=1, summary=true, modifier=false)        
790        @Description(
791                shortDefinition="id.version",
792                formalDefinition="The identifier that is used to identify this version of the StructureDefinition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the StructureDefinition author manually"
793        )
794        private StringDt myVersion;
795        
796        @Child(name="name", type=StringDt.class, order=3, min=1, max=1, summary=true, modifier=false)   
797        @Description(
798                shortDefinition="",
799                formalDefinition="A free text natural language name identifying the StructureDefinition"
800        )
801        private StringDt myName;
802        
803        @Child(name="display", type=StringDt.class, order=4, min=0, max=1, summary=true, modifier=false)        
804        @Description(
805                shortDefinition="",
806                formalDefinition="Defined so that applications can use this name when displaying the value of the extension to the user"
807        )
808        private StringDt myDisplay;
809        
810        @Child(name="status", type=CodeDt.class, order=5, min=1, max=1, summary=true, modifier=false)   
811        @Description(
812                shortDefinition="status",
813                formalDefinition="The status of the StructureDefinition"
814        )
815        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/conformance-resource-status")
816        private BoundCodeDt<ConformanceResourceStatusEnum> myStatus;
817        
818        @Child(name="experimental", type=BooleanDt.class, order=6, min=0, max=1, summary=true, modifier=false)  
819        @Description(
820                shortDefinition="class",
821                formalDefinition="This StructureDefinition was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage"
822        )
823        private BooleanDt myExperimental;
824        
825        @Child(name="publisher", type=StringDt.class, order=7, min=0, max=1, summary=true, modifier=false)      
826        @Description(
827                shortDefinition="who.witness",
828                formalDefinition="The name of the individual or organization that published the structure definition"
829        )
830        private StringDt myPublisher;
831        
832        @Child(name="contact", order=8, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)   
833        @Description(
834                shortDefinition="",
835                formalDefinition="Contacts to assist a user in finding and communicating with the publisher"
836        )
837        private java.util.List<Contact> myContact;
838        
839        @Child(name="date", type=DateTimeDt.class, order=9, min=0, max=1, summary=true, modifier=false) 
840        @Description(
841                shortDefinition="when.recorded",
842                formalDefinition="The date this version of the structure definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the structure definition changes"
843        )
844        private DateTimeDt myDate;
845        
846        @Child(name="description", type=StringDt.class, order=10, min=0, max=1, summary=true, modifier=false)   
847        @Description(
848                shortDefinition="",
849                formalDefinition="A free text natural language description of the StructureDefinition and its use"
850        )
851        private StringDt myDescription;
852        
853        @Child(name="useContext", type=CodeableConceptDt.class, order=11, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false) 
854        @Description(
855                shortDefinition="",
856                formalDefinition="The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of structure definitions."
857        )
858        private java.util.List<CodeableConceptDt> myUseContext;
859        
860        @Child(name="requirements", type=StringDt.class, order=12, min=0, max=1, summary=false, modifier=false) 
861        @Description(
862                shortDefinition="why",
863                formalDefinition="Explains why this structure definition is needed and why it's been constrained as it has"
864        )
865        private StringDt myRequirements;
866        
867        @Child(name="copyright", type=StringDt.class, order=13, min=0, max=1, summary=false, modifier=false)    
868        @Description(
869                shortDefinition="",
870                formalDefinition="A copyright statement relating to the structure definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings"
871        )
872        private StringDt myCopyright;
873        
874        @Child(name="code", type=CodingDt.class, order=14, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)        
875        @Description(
876                shortDefinition="",
877                formalDefinition="A set of terms from external terminologies that may be used to assist with indexing and searching of templates."
878        )
879        private java.util.List<CodingDt> myCode;
880        
881        @Child(name="fhirVersion", type=IdDt.class, order=15, min=0, max=1, summary=true, modifier=false)       
882        @Description(
883                shortDefinition="",
884                formalDefinition="The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is $version$ for this version"
885        )
886        private IdDt myFhirVersion;
887        
888        @Child(name="mapping", order=16, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false) 
889        @Description(
890                shortDefinition="",
891                formalDefinition="An external specification that the content is mapped to"
892        )
893        private java.util.List<Mapping> myMapping;
894        
895        @Child(name="kind", type=CodeDt.class, order=17, min=1, max=1, summary=true, modifier=false)    
896        @Description(
897                shortDefinition="",
898                formalDefinition="Defines the kind of structure that this definition is describing"
899        )
900        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/structure-definition-kind")
901        private BoundCodeDt<StructureDefinitionKindEnum> myKind;
902        
903        @Child(name="constrainedType", type=CodeDt.class, order=18, min=0, max=1, summary=true, modifier=false) 
904        @Description(
905                shortDefinition="",
906                formalDefinition="The type of type that is being constrained - a data type, an extension, a resource, including abstract ones. If this field is present, it indicates that the structure definition is a constraint. If it is not present, then the structure definition is the definition of a base structure"
907        )
908        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/defined-types")
909        private CodeDt myConstrainedType;
910        
911        @Child(name="abstract", type=BooleanDt.class, order=19, min=1, max=1, summary=true, modifier=false)     
912        @Description(
913                shortDefinition="",
914                formalDefinition="Whether structure this definition describes is abstract or not  - that is, whether an actual exchanged item can ever be of this type"
915        )
916        private BooleanDt myAbstract;
917        
918        @Child(name="contextType", type=CodeDt.class, order=20, min=0, max=1, summary=true, modifier=false)     
919        @Description(
920                shortDefinition="",
921                formalDefinition="If this is an extension, Identifies the context within FHIR resources where the extension can be used"
922        )
923        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/extension-context")
924        private BoundCodeDt<ExtensionContextEnum> myContextType;
925        
926        @Child(name="context", type=StringDt.class, order=21, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)     
927        @Description(
928                shortDefinition="",
929                formalDefinition="Identifies the types of resource or data type elements to which the extension can be applied"
930        )
931        private java.util.List<StringDt> myContext;
932        
933        @Child(name="base", type=UriDt.class, order=22, min=0, max=1, summary=true, modifier=false)     
934        @Description(
935                shortDefinition="",
936                formalDefinition="An absolute URI that is the base structure from which this set of constraints is derived"
937        )
938        private UriDt myBase;
939        
940        @Child(name="snapshot", order=23, min=0, max=1, summary=false, modifier=false)  
941        @Description(
942                shortDefinition="",
943                formalDefinition="A snapshot view is expressed in a stand alone form that can be used and interpreted without considering the base StructureDefinition"
944        )
945        private Snapshot mySnapshot;
946        
947        @Child(name="differential", order=24, min=0, max=1, summary=false, modifier=false)      
948        @Description(
949                shortDefinition="",
950                formalDefinition="A differential view is expressed relative to the base StructureDefinition - a statement of differences that it applies"
951        )
952        private Differential myDifferential;
953        
954
955        @Override
956        public boolean isEmpty() {
957                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myUrl,  myIdentifier,  myVersion,  myName,  myDisplay,  myStatus,  myExperimental,  myPublisher,  myContact,  myDate,  myDescription,  myUseContext,  myRequirements,  myCopyright,  myCode,  myFhirVersion,  myMapping,  myKind,  myConstrainedType,  myAbstract,  myContextType,  myContext,  myBase,  mySnapshot,  myDifferential);
958        }
959        
960        @Override
961        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
962                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myUrl, myIdentifier, myVersion, myName, myDisplay, myStatus, myExperimental, myPublisher, myContact, myDate, myDescription, myUseContext, myRequirements, myCopyright, myCode, myFhirVersion, myMapping, myKind, myConstrainedType, myAbstract, myContextType, myContext, myBase, mySnapshot, myDifferential);
963        }
964
965        /**
966         * Gets the value(s) for <b>url</b> (id).
967         * creating it if it does
968         * not exist. Will not return <code>null</code>.
969         *
970     * <p>
971     * <b>Definition:</b>
972     * An absolute URL that is used to identify this structure definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this structure definition is (or will be) published
973     * </p> 
974         */
975        public UriDt getUrlElement() {  
976                if (myUrl == null) {
977                        myUrl = new UriDt();
978                }
979                return myUrl;
980        }
981
982        
983        /**
984         * Gets the value(s) for <b>url</b> (id).
985         * creating it if it does
986         * not exist. This method may return <code>null</code>.
987         *
988     * <p>
989     * <b>Definition:</b>
990     * An absolute URL that is used to identify this structure definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this structure definition is (or will be) published
991     * </p> 
992         */
993        public String getUrl() {  
994                return getUrlElement().getValue();
995        }
996
997        /**
998         * Sets the value(s) for <b>url</b> (id)
999         *
1000     * <p>
1001     * <b>Definition:</b>
1002     * An absolute URL that is used to identify this structure definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this structure definition is (or will be) published
1003     * </p> 
1004         */
1005        public StructureDefinition setUrl(UriDt theValue) {
1006                myUrl = theValue;
1007                return this;
1008        }
1009        
1010        
1011
1012        /**
1013         * Sets the value for <b>url</b> (id)
1014         *
1015     * <p>
1016     * <b>Definition:</b>
1017     * An absolute URL that is used to identify this structure definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this structure definition is (or will be) published
1018     * </p> 
1019         */
1020        public StructureDefinition setUrl( String theUri) {
1021                myUrl = new UriDt(theUri); 
1022                return this; 
1023        }
1024
1025 
1026        /**
1027         * Gets the value(s) for <b>identifier</b> (id).
1028         * creating it if it does
1029         * not exist. Will not return <code>null</code>.
1030         *
1031     * <p>
1032     * <b>Definition:</b>
1033     * Formal identifier that is used to identify this StructureDefinition when it is represented in other formats, or referenced in a specification, model, design or an instance  (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI)
1034     * </p> 
1035         */
1036        public java.util.List<IdentifierDt> getIdentifier() {  
1037                if (myIdentifier == null) {
1038                        myIdentifier = new java.util.ArrayList<IdentifierDt>();
1039                }
1040                return myIdentifier;
1041        }
1042
1043        /**
1044         * Sets the value(s) for <b>identifier</b> (id)
1045         *
1046     * <p>
1047     * <b>Definition:</b>
1048     * Formal identifier that is used to identify this StructureDefinition when it is represented in other formats, or referenced in a specification, model, design or an instance  (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI)
1049     * </p> 
1050         */
1051        public StructureDefinition setIdentifier(java.util.List<IdentifierDt> theValue) {
1052                myIdentifier = theValue;
1053                return this;
1054        }
1055        
1056        
1057
1058        /**
1059         * Adds and returns a new value for <b>identifier</b> (id)
1060         *
1061     * <p>
1062     * <b>Definition:</b>
1063     * Formal identifier that is used to identify this StructureDefinition when it is represented in other formats, or referenced in a specification, model, design or an instance  (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI)
1064     * </p> 
1065         */
1066        public IdentifierDt addIdentifier() {
1067                IdentifierDt newType = new IdentifierDt();
1068                getIdentifier().add(newType);
1069                return newType; 
1070        }
1071
1072        /**
1073         * Adds a given new value for <b>identifier</b> (id)
1074         *
1075         * <p>
1076         * <b>Definition:</b>
1077         * Formal identifier that is used to identify this StructureDefinition when it is represented in other formats, or referenced in a specification, model, design or an instance  (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI)
1078         * </p>
1079         * @param theValue The identifier to add (must not be <code>null</code>)
1080         */
1081        public StructureDefinition addIdentifier(IdentifierDt theValue) {
1082                if (theValue == null) {
1083                        throw new NullPointerException("theValue must not be null");
1084                }
1085                getIdentifier().add(theValue);
1086                return this;
1087        }
1088
1089        /**
1090         * Gets the first repetition for <b>identifier</b> (id),
1091         * creating it if it does not already exist.
1092         *
1093     * <p>
1094     * <b>Definition:</b>
1095     * Formal identifier that is used to identify this StructureDefinition when it is represented in other formats, or referenced in a specification, model, design or an instance  (should be globally unique OID, UUID, or URI), (if it's not possible to use the literal URI)
1096     * </p> 
1097         */
1098        public IdentifierDt getIdentifierFirstRep() {
1099                if (getIdentifier().isEmpty()) {
1100                        return addIdentifier();
1101                }
1102                return getIdentifier().get(0); 
1103        }
1104  
1105        /**
1106         * Gets the value(s) for <b>version</b> (id.version).
1107         * creating it if it does
1108         * not exist. Will not return <code>null</code>.
1109         *
1110     * <p>
1111     * <b>Definition:</b>
1112     * The identifier that is used to identify this version of the StructureDefinition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the StructureDefinition author manually
1113     * </p> 
1114         */
1115        public StringDt getVersionElement() {  
1116                if (myVersion == null) {
1117                        myVersion = new StringDt();
1118                }
1119                return myVersion;
1120        }
1121
1122        
1123        /**
1124         * Gets the value(s) for <b>version</b> (id.version).
1125         * creating it if it does
1126         * not exist. This method may return <code>null</code>.
1127         *
1128     * <p>
1129     * <b>Definition:</b>
1130     * The identifier that is used to identify this version of the StructureDefinition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the StructureDefinition author manually
1131     * </p> 
1132         */
1133        public String getVersion() {  
1134                return getVersionElement().getValue();
1135        }
1136
1137        /**
1138         * Sets the value(s) for <b>version</b> (id.version)
1139         *
1140     * <p>
1141     * <b>Definition:</b>
1142     * The identifier that is used to identify this version of the StructureDefinition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the StructureDefinition author manually
1143     * </p> 
1144         */
1145        public StructureDefinition setVersion(StringDt theValue) {
1146                myVersion = theValue;
1147                return this;
1148        }
1149        
1150        
1151
1152        /**
1153         * Sets the value for <b>version</b> (id.version)
1154         *
1155     * <p>
1156     * <b>Definition:</b>
1157     * The identifier that is used to identify this version of the StructureDefinition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the StructureDefinition author manually
1158     * </p> 
1159         */
1160        public StructureDefinition setVersion( String theString) {
1161                myVersion = new StringDt(theString); 
1162                return this; 
1163        }
1164
1165 
1166        /**
1167         * Gets the value(s) for <b>name</b> ().
1168         * creating it if it does
1169         * not exist. Will not return <code>null</code>.
1170         *
1171     * <p>
1172     * <b>Definition:</b>
1173     * A free text natural language name identifying the StructureDefinition
1174     * </p> 
1175         */
1176        public StringDt getNameElement() {  
1177                if (myName == null) {
1178                        myName = new StringDt();
1179                }
1180                return myName;
1181        }
1182
1183        
1184        /**
1185         * Gets the value(s) for <b>name</b> ().
1186         * creating it if it does
1187         * not exist. This method may return <code>null</code>.
1188         *
1189     * <p>
1190     * <b>Definition:</b>
1191     * A free text natural language name identifying the StructureDefinition
1192     * </p> 
1193         */
1194        public String getName() {  
1195                return getNameElement().getValue();
1196        }
1197
1198        /**
1199         * Sets the value(s) for <b>name</b> ()
1200         *
1201     * <p>
1202     * <b>Definition:</b>
1203     * A free text natural language name identifying the StructureDefinition
1204     * </p> 
1205         */
1206        public StructureDefinition setName(StringDt theValue) {
1207                myName = theValue;
1208                return this;
1209        }
1210        
1211        
1212
1213        /**
1214         * Sets the value for <b>name</b> ()
1215         *
1216     * <p>
1217     * <b>Definition:</b>
1218     * A free text natural language name identifying the StructureDefinition
1219     * </p> 
1220         */
1221        public StructureDefinition setName( String theString) {
1222                myName = new StringDt(theString); 
1223                return this; 
1224        }
1225
1226 
1227        /**
1228         * Gets the value(s) for <b>display</b> ().
1229         * creating it if it does
1230         * not exist. Will not return <code>null</code>.
1231         *
1232     * <p>
1233     * <b>Definition:</b>
1234     * Defined so that applications can use this name when displaying the value of the extension to the user
1235     * </p> 
1236         */
1237        public StringDt getDisplayElement() {  
1238                if (myDisplay == null) {
1239                        myDisplay = new StringDt();
1240                }
1241                return myDisplay;
1242        }
1243
1244        
1245        /**
1246         * Gets the value(s) for <b>display</b> ().
1247         * creating it if it does
1248         * not exist. This method may return <code>null</code>.
1249         *
1250     * <p>
1251     * <b>Definition:</b>
1252     * Defined so that applications can use this name when displaying the value of the extension to the user
1253     * </p> 
1254         */
1255        public String getDisplay() {  
1256                return getDisplayElement().getValue();
1257        }
1258
1259        /**
1260         * Sets the value(s) for <b>display</b> ()
1261         *
1262     * <p>
1263     * <b>Definition:</b>
1264     * Defined so that applications can use this name when displaying the value of the extension to the user
1265     * </p> 
1266         */
1267        public StructureDefinition setDisplay(StringDt theValue) {
1268                myDisplay = theValue;
1269                return this;
1270        }
1271        
1272        
1273
1274        /**
1275         * Sets the value for <b>display</b> ()
1276         *
1277     * <p>
1278     * <b>Definition:</b>
1279     * Defined so that applications can use this name when displaying the value of the extension to the user
1280     * </p> 
1281         */
1282        public StructureDefinition setDisplay( String theString) {
1283                myDisplay = new StringDt(theString); 
1284                return this; 
1285        }
1286
1287 
1288        /**
1289         * Gets the value(s) for <b>status</b> (status).
1290         * creating it if it does
1291         * not exist. Will not return <code>null</code>.
1292         *
1293     * <p>
1294     * <b>Definition:</b>
1295     * The status of the StructureDefinition
1296     * </p> 
1297         */
1298        public BoundCodeDt<ConformanceResourceStatusEnum> getStatusElement() {  
1299                if (myStatus == null) {
1300                        myStatus = new BoundCodeDt<ConformanceResourceStatusEnum>(ConformanceResourceStatusEnum.VALUESET_BINDER);
1301                }
1302                return myStatus;
1303        }
1304
1305        
1306        /**
1307         * Gets the value(s) for <b>status</b> (status).
1308         * creating it if it does
1309         * not exist. This method may return <code>null</code>.
1310         *
1311     * <p>
1312     * <b>Definition:</b>
1313     * The status of the StructureDefinition
1314     * </p> 
1315         */
1316        public String getStatus() {  
1317                return getStatusElement().getValue();
1318        }
1319
1320        /**
1321         * Sets the value(s) for <b>status</b> (status)
1322         *
1323     * <p>
1324     * <b>Definition:</b>
1325     * The status of the StructureDefinition
1326     * </p> 
1327         */
1328        public StructureDefinition setStatus(BoundCodeDt<ConformanceResourceStatusEnum> theValue) {
1329                myStatus = theValue;
1330                return this;
1331        }
1332        
1333        
1334
1335        /**
1336         * Sets the value(s) for <b>status</b> (status)
1337         *
1338     * <p>
1339     * <b>Definition:</b>
1340     * The status of the StructureDefinition
1341     * </p> 
1342         */
1343        public StructureDefinition setStatus(ConformanceResourceStatusEnum theValue) {
1344                setStatus(new BoundCodeDt<ConformanceResourceStatusEnum>(ConformanceResourceStatusEnum.VALUESET_BINDER, theValue));
1345                
1346/*
1347                getStatusElement().setValueAsEnum(theValue);
1348*/
1349                return this;
1350        }
1351
1352  
1353        /**
1354         * Gets the value(s) for <b>experimental</b> (class).
1355         * creating it if it does
1356         * not exist. Will not return <code>null</code>.
1357         *
1358     * <p>
1359     * <b>Definition:</b>
1360     * This StructureDefinition was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage
1361     * </p> 
1362         */
1363        public BooleanDt getExperimentalElement() {  
1364                if (myExperimental == null) {
1365                        myExperimental = new BooleanDt();
1366                }
1367                return myExperimental;
1368        }
1369
1370        
1371        /**
1372         * Gets the value(s) for <b>experimental</b> (class).
1373         * creating it if it does
1374         * not exist. This method may return <code>null</code>.
1375         *
1376     * <p>
1377     * <b>Definition:</b>
1378     * This StructureDefinition was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage
1379     * </p> 
1380         */
1381        public Boolean getExperimental() {  
1382                return getExperimentalElement().getValue();
1383        }
1384
1385        /**
1386         * Sets the value(s) for <b>experimental</b> (class)
1387         *
1388     * <p>
1389     * <b>Definition:</b>
1390     * This StructureDefinition was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage
1391     * </p> 
1392         */
1393        public StructureDefinition setExperimental(BooleanDt theValue) {
1394                myExperimental = theValue;
1395                return this;
1396        }
1397        
1398        
1399
1400        /**
1401         * Sets the value for <b>experimental</b> (class)
1402         *
1403     * <p>
1404     * <b>Definition:</b>
1405     * This StructureDefinition was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage
1406     * </p> 
1407         */
1408        public StructureDefinition setExperimental( boolean theBoolean) {
1409                myExperimental = new BooleanDt(theBoolean); 
1410                return this; 
1411        }
1412
1413 
1414        /**
1415         * Gets the value(s) for <b>publisher</b> (who.witness).
1416         * creating it if it does
1417         * not exist. Will not return <code>null</code>.
1418         *
1419     * <p>
1420     * <b>Definition:</b>
1421     * The name of the individual or organization that published the structure definition
1422     * </p> 
1423         */
1424        public StringDt getPublisherElement() {  
1425                if (myPublisher == null) {
1426                        myPublisher = new StringDt();
1427                }
1428                return myPublisher;
1429        }
1430
1431        
1432        /**
1433         * Gets the value(s) for <b>publisher</b> (who.witness).
1434         * creating it if it does
1435         * not exist. This method may return <code>null</code>.
1436         *
1437     * <p>
1438     * <b>Definition:</b>
1439     * The name of the individual or organization that published the structure definition
1440     * </p> 
1441         */
1442        public String getPublisher() {  
1443                return getPublisherElement().getValue();
1444        }
1445
1446        /**
1447         * Sets the value(s) for <b>publisher</b> (who.witness)
1448         *
1449     * <p>
1450     * <b>Definition:</b>
1451     * The name of the individual or organization that published the structure definition
1452     * </p> 
1453         */
1454        public StructureDefinition setPublisher(StringDt theValue) {
1455                myPublisher = theValue;
1456                return this;
1457        }
1458        
1459        
1460
1461        /**
1462         * Sets the value for <b>publisher</b> (who.witness)
1463         *
1464     * <p>
1465     * <b>Definition:</b>
1466     * The name of the individual or organization that published the structure definition
1467     * </p> 
1468         */
1469        public StructureDefinition setPublisher( String theString) {
1470                myPublisher = new StringDt(theString); 
1471                return this; 
1472        }
1473
1474 
1475        /**
1476         * Gets the value(s) for <b>contact</b> ().
1477         * creating it if it does
1478         * not exist. Will not return <code>null</code>.
1479         *
1480     * <p>
1481     * <b>Definition:</b>
1482     * Contacts to assist a user in finding and communicating with the publisher
1483     * </p> 
1484         */
1485        public java.util.List<Contact> getContact() {  
1486                if (myContact == null) {
1487                        myContact = new java.util.ArrayList<Contact>();
1488                }
1489                return myContact;
1490        }
1491
1492        /**
1493         * Sets the value(s) for <b>contact</b> ()
1494         *
1495     * <p>
1496     * <b>Definition:</b>
1497     * Contacts to assist a user in finding and communicating with the publisher
1498     * </p> 
1499         */
1500        public StructureDefinition setContact(java.util.List<Contact> theValue) {
1501                myContact = theValue;
1502                return this;
1503        }
1504        
1505        
1506
1507        /**
1508         * Adds and returns a new value for <b>contact</b> ()
1509         *
1510     * <p>
1511     * <b>Definition:</b>
1512     * Contacts to assist a user in finding and communicating with the publisher
1513     * </p> 
1514         */
1515        public Contact addContact() {
1516                Contact newType = new Contact();
1517                getContact().add(newType);
1518                return newType; 
1519        }
1520
1521        /**
1522         * Adds a given new value for <b>contact</b> ()
1523         *
1524         * <p>
1525         * <b>Definition:</b>
1526         * Contacts to assist a user in finding and communicating with the publisher
1527         * </p>
1528         * @param theValue The contact to add (must not be <code>null</code>)
1529         */
1530        public StructureDefinition addContact(Contact theValue) {
1531                if (theValue == null) {
1532                        throw new NullPointerException("theValue must not be null");
1533                }
1534                getContact().add(theValue);
1535                return this;
1536        }
1537
1538        /**
1539         * Gets the first repetition for <b>contact</b> (),
1540         * creating it if it does not already exist.
1541         *
1542     * <p>
1543     * <b>Definition:</b>
1544     * Contacts to assist a user in finding and communicating with the publisher
1545     * </p> 
1546         */
1547        public Contact getContactFirstRep() {
1548                if (getContact().isEmpty()) {
1549                        return addContact();
1550                }
1551                return getContact().get(0); 
1552        }
1553  
1554        /**
1555         * Gets the value(s) for <b>date</b> (when.recorded).
1556         * creating it if it does
1557         * not exist. Will not return <code>null</code>.
1558         *
1559     * <p>
1560     * <b>Definition:</b>
1561     * The date this version of the structure definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the structure definition changes
1562     * </p> 
1563         */
1564        public DateTimeDt getDateElement() {  
1565                if (myDate == null) {
1566                        myDate = new DateTimeDt();
1567                }
1568                return myDate;
1569        }
1570
1571        
1572        /**
1573         * Gets the value(s) for <b>date</b> (when.recorded).
1574         * creating it if it does
1575         * not exist. This method may return <code>null</code>.
1576         *
1577     * <p>
1578     * <b>Definition:</b>
1579     * The date this version of the structure definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the structure definition changes
1580     * </p> 
1581         */
1582        public Date getDate() {  
1583                return getDateElement().getValue();
1584        }
1585
1586        /**
1587         * Sets the value(s) for <b>date</b> (when.recorded)
1588         *
1589     * <p>
1590     * <b>Definition:</b>
1591     * The date this version of the structure definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the structure definition changes
1592     * </p> 
1593         */
1594        public StructureDefinition setDate(DateTimeDt theValue) {
1595                myDate = theValue;
1596                return this;
1597        }
1598        
1599        
1600
1601        /**
1602         * Sets the value for <b>date</b> (when.recorded)
1603         *
1604     * <p>
1605     * <b>Definition:</b>
1606     * The date this version of the structure definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the structure definition changes
1607     * </p> 
1608         */
1609        public StructureDefinition setDateWithSecondsPrecision( Date theDate) {
1610                myDate = new DateTimeDt(theDate); 
1611                return this; 
1612        }
1613
1614        /**
1615         * Sets the value for <b>date</b> (when.recorded)
1616         *
1617     * <p>
1618     * <b>Definition:</b>
1619     * The date this version of the structure definition was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the structure definition changes
1620     * </p> 
1621         */
1622        public StructureDefinition setDate( Date theDate,  TemporalPrecisionEnum thePrecision) {
1623                myDate = new DateTimeDt(theDate, thePrecision); 
1624                return this; 
1625        }
1626
1627 
1628        /**
1629         * Gets the value(s) for <b>description</b> ().
1630         * creating it if it does
1631         * not exist. Will not return <code>null</code>.
1632         *
1633     * <p>
1634     * <b>Definition:</b>
1635     * A free text natural language description of the StructureDefinition and its use
1636     * </p> 
1637         */
1638        public StringDt getDescriptionElement() {  
1639                if (myDescription == null) {
1640                        myDescription = new StringDt();
1641                }
1642                return myDescription;
1643        }
1644
1645        
1646        /**
1647         * Gets the value(s) for <b>description</b> ().
1648         * creating it if it does
1649         * not exist. This method may return <code>null</code>.
1650         *
1651     * <p>
1652     * <b>Definition:</b>
1653     * A free text natural language description of the StructureDefinition and its use
1654     * </p> 
1655         */
1656        public String getDescription() {  
1657                return getDescriptionElement().getValue();
1658        }
1659
1660        /**
1661         * Sets the value(s) for <b>description</b> ()
1662         *
1663     * <p>
1664     * <b>Definition:</b>
1665     * A free text natural language description of the StructureDefinition and its use
1666     * </p> 
1667         */
1668        public StructureDefinition setDescription(StringDt theValue) {
1669                myDescription = theValue;
1670                return this;
1671        }
1672        
1673        
1674
1675        /**
1676         * Sets the value for <b>description</b> ()
1677         *
1678     * <p>
1679     * <b>Definition:</b>
1680     * A free text natural language description of the StructureDefinition and its use
1681     * </p> 
1682         */
1683        public StructureDefinition setDescription( String theString) {
1684                myDescription = new StringDt(theString); 
1685                return this; 
1686        }
1687
1688 
1689        /**
1690         * Gets the value(s) for <b>useContext</b> ().
1691         * creating it if it does
1692         * not exist. Will not return <code>null</code>.
1693         *
1694     * <p>
1695     * <b>Definition:</b>
1696     * The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of structure definitions.
1697     * </p> 
1698         */
1699        public java.util.List<CodeableConceptDt> getUseContext() {  
1700                if (myUseContext == null) {
1701                        myUseContext = new java.util.ArrayList<CodeableConceptDt>();
1702                }
1703                return myUseContext;
1704        }
1705
1706        /**
1707         * Sets the value(s) for <b>useContext</b> ()
1708         *
1709     * <p>
1710     * <b>Definition:</b>
1711     * The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of structure definitions.
1712     * </p> 
1713         */
1714        public StructureDefinition setUseContext(java.util.List<CodeableConceptDt> theValue) {
1715                myUseContext = theValue;
1716                return this;
1717        }
1718        
1719        
1720
1721        /**
1722         * Adds and returns a new value for <b>useContext</b> ()
1723         *
1724     * <p>
1725     * <b>Definition:</b>
1726     * The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of structure definitions.
1727     * </p> 
1728         */
1729        public CodeableConceptDt addUseContext() {
1730                CodeableConceptDt newType = new CodeableConceptDt();
1731                getUseContext().add(newType);
1732                return newType; 
1733        }
1734
1735        /**
1736         * Adds a given new value for <b>useContext</b> ()
1737         *
1738         * <p>
1739         * <b>Definition:</b>
1740         * The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of structure definitions.
1741         * </p>
1742         * @param theValue The useContext to add (must not be <code>null</code>)
1743         */
1744        public StructureDefinition addUseContext(CodeableConceptDt theValue) {
1745                if (theValue == null) {
1746                        throw new NullPointerException("theValue must not be null");
1747                }
1748                getUseContext().add(theValue);
1749                return this;
1750        }
1751
1752        /**
1753         * Gets the first repetition for <b>useContext</b> (),
1754         * creating it if it does not already exist.
1755         *
1756     * <p>
1757     * <b>Definition:</b>
1758     * The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of structure definitions.
1759     * </p> 
1760         */
1761        public CodeableConceptDt getUseContextFirstRep() {
1762                if (getUseContext().isEmpty()) {
1763                        return addUseContext();
1764                }
1765                return getUseContext().get(0); 
1766        }
1767  
1768        /**
1769         * Gets the value(s) for <b>requirements</b> (why).
1770         * creating it if it does
1771         * not exist. Will not return <code>null</code>.
1772         *
1773     * <p>
1774     * <b>Definition:</b>
1775     * Explains why this structure definition is needed and why it's been constrained as it has
1776     * </p> 
1777         */
1778        public StringDt getRequirementsElement() {  
1779                if (myRequirements == null) {
1780                        myRequirements = new StringDt();
1781                }
1782                return myRequirements;
1783        }
1784
1785        
1786        /**
1787         * Gets the value(s) for <b>requirements</b> (why).
1788         * creating it if it does
1789         * not exist. This method may return <code>null</code>.
1790         *
1791     * <p>
1792     * <b>Definition:</b>
1793     * Explains why this structure definition is needed and why it's been constrained as it has
1794     * </p> 
1795         */
1796        public String getRequirements() {  
1797                return getRequirementsElement().getValue();
1798        }
1799
1800        /**
1801         * Sets the value(s) for <b>requirements</b> (why)
1802         *
1803     * <p>
1804     * <b>Definition:</b>
1805     * Explains why this structure definition is needed and why it's been constrained as it has
1806     * </p> 
1807         */
1808        public StructureDefinition setRequirements(StringDt theValue) {
1809                myRequirements = theValue;
1810                return this;
1811        }
1812        
1813        
1814
1815        /**
1816         * Sets the value for <b>requirements</b> (why)
1817         *
1818     * <p>
1819     * <b>Definition:</b>
1820     * Explains why this structure definition is needed and why it's been constrained as it has
1821     * </p> 
1822         */
1823        public StructureDefinition setRequirements( String theString) {
1824                myRequirements = new StringDt(theString); 
1825                return this; 
1826        }
1827
1828 
1829        /**
1830         * Gets the value(s) for <b>copyright</b> ().
1831         * creating it if it does
1832         * not exist. Will not return <code>null</code>.
1833         *
1834     * <p>
1835     * <b>Definition:</b>
1836     * A copyright statement relating to the structure definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings
1837     * </p> 
1838         */
1839        public StringDt getCopyrightElement() {  
1840                if (myCopyright == null) {
1841                        myCopyright = new StringDt();
1842                }
1843                return myCopyright;
1844        }
1845
1846        
1847        /**
1848         * Gets the value(s) for <b>copyright</b> ().
1849         * creating it if it does
1850         * not exist. This method may return <code>null</code>.
1851         *
1852     * <p>
1853     * <b>Definition:</b>
1854     * A copyright statement relating to the structure definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings
1855     * </p> 
1856         */
1857        public String getCopyright() {  
1858                return getCopyrightElement().getValue();
1859        }
1860
1861        /**
1862         * Sets the value(s) for <b>copyright</b> ()
1863         *
1864     * <p>
1865     * <b>Definition:</b>
1866     * A copyright statement relating to the structure definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings
1867     * </p> 
1868         */
1869        public StructureDefinition setCopyright(StringDt theValue) {
1870                myCopyright = theValue;
1871                return this;
1872        }
1873        
1874        
1875
1876        /**
1877         * Sets the value for <b>copyright</b> ()
1878         *
1879     * <p>
1880     * <b>Definition:</b>
1881     * A copyright statement relating to the structure definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings
1882     * </p> 
1883         */
1884        public StructureDefinition setCopyright( String theString) {
1885                myCopyright = new StringDt(theString); 
1886                return this; 
1887        }
1888
1889 
1890        /**
1891         * Gets the value(s) for <b>code</b> ().
1892         * creating it if it does
1893         * not exist. Will not return <code>null</code>.
1894         *
1895     * <p>
1896     * <b>Definition:</b>
1897     * A set of terms from external terminologies that may be used to assist with indexing and searching of templates.
1898     * </p> 
1899         */
1900        public java.util.List<CodingDt> getCode() {  
1901                if (myCode == null) {
1902                        myCode = new java.util.ArrayList<CodingDt>();
1903                }
1904                return myCode;
1905        }
1906
1907        /**
1908         * Sets the value(s) for <b>code</b> ()
1909         *
1910     * <p>
1911     * <b>Definition:</b>
1912     * A set of terms from external terminologies that may be used to assist with indexing and searching of templates.
1913     * </p> 
1914         */
1915        public StructureDefinition setCode(java.util.List<CodingDt> theValue) {
1916                myCode = theValue;
1917                return this;
1918        }
1919        
1920        
1921
1922        /**
1923         * Adds and returns a new value for <b>code</b> ()
1924         *
1925     * <p>
1926     * <b>Definition:</b>
1927     * A set of terms from external terminologies that may be used to assist with indexing and searching of templates.
1928     * </p> 
1929         */
1930        public CodingDt addCode() {
1931                CodingDt newType = new CodingDt();
1932                getCode().add(newType);
1933                return newType; 
1934        }
1935
1936        /**
1937         * Adds a given new value for <b>code</b> ()
1938         *
1939         * <p>
1940         * <b>Definition:</b>
1941         * A set of terms from external terminologies that may be used to assist with indexing and searching of templates.
1942         * </p>
1943         * @param theValue The code to add (must not be <code>null</code>)
1944         */
1945        public StructureDefinition addCode(CodingDt theValue) {
1946                if (theValue == null) {
1947                        throw new NullPointerException("theValue must not be null");
1948                }
1949                getCode().add(theValue);
1950                return this;
1951        }
1952
1953        /**
1954         * Gets the first repetition for <b>code</b> (),
1955         * creating it if it does not already exist.
1956         *
1957     * <p>
1958     * <b>Definition:</b>
1959     * A set of terms from external terminologies that may be used to assist with indexing and searching of templates.
1960     * </p> 
1961         */
1962        public CodingDt getCodeFirstRep() {
1963                if (getCode().isEmpty()) {
1964                        return addCode();
1965                }
1966                return getCode().get(0); 
1967        }
1968  
1969        /**
1970         * Gets the value(s) for <b>fhirVersion</b> ().
1971         * creating it if it does
1972         * not exist. Will not return <code>null</code>.
1973         *
1974     * <p>
1975     * <b>Definition:</b>
1976     * The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is $version$ for this version
1977     * </p> 
1978         */
1979        public IdDt getFhirVersionElement() {  
1980                if (myFhirVersion == null) {
1981                        myFhirVersion = new IdDt();
1982                }
1983                return myFhirVersion;
1984        }
1985
1986        
1987        /**
1988         * Gets the value(s) for <b>fhirVersion</b> ().
1989         * creating it if it does
1990         * not exist. This method may return <code>null</code>.
1991         *
1992     * <p>
1993     * <b>Definition:</b>
1994     * The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is $version$ for this version
1995     * </p> 
1996         */
1997        public String getFhirVersion() {  
1998                return getFhirVersionElement().getValue();
1999        }
2000
2001        /**
2002         * Sets the value(s) for <b>fhirVersion</b> ()
2003         *
2004     * <p>
2005     * <b>Definition:</b>
2006     * The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is $version$ for this version
2007     * </p> 
2008         */
2009        public StructureDefinition setFhirVersion(IdDt theValue) {
2010                myFhirVersion = theValue;
2011                return this;
2012        }
2013        
2014        
2015
2016        /**
2017         * Sets the value for <b>fhirVersion</b> ()
2018         *
2019     * <p>
2020     * <b>Definition:</b>
2021     * The version of the FHIR specification on which this StructureDefinition is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is $version$ for this version
2022     * </p> 
2023         */
2024        public StructureDefinition setFhirVersion( String theId) {
2025                myFhirVersion = new IdDt(theId); 
2026                return this; 
2027        }
2028
2029 
2030        /**
2031         * Gets the value(s) for <b>mapping</b> ().
2032         * creating it if it does
2033         * not exist. Will not return <code>null</code>.
2034         *
2035     * <p>
2036     * <b>Definition:</b>
2037     * An external specification that the content is mapped to
2038     * </p> 
2039         */
2040        public java.util.List<Mapping> getMapping() {  
2041                if (myMapping == null) {
2042                        myMapping = new java.util.ArrayList<Mapping>();
2043                }
2044                return myMapping;
2045        }
2046
2047        /**
2048         * Sets the value(s) for <b>mapping</b> ()
2049         *
2050     * <p>
2051     * <b>Definition:</b>
2052     * An external specification that the content is mapped to
2053     * </p> 
2054         */
2055        public StructureDefinition setMapping(java.util.List<Mapping> theValue) {
2056                myMapping = theValue;
2057                return this;
2058        }
2059        
2060        
2061
2062        /**
2063         * Adds and returns a new value for <b>mapping</b> ()
2064         *
2065     * <p>
2066     * <b>Definition:</b>
2067     * An external specification that the content is mapped to
2068     * </p> 
2069         */
2070        public Mapping addMapping() {
2071                Mapping newType = new Mapping();
2072                getMapping().add(newType);
2073                return newType; 
2074        }
2075
2076        /**
2077         * Adds a given new value for <b>mapping</b> ()
2078         *
2079         * <p>
2080         * <b>Definition:</b>
2081         * An external specification that the content is mapped to
2082         * </p>
2083         * @param theValue The mapping to add (must not be <code>null</code>)
2084         */
2085        public StructureDefinition addMapping(Mapping theValue) {
2086                if (theValue == null) {
2087                        throw new NullPointerException("theValue must not be null");
2088                }
2089                getMapping().add(theValue);
2090                return this;
2091        }
2092
2093        /**
2094         * Gets the first repetition for <b>mapping</b> (),
2095         * creating it if it does not already exist.
2096         *
2097     * <p>
2098     * <b>Definition:</b>
2099     * An external specification that the content is mapped to
2100     * </p> 
2101         */
2102        public Mapping getMappingFirstRep() {
2103                if (getMapping().isEmpty()) {
2104                        return addMapping();
2105                }
2106                return getMapping().get(0); 
2107        }
2108  
2109        /**
2110         * Gets the value(s) for <b>kind</b> ().
2111         * creating it if it does
2112         * not exist. Will not return <code>null</code>.
2113         *
2114     * <p>
2115     * <b>Definition:</b>
2116     * Defines the kind of structure that this definition is describing
2117     * </p> 
2118         */
2119        public BoundCodeDt<StructureDefinitionKindEnum> getKindElement() {  
2120                if (myKind == null) {
2121                        myKind = new BoundCodeDt<StructureDefinitionKindEnum>(StructureDefinitionKindEnum.VALUESET_BINDER);
2122                }
2123                return myKind;
2124        }
2125
2126        
2127        /**
2128         * Gets the value(s) for <b>kind</b> ().
2129         * creating it if it does
2130         * not exist. This method may return <code>null</code>.
2131         *
2132     * <p>
2133     * <b>Definition:</b>
2134     * Defines the kind of structure that this definition is describing
2135     * </p> 
2136         */
2137        public String getKind() {  
2138                return getKindElement().getValue();
2139        }
2140
2141        /**
2142         * Sets the value(s) for <b>kind</b> ()
2143         *
2144     * <p>
2145     * <b>Definition:</b>
2146     * Defines the kind of structure that this definition is describing
2147     * </p> 
2148         */
2149        public StructureDefinition setKind(BoundCodeDt<StructureDefinitionKindEnum> theValue) {
2150                myKind = theValue;
2151                return this;
2152        }
2153        
2154        
2155
2156        /**
2157         * Sets the value(s) for <b>kind</b> ()
2158         *
2159     * <p>
2160     * <b>Definition:</b>
2161     * Defines the kind of structure that this definition is describing
2162     * </p> 
2163         */
2164        public StructureDefinition setKind(StructureDefinitionKindEnum theValue) {
2165                setKind(new BoundCodeDt<StructureDefinitionKindEnum>(StructureDefinitionKindEnum.VALUESET_BINDER, theValue));
2166                
2167/*
2168                getKindElement().setValueAsEnum(theValue);
2169*/
2170                return this;
2171        }
2172
2173  
2174        /**
2175         * Gets the value(s) for <b>constrainedType</b> ().
2176         * creating it if it does
2177         * not exist. Will not return <code>null</code>.
2178         *
2179     * <p>
2180     * <b>Definition:</b>
2181     * The type of type that is being constrained - a data type, an extension, a resource, including abstract ones. If this field is present, it indicates that the structure definition is a constraint. If it is not present, then the structure definition is the definition of a base structure
2182     * </p> 
2183         */
2184        public CodeDt getConstrainedTypeElement() {  
2185                if (myConstrainedType == null) {
2186                        myConstrainedType = new CodeDt();
2187                }
2188                return myConstrainedType;
2189        }
2190
2191        
2192        /**
2193         * Gets the value(s) for <b>constrainedType</b> ().
2194         * creating it if it does
2195         * not exist. This method may return <code>null</code>.
2196         *
2197     * <p>
2198     * <b>Definition:</b>
2199     * The type of type that is being constrained - a data type, an extension, a resource, including abstract ones. If this field is present, it indicates that the structure definition is a constraint. If it is not present, then the structure definition is the definition of a base structure
2200     * </p> 
2201         */
2202        public String getConstrainedType() {  
2203                return getConstrainedTypeElement().getValue();
2204        }
2205
2206        /**
2207         * Sets the value(s) for <b>constrainedType</b> ()
2208         *
2209     * <p>
2210     * <b>Definition:</b>
2211     * The type of type that is being constrained - a data type, an extension, a resource, including abstract ones. If this field is present, it indicates that the structure definition is a constraint. If it is not present, then the structure definition is the definition of a base structure
2212     * </p> 
2213         */
2214        public StructureDefinition setConstrainedType(CodeDt theValue) {
2215                myConstrainedType = theValue;
2216                return this;
2217        }
2218        
2219        
2220
2221        /**
2222         * Sets the value for <b>constrainedType</b> ()
2223         *
2224     * <p>
2225     * <b>Definition:</b>
2226     * The type of type that is being constrained - a data type, an extension, a resource, including abstract ones. If this field is present, it indicates that the structure definition is a constraint. If it is not present, then the structure definition is the definition of a base structure
2227     * </p> 
2228         */
2229        public StructureDefinition setConstrainedType( String theCode) {
2230                myConstrainedType = new CodeDt(theCode); 
2231                return this; 
2232        }
2233
2234 
2235        /**
2236         * Gets the value(s) for <b>abstract</b> ().
2237         * creating it if it does
2238         * not exist. Will not return <code>null</code>.
2239         *
2240     * <p>
2241     * <b>Definition:</b>
2242     * Whether structure this definition describes is abstract or not  - that is, whether an actual exchanged item can ever be of this type
2243     * </p> 
2244         */
2245        public BooleanDt getAbstractElement() {  
2246                if (myAbstract == null) {
2247                        myAbstract = new BooleanDt();
2248                }
2249                return myAbstract;
2250        }
2251
2252        
2253        /**
2254         * Gets the value(s) for <b>abstract</b> ().
2255         * creating it if it does
2256         * not exist. This method may return <code>null</code>.
2257         *
2258     * <p>
2259     * <b>Definition:</b>
2260     * Whether structure this definition describes is abstract or not  - that is, whether an actual exchanged item can ever be of this type
2261     * </p> 
2262         */
2263        public Boolean getAbstract() {  
2264                return getAbstractElement().getValue();
2265        }
2266
2267        /**
2268         * Sets the value(s) for <b>abstract</b> ()
2269         *
2270     * <p>
2271     * <b>Definition:</b>
2272     * Whether structure this definition describes is abstract or not  - that is, whether an actual exchanged item can ever be of this type
2273     * </p> 
2274         */
2275        public StructureDefinition setAbstract(BooleanDt theValue) {
2276                myAbstract = theValue;
2277                return this;
2278        }
2279        
2280        
2281
2282        /**
2283         * Sets the value for <b>abstract</b> ()
2284         *
2285     * <p>
2286     * <b>Definition:</b>
2287     * Whether structure this definition describes is abstract or not  - that is, whether an actual exchanged item can ever be of this type
2288     * </p> 
2289         */
2290        public StructureDefinition setAbstract( boolean theBoolean) {
2291                myAbstract = new BooleanDt(theBoolean); 
2292                return this; 
2293        }
2294
2295 
2296        /**
2297         * Gets the value(s) for <b>contextType</b> ().
2298         * creating it if it does
2299         * not exist. Will not return <code>null</code>.
2300         *
2301     * <p>
2302     * <b>Definition:</b>
2303     * If this is an extension, Identifies the context within FHIR resources where the extension can be used
2304     * </p> 
2305         */
2306        public BoundCodeDt<ExtensionContextEnum> getContextTypeElement() {  
2307                if (myContextType == null) {
2308                        myContextType = new BoundCodeDt<ExtensionContextEnum>(ExtensionContextEnum.VALUESET_BINDER);
2309                }
2310                return myContextType;
2311        }
2312
2313        
2314        /**
2315         * Gets the value(s) for <b>contextType</b> ().
2316         * creating it if it does
2317         * not exist. This method may return <code>null</code>.
2318         *
2319     * <p>
2320     * <b>Definition:</b>
2321     * If this is an extension, Identifies the context within FHIR resources where the extension can be used
2322     * </p> 
2323         */
2324        public String getContextType() {  
2325                return getContextTypeElement().getValue();
2326        }
2327
2328        /**
2329         * Sets the value(s) for <b>contextType</b> ()
2330         *
2331     * <p>
2332     * <b>Definition:</b>
2333     * If this is an extension, Identifies the context within FHIR resources where the extension can be used
2334     * </p> 
2335         */
2336        public StructureDefinition setContextType(BoundCodeDt<ExtensionContextEnum> theValue) {
2337                myContextType = theValue;
2338                return this;
2339        }
2340        
2341        
2342
2343        /**
2344         * Sets the value(s) for <b>contextType</b> ()
2345         *
2346     * <p>
2347     * <b>Definition:</b>
2348     * If this is an extension, Identifies the context within FHIR resources where the extension can be used
2349     * </p> 
2350         */
2351        public StructureDefinition setContextType(ExtensionContextEnum theValue) {
2352                setContextType(new BoundCodeDt<ExtensionContextEnum>(ExtensionContextEnum.VALUESET_BINDER, theValue));
2353                
2354/*
2355                getContextTypeElement().setValueAsEnum(theValue);
2356*/
2357                return this;
2358        }
2359
2360  
2361        /**
2362         * Gets the value(s) for <b>context</b> ().
2363         * creating it if it does
2364         * not exist. Will not return <code>null</code>.
2365         *
2366     * <p>
2367     * <b>Definition:</b>
2368     * Identifies the types of resource or data type elements to which the extension can be applied
2369     * </p> 
2370         */
2371        public java.util.List<StringDt> getContext() {  
2372                if (myContext == null) {
2373                        myContext = new java.util.ArrayList<StringDt>();
2374                }
2375                return myContext;
2376        }
2377
2378        /**
2379         * Sets the value(s) for <b>context</b> ()
2380         *
2381     * <p>
2382     * <b>Definition:</b>
2383     * Identifies the types of resource or data type elements to which the extension can be applied
2384     * </p> 
2385         */
2386        public StructureDefinition setContext(java.util.List<StringDt> theValue) {
2387                myContext = theValue;
2388                return this;
2389        }
2390        
2391        
2392
2393        /**
2394         * Adds and returns a new value for <b>context</b> ()
2395         *
2396     * <p>
2397     * <b>Definition:</b>
2398     * Identifies the types of resource or data type elements to which the extension can be applied
2399     * </p> 
2400         */
2401        public StringDt addContext() {
2402                StringDt newType = new StringDt();
2403                getContext().add(newType);
2404                return newType; 
2405        }
2406
2407        /**
2408         * Adds a given new value for <b>context</b> ()
2409         *
2410         * <p>
2411         * <b>Definition:</b>
2412         * Identifies the types of resource or data type elements to which the extension can be applied
2413         * </p>
2414         * @param theValue The context to add (must not be <code>null</code>)
2415         */
2416        public StructureDefinition addContext(StringDt theValue) {
2417                if (theValue == null) {
2418                        throw new NullPointerException("theValue must not be null");
2419                }
2420                getContext().add(theValue);
2421                return this;
2422        }
2423
2424        /**
2425         * Gets the first repetition for <b>context</b> (),
2426         * creating it if it does not already exist.
2427         *
2428     * <p>
2429     * <b>Definition:</b>
2430     * Identifies the types of resource or data type elements to which the extension can be applied
2431     * </p> 
2432         */
2433        public StringDt getContextFirstRep() {
2434                if (getContext().isEmpty()) {
2435                        return addContext();
2436                }
2437                return getContext().get(0); 
2438        }
2439        /**
2440         * Adds a new value for <b>context</b> ()
2441         *
2442     * <p>
2443     * <b>Definition:</b>
2444     * Identifies the types of resource or data type elements to which the extension can be applied
2445     * </p> 
2446     *
2447     * @return Returns a reference to this object, to allow for simple chaining.
2448         */
2449        public StructureDefinition addContext( String theString) {
2450                if (myContext == null) {
2451                        myContext = new java.util.ArrayList<StringDt>();
2452                }
2453                myContext.add(new StringDt(theString));
2454                return this; 
2455        }
2456
2457 
2458        /**
2459         * Gets the value(s) for <b>base</b> ().
2460         * creating it if it does
2461         * not exist. Will not return <code>null</code>.
2462         *
2463     * <p>
2464     * <b>Definition:</b>
2465     * An absolute URI that is the base structure from which this set of constraints is derived
2466     * </p> 
2467         */
2468        public UriDt getBaseElement() {  
2469                if (myBase == null) {
2470                        myBase = new UriDt();
2471                }
2472                return myBase;
2473        }
2474
2475        
2476        /**
2477         * Gets the value(s) for <b>base</b> ().
2478         * creating it if it does
2479         * not exist. This method may return <code>null</code>.
2480         *
2481     * <p>
2482     * <b>Definition:</b>
2483     * An absolute URI that is the base structure from which this set of constraints is derived
2484     * </p> 
2485         */
2486        public String getBase() {  
2487                return getBaseElement().getValue();
2488        }
2489
2490        /**
2491         * Sets the value(s) for <b>base</b> ()
2492         *
2493     * <p>
2494     * <b>Definition:</b>
2495     * An absolute URI that is the base structure from which this set of constraints is derived
2496     * </p> 
2497         */
2498        public StructureDefinition setBase(UriDt theValue) {
2499                myBase = theValue;
2500                return this;
2501        }
2502        
2503        
2504
2505        /**
2506         * Sets the value for <b>base</b> ()
2507         *
2508     * <p>
2509     * <b>Definition:</b>
2510     * An absolute URI that is the base structure from which this set of constraints is derived
2511     * </p> 
2512         */
2513        public StructureDefinition setBase( String theUri) {
2514                myBase = new UriDt(theUri); 
2515                return this; 
2516        }
2517
2518 
2519        /**
2520         * Gets the value(s) for <b>snapshot</b> ().
2521         * creating it if it does
2522         * not exist. Will not return <code>null</code>.
2523         *
2524     * <p>
2525     * <b>Definition:</b>
2526     * A snapshot view is expressed in a stand alone form that can be used and interpreted without considering the base StructureDefinition
2527     * </p> 
2528         */
2529        public Snapshot getSnapshot() {  
2530                if (mySnapshot == null) {
2531                        mySnapshot = new Snapshot();
2532                }
2533                return mySnapshot;
2534        }
2535
2536        /**
2537         * Sets the value(s) for <b>snapshot</b> ()
2538         *
2539     * <p>
2540     * <b>Definition:</b>
2541     * A snapshot view is expressed in a stand alone form that can be used and interpreted without considering the base StructureDefinition
2542     * </p> 
2543         */
2544        public StructureDefinition setSnapshot(Snapshot theValue) {
2545                mySnapshot = theValue;
2546                return this;
2547        }
2548        
2549        
2550
2551  
2552        /**
2553         * Gets the value(s) for <b>differential</b> ().
2554         * creating it if it does
2555         * not exist. Will not return <code>null</code>.
2556         *
2557     * <p>
2558     * <b>Definition:</b>
2559     * A differential view is expressed relative to the base StructureDefinition - a statement of differences that it applies
2560     * </p> 
2561         */
2562        public Differential getDifferential() {  
2563                if (myDifferential == null) {
2564                        myDifferential = new Differential();
2565                }
2566                return myDifferential;
2567        }
2568
2569        /**
2570         * Sets the value(s) for <b>differential</b> ()
2571         *
2572     * <p>
2573     * <b>Definition:</b>
2574     * A differential view is expressed relative to the base StructureDefinition - a statement of differences that it applies
2575     * </p> 
2576         */
2577        public StructureDefinition setDifferential(Differential theValue) {
2578                myDifferential = theValue;
2579                return this;
2580        }
2581        
2582        
2583
2584  
2585        /**
2586         * Block class for child element: <b>StructureDefinition.contact</b> ()
2587         *
2588     * <p>
2589     * <b>Definition:</b>
2590     * Contacts to assist a user in finding and communicating with the publisher
2591     * </p> 
2592         */
2593        @Block()        
2594        public static class Contact 
2595            extends  BaseIdentifiableElement  
2596            implements IResourceBlock {
2597        
2598        @Child(name="name", type=StringDt.class, order=0, min=0, max=1, summary=true, modifier=false)   
2599        @Description(
2600                shortDefinition="",
2601                formalDefinition="The name of an individual to contact regarding the structure definition"
2602        )
2603        private StringDt myName;
2604        
2605        @Child(name="telecom", type=ContactPointDt.class, order=1, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)        
2606        @Description(
2607                shortDefinition="",
2608                formalDefinition="Contact details for individual (if a name was provided) or the publisher"
2609        )
2610        private java.util.List<ContactPointDt> myTelecom;
2611        
2612
2613        @Override
2614        public boolean isEmpty() {
2615                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myName,  myTelecom);
2616        }
2617        
2618        @Override
2619        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
2620                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myName, myTelecom);
2621        }
2622
2623        /**
2624         * Gets the value(s) for <b>name</b> ().
2625         * creating it if it does
2626         * not exist. Will not return <code>null</code>.
2627         *
2628     * <p>
2629     * <b>Definition:</b>
2630     * The name of an individual to contact regarding the structure definition
2631     * </p> 
2632         */
2633        public StringDt getNameElement() {  
2634                if (myName == null) {
2635                        myName = new StringDt();
2636                }
2637                return myName;
2638        }
2639
2640        
2641        /**
2642         * Gets the value(s) for <b>name</b> ().
2643         * creating it if it does
2644         * not exist. This method may return <code>null</code>.
2645         *
2646     * <p>
2647     * <b>Definition:</b>
2648     * The name of an individual to contact regarding the structure definition
2649     * </p> 
2650         */
2651        public String getName() {  
2652                return getNameElement().getValue();
2653        }
2654
2655        /**
2656         * Sets the value(s) for <b>name</b> ()
2657         *
2658     * <p>
2659     * <b>Definition:</b>
2660     * The name of an individual to contact regarding the structure definition
2661     * </p> 
2662         */
2663        public Contact setName(StringDt theValue) {
2664                myName = theValue;
2665                return this;
2666        }
2667        
2668        
2669
2670        /**
2671         * Sets the value for <b>name</b> ()
2672         *
2673     * <p>
2674     * <b>Definition:</b>
2675     * The name of an individual to contact regarding the structure definition
2676     * </p> 
2677         */
2678        public Contact setName( String theString) {
2679                myName = new StringDt(theString); 
2680                return this; 
2681        }
2682
2683 
2684        /**
2685         * Gets the value(s) for <b>telecom</b> ().
2686         * creating it if it does
2687         * not exist. Will not return <code>null</code>.
2688         *
2689     * <p>
2690     * <b>Definition:</b>
2691     * Contact details for individual (if a name was provided) or the publisher
2692     * </p> 
2693         */
2694        public java.util.List<ContactPointDt> getTelecom() {  
2695                if (myTelecom == null) {
2696                        myTelecom = new java.util.ArrayList<ContactPointDt>();
2697                }
2698                return myTelecom;
2699        }
2700
2701        /**
2702         * Sets the value(s) for <b>telecom</b> ()
2703         *
2704     * <p>
2705     * <b>Definition:</b>
2706     * Contact details for individual (if a name was provided) or the publisher
2707     * </p> 
2708         */
2709        public Contact setTelecom(java.util.List<ContactPointDt> theValue) {
2710                myTelecom = theValue;
2711                return this;
2712        }
2713        
2714        
2715
2716        /**
2717         * Adds and returns a new value for <b>telecom</b> ()
2718         *
2719     * <p>
2720     * <b>Definition:</b>
2721     * Contact details for individual (if a name was provided) or the publisher
2722     * </p> 
2723         */
2724        public ContactPointDt addTelecom() {
2725                ContactPointDt newType = new ContactPointDt();
2726                getTelecom().add(newType);
2727                return newType; 
2728        }
2729
2730        /**
2731         * Adds a given new value for <b>telecom</b> ()
2732         *
2733         * <p>
2734         * <b>Definition:</b>
2735         * Contact details for individual (if a name was provided) or the publisher
2736         * </p>
2737         * @param theValue The telecom to add (must not be <code>null</code>)
2738         */
2739        public Contact addTelecom(ContactPointDt theValue) {
2740                if (theValue == null) {
2741                        throw new NullPointerException("theValue must not be null");
2742                }
2743                getTelecom().add(theValue);
2744                return this;
2745        }
2746
2747        /**
2748         * Gets the first repetition for <b>telecom</b> (),
2749         * creating it if it does not already exist.
2750         *
2751     * <p>
2752     * <b>Definition:</b>
2753     * Contact details for individual (if a name was provided) or the publisher
2754     * </p> 
2755         */
2756        public ContactPointDt getTelecomFirstRep() {
2757                if (getTelecom().isEmpty()) {
2758                        return addTelecom();
2759                }
2760                return getTelecom().get(0); 
2761        }
2762  
2763
2764
2765        }
2766
2767
2768        /**
2769         * Block class for child element: <b>StructureDefinition.mapping</b> ()
2770         *
2771     * <p>
2772     * <b>Definition:</b>
2773     * An external specification that the content is mapped to
2774     * </p> 
2775         */
2776        @Block()        
2777        public static class Mapping 
2778            extends  BaseIdentifiableElement  
2779            implements IResourceBlock {
2780        
2781        @Child(name="identity", type=IdDt.class, order=0, min=1, max=1, summary=false, modifier=false)  
2782        @Description(
2783                shortDefinition="",
2784                formalDefinition="An Internal id that is used to identify this mapping set when specific mappings are made"
2785        )
2786        private IdDt myIdentity;
2787        
2788        @Child(name="uri", type=UriDt.class, order=1, min=0, max=1, summary=false, modifier=false)      
2789        @Description(
2790                shortDefinition="",
2791                formalDefinition="An absolute URI that identifies the specification that this mapping is expressed to"
2792        )
2793        private UriDt myUri;
2794        
2795        @Child(name="name", type=StringDt.class, order=2, min=0, max=1, summary=false, modifier=false)  
2796        @Description(
2797                shortDefinition="",
2798                formalDefinition="A name for the specification that is being mapped to"
2799        )
2800        private StringDt myName;
2801        
2802        @Child(name="comments", type=StringDt.class, order=3, min=0, max=1, summary=false, modifier=false)      
2803        @Description(
2804                shortDefinition="",
2805                formalDefinition="Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage"
2806        )
2807        private StringDt myComments;
2808        
2809
2810        @Override
2811        public boolean isEmpty() {
2812                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myIdentity,  myUri,  myName,  myComments);
2813        }
2814        
2815        @Override
2816        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
2817                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentity, myUri, myName, myComments);
2818        }
2819
2820        /**
2821         * Gets the value(s) for <b>identity</b> ().
2822         * creating it if it does
2823         * not exist. Will not return <code>null</code>.
2824         *
2825     * <p>
2826     * <b>Definition:</b>
2827     * An Internal id that is used to identify this mapping set when specific mappings are made
2828     * </p> 
2829         */
2830        public IdDt getIdentityElement() {  
2831                if (myIdentity == null) {
2832                        myIdentity = new IdDt();
2833                }
2834                return myIdentity;
2835        }
2836
2837        
2838        /**
2839         * Gets the value(s) for <b>identity</b> ().
2840         * creating it if it does
2841         * not exist. This method may return <code>null</code>.
2842         *
2843     * <p>
2844     * <b>Definition:</b>
2845     * An Internal id that is used to identify this mapping set when specific mappings are made
2846     * </p> 
2847         */
2848        public String getIdentity() {  
2849                return getIdentityElement().getValue();
2850        }
2851
2852        /**
2853         * Sets the value(s) for <b>identity</b> ()
2854         *
2855     * <p>
2856     * <b>Definition:</b>
2857     * An Internal id that is used to identify this mapping set when specific mappings are made
2858     * </p> 
2859         */
2860        public Mapping setIdentity(IdDt theValue) {
2861                myIdentity = theValue;
2862                return this;
2863        }
2864        
2865        
2866
2867        /**
2868         * Sets the value for <b>identity</b> ()
2869         *
2870     * <p>
2871     * <b>Definition:</b>
2872     * An Internal id that is used to identify this mapping set when specific mappings are made
2873     * </p> 
2874         */
2875        public Mapping setIdentity( String theId) {
2876                myIdentity = new IdDt(theId); 
2877                return this; 
2878        }
2879
2880 
2881        /**
2882         * Gets the value(s) for <b>uri</b> ().
2883         * creating it if it does
2884         * not exist. Will not return <code>null</code>.
2885         *
2886     * <p>
2887     * <b>Definition:</b>
2888     * An absolute URI that identifies the specification that this mapping is expressed to
2889     * </p> 
2890         */
2891        public UriDt getUriElement() {  
2892                if (myUri == null) {
2893                        myUri = new UriDt();
2894                }
2895                return myUri;
2896        }
2897
2898        
2899        /**
2900         * Gets the value(s) for <b>uri</b> ().
2901         * creating it if it does
2902         * not exist. This method may return <code>null</code>.
2903         *
2904     * <p>
2905     * <b>Definition:</b>
2906     * An absolute URI that identifies the specification that this mapping is expressed to
2907     * </p> 
2908         */
2909        public String getUri() {  
2910                return getUriElement().getValue();
2911        }
2912
2913        /**
2914         * Sets the value(s) for <b>uri</b> ()
2915         *
2916     * <p>
2917     * <b>Definition:</b>
2918     * An absolute URI that identifies the specification that this mapping is expressed to
2919     * </p> 
2920         */
2921        public Mapping setUri(UriDt theValue) {
2922                myUri = theValue;
2923                return this;
2924        }
2925        
2926        
2927
2928        /**
2929         * Sets the value for <b>uri</b> ()
2930         *
2931     * <p>
2932     * <b>Definition:</b>
2933     * An absolute URI that identifies the specification that this mapping is expressed to
2934     * </p> 
2935         */
2936        public Mapping setUri( String theUri) {
2937                myUri = new UriDt(theUri); 
2938                return this; 
2939        }
2940
2941 
2942        /**
2943         * Gets the value(s) for <b>name</b> ().
2944         * creating it if it does
2945         * not exist. Will not return <code>null</code>.
2946         *
2947     * <p>
2948     * <b>Definition:</b>
2949     * A name for the specification that is being mapped to
2950     * </p> 
2951         */
2952        public StringDt getNameElement() {  
2953                if (myName == null) {
2954                        myName = new StringDt();
2955                }
2956                return myName;
2957        }
2958
2959        
2960        /**
2961         * Gets the value(s) for <b>name</b> ().
2962         * creating it if it does
2963         * not exist. This method may return <code>null</code>.
2964         *
2965     * <p>
2966     * <b>Definition:</b>
2967     * A name for the specification that is being mapped to
2968     * </p> 
2969         */
2970        public String getName() {  
2971                return getNameElement().getValue();
2972        }
2973
2974        /**
2975         * Sets the value(s) for <b>name</b> ()
2976         *
2977     * <p>
2978     * <b>Definition:</b>
2979     * A name for the specification that is being mapped to
2980     * </p> 
2981         */
2982        public Mapping setName(StringDt theValue) {
2983                myName = theValue;
2984                return this;
2985        }
2986        
2987        
2988
2989        /**
2990         * Sets the value for <b>name</b> ()
2991         *
2992     * <p>
2993     * <b>Definition:</b>
2994     * A name for the specification that is being mapped to
2995     * </p> 
2996         */
2997        public Mapping setName( String theString) {
2998                myName = new StringDt(theString); 
2999                return this; 
3000        }
3001
3002 
3003        /**
3004         * Gets the value(s) for <b>comments</b> ().
3005         * creating it if it does
3006         * not exist. Will not return <code>null</code>.
3007         *
3008     * <p>
3009     * <b>Definition:</b>
3010     * Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage
3011     * </p> 
3012         */
3013        public StringDt getCommentsElement() {  
3014                if (myComments == null) {
3015                        myComments = new StringDt();
3016                }
3017                return myComments;
3018        }
3019
3020        
3021        /**
3022         * Gets the value(s) for <b>comments</b> ().
3023         * creating it if it does
3024         * not exist. This method may return <code>null</code>.
3025         *
3026     * <p>
3027     * <b>Definition:</b>
3028     * Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage
3029     * </p> 
3030         */
3031        public String getComments() {  
3032                return getCommentsElement().getValue();
3033        }
3034
3035        /**
3036         * Sets the value(s) for <b>comments</b> ()
3037         *
3038     * <p>
3039     * <b>Definition:</b>
3040     * Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage
3041     * </p> 
3042         */
3043        public Mapping setComments(StringDt theValue) {
3044                myComments = theValue;
3045                return this;
3046        }
3047        
3048        
3049
3050        /**
3051         * Sets the value for <b>comments</b> ()
3052         *
3053     * <p>
3054     * <b>Definition:</b>
3055     * Comments about this mapping, including version notes, issues, scope limitations, and other important notes for usage
3056     * </p> 
3057         */
3058        public Mapping setComments( String theString) {
3059                myComments = new StringDt(theString); 
3060                return this; 
3061        }
3062
3063 
3064
3065
3066        }
3067
3068
3069        /**
3070         * Block class for child element: <b>StructureDefinition.snapshot</b> ()
3071         *
3072     * <p>
3073     * <b>Definition:</b>
3074     * A snapshot view is expressed in a stand alone form that can be used and interpreted without considering the base StructureDefinition
3075     * </p> 
3076         */
3077        @Block()        
3078        public static class Snapshot 
3079            extends  BaseIdentifiableElement  
3080            implements IResourceBlock {
3081        
3082        @Child(name="element", type=ElementDefinitionDt.class, order=0, min=1, max=Child.MAX_UNLIMITED, summary=false, modifier=false)  
3083        @Description(
3084                shortDefinition="",
3085                formalDefinition="Captures constraints on each element within the resource"
3086        )
3087        private java.util.List<ElementDefinitionDt> myElement;
3088        
3089
3090        @Override
3091        public boolean isEmpty() {
3092                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myElement);
3093        }
3094        
3095        @Override
3096        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
3097                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myElement);
3098        }
3099
3100        /**
3101         * Gets the value(s) for <b>element</b> ().
3102         * creating it if it does
3103         * not exist. Will not return <code>null</code>.
3104         *
3105     * <p>
3106     * <b>Definition:</b>
3107     * Captures constraints on each element within the resource
3108     * </p> 
3109         */
3110        public java.util.List<ElementDefinitionDt> getElement() {  
3111                if (myElement == null) {
3112                        myElement = new java.util.ArrayList<ElementDefinitionDt>();
3113                }
3114                return myElement;
3115        }
3116
3117        /**
3118         * Sets the value(s) for <b>element</b> ()
3119         *
3120     * <p>
3121     * <b>Definition:</b>
3122     * Captures constraints on each element within the resource
3123     * </p> 
3124         */
3125        public Snapshot setElement(java.util.List<ElementDefinitionDt> theValue) {
3126                myElement = theValue;
3127                return this;
3128        }
3129        
3130        
3131
3132        /**
3133         * Adds and returns a new value for <b>element</b> ()
3134         *
3135     * <p>
3136     * <b>Definition:</b>
3137     * Captures constraints on each element within the resource
3138     * </p> 
3139         */
3140        public ElementDefinitionDt addElement() {
3141                ElementDefinitionDt newType = new ElementDefinitionDt();
3142                getElement().add(newType);
3143                return newType; 
3144        }
3145
3146        /**
3147         * Adds a given new value for <b>element</b> ()
3148         *
3149         * <p>
3150         * <b>Definition:</b>
3151         * Captures constraints on each element within the resource
3152         * </p>
3153         * @param theValue The element to add (must not be <code>null</code>)
3154         */
3155        public Snapshot addElement(ElementDefinitionDt theValue) {
3156                if (theValue == null) {
3157                        throw new NullPointerException("theValue must not be null");
3158                }
3159                getElement().add(theValue);
3160                return this;
3161        }
3162
3163        /**
3164         * Gets the first repetition for <b>element</b> (),
3165         * creating it if it does not already exist.
3166         *
3167     * <p>
3168     * <b>Definition:</b>
3169     * Captures constraints on each element within the resource
3170     * </p> 
3171         */
3172        public ElementDefinitionDt getElementFirstRep() {
3173                if (getElement().isEmpty()) {
3174                        return addElement();
3175                }
3176                return getElement().get(0); 
3177        }
3178  
3179
3180
3181        }
3182
3183
3184        /**
3185         * Block class for child element: <b>StructureDefinition.differential</b> ()
3186         *
3187     * <p>
3188     * <b>Definition:</b>
3189     * A differential view is expressed relative to the base StructureDefinition - a statement of differences that it applies
3190     * </p> 
3191         */
3192        @Block()        
3193        public static class Differential 
3194            extends  BaseIdentifiableElement  
3195            implements IResourceBlock {
3196        
3197        @Child(name="element", type=ElementDefinitionDt.class, order=0, min=1, max=Child.MAX_UNLIMITED, summary=false, modifier=false)  
3198        @Description(
3199                shortDefinition="",
3200                formalDefinition="Captures constraints on each element within the resource"
3201        )
3202        private java.util.List<ElementDefinitionDt> myElement;
3203        
3204
3205        @Override
3206        public boolean isEmpty() {
3207                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myElement);
3208        }
3209        
3210        @Override
3211        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
3212                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myElement);
3213        }
3214
3215        /**
3216         * Gets the value(s) for <b>element</b> ().
3217         * creating it if it does
3218         * not exist. Will not return <code>null</code>.
3219         *
3220     * <p>
3221     * <b>Definition:</b>
3222     * Captures constraints on each element within the resource
3223     * </p> 
3224         */
3225        public java.util.List<ElementDefinitionDt> getElement() {  
3226                if (myElement == null) {
3227                        myElement = new java.util.ArrayList<ElementDefinitionDt>();
3228                }
3229                return myElement;
3230        }
3231
3232        /**
3233         * Sets the value(s) for <b>element</b> ()
3234         *
3235     * <p>
3236     * <b>Definition:</b>
3237     * Captures constraints on each element within the resource
3238     * </p> 
3239         */
3240        public Differential setElement(java.util.List<ElementDefinitionDt> theValue) {
3241                myElement = theValue;
3242                return this;
3243        }
3244        
3245        
3246
3247        /**
3248         * Adds and returns a new value for <b>element</b> ()
3249         *
3250     * <p>
3251     * <b>Definition:</b>
3252     * Captures constraints on each element within the resource
3253     * </p> 
3254         */
3255        public ElementDefinitionDt addElement() {
3256                ElementDefinitionDt newType = new ElementDefinitionDt();
3257                getElement().add(newType);
3258                return newType; 
3259        }
3260
3261        /**
3262         * Adds a given new value for <b>element</b> ()
3263         *
3264         * <p>
3265         * <b>Definition:</b>
3266         * Captures constraints on each element within the resource
3267         * </p>
3268         * @param theValue The element to add (must not be <code>null</code>)
3269         */
3270        public Differential addElement(ElementDefinitionDt theValue) {
3271                if (theValue == null) {
3272                        throw new NullPointerException("theValue must not be null");
3273                }
3274                getElement().add(theValue);
3275                return this;
3276        }
3277
3278        /**
3279         * Gets the first repetition for <b>element</b> (),
3280         * creating it if it does not already exist.
3281         *
3282     * <p>
3283     * <b>Definition:</b>
3284     * Captures constraints on each element within the resource
3285     * </p> 
3286         */
3287        public ElementDefinitionDt getElementFirstRep() {
3288                if (getElement().isEmpty()) {
3289                        return addElement();
3290                }
3291                return getElement().get(0); 
3292        }
3293  
3294
3295
3296        }
3297
3298
3299
3300
3301    @Override
3302    public String getResourceName() {
3303        return "StructureDefinition";
3304    }
3305    
3306    public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum() {
3307        return ca.uhn.fhir.context.FhirVersionEnum.DSTU2;
3308    }
3309
3310
3311}