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.valueset.AnimalSpeciesEnum;
042import ca.uhn.fhir.model.dstu2.composite.AnnotationDt;
043import ca.uhn.fhir.model.dstu2.valueset.AnswerFormatEnum;
044import ca.uhn.fhir.model.dstu2.resource.Appointment;
045import ca.uhn.fhir.model.dstu2.valueset.AppointmentStatusEnum;
046import ca.uhn.fhir.model.dstu2.valueset.AssertionDirectionTypeEnum;
047import ca.uhn.fhir.model.dstu2.valueset.AssertionOperatorTypeEnum;
048import ca.uhn.fhir.model.dstu2.valueset.AssertionResponseTypesEnum;
049import ca.uhn.fhir.model.dstu2.composite.AttachmentDt;
050import ca.uhn.fhir.model.dstu2.valueset.AuditEventActionEnum;
051import ca.uhn.fhir.model.dstu2.valueset.AuditEventObjectLifecycleEnum;
052import ca.uhn.fhir.model.dstu2.valueset.AuditEventObjectRoleEnum;
053import ca.uhn.fhir.model.dstu2.valueset.AuditEventObjectTypeEnum;
054import ca.uhn.fhir.model.dstu2.valueset.AuditEventOutcomeEnum;
055import ca.uhn.fhir.model.dstu2.valueset.AuditEventParticipantNetworkTypeEnum;
056import ca.uhn.fhir.model.dstu2.valueset.AuditEventSourceTypeEnum;
057import ca.uhn.fhir.model.dstu2.valueset.BindingStrengthEnum;
058import ca.uhn.fhir.model.dstu2.resource.BodySite;
059import ca.uhn.fhir.model.dstu2.valueset.BundleTypeEnum;
060import ca.uhn.fhir.model.dstu2.resource.CarePlan;
061import ca.uhn.fhir.model.dstu2.valueset.CarePlanActivityCategoryEnum;
062import ca.uhn.fhir.model.dstu2.valueset.CarePlanActivityStatusEnum;
063import ca.uhn.fhir.model.dstu2.valueset.CarePlanRelationshipEnum;
064import ca.uhn.fhir.model.dstu2.valueset.CarePlanStatusEnum;
065import ca.uhn.fhir.model.dstu2.resource.Claim;
066import ca.uhn.fhir.model.dstu2.resource.ClaimResponse;
067import ca.uhn.fhir.model.dstu2.valueset.ClaimTypeEnum;
068import ca.uhn.fhir.model.dstu2.resource.ClinicalImpression;
069import ca.uhn.fhir.model.dstu2.valueset.ClinicalImpressionStatusEnum;
070import ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt;
071import ca.uhn.fhir.model.dstu2.composite.CodingDt;
072import ca.uhn.fhir.model.dstu2.resource.CommunicationRequest;
073import ca.uhn.fhir.model.dstu2.valueset.CommunicationRequestStatusEnum;
074import ca.uhn.fhir.model.dstu2.valueset.CommunicationStatusEnum;
075import ca.uhn.fhir.model.dstu2.resource.Composition;
076import ca.uhn.fhir.model.dstu2.valueset.CompositionAttestationModeEnum;
077import ca.uhn.fhir.model.dstu2.valueset.CompositionStatusEnum;
078import ca.uhn.fhir.model.dstu2.valueset.ConceptMapEquivalenceEnum;
079import ca.uhn.fhir.model.dstu2.resource.Condition;
080import ca.uhn.fhir.model.dstu2.valueset.ConditionCategoryCodesEnum;
081import ca.uhn.fhir.model.dstu2.valueset.ConditionClinicalStatusCodesEnum;
082import ca.uhn.fhir.model.dstu2.valueset.ConditionVerificationStatusEnum;
083import ca.uhn.fhir.model.dstu2.valueset.ConditionalDeleteStatusEnum;
084import ca.uhn.fhir.model.dstu2.valueset.ConditionsCodesEnum;
085import ca.uhn.fhir.model.dstu2.resource.Conformance;
086import ca.uhn.fhir.model.dstu2.valueset.ConformanceEventModeEnum;
087import ca.uhn.fhir.model.dstu2.valueset.ConformanceResourceStatusEnum;
088import ca.uhn.fhir.model.dstu2.valueset.ConformanceStatementKindEnum;
089import ca.uhn.fhir.model.dstu2.composite.ContactPointDt;
090import ca.uhn.fhir.model.dstu2.valueset.ContentTypeEnum;
091import ca.uhn.fhir.model.dstu2.resource.Contract;
092import ca.uhn.fhir.model.dstu2.valueset.ContractActionCodesEnum;
093import ca.uhn.fhir.model.dstu2.valueset.ContractActorRoleCodesEnum;
094import ca.uhn.fhir.model.dstu2.valueset.ContractSubtypeCodesEnum;
095import ca.uhn.fhir.model.dstu2.valueset.ContractTermTypeCodesEnum;
096import ca.uhn.fhir.model.dstu2.valueset.ContractTypeCodesEnum;
097import ca.uhn.fhir.model.dstu2.resource.Coverage;
098import ca.uhn.fhir.model.dstu2.valueset.DataElementStringencyEnum;
099import ca.uhn.fhir.model.dstu2.valueset.DaysOfWeekEnum;
100import ca.uhn.fhir.model.dstu2.valueset.DetectedIssueSeverityEnum;
101import ca.uhn.fhir.model.dstu2.resource.Device;
102import ca.uhn.fhir.model.dstu2.resource.DeviceComponent;
103import ca.uhn.fhir.model.dstu2.resource.DeviceMetric;
104import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricCalibrationStateEnum;
105import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricCalibrationTypeEnum;
106import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricCategoryEnum;
107import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricColorEnum;
108import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricOperationalStatusEnum;
109import ca.uhn.fhir.model.dstu2.valueset.DeviceStatusEnum;
110import ca.uhn.fhir.model.dstu2.resource.DeviceUseRequest;
111import ca.uhn.fhir.model.dstu2.valueset.DeviceUseRequestPriorityEnum;
112import ca.uhn.fhir.model.dstu2.valueset.DeviceUseRequestStatusEnum;
113import ca.uhn.fhir.model.dstu2.resource.DiagnosticOrder;
114import ca.uhn.fhir.model.dstu2.valueset.DiagnosticOrderPriorityEnum;
115import ca.uhn.fhir.model.dstu2.valueset.DiagnosticOrderStatusEnum;
116import ca.uhn.fhir.model.dstu2.resource.DiagnosticReport;
117import ca.uhn.fhir.model.dstu2.valueset.DiagnosticReportStatusEnum;
118import ca.uhn.fhir.model.dstu2.valueset.DigitalMediaTypeEnum;
119import ca.uhn.fhir.model.dstu2.valueset.DocumentModeEnum;
120import ca.uhn.fhir.model.dstu2.resource.DocumentReference;
121import ca.uhn.fhir.model.dstu2.valueset.DocumentReferenceStatusEnum;
122import ca.uhn.fhir.model.dstu2.valueset.DocumentRelationshipTypeEnum;
123import ca.uhn.fhir.model.dstu2.composite.ElementDefinitionDt;
124import ca.uhn.fhir.model.dstu2.resource.EligibilityRequest;
125import ca.uhn.fhir.model.dstu2.resource.Encounter;
126import ca.uhn.fhir.model.dstu2.valueset.EncounterClassEnum;
127import ca.uhn.fhir.model.dstu2.valueset.EncounterLocationStatusEnum;
128import ca.uhn.fhir.model.dstu2.valueset.EncounterStateEnum;
129import ca.uhn.fhir.model.dstu2.valueset.EncounterTypeEnum;
130import ca.uhn.fhir.model.dstu2.resource.EnrollmentRequest;
131import ca.uhn.fhir.model.dstu2.valueset.EnteralFormulaTypeCodesEnum;
132import ca.uhn.fhir.model.dstu2.resource.EpisodeOfCare;
133import ca.uhn.fhir.model.dstu2.valueset.EpisodeOfCareStatusEnum;
134import ca.uhn.fhir.model.dstu2.valueset.ExceptionCodesEnum;
135import ca.uhn.fhir.model.dstu2.valueset.ExtensionContextEnum;
136import ca.uhn.fhir.model.dstu2.valueset.FamilyHistoryStatusEnum;
137import ca.uhn.fhir.model.dstu2.resource.FamilyMemberHistory;
138import ca.uhn.fhir.model.dstu2.valueset.FilterOperatorEnum;
139import ca.uhn.fhir.model.dstu2.valueset.FlagCategoryCodesEnum;
140import ca.uhn.fhir.model.dstu2.valueset.FlagStatusEnum;
141import ca.uhn.fhir.model.dstu2.valueset.FluidConsistencyTypeCodesEnum;
142import ca.uhn.fhir.model.dstu2.resource.Goal;
143import ca.uhn.fhir.model.dstu2.valueset.GoalCategoryEnum;
144import ca.uhn.fhir.model.dstu2.valueset.GoalPriorityEnum;
145import ca.uhn.fhir.model.dstu2.valueset.GoalStartEventEnum;
146import ca.uhn.fhir.model.dstu2.valueset.GoalStatusEnum;
147import ca.uhn.fhir.model.dstu2.valueset.GoalStatusReasonEnum;
148import ca.uhn.fhir.model.dstu2.resource.Group;
149import ca.uhn.fhir.model.dstu2.valueset.GroupTypeEnum;
150import ca.uhn.fhir.model.dstu2.valueset.GuideDependencyTypeEnum;
151import ca.uhn.fhir.model.dstu2.valueset.GuidePageKindEnum;
152import ca.uhn.fhir.model.dstu2.valueset.GuideResourcePurposeEnum;
153import ca.uhn.fhir.model.dstu2.valueset.HTTPVerbEnum;
154import ca.uhn.fhir.model.dstu2.resource.HealthcareService;
155import ca.uhn.fhir.model.dstu2.composite.HumanNameDt;
156import ca.uhn.fhir.model.dstu2.composite.IdentifierDt;
157import ca.uhn.fhir.model.dstu2.valueset.IdentifierTypeCodesEnum;
158import ca.uhn.fhir.model.dstu2.valueset.IdentityAssuranceLevelEnum;
159import ca.uhn.fhir.model.dstu2.resource.ImagingObjectSelection;
160import ca.uhn.fhir.model.dstu2.resource.ImagingStudy;
161import ca.uhn.fhir.model.dstu2.resource.Immunization;
162import ca.uhn.fhir.model.dstu2.valueset.ImmunizationReasonCodesEnum;
163import ca.uhn.fhir.model.dstu2.valueset.ImmunizationRecommendationDateCriterionCodesEnum;
164import ca.uhn.fhir.model.dstu2.valueset.ImmunizationRecommendationStatusCodesEnum;
165import ca.uhn.fhir.model.dstu2.valueset.ImmunizationRouteCodesEnum;
166import ca.uhn.fhir.model.dstu2.valueset.InstanceAvailabilityEnum;
167import ca.uhn.fhir.model.dstu2.valueset.InterventionCodesEnum;
168import ca.uhn.fhir.model.dstu2.valueset.IssueSeverityEnum;
169import ca.uhn.fhir.model.dstu2.valueset.IssueTypeEnum;
170import ca.uhn.fhir.model.dstu2.valueset.KOStitleEnum;
171import ca.uhn.fhir.model.dstu2.valueset.LateralityEnum;
172import ca.uhn.fhir.model.dstu2.valueset.LinkTypeEnum;
173import ca.uhn.fhir.model.dstu2.valueset.ListModeEnum;
174import ca.uhn.fhir.model.dstu2.valueset.ListOrderCodesEnum;
175import ca.uhn.fhir.model.dstu2.valueset.ListStatusEnum;
176import ca.uhn.fhir.model.dstu2.resource.Location;
177import ca.uhn.fhir.model.dstu2.valueset.LocationModeEnum;
178import ca.uhn.fhir.model.dstu2.valueset.LocationStatusEnum;
179import ca.uhn.fhir.model.dstu2.valueset.LocationTypeEnum;
180import ca.uhn.fhir.model.dstu2.valueset.MaritalStatusCodesEnum;
181import ca.uhn.fhir.model.dstu2.valueset.MeasmntPrincipleEnum;
182import ca.uhn.fhir.model.dstu2.resource.Media;
183import ca.uhn.fhir.model.dstu2.resource.Medication;
184import ca.uhn.fhir.model.dstu2.valueset.MedicationAdministrationStatusEnum;
185import ca.uhn.fhir.model.dstu2.valueset.MedicationDispenseStatusEnum;
186import ca.uhn.fhir.model.dstu2.resource.MedicationOrder;
187import ca.uhn.fhir.model.dstu2.valueset.MedicationOrderStatusEnum;
188import ca.uhn.fhir.model.dstu2.resource.MedicationStatement;
189import ca.uhn.fhir.model.dstu2.valueset.MedicationStatementStatusEnum;
190import ca.uhn.fhir.model.dstu2.valueset.MessageEventEnum;
191import ca.uhn.fhir.model.dstu2.valueset.MessageSignificanceCategoryEnum;
192import ca.uhn.fhir.model.dstu2.valueset.MessageTransportEnum;
193import ca.uhn.fhir.model.dstu2.resource.NamingSystem;
194import ca.uhn.fhir.model.dstu2.valueset.NamingSystemIdentifierTypeEnum;
195import ca.uhn.fhir.model.dstu2.valueset.NamingSystemTypeEnum;
196import ca.uhn.fhir.model.dstu2.valueset.NoteTypeEnum;
197import ca.uhn.fhir.model.dstu2.valueset.NutrientModifierCodesEnum;
198import ca.uhn.fhir.model.dstu2.resource.NutritionOrder;
199import ca.uhn.fhir.model.dstu2.valueset.NutritionOrderStatusEnum;
200import ca.uhn.fhir.model.dstu2.resource.Observation;
201import ca.uhn.fhir.model.dstu2.valueset.ObservationCategoryCodesEnum;
202import ca.uhn.fhir.model.dstu2.valueset.ObservationRelationshipTypeEnum;
203import ca.uhn.fhir.model.dstu2.valueset.ObservationStatusEnum;
204import ca.uhn.fhir.model.dstu2.resource.OperationDefinition;
205import ca.uhn.fhir.model.dstu2.valueset.OperationKindEnum;
206import ca.uhn.fhir.model.dstu2.resource.OperationOutcome;
207import ca.uhn.fhir.model.dstu2.valueset.OperationParameterUseEnum;
208import ca.uhn.fhir.model.dstu2.resource.Order;
209import ca.uhn.fhir.model.dstu2.valueset.OrderStatusEnum;
210import ca.uhn.fhir.model.dstu2.resource.Organization;
211import ca.uhn.fhir.model.dstu2.valueset.OrganizationTypeEnum;
212import ca.uhn.fhir.model.dstu2.valueset.ParticipantRequiredEnum;
213import ca.uhn.fhir.model.dstu2.valueset.ParticipantStatusEnum;
214import ca.uhn.fhir.model.dstu2.valueset.ParticipantTypeEnum;
215import ca.uhn.fhir.model.dstu2.valueset.ParticipationStatusEnum;
216import ca.uhn.fhir.model.dstu2.resource.Patient;
217import ca.uhn.fhir.model.dstu2.valueset.PayeeTypeCodesEnum;
218import ca.uhn.fhir.model.dstu2.valueset.PaymentStatusCodesEnum;
219import ca.uhn.fhir.model.dstu2.valueset.PaymentTypeCodesEnum;
220import ca.uhn.fhir.model.dstu2.composite.PeriodDt;
221import ca.uhn.fhir.model.dstu2.resource.Person;
222import ca.uhn.fhir.model.dstu2.resource.Practitioner;
223import ca.uhn.fhir.model.dstu2.valueset.PractitionerRoleEnum;
224import ca.uhn.fhir.model.dstu2.valueset.PractitionerSpecialtyEnum;
225import ca.uhn.fhir.model.dstu2.valueset.PriorityCodesEnum;
226import ca.uhn.fhir.model.dstu2.resource.Procedure;
227import ca.uhn.fhir.model.dstu2.resource.ProcedureRequest;
228import ca.uhn.fhir.model.dstu2.valueset.ProcedureRequestPriorityEnum;
229import ca.uhn.fhir.model.dstu2.valueset.ProcedureRequestStatusEnum;
230import ca.uhn.fhir.model.dstu2.valueset.ProcedureStatusEnum;
231import ca.uhn.fhir.model.dstu2.resource.ProcessRequest;
232import ca.uhn.fhir.model.dstu2.valueset.ProvenanceEntityRoleEnum;
233import ca.uhn.fhir.model.dstu2.composite.QuantityDt;
234import ca.uhn.fhir.model.dstu2.resource.Questionnaire;
235import ca.uhn.fhir.model.dstu2.resource.QuestionnaireResponse;
236import ca.uhn.fhir.model.dstu2.valueset.QuestionnaireResponseStatusEnum;
237import ca.uhn.fhir.model.dstu2.valueset.QuestionnaireStatusEnum;
238import ca.uhn.fhir.model.dstu2.composite.RangeDt;
239import ca.uhn.fhir.model.dstu2.composite.RatioDt;
240import ca.uhn.fhir.model.dstu2.valueset.ReferralMethodEnum;
241import ca.uhn.fhir.model.dstu2.resource.ReferralRequest;
242import ca.uhn.fhir.model.dstu2.valueset.ReferralStatusEnum;
243import ca.uhn.fhir.model.dstu2.resource.RelatedPerson;
244import ca.uhn.fhir.model.dstu2.valueset.RemittanceOutcomeEnum;
245import ca.uhn.fhir.model.dstu2.valueset.ResourceTypeEnum;
246import ca.uhn.fhir.model.dstu2.valueset.ResourceVersionPolicyEnum;
247import ca.uhn.fhir.model.dstu2.valueset.ResponseTypeEnum;
248import ca.uhn.fhir.model.dstu2.valueset.RestfulConformanceModeEnum;
249import ca.uhn.fhir.model.dstu2.valueset.RestfulSecurityServiceEnum;
250import ca.uhn.fhir.model.dstu2.resource.RiskAssessment;
251import ca.uhn.fhir.model.dstu2.valueset.RulesetCodesEnum;
252import ca.uhn.fhir.model.dstu2.composite.SampledDataDt;
253import ca.uhn.fhir.model.dstu2.resource.Schedule;
254import ca.uhn.fhir.model.dstu2.valueset.SearchEntryModeEnum;
255import ca.uhn.fhir.model.dstu2.valueset.SearchModifierCodeEnum;
256import ca.uhn.fhir.model.dstu2.valueset.SearchParamTypeEnum;
257import ca.uhn.fhir.model.dstu2.valueset.ServiceProvisionConditionsEnum;
258import ca.uhn.fhir.model.dstu2.composite.SignatureDt;
259import ca.uhn.fhir.model.dstu2.resource.Slot;
260import ca.uhn.fhir.model.dstu2.valueset.SlotStatusEnum;
261import ca.uhn.fhir.model.dstu2.resource.Specimen;
262import ca.uhn.fhir.model.dstu2.valueset.SpecimenCollectionMethodEnum;
263import ca.uhn.fhir.model.dstu2.valueset.SpecimenStatusEnum;
264import ca.uhn.fhir.model.dstu2.resource.StructureDefinition;
265import ca.uhn.fhir.model.dstu2.valueset.StructureDefinitionKindEnum;
266import ca.uhn.fhir.model.dstu2.valueset.SubscriptionChannelTypeEnum;
267import ca.uhn.fhir.model.dstu2.valueset.SubscriptionStatusEnum;
268import ca.uhn.fhir.model.dstu2.valueset.SubscriptionTagEnum;
269import ca.uhn.fhir.model.dstu2.resource.Substance;
270import ca.uhn.fhir.model.dstu2.valueset.SubstanceCategoryCodesEnum;
271import ca.uhn.fhir.model.dstu2.valueset.SupplementTypeCodesEnum;
272import ca.uhn.fhir.model.dstu2.valueset.SupplyDeliveryStatusEnum;
273import ca.uhn.fhir.model.dstu2.resource.SupplyRequest;
274import ca.uhn.fhir.model.dstu2.valueset.SupplyRequestReasonEnum;
275import ca.uhn.fhir.model.dstu2.valueset.SupplyRequestStatusEnum;
276import ca.uhn.fhir.model.dstu2.valueset.SurfaceCodesEnum;
277import ca.uhn.fhir.model.dstu2.valueset.SystemRestfulInteractionEnum;
278import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
279import ca.uhn.fhir.model.dstu2.valueset.TextureModifiedFoodTypeCodesEnum;
280import ca.uhn.fhir.model.dstu2.valueset.TextureModifierCodesEnum;
281import ca.uhn.fhir.model.dstu2.composite.TimingDt;
282import ca.uhn.fhir.model.dstu2.valueset.TransactionModeEnum;
283import ca.uhn.fhir.model.dstu2.valueset.TypeRestfulInteractionEnum;
284import ca.uhn.fhir.model.dstu2.valueset.UDICodesEnum;
285import ca.uhn.fhir.model.dstu2.valueset.UnknownContentCodeEnum;
286import ca.uhn.fhir.model.dstu2.valueset.UseEnum;
287import ca.uhn.fhir.model.dstu2.resource.ValueSet;
288import ca.uhn.fhir.model.dstu2.valueset.VisionBaseEnum;
289import ca.uhn.fhir.model.dstu2.valueset.VisionEyesEnum;
290import ca.uhn.fhir.model.dstu2.resource.VisionPrescription;
291import ca.uhn.fhir.model.dstu2.valueset.XPathUsageTypeEnum;
292import ca.uhn.fhir.model.api.IResource;
293import ca.uhn.fhir.model.dstu2.composite.AgeDt;
294import ca.uhn.fhir.model.dstu2.composite.BoundCodeableConceptDt;
295import ca.uhn.fhir.model.dstu2.composite.DurationDt;
296import ca.uhn.fhir.model.dstu2.composite.MoneyDt;
297import ca.uhn.fhir.model.dstu2.composite.NarrativeDt;
298import ca.uhn.fhir.model.dstu2.composite.ResourceReferenceDt;
299import ca.uhn.fhir.model.dstu2.composite.SimpleQuantityDt;
300import ca.uhn.fhir.model.primitive.Base64BinaryDt;
301import ca.uhn.fhir.model.primitive.BooleanDt;
302import ca.uhn.fhir.model.primitive.BoundCodeDt;
303import ca.uhn.fhir.model.primitive.CodeDt;
304import ca.uhn.fhir.model.primitive.DateDt;
305import ca.uhn.fhir.model.primitive.DateTimeDt;
306import ca.uhn.fhir.model.primitive.DecimalDt;
307import ca.uhn.fhir.model.primitive.IdDt;
308import ca.uhn.fhir.model.primitive.InstantDt;
309import ca.uhn.fhir.model.primitive.IntegerDt;
310import ca.uhn.fhir.model.primitive.OidDt;
311import ca.uhn.fhir.model.primitive.PositiveIntDt;
312import ca.uhn.fhir.model.primitive.StringDt;
313import ca.uhn.fhir.model.primitive.TimeDt;
314import ca.uhn.fhir.model.primitive.UnsignedIntDt;
315import ca.uhn.fhir.model.primitive.UriDt;
316
317
318/**
319 * HAPI/FHIR <b>Subscription</b> Resource
320 * (infrastructure.exchange)
321 *
322 * <p>
323 * <b>Definition:</b>
324 * The subscription resource is used to define a push based subscription from a server to another system. Once a subscription is registered with the server, the server checks every resource that is created or updated, and if the resource matches the given criteria, it sends a message on the defined \"channel\" so that another system is able to take an appropriate action.
325 * </p> 
326 *
327 * <p>
328 * <b>Requirements:</b>
329 * 
330 * </p> 
331 *
332 * <p>
333 * <b>Profile Definition:</b>
334 * <a href="http://hl7.org/fhir/profiles/Subscription">http://hl7.org/fhir/profiles/Subscription</a> 
335 * </p>
336 *
337 */
338@ResourceDef(name="Subscription", profile="http://hl7.org/fhir/profiles/Subscription", id="subscription")
339public class Subscription extends ca.uhn.fhir.model.dstu2.resource.BaseResource
340    implements  IResource     {
341
342        /**
343         * Search parameter constant for <b>status</b>
344         * <p>
345         * Description: <b></b><br>
346         * Type: <b>token</b><br>
347         * Path: <b>Subscription.status</b><br>
348         * </p>
349         */
350        @SearchParamDefinition(name="status", path="Subscription.status", description="", type="token"  )
351        public static final String SP_STATUS = "status";
352
353        /**
354         * <b>Fluent Client</b> search parameter constant for <b>status</b>
355         * <p>
356         * Description: <b></b><br>
357         * Type: <b>token</b><br>
358         * Path: <b>Subscription.status</b><br>
359         * </p>
360         */
361        public static final TokenClientParam STATUS = new TokenClientParam(SP_STATUS);
362
363        /**
364         * Search parameter constant for <b>type</b>
365         * <p>
366         * Description: <b></b><br>
367         * Type: <b>token</b><br>
368         * Path: <b>Subscription.channel.type</b><br>
369         * </p>
370         */
371        @SearchParamDefinition(name="type", path="Subscription.channel.type", description="", type="token"  )
372        public static final String SP_TYPE = "type";
373
374        /**
375         * <b>Fluent Client</b> search parameter constant for <b>type</b>
376         * <p>
377         * Description: <b></b><br>
378         * Type: <b>token</b><br>
379         * Path: <b>Subscription.channel.type</b><br>
380         * </p>
381         */
382        public static final TokenClientParam TYPE = new TokenClientParam(SP_TYPE);
383
384        /**
385         * Search parameter constant for <b>url</b>
386         * <p>
387         * Description: <b></b><br>
388         * Type: <b>uri</b><br>
389         * Path: <b>Subscription.channel.endpoint</b><br>
390         * </p>
391         */
392        @SearchParamDefinition(name="url", path="Subscription.channel.endpoint", description="", type="uri"  )
393        public static final String SP_URL = "url";
394
395        /**
396         * <b>Fluent Client</b> search parameter constant for <b>url</b>
397         * <p>
398         * Description: <b></b><br>
399         * Type: <b>uri</b><br>
400         * Path: <b>Subscription.channel.endpoint</b><br>
401         * </p>
402         */
403        public static final UriClientParam URL = new UriClientParam(SP_URL);
404
405        /**
406         * Search parameter constant for <b>criteria</b>
407         * <p>
408         * Description: <b></b><br>
409         * Type: <b>string</b><br>
410         * Path: <b>Subscription.criteria</b><br>
411         * </p>
412         */
413        @SearchParamDefinition(name="criteria", path="Subscription.criteria", description="", type="string"  )
414        public static final String SP_CRITERIA = "criteria";
415
416        /**
417         * <b>Fluent Client</b> search parameter constant for <b>criteria</b>
418         * <p>
419         * Description: <b></b><br>
420         * Type: <b>string</b><br>
421         * Path: <b>Subscription.criteria</b><br>
422         * </p>
423         */
424        public static final StringClientParam CRITERIA = new StringClientParam(SP_CRITERIA);
425
426        /**
427         * Search parameter constant for <b>payload</b>
428         * <p>
429         * Description: <b></b><br>
430         * Type: <b>string</b><br>
431         * Path: <b>Subscription.channel.payload</b><br>
432         * </p>
433         */
434        @SearchParamDefinition(name="payload", path="Subscription.channel.payload", description="", type="string"  )
435        public static final String SP_PAYLOAD = "payload";
436
437        /**
438         * <b>Fluent Client</b> search parameter constant for <b>payload</b>
439         * <p>
440         * Description: <b></b><br>
441         * Type: <b>string</b><br>
442         * Path: <b>Subscription.channel.payload</b><br>
443         * </p>
444         */
445        public static final StringClientParam PAYLOAD = new StringClientParam(SP_PAYLOAD);
446
447        /**
448         * Search parameter constant for <b>contact</b>
449         * <p>
450         * Description: <b></b><br>
451         * Type: <b>token</b><br>
452         * Path: <b>Subscription.contact</b><br>
453         * </p>
454         */
455        @SearchParamDefinition(name="contact", path="Subscription.contact", description="", type="token"  )
456        public static final String SP_CONTACT = "contact";
457
458        /**
459         * <b>Fluent Client</b> search parameter constant for <b>contact</b>
460         * <p>
461         * Description: <b></b><br>
462         * Type: <b>token</b><br>
463         * Path: <b>Subscription.contact</b><br>
464         * </p>
465         */
466        public static final TokenClientParam CONTACT = new TokenClientParam(SP_CONTACT);
467
468        /**
469         * Search parameter constant for <b>tag</b>
470         * <p>
471         * Description: <b></b><br>
472         * Type: <b>token</b><br>
473         * Path: <b>Subscription.tag</b><br>
474         * </p>
475         */
476        @SearchParamDefinition(name="tag", path="Subscription.tag", description="", type="token"  )
477        public static final String SP_TAG = "tag";
478
479        /**
480         * <b>Fluent Client</b> search parameter constant for <b>tag</b>
481         * <p>
482         * Description: <b></b><br>
483         * Type: <b>token</b><br>
484         * Path: <b>Subscription.tag</b><br>
485         * </p>
486         */
487        public static final TokenClientParam TAG = new TokenClientParam(SP_TAG);
488
489
490
491        @Child(name="criteria", type=StringDt.class, order=0, min=1, max=1, summary=false, modifier=false)      
492        @Description(
493                shortDefinition="",
494                formalDefinition="The rules that the server should use to determine when to generate notifications for this subscription"
495        )
496        private StringDt myCriteria;
497        
498        @Child(name="contact", type=ContactPointDt.class, order=1, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)       
499        @Description(
500                shortDefinition="who.focus",
501                formalDefinition="Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting"
502        )
503        private java.util.List<ContactPointDt> myContact;
504        
505        @Child(name="reason", type=StringDt.class, order=2, min=1, max=1, summary=false, modifier=false)        
506        @Description(
507                shortDefinition="why",
508                formalDefinition="A description of why this subscription is defined"
509        )
510        private StringDt myReason;
511        
512        @Child(name="status", type=CodeDt.class, order=3, min=1, max=1, summary=false, modifier=true)   
513        @Description(
514                shortDefinition="status",
515                formalDefinition="The status of the subscription, which marks the server state for managing the subscription"
516        )
517        private BoundCodeDt<SubscriptionStatusEnum> myStatus;
518        
519        @Child(name="error", type=StringDt.class, order=4, min=0, max=1, summary=false, modifier=false) 
520        @Description(
521                shortDefinition="",
522                formalDefinition="A record of the last error that occurred when the server processed a notification"
523        )
524        private StringDt myError;
525        
526        @Child(name="channel", order=5, min=1, max=1, summary=false, modifier=false)    
527        @Description(
528                shortDefinition="",
529                formalDefinition="Details where to send notifications when resources are received that meet the criteria"
530        )
531        private Channel myChannel;
532        
533        @Child(name="end", type=InstantDt.class, order=6, min=0, max=1, summary=false, modifier=false)  
534        @Description(
535                shortDefinition="when.done",
536                formalDefinition="The time for the server to turn the subscription off"
537        )
538        private InstantDt myEnd;
539        
540        @Child(name="tag", type=CodingDt.class, order=7, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false) 
541        @Description(
542                shortDefinition="",
543                formalDefinition="A tag to add to any resource that matches the criteria, after the subscription is processed"
544        )
545        private java.util.List<CodingDt> myTag;
546        
547
548        @Override
549        public boolean isEmpty() {
550                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myCriteria,  myContact,  myReason,  myStatus,  myError,  myChannel,  myEnd,  myTag);
551        }
552        
553        @Override
554        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
555                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myCriteria, myContact, myReason, myStatus, myError, myChannel, myEnd, myTag);
556        }
557
558        /**
559         * Gets the value(s) for <b>criteria</b> ().
560         * creating it if it does
561         * not exist. Will not return <code>null</code>.
562         *
563     * <p>
564     * <b>Definition:</b>
565     * The rules that the server should use to determine when to generate notifications for this subscription
566     * </p> 
567         */
568        public StringDt getCriteriaElement() {  
569                if (myCriteria == null) {
570                        myCriteria = new StringDt();
571                }
572                return myCriteria;
573        }
574
575        
576        /**
577         * Gets the value(s) for <b>criteria</b> ().
578         * creating it if it does
579         * not exist. Will not return <code>null</code>.
580         *
581     * <p>
582     * <b>Definition:</b>
583     * The rules that the server should use to determine when to generate notifications for this subscription
584     * </p> 
585         */
586        public String getCriteria() {  
587                return getCriteriaElement().getValue();
588        }
589
590        /**
591         * Sets the value(s) for <b>criteria</b> ()
592         *
593     * <p>
594     * <b>Definition:</b>
595     * The rules that the server should use to determine when to generate notifications for this subscription
596     * </p> 
597         */
598        public Subscription setCriteria(StringDt theValue) {
599                myCriteria = theValue;
600                return this;
601        }
602        
603        
604
605        /**
606         * Sets the value for <b>criteria</b> ()
607         *
608     * <p>
609     * <b>Definition:</b>
610     * The rules that the server should use to determine when to generate notifications for this subscription
611     * </p> 
612         */
613        public Subscription setCriteria( String theString) {
614                myCriteria = new StringDt(theString); 
615                return this; 
616        }
617
618 
619        /**
620         * Gets the value(s) for <b>contact</b> (who.focus).
621         * creating it if it does
622         * not exist. Will not return <code>null</code>.
623         *
624     * <p>
625     * <b>Definition:</b>
626     * Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting
627     * </p> 
628         */
629        public java.util.List<ContactPointDt> getContact() {  
630                if (myContact == null) {
631                        myContact = new java.util.ArrayList<ContactPointDt>();
632                }
633                return myContact;
634        }
635
636        /**
637         * Sets the value(s) for <b>contact</b> (who.focus)
638         *
639     * <p>
640     * <b>Definition:</b>
641     * Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting
642     * </p> 
643         */
644        public Subscription setContact(java.util.List<ContactPointDt> theValue) {
645                myContact = theValue;
646                return this;
647        }
648        
649        
650
651        /**
652         * Adds and returns a new value for <b>contact</b> (who.focus)
653         *
654     * <p>
655     * <b>Definition:</b>
656     * Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting
657     * </p> 
658         */
659        public ContactPointDt addContact() {
660                ContactPointDt newType = new ContactPointDt();
661                getContact().add(newType);
662                return newType; 
663        }
664
665        /**
666         * Adds a given new value for <b>contact</b> (who.focus)
667         *
668         * <p>
669         * <b>Definition:</b>
670         * Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting
671         * </p>
672         * @param theValue The contact to add (must not be <code>null</code>)
673         */
674        public Subscription addContact(ContactPointDt theValue) {
675                if (theValue == null) {
676                        throw new NullPointerException("theValue must not be null");
677                }
678                getContact().add(theValue);
679                return this;
680        }
681
682        /**
683         * Gets the first repetition for <b>contact</b> (who.focus),
684         * creating it if it does not already exist.
685         *
686     * <p>
687     * <b>Definition:</b>
688     * Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting
689     * </p> 
690         */
691        public ContactPointDt getContactFirstRep() {
692                if (getContact().isEmpty()) {
693                        return addContact();
694                }
695                return getContact().get(0); 
696        }
697  
698        /**
699         * Gets the value(s) for <b>reason</b> (why).
700         * creating it if it does
701         * not exist. Will not return <code>null</code>.
702         *
703     * <p>
704     * <b>Definition:</b>
705     * A description of why this subscription is defined
706     * </p> 
707         */
708        public StringDt getReasonElement() {  
709                if (myReason == null) {
710                        myReason = new StringDt();
711                }
712                return myReason;
713        }
714
715        
716        /**
717         * Gets the value(s) for <b>reason</b> (why).
718         * creating it if it does
719         * not exist. Will not return <code>null</code>.
720         *
721     * <p>
722     * <b>Definition:</b>
723     * A description of why this subscription is defined
724     * </p> 
725         */
726        public String getReason() {  
727                return getReasonElement().getValue();
728        }
729
730        /**
731         * Sets the value(s) for <b>reason</b> (why)
732         *
733     * <p>
734     * <b>Definition:</b>
735     * A description of why this subscription is defined
736     * </p> 
737         */
738        public Subscription setReason(StringDt theValue) {
739                myReason = theValue;
740                return this;
741        }
742        
743        
744
745        /**
746         * Sets the value for <b>reason</b> (why)
747         *
748     * <p>
749     * <b>Definition:</b>
750     * A description of why this subscription is defined
751     * </p> 
752         */
753        public Subscription setReason( String theString) {
754                myReason = new StringDt(theString); 
755                return this; 
756        }
757
758 
759        /**
760         * Gets the value(s) for <b>status</b> (status).
761         * creating it if it does
762         * not exist. Will not return <code>null</code>.
763         *
764     * <p>
765     * <b>Definition:</b>
766     * The status of the subscription, which marks the server state for managing the subscription
767     * </p> 
768         */
769        public BoundCodeDt<SubscriptionStatusEnum> getStatusElement() {  
770                if (myStatus == null) {
771                        myStatus = new BoundCodeDt<SubscriptionStatusEnum>(SubscriptionStatusEnum.VALUESET_BINDER);
772                }
773                return myStatus;
774        }
775
776        
777        /**
778         * Gets the value(s) for <b>status</b> (status).
779         * creating it if it does
780         * not exist. Will not return <code>null</code>.
781         *
782     * <p>
783     * <b>Definition:</b>
784     * The status of the subscription, which marks the server state for managing the subscription
785     * </p> 
786         */
787        public String getStatus() {  
788                return getStatusElement().getValue();
789        }
790
791        /**
792         * Sets the value(s) for <b>status</b> (status)
793         *
794     * <p>
795     * <b>Definition:</b>
796     * The status of the subscription, which marks the server state for managing the subscription
797     * </p> 
798         */
799        public Subscription setStatus(BoundCodeDt<SubscriptionStatusEnum> theValue) {
800                myStatus = theValue;
801                return this;
802        }
803        
804        
805
806        /**
807         * Sets the value(s) for <b>status</b> (status)
808         *
809     * <p>
810     * <b>Definition:</b>
811     * The status of the subscription, which marks the server state for managing the subscription
812     * </p> 
813         */
814        public Subscription setStatus(SubscriptionStatusEnum theValue) {
815                setStatus(new BoundCodeDt<SubscriptionStatusEnum>(SubscriptionStatusEnum.VALUESET_BINDER, theValue));
816                
817/*
818                getStatusElement().setValueAsEnum(theValue);
819*/
820                return this;
821        }
822
823  
824        /**
825         * Gets the value(s) for <b>error</b> ().
826         * creating it if it does
827         * not exist. Will not return <code>null</code>.
828         *
829     * <p>
830     * <b>Definition:</b>
831     * A record of the last error that occurred when the server processed a notification
832     * </p> 
833         */
834        public StringDt getErrorElement() {  
835                if (myError == null) {
836                        myError = new StringDt();
837                }
838                return myError;
839        }
840
841        
842        /**
843         * Gets the value(s) for <b>error</b> ().
844         * creating it if it does
845         * not exist. Will not return <code>null</code>.
846         *
847     * <p>
848     * <b>Definition:</b>
849     * A record of the last error that occurred when the server processed a notification
850     * </p> 
851         */
852        public String getError() {  
853                return getErrorElement().getValue();
854        }
855
856        /**
857         * Sets the value(s) for <b>error</b> ()
858         *
859     * <p>
860     * <b>Definition:</b>
861     * A record of the last error that occurred when the server processed a notification
862     * </p> 
863         */
864        public Subscription setError(StringDt theValue) {
865                myError = theValue;
866                return this;
867        }
868        
869        
870
871        /**
872         * Sets the value for <b>error</b> ()
873         *
874     * <p>
875     * <b>Definition:</b>
876     * A record of the last error that occurred when the server processed a notification
877     * </p> 
878         */
879        public Subscription setError( String theString) {
880                myError = new StringDt(theString); 
881                return this; 
882        }
883
884 
885        /**
886         * Gets the value(s) for <b>channel</b> ().
887         * creating it if it does
888         * not exist. Will not return <code>null</code>.
889         *
890     * <p>
891     * <b>Definition:</b>
892     * Details where to send notifications when resources are received that meet the criteria
893     * </p> 
894         */
895        public Channel getChannel() {  
896                if (myChannel == null) {
897                        myChannel = new Channel();
898                }
899                return myChannel;
900        }
901
902        /**
903         * Sets the value(s) for <b>channel</b> ()
904         *
905     * <p>
906     * <b>Definition:</b>
907     * Details where to send notifications when resources are received that meet the criteria
908     * </p> 
909         */
910        public Subscription setChannel(Channel theValue) {
911                myChannel = theValue;
912                return this;
913        }
914        
915        
916
917  
918        /**
919         * Gets the value(s) for <b>end</b> (when.done).
920         * creating it if it does
921         * not exist. Will not return <code>null</code>.
922         *
923     * <p>
924     * <b>Definition:</b>
925     * The time for the server to turn the subscription off
926     * </p> 
927         */
928        public InstantDt getEndElement() {  
929                if (myEnd == null) {
930                        myEnd = new InstantDt();
931                }
932                return myEnd;
933        }
934
935        
936        /**
937         * Gets the value(s) for <b>end</b> (when.done).
938         * creating it if it does
939         * not exist. Will not return <code>null</code>.
940         *
941     * <p>
942     * <b>Definition:</b>
943     * The time for the server to turn the subscription off
944     * </p> 
945         */
946        public Date getEnd() {  
947                return getEndElement().getValue();
948        }
949
950        /**
951         * Sets the value(s) for <b>end</b> (when.done)
952         *
953     * <p>
954     * <b>Definition:</b>
955     * The time for the server to turn the subscription off
956     * </p> 
957         */
958        public Subscription setEnd(InstantDt theValue) {
959                myEnd = theValue;
960                return this;
961        }
962        
963        
964
965        /**
966         * Sets the value for <b>end</b> (when.done)
967         *
968     * <p>
969     * <b>Definition:</b>
970     * The time for the server to turn the subscription off
971     * </p> 
972         */
973        public Subscription setEndWithMillisPrecision( Date theDate) {
974                myEnd = new InstantDt(theDate); 
975                return this; 
976        }
977
978        /**
979         * Sets the value for <b>end</b> (when.done)
980         *
981     * <p>
982     * <b>Definition:</b>
983     * The time for the server to turn the subscription off
984     * </p> 
985         */
986        public Subscription setEnd( Date theDate,  TemporalPrecisionEnum thePrecision) {
987                myEnd = new InstantDt(theDate, thePrecision); 
988                return this; 
989        }
990
991 
992        /**
993         * Gets the value(s) for <b>tag</b> ().
994         * creating it if it does
995         * not exist. Will not return <code>null</code>.
996         *
997     * <p>
998     * <b>Definition:</b>
999     * A tag to add to any resource that matches the criteria, after the subscription is processed
1000     * </p> 
1001         */
1002        public java.util.List<CodingDt> getTag() {  
1003                if (myTag == null) {
1004                        myTag = new java.util.ArrayList<CodingDt>();
1005                }
1006                return myTag;
1007        }
1008
1009        /**
1010         * Sets the value(s) for <b>tag</b> ()
1011         *
1012     * <p>
1013     * <b>Definition:</b>
1014     * A tag to add to any resource that matches the criteria, after the subscription is processed
1015     * </p> 
1016         */
1017        public Subscription setTag(java.util.List<CodingDt> theValue) {
1018                myTag = theValue;
1019                return this;
1020        }
1021        
1022        
1023
1024        /**
1025         * Adds and returns a new value for <b>tag</b> ()
1026         *
1027     * <p>
1028     * <b>Definition:</b>
1029     * A tag to add to any resource that matches the criteria, after the subscription is processed
1030     * </p> 
1031         */
1032        public CodingDt addTag() {
1033                CodingDt newType = new CodingDt();
1034                getTag().add(newType);
1035                return newType; 
1036        }
1037
1038        /**
1039         * Adds a given new value for <b>tag</b> ()
1040         *
1041         * <p>
1042         * <b>Definition:</b>
1043         * A tag to add to any resource that matches the criteria, after the subscription is processed
1044         * </p>
1045         * @param theValue The tag to add (must not be <code>null</code>)
1046         */
1047        public Subscription addTag(CodingDt theValue) {
1048                if (theValue == null) {
1049                        throw new NullPointerException("theValue must not be null");
1050                }
1051                getTag().add(theValue);
1052                return this;
1053        }
1054
1055        /**
1056         * Gets the first repetition for <b>tag</b> (),
1057         * creating it if it does not already exist.
1058         *
1059     * <p>
1060     * <b>Definition:</b>
1061     * A tag to add to any resource that matches the criteria, after the subscription is processed
1062     * </p> 
1063         */
1064        public CodingDt getTagFirstRep() {
1065                if (getTag().isEmpty()) {
1066                        return addTag();
1067                }
1068                return getTag().get(0); 
1069        }
1070  
1071        /**
1072         * Block class for child element: <b>Subscription.channel</b> ()
1073         *
1074     * <p>
1075     * <b>Definition:</b>
1076     * Details where to send notifications when resources are received that meet the criteria
1077     * </p> 
1078         */
1079        @Block()        
1080        public static class Channel 
1081            extends  BaseIdentifiableElement        implements IResourceBlock {
1082        
1083        @Child(name="type", type=CodeDt.class, order=0, min=1, max=1, summary=false, modifier=false)    
1084        @Description(
1085                shortDefinition="",
1086                formalDefinition="The type of channel to send notifications on"
1087        )
1088        private BoundCodeDt<SubscriptionChannelTypeEnum> myType;
1089        
1090        @Child(name="endpoint", type=UriDt.class, order=1, min=0, max=1, summary=false, modifier=false) 
1091        @Description(
1092                shortDefinition="",
1093                formalDefinition="The uri that describes the actual end-point to send messages to"
1094        )
1095        private UriDt myEndpoint;
1096        
1097        @Child(name="payload", type=StringDt.class, order=2, min=1, max=1, summary=false, modifier=false)       
1098        @Description(
1099                shortDefinition="",
1100                formalDefinition="The mime type to send the payload in - either application/xml+fhir, or application/json+fhir. If the mime type is blank, then there is no payload in the notification, just a notification"
1101        )
1102        private StringDt myPayload;
1103        
1104        @Child(name="header", type=StringDt.class, order=3, min=0, max=1, summary=false, modifier=false)        
1105        @Description(
1106                shortDefinition="",
1107                formalDefinition="Additional headers / information to send as part of the notification"
1108        )
1109        private StringDt myHeader;
1110        
1111
1112        @Override
1113        public boolean isEmpty() {
1114                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myType,  myEndpoint,  myPayload,  myHeader);
1115        }
1116        
1117        @Override
1118        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
1119                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myType, myEndpoint, myPayload, myHeader);
1120        }
1121
1122        /**
1123         * Gets the value(s) for <b>type</b> ().
1124         * creating it if it does
1125         * not exist. Will not return <code>null</code>.
1126         *
1127     * <p>
1128     * <b>Definition:</b>
1129     * The type of channel to send notifications on
1130     * </p> 
1131         */
1132        public BoundCodeDt<SubscriptionChannelTypeEnum> getTypeElement() {  
1133                if (myType == null) {
1134                        myType = new BoundCodeDt<SubscriptionChannelTypeEnum>(SubscriptionChannelTypeEnum.VALUESET_BINDER);
1135                }
1136                return myType;
1137        }
1138
1139        
1140        /**
1141         * Gets the value(s) for <b>type</b> ().
1142         * creating it if it does
1143         * not exist. Will not return <code>null</code>.
1144         *
1145     * <p>
1146     * <b>Definition:</b>
1147     * The type of channel to send notifications on
1148     * </p> 
1149         */
1150        public String getType() {  
1151                return getTypeElement().getValue();
1152        }
1153
1154        /**
1155         * Sets the value(s) for <b>type</b> ()
1156         *
1157     * <p>
1158     * <b>Definition:</b>
1159     * The type of channel to send notifications on
1160     * </p> 
1161         */
1162        public Channel setType(BoundCodeDt<SubscriptionChannelTypeEnum> theValue) {
1163                myType = theValue;
1164                return this;
1165        }
1166        
1167        
1168
1169        /**
1170         * Sets the value(s) for <b>type</b> ()
1171         *
1172     * <p>
1173     * <b>Definition:</b>
1174     * The type of channel to send notifications on
1175     * </p> 
1176         */
1177        public Channel setType(SubscriptionChannelTypeEnum theValue) {
1178                setType(new BoundCodeDt<SubscriptionChannelTypeEnum>(SubscriptionChannelTypeEnum.VALUESET_BINDER, theValue));
1179                
1180/*
1181                getTypeElement().setValueAsEnum(theValue);
1182*/
1183                return this;
1184        }
1185
1186  
1187        /**
1188         * Gets the value(s) for <b>endpoint</b> ().
1189         * creating it if it does
1190         * not exist. Will not return <code>null</code>.
1191         *
1192     * <p>
1193     * <b>Definition:</b>
1194     * The uri that describes the actual end-point to send messages to
1195     * </p> 
1196         */
1197        public UriDt getEndpointElement() {  
1198                if (myEndpoint == null) {
1199                        myEndpoint = new UriDt();
1200                }
1201                return myEndpoint;
1202        }
1203
1204        
1205        /**
1206         * Gets the value(s) for <b>endpoint</b> ().
1207         * creating it if it does
1208         * not exist. Will not return <code>null</code>.
1209         *
1210     * <p>
1211     * <b>Definition:</b>
1212     * The uri that describes the actual end-point to send messages to
1213     * </p> 
1214         */
1215        public String getEndpoint() {  
1216                return getEndpointElement().getValue();
1217        }
1218
1219        /**
1220         * Sets the value(s) for <b>endpoint</b> ()
1221         *
1222     * <p>
1223     * <b>Definition:</b>
1224     * The uri that describes the actual end-point to send messages to
1225     * </p> 
1226         */
1227        public Channel setEndpoint(UriDt theValue) {
1228                myEndpoint = theValue;
1229                return this;
1230        }
1231        
1232        
1233
1234        /**
1235         * Sets the value for <b>endpoint</b> ()
1236         *
1237     * <p>
1238     * <b>Definition:</b>
1239     * The uri that describes the actual end-point to send messages to
1240     * </p> 
1241         */
1242        public Channel setEndpoint( String theUri) {
1243                myEndpoint = new UriDt(theUri); 
1244                return this; 
1245        }
1246
1247 
1248        /**
1249         * Gets the value(s) for <b>payload</b> ().
1250         * creating it if it does
1251         * not exist. Will not return <code>null</code>.
1252         *
1253     * <p>
1254     * <b>Definition:</b>
1255     * The mime type to send the payload in - either application/xml+fhir, or application/json+fhir. If the mime type is blank, then there is no payload in the notification, just a notification
1256     * </p> 
1257         */
1258        public StringDt getPayloadElement() {  
1259                if (myPayload == null) {
1260                        myPayload = new StringDt();
1261                }
1262                return myPayload;
1263        }
1264
1265        
1266        /**
1267         * Gets the value(s) for <b>payload</b> ().
1268         * creating it if it does
1269         * not exist. Will not return <code>null</code>.
1270         *
1271     * <p>
1272     * <b>Definition:</b>
1273     * The mime type to send the payload in - either application/xml+fhir, or application/json+fhir. If the mime type is blank, then there is no payload in the notification, just a notification
1274     * </p> 
1275         */
1276        public String getPayload() {  
1277                return getPayloadElement().getValue();
1278        }
1279
1280        /**
1281         * Sets the value(s) for <b>payload</b> ()
1282         *
1283     * <p>
1284     * <b>Definition:</b>
1285     * The mime type to send the payload in - either application/xml+fhir, or application/json+fhir. If the mime type is blank, then there is no payload in the notification, just a notification
1286     * </p> 
1287         */
1288        public Channel setPayload(StringDt theValue) {
1289                myPayload = theValue;
1290                return this;
1291        }
1292        
1293        
1294
1295        /**
1296         * Sets the value for <b>payload</b> ()
1297         *
1298     * <p>
1299     * <b>Definition:</b>
1300     * The mime type to send the payload in - either application/xml+fhir, or application/json+fhir. If the mime type is blank, then there is no payload in the notification, just a notification
1301     * </p> 
1302         */
1303        public Channel setPayload( String theString) {
1304                myPayload = new StringDt(theString); 
1305                return this; 
1306        }
1307
1308 
1309        /**
1310         * Gets the value(s) for <b>header</b> ().
1311         * creating it if it does
1312         * not exist. Will not return <code>null</code>.
1313         *
1314     * <p>
1315     * <b>Definition:</b>
1316     * Additional headers / information to send as part of the notification
1317     * </p> 
1318         */
1319        public StringDt getHeaderElement() {  
1320                if (myHeader == null) {
1321                        myHeader = new StringDt();
1322                }
1323                return myHeader;
1324        }
1325
1326        
1327        /**
1328         * Gets the value(s) for <b>header</b> ().
1329         * creating it if it does
1330         * not exist. Will not return <code>null</code>.
1331         *
1332     * <p>
1333     * <b>Definition:</b>
1334     * Additional headers / information to send as part of the notification
1335     * </p> 
1336         */
1337        public String getHeader() {  
1338                return getHeaderElement().getValue();
1339        }
1340
1341        /**
1342         * Sets the value(s) for <b>header</b> ()
1343         *
1344     * <p>
1345     * <b>Definition:</b>
1346     * Additional headers / information to send as part of the notification
1347     * </p> 
1348         */
1349        public Channel setHeader(StringDt theValue) {
1350                myHeader = theValue;
1351                return this;
1352        }
1353        
1354        
1355
1356        /**
1357         * Sets the value for <b>header</b> ()
1358         *
1359     * <p>
1360     * <b>Definition:</b>
1361     * Additional headers / information to send as part of the notification
1362     * </p> 
1363         */
1364        public Channel setHeader( String theString) {
1365                myHeader = new StringDt(theString); 
1366                return this; 
1367        }
1368
1369 
1370
1371
1372        }
1373
1374
1375
1376
1377    @Override
1378    public String getResourceName() {
1379        return "Subscription";
1380    }
1381    
1382    public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum() {
1383        return ca.uhn.fhir.context.FhirVersionEnum.DSTU2;
1384    }
1385
1386
1387}